deck.gl
Version:
A suite of 3D-enabled data visualization overlays, suitable for react-map-gl
12 lines • 1.62 MB
JavaScript
(function webpackUniversalModuleDefinition(root, factory) {
if (typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if (typeof define === 'function' && define.amd) define([], factory);
else if (typeof exports === 'object') exports['deck'] = factory();
else root['deck'] = factory();})(globalThis, function () {
"use strict";var __exports__=(()=>{var hV=Object.create;var dp=Object.defineProperty;var dV=Object.getOwnPropertyDescriptor;var vV=Object.getOwnPropertyNames;var mV=Object.getPrototypeOf,gV=Object.prototype.hasOwnProperty;var OT=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(r,e)=>(typeof require<"u"?require:r)[e]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var Ln=(t,r)=>()=>(t&&(r=t(t=0)),r);var yt=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports),Lr=(t,r)=>{for(var e in r)dp(t,e,{get:r[e],enumerable:!0})},ET=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of vV(r))!gV.call(t,i)&&i!==e&&dp(t,i,{get:()=>r[i],enumerable:!(n=dV(r,i))||n.enumerable});return t};var me=(t,r,e)=>(e=t!=null?hV(mV(t)):{},ET(r||!t||!t.__esModule?dp(e,"default",{value:t,enumerable:!0}):e,t)),yV=t=>ET(dp({},"__esModule",{value:!0}),t);function Hg(t){if(Array.isArray(t))return t}var CT=Ln(()=>{});function Wg(t,r){var e=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e!=null){var n=[],i=!0,a=!1,o,s;try{for(e=e.call(t);!(i=(o=e.next()).done)&&(n.push(o.value),!(r&&n.length===r));i=!0);}catch(u){a=!0,s=u}finally{try{!i&&e.return!=null&&e.return()}finally{if(a)throw s}}return n}}var MT=Ln(()=>{});function bs(t,r){(r==null||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}var $g=Ln(()=>{});function jl(t,r){if(t){if(typeof t=="string")return bs(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return bs(t,r)}}var Xg=Ln(()=>{$g()});function qg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var IT=Ln(()=>{});function W(t,r){return Hg(t)||Wg(t,r)||jl(t,r)||qg()}var be=Ln(()=>{CT();MT();Xg();IT()});function A(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}var F=Ln(()=>{});function LT(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function T(t,r,e){return r&<(t.prototype,r),e&<(t,e),t}var j=Ln(()=>{});function ue(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ue=function(e){return typeof e}:ue=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ue(t)}var Ge=Ln(()=>{});function c(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var k=Ln(()=>{});var kT=yt((fve,Zg)=>{var Kg=function(t){"use strict";var r=Object.prototype,e=r.hasOwnProperty,n,i=typeof Symbol=="function"?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(V,U,X){return Object.defineProperty(V,U,{value:X,enumerable:!0,configurable:!0,writable:!0}),V[U]}try{u({},"")}catch{u=function(U,X,K){return U[X]=K}}function l(V,U,X,K){var te=U&&U.prototype instanceof g?U:g,ie=Object.create(te.prototype),ce=new H(K||[]);return ie._invoke=I(V,X,ce),ie}t.wrap=l;function f(V,U,X){try{return{type:"normal",arg:V.call(U,X)}}catch(K){return{type:"throw",arg:K}}}var p="suspendedStart",h="suspendedYield",d="executing",v="completed",m={};function g(){}function y(){}function _(){}var b={};u(b,a,function(){return this});var x=Object.getPrototypeOf,w=x&&x(x($([])));w&&w!==r&&e.call(w,a)&&(b=w);var P=_.prototype=g.prototype=Object.create(b);y.prototype=_,u(P,"constructor",_),u(_,"constructor",y),y.displayName=u(_,s,"GeneratorFunction");function E(V){["next","throw","return"].forEach(function(U){u(V,U,function(X){return this._invoke(U,X)})})}t.isGeneratorFunction=function(V){var U=typeof V=="function"&&V.constructor;return U?U===y||(U.displayName||U.name)==="GeneratorFunction":!1},t.mark=function(V){return Object.setPrototypeOf?Object.setPrototypeOf(V,_):(V.__proto__=_,u(V,s,"GeneratorFunction")),V.prototype=Object.create(P),V},t.awrap=function(V){return{__await:V}};function C(V,U){function X(ie,ce,Te,Me){var Fe=f(V[ie],V,ce);if(Fe.type==="throw")Me(Fe.arg);else{var we=Fe.arg,Ne=we.value;return Ne&&typeof Ne=="object"&&e.call(Ne,"__await")?U.resolve(Ne.__await).then(function(Oe){X("next",Oe,Te,Me)},function(Oe){X("throw",Oe,Te,Me)}):U.resolve(Ne).then(function(Oe){we.value=Oe,Te(we)},function(Oe){return X("throw",Oe,Te,Me)})}}var K;function te(ie,ce){function Te(){return new U(function(Me,Fe){X(ie,ce,Me,Fe)})}return K=K?K.then(Te,Te):Te()}this._invoke=te}E(C.prototype),u(C.prototype,o,function(){return this}),t.AsyncIterator=C,t.async=function(V,U,X,K,te){te===void 0&&(te=Promise);var ie=new C(l(V,U,X,K),te);return t.isGeneratorFunction(U)?ie:ie.next().then(function(ce){return ce.done?ce.value:ie.next()})};function I(V,U,X){var K=p;return function(ie,ce){if(K===d)throw new Error("Generator is already running");if(K===v){if(ie==="throw")throw ce;return ee()}for(X.method=ie,X.arg=ce;;){var Te=X.delegate;if(Te){var Me=O(Te,X);if(Me){if(Me===m)continue;return Me}}if(X.method==="next")X.sent=X._sent=X.arg;else if(X.method==="throw"){if(K===p)throw K=v,X.arg;X.dispatchException(X.arg)}else X.method==="return"&&X.abrupt("return",X.arg);K=d;var Fe=f(V,U,X);if(Fe.type==="normal"){if(K=X.done?v:h,Fe.arg===m)continue;return{value:Fe.arg,done:X.done}}else Fe.type==="throw"&&(K=v,X.method="throw",X.arg=Fe.arg)}}}function O(V,U){var X=V.iterator[U.method];if(X===n){if(U.delegate=null,U.method==="throw"){if(V.iterator.return&&(U.method="return",U.arg=n,O(V,U),U.method==="throw"))return m;U.method="throw",U.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var K=f(X,V.iterator,U.arg);if(K.type==="throw")return U.method="throw",U.arg=K.arg,U.delegate=null,m;var te=K.arg;if(!te)return U.method="throw",U.arg=new TypeError("iterator result is not an object"),U.delegate=null,m;if(te.done)U[V.resultName]=te.value,U.next=V.nextLoc,U.method!=="return"&&(U.method="next",U.arg=n);else return te;return U.delegate=null,m}E(P),u(P,s,"Generator"),u(P,a,function(){return this}),u(P,"toString",function(){return"[object Generator]"});function D(V){var U={tryLoc:V[0]};1 in V&&(U.catchLoc=V[1]),2 in V&&(U.finallyLoc=V[2],U.afterLoc=V[3]),this.tryEntries.push(U)}function N(V){var U=V.completion||{};U.type="normal",delete U.arg,V.completion=U}function H(V){this.tryEntries=[{tryLoc:"root"}],V.forEach(D,this),this.reset(!0)}t.keys=function(V){var U=[];for(var X in V)U.push(X);return U.reverse(),function K(){for(;U.length;){var te=U.pop();if(te in V)return K.value=te,K.done=!1,K}return K.done=!0,K}};function $(V){if(V){var U=V[a];if(U)return U.call(V);if(typeof V.next=="function")return V;if(!isNaN(V.length)){var X=-1,K=function te(){for(;++X<V.length;)if(e.call(V,X))return te.value=V[X],te.done=!1,te;return te.value=n,te.done=!0,te};return K.next=K}}return{next:ee}}t.values=$;function ee(){return{value:n,done:!0}}return H.prototype={constructor:H,reset:function(V){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(N),!V)for(var U in this)U.charAt(0)==="t"&&e.call(this,U)&&!isNaN(+U.slice(1))&&(this[U]=n)},stop:function(){this.done=!0;var V=this.tryEntries[0],U=V.completion;if(U.type==="throw")throw U.arg;return this.rval},dispatchException:function(V){if(this.done)throw V;var U=this;function X(Me,Fe){return ie.type="throw",ie.arg=V,U.next=Me,Fe&&(U.method="next",U.arg=n),!!Fe}for(var K=this.tryEntries.length-1;K>=0;--K){var te=this.tryEntries[K],ie=te.completion;if(te.tryLoc==="root")return X("end");if(te.tryLoc<=this.prev){var ce=e.call(te,"catchLoc"),Te=e.call(te,"finallyLoc");if(ce&&Te){if(this.prev<te.catchLoc)return X(te.catchLoc,!0);if(this.prev<te.finallyLoc)return X(te.finallyLoc)}else if(ce){if(this.prev<te.catchLoc)return X(te.catchLoc,!0)}else if(Te){if(this.prev<te.finallyLoc)return X(te.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(V,U){for(var X=this.tryEntries.length-1;X>=0;--X){var K=this.tryEntries[X];if(K.tryLoc<=this.prev&&e.call(K,"finallyLoc")&&this.prev<K.finallyLoc){var te=K;break}}te&&(V==="break"||V==="continue")&&te.tryLoc<=U&&U<=te.finallyLoc&&(te=null);var ie=te?te.completion:{};return ie.type=V,ie.arg=U,te?(this.method="next",this.next=te.finallyLoc,m):this.complete(ie)},complete:function(V,U){if(V.type==="throw")throw V.arg;return V.type==="break"||V.type==="continue"?this.next=V.arg:V.type==="return"?(this.rval=this.arg=V.arg,this.method="return",this.next="end"):V.type==="normal"&&U&&(this.next=U),m},finish:function(V){for(var U=this.tryEntries.length-1;U>=0;--U){var X=this.tryEntries[U];if(X.finallyLoc===V)return this.complete(X.completion,X.afterLoc),N(X),m}},catch:function(V){for(var U=this.tryEntries.length-1;U>=0;--U){var X=this.tryEntries[U];if(X.tryLoc===V){var K=X.completion;if(K.type==="throw"){var te=K.arg;N(X)}return te}}throw new Error("illegal catch attempt")},delegateYield:function(V,U,X){return this.delegate={iterator:$(V),resultName:U,nextLoc:X},this.method==="next"&&(this.arg=n),m}},t}(typeof Zg=="object"?Zg.exports:{});try{regeneratorRuntime=Kg}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Kg:Function("r","regeneratorRuntime = r")(Kg)}});var Ae=yt((cve,BT)=>{BT.exports=kT()});var JT=yt(()=>{});var P2=yt((INe,vd)=>{(function(t,r,e,n){"use strict";var i=["","webkit","Moz","MS","ms","o"],a=r.createElement("div"),o="function",s=Math.round,u=Math.abs,l=Date.now;function f(M,R,G){return setTimeout(_(M,G),R)}function p(M,R,G){return Array.isArray(M)?(h(M,G[R],G),!0):!1}function h(M,R,G){var Q;if(M)if(M.forEach)M.forEach(R,G);else if(M.length!==n)for(Q=0;Q<M.length;)R.call(G,M[Q],Q,M),Q++;else for(Q in M)M.hasOwnProperty(Q)&&R.call(G,M[Q],Q,M)}function d(M,R,G){var Q="DEPRECATED METHOD: "+R+`
`+G+` AT
`;return function(){var oe=new Error("get-stack-trace"),xe=oe&&oe.stack?oe.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",ze=t.console&&(t.console.warn||t.console.log);return ze&&ze.call(t.console,Q,xe),M.apply(this,arguments)}}var v;typeof Object.assign!="function"?v=function(R){if(R===n||R===null)throw new TypeError("Cannot convert undefined or null to object");for(var G=Object(R),Q=1;Q<arguments.length;Q++){var oe=arguments[Q];if(oe!==n&&oe!==null)for(var xe in oe)oe.hasOwnProperty(xe)&&(G[xe]=oe[xe])}return G}:v=Object.assign;var m=d(function(R,G,Q){for(var oe=Object.keys(G),xe=0;xe<oe.length;)(!Q||Q&&R[oe[xe]]===n)&&(R[oe[xe]]=G[oe[xe]]),xe++;return R},"extend","Use `assign`."),g=d(function(R,G){return m(R,G,!0)},"merge","Use `assign`.");function y(M,R,G){var Q=R.prototype,oe;oe=M.prototype=Object.create(Q),oe.constructor=M,oe._super=Q,G&&v(oe,G)}function _(M,R){return function(){return M.apply(R,arguments)}}function b(M,R){return typeof M==o?M.apply(R&&R[0]||n,R):M}function x(M,R){return M===n?R:M}function w(M,R,G){h(I(R),function(Q){M.addEventListener(Q,G,!1)})}function P(M,R,G){h(I(R),function(Q){M.removeEventListener(Q,G,!1)})}function E(M,R){for(;M;){if(M==R)return!0;M=M.parentNode}return!1}function C(M,R){return M.indexOf(R)>-1}function I(M){return M.trim().split(/\s+/g)}function O(M,R,G){if(M.indexOf&&!G)return M.indexOf(R);for(var Q=0;Q<M.length;){if(G&&M[Q][G]==R||!G&&M[Q]===R)return Q;Q++}return-1}function D(M){return Array.prototype.slice.call(M,0)}function N(M,R,G){for(var Q=[],oe=[],xe=0;xe<M.length;){var ze=R?M[xe][R]:M[xe];O(oe,ze)<0&&Q.push(M[xe]),oe[xe]=ze,xe++}return G&&(R?Q=Q.sort(function(Zt,fr){return Zt[R]>fr[R]}):Q=Q.sort()),Q}function H(M,R){for(var G,Q,oe=R[0].toUpperCase()+R.slice(1),xe=0;xe<i.length;){if(G=i[xe],Q=G?G+oe:R,Q in M)return Q;xe++}return n}var $=1;function ee(){return $++}function V(M){var R=M.ownerDocument||M;return R.defaultView||R.parentWindow||t}var U=/mobile|tablet|ip(ad|hone|od)|android/i,X="ontouchstart"in t,K=H(t,"PointerEvent")!==n,te=X&&U.test(navigator.userAgent),ie="touch",ce="pen",Te="mouse",Me="kinect",Fe=25,we=1,Ne=2,Oe=4,ft=8,un=1,Rr=2,ea=4,Ct=8,Ht=16,Ke=Rr|ea,ln=Ct|Ht,fn=Ke|ln,cn=["x","y"],ys=["clientX","clientY"];function _r(M,R){var G=this;this.manager=M,this.callback=R,this.element=M.element,this.target=M.options.inputTarget,this.domHandler=function(Q){b(M.options.enable,[M])&&G.handler(Q)},this.init()}_r.prototype={handler:function(){},init:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(V(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&P(this.element,this.evEl,this.domHandler),this.evTarget&&P(this.target,this.evTarget,this.domHandler),this.evWin&&P(V(this.element),this.evWin,this.domHandler)}};function Bl(M){var R,G=M.options.inputClass;return G?R=G:K?R=Bg:te?R=up:X?R=Fg:R=sp,new R(M,Ig)}function Ig(M,R,G){var Q=G.pointers.length,oe=G.changedPointers.length,xe=R&we&&Q-oe===0,ze=R&(Oe|ft)&&Q-oe===0;G.isFirst=!!xe,G.isFinal=!!ze,xe&&(M.session={}),G.eventType=R,Rg(M,G),M.emit("hammer.input",G),M.recognize(G),M.session.prevInput=G}function Rg(M,R){var G=M.session,Q=R.pointers,oe=Q.length;G.firstInput||(G.firstInput=ap(R)),oe>1&&!G.firstMultiple?G.firstMultiple=ap(R):oe===1&&(G.firstMultiple=!1);var xe=G.firstInput,ze=G.firstMultiple,Wt=ze?ze.center:xe.center,Zt=R.center=op(Q);R.timeStamp=l(),R.deltaTime=R.timeStamp-xe.timeStamp,R.angle=qa(Wt,Zt),R.distance=li(Wt,Zt),Lg(G,R),R.offsetDirection=Xa(R.deltaX,R.deltaY);var fr=$a(R.deltaTime,R.deltaX,R.deltaY);R.overallVelocityX=fr.x,R.overallVelocityY=fr.y,R.overallVelocity=u(fr.x)>u(fr.y)?fr.x:fr.y,R.scale=ze?$z(ze.pointers,Q):1,R.rotation=ze?Wz(ze.pointers,Q):0,R.maxPointers=G.prevInput?R.pointers.length>G.prevInput.maxPointers?R.pointers.length:G.prevInput.maxPointers:R.pointers.length,kg(G,R);var Rn=M.element;E(R.srcEvent.target,Rn)&&(Rn=R.srcEvent.target),R.target=Rn}function Lg(M,R){var G=R.center,Q=M.offsetDelta||{},oe=M.prevDelta||{},xe=M.prevInput||{};(R.eventType===we||xe.eventType===Oe)&&(oe=M.prevDelta={x:xe.deltaX||0,y:xe.deltaY||0},Q=M.offsetDelta={x:G.x,y:G.y}),R.deltaX=oe.x+(G.x-Q.x),R.deltaY=oe.y+(G.y-Q.y)}function kg(M,R){var G=M.lastInterval||R,Q=R.timeStamp-G.timeStamp,oe,xe,ze,Wt;if(R.eventType!=ft&&(Q>Fe||G.velocity===n)){var Zt=R.deltaX-G.deltaX,fr=R.deltaY-G.deltaY,Rn=$a(Q,Zt,fr);xe=Rn.x,ze=Rn.y,oe=u(Rn.x)>u(Rn.y)?Rn.x:Rn.y,Wt=Xa(Zt,fr),M.lastInterval=R}else oe=G.velocity,xe=G.velocityX,ze=G.velocityY,Wt=G.direction;R.velocity=oe,R.velocityX=xe,R.velocityY=ze,R.direction=Wt}function ap(M){for(var R=[],G=0;G<M.pointers.length;)R[G]={clientX:s(M.pointers[G].clientX),clientY:s(M.pointers[G].clientY)},G++;return{timeStamp:l(),pointers:R,center:op(R),deltaX:M.deltaX,deltaY:M.deltaY}}function op(M){var R=M.length;if(R===1)return{x:s(M[0].clientX),y:s(M[0].clientY)};for(var G=0,Q=0,oe=0;oe<R;)G+=M[oe].clientX,Q+=M[oe].clientY,oe++;return{x:s(G/R),y:s(Q/R)}}function $a(M,R,G){return{x:R/M||0,y:G/M||0}}function Xa(M,R){return M===R?un:u(M)>=u(R)?M<0?Rr:ea:R<0?Ct:Ht}function li(M,R,G){G||(G=cn);var Q=R[G[0]]-M[G[0]],oe=R[G[1]]-M[G[1]];return Math.sqrt(Q*Q+oe*oe)}function qa(M,R,G){G||(G=cn);var Q=R[G[0]]-M[G[0]],oe=R[G[1]]-M[G[1]];return Math.atan2(oe,Q)*180/Math.PI}function Wz(M,R){return qa(R[1],R[0],ys)+qa(M[1],M[0],ys)}function $z(M,R){return li(R[0],R[1],ys)/li(M[0],M[1],ys)}var Xz={mousedown:we,mousemove:Ne,mouseup:Oe},qz="mousedown",Yz="mousemove mouseup";function sp(){this.evEl=qz,this.evWin=Yz,this.pressed=!1,_r.apply(this,arguments)}y(sp,_r,{handler:function(R){var G=Xz[R.type];G&we&&R.button===0&&(this.pressed=!0),G&Ne&&R.which!==1&&(G=Oe),this.pressed&&(G&Oe&&(this.pressed=!1),this.callback(this.manager,G,{pointers:[R],changedPointers:[R],pointerType:Te,srcEvent:R}))}});var Kz={pointerdown:we,pointermove:Ne,pointerup:Oe,pointercancel:ft,pointerout:ft},Zz={2:ie,3:ce,4:Te,5:Me},dT="pointerdown",vT="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(dT="MSPointerDown",vT="MSPointerMove MSPointerUp MSPointerCancel");function Bg(){this.evEl=dT,this.evWin=vT,_r.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}y(Bg,_r,{handler:function(R){var G=this.store,Q=!1,oe=R.type.toLowerCase().replace("ms",""),xe=Kz[oe],ze=Zz[R.pointerType]||R.pointerType,Wt=ze==ie,Zt=O(G,R.pointerId,"pointerId");xe&we&&(R.button===0||Wt)?Zt<0&&(G.push(R),Zt=G.length-1):xe&(Oe|ft)&&(Q=!0),!(Zt<0)&&(G[Zt]=R,this.callback(this.manager,xe,{pointers:G,changedPointers:[R],pointerType:ze,srcEvent:R}),Q&&G.splice(Zt,1))}});var Jz={touchstart:we,touchmove:Ne,touchend:Oe,touchcancel:ft},Qz="touchstart",eV="touchstart touchmove touchend touchcancel";function mT(){this.evTarget=Qz,this.evWin=eV,this.started=!1,_r.apply(this,arguments)}y(mT,_r,{handler:function(R){var G=Jz[R.type];if(G===we&&(this.started=!0),!!this.started){var Q=tV.call(this,R,G);G&(Oe|ft)&&Q[0].length-Q[1].length===0&&(this.started=!1),this.callback(this.manager,G,{pointers:Q[0],changedPointers:Q[1],pointerType:ie,srcEvent:R})}}});function tV(M,R){var G=D(M.touches),Q=D(M.changedTouches);return R&(Oe|ft)&&(G=N(G.concat(Q),"identifier",!0)),[G,Q]}var rV={touchstart:we,touchmove:Ne,touchend:Oe,touchcancel:ft},nV="touchstart touchmove touchend touchcancel";function up(){this.evTarget=nV,this.targetIds={},_r.apply(this,arguments)}y(up,_r,{handler:function(R){var G=rV[R.type],Q=iV.call(this,R,G);Q&&this.callback(this.manager,G,{pointers:Q[0],changedPointers:Q[1],pointerType:ie,srcEvent:R})}});function iV(M,R){var G=D(M.touches),Q=this.targetIds;if(R&(we|Ne)&&G.length===1)return Q[G[0].identifier]=!0,[G,G];var oe,xe,ze=D(M.changedTouches),Wt=[],Zt=this.target;if(xe=G.filter(function(fr){return E(fr.target,Zt)}),R===we)for(oe=0;oe<xe.length;)Q[xe[oe].identifier]=!0,oe++;for(oe=0;oe<ze.length;)Q[ze[oe].identifier]&&Wt.push(ze[oe]),R&(Oe|ft)&&delete Q[ze[oe].identifier],oe++;if(Wt.length)return[N(xe.concat(Wt),"identifier",!0),Wt]}var aV=2500,gT=25;function Fg(){_r.apply(this,arguments);var M=_(this.handler,this);this.touch=new up(this.manager,M),this.mouse=new sp(this.manager,M),this.primaryTouch=null,this.lastTouches=[]}y(Fg,_r,{handler:function(R,G,Q){var oe=Q.pointerType==ie,xe=Q.pointerType==Te;if(!(xe&&Q.sourceCapabilities&&Q.sourceCapabilities.firesTouchEvents)){if(oe)oV.call(this,G,Q);else if(xe&&sV.call(this,Q))return;this.callback(R,G,Q)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function oV(M,R){M&we?(this.primaryTouch=R.changedPointers[0].identifier,yT.call(this,R)):M&(Oe|ft)&&yT.call(this,R)}function yT(M){var R=M.changedPointers[0];if(R.identifier===this.primaryTouch){var G={x:R.clientX,y:R.clientY};this.lastTouches.push(G);var Q=this.lastTouches,oe=function(){var xe=Q.indexOf(G);xe>-1&&Q.splice(xe,1)};setTimeout(oe,aV)}}function sV(M){for(var R=M.srcEvent.clientX,G=M.srcEvent.clientY,Q=0;Q<this.lastTouches.length;Q++){var oe=this.lastTouches[Q],xe=Math.abs(R-oe.x),ze=Math.abs(G-oe.y);if(xe<=gT&&ze<=gT)return!0}return!1}var _T=H(a.style,"touchAction"),bT=_T!==n,xT="compute",AT="auto",Dg="manipulation",Ya="none",Fl="pan-x",Dl="pan-y",lp=lV();function Ng(M,R){this.manager=M,this.set(R)}Ng.prototype={set:function(M){M==xT&&(M=this.compute()),bT&&this.manager.element.style&&lp[M]&&(this.manager.element.style[_T]=M),this.actions=M.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var M=[];return h(this.manager.recognizers,function(R){b(R.options.enable,[R])&&(M=M.concat(R.getTouchAction()))}),uV(M.join(" "))},preventDefaults:function(M){var R=M.srcEvent,G=M.offsetDirection;if(this.manager.session.prevented){R.preventDefault();return}var Q=this.actions,oe=C(Q,Ya)&&!lp[Ya],xe=C(Q,Dl)&&!lp[Dl],ze=C(Q,Fl)&&!lp[Fl];if(oe){var Wt=M.pointers.length===1,Zt=M.distance<2,fr=M.deltaTime<250;if(Wt&&Zt&&fr)return}if(!(ze&&xe)&&(oe||xe&&G&Ke||ze&&G&ln))return this.preventSrc(R)},preventSrc:function(M){this.manager.session.prevented=!0,M.preventDefault()}};function uV(M){if(C(M,Ya))return Ya;var R=C(M,Fl),G=C(M,Dl);return R&&G?Ya:R||G?R?Fl:Dl:C(M,Dg)?Dg:AT}function lV(){if(!bT)return!1;var M={},R=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(G){M[G]=R?t.CSS.supports("touch-action",G):!0}),M}var fp=1,Ur=2,_s=4,ta=8,fi=ta,Nl=16,In=32;function ci(M){this.options=v({},this.defaults,M||{}),this.id=ee(),this.manager=null,this.options.enable=x(this.options.enable,!0),this.state=fp,this.simultaneous={},this.requireFail=[]}ci.prototype={defaults:{},set:function(M){return v(this.options,M),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(M){if(p(M,"recognizeWith",this))return this;var R=this.simultaneous;return M=cp(M,this),R[M.id]||(R[M.id]=M,M.recognizeWith(this)),this},dropRecognizeWith:function(M){return p(M,"dropRecognizeWith",this)?this:(M=cp(M,this),delete this.simultaneous[M.id],this)},requireFailure:function(M){if(p(M,"requireFailure",this))return this;var R=this.requireFail;return M=cp(M,this),O(R,M)===-1&&(R.push(M),M.requireFailure(this)),this},dropRequireFailure:function(M){if(p(M,"dropRequireFailure",this))return this;M=cp(M,this);var R=O(this.requireFail,M);return R>-1&&this.requireFail.splice(R,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(M){return!!this.simultaneous[M.id]},emit:function(M){var R=this,G=this.state;function Q(oe){R.manager.emit(oe,M)}G<ta&&Q(R.options.event+ST(G)),Q(R.options.event),M.additionalEvent&&Q(M.additionalEvent),G>=ta&&Q(R.options.event+ST(G))},tryEmit:function(M){if(this.canEmit())return this.emit(M);this.state=In},canEmit:function(){for(var M=0;M<this.requireFail.length;){if(!(this.requireFail[M].state&(In|fp)))return!1;M++}return!0},recognize:function(M){var R=v({},M);if(!b(this.options.enable,[this,R])){this.reset(),this.state=In;return}this.state&(fi|Nl|In)&&(this.state=fp),this.state=this.process(R),this.state&(Ur|_s|ta|Nl)&&this.tryEmit(R)},process:function(M){},getTouchAction:function(){},reset:function(){}};function ST(M){return M&Nl?"cancel":M&ta?"end":M&_s?"move":M&Ur?"start":""}function TT(M){return M==Ht?"down":M==Ct?"up":M==Rr?"left":M==ea?"right":""}function cp(M,R){var G=R.manager;return G?G.get(M):M}function pn(){ci.apply(this,arguments)}y(pn,ci,{defaults:{pointers:1},attrTest:function(M){var R=this.options.pointers;return R===0||M.pointers.length===R},process:function(M){var R=this.state,G=M.eventType,Q=R&(Ur|_s),oe=this.attrTest(M);return Q&&(G&ft||!oe)?R|Nl:Q||oe?G&Oe?R|ta:R&Ur?R|_s:Ur:In}});function pp(){pn.apply(this,arguments),this.pX=null,this.pY=null}y(pp,pn,{defaults:{event:"pan",threshold:10,pointers:1,direction:fn},getTouchAction:function(){var M=this.options.direction,R=[];return M&Ke&&R.push(Dl),M&ln&&R.push(Fl),R},directionTest:function(M){var R=this.options,G=!0,Q=M.distance,oe=M.direction,xe=M.deltaX,ze=M.deltaY;return oe&R.direction||(R.direction&Ke?(oe=xe===0?un:xe<0?Rr:ea,G=xe!=this.pX,Q=Math.abs(M.deltaX)):(oe=ze===0?un:ze<0?Ct:Ht,G=ze!=this.pY,Q=Math.abs(M.deltaY))),M.direction=oe,G&&Q>R.threshold&&oe&R.direction},attrTest:function(M){return pn.prototype.attrTest.call(this,M)&&(this.state&Ur||!(this.state&Ur)&&this.directionTest(M))},emit:function(M){this.pX=M.deltaX,this.pY=M.deltaY;var R=TT(M.direction);R&&(M.additionalEvent=this.options.event+R),this._super.emit.call(this,M)}});function jg(){pn.apply(this,arguments)}y(jg,pn,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ya]},attrTest:function(M){return this._super.attrTest.call(this,M)&&(Math.abs(M.scale-1)>this.options.threshold||this.state&Ur)},emit:function(M){if(M.scale!==1){var R=M.scale<1?"in":"out";M.additionalEvent=this.options.event+R}this._super.emit.call(this,M)}});function Ug(){ci.apply(this,arguments),this._timer=null,this._input=null}y(Ug,ci,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[AT]},process:function(M){var R=this.options,G=M.pointers.length===R.pointers,Q=M.distance<R.threshold,oe=M.deltaTime>R.time;if(this._input=M,!Q||!G||M.eventType&(Oe|ft)&&!oe)this.reset();else if(M.eventType&we)this.reset(),this._timer=f(function(){this.state=fi,this.tryEmit()},R.time,this);else if(M.eventType&Oe)return fi;return In},reset:function(){clearTimeout(this._timer)},emit:function(M){this.state===fi&&(M&&M.eventType&Oe?this.manager.emit(this.options.event+"up",M):(this._input.timeStamp=l(),this.manager.emit(this.options.event,this._input)))}});function Gg(){pn.apply(this,arguments)}y(Gg,pn,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ya]},attrTest:function(M){return this._super.attrTest.call(this,M)&&(Math.abs(M.rotation)>this.options.threshold||this.state&Ur)}});function zg(){pn.apply(this,arguments)}y(zg,pn,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ke|ln,pointers:1},getTouchAction:function(){return pp.prototype.getTouchAction.call(this)},attrTest:function(M){var R=this.options.direction,G;return R&(Ke|ln)?G=M.overallVelocity:R&Ke?G=M.overallVelocityX:R&ln&&(G=M.overallVelocityY),this._super.attrTest.call(this,M)&&R&M.offsetDirection&&M.distance>this.options.threshold&&M.maxPointers==this.options.pointers&&u(G)>this.options.velocity&&M.eventType&Oe},emit:function(M){var R=TT(M.offsetDirection);R&&this.manager.emit(this.options.event+R,M),this.manager.emit(this.options.event,M)}});function hp(){ci.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}y(hp,ci,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Dg]},process:function(M){var R=this.options,G=M.pointers.length===R.pointers,Q=M.distance<R.threshold,oe=M.deltaTime<R.time;if(this.reset(),M.eventType&we&&this.count===0)return this.failTimeout();if(Q&&oe&&G){if(M.eventType!=Oe)return this.failTimeout();var xe=this.pTime?M.timeStamp-this.pTime<R.interval:!0,ze=!this.pCenter||li(this.pCenter,M.center)<R.posThreshold;this.pTime=M.timeStamp,this.pCenter=M.center,!ze||!xe?this.count=1:this.count+=1,this._input=M;var Wt=this.count%R.taps;if(Wt===0)return this.hasRequireFailures()?(this._timer=f(function(){this.state=fi,this.tryEmit()},R.interval,this),Ur):fi}return In},failTimeout:function(){return this._timer=f(function(){this.state=In},this.options.interval,this),In},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==fi&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function pi(M,R){return R=R||{},R.recognizers=x(R.recognizers,pi.defaults.preset),new Vg(M,R)}pi.VERSION="2.0.7",pi.defaults={domEvents:!1,touchAction:xT,enable:!0,inputTarget:null,inputClass:null,preset:[[Gg,{enable:!1}],[jg,{enable:!1},["rotate"]],[zg,{direction:Ke}],[pp,{direction:Ke},["swipe"]],[hp],[hp,{event:"doubletap",taps:2},["tap"]],[Ug]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var fV=1,wT=2;function Vg(M,R){this.options=v({},pi.defaults,R||{}),this.options.inputTarget=this.options.inputTarget||M,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=M,this.input=Bl(this),this.touchAction=new Ng(this,this.options.touchAction),PT(this,!0),h(this.options.recognizers,function(G){var Q=this.add(new G[0](G[1]));G[2]&&Q.recognizeWith(G[2]),G[3]&&Q.requireFailure(G[3])},this)}Vg.prototype={set:function(M){return v(this.options,M),M.touchAction&&this.touchAction.update(),M.inputTarget&&(this.input.destroy(),this.input.target=M.inputTarget,this.input.init()),this},stop:function(M){this.session.stopped=M?wT:fV},recognize:function(M){var R=this.session;if(!R.stopped){this.touchAction.preventDefaults(M);var G,Q=this.recognizers,oe=R.curRecognizer;(!oe||oe&&oe.state&fi)&&(oe=R.curRecognizer=null);for(var xe=0;xe<Q.length;)G=Q[xe],R.stopped!==wT&&(!oe||G==oe||G.canRecognizeWith(oe))?G.recognize(M):G.reset(),!oe&&G.state&(Ur|_s|ta)&&(oe=R.curRecognizer=G),xe++}},get:function(M){if(M instanceof ci)return M;for(var R=this.recognizers,G=0;G<R.length;G++)if(R[G].options.event==M)return R[G];return null},add:function(M){if(p(M,"add",this))return this;var R=this.get(M.options.event);return R&&this.remove(R),this.recognizers.push(M),M.manager=this,this.touchAction.update(),M},remove:function(M){if(p(M,"remove",this))return this;if(M=this.get(M),M){var R=this.recognizers,G=O(R,M);G!==-1&&(R.splice(G,1),this.touchAction.update())}return this},on:function(M,R){if(M!==n&&R!==n){var G=this.handlers;return h(I(M),function(Q){G[Q]=G[Q]||[],G[Q].push(R)}),this}},off:function(M,R){if(M!==n){var G=this.handlers;return h(I(M),function(Q){R?G[Q]&&G[Q].splice(O(G[Q],R),1):delete G[Q]}),this}},emit:function(M,R){this.options.domEvents&&cV(M,R);var G=this.handlers[M]&&this.handlers[M].slice();if(!(!G||!G.length)){R.type=M,R.preventDefault=function(){R.srcEvent.preventDefault()};for(var Q=0;Q<G.length;)G[Q](R),Q++}},destroy:function(){this.element&&PT(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function PT(M,R){var G=M.element;if(G.style){var Q;h(M.options.cssProps,function(oe,xe){Q=H(G.style,xe),R?(M.oldCssProps[Q]=G.style[Q],G.style[Q]=oe):G.style[Q]=M.oldCssProps[Q]||""}),R||(M.oldCssProps={})}}function cV(M,R){var G=r.createEvent("Event");G.initEvent(M,!0,!0),G.gesture=R,R.target.dispatchEvent(G)}v(pi,{INPUT_START:we,INPUT_MOVE:Ne,INPUT_END:Oe,INPUT_CANCEL:ft,STATE_POSSIBLE:fp,STATE_BEGAN:Ur,STATE_CHANGED:_s,STATE_ENDED:ta,STATE_RECOGNIZED:fi,STATE_CANCELLED:Nl,STATE_FAILED:In,DIRECTION_NONE:un,DIRECTION_LEFT:Rr,DIRECTION_RIGHT:ea,DIRECTION_UP:Ct,DIRECTION_DOWN:Ht,DIRECTION_HORIZONTAL:Ke,DIRECTION_VERTICAL:ln,DIRECTION_ALL:fn,Manager:Vg,Input:_r,TouchAction:Ng,TouchInput:up,MouseInput:sp,PointerEventInput:Bg,TouchMouseInput:Fg,SingleTouchInput:mT,Recognizer:ci,AttrRecognizer:pn,Tap:hp,Pan:pp,Swipe:zg,Pinch:jg,Rotate:Gg,Press:Ug,on:w,off:P,each:h,merge:g,extend:m,assign:v,inherit:y,bindFn:_,prefixed:H});var pV=typeof t<"u"?t:typeof self<"u"?self:{};pV.Hammer=pi,n==="function"&&define.amd?define(function(){return pi}):typeof vd<"u"&&vd.exports?vd.exports=pi:t[e]=pi})(window,document,"Hammer")});var JL=yt((ZWe,zb)=>{"use strict";zb.exports=Zd;zb.exports.default=Zd;function Zd(t,r,e){e=e||2;var n=r&&r.length,i=n?r[0]*e:t.length,a=YL(t,0,i,e,!0),o=[];if(!a||a.next===a.prev)return o;var s,u,l,f,p,h,d;if(n&&(a=TQ(t,r,a,e)),t.length>80*e){s=l=t[0],u=f=t[1];for(var v=e;v<i;v+=e)p=t[v],h=t[v+1],p<s&&(s=p),h<u&&(u=h),p>l&&(l=p),h>f&&(f=h);d=Math.max(l-s,f-u),d=d!==0?32767/d:0}return fc(a,o,e,s,u,d,0),o}function YL(t,r,e,n,i){var a,o;if(i===Gb(t,r,e,n)>0)for(a=r;a<e;a+=n)o=qL(a,t[a],t[a+1],o);else for(a=e-n;a>=r;a-=n)o=qL(a,t[a],t[a+1],o);return o&&Jd(o,o.next)&&(pc(o),o=o.next),o}function No(t,r){if(!t)return t;r||(r=t);var e=t,n;do if(n=!1,!e.steiner&&(Jd(e,e.next)||Tt(e.prev,e,e.next)===0)){if(pc(e),e=r=e.prev,e===e.next)break;n=!0}else e=e.next;while(n||e!==r);return r}function fc(t,r,e,n,i,a,o){if(t){!o&&a&&CQ(t,n,i,a);for(var s=t,u,l;t.prev!==t.next;){if(u=t.prev,l=t.next,a?xQ(t,n,i,a):bQ(t)){r.push(u.i/e|0),r.push(t.i/e|0),r.push(l.i/e|0),pc(t),t=l.next,s=l.next;continue}if(t=l,t===s){o?o===1?(t=AQ(No(t),r,e),fc(t,r,e,n,i,a,2)):o===2&&SQ(t,r,e,n,i,a):fc(No(t),r,e,n,i,a,1);break}}}}function bQ(t){var r=t.prev,e=t,n=t.next;if(Tt(r,e,n)>=0)return!1;for(var i=r.x,a=e.x,o=n.x,s=r.y,u=e.y,l=n.y,f=i<a?i<o?i:o:a<o?a:o,p=s<u?s<l?s:l:u<l?u:l,h=i>a?i>o?i:o:a>o?a:o,d=s>u?s>l?s:l:u>l?u:l,v=n.next;v!==r;){if(v.x>=f&&v.x<=h&&v.y>=p&&v.y<=d&&Iu(i,s,a,u,o,l,v.x,v.y)&&Tt(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function xQ(t,r,e,n){var i=t.prev,a=t,o=t.next;if(Tt(i,a,o)>=0)return!1;for(var s=i.x,u=a.x,l=o.x,f=i.y,p=a.y,h=o.y,d=s<u?s<l?s:l:u<l?u:l,v=f<p?f<h?f:h:p<h?p:h,m=s>u?s>l?s:l:u>l?u:l,g=f>p?f>h?f:h:p>h?p:h,y=jb(d,v,r,e,n),_=jb(m,g,r,e,n),b=t.prevZ,x=t.nextZ;b&&b.z>=y&&x&&x.z<=_;){if(b.x>=d&&b.x<=m&&b.y>=v&&b.y<=g&&b!==i&&b!==o&&Iu(s,f,u,p,l,h,b.x,b.y)&&Tt(b.prev,b,b.next)>=0||(b=b.prevZ,x.x>=d&&x.x<=m&&x.y>=v&&x.y<=g&&x!==i&&x!==o&&Iu(s,f,u,p,l,h,x.x,x.y)&&Tt(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;b&&b.z>=y;){if(b.x>=d&&b.x<=m&&b.y>=v&&b.y<=g&&b!==i&&b!==o&&Iu(s,f,u,p,l,h,b.x,b.y)&&Tt(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;x&&x.z<=_;){if(x.x>=d&&x.x<=m&&x.y>=v&&x.y<=g&&x!==i&&x!==o&&Iu(s,f,u,p,l,h,x.x,x.y)&&Tt(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function AQ(t,r,e){var n=t;do{var i=n.prev,a=n.next.next;!Jd(i,a)&&KL(i,n,n.next,a)&&cc(i,a)&&cc(a,i)&&(r.push(i.i/e|0),r.push(n.i/e|0),r.push(a.i/e|0),pc(n),pc(n.next),n=t=a),n=n.next}while(n!==t);return No(n)}function SQ(t,r,e,n,i,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&RQ(o,s)){var u=ZL(o,s);o=No(o,o.next),u=No(u,u.next),fc(o,r,e,n,i,a,0),fc(u,r,e,n,i,a,0);return}s=s.next}o=o.next}while(o!==t)}function TQ(t,r,e,n){var i=[],a,o,s,u,l;for(a=0,o=r.length;a<o;a++)s=r[a]*n,u=a<o-1?r[a+1]*n:t.length,l=YL(t,s,u,n,!1),l===l.next&&(l.steiner=!0),i.push(IQ(l));for(i.sort(wQ),a=0;a<i.length;a++)e=PQ(i[a],e);return e}function wQ(t,r){return t.x-r.x}function PQ(t,r){var e=OQ(t,r);if(!e)return r;var n=ZL(e,t);return No(n,n.next),No(e,e.next)}function OQ(t,r){var e=r,n=t.x,i=t.y,a=-1/0,o;do{if(i<=e.y&&i>=e.next.y&&e.next.y!==e.y){var s=e.x+(i-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(s<=n&&s>a&&(a=s,o=e.x<e.next.x?e:e.next,s===n))return o}e=e.next}while(e!==r);if(!o)return null;var u=o,l=o.x,f=o.y,p=1/0,h;e=o;do n>=e.x&&e.x>=l&&n!==e.x&&Iu(i<f?n:a,i,l,f,i<f?a:n,i,e.x,e.y)&&(h=Math.abs(i-e.y)/(n-e.x),cc(e,t)&&(h<p||h===p&&(e.x>o.x||e.x===o.x&&EQ(o,e)))&&(o=e,p=h)),e=e.next;while(e!==u);return o}function EQ(t,r){return Tt(t.prev,t,r.prev)<0&&Tt(r.next,t,t.next)<0}function CQ(t,r,e,n){var i=t;do i.z===0&&(i.z=jb(i.x,i.y,r,e,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,MQ(i)}function MQ(t){var r,e,n,i,a,o,s,u,l=1;do{for(e=t,t=null,a=null,o=0;e;){for(o++,n=e,s=0,r=0;r<l&&(s++,n=n.nextZ,!!n);r++);for(u=l;s>0||u>0&&n;)s!==0&&(u===0||!n||e.z<=n.z)?(i=e,e=e.nextZ,s--):(i=n,n=n.nextZ,u--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;e=n}a.nextZ=null,l*=2}while(o>1);return t}function jb(t,r,e,n,i){return t=(t-e)*i|0,r=(r-n)*i|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,t|r<<1}function IQ(t){var r=t,e=t;do(r.x<e.x||r.x===e.x&&r.y<e.y)&&(e=r),r=r.next;while(r!==t);return e}function Iu(t,r,e,n,i,a,o,s){return(i-o)*(r-s)>=(t-o)*(a-s)&&(t-o)*(n-s)>=(e-o)*(r-s)&&(e-o)*(a-s)>=(i-o)*(n-s)}function RQ(t,r){return t.next.i!==r.i&&t.prev.i!==r.i&&!LQ(t,r)&&(cc(t,r)&&cc(r,t)&&kQ(t,r)&&(Tt(t.prev,t,r.prev)||Tt(t,r.prev,r))||Jd(t,r)&&Tt(t.prev,t,t.next)>0&&Tt(r.prev,r,r.next)>0)}function Tt(t,r,e){return(r.y-t.y)*(e.x-r.x)-(r.x-t.x)*(e.y-r.y)}function Jd(t,r){return t.x===r.x&&t.y===r.y}function KL(t,r,e,n){var i=Kd(Tt(t,r,e)),a=Kd(Tt(t,r,n)),o=Kd(Tt(e,n,t)),s=Kd(Tt(e,n,r));return!!(i!==a&&o!==s||i===0&&Yd(t,e,r)||a===0&&Yd(t,n,r)||o===0&&Yd(e,t,n)||s===0&&Yd(e,r,n))}function Yd(t,r,e){return r.x<=Math.max(t.x,e.x)&&r.x>=Math.min(t.x,e.x)&&r.y<=Math.max(t.y,e.y)&&r.y>=Math.min(t.y,e.y)}function Kd(t){return t>0?1:t<0?-1:0}function LQ(t,r){var e=t;do{if(e.i!==t.i&&e.next.i!==t.i&&e.i!==r.i&&e.next.i!==r.i&&KL(e,e.next,t,r))return!0;e=e.next}while(e!==t);return!1}function cc(t,r){return Tt(t.prev,t,t.next)<0?Tt(t,r,t.next)>=0&&Tt(t,t.prev,r)>=0:Tt(t,r,t.prev)<0||Tt(t,t.next,r)<0}function kQ(t,r){var e=t,n=!1,i=(t.x+r.x)/2,a=(t.y+r.y)/2;do e.y>a!=e.next.y>a&&e.next.y!==e.y&&i<(e.next.x-e.x)*(a-e.y)/(e.next.y-e.y)+e.x&&(n=!n),e=e.next;while(e!==t);return n}function ZL(t,r){var e=new Ub(t.i,t.x,t.y),n=new Ub(r.i,r.x,r.y),i=t.next,a=r.prev;return t.next=r,r.prev=t,e.next=i,i.prev=e,n.next=e,e.prev=n,a.next=n,n.prev=a,n}function qL(t,r,e,n){var i=new Ub(t,r,e);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function pc(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Ub(t,r,e){this.i=t,this.x=r,this.y=e,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Zd.deviation=function(t,r,e,n){var i=r&&r.length,a=i?r[0]*e:t.length,o=Math.abs(Gb(t,0,a,e));if(i)for(var s=0,u=r.length;s<u;s++){var l=r[s]*e,f=s<u-1?r[s+1]*e:t.length;o-=Math.abs(Gb(t,l,f,e))}var p=0;for(s=0;s<n.length;s+=3){var h=n[s]*e,d=n[s+1]*e,v=n[s+2]*e;p+=Math.abs((t[h]-t[v])*(t[d+1]-t[h+1])-(t[h]-t[d])*(t[v+1]-t[h+1]))}return o===0&&p===0?0:Math.abs((p-o)/o)};function Gb(t,r,e,n){for(var i=0,a=r,o=e-n;a<e;a+=n)i+=(t[o]-t[a])*(t[a+1]+t[o+1]),o=a;return i}Zd.flatten=function(t){for(var r=t[0][0].length,e={vertices:[],holes:[],dimensions:r},n=0,i=0;i<t.length;i++){for(var a=0;a<t[i].length;a++)for(var o=0;o<r;o++)e.vertices.push(t[i][a][o]);i>0&&(n+=t[i-1].length,e.holes.push(n))}return e}});var cv=yt(Li=>{"use strict";var sB=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Lee=sB+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",uB="["+sB+"]["+Lee+"]*",kee=new RegExp("^"+uB+"$"),Bee=function(r,e){for(var n=[],i=e.exec(r);i;){var a=[];a.startIndex=e.lastIndex-i[0].length;for(var o=i.length,s=0;s<o;s++)a.push(i[s]);n.push(a),i=e.exec(r)}return n},Fee=function(r){var e=kee.exec(r);return!(e===null||typeof e>"u")};Li.isExist=function(t){return typeof t<"u"};Li.isEmptyObject=function(t){return Object.keys(t).length===0};Li.merge=function(t,r,e){if(r)for(var n=Object.keys(r),i=n.length,a=0;a<i;a++)e==="strict"?t[n[a]]=[r[n[a]]]:t[n[a]]=r[n[a]]};Li.getValue=function(t){return Li.isExist(t)?t:""};Li.isName=Fee;Li.getAllMatches=Bee;Li.nameRegexp=uB});var Zb=yt(hB=>{"use strict";var Kb=cv(),Dee={allowBooleanAttributes:!1,unpairedTags:[]};hB.validate=function(t,r){r=Object.assign({},Dee,r);var e=[],n=!1,i=!1;t[0]==="\uFEFF"&&(t=t.substr(1));for(var a=0;a<t.length;a++)if(t[a]==="<"&&t[a+1]==="?"){if(a+=2,a=fB(t,a),a.err)return a}else if(t[a]==="<"){var o=a;if(a++,t[a]==="!"){a=cB(t,a);continue}else{var s=!1;t[a]==="/"&&(s=!0,a++);for(var u="";a<t.length&&t[a]!==">"&&t[a]!==" "&&t[a]!==" "&&t[a]!==`
`&&t[a]!=="\r";a++)u+=t[a];if(u=u.trim(),u[u.length-1]==="/"&&(u=u.substring(0,u.length-1),a--),!Wee(u)){var l=void 0;return u.trim().length===0?l="Invalid space after '<'.":l="Tag '"+u+"' is an invalid name.",Nt("InvalidTag",l,Pr(t,a))}var f=Uee(t,a);if(f===!1)return Nt("InvalidAttr","Attributes for '"+u+"' have open quote.",Pr(t,a));var p=f.value;if(a=f.index,p[p.length-1]==="/"){var h=a-p.length;p=p.substring(0,p.length-1);var d=pB(p,r);if(d===!0)n=!0;else return Nt(d.err.code,d.err.msg,Pr(t,h+d.err.line))}else if(s)if(f.tagClosed){if(p.trim().length>0)return Nt("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",Pr(t,o));var v=e.pop();if(u!==v.tagName){var m=Pr(t,v.tagStartPos);return Nt("InvalidTag","Expected closing tag '"+v.tagName+"' (opened in line "+m.line+", col "+m.col+") instead of closing tag '"+u+"'.",Pr(t,o))}e.length==0&&(i=!0)}else return Nt("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",Pr(t,a));else{var g=pB(p,r);if(g!==!0)return Nt(g.err.code,g.err.msg,Pr(t,a-p.length+g.err.line));if(i===!0)return Nt("InvalidXml","Multiple possible root nodes found.",Pr(t,a));r.unpairedTags.indexOf(u)!==-1||e.push({tagName:u,tagStartPos:o}),n=!0}for(a++;a<t.length;a++)if(t[a]==="<")if(t[a+1]==="!"){a++,a=cB(t,a);continue}else if(t[a+1]==="?"){if(a=fB(t,++a),a.err)return a}else break;else if(t[a]==="&"){var y=Vee(t,a);if(y==-1)return Nt("InvalidChar","char '&' is not expected.",Pr(t,a));a=y}else if(i===!0&&!lB(t[a]))return Nt("InvalidXml","Extra text at the end",Pr(t,a));t[a]==="<"&&a--}}else{if(lB(t[a]))continue;return Nt("InvalidChar","char '"+t[a]+"' is not expected.",Pr(t,a))}if(n){if(e.length==1)return Nt("InvalidTag","Unclosed tag '"+e[0].tagName+"'.",Pr(t,e[0].tagStartPos));if(e.length>0)return Nt("InvalidXml","Invalid '"+JSON.stringify(e.map(function(_){return _.tagName}),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Nt("InvalidXml","Start tag expected.",1);return!0};function lB(t){return t===" "||t===" "||t===`
`||t==="\r"}function fB(t,r){for(var e=r;r<t.length;r++)if(t[r]=="?"||t[r]==" "){var n=t.substr(e,r-e);if(r>5&&n==="xml")return Nt("InvalidXml","XML declaration allowed only at the start of the document.",Pr(t,r));if(t[r]=="?"&&t[r+1]==">"){r++;break}else continue}return r}function cB(t,r){if(t.length>r+5&&t[r+1]==="-"&&t[r+2]==="-"){for(r+=3;r<t.length;r++)if(t[r]==="-"&&t[r+1]==="-"&&t[r+2]===">"){r+=2;break}}else if(t.length>r+8&&t[r+1]==="D"&&t[r+2]==="O"&&t[r+3]==="C"&&t[r+4]==="T"&&t[r+5]==="Y"&&t[r+6]==="P"&&t[r+7]==="E"){var e=1;for(r+=8;r<t.length;r++)if(t[r]==="<")e++;else if(t[r]===">"&&(e--,e===0))break}else if(t.length>r+9&&t[r+1]==="["&&t[r+2]==="C"&&t[r+3]==="D"&&t[r+4]==="A"&&t[r+5]==="T"&&t[r+6]==="A"&&t[r+7]==="["){for(r+=8;r<t.length;r++)if(t[r]==="]"&&t[r+1]==="]"&&t[r+2]===">"){r+=2;break}}return r}var Nee='"',jee="'";function Uee(t,r){for(var e="",n="",i=!1;r<t.length;r++){if(t[r]===Nee||t[r]===jee)n===""?n=t[r]:n!==t[r]||(n="");else if(t[r]===">"&&n===""){i=!0;break}e+=t[r]}return n!==""?!1:{value:e,index:r,tagClosed:i}}var Gee=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function pB(t,r){for(var e=Kb.getAllMatches(t,Gee),n={},i=0;i<e.length;i++){if(e[i][1].length===0)return Nt("InvalidAttr","Attribute '"+e[i][2]+"' has no space in starting.",gc(e[i]));if(e[i][3]!==void 0&&e[i][4]===void 0)return Nt("InvalidAttr","Attribute '"+e[i][2]+"' is without value.",gc(e[i]));if(e[i][3]===void 0&&!r.allowBooleanAttributes)return Nt("InvalidAttr","boolean attribute '"+e[i][2]+"' is not allowed.",gc(e[i]));var a=e[i][2];if(!Hee(a))return Nt("InvalidAttr","Attribute '"+a+"' is an invalid name.",gc(e[i]));if(!n.hasOwnProperty(a))n[a]=1;else return Nt("InvalidAttr","Attribute '"+a+"' is repeated.",gc(e[i]))}return!0}function zee(t,r){var e=/\d/;for(t[r]==="x"&&(r++,e=/[\da-fA-F]/);r<t.length;r++){if(t[r]===";")return r;if(!t[r].match(e))break}return-1}function Vee(t,r){if(r++,t[r]===";")return-1;if(t[r]==="#")return r++,zee(t,r);for(var e=0;r<t.length;r++,e++)if(!(t[r].match(/\w/)&&e<20)){if(t[r]===";")break;return-1}return r}function Nt(t,r,e){return{err:{code:t,msg:r,line:e.line||e,col:e.col}}}function Hee(t){return Kb.isName(t)}function Wee(t){return Kb.isName(t)}function Pr(t,r){var e=t.substring(0,r).split(/\r?\n/);return{line:e.length,col:e[e.length-1].length+1}}function gc(t){return t.startIndex+t[1].length}});var vB=yt(Jb=>{var dB={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(r,e){return e},attributeValueProcessor:function(r,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:function(){return!1},commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(r,e,n){return r}},$ee=function(r){return Object.assign({},dB,r)};Jb.buildOptions=$ee;Jb.defaultOptions=dB});var gB=yt((WXe,mB)=>{"use strict";k();F();j();var Xee=function(){function t(r){A(this,t),this.tagname=r,this.child=[],this[":@"]={}}return T(t,[{key:"add",value:function(e,n){e==="__proto__"&&(e="#__proto__"),this.child.push(c({},e,n))}},{key:"addChild",value:function(e){if(e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0){var n;this.child.push((n={},c(n,e.tagname,e.child),c(n,":@",e[":@"]),n))}else this.child.push(c({},e.tagname,e.child))}}]),t}();mB.exports=Xee});var _B=yt((XXe,yB)=>{be();var qee=cv();function Yee(t,r){var e={};if(t[r+3]==="O"&&t[r+4]==="C"&&t[r+5]==="T"&&t[r+6]==="Y"&&t[r+7]==="P"&&t[r+8]==="E"){r=r+9;for(var n=1,i=!1,a=!1,o="";r<t.length;r++)if(t[r]==="<"&&!a){if(i&&Jee(t,r)){r+=7;var s=Kee(t,r+1),u=W(s,3);entityName=u[0],val=u[1],r=u[2],val.indexOf("&")===-1&&(e[rte(entityName)]={regx:RegExp("&".concat(entityName,";"),"g"),val})}else if(i&&Qee(t,r))r+=8;else if(i&&ete(t,r))r+=8;else if(i&&tte(t,r))r+=9;else if(Zee)a=!0;else throw new Error("Invalid DOCTYPE");n++,o=""}else if(t[r]===">"){if(a?t[r-1]==="-"&&t[r-2]==="-"&&(a=!1,n--):n--,n===0)break}else t[r]==="["?i=!0:o+=t[r];if(n!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:e,i:r}}function Kee(t,r){for(var e="";r<t.length&&t[r]!=="'"&&t[r]!=='"';r++)e+=t[r];if(e=e.trim(),e.indexOf(" ")!==-1)throw new Error("External entites are not supported");for(var n=t[r++],i="";r<t.length&&t[r]!==n;r++)i+=t[r];return[e,i,r]}function Zee(t,r){return t[r+1]==="!"&&t[r+2]==="-"&&t[r+3]==="-"}function Jee(t,r){return t[r+1]==="!"&&t[r+2]==="E"&&t[r+3]==="N"&&t[r+4]==="T"&&t[r+5]==="I"&&t[r+6]==="T"&&t[r+7]==="Y"}function Qee(t,r){return t[r+1]==="!"&&t[r+2]==="E"&&t[r+3]==="L"&&t[r+4]==="E"&&t[r+5]==="M"&&t[r+6]==="E"&&t[r+7]==="N"&&t[r+8]==="T"}function ete(t,r){return t[r+1]==="!"&&t[r+2]==="A"&&t[r+3]==="T"&&t[r+4]==="T"&&t[r+5]==="L"&&t[r+6]==="I"&&t[r+7]==="S"&&t[r+8]==="T"}function tte(t,r){return t[r+1]==="!"&&t[r+2]==="N"&&t[r+3]==="O"&&t[r+4]==="T"&&t[r+5]==="A"&&t[r+6]==="T"&&t[r+7]==="I"&&t[r+8]==="O"&&t[r+9]==="N"}function rte(t){if(qee.isName(t))return t;throw new Error("Invalid entity name ".concat(t))}yB.exports=Yee});var xB=yt((qXe,bB)=>{var nte=/^[-+]?0x[a-fA-F0-9]+$/,ite=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt);!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);var ate={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function ote(t,r={}){if(r=Object.assign({},ate,r),!t||typeof t!="string")return t;let e=t.trim();if(r.skipLike!==void 0&&r.skipLike.test(e))return t;if(r.hex&&nte.test(e))return Number.parseInt(e,16);{let n=ite.exec(e);if(n){let i=n[1],a=n[2],o=ste(n[3]),s=n[4]||n[6];if(!r.leadingZeros&&a.length>0&&i&&e[2]!==".")return t;if(!r.leadingZeros&&a.length>0&&!i&&e[1]!==".")return t;{let u=Number(e),l=""+u;return l.search(/[eE]/)!==-1||s?r.eNotation?u:t:e.indexOf(".")!==-1?l==="0"&&o===""||l===o||i&&l==="-"+o?u:t:a?o===l||i+o===l?u:t:e===l||e===i+l?u:t}}else return t}}function ste(t){return t&&t.indexOf(".")!==-1&&(t=t.replace(/0+$/,""),t==="."?t="0":t[0]==="."?t="0"+t:t[t.length-1]==="."&&(t=t.substr(0,t.length-1))),t}bB.exports=ote});var SB=yt((QXe,AB)=>{"use strict";k();Ge();F();var t1=cv(),yc=gB(),ute=_B(),lte=xB(),JXe="<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,t1.nameRegexp),fte=function t(r){A(this,t),this.options=r,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"}},this.addExternalEntities=cte,this.parseXml=mte,this.parseTextData=pte,this.resolveNameSpace=hte,this.buildAttributesMap=vte,this.isItStopNode=bte,this.replaceEntitiesValue=yte,this.readStopNodeData=Ate,this.saveTextToParentTag=_te,this.addChild=gte};function cte(t){for(var r=Object.keys(t),e=0;e<r.length;e++){var n=r[e];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:t[n]}}}function pte(t,r,e,n,i,a,o){if(t!==void 0&&(this.options.trimValues&&!n&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t));var s=this.options.tagValueProcessor(r,t,e,i,a);if(s==null)return t;if(ue(s)!==ue(t)||s!==t)return s;if(this.options.trimValues)return e1(t,this.options.parseTagValue,this.options.numberParseOptions);var u=t.trim();return u===t?e1(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function hte(t){if(this.options.removeNSPrefix){var r=t.split(":"),e=t.charAt(0)==="/"?"/":"";if(r[0]==="xmlns")return"";r.length===2&&(t=e+r[1])}return t}var dte=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function vte(t,r,e){if(!this.options.ignoreAttributes&&typeof t=="string"){for(var n=t1.getAllMatches(t,dte),i=n.length,a={},o=0;o<i;o++){var s=this.resolveNameSpace(n[o][1]),u=n[o][4],l=this.options.attributeNamePrefix+s;if(s.length)if(this.options.transformAttributeName&&(l=this.options.transformAttributeName(l)),l==="__proto__"&&(l="#__proto__"),u!==void 0){this.options.trimValues&&(u=u.trim()),u=this.replaceEntitiesValue(u);var f=this.options.attributeValueProcessor(s,u,r);f==null?a[l]=u:ue(f)!==ue(u)||f!==u?a[l]=f:a[l]=e1(u,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(a[l]=!0)}if(!Object.keys(a).length)return;if(this.o