rk-web-core 0.7.39 → 0.7.50
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.
- package/1.d7ffd24dbeffb6099024.js +1 -0
- package/index.html +1 -0
- package/package.json +1 -1
- package/rk-web-core.css +512 -0
- package/rk-web-core.js +59 -0
package/rk-web-core.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("rk-web-core",[],e):"object"==typeof exports?exports["rk-web-core"]=e():t["rk-web-core"]=e()}(window,(function(){return function(t){function e(e){for(var n,r,i=e[0],o=e[1],a=0,s=[];a<i.length;a++)r=i[a],Object.prototype.hasOwnProperty.call(R,r)&&R[r]&&s.push(R[r][0]),R[r]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n]);for(j&&j(e);s.length;)s.shift()()}var n=window.webpackHotUpdaterk_web_core;window.webpackHotUpdaterk_web_core=function(t,e){!function(t,e){if(!w[t]||!b[t])return;for(var n in b[t]=!1,e)Object.prototype.hasOwnProperty.call(e,n)&&(m[n]=e[n]);0==--y&&0===_&&E()}(t,e),n&&n(t,e)};var r,i=!0,o="d7ffd24dbeffb6099024",a={},s=[],c=[];function u(t){var e=L[t];if(!e)return O;var n=function(n){return e.hot.active?(L[n]?-1===L[n].parents.indexOf(t)&&L[n].parents.push(t):(s=[t],r=n),-1===e.children.indexOf(n)&&e.children.push(n)):(console.warn("[HMR] unexpected require("+n+") from disposed module "+t),s=[]),O(n)},i=function(t){return{configurable:!0,enumerable:!0,get:function(){return O[t]},set:function(e){O[t]=e}}};for(var o in O)Object.prototype.hasOwnProperty.call(O,o)&&"e"!==o&&"t"!==o&&Object.defineProperty(n,o,i(o));return n.e=function(t){return"ready"===f&&d("prepare"),_++,O.e(t).then(e,(function(t){throw e(),t}));function e(){_--,"prepare"===f&&(x[t]||T(t),0===_&&0===y&&E())}},n.t=function(t,e){return 1&e&&(t=n(t)),O.t(t,-2&e)},n}function l(e){var n={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:r!==e,active:!0,accept:function(t,e){if(void 0===t)n._selfAccepted=!0;else if("function"==typeof t)n._selfAccepted=t;else if("object"==typeof t)for(var r=0;r<t.length;r++)n._acceptedDependencies[t[r]]=e||function(){};else n._acceptedDependencies[t]=e||function(){}},decline:function(t){if(void 0===t)n._selfDeclined=!0;else if("object"==typeof t)for(var e=0;e<t.length;e++)n._declinedDependencies[t[e]]=!0;else n._declinedDependencies[t]=!0},dispose:function(t){n._disposeHandlers.push(t)},addDisposeHandler:function(t){n._disposeHandlers.push(t)},removeDisposeHandler:function(t){var e=n._disposeHandlers.indexOf(t);e>=0&&n._disposeHandlers.splice(e,1)},invalidate:function(){switch(this._selfInvalidated=!0,f){case"idle":(m={})[e]=t[e],d("ready");break;case"ready":P(e);break;case"prepare":case"check":case"dispose":case"apply":(v=v||[]).push(e)}},check:S,apply:C,status:function(t){if(!t)return f;h.push(t)},addStatusHandler:function(t){h.push(t)},removeStatusHandler:function(t){var e=h.indexOf(t);e>=0&&h.splice(e,1)},data:a[e]};return r=void 0,n}var h=[],f="idle";function d(t){f=t;for(var e=0;e<h.length;e++)h[e].call(null,t)}var p,m,g,v,y=0,_=0,x={},b={},w={};function M(t){return+t+""===t?+t:t}function S(t){if("idle"!==f)throw new Error("check() is only allowed in idle status");return i=t,d("check"),(e=1e4,e=e||1e4,new Promise((function(t,n){if("undefined"==typeof XMLHttpRequest)return n(new Error("No browser support"));try{var r=new XMLHttpRequest,i=O.p+""+o+".hot-update.json";r.open("GET",i,!0),r.timeout=e,r.send(null)}catch(t){return n(t)}r.onreadystatechange=function(){if(4===r.readyState)if(0===r.status)n(new Error("Manifest request to "+i+" timed out."));else if(404===r.status)t();else if(200!==r.status&&304!==r.status)n(new Error("Manifest request to "+i+" failed."));else{try{var e=JSON.parse(r.responseText)}catch(t){return void n(t)}t(e)}}}))).then((function(t){if(!t)return d(A()?"ready":"idle"),null;b={},x={},w=t.c,g=t.h,d("prepare");var e=new Promise((function(t,e){p={resolve:t,reject:e}}));for(var n in m={},R)T(n);return"prepare"===f&&0===_&&0===y&&E(),e}));var e}function T(t){w[t]?(b[t]=!0,y++,function(t){var e=document.createElement("script");e.charset="utf-8",e.src=O.p+""+t+"."+o+".hot-update.js",e.crossOrigin="anonymous",document.head.appendChild(e)}(t)):x[t]=!0}function E(){d("ready");var t=p;if(p=null,t)if(i)Promise.resolve().then((function(){return C(i)})).then((function(e){t.resolve(e)}),(function(e){t.reject(e)}));else{var e=[];for(var n in m)Object.prototype.hasOwnProperty.call(m,n)&&e.push(M(n));t.resolve(e)}}function C(e){if("ready"!==f)throw new Error("apply() is only allowed in ready status");return function e(n){var i,c,u,l,h;function f(t){for(var e=[t],n={},r=e.map((function(t){return{chain:[t],id:t}}));r.length>0;){var i=r.pop(),o=i.id,a=i.chain;if((l=L[o])&&(!l.hot._selfAccepted||l.hot._selfInvalidated)){if(l.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:o};if(l.hot._main)return{type:"unaccepted",chain:a,moduleId:o};for(var s=0;s<l.parents.length;s++){var c=l.parents[s],u=L[c];if(u){if(u.hot._declinedDependencies[o])return{type:"declined",chain:a.concat([c]),moduleId:o,parentId:c};-1===e.indexOf(c)&&(u.hot._acceptedDependencies[o]?(n[c]||(n[c]=[]),p(n[c],[o])):(delete n[c],e.push(c),r.push({chain:a.concat([c]),id:c})))}}}}return{type:"accepted",moduleId:t,outdatedModules:e,outdatedDependencies:n}}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];-1===t.indexOf(r)&&t.push(r)}}A();var y={},_=[],x={},b=function(){console.warn("[HMR] unexpected require("+T.moduleId+") to disposed module")};for(var S in m)if(Object.prototype.hasOwnProperty.call(m,S)){var T;h=M(S),T=m[S]?f(h):{type:"disposed",moduleId:S};var E=!1,C=!1,P=!1,k="";switch(T.chain&&(k="\nUpdate propagation: "+T.chain.join(" -> ")),T.type){case"self-declined":n.onDeclined&&n.onDeclined(T),n.ignoreDeclined||(E=new Error("Aborted because of self decline: "+T.moduleId+k));break;case"declined":n.onDeclined&&n.onDeclined(T),n.ignoreDeclined||(E=new Error("Aborted because of declined dependency: "+T.moduleId+" in "+T.parentId+k));break;case"unaccepted":n.onUnaccepted&&n.onUnaccepted(T),n.ignoreUnaccepted||(E=new Error("Aborted because "+h+" is not accepted"+k));break;case"accepted":n.onAccepted&&n.onAccepted(T),C=!0;break;case"disposed":n.onDisposed&&n.onDisposed(T),P=!0;break;default:throw new Error("Unexception type "+T.type)}if(E)return d("abort"),Promise.reject(E);if(C)for(h in x[h]=m[h],p(_,T.outdatedModules),T.outdatedDependencies)Object.prototype.hasOwnProperty.call(T.outdatedDependencies,h)&&(y[h]||(y[h]=[]),p(y[h],T.outdatedDependencies[h]));P&&(p(_,[T.moduleId]),x[h]=b)}var I,D=[];for(c=0;c<_.length;c++)h=_[c],L[h]&&L[h].hot._selfAccepted&&x[h]!==b&&!L[h].hot._selfInvalidated&&D.push({module:h,parents:L[h].parents.slice(),errorHandler:L[h].hot._selfAccepted});d("dispose"),Object.keys(w).forEach((function(t){!1===w[t]&&function(t){delete R[t]}(t)}));var j,z,N=_.slice();for(;N.length>0;)if(h=N.pop(),l=L[h]){var F={},B=l.hot._disposeHandlers;for(u=0;u<B.length;u++)(i=B[u])(F);for(a[h]=F,l.hot.active=!1,delete L[h],delete y[h],u=0;u<l.children.length;u++){var H=L[l.children[u]];H&&((I=H.parents.indexOf(h))>=0&&H.parents.splice(I,1))}}for(h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&(l=L[h]))for(z=y[h],u=0;u<z.length;u++)j=z[u],(I=l.children.indexOf(j))>=0&&l.children.splice(I,1);d("apply"),void 0!==g&&(o=g,g=void 0);for(h in m=void 0,x)Object.prototype.hasOwnProperty.call(x,h)&&(t[h]=x[h]);var G=null;for(h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&(l=L[h])){z=y[h];var U=[];for(c=0;c<z.length;c++)if(j=z[c],i=l.hot._acceptedDependencies[j]){if(-1!==U.indexOf(i))continue;U.push(i)}for(c=0;c<U.length;c++){i=U[c];try{i(z)}catch(t){n.onErrored&&n.onErrored({type:"accept-errored",moduleId:h,dependencyId:z[c],error:t}),n.ignoreErrored||G||(G=t)}}}for(c=0;c<D.length;c++){var V=D[c];h=V.module,s=V.parents,r=h;try{O(h)}catch(t){if("function"==typeof V.errorHandler)try{V.errorHandler(t)}catch(e){n.onErrored&&n.onErrored({type:"self-accept-error-handler-errored",moduleId:h,error:e,originalError:t}),n.ignoreErrored||G||(G=e),G||(G=t)}else n.onErrored&&n.onErrored({type:"self-accept-errored",moduleId:h,error:t}),n.ignoreErrored||G||(G=t)}}if(G)return d("fail"),Promise.reject(G);if(v)return e(n).then((function(t){return _.forEach((function(e){t.indexOf(e)<0&&t.push(e)})),t}));return d("idle"),new Promise((function(t){t(_)}))}(e=e||{})}function A(){if(v)return m||(m={}),v.forEach(P),v=void 0,!0}function P(e){Object.prototype.hasOwnProperty.call(m,e)||(m[e]=t[e])}var L={},R={0:0};function O(e){if(L[e])return L[e].exports;var n=L[e]={i:e,l:!1,exports:{},hot:l(e),parents:(c=s,s=[],c),children:[]};return t[e].call(n.exports,n,n.exports,u(e)),n.l=!0,n.exports}O.e=function(t){var e=[],n=R[t];if(0!==n)if(n)e.push(n[2]);else{var r=new Promise((function(e,r){n=R[t]=[e,r]}));e.push(n[2]=r);var i,a=document.createElement("script");a.charset="utf-8",a.timeout=120,O.nc&&a.setAttribute("nonce",O.nc),a.src=function(t){return O.p+""+t+"."+o+".js"}(t),0!==a.src.indexOf(window.location.origin+"/")&&(a.crossOrigin="anonymous");var s=new Error;i=function(e){a.onerror=a.onload=null,clearTimeout(c);var n=R[t];if(0!==n){if(n){var r=e&&("load"===e.type?"missing":e.type),i=e&&e.target&&e.target.src;s.message="Loading chunk "+t+" failed.\n("+r+": "+i+")",s.name="ChunkLoadError",s.type=r,s.request=i,n[1](s)}R[t]=void 0}};var c=setTimeout((function(){i({type:"timeout",target:a})}),12e4);a.onerror=a.onload=i,document.head.appendChild(a)}return Promise.all(e)},O.m=t,O.c=L,O.d=function(t,e,n){O.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},O.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},O.t=function(t,e){if(1&e&&(t=O(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(O.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)O.d(n,r,function(e){return t[e]}.bind(null,r));return n},O.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return O.d(e,"a",e),e},O.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},O.p="./",O.oe=function(t){throw console.error(t),t},O.h=function(){return o};var k=window.webpackJsonprk_web_core=window.webpackJsonprk_web_core||[],I=k.push.bind(k);k.push=e,k=k.slice();for(var D=0;D<k.length;D++)e(k[D]);var j=I;return u(108)(O.s=108)}([function(t,e){var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(t,e,n){"use strict";var r=n(88),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function a(t){return void 0===t}function s(t){return null!==t&&"object"==typeof t}function c(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function u(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!a(t)&&null!==t.constructor&&!a(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:s,isPlainObject:c,isUndefined:a,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:u,isStream:function(t){return s(t)&&u(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function t(){var e={};function n(n,r){c(e[r])&&c(n)?e[r]=t(e[r],n):c(n)?e[r]=t({},n):o(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return e},extend:function(t,e,n){return l(e,(function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(68)("wks"),i=n(69),o=n(2).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(2),i=n(0),o=n(17),a=n(11),s=n(23),c=function(t,e,n){var u,l,h,f=t&c.F,d=t&c.G,p=t&c.S,m=t&c.P,g=t&c.B,v=t&c.W,y=d?i:i[e]||(i[e]={}),_=y.prototype,x=d?r:p?r[e]:(r[e]||{}).prototype;for(u in d&&(n=e),n)(l=!f&&x&&void 0!==x[u])&&s(y,u)||(h=l?x[u]:n[u],y[u]=d&&"function"!=typeof x[u]?n[u]:g&&l?o(h,r):v&&x[u]==h?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(h):m&&"function"==typeof h?o(Function.call,h):h,m&&((y.virtual||(y.virtual={}))[u]=h,t&c.R&&_&&!_[u]&&a(_,u,h)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.treeFindPath=e.prefixCls=void 0;var r,i=n(29),o=(r=i)&&r.__esModule?r:{default:r};e.prefixCls="rk-web-core",e.treeFindPath=function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!e)return[];var i=!0,a=!1,s=void 0;try{for(var c,u=(0,o.default)(e);!(i=(c=u.next()).done);i=!0){var l=c.value;if(r.push(l),n(l))return r;if(l.children){var h=t(l.children,n,r);if(h.length)return h}r.pop()}}catch(t){a=!0,s=t}finally{try{!i&&u.return&&u.return()}finally{if(a)throw s}}return[]}},function(t,e,n){(function(t,r){var i;
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Lodash <https://lodash.com/>
|
|
5
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
6
|
+
* Released under MIT license <https://lodash.com/license>
|
|
7
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
8
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
9
|
+
*/(function(){var o="Expected a function",a="__lodash_placeholder__",s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],c="[object Arguments]",u="[object Array]",l="[object Boolean]",h="[object Date]",f="[object Error]",d="[object Function]",p="[object GeneratorFunction]",m="[object Map]",g="[object Number]",v="[object Object]",y="[object RegExp]",_="[object Set]",x="[object String]",b="[object Symbol]",w="[object WeakMap]",M="[object ArrayBuffer]",S="[object DataView]",T="[object Float32Array]",E="[object Float64Array]",C="[object Int8Array]",A="[object Int16Array]",P="[object Int32Array]",L="[object Uint8Array]",R="[object Uint16Array]",O="[object Uint32Array]",k=/\b__p \+= '';/g,I=/\b(__p \+=) '' \+/g,D=/(__e\(.*?\)|\b__t\)) \+\n'';/g,j=/&(?:amp|lt|gt|quot|#39);/g,z=/[&<>"']/g,N=RegExp(j.source),F=RegExp(z.source),B=/<%-([\s\S]+?)%>/g,H=/<%([\s\S]+?)%>/g,G=/<%=([\s\S]+?)%>/g,U=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V=/^\w*$/,W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z=/[\\^$.*+?()[\]{}|]/g,q=RegExp(Z.source),Y=/^\s+/,J=/\s/,X=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$=/\{\n\/\* \[wrapped with (.+)\] \*/,Q=/,? & /,K=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tt=/[()=,{}\[\]\/\s]/,et=/\\(\\)?/g,nt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rt=/\w*$/,it=/^[-+]0x[0-9a-f]+$/i,ot=/^0b[01]+$/i,at=/^\[object .+?Constructor\]$/,st=/^0o[0-7]+$/i,ct=/^(?:0|[1-9]\d*)$/,ut=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,lt=/($^)/,ht=/['\n\r\u2028\u2029\\]/g,ft="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",dt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pt="[\\ud800-\\udfff]",mt="["+dt+"]",gt="["+ft+"]",vt="\\d+",yt="[\\u2700-\\u27bf]",_t="[a-z\\xdf-\\xf6\\xf8-\\xff]",xt="[^\\ud800-\\udfff"+dt+vt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",bt="\\ud83c[\\udffb-\\udfff]",wt="[^\\ud800-\\udfff]",Mt="(?:\\ud83c[\\udde6-\\uddff]){2}",St="[\\ud800-\\udbff][\\udc00-\\udfff]",Tt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Et="(?:"+_t+"|"+xt+")",Ct="(?:"+Tt+"|"+xt+")",At="(?:"+gt+"|"+bt+")"+"?",Pt="[\\ufe0e\\ufe0f]?"+At+("(?:\\u200d(?:"+[wt,Mt,St].join("|")+")[\\ufe0e\\ufe0f]?"+At+")*"),Lt="(?:"+[yt,Mt,St].join("|")+")"+Pt,Rt="(?:"+[wt+gt+"?",gt,Mt,St,pt].join("|")+")",Ot=RegExp("['’]","g"),kt=RegExp(gt,"g"),It=RegExp(bt+"(?="+bt+")|"+Rt+Pt,"g"),Dt=RegExp([Tt+"?"+_t+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[mt,Tt,"$"].join("|")+")",Ct+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[mt,Tt+Et,"$"].join("|")+")",Tt+"?"+Et+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Tt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vt,Lt].join("|"),"g"),jt=RegExp("[\\u200d\\ud800-\\udfff"+ft+"\\ufe0e\\ufe0f]"),zt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ft=-1,Bt={};Bt[T]=Bt[E]=Bt[C]=Bt[A]=Bt[P]=Bt[L]=Bt["[object Uint8ClampedArray]"]=Bt[R]=Bt[O]=!0,Bt[c]=Bt[u]=Bt[M]=Bt[l]=Bt[S]=Bt[h]=Bt[f]=Bt[d]=Bt[m]=Bt[g]=Bt[v]=Bt[y]=Bt[_]=Bt[x]=Bt[w]=!1;var Ht={};Ht[c]=Ht[u]=Ht[M]=Ht[S]=Ht[l]=Ht[h]=Ht[T]=Ht[E]=Ht[C]=Ht[A]=Ht[P]=Ht[m]=Ht[g]=Ht[v]=Ht[y]=Ht[_]=Ht[x]=Ht[b]=Ht[L]=Ht["[object Uint8ClampedArray]"]=Ht[R]=Ht[O]=!0,Ht[f]=Ht[d]=Ht[w]=!1;var Gt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ut=parseFloat,Vt=parseInt,Wt="object"==typeof t&&t&&t.Object===Object&&t,Zt="object"==typeof self&&self&&self.Object===Object&&self,qt=Wt||Zt||Function("return this")(),Yt=e&&!e.nodeType&&e,Jt=Yt&&"object"==typeof r&&r&&!r.nodeType&&r,Xt=Jt&&Jt.exports===Yt,$t=Xt&&Wt.process,Qt=function(){try{var t=Jt&&Jt.require&&Jt.require("util").types;return t||$t&&$t.binding&&$t.binding("util")}catch(t){}}(),Kt=Qt&&Qt.isArrayBuffer,te=Qt&&Qt.isDate,ee=Qt&&Qt.isMap,ne=Qt&&Qt.isRegExp,re=Qt&&Qt.isSet,ie=Qt&&Qt.isTypedArray;function oe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function ae(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function se(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function ce(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function ue(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function le(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function he(t,e){return!!(null==t?0:t.length)&&be(t,e,0)>-1}function fe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function de(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function pe(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function me(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function ge(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function ve(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var ye=Te("length");function _e(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function xe(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function be(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):xe(t,Me,n)}function we(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function Me(t){return t!=t}function Se(t,e){var n=null==t?0:t.length;return n?Ae(t,e)/n:NaN}function Te(t){return function(e){return null==e?void 0:e[t]}}function Ee(t){return function(e){return null==t?void 0:t[e]}}function Ce(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function Ae(t,e){for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function Pe(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Le(t){return t?t.slice(0,Ye(t)+1).replace(Y,""):t}function Re(t){return function(e){return t(e)}}function Oe(t,e){return de(e,(function(e){return t[e]}))}function ke(t,e){return t.has(e)}function Ie(t,e){for(var n=-1,r=t.length;++n<r&&be(e,t[n],0)>-1;);return n}function De(t,e){for(var n=t.length;n--&&be(e,t[n],0)>-1;);return n}function je(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var ze=Ee({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ne=Ee({"&":"&","<":"<",">":">",'"':""","'":"'"});function Fe(t){return"\\"+Gt[t]}function Be(t){return jt.test(t)}function He(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Ge(t,e){return function(n){return t(e(n))}}function Ue(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var s=t[n];s!==e&&s!==a||(t[n]=a,o[i++]=n)}return o}function Ve(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function We(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function Ze(t){return Be(t)?function(t){var e=It.lastIndex=0;for(;It.test(t);)++e;return e}(t):ye(t)}function qe(t){return Be(t)?function(t){return t.match(It)||[]}(t):function(t){return t.split("")}(t)}function Ye(t){for(var e=t.length;e--&&J.test(t.charAt(e)););return e}var Je=Ee({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Xe=function t(e){var n,r=(e=null==e?qt:Xe.defaults(qt.Object(),e,Xe.pick(qt,Nt))).Array,i=e.Date,J=e.Error,ft=e.Function,dt=e.Math,pt=e.Object,mt=e.RegExp,gt=e.String,vt=e.TypeError,yt=r.prototype,_t=ft.prototype,xt=pt.prototype,bt=e["__core-js_shared__"],wt=_t.toString,Mt=xt.hasOwnProperty,St=0,Tt=(n=/[^.]+$/.exec(bt&&bt.keys&&bt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Et=xt.toString,Ct=wt.call(pt),At=qt._,Pt=mt("^"+wt.call(Mt).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lt=Xt?e.Buffer:void 0,Rt=e.Symbol,It=e.Uint8Array,jt=Lt?Lt.allocUnsafe:void 0,Gt=Ge(pt.getPrototypeOf,pt),Wt=pt.create,Zt=xt.propertyIsEnumerable,Yt=yt.splice,Jt=Rt?Rt.isConcatSpreadable:void 0,$t=Rt?Rt.iterator:void 0,Qt=Rt?Rt.toStringTag:void 0,ye=function(){try{var t=to(pt,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ee=e.clearTimeout!==qt.clearTimeout&&e.clearTimeout,$e=i&&i.now!==qt.Date.now&&i.now,Qe=e.setTimeout!==qt.setTimeout&&e.setTimeout,Ke=dt.ceil,tn=dt.floor,en=pt.getOwnPropertySymbols,nn=Lt?Lt.isBuffer:void 0,rn=e.isFinite,on=yt.join,an=Ge(pt.keys,pt),sn=dt.max,cn=dt.min,un=i.now,ln=e.parseInt,hn=dt.random,fn=yt.reverse,dn=to(e,"DataView"),pn=to(e,"Map"),mn=to(e,"Promise"),gn=to(e,"Set"),vn=to(e,"WeakMap"),yn=to(pt,"create"),_n=vn&&new vn,xn={},bn=Ao(dn),wn=Ao(pn),Mn=Ao(mn),Sn=Ao(gn),Tn=Ao(vn),En=Rt?Rt.prototype:void 0,Cn=En?En.valueOf:void 0,An=En?En.toString:void 0;function Pn(t){if(Wa(t)&&!Ia(t)&&!(t instanceof kn)){if(t instanceof On)return t;if(Mt.call(t,"__wrapped__"))return Po(t)}return new On(t)}var Ln=function(){function t(){}return function(e){if(!Va(e))return{};if(Wt)return Wt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Rn(){}function On(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function kn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function In(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Dn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function jn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function zn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new jn;++e<n;)this.add(t[e])}function Nn(t){var e=this.__data__=new Dn(t);this.size=e.size}function Fn(t,e){var n=Ia(t),r=!n&&ka(t),i=!n&&!r&&Na(t),o=!n&&!r&&!i&&Ka(t),a=n||r||i||o,s=a?Pe(t.length,gt):[],c=s.length;for(var u in t)!e&&!Mt.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||so(u,c))||s.push(u);return s}function Bn(t){var e=t.length;return e?t[zr(0,e-1)]:void 0}function Hn(t,e){return To(yi(t),Xn(e,0,t.length))}function Gn(t){return To(yi(t))}function Un(t,e,n){(void 0!==n&&!La(t[e],n)||void 0===n&&!(e in t))&&Yn(t,e,n)}function Vn(t,e,n){var r=t[e];Mt.call(t,e)&&La(r,n)&&(void 0!==n||e in t)||Yn(t,e,n)}function Wn(t,e){for(var n=t.length;n--;)if(La(t[n][0],e))return n;return-1}function Zn(t,e,n,r){return er(t,(function(t,i,o){e(r,t,n(t),o)})),r}function qn(t,e){return t&&_i(e,bs(e),t)}function Yn(t,e,n){"__proto__"==e&&ye?ye(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Jn(t,e){for(var n=-1,i=e.length,o=r(i),a=null==t;++n<i;)o[n]=a?void 0:gs(t,e[n]);return o}function Xn(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}function $n(t,e,n,r,i,o){var a,s=1&e,u=2&e,f=4&e;if(n&&(a=i?n(t,r,i,o):n(t)),void 0!==a)return a;if(!Va(t))return t;var w=Ia(t);if(w){if(a=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&Mt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!s)return yi(t,a)}else{var k=ro(t),I=k==d||k==p;if(Na(t))return fi(t,s);if(k==v||k==c||I&&!i){if(a=u||I?{}:oo(t),!s)return u?function(t,e){return _i(t,no(t),e)}(t,function(t,e){return t&&_i(e,ws(e),t)}(a,t)):function(t,e){return _i(t,eo(t),e)}(t,qn(a,t))}else{if(!Ht[k])return i?t:{};a=function(t,e,n){var r=t.constructor;switch(e){case M:return di(t);case l:case h:return new r(+t);case S:return function(t,e){var n=e?di(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case T:case E:case C:case A:case P:case L:case"[object Uint8ClampedArray]":case R:case O:return pi(t,n);case m:return new r;case g:case x:return new r(t);case y:return function(t){var e=new t.constructor(t.source,rt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case _:return new r;case b:return i=t,Cn?pt(Cn.call(i)):{}}var i}(t,k,s)}}o||(o=new Nn);var D=o.get(t);if(D)return D;o.set(t,a),Xa(t)?t.forEach((function(r){a.add($n(r,e,n,r,t,o))})):Za(t)&&t.forEach((function(r,i){a.set(i,$n(r,e,n,i,t,o))}));var j=w?void 0:(f?u?qi:Zi:u?ws:bs)(t);return se(j||t,(function(r,i){j&&(r=t[i=r]),Vn(a,i,$n(r,e,n,i,t,o))})),a}function Qn(t,e,n){var r=n.length;if(null==t)return!r;for(t=pt(t);r--;){var i=n[r],o=e[i],a=t[i];if(void 0===a&&!(i in t)||!o(a))return!1}return!0}function Kn(t,e,n){if("function"!=typeof t)throw new vt(o);return bo((function(){t.apply(void 0,n)}),e)}function tr(t,e,n,r){var i=-1,o=he,a=!0,s=t.length,c=[],u=e.length;if(!s)return c;n&&(e=de(e,Re(n))),r?(o=fe,a=!1):e.length>=200&&(o=ke,a=!1,e=new zn(e));t:for(;++i<s;){var l=t[i],h=null==n?l:n(l);if(l=r||0!==l?l:0,a&&h==h){for(var f=u;f--;)if(e[f]===h)continue t;c.push(l)}else o(e,h,r)||c.push(l)}return c}Pn.templateSettings={escape:B,evaluate:H,interpolate:G,variable:"",imports:{_:Pn}},Pn.prototype=Rn.prototype,Pn.prototype.constructor=Pn,On.prototype=Ln(Rn.prototype),On.prototype.constructor=On,kn.prototype=Ln(Rn.prototype),kn.prototype.constructor=kn,In.prototype.clear=function(){this.__data__=yn?yn(null):{},this.size=0},In.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},In.prototype.get=function(t){var e=this.__data__;if(yn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Mt.call(e,t)?e[t]:void 0},In.prototype.has=function(t){var e=this.__data__;return yn?void 0!==e[t]:Mt.call(e,t)},In.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=yn&&void 0===e?"__lodash_hash_undefined__":e,this},Dn.prototype.clear=function(){this.__data__=[],this.size=0},Dn.prototype.delete=function(t){var e=this.__data__,n=Wn(e,t);return!(n<0)&&(n==e.length-1?e.pop():Yt.call(e,n,1),--this.size,!0)},Dn.prototype.get=function(t){var e=this.__data__,n=Wn(e,t);return n<0?void 0:e[n][1]},Dn.prototype.has=function(t){return Wn(this.__data__,t)>-1},Dn.prototype.set=function(t,e){var n=this.__data__,r=Wn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},jn.prototype.clear=function(){this.size=0,this.__data__={hash:new In,map:new(pn||Dn),string:new In}},jn.prototype.delete=function(t){var e=Qi(this,t).delete(t);return this.size-=e?1:0,e},jn.prototype.get=function(t){return Qi(this,t).get(t)},jn.prototype.has=function(t){return Qi(this,t).has(t)},jn.prototype.set=function(t,e){var n=Qi(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},zn.prototype.add=zn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},zn.prototype.has=function(t){return this.__data__.has(t)},Nn.prototype.clear=function(){this.__data__=new Dn,this.size=0},Nn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Nn.prototype.get=function(t){return this.__data__.get(t)},Nn.prototype.has=function(t){return this.__data__.has(t)},Nn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Dn){var r=n.__data__;if(!pn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new jn(r)}return n.set(t,e),this.size=n.size,this};var er=wi(ur),nr=wi(lr,!0);function rr(t,e){var n=!0;return er(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function ir(t,e,n){for(var r=-1,i=t.length;++r<i;){var o=t[r],a=e(o);if(null!=a&&(void 0===s?a==a&&!Qa(a):n(a,s)))var s=a,c=o}return c}function or(t,e){var n=[];return er(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function ar(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=ao),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?ar(s,e-1,n,r,i):pe(i,s):r||(i[i.length]=s)}return i}var sr=Mi(),cr=Mi(!0);function ur(t,e){return t&&sr(t,e,bs)}function lr(t,e){return t&&cr(t,e,bs)}function hr(t,e){return le(e,(function(e){return Ha(t[e])}))}function fr(t,e){for(var n=0,r=(e=ci(e,t)).length;null!=t&&n<r;)t=t[Co(e[n++])];return n&&n==r?t:void 0}function dr(t,e,n){var r=e(t);return Ia(t)?r:pe(r,n(t))}function pr(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Qt&&Qt in pt(t)?function(t){var e=Mt.call(t,Qt),n=t[Qt];try{t[Qt]=void 0;var r=!0}catch(t){}var i=Et.call(t);r&&(e?t[Qt]=n:delete t[Qt]);return i}(t):function(t){return Et.call(t)}(t)}function mr(t,e){return t>e}function gr(t,e){return null!=t&&Mt.call(t,e)}function vr(t,e){return null!=t&&e in pt(t)}function yr(t,e,n){for(var i=n?fe:he,o=t[0].length,a=t.length,s=a,c=r(a),u=1/0,l=[];s--;){var h=t[s];s&&e&&(h=de(h,Re(e))),u=cn(h.length,u),c[s]=!n&&(e||o>=120&&h.length>=120)?new zn(s&&h):void 0}h=t[0];var f=-1,d=c[0];t:for(;++f<o&&l.length<u;){var p=h[f],m=e?e(p):p;if(p=n||0!==p?p:0,!(d?ke(d,m):i(l,m,n))){for(s=a;--s;){var g=c[s];if(!(g?ke(g,m):i(t[s],m,n)))continue t}d&&d.push(m),l.push(p)}}return l}function _r(t,e,n){var r=null==(t=vo(t,e=ci(e,t)))?t:t[Co(Bo(e))];return null==r?void 0:oe(r,t,n)}function xr(t){return Wa(t)&&pr(t)==c}function br(t,e,n,r,i){return t===e||(null==t||null==e||!Wa(t)&&!Wa(e)?t!=t&&e!=e:function(t,e,n,r,i,o){var a=Ia(t),s=Ia(e),d=a?u:ro(t),p=s?u:ro(e),w=(d=d==c?v:d)==v,T=(p=p==c?v:p)==v,E=d==p;if(E&&Na(t)){if(!Na(e))return!1;a=!0,w=!1}if(E&&!w)return o||(o=new Nn),a||Ka(t)?Vi(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case S:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case M:return!(t.byteLength!=e.byteLength||!o(new It(t),new It(e)));case l:case h:case g:return La(+t,+e);case f:return t.name==e.name&&t.message==e.message;case y:case x:return t==e+"";case m:var s=He;case _:var c=1&r;if(s||(s=Ve),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=2,a.set(t,e);var d=Vi(s(t),s(e),r,i,o,a);return a.delete(t),d;case b:if(Cn)return Cn.call(t)==Cn.call(e)}return!1}(t,e,d,n,r,i,o);if(!(1&n)){var C=w&&Mt.call(t,"__wrapped__"),A=T&&Mt.call(e,"__wrapped__");if(C||A){var P=C?t.value():t,L=A?e.value():e;return o||(o=new Nn),i(P,L,n,r,o)}}if(!E)return!1;return o||(o=new Nn),function(t,e,n,r,i,o){var a=1&n,s=Zi(t),c=s.length,u=Zi(e).length;if(c!=u&&!a)return!1;var l=c;for(;l--;){var h=s[l];if(!(a?h in e:Mt.call(e,h)))return!1}var f=o.get(t),d=o.get(e);if(f&&d)return f==e&&d==t;var p=!0;o.set(t,e),o.set(e,t);var m=a;for(;++l<c;){h=s[l];var g=t[h],v=e[h];if(r)var y=a?r(v,g,h,e,t,o):r(g,v,h,t,e,o);if(!(void 0===y?g===v||i(g,v,n,r,o):y)){p=!1;break}m||(m="constructor"==h)}if(p&&!m){var _=t.constructor,x=e.constructor;_==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x||(p=!1)}return o.delete(t),o.delete(e),p}(t,e,n,r,i,o)}(t,e,n,r,br,i))}function wr(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=pt(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){var c=(s=n[i])[0],u=t[c],l=s[1];if(a&&s[2]){if(void 0===u&&!(c in t))return!1}else{var h=new Nn;if(r)var f=r(u,l,c,t,e,h);if(!(void 0===f?br(l,u,3,r,h):f))return!1}}return!0}function Mr(t){return!(!Va(t)||(e=t,Tt&&Tt in e))&&(Ha(t)?Pt:at).test(Ao(t));var e}function Sr(t){return"function"==typeof t?t:null==t?qs:"object"==typeof t?Ia(t)?Lr(t[0],t[1]):Pr(t):nc(t)}function Tr(t){if(!fo(t))return an(t);var e=[];for(var n in pt(t))Mt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Er(t){if(!Va(t))return function(t){var e=[];if(null!=t)for(var n in pt(t))e.push(n);return e}(t);var e=fo(t),n=[];for(var r in t)("constructor"!=r||!e&&Mt.call(t,r))&&n.push(r);return n}function Cr(t,e){return t<e}function Ar(t,e){var n=-1,i=ja(t)?r(t.length):[];return er(t,(function(t,r,o){i[++n]=e(t,r,o)})),i}function Pr(t){var e=Ki(t);return 1==e.length&&e[0][2]?mo(e[0][0],e[0][1]):function(n){return n===t||wr(n,t,e)}}function Lr(t,e){return uo(t)&&po(e)?mo(Co(t),e):function(n){var r=gs(n,t);return void 0===r&&r===e?vs(n,t):br(e,r,3)}}function Rr(t,e,n,r,i){t!==e&&sr(e,(function(o,a){if(i||(i=new Nn),Va(o))!function(t,e,n,r,i,o,a){var s=_o(t,n),c=_o(e,n),u=a.get(c);if(u)return void Un(t,n,u);var l=o?o(s,c,n+"",t,e,a):void 0,h=void 0===l;if(h){var f=Ia(c),d=!f&&Na(c),p=!f&&!d&&Ka(c);l=c,f||d||p?Ia(s)?l=s:za(s)?l=yi(s):d?(h=!1,l=fi(c,!0)):p?(h=!1,l=pi(c,!0)):l=[]:Ya(c)||ka(c)?(l=s,ka(s)?l=ss(s):Va(s)&&!Ha(s)||(l=oo(c))):h=!1}h&&(a.set(c,l),i(l,c,r,o,a),a.delete(c));Un(t,n,l)}(t,e,a,n,Rr,r,i);else{var s=r?r(_o(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),Un(t,a,s)}}),ws)}function Or(t,e){var n=t.length;if(n)return so(e+=e<0?n:0,n)?t[e]:void 0}function kr(t,e,n){e=e.length?de(e,(function(t){return Ia(t)?function(e){return fr(e,1===t.length?t[0]:t)}:t})):[qs];var r=-1;return e=de(e,Re($i())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(Ar(t,(function(t,n,i){return{criteria:de(e,(function(e){return e(t)})),index:++r,value:t}})),(function(t,e){return function(t,e,n){var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;for(;++r<a;){var c=mi(i[r],o[r]);if(c){if(r>=s)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)}))}function Ir(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=fr(t,a);n(s,a)&&Gr(o,ci(a,t),s)}return o}function Dr(t,e,n,r){var i=r?we:be,o=-1,a=e.length,s=t;for(t===e&&(e=yi(e)),n&&(s=de(t,Re(n)));++o<a;)for(var c=0,u=e[o],l=n?n(u):u;(c=i(s,l,c,r))>-1;)s!==t&&Yt.call(s,c,1),Yt.call(t,c,1);return t}function jr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;so(i)?Yt.call(t,i,1):ti(t,i)}}return t}function zr(t,e){return t+tn(hn()*(e-t+1))}function Nr(t,e){var n="";if(!t||e<1||e>9007199254740991)return n;do{e%2&&(n+=t),(e=tn(e/2))&&(t+=t)}while(e);return n}function Fr(t,e){return wo(go(t,e,qs),t+"")}function Br(t){return Bn(Ls(t))}function Hr(t,e){var n=Ls(t);return To(n,Xn(e,0,n.length))}function Gr(t,e,n,r){if(!Va(t))return t;for(var i=-1,o=(e=ci(e,t)).length,a=o-1,s=t;null!=s&&++i<o;){var c=Co(e[i]),u=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(i!=a){var l=s[c];void 0===(u=r?r(l,c,s):void 0)&&(u=Va(l)?l:so(e[i+1])?[]:{})}Vn(s,c,u),s=s[c]}return t}var Ur=_n?function(t,e){return _n.set(t,e),t}:qs,Vr=ye?function(t,e){return ye(t,"toString",{configurable:!0,enumerable:!1,value:Vs(e),writable:!0})}:qs;function Wr(t){return To(Ls(t))}function Zr(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function qr(t,e){var n;return er(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function Yr(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Qa(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Jr(t,e,qs,n)}function Jr(t,e,n,r){var i=0,o=null==t?0:t.length;if(0===o)return 0;for(var a=(e=n(e))!=e,s=null===e,c=Qa(e),u=void 0===e;i<o;){var l=tn((i+o)/2),h=n(t[l]),f=void 0!==h,d=null===h,p=h==h,m=Qa(h);if(a)var g=r||p;else g=u?p&&(r||f):s?p&&f&&(r||!d):c?p&&f&&!d&&(r||!m):!d&&!m&&(r?h<=e:h<e);g?i=l+1:o=l}return cn(o,4294967294)}function Xr(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!La(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function $r(t){return"number"==typeof t?t:Qa(t)?NaN:+t}function Qr(t){if("string"==typeof t)return t;if(Ia(t))return de(t,Qr)+"";if(Qa(t))return An?An.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Kr(t,e,n){var r=-1,i=he,o=t.length,a=!0,s=[],c=s;if(n)a=!1,i=fe;else if(o>=200){var u=e?null:Ni(t);if(u)return Ve(u);a=!1,i=ke,c=new zn}else c=e?[]:s;t:for(;++r<o;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,a&&h==h){for(var f=c.length;f--;)if(c[f]===h)continue t;e&&c.push(h),s.push(l)}else i(c,h,n)||(c!==s&&c.push(h),s.push(l))}return s}function ti(t,e){return null==(t=vo(t,e=ci(e,t)))||delete t[Co(Bo(e))]}function ei(t,e,n,r){return Gr(t,e,n(fr(t,e)),r)}function ni(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Zr(t,r?0:o,r?o+1:i):Zr(t,r?o+1:0,r?i:o)}function ri(t,e){var n=t;return n instanceof kn&&(n=n.value()),me(e,(function(t,e){return e.func.apply(e.thisArg,pe([t],e.args))}),n)}function ii(t,e,n){var i=t.length;if(i<2)return i?Kr(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],c=-1;++c<i;)c!=o&&(a[o]=tr(a[o]||s,t[c],e,n));return Kr(ar(a,1),e,n)}function oi(t,e,n){for(var r=-1,i=t.length,o=e.length,a={};++r<i;){var s=r<o?e[r]:void 0;n(a,t[r],s)}return a}function ai(t){return za(t)?t:[]}function si(t){return"function"==typeof t?t:qs}function ci(t,e){return Ia(t)?t:uo(t,e)?[t]:Eo(cs(t))}var ui=Fr;function li(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:Zr(t,e,n)}var hi=Ee||function(t){return qt.clearTimeout(t)};function fi(t,e){if(e)return t.slice();var n=t.length,r=jt?jt(n):new t.constructor(n);return t.copy(r),r}function di(t){var e=new t.constructor(t.byteLength);return new It(e).set(new It(t)),e}function pi(t,e){var n=e?di(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function mi(t,e){if(t!==e){var n=void 0!==t,r=null===t,i=t==t,o=Qa(t),a=void 0!==e,s=null===e,c=e==e,u=Qa(e);if(!s&&!u&&!o&&t>e||o&&a&&c&&!s&&!u||r&&a&&c||!n&&c||!i)return 1;if(!r&&!o&&!u&&t<e||u&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!c)return-1}return 0}function gi(t,e,n,i){for(var o=-1,a=t.length,s=n.length,c=-1,u=e.length,l=sn(a-s,0),h=r(u+l),f=!i;++c<u;)h[c]=e[c];for(;++o<s;)(f||o<a)&&(h[n[o]]=t[o]);for(;l--;)h[c++]=t[o++];return h}function vi(t,e,n,i){for(var o=-1,a=t.length,s=-1,c=n.length,u=-1,l=e.length,h=sn(a-c,0),f=r(h+l),d=!i;++o<h;)f[o]=t[o];for(var p=o;++u<l;)f[p+u]=e[u];for(;++s<c;)(d||o<a)&&(f[p+n[s]]=t[o++]);return f}function yi(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function _i(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],c=r?r(n[s],t[s],s,n,t):void 0;void 0===c&&(c=t[s]),i?Yn(n,s,c):Vn(n,s,c)}return n}function xi(t,e){return function(n,r){var i=Ia(n)?ae:Zn,o=e?e():{};return i(n,t,$i(r,2),o)}}function bi(t){return Fr((function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,a&&co(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),e=pt(e);++r<i;){var s=n[r];s&&t(e,s,r,o)}return e}))}function wi(t,e){return function(n,r){if(null==n)return n;if(!ja(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=pt(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Mi(t){return function(e,n,r){for(var i=-1,o=pt(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(!1===n(o[c],c,o))break}return e}}function Si(t){return function(e){var n=Be(e=cs(e))?qe(e):void 0,r=n?n[0]:e.charAt(0),i=n?li(n,1).join(""):e.slice(1);return r[t]()+i}}function Ti(t){return function(e){return me(Hs(ks(e).replace(Ot,"")),t,"")}}function Ei(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Ln(t.prototype),r=t.apply(n,e);return Va(r)?r:n}}function Ci(t){return function(e,n,r){var i=pt(e);if(!ja(e)){var o=$i(n,3);e=bs(e),n=function(t){return o(i[t],t,i)}}var a=t(e,n,r);return a>-1?i[o?e[a]:a]:void 0}}function Ai(t){return Wi((function(e){var n=e.length,r=n,i=On.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new vt(o);if(i&&!s&&"wrapper"==Ji(a))var s=new On([],!0)}for(r=s?r:n;++r<n;){var c=Ji(a=e[r]),u="wrapper"==c?Yi(a):void 0;s=u&&lo(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?s[Ji(u[0])].apply(s,u[3]):1==a.length&&lo(a)?s[c]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&Ia(r))return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}}))}function Pi(t,e,n,i,o,a,s,c,u,l){var h=128&e,f=1&e,d=2&e,p=24&e,m=512&e,g=d?void 0:Ei(t);return function v(){for(var y=arguments.length,_=r(y),x=y;x--;)_[x]=arguments[x];if(p)var b=Xi(v),w=je(_,b);if(i&&(_=gi(_,i,o,p)),a&&(_=vi(_,a,s,p)),y-=w,p&&y<l){var M=Ue(_,b);return ji(t,e,Pi,v.placeholder,n,_,M,c,u,l-y)}var S=f?n:this,T=d?S[t]:t;return y=_.length,c?_=yo(_,c):m&&y>1&&_.reverse(),h&&u<y&&(_.length=u),this&&this!==qt&&this instanceof v&&(T=g||Ei(T)),T.apply(S,_)}}function Li(t,e){return function(n,r){return function(t,e,n,r){return ur(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Ri(t,e){return function(n,r){var i;if(void 0===n&&void 0===r)return e;if(void 0!==n&&(i=n),void 0!==r){if(void 0===i)return r;"string"==typeof n||"string"==typeof r?(n=Qr(n),r=Qr(r)):(n=$r(n),r=$r(r)),i=t(n,r)}return i}}function Oi(t){return Wi((function(e){return e=de(e,Re($i())),Fr((function(n){var r=this;return t(e,(function(t){return oe(t,r,n)}))}))}))}function ki(t,e){var n=(e=void 0===e?" ":Qr(e)).length;if(n<2)return n?Nr(e,t):e;var r=Nr(e,Ke(t/Ze(e)));return Be(e)?li(qe(r),0,t).join(""):r.slice(0,t)}function Ii(t){return function(e,n,i){return i&&"number"!=typeof i&&co(e,n,i)&&(n=i=void 0),e=rs(e),void 0===n?(n=e,e=0):n=rs(n),function(t,e,n,i){for(var o=-1,a=sn(Ke((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=void 0===i?e<n?1:-1:rs(i),t)}}function Di(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=as(e),n=as(n)),t(e,n)}}function ji(t,e,n,r,i,o,a,s,c,u){var l=8&e;e|=l?32:64,4&(e&=~(l?64:32))||(e&=-4);var h=[t,e,i,l?o:void 0,l?a:void 0,l?void 0:o,l?void 0:a,s,c,u],f=n.apply(void 0,h);return lo(t)&&xo(f,h),f.placeholder=r,Mo(f,t,e)}function zi(t){var e=dt[t];return function(t,n){if(t=as(t),(n=null==n?0:cn(is(n),292))&&rn(t)){var r=(cs(t)+"e").split("e");return+((r=(cs(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Ni=gn&&1/Ve(new gn([,-0]))[1]==1/0?function(t){return new gn(t)}:Qs;function Fi(t){return function(e){var n=ro(e);return n==m?He(e):n==_?We(e):function(t,e){return de(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Bi(t,e,n,i,s,c,u,l){var h=2&e;if(!h&&"function"!=typeof t)throw new vt(o);var f=i?i.length:0;if(f||(e&=-97,i=s=void 0),u=void 0===u?u:sn(is(u),0),l=void 0===l?l:is(l),f-=s?s.length:0,64&e){var d=i,p=s;i=s=void 0}var m=h?void 0:Yi(t),g=[t,e,n,i,s,d,p,c,u,l];if(m&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,s=128==r&&8==n||128==r&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!s)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var c=e[3];if(c){var u=t[3];t[3]=u?gi(u,c,e[4]):c,t[4]=u?Ue(t[3],a):e[4]}(c=e[5])&&(u=t[5],t[5]=u?vi(u,c,e[6]):c,t[6]=u?Ue(t[5],a):e[6]);(c=e[7])&&(t[7]=c);128&r&&(t[8]=null==t[8]?e[8]:cn(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(g,m),t=g[0],e=g[1],n=g[2],i=g[3],s=g[4],!(l=g[9]=void 0===g[9]?h?0:t.length:sn(g[9]-f,0))&&24&e&&(e&=-25),e&&1!=e)v=8==e||16==e?function(t,e,n){var i=Ei(t);return function o(){for(var a=arguments.length,s=r(a),c=a,u=Xi(o);c--;)s[c]=arguments[c];var l=a<3&&s[0]!==u&&s[a-1]!==u?[]:Ue(s,u);if((a-=l.length)<n)return ji(t,e,Pi,o.placeholder,void 0,s,l,void 0,void 0,n-a);var h=this&&this!==qt&&this instanceof o?i:t;return oe(h,this,s)}}(t,e,l):32!=e&&33!=e||s.length?Pi.apply(void 0,g):function(t,e,n,i){var o=1&e,a=Ei(t);return function e(){for(var s=-1,c=arguments.length,u=-1,l=i.length,h=r(l+c),f=this&&this!==qt&&this instanceof e?a:t;++u<l;)h[u]=i[u];for(;c--;)h[u++]=arguments[++s];return oe(f,o?n:this,h)}}(t,e,n,i);else var v=function(t,e,n){var r=1&e,i=Ei(t);return function e(){var o=this&&this!==qt&&this instanceof e?i:t;return o.apply(r?n:this,arguments)}}(t,e,n);return Mo((m?Ur:xo)(v,g),t,e)}function Hi(t,e,n,r){return void 0===t||La(t,xt[n])&&!Mt.call(r,n)?e:t}function Gi(t,e,n,r,i,o){return Va(t)&&Va(e)&&(o.set(e,t),Rr(t,e,void 0,Gi,o),o.delete(e)),t}function Ui(t){return Ya(t)?void 0:t}function Vi(t,e,n,r,i,o){var a=1&n,s=t.length,c=e.length;if(s!=c&&!(a&&c>s))return!1;var u=o.get(t),l=o.get(e);if(u&&l)return u==e&&l==t;var h=-1,f=!0,d=2&n?new zn:void 0;for(o.set(t,e),o.set(e,t);++h<s;){var p=t[h],m=e[h];if(r)var g=a?r(m,p,h,e,t,o):r(p,m,h,t,e,o);if(void 0!==g){if(g)continue;f=!1;break}if(d){if(!ve(e,(function(t,e){if(!ke(d,e)&&(p===t||i(p,t,n,r,o)))return d.push(e)}))){f=!1;break}}else if(p!==m&&!i(p,m,n,r,o)){f=!1;break}}return o.delete(t),o.delete(e),f}function Wi(t){return wo(go(t,void 0,Do),t+"")}function Zi(t){return dr(t,bs,eo)}function qi(t){return dr(t,ws,no)}var Yi=_n?function(t){return _n.get(t)}:Qs;function Ji(t){for(var e=t.name+"",n=xn[e],r=Mt.call(xn,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Xi(t){return(Mt.call(Pn,"placeholder")?Pn:t).placeholder}function $i(){var t=Pn.iteratee||Ys;return t=t===Ys?Sr:t,arguments.length?t(arguments[0],arguments[1]):t}function Qi(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Ki(t){for(var e=bs(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,po(i)]}return e}function to(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Mr(n)?n:void 0}var eo=en?function(t){return null==t?[]:(t=pt(t),le(en(t),(function(e){return Zt.call(t,e)})))}:oc,no=en?function(t){for(var e=[];t;)pe(e,eo(t)),t=Gt(t);return e}:oc,ro=pr;function io(t,e,n){for(var r=-1,i=(e=ci(e,t)).length,o=!1;++r<i;){var a=Co(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ua(i)&&so(a,i)&&(Ia(t)||ka(t))}function oo(t){return"function"!=typeof t.constructor||fo(t)?{}:Ln(Gt(t))}function ao(t){return Ia(t)||ka(t)||!!(Jt&&t&&t[Jt])}function so(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&ct.test(t))&&t>-1&&t%1==0&&t<e}function co(t,e,n){if(!Va(n))return!1;var r=typeof e;return!!("number"==r?ja(n)&&so(e,n.length):"string"==r&&e in n)&&La(n[e],t)}function uo(t,e){if(Ia(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Qa(t))||(V.test(t)||!U.test(t)||null!=e&&t in pt(e))}function lo(t){var e=Ji(t),n=Pn[e];if("function"!=typeof n||!(e in kn.prototype))return!1;if(t===n)return!0;var r=Yi(n);return!!r&&t===r[0]}(dn&&ro(new dn(new ArrayBuffer(1)))!=S||pn&&ro(new pn)!=m||mn&&"[object Promise]"!=ro(mn.resolve())||gn&&ro(new gn)!=_||vn&&ro(new vn)!=w)&&(ro=function(t){var e=pr(t),n=e==v?t.constructor:void 0,r=n?Ao(n):"";if(r)switch(r){case bn:return S;case wn:return m;case Mn:return"[object Promise]";case Sn:return _;case Tn:return w}return e});var ho=bt?Ha:ac;function fo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||xt)}function po(t){return t==t&&!Va(t)}function mo(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in pt(n)))}}function go(t,e,n){return e=sn(void 0===e?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=sn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var c=r(e+1);++o<e;)c[o]=i[o];return c[e]=n(s),oe(t,this,c)}}function vo(t,e){return e.length<2?t:fr(t,Zr(e,0,-1))}function yo(t,e){for(var n=t.length,r=cn(e.length,n),i=yi(t);r--;){var o=e[r];t[r]=so(o,n)?i[o]:void 0}return t}function _o(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var xo=So(Ur),bo=Qe||function(t,e){return qt.setTimeout(t,e)},wo=So(Vr);function Mo(t,e,n){var r=e+"";return wo(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(X,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return se(s,(function(n){var r="_."+n[0];e&n[1]&&!he(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match($);return e?e[1].split(Q):[]}(r),n)))}function So(t){var e=0,n=0;return function(){var r=un(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function To(t,e){var n=-1,r=t.length,i=r-1;for(e=void 0===e?r:e;++n<e;){var o=zr(n,i),a=t[o];t[o]=t[n],t[n]=a}return t.length=e,t}var Eo=function(t){var e=Sa(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(W,(function(t,n,r,i){e.push(r?i.replace(et,"$1"):n||t)})),e}));function Co(t){if("string"==typeof t||Qa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Ao(t){if(null!=t){try{return wt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Po(t){if(t instanceof kn)return t.clone();var e=new On(t.__wrapped__,t.__chain__);return e.__actions__=yi(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Lo=Fr((function(t,e){return za(t)?tr(t,ar(e,1,za,!0)):[]})),Ro=Fr((function(t,e){var n=Bo(e);return za(n)&&(n=void 0),za(t)?tr(t,ar(e,1,za,!0),$i(n,2)):[]})),Oo=Fr((function(t,e){var n=Bo(e);return za(n)&&(n=void 0),za(t)?tr(t,ar(e,1,za,!0),void 0,n):[]}));function ko(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:is(n);return i<0&&(i=sn(r+i,0)),xe(t,$i(e,3),i)}function Io(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=is(n),i=n<0?sn(r+i,0):cn(i,r-1)),xe(t,$i(e,3),i,!0)}function Do(t){return(null==t?0:t.length)?ar(t,1):[]}function jo(t){return t&&t.length?t[0]:void 0}var zo=Fr((function(t){var e=de(t,ai);return e.length&&e[0]===t[0]?yr(e):[]})),No=Fr((function(t){var e=Bo(t),n=de(t,ai);return e===Bo(n)?e=void 0:n.pop(),n.length&&n[0]===t[0]?yr(n,$i(e,2)):[]})),Fo=Fr((function(t){var e=Bo(t),n=de(t,ai);return(e="function"==typeof e?e:void 0)&&n.pop(),n.length&&n[0]===t[0]?yr(n,void 0,e):[]}));function Bo(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var Ho=Fr(Go);function Go(t,e){return t&&t.length&&e&&e.length?Dr(t,e):t}var Uo=Wi((function(t,e){var n=null==t?0:t.length,r=Jn(t,e);return jr(t,de(e,(function(t){return so(t,n)?+t:t})).sort(mi)),r}));function Vo(t){return null==t?t:fn.call(t)}var Wo=Fr((function(t){return Kr(ar(t,1,za,!0))})),Zo=Fr((function(t){var e=Bo(t);return za(e)&&(e=void 0),Kr(ar(t,1,za,!0),$i(e,2))})),qo=Fr((function(t){var e=Bo(t);return e="function"==typeof e?e:void 0,Kr(ar(t,1,za,!0),void 0,e)}));function Yo(t){if(!t||!t.length)return[];var e=0;return t=le(t,(function(t){if(za(t))return e=sn(t.length,e),!0})),Pe(e,(function(e){return de(t,Te(e))}))}function Jo(t,e){if(!t||!t.length)return[];var n=Yo(t);return null==e?n:de(n,(function(t){return oe(e,void 0,t)}))}var Xo=Fr((function(t,e){return za(t)?tr(t,e):[]})),$o=Fr((function(t){return ii(le(t,za))})),Qo=Fr((function(t){var e=Bo(t);return za(e)&&(e=void 0),ii(le(t,za),$i(e,2))})),Ko=Fr((function(t){var e=Bo(t);return e="function"==typeof e?e:void 0,ii(le(t,za),void 0,e)})),ta=Fr(Yo);var ea=Fr((function(t){var e=t.length,n=e>1?t[e-1]:void 0;return n="function"==typeof n?(t.pop(),n):void 0,Jo(t,n)}));function na(t){var e=Pn(t);return e.__chain__=!0,e}function ra(t,e){return e(t)}var ia=Wi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Jn(e,t)};return!(e>1||this.__actions__.length)&&r instanceof kn&&so(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:ra,args:[i],thisArg:void 0}),new On(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(i)}));var oa=xi((function(t,e,n){Mt.call(t,n)?++t[n]:Yn(t,n,1)}));var aa=Ci(ko),sa=Ci(Io);function ca(t,e){return(Ia(t)?se:er)(t,$i(e,3))}function ua(t,e){return(Ia(t)?ce:nr)(t,$i(e,3))}var la=xi((function(t,e,n){Mt.call(t,n)?t[n].push(e):Yn(t,n,[e])}));var ha=Fr((function(t,e,n){var i=-1,o="function"==typeof e,a=ja(t)?r(t.length):[];return er(t,(function(t){a[++i]=o?oe(e,t,n):_r(t,e,n)})),a})),fa=xi((function(t,e,n){Yn(t,n,e)}));function da(t,e){return(Ia(t)?de:Ar)(t,$i(e,3))}var pa=xi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var ma=Fr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&co(t,e[0],e[1])?e=[]:n>2&&co(e[0],e[1],e[2])&&(e=[e[0]]),kr(t,ar(e,1),[])})),ga=$e||function(){return qt.Date.now()};function va(t,e,n){return e=n?void 0:e,Bi(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function ya(t,e){var n;if("function"!=typeof e)throw new vt(o);return t=is(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var _a=Fr((function(t,e,n){var r=1;if(n.length){var i=Ue(n,Xi(_a));r|=32}return Bi(t,r,e,n,i)})),xa=Fr((function(t,e,n){var r=3;if(n.length){var i=Ue(n,Xi(xa));r|=32}return Bi(e,r,t,n,i)}));function ba(t,e,n){var r,i,a,s,c,u,l=0,h=!1,f=!1,d=!0;if("function"!=typeof t)throw new vt(o);function p(e){var n=r,o=i;return r=i=void 0,l=e,s=t.apply(o,n)}function m(t){return l=t,c=bo(v,e),h?p(t):s}function g(t){var n=t-u;return void 0===u||n>=e||n<0||f&&t-l>=a}function v(){var t=ga();if(g(t))return y(t);c=bo(v,function(t){var n=e-(t-u);return f?cn(n,a-(t-l)):n}(t))}function y(t){return c=void 0,d&&r?p(t):(r=i=void 0,s)}function _(){var t=ga(),n=g(t);if(r=arguments,i=this,u=t,n){if(void 0===c)return m(u);if(f)return hi(c),c=bo(v,e),p(u)}return void 0===c&&(c=bo(v,e)),s}return e=as(e)||0,Va(n)&&(h=!!n.leading,a=(f="maxWait"in n)?sn(as(n.maxWait)||0,e):a,d="trailing"in n?!!n.trailing:d),_.cancel=function(){void 0!==c&&hi(c),l=0,r=u=i=c=void 0},_.flush=function(){return void 0===c?s:y(ga())},_}var wa=Fr((function(t,e){return Kn(t,1,e)})),Ma=Fr((function(t,e,n){return Kn(t,as(e)||0,n)}));function Sa(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new vt(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Sa.Cache||jn),n}function Ta(t){if("function"!=typeof t)throw new vt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Sa.Cache=jn;var Ea=ui((function(t,e){var n=(e=1==e.length&&Ia(e[0])?de(e[0],Re($i())):de(ar(e,1),Re($i()))).length;return Fr((function(r){for(var i=-1,o=cn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return oe(t,this,r)}))})),Ca=Fr((function(t,e){return Bi(t,32,void 0,e,Ue(e,Xi(Ca)))})),Aa=Fr((function(t,e){return Bi(t,64,void 0,e,Ue(e,Xi(Aa)))})),Pa=Wi((function(t,e){return Bi(t,256,void 0,void 0,void 0,e)}));function La(t,e){return t===e||t!=t&&e!=e}var Ra=Di(mr),Oa=Di((function(t,e){return t>=e})),ka=xr(function(){return arguments}())?xr:function(t){return Wa(t)&&Mt.call(t,"callee")&&!Zt.call(t,"callee")},Ia=r.isArray,Da=Kt?Re(Kt):function(t){return Wa(t)&&pr(t)==M};function ja(t){return null!=t&&Ua(t.length)&&!Ha(t)}function za(t){return Wa(t)&&ja(t)}var Na=nn||ac,Fa=te?Re(te):function(t){return Wa(t)&&pr(t)==h};function Ba(t){if(!Wa(t))return!1;var e=pr(t);return e==f||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Ya(t)}function Ha(t){if(!Va(t))return!1;var e=pr(t);return e==d||e==p||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Ga(t){return"number"==typeof t&&t==is(t)}function Ua(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Va(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Wa(t){return null!=t&&"object"==typeof t}var Za=ee?Re(ee):function(t){return Wa(t)&&ro(t)==m};function qa(t){return"number"==typeof t||Wa(t)&&pr(t)==g}function Ya(t){if(!Wa(t)||pr(t)!=v)return!1;var e=Gt(t);if(null===e)return!0;var n=Mt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&wt.call(n)==Ct}var Ja=ne?Re(ne):function(t){return Wa(t)&&pr(t)==y};var Xa=re?Re(re):function(t){return Wa(t)&&ro(t)==_};function $a(t){return"string"==typeof t||!Ia(t)&&Wa(t)&&pr(t)==x}function Qa(t){return"symbol"==typeof t||Wa(t)&&pr(t)==b}var Ka=ie?Re(ie):function(t){return Wa(t)&&Ua(t.length)&&!!Bt[pr(t)]};var ts=Di(Cr),es=Di((function(t,e){return t<=e}));function ns(t){if(!t)return[];if(ja(t))return $a(t)?qe(t):yi(t);if($t&&t[$t])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[$t]());var e=ro(t);return(e==m?He:e==_?Ve:Ls)(t)}function rs(t){return t?(t=as(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function is(t){var e=rs(t),n=e%1;return e==e?n?e-n:e:0}function os(t){return t?Xn(is(t),0,4294967295):0}function as(t){if("number"==typeof t)return t;if(Qa(t))return NaN;if(Va(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Va(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Le(t);var n=ot.test(t);return n||st.test(t)?Vt(t.slice(2),n?2:8):it.test(t)?NaN:+t}function ss(t){return _i(t,ws(t))}function cs(t){return null==t?"":Qr(t)}var us=bi((function(t,e){if(fo(e)||ja(e))_i(e,bs(e),t);else for(var n in e)Mt.call(e,n)&&Vn(t,n,e[n])})),ls=bi((function(t,e){_i(e,ws(e),t)})),hs=bi((function(t,e,n,r){_i(e,ws(e),t,r)})),fs=bi((function(t,e,n,r){_i(e,bs(e),t,r)})),ds=Wi(Jn);var ps=Fr((function(t,e){t=pt(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&co(e[0],e[1],i)&&(r=1);++n<r;)for(var o=e[n],a=ws(o),s=-1,c=a.length;++s<c;){var u=a[s],l=t[u];(void 0===l||La(l,xt[u])&&!Mt.call(t,u))&&(t[u]=o[u])}return t})),ms=Fr((function(t){return t.push(void 0,Gi),oe(Ss,void 0,t)}));function gs(t,e,n){var r=null==t?void 0:fr(t,e);return void 0===r?n:r}function vs(t,e){return null!=t&&io(t,e,vr)}var ys=Li((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Et.call(e)),t[e]=n}),Vs(qs)),_s=Li((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Et.call(e)),Mt.call(t,e)?t[e].push(n):t[e]=[n]}),$i),xs=Fr(_r);function bs(t){return ja(t)?Fn(t):Tr(t)}function ws(t){return ja(t)?Fn(t,!0):Er(t)}var Ms=bi((function(t,e,n){Rr(t,e,n)})),Ss=bi((function(t,e,n,r){Rr(t,e,n,r)})),Ts=Wi((function(t,e){var n={};if(null==t)return n;var r=!1;e=de(e,(function(e){return e=ci(e,t),r||(r=e.length>1),e})),_i(t,qi(t),n),r&&(n=$n(n,7,Ui));for(var i=e.length;i--;)ti(n,e[i]);return n}));var Es=Wi((function(t,e){return null==t?{}:function(t,e){return Ir(t,e,(function(e,n){return vs(t,n)}))}(t,e)}));function Cs(t,e){if(null==t)return{};var n=de(qi(t),(function(t){return[t]}));return e=$i(e),Ir(t,n,(function(t,n){return e(t,n[0])}))}var As=Fi(bs),Ps=Fi(ws);function Ls(t){return null==t?[]:Oe(t,bs(t))}var Rs=Ti((function(t,e,n){return e=e.toLowerCase(),t+(n?Os(e):e)}));function Os(t){return Bs(cs(t).toLowerCase())}function ks(t){return(t=cs(t))&&t.replace(ut,ze).replace(kt,"")}var Is=Ti((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ds=Ti((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),js=Si("toLowerCase");var zs=Ti((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Ns=Ti((function(t,e,n){return t+(n?" ":"")+Bs(e)}));var Fs=Ti((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Bs=Si("toUpperCase");function Hs(t,e,n){return t=cs(t),void 0===(e=n?void 0:e)?function(t){return zt.test(t)}(t)?function(t){return t.match(Dt)||[]}(t):function(t){return t.match(K)||[]}(t):t.match(e)||[]}var Gs=Fr((function(t,e){try{return oe(t,void 0,e)}catch(t){return Ba(t)?t:new J(t)}})),Us=Wi((function(t,e){return se(e,(function(e){e=Co(e),Yn(t,e,_a(t[e],t))})),t}));function Vs(t){return function(){return t}}var Ws=Ai(),Zs=Ai(!0);function qs(t){return t}function Ys(t){return Sr("function"==typeof t?t:$n(t,1))}var Js=Fr((function(t,e){return function(n){return _r(n,t,e)}})),Xs=Fr((function(t,e){return function(n){return _r(t,n,e)}}));function $s(t,e,n){var r=bs(e),i=hr(e,r);null!=n||Va(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=hr(e,bs(e)));var o=!(Va(n)&&"chain"in n&&!n.chain),a=Ha(t);return se(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=yi(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,pe([this.value()],arguments))})})),t}function Qs(){}var Ks=Oi(de),tc=Oi(ue),ec=Oi(ve);function nc(t){return uo(t)?Te(Co(t)):function(t){return function(e){return fr(e,t)}}(t)}var rc=Ii(),ic=Ii(!0);function oc(){return[]}function ac(){return!1}var sc=Ri((function(t,e){return t+e}),0),cc=zi("ceil"),uc=Ri((function(t,e){return t/e}),1),lc=zi("floor");var hc,fc=Ri((function(t,e){return t*e}),1),dc=zi("round"),pc=Ri((function(t,e){return t-e}),0);return Pn.after=function(t,e){if("function"!=typeof e)throw new vt(o);return t=is(t),function(){if(--t<1)return e.apply(this,arguments)}},Pn.ary=va,Pn.assign=us,Pn.assignIn=ls,Pn.assignInWith=hs,Pn.assignWith=fs,Pn.at=ds,Pn.before=ya,Pn.bind=_a,Pn.bindAll=Us,Pn.bindKey=xa,Pn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ia(t)?t:[t]},Pn.chain=na,Pn.chunk=function(t,e,n){e=(n?co(t,e,n):void 0===e)?1:sn(is(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,a=0,s=r(Ke(i/e));o<i;)s[a++]=Zr(t,o,o+=e);return s},Pn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},Pn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return pe(Ia(n)?yi(n):[n],ar(e,1))},Pn.cond=function(t){var e=null==t?0:t.length,n=$i();return t=e?de(t,(function(t){if("function"!=typeof t[1])throw new vt(o);return[n(t[0]),t[1]]})):[],Fr((function(n){for(var r=-1;++r<e;){var i=t[r];if(oe(i[0],this,n))return oe(i[1],this,n)}}))},Pn.conforms=function(t){return function(t){var e=bs(t);return function(n){return Qn(n,t,e)}}($n(t,1))},Pn.constant=Vs,Pn.countBy=oa,Pn.create=function(t,e){var n=Ln(t);return null==e?n:qn(n,e)},Pn.curry=function t(e,n,r){var i=Bi(e,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=t.placeholder,i},Pn.curryRight=function t(e,n,r){var i=Bi(e,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=t.placeholder,i},Pn.debounce=ba,Pn.defaults=ps,Pn.defaultsDeep=ms,Pn.defer=wa,Pn.delay=Ma,Pn.difference=Lo,Pn.differenceBy=Ro,Pn.differenceWith=Oo,Pn.drop=function(t,e,n){var r=null==t?0:t.length;return r?Zr(t,(e=n||void 0===e?1:is(e))<0?0:e,r):[]},Pn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Zr(t,0,(e=r-(e=n||void 0===e?1:is(e)))<0?0:e):[]},Pn.dropRightWhile=function(t,e){return t&&t.length?ni(t,$i(e,3),!0,!0):[]},Pn.dropWhile=function(t,e){return t&&t.length?ni(t,$i(e,3),!0):[]},Pn.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&co(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=is(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:is(r))<0&&(r+=i),r=n>r?0:os(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Pn.filter=function(t,e){return(Ia(t)?le:or)(t,$i(e,3))},Pn.flatMap=function(t,e){return ar(da(t,e),1)},Pn.flatMapDeep=function(t,e){return ar(da(t,e),1/0)},Pn.flatMapDepth=function(t,e,n){return n=void 0===n?1:is(n),ar(da(t,e),n)},Pn.flatten=Do,Pn.flattenDeep=function(t){return(null==t?0:t.length)?ar(t,1/0):[]},Pn.flattenDepth=function(t,e){return(null==t?0:t.length)?ar(t,e=void 0===e?1:is(e)):[]},Pn.flip=function(t){return Bi(t,512)},Pn.flow=Ws,Pn.flowRight=Zs,Pn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},Pn.functions=function(t){return null==t?[]:hr(t,bs(t))},Pn.functionsIn=function(t){return null==t?[]:hr(t,ws(t))},Pn.groupBy=la,Pn.initial=function(t){return(null==t?0:t.length)?Zr(t,0,-1):[]},Pn.intersection=zo,Pn.intersectionBy=No,Pn.intersectionWith=Fo,Pn.invert=ys,Pn.invertBy=_s,Pn.invokeMap=ha,Pn.iteratee=Ys,Pn.keyBy=fa,Pn.keys=bs,Pn.keysIn=ws,Pn.map=da,Pn.mapKeys=function(t,e){var n={};return e=$i(e,3),ur(t,(function(t,r,i){Yn(n,e(t,r,i),t)})),n},Pn.mapValues=function(t,e){var n={};return e=$i(e,3),ur(t,(function(t,r,i){Yn(n,r,e(t,r,i))})),n},Pn.matches=function(t){return Pr($n(t,1))},Pn.matchesProperty=function(t,e){return Lr(t,$n(e,1))},Pn.memoize=Sa,Pn.merge=Ms,Pn.mergeWith=Ss,Pn.method=Js,Pn.methodOf=Xs,Pn.mixin=$s,Pn.negate=Ta,Pn.nthArg=function(t){return t=is(t),Fr((function(e){return Or(e,t)}))},Pn.omit=Ts,Pn.omitBy=function(t,e){return Cs(t,Ta($i(e)))},Pn.once=function(t){return ya(2,t)},Pn.orderBy=function(t,e,n,r){return null==t?[]:(Ia(e)||(e=null==e?[]:[e]),Ia(n=r?void 0:n)||(n=null==n?[]:[n]),kr(t,e,n))},Pn.over=Ks,Pn.overArgs=Ea,Pn.overEvery=tc,Pn.overSome=ec,Pn.partial=Ca,Pn.partialRight=Aa,Pn.partition=pa,Pn.pick=Es,Pn.pickBy=Cs,Pn.property=nc,Pn.propertyOf=function(t){return function(e){return null==t?void 0:fr(t,e)}},Pn.pull=Ho,Pn.pullAll=Go,Pn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Dr(t,e,$i(n,2)):t},Pn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Dr(t,e,void 0,n):t},Pn.pullAt=Uo,Pn.range=rc,Pn.rangeRight=ic,Pn.rearg=Pa,Pn.reject=function(t,e){return(Ia(t)?le:or)(t,Ta($i(e,3)))},Pn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=$i(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return jr(t,i),n},Pn.rest=function(t,e){if("function"!=typeof t)throw new vt(o);return Fr(t,e=void 0===e?e:is(e))},Pn.reverse=Vo,Pn.sampleSize=function(t,e,n){return e=(n?co(t,e,n):void 0===e)?1:is(e),(Ia(t)?Hn:Hr)(t,e)},Pn.set=function(t,e,n){return null==t?t:Gr(t,e,n)},Pn.setWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:Gr(t,e,n,r)},Pn.shuffle=function(t){return(Ia(t)?Gn:Wr)(t)},Pn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&co(t,e,n)?(e=0,n=r):(e=null==e?0:is(e),n=void 0===n?r:is(n)),Zr(t,e,n)):[]},Pn.sortBy=ma,Pn.sortedUniq=function(t){return t&&t.length?Xr(t):[]},Pn.sortedUniqBy=function(t,e){return t&&t.length?Xr(t,$i(e,2)):[]},Pn.split=function(t,e,n){return n&&"number"!=typeof n&&co(t,e,n)&&(e=n=void 0),(n=void 0===n?4294967295:n>>>0)?(t=cs(t))&&("string"==typeof e||null!=e&&!Ja(e))&&!(e=Qr(e))&&Be(t)?li(qe(t),0,n):t.split(e,n):[]},Pn.spread=function(t,e){if("function"!=typeof t)throw new vt(o);return e=null==e?0:sn(is(e),0),Fr((function(n){var r=n[e],i=li(n,0,e);return r&&pe(i,r),oe(t,this,i)}))},Pn.tail=function(t){var e=null==t?0:t.length;return e?Zr(t,1,e):[]},Pn.take=function(t,e,n){return t&&t.length?Zr(t,0,(e=n||void 0===e?1:is(e))<0?0:e):[]},Pn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Zr(t,(e=r-(e=n||void 0===e?1:is(e)))<0?0:e,r):[]},Pn.takeRightWhile=function(t,e){return t&&t.length?ni(t,$i(e,3),!1,!0):[]},Pn.takeWhile=function(t,e){return t&&t.length?ni(t,$i(e,3)):[]},Pn.tap=function(t,e){return e(t),t},Pn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new vt(o);return Va(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ba(t,e,{leading:r,maxWait:e,trailing:i})},Pn.thru=ra,Pn.toArray=ns,Pn.toPairs=As,Pn.toPairsIn=Ps,Pn.toPath=function(t){return Ia(t)?de(t,Co):Qa(t)?[t]:yi(Eo(cs(t)))},Pn.toPlainObject=ss,Pn.transform=function(t,e,n){var r=Ia(t),i=r||Na(t)||Ka(t);if(e=$i(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Va(t)&&Ha(o)?Ln(Gt(t)):{}}return(i?se:ur)(t,(function(t,r,i){return e(n,t,r,i)})),n},Pn.unary=function(t){return va(t,1)},Pn.union=Wo,Pn.unionBy=Zo,Pn.unionWith=qo,Pn.uniq=function(t){return t&&t.length?Kr(t):[]},Pn.uniqBy=function(t,e){return t&&t.length?Kr(t,$i(e,2)):[]},Pn.uniqWith=function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?Kr(t,void 0,e):[]},Pn.unset=function(t,e){return null==t||ti(t,e)},Pn.unzip=Yo,Pn.unzipWith=Jo,Pn.update=function(t,e,n){return null==t?t:ei(t,e,si(n))},Pn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:ei(t,e,si(n),r)},Pn.values=Ls,Pn.valuesIn=function(t){return null==t?[]:Oe(t,ws(t))},Pn.without=Xo,Pn.words=Hs,Pn.wrap=function(t,e){return Ca(si(e),t)},Pn.xor=$o,Pn.xorBy=Qo,Pn.xorWith=Ko,Pn.zip=ta,Pn.zipObject=function(t,e){return oi(t||[],e||[],Vn)},Pn.zipObjectDeep=function(t,e){return oi(t||[],e||[],Gr)},Pn.zipWith=ea,Pn.entries=As,Pn.entriesIn=Ps,Pn.extend=ls,Pn.extendWith=hs,$s(Pn,Pn),Pn.add=sc,Pn.attempt=Gs,Pn.camelCase=Rs,Pn.capitalize=Os,Pn.ceil=cc,Pn.clamp=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=as(n))==n?n:0),void 0!==e&&(e=(e=as(e))==e?e:0),Xn(as(t),e,n)},Pn.clone=function(t){return $n(t,4)},Pn.cloneDeep=function(t){return $n(t,5)},Pn.cloneDeepWith=function(t,e){return $n(t,5,e="function"==typeof e?e:void 0)},Pn.cloneWith=function(t,e){return $n(t,4,e="function"==typeof e?e:void 0)},Pn.conformsTo=function(t,e){return null==e||Qn(t,e,bs(e))},Pn.deburr=ks,Pn.defaultTo=function(t,e){return null==t||t!=t?e:t},Pn.divide=uc,Pn.endsWith=function(t,e,n){t=cs(t),e=Qr(e);var r=t.length,i=n=void 0===n?r:Xn(is(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},Pn.eq=La,Pn.escape=function(t){return(t=cs(t))&&F.test(t)?t.replace(z,Ne):t},Pn.escapeRegExp=function(t){return(t=cs(t))&&q.test(t)?t.replace(Z,"\\$&"):t},Pn.every=function(t,e,n){var r=Ia(t)?ue:rr;return n&&co(t,e,n)&&(e=void 0),r(t,$i(e,3))},Pn.find=aa,Pn.findIndex=ko,Pn.findKey=function(t,e){return _e(t,$i(e,3),ur)},Pn.findLast=sa,Pn.findLastIndex=Io,Pn.findLastKey=function(t,e){return _e(t,$i(e,3),lr)},Pn.floor=lc,Pn.forEach=ca,Pn.forEachRight=ua,Pn.forIn=function(t,e){return null==t?t:sr(t,$i(e,3),ws)},Pn.forInRight=function(t,e){return null==t?t:cr(t,$i(e,3),ws)},Pn.forOwn=function(t,e){return t&&ur(t,$i(e,3))},Pn.forOwnRight=function(t,e){return t&&lr(t,$i(e,3))},Pn.get=gs,Pn.gt=Ra,Pn.gte=Oa,Pn.has=function(t,e){return null!=t&&io(t,e,gr)},Pn.hasIn=vs,Pn.head=jo,Pn.identity=qs,Pn.includes=function(t,e,n,r){t=ja(t)?t:Ls(t),n=n&&!r?is(n):0;var i=t.length;return n<0&&(n=sn(i+n,0)),$a(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&be(t,e,n)>-1},Pn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:is(n);return i<0&&(i=sn(r+i,0)),be(t,e,i)},Pn.inRange=function(t,e,n){return e=rs(e),void 0===n?(n=e,e=0):n=rs(n),function(t,e,n){return t>=cn(e,n)&&t<sn(e,n)}(t=as(t),e,n)},Pn.invoke=xs,Pn.isArguments=ka,Pn.isArray=Ia,Pn.isArrayBuffer=Da,Pn.isArrayLike=ja,Pn.isArrayLikeObject=za,Pn.isBoolean=function(t){return!0===t||!1===t||Wa(t)&&pr(t)==l},Pn.isBuffer=Na,Pn.isDate=Fa,Pn.isElement=function(t){return Wa(t)&&1===t.nodeType&&!Ya(t)},Pn.isEmpty=function(t){if(null==t)return!0;if(ja(t)&&(Ia(t)||"string"==typeof t||"function"==typeof t.splice||Na(t)||Ka(t)||ka(t)))return!t.length;var e=ro(t);if(e==m||e==_)return!t.size;if(fo(t))return!Tr(t).length;for(var n in t)if(Mt.call(t,n))return!1;return!0},Pn.isEqual=function(t,e){return br(t,e)},Pn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:void 0)?n(t,e):void 0;return void 0===r?br(t,e,void 0,n):!!r},Pn.isError=Ba,Pn.isFinite=function(t){return"number"==typeof t&&rn(t)},Pn.isFunction=Ha,Pn.isInteger=Ga,Pn.isLength=Ua,Pn.isMap=Za,Pn.isMatch=function(t,e){return t===e||wr(t,e,Ki(e))},Pn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:void 0,wr(t,e,Ki(e),n)},Pn.isNaN=function(t){return qa(t)&&t!=+t},Pn.isNative=function(t){if(ho(t))throw new J("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mr(t)},Pn.isNil=function(t){return null==t},Pn.isNull=function(t){return null===t},Pn.isNumber=qa,Pn.isObject=Va,Pn.isObjectLike=Wa,Pn.isPlainObject=Ya,Pn.isRegExp=Ja,Pn.isSafeInteger=function(t){return Ga(t)&&t>=-9007199254740991&&t<=9007199254740991},Pn.isSet=Xa,Pn.isString=$a,Pn.isSymbol=Qa,Pn.isTypedArray=Ka,Pn.isUndefined=function(t){return void 0===t},Pn.isWeakMap=function(t){return Wa(t)&&ro(t)==w},Pn.isWeakSet=function(t){return Wa(t)&&"[object WeakSet]"==pr(t)},Pn.join=function(t,e){return null==t?"":on.call(t,e)},Pn.kebabCase=Is,Pn.last=Bo,Pn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=is(n))<0?sn(r+i,0):cn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):xe(t,Me,i,!0)},Pn.lowerCase=Ds,Pn.lowerFirst=js,Pn.lt=ts,Pn.lte=es,Pn.max=function(t){return t&&t.length?ir(t,qs,mr):void 0},Pn.maxBy=function(t,e){return t&&t.length?ir(t,$i(e,2),mr):void 0},Pn.mean=function(t){return Se(t,qs)},Pn.meanBy=function(t,e){return Se(t,$i(e,2))},Pn.min=function(t){return t&&t.length?ir(t,qs,Cr):void 0},Pn.minBy=function(t,e){return t&&t.length?ir(t,$i(e,2),Cr):void 0},Pn.stubArray=oc,Pn.stubFalse=ac,Pn.stubObject=function(){return{}},Pn.stubString=function(){return""},Pn.stubTrue=function(){return!0},Pn.multiply=fc,Pn.nth=function(t,e){return t&&t.length?Or(t,is(e)):void 0},Pn.noConflict=function(){return qt._===this&&(qt._=At),this},Pn.noop=Qs,Pn.now=ga,Pn.pad=function(t,e,n){t=cs(t);var r=(e=is(e))?Ze(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return ki(tn(i),n)+t+ki(Ke(i),n)},Pn.padEnd=function(t,e,n){t=cs(t);var r=(e=is(e))?Ze(t):0;return e&&r<e?t+ki(e-r,n):t},Pn.padStart=function(t,e,n){t=cs(t);var r=(e=is(e))?Ze(t):0;return e&&r<e?ki(e-r,n)+t:t},Pn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),ln(cs(t).replace(Y,""),e||0)},Pn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&co(t,e,n)&&(e=n=void 0),void 0===n&&("boolean"==typeof e?(n=e,e=void 0):"boolean"==typeof t&&(n=t,t=void 0)),void 0===t&&void 0===e?(t=0,e=1):(t=rs(t),void 0===e?(e=t,t=0):e=rs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=hn();return cn(t+i*(e-t+Ut("1e-"+((i+"").length-1))),e)}return zr(t,e)},Pn.reduce=function(t,e,n){var r=Ia(t)?me:Ce,i=arguments.length<3;return r(t,$i(e,4),n,i,er)},Pn.reduceRight=function(t,e,n){var r=Ia(t)?ge:Ce,i=arguments.length<3;return r(t,$i(e,4),n,i,nr)},Pn.repeat=function(t,e,n){return e=(n?co(t,e,n):void 0===e)?1:is(e),Nr(cs(t),e)},Pn.replace=function(){var t=arguments,e=cs(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Pn.result=function(t,e,n){var r=-1,i=(e=ci(e,t)).length;for(i||(i=1,t=void 0);++r<i;){var o=null==t?void 0:t[Co(e[r])];void 0===o&&(r=i,o=n),t=Ha(o)?o.call(t):o}return t},Pn.round=dc,Pn.runInContext=t,Pn.sample=function(t){return(Ia(t)?Bn:Br)(t)},Pn.size=function(t){if(null==t)return 0;if(ja(t))return $a(t)?Ze(t):t.length;var e=ro(t);return e==m||e==_?t.size:Tr(t).length},Pn.snakeCase=zs,Pn.some=function(t,e,n){var r=Ia(t)?ve:qr;return n&&co(t,e,n)&&(e=void 0),r(t,$i(e,3))},Pn.sortedIndex=function(t,e){return Yr(t,e)},Pn.sortedIndexBy=function(t,e,n){return Jr(t,e,$i(n,2))},Pn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Yr(t,e);if(r<n&&La(t[r],e))return r}return-1},Pn.sortedLastIndex=function(t,e){return Yr(t,e,!0)},Pn.sortedLastIndexBy=function(t,e,n){return Jr(t,e,$i(n,2),!0)},Pn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=Yr(t,e,!0)-1;if(La(t[n],e))return n}return-1},Pn.startCase=Ns,Pn.startsWith=function(t,e,n){return t=cs(t),n=null==n?0:Xn(is(n),0,t.length),e=Qr(e),t.slice(n,n+e.length)==e},Pn.subtract=pc,Pn.sum=function(t){return t&&t.length?Ae(t,qs):0},Pn.sumBy=function(t,e){return t&&t.length?Ae(t,$i(e,2)):0},Pn.template=function(t,e,n){var r=Pn.templateSettings;n&&co(t,e,n)&&(e=void 0),t=cs(t),e=hs({},e,r,Hi);var i,o,a=hs({},e.imports,r.imports,Hi),s=bs(a),c=Oe(a,s),u=0,l=e.interpolate||lt,h="__p += '",f=mt((e.escape||lt).source+"|"+l.source+"|"+(l===G?nt:lt).source+"|"+(e.evaluate||lt).source+"|$","g"),d="//# sourceURL="+(Mt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ft+"]")+"\n";t.replace(f,(function(e,n,r,a,s,c){return r||(r=a),h+=t.slice(u,c).replace(ht,Fe),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),s&&(o=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=c+e.length,e})),h+="';\n";var p=Mt.call(e,"variable")&&e.variable;if(p){if(tt.test(p))throw new J("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(k,""):h).replace(I,"$1").replace(D,"$1;"),h="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=Gs((function(){return ft(s,d+"return "+h).apply(void 0,c)}));if(m.source=h,Ba(m))throw m;return m},Pn.times=function(t,e){if((t=is(t))<1||t>9007199254740991)return[];var n=4294967295,r=cn(t,4294967295);t-=4294967295;for(var i=Pe(r,e=$i(e));++n<t;)e(n);return i},Pn.toFinite=rs,Pn.toInteger=is,Pn.toLength=os,Pn.toLower=function(t){return cs(t).toLowerCase()},Pn.toNumber=as,Pn.toSafeInteger=function(t){return t?Xn(is(t),-9007199254740991,9007199254740991):0===t?t:0},Pn.toString=cs,Pn.toUpper=function(t){return cs(t).toUpperCase()},Pn.trim=function(t,e,n){if((t=cs(t))&&(n||void 0===e))return Le(t);if(!t||!(e=Qr(e)))return t;var r=qe(t),i=qe(e);return li(r,Ie(r,i),De(r,i)+1).join("")},Pn.trimEnd=function(t,e,n){if((t=cs(t))&&(n||void 0===e))return t.slice(0,Ye(t)+1);if(!t||!(e=Qr(e)))return t;var r=qe(t);return li(r,0,De(r,qe(e))+1).join("")},Pn.trimStart=function(t,e,n){if((t=cs(t))&&(n||void 0===e))return t.replace(Y,"");if(!t||!(e=Qr(e)))return t;var r=qe(t);return li(r,Ie(r,qe(e))).join("")},Pn.truncate=function(t,e){var n=30,r="...";if(Va(e)){var i="separator"in e?e.separator:i;n="length"in e?is(e.length):n,r="omission"in e?Qr(e.omission):r}var o=(t=cs(t)).length;if(Be(t)){var a=qe(t);o=a.length}if(n>=o)return t;var s=n-Ze(r);if(s<1)return r;var c=a?li(a,0,s).join(""):t.slice(0,s);if(void 0===i)return c+r;if(a&&(s+=c.length-s),Ja(i)){if(t.slice(s).search(i)){var u,l=c;for(i.global||(i=mt(i.source,cs(rt.exec(i))+"g")),i.lastIndex=0;u=i.exec(l);)var h=u.index;c=c.slice(0,void 0===h?s:h)}}else if(t.indexOf(Qr(i),s)!=s){var f=c.lastIndexOf(i);f>-1&&(c=c.slice(0,f))}return c+r},Pn.unescape=function(t){return(t=cs(t))&&N.test(t)?t.replace(j,Je):t},Pn.uniqueId=function(t){var e=++St;return cs(t)+e},Pn.upperCase=Fs,Pn.upperFirst=Bs,Pn.each=ca,Pn.eachRight=ua,Pn.first=jo,$s(Pn,(hc={},ur(Pn,(function(t,e){Mt.call(Pn.prototype,e)||(hc[e]=t)})),hc),{chain:!1}),Pn.VERSION="4.17.21",se(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Pn[t].placeholder=Pn})),se(["drop","take"],(function(t,e){kn.prototype[t]=function(n){n=void 0===n?1:sn(is(n),0);var r=this.__filtered__&&!e?new kn(this):this.clone();return r.__filtered__?r.__takeCount__=cn(n,r.__takeCount__):r.__views__.push({size:cn(n,4294967295),type:t+(r.__dir__<0?"Right":"")}),r},kn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),se(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;kn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:$i(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),se(["head","last"],(function(t,e){var n="take"+(e?"Right":"");kn.prototype[t]=function(){return this[n](1).value()[0]}})),se(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");kn.prototype[t]=function(){return this.__filtered__?new kn(this):this[n](1)}})),kn.prototype.compact=function(){return this.filter(qs)},kn.prototype.find=function(t){return this.filter(t).head()},kn.prototype.findLast=function(t){return this.reverse().find(t)},kn.prototype.invokeMap=Fr((function(t,e){return"function"==typeof t?new kn(this):this.map((function(n){return _r(n,t,e)}))})),kn.prototype.reject=function(t){return this.filter(Ta($i(t)))},kn.prototype.slice=function(t,e){t=is(t);var n=this;return n.__filtered__&&(t>0||e<0)?new kn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),void 0!==e&&(n=(e=is(e))<0?n.dropRight(-e):n.take(e-t)),n)},kn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},kn.prototype.toArray=function(){return this.take(4294967295)},ur(kn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=Pn[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);i&&(Pn.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,s=e instanceof kn,c=a[0],u=s||Ia(e),l=function(t){var e=i.apply(Pn,pe([t],a));return r&&h?e[0]:e};u&&n&&"function"==typeof c&&1!=c.length&&(s=u=!1);var h=this.__chain__,f=!!this.__actions__.length,d=o&&!h,p=s&&!f;if(!o&&u){e=p?e:new kn(this);var m=t.apply(e,a);return m.__actions__.push({func:ra,args:[l],thisArg:void 0}),new On(m,h)}return d&&p?t.apply(this,a):(m=this.thru(l),d?r?m.value()[0]:m.value():m)})})),se(["pop","push","shift","sort","splice","unshift"],(function(t){var e=yt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Pn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ia(i)?i:[],t)}return this[n]((function(n){return e.apply(Ia(n)?n:[],t)}))}})),ur(kn.prototype,(function(t,e){var n=Pn[e];if(n){var r=n.name+"";Mt.call(xn,r)||(xn[r]=[]),xn[r].push({name:e,func:n})}})),xn[Pi(void 0,2).name]=[{name:"wrapper",func:void 0}],kn.prototype.clone=function(){var t=new kn(this.__wrapped__);return t.__actions__=yi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=yi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=yi(this.__views__),t},kn.prototype.reverse=function(){if(this.__filtered__){var t=new kn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},kn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ia(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=cn(e,t+a);break;case"takeRight":t=sn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,u=r?s:a-1,l=this.__iteratees__,h=l.length,f=0,d=cn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return ri(t,this.__actions__);var p=[];t:for(;c--&&f<d;){for(var m=-1,g=t[u+=e];++m<h;){var v=l[m],y=v.iteratee,_=v.type,x=y(g);if(2==_)g=x;else if(!x){if(1==_)continue t;break t}}p[f++]=g}return p},Pn.prototype.at=ia,Pn.prototype.chain=function(){return na(this)},Pn.prototype.commit=function(){return new On(this.value(),this.__chain__)},Pn.prototype.next=function(){void 0===this.__values__&&(this.__values__=ns(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},Pn.prototype.plant=function(t){for(var e,n=this;n instanceof Rn;){var r=Po(n);r.__index__=0,r.__values__=void 0,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},Pn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof kn){var e=t;return this.__actions__.length&&(e=new kn(this)),(e=e.reverse()).__actions__.push({func:ra,args:[Vo],thisArg:void 0}),new On(e,this.__chain__)}return this.thru(Vo)},Pn.prototype.toJSON=Pn.prototype.valueOf=Pn.prototype.value=function(){return ri(this.__wrapped__,this.__actions__)},Pn.prototype.first=Pn.prototype.head,$t&&(Pn.prototype[$t]=function(){return this}),Pn}();qt._=Xe,void 0===(i=function(){return Xe}.call(e,n,e,r))||(r.exports=i)}).call(this)}).call(this,n(15),n(185)(t))},function(t,e,n){var r=n(18);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(27)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.storage=e.cookieStore=e.localStore=e.sessionStore=void 0;var r=u(n(80)),i=u(n(81)),o=u(n(82)),a=u(n(84)),s=u(n(83)),c=u(n(154));function u(t){return t&&t.__esModule?t:{default:t}}var l=r.default.createStore(a.default,c.default),h=r.default.createStore(o.default,c.default),f=r.default.createStore(s.default,c.default);e.sessionStore=l,e.localStore=h,e.cookieStore=f,e.storage=i.default},function(t,e,n){var r;
|
|
10
|
+
/*!
|
|
11
|
+
Copyright (c) 2018 Jed Watson.
|
|
12
|
+
Licensed under the MIT License (MIT), see
|
|
13
|
+
http://jedwatson.github.io/classnames
|
|
14
|
+
*/!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var o=typeof r;if("string"===o||"number"===o)t.push(r);else if(Array.isArray(r)){if(r.length){var a=i.apply(null,r);a&&t.push(a)}}else if("object"===o)if(r.toString===Object.prototype.toString)for(var s in r)n.call(r,s)&&r[s]&&t.push(s);else t.push(r.toString())}}return t.join(" ")}t.exports?(i.default=i,t.exports=i):void 0===(r=function(){return i}.apply(e,[]))||(t.exports=r)}()},function(t,e,n){var r=n(12),i=n(45);t.exports=n(8)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(7),i=n(115),o=n(116),a=Object.defineProperty;e.f=n(8)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){t.exports={}},function(t,e,n){(function(e){var n=Object.assign?Object.assign:function(t,e,n,r){for(var i=1;i<arguments.length;i++)s(Object(arguments[i]),(function(e,n){t[n]=e}));return t},r=function(){if(Object.create)return function(t,e,r,i){var o=a(arguments,1);return n.apply(this,[Object.create(t)].concat(o))};{function t(){}return function(e,r,i,o){var s=a(arguments,1);return t.prototype=e,n.apply(this,[new t].concat(s))}}}(),i=String.prototype.trim?function(t){return String.prototype.trim.call(t)}:function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},o="undefined"!=typeof window?window:e;function a(t,e){return Array.prototype.slice.call(t,e||0)}function s(t,e){c(t,(function(t,n){return e(t,n),!1}))}function c(t,e){if(u(t)){for(var n=0;n<t.length;n++)if(e(t[n],n))return t[n]}else for(var r in t)if(t.hasOwnProperty(r)&&e(t[r],r))return t[r]}function u(t){return null!=t&&"function"!=typeof t&&"number"==typeof t.length}t.exports={assign:n,create:r,trim:i,bind:function(t,e){return function(){return e.apply(t,Array.prototype.slice.call(arguments,0))}},slice:a,each:s,map:function(t,e){var n=u(t)?[]:{};return c(t,(function(t,r){return n[r]=e(t,r),!1})),n},pluck:c,isList:u,isFunction:function(t){return t&&"[object Function]"==={}.toString.call(t)},isObject:function(t){return t&&"[object Object]"==={}.toString.call(t)},Global:o}}).call(this,n(15))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBelongList=e.getRegionDataInfo=e.postConsumer=e.getByCuser=e.getUserInfo=e.refreshToken=e.getToken=void 0;var r=a(n(85)),i=n(9),o=a(n(178));function a(t){return t&&t.__esModule?t:{default:t}}var s="/iam/v1/sys/refresh/token",c="/iam/v1/sys/oauth/token",u="/iam/v1/sys/user/info",l="/iam/v1/sys/system/getByCuser",h="/iam/v1/sys/user/exchange/consumer",f="https://gateway-bmg-out.rockontrol.com/bmg/v1/apply/weather/{areaCode}",d="/iam/v1/sys/consumer/belongBySysList";e.getToken=function(t){return r.default.post(""+i.sessionStore.get("IAM_BASE_URL")+c,t)},e.refreshToken=function(t){return r.default.post(""+i.sessionStore.get("IAM_BASE_URL")+s,o.default.stringify(t),{"Content-Type":"application/x-www-form-urlencoded"})},e.getUserInfo=function(t,e){return r.default.get(""+i.sessionStore.get("IAM_BASE_URL")+u,t,e)},e.getByCuser=function(t){return r.default.get(""+sessionStorage.getItem("IAM_BASE_URL")+l,t)},e.postConsumer=function(t){return r.default.post(""+sessionStorage.getItem("IAM_BASE_URL")+h+"/"+t)},e.getRegionDataInfo=function(t){return r.default.get(f,t)},e.getBelongList=function(t){return r.default.get(""+sessionStorage.getItem("IAM_BASE_URL")+d,t)}},function(t,e,n){var r=n(26);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(155),o=(r=i)&&r.__esModule?r:{default:r};e.default=o.default||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(39);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(111),i=n(70);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(67),i=n(39);t.exports=function(t){return r(i(t))}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){"use strict";var r=n(129)(!0);n(71)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e,n){t.exports={default:n(187),__esModule:!0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=e.notFoundRouter=e.loadView=e.getUrlParam=e.hasOwn=void 0;var r=c(n(19)),i=c(n(189)),o=c(n(29)),a=c(n(192));e.mergeProps=function(){var t=[].slice.call(arguments,0),e={};return t.forEach((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!0,c=!1,u=void 0;try{for(var l,h=(0,o.default)((0,i.default)(t));!(n=(l=h.next()).done);n=!0){var f=l.value,d=(0,a.default)(f,2),p=d[0],m=d[1];e[p]=e[p]||{},(0,s.default)(m)?(0,r.default)(e[p],m):e[p]=m}}catch(t){c=!0,u=t}finally{try{!n&&h.return&&h.return()}finally{if(c)throw u}}})),e};var s=c(n(196));function c(t){return t&&t.__esModule?t:{default:t}}var u=Object.prototype,l=u.toString;e.hasOwn=u.hasOwnProperty,e.getUrlParam=function(t){var e=new RegExp("(^|&)"+t+"=([^&]*)(&|$)"),n=window.location.search.split("?")[1]?window.location.search.split("?")[1].match(e):null;return null!=n?decodeURI(n[2]):null},e.loadView=function(t,e,r){return function(r){n.e(1).then(function(){var i=[n(296)("./"+e+t+".vue")];r.apply(null,i)}.bind(this)).catch(n.oe)}},e.notFoundRouter={path:"*",redirect:"/404",hidden:!0};e.isFunction=function(t){return"[object Function]"===l.call(t)}},function(t,e,n){var r=n(32),i=n(198),o=n(199),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},function(t,e,n){var r=n(57).Symbol;t.exports=r},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"BlankLayout",render:function(){var t=arguments[0];return t("router-view")}}},function(t,e,n){var r=n(20),i=n(233),o=n(234),a=n(263);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:o(a(t))}},function(t,e,n){var r=n(63)(Object,"create");t.exports=r},function(t,e,n){var r=n(104);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(259);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(41),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(68)("keys"),i=n(69);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){t.exports=!0},function(t,e,n){var r=n(18),i=n(2).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(117),o=(r=i)&&r.__esModule?r:{default:r};e.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,o.default)(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}()},function(t,e,n){t.exports=n(125)},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(50),o=(r=i)&&r.__esModule?r:{default:r};e.default=function(t){return function(){var e=t.apply(this,arguments);return new o.default((function(t,n){return function r(i,a){try{var s=e[i](a),c=s.value}catch(t){return void n(t)}if(!s.done)return o.default.resolve(c).then((function(t){r("next",t)}),(function(t){r("throw",t)}));t(c)}("next")}))}}},function(t,e,n){t.exports={default:n(127),__esModule:!0}},function(t,e,n){var r=n(12).f,i=n(23),o=n(3)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){n(135);for(var r=n(2),i=n(11),o=n(13),a=n(3)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<s.length;c++){var u=s[c],l=r[u],h=l&&l.prototype;h&&!h[a]&&i(h,a,u),o[u]=o.Array}},function(t,e,n){var r=n(25),i=n(3)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(53),i=n(3)("iterator"),o=n(13);t.exports=n(0).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){"use strict";var r=n(26);function i(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new i(t)}},function(t,e,n){"use strict";(function(e){var r=n(1),i=n(165),o=n(91),a={"Content-Type":"application/x-www-form-urlencoded"};function s(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==e&&"[object process]"===Object.prototype.toString.call(e))&&(c=n(92)),c),transformRequest:[function(t,e){return i(e,"Accept"),i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(s(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)||e&&"application/json"===e["Content-Type"]?(s(e,"application/json"),function(t,e,n){if(r.isString(t))try{return(e||JSON.parse)(t),r.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional,n=e&&e.silentJSONParsing,i=e&&e.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(a){if("SyntaxError"===t.name)throw o(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(t){u.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){u.headers[t]=r.merge(a)})),t.exports=u}).call(this,n(90))},function(t,e,n){var r=n(197),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9),i=n(5),o=n(16),a=n(6);e.default={name:"AppLogo",props:{prefix:{type:String,default:"basic"},theme:{type:String,default:"light"}},computed:{currentConsumer:function(){return r.localStore.get("consumer")}},data:function(){return{currentInfo:{icon:void 0,name:void 0}}},mounted:function(){this.getByCuserInfo()},methods:{getByCuserInfo:function(){var t=this,e=r.sessionStore.get("CLIENT_ID");(0,o.getByCuser)().then((function(n){var i=(0,a.filter)(n.data,(function(t){return t.code===e}));i&&!(0,a.isEmpty)(i)&&(t.currentInfo=i[0],i&&i[0]&&i[0].name&&r.sessionStore.set("SYS_PROJECT_NAME",i[0].name))}))}},render:function(){var t=arguments[0],e=this.prefix,n=this.theme,r=i.prefixCls+"-logo";return t("div",{class:[r,r+"-"+e]},[t("div",{class:[r+"-"+e+"-inner",r+"-inner",r+"-"+n+"-inner"]},[t("img",{attrs:{src:this.currentInfo.icon?this.currentInfo.icon:"https://daqilianfangliankong.obs.cn-north-4.myhuaweicloud.com/IAM/1437955217135501312.png"}}),t("span",{class:[r+"-"+e+"-title",r+"-title"]},[this.currentInfo.name])])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(213),o=(r=i)&&r.__esModule?r:{default:r};e.default=new o.default},function(module,exports,__webpack_require__){(function(setImmediate){var e;e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}({0:function(t,e,n){t.exports=n("c7b2")},"0074":function(t,e,n){"use strict";var r=n("3e94"),i=n("6c01"),o=n("7e3c");t.exports=function(t,e,n){var a=r(e);a in t?i.f(t,a,o(0,n)):t[a]=n}},"03c2":function(t,e,n){var r=n("d45e");t.exports=r("document","documentElement")},"064b":function(t,e,n){var r=n("6446"),i=n("cbac"),o=n("c829"),a=n("7e3c"),s=n("097d"),c=n("3e94"),u=n("c7e7"),l=n("62ea"),h=Object.getOwnPropertyDescriptor;e.f=r?h:function(t,e){if(t=s(t),e=c(e),l)try{return h(t,e)}catch(t){}if(u(t,e))return a(!i(o.f,t,e),t[e])}},"081e":function(t,e){t.exports=function(t){return"function"==typeof t}},"097d":function(t,e,n){var r=n("96a5"),i=n("c39c");t.exports=function(t){return r(i(t))}},"0a7d":function(t,e,n){(e=n("a1a8")(!1)).push([t.i,'.sk-chase-box[data-v-c8c2036e]{width:100%;height:100%;position:relative}.sk-chase-core[data-v-c8c2036e]{position:absolute;left:0;top:0;right:0;bottom:0;z-index:1;display:flex;justify-content:center;align-items:center}.sk-chase[data-v-c8c2036e]{width:40px;height:40px;position:relative;-webkit-animation:sk-chase-data-v-c8c2036e 2.5s linear infinite both;animation:sk-chase-data-v-c8c2036e 2.5s linear infinite both}.sk-chase-dot[data-v-c8c2036e]{width:100%;height:100%;position:absolute;left:0;top:0;-webkit-animation:sk-chase-dot-data-v-c8c2036e 2s ease-in-out infinite both;animation:sk-chase-dot-data-v-c8c2036e 2s ease-in-out infinite both}.sk-chase-dot[data-v-c8c2036e]:before{content:"";display:block;width:25%;height:25%;background-color:#0f82ff;border-radius:100%;-webkit-animation:sk-chase-dot-before-data-v-c8c2036e 2s ease-in-out infinite both;animation:sk-chase-dot-before-data-v-c8c2036e 2s ease-in-out infinite both}.sk-chase-dot[data-v-c8c2036e]:first-child{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.sk-chase-dot[data-v-c8c2036e]:nth-child(2){-webkit-animation-delay:-1s;animation-delay:-1s}.sk-chase-dot[data-v-c8c2036e]:nth-child(3){-webkit-animation-delay:-.9s;animation-delay:-.9s}.sk-chase-dot[data-v-c8c2036e]:nth-child(4){-webkit-animation-delay:-.8s;animation-delay:-.8s}.sk-chase-dot[data-v-c8c2036e]:nth-child(5){-webkit-animation-delay:-.7s;animation-delay:-.7s}.sk-chase-dot[data-v-c8c2036e]:nth-child(6){-webkit-animation-delay:-.6s;animation-delay:-.6s}.sk-chase-dot[data-v-c8c2036e]:first-child:before{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.sk-chase-dot[data-v-c8c2036e]:nth-child(2):before{-webkit-animation-delay:-1s;animation-delay:-1s}.sk-chase-dot[data-v-c8c2036e]:nth-child(3):before{-webkit-animation-delay:-.9s;animation-delay:-.9s}.sk-chase-dot[data-v-c8c2036e]:nth-child(4):before{-webkit-animation-delay:-.8s;animation-delay:-.8s}.sk-chase-dot[data-v-c8c2036e]:nth-child(5):before{-webkit-animation-delay:-.7s;animation-delay:-.7s}.sk-chase-dot[data-v-c8c2036e]:nth-child(6):before{-webkit-animation-delay:-.6s;animation-delay:-.6s}@-webkit-keyframes sk-chase-data-v-c8c2036e{to{transform:rotate(340deg)}}@keyframes sk-chase-data-v-c8c2036e{to{transform:rotate(340deg)}}@-webkit-keyframes sk-chase-dot-data-v-c8c2036e{80%,to{transform:rotate(340deg)}}@keyframes sk-chase-dot-data-v-c8c2036e{80%,to{transform:rotate(340deg)}}@-webkit-keyframes sk-chase-dot-before-data-v-c8c2036e{50%{transform:scale(.4)}0%,to{transform:scale(1)}}@keyframes sk-chase-dot-before-data-v-c8c2036e{50%{transform:scale(.4)}0%,to{transform:scale(1)}}',""]),t.exports=e},"0b57":function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},"0b61":function(t,e,n){var r=n("c252"),i=0,o=Math.random(),a=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++i+o,36)}},"119b":function(t,e,n){var r=n("4748").match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},1262:function(t,e,n){var r=n("ca14"),i=n("3fa4"),o=n("081e"),a=n("cc43"),s=n("519f")("toStringTag"),c=r.Object,u="Arguments"==a(function(){return arguments}());t.exports=i?a:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=c(t),s))?n:u?a(e):"Object"==(r=a(e))&&o(e.callee)?"Arguments":r}},"13eb":function(t,e,n){var r=n("c252");t.exports=r([].slice)},1576:function(t,e,n){var r=n("3fa4"),i=n("7219"),o=n("cdf3");r||i(Object.prototype,"toString",o,{unsafe:!0})},1579:function(t,e,n){"use strict";var r=n("e1ca").forEach,i=n("1ccf"),o=n("4762"),a=n("8e6f"),s=n("4263"),c=n("b243"),u=n("de5a"),l=n("b0d6"),h=n("4bd3"),f=n("2986"),d=n("cae7");function p(t){return Array.isArray(t)||void 0!==t.length}function m(t){if(Array.isArray(t))return t;var e=[];return r(t,(function(t){e.push(t)})),e}function g(t){return t&&1===t.nodeType}function v(t,e,n){var r=t[e];return null!=r||void 0===n?r:n}t.exports=function(t){var e;if((t=t||{}).idHandler)e={get:function(e){return t.idHandler.get(e,!0)},set:t.idHandler.set};else{var n=a(),y=s({idGenerator:n,stateHandler:h});e=y}var _=t.reporter;_||(_=c(!1===_));var x=v(t,"batchProcessor",l({reporter:_})),b={};b.callOnAdd=!!v(t,"callOnAdd",!0),b.debug=!!v(t,"debug",!1);var w,M=o(e),S=i({stateHandler:h}),T=v(t,"strategy","object"),E=v(t,"important",!1),C={reporter:_,batchProcessor:x,stateHandler:h,idHandler:e,important:E};if("scroll"===T&&(u.isLegacyOpera()?(_.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),T="object"):u.isIE(9)&&(_.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),T="object")),"scroll"===T)w=d(C);else{if("object"!==T)throw new Error("Invalid strategy name: "+T);w=f(C)}var A={};return{listenTo:function(t,n,i){function o(t){var e=M.get(t);r(e,(function(e){e(t)}))}function a(t,e,n){M.add(e,n),t&&n(e)}if(i||(i=n,n=t,t={}),!n)throw new Error("At least one element required.");if(!i)throw new Error("Listener required.");if(g(n))n=[n];else{if(!p(n))return _.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=m(n)}var s=0,c=v(t,"callOnAdd",b.callOnAdd),u=v(t,"onReady",(function(){})),l=v(t,"debug",b.debug);r(n,(function(t){h.getState(t)||(h.initState(t),e.set(t));var f=e.get(t);if(l&&_.log("Attaching listener to element",f,t),!S.isDetectable(t))return l&&_.log(f,"Not detectable."),S.isBusy(t)?(l&&_.log(f,"System busy making it detectable"),a(c,t,i),A[f]=A[f]||[],void A[f].push((function(){++s===n.length&&u()}))):(l&&_.log(f,"Making detectable..."),S.markBusy(t,!0),w.makeDetectable({debug:l,important:E},t,(function(t){if(l&&_.log(f,"onElementDetectable"),h.getState(t)){S.markAsDetectable(t),S.markBusy(t,!1),w.addListener(t,o),a(c,t,i);var e=h.getState(t);if(e&&e.startSize){var d=t.offsetWidth,p=t.offsetHeight;e.startSize.width===d&&e.startSize.height===p||o(t)}A[f]&&r(A[f],(function(t){t()}))}else l&&_.log(f,"Element uninstalled before being detectable.");delete A[f],++s===n.length&&u()})));l&&_.log(f,"Already detecable, adding listener."),a(c,t,i),s++})),s===n.length&&u()},removeListener:M.removeListener,removeAllListeners:M.removeAllListeners,uninstall:function(t){if(!t)return _.error("At least one element is required.");if(g(t))t=[t];else{if(!p(t))return _.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");t=m(t)}r(t,(function(t){M.removeAllListeners(t),w.uninstall(t),h.cleanState(t)}))},initDocument:function(t){w.initDocument&&w.initDocument(t)}}}},1671:function(t,e,n){var r=n("93b0");r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals),(0,n("5925").default)("dcc90e9e",r,!0,{sourceMap:!1,shadowMode:!1})},"18aa":function(t,e,n){var r=n("ca14"),i=n("cbac"),o=n("081e"),a=n("9a02"),s=r.TypeError;t.exports=function(t,e){var n,r;if("string"===e&&o(n=t.toString)&&!a(r=i(n,t)))return r;if(o(n=t.valueOf)&&!a(r=i(n,t)))return r;if("string"!==e&&o(n=t.toString)&&!a(r=i(n,t)))return r;throw s("Can't convert object to primitive value")}},"18fd":function(t,e,n){var r=n("445a"),i=n("c7e7"),o=n("d42b"),a=n("6c01").f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||a(e,t,{value:o.f(t)})}},"190b":function(t,e,n){var r=n("1262"),i=n("1ffe"),o=n("db7f"),a=n("519f")("iterator");t.exports=function(t){if(null!=t)return i(t,a)||i(t,"@@iterator")||o[r(t)]}},"1a1d":function(t,e,n){"use strict";var r=n("961e"),i=n("ca14"),o=n("8e04"),a=n("6d9b"),s=n("9a02"),c=n("a10c"),u=n("28dc"),l=n("097d"),h=n("0074"),f=n("519f"),d=n("7ba8"),p=n("13eb"),m=d("slice"),g=f("species"),v=i.Array,y=Math.max;r({target:"Array",proto:!0,forced:!m},{slice:function(t,e){var n,r,i,f=l(this),d=u(f),m=c(t,d),_=c(void 0===e?d:e,d);if(o(f)&&(n=f.constructor,(a(n)&&(n===v||o(n.prototype))||s(n)&&null===(n=n[g]))&&(n=void 0),n===v||void 0===n))return p(f,m,_);for(r=new(void 0===n?v:n)(y(_-m,0)),i=0;m<_;m++,i++)m in f&&h(r,i,f[m]);return r.length=i,r}})},"1b49":function(t,e,n){var r=n("961e"),i=n("c814"),o=n("41a4"),a=n("f97a"),s=n("c813");r({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!s},{getPrototypeOf:function(t){return a(o(t))}})},"1cba":function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n("2409"))},"1ccf":function(t,e,n){"use strict";t.exports=function(t){var e=t.stateHandler.getState;return{isDetectable:function(t){var n=e(t);return n&&!!n.isDetectable},markAsDetectable:function(t){e(t).isDetectable=!0},isBusy:function(t){return!!e(t).busy},markBusy:function(t,n){e(t).busy=!!n}}}},"1e0a":function(t,e,n){"use strict";(t.exports={}).getOption=function(t,e,n){var r=t[e];return null!=r||void 0===n?r:n}},"1ffe":function(t,e,n){var r=n("b0c4");t.exports=function(t,e){var n=t[e];return null==n?void 0:r(n)}},"204a":function(t,e,n){var r=n("961e"),i=n("41a4"),o=n("5c75");r({target:"Object",stat:!0,forced:n("c814")((function(){o(1)}))},{keys:function(t){return o(i(t))}})},"21c5":function(t,e,n){"use strict";var r=n("cbac"),i=n("3b2d"),o=n("97d8"),a=n("f4b1"),s=n("54ab"),c=n("c39c"),u=n("1ffe"),l=n("bc8b"),h=n("a7fb");i("match",(function(t,e,n){return[function(e){var n=c(this),i=null==e?void 0:u(e,t);return i?r(i,e,n):new RegExp(e)[t](s(n))},function(t){var r=o(this),i=s(t),c=n(e,r,i);if(c.done)return c.value;if(!r.global)return h(r,i);var u=r.unicode;r.lastIndex=0;for(var f,d=[],p=0;null!==(f=h(r,i));){var m=s(f[0]);d[p]=m,""===m&&(r.lastIndex=l(i,a(r.lastIndex),u)),p++}return 0===p?null:d}]}))},2409:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},"265d":function(t,e,n){var r=n("6446"),i=n("c7e7"),o=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=i(o,"name"),c=s&&"something"===function(){}.name,u=s&&(!r||r&&a(o,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},2721:function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},"27d1":function(t,e,n){"use strict";function r(t,e,n){n=n||2;var r,o,s,c,u,l,f,d=e&&e.length,p=d?e[0]*n:t.length,m=i(t,0,p,n,!0),g=[];if(!m||m.next===m.prev)return g;if(d&&(m=h(t,e,m,n)),t.length>80*n){r=s=t[0],o=c=t[1];for(var v=n;v<p;v+=n)(u=t[v])<r&&(r=u),(l=t[v+1])<o&&(o=l),u>s&&(s=u),l>c&&(c=l);f=0!==(f=Math.max(s-r,c-o))?1/f:0}return a(m,g,n,r,o,f),g}function i(t,e,n,r,i){var o,a;if(i===P(t,e,n,r)>0)for(o=e;o<n;o+=r)a=E(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=E(o,t[o],t[o+1],a);return a&&x(a,a.next)&&(C(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!x(r,r.next)&&0!==_(r.prev,r,r.next))r=r.next;else{if(C(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function a(t,e,n,r,i,h,f){if(t){!f&&h&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=m(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,c,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<u&&(s++,r=r.nextZ);e++);for(c=u;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(t,r,i,h);for(var d,p,g=t;t.prev!==t.next;)if(d=t.prev,p=t.next,h?c(t,r,i,h):s(t))e.push(d.i/n),e.push(t.i/n),e.push(p.i/n),C(t),t=p.next,g=p.next;else if((t=p)===g){f?1===f?a(t=u(o(t),e,n),e,n,r,i,h,2):2===f&&l(t,e,n,r,i,h):a(o(t),e,n,r,i,h,1);break}}}function s(t){var e=t.prev,n=t,r=t.next;if(_(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(v(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&_(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function c(t,e,n,r){var i=t.prev,o=t,a=t.next;if(_(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=m(s,c,e,n,r),f=m(u,l,e,n,r),d=t.prevZ,p=t.nextZ;d&&d.z>=h&&p&&p.z<=f;){if(d!==t.prev&&d!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&_(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,p!==t.prev&&p!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&_(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&_(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;p&&p.z<=f;){if(p!==t.prev&&p!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&_(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function u(t,e,n){var r=t;do{var i=r.prev,a=r.next.next;!x(i,a)&&b(i,r,r.next,a)&&S(i,a)&&S(a,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(a.i/n),C(r),C(r.next),r=t=a),r=r.next}while(r!==t);return o(r)}function l(t,e,n,r,i,s){var c=t;do{for(var u=c.next.next;u!==c.prev;){if(c.i!==u.i&&y(c,u)){var l=T(c,u);return c=o(c,c.next),l=o(l,l.next),a(c,e,n,r,i,s),void a(l,e,n,r,i,s)}u=u.next}c=c.next}while(c!==t)}function h(t,e,n,r){var a,s,c,u=[];for(a=0,s=e.length;a<s;a++)(c=i(t,e[a]*r,a<s-1?e[a+1]*r:t.length,r,!1))===c.next&&(c.steiner=!0),u.push(g(c));for(u.sort(f),a=0;a<u.length;a++)n=o(n=d(u[a],n),n.next);return n}function f(t,e){return t.x-e.x}function d(t,e){var n=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n;var c,u=n,l=n.x,h=n.y,f=1/0;r=n;do{i>=r.x&&r.x>=l&&i!==r.x&&v(o<h?i:a,o,l,h,o<h?a:i,o,r.x,r.y)&&(c=Math.abs(o-r.y)/(i-r.x),S(r,t)&&(c<f||c===f&&(r.x>n.x||r.x===n.x&&p(n,r)))&&(n=r,f=c)),r=r.next}while(r!==u);return n}(t,e);if(!n)return e;var r=T(n,t),i=o(n,n.next);return o(r,r.next),e===n?i:e}function p(t,e){return _(t.prev,t,e.prev)<0&&_(e.next,t,t.next)<0}function m(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function g(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function v(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function y(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&b(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(S(t,e)&&S(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(_(t.prev,t,e.prev)||_(t,e.prev,e))||x(t,e)&&_(t.prev,t,t.next)>0&&_(e.prev,e,e.next)>0)}function _(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,n,r){var i=M(_(t,e,n)),o=M(_(t,e,r)),a=M(_(n,r,t)),s=M(_(n,r,e));return i!==o&&a!==s||!(0!==i||!w(t,n,e))||!(0!==o||!w(t,r,e))||!(0!==a||!w(n,t,r))||!(0!==s||!w(n,e,r))}function w(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function M(t){return t>0?1:t<0?-1:0}function S(t,e){return _(t.prev,t,t.next)<0?_(t,e,t.next)>=0&&_(t,t.prev,e)>=0:_(t,e,t.prev)<0||_(t,t.next,e)<0}function T(t,e){var n=new A(t.i,t.x,t.y),r=new A(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function E(t,e,n,r){var i=new A(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function C(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 A(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function P(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}t.exports=r,t.exports.default=r,r.deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,a=Math.abs(P(t,0,o,n));if(i)for(var s=0,c=e.length;s<c;s++){var u=e[s]*n,l=s<c-1?e[s+1]*n:t.length;a-=Math.abs(P(t,u,l,n))}var h=0;for(s=0;s<r.length;s+=3){var f=r[s]*n,d=r[s+1]*n,p=r[s+2]*n;h+=Math.abs((t[f]-t[p])*(t[d+1]-t[f+1])-(t[f]-t[d])*(t[p+1]-t[f+1]))}return 0===a&&0===h?0:Math.abs((h-a)/a)},r.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[i][o][a]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n}},"28dc":function(t,e,n){var r=n("f4b1");t.exports=function(t){return r(t.length)}},2946:function(t,e,n){var r=n("ca14"),i=n("081e"),o=r.String,a=r.TypeError;t.exports=function(t){if("object"==typeof t||i(t))return t;throw a("Can't set "+o(t)+" as a prototype")}},2986:function(t,e,n){"use strict";var r=n("de5a");t.exports=function(t){var e=(t=t||{}).reporter,n=t.batchProcessor,i=t.stateHandler.getState;if(!e)throw new Error("Missing required dependency: reporter.");function o(e){var n=t.important?" !important; ":"; ";return(e.join(n)+n).trim()}function a(t){return i(t).object}return{makeDetectable:function(t,a,s){s||(s=a,a=t,t=null),(t=t||{}).debug,r.isIE(8)?s(a):function(a,s){var c=o(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"]),u=!1,l=window.getComputedStyle(a),h=a.offsetWidth,f=a.offsetHeight;function d(){function n(){if("static"===l.position){a.style.setProperty("position","relative",t.important?"important":"");var n=function(e,n,r,i){var o=r[i];"auto"!==o&&"0"!==function(t){return t.replace(/[^-\d\.]/g,"")}(o)&&(e.warn("An element that is positioned static has style."+i+"="+o+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",n),n.style.setProperty(i,"0",t.important?"important":""))};n(e,a,l,"top"),n(e,a,l,"right"),n(e,a,l,"bottom"),n(e,a,l,"left")}}""!==l.position&&(n(),u=!0);var o=document.createElement("object");o.style.cssText=c,o.tabIndex=-1,o.type="text/html",o.setAttribute("aria-hidden","true"),o.onload=function(){u||n(),function t(e,n){if(!e.contentDocument){var r=i(e);return r.checkForObjectDocumentTimeoutId&&window.clearTimeout(r.checkForObjectDocumentTimeoutId),void(r.checkForObjectDocumentTimeoutId=setTimeout((function(){r.checkForObjectDocumentTimeoutId=0,t(e,n)}),100))}n(e.contentDocument)}(this,(function(t){s(a)}))},r.isIE()||(o.data="about:blank"),i(a)&&(a.appendChild(o),i(a).object=o,r.isIE()&&(o.data="about:blank"))}i(a).startSize={width:h,height:f},n?n.add(d):d()}(a,s)},addListener:function(t,e){function n(){e(t)}if(r.isIE(8))i(t).object={proxy:n},t.attachEvent("onresize",n);else{var o=a(t);if(!o)throw new Error("Element is not detectable by this strategy.");o.contentDocument.defaultView.addEventListener("resize",n)}},uninstall:function(t){if(i(t)){var e=a(t);e&&(r.isIE(8)?t.detachEvent("onresize",e.proxy):t.removeChild(e),i(t).checkForObjectDocumentTimeoutId&&window.clearTimeout(i(t).checkForObjectDocumentTimeoutId),delete i(t).object)}}}}},"29f7":function(t,e,n){var r=n("961e"),i=n("c814"),o=n("097d"),a=n("064b").f,s=n("6446"),c=i((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||c,sham:!s},{getOwnPropertyDescriptor:function(t,e){return a(o(t),e)}})},"29fd":function(t,e,n){var r=n("961e"),i=n("d45e"),o=n("61a6"),a=n("bd0a"),s=n("d7ed"),c=n("97d8"),u=n("9a02"),l=n("a30f"),h=n("c814"),f=i("Reflect","construct"),d=Object.prototype,p=[].push,m=h((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),g=!h((function(){f((function(){}))})),v=m||g;r({target:"Reflect",stat:!0,forced:v,sham:v},{construct:function(t,e){s(t),c(e);var n=arguments.length<3?t:s(arguments[2]);if(g&&!m)return f(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return o(p,r,e),new(o(a,t,r))}var i=n.prototype,h=l(u(i)?i:d),v=o(t,h,e);return u(v)?v:h}})},"2a67":function(t,e,n){var r=n("4748");t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},"2a97":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAYAAABSfLWiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDoxY2VjNGU4ZS1iOGY2LTliNGQtOTI4Ny00NDllN2M2NDNlOTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MkI4MDFBOTY3RTk2MTFFODhENTE4NERCOTYxNjg4MjUiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MkI4MDFBOTU3RTk2MTFFODhENTE4NERCOTYxNjg4MjUiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MWNlYzRlOGUtYjhmNi05YjRkLTkyODctNDQ5ZTdjNjQzZTk0IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjFjZWM0ZThlLWI4ZjYtOWI0ZC05Mjg3LTQ0OWU3YzY0M2U5NCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PmUmXhQAAADFSURBVHjaYshKSpK/fOnS1/9kgNOnTr1KT0+XZgCBmsrKsJcvX5JkwJUrV/7k5OTYMiCDCRMm9P/48YMoA27duvWvuLjYmwELYFy0aNERQgY8evTof111dSQDLhASEsK5a+fO57gMePHixf/6+voMBkIgLS1N7tKlSz/RDXj37t3/zvb2KgZiQWNjozvIVhj49OnT/97u7m4GUsH0qVPrvn///h+EJ0+YMJeBXLBkyZItM6dNW8tACbC3t2cBxRohdQABBgAt8yx0KlQQZgAAAABJRU5ErkJggg=="},"2aa5":function(t,e,n){var r=n("c252"),i=n("4799"),o=n("54ab"),a=n("c39c"),s=r("".charAt),c=r("".charCodeAt),u=r("".slice),l=function(t){return function(e,n){var r,l,h=o(a(e)),f=i(n),d=h.length;return f<0||f>=d?t?"":void 0:(r=c(h,f))<55296||r>56319||f+1===d||(l=c(h,f+1))<56320||l>57343?t?s(h,f):r:t?u(h,f,f+2):l-56320+(r-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},"2b26":function(t,e,n){var r=n("519f")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},"2ccb":function(t,e,n){var r=n("c4ae")("span").classList,i=r&&r.constructor&&r.constructor.prototype;t.exports=i===Object.prototype?void 0:i},"2d18":function(t,e,n){var r=n("9a1e"),i=Math.floor,o=function(t,e){var n=t.length,c=i(n/2);return n<8?a(t,e):s(t,o(r(t,0,c),e),o(r(t,c),e),e)},a=function(t,e){for(var n,r,i=t.length,o=1;o<i;){for(r=o,n=t[o];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==o++&&(t[r]=n)}return t},s=function(t,e,n,r){for(var i=e.length,o=n.length,a=0,s=0;a<i||s<o;)t[a+s]=a<i&&s<o?r(e[a],n[s])<=0?e[a++]:n[s++]:a<i?e[a++]:n[s++];return t};t.exports=o},"2ed2":function(t,e,n){var r=n("dc9b"),i=n("f227"),o=n("d92c"),a=Function.prototype,s=Object.prototype,c=a.toString,u=s.hasOwnProperty,l=c.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=u.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},3471:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAKCAYAAABSfLWiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0NTE4ZWRhOC03NjQ5LTNjNGUtYjYxZi0xNjVhZmQzNmJmMzciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MUJCN0UxQjY3RTk2MTFFOEFCNzVFRTYzMkFGMUE2MUIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MUJCN0UxQjU3RTk2MTFFOEFCNzVFRTYzMkFGMUE2MUIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NDUxOGVkYTgtNzY0OS0zYzRlLWI2MWYtMTY1YWZkMzZiZjM3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjQ1MThlZGE4LTc2NDktM2M0ZS1iNjFmLTE2NWFmZDM2YmYzNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pvm07Z8AAADSSURBVHjaYvj//z8DPswIBI6Ojiz41LAwEAAzpk1bw83Lyw5k+uBUhM+GyRMnzv3+/ft/EJ4+dWodLnU4Dejr6en+9OnTfxh48eLF/6amJneiDelsb6969+7df3Rw+fLln+np6XIEDWloaMgA2YoL7N6163lYWBgnTkPqa2oiHz169J8QWLx48RFQrGEYUlpa6n379u1//4kAP378+D9xwoR+FEPy8vJsr1y58uc/CeDly5f/66qrw8CGZGZmSp85ffrVfzLA5UuXvuakpMgDBBgAQbLv2dsvRWYAAAAASUVORK5CYII="},3492:function(t,e,n){var r=n("4748").match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},"34bc":function(t,e,n){var r=n("9153"),i=n("efd9");(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.2",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},"350f":function(t,e,n){var r=n("ca14");t.exports=function(t,e){var n=r.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}},3552:function(t,e){t.exports={name:"memoryStorage",read:function(t){return n[t]},write:function(t,e){n[t]=e},each:function(t){for(var e in n)n.hasOwnProperty(e)&&t(n[e],e)},remove:function(t){delete n[t]},clearAll:function(t){n={}}};var n={}},3708:function(t,e,n){var r=n("c814"),i=n("ca14").RegExp;t.exports=r((function(){var t=i(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},"3a40":function(t,e,n){(function(e){var n=Object.assign?Object.assign:function(t,e,n,r){for(var i=1;i<arguments.length;i++)s(Object(arguments[i]),(function(e,n){t[n]=e}));return t},r=function(){if(Object.create)return function(t,e,r,i){var o=a(arguments,1);return n.apply(this,[Object.create(t)].concat(o))};{function t(){}return function(e,r,i,o){var s=a(arguments,1);return t.prototype=e,n.apply(this,[new t].concat(s))}}}(),i=String.prototype.trim?function(t){return String.prototype.trim.call(t)}:function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},o="undefined"!=typeof window?window:e;function a(t,e){return Array.prototype.slice.call(t,e||0)}function s(t,e){c(t,(function(t,n){return e(t,n),!1}))}function c(t,e){if(u(t)){for(var n=0;n<t.length;n++)if(e(t[n],n))return t[n]}else for(var r in t)if(t.hasOwnProperty(r)&&e(t[r],r))return t[r]}function u(t){return null!=t&&"function"!=typeof t&&"number"==typeof t.length}t.exports={assign:n,create:r,trim:i,bind:function(t,e){return function(){return e.apply(t,Array.prototype.slice.call(arguments,0))}},slice:a,each:s,map:function(t,e){var n=u(t)?[]:{};return c(t,(function(t,r){return n[r]=e(t,r),!1})),n},pluck:c,isList:u,isFunction:function(t){return t&&"[object Function]"==={}.toString.call(t)},isObject:function(t){return t&&"[object Object]"==={}.toString.call(t)},Global:o}}).call(this,n("2409"))},"3ac5":function(t,e,n){var r=n("3a40").Global;t.exports={name:"oldIE-userDataStorage",write:function(t,e){if(!s){var n=u(t);a((function(t){t.setAttribute(n,e),t.save(i)}))}},read:function(t){if(!s){var e=u(t),n=null;return a((function(t){n=t.getAttribute(e)})),n}},each:function(t){a((function(e){for(var n=e.XMLDocument.documentElement.attributes,r=n.length-1;r>=0;r--){var i=n[r];t(e.getAttribute(i.name),i.name)}}))},remove:function(t){var e=u(t);a((function(t){t.removeAttribute(e),t.save(i)}))},clearAll:function(){a((function(t){var e=t.XMLDocument.documentElement.attributes;t.load(i);for(var n=e.length-1;n>=0;n--)t.removeAttribute(e[n].name);t.save(i)}))}};var i="storejs",o=r.document,a=function(){if(!o||!o.documentElement||!o.documentElement.addBehavior)return null;var t,e,n;try{(e=new ActiveXObject("htmlfile")).open(),e.write('<script>document.w=window<\/script><iframe src="/favicon.ico"></iframe>'),e.close(),t=e.w.frames[0].document,n=t.createElement("div")}catch(e){n=o.createElement("div"),t=o.body}return function(e){var r=[].slice.call(arguments,0);r.unshift(n),t.appendChild(n),n.addBehavior("#default#userData"),n.load(i),e.apply(this,r),t.removeChild(n)}}(),s=(r.navigator?r.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./),c=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function u(t){return t.replace(/^\d/,"___$&").replace(c,"___")}},"3b2d":function(t,e,n){"use strict";n("bb4d");var r=n("c252"),i=n("7219"),o=n("466a"),a=n("c814"),s=n("519f"),c=n("d3a9"),u=s("species"),l=RegExp.prototype;t.exports=function(t,e,n,h){var f=s(t),d=!a((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),p=d&&!a((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[f]=/./[f]),n.exec=function(){return e=!0,null},n[f](""),!e}));if(!d||!p||n){var m=r(/./[f]),g=e(f,""[t],(function(t,e,n,i,a){var s=r(t),c=e.exec;return c===o||c===l.exec?d&&!a?{done:!0,value:m(e,n,i)}:{done:!0,value:s(n,e,i)}:{done:!1}}));i(String.prototype,t,g[0]),i(l,f,g[1])}h&&c(l[f],"sham",!0)}},"3e94":function(t,e,n){var r=n("a434"),i=n("62b4");t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},"3fa4":function(t,e,n){var r={};r[n("519f")("toStringTag")]="z",t.exports="[object z]"===String(r)},"412f":function(t,e,n){"use strict";var r,i,o,a,s=n("961e"),c=n("9153"),u=n("ca14"),l=n("d45e"),h=n("cbac"),f=n("6326"),d=n("7219"),p=n("f0f8"),m=n("7464"),g=n("9207"),v=n("c60e"),y=n("b0c4"),_=n("081e"),x=n("9a02"),b=n("c3f4"),w=n("4f29"),M=n("44a8"),S=n("6566"),T=n("baf4"),E=n("675d").set,C=n("ebba"),A=n("5b0d"),P=n("350f"),L=n("8088"),R=n("f1d5"),O=n("e13b"),k=n("a3e2"),I=n("519f"),D=n("57c6"),j=n("801d"),z=n("a0a0"),N=I("species"),F="Promise",B=O.get,H=O.set,G=O.getterFor(F),U=f&&f.prototype,V=f,W=U,Z=u.TypeError,q=u.document,Y=u.process,J=L.f,X=J,$=!!(q&&q.createEvent&&u.dispatchEvent),Q=_(u.PromiseRejectionEvent),K="unhandledrejection",tt=!1,et=k(F,(function(){var t=w(V),e=t!==String(V);if(!e&&66===z)return!0;if(c&&!W.finally)return!0;if(z>=51&&/native code/.test(t))return!1;var n=new V((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[N]=r,!(tt=n.then((function(){}))instanceof r)||!e&&D&&!Q})),nt=et||!S((function(t){V.all(t).catch((function(){}))})),rt=function(t){var e;return!(!x(t)||!_(e=t.then))&&e},it=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;C((function(){for(var r=t.value,i=1==t.state,o=0;n.length>o;){var a,s,c,u=n[o++],l=i?u.ok:u.fail,f=u.resolve,d=u.reject,p=u.domain;try{l?(i||(2===t.rejection&&ct(t),t.rejection=1),!0===l?a=r:(p&&p.enter(),a=l(r),p&&(p.exit(),c=!0)),a===u.promise?d(Z("Promise-chain cycle")):(s=rt(a))?h(s,a,f,d):f(a)):d(r)}catch(t){p&&!c&&p.exit(),d(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&at(t)}))}},ot=function(t,e,n){var r,i;$?((r=q.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),u.dispatchEvent(r)):r={promise:e,reason:n},!Q&&(i=u["on"+t])?i(r):t===K&&P("Unhandled promise rejection",n)},at=function(t){h(E,u,(function(){var e,n=t.facade,r=t.value;if(st(t)&&(e=R((function(){j?Y.emit("unhandledRejection",r,n):ot(K,n,r)})),t.rejection=j||st(t)?2:1,e.error))throw e.value}))},st=function(t){return 1!==t.rejection&&!t.parent},ct=function(t){h(E,u,(function(){var e=t.facade;j?Y.emit("rejectionHandled",e):ot("rejectionhandled",e,t.value)}))},ut=function(t,e,n){return function(r){t(e,r,n)}},lt=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,it(t,!0))},ht=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw Z("Promise can't be resolved itself");var r=rt(e);r?C((function(){var n={done:!1};try{h(r,e,ut(ht,n,t),ut(lt,n,t))}catch(e){lt(n,e,t)}})):(t.value=e,t.state=1,it(t,!1))}catch(e){lt({done:!1},e,t)}}};if(et&&(W=(V=function(t){b(this,W),y(t),h(r,this);var e=B(this);try{t(ut(ht,e),ut(lt,e))}catch(t){lt(e,t)}}).prototype,(r=function(t){H(this,{type:F,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=p(W,{then:function(t,e){var n=G(this),r=n.reactions,i=J(T(this,V));return i.ok=!_(t)||t,i.fail=_(e)&&e,i.domain=j?Y.domain:void 0,n.parent=!0,r[r.length]=i,0!=n.state&&it(n,!1),i.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r,e=B(t);this.promise=t,this.resolve=ut(ht,e),this.reject=ut(lt,e)},L.f=J=function(t){return t===V||t===o?new i(t):X(t)},!c&&_(f)&&U!==Object.prototype)){a=U.then,tt||(d(U,"then",(function(t,e){var n=this;return new V((function(t,e){h(a,n,t,e)})).then(t,e)}),{unsafe:!0}),d(U,"catch",W.catch,{unsafe:!0}));try{delete U.constructor}catch(t){}m&&m(U,W)}s({global:!0,wrap:!0,forced:et},{Promise:V}),g(V,F,!1,!0),v(F),o=l(F),s({target:F,stat:!0,forced:et},{reject:function(t){var e=J(this);return h(e.reject,void 0,t),e.promise}}),s({target:F,stat:!0,forced:c||et},{resolve:function(t){return A(c&&this===o?V:this,t)}}),s({target:F,stat:!0,forced:nt},{all:function(t){var e=this,n=J(e),r=n.resolve,i=n.reject,o=R((function(){var n=y(e.resolve),o=[],a=0,s=1;M(t,(function(t){var c=a++,u=!1;s++,h(n,e,t).then((function(t){u||(u=!0,o[c]=t,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(t){var e=this,n=J(e),r=n.reject,i=R((function(){var i=y(e.resolve);M(t,(function(t){h(i,e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},"41a4":function(t,e,n){var r=n("ca14"),i=n("c39c"),o=r.Object;t.exports=function(t){return o(i(t))}},4263:function(t,e,n){"use strict";t.exports=function(t){var e=t.idGenerator,n=t.stateHandler.getState;return{get:function(t){var e=n(t);return e&&void 0!==e.id?e.id:null},set:function(t){var r=n(t);if(!r)throw new Error("setId required the element to have a resize detection state.");var i=e.generate();return r.id=i,i}}}},"433e":function(t,e,n){var r=n("dbce");t.exports=function(t,e){return new(r(t))(0===e?0:e)}},"445a":function(t,e,n){var r=n("ca14");t.exports=r},"44a8":function(t,e,n){var r=n("ca14"),i=n("ad0f"),o=n("cbac"),a=n("97d8"),s=n("82b8"),c=n("bfea"),u=n("28dc"),l=n("afdf"),h=n("a42a"),f=n("190b"),d=n("47fa"),p=r.TypeError,m=function(t,e){this.stopped=t,this.result=e},g=m.prototype;t.exports=function(t,e,n){var r,v,y,_,x,b,w,M=n&&n.that,S=!(!n||!n.AS_ENTRIES),T=!(!n||!n.IS_ITERATOR),E=!(!n||!n.INTERRUPTED),C=i(e,M),A=function(t){return r&&d(r,"normal",t),new m(!0,t)},P=function(t){return S?(a(t),E?C(t[0],t[1],A):C(t[0],t[1])):E?C(t,A):C(t)};if(T)r=t;else{if(!(v=f(t)))throw p(s(t)+" is not iterable");if(c(v)){for(y=0,_=u(t);_>y;y++)if((x=P(t[y]))&&l(g,x))return x;return new m(!1)}r=h(t,v)}for(b=r.next;!(w=o(b,r)).done;){try{x=P(w.value)}catch(t){d(r,"throw",t)}if("object"==typeof x&&x&&l(g,x))return x}return new m(!1)}},"466a":function(t,e,n){"use strict";var r=n("cbac"),i=n("c252"),o=n("54ab"),a=n("ab58"),s=n("54b9"),c=n("34bc"),u=n("a30f"),l=n("e13b").get,h=n("3708"),f=n("6346"),d=c("native-string-replace",String.prototype.replace),p=RegExp.prototype.exec,m=p,g=i("".charAt),v=i("".indexOf),y=i("".replace),_=i("".slice),x=function(){var t=/a/,e=/b*/g;return r(p,t,"a"),r(p,e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),b=s.BROKEN_CARET,w=void 0!==/()??/.exec("")[1];(x||w||b||h||f)&&(m=function(t){var e,n,i,s,c,h,f,M=this,S=l(M),T=o(t),E=S.raw;if(E)return E.lastIndex=M.lastIndex,e=r(m,E,T),M.lastIndex=E.lastIndex,e;var C=S.groups,A=b&&M.sticky,P=r(a,M),L=M.source,R=0,O=T;if(A&&(P=y(P,"y",""),-1===v(P,"g")&&(P+="g"),O=_(T,M.lastIndex),M.lastIndex>0&&(!M.multiline||M.multiline&&"\n"!==g(T,M.lastIndex-1))&&(L="(?: "+L+")",O=" "+O,R++),n=new RegExp("^(?:"+L+")",P)),w&&(n=new RegExp("^"+L+"$(?!\\s)",P)),x&&(i=M.lastIndex),s=r(p,A?n:M,O),A?s?(s.input=_(s.input,R),s[0]=_(s[0],R),s.index=M.lastIndex,M.lastIndex+=s[0].length):M.lastIndex=0:x&&s&&(M.lastIndex=M.global?s.index+s[0].length:i),w&&s&&s.length>1&&r(d,s[0],n,(function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(s[c]=void 0)})),s&&C)for(s.groups=h=u(null),c=0;c<C.length;c++)h[(f=C[c])[0]]=s[f[1]];return s}),t.exports=m},4704:function(t,e,n){var r=n("c252"),i=n("c7e7"),o=n("097d"),a=n("ee4f").indexOf,s=n("f448"),c=r([].push);t.exports=function(t,e){var n,r=o(t),u=0,l=[];for(n in r)!i(s,n)&&i(r,n)&&c(l,n);for(;e.length>u;)i(r,n=e[u++])&&(~a(l,n)||c(l,n));return l}},4748:function(t,e,n){var r=n("d45e");t.exports=r("navigator","userAgent")||""},4762:function(t,e,n){"use strict";t.exports=function(t){var e={};function n(n){var r=t.get(n);return void 0===r?[]:e[r]||[]}return{get:n,add:function(n,r){var i=t.get(n);e[i]||(e[i]=[]),e[i].push(r)},removeListener:function(t,e){for(var r=n(t),i=0,o=r.length;i<o;++i)if(r[i]===e){r.splice(i,1);break}},removeAllListeners:function(t){var e=n(t);e&&(e.length=0)}}}},4799:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){var e=+t;return e!=e||0===e?0:(e>0?r:n)(e)}},"47fa":function(t,e,n){var r=n("cbac"),i=n("97d8"),o=n("1ffe");t.exports=function(t,e,n){var a,s;i(t);try{if(!(a=o(t,"return"))){if("throw"===e)throw n;return n}a=r(a,t)}catch(t){s=!0,a=t}if("throw"===e)throw n;if(s)throw a;return i(a),n}},"4b1a":function(t,e,n){var r=n("d45e"),i=n("c252"),o=n("9cd9"),a=n("b2e9"),s=n("97d8"),c=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(s(t)),n=a.f;return n?c(e,n(t)):e}},"4bd3":function(t,e,n){"use strict";var r="_erd";function i(t){return t[r]}t.exports={initState:function(t){return t[r]={},i(t)},getState:i,cleanState:function(t){delete t[r]}}},"4ecc":function(t,e,n){"use strict";var r=n("961e"),i=n("d796").filter;r({target:"Array",proto:!0,forced:!n("7ba8")("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},"4f29":function(t,e,n){var r=n("c252"),i=n("081e"),o=n("efd9"),a=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return a(t)}),t.exports=o.inspectSource},"4fdb":function(t,e,n){var r=n("961e"),i=n("ca14"),o=n("9207");r({global:!0},{Reflect:{}}),o(i.Reflect,"Reflect",!0)},"519f":function(t,e,n){var r=n("ca14"),i=n("34bc"),o=n("c7e7"),a=n("0b61"),s=n("5ce1"),c=n("7b76"),u=i("wks"),l=r.Symbol,h=l&&l.for,f=c?l:l&&l.withoutSetter||a;t.exports=function(t){if(!o(u,t)||!s&&"string"!=typeof u[t]){var e="Symbol."+t;s&&o(l,t)?u[t]=l[t]:u[t]=c&&h?h(e):f(e)}return u[t]}},"53b8":function(t,e,n){var r=n("34bc"),i=n("0b61"),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5408:function(t,e,n){"use strict";var r=n("961e"),i=n("d796").map;r({target:"Array",proto:!0,forced:!n("7ba8")("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},"54ab":function(t,e,n){var r=n("ca14"),i=n("1262"),o=r.String;t.exports=function(t){if("Symbol"===i(t))throw TypeError("Cannot convert a Symbol value to a string");return o(t)}},"54b9":function(t,e,n){var r=n("c814"),i=n("ca14").RegExp,o=r((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),a=o||r((function(){return!i("a","y").sticky})),s=o||r((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:o}},"55c9":function(t,e,n){"use strict";var r=n("961e"),i=n("b6de");r({target:"String",proto:!0,forced:n("9db9")("sub")},{sub:function(){return i(this,"sub","","")}})},"570c":function(t,e,n){"use strict";var r=n("961e"),i=n("c252"),o=n("96c7"),a=n("c39c"),s=n("54ab"),c=n("2b26"),u=i("".indexOf);r({target:"String",proto:!0,forced:!c("includes")},{includes:function(t){return!!~u(s(a(this)),s(o(t)),arguments.length>1?arguments[1]:void 0)}})},"57c6":function(t,e){t.exports="object"==typeof window},5810:function(t,e,n){var r=n("0a7d");r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals),(0,n("5925").default)("d79e9d8e",r,!0,{sourceMap:!1,shadowMode:!1})},5925:function(t,e,n){"use strict";function r(t,e){for(var n=[],r={},i=0;i<e.length;i++){var o=e[i],a=o[0],s={id:t+":"+i,css:o[1],media:o[2],sourceMap:o[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}n.r(e),n.d(e,"default",(function(){return p}));var i="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},a=i&&(document.head||document.getElementsByTagName("head")[0]),s=null,c=0,u=!1,l=function(){},h=null,f="data-vue-ssr-id",d="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(t,e,n,i){u=n,h=i||{};var a=r(t,e);return m(a),function(e){for(var n=[],i=0;i<a.length;i++){var s=a[i],c=o[s.id];c.refs--,n.push(c)}for(e?m(a=r(t,e)):a=[],i=0;i<n.length;i++)if(0===(c=n[i]).refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete o[c.id]}}}function m(t){for(var e=0;e<t.length;e++){var n=t[e],r=o[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(v(n.parts[i]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(i=0;i<n.parts.length;i++)a.push(v(n.parts[i]));o[n.id]={id:n.id,refs:1,parts:a}}}}function g(){var t=document.createElement("style");return t.type="text/css",a.appendChild(t),t}function v(t){var e,n,r=document.querySelector("style["+f+'~="'+t.id+'"]');if(r){if(u)return l;r.parentNode.removeChild(r)}if(d){var i=c++;r=s||(s=g()),e=_.bind(null,r,i,!1),n=_.bind(null,r,i,!0)}else r=g(),e=x.bind(null,r),n=function(){r.parentNode.removeChild(r)};return e(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;e(t=r)}else n()}}var y=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}();function _(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=y(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function x(t,e){var n=e.css,r=e.media,i=e.sourceMap;if(r&&t.setAttribute("media",r),h.ssrId&&t.setAttribute(f,e.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}},"5b0d":function(t,e,n){var r=n("97d8"),i=n("9a02"),o=n("8088");t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},"5c75":function(t,e,n){var r=n("4704"),i=n("988d");t.exports=Object.keys||function(t){return r(t,i)}},"5cb9":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAKN2lDQ1BzUkdCIElFQzYxOTY2LTIuMQAAeJydlndUU9kWh8+9N71QkhCKlNBraFICSA29SJEuKjEJEErAkAAiNkRUcERRkaYIMijggKNDkbEiioUBUbHrBBlE1HFwFBuWSWStGd+8ee/Nm98f935rn73P3Wfvfda6AJD8gwXCTFgJgAyhWBTh58WIjYtnYAcBDPAAA2wA4HCzs0IW+EYCmQJ82IxsmRP4F726DiD5+yrTP4zBAP+flLlZIjEAUJiM5/L42VwZF8k4PVecJbdPyZi2NE3OMErOIlmCMlaTc/IsW3z2mWUPOfMyhDwZy3PO4mXw5Nwn4405Er6MkWAZF+cI+LkyviZjg3RJhkDGb+SxGXxONgAoktwu5nNTZGwtY5IoMoIt43kA4EjJX/DSL1jMzxPLD8XOzFouEiSniBkmXFOGjZMTi+HPz03ni8XMMA43jSPiMdiZGVkc4XIAZs/8WRR5bRmyIjvYODk4MG0tbb4o1H9d/JuS93aWXoR/7hlEH/jD9ld+mQ0AsKZltdn6h21pFQBd6wFQu/2HzWAvAIqyvnUOfXEeunxeUsTiLGcrq9zcXEsBn2spL+jv+p8Of0NffM9Svt3v5WF485M4knQxQ143bmZ6pkTEyM7icPkM5p+H+B8H/nUeFhH8JL6IL5RFRMumTCBMlrVbyBOIBZlChkD4n5r4D8P+pNm5lona+BHQllgCpSEaQH4eACgqESAJe2Qr0O99C8ZHA/nNi9GZmJ37z4L+fVe4TP7IFiR/jmNHRDK4ElHO7Jr8WgI0IABFQAPqQBvoAxPABLbAEbgAD+ADAkEoiARxYDHgghSQAUQgFxSAtaAYlIKtYCeoBnWgETSDNnAYdIFj4DQ4By6By2AE3AFSMA6egCnwCsxAEISFyBAVUod0IEPIHLKFWJAb5AMFQxFQHJQIJUNCSAIVQOugUqgcqobqoWboW+godBq6AA1Dt6BRaBL6FXoHIzAJpsFasBFsBbNgTzgIjoQXwcnwMjgfLoK3wJVwA3wQ7oRPw5fgEVgKP4GnEYAQETqiizARFsJGQpF4JAkRIauQEqQCaUDakB6kH7mKSJGnyFsUBkVFMVBMlAvKHxWF4qKWoVahNqOqUQdQnag+1FXUKGoK9RFNRmuizdHO6AB0LDoZnYsuRlegm9Ad6LPoEfQ4+hUGg6FjjDGOGH9MHCYVswKzGbMb0445hRnGjGGmsVisOtYc64oNxXKwYmwxtgp7EHsSewU7jn2DI+J0cLY4X1w8TogrxFXgWnAncFdwE7gZvBLeEO+MD8Xz8MvxZfhGfA9+CD+OnyEoE4wJroRIQiphLaGS0EY4S7hLeEEkEvWITsRwooC4hlhJPEQ8TxwlviVRSGYkNimBJCFtIe0nnSLdIr0gk8lGZA9yPFlM3kJuJp8h3ye/UaAqWCoEKPAUVivUKHQqXFF4pohXNFT0VFysmK9YoXhEcUjxqRJeyUiJrcRRWqVUo3RU6YbStDJV2UY5VDlDebNyi/IF5UcULMWI4kPhUYoo+yhnKGNUhKpPZVO51HXURupZ6jgNQzOmBdBSaaW0b2iDtCkVioqdSrRKnkqNynEVKR2hG9ED6On0Mvph+nX6O1UtVU9Vvuom1TbVK6qv1eaoeajx1UrU2tVG1N6pM9R91NPUt6l3qd/TQGmYaYRr5Grs0Tir8XQObY7LHO6ckjmH59zWhDXNNCM0V2ju0xzQnNbS1vLTytKq0jqj9VSbru2hnaq9Q/uE9qQOVcdNR6CzQ+ekzmOGCsOTkc6oZPQxpnQ1df11Jbr1uoO6M3rGelF6hXrtevf0Cfos/ST9Hfq9+lMGOgYhBgUGrQa3DfGGLMMUw12G/YavjYyNYow2GHUZPTJWMw4wzjduNb5rQjZxN1lm0mByzRRjyjJNM91tetkMNrM3SzGrMRsyh80dzAXmu82HLdAWThZCiwaLG0wS05OZw2xljlrSLYMtCy27LJ9ZGVjFW22z6rf6aG1vnW7daH3HhmITaFNo02Pzq62ZLde2xvbaXPJc37mr53bPfW5nbse322N3055qH2K/wb7X/oODo4PIoc1h0tHAMdGx1vEGi8YKY21mnXdCO3k5rXY65vTW2cFZ7HzY+RcXpkuaS4vLo3nG8/jzGueNueq5clzrXaVuDLdEt71uUnddd457g/sDD30PnkeTx4SnqWeq50HPZ17WXiKvDq/XbGf2SvYpb8Tbz7vEe9CH4hPlU+1z31fPN9m31XfKz95vhd8pf7R/kP82/xsBWgHcgOaAqUDHwJWBfUGkoAVB1UEPgs2CRcE9IXBIYMj2kLvzDecL53eFgtCA0O2h98KMw5aFfR+OCQ8Lrwl/GGETURDRv4C6YMmClgWvIr0iyyLvRJlESaJ6oxWjE6Kbo1/HeMeUx0hjrWJXxl6K04gTxHXHY+Oj45vipxf6LNy5cDzBPqE44foi40V5iy4s1licvvj4EsUlnCVHEtGJMYktie85oZwGzvTSgKW1S6e4bO4u7hOeB28Hb5Lvyi/nTyS5JpUnPUp2Td6ePJninlKR8lTAFlQLnqf6p9alvk4LTduf9ik9Jr09A5eRmHFUSBGmCfsytTPzMoezzLOKs6TLnJftXDYlChI1ZUPZi7K7xTTZz9SAxESyXjKa45ZTk/MmNzr3SJ5ynjBvYLnZ8k3LJ/J9879egVrBXdFboFuwtmB0pefK+lXQqqWrelfrry5aPb7Gb82BtYS1aWt/KLQuLC98uS5mXU+RVtGaorH1futbixWKRcU3NrhsqNuI2ijYOLhp7qaqTR9LeCUXS61LK0rfb+ZuvviVzVeVX33akrRlsMyhbM9WzFbh1uvb3LcdKFcuzy8f2x6yvXMHY0fJjpc7l+y8UGFXUbeLsEuyS1oZXNldZVC1tep9dUr1SI1XTXutZu2m2te7ebuv7PHY01anVVda926vYO/Ner/6zgajhop9mH05+x42Rjf2f836urlJo6m06cN+4X7pgYgDfc2Ozc0tmi1lrXCrpHXyYMLBy994f9Pdxmyrb6e3lx4ChySHHn+b+O31w0GHe4+wjrR9Z/hdbQe1o6QT6lzeOdWV0iXtjusePhp4tLfHpafje8vv9x/TPVZzXOV42QnCiaITn07mn5w+lXXq6enk02O9S3rvnIk9c60vvG/wbNDZ8+d8z53p9+w/ed71/LELzheOXmRd7LrkcKlzwH6g4wf7HzoGHQY7hxyHui87Xe4Znjd84or7ldNXva+euxZw7dLI/JHh61HXb95IuCG9ybv56Fb6ree3c27P3FlzF3235J7SvYr7mvcbfjT9sV3qID0+6j068GDBgztj3LEnP2X/9H686CH5YcWEzkTzI9tHxyZ9Jy8/Xvh4/EnWk5mnxT8r/1z7zOTZd794/DIwFTs1/lz0/NOvm1+ov9j/0u5l73TY9P1XGa9mXpe8UX9z4C3rbf+7mHcTM7nvse8rP5h+6PkY9PHup4xPn34D94Tz+49wZioAAAAJcEhZcwAACxIAAAsSAdLdfvwAAALeSURBVHicVZPNaxNBGMbfnZ3srmuakCZpGpNSWjDZYgqW3LzYgkir1kDBHPwHBA96UHrUkwdBT56KFPFv6KEWpBUMtBFaanuoVULSpMQkzUeTNNtssh/OmxrBuQ0zz/PM+76/oZZlAa7JSSIYhiKyvSgBDFiEuIhlOUyOa3CmWWsDNDmO03j+h7a/b3ZQQ/tCXQ87ZJ64QNdljudlKghuSZbdeqdTb6uqKBuGA3heVfVwjd1voAHtCy/xvM/kDJ8oi+6Z23PvBUGwsySLJ8Q6b7fr28nNV6WT4h67J5zrYQxsUHwqJqLw5vStR3fuzce7eheOsllo1Ovg9XpBURRPLBZ782F5+W1yK7Em83zn3FA0ijXiU5VI5MazxcUHkiRBOpOGcrkMzUYD7HY7DA0NwejoKO/xep8/efzod+HouGJxnEixOVhjbGHhRSAQ4Cy4aGClXOkZ+P1+CAaDgH11uVxk9u791x+XlqYl0xyg2FWv3389rCh8tVoFTB4cHISpqSnIHecgEolAu92GWq0GrVYLxsbGiNPtvlqpVDSK47CJ4khLVUkqlYKLxQEhHESuRSD5LQl6V4f+SJkRL0pSgOmyFOfITtRMJsPOLU5VVWg2z3rieDwOiUQCsrkcCDYbsAmAYRiWZZqnqKMIQPP0dDudTuuiKNq63W7vUig0AU6nE6LRKHQ6HSgWi6BpGk7AaDWbv1BHkZxGtZrP53J7V0ZGosyg193h4WHGBA9ejxfGx8fBNE3AnhTy+WSrXj9pc1yTInJIztbm18WZy7MrysSE7PF4YMDhAHYGoiSCz+eDs7MzODw4KO5sJ18SSlWWrFFkFZFDcjY+f5onAO/cbndIFIQeuoQQKJVKnS/r6z/XVleeMuaKqmHUKD3UKDKKqCFySM7G6urD/d3dkD8YnGMmAVbrQa1S2Slks98x8a/wgm10/2fAkENySoVCo1gqpf77VazG3lNZYv9X/QEJM4cEk5QMqQAAAABJRU5ErkJggg=="},"5ce1":function(t,e,n){var r=n("a0a0"),i=n("c814");t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},"5eb3":function(t,e,n){var r=n("3a40").Global;function i(){return r.localStorage}function o(t){return i().getItem(t)}t.exports={name:"localStorage",read:o,write:function(t,e){return i().setItem(t,e)},each:function(t){for(var e=i().length-1;e>=0;e--){var n=i().key(e);t(o(n),n)}},remove:function(t){return i().removeItem(t)},clearAll:function(){return i().clear()}}},"5ffc":function(t,e,n){n("961e")({target:"Reflect",stat:!0},{ownKeys:n("4b1a")})},"61a6":function(t,e){var n=Function.prototype,r=n.apply,i=n.bind,o=n.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?o.bind(r):function(){return o.apply(r,arguments)})},"622a":function(t,e,n){var r=n("961e"),i=n("ea06").entries;r({target:"Object",stat:!0},{entries:function(t){return i(t)}})},6266:function(t,e,n){(function(t){function n(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}e.resolve=function(){for(var e="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a=o>=0?arguments[o]:t.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,i="/"===a.charAt(0))}return(i?"/":"")+(e=n(r(e.split("/"),(function(t){return!!t})),!i).join("/"))||"."},e.normalize=function(t){var o=e.isAbsolute(t),a="/"===i(t,-1);return(t=n(r(t.split("/"),(function(t){return!!t})),!o).join("/"))||o||(t="."),t&&a&&(t+="/"),(o?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,n){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var i=r(t.split("/")),o=r(n.split("/")),a=Math.min(i.length,o.length),s=a,c=0;c<a;c++)if(i[c]!==o[c]){s=c;break}var u=[];for(c=s;c<i.length;c++)u.push("..");return(u=u.concat(o.slice(s))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,r=-1,i=!0,o=t.length-1;o>=1;--o)if(47===(e=t.charCodeAt(o))){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":t.slice(0,r)},e.basename=function(t,e){var n=function(t){"string"!=typeof t&&(t+="");var e,n=0,r=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){n=e+1;break}}else-1===r&&(i=!1,r=e+1);return-1===r?"":t.slice(n,r)}(t);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,n=0,r=-1,i=!0,o=0,a=t.length-1;a>=0;--a){var s=t.charCodeAt(a);if(47!==s)-1===r&&(i=!1,r=a+1),46===s?-1===e?e=a:1!==o&&(o=1):-1!==e&&(o=-1);else if(!i){n=a+1;break}}return-1===e||-1===r||0===o||1===o&&e===r-1&&e===n+1?"":t.slice(e,r)};var i="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,n("eef6"))},"62b4":function(t,e,n){var r=n("ca14"),i=n("d45e"),o=n("081e"),a=n("afdf"),s=n("7b76"),c=r.Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return o(e)&&a(e.prototype,c(t))}},"62ea":function(t,e,n){var r=n("6446"),i=n("c814"),o=n("c4ae");t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},6326:function(t,e,n){var r=n("ca14");t.exports=r.Promise},6346:function(t,e,n){var r=n("c814"),i=n("ca14").RegExp;t.exports=r((function(){var t=i("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},6446:function(t,e,n){var r=n("c814");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},6566:function(t,e,n){var r=n("519f")("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},6599:function(t,e,n){var r=n("97d8"),i=n("47fa");t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){i(t,"throw",e)}}},"66da":function(t,e){var n="expire_mixin";t.exports=function(){var t=this.createStore(this.storage,null,this._namespacePrefix+n);return{set:function(e,r,i,o){return this.hasNamespace(n)||t.set(r,o),e()},get:function(t,r){return this.hasNamespace(n)||e.call(this,r),t()},remove:function(e,r){return this.hasNamespace(n)||t.remove(r),e()},getExpiration:function(e,n){return t.get(n)},removeExpiredKeys:function(t){var n=[];this.each((function(t,e){n.push(e)}));for(var r=0;r<n.length;r++)e.call(this,n[r])}};function e(e){t.get(e,Number.MAX_VALUE)<=(new Date).getTime()&&(this.raw.remove(e),t.remove(e))}}},"675d":function(t,e,n){var r,i,o,a,s=n("ca14"),c=n("61a6"),u=n("ad0f"),l=n("081e"),h=n("c7e7"),f=n("c814"),d=n("03c2"),p=n("13eb"),m=n("c4ae"),g=n("2a67"),v=n("801d"),y=s.setImmediate,_=s.clearImmediate,x=s.process,b=s.Dispatch,w=s.Function,M=s.MessageChannel,S=s.String,T=0,E={},C="onreadystatechange";try{r=s.location}catch(t){}var A=function(t){if(h(E,t)){var e=E[t];delete E[t],e()}},P=function(t){return function(){A(t)}},L=function(t){A(t.data)},R=function(t){s.postMessage(S(t),r.protocol+"//"+r.host)};y&&_||(y=function(t){var e=p(arguments,1);return E[++T]=function(){c(l(t)?t:w(t),void 0,e)},i(T),T},_=function(t){delete E[t]},v?i=function(t){x.nextTick(P(t))}:b&&b.now?i=function(t){b.now(P(t))}:M&&!g?(a=(o=new M).port2,o.port1.onmessage=L,i=u(a.postMessage,a)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&r&&"file:"!==r.protocol&&!f(R)?(i=R,s.addEventListener("message",L,!1)):i=C in m("script")?function(t){d.appendChild(m("script"))[C]=function(){d.removeChild(this),A(t)}}:function(t){setTimeout(P(t),0)}),t.exports={set:y,clear:_}},"6c01":function(t,e,n){var r=n("ca14"),i=n("6446"),o=n("62ea"),a=n("97d8"),s=n("3e94"),c=r.TypeError,u=Object.defineProperty;e.f=i?u:function(t,e,n){if(a(t),e=s(e),a(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},"6d9b":function(t,e,n){var r=n("c252"),i=n("c814"),o=n("081e"),a=n("1262"),s=n("d45e"),c=n("4f29"),u=function(){},l=[],h=s("Reflect","construct"),f=/^\s*(?:class|function)\b/,d=r(f.exec),p=!f.exec(u),m=function(t){if(!o(t))return!1;try{return h(u,l,t),!0}catch(t){return!1}};t.exports=!h||i((function(){var t;return m(m.call)||!m(Object)||!m((function(){t=!0}))||t}))?function(t){if(!o(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return p||!!d(f,c(t))}:m},"6e68":function(t,e,n){"use strict";var r=n("097d"),i=n("9acd"),o=n("db7f"),a=n("e13b"),s=n("b45e"),c="Array Iterator",u=a.set,l=a.getterFor(c);t.exports=s(Array,"Array",(function(t,e){u(this,{type:c,target:r(t),index:0,kind:e})}),(function(){var t=l(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},"716d":function(t,e,n){var r=n("4748");t.exports=/web0s(?!.*chrome)/i.test(r)},7203:function(t,e,n){t.exports=n.p+"img/kedu.2adfe059.png"},7219:function(t,e,n){var r=n("ca14"),i=n("081e"),o=n("c7e7"),a=n("d3a9"),s=n("a2c2"),c=n("4f29"),u=n("e13b"),l=n("265d").CONFIGURABLE,h=u.get,f=u.enforce,d=String(String).split("String");(t.exports=function(t,e,n,c){var u,h=!!c&&!!c.unsafe,p=!!c&&!!c.enumerable,m=!!c&&!!c.noTargetGet,g=c&&void 0!==c.name?c.name:e;i(n)&&("Symbol("===String(g).slice(0,7)&&(g="["+String(g).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!o(n,"name")||l&&n.name!==g)&&a(n,"name",g),(u=f(n)).source||(u.source=d.join("string"==typeof g?g:""))),t!==r?(h?!m&&t[e]&&(p=!0):delete t[e],p?t[e]=n:a(t,e,n)):p?t[e]=n:s(e,n)})(Function.prototype,"toString",(function(){return i(this)&&h(this).source||c(this)}))},"72ae":function(t,e,n){n("18fd")("iterator")},7464:function(t,e,n){var r=n("c252"),i=n("97d8"),o=n("2946");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return i(n),o(r),e?t(n,r):n.__proto__=r,n}}():void 0)},"75a1":function(t,e,n){"use strict";var r=n("6446"),i=n("c252"),o=n("cbac"),a=n("c814"),s=n("5c75"),c=n("b2e9"),u=n("c829"),l=n("41a4"),h=n("96a5"),f=Object.assign,d=Object.defineProperty,p=i([].concat);t.exports=!f||a((function(){if(r&&1!==f({b:1},f(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach((function(t){e[t]=t})),7!=f({},t)[n]||s(f({},e)).join("")!=i}))?function(t,e){for(var n=l(t),i=arguments.length,a=1,f=c.f,d=u.f;i>a;)for(var m,g=h(arguments[a++]),v=f?p(s(g),f(g)):s(g),y=v.length,_=0;y>_;)m=v[_++],r&&!o(d,g,m)||(n[m]=g[m]);return n}:f},"79b5":function(t,e,n){var r=n("ca14"),i=n("081e"),o=n("4f29"),a=r.WeakMap;t.exports=i(a)&&/native code/.test(o(a))},"7a02":function(t,e,n){var r=n("9a02"),i=n("cc43"),o=n("519f")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},"7b76":function(t,e,n){var r=n("5ce1");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},"7ba8":function(t,e,n){var r=n("c814"),i=n("519f"),o=n("a0a0"),a=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"7c98":function(t,e,n){(function(t,r){var i;
|
|
15
|
+
/**
|
|
16
|
+
* @license
|
|
17
|
+
* Lodash <https://lodash.com/>
|
|
18
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
19
|
+
* Released under MIT license <https://lodash.com/license>
|
|
20
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
21
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
22
|
+
*/(function(){var o,a="Expected a function",s="__lodash_hash_undefined__",c="__lodash_placeholder__",u=16,l=32,h=64,f=128,d=256,p=1/0,m=9007199254740991,g=NaN,v=4294967295,y=[["ary",f],["bind",1],["bindKey",2],["curry",8],["curryRight",u],["flip",512],["partial",l],["partialRight",h],["rearg",d]],_="[object Arguments]",x="[object Array]",b="[object Boolean]",w="[object Date]",M="[object Error]",S="[object Function]",T="[object GeneratorFunction]",E="[object Map]",C="[object Number]",A="[object Object]",P="[object Promise]",L="[object RegExp]",R="[object Set]",O="[object String]",k="[object Symbol]",I="[object WeakMap]",D="[object ArrayBuffer]",j="[object DataView]",z="[object Float32Array]",N="[object Float64Array]",F="[object Int8Array]",B="[object Int16Array]",H="[object Int32Array]",G="[object Uint8Array]",U="[object Uint8ClampedArray]",V="[object Uint16Array]",W="[object Uint32Array]",Z=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,Y=/(__e\(.*?\)|\b__t\)) \+\n'';/g,J=/&(?:amp|lt|gt|quot|#39);/g,X=/[&<>"']/g,$=RegExp(J.source),Q=RegExp(X.source),K=/<%-([\s\S]+?)%>/g,tt=/<%([\s\S]+?)%>/g,et=/<%=([\s\S]+?)%>/g,nt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rt=/^\w*$/,it=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ot=/[\\^$.*+?()[\]{}|]/g,at=RegExp(ot.source),st=/^\s+/,ct=/\s/,ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,lt=/\{\n\/\* \[wrapped with (.+)\] \*/,ht=/,? & /,ft=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,dt=/[()=,{}\[\]\/\s]/,pt=/\\(\\)?/g,mt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gt=/\w*$/,vt=/^[-+]0x[0-9a-f]+$/i,yt=/^0b[01]+$/i,_t=/^\[object .+?Constructor\]$/,xt=/^0o[0-7]+$/i,bt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Mt=/($^)/,St=/['\n\r\u2028\u2029\\]/g,Tt="\\ud800-\\udfff",Et="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ct="\\u2700-\\u27bf",At="a-z\\xdf-\\xf6\\xf8-\\xff",Pt="A-Z\\xc0-\\xd6\\xd8-\\xde",Lt="\\ufe0e\\ufe0f",Rt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ot="['’]",kt="["+Tt+"]",It="["+Rt+"]",Dt="["+Et+"]",jt="\\d+",zt="["+Ct+"]",Nt="["+At+"]",Ft="[^"+Tt+Rt+jt+Ct+At+Pt+"]",Bt="\\ud83c[\\udffb-\\udfff]",Ht="[^"+Tt+"]",Gt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ut="[\\ud800-\\udbff][\\udc00-\\udfff]",Vt="["+Pt+"]",Wt="(?:"+Nt+"|"+Ft+")",Zt="(?:"+Vt+"|"+Ft+")",qt="(?:['’](?:d|ll|m|re|s|t|ve))?",Yt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Jt="(?:"+Dt+"|"+Bt+")?",Xt="["+Lt+"]?",$t=Xt+Jt+"(?:\\u200d(?:"+[Ht,Gt,Ut].join("|")+")"+Xt+Jt+")*",Qt="(?:"+[zt,Gt,Ut].join("|")+")"+$t,Kt="(?:"+[Ht+Dt+"?",Dt,Gt,Ut,kt].join("|")+")",te=RegExp(Ot,"g"),ee=RegExp(Dt,"g"),ne=RegExp(Bt+"(?="+Bt+")|"+Kt+$t,"g"),re=RegExp([Vt+"?"+Nt+"+"+qt+"(?="+[It,Vt,"$"].join("|")+")",Zt+"+"+Yt+"(?="+[It,Vt+Wt,"$"].join("|")+")",Vt+"?"+Wt+"+"+qt,Vt+"+"+Yt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jt,Qt].join("|"),"g"),ie=RegExp("[\\u200d"+Tt+Et+Lt+"]"),oe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ae=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],se=-1,ce={};ce[z]=ce[N]=ce[F]=ce[B]=ce[H]=ce[G]=ce[U]=ce[V]=ce[W]=!0,ce[_]=ce[x]=ce[D]=ce[b]=ce[j]=ce[w]=ce[M]=ce[S]=ce[E]=ce[C]=ce[A]=ce[L]=ce[R]=ce[O]=ce[I]=!1;var ue={};ue[_]=ue[x]=ue[D]=ue[j]=ue[b]=ue[w]=ue[z]=ue[N]=ue[F]=ue[B]=ue[H]=ue[E]=ue[C]=ue[A]=ue[L]=ue[R]=ue[O]=ue[k]=ue[G]=ue[U]=ue[V]=ue[W]=!0,ue[M]=ue[S]=ue[I]=!1;var le={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},he=parseFloat,fe=parseInt,de="object"==typeof t&&t&&t.Object===Object&&t,pe="object"==typeof self&&self&&self.Object===Object&&self,me=de||pe||Function("return this")(),ge=e&&!e.nodeType&&e,ve=ge&&"object"==typeof r&&r&&!r.nodeType&&r,ye=ve&&ve.exports===ge,_e=ye&&de.process,xe=function(){try{return ve&&ve.require&&ve.require("util").types||_e&&_e.binding&&_e.binding("util")}catch(t){}}(),be=xe&&xe.isArrayBuffer,we=xe&&xe.isDate,Me=xe&&xe.isMap,Se=xe&&xe.isRegExp,Te=xe&&xe.isSet,Ee=xe&&xe.isTypedArray;function Ce(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ae(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function Pe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Le(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Re(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Oe(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function ke(t,e){return!(null==t||!t.length)&&Ve(t,e,0)>-1}function Ie(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function De(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function je(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function ze(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function Ne(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Fe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Be=Ye("length");function He(t){return t.match(ft)||[]}function Ge(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function Ue(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Ve(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):Ue(t,Ze,n)}function We(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function Ze(t){return t!=t}function qe(t,e){var n=null==t?0:t.length;return n?$e(t,e)/n:g}function Ye(t){return function(e){return null==e?o:e[t]}}function Je(t){return function(e){return null==t?o:t[e]}}function Xe(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function $e(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function Qe(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ke(t){return t?t.slice(0,yn(t)+1).replace(st,""):t}function tn(t){return function(e){return t(e)}}function en(t,e){return De(e,(function(e){return t[e]}))}function nn(t,e){return t.has(e)}function rn(t,e){for(var n=-1,r=t.length;++n<r&&Ve(e,t[n],0)>-1;);return n}function on(t,e){for(var n=t.length;n--&&Ve(e,t[n],0)>-1;);return n}function an(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var sn=Je({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),cn=Je({"&":"&","<":"<",">":">",'"':""","'":"'"});function un(t){return"\\"+le[t]}function ln(t){return ie.test(t)}function hn(t){return oe.test(t)}function fn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function dn(t,e){return function(n){return t(e(n))}}function pn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==c||(t[n]=c,o[i++]=n)}return o}function mn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function gn(t){return ln(t)?function(t){for(var e=ne.lastIndex=0;ne.test(t);)++e;return e}(t):Be(t)}function vn(t){return ln(t)?function(t){return t.match(ne)||[]}(t):function(t){return t.split("")}(t)}function yn(t){for(var e=t.length;e--&&ct.test(t.charAt(e)););return e}var _n=Je({"&":"&","<":"<",">":">",""":'"',"'":"'"});function xn(t){return t.match(re)||[]}var bn=function t(e){var n=(e=null==e?me:bn.defaults(me.Object(),e,bn.pick(me,ae))).Array,r=e.Date,i=e.Error,ct=e.Function,ft=e.Math,Tt=e.Object,Et=e.RegExp,Ct=e.String,At=e.TypeError,Pt=n.prototype,Lt=ct.prototype,Rt=Tt.prototype,Ot=e["__core-js_shared__"],kt=Lt.toString,It=Rt.hasOwnProperty,Dt=0,jt=function(){var t=/[^.]+$/.exec(Ot&&Ot.keys&&Ot.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),zt=Rt.toString,Nt=kt.call(Tt),Ft=me._,Bt=Et("^"+kt.call(It).replace(ot,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ht=ye?e.Buffer:o,Gt=e.Symbol,Ut=e.Uint8Array,Vt=Ht?Ht.allocUnsafe:o,Wt=dn(Tt.getPrototypeOf,Tt),Zt=Tt.create,qt=Rt.propertyIsEnumerable,Yt=Pt.splice,Jt=Gt?Gt.isConcatSpreadable:o,Xt=Gt?Gt.iterator:o,$t=Gt?Gt.toStringTag:o,Qt=function(){try{var t=go(Tt,"defineProperty");return t({},"",{}),t}catch(t){}}(),Kt=e.clearTimeout!==me.clearTimeout&&e.clearTimeout,ne=r&&r.now!==me.Date.now&&r.now,re=e.setTimeout!==me.setTimeout&&e.setTimeout,ie=ft.ceil,oe=ft.floor,le=Tt.getOwnPropertySymbols,de=Ht?Ht.isBuffer:o,pe=e.isFinite,ge=Pt.join,ve=dn(Tt.keys,Tt),_e=ft.max,xe=ft.min,Be=r.now,Je=e.parseInt,wn=ft.random,Mn=Pt.reverse,Sn=go(e,"DataView"),Tn=go(e,"Map"),En=go(e,"Promise"),Cn=go(e,"Set"),An=go(e,"WeakMap"),Pn=go(Tt,"create"),Ln=An&&new An,Rn={},On=Vo(Sn),kn=Vo(Tn),In=Vo(En),Dn=Vo(Cn),jn=Vo(An),zn=Gt?Gt.prototype:o,Nn=zn?zn.valueOf:o,Fn=zn?zn.toString:o;function Bn(t){if(ss(t)&&!Xa(t)&&!(t instanceof Vn)){if(t instanceof Un)return t;if(It.call(t,"__wrapped__"))return Wo(t)}return new Un(t)}var Hn=function(){function t(){}return function(e){if(!as(e))return{};if(Zt)return Zt(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function Gn(){}function Un(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function Vn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function Wn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Zn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function qn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Yn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new qn;++e<n;)this.add(t[e])}function Jn(t){var e=this.__data__=new Zn(t);this.size=e.size}function Xn(t,e){var n=Xa(t),r=!n&&Ja(t),i=!n&&!r&&ts(t),o=!n&&!r&&!i&&ms(t),a=n||r||i||o,s=a?Qe(t.length,Ct):[],c=s.length;for(var u in t)!e&&!It.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Mo(u,c))||s.push(u);return s}function $n(t){var e=t.length;return e?t[Yr(0,e-1)]:o}function Qn(t,e){return Ho(Li(t),sr(e,0,t.length))}function Kn(t){return Ho(Li(t))}function tr(t,e,n){(n!==o&&!Za(t[e],n)||n===o&&!(e in t))&&or(t,e,n)}function er(t,e,n){var r=t[e];It.call(t,e)&&Za(r,n)&&(n!==o||e in t)||or(t,e,n)}function nr(t,e){for(var n=t.length;n--;)if(Za(t[n][0],e))return n;return-1}function rr(t,e,n,r){return fr(t,(function(t,i,o){e(r,t,n(t),o)})),r}function ir(t,e){return t&&Ri(e,zs(e),t)}function or(t,e,n){"__proto__"==e&&Qt?Qt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ar(t,e){for(var r=-1,i=e.length,a=n(i),s=null==t;++r<i;)a[r]=s?o:Os(t,e[r]);return a}function sr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function cr(t,e,n,r,i,a){var s,c=1&e,u=2&e,l=4&e;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!as(t))return t;var h=Xa(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&It.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!c)return Li(t,s)}else{var f=_o(t),d=f==S||f==T;if(ts(t))return Si(t,c);if(f==A||f==_||d&&!i){if(s=u||d?{}:bo(t),!c)return u?function(t,e){return Ri(t,yo(t),e)}(t,function(t,e){return t&&Ri(e,Ns(e),t)}(s,t)):function(t,e){return Ri(t,vo(t),e)}(t,ir(s,t))}else{if(!ue[f])return i?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case D:return Ti(t);case b:case w:return new r(+t);case j:return function(t,e){var n=e?Ti(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case z:case N:case F:case B:case H:case G:case U:case V:case W:return Ei(t,n);case E:return new r;case C:case O:return new r(t);case L:return function(t){var e=new t.constructor(t.source,gt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case R:return new r;case k:return function(t){return Nn?Tt(Nn.call(t)):{}}(t)}}(t,f,c)}}a||(a=new Jn);var p=a.get(t);if(p)return p;a.set(t,s),fs(t)?t.forEach((function(r){s.add(cr(r,e,n,r,t,a))})):cs(t)&&t.forEach((function(r,i){s.set(i,cr(r,e,n,i,t,a))}));var m=h?o:(l?u?co:so:u?Ns:zs)(t);return Pe(m||t,(function(r,i){m&&(r=t[i=r]),er(s,i,cr(r,e,n,i,t,a))})),s}function ur(t,e,n){var r=n.length;if(null==t)return!r;for(t=Tt(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function lr(t,e,n){if("function"!=typeof t)throw new At(a);return zo((function(){t.apply(o,n)}),e)}function hr(t,e,n,r){var i=-1,o=ke,a=!0,s=t.length,c=[],u=e.length;if(!s)return c;n&&(e=De(e,tn(n))),r?(o=Ie,a=!1):e.length>=200&&(o=nn,a=!1,e=new Yn(e));t:for(;++i<s;){var l=t[i],h=null==n?l:n(l);if(l=r||0!==l?l:0,a&&h==h){for(var f=u;f--;)if(e[f]===h)continue t;c.push(l)}else o(e,h,r)||c.push(l)}return c}Bn.templateSettings={escape:K,evaluate:tt,interpolate:et,variable:"",imports:{_:Bn}},Bn.prototype=Gn.prototype,Bn.prototype.constructor=Bn,Un.prototype=Hn(Gn.prototype),Un.prototype.constructor=Un,Vn.prototype=Hn(Gn.prototype),Vn.prototype.constructor=Vn,Wn.prototype.clear=function(){this.__data__=Pn?Pn(null):{},this.size=0},Wn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Wn.prototype.get=function(t){var e=this.__data__;if(Pn){var n=e[t];return n===s?o:n}return It.call(e,t)?e[t]:o},Wn.prototype.has=function(t){var e=this.__data__;return Pn?e[t]!==o:It.call(e,t)},Wn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Pn&&e===o?s:e,this},Zn.prototype.clear=function(){this.__data__=[],this.size=0},Zn.prototype.delete=function(t){var e=this.__data__,n=nr(e,t);return!(n<0||(n==e.length-1?e.pop():Yt.call(e,n,1),--this.size,0))},Zn.prototype.get=function(t){var e=this.__data__,n=nr(e,t);return n<0?o:e[n][1]},Zn.prototype.has=function(t){return nr(this.__data__,t)>-1},Zn.prototype.set=function(t,e){var n=this.__data__,r=nr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(Tn||Zn),string:new Wn}},qn.prototype.delete=function(t){var e=po(this,t).delete(t);return this.size-=e?1:0,e},qn.prototype.get=function(t){return po(this,t).get(t)},qn.prototype.has=function(t){return po(this,t).has(t)},qn.prototype.set=function(t,e){var n=po(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(t){return this.__data__.set(t,s),this},Yn.prototype.has=function(t){return this.__data__.has(t)},Jn.prototype.clear=function(){this.__data__=new Zn,this.size=0},Jn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Jn.prototype.get=function(t){return this.__data__.get(t)},Jn.prototype.has=function(t){return this.__data__.has(t)},Jn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Zn){var r=n.__data__;if(!Tn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new qn(r)}return n.set(t,e),this.size=n.size,this};var fr=Ii(xr),dr=Ii(br,!0);function pr(t,e){var n=!0;return fr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function mr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(c===o?s==s&&!ps(s):n(s,c)))var c=s,u=a}return u}function gr(t,e){var n=[];return fr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function vr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=wo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?vr(s,e-1,n,r,i):je(i,s):r||(i[i.length]=s)}return i}var yr=Di(),_r=Di(!0);function xr(t,e){return t&&yr(t,e,zs)}function br(t,e){return t&&_r(t,e,zs)}function wr(t,e){return Oe(e,(function(e){return rs(t[e])}))}function Mr(t,e){for(var n=0,r=(e=xi(e,t)).length;null!=t&&n<r;)t=t[Uo(e[n++])];return n&&n==r?t:o}function Sr(t,e,n){var r=e(t);return Xa(t)?r:je(r,n(t))}function Tr(t){return null==t?t===o?"[object Undefined]":"[object Null]":$t&&$t in Tt(t)?function(t){var e=It.call(t,$t),n=t[$t];try{t[$t]=o;var r=!0}catch(t){}var i=zt.call(t);return r&&(e?t[$t]=n:delete t[$t]),i}(t):function(t){return zt.call(t)}(t)}function Er(t,e){return t>e}function Cr(t,e){return null!=t&&It.call(t,e)}function Ar(t,e){return null!=t&&e in Tt(t)}function Pr(t,e,r){for(var i=r?Ie:ke,a=t[0].length,s=t.length,c=s,u=n(s),l=1/0,h=[];c--;){var f=t[c];c&&e&&(f=De(f,tn(e))),l=xe(f.length,l),u[c]=!r&&(e||a>=120&&f.length>=120)?new Yn(c&&f):o}f=t[0];var d=-1,p=u[0];t:for(;++d<a&&h.length<l;){var m=f[d],g=e?e(m):m;if(m=r||0!==m?m:0,!(p?nn(p,g):i(h,g,r))){for(c=s;--c;){var v=u[c];if(!(v?nn(v,g):i(t[c],g,r)))continue t}p&&p.push(g),h.push(m)}}return h}function Lr(t,e,n){var r=null==(t=ko(t,e=xi(e,t)))?t:t[Uo(na(e))];return null==r?o:Ce(r,t,n)}function Rr(t){return ss(t)&&Tr(t)==_}function Or(t,e,n,r,i){return t===e||(null==t||null==e||!ss(t)&&!ss(e)?t!=t&&e!=e:function(t,e,n,r,i,o){var a=Xa(t),s=Xa(e),c=a?x:_o(t),u=s?x:_o(e),l=(c=c==_?A:c)==A,h=(u=u==_?A:u)==A,f=c==u;if(f&&ts(t)){if(!ts(e))return!1;a=!0,l=!1}if(f&&!l)return o||(o=new Jn),a||ms(t)?io(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case j:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case D:return!(t.byteLength!=e.byteLength||!o(new Ut(t),new Ut(e)));case b:case w:case C:return Za(+t,+e);case M:return t.name==e.name&&t.message==e.message;case L:case O:return t==e+"";case E:var s=fn;case R:var c=1&r;if(s||(s=mn),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=2,a.set(t,e);var l=io(s(t),s(e),r,i,o,a);return a.delete(t),l;case k:if(Nn)return Nn.call(t)==Nn.call(e)}return!1}(t,e,c,n,r,i,o);if(!(1&n)){var d=l&&It.call(t,"__wrapped__"),p=h&&It.call(e,"__wrapped__");if(d||p){var m=d?t.value():t,g=p?e.value():e;return o||(o=new Jn),i(m,g,n,r,o)}}return!!f&&(o||(o=new Jn),oo(t,e,n,r,i,o))}(t,e,n,r,Or,i))}function kr(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=Tt(t);i--;){var c=n[i];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<a;){var u=(c=n[i])[0],l=t[u],h=c[1];if(s&&c[2]){if(l===o&&!(u in t))return!1}else{var f=new Jn;if(r)var d=r(l,h,u,t,e,f);if(!(d===o?Or(h,l,3,r,f):d))return!1}}return!0}function Ir(t){return!(!as(t)||function(t){return!!jt&&jt in t}(t))&&(rs(t)?Bt:_t).test(Vo(t))}function Dr(t){return"function"==typeof t?t:null==t?uc:"object"==typeof t?Xa(t)?Hr(t[0],t[1]):Br(t):yc(t)}function jr(t){if(!Ao(t))return ve(t);var e=[];for(var n in Tt(t))It.call(t,n)&&"constructor"!=n&&e.push(n);return e}function zr(t){if(!as(t))return function(t){var e=[];if(null!=t)for(var n in Tt(t))e.push(n);return e}(t);var e=Ao(t),n=[];for(var r in t)("constructor"!=r||!e&&It.call(t,r))&&n.push(r);return n}function Nr(t,e){return t<e}function Fr(t,e){var r=-1,i=Qa(t)?n(t.length):[];return fr(t,(function(t,n,o){i[++r]=e(t,n,o)})),i}function Br(t){var e=mo(t);return 1==e.length&&e[0][2]?Lo(e[0][0],e[0][1]):function(n){return n===t||kr(n,t,e)}}function Hr(t,e){return To(t)&&Po(e)?Lo(Uo(t),e):function(n){var r=Os(n,t);return r===o&&r===e?ks(n,t):Or(e,r,3)}}function Gr(t,e,n,r,i){t!==e&&yr(e,(function(a,s){if(i||(i=new Jn),as(a))!function(t,e,n,r,i,a,s){var c=Do(t,n),u=Do(e,n),l=s.get(u);if(l)tr(t,n,l);else{var h=a?a(c,u,n+"",t,e,s):o,f=h===o;if(f){var d=Xa(u),p=!d&&ts(u),m=!d&&!p&&ms(u);h=u,d||p||m?Xa(c)?h=c:Ka(c)?h=Li(c):p?(f=!1,h=Si(u,!0)):m?(f=!1,h=Ei(u,!0)):h=[]:ls(u)||Ja(u)?(h=c,Ja(c)?h=Ms(c):as(c)&&!rs(c)||(h=bo(u))):f=!1}f&&(s.set(u,h),i(h,u,r,a,s),s.delete(u)),tr(t,n,h)}}(t,e,s,n,Gr,r,i);else{var c=r?r(Do(t,s),a,s+"",t,e,i):o;c===o&&(c=a),tr(t,s,c)}}),Ns)}function Ur(t,e){var n=t.length;if(n)return Mo(e+=e<0?n:0,n)?t[e]:o}function Vr(t,e,n){e=e.length?De(e,(function(t){return Xa(t)?function(e){return Mr(e,1===t.length?t[0]:t)}:t})):[uc];var r=-1;return e=De(e,tn(fo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(Fr(t,(function(t,n,i){return{criteria:De(e,(function(e){return e(t)})),index:++r,value:t}})),(function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var c=Ci(i[r],o[r]);if(c){if(r>=s)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)}))}function Wr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Mr(t,a);n(s,a)&&ti(o,xi(a,t),s)}return o}function Zr(t,e,n,r){var i=r?We:Ve,o=-1,a=e.length,s=t;for(t===e&&(e=Li(e)),n&&(s=De(t,tn(n)));++o<a;)for(var c=0,u=e[o],l=n?n(u):u;(c=i(s,l,c,r))>-1;)s!==t&&Yt.call(s,c,1),Yt.call(t,c,1);return t}function qr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;Mo(i)?Yt.call(t,i,1):fi(t,i)}}return t}function Yr(t,e){return t+oe(wn()*(e-t+1))}function Jr(t,e,r,i){for(var o=-1,a=_e(ie((e-t)/(r||1)),0),s=n(a);a--;)s[i?a:++o]=t,t+=r;return s}function Xr(t,e){var n="";if(!t||e<1||e>m)return n;do{e%2&&(n+=t),(e=oe(e/2))&&(t+=t)}while(e);return n}function $r(t,e){return No(Oo(t,e,uc),t+"")}function Qr(t){return $n(Zs(t))}function Kr(t,e){var n=Zs(t);return Ho(n,sr(e,0,n.length))}function ti(t,e,n,r){if(!as(t))return t;for(var i=-1,a=(e=xi(e,t)).length,s=a-1,c=t;null!=c&&++i<a;){var u=Uo(e[i]),l=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return t;if(i!=s){var h=c[u];(l=r?r(h,u,c):o)===o&&(l=as(h)?h:Mo(e[i+1])?[]:{})}er(c,u,l),c=c[u]}return t}var ei=Ln?function(t,e){return Ln.set(t,e),t}:uc,ni=Qt?function(t,e){return Qt(t,"toString",{configurable:!0,enumerable:!1,value:ac(e),writable:!0})}:uc;function ri(t){return Ho(Zs(t))}function ii(t,e,r){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var a=n(o);++i<o;)a[i]=t[i+e];return a}function oi(t,e){var n;return fr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function ai(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!ps(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return si(t,e,uc,n)}function si(t,e,n,r){var i=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(e=n(e))!=e,c=null===e,u=ps(e),l=e===o;i<a;){var h=oe((i+a)/2),f=n(t[h]),d=f!==o,p=null===f,m=f==f,g=ps(f);if(s)var v=r||m;else v=l?m&&(r||d):c?m&&d&&(r||!p):u?m&&d&&!p&&(r||!g):!p&&!g&&(r?f<=e:f<e);v?i=h+1:a=h}return xe(a,4294967294)}function ci(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!Za(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function ui(t){return"number"==typeof t?t:ps(t)?g:+t}function li(t){if("string"==typeof t)return t;if(Xa(t))return De(t,li)+"";if(ps(t))return Fn?Fn.call(t):"";var e=t+"";return"0"==e&&1/t==-p?"-0":e}function hi(t,e,n){var r=-1,i=ke,o=t.length,a=!0,s=[],c=s;if(n)a=!1,i=Ie;else if(o>=200){var u=e?null:Qi(t);if(u)return mn(u);a=!1,i=nn,c=new Yn}else c=e?[]:s;t:for(;++r<o;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,a&&h==h){for(var f=c.length;f--;)if(c[f]===h)continue t;e&&c.push(h),s.push(l)}else i(c,h,n)||(c!==s&&c.push(h),s.push(l))}return s}function fi(t,e){return null==(t=ko(t,e=xi(e,t)))||delete t[Uo(na(e))]}function di(t,e,n,r){return ti(t,e,n(Mr(t,e)),r)}function pi(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?ii(t,r?0:o,r?o+1:i):ii(t,r?o+1:0,r?i:o)}function mi(t,e){var n=t;return n instanceof Vn&&(n=n.value()),ze(e,(function(t,e){return e.func.apply(e.thisArg,je([t],e.args))}),n)}function gi(t,e,r){var i=t.length;if(i<2)return i?hi(t[0]):[];for(var o=-1,a=n(i);++o<i;)for(var s=t[o],c=-1;++c<i;)c!=o&&(a[o]=hr(a[o]||s,t[c],e,r));return hi(vr(a,1),e,r)}function vi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var c=r<a?e[r]:o;n(s,t[r],c)}return s}function yi(t){return Ka(t)?t:[]}function _i(t){return"function"==typeof t?t:uc}function xi(t,e){return Xa(t)?t:To(t,e)?[t]:Go(Ss(t))}var bi=$r;function wi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:ii(t,e,n)}var Mi=Kt||function(t){return me.clearTimeout(t)};function Si(t,e){if(e)return t.slice();var n=t.length,r=Vt?Vt(n):new t.constructor(n);return t.copy(r),r}function Ti(t){var e=new t.constructor(t.byteLength);return new Ut(e).set(new Ut(t)),e}function Ei(t,e){var n=e?Ti(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ci(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=ps(t),s=e!==o,c=null===e,u=e==e,l=ps(e);if(!c&&!l&&!a&&t>e||a&&s&&u&&!c&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||c&&n&&i||!s&&i||!u)return-1}return 0}function Ai(t,e,r,i){for(var o=-1,a=t.length,s=r.length,c=-1,u=e.length,l=_e(a-s,0),h=n(u+l),f=!i;++c<u;)h[c]=e[c];for(;++o<s;)(f||o<a)&&(h[r[o]]=t[o]);for(;l--;)h[c++]=t[o++];return h}function Pi(t,e,r,i){for(var o=-1,a=t.length,s=-1,c=r.length,u=-1,l=e.length,h=_e(a-c,0),f=n(h+l),d=!i;++o<h;)f[o]=t[o];for(var p=o;++u<l;)f[p+u]=e[u];for(;++s<c;)(d||o<a)&&(f[p+r[s]]=t[o++]);return f}function Li(t,e){var r=-1,i=t.length;for(e||(e=n(i));++r<i;)e[r]=t[r];return e}function Ri(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var c=e[a],u=r?r(n[c],t[c],c,n,t):o;u===o&&(u=t[c]),i?or(n,c,u):er(n,c,u)}return n}function Oi(t,e){return function(n,r){var i=Xa(n)?Ae:rr,o=e?e():{};return i(n,t,fo(r,2),o)}}function ki(t){return $r((function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&So(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=Tt(e);++r<i;){var c=n[r];c&&t(e,c,r,a)}return e}))}function Ii(t,e){return function(n,r){if(null==n)return n;if(!Qa(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Tt(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Di(t){return function(e,n,r){for(var i=-1,o=Tt(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(!1===n(o[c],c,o))break}return e}}function ji(t){return function(e){var n=ln(e=Ss(e))?vn(e):o,r=n?n[0]:e.charAt(0),i=n?wi(n,1).join(""):e.slice(1);return r[t]()+i}}function zi(t){return function(e){return ze(rc(Js(e).replace(te,"")),t,"")}}function Ni(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Hn(t.prototype),r=t.apply(n,e);return as(r)?r:n}}function Fi(t,e,r){var i=Ni(t);return function a(){for(var s=arguments.length,c=n(s),u=s,l=ho(a);u--;)c[u]=arguments[u];var h=s<3&&c[0]!==l&&c[s-1]!==l?[]:pn(c,l);if((s-=h.length)<r)return Xi(t,e,Gi,a.placeholder,o,c,h,o,o,r-s);var f=this&&this!==me&&this instanceof a?i:t;return Ce(f,this,c)}}function Bi(t){return function(e,n,r){var i=Tt(e);if(!Qa(e)){var a=fo(n,3);e=zs(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function Hi(t){return ao((function(e){var n=e.length,r=n,i=Un.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new At(a);if(i&&!c&&"wrapper"==lo(s))var c=new Un([],!0)}for(r=c?r:n;++r<n;){var u=lo(s=e[r]),l="wrapper"==u?uo(s):o;c=l&&Eo(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[lo(l[0])].apply(c,l[3]):1==s.length&&Eo(s)?c[u]():c.thru(s)}return function(){var t=arguments,r=t[0];if(c&&1==t.length&&Xa(r))return c.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}}))}function Gi(t,e,r,i,a,s,c,u,l,h){var d=e&f,p=1&e,m=2&e,g=24&e,v=512&e,y=m?o:Ni(t);return function o(){for(var f=arguments.length,_=n(f),x=f;x--;)_[x]=arguments[x];if(g)var b=ho(o),w=an(_,b);if(i&&(_=Ai(_,i,a,g)),s&&(_=Pi(_,s,c,g)),f-=w,g&&f<h){var M=pn(_,b);return Xi(t,e,Gi,o.placeholder,r,_,M,u,l,h-f)}var S=p?r:this,T=m?S[t]:t;return f=_.length,u?_=Io(_,u):v&&f>1&&_.reverse(),d&&l<f&&(_.length=l),this&&this!==me&&this instanceof o&&(T=y||Ni(T)),T.apply(S,_)}}function Ui(t,e){return function(n,r){return function(t,e,n,r){return xr(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Vi(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=li(n),r=li(r)):(n=ui(n),r=ui(r)),i=t(n,r)}return i}}function Wi(t){return ao((function(e){return e=De(e,tn(fo())),$r((function(n){var r=this;return t(e,(function(t){return Ce(t,r,n)}))}))}))}function Zi(t,e){var n=(e=e===o?" ":li(e)).length;if(n<2)return n?Xr(e,t):e;var r=Xr(e,ie(t/gn(e)));return ln(e)?wi(vn(r),0,t).join(""):r.slice(0,t)}function qi(t,e,r,i){var o=1&e,a=Ni(t);return function e(){for(var s=-1,c=arguments.length,u=-1,l=i.length,h=n(l+c),f=this&&this!==me&&this instanceof e?a:t;++u<l;)h[u]=i[u];for(;c--;)h[u++]=arguments[++s];return Ce(f,o?r:this,h)}}function Yi(t){return function(e,n,r){return r&&"number"!=typeof r&&So(e,n,r)&&(n=r=o),e=_s(e),n===o?(n=e,e=0):n=_s(n),Jr(e,n,r=r===o?e<n?1:-1:_s(r),t)}}function Ji(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ws(e),n=ws(n)),t(e,n)}}function Xi(t,e,n,r,i,a,s,c,u,f){var d=8&e;e|=d?l:h,4&(e&=~(d?h:l))||(e&=-4);var p=[t,e,i,d?a:o,d?s:o,d?o:a,d?o:s,c,u,f],m=n.apply(o,p);return Eo(t)&&jo(m,p),m.placeholder=r,Fo(m,t,e)}function $i(t){var e=ft[t];return function(t,n){if(t=ws(t),(n=null==n?0:xe(xs(n),292))&&pe(t)){var r=(Ss(t)+"e").split("e");return+((r=(Ss(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Qi=Cn&&1/mn(new Cn([,-0]))[1]==p?function(t){return new Cn(t)}:pc;function Ki(t){return function(e){var n=_o(e);return n==E?fn(e):n==R?function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}(e):function(t,e){return De(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function to(t,e,n,r,i,s,c,f){var d=2&e;if(!d&&"function"!=typeof t)throw new At(a);var p=r?r.length:0;if(p||(e&=-97,r=i=o),c=c===o?c:_e(xs(c),0),f=f===o?f:xs(f),p-=i?i.length:0,e&h){var m=r,g=i;r=i=o}var v=d?o:uo(t),y=[t,e,n,r,i,m,g,s,c,f];if(v&&Ro(y,v),t=y[0],e=y[1],n=y[2],r=y[3],i=y[4],!(f=y[9]=y[9]===o?d?0:t.length:_e(y[9]-p,0))&&24&e&&(e&=-25),e&&1!=e)_=8==e||e==u?Fi(t,e,f):e!=l&&33!=e||i.length?Gi.apply(o,y):qi(t,e,n,r);else var _=function(t,e,n){var r=1&e,i=Ni(t);return function e(){var o=this&&this!==me&&this instanceof e?i:t;return o.apply(r?n:this,arguments)}}(t,e,n);return Fo((v?ei:jo)(_,y),t,e)}function eo(t,e,n,r){return t===o||Za(t,Rt[n])&&!It.call(r,n)?e:t}function no(t,e,n,r,i,a){return as(t)&&as(e)&&(a.set(e,t),Gr(t,e,o,no,a),a.delete(e)),t}function ro(t){return ls(t)?o:t}function io(t,e,n,r,i,a){var s=1&n,c=t.length,u=e.length;if(c!=u&&!(s&&u>c))return!1;var l=a.get(t),h=a.get(e);if(l&&h)return l==e&&h==t;var f=-1,d=!0,p=2&n?new Yn:o;for(a.set(t,e),a.set(e,t);++f<c;){var m=t[f],g=e[f];if(r)var v=s?r(g,m,f,e,t,a):r(m,g,f,t,e,a);if(v!==o){if(v)continue;d=!1;break}if(p){if(!Fe(e,(function(t,e){if(!nn(p,e)&&(m===t||i(m,t,n,r,a)))return p.push(e)}))){d=!1;break}}else if(m!==g&&!i(m,g,n,r,a)){d=!1;break}}return a.delete(t),a.delete(e),d}function oo(t,e,n,r,i,a){var s=1&n,c=so(t),u=c.length;if(u!=so(e).length&&!s)return!1;for(var l=u;l--;){var h=c[l];if(!(s?h in e:It.call(e,h)))return!1}var f=a.get(t),d=a.get(e);if(f&&d)return f==e&&d==t;var p=!0;a.set(t,e),a.set(e,t);for(var m=s;++l<u;){var g=t[h=c[l]],v=e[h];if(r)var y=s?r(v,g,h,e,t,a):r(g,v,h,t,e,a);if(!(y===o?g===v||i(g,v,n,r,a):y)){p=!1;break}m||(m="constructor"==h)}if(p&&!m){var _=t.constructor,x=e.constructor;_==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x||(p=!1)}return a.delete(t),a.delete(e),p}function ao(t){return No(Oo(t,o,$o),t+"")}function so(t){return Sr(t,zs,vo)}function co(t){return Sr(t,Ns,yo)}var uo=Ln?function(t){return Ln.get(t)}:pc;function lo(t){for(var e=t.name+"",n=Rn[e],r=It.call(Rn,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function ho(t){return(It.call(Bn,"placeholder")?Bn:t).placeholder}function fo(){var t=Bn.iteratee||lc;return t=t===lc?Dr:t,arguments.length?t(arguments[0],arguments[1]):t}function po(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function mo(t){for(var e=zs(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Po(i)]}return e}function go(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return Ir(n)?n:o}var vo=le?function(t){return null==t?[]:(t=Tt(t),Oe(le(t),(function(e){return qt.call(t,e)})))}:bc,yo=le?function(t){for(var e=[];t;)je(e,vo(t)),t=Wt(t);return e}:bc,_o=Tr;function xo(t,e,n){for(var r=-1,i=(e=xi(e,t)).length,o=!1;++r<i;){var a=Uo(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&os(i)&&Mo(a,i)&&(Xa(t)||Ja(t))}function bo(t){return"function"!=typeof t.constructor||Ao(t)?{}:Hn(Wt(t))}function wo(t){return Xa(t)||Ja(t)||!!(Jt&&t&&t[Jt])}function Mo(t,e){var n=typeof t;return!!(e=null==e?m:e)&&("number"==n||"symbol"!=n&&bt.test(t))&&t>-1&&t%1==0&&t<e}function So(t,e,n){if(!as(n))return!1;var r=typeof e;return!!("number"==r?Qa(n)&&Mo(e,n.length):"string"==r&&e in n)&&Za(n[e],t)}function To(t,e){if(Xa(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!ps(t))||rt.test(t)||!nt.test(t)||null!=e&&t in Tt(e)}function Eo(t){var e=lo(t),n=Bn[e];if("function"!=typeof n||!(e in Vn.prototype))return!1;if(t===n)return!0;var r=uo(n);return!!r&&t===r[0]}(Sn&&_o(new Sn(new ArrayBuffer(1)))!=j||Tn&&_o(new Tn)!=E||En&&_o(En.resolve())!=P||Cn&&_o(new Cn)!=R||An&&_o(new An)!=I)&&(_o=function(t){var e=Tr(t),n=e==A?t.constructor:o,r=n?Vo(n):"";if(r)switch(r){case On:return j;case kn:return E;case In:return P;case Dn:return R;case jn:return I}return e});var Co=Ot?rs:wc;function Ao(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Rt)}function Po(t){return t==t&&!as(t)}function Lo(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in Tt(n))}}function Ro(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,a=r==f&&8==n||r==f&&n==d&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!a)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var s=e[3];if(s){var u=t[3];t[3]=u?Ai(u,s,e[4]):s,t[4]=u?pn(t[3],c):e[4]}return(s=e[5])&&(u=t[5],t[5]=u?Pi(u,s,e[6]):s,t[6]=u?pn(t[5],c):e[6]),(s=e[7])&&(t[7]=s),r&f&&(t[8]=null==t[8]?e[8]:xe(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function Oo(t,e,r){return e=_e(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=_e(i.length-e,0),s=n(a);++o<a;)s[o]=i[e+o];o=-1;for(var c=n(e+1);++o<e;)c[o]=i[o];return c[e]=r(s),Ce(t,this,c)}}function ko(t,e){return e.length<2?t:Mr(t,ii(e,0,-1))}function Io(t,e){for(var n=t.length,r=xe(e.length,n),i=Li(t);r--;){var a=e[r];t[r]=Mo(a,n)?i[a]:o}return t}function Do(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var jo=Bo(ei),zo=re||function(t,e){return me.setTimeout(t,e)},No=Bo(ni);function Fo(t,e,n){var r=e+"";return No(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ut,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Pe(y,(function(n){var r="_."+n[0];e&n[1]&&!ke(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(lt);return e?e[1].split(ht):[]}(r),n)))}function Bo(t){var e=0,n=0;return function(){var r=Be(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(o,arguments)}}function Ho(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=Yr(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var Go=function(t){var e=Ba(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(it,(function(t,n,r,i){e.push(r?i.replace(pt,"$1"):n||t)})),e}));function Uo(t){if("string"==typeof t||ps(t))return t;var e=t+"";return"0"==e&&1/t==-p?"-0":e}function Vo(t){if(null!=t){try{return kt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Wo(t){if(t instanceof Vn)return t.clone();var e=new Un(t.__wrapped__,t.__chain__);return e.__actions__=Li(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Zo=$r((function(t,e){return Ka(t)?hr(t,vr(e,1,Ka,!0)):[]})),qo=$r((function(t,e){var n=na(e);return Ka(n)&&(n=o),Ka(t)?hr(t,vr(e,1,Ka,!0),fo(n,2)):[]})),Yo=$r((function(t,e){var n=na(e);return Ka(n)&&(n=o),Ka(t)?hr(t,vr(e,1,Ka,!0),o,n):[]}));function Jo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:xs(n);return i<0&&(i=_e(r+i,0)),Ue(t,fo(e,3),i)}function Xo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=xs(n),i=n<0?_e(r+i,0):xe(i,r-1)),Ue(t,fo(e,3),i,!0)}function $o(t){return null!=t&&t.length?vr(t,1):[]}function Qo(t){return t&&t.length?t[0]:o}var Ko=$r((function(t){var e=De(t,yi);return e.length&&e[0]===t[0]?Pr(e):[]})),ta=$r((function(t){var e=na(t),n=De(t,yi);return e===na(n)?e=o:n.pop(),n.length&&n[0]===t[0]?Pr(n,fo(e,2)):[]})),ea=$r((function(t){var e=na(t),n=De(t,yi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?Pr(n,o,e):[]}));function na(t){var e=null==t?0:t.length;return e?t[e-1]:o}var ra=$r(ia);function ia(t,e){return t&&t.length&&e&&e.length?Zr(t,e):t}var oa=ao((function(t,e){var n=null==t?0:t.length,r=ar(t,e);return qr(t,De(e,(function(t){return Mo(t,n)?+t:t})).sort(Ci)),r}));function aa(t){return null==t?t:Mn.call(t)}var sa=$r((function(t){return hi(vr(t,1,Ka,!0))})),ca=$r((function(t){var e=na(t);return Ka(e)&&(e=o),hi(vr(t,1,Ka,!0),fo(e,2))})),ua=$r((function(t){var e=na(t);return e="function"==typeof e?e:o,hi(vr(t,1,Ka,!0),o,e)}));function la(t){if(!t||!t.length)return[];var e=0;return t=Oe(t,(function(t){if(Ka(t))return e=_e(t.length,e),!0})),Qe(e,(function(e){return De(t,Ye(e))}))}function ha(t,e){if(!t||!t.length)return[];var n=la(t);return null==e?n:De(n,(function(t){return Ce(e,o,t)}))}var fa=$r((function(t,e){return Ka(t)?hr(t,e):[]})),da=$r((function(t){return gi(Oe(t,Ka))})),pa=$r((function(t){var e=na(t);return Ka(e)&&(e=o),gi(Oe(t,Ka),fo(e,2))})),ma=$r((function(t){var e=na(t);return e="function"==typeof e?e:o,gi(Oe(t,Ka),o,e)})),ga=$r(la),va=$r((function(t){var e=t.length,n=e>1?t[e-1]:o;return n="function"==typeof n?(t.pop(),n):o,ha(t,n)}));function ya(t){var e=Bn(t);return e.__chain__=!0,e}function _a(t,e){return e(t)}var xa=ao((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return ar(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Vn&&Mo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:_a,args:[i],thisArg:o}),new Un(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(o),t}))):this.thru(i)})),ba=Oi((function(t,e,n){It.call(t,n)?++t[n]:or(t,n,1)})),wa=Bi(Jo),Ma=Bi(Xo);function Sa(t,e){return(Xa(t)?Pe:fr)(t,fo(e,3))}function Ta(t,e){return(Xa(t)?Le:dr)(t,fo(e,3))}var Ea=Oi((function(t,e,n){It.call(t,n)?t[n].push(e):or(t,n,[e])})),Ca=$r((function(t,e,r){var i=-1,o="function"==typeof e,a=Qa(t)?n(t.length):[];return fr(t,(function(t){a[++i]=o?Ce(e,t,r):Lr(t,e,r)})),a})),Aa=Oi((function(t,e,n){or(t,n,e)}));function Pa(t,e){return(Xa(t)?De:Fr)(t,fo(e,3))}var La=Oi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Ra=$r((function(t,e){if(null==t)return[];var n=e.length;return n>1&&So(t,e[0],e[1])?e=[]:n>2&&So(e[0],e[1],e[2])&&(e=[e[0]]),Vr(t,vr(e,1),[])})),Oa=ne||function(){return me.Date.now()};function ka(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,to(t,f,o,o,o,o,e)}function Ia(t,e){var n;if("function"!=typeof e)throw new At(a);return t=xs(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var Da=$r((function(t,e,n){var r=1;if(n.length){var i=pn(n,ho(Da));r|=l}return to(t,r,e,n,i)})),ja=$r((function(t,e,n){var r=3;if(n.length){var i=pn(n,ho(ja));r|=l}return to(e,r,t,n,i)}));function za(t,e,n){var r,i,s,c,u,l,h=0,f=!1,d=!1,p=!0;if("function"!=typeof t)throw new At(a);function m(e){var n=r,a=i;return r=i=o,h=e,c=t.apply(a,n)}function g(t){return h=t,u=zo(y,e),f?m(t):c}function v(t){var n=t-l;return l===o||n>=e||n<0||d&&t-h>=s}function y(){var t=Oa();if(v(t))return _(t);u=zo(y,function(t){var n=e-(t-l);return d?xe(n,s-(t-h)):n}(t))}function _(t){return u=o,p&&r?m(t):(r=i=o,c)}function x(){var t=Oa(),n=v(t);if(r=arguments,i=this,l=t,n){if(u===o)return g(l);if(d)return Mi(u),u=zo(y,e),m(l)}return u===o&&(u=zo(y,e)),c}return e=ws(e)||0,as(n)&&(f=!!n.leading,s=(d="maxWait"in n)?_e(ws(n.maxWait)||0,e):s,p="trailing"in n?!!n.trailing:p),x.cancel=function(){u!==o&&Mi(u),h=0,r=l=i=u=o},x.flush=function(){return u===o?c:_(Oa())},x}var Na=$r((function(t,e){return lr(t,1,e)})),Fa=$r((function(t,e,n){return lr(t,ws(e)||0,n)}));function Ba(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new At(a);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ba.Cache||qn),n}function Ha(t){if("function"!=typeof t)throw new At(a);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ba.Cache=qn;var Ga=bi((function(t,e){var n=(e=1==e.length&&Xa(e[0])?De(e[0],tn(fo())):De(vr(e,1),tn(fo()))).length;return $r((function(r){for(var i=-1,o=xe(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return Ce(t,this,r)}))})),Ua=$r((function(t,e){var n=pn(e,ho(Ua));return to(t,l,o,e,n)})),Va=$r((function(t,e){var n=pn(e,ho(Va));return to(t,h,o,e,n)})),Wa=ao((function(t,e){return to(t,d,o,o,o,e)}));function Za(t,e){return t===e||t!=t&&e!=e}var qa=Ji(Er),Ya=Ji((function(t,e){return t>=e})),Ja=Rr(function(){return arguments}())?Rr:function(t){return ss(t)&&It.call(t,"callee")&&!qt.call(t,"callee")},Xa=n.isArray,$a=be?tn(be):function(t){return ss(t)&&Tr(t)==D};function Qa(t){return null!=t&&os(t.length)&&!rs(t)}function Ka(t){return ss(t)&&Qa(t)}var ts=de||wc,es=we?tn(we):function(t){return ss(t)&&Tr(t)==w};function ns(t){if(!ss(t))return!1;var e=Tr(t);return e==M||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ls(t)}function rs(t){if(!as(t))return!1;var e=Tr(t);return e==S||e==T||"[object AsyncFunction]"==e||"[object Proxy]"==e}function is(t){return"number"==typeof t&&t==xs(t)}function os(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=m}function as(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ss(t){return null!=t&&"object"==typeof t}var cs=Me?tn(Me):function(t){return ss(t)&&_o(t)==E};function us(t){return"number"==typeof t||ss(t)&&Tr(t)==C}function ls(t){if(!ss(t)||Tr(t)!=A)return!1;var e=Wt(t);if(null===e)return!0;var n=It.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&kt.call(n)==Nt}var hs=Se?tn(Se):function(t){return ss(t)&&Tr(t)==L},fs=Te?tn(Te):function(t){return ss(t)&&_o(t)==R};function ds(t){return"string"==typeof t||!Xa(t)&&ss(t)&&Tr(t)==O}function ps(t){return"symbol"==typeof t||ss(t)&&Tr(t)==k}var ms=Ee?tn(Ee):function(t){return ss(t)&&os(t.length)&&!!ce[Tr(t)]},gs=Ji(Nr),vs=Ji((function(t,e){return t<=e}));function ys(t){if(!t)return[];if(Qa(t))return ds(t)?vn(t):Li(t);if(Xt&&t[Xt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Xt]());var e=_o(t);return(e==E?fn:e==R?mn:Zs)(t)}function _s(t){return t?(t=ws(t))===p||t===-p?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function xs(t){var e=_s(t),n=e%1;return e==e?n?e-n:e:0}function bs(t){return t?sr(xs(t),0,v):0}function ws(t){if("number"==typeof t)return t;if(ps(t))return g;if(as(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=as(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ke(t);var n=yt.test(t);return n||xt.test(t)?fe(t.slice(2),n?2:8):vt.test(t)?g:+t}function Ms(t){return Ri(t,Ns(t))}function Ss(t){return null==t?"":li(t)}var Ts=ki((function(t,e){if(Ao(e)||Qa(e))Ri(e,zs(e),t);else for(var n in e)It.call(e,n)&&er(t,n,e[n])})),Es=ki((function(t,e){Ri(e,Ns(e),t)})),Cs=ki((function(t,e,n,r){Ri(e,Ns(e),t,r)})),As=ki((function(t,e,n,r){Ri(e,zs(e),t,r)})),Ps=ao(ar),Ls=$r((function(t,e){t=Tt(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&So(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=Ns(a),c=-1,u=s.length;++c<u;){var l=s[c],h=t[l];(h===o||Za(h,Rt[l])&&!It.call(t,l))&&(t[l]=a[l])}return t})),Rs=$r((function(t){return t.push(o,no),Ce(Bs,o,t)}));function Os(t,e,n){var r=null==t?o:Mr(t,e);return r===o?n:r}function ks(t,e){return null!=t&&xo(t,e,Ar)}var Is=Ui((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=zt.call(e)),t[e]=n}),ac(uc)),Ds=Ui((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=zt.call(e)),It.call(t,e)?t[e].push(n):t[e]=[n]}),fo),js=$r(Lr);function zs(t){return Qa(t)?Xn(t):jr(t)}function Ns(t){return Qa(t)?Xn(t,!0):zr(t)}var Fs=ki((function(t,e,n){Gr(t,e,n)})),Bs=ki((function(t,e,n,r){Gr(t,e,n,r)})),Hs=ao((function(t,e){var n={};if(null==t)return n;var r=!1;e=De(e,(function(e){return e=xi(e,t),r||(r=e.length>1),e})),Ri(t,co(t),n),r&&(n=cr(n,7,ro));for(var i=e.length;i--;)fi(n,e[i]);return n})),Gs=ao((function(t,e){return null==t?{}:function(t,e){return Wr(t,e,(function(e,n){return ks(t,n)}))}(t,e)}));function Us(t,e){if(null==t)return{};var n=De(co(t),(function(t){return[t]}));return e=fo(e),Wr(t,n,(function(t,n){return e(t,n[0])}))}var Vs=Ki(zs),Ws=Ki(Ns);function Zs(t){return null==t?[]:en(t,zs(t))}var qs=zi((function(t,e,n){return e=e.toLowerCase(),t+(n?Ys(e):e)}));function Ys(t){return nc(Ss(t).toLowerCase())}function Js(t){return(t=Ss(t))&&t.replace(wt,sn).replace(ee,"")}var Xs=zi((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),$s=zi((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Qs=ji("toLowerCase"),Ks=zi((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),tc=zi((function(t,e,n){return t+(n?" ":"")+nc(e)})),ec=zi((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),nc=ji("toUpperCase");function rc(t,e,n){return t=Ss(t),(e=n?o:e)===o?hn(t)?xn(t):He(t):t.match(e)||[]}var ic=$r((function(t,e){try{return Ce(t,o,e)}catch(t){return ns(t)?t:new i(t)}})),oc=ao((function(t,e){return Pe(e,(function(e){e=Uo(e),or(t,e,Da(t[e],t))})),t}));function ac(t){return function(){return t}}var sc=Hi(),cc=Hi(!0);function uc(t){return t}function lc(t){return Dr("function"==typeof t?t:cr(t,1))}var hc=$r((function(t,e){return function(n){return Lr(n,t,e)}})),fc=$r((function(t,e){return function(n){return Lr(t,n,e)}}));function dc(t,e,n){var r=zs(e),i=wr(e,r);null!=n||as(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=wr(e,zs(e)));var o=!(as(n)&&"chain"in n&&!n.chain),a=rs(t);return Pe(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=Li(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,je([this.value()],arguments))})})),t}function pc(){}var mc=Wi(De),gc=Wi(Re),vc=Wi(Fe);function yc(t){return To(t)?Ye(Uo(t)):function(t){return function(e){return Mr(e,t)}}(t)}var _c=Yi(),xc=Yi(!0);function bc(){return[]}function wc(){return!1}var Mc=Vi((function(t,e){return t+e}),0),Sc=$i("ceil"),Tc=Vi((function(t,e){return t/e}),1),Ec=$i("floor"),Cc=Vi((function(t,e){return t*e}),1),Ac=$i("round"),Pc=Vi((function(t,e){return t-e}),0);return Bn.after=function(t,e){if("function"!=typeof e)throw new At(a);return t=xs(t),function(){if(--t<1)return e.apply(this,arguments)}},Bn.ary=ka,Bn.assign=Ts,Bn.assignIn=Es,Bn.assignInWith=Cs,Bn.assignWith=As,Bn.at=Ps,Bn.before=Ia,Bn.bind=Da,Bn.bindAll=oc,Bn.bindKey=ja,Bn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Xa(t)?t:[t]},Bn.chain=ya,Bn.chunk=function(t,e,r){e=(r?So(t,e,r):e===o)?1:_e(xs(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,c=n(ie(i/e));a<i;)c[s++]=ii(t,a,a+=e);return c},Bn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},Bn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=n(t-1),r=arguments[0],i=t;i--;)e[i-1]=arguments[i];return je(Xa(r)?Li(r):[r],vr(e,1))},Bn.cond=function(t){var e=null==t?0:t.length,n=fo();return t=e?De(t,(function(t){if("function"!=typeof t[1])throw new At(a);return[n(t[0]),t[1]]})):[],$r((function(n){for(var r=-1;++r<e;){var i=t[r];if(Ce(i[0],this,n))return Ce(i[1],this,n)}}))},Bn.conforms=function(t){return function(t){var e=zs(t);return function(n){return ur(n,t,e)}}(cr(t,1))},Bn.constant=ac,Bn.countBy=ba,Bn.create=function(t,e){var n=Hn(t);return null==e?n:ir(n,e)},Bn.curry=function t(e,n,r){var i=to(e,8,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},Bn.curryRight=function t(e,n,r){var i=to(e,u,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},Bn.debounce=za,Bn.defaults=Ls,Bn.defaultsDeep=Rs,Bn.defer=Na,Bn.delay=Fa,Bn.difference=Zo,Bn.differenceBy=qo,Bn.differenceWith=Yo,Bn.drop=function(t,e,n){var r=null==t?0:t.length;return r?ii(t,(e=n||e===o?1:xs(e))<0?0:e,r):[]},Bn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?ii(t,0,(e=r-(e=n||e===o?1:xs(e)))<0?0:e):[]},Bn.dropRightWhile=function(t,e){return t&&t.length?pi(t,fo(e,3),!0,!0):[]},Bn.dropWhile=function(t,e){return t&&t.length?pi(t,fo(e,3),!0):[]},Bn.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&So(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=xs(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:xs(r))<0&&(r+=i),r=n>r?0:bs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Bn.filter=function(t,e){return(Xa(t)?Oe:gr)(t,fo(e,3))},Bn.flatMap=function(t,e){return vr(Pa(t,e),1)},Bn.flatMapDeep=function(t,e){return vr(Pa(t,e),p)},Bn.flatMapDepth=function(t,e,n){return n=n===o?1:xs(n),vr(Pa(t,e),n)},Bn.flatten=$o,Bn.flattenDeep=function(t){return null!=t&&t.length?vr(t,p):[]},Bn.flattenDepth=function(t,e){return null!=t&&t.length?vr(t,e=e===o?1:xs(e)):[]},Bn.flip=function(t){return to(t,512)},Bn.flow=sc,Bn.flowRight=cc,Bn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},Bn.functions=function(t){return null==t?[]:wr(t,zs(t))},Bn.functionsIn=function(t){return null==t?[]:wr(t,Ns(t))},Bn.groupBy=Ea,Bn.initial=function(t){return null!=t&&t.length?ii(t,0,-1):[]},Bn.intersection=Ko,Bn.intersectionBy=ta,Bn.intersectionWith=ea,Bn.invert=Is,Bn.invertBy=Ds,Bn.invokeMap=Ca,Bn.iteratee=lc,Bn.keyBy=Aa,Bn.keys=zs,Bn.keysIn=Ns,Bn.map=Pa,Bn.mapKeys=function(t,e){var n={};return e=fo(e,3),xr(t,(function(t,r,i){or(n,e(t,r,i),t)})),n},Bn.mapValues=function(t,e){var n={};return e=fo(e,3),xr(t,(function(t,r,i){or(n,r,e(t,r,i))})),n},Bn.matches=function(t){return Br(cr(t,1))},Bn.matchesProperty=function(t,e){return Hr(t,cr(e,1))},Bn.memoize=Ba,Bn.merge=Fs,Bn.mergeWith=Bs,Bn.method=hc,Bn.methodOf=fc,Bn.mixin=dc,Bn.negate=Ha,Bn.nthArg=function(t){return t=xs(t),$r((function(e){return Ur(e,t)}))},Bn.omit=Hs,Bn.omitBy=function(t,e){return Us(t,Ha(fo(e)))},Bn.once=function(t){return Ia(2,t)},Bn.orderBy=function(t,e,n,r){return null==t?[]:(Xa(e)||(e=null==e?[]:[e]),Xa(n=r?o:n)||(n=null==n?[]:[n]),Vr(t,e,n))},Bn.over=mc,Bn.overArgs=Ga,Bn.overEvery=gc,Bn.overSome=vc,Bn.partial=Ua,Bn.partialRight=Va,Bn.partition=La,Bn.pick=Gs,Bn.pickBy=Us,Bn.property=yc,Bn.propertyOf=function(t){return function(e){return null==t?o:Mr(t,e)}},Bn.pull=ra,Bn.pullAll=ia,Bn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Zr(t,e,fo(n,2)):t},Bn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Zr(t,e,o,n):t},Bn.pullAt=oa,Bn.range=_c,Bn.rangeRight=xc,Bn.rearg=Wa,Bn.reject=function(t,e){return(Xa(t)?Oe:gr)(t,Ha(fo(e,3)))},Bn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=fo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return qr(t,i),n},Bn.rest=function(t,e){if("function"!=typeof t)throw new At(a);return $r(t,e=e===o?e:xs(e))},Bn.reverse=aa,Bn.sampleSize=function(t,e,n){return e=(n?So(t,e,n):e===o)?1:xs(e),(Xa(t)?Qn:Kr)(t,e)},Bn.set=function(t,e,n){return null==t?t:ti(t,e,n)},Bn.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:ti(t,e,n,r)},Bn.shuffle=function(t){return(Xa(t)?Kn:ri)(t)},Bn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&So(t,e,n)?(e=0,n=r):(e=null==e?0:xs(e),n=n===o?r:xs(n)),ii(t,e,n)):[]},Bn.sortBy=Ra,Bn.sortedUniq=function(t){return t&&t.length?ci(t):[]},Bn.sortedUniqBy=function(t,e){return t&&t.length?ci(t,fo(e,2)):[]},Bn.split=function(t,e,n){return n&&"number"!=typeof n&&So(t,e,n)&&(e=n=o),(n=n===o?v:n>>>0)?(t=Ss(t))&&("string"==typeof e||null!=e&&!hs(e))&&!(e=li(e))&&ln(t)?wi(vn(t),0,n):t.split(e,n):[]},Bn.spread=function(t,e){if("function"!=typeof t)throw new At(a);return e=null==e?0:_e(xs(e),0),$r((function(n){var r=n[e],i=wi(n,0,e);return r&&je(i,r),Ce(t,this,i)}))},Bn.tail=function(t){var e=null==t?0:t.length;return e?ii(t,1,e):[]},Bn.take=function(t,e,n){return t&&t.length?ii(t,0,(e=n||e===o?1:xs(e))<0?0:e):[]},Bn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ii(t,(e=r-(e=n||e===o?1:xs(e)))<0?0:e,r):[]},Bn.takeRightWhile=function(t,e){return t&&t.length?pi(t,fo(e,3),!1,!0):[]},Bn.takeWhile=function(t,e){return t&&t.length?pi(t,fo(e,3)):[]},Bn.tap=function(t,e){return e(t),t},Bn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new At(a);return as(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),za(t,e,{leading:r,maxWait:e,trailing:i})},Bn.thru=_a,Bn.toArray=ys,Bn.toPairs=Vs,Bn.toPairsIn=Ws,Bn.toPath=function(t){return Xa(t)?De(t,Uo):ps(t)?[t]:Li(Go(Ss(t)))},Bn.toPlainObject=Ms,Bn.transform=function(t,e,n){var r=Xa(t),i=r||ts(t)||ms(t);if(e=fo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:as(t)&&rs(o)?Hn(Wt(t)):{}}return(i?Pe:xr)(t,(function(t,r,i){return e(n,t,r,i)})),n},Bn.unary=function(t){return ka(t,1)},Bn.union=sa,Bn.unionBy=ca,Bn.unionWith=ua,Bn.uniq=function(t){return t&&t.length?hi(t):[]},Bn.uniqBy=function(t,e){return t&&t.length?hi(t,fo(e,2)):[]},Bn.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?hi(t,o,e):[]},Bn.unset=function(t,e){return null==t||fi(t,e)},Bn.unzip=la,Bn.unzipWith=ha,Bn.update=function(t,e,n){return null==t?t:di(t,e,_i(n))},Bn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:di(t,e,_i(n),r)},Bn.values=Zs,Bn.valuesIn=function(t){return null==t?[]:en(t,Ns(t))},Bn.without=fa,Bn.words=rc,Bn.wrap=function(t,e){return Ua(_i(e),t)},Bn.xor=da,Bn.xorBy=pa,Bn.xorWith=ma,Bn.zip=ga,Bn.zipObject=function(t,e){return vi(t||[],e||[],er)},Bn.zipObjectDeep=function(t,e){return vi(t||[],e||[],ti)},Bn.zipWith=va,Bn.entries=Vs,Bn.entriesIn=Ws,Bn.extend=Es,Bn.extendWith=Cs,dc(Bn,Bn),Bn.add=Mc,Bn.attempt=ic,Bn.camelCase=qs,Bn.capitalize=Ys,Bn.ceil=Sc,Bn.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=ws(n))==n?n:0),e!==o&&(e=(e=ws(e))==e?e:0),sr(ws(t),e,n)},Bn.clone=function(t){return cr(t,4)},Bn.cloneDeep=function(t){return cr(t,5)},Bn.cloneDeepWith=function(t,e){return cr(t,5,e="function"==typeof e?e:o)},Bn.cloneWith=function(t,e){return cr(t,4,e="function"==typeof e?e:o)},Bn.conformsTo=function(t,e){return null==e||ur(t,e,zs(e))},Bn.deburr=Js,Bn.defaultTo=function(t,e){return null==t||t!=t?e:t},Bn.divide=Tc,Bn.endsWith=function(t,e,n){t=Ss(t),e=li(e);var r=t.length,i=n=n===o?r:sr(xs(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},Bn.eq=Za,Bn.escape=function(t){return(t=Ss(t))&&Q.test(t)?t.replace(X,cn):t},Bn.escapeRegExp=function(t){return(t=Ss(t))&&at.test(t)?t.replace(ot,"\\$&"):t},Bn.every=function(t,e,n){var r=Xa(t)?Re:pr;return n&&So(t,e,n)&&(e=o),r(t,fo(e,3))},Bn.find=wa,Bn.findIndex=Jo,Bn.findKey=function(t,e){return Ge(t,fo(e,3),xr)},Bn.findLast=Ma,Bn.findLastIndex=Xo,Bn.findLastKey=function(t,e){return Ge(t,fo(e,3),br)},Bn.floor=Ec,Bn.forEach=Sa,Bn.forEachRight=Ta,Bn.forIn=function(t,e){return null==t?t:yr(t,fo(e,3),Ns)},Bn.forInRight=function(t,e){return null==t?t:_r(t,fo(e,3),Ns)},Bn.forOwn=function(t,e){return t&&xr(t,fo(e,3))},Bn.forOwnRight=function(t,e){return t&&br(t,fo(e,3))},Bn.get=Os,Bn.gt=qa,Bn.gte=Ya,Bn.has=function(t,e){return null!=t&&xo(t,e,Cr)},Bn.hasIn=ks,Bn.head=Qo,Bn.identity=uc,Bn.includes=function(t,e,n,r){t=Qa(t)?t:Zs(t),n=n&&!r?xs(n):0;var i=t.length;return n<0&&(n=_e(i+n,0)),ds(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Ve(t,e,n)>-1},Bn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:xs(n);return i<0&&(i=_e(r+i,0)),Ve(t,e,i)},Bn.inRange=function(t,e,n){return e=_s(e),n===o?(n=e,e=0):n=_s(n),function(t,e,n){return t>=xe(e,n)&&t<_e(e,n)}(t=ws(t),e,n)},Bn.invoke=js,Bn.isArguments=Ja,Bn.isArray=Xa,Bn.isArrayBuffer=$a,Bn.isArrayLike=Qa,Bn.isArrayLikeObject=Ka,Bn.isBoolean=function(t){return!0===t||!1===t||ss(t)&&Tr(t)==b},Bn.isBuffer=ts,Bn.isDate=es,Bn.isElement=function(t){return ss(t)&&1===t.nodeType&&!ls(t)},Bn.isEmpty=function(t){if(null==t)return!0;if(Qa(t)&&(Xa(t)||"string"==typeof t||"function"==typeof t.splice||ts(t)||ms(t)||Ja(t)))return!t.length;var e=_o(t);if(e==E||e==R)return!t.size;if(Ao(t))return!jr(t).length;for(var n in t)if(It.call(t,n))return!1;return!0},Bn.isEqual=function(t,e){return Or(t,e)},Bn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?Or(t,e,o,n):!!r},Bn.isError=ns,Bn.isFinite=function(t){return"number"==typeof t&&pe(t)},Bn.isFunction=rs,Bn.isInteger=is,Bn.isLength=os,Bn.isMap=cs,Bn.isMatch=function(t,e){return t===e||kr(t,e,mo(e))},Bn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,kr(t,e,mo(e),n)},Bn.isNaN=function(t){return us(t)&&t!=+t},Bn.isNative=function(t){if(Co(t))throw new i("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ir(t)},Bn.isNil=function(t){return null==t},Bn.isNull=function(t){return null===t},Bn.isNumber=us,Bn.isObject=as,Bn.isObjectLike=ss,Bn.isPlainObject=ls,Bn.isRegExp=hs,Bn.isSafeInteger=function(t){return is(t)&&t>=-m&&t<=m},Bn.isSet=fs,Bn.isString=ds,Bn.isSymbol=ps,Bn.isTypedArray=ms,Bn.isUndefined=function(t){return t===o},Bn.isWeakMap=function(t){return ss(t)&&_o(t)==I},Bn.isWeakSet=function(t){return ss(t)&&"[object WeakSet]"==Tr(t)},Bn.join=function(t,e){return null==t?"":ge.call(t,e)},Bn.kebabCase=Xs,Bn.last=na,Bn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=xs(n))<0?_e(r+i,0):xe(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):Ue(t,Ze,i,!0)},Bn.lowerCase=$s,Bn.lowerFirst=Qs,Bn.lt=gs,Bn.lte=vs,Bn.max=function(t){return t&&t.length?mr(t,uc,Er):o},Bn.maxBy=function(t,e){return t&&t.length?mr(t,fo(e,2),Er):o},Bn.mean=function(t){return qe(t,uc)},Bn.meanBy=function(t,e){return qe(t,fo(e,2))},Bn.min=function(t){return t&&t.length?mr(t,uc,Nr):o},Bn.minBy=function(t,e){return t&&t.length?mr(t,fo(e,2),Nr):o},Bn.stubArray=bc,Bn.stubFalse=wc,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=Cc,Bn.nth=function(t,e){return t&&t.length?Ur(t,xs(e)):o},Bn.noConflict=function(){return me._===this&&(me._=Ft),this},Bn.noop=pc,Bn.now=Oa,Bn.pad=function(t,e,n){t=Ss(t);var r=(e=xs(e))?gn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Zi(oe(i),n)+t+Zi(ie(i),n)},Bn.padEnd=function(t,e,n){t=Ss(t);var r=(e=xs(e))?gn(t):0;return e&&r<e?t+Zi(e-r,n):t},Bn.padStart=function(t,e,n){t=Ss(t);var r=(e=xs(e))?gn(t):0;return e&&r<e?Zi(e-r,n)+t:t},Bn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Je(Ss(t).replace(st,""),e||0)},Bn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&So(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=_s(t),e===o?(e=t,t=0):e=_s(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=wn();return xe(t+i*(e-t+he("1e-"+((i+"").length-1))),e)}return Yr(t,e)},Bn.reduce=function(t,e,n){var r=Xa(t)?ze:Xe,i=arguments.length<3;return r(t,fo(e,4),n,i,fr)},Bn.reduceRight=function(t,e,n){var r=Xa(t)?Ne:Xe,i=arguments.length<3;return r(t,fo(e,4),n,i,dr)},Bn.repeat=function(t,e,n){return e=(n?So(t,e,n):e===o)?1:xs(e),Xr(Ss(t),e)},Bn.replace=function(){var t=arguments,e=Ss(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Bn.result=function(t,e,n){var r=-1,i=(e=xi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[Uo(e[r])];a===o&&(r=i,a=n),t=rs(a)?a.call(t):a}return t},Bn.round=Ac,Bn.runInContext=t,Bn.sample=function(t){return(Xa(t)?$n:Qr)(t)},Bn.size=function(t){if(null==t)return 0;if(Qa(t))return ds(t)?gn(t):t.length;var e=_o(t);return e==E||e==R?t.size:jr(t).length},Bn.snakeCase=Ks,Bn.some=function(t,e,n){var r=Xa(t)?Fe:oi;return n&&So(t,e,n)&&(e=o),r(t,fo(e,3))},Bn.sortedIndex=function(t,e){return ai(t,e)},Bn.sortedIndexBy=function(t,e,n){return si(t,e,fo(n,2))},Bn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ai(t,e);if(r<n&&Za(t[r],e))return r}return-1},Bn.sortedLastIndex=function(t,e){return ai(t,e,!0)},Bn.sortedLastIndexBy=function(t,e,n){return si(t,e,fo(n,2),!0)},Bn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=ai(t,e,!0)-1;if(Za(t[n],e))return n}return-1},Bn.startCase=tc,Bn.startsWith=function(t,e,n){return t=Ss(t),n=null==n?0:sr(xs(n),0,t.length),e=li(e),t.slice(n,n+e.length)==e},Bn.subtract=Pc,Bn.sum=function(t){return t&&t.length?$e(t,uc):0},Bn.sumBy=function(t,e){return t&&t.length?$e(t,fo(e,2)):0},Bn.template=function(t,e,n){var r=Bn.templateSettings;n&&So(t,e,n)&&(e=o),t=Ss(t),e=Cs({},e,r,eo);var a,s,c=Cs({},e.imports,r.imports,eo),u=zs(c),l=en(c,u),h=0,f=e.interpolate||Mt,d="__p += '",p=Et((e.escape||Mt).source+"|"+f.source+"|"+(f===et?mt:Mt).source+"|"+(e.evaluate||Mt).source+"|$","g"),m="//# sourceURL="+(It.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++se+"]")+"\n";t.replace(p,(function(e,n,r,i,o,c){return r||(r=i),d+=t.slice(h,c).replace(St,un),n&&(a=!0,d+="' +\n__e("+n+") +\n'"),o&&(s=!0,d+="';\n"+o+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),h=c+e.length,e})),d+="';\n";var g=It.call(e,"variable")&&e.variable;if(g){if(dt.test(g))throw new i("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(s?d.replace(Z,""):d).replace(q,"$1").replace(Y,"$1;"),d="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=ic((function(){return ct(u,m+"return "+d).apply(o,l)}));if(v.source=d,ns(v))throw v;return v},Bn.times=function(t,e){if((t=xs(t))<1||t>m)return[];var n=v,r=xe(t,v);e=fo(e),t-=v;for(var i=Qe(r,e);++n<t;)e(n);return i},Bn.toFinite=_s,Bn.toInteger=xs,Bn.toLength=bs,Bn.toLower=function(t){return Ss(t).toLowerCase()},Bn.toNumber=ws,Bn.toSafeInteger=function(t){return t?sr(xs(t),-m,m):0===t?t:0},Bn.toString=Ss,Bn.toUpper=function(t){return Ss(t).toUpperCase()},Bn.trim=function(t,e,n){if((t=Ss(t))&&(n||e===o))return Ke(t);if(!t||!(e=li(e)))return t;var r=vn(t),i=vn(e);return wi(r,rn(r,i),on(r,i)+1).join("")},Bn.trimEnd=function(t,e,n){if((t=Ss(t))&&(n||e===o))return t.slice(0,yn(t)+1);if(!t||!(e=li(e)))return t;var r=vn(t);return wi(r,0,on(r,vn(e))+1).join("")},Bn.trimStart=function(t,e,n){if((t=Ss(t))&&(n||e===o))return t.replace(st,"");if(!t||!(e=li(e)))return t;var r=vn(t);return wi(r,rn(r,vn(e))).join("")},Bn.truncate=function(t,e){var n=30,r="...";if(as(e)){var i="separator"in e?e.separator:i;n="length"in e?xs(e.length):n,r="omission"in e?li(e.omission):r}var a=(t=Ss(t)).length;if(ln(t)){var s=vn(t);a=s.length}if(n>=a)return t;var c=n-gn(r);if(c<1)return r;var u=s?wi(s,0,c).join(""):t.slice(0,c);if(i===o)return u+r;if(s&&(c+=u.length-c),hs(i)){if(t.slice(c).search(i)){var l,h=u;for(i.global||(i=Et(i.source,Ss(gt.exec(i))+"g")),i.lastIndex=0;l=i.exec(h);)var f=l.index;u=u.slice(0,f===o?c:f)}}else if(t.indexOf(li(i),c)!=c){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r},Bn.unescape=function(t){return(t=Ss(t))&&$.test(t)?t.replace(J,_n):t},Bn.uniqueId=function(t){var e=++Dt;return Ss(t)+e},Bn.upperCase=ec,Bn.upperFirst=nc,Bn.each=Sa,Bn.eachRight=Ta,Bn.first=Qo,dc(Bn,function(){var t={};return xr(Bn,(function(e,n){It.call(Bn.prototype,n)||(t[n]=e)})),t}(),{chain:!1}),Bn.VERSION="4.17.21",Pe(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Bn[t].placeholder=Bn})),Pe(["drop","take"],(function(t,e){Vn.prototype[t]=function(n){n=n===o?1:_e(xs(n),0);var r=this.__filtered__&&!e?new Vn(this):this.clone();return r.__filtered__?r.__takeCount__=xe(n,r.__takeCount__):r.__views__.push({size:xe(n,v),type:t+(r.__dir__<0?"Right":"")}),r},Vn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Pe(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Vn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:fo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Pe(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Vn.prototype[t]=function(){return this[n](1).value()[0]}})),Pe(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Vn.prototype[t]=function(){return this.__filtered__?new Vn(this):this[n](1)}})),Vn.prototype.compact=function(){return this.filter(uc)},Vn.prototype.find=function(t){return this.filter(t).head()},Vn.prototype.findLast=function(t){return this.reverse().find(t)},Vn.prototype.invokeMap=$r((function(t,e){return"function"==typeof t?new Vn(this):this.map((function(n){return Lr(n,t,e)}))})),Vn.prototype.reject=function(t){return this.filter(Ha(fo(t)))},Vn.prototype.slice=function(t,e){t=xs(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Vn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=xs(e))<0?n.dropRight(-e):n.take(e-t)),n)},Vn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Vn.prototype.toArray=function(){return this.take(v)},xr(Vn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=Bn[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(Bn.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,c=e instanceof Vn,u=s[0],l=c||Xa(e),h=function(t){var e=i.apply(Bn,je([t],s));return r&&f?e[0]:e};l&&n&&"function"==typeof u&&1!=u.length&&(c=l=!1);var f=this.__chain__,d=!!this.__actions__.length,p=a&&!f,m=c&&!d;if(!a&&l){e=m?e:new Vn(this);var g=t.apply(e,s);return g.__actions__.push({func:_a,args:[h],thisArg:o}),new Un(g,f)}return p&&m?t.apply(this,s):(g=this.thru(h),p?r?g.value()[0]:g.value():g)})})),Pe(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Pt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Bn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Xa(i)?i:[],t)}return this[n]((function(n){return e.apply(Xa(n)?n:[],t)}))}})),xr(Vn.prototype,(function(t,e){var n=Bn[e];if(n){var r=n.name+"";It.call(Rn,r)||(Rn[r]=[]),Rn[r].push({name:e,func:n})}})),Rn[Gi(o,2).name]=[{name:"wrapper",func:o}],Vn.prototype.clone=function(){var t=new Vn(this.__wrapped__);return t.__actions__=Li(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Li(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Li(this.__views__),t},Vn.prototype.reverse=function(){if(this.__filtered__){var t=new Vn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Vn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Xa(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=xe(e,t+a);break;case"takeRight":t=_e(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,u=r?s:a-1,l=this.__iteratees__,h=l.length,f=0,d=xe(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return mi(t,this.__actions__);var p=[];t:for(;c--&&f<d;){for(var m=-1,g=t[u+=e];++m<h;){var v=l[m],y=v.iteratee,_=v.type,x=y(g);if(2==_)g=x;else if(!x){if(1==_)continue t;break t}}p[f++]=g}return p},Bn.prototype.at=xa,Bn.prototype.chain=function(){return ya(this)},Bn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},Bn.prototype.next=function(){this.__values__===o&&(this.__values__=ys(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},Bn.prototype.plant=function(t){for(var e,n=this;n instanceof Gn;){var r=Wo(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},Bn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Vn){var e=t;return this.__actions__.length&&(e=new Vn(this)),(e=e.reverse()).__actions__.push({func:_a,args:[aa],thisArg:o}),new Un(e,this.__chain__)}return this.thru(aa)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return mi(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,Xt&&(Bn.prototype[Xt]=function(){return this}),Bn}();me._=bn,(i=function(){return bn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n("2409"),n("adb6")(t))},"7e14":function(t,e,n){var r=n("3a40").Global;t.exports={name:"oldFF-globalStorage",read:function(t){return i[t]},write:function(t,e){i[t]=e},each:o,remove:function(t){return i.removeItem(t)},clearAll:function(){o((function(t,e){delete i[t]}))}};var i=r.globalStorage;function o(t){for(var e=i.length-1;e>=0;e--){var n=i.key(e);t(i[n],n)}}},"7e3c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"7f8c":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAKN2lDQ1BzUkdCIElFQzYxOTY2LTIuMQAAeJydlndUU9kWh8+9N71QkhCKlNBraFICSA29SJEuKjEJEErAkAAiNkRUcERRkaYIMijggKNDkbEiioUBUbHrBBlE1HFwFBuWSWStGd+8ee/Nm98f935rn73P3Wfvfda6AJD8gwXCTFgJgAyhWBTh58WIjYtnYAcBDPAAA2wA4HCzs0IW+EYCmQJ82IxsmRP4F726DiD5+yrTP4zBAP+flLlZIjEAUJiM5/L42VwZF8k4PVecJbdPyZi2NE3OMErOIlmCMlaTc/IsW3z2mWUPOfMyhDwZy3PO4mXw5Nwn4405Er6MkWAZF+cI+LkyviZjg3RJhkDGb+SxGXxONgAoktwu5nNTZGwtY5IoMoIt43kA4EjJX/DSL1jMzxPLD8XOzFouEiSniBkmXFOGjZMTi+HPz03ni8XMMA43jSPiMdiZGVkc4XIAZs/8WRR5bRmyIjvYODk4MG0tbb4o1H9d/JuS93aWXoR/7hlEH/jD9ld+mQ0AsKZltdn6h21pFQBd6wFQu/2HzWAvAIqyvnUOfXEeunxeUsTiLGcrq9zcXEsBn2spL+jv+p8Of0NffM9Svt3v5WF485M4knQxQ143bmZ6pkTEyM7icPkM5p+H+B8H/nUeFhH8JL6IL5RFRMumTCBMlrVbyBOIBZlChkD4n5r4D8P+pNm5lona+BHQllgCpSEaQH4eACgqESAJe2Qr0O99C8ZHA/nNi9GZmJ37z4L+fVe4TP7IFiR/jmNHRDK4ElHO7Jr8WgI0IABFQAPqQBvoAxPABLbAEbgAD+ADAkEoiARxYDHgghSQAUQgFxSAtaAYlIKtYCeoBnWgETSDNnAYdIFj4DQ4By6By2AE3AFSMA6egCnwCsxAEISFyBAVUod0IEPIHLKFWJAb5AMFQxFQHJQIJUNCSAIVQOugUqgcqobqoWboW+godBq6AA1Dt6BRaBL6FXoHIzAJpsFasBFsBbNgTzgIjoQXwcnwMjgfLoK3wJVwA3wQ7oRPw5fgEVgKP4GnEYAQETqiizARFsJGQpF4JAkRIauQEqQCaUDakB6kH7mKSJGnyFsUBkVFMVBMlAvKHxWF4qKWoVahNqOqUQdQnag+1FXUKGoK9RFNRmuizdHO6AB0LDoZnYsuRlegm9Ad6LPoEfQ4+hUGg6FjjDGOGH9MHCYVswKzGbMb0445hRnGjGGmsVisOtYc64oNxXKwYmwxtgp7EHsSewU7jn2DI+J0cLY4X1w8TogrxFXgWnAncFdwE7gZvBLeEO+MD8Xz8MvxZfhGfA9+CD+OnyEoE4wJroRIQiphLaGS0EY4S7hLeEEkEvWITsRwooC4hlhJPEQ8TxwlviVRSGYkNimBJCFtIe0nnSLdIr0gk8lGZA9yPFlM3kJuJp8h3ye/UaAqWCoEKPAUVivUKHQqXFF4pohXNFT0VFysmK9YoXhEcUjxqRJeyUiJrcRRWqVUo3RU6YbStDJV2UY5VDlDebNyi/IF5UcULMWI4kPhUYoo+yhnKGNUhKpPZVO51HXURupZ6jgNQzOmBdBSaaW0b2iDtCkVioqdSrRKnkqNynEVKR2hG9ED6On0Mvph+nX6O1UtVU9Vvuom1TbVK6qv1eaoeajx1UrU2tVG1N6pM9R91NPUt6l3qd/TQGmYaYRr5Grs0Tir8XQObY7LHO6ckjmH59zWhDXNNCM0V2ju0xzQnNbS1vLTytKq0jqj9VSbru2hnaq9Q/uE9qQOVcdNR6CzQ+ekzmOGCsOTkc6oZPQxpnQ1df11Jbr1uoO6M3rGelF6hXrtevf0Cfos/ST9Hfq9+lMGOgYhBgUGrQa3DfGGLMMUw12G/YavjYyNYow2GHUZPTJWMw4wzjduNb5rQjZxN1lm0mByzRRjyjJNM91tetkMNrM3SzGrMRsyh80dzAXmu82HLdAWThZCiwaLG0wS05OZw2xljlrSLYMtCy27LJ9ZGVjFW22z6rf6aG1vnW7daH3HhmITaFNo02Pzq62ZLde2xvbaXPJc37mr53bPfW5nbse322N3055qH2K/wb7X/oODo4PIoc1h0tHAMdGx1vEGi8YKY21mnXdCO3k5rXY65vTW2cFZ7HzY+RcXpkuaS4vLo3nG8/jzGueNueq5clzrXaVuDLdEt71uUnddd457g/sDD30PnkeTx4SnqWeq50HPZ17WXiKvDq/XbGf2SvYpb8Tbz7vEe9CH4hPlU+1z31fPN9m31XfKz95vhd8pf7R/kP82/xsBWgHcgOaAqUDHwJWBfUGkoAVB1UEPgs2CRcE9IXBIYMj2kLvzDecL53eFgtCA0O2h98KMw5aFfR+OCQ8Lrwl/GGETURDRv4C6YMmClgWvIr0iyyLvRJlESaJ6oxWjE6Kbo1/HeMeUx0hjrWJXxl6K04gTxHXHY+Oj45vipxf6LNy5cDzBPqE44foi40V5iy4s1licvvj4EsUlnCVHEtGJMYktie85oZwGzvTSgKW1S6e4bO4u7hOeB28Hb5Lvyi/nTyS5JpUnPUp2Td6ePJninlKR8lTAFlQLnqf6p9alvk4LTduf9ik9Jr09A5eRmHFUSBGmCfsytTPzMoezzLOKs6TLnJftXDYlChI1ZUPZi7K7xTTZz9SAxESyXjKa45ZTk/MmNzr3SJ5ynjBvYLnZ8k3LJ/J9879egVrBXdFboFuwtmB0pefK+lXQqqWrelfrry5aPb7Gb82BtYS1aWt/KLQuLC98uS5mXU+RVtGaorH1futbixWKRcU3NrhsqNuI2ijYOLhp7qaqTR9LeCUXS61LK0rfb+ZuvviVzVeVX33akrRlsMyhbM9WzFbh1uvb3LcdKFcuzy8f2x6yvXMHY0fJjpc7l+y8UGFXUbeLsEuyS1oZXNldZVC1tep9dUr1SI1XTXutZu2m2te7ebuv7PHY01anVVda926vYO/Ner/6zgajhop9mH05+x42Rjf2f836urlJo6m06cN+4X7pgYgDfc2Ozc0tmi1lrXCrpHXyYMLBy994f9Pdxmyrb6e3lx4ChySHHn+b+O31w0GHe4+wjrR9Z/hdbQe1o6QT6lzeOdWV0iXtjusePhp4tLfHpafje8vv9x/TPVZzXOV42QnCiaITn07mn5w+lXXq6enk02O9S3rvnIk9c60vvG/wbNDZ8+d8z53p9+w/ed71/LELzheOXmRd7LrkcKlzwH6g4wf7HzoGHQY7hxyHui87Xe4Znjd84or7ldNXva+euxZw7dLI/JHh61HXb95IuCG9ybv56Fb6ree3c27P3FlzF3235J7SvYr7mvcbfjT9sV3qID0+6j068GDBgztj3LEnP2X/9H686CH5YcWEzkTzI9tHxyZ9Jy8/Xvh4/EnWk5mnxT8r/1z7zOTZd794/DIwFTs1/lz0/NOvm1+ov9j/0u5l73TY9P1XGa9mXpe8UX9z4C3rbf+7mHcTM7nvse8rP5h+6PkY9PHup4xPn34D94Tz+49wZioAAAAJcEhZcwAACxIAAAsSAdLdfvwAAADwSURBVHicYwmrmMXPxsVzgoF48ImFlZGHiZGBQYMETe9ZSFAMBxiaZET5GQzUpBm2HL3GwMLMxOBvq8Ow/9wdhnefvuHWFONuzKCpIMYgws/FIMjLxWCgKsXAx83OMH/radya5m49xVAZ68TgaKQC5j95/ZFh7YHL+J33/tN3hudvPjEI83GB+feevWP49PUHfk0pvmYMOkoSDI9ffWDg4mBjsNNXBBr0jWHdwcu4NV29/4JBGOifiauOMHBysDLkhdgw3HnyBr9Nhy/eB2MQ+PL9J0Pt7B3oSjA1EQPI0/T77oZPLFpemsRqYPzL9hcAyOZIEFj9ZVMAAAAASUVORK5CYII="},"7fb3":function(t,e,n){"use strict";var r=n("ca14"),i=n("8e04"),o=n("28dc"),a=n("ad0f"),s=r.TypeError,c=function(t,e,n,r,u,l,h,f){for(var d,p,m=u,g=0,v=!!h&&a(h,f);g<r;){if(g in n){if(d=v?v(n[g],g,e):n[g],l>0&&i(d))p=o(d),m=c(t,e,d,p,m,l-1)-1;else{if(m>=9007199254740991)throw s("Exceed the acceptable array length");t[m]=d}m++}g++}return m};t.exports=c},"801d":function(t,e,n){var r=n("cc43"),i=n("ca14");t.exports="process"==r(i.process)},"802d":function(t,e,n){var r=n("4748"),i=n("ca14");t.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==i.Pebble},8088:function(t,e,n){"use strict";var r=n("b0c4"),i=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new i(t)}},8179:function(t,e,n){var r=n("3a40").Global;function i(){return r.sessionStorage}function o(t){return i().getItem(t)}t.exports={name:"sessionStorage",read:o,write:function(t,e){return i().setItem(t,e)},each:function(t){for(var e=i().length-1;e>=0;e--){var n=i().key(e);t(o(n),n)}},remove:function(t){return i().removeItem(t)},clearAll:function(){return i().clear()}}},8270:function(t,e,n){var r=n("961e"),i=n("cbac"),o=n("9a02"),a=n("97d8"),s=n("b41a"),c=n("064b"),u=n("f97a");r({target:"Reflect",stat:!0},{get:function t(e,n){var r,l,h=arguments.length<3?e:arguments[2];return a(e)===h?e[n]:(r=c.f(e,n))?s(r)?r.value:void 0===r.get?void 0:i(r.get,h):o(l=u(e))?t(l,n,h):void 0}})},"82b8":function(t,e,n){var r=n("ca14").String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},"82c6":function(t,e,n){var r=n("1cba"),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},"84f7":function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},"88f2":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAICAYAAAAx8TU7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA0ppVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RTM3QjEyRDNBOTZDMTFFNUE2QTA4M0M3MDI4QUVDMTQiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RTM3QjEyRDJBOTZDMTFFNUE2QTA4M0M3MDI4QUVDMTQiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDo3ZmI2MGZkMi1hOTZjLTExZTUtYWU4Yi1kYzQ2ODQxNzA1ZmIiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDo3ZmI2MGZkMi1hOTZjLTExZTUtYWU4Yi1kYzQ2ODQxNzA1ZmIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4r2gBAAAAASklEQVR42mL4////HCBmB2IGGAYRIHACiKXRBUHgORBbgwQZ/4Ol4OA3EOcxMaCCf2AJJO1PgNgC2cyjQCyJbNEMIGZDdhJAgAEACP9sQulYHrwAAAAASUVORK5CYII="},"8bb4":function(t,e,n){"use strict";var r=n("961e"),i=n("9153"),o=n("6326"),a=n("c814"),s=n("d45e"),c=n("081e"),u=n("baf4"),l=n("5b0d"),h=n("7219");if(r({target:"Promise",proto:!0,real:!0,forced:!!o&&a((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=u(this,s("Promise")),n=c(t);return this.then(n?function(n){return l(e,t()).then((function(){return n}))}:t,n?function(n){return l(e,t()).then((function(){throw n}))}:t)}}),!i&&c(o)){var f=s("Promise").prototype.finally;o.prototype.finally!==f&&h(o.prototype,"finally",f,{unsafe:!0})}},"8e04":function(t,e,n){var r=n("cc43");t.exports=Array.isArray||function(t){return"Array"==r(t)}},"8e46":function(t,e,n){var r=n("6446"),i=n("265d").EXISTS,o=n("c252"),a=n("6c01").f,s=Function.prototype,c=o(s.toString),u=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=o(u.exec);r&&!i&&a(s,"name",{configurable:!0,get:function(){try{return l(u,c(this))[1]}catch(t){return""}}})},"8e6f":function(t,e,n){"use strict";t.exports=function(){var t=1;return{generate:function(){return t++}}}},"8f74":function(t,e,n){"use strict";var r=n("961e"),i=n("c252"),o=n("b0c4"),a=n("41a4"),s=n("28dc"),c=n("54ab"),u=n("c814"),l=n("2d18"),h=n("a849"),f=n("3492"),d=n("cf94"),p=n("a0a0"),m=n("119b"),g=[],v=i(g.sort),y=i(g.push),_=u((function(){g.sort(void 0)})),x=u((function(){g.sort(null)})),b=h("sort"),w=!u((function(){if(p)return p<70;if(!(f&&f>3)){if(d)return!0;if(m)return m<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)g.push({k:e+r,v:n})}for(g.sort((function(t,e){return e.v-t.v})),r=0;r<g.length;r++)e=g[r].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}})),M=function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:c(e)>c(n)?1:-1}};r({target:"Array",proto:!0,forced:_||!x||!b||!w},{sort:function(t){void 0!==t&&o(t);var e=a(this);if(w)return void 0===t?v(e):v(e,t);var n,r,i=[],c=s(e);for(r=0;r<c;r++)r in e&&y(i,e[r]);for(l(i,M(t)),n=i.length,r=0;r<n;)e[r]=i[r++];for(;r<c;)delete e[r++];return e}})},9153:function(t,e){t.exports=!1},9192:function(t,e,n){var r=n("3a40"),i=r.Global,o=r.trim;t.exports={name:"cookieStorage",read:function(t){if(!t||!u(t))return null;var e="(?:^|.*;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(a.cookie.replace(new RegExp(e),"$1"))},write:function(t,e){t&&(a.cookie=escape(t)+"="+escape(e)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")},each:s,remove:c,clearAll:function(){s((function(t,e){c(e)}))}};var a=i.document;function s(t){for(var e=a.cookie.split(/; ?/g),n=e.length-1;n>=0;n--)if(o(e[n])){var r=e[n].split("="),i=unescape(r[0]);t(unescape(r[1]),i)}}function c(t){t&&u(t)&&(a.cookie=escape(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function u(t){return new RegExp("(?:^|;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(a.cookie)}},9207:function(t,e,n){var r=n("6c01").f,i=n("c7e7"),o=n("519f")("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},"93b0":function(t,e,n){var r=n("a1a8"),i=n("e505"),o=n("7203"),a=n("5cb9"),s=n("88f2"),c=n("3471"),u=n("2a97"),l=n("a91d"),h=n("7f8c"),f=n("fc50"),d=n("aa5a");e=r(!1);var p=i(o),m=i(a),g=i(s),v=i(c),y=i(u),_=i(l),x=i(h),b=i(f),w=i(d);e.push([t.i,".maptalks-zoom{text-align:center}.maptalks-zoom .maptalks-zoom-zoomlevel{display:block;width:29px;height:29px;background:#172029;color:#fff;line-height:29px;font-size:12px;transform:scale(.8);-ms-transform:scale(.8);transform-origin:bottom left;-ms-transform-origin:bottom left}.maptalks-zoom-slider{margin-top:6px}.maptalks-zoom-slider a.maptalks-zoom-zoomin,.maptalks-zoom-slider a.maptalks-zoom-zoomout{display:block;font-size:16px;width:21px;height:21px;border:1px solid #363539;background:#172029;color:#fff;line-height:19px;text-decoration:none}.maptalks-zoom-slider-box{width:21px;height:124px;background:#34495e;background:url("+p+") repeat-y;border:1px solid #35383b;position:relative}.maptalks-zoom-slider-box .maptalks-zoom-slider-ruler{width:5px;height:112px;background:#372e2b;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;margin:4px auto;position:relative}.maptalks-zoom-slider-box .maptalks-zoom-slider-ruler .maptalks-zoom-slider-reading{width:5px;height:50%;position:absolute;bottom:0;left:0;background:#1bbc9b;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px}.maptalks-zoom-slider-box .maptalks-zoom-slider-dot{width:15px;height:15px;background:url("+m+") no-repeat;position:absolute;top:50%;left:3px;cursor:pointer}.maptalks-toolbar-vertical{margin:0;overflow:visible}.maptalks-toolbar-horizonal ul,.maptalks-toolbar-vertical ul{margin:0;padding:0}.maptalks-toolbar-vertical ul li+li{border-top:1px solid #425568}.maptalks-toolbar-vertical li{text-align:center;list-style:none;line-height:28px;color:#fff;background:#34495e;min-width:10px;min-height:28px;position:relative;padding:0 10px}.maptalks-toolbar-vertical li:hover{background:#1bbc9b}.maptalks-toolbar-vertical li .maptalks-dropMenu{padding:0;position:absolute;top:0;overflow:visible}.maptalks-toolbar-vertical li .maptalks-dropMenu li{list-style:none;min-width:95px;background:#223140;height:27px}.maptalks-toolbar-vertical li .maptalks-dropMenu li a{color:#fff;display:block;line-height:27px;background:url("+g+") no-repeat 14px 10px;text-indent:33px;text-decoration:none;font-size:12px}.maptalks-toolbar-vertical li .maptalks-dropMenu em.maptalks-ico{display:block;width:5px;height:6px;position:absolute;top:12px;right:-4px}.maptalks-toolbar-vertical li .maptalks-dropMenu li.maptalks-on,.maptalks-toolbar-vertical li .maptalks-dropMenu li:hover{background:#0e595e}.maptalks-toolbar-horizonal{margin:0;overflow:visible}.maptalks-toolbar-horizonal li{text-align:left;line-height:28px;color:#fff;padding:0 10px;list-style:none;min-width:28px;min-height:28px;float:left;background:#34495e;position:relative}.maptalks-toolbar-horizonal ul li+li{border-left:1px solid #425568}.maptalks-toolbar-horizonal li:hover{background:#1bbc9b}.maptalks-toolbar-horizonal li .maptalks-dropMenu{display:block;position:absolute;left:0;overflow:visible}.maptalks-toolbar-horizonal li .maptalks-dropMenu li{list-style:none;min-width:95px;background:#223140;height:27px}.maptalks-toolbar-horizonal li .maptalks-dropMenu li+li{border-left:none;border-top:1px solid #425568}.maptalks-toolbar-horizonal li .maptalks-dropMenu li a{color:#fff;display:block;line-height:27px;background:url("+g+") no-repeat 5px 10px;text-indent:20px;text-decoration:none;font-size:12px}.maptalks-toolbar-horizonal li .maptalks-dropMenu em.maptalks-ico{display:block;width:5px;height:6px;position:absolute;top:-4px;left:12px}.maptalks-toolbar-horizonal .maptalks-dropMenu li:hover{background:#0e595e}.maptalks-menu{background:#fff;padding:1px;width:172px;border:1px solid #b4b3b3}.maptalks-menu em.maptalks-ico{display:block;width:17px;height:10px;background:url("+v+") no-repeat;position:absolute;top:-10px;left:8px}.maptalks-menu .maptalks-menu-items{color:#5a5756;margin:0;padding:0;font-size:12px}.maptalks-menu .maptalks-menu-items li{list-style:none;height:30px;line-height:30px;text-indent:16px}.maptalks-menu .maptalks-menu-items li:hover{background:#007fbe;color:#fff;cursor:pointer}.maptalks-menu .maptalks-menu-items li.maptalks-menu-splitter{list-style:none;height:2px;background:#ddd}.maptalks-msgBox{background:#fff;border:1px solid #b4b3b3;border-radius:3px}.maptalks-msgBox em.maptalks-ico{display:block;width:17px;height:10px;background:url("+y+") no-repeat;position:absolute;left:50%;margin-left:-5px;bottom:-10px}.maptalks-msgBox h2{display:block;height:30px;line-height:30px;font-weight:700;font-size:14px;padding:0 10px;margin:0}.maptalks-msgBox a.maptalks-close{display:block;width:13px;height:13px;background:url("+_+") no-repeat;position:absolute;top:8px;right:10px}.maptalks-msgBox a.maptalks-close:hover{background:url("+x+") no-repeat}.maptalks-msgBox .maptalks-msgContent{font-size:12px;padding:10px;min-width:200px}.maptalks-panel{background:#fff;border:1px solid #b4b3b3;border-radius:3px}.maptalks-panel .maptalks-panel-content{padding:10px;min-width:200px;min-height:60px}.maptalks-panel a.maptalks-close{display:block;width:6px;height:7px;background:url("+b+") no-repeat;position:absolute;top:10px;right:10px}.maptalks-panel a.maptalks-close:hover{opacity:.5}.maptalks-attribution{display:inline-block;opacity:1;background:#fff;background-color:hsla(0,0%,100%,.7);padding:0;font-size:13px;font-family:microsoft yahei,Helvetica Neue,Helvetica,sans-serif}.maptalks-attribution a{text-decoration:none;color:#0078a8}.maptalks-attribution a:hover{text-decoration:underline}.maptalks-overview{background:#fff;border:1px solid #b4b3b3;width:100%;height:100%}.maptalks-overview-button{cursor:pointer;background:#fff;width:18px;height:18px;position:absolute;bottom:1px;right:1px;font:16px sans-serif;text-align:center;line-height:16px;border:1px solid #b4b3b3;color:#363539}.maptalks-layer-switcher ul{list-style:none}.maptalks-layer-switcher .panel>ul{padding-left:1em}.maptalks-layer-switcher .group>ul{padding-left:10px}.maptalks-layer-switcher .group+.group{padding-top:1em}.maptalks-layer-switcher label{text-overflow:ellipsis;overflow:hidden;display:inline-block;font-size:14px;white-space:nowrap;color:#bbb}.maptalks-layer-switcher .group>label{font-weight:700;color:#ddd;width:100%}.maptalks-layer-switcher .layer label{padding-top:5px;width:92%}.maptalks-layer-switcher input{margin:0 5px;position:relative;top:-2px}.maptalks-layer-switcher input[disabled=disabled]{cursor:not-allowed}.maptalks-layer-switcher input[disabled=disabled]+label{color:#666}.maptalks-layer-switcher .panel,.maptalks-layer-switcher button{border-radius:4px}.maptalks-layer-switcher button{width:28px;height:28px;background:url("+w+") no-repeat 4px 4px;background-color:#172029;border:none}.maptalks-layer-switcher.shown button{display:none}.maptalks-layer-switcher .panel{background-color:#172029;display:none;overflow-y:auto;overflow-x:hidden;min-width:120px;max-width:400px;max-height:500px}.maptalks-layer-switcher li{white-space:nowrap}.maptalks-layer-switcher li.group{margin-right:1em}.maptalks-layer-switcher.shown .panel{display:block}.maptalks-layer-switcher ::-webkit-scrollbar{width:6px}.maptalks-layer-switcher ::-webkit-scrollbar-track{background-color:#1f1f1f}.maptalks-layer-switcher ::-webkit-scrollbar-thumb{border-radius:5px;background-color:#777}.maptalks-tooltip{display:block;background:#fff;border:1px solid #b4b3b3;padding:0 4px;height:24px;line-height:24px;font-size:14px;white-space:nowrap}",""]),t.exports=e},"93b5":function(t,e,n){"use strict";n("5810")},9460:function(t,e,n){"use strict";var r=n("961e"),i=n("6446"),o=n("ca14"),a=n("c252"),s=n("c7e7"),c=n("081e"),u=n("afdf"),l=n("54ab"),h=n("6c01").f,f=n("b61d"),d=o.Symbol,p=d&&d.prototype;if(i&&c(d)&&(!("description"in p)||void 0!==d().description)){var m={},g=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),e=u(p,this)?new d(t):void 0===t?d():d(t);return""===t&&(m[e]=!0),e};f(g,d),g.prototype=p,p.constructor=g;var v="Symbol(test)"==String(d("test")),y=a(p.toString),_=a(p.valueOf),x=/^Symbol\((.*)\)[^)]+$/,b=a("".replace),w=a("".slice);h(p,"description",{configurable:!0,get:function(){var t=_(this),e=y(t);if(s(m,t))return"";var n=v?w(e,7,-1):b(e,x,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:g})}},"94b8":function(t,e,n){"use strict";var r=n("961e"),i=n("ca14"),o=n("c814"),a=n("8e04"),s=n("9a02"),c=n("41a4"),u=n("28dc"),l=n("0074"),h=n("433e"),f=n("7ba8"),d=n("519f"),p=n("a0a0"),m=d("isConcatSpreadable"),g=9007199254740991,v="Maximum allowed index exceeded",y=i.TypeError,_=p>=51||!o((function(){var t=[];return t[m]=!1,t.concat()[0]!==t})),x=f("concat"),b=function(t){if(!s(t))return!1;var e=t[m];return void 0!==e?!!e:a(t)};r({target:"Array",proto:!0,forced:!_||!x},{concat:function(t){var e,n,r,i,o,a=c(this),s=h(a,0),f=0;for(e=-1,r=arguments.length;e<r;e++)if(b(o=-1===e?a:arguments[e])){if(f+(i=u(o))>g)throw y(v);for(n=0;n<i;n++,f++)n in o&&l(s,f,o[n])}else{if(f>=g)throw y(v);l(s,f++,o)}return s.length=f,s}})},"94c2":function(t,e,n){"use strict";n("bb4d");var r=n("961e"),i=n("ca14"),o=n("cbac"),a=n("c252"),s=n("081e"),c=n("9a02"),u=function(){var t=!1,e=/[ac]/;return e.exec=function(){return t=!0,/./.exec.apply(this,arguments)},!0===e.test("abc")&&t}(),l=i.Error,h=a(/./.test);r({target:"RegExp",proto:!0,forced:!u},{test:function(t){var e=this.exec;if(!s(e))return h(this,t);var n=o(e,this,t);if(null!==n&&!c(n))throw new l("RegExp exec method returned something other than an Object or null");return!!n}})},"961e":function(t,e,n){var r=n("ca14"),i=n("064b").f,o=n("d3a9"),a=n("7219"),s=n("a2c2"),c=n("b61d"),u=n("a3e2");t.exports=function(t,e){var n,l,h,f,d,p=t.target,m=t.global,g=t.stat;if(n=m?r:g?r[p]||s(p,{}):(r[p]||{}).prototype)for(l in e){if(f=e[l],h=t.noTargetGet?(d=i(n,l))&&d.value:n[l],!u(m?l:p+(g?".":"#")+l,t.forced)&&void 0!==h){if(typeof f==typeof h)continue;c(f,h)}(t.sham||h&&h.sham)&&o(f,"sham",!0),a(n,l,f,t)}}},"96a5":function(t,e,n){var r=n("ca14"),i=n("c252"),o=n("c814"),a=n("cc43"),s=r.Object,c=i("".split);t.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?c(t,""):s(t)}:s},"96c7":function(t,e,n){var r=n("ca14"),i=n("7a02"),o=r.TypeError;t.exports=function(t){if(i(t))throw o("The method doesn't accept regular expressions");return t}},"975b":function(t,e,n){var r=n("961e"),i=n("75a1");r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},"97d8":function(t,e,n){var r=n("ca14"),i=n("9a02"),o=r.String,a=r.TypeError;t.exports=function(t){if(i(t))return t;throw a(o(t)+" is not an object")}},"988d":function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"9a02":function(t,e,n){var r=n("081e");t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},"9a1e":function(t,e,n){var r=n("ca14"),i=n("a10c"),o=n("28dc"),a=n("0074"),s=r.Array,c=Math.max;t.exports=function(t,e,n){for(var r=o(t),u=i(e,r),l=i(void 0===n?r:n,r),h=s(c(l-u,0)),f=0;u<l;u++,f++)a(h,f,t[u]);return h.length=f,h}},"9acd":function(t,e,n){var r=n("519f"),i=n("a30f"),o=n("6c01"),a=r("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:i(null)}),t.exports=function(t){s[a][t]=!0}},"9b2d":function(t,e,n){var r=n("a7fe"),i=n("cbe4"),o=[n("e280")];t.exports=r.createStore(i,o)},"9cd9":function(t,e,n){var r=n("4704"),i=n("988d").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},"9db9":function(t,e,n){var r=n("c814");t.exports=function(t){return r((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},a0a0:function(t,e,n){var r,i,o=n("ca14"),a=n("4748"),s=o.process,c=o.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(i=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},a10c:function(t,e,n){var r=n("4799"),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},a1a8:function(t,e,n){"use strict";function r(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=function(t){var e=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(e);return"/*# ".concat(n," */")}(r),o=r.sources.map((function(t){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(t," */")}));return[n].concat(o).concat([i]).join("\n")}return[n].join("\n")}t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=r(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(r)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(i[a]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);r&&i[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}},a2c2:function(t,e,n){var r=n("ca14"),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},a30f:function(t,e,n){var r,i=n("97d8"),o=n("e921"),a=n("988d"),s=n("f448"),c=n("03c2"),u=n("c4ae"),l=n("53b8"),h="prototype",f="script",d=l("IE_PROTO"),p=function(){},m=function(t){return"<script>"+t+"</"+f+">"},g=function(t){t.write(m("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}v="undefined"!=typeof document?document.domain&&r?g(r):function(){var t,e=u("iframe");return e.style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(m("document.F=Object")),t.close(),t.F}():g(r);for(var t=a.length;t--;)delete v[h][a[t]];return v()};s[d]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(p[h]=i(t),n=new p,p[h]=null,n[d]=t):n=v(),void 0===e?n:o(n,e)}},a3e2:function(t,e,n){var r=n("c814"),i=n("081e"),o=/#|\.prototype\./,a=function(t,e){var n=c[s(t)];return n==l||n!=u&&(i(e)?r(e):!!e)},s=a.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},a42a:function(t,e,n){var r=n("ca14"),i=n("cbac"),o=n("b0c4"),a=n("97d8"),s=n("82b8"),c=n("190b"),u=r.TypeError;t.exports=function(t,e){var n=arguments.length<2?c(t):e;if(o(n))return a(i(n,t));throw u(s(t)+" is not iterable")}},a434:function(t,e,n){var r=n("ca14"),i=n("cbac"),o=n("9a02"),a=n("62b4"),s=n("1ffe"),c=n("18aa"),u=n("519f"),l=r.TypeError,h=u("toPrimitive");t.exports=function(t,e){if(!o(t)||a(t))return t;var n,r=s(t,h);if(r){if(void 0===e&&(e="default"),n=i(r,t,e),!o(n)||a(n))return n;throw l("Can't convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},a49e:function(t,e,n){var r=n("ca14"),i=n("0b57"),o=n("2ccb"),a=n("dc61"),s=n("d3a9"),c=function(t){if(t&&t.forEach!==a)try{s(t,"forEach",a)}catch(e){t.forEach=a}};for(var u in i)i[u]&&c(r[u]&&r[u].prototype);c(o)},a64e:function(t,e,n){var r=n("ca14"),i=n("0b57"),o=n("2ccb"),a=n("6e68"),s=n("d3a9"),c=n("519f"),u=c("iterator"),l=c("toStringTag"),h=a.values,f=function(t,e){if(t){if(t[u]!==h)try{s(t,u,h)}catch(e){t[u]=h}if(t[l]||s(t,l,e),i[e])for(var n in a)if(t[n]!==a[n])try{s(t,n,a[n])}catch(e){t[n]=a[n]}}};for(var d in i)f(r[d]&&r[d].prototype,d);f(o,"DOMTokenList")},a7fb:function(t,e,n){var r=n("ca14"),i=n("cbac"),o=n("97d8"),a=n("081e"),s=n("cc43"),c=n("466a"),u=r.TypeError;t.exports=function(t,e){var n=t.exec;if(a(n)){var r=i(n,t,e);return null!==r&&o(r),r}if("RegExp"===s(t))return i(c,t,e);throw u("RegExp#exec called on incompatible receiver")}},a7fe:function(t,e,n){var r=n("3a40"),i=r.slice,o=r.pluck,a=r.each,s=r.bind,c=r.create,u=r.isList,l=r.isFunction,h=r.isObject;t.exports={createStore:d};var f={version:"2.0.12",enabled:!1,get:function(t,e){var n=this.storage.read(this._namespacePrefix+t);return this._deserialize(n,e)},set:function(t,e){return void 0===e?this.remove(t):(this.storage.write(this._namespacePrefix+t,this._serialize(e)),e)},remove:function(t){this.storage.remove(this._namespacePrefix+t)},each:function(t){var e=this;this.storage.each((function(n,r){t.call(e,e._deserialize(n),(r||"").replace(e._namespaceRegexp,""))}))},clearAll:function(){this.storage.clearAll()},hasNamespace:function(t){return this._namespacePrefix=="__storejs_"+t+"_"},createStore:function(){return d.apply(this,arguments)},addPlugin:function(t){this._addPlugin(t)},namespace:function(t){return d(this.storage,this.plugins,t)}};function d(t,e,n){n||(n=""),t&&!u(t)&&(t=[t]),e&&!u(e)&&(e=[e]);var r=n?"__storejs_"+n+"_":"",d=n?new RegExp("^"+r):null;if(!/^[a-zA-Z0-9_\-]*$/.test(n))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var p=c({_namespacePrefix:r,_namespaceRegexp:d,_testStorage:function(t){try{var e="__storejs__test__";t.write(e,e);var n=t.read(e)===e;return t.remove(e),n}catch(t){return!1}},_assignPluginFnProp:function(t,e){var n=this[e];this[e]=function(){var e=i(arguments,0),r=this;function o(){if(n)return a(arguments,(function(t,n){e[n]=t})),n.apply(r,e)}var s=[o].concat(e);return t.apply(r,s)}},_serialize:function(t){return JSON.stringify(t)},_deserialize:function(t,e){if(!t)return e;var n="";try{n=JSON.parse(t)}catch(e){n=t}return void 0!==n?n:e},_addStorage:function(t){this.enabled||this._testStorage(t)&&(this.storage=t,this.enabled=!0)},_addPlugin:function(t){var e=this;if(u(t))a(t,(function(t){e._addPlugin(t)}));else if(!o(this.plugins,(function(e){return t===e}))){if(this.plugins.push(t),!l(t))throw new Error("Plugins must be function values that return objects");var n=t.call(this);if(!h(n))throw new Error("Plugins must return an object of function properties");a(n,(function(n,r){if(!l(n))throw new Error("Bad plugin property: "+r+" from plugin "+t.name+". Plugins should only return functions.");e._assignPluginFnProp(n,r)}))}},addStorage:function(t){(function(){var t="undefined"==typeof console?null:console;if(t){var e=t.warn?t.warn:t.log;e.apply(t,arguments)}})("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(t)}},f,{plugins:[]});return p.raw={},a(p,(function(t,e){l(t)&&(p.raw[e]=s(p,t))})),a(t,(function(t){p._addStorage(t)})),a(e,(function(t){p._addPlugin(t)})),p}},a815:function(t,e,n){"use strict";var r=n("ca14"),i=n("ad0f"),o=n("cbac"),a=n("41a4"),s=n("6599"),c=n("bfea"),u=n("6d9b"),l=n("28dc"),h=n("0074"),f=n("a42a"),d=n("190b"),p=r.Array;t.exports=function(t){var e=a(t),n=u(this),r=arguments.length,m=r>1?arguments[1]:void 0,g=void 0!==m;g&&(m=i(m,r>2?arguments[2]:void 0));var v,y,_,x,b,w,M=d(e),S=0;if(!M||this==p&&c(M))for(v=l(e),y=n?new this(v):p(v);v>S;S++)w=g?m(e[S],S):e[S],h(y,S,w);else for(b=(x=f(e,M)).next,y=n?new this:[];!(_=o(b,x)).done;S++)w=g?s(x,m,[_.value,S],!0):_.value,h(y,S,w);return y.length=S,y}},a849:function(t,e,n){"use strict";var r=n("c814");t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},a91d:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAKN2lDQ1BzUkdCIElFQzYxOTY2LTIuMQAAeJydlndUU9kWh8+9N71QkhCKlNBraFICSA29SJEuKjEJEErAkAAiNkRUcERRkaYIMijggKNDkbEiioUBUbHrBBlE1HFwFBuWSWStGd+8ee/Nm98f935rn73P3Wfvfda6AJD8gwXCTFgJgAyhWBTh58WIjYtnYAcBDPAAA2wA4HCzs0IW+EYCmQJ82IxsmRP4F726DiD5+yrTP4zBAP+flLlZIjEAUJiM5/L42VwZF8k4PVecJbdPyZi2NE3OMErOIlmCMlaTc/IsW3z2mWUPOfMyhDwZy3PO4mXw5Nwn4405Er6MkWAZF+cI+LkyviZjg3RJhkDGb+SxGXxONgAoktwu5nNTZGwtY5IoMoIt43kA4EjJX/DSL1jMzxPLD8XOzFouEiSniBkmXFOGjZMTi+HPz03ni8XMMA43jSPiMdiZGVkc4XIAZs/8WRR5bRmyIjvYODk4MG0tbb4o1H9d/JuS93aWXoR/7hlEH/jD9ld+mQ0AsKZltdn6h21pFQBd6wFQu/2HzWAvAIqyvnUOfXEeunxeUsTiLGcrq9zcXEsBn2spL+jv+p8Of0NffM9Svt3v5WF485M4knQxQ143bmZ6pkTEyM7icPkM5p+H+B8H/nUeFhH8JL6IL5RFRMumTCBMlrVbyBOIBZlChkD4n5r4D8P+pNm5lona+BHQllgCpSEaQH4eACgqESAJe2Qr0O99C8ZHA/nNi9GZmJ37z4L+fVe4TP7IFiR/jmNHRDK4ElHO7Jr8WgI0IABFQAPqQBvoAxPABLbAEbgAD+ADAkEoiARxYDHgghSQAUQgFxSAtaAYlIKtYCeoBnWgETSDNnAYdIFj4DQ4By6By2AE3AFSMA6egCnwCsxAEISFyBAVUod0IEPIHLKFWJAb5AMFQxFQHJQIJUNCSAIVQOugUqgcqobqoWboW+godBq6AA1Dt6BRaBL6FXoHIzAJpsFasBFsBbNgTzgIjoQXwcnwMjgfLoK3wJVwA3wQ7oRPw5fgEVgKP4GnEYAQETqiizARFsJGQpF4JAkRIauQEqQCaUDakB6kH7mKSJGnyFsUBkVFMVBMlAvKHxWF4qKWoVahNqOqUQdQnag+1FXUKGoK9RFNRmuizdHO6AB0LDoZnYsuRlegm9Ad6LPoEfQ4+hUGg6FjjDGOGH9MHCYVswKzGbMb0445hRnGjGGmsVisOtYc64oNxXKwYmwxtgp7EHsSewU7jn2DI+J0cLY4X1w8TogrxFXgWnAncFdwE7gZvBLeEO+MD8Xz8MvxZfhGfA9+CD+OnyEoE4wJroRIQiphLaGS0EY4S7hLeEEkEvWITsRwooC4hlhJPEQ8TxwlviVRSGYkNimBJCFtIe0nnSLdIr0gk8lGZA9yPFlM3kJuJp8h3ye/UaAqWCoEKPAUVivUKHQqXFF4pohXNFT0VFysmK9YoXhEcUjxqRJeyUiJrcRRWqVUo3RU6YbStDJV2UY5VDlDebNyi/IF5UcULMWI4kPhUYoo+yhnKGNUhKpPZVO51HXURupZ6jgNQzOmBdBSaaW0b2iDtCkVioqdSrRKnkqNynEVKR2hG9ED6On0Mvph+nX6O1UtVU9Vvuom1TbVK6qv1eaoeajx1UrU2tVG1N6pM9R91NPUt6l3qd/TQGmYaYRr5Grs0Tir8XQObY7LHO6ckjmH59zWhDXNNCM0V2ju0xzQnNbS1vLTytKq0jqj9VSbru2hnaq9Q/uE9qQOVcdNR6CzQ+ekzmOGCsOTkc6oZPQxpnQ1df11Jbr1uoO6M3rGelF6hXrtevf0Cfos/ST9Hfq9+lMGOgYhBgUGrQa3DfGGLMMUw12G/YavjYyNYow2GHUZPTJWMw4wzjduNb5rQjZxN1lm0mByzRRjyjJNM91tetkMNrM3SzGrMRsyh80dzAXmu82HLdAWThZCiwaLG0wS05OZw2xljlrSLYMtCy27LJ9ZGVjFW22z6rf6aG1vnW7daH3HhmITaFNo02Pzq62ZLde2xvbaXPJc37mr53bPfW5nbse322N3055qH2K/wb7X/oODo4PIoc1h0tHAMdGx1vEGi8YKY21mnXdCO3k5rXY65vTW2cFZ7HzY+RcXpkuaS4vLo3nG8/jzGueNueq5clzrXaVuDLdEt71uUnddd457g/sDD30PnkeTx4SnqWeq50HPZ17WXiKvDq/XbGf2SvYpb8Tbz7vEe9CH4hPlU+1z31fPN9m31XfKz95vhd8pf7R/kP82/xsBWgHcgOaAqUDHwJWBfUGkoAVB1UEPgs2CRcE9IXBIYMj2kLvzDecL53eFgtCA0O2h98KMw5aFfR+OCQ8Lrwl/GGETURDRv4C6YMmClgWvIr0iyyLvRJlESaJ6oxWjE6Kbo1/HeMeUx0hjrWJXxl6K04gTxHXHY+Oj45vipxf6LNy5cDzBPqE44foi40V5iy4s1licvvj4EsUlnCVHEtGJMYktie85oZwGzvTSgKW1S6e4bO4u7hOeB28Hb5Lvyi/nTyS5JpUnPUp2Td6ePJninlKR8lTAFlQLnqf6p9alvk4LTduf9ik9Jr09A5eRmHFUSBGmCfsytTPzMoezzLOKs6TLnJftXDYlChI1ZUPZi7K7xTTZz9SAxESyXjKa45ZTk/MmNzr3SJ5ynjBvYLnZ8k3LJ/J9879egVrBXdFboFuwtmB0pefK+lXQqqWrelfrry5aPb7Gb82BtYS1aWt/KLQuLC98uS5mXU+RVtGaorH1futbixWKRcU3NrhsqNuI2ijYOLhp7qaqTR9LeCUXS61LK0rfb+ZuvviVzVeVX33akrRlsMyhbM9WzFbh1uvb3LcdKFcuzy8f2x6yvXMHY0fJjpc7l+y8UGFXUbeLsEuyS1oZXNldZVC1tep9dUr1SI1XTXutZu2m2te7ebuv7PHY01anVVda926vYO/Ner/6zgajhop9mH05+x42Rjf2f836urlJo6m06cN+4X7pgYgDfc2Ozc0tmi1lrXCrpHXyYMLBy994f9Pdxmyrb6e3lx4ChySHHn+b+O31w0GHe4+wjrR9Z/hdbQe1o6QT6lzeOdWV0iXtjusePhp4tLfHpafje8vv9x/TPVZzXOV42QnCiaITn07mn5w+lXXq6enk02O9S3rvnIk9c60vvG/wbNDZ8+d8z53p9+w/ed71/LELzheOXmRd7LrkcKlzwH6g4wf7HzoGHQY7hxyHui87Xe4Znjd84or7ldNXva+euxZw7dLI/JHh61HXb95IuCG9ybv56Fb6ree3c27P3FlzF3235J7SvYr7mvcbfjT9sV3qID0+6j068GDBgztj3LEnP2X/9H686CH5YcWEzkTzI9tHxyZ9Jy8/Xvh4/EnWk5mnxT8r/1z7zOTZd794/DIwFTs1/lz0/NOvm1+ov9j/0u5l73TY9P1XGa9mXpe8UX9z4C3rbf+7mHcTM7nvse8rP5h+6PkY9PHup4xPn34D94Tz+49wZioAAAAJcEhZcwAACxIAAAsSAdLdfvwAAADrSURBVHicY/n//z8DqYAFRDAxMTESq+Hfv3//WUi2BmYTMmhqatL7+/fv5cbGxv/19fWSbGxsf6urq1/h1ARU5A+0fj0jI+MsILsXKLTv169fP1atWqUeFhb2D6smFhaWi3/+/HkMZKYBNcYBA4kDyJ6NrAFDU21t7QOgDSlA5k6QBqDGW0A6C6+fmpublYA2zQOxgRq+ATWoAZnTgDgdpyagBk0gJQXUMI2ZmbkPyN8P5DsAbWcFBsxvrJqAEluBtmkDFd8EOvV/a2urOTAg/iJrwNAE9dcNGBsY1C/Q5bFqIgaANYGSBimaAADgbhvLwt8+AAAAAElFTkSuQmCC"},aa5a:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAUCAYAAABvVQZ0AAAAAXNSR0IArs4c6QAAAUVJREFUOBGdkjFuAjEQRUmBqJC4AvWWSCm24xp0EX3Sp9uLIOUQaejSUXEMGhSJGyzvOx7Ha3mMxEgf2+M/j/HAbNaIcRxXaECnuK4a9vpVBrmxz0NnwR9DZYrmHHIkt0NaLXwoDg/S573j65EP5fIDlZ1MIDlQewf6rosrsvhm83gef0C9Rn6Lq2Ab5LdetIXXG8kmWTE159GA/I8EU4dejepAv8i7c1U96vTMC1L8oG0DKo/GkTqRH6lOcRFsj351ilGDDtx5EJWpfh8aYbNEnzHJEmIClZHsFilvIYjqlgZacJhHswd9w+NCVI8W+rYz0nAHFP5jrDUo6fCc1In8SHWqPwt2QBYeVF15EKs92FN7MkfLsk6gwcQH+bwTs6su/TjmldmDrrmz57QhiRY3FagBtNY7KSHluYA+B6lAX8pc7XwHMYFxBb/kUuEAAAAASUVORK5CYII="},ab58:function(t,e,n){"use strict";var r=n("97d8");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},ac3e:function(t,e,n){"use strict";var r=n("c252"),i=n("265d").PROPER,o=n("7219"),a=n("97d8"),s=n("afdf"),c=n("54ab"),u=n("c814"),l=n("ab58"),h="toString",f=RegExp.prototype,d=f[h],p=r(l),m=u((function(){return"/a/b"!=d.call({source:"a",flags:"b"})})),g=i&&d.name!=h;(m||g)&&o(RegExp.prototype,h,(function(){var t=a(this),e=c(t.source),n=t.flags;return"/"+e+"/"+c(void 0===n&&s(f,t)&&!("flags"in f)?p(t):n)}),{unsafe:!0})},ac49:function(t,e,n){"use strict";var r=n("961e"),i=n("7fb3"),o=n("41a4"),a=n("28dc"),s=n("4799"),c=n("433e");r({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=o(this),n=a(e),r=c(e,0);return r.length=i(r,e,e,n,0,void 0===t?1:s(t)),r}})},acb4:function(t,e,n){var r=n("f18d");r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals),(0,n("5925").default)("8b59ec86",r,!0,{sourceMap:!1,shadowMode:!1})},ad0f:function(t,e,n){var r=n("c252"),i=n("b0c4"),o=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?o(t,e):function(){return t.apply(e,arguments)}}},ada0:function(t,e,n){function r(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=r=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),r(e)}n("affe"),n("9460"),n("1576"),n("72ae"),n("f56c"),n("a64e"),t.exports=r,t.exports.default=t.exports,t.exports.__esModule=!0},adb6:function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},af71:function(t,e,n){n("9acd")("flat")},afdf:function(t,e,n){var r=n("c252");t.exports=r({}.isPrototypeOf)},affe:function(t,e,n){"use strict";var r=n("961e"),i=n("ca14"),o=n("d45e"),a=n("61a6"),s=n("cbac"),c=n("c252"),u=n("9153"),l=n("6446"),h=n("5ce1"),f=n("c814"),d=n("c7e7"),p=n("8e04"),m=n("081e"),g=n("9a02"),v=n("afdf"),y=n("62b4"),_=n("97d8"),x=n("41a4"),b=n("097d"),w=n("3e94"),M=n("54ab"),S=n("7e3c"),T=n("a30f"),E=n("5c75"),C=n("9cd9"),A=n("fec6"),P=n("b2e9"),L=n("064b"),R=n("6c01"),O=n("c829"),k=n("13eb"),I=n("7219"),D=n("34bc"),j=n("53b8"),z=n("f448"),N=n("0b61"),F=n("519f"),B=n("d42b"),H=n("18fd"),G=n("9207"),U=n("e13b"),V=n("d796").forEach,W=j("hidden"),Z="Symbol",q="prototype",Y=F("toPrimitive"),J=U.set,X=U.getterFor(Z),$=Object[q],Q=i.Symbol,K=Q&&Q[q],tt=i.TypeError,et=i.QObject,nt=o("JSON","stringify"),rt=L.f,it=R.f,ot=A.f,at=O.f,st=c([].push),ct=D("symbols"),ut=D("op-symbols"),lt=D("string-to-symbol-registry"),ht=D("symbol-to-string-registry"),ft=D("wks"),dt=!et||!et[q]||!et[q].findChild,pt=l&&f((function(){return 7!=T(it({},"a",{get:function(){return it(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=rt($,e);r&&delete $[e],it(t,e,n),r&&t!==$&&it($,e,r)}:it,mt=function(t,e){var n=ct[t]=T(K);return J(n,{type:Z,tag:t,description:e}),l||(n.description=e),n},gt=function(t,e,n){t===$&>(ut,e,n),_(t);var r=w(e);return _(n),d(ct,r)?(n.enumerable?(d(t,W)&&t[W][r]&&(t[W][r]=!1),n=T(n,{enumerable:S(0,!1)})):(d(t,W)||it(t,W,S(1,{})),t[W][r]=!0),pt(t,r,n)):it(t,r,n)},vt=function(t,e){_(t);var n=b(e),r=E(n).concat(bt(n));return V(r,(function(e){l&&!s(yt,n,e)||gt(t,e,n[e])})),t},yt=function(t){var e=w(t),n=s(at,this,e);return!(this===$&&d(ct,e)&&!d(ut,e))&&(!(n||!d(this,e)||!d(ct,e)||d(this,W)&&this[W][e])||n)},_t=function(t,e){var n=b(t),r=w(e);if(n!==$||!d(ct,r)||d(ut,r)){var i=rt(n,r);return!i||!d(ct,r)||d(n,W)&&n[W][r]||(i.enumerable=!0),i}},xt=function(t){var e=ot(b(t)),n=[];return V(e,(function(t){d(ct,t)||d(z,t)||st(n,t)})),n},bt=function(t){var e=t===$,n=ot(e?ut:b(t)),r=[];return V(n,(function(t){!d(ct,t)||e&&!d($,t)||st(r,ct[t])})),r};if(h||(I(K=(Q=function(){if(v(K,this))throw tt("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?M(arguments[0]):void 0,e=N(t),n=function(t){this===$&&s(n,ut,t),d(this,W)&&d(this[W],e)&&(this[W][e]=!1),pt(this,e,S(1,t))};return l&&dt&&pt($,e,{configurable:!0,set:n}),mt(e,t)})[q],"toString",(function(){return X(this).tag})),I(Q,"withoutSetter",(function(t){return mt(N(t),t)})),O.f=yt,R.f=gt,L.f=_t,C.f=A.f=xt,P.f=bt,B.f=function(t){return mt(F(t),t)},l&&(it(K,"description",{configurable:!0,get:function(){return X(this).description}}),u||I($,"propertyIsEnumerable",yt,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!h,sham:!h},{Symbol:Q}),V(E(ft),(function(t){H(t)})),r({target:Z,stat:!0,forced:!h},{for:function(t){var e=M(t);if(d(lt,e))return lt[e];var n=Q(e);return lt[e]=n,ht[n]=e,n},keyFor:function(t){if(!y(t))throw tt(t+" is not a symbol");if(d(ht,t))return ht[t]},useSetter:function(){dt=!0},useSimple:function(){dt=!1}}),r({target:"Object",stat:!0,forced:!h,sham:!l},{create:function(t,e){return void 0===e?T(t):vt(T(t),e)},defineProperty:gt,defineProperties:vt,getOwnPropertyDescriptor:_t}),r({target:"Object",stat:!0,forced:!h},{getOwnPropertyNames:xt,getOwnPropertySymbols:bt}),r({target:"Object",stat:!0,forced:f((function(){P.f(1)}))},{getOwnPropertySymbols:function(t){return P.f(x(t))}}),nt&&r({target:"JSON",stat:!0,forced:!h||f((function(){var t=Q();return"[null]"!=nt([t])||"{}"!=nt({a:t})||"{}"!=nt(Object(t))}))},{stringify:function(t,e,n){var r=k(arguments),i=e;if((g(e)||void 0!==t)&&!y(t))return p(e)||(e=function(t,e){if(m(i)&&(e=s(i,this,t,e)),!y(e))return e}),r[1]=e,a(nt,null,r)}}),!K[Y]){var wt=K.valueOf;I(K,Y,(function(t){return s(wt,this)}))}G(Q,Z),z[W]=!0},b0c4:function(t,e,n){var r=n("ca14"),i=n("081e"),o=n("82b8"),a=r.TypeError;t.exports=function(t){if(i(t))return t;throw a(o(t)+" is not a function")}},b0d6:function(t,e,n){"use strict";var r=n("1e0a");function i(){var t={},e=0,n=0,r=0;return{add:function(i,o){o||(o=i,i=0),i>n?n=i:i<r&&(r=i),t[i]||(t[i]=[]),t[i].push(o),e++},process:function(){for(var e=r;e<=n;e++)for(var i=t[e],o=0;o<i.length;o++)(0,i[o])()},size:function(){return e}}}t.exports=function(t){var e=(t=t||{}).reporter,n=r.getOption(t,"async",!0),o=r.getOption(t,"auto",!0);o&&!n&&(e&&e.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var a,s=i(),c=!1;function u(){for(c=!0;s.size();){var t=s;s=i(),t.process()}c=!1}function l(){a=function(t){return function(t){return setTimeout(t,0)}(t)}(u)}return{add:function(t,e){!c&&o&&n&&0===s.size()&&l(),s.add(t,e)},force:function(t){c||(void 0===t&&(t=n),a&&(function(t){clearTimeout(t)}(a),a=null),t?l():u())}}}},b155:function(t,e,n){var r=n("82c6").Symbol;t.exports=r},b243:function(t,e,n){"use strict";t.exports=function(t){function e(){}var n={log:e,warn:e,error:e};if(!t&&window.console){var r=function(t,e){t[e]=function(){var t=console[e];if(t.apply)t.apply(console,arguments);else for(var n=0;n<arguments.length;n++)t(arguments[n])}};r(n,"log"),r(n,"warn"),r(n,"error")}return n}},b2e9:function(t,e){e.f=Object.getOwnPropertySymbols},b41a:function(t,e,n){var r=n("c7e7");t.exports=function(t){return void 0!==t&&(r(t,"value")||r(t,"writable"))}},b45e:function(t,e,n){"use strict";var r=n("961e"),i=n("cbac"),o=n("9153"),a=n("265d"),s=n("081e"),c=n("fe2f"),u=n("f97a"),l=n("7464"),h=n("9207"),f=n("d3a9"),d=n("7219"),p=n("519f"),m=n("db7f"),g=n("d582"),v=a.PROPER,y=a.CONFIGURABLE,_=g.IteratorPrototype,x=g.BUGGY_SAFARI_ITERATORS,b=p("iterator"),w="keys",M="values",S="entries",T=function(){return this};t.exports=function(t,e,n,a,p,g,E){c(n,e,a);var C,A,P,L=function(t){if(t===p&&D)return D;if(!x&&t in k)return k[t];switch(t){case w:case M:case S:return function(){return new n(this,t)}}return function(){return new n(this)}},R=e+" Iterator",O=!1,k=t.prototype,I=k[b]||k["@@iterator"]||p&&k[p],D=!x&&I||L(p),j="Array"==e&&k.entries||I;if(j&&(C=u(j.call(new t)))!==Object.prototype&&C.next&&(o||u(C)===_||(l?l(C,_):s(C[b])||d(C,b,T)),h(C,R,!0,!0),o&&(m[R]=T)),v&&p==M&&I&&I.name!==M&&(!o&&y?f(k,"name",M):(O=!0,D=function(){return i(I,this)})),p)if(A={values:L(M),keys:g?D:L(w),entries:L(S)},E)for(P in A)(x||O||!(P in k))&&d(k,P,A[P]);else r({target:e,proto:!0,forced:x||O},A);return o&&!E||k[b]===D||d(k,b,D,{name:p}),m[e]=D,A}},b61d:function(t,e,n){var r=n("c7e7"),i=n("4b1a"),o=n("064b"),a=n("6c01");t.exports=function(t,e){for(var n=i(e),s=a.f,c=o.f,u=0;u<n.length;u++){var l=n[u];r(t,l)||s(t,l,c(e,l))}}},b6de:function(t,e,n){var r=n("c252"),i=n("c39c"),o=n("54ab"),a=/"/g,s=r("".replace);t.exports=function(t,e,n,r){var c=o(i(t)),u="<"+e;return""!==n&&(u+=" "+n+'="'+s(o(r),a,""")+'"'),u+">"+c+"</"+e+">"}},b7dd:function(t,e,n){"use strict";var r=n("cbac"),i=n("3b2d"),o=n("97d8"),a=n("c39c"),s=n("84f7"),c=n("54ab"),u=n("1ffe"),l=n("a7fb");i("search",(function(t,e,n){return[function(e){var n=a(this),i=null==e?void 0:u(e,t);return i?r(i,e,n):new RegExp(e)[t](c(n))},function(t){var r=o(this),i=c(t),a=n(e,r,i);if(a.done)return a.value;var u=r.lastIndex;s(u,0)||(r.lastIndex=0);var h=l(r,i);return s(r.lastIndex,u)||(r.lastIndex=u),null===h?-1:h.index}]}))},b7f4:function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},baf4:function(t,e,n){var r=n("97d8"),i=n("d7ed"),o=n("519f")("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[o])?e:i(n)}},bb4d:function(t,e,n){"use strict";var r=n("961e"),i=n("466a");r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},bc8b:function(t,e,n){"use strict";var r=n("2aa5").charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},bcad:function(t,e,n){var r=n("961e"),i=n("a815");r({target:"Array",stat:!0,forced:!n("6566")((function(t){Array.from(t)}))},{from:i})},bd0a:function(t,e,n){"use strict";var r=n("ca14"),i=n("c252"),o=n("b0c4"),a=n("9a02"),s=n("c7e7"),c=n("13eb"),u=r.Function,l=i([].concat),h=i([].join),f={},d=function(t,e,n){if(!s(f,e)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";f[e]=u("C,a","return new C("+h(r,",")+")")}return f[e](t,n)};t.exports=u.bind||function(t){var e=o(this),n=e.prototype,r=c(arguments,1),i=function(){var n=l(r,c(arguments));return this instanceof i?d(e,n.length,n):e.apply(t,n)};return a(n)&&(i.prototype=n),i}},bfea:function(t,e,n){var r=n("519f"),i=n("db7f"),o=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},c015:function(t,e,n){var r=n("b155"),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}},c226:function(t,e,n){"use strict";var r=n("961e"),i=n("ca14"),o=n("cbac"),a=n("c252"),s=n("c39c"),c=n("081e"),u=n("7a02"),l=n("54ab"),h=n("1ffe"),f=n("ab58"),d=n("fdf1"),p=n("519f"),m=n("9153"),g=p("replace"),v=RegExp.prototype,y=i.TypeError,_=a(f),x=a("".indexOf),b=a("".replace),w=a("".slice),M=Math.max,S=function(t,e,n){return n>t.length?-1:""===e?n:x(t,e,n)};r({target:"String",proto:!0},{replaceAll:function(t,e){var n,r,i,a,f,p,T,E,C,A=s(this),P=0,L=0,R="";if(null!=t){if((n=u(t))&&(r=l(s("flags"in v?t.flags:_(t))),!~x(r,"g")))throw y("`.replaceAll` does not allow non-global regexes");if(i=h(t,g))return o(i,t,A,e);if(m&&n)return b(l(A),t,e)}for(a=l(A),f=l(t),(p=c(e))||(e=l(e)),T=f.length,E=M(1,T),P=S(a,f,0);-1!==P;)C=p?l(e(f,P,a)):d(f,a,P,[],void 0,e),R+=w(a,L,P)+C,L=P+T,P=S(a,f,P+E);return L<a.length&&(R+=w(a,L)),R}})},c252:function(t,e){var n=Function.prototype,r=n.bind,i=n.call,o=r&&r.bind(i);t.exports=r?function(t){return t&&o(i,t)}:function(t){return t&&function(){return i.apply(t,arguments)}}},c39c:function(t,e,n){var r=n("ca14").TypeError;t.exports=function(t){if(null==t)throw r("Can't call method on "+t);return t}},c3f4:function(t,e,n){var r=n("ca14"),i=n("afdf"),o=r.TypeError;t.exports=function(t,e){if(i(e,t))return t;throw o("Incorrect invocation")}},c4ae:function(t,e,n){var r=n("ca14"),i=n("9a02"),o=r.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},c60e:function(t,e,n){"use strict";var r=n("d45e"),i=n("6c01"),o=n("519f"),a=n("6446"),s=o("species");t.exports=function(t){var e=r(t),n=i.f;a&&e&&!e[s]&&n(e,s,{configurable:!0,get:function(){return this}})}},c7b2:function(t,e,n){"use strict";n.r(e),n.d(e,"install",(function(){return v_})),n.d(e,"GMap",(function(){return m_}));var r={};function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function s(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,c,"next",t)}function c(t){s(o,r,i,a,c,"throw",t)}a(void 0)}))}}n.r(r),n.d(r,"ACESFilmicToneMapping",(function(){return lt})),n.d(r,"AddEquation",(function(){return k})),n.d(r,"AddOperation",(function(){return ot})),n.d(r,"AdditiveAnimationBlendMode",(function(){return tn})),n.d(r,"AdditiveBlending",(function(){return P})),n.d(r,"AlphaFormat",(function(){return Vt})),n.d(r,"AlwaysDepth",(function(){return X})),n.d(r,"AlwaysStencilFunc",(function(){return On})),n.d(r,"AmbientLight",(function(){return Lh})),n.d(r,"AmbientLightProbe",(function(){return Qh})),n.d(r,"AnimationClip",(function(){return Rl})),n.d(r,"AnimationLoader",(function(){return Fl})),n.d(r,"AnimationMixer",(function(){return Of})),n.d(r,"AnimationObjectGroup",(function(){return Lf})),n.d(r,"AnimationUtils",(function(){return yl})),n.d(r,"ArcCurve",(function(){return ql})),n.d(r,"ArrayCamera",(function(){return Zs})),n.d(r,"ArrowHelper",(function(){return bd})),n.d(r,"Audio",(function(){return lf})),n.d(r,"AudioAnalyser",(function(){return gf})),n.d(r,"AudioContext",(function(){return Jh})),n.d(r,"AudioListener",(function(){return uf})),n.d(r,"AudioLoader",(function(){return Xh})),n.d(r,"AxesHelper",(function(){return wd})),n.d(r,"AxisHelper",(function(){return yp})),n.d(r,"BackSide",(function(){return M})),n.d(r,"BasicDepthPacking",(function(){return dn})),n.d(r,"BasicShadowMap",(function(){return y})),n.d(r,"BinaryTextureLoader",(function(){return Mp})),n.d(r,"Bone",(function(){return Lc})),n.d(r,"BooleanKeyframeTrack",(function(){return Sl})),n.d(r,"BoundingBoxHelper",(function(){return _p})),n.d(r,"Box2",(function(){return Gf})),n.d(r,"Box3",(function(){return cr})),n.d(r,"Box3Helper",(function(){return gd})),n.d(r,"BoxBufferGeometry",(function(){return Mo})),n.d(r,"BoxGeometry",(function(){return Mo})),n.d(r,"BoxHelper",(function(){return md})),n.d(r,"BufferAttribute",(function(){return Di})),n.d(r,"BufferGeometry",(function(){return no})),n.d(r,"BufferGeometryLoader",(function(){return Nh})),n.d(r,"ByteType",(function(){return kt})),n.d(r,"Cache",(function(){return kl})),n.d(r,"Camera",(function(){return Ao})),n.d(r,"CameraHelper",(function(){return fd})),n.d(r,"CanvasRenderer",(function(){return Tp})),n.d(r,"CanvasTexture",(function(){return ou})),n.d(r,"CatmullRomCurve3",(function(){return Kl})),n.d(r,"CineonToneMapping",(function(){return ut})),n.d(r,"CircleBufferGeometry",(function(){return su})),n.d(r,"CircleGeometry",(function(){return su})),n.d(r,"ClampToEdgeWrapping",(function(){return xt})),n.d(r,"Clock",(function(){return nf})),n.d(r,"Color",(function(){return Ri})),n.d(r,"ColorKeyframeTrack",(function(){return Tl})),n.d(r,"CompressedTexture",(function(){return iu})),n.d(r,"CompressedTextureLoader",(function(){return Bl})),n.d(r,"ConeBufferGeometry",(function(){return uu})),n.d(r,"ConeGeometry",(function(){return uu})),n.d(r,"CubeCamera",(function(){return Lo})),n.d(r,"CubeReflectionMapping",(function(){return dt})),n.d(r,"CubeRefractionMapping",(function(){return pt})),n.d(r,"CubeTexture",(function(){return Ro})),n.d(r,"CubeTextureLoader",(function(){return Gl})),n.d(r,"CubeUVReflectionMapping",(function(){return vt})),n.d(r,"CubeUVRefractionMapping",(function(){return yt})),n.d(r,"CubicBezierCurve",(function(){return rh})),n.d(r,"CubicBezierCurve3",(function(){return ih})),n.d(r,"CubicInterpolant",(function(){return xl})),n.d(r,"CullFaceBack",(function(){return m})),n.d(r,"CullFaceFront",(function(){return g})),n.d(r,"CullFaceFrontBack",(function(){return v})),n.d(r,"CullFaceNone",(function(){return p})),n.d(r,"Curve",(function(){return Wl})),n.d(r,"CurvePath",(function(){return hh})),n.d(r,"CustomBlending",(function(){return O})),n.d(r,"CustomToneMapping",(function(){return ht})),n.d(r,"CylinderBufferGeometry",(function(){return cu})),n.d(r,"CylinderGeometry",(function(){return cu})),n.d(r,"Cylindrical",(function(){return Bf})),n.d(r,"DataTexture",(function(){return ko})),n.d(r,"DataTexture2DArray",(function(){return ra})),n.d(r,"DataTexture3D",(function(){return ia})),n.d(r,"DataTextureLoader",(function(){return Ul})),n.d(r,"DataUtils",(function(){return Td})),n.d(r,"DecrementStencilOp",(function(){return bn})),n.d(r,"DecrementWrapStencilOp",(function(){return Mn})),n.d(r,"DefaultLoadingManager",(function(){return Dl})),n.d(r,"DepthFormat",(function(){return Xt})),n.d(r,"DepthStencilFormat",(function(){return $t})),n.d(r,"DepthTexture",(function(){return au})),n.d(r,"DirectionalLight",(function(){return Ph})),n.d(r,"DirectionalLightHelper",(function(){return ud})),n.d(r,"DiscreteInterpolant",(function(){return wl})),n.d(r,"DodecahedronBufferGeometry",(function(){return hu})),n.d(r,"DodecahedronGeometry",(function(){return hu})),n.d(r,"DoubleSide",(function(){return S})),n.d(r,"DstAlphaFactor",(function(){return V})),n.d(r,"DstColorFactor",(function(){return Z})),n.d(r,"DynamicBufferAttribute",(function(){return cp})),n.d(r,"DynamicCopyUsage",(function(){return Bn})),n.d(r,"DynamicDrawUsage",(function(){return In})),n.d(r,"DynamicReadUsage",(function(){return zn})),n.d(r,"EdgesGeometry",(function(){return gu})),n.d(r,"EdgesHelper",(function(){return xp})),n.d(r,"EllipseCurve",(function(){return Zl})),n.d(r,"EqualDepth",(function(){return K})),n.d(r,"EqualStencilFunc",(function(){return Cn})),n.d(r,"EquirectangularReflectionMapping",(function(){return mt})),n.d(r,"EquirectangularRefractionMapping",(function(){return gt})),n.d(r,"Euler",(function(){return Zr})),n.d(r,"EventDispatcher",(function(){return Vn})),n.d(r,"ExtrudeBufferGeometry",(function(){return Wu})),n.d(r,"ExtrudeGeometry",(function(){return Wu})),n.d(r,"FaceColors",(function(){return $d})),n.d(r,"FileLoader",(function(){return Nl})),n.d(r,"FlatShading",(function(){return T})),n.d(r,"Float16BufferAttribute",(function(){return Ui})),n.d(r,"Float32Attribute",(function(){return gp})),n.d(r,"Float32BufferAttribute",(function(){return Vi})),n.d(r,"Float64Attribute",(function(){return vp})),n.d(r,"Float64BufferAttribute",(function(){return Wi})),n.d(r,"FloatType",(function(){return Nt})),n.d(r,"Fog",(function(){return tc})),n.d(r,"FogExp2",(function(){return Ks})),n.d(r,"Font",(function(){return Wh})),n.d(r,"FontLoader",(function(){return qh})),n.d(r,"FrontSide",(function(){return w})),n.d(r,"Frustum",(function(){return jo})),n.d(r,"GLBufferAttribute",(function(){return Df})),n.d(r,"GLSL1",(function(){return Gn})),n.d(r,"GLSL3",(function(){return Un})),n.d(r,"GammaEncoding",(function(){return sn})),n.d(r,"GreaterDepth",(function(){return et})),n.d(r,"GreaterEqualDepth",(function(){return tt})),n.d(r,"GreaterEqualStencilFunc",(function(){return Rn})),n.d(r,"GreaterStencilFunc",(function(){return Pn})),n.d(r,"GridHelper",(function(){return id})),n.d(r,"Group",(function(){return qs})),n.d(r,"HalfFloatType",(function(){return Ft})),n.d(r,"HemisphereLight",(function(){return mh})),n.d(r,"HemisphereLightHelper",(function(){return rd})),n.d(r,"HemisphereLightProbe",(function(){return $h})),n.d(r,"IcosahedronBufferGeometry",(function(){return qu})),n.d(r,"IcosahedronGeometry",(function(){return qu})),n.d(r,"ImageBitmapLoader",(function(){return Uh})),n.d(r,"ImageLoader",(function(){return Hl})),n.d(r,"ImageUtils",(function(){return $n})),n.d(r,"ImmediateRenderObject",(function(){return Zf})),n.d(r,"IncrementStencilOp",(function(){return xn})),n.d(r,"IncrementWrapStencilOp",(function(){return wn})),n.d(r,"InstancedBufferAttribute",(function(){return zh})),n.d(r,"InstancedBufferGeometry",(function(){return jh})),n.d(r,"InstancedInterleavedBuffer",(function(){return If})),n.d(r,"InstancedMesh",(function(){return Nc})),n.d(r,"Int16Attribute",(function(){return fp})),n.d(r,"Int16BufferAttribute",(function(){return Fi})),n.d(r,"Int32Attribute",(function(){return pp})),n.d(r,"Int32BufferAttribute",(function(){return Hi})),n.d(r,"Int8Attribute",(function(){return up})),n.d(r,"Int8BufferAttribute",(function(){return ji})),n.d(r,"IntType",(function(){return jt})),n.d(r,"InterleavedBuffer",(function(){return nc})),n.d(r,"InterleavedBufferAttribute",(function(){return ic})),n.d(r,"Interpolant",(function(){return _l})),n.d(r,"InterpolateDiscrete",(function(){return qe})),n.d(r,"InterpolateLinear",(function(){return Ye})),n.d(r,"InterpolateSmooth",(function(){return Je})),n.d(r,"InvertStencilOp",(function(){return Sn})),n.d(r,"JSONLoader",(function(){return Ep})),n.d(r,"KeepStencilOp",(function(){return yn})),n.d(r,"KeyframeTrack",(function(){return Ml})),n.d(r,"LOD",(function(){return Mc})),n.d(r,"LatheBufferGeometry",(function(){return Yu})),n.d(r,"LatheGeometry",(function(){return Yu})),n.d(r,"Layers",(function(){return qr})),n.d(r,"LensFlare",(function(){return Ap})),n.d(r,"LessDepth",(function(){return $})),n.d(r,"LessEqualDepth",(function(){return Q})),n.d(r,"LessEqualStencilFunc",(function(){return An})),n.d(r,"LessStencilFunc",(function(){return En})),n.d(r,"Light",(function(){return ph})),n.d(r,"LightProbe",(function(){return kh})),n.d(r,"Line",(function(){return Wc})),n.d(r,"Line3",(function(){return Wf})),n.d(r,"LineBasicMaterial",(function(){return Fc})),n.d(r,"LineCurve",(function(){return oh})),n.d(r,"LineCurve3",(function(){return ah})),n.d(r,"LineDashedMaterial",(function(){return gl})),n.d(r,"LineLoop",(function(){return Jc})),n.d(r,"LinePieces",(function(){return Jd})),n.d(r,"LineSegments",(function(){return Yc})),n.d(r,"LineStrip",(function(){return Yd})),n.d(r,"LinearEncoding",(function(){return on})),n.d(r,"LinearFilter",(function(){return Ct})),n.d(r,"LinearInterpolant",(function(){return bl})),n.d(r,"LinearMipMapLinearFilter",(function(){return Rt})),n.d(r,"LinearMipMapNearestFilter",(function(){return Pt})),n.d(r,"LinearMipmapLinearFilter",(function(){return Lt})),n.d(r,"LinearMipmapNearestFilter",(function(){return At})),n.d(r,"LinearToneMapping",(function(){return st})),n.d(r,"Loader",(function(){return jl})),n.d(r,"LoaderUtils",(function(){return Dh})),n.d(r,"LoadingManager",(function(){return Il})),n.d(r,"LogLuvEncoding",(function(){return un})),n.d(r,"LoopOnce",(function(){return Ve})),n.d(r,"LoopPingPong",(function(){return Ze})),n.d(r,"LoopRepeat",(function(){return We})),n.d(r,"LuminanceAlphaFormat",(function(){return Yt})),n.d(r,"LuminanceFormat",(function(){return qt})),n.d(r,"MOUSE",(function(){return f})),n.d(r,"Material",(function(){return Si})),n.d(r,"MaterialLoader",(function(){return Ih})),n.d(r,"Math",(function(){return qn})),n.d(r,"MathUtils",(function(){return qn})),n.d(r,"Matrix3",(function(){return Jn})),n.d(r,"Matrix4",(function(){return jr})),n.d(r,"MaxEquation",(function(){return z})),n.d(r,"Mesh",(function(){return bo})),n.d(r,"MeshBasicMaterial",(function(){return Oi})),n.d(r,"MeshDepthMaterial",(function(){return Bs})),n.d(r,"MeshDistanceMaterial",(function(){return Hs})),n.d(r,"MeshFaceMaterial",(function(){return Kd})),n.d(r,"MeshLambertMaterial",(function(){return pl})),n.d(r,"MeshMatcapMaterial",(function(){return ml})),n.d(r,"MeshNormalMaterial",(function(){return dl})),n.d(r,"MeshPhongMaterial",(function(){return hl})),n.d(r,"MeshPhysicalMaterial",(function(){return ll})),n.d(r,"MeshStandardMaterial",(function(){return ul})),n.d(r,"MeshToonMaterial",(function(){return fl})),n.d(r,"MinEquation",(function(){return j})),n.d(r,"MirroredRepeatWrapping",(function(){return bt})),n.d(r,"MixOperation",(function(){return it})),n.d(r,"MultiMaterial",(function(){return tp})),n.d(r,"MultiplyBlending",(function(){return R})),n.d(r,"MultiplyOperation",(function(){return rt})),n.d(r,"NearestFilter",(function(){return wt})),n.d(r,"NearestMipMapLinearFilter",(function(){return Et})),n.d(r,"NearestMipMapNearestFilter",(function(){return St})),n.d(r,"NearestMipmapLinearFilter",(function(){return Tt})),n.d(r,"NearestMipmapNearestFilter",(function(){return Mt})),n.d(r,"NeverDepth",(function(){return J})),n.d(r,"NeverStencilFunc",(function(){return Tn})),n.d(r,"NoBlending",(function(){return C})),n.d(r,"NoColors",(function(){return Xd})),n.d(r,"NoToneMapping",(function(){return at})),n.d(r,"NormalAnimationBlendMode",(function(){return Ke})),n.d(r,"NormalBlending",(function(){return A})),n.d(r,"NotEqualDepth",(function(){return nt})),n.d(r,"NotEqualStencilFunc",(function(){return Ln})),n.d(r,"NumberKeyframeTrack",(function(){return El})),n.d(r,"Object3D",(function(){return si})),n.d(r,"ObjectLoader",(function(){return Fh})),n.d(r,"ObjectSpaceNormalMap",(function(){return gn})),n.d(r,"OctahedronBufferGeometry",(function(){return Ju})),n.d(r,"OctahedronGeometry",(function(){return Ju})),n.d(r,"OneFactor",(function(){return F})),n.d(r,"OneMinusDstAlphaFactor",(function(){return W})),n.d(r,"OneMinusDstColorFactor",(function(){return q})),n.d(r,"OneMinusSrcAlphaFactor",(function(){return U})),n.d(r,"OneMinusSrcColorFactor",(function(){return H})),n.d(r,"OrthographicCamera",(function(){return Ch})),n.d(r,"PCFShadowMap",(function(){return _})),n.d(r,"PCFSoftShadowMap",(function(){return x})),n.d(r,"PMREMGenerator",(function(){return Gd})),n.d(r,"ParametricBufferGeometry",(function(){return Xu})),n.d(r,"ParametricGeometry",(function(){return Xu})),n.d(r,"Particle",(function(){return np})),n.d(r,"ParticleBasicMaterial",(function(){return op})),n.d(r,"ParticleSystem",(function(){return rp})),n.d(r,"ParticleSystemMaterial",(function(){return ap})),n.d(r,"Path",(function(){return fh})),n.d(r,"PerspectiveCamera",(function(){return Po})),n.d(r,"Plane",(function(){return hi})),n.d(r,"PlaneBufferGeometry",(function(){return Fo})),n.d(r,"PlaneGeometry",(function(){return Fo})),n.d(r,"PlaneHelper",(function(){return vd})),n.d(r,"PointCloud",(function(){return ep})),n.d(r,"PointCloudMaterial",(function(){return ip})),n.d(r,"PointLight",(function(){return Eh})),n.d(r,"PointLightHelper",(function(){return Kf})),n.d(r,"Points",(function(){return eu})),n.d(r,"PointsMaterial",(function(){return Xc})),n.d(r,"PolarGridHelper",(function(){return od})),n.d(r,"PolyhedronBufferGeometry",(function(){return lu})),n.d(r,"PolyhedronGeometry",(function(){return lu})),n.d(r,"PositionalAudio",(function(){return mf})),n.d(r,"PropertyBinding",(function(){return Pf})),n.d(r,"PropertyMixer",(function(){return vf})),n.d(r,"QuadraticBezierCurve",(function(){return sh})),n.d(r,"QuadraticBezierCurve3",(function(){return ch})),n.d(r,"Quaternion",(function(){return ir})),n.d(r,"QuaternionKeyframeTrack",(function(){return Al})),n.d(r,"QuaternionLinearInterpolant",(function(){return Cl})),n.d(r,"REVISION",(function(){return h})),n.d(r,"RGBADepthPacking",(function(){return pn})),n.d(r,"RGBAFormat",(function(){return Zt})),n.d(r,"RGBAIntegerFormat",(function(){return re})),n.d(r,"RGBA_ASTC_10x10_Format",(function(){return Ee})),n.d(r,"RGBA_ASTC_10x5_Format",(function(){return Me})),n.d(r,"RGBA_ASTC_10x6_Format",(function(){return Se})),n.d(r,"RGBA_ASTC_10x8_Format",(function(){return Te})),n.d(r,"RGBA_ASTC_12x10_Format",(function(){return Ce})),n.d(r,"RGBA_ASTC_12x12_Format",(function(){return Ae})),n.d(r,"RGBA_ASTC_4x4_Format",(function(){return me})),n.d(r,"RGBA_ASTC_5x4_Format",(function(){return ge})),n.d(r,"RGBA_ASTC_5x5_Format",(function(){return ve})),n.d(r,"RGBA_ASTC_6x5_Format",(function(){return ye})),n.d(r,"RGBA_ASTC_6x6_Format",(function(){return _e})),n.d(r,"RGBA_ASTC_8x5_Format",(function(){return xe})),n.d(r,"RGBA_ASTC_8x6_Format",(function(){return be})),n.d(r,"RGBA_ASTC_8x8_Format",(function(){return we})),n.d(r,"RGBA_BPTC_Format",(function(){return Pe})),n.d(r,"RGBA_ETC2_EAC_Format",(function(){return pe})),n.d(r,"RGBA_PVRTC_2BPPV1_Format",(function(){return he})),n.d(r,"RGBA_PVRTC_4BPPV1_Format",(function(){return le})),n.d(r,"RGBA_S3TC_DXT1_Format",(function(){return oe})),n.d(r,"RGBA_S3TC_DXT3_Format",(function(){return ae})),n.d(r,"RGBA_S3TC_DXT5_Format",(function(){return se})),n.d(r,"RGBDEncoding",(function(){return fn})),n.d(r,"RGBEEncoding",(function(){return cn})),n.d(r,"RGBEFormat",(function(){return Jt})),n.d(r,"RGBFormat",(function(){return Wt})),n.d(r,"RGBIntegerFormat",(function(){return ne})),n.d(r,"RGBM16Encoding",(function(){return hn})),n.d(r,"RGBM7Encoding",(function(){return ln})),n.d(r,"RGB_ETC1_Format",(function(){return fe})),n.d(r,"RGB_ETC2_Format",(function(){return de})),n.d(r,"RGB_PVRTC_2BPPV1_Format",(function(){return ue})),n.d(r,"RGB_PVRTC_4BPPV1_Format",(function(){return ce})),n.d(r,"RGB_S3TC_DXT1_Format",(function(){return ie})),n.d(r,"RGFormat",(function(){return te})),n.d(r,"RGIntegerFormat",(function(){return ee})),n.d(r,"RawShaderMaterial",(function(){return cl})),n.d(r,"Ray",(function(){return Dr})),n.d(r,"Raycaster",(function(){return jf})),n.d(r,"RectAreaLight",(function(){return Rh})),n.d(r,"RedFormat",(function(){return Qt})),n.d(r,"RedIntegerFormat",(function(){return Kt})),n.d(r,"ReinhardToneMapping",(function(){return ct})),n.d(r,"RepeatWrapping",(function(){return _t})),n.d(r,"ReplaceStencilOp",(function(){return _n})),n.d(r,"ReverseSubtractEquation",(function(){return D})),n.d(r,"RingBufferGeometry",(function(){return $u})),n.d(r,"RingGeometry",(function(){return $u})),n.d(r,"SRGB8_ALPHA8_ASTC_10x10_Format",(function(){return He})),n.d(r,"SRGB8_ALPHA8_ASTC_10x5_Format",(function(){return Ne})),n.d(r,"SRGB8_ALPHA8_ASTC_10x6_Format",(function(){return Fe})),n.d(r,"SRGB8_ALPHA8_ASTC_10x8_Format",(function(){return Be})),n.d(r,"SRGB8_ALPHA8_ASTC_12x10_Format",(function(){return Ge})),n.d(r,"SRGB8_ALPHA8_ASTC_12x12_Format",(function(){return Ue})),n.d(r,"SRGB8_ALPHA8_ASTC_4x4_Format",(function(){return Le})),n.d(r,"SRGB8_ALPHA8_ASTC_5x4_Format",(function(){return Re})),n.d(r,"SRGB8_ALPHA8_ASTC_5x5_Format",(function(){return Oe})),n.d(r,"SRGB8_ALPHA8_ASTC_6x5_Format",(function(){return ke})),n.d(r,"SRGB8_ALPHA8_ASTC_6x6_Format",(function(){return Ie})),n.d(r,"SRGB8_ALPHA8_ASTC_8x5_Format",(function(){return De})),n.d(r,"SRGB8_ALPHA8_ASTC_8x6_Format",(function(){return je})),n.d(r,"SRGB8_ALPHA8_ASTC_8x8_Format",(function(){return ze})),n.d(r,"Scene",(function(){return ec})),n.d(r,"SceneUtils",(function(){return Cp})),n.d(r,"ShaderChunk",(function(){return Bo})),n.d(r,"ShaderLib",(function(){return Go})),n.d(r,"ShaderMaterial",(function(){return Co})),n.d(r,"ShadowMaterial",(function(){return sl})),n.d(r,"Shape",(function(){return dh})),n.d(r,"ShapeBufferGeometry",(function(){return Qu})),n.d(r,"ShapeGeometry",(function(){return Qu})),n.d(r,"ShapePath",(function(){return Vh})),n.d(r,"ShapeUtils",(function(){return Gu})),n.d(r,"ShortType",(function(){return It})),n.d(r,"Skeleton",(function(){return kc})),n.d(r,"SkeletonHelper",(function(){return Qf})),n.d(r,"SkinnedMesh",(function(){return Pc})),n.d(r,"SmoothShading",(function(){return E})),n.d(r,"Sphere",(function(){return Cr})),n.d(r,"SphereBufferGeometry",(function(){return Ku})),n.d(r,"SphereGeometry",(function(){return Ku})),n.d(r,"Spherical",(function(){return Ff})),n.d(r,"SphericalHarmonics3",(function(){return Oh})),n.d(r,"SplineCurve",(function(){return uh})),n.d(r,"SpotLight",(function(){return bh})),n.d(r,"SpotLightHelper",(function(){return Yf})),n.d(r,"Sprite",(function(){return _c})),n.d(r,"SpriteMaterial",(function(){return oc})),n.d(r,"SrcAlphaFactor",(function(){return G})),n.d(r,"SrcAlphaSaturateFactor",(function(){return Y})),n.d(r,"SrcColorFactor",(function(){return B})),n.d(r,"StaticCopyUsage",(function(){return Fn})),n.d(r,"StaticDrawUsage",(function(){return kn})),n.d(r,"StaticReadUsage",(function(){return jn})),n.d(r,"StereoCamera",(function(){return ef})),n.d(r,"StreamCopyUsage",(function(){return Hn})),n.d(r,"StreamDrawUsage",(function(){return Dn})),n.d(r,"StreamReadUsage",(function(){return Nn})),n.d(r,"StringKeyframeTrack",(function(){return Pl})),n.d(r,"SubtractEquation",(function(){return I})),n.d(r,"SubtractiveBlending",(function(){return L})),n.d(r,"TOUCH",(function(){return d})),n.d(r,"TangentSpaceNormalMap",(function(){return mn})),n.d(r,"TetrahedronBufferGeometry",(function(){return tl})),n.d(r,"TetrahedronGeometry",(function(){return tl})),n.d(r,"TextBufferGeometry",(function(){return el})),n.d(r,"TextGeometry",(function(){return el})),n.d(r,"Texture",(function(){return Kn})),n.d(r,"TextureLoader",(function(){return Vl})),n.d(r,"TorusBufferGeometry",(function(){return nl})),n.d(r,"TorusGeometry",(function(){return nl})),n.d(r,"TorusKnotBufferGeometry",(function(){return rl})),n.d(r,"TorusKnotGeometry",(function(){return rl})),n.d(r,"Triangle",(function(){return wi})),n.d(r,"TriangleFanDrawMode",(function(){return rn})),n.d(r,"TriangleStripDrawMode",(function(){return nn})),n.d(r,"TrianglesDrawMode",(function(){return en})),n.d(r,"TubeBufferGeometry",(function(){return il})),n.d(r,"TubeGeometry",(function(){return il})),n.d(r,"UVMapping",(function(){return ft})),n.d(r,"Uint16Attribute",(function(){return dp})),n.d(r,"Uint16BufferAttribute",(function(){return Bi})),n.d(r,"Uint32Attribute",(function(){return mp})),n.d(r,"Uint32BufferAttribute",(function(){return Gi})),n.d(r,"Uint8Attribute",(function(){return lp})),n.d(r,"Uint8BufferAttribute",(function(){return zi})),n.d(r,"Uint8ClampedAttribute",(function(){return hp})),n.d(r,"Uint8ClampedBufferAttribute",(function(){return Ni})),n.d(r,"Uniform",(function(){return kf})),n.d(r,"UniformsLib",(function(){return Ho})),n.d(r,"UniformsUtils",(function(){return Eo})),n.d(r,"UnsignedByteType",(function(){return Ot})),n.d(r,"UnsignedInt248Type",(function(){return Ut})),n.d(r,"UnsignedIntType",(function(){return zt})),n.d(r,"UnsignedShort4444Type",(function(){return Bt})),n.d(r,"UnsignedShort5551Type",(function(){return Ht})),n.d(r,"UnsignedShort565Type",(function(){return Gt})),n.d(r,"UnsignedShortType",(function(){return Dt})),n.d(r,"VSMShadowMap",(function(){return b})),n.d(r,"Vector2",(function(){return Yn})),n.d(r,"Vector3",(function(){return or})),n.d(r,"Vector4",(function(){return er})),n.d(r,"VectorKeyframeTrack",(function(){return Ll})),n.d(r,"Vertex",(function(){return sp})),n.d(r,"VertexColors",(function(){return Qd})),n.d(r,"VideoTexture",(function(){return ru})),n.d(r,"WebGL1Renderer",(function(){return Qs})),n.d(r,"WebGLCubeRenderTarget",(function(){return Oo})),n.d(r,"WebGLMultisampleRenderTarget",(function(){return rr})),n.d(r,"WebGLRenderTarget",(function(){return nr})),n.d(r,"WebGLRenderTargetCube",(function(){return Sp})),n.d(r,"WebGLRenderer",(function(){return $s})),n.d(r,"WebGLUtils",(function(){return Ws})),n.d(r,"WireframeGeometry",(function(){return ol})),n.d(r,"WireframeHelper",(function(){return bp})),n.d(r,"WrapAroundEnding",(function(){return Qe})),n.d(r,"XHRLoader",(function(){return wp})),n.d(r,"ZeroCurvatureEnding",(function(){return Xe})),n.d(r,"ZeroFactor",(function(){return N})),n.d(r,"ZeroSlopeEnding",(function(){return $e})),n.d(r,"ZeroStencilOp",(function(){return vn})),n.d(r,"sRGBEncoding",(function(){return an})),n("6e68"),n("412f"),n("975b"),n("8bb4"),n("5408"),n("1576"),n("8e46"),n("e186"),n("bb4d"),n("21c5"),n("eff4"),n("c226");var u=n("7c98"),l=function(){function t(){i(this,t)}return a(t,[{key:"getSvgDict",value:function(t){var e=this;return Object(u.isEmpty)(t)?(console.error("svg javascript file is not null"),!1):new Promise((function(n){var r=[];e.getJSON(t).then((function(t){t.match(/<symbol id=.*?symbol>/g).map((function(t,n){var i=t.match(/id=".*?"/gi),o=t.match(/(?<=viewBox=".*?">).*?(?=<\/symbol>)/gi);r.push({id:i[0].replaceAll('"',"").replace("id=icon-",""),svg:e.createSvg(o[0])})})),n(r)}))}))}},{key:"getJSON",value:function(){var t=c(regeneratorRuntime.mark((function t(e){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(e);case 3:return n=t.sent,t.next=6,n.text();case 6:return t.abrupt("return",t.sent);case 9:t.prev=9,t.t0=t.catch(0),console.log("Request Failed",t.t0);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(e){return t.apply(this,arguments)}}()},{key:"createSvg",value:function(t){return'<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="15737">'.concat(t,"</svg>")}}]),t}();n("a49e"),n("204a"),n("acb4");
|
|
23
|
+
/**
|
|
24
|
+
* @license
|
|
25
|
+
* Copyright 2010-2021 Three.js Authors
|
|
26
|
+
* SPDX-License-Identifier: MIT
|
|
27
|
+
*/
|
|
28
|
+
const h="127",f={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},d={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},p=0,m=1,g=2,v=3,y=0,_=1,x=2,b=3,w=0,M=1,S=2,T=1,E=2,C=0,A=1,P=2,L=3,R=4,O=5,k=100,I=101,D=102,j=103,z=104,N=200,F=201,B=202,H=203,G=204,U=205,V=206,W=207,Z=208,q=209,Y=210,J=0,X=1,$=2,Q=3,K=4,tt=5,et=6,nt=7,rt=0,it=1,ot=2,at=0,st=1,ct=2,ut=3,lt=4,ht=5,ft=300,dt=301,pt=302,mt=303,gt=304,vt=306,yt=307,_t=1e3,xt=1001,bt=1002,wt=1003,Mt=1004,St=1004,Tt=1005,Et=1005,Ct=1006,At=1007,Pt=1007,Lt=1008,Rt=1008,Ot=1009,kt=1010,It=1011,Dt=1012,jt=1013,zt=1014,Nt=1015,Ft=1016,Bt=1017,Ht=1018,Gt=1019,Ut=1020,Vt=1021,Wt=1022,Zt=1023,qt=1024,Yt=1025,Jt=Zt,Xt=1026,$t=1027,Qt=1028,Kt=1029,te=1030,ee=1031,ne=1032,re=1033,ie=33776,oe=33777,ae=33778,se=33779,ce=35840,ue=35841,le=35842,he=35843,fe=36196,de=37492,pe=37496,me=37808,ge=37809,ve=37810,ye=37811,_e=37812,xe=37813,be=37814,we=37815,Me=37816,Se=37817,Te=37818,Ee=37819,Ce=37820,Ae=37821,Pe=36492,Le=37840,Re=37841,Oe=37842,ke=37843,Ie=37844,De=37845,je=37846,ze=37847,Ne=37848,Fe=37849,Be=37850,He=37851,Ge=37852,Ue=37853,Ve=2200,We=2201,Ze=2202,qe=2300,Ye=2301,Je=2302,Xe=2400,$e=2401,Qe=2402,Ke=2500,tn=2501,en=0,nn=1,rn=2,on=3e3,an=3001,sn=3007,cn=3002,un=3003,ln=3004,hn=3005,fn=3006,dn=3200,pn=3201,mn=0,gn=1,vn=0,yn=7680,_n=7681,xn=7682,bn=7683,wn=34055,Mn=34056,Sn=5386,Tn=512,En=513,Cn=514,An=515,Pn=516,Ln=517,Rn=518,On=519,kn=35044,In=35048,Dn=35040,jn=35045,zn=35049,Nn=35041,Fn=35046,Bn=35050,Hn=35042,Gn="100",Un="300 es";function Vn(){}Object.assign(Vn.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0===this._listeners)return;const n=this._listeners[t];if(void 0!==n){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}},dispatchEvent:function(t){if(void 0===this._listeners)return;const e=this._listeners[t.type];if(void 0!==e){t.target=this;const n=e.slice(0);for(let e=0,r=n.length;e<r;e++)n[e].call(this,t);t.target=null}}});const Wn=[];for(let t=0;t<256;t++)Wn[t]=(t<16?"0":"")+t.toString(16);let Zn=1234567;const qn={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){const t=4294967295*Math.random()|0,e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(Wn[255&t]+Wn[t>>8&255]+Wn[t>>16&255]+Wn[t>>24&255]+"-"+Wn[255&e]+Wn[e>>8&255]+"-"+Wn[e>>16&15|64]+Wn[e>>24&255]+"-"+Wn[63&n|128]+Wn[n>>8&255]+"-"+Wn[n>>16&255]+Wn[n>>24&255]+Wn[255&r]+Wn[r>>8&255]+Wn[r>>16&255]+Wn[r>>24&255]).toUpperCase()},clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)},inverseLerp:function(t,e,n){return t!==e?(n-t)/(e-t):0},lerp:function(t,e,n){return(1-n)*t+n*e},damp:function(t,e,n,r){return qn.lerp(t,e,1-Math.exp(-n*r))},pingpong:function(t,e=1){return e-Math.abs(qn.euclideanModulo(t,2*e)-e)},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},seededRandom:function(t){return void 0!==t&&(Zn=t%2147483647),Zn=16807*Zn%2147483647,(Zn-1)/2147483646},degToRad:function(t){return t*qn.DEG2RAD},radToDeg:function(t){return t*qn.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))},setQuaternionFromProperEuler:function(t,e,n,r,i){const o=Math.cos,a=Math.sin,s=o(n/2),c=a(n/2),u=o((e+r)/2),l=a((e+r)/2),h=o((e-r)/2),f=a((e-r)/2),d=o((r-e)/2),p=a((r-e)/2);switch(i){case"XYX":t.set(s*l,c*h,c*f,s*u);break;case"YZY":t.set(c*f,s*l,c*h,s*u);break;case"ZXZ":t.set(c*h,c*f,s*l,s*u);break;case"XZX":t.set(s*l,c*p,c*d,s*u);break;case"YXY":t.set(c*d,s*l,c*p,s*u);break;case"ZYZ":t.set(c*p,c*d,s*l,s*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}};class Yn{constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}}Yn.prototype.isVector2=!0;class Jn{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(t,e,n,r,i,o,a,s,c){const u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],u=n[4],l=n[7],h=n[2],f=n[5],d=n[8],p=r[0],m=r[3],g=r[6],v=r[1],y=r[4],_=r[7],x=r[2],b=r[5],w=r[8];return i[0]=o*p+a*v+s*x,i[3]=o*m+a*y+s*b,i[6]=o*g+a*_+s*w,i[1]=c*p+u*v+l*x,i[4]=c*m+u*y+l*b,i[7]=c*g+u*_+l*w,i[2]=h*p+f*v+d*x,i[5]=h*m+f*y+d*b,i[8]=h*g+f*_+d*w,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*i*u+n*a*s+r*i*c-r*o*s}invert(){const t=this.elements,e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8],l=u*o-a*c,h=a*s-u*i,f=c*i-o*s,d=e*l+n*h+r*f;if(0===d)return this.set(0,0,0,0,0,0,0,0,0);const p=1/d;return t[0]=l*p,t[1]=(r*c-u*n)*p,t[2]=(a*n-r*o)*p,t[3]=h*p,t[4]=(u*e-r*s)*p,t[5]=(r*i-a*e)*p,t[6]=f*p,t[7]=(n*s-c*e)*p,t[8]=(o*e-n*i)*p,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,r,i,o,a){const s=Math.cos(i),c=Math.sin(i);return this.set(n*s,n*c,-n*(s*o+c*a)+o+t,-r*c,r*s,-r*(-c*o+s*a)+a+e,0,0,1),this}scale(t,e){const n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this}rotate(t){const e=Math.cos(t),n=Math.sin(t),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],u=r[7];return r[0]=e*i+n*s,r[3]=e*o+n*c,r[6]=e*a+n*u,r[1]=-n*i+e*s,r[4]=-n*o+e*c,r[7]=-n*a+e*u,this}translate(t,e){const n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this}equals(t){const e=this.elements,n=t.elements;for(let t=0;t<9;t++)if(e[t]!==n[t])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return(new this.constructor).fromArray(this.elements)}}let Xn;Jn.prototype.isMatrix3=!0;const $n={getDataURL:function(t){if(/^data:/i.test(t.src))return t.src;if("undefined"==typeof HTMLCanvasElement)return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{void 0===Xn&&(Xn=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),Xn.width=t.width,Xn.height=t.height;const n=Xn.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=Xn}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}};let Qn=0;class Kn extends Vn{constructor(t=Kn.DEFAULT_IMAGE,e=Kn.DEFAULT_MAPPING,n=xt,r=xt,i=Ct,o=Lt,a=Zt,s=Ot,c=1,u=on){super(),Object.defineProperty(this,"id",{value:Qn++}),this.uuid=qn.generateUUID(),this.name="",this.image=t,this.mipmaps=[],this.mapping=e,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=o,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=s,this.offset=new Yn(0,0),this.repeat=new Yn(1,1),this.center=new Yn(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Jn,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=u,this.version=0,this.onUpdate=null}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this}toJSON(t){const e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];const n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){const r=this.image;if(void 0===r.uuid&&(r.uuid=qn.generateUUID()),!e&&void 0===t.images[r.uuid]){let e;if(Array.isArray(r)){e=[];for(let t=0,n=r.length;t<n;t++)r[t].isDataTexture?e.push(tr(r[t].image)):e.push(tr(r[t]))}else e=tr(r);t.images[r.uuid]={uuid:r.uuid,url:e}}n.image=r.uuid}return e||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==ft)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case _t:t.x=t.x-Math.floor(t.x);break;case xt:t.x=t.x<0?0:1;break;case bt:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case _t:t.y=t.y-Math.floor(t.y);break;case xt:t.y=t.y<0?0:1;break;case bt:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&this.version++}}function tr(t){return"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?$n.getDataURL(t):t.data?{data:Array.prototype.slice.call(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}Kn.DEFAULT_IMAGE=void 0,Kn.DEFAULT_MAPPING=ft,Kn.prototype.isTexture=!0;class er{constructor(t=0,e=0,n=0,r=1){this.x=t,this.y=e,this.z=n,this.w=r}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this}add(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,r,i;const o=.01,a=.1,s=t.elements,c=s[0],u=s[4],l=s[8],h=s[1],f=s[5],d=s[9],p=s[2],m=s[6],g=s[10];if(Math.abs(u-h)<o&&Math.abs(l-p)<o&&Math.abs(d-m)<o){if(Math.abs(u+h)<a&&Math.abs(l+p)<a&&Math.abs(d+m)<a&&Math.abs(c+f+g-3)<a)return this.set(1,0,0,0),this;e=Math.PI;const t=(c+1)/2,s=(f+1)/2,v=(g+1)/2,y=(u+h)/4,_=(l+p)/4,x=(d+m)/4;return t>s&&t>v?t<o?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(t),r=y/n,i=_/n):s>v?s<o?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(s),n=y/r,i=x/r):v<o?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(v),n=_/i,r=x/i),this.set(n,r,i,e),this}let v=Math.sqrt((m-d)*(m-d)+(l-p)*(l-p)+(h-u)*(h-u));return Math.abs(v)<.001&&(v=1),this.x=(m-d)/v,this.y=(l-p)/v,this.z=(h-u)/v,this.w=Math.acos((c+f+g-1)/2),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}}er.prototype.isVector4=!0;class nr extends Vn{constructor(t,e,n){super(),this.width=t,this.height=e,this.depth=1,this.scissor=new er(0,0,t,e),this.scissorTest=!1,this.viewport=new er(0,0,t,e),n=n||{},this.texture=new Kn(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.image={},this.texture.image.width=t,this.texture.image.height=e,this.texture.image.depth=1,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:Ct,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0!==n.stencilBuffer&&n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}setTexture(t){t.image={width:this.width,height:this.height,depth:this.depth},this.texture=t}setSize(t,e,n=1){this.width===t&&this.height===e&&this.depth===n||(this.width=t,this.height=e,this.depth=n,this.texture.image.width=t,this.texture.image.height=e,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return(new this.constructor).copy(this)}copy(t){return this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}}nr.prototype.isWebGLRenderTarget=!0;class rr extends nr{constructor(t,e,n){super(t,e,n),this.samples=4}copy(t){return super.copy.call(this,t),this.samples=t.samples,this}}rr.prototype.isWebGLMultisampleRenderTarget=!0;class ir{constructor(t=0,e=0,n=0,r=1){this._x=t,this._y=e,this._z=n,this._w=r}static slerp(t,e,n,r){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),n.slerpQuaternions(t,e,r)}static slerpFlat(t,e,n,r,i,o,a){let s=n[r+0],c=n[r+1],u=n[r+2],l=n[r+3];const h=i[o+0],f=i[o+1],d=i[o+2],p=i[o+3];if(0===a)return t[e+0]=s,t[e+1]=c,t[e+2]=u,void(t[e+3]=l);if(1===a)return t[e+0]=h,t[e+1]=f,t[e+2]=d,void(t[e+3]=p);if(l!==p||s!==h||c!==f||u!==d){let t=1-a;const e=s*h+c*f+u*d+l*p,n=e>=0?1:-1,r=1-e*e;if(r>Number.EPSILON){const i=Math.sqrt(r),o=Math.atan2(i,e*n);t=Math.sin(t*o)/i,a=Math.sin(a*o)/i}const i=a*n;if(s=s*t+h*i,c=c*t+f*i,u=u*t+d*i,l=l*t+p*i,t===1-a){const t=1/Math.sqrt(s*s+c*c+u*u+l*l);s*=t,c*=t,u*=t,l*=t}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=l}static multiplyQuaternionsFlat(t,e,n,r,i,o){const a=n[r],s=n[r+1],c=n[r+2],u=n[r+3],l=i[o],h=i[o+1],f=i[o+2],d=i[o+3];return t[e]=a*d+u*l+s*f-c*h,t[e+1]=s*d+u*h+c*l-a*f,t[e+2]=c*d+u*f+a*h-s*l,t[e+3]=u*d-a*l-s*h-c*f,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e){if(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const n=t._x,r=t._y,i=t._z,o=t._order,a=Math.cos,s=Math.sin,c=a(n/2),u=a(r/2),l=a(i/2),h=s(n/2),f=s(r/2),d=s(i/2);switch(o){case"XYZ":this._x=h*u*l+c*f*d,this._y=c*f*l-h*u*d,this._z=c*u*d+h*f*l,this._w=c*u*l-h*f*d;break;case"YXZ":this._x=h*u*l+c*f*d,this._y=c*f*l-h*u*d,this._z=c*u*d-h*f*l,this._w=c*u*l+h*f*d;break;case"ZXY":this._x=h*u*l-c*f*d,this._y=c*f*l+h*u*d,this._z=c*u*d+h*f*l,this._w=c*u*l-h*f*d;break;case"ZYX":this._x=h*u*l-c*f*d,this._y=c*f*l+h*u*d,this._z=c*u*d-h*f*l,this._w=c*u*l+h*f*d;break;case"YZX":this._x=h*u*l+c*f*d,this._y=c*f*l+h*u*d,this._z=c*u*d-h*f*l,this._w=c*u*l-h*f*d;break;case"XZY":this._x=h*u*l-c*f*d,this._y=c*f*l-h*u*d,this._z=c*u*d+h*f*l,this._w=c*u*l+h*f*d;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!1!==e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,n=e[0],r=e[4],i=e[8],o=e[1],a=e[5],s=e[9],c=e[2],u=e[6],l=e[10],h=n+a+l;if(h>0){const t=.5/Math.sqrt(h+1);this._w=.25/t,this._x=(u-s)*t,this._y=(i-c)*t,this._z=(o-r)*t}else if(n>a&&n>l){const t=2*Math.sqrt(1+n-a-l);this._w=(u-s)/t,this._x=.25*t,this._y=(r+o)/t,this._z=(i+c)/t}else if(a>l){const t=2*Math.sqrt(1+a-n-l);this._w=(i-c)/t,this._x=(r+o)/t,this._y=.25*t,this._z=(s+u)/t}else{const t=2*Math.sqrt(1+l-n-a);this._w=(o-r)/t,this._x=(i+c)/t,this._y=(s+u)/t,this._z=.25*t}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(qn.clamp(this.dot(t),-1,1)))}rotateTowards(t,e){const n=this.angleTo(t);if(0===n)return this;const r=Math.min(1,e/n);return this.slerp(t,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t,e){return void 0!==e?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+r*c-i*s,this._y=r*u+o*s+i*a-n*c,this._z=i*u+o*c+n*s-r*a,this._w=o*u-n*a-r*s-i*c,this._onChangeCallback(),this}slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);const n=this._x,r=this._y,i=this._z,o=this._w;let a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;const s=1-a*a;if(s<=Number.EPSILON){const t=1-e;return this._w=t*o+e*this._w,this._x=t*n+e*this._x,this._y=t*r+e*this._y,this._z=t*i+e*this._z,this.normalize(),this._onChangeCallback(),this}const c=Math.sqrt(s),u=Math.atan2(c,a),l=Math.sin((1-e)*u)/c,h=Math.sin(e*u)/c;return this._w=o*l+this._w*h,this._x=n*l+this._x*h,this._y=r*l+this._y*h,this._z=i*l+this._z*h,this._onChangeCallback(),this}slerpQuaternions(t,e,n){this.copy(t).slerp(e,n)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}}ir.prototype.isQuaternion=!0;class or{constructor(t=0,e=0,n=0){this.x=t,this.y=e,this.z=n}set(t,e,n){return void 0===n&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(sr.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(sr.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this}applyQuaternion(t){const e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*r-a*n,u=s*n+a*e-i*r,l=s*r+i*n-o*e,h=-i*e-o*n-a*r;return this.x=c*s+h*-i+u*-a-l*-o,this.y=u*s+h*-o+l*-i-c*-a,this.z=l*s+h*-a+c*-o-u*-i,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)}crossVectors(t,e){const n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this}projectOnVector(t){const e=t.lengthSq();if(0===e)return this.set(0,0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return ar.copy(this).projectOnVector(t),this.sub(ar)}reflect(t){return this.sub(ar.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(qn.clamp(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){const r=Math.sin(e)*t;return this.x=r*Math.sin(n),this.y=Math.cos(e)*t,this.z=r*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}}or.prototype.isVector3=!0;const ar=new or,sr=new ir;class cr{constructor(t=new or(1/0,1/0,1/0),e=new or(-1/0,-1/0,-1/0)){this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){let e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0;for(let s=0,c=t.length;s<c;s+=3){const c=t[s],u=t[s+1],l=t[s+2];c<e&&(e=c),u<n&&(n=u),l<r&&(r=l),c>i&&(i=c),u>o&&(o=u),l>a&&(a=l)}return this.min.set(e,n,r),this.max.set(i,o,a),this}setFromBufferAttribute(t){let e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0;for(let s=0,c=t.count;s<c;s++){const c=t.getX(s),u=t.getY(s),l=t.getZ(s);c<e&&(e=c),u<n&&(n=u),l<r&&(r=l),c>i&&(i=c),u>o&&(o=u),l>a&&(a=l)}return this.min.set(e,n,r),this.max.set(i,o,a),this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const n=lr.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}setFromObject(t){return this.makeEmpty(),this.expandByObject(t)}clone(){return(new this.constructor).copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new or),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new or),this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t){t.updateWorldMatrix(!1,!1);const e=t.geometry;void 0!==e&&(null===e.boundingBox&&e.computeBoundingBox(),hr.copy(e.boundingBox),hr.applyMatrix4(t.matrixWorld),this.union(hr));const n=t.children;for(let t=0,e=n.length;t<e;t++)this.expandByObject(n[t]);return this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new or),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)}intersectsSphere(t){return this.clampPoint(t.center,lr),lr.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(yr),_r.subVectors(this.max,yr),fr.subVectors(t.a,yr),dr.subVectors(t.b,yr),pr.subVectors(t.c,yr),mr.subVectors(dr,fr),gr.subVectors(pr,dr),vr.subVectors(fr,pr);let e=[0,-mr.z,mr.y,0,-gr.z,gr.y,0,-vr.z,vr.y,mr.z,0,-mr.x,gr.z,0,-gr.x,vr.z,0,-vr.x,-mr.y,mr.x,0,-gr.y,gr.x,0,-vr.y,vr.x,0];return!!wr(e,fr,dr,pr,_r)&&(e=[1,0,0,0,1,0,0,0,1],!!wr(e,fr,dr,pr,_r)&&(xr.crossVectors(mr,gr),e=[xr.x,xr.y,xr.z],wr(e,fr,dr,pr,_r)))}clampPoint(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new or),e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return lr.copy(t).clamp(this.min,this.max).sub(t).length()}getBoundingSphere(t){return void 0===t&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(t.center),t.radius=.5*this.getSize(lr).length(),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()||(ur[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),ur[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),ur[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),ur[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),ur[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),ur[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),ur[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),ur[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(ur)),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}cr.prototype.isBox3=!0;const ur=[new or,new or,new or,new or,new or,new or,new or,new or],lr=new or,hr=new cr,fr=new or,dr=new or,pr=new or,mr=new or,gr=new or,vr=new or,yr=new or,_r=new or,xr=new or,br=new or;function wr(t,e,n,r,i){for(let o=0,a=t.length-3;o<=a;o+=3){br.fromArray(t,o);const a=i.x*Math.abs(br.x)+i.y*Math.abs(br.y)+i.z*Math.abs(br.z),s=e.dot(br),c=n.dot(br),u=r.dot(br);if(Math.max(-Math.max(s,c,u),Math.min(s,c,u))>a)return!1}return!0}const Mr=new cr,Sr=new or,Tr=new or,Er=new or;class Cr{constructor(t=new or,e=-1){this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const n=this.center;void 0!==e?n.copy(e):Mr.setFromPoints(t).getCenter(n);let r=0;for(let e=0,i=t.length;e<i;e++)r=Math.max(r,n.distanceToSquared(t[e]));return this.radius=Math.sqrt(r),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){const e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){const n=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new or),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new cr),this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){Er.subVectors(t,this.center);const e=Er.lengthSq();if(e>this.radius*this.radius){const t=Math.sqrt(e),n=.5*(t-this.radius);this.center.add(Er.multiplyScalar(n/t)),this.radius+=n}return this}union(t){return Tr.subVectors(t.center,this.center).normalize().multiplyScalar(t.radius),this.expandByPoint(Sr.copy(t.center).add(Tr)),this.expandByPoint(Sr.copy(t.center).sub(Tr)),this}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Ar=new or,Pr=new or,Lr=new or,Rr=new or,Or=new or,kr=new or,Ir=new or;class Dr{constructor(t=new or,e=new or(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new or),e.copy(this.direction).multiplyScalar(t).add(this.origin)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Ar)),this}closestPointToPoint(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new or),e.subVectors(t,this.origin);const n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=Ar.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Ar.copy(this.direction).multiplyScalar(e).add(this.origin),Ar.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){Pr.copy(t).add(e).multiplyScalar(.5),Lr.copy(e).sub(t).normalize(),Rr.copy(this.origin).sub(Pr);const i=.5*t.distanceTo(e),o=-this.direction.dot(Lr),a=Rr.dot(this.direction),s=-Rr.dot(Lr),c=Rr.lengthSq(),u=Math.abs(1-o*o);let l,h,f,d;if(u>0)if(l=o*s-a,h=o*a-s,d=i*u,l>=0)if(h>=-d)if(h<=d){const t=1/u;l*=t,h*=t,f=l*(l+o*h+2*a)+h*(o*l+h+2*s)+c}else h=i,l=Math.max(0,-(o*h+a)),f=-l*l+h*(h+2*s)+c;else h=-i,l=Math.max(0,-(o*h+a)),f=-l*l+h*(h+2*s)+c;else h<=-d?(l=Math.max(0,-(-o*i+a)),h=l>0?-i:Math.min(Math.max(-i,-s),i),f=-l*l+h*(h+2*s)+c):h<=d?(l=0,h=Math.min(Math.max(-i,-s),i),f=h*(h+2*s)+c):(l=Math.max(0,-(o*i+a)),h=l>0?i:Math.min(Math.max(-i,-s),i),f=-l*l+h*(h+2*s)+c);else h=o>0?-i:i,l=Math.max(0,-(o*h+a)),f=-l*l+h*(h+2*s)+c;return n&&n.copy(this.direction).multiplyScalar(l).add(this.origin),r&&r.copy(Lr).multiplyScalar(h).add(Pr),f}intersectSphere(t,e){Ar.subVectors(t.center,this.origin);const n=Ar.dot(this.direction),r=Ar.dot(Ar)-n*n,i=t.radius*t.radius;if(r>i)return null;const o=Math.sqrt(i-r),a=n-o,s=n+o;return a<0&&s<0?null:a<0?this.at(s,e):this.at(a,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){const n=this.distanceToPlane(t);return null===n?null:this.at(n,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,r,i,o,a,s;const c=1/this.direction.x,u=1/this.direction.y,l=1/this.direction.z,h=this.origin;return c>=0?(n=(t.min.x-h.x)*c,r=(t.max.x-h.x)*c):(n=(t.max.x-h.x)*c,r=(t.min.x-h.x)*c),u>=0?(i=(t.min.y-h.y)*u,o=(t.max.y-h.y)*u):(i=(t.max.y-h.y)*u,o=(t.min.y-h.y)*u),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),l>=0?(a=(t.min.z-h.z)*l,s=(t.max.z-h.z)*l):(a=(t.max.z-h.z)*l,s=(t.min.z-h.z)*l),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,e)))}intersectsBox(t){return null!==this.intersectBox(t,Ar)}intersectTriangle(t,e,n,r,i){Or.subVectors(e,t),kr.subVectors(n,t),Ir.crossVectors(Or,kr);let o,a=this.direction.dot(Ir);if(a>0){if(r)return null;o=1}else{if(!(a<0))return null;o=-1,a=-a}Rr.subVectors(this.origin,t);const s=o*this.direction.dot(kr.crossVectors(Rr,kr));if(s<0)return null;const c=o*this.direction.dot(Or.cross(Rr));if(c<0)return null;if(s+c>a)return null;const u=-o*Rr.dot(Ir);return u<0?null:this.at(u/a,i)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class jr{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(t,e,n,r,i,o,a,s,c,u,l,h,f,d,p,m){const g=this.elements;return g[0]=t,g[4]=e,g[8]=n,g[12]=r,g[1]=i,g[5]=o,g[9]=a,g[13]=s,g[2]=c,g[6]=u,g[10]=l,g[14]=h,g[3]=f,g[7]=d,g[11]=p,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new jr).fromArray(this.elements)}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){const e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,n=t.elements,r=1/zr.setFromMatrixColumn(t,0).length(),i=1/zr.setFromMatrixColumn(t,1).length(),o=1/zr.setFromMatrixColumn(t,2).length();return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[3]=0,e[4]=n[4]*i,e[5]=n[5]*i,e[6]=n[6]*i,e[7]=0,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");const e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),u=Math.cos(i),l=Math.sin(i);if("XYZ"===t.order){const t=o*u,n=o*l,r=a*u,i=a*l;e[0]=s*u,e[4]=-s*l,e[8]=c,e[1]=n+r*c,e[5]=t-i*c,e[9]=-a*s,e[2]=i-t*c,e[6]=r+n*c,e[10]=o*s}else if("YXZ"===t.order){const t=s*u,n=s*l,r=c*u,i=c*l;e[0]=t+i*a,e[4]=r*a-n,e[8]=o*c,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=n*a-r,e[6]=i+t*a,e[10]=o*s}else if("ZXY"===t.order){const t=s*u,n=s*l,r=c*u,i=c*l;e[0]=t-i*a,e[4]=-o*l,e[8]=r+n*a,e[1]=n+r*a,e[5]=o*u,e[9]=i-t*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){const t=o*u,n=o*l,r=a*u,i=a*l;e[0]=s*u,e[4]=r*c-n,e[8]=t*c+i,e[1]=s*l,e[5]=i*c+t,e[9]=n*c-r,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){const t=o*s,n=o*c,r=a*s,i=a*c;e[0]=s*u,e[4]=i-t*l,e[8]=r*l+n,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=n*l+r,e[10]=t-i*l}else if("XZY"===t.order){const t=o*s,n=o*c,r=a*s,i=a*c;e[0]=s*u,e[4]=-l,e[8]=c*u,e[1]=t*l+i,e[5]=o*u,e[9]=n*l-r,e[2]=r*l-n,e[6]=a*u,e[10]=i*l+t}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(Fr,t,Br)}lookAt(t,e,n){const r=this.elements;return Ur.subVectors(t,e),0===Ur.lengthSq()&&(Ur.z=1),Ur.normalize(),Hr.crossVectors(n,Ur),0===Hr.lengthSq()&&(1===Math.abs(n.z)?Ur.x+=1e-4:Ur.z+=1e-4,Ur.normalize(),Hr.crossVectors(n,Ur)),Hr.normalize(),Gr.crossVectors(Ur,Hr),r[0]=Hr.x,r[4]=Gr.x,r[8]=Ur.x,r[1]=Hr.y,r[5]=Gr.y,r[9]=Ur.y,r[2]=Hr.z,r[6]=Gr.z,r[10]=Ur.z,this}multiply(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],u=n[1],l=n[5],h=n[9],f=n[13],d=n[2],p=n[6],m=n[10],g=n[14],v=n[3],y=n[7],_=n[11],x=n[15],b=r[0],w=r[4],M=r[8],S=r[12],T=r[1],E=r[5],C=r[9],A=r[13],P=r[2],L=r[6],R=r[10],O=r[14],k=r[3],I=r[7],D=r[11],j=r[15];return i[0]=o*b+a*T+s*P+c*k,i[4]=o*w+a*E+s*L+c*I,i[8]=o*M+a*C+s*R+c*D,i[12]=o*S+a*A+s*O+c*j,i[1]=u*b+l*T+h*P+f*k,i[5]=u*w+l*E+h*L+f*I,i[9]=u*M+l*C+h*R+f*D,i[13]=u*S+l*A+h*O+f*j,i[2]=d*b+p*T+m*P+g*k,i[6]=d*w+p*E+m*L+g*I,i[10]=d*M+p*C+m*R+g*D,i[14]=d*S+p*A+m*O+g*j,i[3]=v*b+y*T+_*P+x*k,i[7]=v*w+y*E+_*L+x*I,i[11]=v*M+y*C+_*R+x*D,i[15]=v*S+y*A+_*O+x*j,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],c=t[13],u=t[2],l=t[6],h=t[10],f=t[14];return t[3]*(+i*s*l-r*c*l-i*a*h+n*c*h+r*a*f-n*s*f)+t[7]*(+e*s*f-e*c*h+i*o*h-r*o*f+r*c*u-i*s*u)+t[11]*(+e*c*l-e*a*f-i*o*l+n*o*f+i*a*u-n*c*u)+t[15]*(-r*a*u-e*s*l+e*a*h+r*o*l-n*o*h+n*s*u)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){const r=this.elements;return t.isVector3?(r[12]=t.x,r[13]=t.y,r[14]=t.z):(r[12]=t,r[13]=e,r[14]=n),this}invert(){const t=this.elements,e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8],l=t[9],h=t[10],f=t[11],d=t[12],p=t[13],m=t[14],g=t[15],v=l*m*c-p*h*c+p*s*f-a*m*f-l*s*g+a*h*g,y=d*h*c-u*m*c-d*s*f+o*m*f+u*s*g-o*h*g,_=u*p*c-d*l*c+d*a*f-o*p*f-u*a*g+o*l*g,x=d*l*s-u*p*s-d*a*h+o*p*h+u*a*m-o*l*m,b=e*v+n*y+r*_+i*x;if(0===b)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const w=1/b;return t[0]=v*w,t[1]=(p*h*i-l*m*i-p*r*f+n*m*f+l*r*g-n*h*g)*w,t[2]=(a*m*i-p*s*i+p*r*c-n*m*c-a*r*g+n*s*g)*w,t[3]=(l*s*i-a*h*i-l*r*c+n*h*c+a*r*f-n*s*f)*w,t[4]=y*w,t[5]=(u*m*i-d*h*i+d*r*f-e*m*f-u*r*g+e*h*g)*w,t[6]=(d*s*i-o*m*i-d*r*c+e*m*c+o*r*g-e*s*g)*w,t[7]=(o*h*i-u*s*i+u*r*c-e*h*c-o*r*f+e*s*f)*w,t[8]=_*w,t[9]=(d*l*i-u*p*i-d*n*f+e*p*f+u*n*g-e*l*g)*w,t[10]=(o*p*i-d*a*i+d*n*c-e*p*c-o*n*g+e*a*g)*w,t[11]=(u*a*i-o*l*i-u*n*c+e*l*c+o*n*f-e*a*f)*w,t[12]=x*w,t[13]=(u*p*r-d*l*r+d*n*h-e*p*h-u*n*m+e*l*m)*w,t[14]=(d*a*r-o*p*r-d*n*s+e*p*s+o*n*m-e*a*m)*w,t[15]=(o*l*r-u*a*r+u*n*s-e*l*s-o*n*h+e*a*h)*w,this}scale(t){const e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))}makeTranslation(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,c=i*o,u=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+n,u*s-r*o,0,c*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this}compose(t,e,n){const r=this.elements,i=e._x,o=e._y,a=e._z,s=e._w,c=i+i,u=o+o,l=a+a,h=i*c,f=i*u,d=i*l,p=o*u,m=o*l,g=a*l,v=s*c,y=s*u,_=s*l,x=n.x,b=n.y,w=n.z;return r[0]=(1-(p+g))*x,r[1]=(f+_)*x,r[2]=(d-y)*x,r[3]=0,r[4]=(f-_)*b,r[5]=(1-(h+g))*b,r[6]=(m+v)*b,r[7]=0,r[8]=(d+y)*w,r[9]=(m-v)*w,r[10]=(1-(h+p))*w,r[11]=0,r[12]=t.x,r[13]=t.y,r[14]=t.z,r[15]=1,this}decompose(t,e,n){const r=this.elements;let i=zr.set(r[0],r[1],r[2]).length();const o=zr.set(r[4],r[5],r[6]).length(),a=zr.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),t.x=r[12],t.y=r[13],t.z=r[14],Nr.copy(this);const s=1/i,c=1/o,u=1/a;return Nr.elements[0]*=s,Nr.elements[1]*=s,Nr.elements[2]*=s,Nr.elements[4]*=c,Nr.elements[5]*=c,Nr.elements[6]*=c,Nr.elements[8]*=u,Nr.elements[9]*=u,Nr.elements[10]*=u,e.setFromRotationMatrix(Nr),n.x=i,n.y=o,n.z=a,this}makePerspective(t,e,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");const a=this.elements,s=2*i/(e-t),c=2*i/(n-r),u=(e+t)/(e-t),l=(n+r)/(n-r),h=-(o+i)/(o-i),f=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=f,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(t,e,n,r,i,o){const a=this.elements,s=1/(e-t),c=1/(n-r),u=1/(o-i),l=(e+t)*s,h=(n+r)*c,f=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-f,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(t){const e=this.elements,n=t.elements;for(let t=0;t<16;t++)if(e[t]!==n[t])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}jr.prototype.isMatrix4=!0;const zr=new or,Nr=new jr,Fr=new or(0,0,0),Br=new or(1,1,1),Hr=new or,Gr=new or,Ur=new or,Vr=new jr,Wr=new ir;class Zr{constructor(t=0,e=0,n=0,r=Zr.DefaultOrder){this._x=t,this._y=e,this._z=n,this._order=r}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._order=r||this._order,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e,n){const r=qn.clamp,i=t.elements,o=i[0],a=i[4],s=i[8],c=i[1],u=i[5],l=i[9],h=i[2],f=i[6],d=i[10];switch(e=e||this._order){case"XYZ":this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(f,u),this._z=0);break;case"YXZ":this._x=Math.asin(-r(l,-1,1)),Math.abs(l)<.9999999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-h,o),this._z=0);break;case"ZXY":this._x=Math.asin(r(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(f,d),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u));break;case"YZX":this._z=Math.asin(r(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-l,u),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,d));break;case"XZY":this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(f,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-l,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!1!==n&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return Vr.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Vr,e,n)}setFromVector3(t,e){return this.set(t.x,t.y,t.z,e||this._order)}reorder(t){return Wr.setFromEuler(this),this.setFromQuaternion(Wr,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}toVector3(t){return t?t.set(this._x,this._y,this._z):new or(this._x,this._y,this._z)}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}}Zr.prototype.isEuler=!0,Zr.DefaultOrder="XYZ",Zr.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class qr{constructor(){this.mask=1}set(t){this.mask=1<<t|0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return 0!=(this.mask&t.mask)}}let Yr=0;const Jr=new or,Xr=new ir,$r=new jr,Qr=new or,Kr=new or,ti=new or,ei=new ir,ni=new or(1,0,0),ri=new or(0,1,0),ii=new or(0,0,1),oi={type:"added"},ai={type:"removed"};function si(){Object.defineProperty(this,"id",{value:Yr++}),this.uuid=qn.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=si.DefaultUp.clone();const t=new or,e=new Zr,n=new ir,r=new or(1,1,1);e._onChange((function(){n.setFromEuler(e,!1)})),n._onChange((function(){e.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new jr},normalMatrix:{value:new Jn}}),this.matrix=new jr,this.matrixWorld=new jr,this.matrixAutoUpdate=si.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new qr,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}si.DefaultUp=new or(0,1,0),si.DefaultMatrixAutoUpdate=!0,si.prototype=Object.assign(Object.create(Vn.prototype),{constructor:si,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix4:function(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},setRotationFromAxisAngle:function(t,e){this.quaternion.setFromAxisAngle(t,e)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:function(t,e){return Xr.setFromAxisAngle(t,e),this.quaternion.multiply(Xr),this},rotateOnWorldAxis:function(t,e){return Xr.setFromAxisAngle(t,e),this.quaternion.premultiply(Xr),this},rotateX:function(t){return this.rotateOnAxis(ni,t)},rotateY:function(t){return this.rotateOnAxis(ri,t)},rotateZ:function(t){return this.rotateOnAxis(ii,t)},translateOnAxis:function(t,e){return Jr.copy(t).applyQuaternion(this.quaternion),this.position.add(Jr.multiplyScalar(e)),this},translateX:function(t){return this.translateOnAxis(ni,t)},translateY:function(t){return this.translateOnAxis(ri,t)},translateZ:function(t){return this.translateOnAxis(ii,t)},localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(t){return t.applyMatrix4($r.copy(this.matrixWorld).invert())},lookAt:function(t,e,n){t.isVector3?Qr.copy(t):Qr.set(t,e,n);const r=this.parent;this.updateWorldMatrix(!0,!1),Kr.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?$r.lookAt(Kr,Qr,this.up):$r.lookAt(Qr,Kr,this.up),this.quaternion.setFromRotationMatrix($r),r&&($r.extractRotation(r.matrixWorld),Xr.setFromRotationMatrix($r),this.quaternion.premultiply(Xr.invert()))},add:function(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,this.children.push(t),t.dispatchEvent(oi)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}const e=this.children.indexOf(t);return-1!==e&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(ai)),this},clear:function(){for(let t=0;t<this.children.length;t++){const e=this.children[t];e.parent=null,e.dispatchEvent(ai)}return this.children.length=0,this},attach:function(t){return this.updateWorldMatrix(!0,!1),$r.copy(this.matrixWorld).invert(),null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),$r.multiply(t.parent.matrixWorld)),t.applyMatrix4($r),this.add(t),t.updateWorldMatrix(!1,!0),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(let n=0,r=this.children.length;n<r;n++){const r=this.children[n].getObjectByProperty(t,e);if(void 0!==r)return r}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new or),this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),t=new ir),this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Kr,t,ti),t},getWorldScale:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),t=new or),this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Kr,ei,t),t},getWorldDirection:function(t){void 0===t&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),t=new or),this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()},raycast:function(){},traverse:function(t){t(this);const e=this.children;for(let n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1===this.visible)return;t(this);const e=this.children;for(let n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)},traverseAncestors:function(t){const e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);const e=this.children;for(let n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},updateWorldMatrix:function(t,e){const n=this.parent;if(!0===t&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===e){const t=this.children;for(let e=0,n=t.length;e<n;e++)t[e].updateWorldMatrix(!1,!0)}},toJSON:function(t){const e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const r={};function i(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isMesh||this.isLine||this.isPoints){r.geometry=i(t.geometries,this.geometry);const e=this.geometry.parameters;if(void 0!==e&&void 0!==e.shapes){const n=e.shapes;if(Array.isArray(n))for(let e=0,r=n.length;e<r;e++){const r=n[e];i(t.shapes,r)}else i(t.shapes,n)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(t.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const e=[];for(let n=0,r=this.material.length;n<r;n++)e.push(i(t.materials,this.material[n]));r.material=e}else r.material=i(t.materials,this.material);if(this.children.length>0){r.children=[];for(let e=0;e<this.children.length;e++)r.children.push(this.children[e].toJSON(t).object)}if(this.animations.length>0){r.animations=[];for(let e=0;e<this.animations.length;e++){const n=this.animations[e];r.animations.push(i(t.animations,n))}}if(e){const e=o(t.geometries),r=o(t.materials),i=o(t.textures),a=o(t.images),s=o(t.shapes),c=o(t.skeletons),u=o(t.animations);e.length>0&&(n.geometries=e),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),a.length>0&&(n.images=a),s.length>0&&(n.shapes=s),c.length>0&&(n.skeletons=c),u.length>0&&(n.animations=u)}return n.object=r,n;function o(t){const e=[];for(const n in t){const r=t[n];delete r.metadata,e.push(r)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(let e=0;e<t.children.length;e++){const n=t.children[e];this.add(n.clone())}return this}});const ci=new or,ui=new or,li=new Jn;class hi{constructor(t=new or(1,0,0),e=0){this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,n){const r=ci.subVectors(n,e).cross(ui.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(r,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new or),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)}intersectLine(t,e){void 0===e&&(console.warn("THREE.Plane: .intersectLine() target is now required"),e=new or);const n=t.delta(ci),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(t.start)?e.copy(t.start):null;const i=-(t.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:e.copy(n).multiplyScalar(i).add(t.start)}intersectsLine(t){const e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new or),t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const n=e||li.getNormalMatrix(t),r=this.coplanarPoint(ci).applyMatrix4(t),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return(new this.constructor).copy(this)}}hi.prototype.isPlane=!0;const fi=new or,di=new or,pi=new or,mi=new or,gi=new or,vi=new or,yi=new or,_i=new or,xi=new or,bi=new or;class wi{constructor(t=new or,e=new or,n=new or){this.a=t,this.b=e,this.c=n}static getNormal(t,e,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new or),r.subVectors(n,e),fi.subVectors(t,e),r.cross(fi);const i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(t,e,n,r,i){fi.subVectors(r,e),di.subVectors(n,e),pi.subVectors(t,e);const o=fi.dot(fi),a=fi.dot(di),s=fi.dot(pi),c=di.dot(di),u=di.dot(pi),l=o*c-a*a;if(void 0===i&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),i=new or),0===l)return i.set(-2,-1,-1);const h=1/l,f=(c*s-a*u)*h,d=(o*u-a*s)*h;return i.set(1-f-d,d,f)}static containsPoint(t,e,n,r){return this.getBarycoord(t,e,n,r,mi),mi.x>=0&&mi.y>=0&&mi.x+mi.y<=1}static getUV(t,e,n,r,i,o,a,s){return this.getBarycoord(t,e,n,r,mi),s.set(0,0),s.addScaledVector(i,mi.x),s.addScaledVector(o,mi.y),s.addScaledVector(a,mi.z),s}static isFrontFacing(t,e,n,r){return fi.subVectors(n,e),di.subVectors(t,e),fi.cross(di).dot(r)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return fi.subVectors(this.c,this.b),di.subVectors(this.a,this.b),.5*fi.cross(di).length()}getMidpoint(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new or),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return wi.getNormal(this.a,this.b,this.c,t)}getPlane(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new hi),t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return wi.getBarycoord(t,this.a,this.b,this.c,e)}getUV(t,e,n,r,i){return wi.getUV(t,this.a,this.b,this.c,e,n,r,i)}containsPoint(t){return wi.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return wi.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){void 0===e&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),e=new or);const n=this.a,r=this.b,i=this.c;let o,a;gi.subVectors(r,n),vi.subVectors(i,n),_i.subVectors(t,n);const s=gi.dot(_i),c=vi.dot(_i);if(s<=0&&c<=0)return e.copy(n);xi.subVectors(t,r);const u=gi.dot(xi),l=vi.dot(xi);if(u>=0&&l<=u)return e.copy(r);const h=s*l-u*c;if(h<=0&&s>=0&&u<=0)return o=s/(s-u),e.copy(n).addScaledVector(gi,o);bi.subVectors(t,i);const f=gi.dot(bi),d=vi.dot(bi);if(d>=0&&f<=d)return e.copy(i);const p=f*c-s*d;if(p<=0&&c>=0&&d<=0)return a=c/(c-d),e.copy(n).addScaledVector(vi,a);const m=u*d-f*l;if(m<=0&&l-u>=0&&f-d>=0)return yi.subVectors(i,r),a=(l-u)/(l-u+(f-d)),e.copy(r).addScaledVector(yi,a);const g=1/(m+p+h);return o=p*g,a=h*g,e.copy(n).addScaledVector(gi,o).addScaledVector(vi,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}let Mi=0;function Si(){Object.defineProperty(this,"id",{value:Mi++}),this.uuid=qn.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.blending=A,this.side=w,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=G,this.blendDst=U,this.blendEquation=k,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Q,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=On,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=yn,this.stencilZFail=yn,this.stencilZPass=yn,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0}Si.prototype=Object.assign(Object.create(Vn.prototype),{constructor:Si,isMaterial:!0,onBeforeCompile:function(){},customProgramCacheKey:function(){return this.onBeforeCompile.toString()},setValues:function(t){if(void 0!==t)for(const e in t){const n=t[e];if(void 0===n){console.warn("THREE.Material: '"+e+"' parameter is undefined.");continue}if("shading"===e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===T;continue}const r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]=n:console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.")}},toJSON:function(t){const e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(t){const e=[];for(const n in t){const r=t[n];delete r.metadata,e.push(r)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.sheen&&this.sheen.isColor&&(n.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity,n.refractionRatio=this.refractionRatio,void 0!==this.combine&&(n.combine=this.combine),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==A&&(n.blending=this.blending),this.side!==w&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.morphNormals&&(n.morphNormals=!0),!0===this.skinning&&(n.skinning=!0),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){const e=r(t.textures),i=r(t.images);e.length>0&&(n.textures=e),i.length>0&&(n.images=i)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let n=null;if(null!==e){const t=e.length;n=new Array(t);for(let r=0;r!==t;++r)n[r]=e[r].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Si.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}});const Ti={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ei={h:0,s:0,l:0},Ci={h:0,s:0,l:0};function Ai(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}function Pi(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function Li(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}class Ri{constructor(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}set(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this}setRGB(t,e,n){return this.r=t,this.g=e,this.b=n,this}setHSL(t,e,n){if(t=qn.euclideanModulo(t,1),e=qn.clamp(e,0,1),n=qn.clamp(n,0,1),0===e)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+e):n+e-n*e,i=2*n-r;this.r=Ai(i,r,t+1/3),this.g=Ai(i,r,t),this.b=Ai(i,r,t-1/3)}return this}setStyle(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let t;const r=n[1],i=n[2];switch(r){case"rgb":case"rgba":if(t=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))return this.r=Math.min(255,parseInt(t[1],10))/255,this.g=Math.min(255,parseInt(t[2],10))/255,this.b=Math.min(255,parseInt(t[3],10))/255,e(t[4]),this;if(t=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))return this.r=Math.min(100,parseInt(t[1],10))/100,this.g=Math.min(100,parseInt(t[2],10))/100,this.b=Math.min(100,parseInt(t[3],10))/100,e(t[4]),this;break;case"hsl":case"hsla":if(t=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i)){const n=parseFloat(t[1])/360,r=parseInt(t[2],10)/100,i=parseInt(t[3],10)/100;return e(t[4]),this.setHSL(n,r,i)}}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(t)){const t=n[1],e=t.length;if(3===e)return this.r=parseInt(t.charAt(0)+t.charAt(0),16)/255,this.g=parseInt(t.charAt(1)+t.charAt(1),16)/255,this.b=parseInt(t.charAt(2)+t.charAt(2),16)/255,this;if(6===e)return this.r=parseInt(t.charAt(0)+t.charAt(1),16)/255,this.g=parseInt(t.charAt(2)+t.charAt(3),16)/255,this.b=parseInt(t.charAt(4)+t.charAt(5),16)/255,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){const e=Ti[t];return void 0!==e?this.setHex(e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copyGammaToLinear(t,e=2){return this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this}copyLinearToGamma(t,e=2){const n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this}convertGammaToLinear(t){return this.copyGammaToLinear(this,t),this}convertLinearToGamma(t){return this.copyLinearToGamma(this,t),this}copySRGBToLinear(t){return this.r=Pi(t.r),this.g=Pi(t.g),this.b=Pi(t.b),this}copyLinearToSRGB(t){return this.r=Li(t.r),this.g=Li(t.g),this.b=Li(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(t){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});const e=this.r,n=this.g,r=this.b,i=Math.max(e,n,r),o=Math.min(e,n,r);let a,s;const c=(o+i)/2;if(o===i)a=0,s=0;else{const t=i-o;switch(s=c<=.5?t/(i+o):t/(2-i-o),i){case e:a=(n-r)/t+(n<r?6:0);break;case n:a=(r-e)/t+2;break;case r:a=(e-n)/t+4}a/=6}return t.h=a,t.s=s,t.l=c,t}getStyle(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"}offsetHSL(t,e,n){return this.getHSL(Ei),Ei.h+=t,Ei.s+=e,Ei.l+=n,this.setHSL(Ei.h,Ei.s,Ei.l),this}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,n){return this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}lerpHSL(t,e){this.getHSL(Ei),t.getHSL(Ci);const n=qn.lerp(Ei.h,Ci.h,e),r=qn.lerp(Ei.s,Ci.s,e),i=qn.lerp(Ei.l,Ci.l,e);return this.setHSL(n,r,i),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),!0===t.normalized&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}}Ri.NAMES=Ti,Ri.prototype.isColor=!0,Ri.prototype.r=1,Ri.prototype.g=1,Ri.prototype.b=1;class Oi extends Si{constructor(t){super(),this.type="MeshBasicMaterial",this.color=new Ri(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=rt,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this}}Oi.prototype.isMeshBasicMaterial=!0;const ki=new or,Ii=new Yn;function Di(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.usage=kn,this.updateRange={offset:0,count:-1},this.version=0}function ji(t,e,n){Di.call(this,new Int8Array(t),e,n)}function zi(t,e,n){Di.call(this,new Uint8Array(t),e,n)}function Ni(t,e,n){Di.call(this,new Uint8ClampedArray(t),e,n)}function Fi(t,e,n){Di.call(this,new Int16Array(t),e,n)}function Bi(t,e,n){Di.call(this,new Uint16Array(t),e,n)}function Hi(t,e,n){Di.call(this,new Int32Array(t),e,n)}function Gi(t,e,n){Di.call(this,new Uint32Array(t),e,n)}function Ui(t,e,n){Di.call(this,new Uint16Array(t),e,n)}function Vi(t,e,n){Di.call(this,new Float32Array(t),e,n)}function Wi(t,e,n){Di.call(this,new Float64Array(t),e,n)}function Zi(t){if(0===t.length)return-1/0;let e=t[0];for(let n=1,r=t.length;n<r;++n)t[n]>e&&(e=t[n]);return e}Object.defineProperty(Di.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Di.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setUsage:function(t){return this.usage=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){const e=this.array;let n=0;for(let r=0,i=t.length;r<i;r++){let i=t[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),i=new Ri),e[n++]=i.r,e[n++]=i.g,e[n++]=i.b}return this},copyVector2sArray:function(t){const e=this.array;let n=0;for(let r=0,i=t.length;r<i;r++){let i=t[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),i=new Yn),e[n++]=i.x,e[n++]=i.y}return this},copyVector3sArray:function(t){const e=this.array;let n=0;for(let r=0,i=t.length;r<i;r++){let i=t[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),i=new or),e[n++]=i.x,e[n++]=i.y,e[n++]=i.z}return this},copyVector4sArray:function(t){const e=this.array;let n=0;for(let r=0,i=t.length;r<i;r++){let i=t[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),i=new er),e[n++]=i.x,e[n++]=i.y,e[n++]=i.z,e[n++]=i.w}return this},applyMatrix3:function(t){if(2===this.itemSize)for(let e=0,n=this.count;e<n;e++)Ii.fromBufferAttribute(this,e),Ii.applyMatrix3(t),this.setXY(e,Ii.x,Ii.y);else if(3===this.itemSize)for(let e=0,n=this.count;e<n;e++)ki.fromBufferAttribute(this,e),ki.applyMatrix3(t),this.setXYZ(e,ki.x,ki.y,ki.z);return this},applyMatrix4:function(t){for(let e=0,n=this.count;e<n;e++)ki.x=this.getX(e),ki.y=this.getY(e),ki.z=this.getZ(e),ki.applyMatrix4(t),this.setXYZ(e,ki.x,ki.y,ki.z);return this},applyNormalMatrix:function(t){for(let e=0,n=this.count;e<n;e++)ki.x=this.getX(e),ki.y=this.getY(e),ki.z=this.getZ(e),ki.applyNormalMatrix(t),this.setXYZ(e,ki.x,ki.y,ki.z);return this},transformDirection:function(t){for(let e=0,n=this.count;e<n;e++)ki.x=this.getX(e),ki.y=this.getY(e),ki.z=this.getZ(e),ki.transformDirection(t),this.setXYZ(e,ki.x,ki.y,ki.z);return this},set:function(t,e=0){return this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)},toJSON:function(){const t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return""!==this.name&&(t.name=this.name),this.usage!==kn&&(t.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(t.updateRange=this.updateRange),t}}),ji.prototype=Object.create(Di.prototype),ji.prototype.constructor=ji,zi.prototype=Object.create(Di.prototype),zi.prototype.constructor=zi,Ni.prototype=Object.create(Di.prototype),Ni.prototype.constructor=Ni,Fi.prototype=Object.create(Di.prototype),Fi.prototype.constructor=Fi,Bi.prototype=Object.create(Di.prototype),Bi.prototype.constructor=Bi,Hi.prototype=Object.create(Di.prototype),Hi.prototype.constructor=Hi,Gi.prototype=Object.create(Di.prototype),Gi.prototype.constructor=Gi,Ui.prototype=Object.create(Di.prototype),Ui.prototype.constructor=Ui,Ui.prototype.isFloat16BufferAttribute=!0,Vi.prototype=Object.create(Di.prototype),Vi.prototype.constructor=Vi,Wi.prototype=Object.create(Di.prototype),Wi.prototype.constructor=Wi;const qi={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Yi(t,e){return new qi[t](e)}let Ji=0;const Xi=new jr,$i=new si,Qi=new or,Ki=new cr,to=new cr,eo=new or;function no(){Object.defineProperty(this,"id",{value:Ji++}),this.uuid=qn.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}no.prototype=Object.assign(Object.create(Vn.prototype),{constructor:no,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){return Array.isArray(t)?this.index=new(Zi(t)>65535?Gi:Bi)(t,1):this.index=t,this},getAttribute:function(t){return this.attributes[t]},setAttribute:function(t,e){return this.attributes[t]=e,this},deleteAttribute:function(t){return delete this.attributes[t],this},hasAttribute:function(t){return void 0!==this.attributes[t]},addGroup:function(t,e,n=0){this.groups.push({start:t,count:e,materialIndex:n})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix4:function(t){const e=this.attributes.position;void 0!==e&&(e.applyMatrix4(t),e.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const e=(new Jn).getNormalMatrix(t);n.applyNormalMatrix(e),n.needsUpdate=!0}const r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(t),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(t){return Xi.makeRotationX(t),this.applyMatrix4(Xi),this},rotateY:function(t){return Xi.makeRotationY(t),this.applyMatrix4(Xi),this},rotateZ:function(t){return Xi.makeRotationZ(t),this.applyMatrix4(Xi),this},translate:function(t,e,n){return Xi.makeTranslation(t,e,n),this.applyMatrix4(Xi),this},scale:function(t,e,n){return Xi.makeScale(t,e,n),this.applyMatrix4(Xi),this},lookAt:function(t){return $i.lookAt(t),$i.updateMatrix(),this.applyMatrix4($i.matrix),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(Qi).negate(),this.translate(Qi.x,Qi.y,Qi.z),this},setFromPoints:function(t){const e=[];for(let n=0,r=t.length;n<r;n++){const r=t[n];e.push(r.x,r.y,r.z||0)}return this.setAttribute("position",new Vi(e,3)),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new cr);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new or(-1/0,-1/0,-1/0),new or(1/0,1/0,1/0));if(void 0!==t){if(this.boundingBox.setFromBufferAttribute(t),e)for(let t=0,n=e.length;t<n;t++){const n=e[t];Ki.setFromBufferAttribute(n),this.morphTargetsRelative?(eo.addVectors(this.boundingBox.min,Ki.min),this.boundingBox.expandByPoint(eo),eo.addVectors(this.boundingBox.max,Ki.max),this.boundingBox.expandByPoint(eo)):(this.boundingBox.expandByPoint(Ki.min),this.boundingBox.expandByPoint(Ki.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new Cr);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new or,1/0);if(t){const n=this.boundingSphere.center;if(Ki.setFromBufferAttribute(t),e)for(let t=0,n=e.length;t<n;t++){const n=e[t];to.setFromBufferAttribute(n),this.morphTargetsRelative?(eo.addVectors(Ki.min,to.min),Ki.expandByPoint(eo),eo.addVectors(Ki.max,to.max),Ki.expandByPoint(eo)):(Ki.expandByPoint(to.min),Ki.expandByPoint(to.max))}Ki.getCenter(n);let r=0;for(let e=0,i=t.count;e<i;e++)eo.fromBufferAttribute(t,e),r=Math.max(r,n.distanceToSquared(eo));if(e)for(let i=0,o=e.length;i<o;i++){const o=e[i],a=this.morphTargetsRelative;for(let e=0,i=o.count;e<i;e++)eo.fromBufferAttribute(o,e),a&&(Qi.fromBufferAttribute(t,e),eo.add(Qi)),r=Math.max(r,n.distanceToSquared(eo))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}},computeFaceNormals:function(){},computeTangents:function(){const t=this.index,e=this.attributes;if(null===t||void 0===e.position||void 0===e.normal||void 0===e.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=t.array,r=e.position.array,i=e.normal.array,o=e.uv.array,a=r.length/3;void 0===e.tangent&&this.setAttribute("tangent",new Di(new Float32Array(4*a),4));const s=e.tangent.array,c=[],u=[];for(let t=0;t<a;t++)c[t]=new or,u[t]=new or;const l=new or,h=new or,f=new or,d=new Yn,p=new Yn,m=new Yn,g=new or,v=new or;function y(t,e,n){l.fromArray(r,3*t),h.fromArray(r,3*e),f.fromArray(r,3*n),d.fromArray(o,2*t),p.fromArray(o,2*e),m.fromArray(o,2*n),h.sub(l),f.sub(l),p.sub(d),m.sub(d);const i=1/(p.x*m.y-m.x*p.y);isFinite(i)&&(g.copy(h).multiplyScalar(m.y).addScaledVector(f,-p.y).multiplyScalar(i),v.copy(f).multiplyScalar(p.x).addScaledVector(h,-m.x).multiplyScalar(i),c[t].add(g),c[e].add(g),c[n].add(g),u[t].add(v),u[e].add(v),u[n].add(v))}let _=this.groups;0===_.length&&(_=[{start:0,count:n.length}]);for(let t=0,e=_.length;t<e;++t){const e=_[t],r=e.start;for(let t=r,i=r+e.count;t<i;t+=3)y(n[t+0],n[t+1],n[t+2])}const x=new or,b=new or,w=new or,M=new or;function S(t){w.fromArray(i,3*t),M.copy(w);const e=c[t];x.copy(e),x.sub(w.multiplyScalar(w.dot(e))).normalize(),b.crossVectors(M,e);const n=b.dot(u[t])<0?-1:1;s[4*t]=x.x,s[4*t+1]=x.y,s[4*t+2]=x.z,s[4*t+3]=n}for(let t=0,e=_.length;t<e;++t){const e=_[t],r=e.start;for(let t=r,i=r+e.count;t<i;t+=3)S(n[t+0]),S(n[t+1]),S(n[t+2])}},computeVertexNormals:function(){const t=this.index,e=this.getAttribute("position");if(void 0!==e){let n=this.getAttribute("normal");if(void 0===n)n=new Di(new Float32Array(3*e.count),3),this.setAttribute("normal",n);else for(let t=0,e=n.count;t<e;t++)n.setXYZ(t,0,0,0);const r=new or,i=new or,o=new or,a=new or,s=new or,c=new or,u=new or,l=new or;if(t)for(let h=0,f=t.count;h<f;h+=3){const f=t.getX(h+0),d=t.getX(h+1),p=t.getX(h+2);r.fromBufferAttribute(e,f),i.fromBufferAttribute(e,d),o.fromBufferAttribute(e,p),u.subVectors(o,i),l.subVectors(r,i),u.cross(l),a.fromBufferAttribute(n,f),s.fromBufferAttribute(n,d),c.fromBufferAttribute(n,p),a.add(u),s.add(u),c.add(u),n.setXYZ(f,a.x,a.y,a.z),n.setXYZ(d,s.x,s.y,s.z),n.setXYZ(p,c.x,c.y,c.z)}else for(let t=0,a=e.count;t<a;t+=3)r.fromBufferAttribute(e,t+0),i.fromBufferAttribute(e,t+1),o.fromBufferAttribute(e,t+2),u.subVectors(o,i),l.subVectors(r,i),u.cross(l),n.setXYZ(t+0,u.x,u.y,u.z),n.setXYZ(t+1,u.x,u.y,u.z),n.setXYZ(t+2,u.x,u.y,u.z);this.normalizeNormals(),n.needsUpdate=!0}},merge:function(t,e){if(!t||!t.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t);void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));const n=this.attributes;for(const r in n){if(void 0===t.attributes[r])continue;const i=n[r].array,o=t.attributes[r],a=o.array,s=o.itemSize*e,c=Math.min(a.length,i.length-s);for(let t=0,e=s;t<c;t++,e++)i[e]=a[t]}return this},normalizeNormals:function(){const t=this.attributes.normal;for(let e=0,n=t.count;e<n;e++)eo.fromBufferAttribute(t,e),eo.normalize(),t.setXYZ(e,eo.x,eo.y,eo.z)},toNonIndexed:function(){function t(t,e){const n=t.array,r=t.itemSize,i=t.normalized,o=new n.constructor(e.length*r);let a=0,s=0;for(let t=0,i=e.length;t<i;t++){a=e[t]*r;for(let t=0;t<r;t++)o[s++]=n[a++]}return new Di(o,r,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const e=new no,n=this.index.array,r=this.attributes;for(const i in r){const o=t(r[i],n);e.setAttribute(i,o)}const i=this.morphAttributes;for(const r in i){const o=[],a=i[r];for(let e=0,r=a.length;e<r;e++){const r=t(a[e],n);o.push(r)}e.morphAttributes[r]=o}e.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let t=0,n=o.length;t<n;t++){const n=o[t];e.addGroup(n.start,n.count,n.materialIndex)}return e},toJSON:function(){const t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),void 0!==this.parameters){const e=this.parameters;for(const n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};const e=this.index;null!==e&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const n=this.attributes;for(const e in n){const r=n[e];t.data.attributes[e]=r.toJSON(t.data)}const r={};let i=!1;for(const e in this.morphAttributes){const n=this.morphAttributes[e],o=[];for(let e=0,r=n.length;e<r;e++){const r=n[e];o.push(r.toJSON(t.data))}o.length>0&&(r[e]=o,i=!0)}i&&(t.data.morphAttributes=r,t.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(t.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return null!==a&&(t.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),t},clone:function(){return(new no).copy(this)},copy:function(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const n=t.index;null!==n&&this.setIndex(n.clone(e));const r=t.attributes;for(const t in r){const n=r[t];this.setAttribute(t,n.clone(e))}const i=t.morphAttributes;for(const t in i){const n=[],r=i[t];for(let t=0,i=r.length;t<i;t++)n.push(r[t].clone(e));this.morphAttributes[t]=n}this.morphTargetsRelative=t.morphTargetsRelative;const o=t.groups;for(let t=0,e=o.length;t<e;t++){const e=o[t];this.addGroup(e.start,e.count,e.materialIndex)}const a=t.boundingBox;null!==a&&(this.boundingBox=a.clone());const s=t.boundingSphere;return null!==s&&(this.boundingSphere=s.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}});const ro=new jr,io=new Dr,oo=new Cr,ao=new or,so=new or,co=new or,uo=new or,lo=new or,ho=new or,fo=new or,po=new or,mo=new or,go=new Yn,vo=new Yn,yo=new Yn,_o=new or,xo=new or;function bo(t=new no,e=new Oi){si.call(this),this.type="Mesh",this.geometry=t,this.material=e,this.updateMorphTargets()}function wo(t,e,n,r,i,o,a,s,c,u,l,h){ao.fromBufferAttribute(i,u),so.fromBufferAttribute(i,l),co.fromBufferAttribute(i,h);const f=t.morphTargetInfluences;if(e.morphTargets&&o&&f){fo.set(0,0,0),po.set(0,0,0),mo.set(0,0,0);for(let t=0,e=o.length;t<e;t++){const e=f[t],n=o[t];0!==e&&(uo.fromBufferAttribute(n,u),lo.fromBufferAttribute(n,l),ho.fromBufferAttribute(n,h),a?(fo.addScaledVector(uo,e),po.addScaledVector(lo,e),mo.addScaledVector(ho,e)):(fo.addScaledVector(uo.sub(ao),e),po.addScaledVector(lo.sub(so),e),mo.addScaledVector(ho.sub(co),e)))}ao.add(fo),so.add(po),co.add(mo)}t.isSkinnedMesh&&e.skinning&&(t.boneTransform(u,ao),t.boneTransform(l,so),t.boneTransform(h,co));const d=function(t,e,n,r,i,o,a,s){let c;if(c=e.side===M?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,e.side!==S,s),null===c)return null;xo.copy(s),xo.applyMatrix4(t.matrixWorld);const u=n.ray.origin.distanceTo(xo);return u<n.near||u>n.far?null:{distance:u,point:xo.clone(),object:t}}(t,e,n,r,ao,so,co,_o);if(d){s&&(go.fromBufferAttribute(s,u),vo.fromBufferAttribute(s,l),yo.fromBufferAttribute(s,h),d.uv=wi.getUV(_o,ao,so,co,go,vo,yo,new Yn)),c&&(go.fromBufferAttribute(c,u),vo.fromBufferAttribute(c,l),yo.fromBufferAttribute(c,h),d.uv2=wi.getUV(_o,ao,so,co,go,vo,yo,new Yn));const t={a:u,b:l,c:h,normal:new or,materialIndex:0};wi.getNormal(ao,so,co,t.normal),d.face=t}return d}bo.prototype=Object.assign(Object.create(si.prototype),{constructor:bo,isMesh:!0,copy:function(t){return si.prototype.copy.call(this,t),void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=t.material,this.geometry=t.geometry,this},updateMorphTargets:function(){const t=this.geometry;if(t.isBufferGeometry){const e=t.morphAttributes,n=Object.keys(e);if(n.length>0){const t=e[n[0]];if(void 0!==t){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,n=t.length;e<n;e++){const n=t[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}}}}else{const e=t.morphTargets;void 0!==e&&e.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}},raycast:function(t,e){const n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0===r)return;if(null===n.boundingSphere&&n.computeBoundingSphere(),oo.copy(n.boundingSphere),oo.applyMatrix4(i),!1===t.ray.intersectsSphere(oo))return;if(ro.copy(i).invert(),io.copy(t.ray).applyMatrix4(ro),null!==n.boundingBox&&!1===io.intersectsBox(n.boundingBox))return;let o;if(n.isBufferGeometry){const i=n.index,a=n.attributes.position,s=n.morphAttributes.position,c=n.morphTargetsRelative,u=n.attributes.uv,l=n.attributes.uv2,h=n.groups,f=n.drawRange;if(null!==i)if(Array.isArray(r))for(let n=0,d=h.length;n<d;n++){const d=h[n],p=r[d.materialIndex];for(let n=Math.max(d.start,f.start),r=Math.min(d.start+d.count,f.start+f.count);n<r;n+=3){const r=i.getX(n),h=i.getX(n+1),f=i.getX(n+2);o=wo(this,p,t,io,a,s,c,u,l,r,h,f),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=d.materialIndex,e.push(o))}}else{const n=Math.max(0,f.start),h=Math.min(i.count,f.start+f.count);for(let f=n,d=h;f<d;f+=3){const n=i.getX(f),h=i.getX(f+1),d=i.getX(f+2);o=wo(this,r,t,io,a,s,c,u,l,n,h,d),o&&(o.faceIndex=Math.floor(f/3),e.push(o))}}else if(void 0!==a)if(Array.isArray(r))for(let n=0,i=h.length;n<i;n++){const i=h[n],d=r[i.materialIndex];for(let n=Math.max(i.start,f.start),r=Math.min(i.start+i.count,f.start+f.count);n<r;n+=3)o=wo(this,d,t,io,a,s,c,u,l,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=i.materialIndex,e.push(o))}else for(let n=Math.max(0,i.start),i=Math.min(a.count,i.start+i.count);n<i;n+=3)o=wo(this,r,t,io,a,s,c,u,l,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),e.push(o))}else n.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}});class Mo extends no{constructor(t=1,e=1,n=1,r=1,i=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};const a=this;r=Math.floor(r),i=Math.floor(i),o=Math.floor(o);const s=[],c=[],u=[],l=[];let h=0,f=0;function d(t,e,n,r,i,o,d,p,m,g,v){const y=o/m,_=d/g,x=o/2,b=d/2,w=p/2,M=m+1,S=g+1;let T=0,E=0;const C=new or;for(let o=0;o<S;o++){const a=o*_-b;for(let s=0;s<M;s++){const h=s*y-x;C[t]=h*r,C[e]=a*i,C[n]=w,c.push(C.x,C.y,C.z),C[t]=0,C[e]=0,C[n]=p>0?1:-1,u.push(C.x,C.y,C.z),l.push(s/m),l.push(1-o/g),T+=1}}for(let t=0;t<g;t++)for(let e=0;e<m;e++){const n=h+e+M*t,r=h+e+M*(t+1),i=h+(e+1)+M*(t+1),o=h+(e+1)+M*t;s.push(n,r,o),s.push(r,i,o),E+=6}a.addGroup(f,E,v),f+=E,h+=T}d("z","y","x",-1,-1,n,e,t,o,i,0),d("z","y","x",1,-1,n,e,-t,o,i,1),d("x","z","y",1,1,t,n,e,r,o,2),d("x","z","y",1,-1,t,n,-e,r,o,3),d("x","y","z",1,-1,t,e,n,r,i,4),d("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(s),this.setAttribute("position",new Vi(c,3)),this.setAttribute("normal",new Vi(u,3)),this.setAttribute("uv",new Vi(l,2))}}function So(t){const e={};for(const n in t){e[n]={};for(const r in t[n]){const i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}}return e}function To(t){const e={};for(let n=0;n<t.length;n++){const r=So(t[n]);for(const t in r)e[t]=r[t]}return e}const Eo={clone:So,merge:To};function Co(t){Si.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function Ao(){si.call(this),this.type="Camera",this.matrixWorldInverse=new jr,this.projectionMatrix=new jr,this.projectionMatrixInverse=new jr}function Po(t=50,e=1,n=.1,r=2e3){Ao.call(this),this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}Co.prototype=Object.create(Si.prototype),Co.prototype.constructor=Co,Co.prototype.isShaderMaterial=!0,Co.prototype.copy=function(t){return Si.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=So(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=Object.assign({},t.extensions),this.glslVersion=t.glslVersion,this},Co.prototype.toJSON=function(t){const e=Si.prototype.toJSON.call(this,t);e.glslVersion=this.glslVersion,e.uniforms={};for(const n in this.uniforms){const r=this.uniforms[n].value;r&&r.isTexture?e.uniforms[n]={type:"t",value:r.toJSON(t).uuid}:r&&r.isColor?e.uniforms[n]={type:"c",value:r.getHex()}:r&&r.isVector2?e.uniforms[n]={type:"v2",value:r.toArray()}:r&&r.isVector3?e.uniforms[n]={type:"v3",value:r.toArray()}:r&&r.isVector4?e.uniforms[n]={type:"v4",value:r.toArray()}:r&&r.isMatrix3?e.uniforms[n]={type:"m3",value:r.toArray()}:r&&r.isMatrix4?e.uniforms[n]={type:"m4",value:r.toArray()}:e.uniforms[n]={value:r}}Object.keys(this.defines).length>0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader;const n={};for(const t in this.extensions)!0===this.extensions[t]&&(n[t]=!0);return Object.keys(n).length>0&&(e.extensions=n),e},Ao.prototype=Object.assign(Object.create(si.prototype),{constructor:Ao,isCamera:!0,copy:function(t,e){return si.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this},getWorldDirection:function(t){void 0===t&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),t=new or),this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()},updateMatrixWorld:function(t){si.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()},updateWorldMatrix:function(t,e){si.prototype.updateWorldMatrix.call(this,t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()},clone:function(){return(new this.constructor).copy(this)}}),Po.prototype=Object.assign(Object.create(Ao.prototype),{constructor:Po,isPerspectiveCamera:!0,copy:function(t,e){return Ao.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){const e=.5*this.getFilmHeight()/t;this.fov=2*qn.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){const t=Math.tan(.5*qn.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*qn.RAD2DEG*Math.atan(Math.tan(.5*qn.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,n,r,i,o){this.aspect=t/e,null===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.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){const t=this.near;let e=t*Math.tan(.5*qn.DEG2RAD*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r;const o=this.view;if(null!==this.view&&this.view.enabled){const t=o.fullWidth,a=o.fullHeight;i+=o.offsetX*r/t,e-=o.offsetY*n/a,r*=o.width/t,n*=o.height/a}const a=this.filmOffset;0!==a&&(i+=t*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()},toJSON:function(t){const e=si.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}});class Lo extends si{constructor(t,e,n){if(super(),this.type="CubeCamera",!0!==n.isWebGLCubeRenderTarget)return void console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");this.renderTarget=n;const r=new Po(90,1,t,e);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new or(1,0,0)),this.add(r);const i=new Po(90,1,t,e);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new or(-1,0,0)),this.add(i);const o=new Po(90,1,t,e);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(new or(0,1,0)),this.add(o);const a=new Po(90,1,t,e);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new or(0,-1,0)),this.add(a);const s=new Po(90,1,t,e);s.layers=this.layers,s.up.set(0,-1,0),s.lookAt(new or(0,0,1)),this.add(s);const c=new Po(90,1,t,e);c.layers=this.layers,c.up.set(0,-1,0),c.lookAt(new or(0,0,-1)),this.add(c)}update(t,e){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[r,i,o,a,s,c]=this.children,u=t.xr.enabled,l=t.getRenderTarget();t.xr.enabled=!1;const h=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,t.setRenderTarget(n,0),t.render(e,r),t.setRenderTarget(n,1),t.render(e,i),t.setRenderTarget(n,2),t.render(e,o),t.setRenderTarget(n,3),t.render(e,a),t.setRenderTarget(n,4),t.render(e,s),n.texture.generateMipmaps=h,t.setRenderTarget(n,5),t.render(e,c),t.setRenderTarget(l),t.xr.enabled=u}}class Ro extends Kn{constructor(t,e,n,r,i,o,a,s,c,u){super(t=void 0!==t?t:[],e=void 0!==e?e:dt,n,r,i,o,a=void 0!==a?a:Wt,s,c,u),this._needsFlipEnvMap=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}Ro.prototype.isCubeTexture=!0;class Oo extends nr{constructor(t,e,n){Number.isInteger(e)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),e=n),super(t,t,e),e=e||{},this.texture=new Ro(void 0,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.encoding),this.texture.generateMipmaps=void 0!==e.generateMipmaps&&e.generateMipmaps,this.texture.minFilter=void 0!==e.minFilter?e.minFilter:Ct,this.texture._needsFlipEnvMap=!1}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.format=Zt,this.texture.encoding=e.encoding,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;const n={tEquirect:{value:null}},r="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",i="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",o=new Mo(5,5,5),a=new Co({name:"CubemapFromEquirect",uniforms:So(n),vertexShader:r,fragmentShader:i,side:M,blending:C});a.uniforms.tEquirect.value=e;const s=new bo(o,a),c=e.minFilter;return e.minFilter===Lt&&(e.minFilter=Ct),new Lo(1,10,this).update(t,s),e.minFilter=c,s.geometry.dispose(),s.material.dispose(),this}clear(t,e,n,r){const i=t.getRenderTarget();for(let i=0;i<6;i++)t.setRenderTarget(this,i),t.clear(e,n,r);t.setRenderTarget(i)}}Oo.prototype.isWebGLCubeRenderTarget=!0;class ko extends Kn{constructor(t,e,n,r,i,o,a,s,c,u,l,h){super(null,o,a,s,c,u,r,i,l,h),this.image={data:t||null,width:e||1,height:n||1},this.magFilter=void 0!==c?c:wt,this.minFilter=void 0!==u?u:wt,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}ko.prototype.isDataTexture=!0;const Io=new Cr,Do=new or;class jo{constructor(t=new hi,e=new hi,n=new hi,r=new hi,i=new hi,o=new hi){this.planes=[t,e,n,r,i,o]}set(t,e,n,r,i,o){const a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this}copy(t){const e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t){const e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],l=n[7],h=n[8],f=n[9],d=n[10],p=n[11],m=n[12],g=n[13],v=n[14],y=n[15];return e[0].setComponents(a-r,l-s,p-h,y-m).normalize(),e[1].setComponents(a+r,l+s,p+h,y+m).normalize(),e[2].setComponents(a+i,l+c,p+f,y+g).normalize(),e[3].setComponents(a-i,l-c,p-f,y-g).normalize(),e[4].setComponents(a-o,l-u,p-d,y-v).normalize(),e[5].setComponents(a+o,l+u,p+d,y+v).normalize(),this}intersectsObject(t){const e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),Io.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(Io)}intersectsSprite(t){return Io.center.set(0,0,0),Io.radius=.7071067811865476,Io.applyMatrix4(t.matrixWorld),this.intersectsSphere(Io)}intersectsSphere(t){const e=this.planes,n=t.center,r=-t.radius;for(let t=0;t<6;t++)if(e[t].distanceToPoint(n)<r)return!1;return!0}intersectsBox(t){const e=this.planes;for(let n=0;n<6;n++){const r=e[n];if(Do.x=r.normal.x>0?t.max.x:t.min.x,Do.y=r.normal.y>0?t.max.y:t.min.y,Do.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(Do)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function zo(){let t=null,e=!1,n=null,r=null;function i(e,o){n(e,o),r=t.requestAnimationFrame(i)}return{start:function(){!0!==e&&null!==n&&(r=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(r),e=!1},setAnimationLoop:function(t){n=t},setContext:function(e){t=e}}}function No(t,e){const n=e.isWebGL2,r=new WeakMap;function i(e,r){const i=e.array,o=e.usage,a=t.createBuffer();t.bindBuffer(r,a),t.bufferData(r,i,o),e.onUploadCallback();let s=5126;return i instanceof Float32Array?s=5126:i instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):i instanceof Uint16Array?e.isFloat16BufferAttribute?n?s=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):s=5123:i instanceof Int16Array?s=5122:i instanceof Uint32Array?s=5125:i instanceof Int32Array?s=5124:i instanceof Int8Array?s=5120:i instanceof Uint8Array&&(s=5121),{buffer:a,type:s,bytesPerElement:i.BYTES_PER_ELEMENT,version:e.version}}function o(e,r,i){const o=r.array,a=r.updateRange;t.bindBuffer(i,e),-1===a.count?t.bufferSubData(i,0,o):(n?t.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o,a.offset,a.count):t.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o.subarray(a.offset,a.offset+a.count)),a.count=-1)}return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),r.get(t)},remove:function(e){e.isInterleavedBufferAttribute&&(e=e.data);const n=r.get(e);n&&(t.deleteBuffer(n.buffer),r.delete(e))},update:function(t,e){if(t.isGLBufferAttribute){const e=r.get(t);return void((!e||e.version<t.version)&&r.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version}))}t.isInterleavedBufferAttribute&&(t=t.data);const n=r.get(t);void 0===n?r.set(t,i(t,e)):n.version<t.version&&(o(n.buffer,t,e),n.version=t.version)}}}class Fo extends no{constructor(t=1,e=1,n=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};const i=t/2,o=e/2,a=Math.floor(n),s=Math.floor(r),c=a+1,u=s+1,l=t/a,h=e/s,f=[],d=[],p=[],m=[];for(let t=0;t<u;t++){const e=t*h-o;for(let n=0;n<c;n++){const r=n*l-i;d.push(r,-e,0),p.push(0,0,1),m.push(n/a),m.push(1-t/s)}}for(let t=0;t<s;t++)for(let e=0;e<a;e++){const n=e+c*t,r=e+c*(t+1),i=e+1+c*(t+1),o=e+1+c*t;f.push(n,r,o),f.push(r,i,o)}this.setIndex(f),this.setAttribute("position",new Vi(d,3)),this.setAttribute("normal",new Vi(p,3)),this.setAttribute("uv",new Vi(m,2))}}const Bo={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\n\t\tvec2 f = fract( uv );\n\t\tuv += 0.5 - f;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x += texelSize;\n\t\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.y += texelSize;\n\t\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x -= texelSize;\n\t\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tvec3 tm = mix( tl, tr, f.x );\n\t\tvec3 bm = mix( bl, br, f.x );\n\t\treturn mix( tm, bm, f.y );\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tfogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat specularRoughness;\n\tvec3 specularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\t\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\t\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmissionmap_fragment:"#ifdef USE_TRANSMISSIONMAP\n\ttotalTransmission *= texture2D( transmissionMap, vUv ).r;\n#endif",transmissionmap_pars_fragment:"#ifdef USE_TRANSMISSIONMAP\n\tuniform sampler2D transmissionMap;\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",cube_frag:"#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n\t#define TRANSMISSION\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef TRANSMISSION\n\tuniform float transmission;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <transmissionmap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#ifdef TRANSMISSION\n\t\tfloat totalTransmission = transmission;\n\t#endif\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <transmissionmap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#ifdef TRANSMISSION\n\t\tdiffuseColor.a *= mix( saturate( 1. - totalTransmission + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) ), 1.0, metalness );\n\t#endif\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}"},Ho={common:{diffuse:{value:new Ri(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Jn},uv2Transform:{value:new Jn},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Yn(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ri(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Ri(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new Jn}},sprite:{diffuse:{value:new Ri(15658734)},opacity:{value:1},center:{value:new Yn(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new Jn}}},Go={basic:{uniforms:To([Ho.common,Ho.specularmap,Ho.envmap,Ho.aomap,Ho.lightmap,Ho.fog]),vertexShader:Bo.meshbasic_vert,fragmentShader:Bo.meshbasic_frag},lambert:{uniforms:To([Ho.common,Ho.specularmap,Ho.envmap,Ho.aomap,Ho.lightmap,Ho.emissivemap,Ho.fog,Ho.lights,{emissive:{value:new Ri(0)}}]),vertexShader:Bo.meshlambert_vert,fragmentShader:Bo.meshlambert_frag},phong:{uniforms:To([Ho.common,Ho.specularmap,Ho.envmap,Ho.aomap,Ho.lightmap,Ho.emissivemap,Ho.bumpmap,Ho.normalmap,Ho.displacementmap,Ho.fog,Ho.lights,{emissive:{value:new Ri(0)},specular:{value:new Ri(1118481)},shininess:{value:30}}]),vertexShader:Bo.meshphong_vert,fragmentShader:Bo.meshphong_frag},standard:{uniforms:To([Ho.common,Ho.envmap,Ho.aomap,Ho.lightmap,Ho.emissivemap,Ho.bumpmap,Ho.normalmap,Ho.displacementmap,Ho.roughnessmap,Ho.metalnessmap,Ho.fog,Ho.lights,{emissive:{value:new Ri(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Bo.meshphysical_vert,fragmentShader:Bo.meshphysical_frag},toon:{uniforms:To([Ho.common,Ho.aomap,Ho.lightmap,Ho.emissivemap,Ho.bumpmap,Ho.normalmap,Ho.displacementmap,Ho.gradientmap,Ho.fog,Ho.lights,{emissive:{value:new Ri(0)}}]),vertexShader:Bo.meshtoon_vert,fragmentShader:Bo.meshtoon_frag},matcap:{uniforms:To([Ho.common,Ho.bumpmap,Ho.normalmap,Ho.displacementmap,Ho.fog,{matcap:{value:null}}]),vertexShader:Bo.meshmatcap_vert,fragmentShader:Bo.meshmatcap_frag},points:{uniforms:To([Ho.points,Ho.fog]),vertexShader:Bo.points_vert,fragmentShader:Bo.points_frag},dashed:{uniforms:To([Ho.common,Ho.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Bo.linedashed_vert,fragmentShader:Bo.linedashed_frag},depth:{uniforms:To([Ho.common,Ho.displacementmap]),vertexShader:Bo.depth_vert,fragmentShader:Bo.depth_frag},normal:{uniforms:To([Ho.common,Ho.bumpmap,Ho.normalmap,Ho.displacementmap,{opacity:{value:1}}]),vertexShader:Bo.normal_vert,fragmentShader:Bo.normal_frag},sprite:{uniforms:To([Ho.sprite,Ho.fog]),vertexShader:Bo.sprite_vert,fragmentShader:Bo.sprite_frag},background:{uniforms:{uvTransform:{value:new Jn},t2D:{value:null}},vertexShader:Bo.background_vert,fragmentShader:Bo.background_frag},cube:{uniforms:To([Ho.envmap,{opacity:{value:1}}]),vertexShader:Bo.cube_vert,fragmentShader:Bo.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Bo.equirect_vert,fragmentShader:Bo.equirect_frag},distanceRGBA:{uniforms:To([Ho.common,Ho.displacementmap,{referencePosition:{value:new or},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Bo.distanceRGBA_vert,fragmentShader:Bo.distanceRGBA_frag},shadow:{uniforms:To([Ho.lights,Ho.fog,{color:{value:new Ri(0)},opacity:{value:1}}]),vertexShader:Bo.shadow_vert,fragmentShader:Bo.shadow_frag}};function Uo(t,e,n,r,i){const o=new Ri(0);let a,s,c=0,u=null,l=0,h=null;function f(t,e){n.buffers.color.setClear(t.r,t.g,t.b,e,i)}return{getClearColor:function(){return o},setClearColor:function(t,e=1){o.set(t),c=e,f(o,c)},getClearAlpha:function(){return c},setClearAlpha:function(t){c=t,f(o,c)},render:function(n,i,d,p){let m=!0===i.isScene?i.background:null;m&&m.isTexture&&(m=e.get(m));const g=t.xr,v=g.getSession&&g.getSession();v&&"additive"===v.environmentBlendMode&&(m=null),null===m?f(o,c):m&&m.isColor&&(f(m,1),p=!0),(t.autoClear||p)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),m&&(m.isCubeTexture||m.mapping===vt)?(void 0===s&&(s=new bo(new Mo(1,1,1),new Co({name:"BackgroundCubeMaterial",uniforms:So(Go.cube.uniforms),vertexShader:Go.cube.vertexShader,fragmentShader:Go.cube.fragmentShader,side:M,depthTest:!1,depthWrite:!1,fog:!1})),s.geometry.deleteAttribute("normal"),s.geometry.deleteAttribute("uv"),s.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(s.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(s)),s.material.uniforms.envMap.value=m,s.material.uniforms.flipEnvMap.value=m.isCubeTexture&&m._needsFlipEnvMap?-1:1,u===m&&l===m.version&&h===t.toneMapping||(s.material.needsUpdate=!0,u=m,l=m.version,h=t.toneMapping),n.unshift(s,s.geometry,s.material,0,0,null)):m&&m.isTexture&&(void 0===a&&(a=new bo(new Fo(2,2),new Co({name:"BackgroundMaterial",uniforms:So(Go.background.uniforms),vertexShader:Go.background.vertexShader,fragmentShader:Go.background.fragmentShader,side:w,depthTest:!1,depthWrite:!1,fog:!1})),a.geometry.deleteAttribute("normal"),Object.defineProperty(a.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(a)),a.material.uniforms.t2D.value=m,!0===m.matrixAutoUpdate&&m.updateMatrix(),a.material.uniforms.uvTransform.value.copy(m.matrix),u===m&&l===m.version&&h===t.toneMapping||(a.material.needsUpdate=!0,u=m,l=m.version,h=t.toneMapping),n.unshift(a,a.geometry,a.material,0,0,null))}}}function Vo(t,e,n,r){const i=t.getParameter(34921),o=r.isWebGL2?null:e.get("OES_vertex_array_object"),a=r.isWebGL2||null!==o,s={},c=p(null);let u=c;function l(){return r.isWebGL2?t.createVertexArray():o.createVertexArrayOES()}function h(e){return r.isWebGL2?t.bindVertexArray(e):o.bindVertexArrayOES(e)}function f(e){return r.isWebGL2?t.deleteVertexArray(e):o.deleteVertexArrayOES(e)}function d(t,e,n){const r=!0===n.wireframe;let i=s[t.id];void 0===i&&(i={},s[t.id]=i);let o=i[e.id];void 0===o&&(o={},i[e.id]=o);let a=o[r];return void 0===a&&(a=p(l()),o[r]=a),a}function p(t){const e=[],n=[],r=[];for(let t=0;t<i;t++)e[t]=0,n[t]=0,r[t]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:e,enabledAttributes:n,attributeDivisors:r,object:t,attributes:{},index:null}}function m(){const t=u.newAttributes;for(let e=0,n=t.length;e<n;e++)t[e]=0}function g(t){v(t,0)}function v(n,i){const o=u.newAttributes,a=u.enabledAttributes,s=u.attributeDivisors;o[n]=1,0===a[n]&&(t.enableVertexAttribArray(n),a[n]=1),s[n]!==i&&((r.isWebGL2?t:e.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,i),s[n]=i)}function y(){const e=u.newAttributes,n=u.enabledAttributes;for(let r=0,i=n.length;r<i;r++)n[r]!==e[r]&&(t.disableVertexAttribArray(r),n[r]=0)}function _(e,n,i,o,a,s){!0!==r.isWebGL2||5124!==i&&5125!==i?t.vertexAttribPointer(e,n,i,o,a,s):t.vertexAttribIPointer(e,n,i,a,s)}function x(i,o,a,s){if(!1===r.isWebGL2&&(i.isInstancedMesh||s.isInstancedBufferGeometry)&&null===e.get("ANGLE_instanced_arrays"))return;m();const c=s.attributes,u=a.getAttributes(),l=o.defaultAttributeValues;for(const e in u){const r=u[e];if(r>=0){const o=c[e];if(void 0!==o){const e=o.normalized,i=o.itemSize,a=n.get(o);if(void 0===a)continue;const c=a.buffer,u=a.type,l=a.bytesPerElement;if(o.isInterleavedBufferAttribute){const n=o.data,a=n.stride,h=o.offset;n&&n.isInstancedInterleavedBuffer?(v(r,n.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=n.meshPerAttribute*n.count)):g(r),t.bindBuffer(34962,c),_(r,i,u,e,a*l,h*l)}else o.isInstancedBufferAttribute?(v(r,o.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=o.meshPerAttribute*o.count)):g(r),t.bindBuffer(34962,c),_(r,i,u,e,0,0)}else if("instanceMatrix"===e){const e=n.get(i.instanceMatrix);if(void 0===e)continue;const o=e.buffer,a=e.type;v(r+0,1),v(r+1,1),v(r+2,1),v(r+3,1),t.bindBuffer(34962,o),t.vertexAttribPointer(r+0,4,a,!1,64,0),t.vertexAttribPointer(r+1,4,a,!1,64,16),t.vertexAttribPointer(r+2,4,a,!1,64,32),t.vertexAttribPointer(r+3,4,a,!1,64,48)}else if("instanceColor"===e){const e=n.get(i.instanceColor);if(void 0===e)continue;const o=e.buffer,a=e.type;v(r,1),t.bindBuffer(34962,o),t.vertexAttribPointer(r,3,a,!1,12,0)}else if(void 0!==l){const n=l[e];if(void 0!==n)switch(n.length){case 2:t.vertexAttrib2fv(r,n);break;case 3:t.vertexAttrib3fv(r,n);break;case 4:t.vertexAttrib4fv(r,n);break;default:t.vertexAttrib1fv(r,n)}}}}y()}function b(){w(),u!==c&&(u=c,h(u.object))}function w(){c.geometry=null,c.program=null,c.wireframe=!1}return{setup:function(e,r,i,o,s){let c=!1;if(a){const t=d(o,i,r);u!==t&&(u=t,h(u.object)),c=function(t,e){const n=u.attributes,r=t.attributes;let i=0;for(const t in r){const e=n[t],o=r[t];if(void 0===e)return!0;if(e.attribute!==o)return!0;if(e.data!==o.data)return!0;i++}return u.attributesNum!==i||u.index!==e}(o,s),c&&function(t,e){const n={},r=t.attributes;let i=0;for(const t in r){const e=r[t],o={};o.attribute=e,e.data&&(o.data=e.data),n[t]=o,i++}u.attributes=n,u.attributesNum=i,u.index=e}(o,s)}else{const t=!0===r.wireframe;u.geometry===o.id&&u.program===i.id&&u.wireframe===t||(u.geometry=o.id,u.program=i.id,u.wireframe=t,c=!0)}!0===e.isInstancedMesh&&(c=!0),null!==s&&n.update(s,34963),c&&(x(e,r,i,o),null!==s&&t.bindBuffer(34963,n.get(s).buffer))},reset:b,resetDefaultState:w,dispose:function(){b();for(const t in s){const e=s[t];for(const t in e){const n=e[t];for(const t in n)f(n[t].object),delete n[t];delete e[t]}delete s[t]}},releaseStatesOfGeometry:function(t){if(void 0===s[t.id])return;const e=s[t.id];for(const t in e){const n=e[t];for(const t in n)f(n[t].object),delete n[t];delete e[t]}delete s[t.id]},releaseStatesOfProgram:function(t){for(const e in s){const n=s[e];if(void 0===n[t.id])continue;const r=n[t.id];for(const t in r)f(r[t].object),delete r[t];delete n[t.id]}},initAttributes:m,enableAttribute:g,disableUnusedAttributes:y}}function Wo(t,e,n,r){const i=r.isWebGL2;let o;this.setMode=function(t){o=t},this.render=function(e,r){t.drawArrays(o,e,r),n.update(r,o,1)},this.renderInstances=function(r,a,s){if(0===s)return;let c,u;if(i)c=t,u="drawArraysInstanced";else if(c=e.get("ANGLE_instanced_arrays"),u="drawArraysInstancedANGLE",null===c)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");c[u](o,r,a,s),n.update(a,o,s)}}function Zo(t,e,n){let r;function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(35633,36338).precision>0&&t.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(35633,36337).precision>0&&t.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&t instanceof WebGL2ComputeRenderingContext;let a=void 0!==n.precision?n.precision:"highp";const s=i(a);s!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",s,"instead."),a=s);const c=!0===n.logarithmicDepthBuffer,u=t.getParameter(34930),l=t.getParameter(35660),h=t.getParameter(3379),f=t.getParameter(34076),d=t.getParameter(34921),p=t.getParameter(36347),m=t.getParameter(36348),g=t.getParameter(36349),v=l>0,y=o||e.has("OES_texture_float");return{isWebGL2:o,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===e.has("EXT_texture_filter_anisotropic")){const n=e.get("EXT_texture_filter_anisotropic");r=t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:a,logarithmicDepthBuffer:c,maxTextures:u,maxVertexTextures:l,maxTextureSize:h,maxCubemapSize:f,maxAttributes:d,maxVertexUniforms:p,maxVaryings:m,maxFragmentUniforms:g,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y,maxSamples:o?t.getParameter(36183):0}}function qo(t){const e=this;let n=null,r=0,i=!1,o=!1;const a=new hi,s=new Jn,c={value:null,needsUpdate:!1};function u(){c.value!==n&&(c.value=n,c.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function l(t,n,r,i){const o=null!==t?t.length:0;let u=null;if(0!==o){if(u=c.value,!0!==i||null===u){const e=r+4*o,i=n.matrixWorldInverse;s.getNormalMatrix(i),(null===u||u.length<e)&&(u=new Float32Array(e));for(let e=0,n=r;e!==o;++e,n+=4)a.copy(t[e]).applyMatrix4(i,s),a.normal.toArray(u,n),u[n+3]=a.constant}c.value=u,c.needsUpdate=!0}return e.numPlanes=o,e.numIntersection=0,u}this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(t,e,o){const a=0!==t.length||e||0!==r||i;return i=e,n=l(t,o,0),r=t.length,a},this.beginShadows=function(){o=!0,l(null)},this.endShadows=function(){o=!1,u()},this.setState=function(e,a,s){const h=e.clippingPlanes,f=e.clipIntersection,d=e.clipShadows,p=t.get(e);if(!i||null===h||0===h.length||o&&!d)o?l(null):u();else{const t=o?0:r,e=4*t;let i=p.clippingState||null;c.value=i,i=l(h,a,e,s);for(let t=0;t!==e;++t)i[t]=n[t];p.clippingState=i,this.numIntersection=f?this.numPlanes:0,this.numPlanes+=t}}}function Yo(t){let e=new WeakMap;function n(t,e){return e===mt?t.mapping=dt:e===gt&&(t.mapping=pt),t}function r(t){const n=t.target;n.removeEventListener("dispose",r);const i=e.get(n);void 0!==i&&(e.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const o=i.mapping;if(o===mt||o===gt){if(e.has(i))return n(e.get(i).texture,i.mapping);{const o=i.image;if(o&&o.height>0){const a=t.getRenderTarget(),s=new Oo(o.height/2);return s.fromEquirectangularTexture(t,i),e.set(i,s),t.setRenderTarget(a),i.addEventListener("dispose",r),n(s.texture,i.mapping)}return null}}}return i},dispose:function(){e=new WeakMap}}}function Jo(t){const e={};function n(n){if(void 0!==e[n])return e[n];let r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(n)}return e[n]=r,r}return{has:function(t){return null!==n(t)},init:function(t){t.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float")},get:function(t){const e=n(t);return null===e&&console.warn("THREE.WebGLRenderer: "+t+" extension not supported."),e}}}function Xo(t,e,n,r){const i={},o=new WeakMap;function a(t){const s=t.target;null!==s.index&&e.remove(s.index);for(const t in s.attributes)e.remove(s.attributes[t]);s.removeEventListener("dispose",a),delete i[s.id];const c=o.get(s);c&&(e.remove(c),o.delete(s)),r.releaseStatesOfGeometry(s),!0===s.isInstancedBufferGeometry&&delete s._maxInstanceCount,n.memory.geometries--}function s(t){const n=[],r=t.index,i=t.attributes.position;let a=0;if(null!==r){const t=r.array;a=r.version;for(let e=0,r=t.length;e<r;e+=3){const r=t[e+0],i=t[e+1],o=t[e+2];n.push(r,i,i,o,o,r)}}else{const t=i.array;a=i.version;for(let e=0,r=t.length/3-1;e<r;e+=3){const t=e+0,r=e+1,i=e+2;n.push(t,r,r,i,i,t)}}const s=new(Zi(n)>65535?Gi:Bi)(n,1);s.version=a;const c=o.get(t);c&&e.remove(c),o.set(t,s)}return{get:function(t,e){return!0===i[e.id]||(e.addEventListener("dispose",a),i[e.id]=!0,n.memory.geometries++),e},update:function(t){const n=t.attributes;for(const t in n)e.update(n[t],34962);const r=t.morphAttributes;for(const t in r){const n=r[t];for(let t=0,r=n.length;t<r;t++)e.update(n[t],34962)}},getWireframeAttribute:function(t){const e=o.get(t);if(e){const n=t.index;null!==n&&e.version<n.version&&s(t)}else s(t);return o.get(t)}}}function $o(t,e,n,r){const i=r.isWebGL2;let o,a,s;this.setMode=function(t){o=t},this.setIndex=function(t){a=t.type,s=t.bytesPerElement},this.render=function(e,r){t.drawElements(o,r,a,e*s),n.update(r,o,1)},this.renderInstances=function(r,c,u){if(0===u)return;let l,h;if(i)l=t,h="drawElementsInstanced";else if(l=e.get("ANGLE_instanced_arrays"),h="drawElementsInstancedANGLE",null===l)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[h](o,c,a,r*s,u),n.update(c,o,u)}}function Qo(t){const e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(t,n,r){switch(e.calls++,n){case 4:e.triangles+=r*(t/3);break;case 1:e.lines+=r*(t/2);break;case 3:e.lines+=r*(t-1);break;case 2:e.lines+=r*t;break;case 0:e.points+=r*t;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function Ko(t,e){return t[0]-e[0]}function ta(t,e){return Math.abs(e[1])-Math.abs(t[1])}function ea(t){const e={},n=new Float32Array(8),r=[];for(let t=0;t<8;t++)r[t]=[t,0];return{update:function(i,o,a,s){const c=i.morphTargetInfluences,u=void 0===c?0:c.length;let l=e[o.id];if(void 0===l){l=[];for(let t=0;t<u;t++)l[t]=[t,0];e[o.id]=l}for(let t=0;t<u;t++){const e=l[t];e[0]=t,e[1]=c[t]}l.sort(ta);for(let t=0;t<8;t++)t<u&&l[t][1]?(r[t][0]=l[t][0],r[t][1]=l[t][1]):(r[t][0]=Number.MAX_SAFE_INTEGER,r[t][1]=0);r.sort(Ko);const h=a.morphTargets&&o.morphAttributes.position,f=a.morphNormals&&o.morphAttributes.normal;let d=0;for(let t=0;t<8;t++){const e=r[t],i=e[0],a=e[1];i!==Number.MAX_SAFE_INTEGER&&a?(h&&o.getAttribute("morphTarget"+t)!==h[i]&&o.setAttribute("morphTarget"+t,h[i]),f&&o.getAttribute("morphNormal"+t)!==f[i]&&o.setAttribute("morphNormal"+t,f[i]),n[t]=a,d+=a):(h&&!0===o.hasAttribute("morphTarget"+t)&&o.deleteAttribute("morphTarget"+t),f&&!0===o.hasAttribute("morphNormal"+t)&&o.deleteAttribute("morphNormal"+t),n[t]=0)}const p=o.morphTargetsRelative?1:1-d;s.getUniforms().setValue(t,"morphTargetBaseInfluence",p),s.getUniforms().setValue(t,"morphTargetInfluences",n)}}}function na(t,e,n,r){let i=new WeakMap;function o(t){const e=t.target;e.removeEventListener("dispose",o),n.remove(e.instanceMatrix),null!==e.instanceColor&&n.remove(e.instanceColor)}return{update:function(t){const a=r.render.frame,s=t.geometry,c=e.get(t,s);return i.get(c)!==a&&(e.update(c),i.set(c,a)),t.isInstancedMesh&&(!1===t.hasEventListener("dispose",o)&&t.addEventListener("dispose",o),n.update(t.instanceMatrix,34962),null!==t.instanceColor&&n.update(t.instanceColor,34962)),c},dispose:function(){i=new WeakMap}}}Go.physical={uniforms:To([Go.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new Yn(1,1)},clearcoatNormalMap:{value:null},sheen:{value:new Ri(0)},transmission:{value:0},transmissionMap:{value:null}}]),vertexShader:Bo.meshphysical_vert,fragmentShader:Bo.meshphysical_frag};class ra extends Kn{constructor(t=null,e=1,n=1,r=1){super(null),this.image={data:t,width:e,height:n,depth:r},this.magFilter=wt,this.minFilter=wt,this.wrapR=xt,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}}ra.prototype.isDataTexture2DArray=!0;class ia extends Kn{constructor(t=null,e=1,n=1,r=1){super(null),this.image={data:t,width:e,height:n,depth:r},this.magFilter=wt,this.minFilter=wt,this.wrapR=xt,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}}ia.prototype.isDataTexture3D=!0;const oa=new Kn,aa=new ra,sa=new ia,ca=new Ro,ua=[],la=[],ha=new Float32Array(16),fa=new Float32Array(9),da=new Float32Array(4);function pa(t,e,n){const r=t[0];if(r<=0||r>0)return t;const i=e*n;let o=ua[i];if(void 0===o&&(o=new Float32Array(i),ua[i]=o),0!==e){r.toArray(o,0);for(let r=1,i=0;r!==e;++r)i+=n,t[r].toArray(o,i)}return o}function ma(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n<r;n++)if(t[n]!==e[n])return!1;return!0}function ga(t,e){for(let n=0,r=e.length;n<r;n++)t[n]=e[n]}function va(t,e){let n=la[e];void 0===n&&(n=new Int32Array(e),la[e]=n);for(let r=0;r!==e;++r)n[r]=t.allocateTextureUnit();return n}function ya(t,e){const n=this.cache;n[0]!==e&&(t.uniform1f(this.addr,e),n[0]=e)}function _a(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y||(t.uniform2f(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(ma(n,e))return;t.uniform2fv(this.addr,e),ga(n,e)}}function xa(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z||(t.uniform3f(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else if(void 0!==e.r)n[0]===e.r&&n[1]===e.g&&n[2]===e.b||(t.uniform3f(this.addr,e.r,e.g,e.b),n[0]=e.r,n[1]=e.g,n[2]=e.b);else{if(ma(n,e))return;t.uniform3fv(this.addr,e),ga(n,e)}}function ba(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z&&n[3]===e.w||(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(ma(n,e))return;t.uniform4fv(this.addr,e),ga(n,e)}}function wa(t,e){const n=this.cache,r=e.elements;if(void 0===r){if(ma(n,e))return;t.uniformMatrix2fv(this.addr,!1,e),ga(n,e)}else{if(ma(n,r))return;da.set(r),t.uniformMatrix2fv(this.addr,!1,da),ga(n,r)}}function Ma(t,e){const n=this.cache,r=e.elements;if(void 0===r){if(ma(n,e))return;t.uniformMatrix3fv(this.addr,!1,e),ga(n,e)}else{if(ma(n,r))return;fa.set(r),t.uniformMatrix3fv(this.addr,!1,fa),ga(n,r)}}function Sa(t,e){const n=this.cache,r=e.elements;if(void 0===r){if(ma(n,e))return;t.uniformMatrix4fv(this.addr,!1,e),ga(n,e)}else{if(ma(n,r))return;ha.set(r),t.uniformMatrix4fv(this.addr,!1,ha),ga(n,r)}}function Ta(t,e){const n=this.cache;n[0]!==e&&(t.uniform1i(this.addr,e),n[0]=e)}function Ea(t,e){const n=this.cache;ma(n,e)||(t.uniform2iv(this.addr,e),ga(n,e))}function Ca(t,e){const n=this.cache;ma(n,e)||(t.uniform3iv(this.addr,e),ga(n,e))}function Aa(t,e){const n=this.cache;ma(n,e)||(t.uniform4iv(this.addr,e),ga(n,e))}function Pa(t,e){const n=this.cache;n[0]!==e&&(t.uniform1ui(this.addr,e),n[0]=e)}function La(t,e){const n=this.cache;ma(n,e)||(t.uniform2uiv(this.addr,e),ga(n,e))}function Ra(t,e){const n=this.cache;ma(n,e)||(t.uniform3uiv(this.addr,e),ga(n,e))}function Oa(t,e){const n=this.cache;ma(n,e)||(t.uniform4uiv(this.addr,e),ga(n,e))}function ka(t,e,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i),n.safeSetTexture2D(e||oa,i)}function Ia(t,e,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(e||sa,i)}function Da(t,e,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i),n.safeSetTextureCube(e||ca,i)}function ja(t,e,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(e||aa,i)}function za(t,e){t.uniform1fv(this.addr,e)}function Na(t,e){const n=pa(e,this.size,2);t.uniform2fv(this.addr,n)}function Fa(t,e){const n=pa(e,this.size,3);t.uniform3fv(this.addr,n)}function Ba(t,e){const n=pa(e,this.size,4);t.uniform4fv(this.addr,n)}function Ha(t,e){const n=pa(e,this.size,4);t.uniformMatrix2fv(this.addr,!1,n)}function Ga(t,e){const n=pa(e,this.size,9);t.uniformMatrix3fv(this.addr,!1,n)}function Ua(t,e){const n=pa(e,this.size,16);t.uniformMatrix4fv(this.addr,!1,n)}function Va(t,e){t.uniform1iv(this.addr,e)}function Wa(t,e){t.uniform2iv(this.addr,e)}function Za(t,e){t.uniform3iv(this.addr,e)}function qa(t,e){t.uniform4iv(this.addr,e)}function Ya(t,e){t.uniform1uiv(this.addr,e)}function Ja(t,e){t.uniform2uiv(this.addr,e)}function Xa(t,e){t.uniform3uiv(this.addr,e)}function $a(t,e){t.uniform4uiv(this.addr,e)}function Qa(t,e,n){const r=e.length,i=va(n,r);t.uniform1iv(this.addr,i);for(let t=0;t!==r;++t)n.safeSetTexture2D(e[t]||oa,i[t])}function Ka(t,e,n){const r=e.length,i=va(n,r);t.uniform1iv(this.addr,i);for(let t=0;t!==r;++t)n.safeSetTextureCube(e[t]||ca,i[t])}function ts(t,e,n){this.id=t,this.addr=n,this.cache=[],this.setValue=function(t){switch(t){case 5126:return ya;case 35664:return _a;case 35665:return xa;case 35666:return ba;case 35674:return wa;case 35675:return Ma;case 35676:return Sa;case 5124:case 35670:return Ta;case 35667:case 35671:return Ea;case 35668:case 35672:return Ca;case 35669:case 35673:return Aa;case 5125:return Pa;case 36294:return La;case 36295:return Ra;case 36296:return Oa;case 35678:case 36198:case 36298:case 36306:case 35682:return ka;case 35679:case 36299:case 36307:return Ia;case 35680:case 36300:case 36308:case 36293:return Da;case 36289:case 36303:case 36311:case 36292:return ja}}(e.type)}function es(t,e,n){this.id=t,this.addr=n,this.cache=[],this.size=e.size,this.setValue=function(t){switch(t){case 5126:return za;case 35664:return Na;case 35665:return Fa;case 35666:return Ba;case 35674:return Ha;case 35675:return Ga;case 35676:return Ua;case 5124:case 35670:return Va;case 35667:case 35671:return Wa;case 35668:case 35672:return Za;case 35669:case 35673:return qa;case 5125:return Ya;case 36294:return Ja;case 36295:return Xa;case 36296:return $a;case 35678:case 36198:case 36298:case 36306:case 35682:return Qa;case 35680:case 36300:case 36308:case 36293:return Ka}}(e.type)}function ns(t){this.id=t,this.seq=[],this.map={}}es.prototype.updateCache=function(t){const e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),ga(e,t)},ns.prototype.setValue=function(t,e,n){const r=this.seq;for(let i=0,o=r.length;i!==o;++i){const o=r[i];o.setValue(t,e[o.id],n)}};const rs=/(\w+)(\])?(\[|\.)?/g;function is(t,e){t.seq.push(e),t.map[e.id]=e}function os(t,e,n){const r=t.name,i=r.length;for(rs.lastIndex=0;;){const o=rs.exec(r),a=rs.lastIndex;let s=o[1];const c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===i){is(n,void 0===u?new ts(s,t,e):new es(s,t,e));break}{let t=n.map[s];void 0===t&&(t=new ns(s),is(n,t)),n=t}}}function as(t,e){this.seq=[],this.map={};const n=t.getProgramParameter(e,35718);for(let r=0;r<n;++r){const n=t.getActiveUniform(e,r);os(n,t.getUniformLocation(e,n.name),this)}}function ss(t,e,n){const r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),r}as.prototype.setValue=function(t,e,n,r){const i=this.map[e];void 0!==i&&i.setValue(t,n,r)},as.prototype.setOptional=function(t,e,n){const r=e[n];void 0!==r&&this.setValue(t,n,r)},as.upload=function(t,e,n,r){for(let i=0,o=e.length;i!==o;++i){const o=e[i],a=n[o.id];!1!==a.needsUpdate&&o.setValue(t,a.value,r)}},as.seqWithValue=function(t,e){const n=[];for(let r=0,i=t.length;r!==i;++r){const i=t[r];i.id in e&&n.push(i)}return n};let cs=0;function us(t){switch(t){case on:return["Linear","( value )"];case an:return["sRGB","( value )"];case cn:return["RGBE","( value )"];case ln:return["RGBM","( value, 7.0 )"];case hn:return["RGBM","( value, 16.0 )"];case fn:return["RGBD","( value, 256.0 )"];case sn:return["Gamma","( value, float( GAMMA_FACTOR ) )"];case un:return["LogLuv","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",t),["Linear","( value )"]}}function ls(t,e,n){const r=t.getShaderParameter(e,35713),i=t.getShaderInfoLog(e).trim();return r&&""===i?"":"THREE.WebGLShader: gl.getShaderInfoLog() "+n+"\n"+i+function(t){const e=t.split("\n");for(let t=0;t<e.length;t++)e[t]=t+1+": "+e[t];return e.join("\n")}(t.getShaderSource(e))}function hs(t,e){const n=us(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function fs(t,e){const n=us(e);return"vec4 "+t+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function ds(t,e){let n;switch(e){case st:n="Linear";break;case ct:n="Reinhard";break;case ut:n="OptimizedCineon";break;case lt:n="ACESFilmic";break;case ht:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function ps(t){return""!==t}function ms(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function gs(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const vs=/^[ \t]*#include +<([\w\d./]+)>/gm;function ys(t){return t.replace(vs,_s)}function _s(t,e){const n=Bo[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return ys(n)}const xs=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,bs=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function ws(t){return t.replace(bs,Ss).replace(xs,Ms)}function Ms(t,e,n,r){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),Ss(0,e,n,r)}function Ss(t,e,n,r){let i="";for(let t=parseInt(e);t<parseInt(n);t++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+t+" ]").replace(/UNROLLED_LOOP_INDEX/g,t);return i}function Ts(t){let e="precision "+t.precision+" float;\nprecision "+t.precision+" int;";return"highp"===t.precision?e+="\n#define HIGH_PRECISION":"mediump"===t.precision?e+="\n#define MEDIUM_PRECISION":"lowp"===t.precision&&(e+="\n#define LOW_PRECISION"),e}function Es(t){let e="SHADOWMAP_TYPE_BASIC";return t.shadowMapType===_?e="SHADOWMAP_TYPE_PCF":t.shadowMapType===x?e="SHADOWMAP_TYPE_PCF_SOFT":t.shadowMapType===b&&(e="SHADOWMAP_TYPE_VSM"),e}function Cs(t,e,n,r){const i=t.getContext(),o=n.defines;let a=n.vertexShader,s=n.fragmentShader;const c=Es(n),u=function(t){let e="ENVMAP_TYPE_CUBE";if(t.envMap)switch(t.envMapMode){case dt:case pt:e="ENVMAP_TYPE_CUBE";break;case vt:case yt:e="ENVMAP_TYPE_CUBE_UV"}return e}(n),l=function(t){let e="ENVMAP_MODE_REFLECTION";if(t.envMap)switch(t.envMapMode){case pt:case yt:e="ENVMAP_MODE_REFRACTION"}return e}(n),h=function(t){let e="ENVMAP_BLENDING_NONE";if(t.envMap)switch(t.combine){case rt:e="ENVMAP_BLENDING_MULTIPLY";break;case it:e="ENVMAP_BLENDING_MIX";break;case ot:e="ENVMAP_BLENDING_ADD"}return e}(n),f=t.gammaFactor>0?t.gammaFactor:1,d=n.isWebGL2?"":function(t){return[t.extensionDerivatives||t.envMapCubeUV||t.bumpMap||t.tangentSpaceNormalMap||t.clearcoatNormalMap||t.flatShading||"physical"===t.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(t.extensionFragDepth||t.logarithmicDepthBuffer)&&t.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",t.extensionDrawBuffers&&t.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(t.extensionShaderTextureLOD||t.envMap)&&t.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(ps).join("\n")}(n),p=function(t){const e=[];for(const n in t){const r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\n")}(o),m=i.createProgram();let g,v,y=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(g=[p].filter(ps).join("\n"),g.length>0&&(g+="\n"),v=[d,p].filter(ps).join("\n"),v.length>0&&(v+="\n")):(g=[Ts(n),"#define SHADER_NAME "+n.shaderName,p,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+f,"#define MAX_BONES "+n.maxBones,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+l:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.useVertexTexture?"#define BONE_TEXTURE":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+c:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(ps).join("\n"),v=[d,Ts(n),"#define SHADER_NAME "+n.shaderName,p,n.alphaTest?"#define ALPHATEST "+n.alphaTest+(n.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+f,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.envMap?"#define "+l:"",n.envMap?"#define "+h:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.sheen?"#define USE_SHEEN":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+c:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(n.extensionShaderTextureLOD||n.envMap)&&n.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==at?"#define TONE_MAPPING":"",n.toneMapping!==at?Bo.tonemapping_pars_fragment:"",n.toneMapping!==at?ds("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",Bo.encodings_pars_fragment,n.map?hs("mapTexelToLinear",n.mapEncoding):"",n.matcap?hs("matcapTexelToLinear",n.matcapEncoding):"",n.envMap?hs("envMapTexelToLinear",n.envMapEncoding):"",n.emissiveMap?hs("emissiveMapTexelToLinear",n.emissiveMapEncoding):"",n.lightMap?hs("lightMapTexelToLinear",n.lightMapEncoding):"",fs("linearToOutputTexel",n.outputEncoding),n.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(ps).join("\n")),a=ys(a),a=ms(a,n),a=gs(a,n),s=ys(s),s=ms(s,n),s=gs(s,n),a=ws(a),s=ws(s),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(y="#version 300 es\n",g=["#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+g,v=["#define varying in",n.glslVersion===Un?"":"out highp vec4 pc_fragColor;",n.glslVersion===Un?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+v);const _=y+v+s,x=ss(i,35633,y+g+a),b=ss(i,35632,_);if(i.attachShader(m,x),i.attachShader(m,b),void 0!==n.index0AttributeName?i.bindAttribLocation(m,0,n.index0AttributeName):!0===n.morphTargets&&i.bindAttribLocation(m,0,"position"),i.linkProgram(m),t.debug.checkShaderErrors){const t=i.getProgramInfoLog(m).trim(),e=i.getShaderInfoLog(x).trim(),n=i.getShaderInfoLog(b).trim();let r=!0,o=!0;if(!1===i.getProgramParameter(m,35714)){r=!1;const e=ls(i,x,"vertex"),n=ls(i,b,"fragment");console.error("THREE.WebGLProgram: shader error: ",i.getError(),"35715",i.getProgramParameter(m,35715),"gl.getProgramInfoLog",t,e,n)}else""!==t?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",t):""!==e&&""!==n||(o=!1);o&&(this.diagnostics={runnable:r,programLog:t,vertexShader:{log:e,prefix:g},fragmentShader:{log:n,prefix:v}})}let w,M;return i.deleteShader(x),i.deleteShader(b),this.getUniforms=function(){return void 0===w&&(w=new as(i,m)),w},this.getAttributes=function(){return void 0===M&&(M=function(t,e){const n={},r=t.getProgramParameter(e,35721);for(let i=0;i<r;i++){const r=t.getActiveAttrib(e,i).name;n[r]=t.getAttribLocation(e,r)}return n}(i,m)),M},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(m),this.program=void 0},this.name=n.shaderName,this.id=cs++,this.cacheKey=e,this.usedTimes=1,this.program=m,this.vertexShader=x,this.fragmentShader=b,this}function As(t,e,n,r,i,o){const a=[],s=r.isWebGL2,c=r.logarithmicDepthBuffer,u=r.floatVertexTextures,l=r.maxVertexUniforms,h=r.vertexTextures;let f=r.precision;const d={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},p=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","instancingColor","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","vertexAlphas","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","sheen","transmissionMap"];function m(t){const e=t.skeleton.bones;if(u)return 1024;{const t=l,n=Math.floor((t-20)/4),r=Math.min(n,e.length);return r<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+r+"."),0):r}}function g(t){let e;return t&&t.isTexture?e=t.encoding:t&&t.isWebGLRenderTarget?(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),e=t.texture.encoding):e=on,e}return{getParameters:function(i,a,l,p,v){const y=p.fog,_=i.isMeshStandardMaterial?p.environment:null,x=e.get(i.envMap||_),b=d[i.type],w=v.isSkinnedMesh?m(v):0;let T,E;if(null!==i.precision&&(f=r.getMaxPrecision(i.precision),f!==i.precision&&console.warn("THREE.WebGLProgram.getParameters:",i.precision,"not supported, using",f,"instead.")),b){const t=Go[b];T=t.vertexShader,E=t.fragmentShader}else T=i.vertexShader,E=i.fragmentShader;const C=t.getRenderTarget();return{isWebGL2:s,shaderID:b,shaderName:i.type,vertexShader:T,fragmentShader:E,defines:i.defines,isRawShaderMaterial:!0===i.isRawShaderMaterial,glslVersion:i.glslVersion,precision:f,instancing:!0===v.isInstancedMesh,instancingColor:!0===v.isInstancedMesh&&null!==v.instanceColor,supportsVertexTextures:h,outputEncoding:null!==C?g(C.texture):t.outputEncoding,map:!!i.map,mapEncoding:g(i.map),matcap:!!i.matcap,matcapEncoding:g(i.matcap),envMap:!!x,envMapMode:x&&x.mapping,envMapEncoding:g(x),envMapCubeUV:!!x&&(x.mapping===vt||x.mapping===yt),lightMap:!!i.lightMap,lightMapEncoding:g(i.lightMap),aoMap:!!i.aoMap,emissiveMap:!!i.emissiveMap,emissiveMapEncoding:g(i.emissiveMap),bumpMap:!!i.bumpMap,normalMap:!!i.normalMap,objectSpaceNormalMap:i.normalMapType===gn,tangentSpaceNormalMap:i.normalMapType===mn,clearcoatMap:!!i.clearcoatMap,clearcoatRoughnessMap:!!i.clearcoatRoughnessMap,clearcoatNormalMap:!!i.clearcoatNormalMap,displacementMap:!!i.displacementMap,roughnessMap:!!i.roughnessMap,metalnessMap:!!i.metalnessMap,specularMap:!!i.specularMap,alphaMap:!!i.alphaMap,gradientMap:!!i.gradientMap,sheen:!!i.sheen,transmissionMap:!!i.transmissionMap,combine:i.combine,vertexTangents:i.normalMap&&i.vertexTangents,vertexColors:i.vertexColors,vertexAlphas:!0===i.vertexColors&&v.geometry.attributes.color&&4===v.geometry.attributes.color.itemSize,vertexUvs:!!(i.map||i.bumpMap||i.normalMap||i.specularMap||i.alphaMap||i.emissiveMap||i.roughnessMap||i.metalnessMap||i.clearcoatMap||i.clearcoatRoughnessMap||i.clearcoatNormalMap||i.displacementMap||i.transmissionMap),uvsVertexOnly:!(i.map||i.bumpMap||i.normalMap||i.specularMap||i.alphaMap||i.emissiveMap||i.roughnessMap||i.metalnessMap||i.clearcoatNormalMap||i.transmissionMap||!i.displacementMap),fog:!!y,useFog:i.fog,fogExp2:y&&y.isFogExp2,flatShading:!!i.flatShading,sizeAttenuation:i.sizeAttenuation,logarithmicDepthBuffer:c,skinning:i.skinning&&w>0,maxBones:w,useVertexTexture:u,morphTargets:i.morphTargets,morphNormals:i.morphNormals,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numDirLightShadows:a.directionalShadowMap.length,numPointLightShadows:a.pointShadowMap.length,numSpotLightShadows:a.spotShadowMap.length,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:i.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.length>0,shadowMapType:t.shadowMap.type,toneMapping:i.toneMapped?t.toneMapping:at,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:i.premultipliedAlpha,alphaTest:i.alphaTest,doubleSided:i.side===S,flipSided:i.side===M,depthPacking:void 0!==i.depthPacking&&i.depthPacking,index0AttributeName:i.index0AttributeName,extensionDerivatives:i.extensions&&i.extensions.derivatives,extensionFragDepth:i.extensions&&i.extensions.fragDepth,extensionDrawBuffers:i.extensions&&i.extensions.drawBuffers,extensionShaderTextureLOD:i.extensions&&i.extensions.shaderTextureLOD,rendererExtensionFragDepth:s||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:s||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:s||n.has("EXT_shader_texture_lod"),customProgramCacheKey:i.customProgramCacheKey()}},getProgramCacheKey:function(e){const n=[];if(e.shaderID?n.push(e.shaderID):(n.push(e.fragmentShader),n.push(e.vertexShader)),void 0!==e.defines)for(const t in e.defines)n.push(t),n.push(e.defines[t]);if(!1===e.isRawShaderMaterial){for(let t=0;t<p.length;t++)n.push(e[p[t]]);n.push(t.outputEncoding),n.push(t.gammaFactor)}return n.push(e.customProgramCacheKey),n.join()},getUniforms:function(t){const e=d[t.type];let n;if(e){const t=Go[e];n=Eo.clone(t.uniforms)}else n=t.uniforms;return n},acquireProgram:function(e,n){let r;for(let t=0,e=a.length;t<e;t++){const e=a[t];if(e.cacheKey===n){r=e,++r.usedTimes;break}}return void 0===r&&(r=new Cs(t,n,e,i),a.push(r)),r},releaseProgram:function(t){if(0==--t.usedTimes){const e=a.indexOf(t);a[e]=a[a.length-1],a.pop(),t.destroy()}},programs:a}}function Ps(){let t=new WeakMap;return{get:function(e){let n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,r){t.get(e)[n]=r},dispose:function(){t=new WeakMap}}}function Ls(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function Rs(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function Os(t){const e=[];let n=0;const r=[],i=[],o={id:-1};function a(r,i,a,s,c,u){let l=e[n];const h=t.get(a);return void 0===l?(l={id:r.id,object:r,geometry:i,material:a,program:h.program||o,groupOrder:s,renderOrder:r.renderOrder,z:c,group:u},e[n]=l):(l.id=r.id,l.object=r,l.geometry=i,l.material=a,l.program=h.program||o,l.groupOrder=s,l.renderOrder=r.renderOrder,l.z=c,l.group=u),n++,l}return{opaque:r,transparent:i,init:function(){n=0,r.length=0,i.length=0},push:function(t,e,n,o,s,c){const u=a(t,e,n,o,s,c);(!0===n.transparent?i:r).push(u)},unshift:function(t,e,n,o,s,c){const u=a(t,e,n,o,s,c);(!0===n.transparent?i:r).unshift(u)},finish:function(){for(let t=n,r=e.length;t<r;t++){const n=e[t];if(null===n.id)break;n.id=null,n.object=null,n.geometry=null,n.material=null,n.program=null,n.group=null}},sort:function(t,e){r.length>1&&r.sort(t||Ls),i.length>1&&i.sort(e||Rs)}}}function ks(t){let e=new WeakMap;return{get:function(n,r){let i;return!1===e.has(n)?(i=new Os(t),e.set(n,[i])):r>=e.get(n).length?(i=new Os(t),e.get(n).push(i)):i=e.get(n)[r],i},dispose:function(){e=new WeakMap}}}function Is(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new or,color:new Ri};break;case"SpotLight":n={position:new or,direction:new or,color:new Ri,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new or,color:new Ri,distance:0,decay:0};break;case"HemisphereLight":n={direction:new or,skyColor:new Ri,groundColor:new Ri};break;case"RectAreaLight":n={color:new Ri,position:new or,halfWidth:new or,halfHeight:new or}}return t[e.id]=n,n}}}let Ds=0;function js(t,e){return(e.castShadow?1:0)-(t.castShadow?1:0)}function zs(t,e){const n=new Is,r=function(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let n;switch(e.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Yn};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Yn,shadowCameraNear:1,shadowCameraFar:1e3}}return t[e.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let t=0;t<9;t++)i.probe.push(new or);const o=new or,a=new jr,s=new jr;return{setup:function(o){let a=0,s=0,c=0;for(let t=0;t<9;t++)i.probe[t].set(0,0,0);let u=0,l=0,h=0,f=0,d=0,p=0,m=0,g=0;o.sort(js);for(let t=0,e=o.length;t<e;t++){const e=o[t],v=e.color,y=e.intensity,_=e.distance,x=e.shadow&&e.shadow.map?e.shadow.map.texture:null;if(e.isAmbientLight)a+=v.r*y,s+=v.g*y,c+=v.b*y;else if(e.isLightProbe)for(let t=0;t<9;t++)i.probe[t].addScaledVector(e.sh.coefficients[t],y);else if(e.isDirectionalLight){const t=n.get(e);if(t.color.copy(e.color).multiplyScalar(e.intensity),e.castShadow){const t=e.shadow,n=r.get(e);n.shadowBias=t.bias,n.shadowNormalBias=t.normalBias,n.shadowRadius=t.radius,n.shadowMapSize=t.mapSize,i.directionalShadow[u]=n,i.directionalShadowMap[u]=x,i.directionalShadowMatrix[u]=e.shadow.matrix,p++}i.directional[u]=t,u++}else if(e.isSpotLight){const t=n.get(e);if(t.position.setFromMatrixPosition(e.matrixWorld),t.color.copy(v).multiplyScalar(y),t.distance=_,t.coneCos=Math.cos(e.angle),t.penumbraCos=Math.cos(e.angle*(1-e.penumbra)),t.decay=e.decay,e.castShadow){const t=e.shadow,n=r.get(e);n.shadowBias=t.bias,n.shadowNormalBias=t.normalBias,n.shadowRadius=t.radius,n.shadowMapSize=t.mapSize,i.spotShadow[h]=n,i.spotShadowMap[h]=x,i.spotShadowMatrix[h]=e.shadow.matrix,g++}i.spot[h]=t,h++}else if(e.isRectAreaLight){const t=n.get(e);t.color.copy(v).multiplyScalar(y),t.halfWidth.set(.5*e.width,0,0),t.halfHeight.set(0,.5*e.height,0),i.rectArea[f]=t,f++}else if(e.isPointLight){const t=n.get(e);if(t.color.copy(e.color).multiplyScalar(e.intensity),t.distance=e.distance,t.decay=e.decay,e.castShadow){const t=e.shadow,n=r.get(e);n.shadowBias=t.bias,n.shadowNormalBias=t.normalBias,n.shadowRadius=t.radius,n.shadowMapSize=t.mapSize,n.shadowCameraNear=t.camera.near,n.shadowCameraFar=t.camera.far,i.pointShadow[l]=n,i.pointShadowMap[l]=x,i.pointShadowMatrix[l]=e.shadow.matrix,m++}i.point[l]=t,l++}else if(e.isHemisphereLight){const t=n.get(e);t.skyColor.copy(e.color).multiplyScalar(y),t.groundColor.copy(e.groundColor).multiplyScalar(y),i.hemi[d]=t,d++}}f>0&&(e.isWebGL2||!0===t.has("OES_texture_float_linear")?(i.rectAreaLTC1=Ho.LTC_FLOAT_1,i.rectAreaLTC2=Ho.LTC_FLOAT_2):!0===t.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=Ho.LTC_HALF_1,i.rectAreaLTC2=Ho.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=a,i.ambient[1]=s,i.ambient[2]=c;const v=i.hash;v.directionalLength===u&&v.pointLength===l&&v.spotLength===h&&v.rectAreaLength===f&&v.hemiLength===d&&v.numDirectionalShadows===p&&v.numPointShadows===m&&v.numSpotShadows===g||(i.directional.length=u,i.spot.length=h,i.rectArea.length=f,i.point.length=l,i.hemi.length=d,i.directionalShadow.length=p,i.directionalShadowMap.length=p,i.pointShadow.length=m,i.pointShadowMap.length=m,i.spotShadow.length=g,i.spotShadowMap.length=g,i.directionalShadowMatrix.length=p,i.pointShadowMatrix.length=m,i.spotShadowMatrix.length=g,v.directionalLength=u,v.pointLength=l,v.spotLength=h,v.rectAreaLength=f,v.hemiLength=d,v.numDirectionalShadows=p,v.numPointShadows=m,v.numSpotShadows=g,i.version=Ds++)},setupView:function(t,e){let n=0,r=0,c=0,u=0,l=0;const h=e.matrixWorldInverse;for(let e=0,f=t.length;e<f;e++){const f=t[e];if(f.isDirectionalLight){const t=i.directional[n];t.direction.setFromMatrixPosition(f.matrixWorld),o.setFromMatrixPosition(f.target.matrixWorld),t.direction.sub(o),t.direction.transformDirection(h),n++}else if(f.isSpotLight){const t=i.spot[c];t.position.setFromMatrixPosition(f.matrixWorld),t.position.applyMatrix4(h),t.direction.setFromMatrixPosition(f.matrixWorld),o.setFromMatrixPosition(f.target.matrixWorld),t.direction.sub(o),t.direction.transformDirection(h),c++}else if(f.isRectAreaLight){const t=i.rectArea[u];t.position.setFromMatrixPosition(f.matrixWorld),t.position.applyMatrix4(h),s.identity(),a.copy(f.matrixWorld),a.premultiply(h),s.extractRotation(a),t.halfWidth.set(.5*f.width,0,0),t.halfHeight.set(0,.5*f.height,0),t.halfWidth.applyMatrix4(s),t.halfHeight.applyMatrix4(s),u++}else if(f.isPointLight){const t=i.point[r];t.position.setFromMatrixPosition(f.matrixWorld),t.position.applyMatrix4(h),r++}else if(f.isHemisphereLight){const t=i.hemi[l];t.direction.setFromMatrixPosition(f.matrixWorld),t.direction.transformDirection(h),t.direction.normalize(),l++}}},state:i}}function Ns(t,e){const n=new zs(t,e),r=[],i=[];return{init:function(){r.length=0,i.length=0},state:{lightsArray:r,shadowsArray:i,lights:n},setupLights:function(){n.setup(r)},setupLightsView:function(t){n.setupView(r,t)},pushLight:function(t){r.push(t)},pushShadow:function(t){i.push(t)}}}function Fs(t,e){let n=new WeakMap;return{get:function(r,i=0){let o;return!1===n.has(r)?(o=new Ns(t,e),n.set(r,[o])):i>=n.get(r).length?(o=new Ns(t,e),n.get(r).push(o)):o=n.get(r)[i],o},dispose:function(){n=new WeakMap}}}class Bs extends Si{constructor(t){super(),this.type="MeshDepthMaterial",this.depthPacking=dn,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}Bs.prototype.isMeshDepthMaterial=!0;class Hs extends Si{constructor(t){super(),this.type="MeshDistanceMaterial",this.referencePosition=new or,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(t)}copy(t){return super.copy(t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}function Gs(t,e,n){let r=new jo;const i=new Yn,o=new Yn,a=new er,s=[],c=[],u={},l=n.maxTextureSize,h={0:M,1:w,2:S},f=new Co({defines:{SAMPLE_RATE:2/8,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new Yn},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n\tfor ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean * HALF_SAMPLE_RATE;\n\tsquared_mean = squared_mean * HALF_SAMPLE_RATE;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),d=f.clone();d.defines.HORIZONTAL_PASS=1;const p=new no;p.setAttribute("position",new Di(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const m=new bo(p,f),g=this;function v(n,r){const i=e.update(m);f.uniforms.shadow_pass.value=n.map.texture,f.uniforms.resolution.value=n.mapSize,f.uniforms.radius.value=n.radius,t.setRenderTarget(n.mapPass),t.clear(),t.renderBufferDirect(r,null,i,f,m,null),d.uniforms.shadow_pass.value=n.mapPass.texture,d.uniforms.resolution.value=n.mapSize,d.uniforms.radius.value=n.radius,t.setRenderTarget(n.map),t.clear(),t.renderBufferDirect(r,null,i,d,m,null)}function y(t,e,n){const r=t<<0|e<<1|n<<2;let i=s[r];return void 0===i&&(i=new Bs({depthPacking:pn,morphTargets:t,skinning:e}),s[r]=i),i}function x(t,e,n){const r=t<<0|e<<1|n<<2;let i=c[r];return void 0===i&&(i=new Hs({morphTargets:t,skinning:e}),c[r]=i),i}function T(e,n,r,i,o,a,s){let c=null,l=y,f=e.customDepthMaterial;if(!0===i.isPointLight&&(l=x,f=e.customDistanceMaterial),void 0===f){let t=!1;!0===r.morphTargets&&(t=n.morphAttributes&&n.morphAttributes.position&&n.morphAttributes.position.length>0);let i=!1;!0===e.isSkinnedMesh&&(!0===r.skinning?i=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e)),c=l(t,i,!0===e.isInstancedMesh)}else c=f;if(t.localClippingEnabled&&!0===r.clipShadows&&0!==r.clippingPlanes.length){const t=c.uuid,e=r.uuid;let n=u[t];void 0===n&&(n={},u[t]=n);let i=n[e];void 0===i&&(i=c.clone(),n[e]=i),c=i}return c.visible=r.visible,c.wireframe=r.wireframe,c.side=s===b?null!==r.shadowSide?r.shadowSide:r.side:null!==r.shadowSide?r.shadowSide:h[r.side],c.clipShadows=r.clipShadows,c.clippingPlanes=r.clippingPlanes,c.clipIntersection=r.clipIntersection,c.wireframeLinewidth=r.wireframeLinewidth,c.linewidth=r.linewidth,!0===i.isPointLight&&!0===c.isMeshDistanceMaterial&&(c.referencePosition.setFromMatrixPosition(i.matrixWorld),c.nearDistance=o,c.farDistance=a),c}function E(n,i,o,a,s){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&s===b)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);const r=e.update(n),i=n.material;if(Array.isArray(i)){const e=r.groups;for(let c=0,u=e.length;c<u;c++){const u=e[c],l=i[u.materialIndex];if(l&&l.visible){const e=T(n,r,l,a,o.near,o.far,s);t.renderBufferDirect(o,null,r,e,n,u)}}}else if(i.visible){const e=T(n,r,i,a,o.near,o.far,s);t.renderBufferDirect(o,null,r,e,n,null)}}const c=n.children;for(let t=0,e=c.length;t<e;t++)E(c[t],i,o,a,s)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=_,this.render=function(e,n,s){if(!1===g.enabled)return;if(!1===g.autoUpdate&&!1===g.needsUpdate)return;if(0===e.length)return;const c=t.getRenderTarget(),u=t.getActiveCubeFace(),h=t.getActiveMipmapLevel(),f=t.state;f.setBlending(C),f.buffers.color.setClear(1,1,1,1),f.buffers.depth.setTest(!0),f.setScissorTest(!1);for(let c=0,u=e.length;c<u;c++){const u=e[c],h=u.shadow;if(void 0===h){console.warn("THREE.WebGLShadowMap:",u,"has no shadow.");continue}if(!1===h.autoUpdate&&!1===h.needsUpdate)continue;i.copy(h.mapSize);const d=h.getFrameExtents();if(i.multiply(d),o.copy(h.mapSize),(i.x>l||i.y>l)&&(i.x>l&&(o.x=Math.floor(l/d.x),i.x=o.x*d.x,h.mapSize.x=o.x),i.y>l&&(o.y=Math.floor(l/d.y),i.y=o.y*d.y,h.mapSize.y=o.y)),null===h.map&&!h.isPointLightShadow&&this.type===b){const t={minFilter:Ct,magFilter:Ct,format:Zt};h.map=new nr(i.x,i.y,t),h.map.texture.name=u.name+".shadowMap",h.mapPass=new nr(i.x,i.y,t),h.camera.updateProjectionMatrix()}if(null===h.map){const t={minFilter:wt,magFilter:wt,format:Zt};h.map=new nr(i.x,i.y,t),h.map.texture.name=u.name+".shadowMap",h.camera.updateProjectionMatrix()}t.setRenderTarget(h.map),t.clear();const p=h.getViewportCount();for(let t=0;t<p;t++){const e=h.getViewport(t);a.set(o.x*e.x,o.y*e.y,o.x*e.z,o.y*e.w),f.viewport(a),h.updateMatrices(u,t),r=h.getFrustum(),E(n,s,h.camera,u,this.type)}h.isPointLightShadow||this.type!==b||v(h,s),h.needsUpdate=!1}g.needsUpdate=!1,t.setRenderTarget(c,u,h)}}function Us(t,e,n){const r=n.isWebGL2,i=new function(){let e=!1;const n=new er;let r=null;const i=new er(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a,s){!0===s&&(e*=a,r*=a,o*=a),n.set(e,r,o,a),!1===i.equals(n)&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(-1,0,0,0)}}},o=new function(){let e=!1,n=null,r=null,i=null;return{setTest:function(t){t?gt(2929):vt(2929)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case J:t.depthFunc(512);break;case X:t.depthFunc(519);break;case $:t.depthFunc(513);break;case Q:t.depthFunc(515);break;case K:t.depthFunc(514);break;case tt:t.depthFunc(518);break;case et:t.depthFunc(516);break;case nt:t.depthFunc(517);break;default:t.depthFunc(515)}else t.depthFunc(515);r=e}},setLocked:function(t){e=t},setClear:function(e){i!==e&&(t.clearDepth(e),i=e)},reset:function(){e=!1,n=null,r=null,i=null}}},a=new function(){let e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null;return{setTest:function(t){e||(t?gt(2960):vt(2960))},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,a){r===e&&i===n&&o===a||(t.stencilFunc(e,n,a),r=e,i=n,o=a)},setOp:function(e,n,r){a===e&&s===n&&c===r||(t.stencilOp(e,n,r),a=e,s=n,c=r)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null}}};let s={},c=null,u={},l=null,h=!1,f=null,d=null,v=null,y=null,_=null,x=null,b=null,w=!1,T=null,E=null,rt=null,it=null,ot=null;const at=t.getParameter(35661);let st=!1,ct=0;const ut=t.getParameter(7938);-1!==ut.indexOf("WebGL")?(ct=parseFloat(/^WebGL (\d)/.exec(ut)[1]),st=ct>=1):-1!==ut.indexOf("OpenGL ES")&&(ct=parseFloat(/^OpenGL ES (\d)/.exec(ut)[1]),st=ct>=2);let lt=null,ht={};const ft=new er(0,0,t.canvas.width,t.canvas.height),dt=new er(0,0,t.canvas.width,t.canvas.height);function pt(e,n,r){const i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,10241,9728),t.texParameteri(e,10240,9728);for(let e=0;e<r;e++)t.texImage2D(n+e,0,6408,1,1,0,6408,5121,i);return o}const mt={};function gt(e){!0!==s[e]&&(t.enable(e),s[e]=!0)}function vt(e){!1!==s[e]&&(t.disable(e),s[e]=!1)}mt[3553]=pt(3553,3553,1),mt[34067]=pt(34067,34069,6),i.setClear(0,0,0,1),o.setClear(1),a.setClear(0),gt(2929),o.setFunc(Q),bt(!1),wt(m),gt(2884),xt(C);const yt={[k]:32774,[I]:32778,[D]:32779};if(r)yt[j]=32775,yt[z]=32776;else{const t=e.get("EXT_blend_minmax");null!==t&&(yt[j]=t.MIN_EXT,yt[z]=t.MAX_EXT)}const _t={[N]:0,[F]:1,[B]:768,[G]:770,[Y]:776,[Z]:774,[V]:772,[H]:769,[U]:771,[q]:775,[W]:773};function xt(e,n,r,i,o,a,s,c){if(e!==C){if(!1===h&&(gt(3042),h=!0),e===O)o=o||n,a=a||r,s=s||i,n===d&&o===_||(t.blendEquationSeparate(yt[n],yt[o]),d=n,_=o),r===v&&i===y&&a===x&&s===b||(t.blendFuncSeparate(_t[r],_t[i],_t[a],_t[s]),v=r,y=i,x=a,b=s),f=e,w=null;else if(e!==f||c!==w){if(d===k&&_===k||(t.blendEquation(32774),d=k,_=k),c)switch(e){case A:t.blendFuncSeparate(1,771,1,771);break;case P:t.blendFunc(1,1);break;case L:t.blendFuncSeparate(0,0,769,771);break;case R:t.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",e)}else switch(e){case A:t.blendFuncSeparate(770,771,1,771);break;case P:t.blendFunc(770,1);break;case L:t.blendFunc(0,769);break;case R:t.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",e)}v=null,y=null,x=null,b=null,f=e,w=c}}else!0===h&&(vt(3042),h=!1)}function bt(e){T!==e&&(e?t.frontFace(2304):t.frontFace(2305),T=e)}function wt(e){e!==p?(gt(2884),e!==E&&(e===m?t.cullFace(1029):e===g?t.cullFace(1028):t.cullFace(1032))):vt(2884),E=e}function Mt(e,n,r){e?(gt(32823),it===n&&ot===r||(t.polygonOffset(n,r),it=n,ot=r)):vt(32823)}function St(e){void 0===e&&(e=33984+at-1),lt!==e&&(t.activeTexture(e),lt=e)}return{buffers:{color:i,depth:o,stencil:a},enable:gt,disable:vt,bindFramebuffer:function(e,n){null===n&&null!==c&&(n=c),u[e]!==n&&(t.bindFramebuffer(e,n),u[e]=n)},bindXRFramebuffer:function(e){e!==c&&(t.bindFramebuffer(36160,e),c=e)},useProgram:function(e){return l!==e&&(t.useProgram(e),l=e,!0)},setBlending:xt,setMaterial:function(t,e){t.side===S?vt(2884):gt(2884);let n=t.side===M;e&&(n=!n),bt(n),t.blending===A&&!1===t.transparent?xt(C):xt(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.premultipliedAlpha),o.setFunc(t.depthFunc),o.setTest(t.depthTest),o.setMask(t.depthWrite),i.setMask(t.colorWrite);const r=t.stencilWrite;a.setTest(r),r&&(a.setMask(t.stencilWriteMask),a.setFunc(t.stencilFunc,t.stencilRef,t.stencilFuncMask),a.setOp(t.stencilFail,t.stencilZFail,t.stencilZPass)),Mt(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits),!0===t.alphaToCoverage?gt(32926):vt(32926)},setFlipSided:bt,setCullFace:wt,setLineWidth:function(e){e!==rt&&(st&&t.lineWidth(e),rt=e)},setPolygonOffset:Mt,setScissorTest:function(t){t?gt(3089):vt(3089)},activeTexture:St,bindTexture:function(e,n){null===lt&&St();let r=ht[lt];void 0===r&&(r={type:void 0,texture:void 0},ht[lt]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||mt[e]),r.type=e,r.texture=n)},unbindTexture:function(){const e=ht[lt];void 0!==e&&void 0!==e.type&&(t.bindTexture(e.type,null),e.type=void 0,e.texture=void 0)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage3D:function(){try{t.texImage3D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===ft.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),ft.copy(e))},viewport:function(e){!1===dt.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),dt.copy(e))},reset:function(){t.disable(3042),t.disable(2884),t.disable(2929),t.disable(32823),t.disable(3089),t.disable(2960),t.disable(32926),t.blendEquation(32774),t.blendFunc(1,0),t.blendFuncSeparate(1,0,1,0),t.colorMask(!0,!0,!0,!0),t.clearColor(0,0,0,0),t.depthMask(!0),t.depthFunc(513),t.clearDepth(1),t.stencilMask(4294967295),t.stencilFunc(519,0,4294967295),t.stencilOp(7680,7680,7680),t.clearStencil(0),t.cullFace(1029),t.frontFace(2305),t.polygonOffset(0,0),t.activeTexture(33984),t.bindFramebuffer(36160,null),!0===r&&(t.bindFramebuffer(36009,null),t.bindFramebuffer(36008,null)),t.useProgram(null),t.lineWidth(1),t.scissor(0,0,t.canvas.width,t.canvas.height),t.viewport(0,0,t.canvas.width,t.canvas.height),s={},lt=null,ht={},c=null,u={},l=null,h=!1,f=null,d=null,v=null,y=null,_=null,x=null,b=null,w=!1,T=null,E=null,rt=null,it=null,ot=null,ft.set(0,0,t.canvas.width,t.canvas.height),dt.set(0,0,t.canvas.width,t.canvas.height),i.reset(),o.reset(),a.reset()}}}function Vs(t,e,n,r,i,o,a){const s=i.isWebGL2,c=i.maxTextures,u=i.maxCubemapSize,l=i.maxTextureSize,h=i.maxSamples,f=new WeakMap;let d,p=!1;try{p="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(t){}function m(t,e){return p?new OffscreenCanvas(t,e):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function g(t,e,n,r){let i=1;if((t.width>r||t.height>r)&&(i=r/Math.max(t.width,t.height)),i<1||!0===e){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const r=e?qn.floorPowerOfTwo:Math.floor,o=r(i*t.width),a=r(i*t.height);void 0===d&&(d=m(o,a));const s=n?m(o,a):d;return s.width=o,s.height=a,s.getContext("2d").drawImage(t,0,0,o,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+t.width+"x"+t.height+") to ("+o+"x"+a+")."),s}return"data"in t&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+t.width+"x"+t.height+")."),t}return t}function v(t){return qn.isPowerOfTwo(t.width)&&qn.isPowerOfTwo(t.height)}function y(t,e){return t.generateMipmaps&&e&&t.minFilter!==wt&&t.minFilter!==Ct}function _(e,n,i,o){t.generateMipmap(e),r.get(n).__maxMipLevel=Math.log2(Math.max(i,o))}function x(n,r,i){if(!1===s)return r;if(null!==n){if(void 0!==t[n])return t[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let o=r;return 6403===r&&(5126===i&&(o=33326),5131===i&&(o=33325),5121===i&&(o=33321)),6407===r&&(5126===i&&(o=34837),5131===i&&(o=34843),5121===i&&(o=32849)),6408===r&&(5126===i&&(o=34836),5131===i&&(o=34842),5121===i&&(o=32856)),33325!==o&&33326!==o&&34842!==o&&34836!==o||e.get("EXT_color_buffer_float"),o}function b(t){return t===wt||t===Mt||t===Tt?9728:9729}function w(t){const e=t.target;e.removeEventListener("dispose",w),S(e),e.isVideoTexture&&f.delete(e),a.memory.textures--}function M(t){const e=t.target;e.removeEventListener("dispose",M),T(e),a.memory.textures--}function S(e){const n=r.get(e);void 0!==n.__webglInit&&(t.deleteTexture(n.__webglTexture),r.remove(e))}function T(e){const n=e.texture,i=r.get(e),o=r.get(n);if(e){if(void 0!==o.__webglTexture&&t.deleteTexture(o.__webglTexture),e.depthTexture&&e.depthTexture.dispose(),e.isWebGLCubeRenderTarget)for(let e=0;e<6;e++)t.deleteFramebuffer(i.__webglFramebuffer[e]),i.__webglDepthbuffer&&t.deleteRenderbuffer(i.__webglDepthbuffer[e]);else t.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&t.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&t.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer&&t.deleteRenderbuffer(i.__webglColorRenderbuffer),i.__webglDepthRenderbuffer&&t.deleteRenderbuffer(i.__webglDepthRenderbuffer);r.remove(n),r.remove(e)}}let E=0;function C(t,e){const i=r.get(t);if(t.isVideoTexture&&function(t){const e=a.render.frame;f.get(t)!==e&&(f.set(t,e),t.update())}(t),t.version>0&&i.__version!==t.version){const n=t.image;if(void 0===n)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==n.complete)return void k(i,t,e);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+e),n.bindTexture(3553,i.__webglTexture)}function A(t,e){const i=r.get(t);t.version>0&&i.__version!==t.version?I(i,t,e):(n.activeTexture(33984+e),n.bindTexture(34067,i.__webglTexture))}const P={[_t]:10497,[xt]:33071,[bt]:33648},L={[wt]:9728,[Mt]:9984,[Tt]:9986,[Ct]:9729,[At]:9985,[Lt]:9987};function R(n,o,a){if(a?(t.texParameteri(n,10242,P[o.wrapS]),t.texParameteri(n,10243,P[o.wrapT]),32879!==n&&35866!==n||t.texParameteri(n,32882,P[o.wrapR]),t.texParameteri(n,10240,L[o.magFilter]),t.texParameteri(n,10241,L[o.minFilter])):(t.texParameteri(n,10242,33071),t.texParameteri(n,10243,33071),32879!==n&&35866!==n||t.texParameteri(n,32882,33071),o.wrapS===xt&&o.wrapT===xt||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(n,10240,b(o.magFilter)),t.texParameteri(n,10241,b(o.minFilter)),o.minFilter!==wt&&o.minFilter!==Ct&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===e.has("EXT_texture_filter_anisotropic")){const a=e.get("EXT_texture_filter_anisotropic");if(o.type===Nt&&!1===e.has("OES_texture_float_linear"))return;if(!1===s&&o.type===Ft&&!1===e.has("OES_texture_half_float_linear"))return;(o.anisotropy>1||r.get(o).__currentAnisotropy)&&(t.texParameterf(n,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,i.getMaxAnisotropy())),r.get(o).__currentAnisotropy=o.anisotropy)}}function O(e,n){void 0===e.__webglInit&&(e.__webglInit=!0,n.addEventListener("dispose",w),e.__webglTexture=t.createTexture(),a.memory.textures++)}function k(e,r,i){let a=3553;r.isDataTexture2DArray&&(a=35866),r.isDataTexture3D&&(a=32879),O(e,r),n.activeTexture(33984+i),n.bindTexture(a,e.__webglTexture),t.pixelStorei(37440,r.flipY),t.pixelStorei(37441,r.premultiplyAlpha),t.pixelStorei(3317,r.unpackAlignment),t.pixelStorei(37443,0);const c=function(t){return!s&&(t.wrapS!==xt||t.wrapT!==xt||t.minFilter!==wt&&t.minFilter!==Ct)}(r)&&!1===v(r.image),u=g(r.image,c,!1,l),h=v(u)||s,f=o.convert(r.format);let d,p=o.convert(r.type),m=x(r.internalFormat,f,p);R(a,r,h);const b=r.mipmaps;if(r.isDepthTexture)m=6402,s?m=r.type===Nt?36012:r.type===zt?33190:r.type===Ut?35056:33189:r.type===Nt&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),r.format===Xt&&6402===m&&r.type!==Dt&&r.type!==zt&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Dt,p=o.convert(r.type)),r.format===$t&&6402===m&&(m=34041,r.type!==Ut&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Ut,p=o.convert(r.type))),n.texImage2D(3553,0,m,u.width,u.height,0,f,p,null);else if(r.isDataTexture)if(b.length>0&&h){for(let t=0,e=b.length;t<e;t++)d=b[t],n.texImage2D(3553,t,m,d.width,d.height,0,f,p,d.data);r.generateMipmaps=!1,e.__maxMipLevel=b.length-1}else n.texImage2D(3553,0,m,u.width,u.height,0,f,p,u.data),e.__maxMipLevel=0;else if(r.isCompressedTexture){for(let t=0,e=b.length;t<e;t++)d=b[t],r.format!==Zt&&r.format!==Wt?null!==f?n.compressedTexImage2D(3553,t,m,d.width,d.height,0,d.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(3553,t,m,d.width,d.height,0,f,p,d.data);e.__maxMipLevel=b.length-1}else if(r.isDataTexture2DArray)n.texImage3D(35866,0,m,u.width,u.height,u.depth,0,f,p,u.data),e.__maxMipLevel=0;else if(r.isDataTexture3D)n.texImage3D(32879,0,m,u.width,u.height,u.depth,0,f,p,u.data),e.__maxMipLevel=0;else if(b.length>0&&h){for(let t=0,e=b.length;t<e;t++)d=b[t],n.texImage2D(3553,t,m,f,p,d);r.generateMipmaps=!1,e.__maxMipLevel=b.length-1}else n.texImage2D(3553,0,m,f,p,u),e.__maxMipLevel=0;y(r,h)&&_(a,r,u.width,u.height),e.__version=r.version,r.onUpdate&&r.onUpdate(r)}function I(e,r,i){if(6!==r.image.length)return;O(e,r),n.activeTexture(33984+i),n.bindTexture(34067,e.__webglTexture),t.pixelStorei(37440,r.flipY),t.pixelStorei(37441,r.premultiplyAlpha),t.pixelStorei(3317,r.unpackAlignment),t.pixelStorei(37443,0);const a=r&&(r.isCompressedTexture||r.image[0].isCompressedTexture),c=r.image[0]&&r.image[0].isDataTexture,l=[];for(let t=0;t<6;t++)l[t]=a||c?c?r.image[t].image:r.image[t]:g(r.image[t],!1,!0,u);const h=l[0],f=v(h)||s,d=o.convert(r.format),p=o.convert(r.type),m=x(r.internalFormat,d,p);let b;if(R(34067,r,f),a){for(let t=0;t<6;t++){b=l[t].mipmaps;for(let e=0;e<b.length;e++){const i=b[e];r.format!==Zt&&r.format!==Wt?null!==d?n.compressedTexImage2D(34069+t,e,m,i.width,i.height,0,i.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(34069+t,e,m,i.width,i.height,0,d,p,i.data)}}e.__maxMipLevel=b.length-1}else{b=r.mipmaps;for(let t=0;t<6;t++)if(c){n.texImage2D(34069+t,0,m,l[t].width,l[t].height,0,d,p,l[t].data);for(let e=0;e<b.length;e++){const r=b[e].image[t].image;n.texImage2D(34069+t,e+1,m,r.width,r.height,0,d,p,r.data)}}else{n.texImage2D(34069+t,0,m,d,p,l[t]);for(let e=0;e<b.length;e++){const r=b[e];n.texImage2D(34069+t,e+1,m,d,p,r.image[t])}}e.__maxMipLevel=b.length}y(r,f)&&_(34067,r,h.width,h.height),e.__version=r.version,r.onUpdate&&r.onUpdate(r)}function D(e,i,a,s){const c=i.texture,u=o.convert(c.format),l=o.convert(c.type),h=x(c.internalFormat,u,l);32879===s||35866===s?n.texImage3D(s,0,h,i.width,i.height,i.depth,0,u,l,null):n.texImage2D(s,0,h,i.width,i.height,0,u,l,null),n.bindFramebuffer(36160,e),t.framebufferTexture2D(36160,a,s,r.get(c).__webglTexture,0),n.bindFramebuffer(36160,null)}function j(e,n,r){if(t.bindRenderbuffer(36161,e),n.depthBuffer&&!n.stencilBuffer){let i=33189;if(r){const e=n.depthTexture;e&&e.isDepthTexture&&(e.type===Nt?i=36012:e.type===zt&&(i=33190));const r=N(n);t.renderbufferStorageMultisample(36161,r,i,n.width,n.height)}else t.renderbufferStorage(36161,i,n.width,n.height);t.framebufferRenderbuffer(36160,36096,36161,e)}else if(n.depthBuffer&&n.stencilBuffer){if(r){const e=N(n);t.renderbufferStorageMultisample(36161,e,35056,n.width,n.height)}else t.renderbufferStorage(36161,34041,n.width,n.height);t.framebufferRenderbuffer(36160,33306,36161,e)}else{const e=n.texture,i=o.convert(e.format),a=o.convert(e.type),s=x(e.internalFormat,i,a);if(r){const e=N(n);t.renderbufferStorageMultisample(36161,e,s,n.width,n.height)}else t.renderbufferStorage(36161,s,n.width,n.height)}t.bindRenderbuffer(36161,null)}function z(e){const i=r.get(e),o=!0===e.isWebGLCubeRenderTarget;if(e.depthTexture){if(o)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,i){if(i&&i.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(36160,e),!i.depthTexture||!i.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(i.depthTexture).__webglTexture&&i.depthTexture.image.width===i.width&&i.depthTexture.image.height===i.height||(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),C(i.depthTexture,0);const o=r.get(i.depthTexture).__webglTexture;if(i.depthTexture.format===Xt)t.framebufferTexture2D(36160,36096,3553,o,0);else{if(i.depthTexture.format!==$t)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(36160,33306,3553,o,0)}}(i.__webglFramebuffer,e)}else if(o){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)n.bindFramebuffer(36160,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]=t.createRenderbuffer(),j(i.__webglDepthbuffer[r],e,!1)}else n.bindFramebuffer(36160,i.__webglFramebuffer),i.__webglDepthbuffer=t.createRenderbuffer(),j(i.__webglDepthbuffer,e,!1);n.bindFramebuffer(36160,null)}function N(t){return s&&t.isWebGLMultisampleRenderTarget?Math.min(h,t.samples):0}let F=!1,B=!1;this.allocateTextureUnit=function(){const t=E;return t>=c&&console.warn("THREE.WebGLTextures: Trying to use "+t+" texture units while this GPU supports only "+c),E+=1,t},this.resetTextureUnits=function(){E=0},this.setTexture2D=C,this.setTexture2DArray=function(t,e){const i=r.get(t);t.version>0&&i.__version!==t.version?k(i,t,e):(n.activeTexture(33984+e),n.bindTexture(35866,i.__webglTexture))},this.setTexture3D=function(t,e){const i=r.get(t);t.version>0&&i.__version!==t.version?k(i,t,e):(n.activeTexture(33984+e),n.bindTexture(32879,i.__webglTexture))},this.setTextureCube=A,this.setupRenderTarget=function(e){const i=e.texture,c=r.get(e),u=r.get(i);e.addEventListener("dispose",M),u.__webglTexture=t.createTexture(),u.__version=i.version,a.memory.textures++;const l=!0===e.isWebGLCubeRenderTarget,h=!0===e.isWebGLMultisampleRenderTarget,f=i.isDataTexture3D||i.isDataTexture2DArray,d=v(e)||s;if(!s||i.format!==Wt||i.type!==Nt&&i.type!==Ft||(i.format=Zt,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),l){c.__webglFramebuffer=[];for(let e=0;e<6;e++)c.__webglFramebuffer[e]=t.createFramebuffer()}else if(c.__webglFramebuffer=t.createFramebuffer(),h)if(s){c.__webglMultisampledFramebuffer=t.createFramebuffer(),c.__webglColorRenderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,c.__webglColorRenderbuffer);const r=o.convert(i.format),a=o.convert(i.type),s=x(i.internalFormat,r,a),u=N(e);t.renderbufferStorageMultisample(36161,u,s,e.width,e.height),n.bindFramebuffer(36160,c.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(36160,36064,36161,c.__webglColorRenderbuffer),t.bindRenderbuffer(36161,null),e.depthBuffer&&(c.__webglDepthRenderbuffer=t.createRenderbuffer(),j(c.__webglDepthRenderbuffer,e,!0)),n.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(l){n.bindTexture(34067,u.__webglTexture),R(34067,i,d);for(let t=0;t<6;t++)D(c.__webglFramebuffer[t],e,36064,34069+t);y(i,d)&&_(34067,i,e.width,e.height),n.bindTexture(34067,null)}else{let t=3553;f&&(s?t=i.isDataTexture3D?32879:35866:console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.")),n.bindTexture(t,u.__webglTexture),R(t,i,d),D(c.__webglFramebuffer,e,36064,t),y(i,d)&&_(3553,i,e.width,e.height),n.bindTexture(3553,null)}e.depthBuffer&&z(e)},this.updateRenderTargetMipmap=function(t){const e=t.texture;if(y(e,v(t)||s)){const i=t.isWebGLCubeRenderTarget?34067:3553,o=r.get(e).__webglTexture;n.bindTexture(i,o),_(i,e,t.width,t.height),n.bindTexture(i,null)}},this.updateMultisampleRenderTarget=function(e){if(e.isWebGLMultisampleRenderTarget)if(s){const i=r.get(e);n.bindFramebuffer(36008,i.__webglMultisampledFramebuffer),n.bindFramebuffer(36009,i.__webglFramebuffer);const o=e.width,a=e.height;let s=16384;e.depthBuffer&&(s|=256),e.stencilBuffer&&(s|=1024),t.blitFramebuffer(0,0,o,a,0,0,o,a,s,9728),n.bindFramebuffer(36160,i.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.safeSetTexture2D=function(t,e){t&&t.isWebGLRenderTarget&&(!1===F&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),F=!0),t=t.texture),C(t,e)},this.safeSetTextureCube=function(t,e){t&&t.isWebGLCubeRenderTarget&&(!1===B&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),B=!0),t=t.texture),A(t,e)}}function Ws(t,e,n){const r=n.isWebGL2;return{convert:function(t){let n;if(t===Ot)return 5121;if(t===Bt)return 32819;if(t===Ht)return 32820;if(t===Gt)return 33635;if(t===kt)return 5120;if(t===It)return 5122;if(t===Dt)return 5123;if(t===jt)return 5124;if(t===zt)return 5125;if(t===Nt)return 5126;if(t===Ft)return r?5131:(n=e.get("OES_texture_half_float"),null!==n?n.HALF_FLOAT_OES:null);if(t===Vt)return 6406;if(t===Wt)return 6407;if(t===Zt)return 6408;if(t===qt)return 6409;if(t===Yt)return 6410;if(t===Xt)return 6402;if(t===$t)return 34041;if(t===Qt)return 6403;if(t===Kt)return 36244;if(t===te)return 33319;if(t===ee)return 33320;if(t===ne)return 36248;if(t===re)return 36249;if(t===ie||t===oe||t===ae||t===se){if(n=e.get("WEBGL_compressed_texture_s3tc"),null===n)return null;if(t===ie)return n.COMPRESSED_RGB_S3TC_DXT1_EXT;if(t===oe)return n.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(t===ae)return n.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(t===se)return n.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(t===ce||t===ue||t===le||t===he){if(n=e.get("WEBGL_compressed_texture_pvrtc"),null===n)return null;if(t===ce)return n.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(t===ue)return n.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(t===le)return n.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(t===he)return n.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(t===fe)return n=e.get("WEBGL_compressed_texture_etc1"),null!==n?n.COMPRESSED_RGB_ETC1_WEBGL:null;if((t===de||t===pe)&&(n=e.get("WEBGL_compressed_texture_etc"),null!==n)){if(t===de)return n.COMPRESSED_RGB8_ETC2;if(t===pe)return n.COMPRESSED_RGBA8_ETC2_EAC}return t===me||t===ge||t===ve||t===ye||t===_e||t===xe||t===be||t===we||t===Me||t===Se||t===Te||t===Ee||t===Ce||t===Ae||t===Le||t===Re||t===Oe||t===ke||t===Ie||t===De||t===je||t===ze||t===Ne||t===Fe||t===Be||t===He||t===Ge||t===Ue?(n=e.get("WEBGL_compressed_texture_astc"),null!==n?t:null):t===Pe?(n=e.get("EXT_texture_compression_bptc"),null!==n?t:null):t===Ut?r?34042:(n=e.get("WEBGL_depth_texture"),null!==n?n.UNSIGNED_INT_24_8_WEBGL:null):void 0}}}Hs.prototype.isMeshDistanceMaterial=!0;class Zs extends Po{constructor(t=[]){super(),this.cameras=t}}Zs.prototype.isArrayCamera=!0;class qs extends si{constructor(){super(),this.type="Group"}}function Ys(){this._targetRay=null,this._grip=null,this._hand=null}function Js(t,e){const n=this,r=t.state;let i=null,o=1,a=null,s="local-floor",c=null;const u=[],l=new Map,h=new Po;h.layers.enable(1),h.viewport=new er;const f=new Po;f.layers.enable(2),f.viewport=new er;const d=[h,f],p=new Zs;p.layers.enable(1),p.layers.enable(2);let m=null,g=null;function v(t){const e=l.get(t.inputSource);e&&e.dispatchEvent({type:t.type,data:t.inputSource})}function y(){l.forEach((function(t,e){t.disconnect(e)})),l.clear(),m=null,g=null,r.bindXRFramebuffer(null),t.setRenderTarget(t.getRenderTarget()),S.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function _(t){const e=i.inputSources;for(let t=0;t<u.length;t++)l.set(e[t],u[t]);for(let e=0;e<t.removed.length;e++){const n=t.removed[e],r=l.get(n);r&&(r.dispatchEvent({type:"disconnected",data:n}),l.delete(n))}for(let e=0;e<t.added.length;e++){const n=t.added[e],r=l.get(n);r&&r.dispatchEvent({type:"connected",data:n})}}this.enabled=!1,this.isPresenting=!1,this.getController=function(t){let e=u[t];return void 0===e&&(e=new Ys,u[t]=e),e.getTargetRaySpace()},this.getControllerGrip=function(t){let e=u[t];return void 0===e&&(e=new Ys,u[t]=e),e.getGripSpace()},this.getHand=function(t){let e=u[t];return void 0===e&&(e=new Ys,u[t]=e),e.getHandSpace()},this.setFramebufferScaleFactor=function(t){o=t,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(t){s=t,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a},this.getSession=function(){return i},this.setSession=async function(t){if(i=t,null!==i){i.addEventListener("select",v),i.addEventListener("selectstart",v),i.addEventListener("selectend",v),i.addEventListener("squeeze",v),i.addEventListener("squeezestart",v),i.addEventListener("squeezeend",v),i.addEventListener("end",y),i.addEventListener("inputsourceschange",_);const t=e.getContextAttributes();!0!==t.xrCompatible&&await e.makeXRCompatible();const r={antialias:t.antialias,alpha:t.alpha,depth:t.depth,stencil:t.stencil,framebufferScaleFactor:o},c=new XRWebGLLayer(i,e,r);i.updateRenderState({baseLayer:c}),a=await i.requestReferenceSpace(s),S.setContext(i),S.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}};const x=new or,b=new or;function w(t,e){null===e?t.matrixWorld.copy(t.matrix):t.matrixWorld.multiplyMatrices(e.matrixWorld,t.matrix),t.matrixWorldInverse.copy(t.matrixWorld).invert()}this.getCamera=function(t){p.near=f.near=h.near=t.near,p.far=f.far=h.far=t.far,m===p.near&&g===p.far||(i.updateRenderState({depthNear:p.near,depthFar:p.far}),m=p.near,g=p.far);const e=t.parent,n=p.cameras;w(p,e);for(let t=0;t<n.length;t++)w(n[t],e);t.matrixWorld.copy(p.matrixWorld),t.matrix.copy(p.matrix),t.matrix.decompose(t.position,t.quaternion,t.scale);const r=t.children;for(let t=0,e=r.length;t<e;t++)r[t].updateMatrixWorld(!0);return 2===n.length?function(t,e,n){x.setFromMatrixPosition(e.matrixWorld),b.setFromMatrixPosition(n.matrixWorld);const r=x.distanceTo(b),i=e.projectionMatrix.elements,o=n.projectionMatrix.elements,a=i[14]/(i[10]-1),s=i[14]/(i[10]+1),c=(i[9]+1)/i[5],u=(i[9]-1)/i[5],l=(i[8]-1)/i[0],h=(o[8]+1)/o[0],f=a*l,d=a*h,p=r/(-l+h),m=p*-l;e.matrixWorld.decompose(t.position,t.quaternion,t.scale),t.translateX(m),t.translateZ(p),t.matrixWorld.compose(t.position,t.quaternion,t.scale),t.matrixWorldInverse.copy(t.matrixWorld).invert();const g=a+p,v=s+p,y=f-m,_=d+(r-m),w=c*s/v*g,M=u*s/v*g;t.projectionMatrix.makePerspective(y,_,w,M,g,v)}(p,h,f):p.projectionMatrix.copy(h.projectionMatrix),p};let M=null;const S=new zo;S.setAnimationLoop((function(t,e){if(c=e.getViewerPose(a),null!==c){const t=c.views,e=i.renderState.baseLayer;r.bindXRFramebuffer(e.framebuffer);let n=!1;t.length!==p.cameras.length&&(p.cameras.length=0,n=!0);for(let r=0;r<t.length;r++){const i=t[r],o=e.getViewport(i),a=d[r];a.matrix.fromArray(i.transform.matrix),a.projectionMatrix.fromArray(i.projectionMatrix),a.viewport.set(o.x,o.y,o.width,o.height),0===r&&p.matrix.copy(a.matrix),!0===n&&p.cameras.push(a)}}const n=i.inputSources;for(let t=0;t<u.length;t++){const r=u[t],i=n[t];r.update(i,e,a)}M&&M(t,e)})),this.setAnimationLoop=function(t){M=t},this.dispose=function(){}}function Xs(t){function e(e,n){e.opacity.value=n.opacity,n.color&&e.diffuse.value.copy(n.color),n.emissive&&e.emissive.value.copy(n.emissive).multiplyScalar(n.emissiveIntensity),n.map&&(e.map.value=n.map),n.alphaMap&&(e.alphaMap.value=n.alphaMap),n.specularMap&&(e.specularMap.value=n.specularMap);const r=t.get(n).envMap;if(r){e.envMap.value=r,e.flipEnvMap.value=r.isCubeTexture&&r._needsFlipEnvMap?-1:1,e.reflectivity.value=n.reflectivity,e.refractionRatio.value=n.refractionRatio;const i=t.get(r).__maxMipLevel;void 0!==i&&(e.maxMipLevel.value=i)}let i,o;n.lightMap&&(e.lightMap.value=n.lightMap,e.lightMapIntensity.value=n.lightMapIntensity),n.aoMap&&(e.aoMap.value=n.aoMap,e.aoMapIntensity.value=n.aoMapIntensity),n.map?i=n.map:n.specularMap?i=n.specularMap:n.displacementMap?i=n.displacementMap:n.normalMap?i=n.normalMap:n.bumpMap?i=n.bumpMap:n.roughnessMap?i=n.roughnessMap:n.metalnessMap?i=n.metalnessMap:n.alphaMap?i=n.alphaMap:n.emissiveMap?i=n.emissiveMap:n.clearcoatMap?i=n.clearcoatMap:n.clearcoatNormalMap?i=n.clearcoatNormalMap:n.clearcoatRoughnessMap&&(i=n.clearcoatRoughnessMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix)),n.aoMap?o=n.aoMap:n.lightMap&&(o=n.lightMap),void 0!==o&&(o.isWebGLRenderTarget&&(o=o.texture),!0===o.matrixAutoUpdate&&o.updateMatrix(),e.uv2Transform.value.copy(o.matrix))}function n(e,n){e.roughness.value=n.roughness,e.metalness.value=n.metalness,n.roughnessMap&&(e.roughnessMap.value=n.roughnessMap),n.metalnessMap&&(e.metalnessMap.value=n.metalnessMap),n.emissiveMap&&(e.emissiveMap.value=n.emissiveMap),n.bumpMap&&(e.bumpMap.value=n.bumpMap,e.bumpScale.value=n.bumpScale,n.side===M&&(e.bumpScale.value*=-1)),n.normalMap&&(e.normalMap.value=n.normalMap,e.normalScale.value.copy(n.normalScale),n.side===M&&e.normalScale.value.negate()),n.displacementMap&&(e.displacementMap.value=n.displacementMap,e.displacementScale.value=n.displacementScale,e.displacementBias.value=n.displacementBias),t.get(n).envMap&&(e.envMapIntensity.value=n.envMapIntensity)}return{refreshFogUniforms:function(t,e){t.fogColor.value.copy(e.color),e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)},refreshMaterialUniforms:function(t,r,i,o){r.isMeshBasicMaterial?e(t,r):r.isMeshLambertMaterial?(e(t,r),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(t,r)):r.isMeshToonMaterial?(e(t,r),function(t,e){e.gradientMap&&(t.gradientMap.value=e.gradientMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===M&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===M&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(t,r)):r.isMeshPhongMaterial?(e(t,r),function(t,e){t.specular.value.copy(e.specular),t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===M&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===M&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(t,r)):r.isMeshStandardMaterial?(e(t,r),r.isMeshPhysicalMaterial?function(t,e){n(t,e),t.reflectivity.value=e.reflectivity,t.clearcoat.value=e.clearcoat,t.clearcoatRoughness.value=e.clearcoatRoughness,e.sheen&&t.sheen.value.copy(e.sheen),e.clearcoatMap&&(t.clearcoatMap.value=e.clearcoatMap),e.clearcoatRoughnessMap&&(t.clearcoatRoughnessMap.value=e.clearcoatRoughnessMap),e.clearcoatNormalMap&&(t.clearcoatNormalScale.value.copy(e.clearcoatNormalScale),t.clearcoatNormalMap.value=e.clearcoatNormalMap,e.side===M&&t.clearcoatNormalScale.value.negate()),t.transmission.value=e.transmission,e.transmissionMap&&(t.transmissionMap.value=e.transmissionMap)}(t,r):n(t,r)):r.isMeshMatcapMaterial?(e(t,r),function(t,e){e.matcap&&(t.matcap.value=e.matcap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===M&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===M&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(t,r)):r.isMeshDepthMaterial?(e(t,r),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(t,r)):r.isMeshDistanceMaterial?(e(t,r),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(t,r)):r.isMeshNormalMaterial?(e(t,r),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===M&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===M&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(t,r)):r.isLineBasicMaterial?(function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity}(t,r),r.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(t,r)):r.isPointsMaterial?function(t,e,n,r){let i;t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.size.value=e.size*n,t.scale.value=.5*r,e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.map?i=e.map:e.alphaMap&&(i=e.alphaMap),void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),t.uvTransform.value.copy(i.matrix))}(t,r,i,o):r.isSpriteMaterial?function(t,e){let n;t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.rotation.value=e.rotation,e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.map?n=e.map:e.alphaMap&&(n=e.alphaMap),void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}(t,r):r.isShadowMaterial?(t.color.value.copy(r.color),t.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function $s(t){const e=void 0!==(t=t||{}).canvas?t.canvas:function(){const t=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return t.style.display="block",t}(),n=void 0!==t.context?t.context:null,r=void 0!==t.alpha&&t.alpha,i=void 0===t.depth||t.depth,o=void 0===t.stencil||t.stencil,a=void 0!==t.antialias&&t.antialias,s=void 0===t.premultipliedAlpha||t.premultipliedAlpha,c=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,u=void 0!==t.powerPreference?t.powerPreference:"default",l=void 0!==t.failIfMajorPerformanceCaveat&&t.failIfMajorPerformanceCaveat;let h=null,f=null;const d=[],p=[];this.domElement=e,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=on,this.physicallyCorrectLights=!1,this.toneMapping=at,this.toneMappingExposure=1;const m=this;let g=!1,v=0,y=0,_=null,x=-1,b=null;const w=new er,M=new er;let S=null,T=e.width,E=e.height,C=1,A=null,P=null;const L=new er(0,0,T,E),R=new er(0,0,T,E);let O=!1;const k=new jo;let I=!1,D=!1;const j=new jr,z=new or,N={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function F(){return null===_?C:1}let B,H,G,U,V,W,Z,q,Y,J,X,$,Q,K,tt,et,nt,rt,it,ot,st,ct,ut=n;function lt(t,n){for(let r=0;r<t.length;r++){const i=t[r],o=e.getContext(i,n);if(null!==o)return o}return null}try{const t={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:l};if(e.addEventListener("webglcontextlost",dt,!1),e.addEventListener("webglcontextrestored",pt,!1),null===ut){const e=["webgl2","webgl","experimental-webgl"];if(!0===m.isWebGL1Renderer&&e.shift(),ut=lt(e,t),null===ut)throw lt(e)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===ut.getShaderPrecisionFormat&&(ut.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){throw console.error("THREE.WebGLRenderer: "+t.message),t}function ht(){B=new Jo(ut),H=new Zo(ut,B,t),B.init(H),st=new Ws(ut,B,H),G=new Us(ut,B,H),U=new Qo(ut),V=new Ps,W=new Vs(ut,B,G,V,H,st,U),Z=new Yo(m),q=new No(ut,H),ct=new Vo(ut,B,q,H),Y=new Xo(ut,q,U,ct),J=new na(ut,Y,q,U),rt=new ea(ut),tt=new qo(V),X=new As(m,Z,B,H,ct,tt),$=new Xs(V),Q=new ks(V),K=new Fs(B,H),nt=new Uo(m,Z,G,J,s),et=new Gs(m,J,H),it=new Wo(ut,B,U,H),ot=new $o(ut,B,U,H),U.programs=X.programs,m.capabilities=H,m.extensions=B,m.properties=V,m.renderLists=Q,m.shadowMap=et,m.state=G,m.info=U}ht();const ft=new Js(m,ut);function dt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),g=!0}function pt(){console.log("THREE.WebGLRenderer: Context Restored."),g=!1;const t=U.autoReset,e=et.enabled,n=et.autoUpdate,r=et.needsUpdate,i=et.type;ht(),U.autoReset=t,et.enabled=e,et.autoUpdate=n,et.needsUpdate=r,et.type=i}function mt(t){const e=t.target;e.removeEventListener("dispose",mt),function(t){(function(t){const e=V.get(t).programs;void 0!==e&&e.forEach((function(t){X.releaseProgram(t)}))})(t),V.remove(t)}(e)}this.xr=ft,this.getContext=function(){return ut},this.getContextAttributes=function(){return ut.getContextAttributes()},this.forceContextLoss=function(){const t=B.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){const t=B.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return C},this.setPixelRatio=function(t){void 0!==t&&(C=t,this.setSize(T,E,!1))},this.getSize=function(t){return void 0===t&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),t=new Yn),t.set(T,E)},this.setSize=function(t,n,r){ft.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(T=t,E=n,e.width=Math.floor(t*C),e.height=Math.floor(n*C),!1!==r&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(t){return void 0===t&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),t=new Yn),t.set(T*C,E*C).floor()},this.setDrawingBufferSize=function(t,n,r){T=t,E=n,C=r,e.width=Math.floor(t*r),e.height=Math.floor(n*r),this.setViewport(0,0,t,n)},this.getCurrentViewport=function(t){return void 0===t&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),t=new er),t.copy(w)},this.getViewport=function(t){return t.copy(L)},this.setViewport=function(t,e,n,r){t.isVector4?L.set(t.x,t.y,t.z,t.w):L.set(t,e,n,r),G.viewport(w.copy(L).multiplyScalar(C).floor())},this.getScissor=function(t){return t.copy(R)},this.setScissor=function(t,e,n,r){t.isVector4?R.set(t.x,t.y,t.z,t.w):R.set(t,e,n,r),G.scissor(M.copy(R).multiplyScalar(C).floor())},this.getScissorTest=function(){return O},this.setScissorTest=function(t){G.setScissorTest(O=t)},this.setOpaqueSort=function(t){A=t},this.setTransparentSort=function(t){P=t},this.getClearColor=function(t){return void 0===t&&(console.warn("WebGLRenderer: .getClearColor() now requires a Color as an argument"),t=new Ri),t.copy(nt.getClearColor())},this.setClearColor=function(){nt.setClearColor.apply(nt,arguments)},this.getClearAlpha=function(){return nt.getClearAlpha()},this.setClearAlpha=function(){nt.setClearAlpha.apply(nt,arguments)},this.clear=function(t,e,n){let r=0;(void 0===t||t)&&(r|=16384),(void 0===e||e)&&(r|=256),(void 0===n||n)&&(r|=1024),ut.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){e.removeEventListener("webglcontextlost",dt,!1),e.removeEventListener("webglcontextrestored",pt,!1),Q.dispose(),K.dispose(),V.dispose(),Z.dispose(),J.dispose(),ct.dispose(),ft.dispose(),ft.removeEventListener("sessionstart",vt),ft.removeEventListener("sessionend",yt),_t.stop()},this.renderBufferImmediate=function(t,e){ct.initAttributes();const n=V.get(t);t.hasPositions&&!n.position&&(n.position=ut.createBuffer()),t.hasNormals&&!n.normal&&(n.normal=ut.createBuffer()),t.hasUvs&&!n.uv&&(n.uv=ut.createBuffer()),t.hasColors&&!n.color&&(n.color=ut.createBuffer());const r=e.getAttributes();t.hasPositions&&(ut.bindBuffer(34962,n.position),ut.bufferData(34962,t.positionArray,35048),ct.enableAttribute(r.position),ut.vertexAttribPointer(r.position,3,5126,!1,0,0)),t.hasNormals&&(ut.bindBuffer(34962,n.normal),ut.bufferData(34962,t.normalArray,35048),ct.enableAttribute(r.normal),ut.vertexAttribPointer(r.normal,3,5126,!1,0,0)),t.hasUvs&&(ut.bindBuffer(34962,n.uv),ut.bufferData(34962,t.uvArray,35048),ct.enableAttribute(r.uv),ut.vertexAttribPointer(r.uv,2,5126,!1,0,0)),t.hasColors&&(ut.bindBuffer(34962,n.color),ut.bufferData(34962,t.colorArray,35048),ct.enableAttribute(r.color),ut.vertexAttribPointer(r.color,3,5126,!1,0,0)),ct.disableUnusedAttributes(),ut.drawArrays(4,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,n,r,i,o){null===e&&(e=N);const a=i.isMesh&&i.matrixWorld.determinant()<0,s=Tt(t,e,r,i);G.setMaterial(r,a);let c=n.index;const u=n.attributes.position;if(null===c){if(void 0===u||0===u.count)return}else if(0===c.count)return;let l,h=1;!0===r.wireframe&&(c=Y.getWireframeAttribute(n),h=2),(r.morphTargets||r.morphNormals)&&rt.update(i,n,r,s),ct.setup(i,r,s,n,c);let f=it;null!==c&&(l=q.get(c),f=ot,f.setIndex(l));const d=null!==c?c.count:u.count,p=n.drawRange.start*h,m=n.drawRange.count*h,g=null!==o?o.start*h:0,v=null!==o?o.count*h:1/0,y=Math.max(p,g),_=Math.min(d,p+m,g+v)-1,x=Math.max(0,_-y+1);if(0!==x){if(i.isMesh)!0===r.wireframe?(G.setLineWidth(r.wireframeLinewidth*F()),f.setMode(1)):f.setMode(4);else if(i.isLine){let t=r.linewidth;void 0===t&&(t=1),G.setLineWidth(t*F()),i.isLineSegments?f.setMode(1):i.isLineLoop?f.setMode(2):f.setMode(3)}else i.isPoints?f.setMode(0):i.isSprite&&f.setMode(4);if(i.isInstancedMesh)f.renderInstances(y,x,i.count);else if(n.isInstancedBufferGeometry){const t=Math.min(n.instanceCount,n._maxInstanceCount);f.renderInstances(y,x,t)}else f.render(y,x)}},this.compile=function(t,e){f=K.get(t),f.init(),t.traverseVisible((function(t){t.isLight&&t.layers.test(e.layers)&&(f.pushLight(t),t.castShadow&&f.pushShadow(t))})),f.setupLights(),t.traverse((function(e){const n=e.material;if(n)if(Array.isArray(n))for(let r=0;r<n.length;r++)Mt(n[r],t,e);else Mt(n,t,e)}))};let gt=null;function vt(){_t.stop()}function yt(){_t.start()}const _t=new zo;function xt(t,e,n,r){if(!1===t.visible)return;if(t.layers.test(e.layers))if(t.isGroup)n=t.renderOrder;else if(t.isLOD)!0===t.autoUpdate&&t.update(e);else if(t.isLight)f.pushLight(t),t.castShadow&&f.pushShadow(t);else if(t.isSprite){if(!t.frustumCulled||k.intersectsSprite(t)){r&&z.setFromMatrixPosition(t.matrixWorld).applyMatrix4(j);const e=J.update(t),i=t.material;i.visible&&h.push(t,e,i,n,z.z,null)}}else if(t.isImmediateRenderObject)r&&z.setFromMatrixPosition(t.matrixWorld).applyMatrix4(j),h.push(t,null,t.material,n,z.z,null);else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.frame!==U.render.frame&&(t.skeleton.update(),t.skeleton.frame=U.render.frame),!t.frustumCulled||k.intersectsObject(t))){r&&z.setFromMatrixPosition(t.matrixWorld).applyMatrix4(j);const e=J.update(t),i=t.material;if(Array.isArray(i)){const r=e.groups;for(let o=0,a=r.length;o<a;o++){const a=r[o],s=i[a.materialIndex];s&&s.visible&&h.push(t,e,s,n,z.z,a)}}else i.visible&&h.push(t,e,i,n,z.z,null)}const i=t.children;for(let t=0,o=i.length;t<o;t++)xt(i[t],e,n,r)}function bt(t,e,n){const r=!0===e.isScene?e.overrideMaterial:null;for(let i=0,o=t.length;i<o;i++){const o=t[i],a=o.object,s=o.geometry,c=null===r?o.material:r,u=o.group;if(n.isArrayCamera){const t=n.cameras;for(let n=0,r=t.length;n<r;n++){const r=t[n];a.layers.test(r.layers)&&(G.viewport(w.copy(r.viewport)),f.setupLightsView(r),wt(a,e,r,s,c,u))}}else wt(a,e,n,s,c,u)}}function wt(t,e,n,r,i,o){if(t.onBeforeRender(m,e,n,r,i,o),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){const r=Tt(n,e,i,t);G.setMaterial(i),ct.reset(),function(t,e){t.render((function(t){m.renderBufferImmediate(t,e)}))}(t,r)}else m.renderBufferDirect(n,e,r,i,t,o);t.onAfterRender(m,e,n,r,i,o)}function Mt(t,e,n){!0!==e.isScene&&(e=N);const r=V.get(t),i=f.state.lights,o=f.state.shadowsArray,a=i.state.version,s=X.getParameters(t,i.state,o,e,n),c=X.getProgramCacheKey(s);let u=r.programs;r.environment=t.isMeshStandardMaterial?e.environment:null,r.fog=e.fog,r.envMap=Z.get(t.envMap||r.environment),void 0===u&&(t.addEventListener("dispose",mt),u=new Map,r.programs=u);let l=u.get(c);if(void 0!==l){if(r.currentProgram===l&&r.lightsStateVersion===a)return St(t,s),l}else s.uniforms=X.getUniforms(t),t.onBeforeCompile(s,m),l=X.acquireProgram(s,c),u.set(c,l),r.uniforms=s.uniforms;const h=r.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(h.clippingPlanes=tt.uniform),St(t,s),r.needsLights=function(t){return t.isMeshLambertMaterial||t.isMeshToonMaterial||t.isMeshPhongMaterial||t.isMeshStandardMaterial||t.isShadowMaterial||t.isShaderMaterial&&!0===t.lights}(t),r.lightsStateVersion=a,r.needsLights&&(h.ambientLightColor.value=i.state.ambient,h.lightProbe.value=i.state.probe,h.directionalLights.value=i.state.directional,h.directionalLightShadows.value=i.state.directionalShadow,h.spotLights.value=i.state.spot,h.spotLightShadows.value=i.state.spotShadow,h.rectAreaLights.value=i.state.rectArea,h.ltc_1.value=i.state.rectAreaLTC1,h.ltc_2.value=i.state.rectAreaLTC2,h.pointLights.value=i.state.point,h.pointLightShadows.value=i.state.pointShadow,h.hemisphereLights.value=i.state.hemi,h.directionalShadowMap.value=i.state.directionalShadowMap,h.directionalShadowMatrix.value=i.state.directionalShadowMatrix,h.spotShadowMap.value=i.state.spotShadowMap,h.spotShadowMatrix.value=i.state.spotShadowMatrix,h.pointShadowMap.value=i.state.pointShadowMap,h.pointShadowMatrix.value=i.state.pointShadowMatrix);const d=l.getUniforms(),p=as.seqWithValue(d.seq,h);return r.currentProgram=l,r.uniformsList=p,l}function St(t,e){const n=V.get(t);n.outputEncoding=e.outputEncoding,n.instancing=e.instancing,n.numClippingPlanes=e.numClippingPlanes,n.numIntersection=e.numClipIntersection,n.vertexAlphas=e.vertexAlphas}function Tt(t,e,n,r){!0!==e.isScene&&(e=N),W.resetTextureUnits();const i=e.fog,o=n.isMeshStandardMaterial?e.environment:null,a=null===_?m.outputEncoding:_.texture.encoding,s=Z.get(n.envMap||o),c=!0===n.vertexColors&&r.geometry.attributes.color&&4===r.geometry.attributes.color.itemSize,u=V.get(n),l=f.state.lights;if(!0===I&&(!0===D||t!==b)){const e=t===b&&n.id===x;tt.setState(n,t,e)}let h=!1;n.version===u.__version?u.needsLights&&u.lightsStateVersion!==l.state.version||u.outputEncoding!==a||r.isInstancedMesh&&!1===u.instancing?h=!0:r.isInstancedMesh||!0!==u.instancing?u.envMap!==s||n.fog&&u.fog!==i?h=!0:void 0===u.numClippingPlanes||u.numClippingPlanes===tt.numPlanes&&u.numIntersection===tt.numIntersection?u.vertexAlphas!==c&&(h=!0):h=!0:h=!0:(h=!0,u.__version=n.version);let d=u.currentProgram;!0===h&&(d=Mt(n,e,r));let p=!1,g=!1,v=!1;const y=d.getUniforms(),w=u.uniforms;if(G.useProgram(d.program)&&(p=!0,g=!0,v=!0),n.id!==x&&(x=n.id,g=!0),p||b!==t){if(y.setValue(ut,"projectionMatrix",t.projectionMatrix),H.logarithmicDepthBuffer&&y.setValue(ut,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),b!==t&&(b=t,g=!0,v=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshStandardMaterial||n.envMap){const e=y.map.cameraPosition;void 0!==e&&e.setValue(ut,z.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&y.setValue(ut,"isOrthographic",!0===t.isOrthographicCamera),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.isShadowMaterial||n.skinning)&&y.setValue(ut,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){y.setOptional(ut,r,"bindMatrix"),y.setOptional(ut,r,"bindMatrixInverse");const t=r.skeleton;if(t){const e=t.bones;if(H.floatVertexTextures){if(null===t.boneTexture){let n=Math.sqrt(4*e.length);n=qn.ceilPowerOfTwo(n),n=Math.max(n,4);const r=new Float32Array(n*n*4);r.set(t.boneMatrices);const i=new ko(r,n,n,Zt,Nt);t.boneMatrices=r,t.boneTexture=i,t.boneTextureSize=n}y.setValue(ut,"boneTexture",t.boneTexture,W),y.setValue(ut,"boneTextureSize",t.boneTextureSize)}else y.setOptional(ut,t,"boneMatrices")}}return(g||u.receiveShadow!==r.receiveShadow)&&(u.receiveShadow=r.receiveShadow,y.setValue(ut,"receiveShadow",r.receiveShadow)),g&&(y.setValue(ut,"toneMappingExposure",m.toneMappingExposure),u.needsLights&&function(t,e){t.ambientLightColor.needsUpdate=e,t.lightProbe.needsUpdate=e,t.directionalLights.needsUpdate=e,t.directionalLightShadows.needsUpdate=e,t.pointLights.needsUpdate=e,t.pointLightShadows.needsUpdate=e,t.spotLights.needsUpdate=e,t.spotLightShadows.needsUpdate=e,t.rectAreaLights.needsUpdate=e,t.hemisphereLights.needsUpdate=e}(w,v),i&&n.fog&&$.refreshFogUniforms(w,i),$.refreshMaterialUniforms(w,n,C,E),as.upload(ut,u.uniformsList,w,W)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(as.upload(ut,u.uniformsList,w,W),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&y.setValue(ut,"center",r.center),y.setValue(ut,"modelViewMatrix",r.modelViewMatrix),y.setValue(ut,"normalMatrix",r.normalMatrix),y.setValue(ut,"modelMatrix",r.matrixWorld),d}_t.setAnimationLoop((function(t){gt&>(t)})),"undefined"!=typeof window&&_t.setContext(window),this.setAnimationLoop=function(t){gt=t,ft.setAnimationLoop(t),null===t?_t.stop():_t.start()},ft.addEventListener("sessionstart",vt),ft.addEventListener("sessionend",yt),this.render=function(t,e){let n,r;if(void 0!==arguments[2]&&(console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead."),n=arguments[2]),void 0!==arguments[3]&&(console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."),r=arguments[3]),void 0!==e&&!0!==e.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===g)return;!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),!0===ft.enabled&&!0===ft.isPresenting&&(e=ft.getCamera(e)),!0===t.isScene&&t.onBeforeRender(m,t,e,n||_),f=K.get(t,p.length),f.init(),p.push(f),j.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),k.setFromProjectionMatrix(j),D=this.localClippingEnabled,I=tt.init(this.clippingPlanes,D,e),h=Q.get(t,d.length),h.init(),d.push(h),xt(t,e,0,m.sortObjects),h.finish(),!0===m.sortObjects&&h.sort(A,P),!0===I&&tt.beginShadows();const i=f.state.shadowsArray;et.render(i,t,e),f.setupLights(),f.setupLightsView(e),!0===I&&tt.endShadows(),!0===this.info.autoReset&&this.info.reset(),void 0!==n&&this.setRenderTarget(n),nt.render(h,t,e,r);const o=h.opaque,a=h.transparent;o.length>0&&bt(o,t,e),a.length>0&&bt(a,t,e),null!==_&&(W.updateRenderTargetMipmap(_),W.updateMultisampleRenderTarget(_)),!0===t.isScene&&t.onAfterRender(m,t,e),G.buffers.depth.setTest(!0),G.buffers.depth.setMask(!0),G.buffers.color.setMask(!0),G.setPolygonOffset(!1),ct.resetDefaultState(),x=-1,b=null,p.pop(),f=p.length>0?p[p.length-1]:null,d.pop(),h=d.length>0?d[d.length-1]:null},this.getActiveCubeFace=function(){return v},this.getActiveMipmapLevel=function(){return y},this.getRenderTarget=function(){return _},this.setRenderTarget=function(t,e=0,n=0){_=t,v=e,y=n,t&&void 0===V.get(t).__webglFramebuffer&&W.setupRenderTarget(t);let r=null,i=!1,o=!1;if(t){const n=t.texture;(n.isDataTexture3D||n.isDataTexture2DArray)&&(o=!0);const a=V.get(t).__webglFramebuffer;t.isWebGLCubeRenderTarget?(r=a[e],i=!0):r=t.isWebGLMultisampleRenderTarget?V.get(t).__webglMultisampledFramebuffer:a,w.copy(t.viewport),M.copy(t.scissor),S=t.scissorTest}else w.copy(L).multiplyScalar(C).floor(),M.copy(R).multiplyScalar(C).floor(),S=O;if(G.bindFramebuffer(36160,r),G.viewport(w),G.scissor(M),G.setScissorTest(S),i){const r=V.get(t.texture);ut.framebufferTexture2D(36160,36064,34069+e,r.__webglTexture,n)}else if(o){const r=V.get(t.texture),i=e||0;ut.framebufferTextureLayer(36160,36064,r.__webglTexture,n||0,i)}},this.readRenderTargetPixels=function(t,e,n,r,i,o,a){if(!t||!t.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let s=V.get(t).__webglFramebuffer;if(t.isWebGLCubeRenderTarget&&void 0!==a&&(s=s[a]),s){G.bindFramebuffer(36160,s);try{const a=t.texture,s=a.format,c=a.type;if(s!==Zt&&st.convert(s)!==ut.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const u=c===Ft&&(B.has("EXT_color_buffer_half_float")||H.isWebGL2&&B.has("EXT_color_buffer_float"));if(!(c===Ot||st.convert(c)===ut.getParameter(35738)||c===Nt&&(H.isWebGL2||B.has("OES_texture_float")||B.has("WEBGL_color_buffer_float"))||u))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===ut.checkFramebufferStatus(36160)?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&ut.readPixels(e,n,r,i,st.convert(s),st.convert(c),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{const t=null!==_?V.get(_).__webglFramebuffer:null;G.bindFramebuffer(36160,t)}}},this.copyFramebufferToTexture=function(t,e,n=0){const r=Math.pow(2,-n),i=Math.floor(e.image.width*r),o=Math.floor(e.image.height*r),a=st.convert(e.format);W.setTexture2D(e,0),ut.copyTexImage2D(3553,n,a,t.x,t.y,i,o,0),G.unbindTexture()},this.copyTextureToTexture=function(t,e,n,r=0){const i=e.image.width,o=e.image.height,a=st.convert(n.format),s=st.convert(n.type);W.setTexture2D(n,0),ut.pixelStorei(37440,n.flipY),ut.pixelStorei(37441,n.premultiplyAlpha),ut.pixelStorei(3317,n.unpackAlignment),e.isDataTexture?ut.texSubImage2D(3553,r,t.x,t.y,i,o,a,s,e.image.data):e.isCompressedTexture?ut.compressedTexSubImage2D(3553,r,t.x,t.y,e.mipmaps[0].width,e.mipmaps[0].height,a,e.mipmaps[0].data):ut.texSubImage2D(3553,r,t.x,t.y,a,s,e.image),0===r&&n.generateMipmaps&&ut.generateMipmap(3553),G.unbindTexture()},this.copyTextureToTexture3D=function(t,e,n,r,i=0){if(m.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const{width:o,height:a,data:s}=n.image,c=st.convert(r.format),u=st.convert(r.type);let l;if(r.isDataTexture3D)W.setTexture3D(r,0),l=32879;else{if(!r.isDataTexture2DArray)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");W.setTexture2DArray(r,0),l=35866}ut.pixelStorei(37440,r.flipY),ut.pixelStorei(37441,r.premultiplyAlpha),ut.pixelStorei(3317,r.unpackAlignment);const h=ut.getParameter(3314),f=ut.getParameter(32878),d=ut.getParameter(3316),p=ut.getParameter(3315),g=ut.getParameter(32877);ut.pixelStorei(3314,o),ut.pixelStorei(32878,a),ut.pixelStorei(3316,t.min.x),ut.pixelStorei(3315,t.min.y),ut.pixelStorei(32877,t.min.z),ut.texSubImage3D(l,i,e.x,e.y,e.z,t.max.x-t.min.x+1,t.max.y-t.min.y+1,t.max.z-t.min.z+1,c,u,s),ut.pixelStorei(3314,h),ut.pixelStorei(32878,f),ut.pixelStorei(3316,d),ut.pixelStorei(3315,p),ut.pixelStorei(32877,g),0===i&&r.generateMipmaps&&ut.generateMipmap(l),G.unbindTexture()},this.initTexture=function(t){W.setTexture2D(t,0),G.unbindTexture()},this.resetState=function(){v=0,y=0,_=null,G.reset(),ct.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}qs.prototype.isGroup=!0,Object.assign(Ys.prototype,{constructor:Ys,getHandSpace:function(){return null===this._hand&&(this._hand=new qs,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand},getTargetRaySpace:function(){return null===this._targetRay&&(this._targetRay=new qs,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1),this._targetRay},getGripSpace:function(){return null===this._grip&&(this._grip=new qs,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1),this._grip},dispatchEvent:function(t){return null!==this._targetRay&&this._targetRay.dispatchEvent(t),null!==this._grip&&this._grip.dispatchEvent(t),null!==this._hand&&this._hand.dispatchEvent(t),this},disconnect:function(t){return this.dispatchEvent({type:"disconnected",data:t}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this},update:function(t,e,n){let r=null,i=null,o=null;const a=this._targetRay,s=this._grip,c=this._hand;if(t&&"visible-blurred"!==e.session.visibilityState)if(null!==a&&(r=e.getPose(t.targetRaySpace,n),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale))),c&&t.hand){o=!0;for(const r of t.hand.values()){const t=e.getJointPose(r,n);if(void 0===c.joints[r.jointName]){const t=new qs;t.matrixAutoUpdate=!1,t.visible=!1,c.joints[r.jointName]=t,c.add(t)}const i=c.joints[r.jointName];null!==t&&(i.matrix.fromArray(t.transform.matrix),i.matrix.decompose(i.position,i.rotation,i.scale),i.jointRadius=t.radius),i.visible=null!==t}const r=c.joints["index-finger-tip"],i=c.joints["thumb-tip"],a=r.position.distanceTo(i.position),s=.02,u=.005;c.inputState.pinching&&a>s+u?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!c.inputState.pinching&&a<=s-u&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else null!==s&&t.gripSpace&&(i=e.getPose(t.gripSpace,n),null!==i&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale)));return null!==a&&(a.visible=null!==r),null!==s&&(s.visible=null!==i),null!==c&&(c.visible=null!==o),this}}),Object.assign(Js.prototype,Vn.prototype);class Qs extends $s{}Qs.prototype.isWebGL1Renderer=!0;class Ks{constructor(t,e=25e-5){this.name="",this.color=new Ri(t),this.density=e}clone(){return new Ks(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}Ks.prototype.isFogExp2=!0;class tc{constructor(t,e=1,n=1e3){this.name="",this.color=new Ri(t),this.near=e,this.far=n}clone(){return new tc(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}tc.prototype.isFog=!0;class ec extends si{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.environment&&(this.environment=t.environment.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const e=super.toJSON(t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.environment&&(e.object.environment=this.environment.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}function nc(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.usage=kn,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=qn.generateUUID()}ec.prototype.isScene=!0,Object.defineProperty(nc.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(nc.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setUsage:function(t){return this.usage=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(let r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e=0){return this.array.set(t,e),this},clone:function(t){void 0===t.arrayBuffers&&(t.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=qn.generateUUID()),void 0===t.arrayBuffers[this.array.buffer._uuid]&&(t.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const e=new nc(new this.array.constructor(t.arrayBuffers[this.array.buffer._uuid]),this.stride);return e.setUsage(this.usage),e},onUpload:function(t){return this.onUploadCallback=t,this},toJSON:function(t){return void 0===t.arrayBuffers&&(t.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=qn.generateUUID()),void 0===t.arrayBuffers[this.array.buffer._uuid]&&(t.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}});const rc=new or;function ic(t,e,n,r){this.name="",this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===r}Object.defineProperties(ic.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}},needsUpdate:{set:function(t){this.data.needsUpdate=t}}}),Object.assign(ic.prototype,{isInterleavedBufferAttribute:!0,applyMatrix4:function(t){for(let e=0,n=this.data.count;e<n;e++)rc.x=this.getX(e),rc.y=this.getY(e),rc.z=this.getZ(e),rc.applyMatrix4(t),this.setXYZ(e,rc.x,rc.y,rc.z);return this},applyNormalMatrix:function(t){for(let e=0,n=this.count;e<n;e++)rc.x=this.getX(e),rc.y=this.getY(e),rc.z=this.getZ(e),rc.applyNormalMatrix(t),this.setXYZ(e,rc.x,rc.y,rc.z);return this},transformDirection:function(t){for(let e=0,n=this.count;e<n;e++)rc.x=this.getX(e),rc.y=this.getY(e),rc.z=this.getZ(e),rc.transformDirection(t),this.setXYZ(e,rc.x,rc.y,rc.z);return this},setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this.data.array[t+3]=i,this},clone:function(t){if(void 0===t){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");const t=[];for(let e=0;e<this.count;e++){const n=e*this.data.stride+this.offset;for(let e=0;e<this.itemSize;e++)t.push(this.data.array[n+e])}return new Di(new this.array.constructor(t),this.itemSize,this.normalized)}return void 0===t.interleavedBuffers&&(t.interleavedBuffers={}),void 0===t.interleavedBuffers[this.data.uuid]&&(t.interleavedBuffers[this.data.uuid]=this.data.clone(t)),new ic(t.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)},toJSON:function(t){if(void 0===t){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");const t=[];for(let e=0;e<this.count;e++){const n=e*this.data.stride+this.offset;for(let e=0;e<this.itemSize;e++)t.push(this.data.array[n+e])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}return void 0===t.interleavedBuffers&&(t.interleavedBuffers={}),void 0===t.interleavedBuffers[this.data.uuid]&&(t.interleavedBuffers[this.data.uuid]=this.data.toJSON(t)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}});class oc extends Si{constructor(t){super(),this.type="SpriteMaterial",this.color=new Ri(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this}}let ac;oc.prototype.isSpriteMaterial=!0;const sc=new or,cc=new or,uc=new or,lc=new Yn,hc=new Yn,fc=new jr,dc=new or,pc=new or,mc=new or,gc=new Yn,vc=new Yn,yc=new Yn;class _c extends si{constructor(t){if(super(),this.type="Sprite",void 0===ac){ac=new no;const t=new nc(new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),5);ac.setIndex([0,1,2,0,2,3]),ac.setAttribute("position",new ic(t,3,0,!1)),ac.setAttribute("uv",new ic(t,2,3,!1))}this.geometry=ac,this.material=void 0!==t?t:new oc,this.center=new Yn(.5,.5)}raycast(t,e){null===t.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),cc.setFromMatrixScale(this.matrixWorld),fc.copy(t.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(t.camera.matrixWorldInverse,this.matrixWorld),uc.setFromMatrixPosition(this.modelViewMatrix),t.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&cc.multiplyScalar(-uc.z);const n=this.material.rotation;let r,i;0!==n&&(i=Math.cos(n),r=Math.sin(n));const o=this.center;xc(dc.set(-.5,-.5,0),uc,o,cc,r,i),xc(pc.set(.5,-.5,0),uc,o,cc,r,i),xc(mc.set(.5,.5,0),uc,o,cc,r,i),gc.set(0,0),vc.set(1,0),yc.set(1,1);let a=t.ray.intersectTriangle(dc,pc,mc,!1,sc);if(null===a&&(xc(pc.set(-.5,.5,0),uc,o,cc,r,i),vc.set(0,1),a=t.ray.intersectTriangle(dc,mc,pc,!1,sc),null===a))return;const s=t.ray.origin.distanceTo(sc);s<t.near||s>t.far||e.push({distance:s,point:sc.clone(),uv:wi.getUV(sc,dc,pc,mc,gc,vc,yc,new Yn),face:null,object:this})}copy(t){return super.copy(t),void 0!==t.center&&this.center.copy(t.center),this.material=t.material,this}}function xc(t,e,n,r,i,o){lc.subVectors(t,n).addScalar(.5).multiply(r),void 0!==i?(hc.x=o*lc.x-i*lc.y,hc.y=i*lc.x+o*lc.y):hc.copy(lc),t.copy(e),t.x+=hc.x,t.y+=hc.y,t.applyMatrix4(fc)}_c.prototype.isSprite=!0;const bc=new or,wc=new or;class Mc extends si{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(t){super.copy(t,!1);const e=t.levels;for(let t=0,n=e.length;t<n;t++){const n=e[t];this.addLevel(n.object.clone(),n.distance)}return this.autoUpdate=t.autoUpdate,this}addLevel(t,e=0){e=Math.abs(e);const n=this.levels;let r;for(r=0;r<n.length&&!(e<n[r].distance);r++);return n.splice(r,0,{distance:e,object:t}),this.add(t),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(t){const e=this.levels;if(e.length>0){let n,r;for(n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object}return null}raycast(t,e){if(this.levels.length>0){bc.setFromMatrixPosition(this.matrixWorld);const n=t.ray.origin.distanceTo(bc);this.getObjectForDistance(n).raycast(t,e)}}update(t){const e=this.levels;if(e.length>1){bc.setFromMatrixPosition(t.matrixWorld),wc.setFromMatrixPosition(this.matrixWorld);const n=bc.distanceTo(wc)/t.zoom;let r,i;for(e[0].object.visible=!0,r=1,i=e.length;r<i&&n>=e[r].distance;r++)e[r-1].object.visible=!1,e[r].object.visible=!0;for(this._currentLevel=r-1;r<i;r++)e[r].object.visible=!1}}toJSON(t){const e=super.toJSON(t);!1===this.autoUpdate&&(e.object.autoUpdate=!1),e.object.levels=[];const n=this.levels;for(let t=0,r=n.length;t<r;t++){const r=n[t];e.object.levels.push({object:r.object.uuid,distance:r.distance})}return e}}const Sc=new or,Tc=new er,Ec=new er,Cc=new or,Ac=new jr;function Pc(t,e){bo.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new jr,this.bindMatrixInverse=new jr}function Lc(){si.call(this),this.type="Bone"}Pc.prototype=Object.assign(Object.create(bo.prototype),{constructor:Pc,isSkinnedMesh:!0,copy:function(t){return bo.prototype.copy.call(this,t),this.bindMode=t.bindMode,this.bindMatrix.copy(t.bindMatrix),this.bindMatrixInverse.copy(t.bindMatrixInverse),this.skeleton=t.skeleton,this},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.copy(e).invert()},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){const t=new er,e=this.geometry.attributes.skinWeight;for(let n=0,r=e.count;n<r;n++){t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.w=e.getW(n);const r=1/t.manhattanLength();r!==1/0?t.multiplyScalar(r):t.set(1,0,0,0),e.setXYZW(n,t.x,t.y,t.z,t.w)}},updateMatrixWorld:function(t){bo.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},boneTransform:function(t,e){const n=this.skeleton,r=this.geometry;Tc.fromBufferAttribute(r.attributes.skinIndex,t),Ec.fromBufferAttribute(r.attributes.skinWeight,t),Sc.fromBufferAttribute(r.attributes.position,t).applyMatrix4(this.bindMatrix),e.set(0,0,0);for(let t=0;t<4;t++){const r=Ec.getComponent(t);if(0!==r){const i=Tc.getComponent(t);Ac.multiplyMatrices(n.bones[i].matrixWorld,n.boneInverses[i]),e.addScaledVector(Cc.copy(Sc).applyMatrix4(Ac),r)}}return e.applyMatrix4(this.bindMatrixInverse)}}),Lc.prototype=Object.assign(Object.create(si.prototype),{constructor:Lc,isBone:!0});const Rc=new jr,Oc=new jr;class kc{constructor(t=[],e=[]){this.uuid=qn.generateUUID(),this.bones=t.slice(0),this.boneInverses=e,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}init(){const t=this.bones,e=this.boneInverses;if(this.boneMatrices=new Float32Array(16*t.length),0===e.length)this.calculateInverses();else if(t.length!==e.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let t=0,e=this.bones.length;t<e;t++)this.boneInverses.push(new jr)}}calculateInverses(){this.boneInverses.length=0;for(let t=0,e=this.bones.length;t<e;t++){const e=new jr;this.bones[t]&&e.copy(this.bones[t].matrixWorld).invert(),this.boneInverses.push(e)}}pose(){for(let t=0,e=this.bones.length;t<e;t++){const e=this.bones[t];e&&e.matrixWorld.copy(this.boneInverses[t]).invert()}for(let t=0,e=this.bones.length;t<e;t++){const e=this.bones[t];e&&(e.parent&&e.parent.isBone?(e.matrix.copy(e.parent.matrixWorld).invert(),e.matrix.multiply(e.matrixWorld)):e.matrix.copy(e.matrixWorld),e.matrix.decompose(e.position,e.quaternion,e.scale))}}update(){const t=this.bones,e=this.boneInverses,n=this.boneMatrices,r=this.boneTexture;for(let r=0,i=t.length;r<i;r++){const i=t[r]?t[r].matrixWorld:Oc;Rc.multiplyMatrices(i,e[r]),Rc.toArray(n,16*r)}null!==r&&(r.needsUpdate=!0)}clone(){return new kc(this.bones,this.boneInverses)}getBoneByName(t){for(let e=0,n=this.bones.length;e<n;e++){const n=this.bones[e];if(n.name===t)return n}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(t,e){this.uuid=t.uuid;for(let n=0,r=t.bones.length;n<r;n++){const r=t.bones[n];let i=e[r];void 0===i&&(console.warn("THREE.Skeleton: No bone found with UUID:",r),i=new Lc),this.bones.push(i),this.boneInverses.push((new jr).fromArray(t.boneInverses[n]))}return this.init(),this}toJSON(){const t={metadata:{version:4.5,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};t.uuid=this.uuid;const e=this.bones,n=this.boneInverses;for(let r=0,i=e.length;r<i;r++){const i=e[r];t.bones.push(i.uuid);const o=n[r];t.boneInverses.push(o.toArray())}return t}}const Ic=new jr,Dc=new jr,jc=[],zc=new bo;function Nc(t,e,n){bo.call(this,t,e),this.instanceMatrix=new Di(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1}Nc.prototype=Object.assign(Object.create(bo.prototype),{constructor:Nc,isInstancedMesh:!0,copy:function(t){return bo.prototype.copy.call(this,t),this.instanceMatrix.copy(t.instanceMatrix),null!==t.instanceColor&&(this.instanceColor=t.instanceColor.clone()),this.count=t.count,this},getColorAt:function(t,e){e.fromArray(this.instanceColor.array,3*t)},getMatrixAt:function(t,e){e.fromArray(this.instanceMatrix.array,16*t)},raycast:function(t,e){const n=this.matrixWorld,r=this.count;if(zc.geometry=this.geometry,zc.material=this.material,void 0!==zc.material)for(let i=0;i<r;i++){this.getMatrixAt(i,Ic),Dc.multiplyMatrices(n,Ic),zc.matrixWorld=Dc,zc.raycast(t,jc);for(let t=0,n=jc.length;t<n;t++){const n=jc[t];n.instanceId=i,n.object=this,e.push(n)}jc.length=0}},setColorAt:function(t,e){null===this.instanceColor&&(this.instanceColor=new Di(new Float32Array(3*this.count),3)),e.toArray(this.instanceColor.array,3*t)},setMatrixAt:function(t,e){e.toArray(this.instanceMatrix.array,16*t)},updateMorphTargets:function(){},dispose:function(){this.dispatchEvent({type:"dispose"})}});class Fc extends Si{constructor(t){super(),this.type="LineBasicMaterial",this.color=new Ri(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.morphTargets=!1,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this.morphTargets=t.morphTargets,this}}Fc.prototype.isLineBasicMaterial=!0;const Bc=new or,Hc=new or,Gc=new jr,Uc=new Dr,Vc=new Cr;function Wc(t=new no,e=new Fc){si.call(this),this.type="Line",this.geometry=t,this.material=e,this.updateMorphTargets()}Wc.prototype=Object.assign(Object.create(si.prototype),{constructor:Wc,isLine:!0,copy:function(t){return si.prototype.copy.call(this,t),this.material=t.material,this.geometry=t.geometry,this},computeLineDistances:function(){const t=this.geometry;if(t.isBufferGeometry)if(null===t.index){const e=t.attributes.position,n=[0];for(let t=1,r=e.count;t<r;t++)Bc.fromBufferAttribute(e,t-1),Hc.fromBufferAttribute(e,t),n[t]=n[t-1],n[t]+=Bc.distanceTo(Hc);t.setAttribute("lineDistance",new Vi(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else t.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this},raycast:function(t,e){const n=this.geometry,r=this.matrixWorld,i=t.params.Line.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),Vc.copy(n.boundingSphere),Vc.applyMatrix4(r),Vc.radius+=i,!1===t.ray.intersectsSphere(Vc))return;Gc.copy(r).invert(),Uc.copy(t.ray).applyMatrix4(Gc);const a=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=a*a,c=new or,u=new or,l=new or,h=new or,f=this.isLineSegments?2:1;if(n.isBufferGeometry){const r=n.index,i=n.attributes.position;if(null!==r){const n=Math.max(0,o.start),a=Math.min(r.count,o.start+o.count);for(let o=n,d=a-1;o<d;o+=f){const n=r.getX(o),a=r.getX(o+1);if(c.fromBufferAttribute(i,n),u.fromBufferAttribute(i,a),Uc.distanceSqToSegment(c,u,h,l)>s)continue;h.applyMatrix4(this.matrixWorld);const f=t.ray.origin.distanceTo(h);f<t.near||f>t.far||e.push({distance:f,point:l.clone().applyMatrix4(this.matrixWorld),index:o,face:null,faceIndex:null,object:this})}}else for(let n=Math.max(0,r.start),r=Math.min(i.count,r.start+r.count)-1;n<r;n+=f){if(c.fromBufferAttribute(i,n),u.fromBufferAttribute(i,n+1),Uc.distanceSqToSegment(c,u,h,l)>s)continue;h.applyMatrix4(this.matrixWorld);const r=t.ray.origin.distanceTo(h);r<t.near||r>t.far||e.push({distance:r,point:l.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")},updateMorphTargets:function(){const t=this.geometry;if(t.isBufferGeometry){const e=t.morphAttributes,n=Object.keys(e);if(n.length>0){const t=e[n[0]];if(void 0!==t){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,n=t.length;e<n;e++){const n=t[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}}}}else{const e=t.morphTargets;void 0!==e&&e.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}});const Zc=new or,qc=new or;function Yc(t,e){Wc.call(this,t,e),this.type="LineSegments"}Yc.prototype=Object.assign(Object.create(Wc.prototype),{constructor:Yc,isLineSegments:!0,computeLineDistances:function(){const t=this.geometry;if(t.isBufferGeometry)if(null===t.index){const e=t.attributes.position,n=[];for(let t=0,r=e.count;t<r;t+=2)Zc.fromBufferAttribute(e,t),qc.fromBufferAttribute(e,t+1),n[t]=0===t?0:n[t-1],n[t+1]=n[t]+Zc.distanceTo(qc);t.setAttribute("lineDistance",new Vi(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else t.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}});class Jc extends Wc{constructor(t,e){super(t,e),this.type="LineLoop"}}Jc.prototype.isLineLoop=!0;class Xc extends Si{constructor(t){super(),this.type="PointsMaterial",this.color=new Ri(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.morphTargets=t.morphTargets,this}}Xc.prototype.isPointsMaterial=!0;const $c=new jr,Qc=new Dr,Kc=new Cr,tu=new or;function eu(t=new no,e=new Xc){si.call(this),this.type="Points",this.geometry=t,this.material=e,this.updateMorphTargets()}function nu(t,e,n,r,i,o,a){const s=Qc.distanceSqToPoint(t);if(s<n){const n=new or;Qc.closestPointToPoint(t,n),n.applyMatrix4(r);const c=i.ray.origin.distanceTo(n);if(c<i.near||c>i.far)return;o.push({distance:c,distanceToRay:Math.sqrt(s),point:n,index:e,face:null,object:a})}}eu.prototype=Object.assign(Object.create(si.prototype),{constructor:eu,isPoints:!0,copy:function(t){return si.prototype.copy.call(this,t),this.material=t.material,this.geometry=t.geometry,this},raycast:function(t,e){const n=this.geometry,r=this.matrixWorld,i=t.params.Points.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),Kc.copy(n.boundingSphere),Kc.applyMatrix4(r),Kc.radius+=i,!1===t.ray.intersectsSphere(Kc))return;$c.copy(r).invert(),Qc.copy(t.ray).applyMatrix4($c);const a=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=a*a;if(n.isBufferGeometry){const i=n.index,a=n.attributes.position;if(null!==i){const n=Math.max(0,o.start),c=Math.min(i.count,o.start+o.count);for(let o=n,u=c;o<u;o++){const n=i.getX(o);tu.fromBufferAttribute(a,n),nu(tu,n,s,r,t,e,this)}}else{const n=Math.max(0,o.start),i=Math.min(a.count,o.start+o.count);for(let o=n,c=i;o<c;o++)tu.fromBufferAttribute(a,o),nu(tu,o,s,r,t,e,this)}}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")},updateMorphTargets:function(){const t=this.geometry;if(t.isBufferGeometry){const e=t.morphAttributes,n=Object.keys(e);if(n.length>0){const t=e[n[0]];if(void 0!==t){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,n=t.length;e<n;e++){const n=t[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}}}}else{const e=t.morphTargets;void 0!==e&&e.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}});class ru extends Kn{constructor(t,e,n,r,i,o,a,s,c){super(t,e,n,r,i,o,a,s,c),this.format=void 0!==a?a:Wt,this.minFilter=void 0!==o?o:Ct,this.magFilter=void 0!==i?i:Ct,this.generateMipmaps=!1;const u=this;"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback((function e(){u.needsUpdate=!0,t.requestVideoFrameCallback(e)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const t=this.image;!1=="requestVideoFrameCallback"in t&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}ru.prototype.isVideoTexture=!0;class iu extends Kn{constructor(t,e,n,r,i,o,a,s,c,u,l,h){super(null,o,a,s,c,u,r,i,l,h),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}iu.prototype.isCompressedTexture=!0;class ou extends Kn{constructor(t,e,n,r,i,o,a,s,c){super(t,e,n,r,i,o,a,s,c),this.needsUpdate=!0}}ou.prototype.isCanvasTexture=!0;class au extends Kn{constructor(t,e,n,r,i,o,a,s,c,u){if((u=void 0!==u?u:Xt)!==Xt&&u!==$t)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Xt&&(n=Dt),void 0===n&&u===$t&&(n=Ut),super(null,r,i,o,a,s,u,n,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:wt,this.minFilter=void 0!==s?s:wt,this.flipY=!1,this.generateMipmaps=!1}}au.prototype.isDepthTexture=!0;class su extends no{constructor(t=1,e=8,n=0,r=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},e=Math.max(3,e);const i=[],o=[],a=[],s=[],c=new or,u=new Yn;o.push(0,0,0),a.push(0,0,1),s.push(.5,.5);for(let i=0,l=3;i<=e;i++,l+=3){const h=n+i/e*r;c.x=t*Math.cos(h),c.y=t*Math.sin(h),o.push(c.x,c.y,c.z),a.push(0,0,1),u.x=(o[l]/t+1)/2,u.y=(o[l+1]/t+1)/2,s.push(u.x,u.y)}for(let t=1;t<=e;t++)i.push(t,t+1,0);this.setIndex(i),this.setAttribute("position",new Vi(o,3)),this.setAttribute("normal",new Vi(a,3)),this.setAttribute("uv",new Vi(s,2))}}class cu extends no{constructor(t=1,e=1,n=1,r=8,i=1,o=!1,a=0,s=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};const c=this;r=Math.floor(r),i=Math.floor(i);const u=[],l=[],h=[],f=[];let d=0;const p=[],m=n/2;let g=0;function v(n){const i=d,o=new Yn,p=new or;let v=0;const y=!0===n?t:e,_=!0===n?1:-1;for(let t=1;t<=r;t++)l.push(0,m*_,0),h.push(0,_,0),f.push(.5,.5),d++;const x=d;for(let t=0;t<=r;t++){const e=t/r*s+a,n=Math.cos(e),i=Math.sin(e);p.x=y*i,p.y=m*_,p.z=y*n,l.push(p.x,p.y,p.z),h.push(0,_,0),o.x=.5*n+.5,o.y=.5*i*_+.5,f.push(o.x,o.y),d++}for(let t=0;t<r;t++){const e=i+t,r=x+t;!0===n?u.push(r,r+1,e):u.push(r+1,r,e),v+=3}c.addGroup(g,v,!0===n?1:2),g+=v}(function(){const o=new or,v=new or;let y=0;const _=(e-t)/n;for(let c=0;c<=i;c++){const u=[],g=c/i,y=g*(e-t)+t;for(let t=0;t<=r;t++){const e=t/r,i=e*s+a,c=Math.sin(i),p=Math.cos(i);v.x=y*c,v.y=-g*n+m,v.z=y*p,l.push(v.x,v.y,v.z),o.set(c,_,p).normalize(),h.push(o.x,o.y,o.z),f.push(e,1-g),u.push(d++)}p.push(u)}for(let t=0;t<r;t++)for(let e=0;e<i;e++){const n=p[e][t],r=p[e+1][t],i=p[e+1][t+1],o=p[e][t+1];u.push(n,r,o),u.push(r,i,o),y+=6}c.addGroup(g,y,0),g+=y})(),!1===o&&(t>0&&v(!0),e>0&&v(!1)),this.setIndex(u),this.setAttribute("position",new Vi(l,3)),this.setAttribute("normal",new Vi(h,3)),this.setAttribute("uv",new Vi(f,2))}}class uu extends cu{constructor(t=1,e=1,n=8,r=1,i=!1,o=0,a=2*Math.PI){super(0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}}class lu extends no{constructor(t,e,n=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r};const i=[],o=[];function a(t,e,n,r){const i=r+1,o=[];for(let r=0;r<=i;r++){o[r]=[];const a=t.clone().lerp(n,r/i),s=e.clone().lerp(n,r/i),c=i-r;for(let t=0;t<=c;t++)o[r][t]=0===t&&r===i?a:a.clone().lerp(s,t/c)}for(let t=0;t<i;t++)for(let e=0;e<2*(i-t)-1;e++){const n=Math.floor(e/2);e%2==0?(s(o[t][n+1]),s(o[t+1][n]),s(o[t][n])):(s(o[t][n+1]),s(o[t+1][n+1]),s(o[t+1][n]))}}function s(t){i.push(t.x,t.y,t.z)}function c(e,n){const r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function u(t,e,n,r){r<0&&1===t.x&&(o[e]=t.x-1),0===n.x&&0===n.z&&(o[e]=r/2/Math.PI+.5)}function l(t){return Math.atan2(t.z,-t.x)}function h(t){return Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))}(function(t){const n=new or,r=new or,i=new or;for(let o=0;o<e.length;o+=3)c(e[o+0],n),c(e[o+1],r),c(e[o+2],i),a(n,r,i,t)})(r),function(t){const e=new or;for(let n=0;n<i.length;n+=3)e.x=i[n+0],e.y=i[n+1],e.z=i[n+2],e.normalize().multiplyScalar(t),i[n+0]=e.x,i[n+1]=e.y,i[n+2]=e.z}(n),function(){const t=new or;for(let e=0;e<i.length;e+=3){t.x=i[e+0],t.y=i[e+1],t.z=i[e+2];const n=l(t)/2/Math.PI+.5,r=h(t)/Math.PI+.5;o.push(n,1-r)}(function(){const t=new or,e=new or,n=new or,r=new or,a=new Yn,s=new Yn,c=new Yn;for(let h=0,f=0;h<i.length;h+=9,f+=6){t.set(i[h+0],i[h+1],i[h+2]),e.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),a.set(o[f+0],o[f+1]),s.set(o[f+2],o[f+3]),c.set(o[f+4],o[f+5]),r.copy(t).add(e).add(n).divideScalar(3);const d=l(r);u(a,f+0,t,d),u(s,f+2,e,d),u(c,f+4,n,d)}})(),function(){for(let t=0;t<o.length;t+=6){const e=o[t+0],n=o[t+2],r=o[t+4],i=Math.max(e,n,r),a=Math.min(e,n,r);i>.9&&a<.1&&(e<.2&&(o[t+0]+=1),n<.2&&(o[t+2]+=1),r<.2&&(o[t+4]+=1))}}()}(),this.setAttribute("position",new Vi(i,3)),this.setAttribute("normal",new Vi(i.slice(),3)),this.setAttribute("uv",new Vi(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}}class hu extends lu{constructor(t=1,e=0){const n=(1+Math.sqrt(5))/2,r=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],t,e),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e}}}const fu=new or,du=new or,pu=new or,mu=new wi;class gu extends no{constructor(t,e){if(super(),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1,!0===t.isGeometry)return void console.error("THREE.EdgesGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");const n=Math.pow(10,4),r=Math.cos(qn.DEG2RAD*e),i=t.getIndex(),o=t.getAttribute("position"),a=i?i.count:o.count,s=[0,0,0],c=["a","b","c"],u=new Array(3),l={},h=[];for(let t=0;t<a;t+=3){i?(s[0]=i.getX(t),s[1]=i.getX(t+1),s[2]=i.getX(t+2)):(s[0]=t,s[1]=t+1,s[2]=t+2);const{a:e,b:a,c:f}=mu;if(e.fromBufferAttribute(o,s[0]),a.fromBufferAttribute(o,s[1]),f.fromBufferAttribute(o,s[2]),mu.getNormal(pu),u[0]=`${Math.round(e.x*n)},${Math.round(e.y*n)},${Math.round(e.z*n)}`,u[1]=`${Math.round(a.x*n)},${Math.round(a.y*n)},${Math.round(a.z*n)}`,u[2]=`${Math.round(f.x*n)},${Math.round(f.y*n)},${Math.round(f.z*n)}`,u[0]!==u[1]&&u[1]!==u[2]&&u[2]!==u[0])for(let t=0;t<3;t++){const e=(t+1)%3,n=u[t],i=u[e],o=mu[c[t]],a=mu[c[e]],f=`${n}_${i}`,d=`${i}_${n}`;d in l&&l[d]?(pu.dot(l[d].normal)<=r&&(h.push(o.x,o.y,o.z),h.push(a.x,a.y,a.z)),l[d]=null):f in l||(l[f]={index0:s[t],index1:s[e],normal:pu.clone()})}}for(const t in l)if(l[t]){const{index0:e,index1:n}=l[t];fu.fromBufferAttribute(o,e),du.fromBufferAttribute(o,n),h.push(fu.x,fu.y,fu.z),h.push(du.x,du.y,du.z)}this.setAttribute("position",new Vi(h,3))}}const vu=function(t,e,n){n=n||2;const r=e&&e.length,i=r?e[0]*n:t.length;let o=yu(t,0,i,n,!0);const a=[];if(!o||o.next===o.prev)return a;let s,c,u,l,h,f,d;if(r&&(o=function(t,e,n,r){const i=[];let o,a,s,c,u;for(o=0,a=e.length;o<a;o++)s=e[o]*r,c=o<a-1?e[o+1]*r:t.length,u=yu(t,s,c,r,!1),u===u.next&&(u.steiner=!0),i.push(Pu(u));for(i.sort(Tu),o=0;o<i.length;o++)Eu(i[o],n),n=_u(n,n.next);return n}(t,e,o,n)),t.length>80*n){s=u=t[0],c=l=t[1];for(let e=n;e<i;e+=n)h=t[e],f=t[e+1],h<s&&(s=h),f<c&&(c=f),h>u&&(u=h),f>l&&(l=f);d=Math.max(u-s,l-c),d=0!==d?1/d:0}return xu(o,a,n,s,c,d),a};function yu(t,e,n,r,i){let o,a;if(i===function(t,e,n,r){let i=0;for(let o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}(t,e,n,r)>0)for(o=e;o<n;o+=r)a=Fu(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=Fu(o,t[o],t[o+1],a);return a&&ku(a,a.next)&&(Bu(a),a=a.next),a}function _u(t,e){if(!t)return t;e||(e=t);let n,r=t;do{if(n=!1,r.steiner||!ku(r,r.next)&&0!==Ou(r.prev,r,r.next))r=r.next;else{if(Bu(r),r=e=r.prev,r===r.next)break;n=!0}}while(n||r!==e);return e}function xu(t,e,n,r,i,o,a){if(!t)return;!a&&o&&function(t,e,n,r){let i=t;do{null===i.z&&(i.z=Au(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){let e,n,r,i,o,a,s,c,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<u&&(s++,r=r.nextZ,r);e++);for(c=u;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(t,r,i,o);let s,c,u=t;for(;t.prev!==t.next;)if(s=t.prev,c=t.next,o?wu(t,r,i,o):bu(t))e.push(s.i/n),e.push(t.i/n),e.push(c.i/n),Bu(t),t=c.next,u=c.next;else if((t=c)===u){a?1===a?xu(t=Mu(_u(t),e,n),e,n,r,i,o,2):2===a&&Su(t,e,n,r,i,o):xu(_u(t),e,n,r,i,o,1);break}}function bu(t){const e=t.prev,n=t,r=t.next;if(Ou(e,n,r)>=0)return!1;let i=t.next.next;for(;i!==t.prev;){if(Lu(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Ou(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function wu(t,e,n,r){const i=t.prev,o=t,a=t.next;if(Ou(i,o,a)>=0)return!1;const s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=Au(s,c,e,n,r),f=Au(u,l,e,n,r);let d=t.prevZ,p=t.nextZ;for(;d&&d.z>=h&&p&&p.z<=f;){if(d!==t.prev&&d!==t.next&&Lu(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ou(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,p!==t.prev&&p!==t.next&&Lu(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Ou(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&Lu(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ou(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;p&&p.z<=f;){if(p!==t.prev&&p!==t.next&&Lu(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Ou(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function Mu(t,e,n){let r=t;do{const i=r.prev,o=r.next.next;!ku(i,o)&&Iu(i,r,r.next,o)&&zu(i,o)&&zu(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Bu(r),Bu(r.next),r=t=o),r=r.next}while(r!==t);return _u(r)}function Su(t,e,n,r,i,o){let a=t;do{let t=a.next.next;for(;t!==a.prev;){if(a.i!==t.i&&Ru(a,t)){let s=Nu(a,t);return a=_u(a,a.next),s=_u(s,s.next),xu(a,e,n,r,i,o),void xu(s,e,n,r,i,o)}t=t.next}a=a.next}while(a!==t)}function Tu(t,e){return t.x-e.x}function Eu(t,e){if(e=function(t,e){let n=e;const r=t.x,i=t.y;let o,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const t=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(t<=r&&t>a){if(a=t,t===r){if(i===n.y)return n;if(i===n.next.y)return n.next}o=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!o)return null;if(r===a)return o;const s=o,c=o.x,u=o.y;let l,h=1/0;n=o;do{r>=n.x&&n.x>=c&&r!==n.x&&Lu(i<u?r:a,i,c,u,i<u?a:r,i,n.x,n.y)&&(l=Math.abs(i-n.y)/(r-n.x),zu(n,t)&&(l<h||l===h&&(n.x>o.x||n.x===o.x&&Cu(o,n)))&&(o=n,h=l)),n=n.next}while(n!==s);return o}(t,e)){const n=Nu(e,t);_u(e,e.next),_u(n,n.next)}}function Cu(t,e){return Ou(t.prev,t,e.prev)<0&&Ou(e.next,t,t.next)<0}function Au(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Pu(t){let e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function Lu(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Ru(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&Iu(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(zu(t,e)&&zu(e,t)&&function(t,e){let n=t,r=!1;const i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(Ou(t.prev,t,e.prev)||Ou(t,e.prev,e))||ku(t,e)&&Ou(t.prev,t,t.next)>0&&Ou(e.prev,e,e.next)>0)}function Ou(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function ku(t,e){return t.x===e.x&&t.y===e.y}function Iu(t,e,n,r){const i=ju(Ou(t,e,n)),o=ju(Ou(t,e,r)),a=ju(Ou(n,r,t)),s=ju(Ou(n,r,e));return i!==o&&a!==s||!(0!==i||!Du(t,n,e))||!(0!==o||!Du(t,r,e))||!(0!==a||!Du(n,t,r))||!(0!==s||!Du(n,e,r))}function Du(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function ju(t){return t>0?1:t<0?-1:0}function zu(t,e){return Ou(t.prev,t,t.next)<0?Ou(t,e,t.next)>=0&&Ou(t,t.prev,e)>=0:Ou(t,e,t.prev)<0||Ou(t,t.next,e)<0}function Nu(t,e){const n=new Hu(t.i,t.x,t.y),r=new Hu(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function Fu(t,e,n,r){const i=new Hu(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Bu(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 Hu(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}const Gu={area:function(t){const e=t.length;let n=0;for(let r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},isClockWise:function(t){return Gu.area(t)<0},triangulateShape:function(t,e){const n=[],r=[],i=[];Uu(t),Vu(n,t);let o=t.length;e.forEach(Uu);for(let t=0;t<e.length;t++)r.push(o),o+=e[t].length,Vu(n,e[t]);const a=vu(n,r);for(let t=0;t<a.length;t+=3)i.push(a.slice(t,t+3));return i}};function Uu(t){const e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Vu(t,e){for(let n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}class Wu extends no{constructor(t,e){super(),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];const n=this,r=[],i=[];for(let e=0,n=t.length;e<n;e++)o(t[e]);function o(t){const o=[],a=void 0!==e.curveSegments?e.curveSegments:12,s=void 0!==e.steps?e.steps:1;let c=void 0!==e.depth?e.depth:100,u=void 0===e.bevelEnabled||e.bevelEnabled,l=void 0!==e.bevelThickness?e.bevelThickness:6,h=void 0!==e.bevelSize?e.bevelSize:l-2,f=void 0!==e.bevelOffset?e.bevelOffset:0,d=void 0!==e.bevelSegments?e.bevelSegments:3;const p=e.extrudePath,m=void 0!==e.UVGenerator?e.UVGenerator:Zu;void 0!==e.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),c=e.amount);let g,v,y,_,x,b=!1;p&&(g=p.getSpacedPoints(s),b=!0,u=!1,v=p.computeFrenetFrames(s,!1),y=new or,_=new or,x=new or),u||(d=0,l=0,h=0,f=0);const w=t.extractPoints(a);let M=w.shape;const S=w.holes;if(!Gu.isClockWise(M)){M=M.reverse();for(let t=0,e=S.length;t<e;t++){const e=S[t];Gu.isClockWise(e)&&(S[t]=e.reverse())}}const T=Gu.triangulateShape(M,S),E=M;for(let t=0,e=S.length;t<e;t++){const e=S[t];M=M.concat(e)}function C(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}const A=M.length,P=T.length;function L(t,e,n){let r,i,o;const a=t.x-e.x,s=t.y-e.y,c=n.x-t.x,u=n.y-t.y,l=a*a+s*s,h=a*u-s*c;if(Math.abs(h)>Number.EPSILON){const h=Math.sqrt(l),f=Math.sqrt(c*c+u*u),d=e.x-s/h,p=e.y+a/h,m=((n.x-u/f-d)*u-(n.y+c/f-p)*c)/(a*u-s*c);r=d+a*m-t.x,i=p+s*m-t.y;const g=r*r+i*i;if(g<=2)return new Yn(r,i);o=Math.sqrt(g/2)}else{let t=!1;a>Number.EPSILON?c>Number.EPSILON&&(t=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(t=!0):Math.sign(s)===Math.sign(u)&&(t=!0),t?(r=-s,i=a,o=Math.sqrt(l)):(r=a,i=s,o=Math.sqrt(l/2))}return new Yn(r/o,i/o)}const R=[];for(let t=0,e=E.length,n=e-1,r=t+1;t<e;t++,n++,r++)n===e&&(n=0),r===e&&(r=0),R[t]=L(E[t],E[n],E[r]);const O=[];let k,I=R.concat();for(let t=0,e=S.length;t<e;t++){const e=S[t];k=[];for(let t=0,n=e.length,r=n-1,i=t+1;t<n;t++,r++,i++)r===n&&(r=0),i===n&&(i=0),k[t]=L(e[t],e[r],e[i]);O.push(k),I=I.concat(k)}for(let t=0;t<d;t++){const e=t/d,n=l*Math.cos(e*Math.PI/2),r=h*Math.sin(e*Math.PI/2)+f;for(let t=0,e=E.length;t<e;t++){const e=C(E[t],R[t],r);z(e.x,e.y,-n)}for(let t=0,e=S.length;t<e;t++){const e=S[t];k=O[t];for(let t=0,i=e.length;t<i;t++){const i=C(e[t],k[t],r);z(i.x,i.y,-n)}}}const D=h+f;for(let t=0;t<A;t++){const e=u?C(M[t],I[t],D):M[t];b?(_.copy(v.normals[0]).multiplyScalar(e.x),y.copy(v.binormals[0]).multiplyScalar(e.y),x.copy(g[0]).add(_).add(y),z(x.x,x.y,x.z)):z(e.x,e.y,0)}for(let t=1;t<=s;t++)for(let e=0;e<A;e++){const n=u?C(M[e],I[e],D):M[e];b?(_.copy(v.normals[t]).multiplyScalar(n.x),y.copy(v.binormals[t]).multiplyScalar(n.y),x.copy(g[t]).add(_).add(y),z(x.x,x.y,x.z)):z(n.x,n.y,c/s*t)}for(let t=d-1;t>=0;t--){const e=t/d,n=l*Math.cos(e*Math.PI/2),r=h*Math.sin(e*Math.PI/2)+f;for(let t=0,e=E.length;t<e;t++){const e=C(E[t],R[t],r);z(e.x,e.y,c+n)}for(let t=0,e=S.length;t<e;t++){const e=S[t];k=O[t];for(let t=0,i=e.length;t<i;t++){const i=C(e[t],k[t],r);b?z(i.x,i.y+g[s-1].y,g[s-1].x+n):z(i.x,i.y,c+n)}}}function j(t,e){let n=t.length;for(;--n>=0;){const r=n;let i=n-1;i<0&&(i=t.length-1);for(let t=0,n=s+2*d;t<n;t++){const n=A*t,o=A*(t+1);F(e+r+n,e+i+n,e+i+o,e+r+o)}}}function z(t,e,n){o.push(t),o.push(e),o.push(n)}function N(t,e,i){B(t),B(e),B(i);const o=r.length/3,a=m.generateTopUV(n,r,o-3,o-2,o-1);H(a[0]),H(a[1]),H(a[2])}function F(t,e,i,o){B(t),B(e),B(o),B(e),B(i),B(o);const a=r.length/3,s=m.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);H(s[0]),H(s[1]),H(s[3]),H(s[1]),H(s[2]),H(s[3])}function B(t){r.push(o[3*t+0]),r.push(o[3*t+1]),r.push(o[3*t+2])}function H(t){i.push(t.x),i.push(t.y)}(function(){const t=r.length/3;if(u){let t=0,e=A*t;for(let t=0;t<P;t++){const n=T[t];N(n[2]+e,n[1]+e,n[0]+e)}t=s+2*d,e=A*t;for(let t=0;t<P;t++){const n=T[t];N(n[0]+e,n[1]+e,n[2]+e)}}else{for(let t=0;t<P;t++){const e=T[t];N(e[2],e[1],e[0])}for(let t=0;t<P;t++){const e=T[t];N(e[0]+A*s,e[1]+A*s,e[2]+A*s)}}n.addGroup(t,r.length/3-t,0)})(),function(){const t=r.length/3;let e=0;j(E,e),e+=E.length;for(let t=0,n=S.length;t<n;t++){const n=S[t];j(n,e),e+=n.length}n.addGroup(t,r.length/3-t,1)}()}this.setAttribute("position",new Vi(r,3)),this.setAttribute("uv",new Vi(i,2)),this.computeVertexNormals()}toJSON(){const t=no.prototype.toJSON.call(this);return function(t,e,n){if(n.shapes=[],Array.isArray(t))for(let e=0,r=t.length;e<r;e++){const r=t[e];n.shapes.push(r.uuid)}else n.shapes.push(t.uuid);return void 0!==e.extrudePath&&(n.options.extrudePath=e.extrudePath.toJSON()),n}(this.parameters.shapes,this.parameters.options,t)}}const Zu={generateTopUV:function(t,e,n,r,i){const o=e[3*n],a=e[3*n+1],s=e[3*r],c=e[3*r+1],u=e[3*i],l=e[3*i+1];return[new Yn(o,a),new Yn(s,c),new Yn(u,l)]},generateSideWallUV:function(t,e,n,r,i,o){const a=e[3*n],s=e[3*n+1],c=e[3*n+2],u=e[3*r],l=e[3*r+1],h=e[3*r+2],f=e[3*i],d=e[3*i+1],p=e[3*i+2],m=e[3*o],g=e[3*o+1],v=e[3*o+2];return Math.abs(s-l)<.01?[new Yn(a,1-c),new Yn(u,1-h),new Yn(f,1-p),new Yn(m,1-v)]:[new Yn(s,1-c),new Yn(l,1-h),new Yn(d,1-p),new Yn(g,1-v)]}};class qu extends lu{constructor(t=1,e=0){const n=(1+Math.sqrt(5))/2;super([-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],t,e),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e}}}class Yu extends no{constructor(t,e=12,n=0,r=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e),r=qn.clamp(r,0,2*Math.PI);const i=[],o=[],a=[],s=1/e,c=new or,u=new Yn;for(let i=0;i<=e;i++){const l=n+i*s*r,h=Math.sin(l),f=Math.cos(l);for(let n=0;n<=t.length-1;n++)c.x=t[n].x*h,c.y=t[n].y,c.z=t[n].x*f,o.push(c.x,c.y,c.z),u.x=i/e,u.y=n/(t.length-1),a.push(u.x,u.y)}for(let n=0;n<e;n++)for(let e=0;e<t.length-1;e++){const r=e+n*t.length,o=r,a=r+t.length,s=r+t.length+1,c=r+1;i.push(o,a,c),i.push(a,s,c)}if(this.setIndex(i),this.setAttribute("position",new Vi(o,3)),this.setAttribute("uv",new Vi(a,2)),this.computeVertexNormals(),r===2*Math.PI){const n=this.attributes.normal.array,r=new or,i=new or,o=new or,a=e*t.length*3;for(let e=0,s=0;e<t.length;e++,s+=3)r.x=n[s+0],r.y=n[s+1],r.z=n[s+2],i.x=n[a+s+0],i.y=n[a+s+1],i.z=n[a+s+2],o.addVectors(r,i).normalize(),n[s+0]=n[a+s+0]=o.x,n[s+1]=n[a+s+1]=o.y,n[s+2]=n[a+s+2]=o.z}}}class Ju extends lu{constructor(t=1,e=0){super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],t,e),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e}}}function Xu(t,e,n){no.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n};const r=[],i=[],o=[],a=[],s=1e-5,c=new or,u=new or,l=new or,h=new or,f=new or;t.length<3&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");const d=e+1;for(let r=0;r<=n;r++){const d=r/n;for(let n=0;n<=e;n++){const r=n/e;t(r,d,u),i.push(u.x,u.y,u.z),r-s>=0?(t(r-s,d,l),h.subVectors(u,l)):(t(r+s,d,l),h.subVectors(l,u)),d-s>=0?(t(r,d-s,l),f.subVectors(u,l)):(t(r,d+s,l),f.subVectors(l,u)),c.crossVectors(h,f).normalize(),o.push(c.x,c.y,c.z),a.push(r,d)}}for(let t=0;t<n;t++)for(let n=0;n<e;n++){const e=t*d+n,i=t*d+n+1,o=(t+1)*d+n+1,a=(t+1)*d+n;r.push(e,i,a),r.push(i,o,a)}this.setIndex(r),this.setAttribute("position",new Vi(i,3)),this.setAttribute("normal",new Vi(o,3)),this.setAttribute("uv",new Vi(a,2))}Xu.prototype=Object.create(no.prototype),Xu.prototype.constructor=Xu;class $u extends no{constructor(t=.5,e=1,n=8,r=1,i=0,o=2*Math.PI){super(),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},n=Math.max(3,n);const a=[],s=[],c=[],u=[];let l=t;const h=(e-t)/(r=Math.max(1,r)),f=new or,d=new Yn;for(let t=0;t<=r;t++){for(let t=0;t<=n;t++){const r=i+t/n*o;f.x=l*Math.cos(r),f.y=l*Math.sin(r),s.push(f.x,f.y,f.z),c.push(0,0,1),d.x=(f.x/e+1)/2,d.y=(f.y/e+1)/2,u.push(d.x,d.y)}l+=h}for(let t=0;t<r;t++){const e=t*(n+1);for(let t=0;t<n;t++){const r=t+e,i=r,o=r+n+1,s=r+n+2,c=r+1;a.push(i,o,c),a.push(o,s,c)}}this.setIndex(a),this.setAttribute("position",new Vi(s,3)),this.setAttribute("normal",new Vi(c,3)),this.setAttribute("uv",new Vi(u,2))}}class Qu extends no{constructor(t,e=12){super(),this.type="ShapeGeometry",this.parameters={shapes:t,curveSegments:e};const n=[],r=[],i=[],o=[];let a=0,s=0;if(!1===Array.isArray(t))c(t);else for(let e=0;e<t.length;e++)c(t[e]),this.addGroup(a,s,e),a+=s,s=0;function c(t){const a=r.length/3,c=t.extractPoints(e);let u=c.shape;const l=c.holes;!1===Gu.isClockWise(u)&&(u=u.reverse());for(let t=0,e=l.length;t<e;t++){const e=l[t];!0===Gu.isClockWise(e)&&(l[t]=e.reverse())}const h=Gu.triangulateShape(u,l);for(let t=0,e=l.length;t<e;t++){const e=l[t];u=u.concat(e)}for(let t=0,e=u.length;t<e;t++){const e=u[t];r.push(e.x,e.y,0),i.push(0,0,1),o.push(e.x,e.y)}for(let t=0,e=h.length;t<e;t++){const e=h[t],r=e[0]+a,i=e[1]+a,o=e[2]+a;n.push(r,i,o),s+=3}}this.setIndex(n),this.setAttribute("position",new Vi(r,3)),this.setAttribute("normal",new Vi(i,3)),this.setAttribute("uv",new Vi(o,2))}toJSON(){const t=no.prototype.toJSON.call(this);return function(t,e){if(e.shapes=[],Array.isArray(t))for(let n=0,r=t.length;n<r;n++){const r=t[n];e.shapes.push(r.uuid)}else e.shapes.push(t.uuid);return e}(this.parameters.shapes,t)}}class Ku extends no{constructor(t=1,e=8,n=6,r=0,i=2*Math.PI,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},e=Math.max(3,Math.floor(e)),n=Math.max(2,Math.floor(n));const s=Math.min(o+a,Math.PI);let c=0;const u=[],l=new or,h=new or,f=[],d=[],p=[],m=[];for(let f=0;f<=n;f++){const g=[],v=f/n;let y=0;0==f&&0==o?y=.5/e:f==n&&s==Math.PI&&(y=-.5/e);for(let n=0;n<=e;n++){const s=n/e;l.x=-t*Math.cos(r+s*i)*Math.sin(o+v*a),l.y=t*Math.cos(o+v*a),l.z=t*Math.sin(r+s*i)*Math.sin(o+v*a),d.push(l.x,l.y,l.z),h.copy(l).normalize(),p.push(h.x,h.y,h.z),m.push(s+y,1-v),g.push(c++)}u.push(g)}for(let t=0;t<n;t++)for(let r=0;r<e;r++){const e=u[t][r+1],i=u[t][r],a=u[t+1][r],c=u[t+1][r+1];(0!==t||o>0)&&f.push(e,i,c),(t!==n-1||s<Math.PI)&&f.push(i,a,c)}this.setIndex(f),this.setAttribute("position",new Vi(d,3)),this.setAttribute("normal",new Vi(p,3)),this.setAttribute("uv",new Vi(m,2))}}class tl extends lu{constructor(t=1,e=0){super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],t,e),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e}}}class el extends Wu{constructor(t,e={}){const n=e.font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new no;const r=n.generateShapes(t,e.size);e.depth=void 0!==e.height?e.height:50,void 0===e.bevelThickness&&(e.bevelThickness=10),void 0===e.bevelSize&&(e.bevelSize=8),void 0===e.bevelEnabled&&(e.bevelEnabled=!1),super(r,e),this.type="TextGeometry"}}class nl extends no{constructor(t=1,e=.4,n=8,r=6,i=2*Math.PI){super(),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},n=Math.floor(n),r=Math.floor(r);const o=[],a=[],s=[],c=[],u=new or,l=new or,h=new or;for(let o=0;o<=n;o++)for(let f=0;f<=r;f++){const d=f/r*i,p=o/n*Math.PI*2;l.x=(t+e*Math.cos(p))*Math.cos(d),l.y=(t+e*Math.cos(p))*Math.sin(d),l.z=e*Math.sin(p),a.push(l.x,l.y,l.z),u.x=t*Math.cos(d),u.y=t*Math.sin(d),h.subVectors(l,u).normalize(),s.push(h.x,h.y,h.z),c.push(f/r),c.push(o/n)}for(let t=1;t<=n;t++)for(let e=1;e<=r;e++){const n=(r+1)*t+e-1,i=(r+1)*(t-1)+e-1,a=(r+1)*(t-1)+e,s=(r+1)*t+e;o.push(n,i,s),o.push(i,a,s)}this.setIndex(o),this.setAttribute("position",new Vi(a,3)),this.setAttribute("normal",new Vi(s,3)),this.setAttribute("uv",new Vi(c,2))}}class rl extends no{constructor(t=1,e=.4,n=64,r=8,i=2,o=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},n=Math.floor(n),r=Math.floor(r);const a=[],s=[],c=[],u=[],l=new or,h=new or,f=new or,d=new or,p=new or,m=new or,g=new or;for(let a=0;a<=n;++a){const y=a/n*i*Math.PI*2;v(y,i,o,t,f),v(y+.01,i,o,t,d),m.subVectors(d,f),g.addVectors(d,f),p.crossVectors(m,g),g.crossVectors(p,m),p.normalize(),g.normalize();for(let t=0;t<=r;++t){const i=t/r*Math.PI*2,o=-e*Math.cos(i),d=e*Math.sin(i);l.x=f.x+(o*g.x+d*p.x),l.y=f.y+(o*g.y+d*p.y),l.z=f.z+(o*g.z+d*p.z),s.push(l.x,l.y,l.z),h.subVectors(l,f).normalize(),c.push(h.x,h.y,h.z),u.push(a/n),u.push(t/r)}}for(let t=1;t<=n;t++)for(let e=1;e<=r;e++){const n=(r+1)*(t-1)+(e-1),i=(r+1)*t+(e-1),o=(r+1)*t+e,s=(r+1)*(t-1)+e;a.push(n,i,s),a.push(i,o,s)}function v(t,e,n,r,i){const o=Math.cos(t),a=Math.sin(t),s=n/e*t,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(a),this.setAttribute("position",new Vi(s,3)),this.setAttribute("normal",new Vi(c,3)),this.setAttribute("uv",new Vi(u,2))}}class il extends no{constructor(t,e=64,n=1,r=8,i=!1){super(),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i};const o=t.computeFrenetFrames(e,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const a=new or,s=new or,c=new Yn;let u=new or;const l=[],h=[],f=[],d=[];function p(i){u=t.getPointAt(i/e,u);const c=o.normals[i],f=o.binormals[i];for(let t=0;t<=r;t++){const e=t/r*Math.PI*2,i=Math.sin(e),o=-Math.cos(e);s.x=o*c.x+i*f.x,s.y=o*c.y+i*f.y,s.z=o*c.z+i*f.z,s.normalize(),h.push(s.x,s.y,s.z),a.x=u.x+n*s.x,a.y=u.y+n*s.y,a.z=u.z+n*s.z,l.push(a.x,a.y,a.z)}}(function(){for(let t=0;t<e;t++)p(t);p(!1===i?e:0),function(){for(let t=0;t<=e;t++)for(let n=0;n<=r;n++)c.x=t/e,c.y=n/r,f.push(c.x,c.y)}(),function(){for(let t=1;t<=e;t++)for(let e=1;e<=r;e++){const n=(r+1)*(t-1)+(e-1),i=(r+1)*t+(e-1),o=(r+1)*t+e,a=(r+1)*(t-1)+e;d.push(n,i,a),d.push(i,o,a)}}()})(),this.setIndex(d),this.setAttribute("position",new Vi(l,3)),this.setAttribute("normal",new Vi(h,3)),this.setAttribute("uv",new Vi(f,2))}toJSON(){const t=no.prototype.toJSON.call(this);return t.path=this.parameters.path.toJSON(),t}}class ol extends no{constructor(t){if(super(),this.type="WireframeGeometry",!0===t.isGeometry)return void console.error("THREE.WireframeGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");const e=[],n=[0,0],r={},i=new or;if(null!==t.index){const o=t.attributes.position,a=t.index;let s=t.groups;0===s.length&&(s=[{start:0,count:a.count,materialIndex:0}]);for(let t=0,e=s.length;t<e;++t){const e=s[t],i=e.start;for(let t=i,o=i+e.count;t<o;t+=3)for(let e=0;e<3;e++){const i=a.getX(t+e),o=a.getX(t+(e+1)%3);n[0]=Math.min(i,o),n[1]=Math.max(i,o);const s=n[0]+","+n[1];void 0===r[s]&&(r[s]={index1:n[0],index2:n[1]})}}for(const t in r){const n=r[t];i.fromBufferAttribute(o,n.index1),e.push(i.x,i.y,i.z),i.fromBufferAttribute(o,n.index2),e.push(i.x,i.y,i.z)}}else{const n=t.attributes.position;for(let t=0,r=n.count/3;t<r;t++)for(let r=0;r<3;r++){const o=3*t+r;i.fromBufferAttribute(n,o),e.push(i.x,i.y,i.z);const a=3*t+(r+1)%3;i.fromBufferAttribute(n,a),e.push(i.x,i.y,i.z)}}this.setAttribute("position",new Vi(e,3))}}var al=Object.freeze({__proto__:null,BoxGeometry:Mo,BoxBufferGeometry:Mo,CircleGeometry:su,CircleBufferGeometry:su,ConeGeometry:uu,ConeBufferGeometry:uu,CylinderGeometry:cu,CylinderBufferGeometry:cu,DodecahedronGeometry:hu,DodecahedronBufferGeometry:hu,EdgesGeometry:gu,ExtrudeGeometry:Wu,ExtrudeBufferGeometry:Wu,IcosahedronGeometry:qu,IcosahedronBufferGeometry:qu,LatheGeometry:Yu,LatheBufferGeometry:Yu,OctahedronGeometry:Ju,OctahedronBufferGeometry:Ju,ParametricGeometry:Xu,ParametricBufferGeometry:Xu,PlaneGeometry:Fo,PlaneBufferGeometry:Fo,PolyhedronGeometry:lu,PolyhedronBufferGeometry:lu,RingGeometry:$u,RingBufferGeometry:$u,ShapeGeometry:Qu,ShapeBufferGeometry:Qu,SphereGeometry:Ku,SphereBufferGeometry:Ku,TetrahedronGeometry:tl,TetrahedronBufferGeometry:tl,TextGeometry:el,TextBufferGeometry:el,TorusGeometry:nl,TorusBufferGeometry:nl,TorusKnotGeometry:rl,TorusKnotBufferGeometry:rl,TubeGeometry:il,TubeBufferGeometry:il,WireframeGeometry:ol});class sl extends Si{constructor(t){super(),this.type="ShadowMaterial",this.color=new Ri(0),this.transparent=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this}}sl.prototype.isShadowMaterial=!0;class cl extends Co{constructor(t){super(t),this.type="RawShaderMaterial"}}function ul(t){Si.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Ri(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ri(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mn,this.normalScale=new Yn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.vertexTangents=!1,this.setValues(t)}function ll(t){ul.call(this),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoat=0,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Yn(1,1),this.clearcoatNormalMap=null,this.reflectivity=.5,Object.defineProperty(this,"ior",{get:function(){return(1+.4*this.reflectivity)/(1-.4*this.reflectivity)},set:function(t){this.reflectivity=qn.clamp(2.5*(t-1)/(t+1),0,1)}}),this.sheen=null,this.transmission=0,this.transmissionMap=null,this.setValues(t)}cl.prototype.isRawShaderMaterial=!0,ul.prototype=Object.create(Si.prototype),ul.prototype.constructor=ul,ul.prototype.isMeshStandardMaterial=!0,ul.prototype.copy=function(t){return Si.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.flatShading=t.flatShading,this.vertexTangents=t.vertexTangents,this},ll.prototype=Object.create(ul.prototype),ll.prototype.constructor=ll,ll.prototype.isMeshPhysicalMaterial=!0,ll.prototype.copy=function(t){return ul.prototype.copy.call(this,t),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.reflectivity=t.reflectivity,t.sheen?this.sheen=(this.sheen||new Ri).copy(t.sheen):this.sheen=null,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this};class hl extends Si{constructor(t){super(),this.type="MeshPhongMaterial",this.color=new Ri(16777215),this.specular=new Ri(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ri(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mn,this.normalScale=new Yn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=rt,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.flatShading=t.flatShading,this}}hl.prototype.isMeshPhongMaterial=!0;class fl extends Si{constructor(t){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Ri(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ri(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mn,this.normalScale=new Yn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this}}fl.prototype.isMeshToonMaterial=!0;class dl extends Si{constructor(t){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mn,this.normalScale=new Yn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.flatShading=t.flatShading,this}}dl.prototype.isMeshNormalMaterial=!0;class pl extends Si{constructor(t){super(),this.type="MeshLambertMaterial",this.color=new Ri(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ri(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=rt,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this}}pl.prototype.isMeshLambertMaterial=!0;class ml extends Si{constructor(t){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Ri(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mn,this.normalScale=new Yn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.flatShading=t.flatShading,this}}ml.prototype.isMeshMatcapMaterial=!0;class gl extends Fc{constructor(t){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}}gl.prototype.isLineDashedMaterial=!0;var vl=Object.freeze({__proto__:null,ShadowMaterial:sl,SpriteMaterial:oc,RawShaderMaterial:cl,ShaderMaterial:Co,PointsMaterial:Xc,MeshPhysicalMaterial:ll,MeshStandardMaterial:ul,MeshPhongMaterial:hl,MeshToonMaterial:fl,MeshNormalMaterial:dl,MeshLambertMaterial:pl,MeshDepthMaterial:Bs,MeshDistanceMaterial:Hs,MeshBasicMaterial:Oi,MeshMatcapMaterial:ml,LineDashedMaterial:gl,LineBasicMaterial:Fc,Material:Si});const yl={arraySlice:function(t,e,n){return yl.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){const e=t.length,n=new Array(e);for(let t=0;t!==e;++t)n[t]=t;return n.sort((function(e,n){return t[e]-t[n]})),n},sortedArray:function(t,e,n){const r=t.length,i=new t.constructor(r);for(let o=0,a=0;a!==r;++o){const r=n[o]*e;for(let n=0;n!==e;++n)i[a++]=t[r+n]}return i},flattenJSON:function(t,e,n,r){let i=1,o=t[0];for(;void 0!==o&&void 0===o[r];)o=t[i++];if(void 0===o)return;let a=o[r];if(void 0!==a)if(Array.isArray(a))do{a=o[r],void 0!==a&&(e.push(o.time),n.push.apply(n,a)),o=t[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{a=o[r],void 0!==a&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++]}while(void 0!==o);else do{a=o[r],void 0!==a&&(e.push(o.time),n.push(a)),o=t[i++]}while(void 0!==o)},subclip:function(t,e,n,r,i=30){const o=t.clone();o.name=e;const a=[];for(let t=0;t<o.tracks.length;++t){const e=o.tracks[t],s=e.getValueSize(),c=[],u=[];for(let t=0;t<e.times.length;++t){const o=e.times[t]*i;if(!(o<n||o>=r)){c.push(e.times[t]);for(let n=0;n<s;++n)u.push(e.values[t*s+n])}}0!==c.length&&(e.times=yl.convertArray(c,e.times.constructor),e.values=yl.convertArray(u,e.values.constructor),a.push(e))}o.tracks=a;let s=1/0;for(let t=0;t<o.tracks.length;++t)s>o.tracks[t].times[0]&&(s=o.tracks[t].times[0]);for(let t=0;t<o.tracks.length;++t)o.tracks[t].shift(-1*s);return o.resetDuration(),o},makeClipAdditive:function(t,e=0,n=t,r=30){r<=0&&(r=30);const i=n.tracks.length,o=e/r;for(let e=0;e<i;++e){const r=n.tracks[e],i=r.ValueTypeName;if("bool"===i||"string"===i)continue;const a=t.tracks.find((function(t){return t.name===r.name&&t.ValueTypeName===i}));if(void 0===a)continue;let s=0;const c=r.getValueSize();r.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(s=c/3);let u=0;const l=a.getValueSize();a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(u=l/3);const h=r.times.length-1;let f;if(o<=r.times[0]){const t=s,e=c-s;f=yl.arraySlice(r.values,t,e)}else if(o>=r.times[h]){const t=h*c+s,e=t+c-s;f=yl.arraySlice(r.values,t,e)}else{const t=r.createInterpolant(),e=s,n=c-s;t.evaluate(o),f=yl.arraySlice(t.resultBuffer,e,n)}"quaternion"===i&&(new ir).fromArray(f).normalize().conjugate().toArray(f);const d=a.times.length;for(let t=0;t<d;++t){const e=t*l+u;if("quaternion"===i)ir.multiplyQuaternionsFlat(a.values,e,f,0,a.values,e);else{const t=l-2*u;for(let n=0;n<t;++n)a.values[e+n]-=f[n]}}}return t.blendMode=tn,t}};function _l(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function xl(t,e,n,r){_l.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function bl(t,e,n,r){_l.call(this,t,e,n,r)}function wl(t,e,n,r){_l.call(this,t,e,n,r)}Object.assign(_l.prototype,{evaluate:function(t){const e=this.parameterPositions;let n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{let o;n:{r:if(!(t<r)){for(let o=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===o)break;if(i=r,r=e[++n],t<r)break e}o=e.length;break n}if(t>=i)break t;{const a=e[1];t<a&&(n=2,i=a);for(let o=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===o)break;if(r=i,i=e[--n-1],t>=i)break e}o=n,n=0}}for(;n<o;){const r=n+o>>>1;t<e[r]?o=r:n=r+1}if(r=e[n],i=e[n-1],void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){const e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r;for(let t=0;t!==r;++t)e[t]=n[i+t];return e},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),Object.assign(_l.prototype,{beforeStart_:_l.prototype.copySampleValue_,afterEnd_:_l.prototype.copySampleValue_}),xl.prototype=Object.assign(Object.create(_l.prototype),{constructor:xl,DefaultSettings_:{endingStart:Xe,endingEnd:Xe},intervalChanged_:function(t,e,n){const r=this.parameterPositions;let i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case $e:i=t,a=2*e-n;break;case Qe:i=r.length-2,a=e+r[i]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case $e:o=t,s=2*n-e;break;case Qe:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}const c=.5*(n-e),u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u},interpolate_:function(t,e,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=this._offsetPrev,l=this._offsetNext,h=this._weightPrev,f=this._weightNext,d=(n-e)/(r-e),p=d*d,m=p*d,g=-h*m+2*h*p-h*d,v=(1+h)*m+(-1.5-2*h)*p+(-.5+h)*d+1,y=(-1-f)*m+(1.5+f)*p+.5*d,_=f*m-f*p;for(let t=0;t!==a;++t)i[t]=g*o[u+t]+v*o[c+t]+y*o[s+t]+_*o[l+t];return i}}),bl.prototype=Object.assign(Object.create(_l.prototype),{constructor:bl,interpolate_:function(t,e,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=(n-e)/(r-e),l=1-u;for(let t=0;t!==a;++t)i[t]=o[c+t]*l+o[s+t]*u;return i}}),wl.prototype=Object.assign(Object.create(_l.prototype),{constructor:wl,interpolate_:function(t){return this.copySampleValue_(t-1)}});class Ml{constructor(t,e,n,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=yl.convertArray(e,this.TimeBufferType),this.values=yl.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(t){const e=t.constructor;let n;if(e.toJSON!==this.toJSON)n=e.toJSON(t);else{n={name:t.name,times:yl.convertArray(t.times,Array),values:yl.convertArray(t.values,Array)};const e=t.getInterpolation();e!==t.DefaultInterpolation&&(n.interpolation=e)}return n.type=t.ValueTypeName,n}InterpolantFactoryMethodDiscrete(t){return new wl(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new bl(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new xl(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let e;switch(t){case qe:e=this.InterpolantFactoryMethodDiscrete;break;case Ye:e=this.InterpolantFactoryMethodLinear;break;case Je:e=this.InterpolantFactoryMethodSmooth}if(void 0===e){const e="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(e);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",e),this}return this.createInterpolant=e,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return qe;case this.InterpolantFactoryMethodLinear:return Ye;case this.InterpolantFactoryMethodSmooth:return Je}}getValueSize(){return this.values.length/this.times.length}shift(t){if(0!==t){const e=this.times;for(let n=0,r=e.length;n!==r;++n)e[n]+=t}return this}scale(t){if(1!==t){const e=this.times;for(let n=0,r=e.length;n!==r;++n)e[n]*=t}return this}trim(t,e){const n=this.times,r=n.length;let i=0,o=r-1;for(;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(o=Math.max(o,1),i=o-1);const t=this.getValueSize();this.times=yl.arraySlice(n,i,o),this.values=yl.arraySlice(this.values,i*t,o*t)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let o=null;for(let e=0;e!==i;e++){const r=n[e];if("number"==typeof r&&isNaN(r)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,e,r),t=!1;break}if(null!==o&&o>r){console.error("THREE.KeyframeTrack: Out of order keys.",this,e,r,o),t=!1;break}o=r}if(void 0!==r&&yl.isTypedArray(r))for(let e=0,n=r.length;e!==n;++e){const n=r[e];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,e,n),t=!1;break}}return t}optimize(){const t=yl.arraySlice(this.times),e=yl.arraySlice(this.values),n=this.getValueSize(),r=this.getInterpolation()===Je,i=t.length-1;let o=1;for(let a=1;a<i;++a){let i=!1;const s=t[a];if(s!==t[a+1]&&(1!==a||s!==t[0]))if(r)i=!0;else{const t=a*n,r=t-n,o=t+n;for(let a=0;a!==n;++a){const n=e[t+a];if(n!==e[r+a]||n!==e[o+a]){i=!0;break}}}if(i){if(a!==o){t[o]=t[a];const r=a*n,i=o*n;for(let t=0;t!==n;++t)e[i+t]=e[r+t]}++o}}if(i>0){t[o]=t[i];for(let t=i*n,r=o*n,a=0;a!==n;++a)e[r+a]=e[t+a];++o}return o!==t.length?(this.times=yl.arraySlice(t,0,o),this.values=yl.arraySlice(e,0,o*n)):(this.times=t,this.values=e),this}clone(){const t=yl.arraySlice(this.times,0),e=yl.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,t,e);return n.createInterpolant=this.createInterpolant,n}}Ml.prototype.TimeBufferType=Float32Array,Ml.prototype.ValueBufferType=Float32Array,Ml.prototype.DefaultInterpolation=Ye;class Sl extends Ml{}Sl.prototype.ValueTypeName="bool",Sl.prototype.ValueBufferType=Array,Sl.prototype.DefaultInterpolation=qe,Sl.prototype.InterpolantFactoryMethodLinear=void 0,Sl.prototype.InterpolantFactoryMethodSmooth=void 0;class Tl extends Ml{}Tl.prototype.ValueTypeName="color";class El extends Ml{}function Cl(t,e,n,r){_l.call(this,t,e,n,r)}El.prototype.ValueTypeName="number",Cl.prototype=Object.assign(Object.create(_l.prototype),{constructor:Cl,interpolate_:function(t,e,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=(n-e)/(r-e);let c=t*a;for(let t=c+a;c!==t;c+=4)ir.slerpFlat(i,0,o,c-a,o,c,s);return i}});class Al extends Ml{InterpolantFactoryMethodLinear(t){return new Cl(this.times,this.values,this.getValueSize(),t)}}Al.prototype.ValueTypeName="quaternion",Al.prototype.DefaultInterpolation=Ye,Al.prototype.InterpolantFactoryMethodSmooth=void 0;class Pl extends Ml{}Pl.prototype.ValueTypeName="string",Pl.prototype.ValueBufferType=Array,Pl.prototype.DefaultInterpolation=qe,Pl.prototype.InterpolantFactoryMethodLinear=void 0,Pl.prototype.InterpolantFactoryMethodSmooth=void 0;class Ll extends Ml{}Ll.prototype.ValueTypeName="vector";class Rl{constructor(t,e=-1,n,r=Ke){this.name=t,this.tracks=n,this.duration=e,this.blendMode=r,this.uuid=qn.generateUUID(),this.duration<0&&this.resetDuration()}static parse(t){const e=[],n=t.tracks,r=1/(t.fps||1);for(let t=0,i=n.length;t!==i;++t)e.push(Ol(n[t]).scale(r));const i=new this(t.name,t.duration,e,t.blendMode);return i.uuid=t.uuid,i}static toJSON(t){const e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode};for(let t=0,r=n.length;t!==r;++t)e.push(Ml.toJSON(n[t]));return r}static CreateFromMorphTargetSequence(t,e,n,r){const i=e.length,o=[];for(let t=0;t<i;t++){let a=[],s=[];a.push((t+i-1)%i,t,(t+1)%i),s.push(0,1,0);const c=yl.getKeyframeOrder(a);a=yl.sortedArray(a,1,c),s=yl.sortedArray(s,1,c),r||0!==a[0]||(a.push(i),s.push(s[0])),o.push(new El(".morphTargetInfluences["+e[t].name+"]",a,s).scale(1/n))}return new this(t,-1,o)}static findByName(t,e){let n=t;if(!Array.isArray(t)){const e=t;n=e.geometry&&e.geometry.animations||e.animations}for(let t=0;t<n.length;t++)if(n[t].name===e)return n[t];return null}static CreateClipsFromMorphTargetSequences(t,e,n){const r={},i=/^([\w-]*?)([\d]+)$/;for(let e=0,n=t.length;e<n;e++){const n=t[e],o=n.name.match(i);if(o&&o.length>1){const t=o[1];let e=r[t];e||(r[t]=e=[]),e.push(n)}}const o=[];for(const t in r)o.push(this.CreateFromMorphTargetSequence(t,r[t],e,n));return o}static parseAnimation(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(t,e,n,r,i){if(0!==n.length){const o=[],a=[];yl.flattenJSON(n,o,a,r),0!==o.length&&i.push(new t(e,o,a))}},r=[],i=t.name||"default",o=t.fps||30,a=t.blendMode;let s=t.length||-1;const c=t.hierarchy||[];for(let t=0;t<c.length;t++){const i=c[t].keys;if(i&&0!==i.length)if(i[0].morphTargets){const t={};let e;for(e=0;e<i.length;e++)if(i[e].morphTargets)for(let n=0;n<i[e].morphTargets.length;n++)t[i[e].morphTargets[n]]=-1;for(const n in t){const t=[],o=[];for(let r=0;r!==i[e].morphTargets.length;++r){const r=i[e];t.push(r.time),o.push(r.morphTarget===n?1:0)}r.push(new El(".morphTargetInfluence["+n+"]",t,o))}s=t.length*(o||1)}else{const o=".bones["+e[t].name+"]";n(Ll,o+".position",i,"pos",r),n(Al,o+".quaternion",i,"rot",r),n(Ll,o+".scale",i,"scl",r)}}return 0===r.length?null:new this(i,s,r,a)}resetDuration(){let t=0;for(let e=0,n=this.tracks.length;e!==n;++e){const n=this.tracks[e];t=Math.max(t,n.times[n.times.length-1])}return this.duration=t,this}trim(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this}validate(){let t=!0;for(let e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t}optimize(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}clone(){const t=[];for(let e=0;e<this.tracks.length;e++)t.push(this.tracks[e].clone());return new this.constructor(this.name,this.duration,t,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function Ol(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return El;case"vector":case"vector2":case"vector3":case"vector4":return Ll;case"color":return Tl;case"quaternion":return Al;case"bool":case"boolean":return Sl;case"string":return Pl}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}(t.type);if(void 0===t.times){const e=[],n=[];yl.flattenJSON(t.keys,e,n,"value"),t.times=e,t.values=n}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)}const kl={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};function Il(t,e,n){const r=this;let i=!1,o=0,a=0,s=void 0;const c=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this},this.addHandler=function(t,e){return c.push(t,e),this},this.removeHandler=function(t){const e=c.indexOf(t);return-1!==e&&c.splice(e,2),this},this.getHandler=function(t){for(let e=0,n=c.length;e<n;e+=2){const n=c[e],r=c[e+1];if(n.global&&(n.lastIndex=0),n.test(t))return r}return null}}const Dl=new Il;function jl(t){this.manager=void 0!==t?t:Dl,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}Object.assign(jl.prototype,{load:function(){},loadAsync:function(t,e){const n=this;return new Promise((function(r,i){n.load(t,r,e,i)}))},parse:function(){},setCrossOrigin:function(t){return this.crossOrigin=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}});const zl={};function Nl(t){jl.call(this,t)}Nl.prototype=Object.assign(Object.create(jl.prototype),{constructor:Nl,load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const i=this,o=kl.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout((function(){e&&e(o),i.manager.itemEnd(t)}),0),o;if(void 0!==zl[t])return void zl[t].push({onLoad:e,onProgress:n,onError:r});const a=t.match(/^data:(.*?)(;base64)?,(.*)$/);let s;if(a){const n=a[1],o=!!a[2];let s=a[3];s=decodeURIComponent(s),o&&(s=atob(s));try{let r;const o=(this.responseType||"").toLowerCase();switch(o){case"arraybuffer":case"blob":const t=new Uint8Array(s.length);for(let e=0;e<s.length;e++)t[e]=s.charCodeAt(e);r="blob"===o?new Blob([t.buffer],{type:n}):t.buffer;break;case"document":const e=new DOMParser;r=e.parseFromString(s,n);break;case"json":r=JSON.parse(s);break;default:r=s}setTimeout((function(){e&&e(r),i.manager.itemEnd(t)}),0)}catch(e){setTimeout((function(){r&&r(e),i.manager.itemError(t),i.manager.itemEnd(t)}),0)}}else{zl[t]=[],zl[t].push({onLoad:e,onProgress:n,onError:r}),s=new XMLHttpRequest,s.open("GET",t,!0),s.addEventListener("load",(function(e){const n=this.response,r=zl[t];if(delete zl[t],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),kl.add(t,n);for(let t=0,e=r.length;t<e;t++){const e=r[t];e.onLoad&&e.onLoad(n)}i.manager.itemEnd(t)}else{for(let t=0,n=r.length;t<n;t++){const n=r[t];n.onError&&n.onError(e)}i.manager.itemError(t),i.manager.itemEnd(t)}}),!1),s.addEventListener("progress",(function(e){const n=zl[t];for(let t=0,r=n.length;t<r;t++){const r=n[t];r.onProgress&&r.onProgress(e)}}),!1),s.addEventListener("error",(function(e){const n=zl[t];delete zl[t];for(let t=0,r=n.length;t<r;t++){const r=n[t];r.onError&&r.onError(e)}i.manager.itemError(t),i.manager.itemEnd(t)}),!1),s.addEventListener("abort",(function(e){const n=zl[t];delete zl[t];for(let t=0,r=n.length;t<r;t++){const r=n[t];r.onError&&r.onError(e)}i.manager.itemError(t),i.manager.itemEnd(t)}),!1),void 0!==this.responseType&&(s.responseType=this.responseType),void 0!==this.withCredentials&&(s.withCredentials=this.withCredentials),s.overrideMimeType&&s.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain");for(const t in this.requestHeader)s.setRequestHeader(t,this.requestHeader[t]);s.send(null)}return i.manager.itemStart(t),s},setResponseType:function(t){return this.responseType=t,this},setMimeType:function(t){return this.mimeType=t,this}});class Fl extends jl{constructor(t){super(t)}load(t,e,n,r){const i=this,o=new Nl(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(t,(function(n){try{e(i.parse(JSON.parse(n)))}catch(e){r?r(e):console.error(e),i.manager.itemError(t)}}),n,r)}parse(t){const e=[];for(let n=0;n<t.length;n++){const r=Rl.parse(t[n]);e.push(r)}return e}}function Bl(t){jl.call(this,t)}Bl.prototype=Object.assign(Object.create(jl.prototype),{constructor:Bl,load:function(t,e,n,r){const i=this,o=[],a=new iu,s=new Nl(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(i.withCredentials);let c=0;function u(u){s.load(t[u],(function(t){const n=i.parse(t,!0);o[u]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},c+=1,6===c&&(1===n.mipmapCount&&(a.minFilter=Ct),a.image=o,a.format=n.format,a.needsUpdate=!0,e&&e(a))}),n,r)}if(Array.isArray(t))for(let e=0,n=t.length;e<n;++e)u(e);else s.load(t,(function(t){const n=i.parse(t,!0);if(n.isCubemap){const t=n.mipmaps.length/n.mipmapCount;for(let e=0;e<t;e++){o[e]={mipmaps:[]};for(let t=0;t<n.mipmapCount;t++)o[e].mipmaps.push(n.mipmaps[e*n.mipmapCount+t]),o[e].format=n.format,o[e].width=n.width,o[e].height=n.height}a.image=o}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=Ct),a.format=n.format,a.needsUpdate=!0,e&&e(a)}),n,r);return a}});class Hl extends jl{constructor(t){super(t)}load(t,e,n,r){void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const i=this,o=kl.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout((function(){e&&e(o),i.manager.itemEnd(t)}),0),o;const a=document.createElementNS("http://www.w3.org/1999/xhtml","img");function s(){a.removeEventListener("load",s,!1),a.removeEventListener("error",c,!1),kl.add(t,this),e&&e(this),i.manager.itemEnd(t)}function c(e){a.removeEventListener("load",s,!1),a.removeEventListener("error",c,!1),r&&r(e),i.manager.itemError(t),i.manager.itemEnd(t)}return a.addEventListener("load",s,!1),a.addEventListener("error",c,!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(t),a.src=t,a}}class Gl extends jl{constructor(t){super(t)}load(t,e,n,r){const i=new Ro,o=new Hl(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let a=0;function s(n){o.load(t[n],(function(t){i.images[n]=t,a++,6===a&&(i.needsUpdate=!0,e&&e(i))}),void 0,r)}for(let e=0;e<t.length;++e)s(e);return i}}function Ul(t){jl.call(this,t)}function Vl(t){jl.call(this,t)}function Wl(){this.type="Curve",this.arcLengthDivisions=200}Ul.prototype=Object.assign(Object.create(jl.prototype),{constructor:Ul,load:function(t,e,n,r){const i=this,o=new ko,a=new Nl(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(i.withCredentials),a.load(t,(function(t){const n=i.parse(t);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:xt,o.wrapT=void 0!==n.wrapT?n.wrapT:xt,o.magFilter=void 0!==n.magFilter?n.magFilter:Ct,o.minFilter=void 0!==n.minFilter?n.minFilter:Ct,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.encoding&&(o.encoding=n.encoding),void 0!==n.flipY&&(o.flipY=n.flipY),void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps,o.minFilter=Lt),1===n.mipmapCount&&(o.minFilter=Ct),void 0!==n.generateMipmaps&&(o.generateMipmaps=n.generateMipmaps),o.needsUpdate=!0,e&&e(o,n))}),n,r),o}}),Vl.prototype=Object.assign(Object.create(jl.prototype),{constructor:Vl,load:function(t,e,n,r){const i=new Kn,o=new Hl(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,(function(n){i.image=n;const r=t.search(/\.jpe?g($|\?)/i)>0||0===t.search(/^data\:image\/jpeg/);i.format=r?Wt:Zt,i.needsUpdate=!0,void 0!==e&&e(i)}),n,r),i}}),Object.assign(Wl.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){const n=this.getUtoTmapping(t);return this.getPoint(n,e)},getPoints:function(t=5){const e=[];for(let n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t=5){const e=[];for(let n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){const t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const e=[];let n,r=this.getPoint(0),i=0;e.push(0);for(let o=1;o<=t;o++)n=this.getPoint(o/t),i+=n.distanceTo(r),e.push(i),r=n;return this.cacheArcLengths=e,e},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){const n=this.getLengths();let r=0;const i=n.length;let o;o=e||t*n[i-1];let a,s=0,c=i-1;for(;s<=c;)if(r=Math.floor(s+(c-s)/2),a=n[r]-o,a<0)s=r+1;else{if(!(a>0)){c=r;break}c=r-1}if(r=c,n[r]===o)return r/(i-1);const u=n[r];return(r+(o-u)/(n[r+1]-u))/(i-1)},getTangent:function(t,e){const n=1e-4;let r=t-n,i=t+n;r<0&&(r=0),i>1&&(i=1);const o=this.getPoint(r),a=this.getPoint(i),s=e||(o.isVector2?new Yn:new or);return s.copy(a).sub(o).normalize(),s},getTangentAt:function(t,e){const n=this.getUtoTmapping(t);return this.getTangent(n,e)},computeFrenetFrames:function(t,e){const n=new or,r=[],i=[],o=[],a=new or,s=new jr;for(let e=0;e<=t;e++){const n=e/t;r[e]=this.getTangentAt(n,new or),r[e].normalize()}i[0]=new or,o[0]=new or;let c=Number.MAX_VALUE;const u=Math.abs(r[0].x),l=Math.abs(r[0].y),h=Math.abs(r[0].z);u<=c&&(c=u,n.set(1,0,0)),l<=c&&(c=l,n.set(0,1,0)),h<=c&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],a),o[0].crossVectors(r[0],i[0]);for(let e=1;e<=t;e++){if(i[e]=i[e-1].clone(),o[e]=o[e-1].clone(),a.crossVectors(r[e-1],r[e]),a.length()>Number.EPSILON){a.normalize();const t=Math.acos(qn.clamp(r[e-1].dot(r[e]),-1,1));i[e].applyMatrix4(s.makeRotationAxis(a,t))}o[e].crossVectors(r[e],i[e])}if(!0===e){let e=Math.acos(qn.clamp(i[0].dot(i[t]),-1,1));e/=t,r[0].dot(a.crossVectors(i[0],i[t]))>0&&(e=-e);for(let n=1;n<=t;n++)i[n].applyMatrix4(s.makeRotationAxis(r[n],e*n)),o[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:o}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){const t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}});class Zl extends Wl{constructor(t=0,e=0,n=1,r=1,i=0,o=2*Math.PI,a=!1,s=0){super(),this.type="EllipseCurve",this.aX=t,this.aY=e,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=o,this.aClockwise=a,this.aRotation=s}getPoint(t,e){const n=e||new Yn,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const o=Math.abs(i)<Number.EPSILON;for(;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);const a=this.aStartAngle+t*i;let s=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){const t=Math.cos(this.aRotation),e=Math.sin(this.aRotation),n=s-this.aX,r=c-this.aY;s=n*t-r*e+this.aX,c=n*e+r*t+this.aY}return n.set(s,c)}copy(t){return super.copy(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}toJSON(){const t=super.toJSON();return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t}fromJSON(t){return super.fromJSON(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}}Zl.prototype.isEllipseCurve=!0;class ql extends Zl{constructor(t,e,n,r,i,o){super(t,e,n,n,r,i,o),this.type="ArcCurve"}}function Yl(){let t=0,e=0,n=0,r=0;function i(i,o,a,s){t=i,e=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(t,e,n,r,o){i(e,n,o*(n-t),o*(r-e))},initNonuniformCatmullRom:function(t,e,n,r,o,a,s){let c=(e-t)/o-(n-t)/(o+a)+(n-e)/a,u=(n-e)/a-(r-e)/(a+s)+(r-n)/s;c*=a,u*=a,i(e,n,c,u)},calc:function(i){const o=i*i;return t+e*i+n*o+r*(o*i)}}}ql.prototype.isArcCurve=!0;const Jl=new or,Xl=new Yl,$l=new Yl,Ql=new Yl;class Kl extends Wl{constructor(t=[],e=!1,n="centripetal",r=.5){super(),this.type="CatmullRomCurve3",this.points=t,this.closed=e,this.curveType=n,this.tension=r}getPoint(t,e=new or){const n=e,r=this.points,i=r.length,o=(i-(this.closed?0:1))*t;let a,s,c=Math.floor(o),u=o-c;this.closed?c+=c>0?0:(Math.floor(Math.abs(c)/i)+1)*i:0===u&&c===i-1&&(c=i-2,u=1),this.closed||c>0?a=r[(c-1)%i]:(Jl.subVectors(r[0],r[1]).add(r[0]),a=Jl);const l=r[c%i],h=r[(c+1)%i];if(this.closed||c+2<i?s=r[(c+2)%i]:(Jl.subVectors(r[i-1],r[i-2]).add(r[i-1]),s=Jl),"centripetal"===this.curveType||"chordal"===this.curveType){const t="chordal"===this.curveType?.5:.25;let e=Math.pow(a.distanceToSquared(l),t),n=Math.pow(l.distanceToSquared(h),t),r=Math.pow(h.distanceToSquared(s),t);n<1e-4&&(n=1),e<1e-4&&(e=n),r<1e-4&&(r=n),Xl.initNonuniformCatmullRom(a.x,l.x,h.x,s.x,e,n,r),$l.initNonuniformCatmullRom(a.y,l.y,h.y,s.y,e,n,r),Ql.initNonuniformCatmullRom(a.z,l.z,h.z,s.z,e,n,r)}else"catmullrom"===this.curveType&&(Xl.initCatmullRom(a.x,l.x,h.x,s.x,this.tension),$l.initCatmullRom(a.y,l.y,h.y,s.y,this.tension),Ql.initCatmullRom(a.z,l.z,h.z,s.z,this.tension));return n.set(Xl.calc(u),$l.calc(u),Ql.calc(u)),n}copy(t){super.copy(t),this.points=[];for(let e=0,n=t.points.length;e<n;e++){const n=t.points[e];this.points.push(n.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}toJSON(){const t=super.toJSON();t.points=[];for(let e=0,n=this.points.length;e<n;e++){const n=this.points[e];t.points.push(n.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t}fromJSON(t){super.fromJSON(t),this.points=[];for(let e=0,n=t.points.length;e<n;e++){const n=t.points[e];this.points.push((new or).fromArray(n))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}}function th(t,e,n,r,i){const o=.5*(r-e),a=.5*(i-n),s=t*t;return(2*n-2*r+o+a)*(t*s)+(-3*n+3*r-2*o-a)*s+o*t+n}function eh(t,e,n,r){return function(t,e){const n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,r)}function nh(t,e,n,r,i){return function(t,e){const n=1-t;return n*n*n*e}(t,e)+function(t,e){const n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,r)+function(t,e){return t*t*t*e}(t,i)}Kl.prototype.isCatmullRomCurve3=!0;class rh extends Wl{constructor(t=new Yn,e=new Yn,n=new Yn,r=new Yn){super(),this.type="CubicBezierCurve",this.v0=t,this.v1=e,this.v2=n,this.v3=r}getPoint(t,e=new Yn){const n=e,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(nh(t,r.x,i.x,o.x,a.x),nh(t,r.y,i.y,o.y,a.y)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}}rh.prototype.isCubicBezierCurve=!0;class ih extends Wl{constructor(t=new or,e=new or,n=new or,r=new or){super(),this.type="CubicBezierCurve3",this.v0=t,this.v1=e,this.v2=n,this.v3=r}getPoint(t,e=new or){const n=e,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(nh(t,r.x,i.x,o.x,a.x),nh(t,r.y,i.y,o.y,a.y),nh(t,r.z,i.z,o.z,a.z)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}}ih.prototype.isCubicBezierCurve3=!0;class oh extends Wl{constructor(t=new Yn,e=new Yn){super(),this.type="LineCurve",this.v1=t,this.v2=e}getPoint(t,e=new Yn){const n=e;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n}getPointAt(t,e){return this.getPoint(t,e)}getTangent(t,e){const n=e||new Yn;return n.copy(this.v2).sub(this.v1).normalize(),n}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}oh.prototype.isLineCurve=!0;class ah extends Wl{constructor(t=new or,e=new or){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=t,this.v2=e}getPoint(t,e=new or){const n=e;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n}getPointAt(t,e){return this.getPoint(t,e)}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}class sh extends Wl{constructor(t=new Yn,e=new Yn,n=new Yn){super(),this.type="QuadraticBezierCurve",this.v0=t,this.v1=e,this.v2=n}getPoint(t,e=new Yn){const n=e,r=this.v0,i=this.v1,o=this.v2;return n.set(eh(t,r.x,i.x,o.x),eh(t,r.y,i.y,o.y)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}sh.prototype.isQuadraticBezierCurve=!0;class ch extends Wl{constructor(t=new or,e=new or,n=new or){super(),this.type="QuadraticBezierCurve3",this.v0=t,this.v1=e,this.v2=n}getPoint(t,e=new or){const n=e,r=this.v0,i=this.v1,o=this.v2;return n.set(eh(t,r.x,i.x,o.x),eh(t,r.y,i.y,o.y),eh(t,r.z,i.z,o.z)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}ch.prototype.isQuadraticBezierCurve3=!0;class uh extends Wl{constructor(t=[]){super(),this.type="SplineCurve",this.points=t}getPoint(t,e=new Yn){const n=e,r=this.points,i=(r.length-1)*t,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],l=r[o>r.length-3?r.length-1:o+2];return n.set(th(a,s.x,c.x,u.x,l.x),th(a,s.y,c.y,u.y,l.y)),n}copy(t){super.copy(t),this.points=[];for(let e=0,n=t.points.length;e<n;e++){const n=t.points[e];this.points.push(n.clone())}return this}toJSON(){const t=super.toJSON();t.points=[];for(let e=0,n=this.points.length;e<n;e++){const n=this.points[e];t.points.push(n.toArray())}return t}fromJSON(t){super.fromJSON(t),this.points=[];for(let e=0,n=t.points.length;e<n;e++){const n=t.points[e];this.points.push((new Yn).fromArray(n))}return this}}uh.prototype.isSplineCurve=!0;var lh=Object.freeze({__proto__:null,ArcCurve:ql,CatmullRomCurve3:Kl,CubicBezierCurve:rh,CubicBezierCurve3:ih,EllipseCurve:Zl,LineCurve:oh,LineCurve3:ah,QuadraticBezierCurve:sh,QuadraticBezierCurve3:ch,SplineCurve:uh});class hh extends Wl{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(t){this.curves.push(t)}closePath(){const t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new oh(e,t))}getPoint(t){const e=t*this.getLength(),n=this.getCurveLengths();let r=0;for(;r<n.length;){if(n[r]>=e){const t=n[r]-e,i=this.curves[r],o=i.getLength(),a=0===o?0:1-t/o;return i.getPointAt(a)}r++}return null}getLength(){const t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const t=[];let e=0;for(let n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t}getSpacedPoints(t=40){const e=[];for(let n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e}getPoints(t=12){const e=[];let n;for(let r=0,i=this.curves;r<i.length;r++){const o=i[r],a=o&&o.isEllipseCurve?2*t:o&&(o.isLineCurve||o.isLineCurve3)?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a);for(let t=0;t<s.length;t++){const r=s[t];n&&n.equals(r)||(e.push(r),n=r)}}return this.autoClose&&e.length>1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e}copy(t){super.copy(t),this.curves=[];for(let e=0,n=t.curves.length;e<n;e++){const n=t.curves[e];this.curves.push(n.clone())}return this.autoClose=t.autoClose,this}toJSON(){const t=super.toJSON();t.autoClose=this.autoClose,t.curves=[];for(let e=0,n=this.curves.length;e<n;e++){const n=this.curves[e];t.curves.push(n.toJSON())}return t}fromJSON(t){super.fromJSON(t),this.autoClose=t.autoClose,this.curves=[];for(let e=0,n=t.curves.length;e<n;e++){const n=t.curves[e];this.curves.push((new lh[n.type]).fromJSON(n))}return this}}class fh extends hh{constructor(t){super(),this.type="Path",this.currentPoint=new Yn,t&&this.setFromPoints(t)}setFromPoints(t){this.moveTo(t[0].x,t[0].y);for(let e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y);return this}moveTo(t,e){return this.currentPoint.set(t,e),this}lineTo(t,e){const n=new oh(this.currentPoint.clone(),new Yn(t,e));return this.curves.push(n),this.currentPoint.set(t,e),this}quadraticCurveTo(t,e,n,r){const i=new sh(this.currentPoint.clone(),new Yn(t,e),new Yn(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this}bezierCurveTo(t,e,n,r,i,o){const a=new rh(this.currentPoint.clone(),new Yn(t,e),new Yn(n,r),new Yn(i,o));return this.curves.push(a),this.currentPoint.set(i,o),this}splineThru(t){const e=[this.currentPoint.clone()].concat(t),n=new uh(e);return this.curves.push(n),this.currentPoint.copy(t[t.length-1]),this}arc(t,e,n,r,i,o){const a=this.currentPoint.x,s=this.currentPoint.y;return this.absarc(t+a,e+s,n,r,i,o),this}absarc(t,e,n,r,i,o){return this.absellipse(t,e,n,n,r,i,o),this}ellipse(t,e,n,r,i,o,a,s){const c=this.currentPoint.x,u=this.currentPoint.y;return this.absellipse(t+c,e+u,n,r,i,o,a,s),this}absellipse(t,e,n,r,i,o,a,s){const c=new Zl(t,e,n,r,i,o,a,s);if(this.curves.length>0){const t=c.getPoint(0);t.equals(this.currentPoint)||this.lineTo(t.x,t.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){const t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}}class dh extends fh{constructor(t){super(t),this.uuid=qn.generateUUID(),this.type="Shape",this.holes=[]}getPointsHoles(t){const e=[];for(let n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e}extractPoints(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}}copy(t){super.copy(t),this.holes=[];for(let e=0,n=t.holes.length;e<n;e++){const n=t.holes[e];this.holes.push(n.clone())}return this}toJSON(){const t=super.toJSON();t.uuid=this.uuid,t.holes=[];for(let e=0,n=this.holes.length;e<n;e++){const n=this.holes[e];t.holes.push(n.toJSON())}return t}fromJSON(t){super.fromJSON(t),this.uuid=t.uuid,this.holes=[];for(let e=0,n=t.holes.length;e<n;e++){const n=t.holes[e];this.holes.push((new fh).fromJSON(n))}return this}}class ph extends si{constructor(t,e=1){super(),this.type="Light",this.color=new Ri(t),this.intensity=e}copy(t){return super.copy(t),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){const e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}ph.prototype.isLight=!0;class mh extends ph{constructor(t,e,n){super(t,n),this.type="HemisphereLight",this.position.copy(si.DefaultUp),this.updateMatrix(),this.groundColor=new Ri(e)}copy(t){return ph.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}mh.prototype.isHemisphereLight=!0;const gh=new jr,vh=new or,yh=new or;class _h{constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.mapSize=new Yn(512,512),this.map=null,this.mapPass=null,this.matrix=new jr,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new jo,this._frameExtents=new Yn(1,1),this._viewportCount=1,this._viewports=[new er(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;vh.setFromMatrixPosition(t.matrixWorld),e.position.copy(vh),yh.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(yh),e.updateMatrixWorld(),gh.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(gh),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(e.projectionMatrix),n.multiply(e.matrixWorldInverse)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}copy(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const t={};return 0!==this.bias&&(t.bias=this.bias),0!==this.normalBias&&(t.normalBias=this.normalBias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}class xh extends _h{constructor(){super(new Po(50,1,.5,500)),this.focus=1}updateMatrices(t){const e=this.camera,n=2*qn.RAD2DEG*t.angle*this.focus,r=this.mapSize.width/this.mapSize.height,i=t.distance||e.far;n===e.fov&&r===e.aspect&&i===e.far||(e.fov=n,e.aspect=r,e.far=i,e.updateProjectionMatrix()),super.updateMatrices(t)}copy(t){return super.copy(t),this.focus=t.focus,this}}xh.prototype.isSpotLightShadow=!0;class bh extends ph{constructor(t,e,n=0,r=Math.PI/3,i=0,o=1){super(t,e),this.type="SpotLight",this.position.copy(si.DefaultUp),this.updateMatrix(),this.target=new si,this.distance=n,this.angle=r,this.penumbra=i,this.decay=o,this.shadow=new xh}get power(){return this.intensity*Math.PI}set power(t){this.intensity=t/Math.PI}copy(t){return super.copy(t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}bh.prototype.isSpotLight=!0;const wh=new jr,Mh=new or,Sh=new or;class Th extends _h{constructor(){super(new Po(90,1,.5,500)),this._frameExtents=new Yn(4,2),this._viewportCount=6,this._viewports=[new er(2,1,1,1),new er(0,1,1,1),new er(3,1,1,1),new er(1,1,1,1),new er(3,0,1,1),new er(1,0,1,1)],this._cubeDirections=[new or(1,0,0),new or(-1,0,0),new or(0,0,1),new or(0,0,-1),new or(0,1,0),new or(0,-1,0)],this._cubeUps=[new or(0,1,0),new or(0,1,0),new or(0,1,0),new or(0,1,0),new or(0,0,1),new or(0,0,-1)]}updateMatrices(t,e=0){const n=this.camera,r=this.matrix,i=t.distance||n.far;i!==n.far&&(n.far=i,n.updateProjectionMatrix()),Mh.setFromMatrixPosition(t.matrixWorld),n.position.copy(Mh),Sh.copy(n.position),Sh.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(Sh),n.updateMatrixWorld(),r.makeTranslation(-Mh.x,-Mh.y,-Mh.z),wh.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(wh)}}Th.prototype.isPointLightShadow=!0;class Eh extends ph{constructor(t,e,n=0,r=1){super(t,e),this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new Th}get power(){return 4*this.intensity*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}copy(t){return super.copy(t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}Eh.prototype.isPointLight=!0;class Ch extends Ao{constructor(t=-1,e=1,n=1,r=-1,i=.1,o=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=i,this.far=o,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this}setViewOffset(t,e,n,r,i,o){null===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.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view&&this.view.enabled){const t=(this.right-this.left)/this.view.fullWidth/this.zoom,e=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=t*this.view.offsetX,o=i+t*this.view.width,a-=e*this.view.offsetY,s=a-e*this.view.height}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=si.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}Ch.prototype.isOrthographicCamera=!0;class Ah extends _h{constructor(){super(new Ch(-5,5,5,-5,.5,500))}}Ah.prototype.isDirectionalLightShadow=!0;class Ph extends ph{constructor(t,e){super(t,e),this.type="DirectionalLight",this.position.copy(si.DefaultUp),this.updateMatrix(),this.target=new si,this.shadow=new Ah}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}Ph.prototype.isDirectionalLight=!0;class Lh extends ph{constructor(t,e){super(t,e),this.type="AmbientLight"}}Lh.prototype.isAmbientLight=!0;class Rh extends ph{constructor(t,e,n=10,r=10){super(t,e),this.type="RectAreaLight",this.width=n,this.height=r}copy(t){return super.copy(t),this.width=t.width,this.height=t.height,this}toJSON(t){const e=super.toJSON(t);return e.object.width=this.width,e.object.height=this.height,e}}Rh.prototype.isRectAreaLight=!0;class Oh{constructor(){this.coefficients=[];for(let t=0;t<9;t++)this.coefficients.push(new or)}set(t){for(let e=0;e<9;e++)this.coefficients[e].copy(t[e]);return this}zero(){for(let t=0;t<9;t++)this.coefficients[t].set(0,0,0);return this}getAt(t,e){const n=t.x,r=t.y,i=t.z,o=this.coefficients;return e.copy(o[0]).multiplyScalar(.282095),e.addScaledVector(o[1],.488603*r),e.addScaledVector(o[2],.488603*i),e.addScaledVector(o[3],.488603*n),e.addScaledVector(o[4],n*r*1.092548),e.addScaledVector(o[5],r*i*1.092548),e.addScaledVector(o[6],.315392*(3*i*i-1)),e.addScaledVector(o[7],n*i*1.092548),e.addScaledVector(o[8],.546274*(n*n-r*r)),e}getIrradianceAt(t,e){const n=t.x,r=t.y,i=t.z,o=this.coefficients;return e.copy(o[0]).multiplyScalar(.886227),e.addScaledVector(o[1],1.023328*r),e.addScaledVector(o[2],1.023328*i),e.addScaledVector(o[3],1.023328*n),e.addScaledVector(o[4],.858086*n*r),e.addScaledVector(o[5],.858086*r*i),e.addScaledVector(o[6],.743125*i*i-.247708),e.addScaledVector(o[7],.858086*n*i),e.addScaledVector(o[8],.429043*(n*n-r*r)),e}add(t){for(let e=0;e<9;e++)this.coefficients[e].add(t.coefficients[e]);return this}addScaledSH(t,e){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(t.coefficients[n],e);return this}scale(t){for(let e=0;e<9;e++)this.coefficients[e].multiplyScalar(t);return this}lerp(t,e){for(let n=0;n<9;n++)this.coefficients[n].lerp(t.coefficients[n],e);return this}equals(t){for(let e=0;e<9;e++)if(!this.coefficients[e].equals(t.coefficients[e]))return!1;return!0}copy(t){return this.set(t.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(t,e=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].fromArray(t,e+3*r);return this}toArray(t=[],e=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(t,e+3*r);return t}static getBasisAt(t,e){const n=t.x,r=t.y,i=t.z;e[0]=.282095,e[1]=.488603*r,e[2]=.488603*i,e[3]=.488603*n,e[4]=1.092548*n*r,e[5]=1.092548*r*i,e[6]=.315392*(3*i*i-1),e[7]=1.092548*n*i,e[8]=.546274*(n*n-r*r)}}Oh.prototype.isSphericalHarmonics3=!0;class kh extends ph{constructor(t=new Oh,e=1){super(void 0,e),this.sh=t}copy(t){return super.copy(t),this.sh.copy(t.sh),this}fromJSON(t){return this.intensity=t.intensity,this.sh.fromArray(t.sh),this}toJSON(t){const e=super.toJSON(t);return e.object.sh=this.sh.toArray(),e}}kh.prototype.isLightProbe=!0;class Ih extends jl{constructor(t){super(t),this.textures={}}load(t,e,n,r){const i=this,o=new Nl(i.manager);o.setPath(i.path),o.setRequestHeader(i.requestHeader),o.setWithCredentials(i.withCredentials),o.load(t,(function(n){try{e(i.parse(JSON.parse(n)))}catch(e){r?r(e):console.error(e),i.manager.itemError(t)}}),n,r)}parse(t){const e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}const r=new vl[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&void 0!==r.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.sheen&&(r.sheen=(new Ri).setHex(t.sheen)),void 0!==t.emissive&&void 0!==r.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&void 0!==r.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.clearcoat&&(r.clearcoat=t.clearcoat),void 0!==t.clearcoatRoughness&&(r.clearcoatRoughness=t.clearcoatRoughness),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.flatShading&&(r.flatShading=t.flatShading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.combine&&(r.combine=t.combine),void 0!==t.side&&(r.side=t.side),void 0!==t.shadowSide&&(r.shadowSide=t.shadowSide),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.stencilWrite&&(r.stencilWrite=t.stencilWrite),void 0!==t.stencilWriteMask&&(r.stencilWriteMask=t.stencilWriteMask),void 0!==t.stencilFunc&&(r.stencilFunc=t.stencilFunc),void 0!==t.stencilRef&&(r.stencilRef=t.stencilRef),void 0!==t.stencilFuncMask&&(r.stencilFuncMask=t.stencilFuncMask),void 0!==t.stencilFail&&(r.stencilFail=t.stencilFail),void 0!==t.stencilZFail&&(r.stencilZFail=t.stencilZFail),void 0!==t.stencilZPass&&(r.stencilZPass=t.stencilZPass),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(r.rotation=t.rotation),1!==t.linewidth&&(r.linewidth=t.linewidth),void 0!==t.dashSize&&(r.dashSize=t.dashSize),void 0!==t.gapSize&&(r.gapSize=t.gapSize),void 0!==t.scale&&(r.scale=t.scale),void 0!==t.polygonOffset&&(r.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(r.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(r.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.morphNormals&&(r.morphNormals=t.morphNormals),void 0!==t.dithering&&(r.dithering=t.dithering),void 0!==t.alphaToCoverage&&(r.alphaToCoverage=t.alphaToCoverage),void 0!==t.premultipliedAlpha&&(r.premultipliedAlpha=t.premultipliedAlpha),void 0!==t.vertexTangents&&(r.vertexTangents=t.vertexTangents),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.toneMapped&&(r.toneMapped=t.toneMapped),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.vertexColors&&("number"==typeof t.vertexColors?r.vertexColors=t.vertexColors>0:r.vertexColors=t.vertexColors),void 0!==t.uniforms)for(const e in t.uniforms){const i=t.uniforms[e];switch(r.uniforms[e]={},i.type){case"t":r.uniforms[e].value=n(i.value);break;case"c":r.uniforms[e].value=(new Ri).setHex(i.value);break;case"v2":r.uniforms[e].value=(new Yn).fromArray(i.value);break;case"v3":r.uniforms[e].value=(new or).fromArray(i.value);break;case"v4":r.uniforms[e].value=(new er).fromArray(i.value);break;case"m3":r.uniforms[e].value=(new Jn).fromArray(i.value);break;case"m4":r.uniforms[e].value=(new jr).fromArray(i.value);break;default:r.uniforms[e].value=i.value}}if(void 0!==t.defines&&(r.defines=t.defines),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.extensions)for(const e in t.extensions)r.extensions[e]=t.extensions[e];if(void 0!==t.shading&&(r.flatShading=1===t.shading),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=n(t.map)),void 0!==t.matcap&&(r.matcap=n(t.matcap)),void 0!==t.alphaMap&&(r.alphaMap=n(t.alphaMap)),void 0!==t.bumpMap&&(r.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=n(t.normalMap)),void 0!==t.normalMapType&&(r.normalMapType=t.normalMapType),void 0!==t.normalScale){let e=t.normalScale;!1===Array.isArray(e)&&(e=[e,e]),r.normalScale=(new Yn).fromArray(e)}return void 0!==t.displacementMap&&(r.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=n(t.specularMap)),void 0!==t.envMap&&(r.envMap=n(t.envMap)),void 0!==t.envMapIntensity&&(r.envMapIntensity=t.envMapIntensity),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.refractionRatio&&(r.refractionRatio=t.refractionRatio),void 0!==t.lightMap&&(r.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(r.gradientMap=n(t.gradientMap)),void 0!==t.clearcoatMap&&(r.clearcoatMap=n(t.clearcoatMap)),void 0!==t.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=n(t.clearcoatRoughnessMap)),void 0!==t.clearcoatNormalMap&&(r.clearcoatNormalMap=n(t.clearcoatNormalMap)),void 0!==t.clearcoatNormalScale&&(r.clearcoatNormalScale=(new Yn).fromArray(t.clearcoatNormalScale)),void 0!==t.transmission&&(r.transmission=t.transmission),void 0!==t.transmissionMap&&(r.transmissionMap=n(t.transmissionMap)),r}setTextures(t){return this.textures=t,this}}const Dh={decodeText:function(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);let e="";for(let n=0,r=t.length;n<r;n++)e+=String.fromCharCode(t[n]);try{return decodeURIComponent(escape(e))}catch(t){return e}},extractUrlBase:function(t){const e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}};function jh(){no.call(this),this.type="InstancedBufferGeometry",this.instanceCount=1/0}function zh(t,e,n,r){"number"==typeof n&&(r=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),Di.call(this,t,e,n),this.meshPerAttribute=r||1}jh.prototype=Object.assign(Object.create(no.prototype),{constructor:jh,isInstancedBufferGeometry:!0,copy:function(t){return no.prototype.copy.call(this,t),this.instanceCount=t.instanceCount,this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){const t=no.prototype.toJSON.call(this);return t.instanceCount=this.instanceCount,t.isInstancedBufferGeometry=!0,t}}),zh.prototype=Object.assign(Object.create(Di.prototype),{constructor:zh,isInstancedBufferAttribute:!0,copy:function(t){return Di.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this},toJSON:function(){const t=Di.prototype.toJSON.call(this);return t.meshPerAttribute=this.meshPerAttribute,t.isInstancedBufferAttribute=!0,t}});class Nh extends jl{constructor(t){super(t)}load(t,e,n,r){const i=this,o=new Nl(i.manager);o.setPath(i.path),o.setRequestHeader(i.requestHeader),o.setWithCredentials(i.withCredentials),o.load(t,(function(n){try{e(i.parse(JSON.parse(n)))}catch(e){r?r(e):console.error(e),i.manager.itemError(t)}}),n,r)}parse(t){const e={},n={};function r(t,n){if(void 0!==e[n])return e[n];const r=t.interleavedBuffers[n],o=i(t,r.buffer),a=new nc(Yi(r.type,o),r.stride);return a.uuid=r.uuid,e[n]=a,a}function i(t,e){if(void 0!==n[e])return n[e];const r=t.arrayBuffers[e],i=new Uint32Array(r).buffer;return n[e]=i,i}const o=t.isInstancedBufferGeometry?new jh:new no,a=t.data.index;if(void 0!==a){const t=Yi(a.type,a.array);o.setIndex(new Di(t,1))}const s=t.data.attributes;for(const e in s){const n=s[e];let i;if(n.isInterleavedBufferAttribute)i=new ic(r(t.data,n.data),n.itemSize,n.offset,n.normalized);else{const t=Yi(n.type,n.array);i=new(n.isInstancedBufferAttribute?zh:Di)(t,n.itemSize,n.normalized)}void 0!==n.name&&(i.name=n.name),void 0!==n.usage&&i.setUsage(n.usage),void 0!==n.updateRange&&(i.updateRange.offset=n.updateRange.offset,i.updateRange.count=n.updateRange.count),o.setAttribute(e,i)}const c=t.data.morphAttributes;if(c)for(const e in c){const n=c[e],i=[];for(let e=0,o=n.length;e<o;e++){const o=n[e];let a;a=o.isInterleavedBufferAttribute?new ic(r(t.data,o.data),o.itemSize,o.offset,o.normalized):new Di(Yi(o.type,o.array),o.itemSize,o.normalized),void 0!==o.name&&(a.name=o.name),i.push(a)}o.morphAttributes[e]=i}t.data.morphTargetsRelative&&(o.morphTargetsRelative=!0);const u=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==u)for(let t=0,e=u.length;t!==e;++t){const e=u[t];o.addGroup(e.start,e.count,e.materialIndex)}const l=t.data.boundingSphere;if(void 0!==l){const t=new or;void 0!==l.center&&t.fromArray(l.center),o.boundingSphere=new Cr(t,l.radius)}return t.name&&(o.name=t.name),t.userData&&(o.userData=t.userData),o}}class Fh extends jl{constructor(t){super(t)}load(t,e,n,r){const i=this,o=""===this.path?Dh.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||o;const a=new Nl(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(t,(function(n){let o=null;try{o=JSON.parse(n)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can't parse "+t+".",e.message)}const a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,e):console.error("THREE.ObjectLoader: Can't load "+t)}),n,r)}parse(t,e){const n=this.parseAnimations(t.animations),r=this.parseShapes(t.shapes),i=this.parseGeometries(t.geometries,r),o=this.parseImages(t.images,(function(){void 0!==e&&e(c)})),a=this.parseTextures(t.textures,o),s=this.parseMaterials(t.materials,a),c=this.parseObject(t.object,i,s,n),u=this.parseSkeletons(t.skeletons,c);if(this.bindSkeletons(c,u),void 0!==e){let t=!1;for(const e in o)if(o[e]instanceof HTMLImageElement){t=!0;break}!1===t&&e(c)}return c}parseShapes(t){const e={};if(void 0!==t)for(let n=0,r=t.length;n<r;n++){const r=(new dh).fromJSON(t[n]);e[r.uuid]=r}return e}parseSkeletons(t,e){const n={},r={};if(e.traverse((function(t){t.isBone&&(r[t.uuid]=t)})),void 0!==t)for(let e=0,i=t.length;e<i;e++){const i=(new kc).fromJSON(t[e],r);n[i.uuid]=i}return n}parseGeometries(t,e){const n={};let r;if(void 0!==t){const i=new Nh;for(let o=0,a=t.length;o<a;o++){let a;const s=t[o];switch(s.type){case"PlaneGeometry":case"PlaneBufferGeometry":a=new al[s.type](s.width,s.height,s.widthSegments,s.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":a=new al[s.type](s.width,s.height,s.depth,s.widthSegments,s.heightSegments,s.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":a=new al[s.type](s.radius,s.segments,s.thetaStart,s.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":a=new al[s.type](s.radiusTop,s.radiusBottom,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":a=new al[s.type](s.radius,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":a=new al[s.type](s.radius,s.widthSegments,s.heightSegments,s.phiStart,s.phiLength,s.thetaStart,s.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":a=new al[s.type](s.radius,s.detail);break;case"RingGeometry":case"RingBufferGeometry":a=new al[s.type](s.innerRadius,s.outerRadius,s.thetaSegments,s.phiSegments,s.thetaStart,s.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":a=new al[s.type](s.radius,s.tube,s.radialSegments,s.tubularSegments,s.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":a=new al[s.type](s.radius,s.tube,s.tubularSegments,s.radialSegments,s.p,s.q);break;case"TubeGeometry":case"TubeBufferGeometry":a=new al[s.type]((new lh[s.path.type]).fromJSON(s.path),s.tubularSegments,s.radius,s.radialSegments,s.closed);break;case"LatheGeometry":case"LatheBufferGeometry":a=new al[s.type](s.points,s.segments,s.phiStart,s.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":a=new al[s.type](s.vertices,s.indices,s.radius,s.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":r=[];for(let t=0,n=s.shapes.length;t<n;t++){const n=e[s.shapes[t]];r.push(n)}a=new al[s.type](r,s.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":r=[];for(let t=0,n=s.shapes.length;t<n;t++){const n=e[s.shapes[t]];r.push(n)}const t=s.options.extrudePath;void 0!==t&&(s.options.extrudePath=(new lh[t.type]).fromJSON(t)),a=new al[s.type](r,s.options);break;case"BufferGeometry":case"InstancedBufferGeometry":a=i.parse(s);break;case"Geometry":console.error('THREE.ObjectLoader: Loading "Geometry" is not supported anymore.');break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+s.type+'"');continue}a.uuid=s.uuid,void 0!==s.name&&(a.name=s.name),!0===a.isBufferGeometry&&void 0!==s.userData&&(a.userData=s.userData),n[s.uuid]=a}}return n}parseMaterials(t,e){const n={},r={};if(void 0!==t){const i=new Ih;i.setTextures(e);for(let e=0,o=t.length;e<o;e++){const o=t[e];if("MultiMaterial"===o.type){const t=[];for(let e=0;e<o.materials.length;e++){const r=o.materials[e];void 0===n[r.uuid]&&(n[r.uuid]=i.parse(r)),t.push(n[r.uuid])}r[o.uuid]=t}else void 0===n[o.uuid]&&(n[o.uuid]=i.parse(o)),r[o.uuid]=n[o.uuid]}}return r}parseAnimations(t){const e={};if(void 0!==t)for(let n=0;n<t.length;n++){const r=t[n],i=Rl.parse(r);e[i.uuid]=i}return e}parseImages(t,e){const n=this,r={};let i;function o(t){if("string"==typeof t){const e=t;return function(t){return n.manager.itemStart(t),i.load(t,(function(){n.manager.itemEnd(t)}),void 0,(function(){n.manager.itemError(t),n.manager.itemEnd(t)}))}(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(e)?e:n.resourcePath+e)}return t.data?{data:Yi(t.type,t.data),width:t.width,height:t.height}:null}if(void 0!==t&&t.length>0){const n=new Il(e);i=new Hl(n),i.setCrossOrigin(this.crossOrigin);for(let e=0,n=t.length;e<n;e++){const n=t[e],i=n.url;if(Array.isArray(i)){r[n.uuid]=[];for(let t=0,e=i.length;t<e;t++){const e=o(i[t]);null!==e&&(e instanceof HTMLImageElement?r[n.uuid].push(e):r[n.uuid].push(new ko(e.data,e.width,e.height)))}}else{const t=o(n.url);null!==t&&(r[n.uuid]=t)}}}return r}parseTextures(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}const r={};if(void 0!==t)for(let i=0,o=t.length;i<o;i++){const o=t[i];let a;void 0===o.image&&console.warn('THREE.ObjectLoader: No "image" specified for',o.uuid),void 0===e[o.image]&&console.warn("THREE.ObjectLoader: Undefined image",o.image);const s=e[o.image];Array.isArray(s)?(a=new Ro(s),6===s.length&&(a.needsUpdate=!0)):(a=s&&s.data?new ko(s.data,s.width,s.height):new Kn(s),s&&(a.needsUpdate=!0)),a.uuid=o.uuid,void 0!==o.name&&(a.name=o.name),void 0!==o.mapping&&(a.mapping=n(o.mapping,Bh)),void 0!==o.offset&&a.offset.fromArray(o.offset),void 0!==o.repeat&&a.repeat.fromArray(o.repeat),void 0!==o.center&&a.center.fromArray(o.center),void 0!==o.rotation&&(a.rotation=o.rotation),void 0!==o.wrap&&(a.wrapS=n(o.wrap[0],Hh),a.wrapT=n(o.wrap[1],Hh)),void 0!==o.format&&(a.format=o.format),void 0!==o.type&&(a.type=o.type),void 0!==o.encoding&&(a.encoding=o.encoding),void 0!==o.minFilter&&(a.minFilter=n(o.minFilter,Gh)),void 0!==o.magFilter&&(a.magFilter=n(o.magFilter,Gh)),void 0!==o.anisotropy&&(a.anisotropy=o.anisotropy),void 0!==o.flipY&&(a.flipY=o.flipY),void 0!==o.premultiplyAlpha&&(a.premultiplyAlpha=o.premultiplyAlpha),void 0!==o.unpackAlignment&&(a.unpackAlignment=o.unpackAlignment),r[o.uuid]=a}return r}parseObject(t,e,n,r){let i,o,a;function s(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function c(t){if(void 0!==t){if(Array.isArray(t)){const e=[];for(let r=0,i=t.length;r<i;r++){const i=t[r];void 0===n[i]&&console.warn("THREE.ObjectLoader: Undefined material",i),e.push(n[i])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}switch(t.type){case"Scene":i=new ec,void 0!==t.background&&Number.isInteger(t.background)&&(i.background=new Ri(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?i.fog=new tc(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(i.fog=new Ks(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":i=new Po(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(i.focus=t.focus),void 0!==t.zoom&&(i.zoom=t.zoom),void 0!==t.filmGauge&&(i.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(i.filmOffset=t.filmOffset),void 0!==t.view&&(i.view=Object.assign({},t.view));break;case"OrthographicCamera":i=new Ch(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(i.zoom=t.zoom),void 0!==t.view&&(i.view=Object.assign({},t.view));break;case"AmbientLight":i=new Lh(t.color,t.intensity);break;case"DirectionalLight":i=new Ph(t.color,t.intensity);break;case"PointLight":i=new Eh(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":i=new Rh(t.color,t.intensity,t.width,t.height);break;case"SpotLight":i=new bh(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":i=new mh(t.color,t.groundColor,t.intensity);break;case"LightProbe":i=(new kh).fromJSON(t);break;case"SkinnedMesh":o=s(t.geometry),a=c(t.material),i=new Pc(o,a),void 0!==t.bindMode&&(i.bindMode=t.bindMode),void 0!==t.bindMatrix&&i.bindMatrix.fromArray(t.bindMatrix),void 0!==t.skeleton&&(i.skeleton=t.skeleton);break;case"Mesh":o=s(t.geometry),a=c(t.material),i=new bo(o,a);break;case"InstancedMesh":o=s(t.geometry),a=c(t.material);const e=t.count,n=t.instanceMatrix,r=t.instanceColor;i=new Nc(o,a,e),i.instanceMatrix=new Di(new Float32Array(n.array),16),void 0!==r&&(i.instanceColor=new Di(new Float32Array(r.array),r.itemSize));break;case"LOD":i=new Mc;break;case"Line":i=new Wc(s(t.geometry),c(t.material));break;case"LineLoop":i=new Jc(s(t.geometry),c(t.material));break;case"LineSegments":i=new Yc(s(t.geometry),c(t.material));break;case"PointCloud":case"Points":i=new eu(s(t.geometry),c(t.material));break;case"Sprite":i=new _c(c(t.material));break;case"Group":i=new qs;break;case"Bone":i=new Lc;break;default:i=new si}if(i.uuid=t.uuid,void 0!==t.name&&(i.name=t.name),void 0!==t.matrix?(i.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(i.matrixAutoUpdate=t.matrixAutoUpdate),i.matrixAutoUpdate&&i.matrix.decompose(i.position,i.quaternion,i.scale)):(void 0!==t.position&&i.position.fromArray(t.position),void 0!==t.rotation&&i.rotation.fromArray(t.rotation),void 0!==t.quaternion&&i.quaternion.fromArray(t.quaternion),void 0!==t.scale&&i.scale.fromArray(t.scale)),void 0!==t.castShadow&&(i.castShadow=t.castShadow),void 0!==t.receiveShadow&&(i.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(i.shadow.bias=t.shadow.bias),void 0!==t.shadow.normalBias&&(i.shadow.normalBias=t.shadow.normalBias),void 0!==t.shadow.radius&&(i.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&i.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(i.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(i.visible=t.visible),void 0!==t.frustumCulled&&(i.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(i.renderOrder=t.renderOrder),void 0!==t.userData&&(i.userData=t.userData),void 0!==t.layers&&(i.layers.mask=t.layers),void 0!==t.children){const o=t.children;for(let t=0;t<o.length;t++)i.add(this.parseObject(o[t],e,n,r))}if(void 0!==t.animations){const e=t.animations;for(let t=0;t<e.length;t++){const n=e[t];i.animations.push(r[n])}}if("LOD"===t.type){void 0!==t.autoUpdate&&(i.autoUpdate=t.autoUpdate);const e=t.levels;for(let t=0;t<e.length;t++){const n=e[t],r=i.getObjectByProperty("uuid",n.object);void 0!==r&&i.addLevel(r,n.distance)}}return i}bindSkeletons(t,e){0!==Object.keys(e).length&&t.traverse((function(t){if(!0===t.isSkinnedMesh&&void 0!==t.skeleton){const n=e[t.skeleton];void 0===n?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",t.skeleton):t.bind(n,t.bindMatrix)}}))}setTexturePath(t){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}const Bh={UVMapping:ft,CubeReflectionMapping:dt,CubeRefractionMapping:pt,EquirectangularReflectionMapping:mt,EquirectangularRefractionMapping:gt,CubeUVReflectionMapping:vt,CubeUVRefractionMapping:yt},Hh={RepeatWrapping:_t,ClampToEdgeWrapping:xt,MirroredRepeatWrapping:bt},Gh={NearestFilter:wt,NearestMipmapNearestFilter:Mt,NearestMipmapLinearFilter:Tt,LinearFilter:Ct,LinearMipmapNearestFilter:At,LinearMipmapLinearFilter:Lt};function Uh(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),jl.call(this,t),this.options={premultiplyAlpha:"none"}}Uh.prototype=Object.assign(Object.create(jl.prototype),{constructor:Uh,isImageBitmapLoader:!0,setOptions:function(t){return this.options=t,this},load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const i=this,o=kl.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout((function(){e&&e(o),i.manager.itemEnd(t)}),0),o;const a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",a.headers=this.requestHeader,fetch(t,a).then((function(t){return t.blob()})).then((function(t){return createImageBitmap(t,Object.assign(i.options,{colorSpaceConversion:"none"}))})).then((function(n){kl.add(t,n),e&&e(n),i.manager.itemEnd(t)})).catch((function(e){r&&r(e),i.manager.itemError(t),i.manager.itemEnd(t)})),i.manager.itemStart(t)}});class Vh{constructor(){this.type="ShapePath",this.color=new Ri,this.subPaths=[],this.currentPath=null}moveTo(t,e){return this.currentPath=new fh,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e),this}lineTo(t,e){return this.currentPath.lineTo(t,e),this}quadraticCurveTo(t,e,n,r){return this.currentPath.quadraticCurveTo(t,e,n,r),this}bezierCurveTo(t,e,n,r,i,o){return this.currentPath.bezierCurveTo(t,e,n,r,i,o),this}splineThru(t){return this.currentPath.splineThru(t),this}toShapes(t,e){function n(t){const e=[];for(let n=0,r=t.length;n<r;n++){const r=t[n],i=new dh;i.curves=r.curves,e.push(i)}return e}function r(t,e){const n=e.length;let r=!1;for(let i=n-1,o=0;o<n;i=o++){let n=e[i],a=e[o],s=a.x-n.x,c=a.y-n.y;if(Math.abs(c)>Number.EPSILON){if(c<0&&(n=e[o],s=-s,a=e[i],c=-c),t.y<n.y||t.y>a.y)continue;if(t.y===n.y){if(t.x===n.x)return!0}else{const e=c*(t.x-n.x)-s*(t.y-n.y);if(0===e)return!0;if(e<0)continue;r=!r}}else{if(t.y!==n.y)continue;if(a.x<=t.x&&t.x<=n.x||n.x<=t.x&&t.x<=a.x)return!0}}return r}const i=Gu.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===e)return n(o);let a,s,c;const u=[];if(1===o.length)return s=o[0],c=new dh,c.curves=s.curves,u.push(c),u;let l=!i(o[0].getPoints());l=t?!l:l;const h=[],f=[];let d,p,m=[],g=0;f[g]=void 0,m[g]=[];for(let e=0,n=o.length;e<n;e++)s=o[e],d=s.getPoints(),a=i(d),a=t?!a:a,a?(!l&&f[g]&&g++,f[g]={s:new dh,p:d},f[g].s.curves=s.curves,l&&g++,m[g]=[]):m[g].push({h:s,p:d[0]});if(!f[0])return n(o);if(f.length>1){let t=!1;const e=[];for(let t=0,e=f.length;t<e;t++)h[t]=[];for(let n=0,i=f.length;n<i;n++){const i=m[n];for(let o=0;o<i.length;o++){const a=i[o];let s=!0;for(let i=0;i<f.length;i++)r(a.p,f[i].p)&&(n!==i&&e.push({froms:n,tos:i,hole:o}),s?(s=!1,h[i].push(a)):t=!0);s&&h[n].push(a)}}e.length>0&&(t||(m=h))}for(let t=0,e=f.length;t<e;t++){c=f[t].s,u.push(c),p=m[t];for(let t=0,e=p.length;t<e;t++)c.holes.push(p[t].h)}return u}}class Wh{constructor(t){this.type="Font",this.data=t}generateShapes(t,e=100){const n=[],r=function(t,e,n){const r=Array.from(t),i=e/n.resolution,o=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*i,a=[];let s=0,c=0;for(let t=0;t<r.length;t++){const e=r[t];if("\n"===e)s=0,c-=o;else{const t=Zh(e,i,s,c,n);s+=t.offsetX,a.push(t.path)}}return a}(t,e,this.data);for(let t=0,e=r.length;t<e;t++)Array.prototype.push.apply(n,r[t].toShapes());return n}}function Zh(t,e,n,r,i){const o=i.glyphs[t]||i.glyphs["?"];if(!o)return void console.error('THREE.Font: character "'+t+'" does not exists in font family '+i.familyName+".");const a=new Vh;let s,c,u,l,h,f,d,p;if(o.o){const t=o._cachedOutline||(o._cachedOutline=o.o.split(" "));for(let i=0,o=t.length;i<o;)switch(t[i++]){case"m":s=t[i++]*e+n,c=t[i++]*e+r,a.moveTo(s,c);break;case"l":s=t[i++]*e+n,c=t[i++]*e+r,a.lineTo(s,c);break;case"q":u=t[i++]*e+n,l=t[i++]*e+r,h=t[i++]*e+n,f=t[i++]*e+r,a.quadraticCurveTo(h,f,u,l);break;case"b":u=t[i++]*e+n,l=t[i++]*e+r,h=t[i++]*e+n,f=t[i++]*e+r,d=t[i++]*e+n,p=t[i++]*e+r,a.bezierCurveTo(h,f,d,p,u,l)}}return{offsetX:o.ha*e,path:a}}Wh.prototype.isFont=!0;class qh extends jl{constructor(t){super(t)}load(t,e,n,r){const i=this,o=new Nl(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(i.withCredentials),o.load(t,(function(t){let n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}const r=i.parse(n);e&&e(r)}),n,r)}parse(t){return new Wh(t)}}let Yh;const Jh={getContext:function(){return void 0===Yh&&(Yh=new(window.AudioContext||window.webkitAudioContext)),Yh},setContext:function(t){Yh=t}};class Xh extends jl{constructor(t){super(t)}load(t,e,n,r){const i=this,o=new Nl(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(t,(function(n){try{const t=n.slice(0);Jh.getContext().decodeAudioData(t,(function(t){e(t)}))}catch(e){r?r(e):console.error(e),i.manager.itemError(t)}}),n,r)}}class $h extends kh{constructor(t,e,n=1){super(void 0,n);const r=(new Ri).set(t),i=(new Ri).set(e),o=new or(r.r,r.g,r.b),a=new or(i.r,i.g,i.b),s=Math.sqrt(Math.PI),c=s*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(s),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(c)}}$h.prototype.isHemisphereLightProbe=!0;class Qh extends kh{constructor(t,e=1){super(void 0,e);const n=(new Ri).set(t);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}}Qh.prototype.isAmbientLightProbe=!0;const Kh=new jr,tf=new jr;class ef{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Po,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Po,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(t){const e=this._cache;if(e.focus!==t.focus||e.fov!==t.fov||e.aspect!==t.aspect*this.aspect||e.near!==t.near||e.far!==t.far||e.zoom!==t.zoom||e.eyeSep!==this.eyeSep){e.focus=t.focus,e.fov=t.fov,e.aspect=t.aspect*this.aspect,e.near=t.near,e.far=t.far,e.zoom=t.zoom,e.eyeSep=this.eyeSep;const n=t.projectionMatrix.clone(),r=e.eyeSep/2,i=r*e.near/e.focus,o=e.near*Math.tan(qn.DEG2RAD*e.fov*.5)/e.zoom;let a,s;tf.elements[12]=-r,Kh.elements[12]=r,a=-o*e.aspect+i,s=o*e.aspect+i,n.elements[0]=2*e.near/(s-a),n.elements[8]=(s+a)/(s-a),this.cameraL.projectionMatrix.copy(n),a=-o*e.aspect-i,s=o*e.aspect-i,n.elements[0]=2*e.near/(s-a),n.elements[8]=(s+a)/(s-a),this.cameraR.projectionMatrix.copy(n)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(tf),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(Kh)}}class nf{constructor(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=rf(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=rf();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function rf(){return("undefined"==typeof performance?Date:performance).now()}const of=new or,af=new ir,sf=new or,cf=new or;class uf extends si{constructor(){super(),this.type="AudioListener",this.context=Jh.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new nf}getInput(){return this.gain}removeFilter(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(t){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}updateMatrixWorld(t){super.updateMatrixWorld(t);const e=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(of,af,sf),cf.set(0,0,-1).applyQuaternion(af),e.positionX){const t=this.context.currentTime+this.timeDelta;e.positionX.linearRampToValueAtTime(of.x,t),e.positionY.linearRampToValueAtTime(of.y,t),e.positionZ.linearRampToValueAtTime(of.z,t),e.forwardX.linearRampToValueAtTime(cf.x,t),e.forwardY.linearRampToValueAtTime(cf.y,t),e.forwardZ.linearRampToValueAtTime(cf.z,t),e.upX.linearRampToValueAtTime(n.x,t),e.upY.linearRampToValueAtTime(n.y,t),e.upZ.linearRampToValueAtTime(n.z,t)}else e.setPosition(of.x,of.y,of.z),e.setOrientation(cf.x,cf.y,cf.z,n.x,n.y,n.z)}}class lf extends si{constructor(t){super(),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this}setMediaElementSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this}setMediaStreamSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(t),this.connect(),this}setBuffer(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this}play(t=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+t;const e=this.context.createBufferSource();return e.buffer=this.buffer,e.loop=this.loop,e.loopStart=this.loopStart,e.loopEnd=this.loopEnd,e.onended=this.onEnded.bind(this),e.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=e,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(t){return t||(t=[]),!0===this._connected?(this.disconnect(),this.filters=t.slice(),this.connect()):this.filters=t.slice(),this}setDetune(t){if(this.detune=t,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(t){return this.setFilters(t?[t]:[])}setPlaybackRate(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")}setLoopStart(t){return this.loopStart=t,this}setLoopEnd(t){return this.loopEnd=t,this}getVolume(){return this.gain.gain.value}setVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}const hf=new or,ff=new ir,df=new or,pf=new or;class mf extends lf{constructor(t){super(t),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(t){return this.panner.refDistance=t,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(t){return this.panner.rolloffFactor=t,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(t){return this.panner.distanceModel=t,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(t){return this.panner.maxDistance=t,this}setDirectionalCone(t,e,n){return this.panner.coneInnerAngle=t,this.panner.coneOuterAngle=e,this.panner.coneOuterGain=n,this}updateMatrixWorld(t){if(super.updateMatrixWorld(t),!0===this.hasPlaybackControl&&!1===this.isPlaying)return;this.matrixWorld.decompose(hf,ff,df),pf.set(0,0,1).applyQuaternion(ff);const e=this.panner;if(e.positionX){const t=this.context.currentTime+this.listener.timeDelta;e.positionX.linearRampToValueAtTime(hf.x,t),e.positionY.linearRampToValueAtTime(hf.y,t),e.positionZ.linearRampToValueAtTime(hf.z,t),e.orientationX.linearRampToValueAtTime(pf.x,t),e.orientationY.linearRampToValueAtTime(pf.y,t),e.orientationZ.linearRampToValueAtTime(pf.z,t)}else e.setPosition(hf.x,hf.y,hf.z),e.setOrientation(pf.x,pf.y,pf.z)}}class gf{constructor(t,e=2048){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=e,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let t=0;const e=this.getFrequencyData();for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}}class vf{constructor(t,e,n){let r,i,o;switch(this.binding=t,this.valueSize=n,e){case"quaternion":r=this._slerp,i=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(t,e){const n=this.buffer,r=this.valueSize,i=t*r+r;let o=this.cumulativeWeight;if(0===o){for(let t=0;t!==r;++t)n[i+t]=n[t];o=e}else{o+=e;const t=e/o;this._mixBufferRegion(n,i,0,t,r)}this.cumulativeWeight=o}accumulateAdditive(t){const e=this.buffer,n=this.valueSize,r=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(e,r,0,t,n),this.cumulativeWeightAdditive+=t}apply(t){const e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){const t=e*this._origIndex;this._mixBufferRegion(n,r,t,1-i,e)}o>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*e,1,e);for(let t=e,i=e+e;t!==i;++t)if(n[t]!==n[t+e]){a.setValue(n,r);break}}saveOriginalState(){const t=this.binding,e=this.buffer,n=this.valueSize,r=n*this._origIndex;t.getValue(e,r);for(let t=n,i=r;t!==i;++t)e[t]=e[r+t%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const t=3*this.valueSize;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){const t=this._addIndex*this.valueSize,e=t+this.valueSize;for(let n=t;n<e;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const t=this._origIndex*this.valueSize,e=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[e+n]=this.buffer[t+n]}_select(t,e,n,r,i){if(r>=.5)for(let r=0;r!==i;++r)t[e+r]=t[n+r]}_slerp(t,e,n,r){ir.slerpFlat(t,e,t,e,t,n,r)}_slerpAdditive(t,e,n,r,i){const o=this._workIndex*i;ir.multiplyQuaternionsFlat(t,o,t,e,t,n),ir.slerpFlat(t,e,t,e,t,o,r)}_lerp(t,e,n,r,i){const o=1-r;for(let a=0;a!==i;++a){const i=e+a;t[i]=t[i]*o+t[n+a]*r}}_lerpAdditive(t,e,n,r,i){for(let o=0;o!==i;++o){const i=e+o;t[i]=t[i]+t[n+o]*r}}}const yf="\\[\\]\\.:\\/",_f=new RegExp("["+yf+"]","g"),xf="[^"+yf+"]",bf="[^"+yf.replace("\\.","")+"]",wf=/((?:WC+[\/:])*)/.source.replace("WC",xf),Mf=/(WCOD+)?/.source.replace("WCOD",bf),Sf=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",xf),Tf=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",xf),Ef=new RegExp("^"+wf+Mf+Sf+Tf+"$"),Cf=["material","materials","bones"];function Af(t,e,n){const r=n||Pf.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}function Pf(t,e,n){this.path=e,this.parsedPath=n||Pf.parseTrackName(e),this.node=Pf.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}Object.assign(Af.prototype,{getValue:function(t,e){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Pf,{Composite:Af,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Pf.Composite(t,e,n):new Pf(t,e,n)},sanitizeNodeName:function(t){return t.replace(/\s/g,"_").replace(_f,"")},parseTrackName:function(t){const e=Ef.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){const t=n.nodeName.substring(r+1);-1!==Cf.indexOf(t)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=t)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n},findNode:function(t,e){if(!e||""===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){const n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){const n=function(t){for(let r=0;r<t.length;r++){const i=t[r];if(i.name===e||i.uuid===e)return i;const o=n(i.children);if(o)return o}return null},r=n(t.children);if(r)return r}return null}}),Object.assign(Pf.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){let t=this.node;const e=this.parsedPath,n=e.objectName,r=e.propertyName;let i=e.propertyIndex;if(t||(t=Pf.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(n){let r=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(let e=0;e<t.length;e++)if(t[e].name===r){r=e;break}break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==r){if(void 0===t[r])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[r]}}const o=t[r];if(void 0===o){const n=e.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+n+"."+r+" but it wasn't found.",t)}let a=this.Versioning.None;this.targetObject=t,void 0!==t.needsUpdate?a=this.Versioning.NeedsUpdate:void 0!==t.matrixWorldNeedsUpdate&&(a=this.Versioning.MatrixWorldNeedsUpdate);let s=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!t.geometry.isBufferGeometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==t.morphTargetDictionary[i]&&(i=t.morphTargetDictionary[i])}s=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=i}else void 0!==o.fromArray&&void 0!==o.toArray?(s=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(s=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=r;this.getValue=this.GetterByBindingType[s],this.setValue=this.SetterByBindingTypeAndVersioning[s][a]},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),Object.assign(Pf.prototype,{_getValue_unbound:Pf.prototype.getValue,_setValue_unbound:Pf.prototype.setValue});class Lf{constructor(){this.uuid=qn.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const t={};this._indicesByUUID=t;for(let e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const e=this;this.stats={objects:{get total(){return e._objects.length},get inUse(){return this.total-e.nCachedObjects_}},get bindingsPerObject(){return e._bindings.length}}}add(){const t=this._objects,e=this._indicesByUUID,n=this._paths,r=this._parsedPaths,i=this._bindings,o=i.length;let a=void 0,s=t.length,c=this.nCachedObjects_;for(let u=0,l=arguments.length;u!==l;++u){const l=arguments[u],h=l.uuid;let f=e[h];if(void 0===f){f=s++,e[h]=f,t.push(l);for(let t=0,e=o;t!==e;++t)i[t].push(new Pf(l,n[t],r[t]))}else if(f<c){a=t[f];const s=--c,u=t[s];e[u.uuid]=f,t[f]=u,e[h]=s,t[s]=l;for(let t=0,e=o;t!==e;++t){const e=i[t],o=e[s];let a=e[f];e[f]=o,void 0===a&&(a=new Pf(l,n[t],r[t])),e[s]=a}}else t[f]!==a&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=c}remove(){const t=this._objects,e=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_;for(let o=0,a=arguments.length;o!==a;++o){const a=arguments[o],s=a.uuid,c=e[s];if(void 0!==c&&c>=i){const o=i++,u=t[o];e[u.uuid]=c,t[c]=u,e[s]=o,t[o]=a;for(let t=0,e=r;t!==e;++t){const e=n[t],r=e[o],i=e[c];e[c]=r,e[o]=i}}}this.nCachedObjects_=i}uncache(){const t=this._objects,e=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_,o=t.length;for(let a=0,s=arguments.length;a!==s;++a){const s=arguments[a].uuid,c=e[s];if(void 0!==c)if(delete e[s],c<i){const a=--i,s=t[a],u=--o,l=t[u];e[s.uuid]=c,t[c]=s,e[l.uuid]=a,t[a]=l,t.pop();for(let t=0,e=r;t!==e;++t){const e=n[t],r=e[a],i=e[u];e[c]=r,e[a]=i,e.pop()}}else{const i=--o,a=t[i];i>0&&(e[a.uuid]=c),t[c]=a,t.pop();for(let t=0,e=r;t!==e;++t){const e=n[t];e[c]=e[i],e.pop()}}}this.nCachedObjects_=i}subscribe_(t,e){const n=this._bindingsIndicesByPath;let r=n[t];const i=this._bindings;if(void 0!==r)return i[r];const o=this._paths,a=this._parsedPaths,s=this._objects,c=s.length,u=this.nCachedObjects_,l=new Array(c);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(l);for(let n=u,r=s.length;n!==r;++n){const r=s[n];l[n]=new Pf(r,t,e)}return l}unsubscribe_(t){const e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){const r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];e[t[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}Lf.prototype.isAnimationObjectGroup=!0;class Rf{constructor(t,e,n=null,r=e.blendMode){this._mixer=t,this._clip=e,this._localRoot=n,this.blendMode=r;const i=e.tracks,o=i.length,a=new Array(o),s={endingStart:Xe,endingEnd:Xe};for(let t=0;t!==o;++t){const e=i[t].createInterpolant(null);a[t]=e,e.settings=s}this._interpolantSettings=s,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=We,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,e){return this.loop=t,this.repetitions=e,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){const n=this._clip.duration,r=t._clip.duration,i=r/n,o=n/r;t.warp(1,i,e),this.warp(o,1,e)}return this}crossFadeTo(t,e,n){return t.crossFadeFrom(this,e,n)}stopFading(){const t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,e,n){const r=this._mixer,i=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;null===a&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const s=a.parameterPositions,c=a.sampleValues;return s[0]=i,s[1]=i+n,c[0]=t/o,c[1]=e/o,this}stopWarping(){const t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,e,n,r){if(!this.enabled)return void this._updateWeight(t);const i=this._startTime;if(null!==i){const r=(t-i)*n;if(r<0||0===n)return;this._startTime=null,e=n*r}e*=this._updateTimeScale(t);const o=this._updateTime(e),a=this._updateWeight(t);if(a>0){const t=this._interpolants,e=this._propertyBindings;switch(this.blendMode){case tn:for(let n=0,r=t.length;n!==r;++n)t[n].evaluate(o),e[n].accumulateAdditive(a);break;case Ke:default:for(let n=0,i=t.length;n!==i;++n)t[n].evaluate(o),e[n].accumulate(r,a)}}}_updateWeight(t){let e=0;if(this.enabled){e=this.weight;const n=this._weightInterpolant;if(null!==n){const r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e}_updateTimeScale(t){let e=0;if(!this.paused){e=this.timeScale;const n=this._timeScaleInterpolant;null!==n&&(e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e))}return this._effectiveTimeScale=e,e}_updateTime(t){const e=this._clip.duration,n=this.loop;let r=this.time+t,i=this._loopCount;const o=n===Ze;if(0===t)return-1===i?r:o&&1==(1&i)?e-r:r;if(n===Ve){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(r>=e)r=e;else{if(!(r<0)){this.time=r;break t}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),r>=e||r<0){const n=Math.floor(r/e);r-=e*n,i+=Math.abs(n);const a=this.repetitions-i;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=t>0?e:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===a){const e=t<0;this._setEndings(e,!e,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=r;if(o&&1==(1&i))return e-r}return r}_setEndings(t,e,n){const r=this._interpolantSettings;n?(r.endingStart=$e,r.endingEnd=$e):(r.endingStart=t?this.zeroSlopeAtStart?$e:Xe:Qe,r.endingEnd=e?this.zeroSlopeAtEnd?$e:Xe:Qe)}_scheduleFading(t,e,n){const r=this._mixer,i=r.time;let o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=e,a[1]=i+t,s[1]=n,this}}class Of extends Vn{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,e){const n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,c=this._bindingsByRootAndName;let u=c[s];void 0===u&&(u={},c[s]=u);for(let t=0;t!==i;++t){const i=r[t],c=i.name;let l=u[c];if(void 0!==l)o[t]=l;else{if(l=o[t],void 0!==l){null===l._cacheIndex&&(++l.referenceCount,this._addInactiveBinding(l,s,c));continue}const r=e&&e._propertyBindings[t].binding.parsedPath;l=new vf(Pf.create(n,c,r),i.ValueTypeName,i.getValueSize()),++l.referenceCount,this._addInactiveBinding(l,s,c),o[t]=l}a[t].resultBuffer=l.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){const e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}const e=t._propertyBindings;for(let t=0,n=e.length;t!==n;++t){const n=e[t];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){const e=t._propertyBindings;for(let t=0,n=e.length;t!==n;++t){const n=e[t];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){const e=t._cacheIndex;return null!==e&&e<this._nActiveActions}_addInactiveAction(t,e,n){const r=this._actions,i=this._actionsByClip;let o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{const e=o.knownActions;t._byClipCacheIndex=e.length,e.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t}_removeInactiveAction(t){const e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;const i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,c=s[s.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)}_removeInactiveBindingsForAction(t){const e=t._propertyBindings;for(let t=0,n=e.length;t!==n;++t){const n=e[t];0==--n.referenceCount&&this._removeInactiveBinding(n)}}_lendAction(t){const e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i}_takeBackAction(t){const e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i}_addInactiveBinding(t,e,n){const r=this._bindingsByRootAndName,i=this._bindings;let o=r[e];void 0===o&&(o={},r[e]=o),o[n]=t,t._cacheIndex=i.length,i.push(t)}_removeInactiveBinding(t){const e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete a[i],0===Object.keys(a).length&&delete o[r]}_lendBinding(t){const e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i}_takeBackBinding(t){const e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i}_lendControlInterpolant(){const t=this._controlInterpolants,e=this._nActiveControlInterpolants++;let n=t[e];return void 0===n&&(n=new bl(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=e,t[e]=n),n}_takeBackControlInterpolant(t){const e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i}clipAction(t,e,n){const r=e||this._root,i=r.uuid;let o="string"==typeof t?Rl.findByName(r,t):t;const a=null!==o?o.uuid:t,s=this._actionsByClip[a];let c=null;if(void 0===n&&(n=null!==o?o.blendMode:Ke),void 0!==s){const t=s.actionByRoot[i];if(void 0!==t&&t.blendMode===n)return t;c=s.knownActions[0],null===o&&(o=c._clip)}if(null===o)return null;const u=new Rf(this,o,e,n);return this._bindAction(u,c),this._addInactiveAction(u,a,i),u}existingAction(t,e){const n=e||this._root,r=n.uuid,i="string"==typeof t?Rl.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null}stopAllAction(){const t=this._actions;for(let e=this._nActiveActions-1;e>=0;--e)t[e].stop();return this}update(t){t*=this.timeScale;const e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1;for(let a=0;a!==n;++a)e[a]._update(r,t,i,o);const a=this._bindings,s=this._nActiveBindings;for(let t=0;t!==s;++t)a[t].apply(o);return this}setTime(t){this.time=0;for(let t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(t)}getRoot(){return this._root}uncacheClip(t){const e=this._actions,n=t.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){const t=i.knownActions;for(let n=0,r=t.length;n!==r;++n){const r=t[n];this._deactivateAction(r);const i=r._cacheIndex,o=e[e.length-1];r._cacheIndex=null,r._byClipCacheIndex=null,o._cacheIndex=i,e[i]=o,e.pop(),this._removeInactiveBindingsForAction(r)}delete r[n]}}uncacheRoot(t){const e=t.uuid,n=this._actionsByClip;for(const t in n){const r=n[t].actionByRoot[e];void 0!==r&&(this._deactivateAction(r),this._removeInactiveAction(r))}const r=this._bindingsByRootAndName[e];if(void 0!==r)for(const t in r){const e=r[t];e.restoreOriginalState(),this._removeInactiveBinding(e)}}uncacheAction(t,e){const n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}Of.prototype._controlInterpolantsResultBuffer=new Float32Array(1);class kf{constructor(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}clone(){return new kf(void 0===this.value.clone?this.value:this.value.clone())}}function If(t,e,n){nc.call(this,t,e),this.meshPerAttribute=n||1}function Df(t,e,n,r,i){this.buffer=t,this.type=e,this.itemSize=n,this.elementSize=r,this.count=i,this.version=0}function jf(t,e,n=0,r=1/0){this.ray=new Dr(t,e),this.near=n,this.far=r,this.camera=null,this.layers=new qr,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function zf(t,e){return t.distance-e.distance}function Nf(t,e,n,r){if(t.layers.test(e.layers)&&t.raycast(e,n),!0===r){const r=t.children;for(let t=0,i=r.length;t<i;t++)Nf(r[t],e,n,!0)}}If.prototype=Object.assign(Object.create(nc.prototype),{constructor:If,isInstancedInterleavedBuffer:!0,copy:function(t){return nc.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this},clone:function(t){const e=nc.prototype.clone.call(this,t);return e.meshPerAttribute=this.meshPerAttribute,e},toJSON:function(t){const e=nc.prototype.toJSON.call(this,t);return e.isInstancedInterleavedBuffer=!0,e.meshPerAttribute=this.meshPerAttribute,e}}),Object.defineProperty(Df.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Df.prototype,{isGLBufferAttribute:!0,setBuffer:function(t){return this.buffer=t,this},setType:function(t,e){return this.type=t,this.elementSize=e,this},setItemSize:function(t){return this.itemSize=t,this},setCount:function(t){return this.count=t,this}}),Object.assign(jf.prototype,{set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize(),this.camera=e):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld),this.camera=e):console.error("THREE.Raycaster: Unsupported camera type: "+e.type)},intersectObject:function(t,e=!1,n=[]){return Nf(t,this,n,e),n.sort(zf),n},intersectObjects:function(t,e=!1,n=[]){for(let r=0,i=t.length;r<i;r++)Nf(t[r],this,n,e);return n.sort(zf),n}});class Ff{constructor(t=1,e=0,n=0){return this.radius=t,this.phi=e,this.theta=n,this}set(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this}copy(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this}makeSafe(){const t=1e-6;return this.phi=Math.max(t,Math.min(Math.PI-t,this.phi)),this}setFromVector3(t){return this.setFromCartesianCoords(t.x,t.y,t.z)}setFromCartesianCoords(t,e,n){return this.radius=Math.sqrt(t*t+e*e+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t,n),this.phi=Math.acos(qn.clamp(e/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}}class Bf{constructor(t=1,e=0,n=0){return this.radius=t,this.theta=e,this.y=n,this}set(t,e,n){return this.radius=t,this.theta=e,this.y=n,this}copy(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this}setFromVector3(t){return this.setFromCartesianCoords(t.x,t.y,t.z)}setFromCartesianCoords(t,e,n){return this.radius=Math.sqrt(t*t+n*n),this.theta=Math.atan2(t,n),this.y=e,this}clone(){return(new this.constructor).copy(this)}}const Hf=new Yn;class Gf{constructor(t=new Yn(1/0,1/0),e=new Yn(-1/0,-1/0)){this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const n=Hf.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new Yn),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new Yn),this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}getParameter(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new Yn),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)}clampPoint(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new Yn),e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return Hf.copy(t).clamp(this.min,this.max).sub(t).length()}intersect(t){return this.min.max(t.min),this.max.min(t.max),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}Gf.prototype.isBox2=!0;const Uf=new or,Vf=new or;class Wf{constructor(t=new or,e=new or){this.start=t,this.end=e}set(t,e){return this.start.copy(t),this.end.copy(e),this}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new or),t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new or),t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,e){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new or),this.delta(e).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,e){Uf.subVectors(t,this.start),Vf.subVectors(this.end,this.start);const n=Vf.dot(Vf);let r=Vf.dot(Uf)/n;return e&&(r=qn.clamp(r,0,1)),r}closestPointToPoint(t,e,n){const r=this.closestPointToPointParameter(t,e);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new or),this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}function Zf(t){si.call(this),this.material=t,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}Zf.prototype=Object.create(si.prototype),Zf.prototype.constructor=Zf,Zf.prototype.isImmediateRenderObject=!0;const qf=new or;class Yf extends si{constructor(t,e){super(),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;const n=new no,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let t=0,e=1,n=32;t<n;t++,e++){const i=t/n*Math.PI*2,o=e/n*Math.PI*2;r.push(Math.cos(i),Math.sin(i),1,Math.cos(o),Math.sin(o),1)}n.setAttribute("position",new Vi(r,3));const i=new Fc({fog:!1,toneMapped:!1});this.cone=new Yc(n,i),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateMatrixWorld();const t=this.light.distance?this.light.distance:1e3,e=t*Math.tan(this.light.angle);this.cone.scale.set(e,e,t),qf.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(qf),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const Jf=new or,Xf=new jr,$f=new jr;class Qf extends Yc{constructor(t){const e=function t(e){const n=[];e&&e.isBone&&n.push(e);for(let r=0;r<e.children.length;r++)n.push.apply(n,t(e.children[r]));return n}(t),n=new no,r=[],i=[],o=new Ri(0,0,1),a=new Ri(0,1,0);for(let t=0;t<e.length;t++){const n=e[t];n.parent&&n.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.setAttribute("position",new Vi(r,3)),n.setAttribute("color",new Vi(i,3)),super(n,new Fc({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(t){const e=this.bones,n=this.geometry,r=n.getAttribute("position");$f.copy(this.root.matrixWorld).invert();for(let t=0,n=0;t<e.length;t++){const i=e[t];i.parent&&i.parent.isBone&&(Xf.multiplyMatrices($f,i.matrixWorld),Jf.setFromMatrixPosition(Xf),r.setXYZ(n,Jf.x,Jf.y,Jf.z),Xf.multiplyMatrices($f,i.parent.matrixWorld),Jf.setFromMatrixPosition(Xf),r.setXYZ(n+1,Jf.x,Jf.y,Jf.z),n+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(t)}}class Kf extends bo{constructor(t,e,n){super(new Ku(e,4,2),new Oi({wireframe:!0,fog:!1,toneMapped:!1})),this.light=t,this.light.updateMatrixWorld(),this.color=n,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const td=new or,ed=new Ri,nd=new Ri;class rd extends si{constructor(t,e,n){super(),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;const r=new Ju(e);r.rotateY(.5*Math.PI),this.material=new Oi({wireframe:!0,fog:!1,toneMapped:!1}),void 0===this.color&&(this.material.vertexColors=!0);const i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.setAttribute("color",new Di(o,3)),this.add(new bo(r,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const t=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{const e=t.geometry.getAttribute("color");ed.copy(this.light.color),nd.copy(this.light.groundColor);for(let t=0,n=e.count;t<n;t++){const r=t<n/2?ed:nd;e.setXYZ(t,r.r,r.g,r.b)}e.needsUpdate=!0}t.lookAt(td.setFromMatrixPosition(this.light.matrixWorld).negate())}}class id extends Yc{constructor(t=10,e=10,n=4473924,r=8947848){n=new Ri(n),r=new Ri(r);const i=e/2,o=t/e,a=t/2,s=[],c=[];for(let t=0,u=0,l=-a;t<=e;t++,l+=o){s.push(-a,0,l,a,0,l),s.push(l,0,-a,l,0,a);const e=t===i?n:r;e.toArray(c,u),u+=3,e.toArray(c,u),u+=3,e.toArray(c,u),u+=3,e.toArray(c,u),u+=3}const u=new no;u.setAttribute("position",new Vi(s,3)),u.setAttribute("color",new Vi(c,3)),super(u,new Fc({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}}class od extends Yc{constructor(t=10,e=16,n=8,r=64,i=4473924,o=8947848){i=new Ri(i),o=new Ri(o);const a=[],s=[];for(let n=0;n<=e;n++){const r=n/e*(2*Math.PI),c=Math.sin(r)*t,u=Math.cos(r)*t;a.push(0,0,0),a.push(c,0,u);const l=1&n?i:o;s.push(l.r,l.g,l.b),s.push(l.r,l.g,l.b)}for(let e=0;e<=n;e++){const c=1&e?i:o,u=t-t/n*e;for(let t=0;t<r;t++){let e=t/r*(2*Math.PI),n=Math.sin(e)*u,i=Math.cos(e)*u;a.push(n,0,i),s.push(c.r,c.g,c.b),e=(t+1)/r*(2*Math.PI),n=Math.sin(e)*u,i=Math.cos(e)*u,a.push(n,0,i),s.push(c.r,c.g,c.b)}}const c=new no;c.setAttribute("position",new Vi(a,3)),c.setAttribute("color",new Vi(s,3)),super(c,new Fc({vertexColors:!0,toneMapped:!1})),this.type="PolarGridHelper"}}const ad=new or,sd=new or,cd=new or;class ud extends si{constructor(t,e,n){super(),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);let r=new no;r.setAttribute("position",new Vi([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));const i=new Fc({fog:!1,toneMapped:!1});this.lightPlane=new Wc(r,i),this.add(this.lightPlane),r=new no,r.setAttribute("position",new Vi([0,0,0,0,0,1],3)),this.targetLine=new Wc(r,i),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){ad.setFromMatrixPosition(this.light.matrixWorld),sd.setFromMatrixPosition(this.light.target.matrixWorld),cd.subVectors(sd,ad),this.lightPlane.lookAt(sd),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(sd),this.targetLine.scale.z=cd.length()}}const ld=new or,hd=new Ao;class fd extends Yc{constructor(t){const e=new no,n=new Fc({color:16777215,vertexColors:!0,toneMapped:!1}),r=[],i=[],o={},a=new Ri(16755200),s=new Ri(16711680),c=new Ri(43775),u=new Ri(16777215),l=new Ri(3355443);function h(t,e,n){f(t,n),f(e,n)}function f(t,e){r.push(0,0,0),i.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(r.length/3-1)}h("n1","n2",a),h("n2","n4",a),h("n4","n3",a),h("n3","n1",a),h("f1","f2",a),h("f2","f4",a),h("f4","f3",a),h("f3","f1",a),h("n1","f1",a),h("n2","f2",a),h("n3","f3",a),h("n4","f4",a),h("p","n1",s),h("p","n2",s),h("p","n3",s),h("p","n4",s),h("u1","u2",c),h("u2","u3",c),h("u3","u1",c),h("c","t",u),h("p","c",l),h("cn1","cn2",l),h("cn3","cn4",l),h("cf1","cf2",l),h("cf3","cf4",l),e.setAttribute("position",new Vi(r,3)),e.setAttribute("color",new Vi(i,3)),super(e,n),this.type="CameraHelper",this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}update(){const t=this.geometry,e=this.pointMap;hd.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),dd("c",e,t,hd,0,0,-1),dd("t",e,t,hd,0,0,1),dd("n1",e,t,hd,-1,-1,-1),dd("n2",e,t,hd,1,-1,-1),dd("n3",e,t,hd,-1,1,-1),dd("n4",e,t,hd,1,1,-1),dd("f1",e,t,hd,-1,-1,1),dd("f2",e,t,hd,1,-1,1),dd("f3",e,t,hd,-1,1,1),dd("f4",e,t,hd,1,1,1),dd("u1",e,t,hd,.7,1.1,-1),dd("u2",e,t,hd,-.7,1.1,-1),dd("u3",e,t,hd,0,2,-1),dd("cf1",e,t,hd,-1,0,1),dd("cf2",e,t,hd,1,0,1),dd("cf3",e,t,hd,0,-1,1),dd("cf4",e,t,hd,0,1,1),dd("cn1",e,t,hd,-1,0,-1),dd("cn2",e,t,hd,1,0,-1),dd("cn3",e,t,hd,0,-1,-1),dd("cn4",e,t,hd,0,1,-1),t.getAttribute("position").needsUpdate=!0}}function dd(t,e,n,r,i,o,a){ld.set(i,o,a).unproject(r);const s=e[t];if(void 0!==s){const t=n.getAttribute("position");for(let e=0,n=s.length;e<n;e++)t.setXYZ(s[e],ld.x,ld.y,ld.z)}}const pd=new cr;class md extends Yc{constructor(t,e=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new no;i.setIndex(new Di(n,1)),i.setAttribute("position",new Di(r,3)),super(i,new Fc({color:e,toneMapped:!1})),this.object=t,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(t){if(void 0!==t&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&pd.setFromObject(this.object),pd.isEmpty())return;const e=pd.min,n=pd.max,r=this.geometry.attributes.position,i=r.array;i[0]=n.x,i[1]=n.y,i[2]=n.z,i[3]=e.x,i[4]=n.y,i[5]=n.z,i[6]=e.x,i[7]=e.y,i[8]=n.z,i[9]=n.x,i[10]=e.y,i[11]=n.z,i[12]=n.x,i[13]=n.y,i[14]=e.z,i[15]=e.x,i[16]=n.y,i[17]=e.z,i[18]=e.x,i[19]=e.y,i[20]=e.z,i[21]=n.x,i[22]=e.y,i[23]=e.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(t){return this.object=t,this.update(),this}copy(t){return Yc.prototype.copy.call(this,t),this.object=t.object,this}}class gd extends Yc{constructor(t,e=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new no;r.setIndex(new Di(n,1)),r.setAttribute("position",new Vi([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),super(r,new Fc({color:e,toneMapped:!1})),this.box=t,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(t){const e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(t))}}class vd extends Wc{constructor(t,e=1,n=16776960){const r=n,i=new no;i.setAttribute("position",new Vi([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3)),i.computeBoundingSphere(),super(i,new Fc({color:r,toneMapped:!1})),this.type="PlaneHelper",this.plane=t,this.size=e;const o=new no;o.setAttribute("position",new Vi([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new bo(o,new Oi({color:r,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(t){let e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.children[0].material.side=e<0?M:w,this.lookAt(this.plane.normal),super.updateMatrixWorld(t)}}const yd=new or;let _d,xd;class bd extends si{constructor(t=new or(0,0,1),e=new or(0,0,0),n=1,r=16776960,i=.2*n,o=.2*i){super(),this.type="ArrowHelper",void 0===_d&&(_d=new no,_d.setAttribute("position",new Vi([0,0,0,0,1,0],3)),xd=new cu(0,.5,1,5,1),xd.translate(0,-.5,0)),this.position.copy(e),this.line=new Wc(_d,new Fc({color:r,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new bo(xd,new Oi({color:r,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}setDirection(t){if(t.y>.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{yd.set(t.z,0,-t.x).normalize();const e=Math.acos(t.y);this.quaternion.setFromAxisAngle(yd,e)}}setLength(t,e=.2*t,n=.2*e){this.line.scale.set(1,Math.max(1e-4,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()}setColor(t){this.line.material.color.set(t),this.cone.material.color.set(t)}copy(t){return super.copy(t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this}}class wd extends Yc{constructor(t=1){const e=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new no;n.setAttribute("position",new Vi(e,3)),n.setAttribute("color",new Vi([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(n,new Fc({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}}const Md=new Float32Array(1),Sd=new Int32Array(Md.buffer),Td={toHalfFloat:function(t){Md[0]=t;const e=Sd[0];let n=e>>16&32768,r=e>>12&2047;const i=e>>23&255;return i<103?n:i>142?(n|=31744,n|=(255==i?0:1)&&8388607&e,n):i<113?(r|=2048,n|=(r>>114-i)+(r>>113-i&1),n):(n|=i-112<<10|r>>1,n+=1&r,n)}},Ed=Math.pow(2,8),Cd=[.125,.215,.35,.446,.526,.582],Ad=5+Cd.length,Pd={[on]:0,[an]:1,[cn]:2,[ln]:3,[hn]:4,[fn]:5,[sn]:6},Ld=new Oi({side:M,depthWrite:!1,depthTest:!1}),Rd=new bo(new Mo,Ld),Od=new Ch,{_lodPlanes:kd,_sizeLods:Id,_sigmas:Dd}=function(){const t=[],e=[],n=[];let r=8;for(let i=0;i<Ad;i++){const o=Math.pow(2,r);e.push(o);let a=1/o;i>4?a=Cd[i-8+4-1]:0==i&&(a=0),n.push(a);const s=1/(o-1),c=-s/2,u=1+s/2,l=[c,c,u,c,u,u,c,c,u,u,c,u],h=6,f=6,d=3,p=2,m=1,g=new Float32Array(d*f*h),v=new Float32Array(p*f*h),y=new Float32Array(m*f*h);for(let t=0;t<h;t++){const e=t%3*2/3-1,n=t>2?0:-1,r=[e,n,0,e+2/3,n,0,e+2/3,n+1,0,e,n,0,e+2/3,n+1,0,e,n+1,0];g.set(r,d*f*t),v.set(l,p*f*t);const i=[t,t,t,t,t,t];y.set(i,m*f*t)}const _=new no;_.setAttribute("position",new Di(g,d)),_.setAttribute("uv",new Di(v,p)),_.setAttribute("faceIndex",new Di(y,m)),t.push(_),r>4&&r--}return{_lodPlanes:t,_sizeLods:e,_sigmas:n}}(),jd=new Ri;let zd=null;const Nd=(1+Math.sqrt(5))/2,Fd=1/Nd,Bd=[new or(1,1,1),new or(-1,1,1),new or(1,1,-1),new or(-1,1,-1),new or(0,Nd,Fd),new or(0,Nd,-Fd),new or(Fd,0,Nd),new or(-Fd,0,Nd),new or(Nd,Fd,0),new or(-Nd,Fd,0)];function Hd(t){const e=Math.max(t.r,t.g,t.b),n=Math.min(Math.max(Math.ceil(Math.log2(e)),-128),127);return t.multiplyScalar(Math.pow(2,-n)),(n+128)/255}class Gd{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._blurMaterial=function(t){const e=new Float32Array(t),n=new or(0,1,0);return new cl({name:"SphericalGaussianBlur",defines:{n:t},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:e},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:n},inputEncoding:{value:Pd[on]},outputEncoding:{value:Pd[on]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:C,depthTest:!1,depthWrite:!1})}(20),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(t,e=0,n=.1,r=100){zd=this._renderer.getRenderTarget();const i=this._allocateTargets();return this._sceneToCubeUV(t,n,r,i),e>0&&this._blur(i,0,0,e),this._applyPMREM(i),this._cleanup(i),i}fromEquirectangular(t){return this._fromTexture(t)}fromCubemap(t){return this._fromTexture(t)}compileCubemapShader(){null===this._cubemapShader&&(this._cubemapShader=qd(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){null===this._equirectShader&&(this._equirectShader=Zd(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),null!==this._cubemapShader&&this._cubemapShader.dispose(),null!==this._equirectShader&&this._equirectShader.dispose();for(let t=0;t<kd.length;t++)kd[t].dispose()}_cleanup(t){this._pingPongRenderTarget.dispose(),this._renderer.setRenderTarget(zd),t.scissorTest=!1,Wd(t,0,0,t.width,t.height)}_fromTexture(t){zd=this._renderer.getRenderTarget();const e=this._allocateTargets(t);return this._textureToCubeUV(t,e),this._applyPMREM(e),this._cleanup(e),e}_allocateTargets(t){const e={magFilter:wt,minFilter:wt,generateMipmaps:!1,type:Ot,format:Jt,encoding:Ud(t)?t.encoding:cn,depthBuffer:!1},n=Vd(e);return n.depthBuffer=!t,this._pingPongRenderTarget=Vd(e),n}_compileMaterial(t){const e=new bo(kd[0],t);this._renderer.compile(e,Od)}_sceneToCubeUV(t,e,n,r){const i=new Po(90,1,e,n),o=[1,-1,1,1,1,1],a=[1,1,1,-1,-1,-1],s=this._renderer,c=s.autoClear,u=s.outputEncoding,l=s.toneMapping;s.getClearColor(jd),s.toneMapping=at,s.outputEncoding=on,s.autoClear=!1;let h=!1;const f=t.background;if(f){if(f.isColor){Ld.color.copy(f).convertSRGBToLinear(),t.background=null;const e=Hd(Ld.color);Ld.opacity=e,h=!0}}else{Ld.color.copy(jd).convertSRGBToLinear();const t=Hd(Ld.color);Ld.opacity=t,h=!0}for(let e=0;e<6;e++){const n=e%3;0==n?(i.up.set(0,o[e],0),i.lookAt(a[e],0,0)):1==n?(i.up.set(0,0,o[e]),i.lookAt(0,a[e],0)):(i.up.set(0,o[e],0),i.lookAt(0,0,a[e])),Wd(r,n*Ed,e>2?Ed:0,Ed,Ed),s.setRenderTarget(r),h&&s.render(Rd,i),s.render(t,i)}s.toneMapping=l,s.outputEncoding=u,s.autoClear=c}_textureToCubeUV(t,e){const n=this._renderer;t.isCubeTexture?null==this._cubemapShader&&(this._cubemapShader=qd()):null==this._equirectShader&&(this._equirectShader=Zd());const r=t.isCubeTexture?this._cubemapShader:this._equirectShader,i=new bo(kd[0],r),o=r.uniforms;o.envMap.value=t,t.isCubeTexture||o.texelSize.value.set(1/t.image.width,1/t.image.height),o.inputEncoding.value=Pd[t.encoding],o.outputEncoding.value=Pd[e.texture.encoding],Wd(e,0,0,3*Ed,2*Ed),n.setRenderTarget(e),n.render(i,Od)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;for(let e=1;e<Ad;e++){const n=Math.sqrt(Dd[e]*Dd[e]-Dd[e-1]*Dd[e-1]),r=Bd[(e-1)%Bd.length];this._blur(t,e-1,e,n,r)}e.autoClear=n}_blur(t,e,n,r,i){const o=this._pingPongRenderTarget;this._halfBlur(t,o,e,n,r,"latitudinal",i),this._halfBlur(o,t,n,n,r,"longitudinal",i)}_halfBlur(t,e,n,r,i,o,a){const s=this._renderer,c=this._blurMaterial;"latitudinal"!==o&&"longitudinal"!==o&&console.error("blur direction must be either latitudinal or longitudinal!");const u=new bo(kd[r],c),l=c.uniforms,h=Id[n]-1,f=isFinite(i)?Math.PI/(2*h):2*Math.PI/39,d=i/f,p=isFinite(i)?1+Math.floor(3*d):20;p>20&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${p} samples when the maximum is set to 20`);const m=[];let g=0;for(let t=0;t<20;++t){const e=t/d,n=Math.exp(-e*e/2);m.push(n),0==t?g+=n:t<p&&(g+=2*n)}for(let t=0;t<m.length;t++)m[t]=m[t]/g;l.envMap.value=t.texture,l.samples.value=p,l.weights.value=m,l.latitudinal.value="latitudinal"===o,a&&(l.poleAxis.value=a),l.dTheta.value=f,l.mipInt.value=8-n,l.inputEncoding.value=Pd[t.texture.encoding],l.outputEncoding.value=Pd[t.texture.encoding];const v=Id[r];Wd(e,3*Math.max(0,Ed-2*v),(0===r?0:2*Ed)+2*v*(r>4?r-8+4:0),3*v,2*v),s.setRenderTarget(e),s.render(u,Od)}}function Ud(t){return void 0!==t&&t.type===Ot&&(t.encoding===on||t.encoding===an||t.encoding===sn)}function Vd(t){const e=new nr(3*Ed,3*Ed,t);return e.texture.mapping=vt,e.texture.name="PMREM.cubeUv",e.scissorTest=!0,e}function Wd(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function Zd(){const t=new Yn(1,1);return new cl({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:t},inputEncoding:{value:Pd[on]},outputEncoding:{value:Pd[on]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform vec2 texelSize;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tvec2 f = fract( uv / texelSize - 0.5 );\n\t\t\t\tuv -= f * texelSize;\n\t\t\t\tvec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x += texelSize.x;\n\t\t\t\tvec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.y += texelSize.y;\n\t\t\t\tvec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x -= texelSize.x;\n\t\t\t\tvec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\n\t\t\t\tvec3 tm = mix( tl, tr, f.x );\n\t\t\t\tvec3 bm = mix( bl, br, f.x );\n\t\t\t\tgl_FragColor.rgb = mix( tm, bm, f.y );\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:C,depthTest:!1,depthWrite:!1})}function qd(){return new cl({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:Pd[on]},outputEncoding:{value:Pd[on]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb;\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:C,depthTest:!1,depthWrite:!1})}const Yd=0,Jd=1,Xd=0,$d=1,Qd=2;function Kd(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function tp(t=[]){return console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function ep(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new eu(t,e)}function np(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new _c(t)}function rp(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new eu(t,e)}function ip(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Xc(t)}function op(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Xc(t)}function ap(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Xc(t)}function sp(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new or(t,e,n)}function cp(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new Di(t,e).setUsage(In)}function up(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new ji(t,e)}function lp(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new zi(t,e)}function hp(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new Ni(t,e)}function fp(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new Fi(t,e)}function dp(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Bi(t,e)}function pp(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new Hi(t,e)}function mp(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Gi(t,e)}function gp(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Vi(t,e)}function vp(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Wi(t,e)}function yp(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new wd(t)}function _p(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new md(t,e)}function xp(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Yc(new gu(t.geometry),new Fc({color:void 0!==e?e:16777215}))}function bp(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Yc(new ol(t.geometry),new Fc({color:void 0!==e?e:16777215}))}function wp(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Nl(t)}function Mp(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Ul(t)}function Sp(t,e,n){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new Oo(t,n)}function Tp(){console.error("THREE.CanvasRenderer has been removed")}function Ep(){console.error("THREE.JSONLoader has been removed.")}Wl.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Wl.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},fh.prototype.fromPoints=function(t){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)},id.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Qf.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},jl.prototype.extractUrlBase=function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Dh.extractUrlBase(t)},jl.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},Gf.prototype.center=function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},Gf.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Gf.prototype.isIntersectionBox=function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},Gf.prototype.size=function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)},cr.prototype.center=function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},cr.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},cr.prototype.isIntersectionBox=function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},cr.prototype.isIntersectionSphere=function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},cr.prototype.size=function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)},Cr.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},jo.prototype.setFromMatrix=function(t){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(t)},Wf.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},qn.random16=function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},qn.nearestPowerOfTwo=function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),qn.floorPowerOfTwo(t)},qn.nextPowerOfTwo=function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),qn.ceilPowerOfTwo(t)},Jn.prototype.flattenToArrayOffset=function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},Jn.prototype.multiplyVector3=function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},Jn.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},Jn.prototype.applyToBufferAttribute=function(t){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},Jn.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},Jn.prototype.getInverse=function(t){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(t).invert()},jr.prototype.extractPosition=function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},jr.prototype.flattenToArrayOffset=function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},jr.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new or).setFromMatrixColumn(this,3)},jr.prototype.setRotationFromQuaternion=function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},jr.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},jr.prototype.multiplyVector3=function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},jr.prototype.multiplyVector4=function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},jr.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},jr.prototype.rotateAxis=function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},jr.prototype.crossVector=function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},jr.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},jr.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},jr.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},jr.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},jr.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},jr.prototype.applyToBufferAttribute=function(t){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},jr.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},jr.prototype.makeFrustum=function(t,e,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,r,n,i,o)},jr.prototype.getInverse=function(t){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(t).invert()},hi.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},ir.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},ir.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},Dr.prototype.isIntersectionBox=function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},Dr.prototype.isIntersectionPlane=function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},Dr.prototype.isIntersectionSphere=function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},wi.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},wi.prototype.barycoordFromPoint=function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},wi.prototype.midpoint=function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},wi.prototypenormal=function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},wi.prototype.plane=function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)},wi.barycoordFromPoint=function(t,e,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),wi.getBarycoord(t,e,n,r,i)},wi.normal=function(t,e,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),wi.getNormal(t,e,n,r)},dh.prototype.extractAllPoints=function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},dh.prototype.extrude=function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Wu(this,t)},dh.prototype.makeGeometry=function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Qu(this,t)},Yn.prototype.fromAttribute=function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},Yn.prototype.distanceToManhattan=function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},Yn.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},or.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},or.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},or.prototype.getPositionFromMatrix=function(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},or.prototype.getScaleFromMatrix=function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},or.prototype.getColumnFromMatrix=function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,t)},or.prototype.applyProjection=function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},or.prototype.fromAttribute=function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},or.prototype.distanceToManhattan=function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},or.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},er.prototype.fromAttribute=function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},er.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},si.prototype.getChildByName=function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},si.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},si.prototype.translate=function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},si.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},si.prototype.applyMatrix=function(t){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(t)},Object.defineProperties(si.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),bo.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")},Object.defineProperties(bo.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),en},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),Pc.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},Object.defineProperty(Wl.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Po.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(ph.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(Di.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===In},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(In)}}}),Di.prototype.setDynamic=function(t){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===t?In:kn),this},Di.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},Di.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},no.prototype.addIndex=function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},no.prototype.addAttribute=function(t,e){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):this.setAttribute(t,e):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(t,new Di(arguments[1],arguments[2])))},no.prototype.addDrawCall=function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},no.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},no.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},no.prototype.removeAttribute=function(t){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(t)},no.prototype.applyMatrix=function(t){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(t)},Object.defineProperties(no.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.defineProperties(jh.prototype,{maxInstancedCount:{get:function(){return console.warn("THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount."),this.instanceCount},set:function(t){console.warn("THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount."),this.instanceCount=t}}}),Object.defineProperties(jf.prototype,{linePrecision:{get:function(){return console.warn("THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead."),this.params.Line.threshold},set:function(t){console.warn("THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead."),this.params.Line.threshold=t}}}),Object.defineProperties(nc.prototype,{dynamic:{get:function(){return console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."),this.usage===In},set:function(t){console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."),this.setUsage(t)}}}),nc.prototype.setDynamic=function(t){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===t?In:kn),this},nc.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Wu.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},Wu.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},Wu.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},ec.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},kf.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this},Object.defineProperties(Si.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new Ri}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===T}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(t){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=t}}}),Object.defineProperties(ll.prototype,{transparency:{get:function(){return console.warn("THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission."),this.transmission},set:function(t){console.warn("THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission."),this.transmission=t}}}),Object.defineProperties(Co.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),$s.prototype.clearTarget=function(t,e,n,r){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(t),this.clear(e,n,r)},$s.prototype.animate=function(t){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(t)},$s.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},$s.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},$s.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},$s.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},$s.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},$s.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},$s.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},$s.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},$s.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},$s.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},$s.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},$s.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},$s.prototype.enableScissorTest=function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},$s.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},$s.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},$s.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},$s.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},$s.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},$s.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},$s.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},$s.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},$s.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},$s.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties($s.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(t){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===t?an:on}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}}),Object.defineProperties(Gs.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(nr.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),lf.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");const e=this;return(new Xh).load(t,(function(t){e.setBuffer(t)})),this},gf.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Lo.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)},Lo.prototype.clear=function(t,e,n,r){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(t,e,n,r)},$n.crossOrigin=void 0,$n.loadTexture=function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");const i=new Vl;i.setCrossOrigin(this.crossOrigin);const o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},$n.loadTextureCube=function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");const i=new Gl;i.setCrossOrigin(this.crossOrigin);const o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},$n.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},$n.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};const Cp={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};function Ap(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")}"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:h}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=h);var Pp=n("f7eb"),Lp={name:"Spin",props:{visible:Boolean},render:function(t,e){var n=arguments[0];return n("div",{class:"sk-chase-box"},[this.visible?null:n("div",{class:"sk-chase-core"},[n("div",{class:"sk-chase"},[n("div",{class:"sk-chase-dot"}),n("div",{class:"sk-chase-dot"}),n("div",{class:"sk-chase-dot"}),n("div",{class:"sk-chase-dot"}),n("div",{class:"sk-chase-dot"}),n("div",{class:"sk-chase-dot"})])]),this.$slots.default])}};n("93b5");var Rp=function(t,e,n,r,i,o,a,s){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,c):[c]}return{exports:t,options:u}}(Lp,void 0,void 0,!1,null,"c8c2036e",null).exports,Op=n("a7fe"),kp=n.n(Op),Ip=(n("9b2d"),n("5eb3")),Dp=n.n(Ip),jp=n("8179"),zp=n.n(jp),Np=n("9192"),Fp=n.n(Np),Bp=n("66da"),Hp=n.n(Bp),Gp=kp.a.createStore(zp.a,Hp.a);function Up(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Vp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Wp(t){return(Wp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Zp(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Wp(t)););return t}function qp(){return(qp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Zp(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Yp(t,e){return(Yp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Jp(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Yp(t,e)}kp.a.createStore(Dp.a,Hp.a),kp.a.createStore(Fp.a,Hp.a),n("affe"),n("4ecc"),n("29f7"),n("cce4"),n("1a1d"),n("f56c"),n("a64e"),n("4fdb"),n("8270"),n("1b49"),n("29fd");var Xp=n("ada0"),$p=n.n(Xp);function Qp(t,e){if(e&&("object"===$p()(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Kp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Wp(t);if(e){var i=Wp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Qp(this,n)}}n("c8b4"),n("570c"),n("94b8"),n("ac49"),n("af71");var tm=6371008.8,em={centimeters:100*tm,centimetres:100*tm,degrees:tm/111325,feet:3.28084*tm,inches:39.37*tm,kilometers:tm/1e3,kilometres:tm/1e3,meters:tm,metres:tm,miles:tm/1609.344,millimeters:1e3*tm,millimetres:1e3*tm,nauticalmiles:tm/1852,radians:1,yards:1.0936*tm};function nm(t){return t%360*Math.PI/180}function rm(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}var im=function(t,e,n){void 0===n&&(n={});var r=rm(t),i=rm(e),o=nm(i[1]-r[1]),a=nm(i[0]-r[0]),s=nm(r[1]),c=nm(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(c);return function(t,e){void 0===e&&(e="kilometers");var n=em[e];if(!n)throw new Error(e+" units is invalid");return t*n}(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),n.units)};function om(t,e,n){var r=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var i=0,o=e.length-1;i<e.length;o=i++){var a=e[i][0],s=e[i][1],c=e[o][0],u=e[o][1];if(t[1]*(a-c)+s*(c-t[0])+u*(t[0]-a)==0&&(a-t[0])*(c-t[0])<=0&&(s-t[1])*(u-t[1])<=0)return!n;s>t[1]!=u>t[1]&&t[0]<(c-a)*(t[1]-s)/(u-s)+a&&(r=!r)}return r}var am=function(){function t(){i(this,t),this.type="gisCommon"}return a(t,null,[{key:"getTexture",value:function(t,e,n,r){var i=t.getContext("2d");i.drawImage(e,n,r);var o=new Kn(i.getImageData(0,0,t.width,t.height));return o.minFilter=Ct,o.generateMipmaps=!1,o.needsUpdate=!0,o}},{key:"getTexture1",value:function(t,e,n,r,i,o){var a=t.getContext("2d");a.drawImage(e,n,r,i,o);var s=new Kn(a.getImageData(0,0,t.width,t.height));return s.minFilter=Ct,s.generateMipmaps=!1,s.needsUpdate=!0,s}},{key:"addImageProcess",value:function(t){return new Promise((function(e,n){var r=document.createElement("img");r.onload=function(){return e(r)},r.onerror=n,r.setAttribute("src","data:image/svg+xml;base64,"+window.btoa(unescape(encodeURIComponent(t))))}))}},{key:"containsCoordinate1",value:function(t,e){var n={type:"Feature",properties:{},geometry:{type:"Point",coordinates:[e.getCenter().x,e.getCenter().y]}};return 1e3*im(n,{type:"Feature",properties:{},geometry:{type:"Point",coordinates:t}},"kilometers")<e.getRadius()}},{key:"containsCoordinate2",value:function(t,e){return function(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var r=rm(t),i=function(t){return"Feature"===t.type?t.geometry:t}(e),o=i.type,a=e.bbox,s=i.coordinates;if(a&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(r,a))return!1;"Polygon"===o&&(s=[s]);for(var c=!1,u=0;u<s.length&&!c;u++)if(om(r,s[u][0],n.ignoreBoundary)){for(var l=!1,h=1;h<s[u].length&&!l;)om(r,s[u][h],!n.ignoreBoundary)&&(l=!0),h++;l||(c=!0)}return c}({type:"Feature",geometry:{type:"Point",coordinates:t}},{type:"Feature",geometry:{type:"Polygon",coordinates:e.geometry.coordinates[0]}})}},{key:"containsCoordinate",value:function(t,e){var n,r;Array.isArray(t)?(n=t[0],r=t[1]):t instanceof Pp.Coordinate&&(n=t.x,r=t.y);var i=e.xmin,o=e.ymin,a=e.xmax,s=e.ymax;return i<=n&&n<=a&&o<=r&&r<=s}},{key:"isInLevels",value:function(t,e){for(var n=!1,r=0;r<t.rangeArr.length;r+=2){var i=1*t.rangeArr[r],o=1*t.rangeArr[r+1];if(e>i&&e<=o){n=!0;break}}return n}},{key:"getExtent",value:function(t){if(0!==t.length){var e=1/0,n=1/0,r=-1/0,i=-1/0;return 1===t.length?(e=1*t[0].longitude-.5,n=1*t[0].latitude-.5,r=1*t[0].longitude+.5,i=1*t[0].latitude+.5):t.length>1&&t.slice(0,1/0).map((function(t){var o=1*t.longitude,a=1*t.latitude;e=Math.min(e,o),n=Math.min(n,a),r=Math.max(r,o),i=Math.max(i,a)})),{minX:e,minY:n,maxX:r,maxY:i}}}},{key:"vector2Pixel",value:function(t,e,n){var r=t.project(n),i=e.width/2,o=e.height/2;return{x:Math.round(r.x*i+i),y:Math.round(-r.y*o+o)}}},{key:"generateTexture",value:function(t){var e=[64,128,256,512,1024],n=-1/0,r=-1/0;t.forEach((function(t){n=Math.max(n,t.w),r=Math.max(n,t.h)})),console.log(r);var i=Math.sqrt(t.length),o=parseInt(i);i>o&&(o+=1),i=o,console.log(i);for(var a=i*n+5*i,s=0,c=0;c<e.length;c++){if(a<e[c]){s=e[c];break}s=1024}var u=document.createElement("canvas");u.width=u.height=s;for(var l=u.getContext("2d"),h=0,f=0,d=[],p=0;p<i;p++){for(var m=5*(p+1)+p*h,g=0;g<i;g++){var v=5*(g+1)+g*t[f].w;if("img"===t[f].type){var y=(t[f].w-t[f].iw)/2,_=(t[f].h-t[f].ih)/2;l.drawImage(t[f].src,v+y,m+_,t[f].iw,t[f].ih)}else if("txt"===t[f].type)l.fillStyle=t[f].color,"#fff"===t[f].color?(l.font="lighter "+t[f].size+"px Microsoft YaHei",l.fillText(t[f].src,v+t[f].offx,m+t[f].offy),l.strokeStyle=t[f].color,l.strokeText(t[f].src,v+t[f].offx,m+t[f].offy)):(l.font="normal "+t[f].size+"px Microsoft YaHei",l.fillText(t[f].src,v+t[f].offx,m+t[f].offy));else{var x=(t[f].w-t[f].iw)/2,b=(t[f].h-t[f].ih)/2;l.drawImage(t[f].src,v+x,m+b,t[f].iw,t[f].ih)}if(d.push({w:t[f].w,h:t[f].h,u:v/s,v:m/s}),console.log(v,m),h=Math.max(h,t[f].h),(f+=1)>=t.length)break}if(f>=t.length)break}var w=new Kn(l.getImageData(0,0,u.width,u.height));if(w.minFilter=Ct,w.generateMipmaps=!1,w.needsUpdate=!0,d.length<100)for(var M=100-d.length,S=0;S<M;S++)d.push({w:0,h:0,u:0,v:0});return{xys:d,texture:w,textureSize:s}}},{key:"createSimpleShader",value:function(t,e,n){return t.uniforms.texture1={value:e},t.uniforms.size1={value:n},t.uniforms.flag={value:1},t.vertexShader="uniform float size1;\n attribute float imgflag;\n varying float vimgflag;\n attribute float visibility;\n varying float vVisible;\n "+t.vertexShader,t.vertexShader=t.vertexShader.replace("#include <project_vertex>","\n #include <project_vertex>\n vimgflag = imgflag;\n vVisible = visibility;\n ").replace("gl_PointSize = size;","\n gl_PointSize = size1;\n "),t.fragmentShader="\n uniform sampler2D texture1;\n varying float vimgflag;\n varying float vVisible;\n "+t.fragmentShader,t.fragmentShader=t.fragmentShader.replace("gl_FragColor = vec4( outgoingLight, diffuseColor.a );","\n\n vec2 pUv = gl_PointCoord;\n pUv.y = 1. - pUv.y;\n\n if(vimgflag < 1.0){\n vec4 texColor = texture2D( texture1, pUv );\n outgoingLight *= texColor.xyz;\n gl_FragColor = vec4( outgoingLight, texColor.a * diffuseColor.a );\n }\n\n if (vVisible < 0.5) discard;\n "),t}}]),t}();function sm(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function cm(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return sm(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sm(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function um(t,e){var n=t.minx,r=t.miny,i=t.maxx,o=t.maxy,a=cm(e,2),s=a[0],c=a[1];return n<=s&&s<=i&&r<=c&&c<=o}n("55c9"),n("9460"),n("72ae"),n("bcad"),n("94c2");var lm=function(){function t(e,n,r,o){i(this,t),this.minlng=e,this.minlat=n,this.maxlng=r,this.maxlat=o,this.minx=1/0,this.miny=1/0,this.maxx=-1/0,this.maxy=-1/0,this.coordinates=[],this.positions=[],this.indexs=[],this.key=null}return a(t,[{key:"updateBBoxPixel",value:function(t){var e=1/0,n=1/0,r=-1/0,i=-1/0,o=this.minlng,a=this.minlat,s=this.maxlng,c=this.maxlat;return[[o,a],[o,c],[s,a],[s,c]].map((function(t){return new Pp.Coordinate(t)})).map((function(e){return t.coordToContainerPoint(e)})).forEach((function(t){e=Math.min(e,t.x),n=Math.min(n,t.y),r=Math.max(r,t.x),i=Math.max(i,t.y)})),this.minx=e,this.miny=n,this.maxx=r,this.maxy=i,this}},{key:"containsCoordinate",value:function(t){var e,n;Array.isArray(t)?(e=t[0],n=t[1]):t instanceof Pp.Coordinate&&(e=t.x,n=t.y);var r=this.minlng,i=this.minlat,o=this.maxlng,a=this.maxlat;return r<=e&&e<=o&&i<=n&&n<=a}},{key:"isRecCross",value:function(t,e){var n=t.x,r=t.y,i={minx:n-e/2,miny:r-e/2,maxx:n+e/2,maxy:r+e/2},o=i.minx,a=i.miny,s=i.maxx,c=i.maxy;return!!(um(this,[o,a])||um(this,[o,c])||um(this,[s,a])||um(this,[s,c])||um(i,[this.minx,this.miny])||um(i,[this.minx,this.maxy])||um(i,[this.maxx,this.miny])||um(i,[this.maxx,this.maxy]))}}],[{key:"initGrids",value:function(e,n,r,i){for(var o=[],a=(r-e)/30,s=(i-n)/30,c=e,u=n,l=0;l<30;l++){c=e+l*a;for(var h=0;h<30;h++){var f=new t(c,u=n+h*s,c+a,u+s);f.key=h+"-"+l,o.push(f)}}return o}}]),t}();const hm=parseInt(h.replace("dev",""));function fm(t,e,n){return hm>109?t.setAttribute(e,n):t.addAttribute(e,n),t}function dm(){return Qd||!0}console.log("maptalks.three log: current three.js version is %c"+hm,"color:red;font-size: 16px;font-weight: bold;");var pm=class extends jh{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry",this.setIndex([0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5]),fm(this,"position",new Vi([-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],3)),fm(this,"uv",new Vi([-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],2))}applyMatrix(t){var e=this.attributes.instanceStart,n=this.attributes.instanceEnd;return void 0!==e&&(t.applyToBufferAttribute(e),t.applyToBufferAttribute(n),e.data.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}setPositions(t){var e;t instanceof Float32Array?e=t:Array.isArray(t)&&(e=new Float32Array(t));var n=new If(e,6,1);return fm(this,"instanceStart",new ic(n,3,0)),fm(this,"instanceEnd",new ic(n,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(t){var e;t instanceof Float32Array?e=t:Array.isArray(t)&&(e=new Float32Array(t));var n=new If(e,6,1);return fm(this,"instanceColorStart",new ic(n,3,0)),fm(this,"instanceColorEnd",new ic(n,3,3)),this}fromWireframeGeometry(t){return this.setPositions(t.attributes.position.array),this}fromEdgesGeometry(t){return this.setPositions(t.attributes.position.array),this}fromMesh(t){return this.fromWireframeGeometry(new ol(t.geometry)),this}fromLineSegements(t){var e=t.geometry;return e.isGeometry?this.setPositions(e.vertices):e.isBufferGeometry&&this.setPositions(e.position.array),this}computeBoundingBox(){var t=new cr;null===this.boundingBox&&(this.boundingBox=new cr);var e=this.attributes.instanceStart,n=this.attributes.instanceEnd;void 0!==e&&void 0!==n&&(this.boundingBox.setFromBufferAttribute(e),t.setFromBufferAttribute(n),this.boundingBox.union(t))}computeBoundingSphere(){var t=new or;null===this.boundingSphere&&(this.boundingSphere=new Cr),null===this.boundingBox&&this.computeBoundingBox();var e=this.attributes.instanceStart,n=this.attributes.instanceEnd;if(void 0!==e&&void 0!==n){var r=this.boundingSphere.center;this.boundingBox.getCenter(r);for(var i=0,o=0,a=e.count;o<a;o++)t.fromBufferAttribute(e,o),i=Math.max(i,r.distanceToSquared(t)),t.fromBufferAttribute(n,o),i=Math.max(i,r.distanceToSquared(t));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}copy(t){return this}};const mm={},gm={};mm.line={linewidth:{value:1},resolution:{value:new Yn(1,1)},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}},gm.line={uniforms:Eo.merge([Ho.common,Ho.fog,mm.line]),vertexShader:"\n\t\t#include <common>\n\t\t#include <color_pars_vertex>\n\t\t#include <fog_pars_vertex>\n\t\t#include <logdepthbuf_pars_vertex>\n\t\t#include <clipping_planes_pars_vertex>\n\n\t\tuniform float linewidth;\n\t\tuniform vec2 resolution;\n\n\t\tattribute vec3 instanceStart;\n\t\tattribute vec3 instanceEnd;\n\n\t\tattribute vec3 instanceColorStart;\n\t\tattribute vec3 instanceColorEnd;\n\n\t\tvarying vec2 vUv;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashScale;\n\t\t\tattribute float instanceDistanceStart;\n\t\t\tattribute float instanceDistanceEnd;\n\t\t\tvarying float vLineDistance;\n\n\t\t#endif\n\n\t\tvoid trimSegment( const in vec4 start, inout vec4 end ) {\n\n\t\t\t// trim end segment so it terminates between the camera plane and the near plane\n\n\t\t\t// conservative estimate of the near plane\n\t\t\tfloat a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column\n\t\t\tfloat b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column\n\t\t\tfloat nearEstimate = - 0.5 * b / a;\n\n\t\t\tfloat alpha = ( nearEstimate - start.z ) / ( end.z - start.z );\n\n\t\t\tend.xyz = mix( start.xyz, end.xyz, alpha );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\t#ifdef USE_COLOR\n\n\t\t\t\tvColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;\n\n\t\t\t#endif\n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tvLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;\n\n\t\t\t#endif\n\n\t\t\tfloat aspect = resolution.x / resolution.y;\n\n\t\t\tvUv = uv;\n\n\t\t\t// camera space\n\t\t\tvec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );\n\t\t\tvec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );\n\n\t\t\t// special case for perspective projection, and segments that terminate either in, or behind, the camera plane\n\t\t\t// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space\n\t\t\t// but we need to perform ndc-space calculations in the shader, so we must address this issue directly\n\t\t\t// perhaps there is a more elegant solution -- WestLangley\n\n\t\t\tbool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column\n\n\t\t\tif ( perspective ) {\n\n\t\t\t\tif ( start.z < 0.0 && end.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( start, end );\n\n\t\t\t\t} else if ( end.z < 0.0 && start.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( end, start );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// clip space\n\t\t\tvec4 clipStart = projectionMatrix * start;\n\t\t\tvec4 clipEnd = projectionMatrix * end;\n\n\t\t\t// ndc space\n\t\t\tvec2 ndcStart = clipStart.xy / clipStart.w;\n\t\t\tvec2 ndcEnd = clipEnd.xy / clipEnd.w;\n\n\t\t\t// direction\n\t\t\tvec2 dir = ndcEnd - ndcStart;\n\n\t\t\t// account for clip-space aspect ratio\n\t\t\tdir.x *= aspect;\n\t\t\tdir = normalize( dir );\n\n\t\t\t// perpendicular to dir\n\t\t\tvec2 offset = vec2( dir.y, - dir.x );\n\n\t\t\t// undo aspect ratio adjustment\n\t\t\tdir.x /= aspect;\n\t\t\toffset.x /= aspect;\n\n\t\t\t// sign flip\n\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\n\t\t\t// endcaps\n\t\t\tif ( position.y < 0.0 ) {\n\n\t\t\t\toffset += - dir;\n\n\t\t\t} else if ( position.y > 1.0 ) {\n\n\t\t\t\toffset += dir;\n\n\t\t\t}\n\n\t\t\t// adjust for linewidth\n\t\t\toffset *= linewidth;\n\n\t\t\t// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...\n\t\t\toffset /= resolution.y;\n\n\t\t\t// select end\n\t\t\tvec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;\n\n\t\t\t// back to clip space\n\t\t\toffset *= clip.w;\n\n\t\t\tclip.xy += offset;\n\n\t\t\tgl_Position = clip;\n\n\t\t\tvec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation\n\n\t\t\t#include <logdepthbuf_vertex>\n\t\t\t#include <clipping_planes_vertex>\n\t\t\t#include <fog_vertex>\n\n\t\t}\n\t\t",fragmentShader:"\n\t\tuniform vec3 diffuse;\n\t\tuniform float opacity;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashSize;\n\t\t\tuniform float gapSize;\n\n\t\t#endif\n\n\t\tvarying float vLineDistance;\n\n\t\t#include <common>\n\t\t#include <color_pars_fragment>\n\t\t#include <fog_pars_fragment>\n\t\t#include <logdepthbuf_pars_fragment>\n\t\t#include <clipping_planes_pars_fragment>\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\t#include <clipping_planes_fragment>\n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tif ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps\n\n\t\t\t\tif ( mod( vLineDistance, dashSize + gapSize ) > dashSize ) discard; // todo - FIX\n\n\t\t\t#endif\n\n\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\tfloat a = vUv.x;\n\t\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t\tfloat len2 = a * a + b * b;\n\n\t\t\t\tif ( len2 > 1.0 ) discard;\n\n\t\t\t}\n\n\t\t\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\t\t\t#include <logdepthbuf_fragment>\n\t\t\t#include <color_fragment>\n\n\t\t\tgl_FragColor = vec4( diffuseColor.rgb, diffuseColor.a );\n\n\t\t\t#include <premultiplied_alpha_fragment>\n\t\t\t#include <tonemapping_fragment>\n\t\t\t#include <encodings_fragment>\n\t\t\t#include <fog_fragment>\n\n\t\t}\n\t\t"};var vm=class extends Co{constructor(t){super({uniforms:Eo.clone(gm.line.uniforms),vertexShader:gm.line.vertexShader,fragmentShader:gm.line.fragmentShader}),this.dashed=!0,this.isLineMaterial=!0,this.type="LineMaterial",Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(t){this.uniforms.diffuse.value=t}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(t){this.uniforms.linewidth.value=t}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(t){this.uniforms.dashScale.value=t}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(t){this.uniforms.dashSize.value=t}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(t){this.uniforms.gapSize.value=t}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(t){this.uniforms.resolution.value.copy(t)}}}),this.setValues(t)}},ym=class extends bo{constructor(t,e){super(t,e),this.isLineSegments2=!0,this.type="LineSegments2",this.geometry=void 0!==t?t:new pm,this.material=void 0!==e?e:new vm({color:16777215*Math.random()})}computeLineDistances(){for(var t=new or,e=new or,n=this.geometry,r=n.attributes.instanceStart,i=n.attributes.instanceEnd,o=new Float32Array(2*r.data.count),a=0,s=0,c=r.data.count;a<c;a++,s+=2)t.fromBufferAttribute(r,a),e.fromBufferAttribute(i,a),o[s]=0===s?0:o[s-1],o[s+1]=o[s]+t.distanceTo(e);var u=new If(o,2,1);return fm(n,"instanceDistanceStart",new ic(u,1,0)),fm(n,"instanceDistanceEnd",new ic(u,1,1)),this}},_m=class extends pm{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}fromLine(t){var e=t.geometry;return e.isGeometry?this.setPositions(e.vertices):e.isBufferGeometry&&this.setPositions(e.position.array),this}},xm=class extends ym{constructor(t,e){super(t,e),this.isLine2=!0,this.type="Line2",this.geometry=void 0!==t?t:new _m,this.material=void 0!==e?e:new vm({color:16777215*Math.random()})}copy(t){return this}};const bm={interactive:!0,altitude:0,minZoom:0,maxZoom:30,asynchronous:!1};function wm(){}class Mm extends(Pp.Eventable(wm)){constructor(t){super(),this.isAdd=!1,this._mouseover=!1,this._visible=!0,this._zoomVisible=!0,this.picked=!1,this.isBaseObject=!0,void 0===t&&(t=Pp.Util.GUID()),this.id=t}addTo(t){return t&&"ThreeLayer"===t.type?t.addMesh([this]):console.error("layer only support maptalks.ThreeLayer"),this}remove(){const t=this.getLayer();return t&&t.removeMesh([this]),this}getObject3d(){return this.object3d}getId(){return this.id}setId(t){const e=this.getId();return this.id=t,this._fire("idchange",{old:e,new:t,target:this}),this}getType(){return this.type}getOptions(){return this.options}getProperties(){return(this.options||{}).properties}setProperties(t){const e=Object.assign({},this.getProperties());return this.options.properties=t,this._fire("propertieschange",{old:e,new:t,target:this}),this}getLayer(){return this.options.layer}getMap(){const t=this.getLayer();if(t)return t.getMap()}getCenter(){const t=this.getOptions(),{coordinate:e,lineString:n,polygon:r}=t;if(e)return e instanceof Pp.Coordinate?e:new Pp.Coordinate(e);{const t=r||n;if(t&&t.getCenter)return t.getCenter()}}getAltitude(){return this.getOptions().altitude}setAltitude(t){if(Pp.Util.isNumber(t)){const e=this.getLayer().distanceToVector3(t,t).x;if(this.getObject3d().position.z=e,this.options.altitude=t,this.pickObject3d&&(this.pickObject3d.position.z=e),this._baseObjects&&Array.isArray(this._baseObjects))for(let t=0,n=this._baseObjects.length;t<n;t++)this._baseObjects[t]&&(this._baseObjects[t].getObject3d().position.z=e)}return this}show(){return this._zoomVisible&&(this.getObject3d().visible=!0,this._fire("show")),this._visible=!0,this}hide(){return this.getObject3d().visible=!1,this._fire("hide"),this._visible=!1,this}isVisible(){return!!this.getObject3d().visible}getSymbol(){return this.getObject3d().material}setSymbol(t){if(t&&t instanceof Si){t.needsUpdate=!0,t.vertexColors=this.getObject3d().material.vertexColors;const e=this.getObject3d().material.clone();this.getObject3d().material=t,this._fire("symbolchange",{old:e,new:t,target:this})}return this}setInfoWindow(t){return this.removeInfoWindow(),this.infoWindow=new Pp.ui.InfoWindow(t),this.infoWindow.addTo(this),this}getInfoWindow(){return this.infoWindow}openInfoWindow(t){return(t=t||this.getCenter())instanceof Pp.Coordinate||(t=new Pp.Coordinate(t)),t&&this.infoWindow&&this.infoWindow.show(t),this}closeInfoWindow(){return this.infoWindow&&this.infoWindow.hide(),this}removeInfoWindow(){return this.infoWindow&&(this.infoWindow.remove(),delete this.infoWindow),this}setToolTip(t,e){return this.removeToolTip(),this.toolTip=new Pp.ui.ToolTip(t,e),this.toolTip.addTo(this),this}getToolTip(){return this.toolTip}openToolTip(t){return(t=t||this.getCenter())instanceof Pp.Coordinate||(t=new Pp.Coordinate(t)),t&&this.toolTip&&this.toolTip.show(t),this}closeToolTip(){return this.toolTip&&this.toolTip.hide(),this}removeToolTip(){return this.toolTip&&(this.toolTip.remove(),delete this.toolTip),this}animateShow(t={},e){this._showPlayer&&this._showPlayer.cancel(),Pp.Util.isFunction(t)&&(e=t={});const n=t.duration||1e3,r=t.easing||"out",i=this._showPlayer=Pp.animation.Animation.animate({scale:1},{duration:n,easing:r},t=>{const n=t.styles.scale;n>0&&(this.getObject3d().scale.z=n),e&&e(t,n)});return i.play(),i}getMinZoom(){return this.getOptions().minZoom}getMaxZoom(){return this.getOptions().maxZoom}isAsynchronous(){return this.getOptions().asynchronous}fire(t,e){return this._fire(t,e),this._vt&&this._vt.onSelectMesh&&this._vt.onSelectMesh(t,e),this}config(){return this}setPickObject3d(t){return this.pickObject3d=t,this.pickObject3d.__parent=this,this}_initOptions(t){return this.options=Pp.Util.extend({},bm,t),this}_createMesh(t,e){return this.object3d=new bo(t,e),this.object3d.__parent=this,this}_createGroup(){return this.object3d=new qs,this.object3d.__parent=this,this}_createLine(t,e){return this.object3d=new Wc(t,e),this.object3d.computeLineDistances(),this.object3d.__parent=this,this}_createLine2(t,e){return this.object3d=new xm(t,e),this.object3d.computeLineDistances(),this.object3d.__parent=this,this}_createPoints(t,e){return this.object3d=new eu(t,e),this.object3d.__parent=this,this}_createLineSegments(t,e){return this.object3d=new Yc(t,e),this.object3d.computeLineDistances(),this.object3d.__parent=this,this}}var Sm=Mm;function Tm(t){const{position:e,normal:n,uv:r,indices:i}=Em(t),o=new no,a=new Float32Array(e.length);return a.fill(1,0,e.length),fm(o,"color",new Di(a,3)),fm(o,"normal",new Di(n,3)),fm(o,"position",new Di(e,3)),r&&r.length&&fm(o,"uv",new Di(r,2)),o.setIndex(new Di(i,1)),o}function Em(t){const e={},n={};for(let r=0;r<t.length;++r){const i=t[r];for(const t in i)void 0===e[t]&&(e[t]=[],n[t]=0),e[t].push(i[t]),n[t]+=i[t].length}const r={};let i=0;const o=new Uint32Array(n.indices);for(const t in e)if("indices"===t){const n=e[t];let r=0;for(let t=0,a=n.length;t<a;t++){const a=n[t];for(let t=0,e=a.length;t<e;t++)o[r]=a[t]+i,r++;i+=e.position[t].length/3}}else{const i=Cm(e[t],n[t]);if(!i)return null;r[t]=i}return r.indices=o,r}function Cm(t,e){const n=new Float32Array(e);let r=0;for(let e=0;e<t.length;++e)n.set(t[e],r),r+=t[e].length;return n}function Am(t){const{position:e,normal:n,uv:r,indices:i}=t,o=new no;return fm(o,"normal",new Di(new Float32Array(n),3)),fm(o,"position",new Di(new Float32Array(e),3)),fm(o,"uv",new Di(new Float32Array(r),2)),o.setIndex(new Di(new Uint32Array(i),1)),o}function Pm(t){const e=new no;return fm(e,"normal",t.getAttribute("normal")),fm(e,"position",t.getAttribute("position").clone()),e.setIndex(t.getIndex()),e}let Lm;function Rm(){if(!Lm){const t=1e-6;Lm=new Mo(t,t,t)}return Lm}const Om={},km=new Mo(1,1,1);km.translate(0,0,.5);const Im=new Ri("#fff"),Dm=new Ri("#fff");function jm(t){const{height:e,radialSegments:n,radius:r}=t,i=function(t=6){if(!Om[t]){const e=new cu(1,1,1,t,1);e.rotateX(Math.PI/2),e.translate(0,0,.5),e.rotateZ(Math.PI/6),Om[t]=e}return Om[t]}(n).clone();return i.scale(r,r,e),i}function zm(t,e,n,r="y",i=0){let o=0;"y"===r?o=1:"z"===r&&(o=2);const a=t.attributes.position.array,s=a.length;Dm.setStyle(e),Im.setStyle(n);const c=new Float32Array(s);for(let t=0;t<s;t+=3)a[t+o]>i?(c[t]=Im.r,c[t+1]=Im.g,c[t+2]=Im.b):(c[t]=Dm.r,c[t+1]=Dm.g,c[t+2]=Dm.b);return fm(t,"color",new Di(c,3,!0)),c}function Nm(t){const e=[],n=t.length;let r=0;for(let e=0;e<n;e++){const{color:n}=t[e].attributes;n&&(r+=n.array.length)}const i=new Float32Array(r);let o=0;for(let n=0,r=t.length;n<r;n++){const{color:r,normal:a,position:s,uv:c}=t[n].attributes,u=t[n].index;r&&(i.set(r.array,o),o+=r.array.length),e.push({normal:a.array,uv:c.array,position:s.array,indices:u.array})}const a=Tm(e);i.length&&fm(a,"color",new Di(i,3,!0));for(let e=0,n=t.length;e<n;e++)t[e].dispose();return a}function Fm(){return km}const Bm={radius:10,height:100,radialSegments:6,altitude:0,topColor:"",bottomColor:"#2d2f61"};var Hm=class extends Sm{constructor(t,e,n,r){e=Pp.Util.extend({},Bm,e,{layer:r,coordinate:t}),super(),this._initOptions(e);const{height:i,radius:o,topColor:a,bottomColor:s,altitude:c}=e;e.height=r.distanceToVector3(i,i).x,e.radius=r.distanceToVector3(o,o).x,e._radius=this.options.radius,e._height=this.options.height;const u=jm(e);a&&(zm(u,s,a,"z",e.height/2),n.vertexColors=dm()),this._createMesh(u,n);const l=r.distanceToVector3(c,c).x,h=r.coordinateToVector3(t,l);this.getObject3d().position.copy(h),this.type="Bar"}};function Gm(t,e,n={}){return void 0===n[t]&&(n[t]=e.distanceToVector3(t,t).x),n[t]}function Um(t=[]){let e=0,n=0;const r=t.length;for(let i=0;i<r;i++){const{coordinate:r,lnglat:o,lnglats:a,xy:s,xys:c}=t[i],u=r||o||a||s||c||t[i];let l,h;Array.isArray(u)?(l=u[0],h=u[1]):u instanceof Pp.Coordinate&&(l=u.x,h=u.y),e+=l,n+=h}return new Pp.Coordinate(e/r,n/r)}function Vm(t,e,n,r){if(void 0===e||"number"!=typeof e||0===e)return 0;let i;i=t instanceof no?t.attributes.position.array:Array.isArray(t)?t:t.position;let o=0;if(i){r?(void 0===r[e]&&(r[e]=n.distanceToVector3(e,e).x),o=r[e]):o=n.distanceToVector3(e,e).x;const t=i.length;if(i[0]instanceof or)for(let e=0;e<t;e++)i[e].z+=o;else for(let e=0;e<t;e+=3)i[e+2]+=o}return o}function Wm(t){const e=t.length;let n=0;for(let r=0;r<e;r++){const{count:e}=t[r].position;n+=e}return new Float32Array(3*n)}var Zm=n("27d1"),qm=n.n(Zm);function Ym(t,e){var n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function Jm(t,e,n){var r=e[0],i=e[1],o=n[0]-r,a=n[1]-i;if(0!==o||0!==a){var s=((t[0]-r)*o+(t[1]-i)*a)/(o*o+a*a);s>1?(r=n[0],i=n[1]):s>0&&(r+=o*s,i+=a*s)}return(o=t[0]-r)*o+(a=t[1]-i)*a}function Xm(t,e){var n=t.length-1,r=[t[0]];return function t(e,n,r,i,o){for(var a,s=i,c=n+1;c<r;c++){var u=Jm(e[c],e[n],e[r]);u>s&&(a=c,s=u)}s>i&&(a-n>1&&t(e,n,a,i,o),o.push(e[a]),r-a>1&&t(e,a,r,i,o))}(t,0,n,e,r),r.push(t[n]),r}var $m=function(t,e,n){if(t.length<=2)return t;var r=void 0!==e?e*e:1;return t=Xm(t=n?t:function(t,e){for(var n,r=t[0],i=[r],o=1,a=t.length;o<a;o++)Ym(n=t[o],r)>e&&(i.push(n),r=n);return r!==n&&i.push(n),i}(t,r),r)};function Qm(t,e){return t[0]*e[0]+t[1]*e[1]}function Km(t,e){const n=e[0],r=e[1],i=Math.sqrt(n*n+r*r);return t[0]=n/i,t[1]=r/i,t}function tg(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}function eg(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function ng(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function rg(t,e){const n=e[0],r=e[1],i=e[2],o=Math.sqrt(n*n+r*r+i*i);return t[0]=n/o,t[1]=r/o,t[2]=i/o,t}function ig(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],c=n[2];return t[0]=i*c-o*s,t[1]=o*a-r*c,t[2]=r*s-i*a,t}const og=[];function ag(t,e,n,r){const i=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}(e,n),o=Math.acos(i)*r;return tg(og,n,e,-i),function(t,e){const n=e[0],r=e[1],i=e[2],o=Math.sqrt(n*n+r*r+i*i);t[0]=n/o,t[1]=r/o,t[2]=i/o}(og,og),function(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}(t,e,Math.cos(o)),tg(t,t,og,Math.sin(o)),t}function sg(t,e,n){if(n-e<3)return 0;let r=0;for(let i=2*(n-1),o=2*e;o<2*n;){const e=t[i],n=t[i+1],a=t[o],s=t[o+1];i=o,o+=2,r+=e*s-a*n}return r}function cg(t,e,n=2){return qm()(t,e,n)}const ug=[],lg=[],hg=[];function fg(t,e,n,r,i,o,a,s){const c=null!=a;let u=i,l=null;c&&(l=new Uint32Array(r-n));for(let i=n;i<r;i++){const h=i===r-1?n:i+1,f=i===n?r-1:i-1,d=t[2*f],p=t[2*f+1],m=t[2*i],g=t[2*i+1],v=t[2*h],y=t[2*h+1];if(ug[0]=m-d,ug[1]=g-p,lg[0]=v-m,lg[1]=y-g,Km(ug,ug),Km(lg,lg),c&&(l[i]=u),s||i!==n)if(s||i!==r-1){eg(hg,lg,ug);const t=hg[1];hg[1]=-hg[0],hg[0]=t,Km(hg,hg);const n=Qm(hg,lg),r=Math.sqrt(1-n*n),i=o*Math.min(10,1/r),s=o*n<0;if(c&&1/r>a&&s){const t=m+hg[0]*o,n=g+hg[1]*o,i=Math.acos(r)/2,a=Math.tan(i)*Math.abs(o);e[2*u]=t+hg[1]*a,e[2*u+1]=n-hg[0]*a,u++,e[2*u]=t-hg[1]*a,e[2*u+1]=n+hg[0]*a,u++}else e[2*u]=m+hg[0]*i,e[2*u+1]=g+hg[1]*i,u++}else hg[0]=ug[1],hg[1]=-ug[0],Km(hg,hg),e[2*u]=m+hg[0]*o,e[2*u+1]=g+hg[1]*o,u++;else hg[0]=lg[1],hg[1]=-lg[0],Km(hg,hg),e[2*u]=m+hg[0]*o,e[2*u+1]=g+hg[1]*o,u++}return l}function dg(t,e,n,r,i){const o=null!=r?[]:new Float32Array(t.length);if(fg(t,o,0,e&&e.length?e[0]:t.length/2,0,n,r,i),e)for(let a=0;a<e.length;a++){const s=e[a];fg(t,o,s,e[a+1]||t.length/2,null!=r?o.length/2:s,n,r,i)}return o}function pg(t,e,n,r){for(let i=0;i<Math.floor((r-n)/2);i++)for(let o=0;o<e;o++){const a=(i+n)*e+o,s=(r-i-1)*e+o,c=t[a];t[a]=t[s],t[s]=c}return t}function mg(t,e){let n=t.length/2,r=0,i=e&&e.length?e[0]:n;sg(t,r,i)>0&&pg(t,2,r,i);for(let o=1;o<(e?e.length:0)+1;o++)r=e[o-1],i=e[o]||n,sg(t,r,i)<0&&pg(t,2,r,i)}function gg(t){t.depth=t.depth||1,t.bevelSize=t.bevelSize||0,t.bevelSegments=null==t.bevelSegments?2:t.bevelSegments,t.smoothSide=t.smoothSide||!1,t.smoothBevel=t.smoothBevel||!1,t.simplify=t.simplify||0,"number"==typeof t.depth&&(t.bevelSize=Math.min(t.bevelSegments>0?t.bevelSize:0,t.depth/2)),t.bevelSize>0||(t.bevelSegments=0),t.bevelSegments=Math.round(t.bevelSegments);const e=t.boundingRect;if(t.translate=t.translate||[0,0],t.scale=t.scale||[1,1],t.fitRect){let n=null==t.fitRect.x?e.x||0:t.fitRect.x,r=null==t.fitRect.y?e.y||0:t.fitRect.y,i=t.fitRect.width,o=t.fitRect.height;null==i?null!=o?i=o/e.height*e.width:(i=e.width,o=e.height):null==o&&(o=i/e.width*e.height),t.scale=[i/e.width,o/e.height],t.translate=[(n-e.x)*t.scale[0],(r-e.y)*t.scale[1]]}}const vg=[[0,0],[1,0],[1,1],[0,0],[1,1],[0,1]];function yg(t,{vertices:e,topVertices:n,depth:r,rect:i},o,a,s,c){const u=a-o,l=c.smoothSide?1:2,h=u*l,f=c.smoothBevel?1:2,d=Math.min(r/2,c.bevelSize),p=c.bevelSegments,m=s.vertex,g=Math.max(i.width,i.height,r);if(d>0){const i=[0,0,1],a=[],c=[0,0,-1],v=[];let y=0,_=new Float32Array(u);for(let x=0;x<2;x++){const b=0===x?r-d:d;for(let r=0;r<=p*f;r++){let w,M,S=0;for(let T=0;T<u;T++){for(let m=0;m<l;m++){let l=2*((T+m)%u+o);a[0]=e[l]-n[l],a[1]=e[l+1]-n[l+1],a[2]=0;const y=Math.sqrt(a[0]*a[0]+a[1]*a[1]);a[0]/=y,a[1]/=y;const E=(Math.floor(r/f)+r%f)/p;0===x?ag(v,i,a,E):ag(v,a,c,E);const C=0===x?E:1-E,A=d*Math.sin(C*Math.PI/2),P=y*Math.cos(C*Math.PI/2),L=d*y/Math.sqrt(A*A+P*P),R=v[0]*L+n[l],O=v[1]*L+n[l+1],k=v[2]*L+b;if(t.position[3*s.vertex]=R,t.position[3*s.vertex+1]=O,t.position[3*s.vertex+2]=k,(T>0||m>0)&&(S+=Math.sqrt((w-R)*(w-R)+(M-O)*(M-O))),r>0||x>0){let e=3*(s.vertex-h),n=t.position[e],r=t.position[e+1],i=t.position[e+2];_[T]+=Math.sqrt((n-R)*(n-R)+(r-O)*(r-O)+(i-k)*(i-k))}t.uv[2*s.vertex]=S/g,t.uv[2*s.vertex+1]=_[T]/g,w=R,M=O,s.vertex++}if(f>1&&r%f||1===f&&r>=1)for(let e=0;e<6;e++){const n=(vg[e][0]+T*l)%h,r=vg[e][1]+y;t.indices[s.index++]=(r-1)*h+n+m}}y++}}}else for(let n=0;n<2;n++){const i=0===n?r-d:d;let a,c,h=0;for(let n=0;n<u;n++)for(let r=0;r<l;r++){const l=2*((n+r)%u+o),f=e[l],d=e[l+1];t.position[3*s.vertex]=f,t.position[3*s.vertex+1]=d,t.position[3*s.vertex+2]=i,(n>0||r>0)&&(h+=Math.sqrt((a-f)*(a-f)+(c-d)*(c-d))),t.uv[2*s.vertex]=h/g,t.uv[2*s.vertex+1]=i/g,a=f,c=d,s.vertex++}}const v=d>0?p*f+1:1;for(let e=0;e<u;e++)for(let n=0;n<6;n++){const r=(vg[n][0]+e*l)%h,i=vg[n][1]+v;t.indices[s.index++]=(i-1)*h+r+m}}function _g({indices:t,vertices:e,topVertices:n,rect:r,depth:i},o,a,s){if(e.length<=4)return;const c=a.vertex,u=t.length;for(let e=0;e<u;e++)o.indices[a.index++]=c+t[e];const l=Math.max(r.width,r.height);for(let t=0;t<(s.excludeBottom?1:2);t++)for(let e=0;e<n.length;e+=2){const s=n[e],c=n[e+1];o.position[3*a.vertex]=s,o.position[3*a.vertex+1]=c,o.position[3*a.vertex+2]=(1-t)*i,o.uv[2*a.vertex]=(s-r.x)/l,o.uv[2*a.vertex+1]=(c-r.y)/l,a.vertex++}if(!s.excludeBottom){const n=e.length/2;for(let e=0;e<u;e+=3)for(let r=0;r<3;r++)o.indices[a.index++]=c+n+t[e+2-r]}}function xg(t,e){let n=0,r=0;for(let i=0;i<t.length;i++){const{indices:o,vertices:a,holes:s,depth:c}=t[i],u=a.length/2,l=Math.min(c/2,e.bevelSize)>0?e.bevelSegments:0;n+=o.length*(e.excludeBottom?1:2),r+=u*(e.excludeBottom?1:2);const h=2+2*l;let f=0,d=0;for(let t=0;t<(s?s.length:0)+1;t++){0===t?d=s&&s.length?s[0]:u:(f=s[t-1],d=s[t]||u),n+=6*(d-f)*(h-1);const i=(d-f)*(e.smoothSide?1:2);r+=i*h+(e.smoothBevel?0:l*i*2)}}const i={position:new Float32Array(3*r),indices:new(r>65535?Uint32Array:Uint16Array)(n),uv:new Float32Array(2*r)},o={vertex:0,index:0};for(let n=0;n<t.length;n++)_g(t[n],i,o,e);for(let n=0;n<t.length;n++){const{holes:r,vertices:a}=t[n],s=a.length/2;let c=0,u=r&&r.length?r[0]:s;if(yg(i,t[n],c,u,o,e),r)for(let a=0;a<r.length;a++)c=r[a],u=r[a+1]||s,yg(i,t[n],c,u,o,e)}for(let t=0;t<i.uv.length;t++){const e=i.uv[t];e>0&&Math.round(e)===e?i.uv[t]=1:i.uv[t]=e%1}return i.normal=function(t,e){function n(t,e,n,r){t[0]=e,t[1]=n,t[2]=r}const r=[],i=[],o=[],a=[],s=[],c=[],u=t.length,l=new Float32Array(e.length);for(let h=0;h<u;){const u=3*t[h++],f=3*t[h++],d=3*t[h++];n(r,e[u],e[u+1],e[u+2]),n(i,e[f],e[f+1],e[f+2]),n(o,e[d],e[d+1],e[d+2]),ng(a,r,i),ng(s,i,o),ig(c,a,s);for(let t=0;t<3;t++)l[u+t]=l[u+t]+c[t],l[f+t]=l[f+t]+c[t],l[d+t]=l[d+t]+c[t]}for(var h=0;h<l.length;)n(c,l[h],l[h+1],l[h+2]),rg(c,c),l[h++]=c[0],l[h++]=c[1],l[h++]=c[2];return l}(i.indices,i.position),i.boundingRect=t[0]&&t[0].rect,i}function bg(t,e,n){const r=n.lineWidth,i=t.length,o=new Float32Array(2*i),a=n.translate||[0,0],s=n.scale||[1,1];for(let e=0,n=0;e<i;e++)o[n++]=t[e][0]*s[0]+a[0],o[n++]=t[e][1]*s[1]+a[1];sg(o,0,i)<0&&pg(o,2,0,i);const c=[],u=[],l=n.miterLimit,h=fg(o,u,0,i,0,-r/2,l,!1);pg(o,2,0,i);const f=fg(o,c,0,i,0,-r/2,l,!1),d=(c.length+u.length)/2,p=new Float32Array(2*d);let m=0;const g=u.length/2;for(let t=0;t<u.length;t++)p[m++]=u[t];for(let t=0;t<c.length;t++)p[m++]=c[t];const v=new(d>65535?Uint32Array:Uint16Array)(3*(2*(i-1)+(d-2*i)));let y=0;for(let t=0;t<i-1;t++){const e=t+1;v[y++]=g-1-h[t],v[y++]=g-1-h[t]-1,v[y++]=f[t]+1+g,v[y++]=g-1-h[t],v[y++]=f[t]+1+g,v[y++]=f[t]+g,f[e]-f[t]==2?(v[y++]=f[t]+2+g,v[y++]=f[t]+1+g,v[y++]=g-h[e]-1):h[e]-h[t]==2&&(v[y++]=f[e]+g,v[y++]=g-1-(h[t]+1),v[y++]=g-1-(h[t]+2))}const _=n.bevelSize>0?dg(p,[],n.bevelSize,null,!0):p,x=n.boundingRect;return{vertices:p,indices:v,topVertices:_,rect:{x:x.x*s[0]+a[0],y:x.y*s[1]+a[1],width:x.width*s[0],height:x.height*s[1]},depth:"function"==typeof n.depth?n.depth(e):n.depth,holes:[]}}function wg(t,e){const n=[];for(let r=0;r<t.length;r++){const i=t[r],o=[],a=i.length;let s=i[a-1][0],c=i[a-1][1],u=0;for(let t=0;t<a;t++){let n=i[t][0],r=i[t][1];const a=n-s,l=r-c;u+=Math.sqrt(a*a+l*l),u>e&&(o.push(i[t]),u=0),s=n,c=r}o.length>=3&&n.push(o)}return n.length>0?n:null}function Mg(t,e){const n=[];for(let r=0;r<t.length;r++){let i=t[r];i=$m(i,e,!0),i.length>=3&&n.push(i)}return n.length>0?n:null}function Sg(t,e,n){for(let r=0;r<t.length;r++)e[0]=Math.min(t[r][0],e[0]),e[1]=Math.min(t[r][1],e[1]),n[0]=Math.max(t[r][0],n[0]),n[1]=Math.max(t[r][1],n[1])}const Tg=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"];function Eg(t){return t.geometry?t.geometry.type:null}function Cg(t){const e=Eg(t);if(e)for(let t=0,n=Tg.length;t<n;t++)if(Tg[t]===e)return!0;return!1}function Ag(t){const e=Eg(t);return!(!e||e!==Tg[4]&&e!==Tg[5])}function Pg(t){const e=Eg(t);return!(!e||e!==Tg[2]&&e!==Tg[3])}function Lg(t){const e=Eg(t);return!(!e||e!==Tg[0]&&e!==Tg[1])}function Rg(t){const e=Eg(t);return!!(e&&e.indexOf("Multi")>-1)}function Og(t){return t.geometry?t.geometry.coordinates:[]}function kg(t,e){const n=Eg(t);if(!n||!t.geometry)return null;const r=t.geometry.coordinates;if(!r)return null;let i=0,o=0,a=0;switch(n){case"Point":i=r[0],o=r[1],a++;break;case"MultiPoint":case"LineString":for(let t=0,e=r.length;t<e;t++)i+=r[t][0],o+=r[t][1],a++;break;case"MultiLineString":case"Polygon":for(let t=0,e=r.length;t<e;t++)for(let e=0,n=r[t].length;e<n;e++)i+=r[t][e][0],o+=r[t][e][1],a++;break;case"MultiPolygon":for(let t=0,e=r.length;t<e;t++)for(let e=0,n=r[t].length;e<n;e++)for(let n=0,s=r[t][e].length;n<s;n++)i+=r[t][e][n][0],o+=r[t][e][n][1],a++}const s=i/a,c=o/a;return e?(e.x=s,e.y=c,e):new Pp.Coordinate(s,c)}function Ig(t){const e=Eg(t);if(!e||!t.geometry)return null;const n=t.geometry,r=t.properties||{},i=n.coordinates;if(!i)return null;const o=[];let a;switch(e){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}if(a)for(let t=0,e=i.length;t<e;t++)o.push({type:"Feature",geometry:{type:a,coordinates:i[t]},properties:r});else o.push(t);return o}function Dg(t,e,n){const r=[];if(Array.isArray(t)&&t[0]instanceof or)for(let e=0,n=t.length;e<n;e++){const n=t[e];r.push(n)}else{Array.isArray(t)&&(t=new Pp.LineString(t));const i=0;let o,a;Cg(t)?(o=Og(t),n||(a=kg(t))):t instanceof Pp.LineString&&(o=t.getCoordinates(),n||(a=t.getCenter()));const s=e.coordinateToVector3(n||a);for(let t=0,n=o.length;t<n;t++){const n=o[t],a=e.coordinateToVector3(n,i).sub(s);r.push(a)}}const i=new Float32Array(3*r.length),o=new Float32Array(2*r.length);for(let t=0,e=r.length;t<e;t++){const e=3*t,n=r[t];i[e]=n.x,i[e+1]=n.y,i[e+2]=n.z;const a=2*t;o[a]=n.x,o[a+1]=n.y}return{positions:i,positionsV:r,positions2d:o}}function jg(t,e,n,r){const i=[],o=[],a=[];for(let e=0,n=t.length;e<n;e++){const n=t[e];for(let t=0,e=n.length;t<e;t++){const e=n[t];a.length>0?e.join(",").toString()!==a[a.length-1].join(",").toString()&&a.push(e):a.push(e)}}for(let t=0,s=a.length;t<s;t++){const s=a[t];let c;const u=s.join(",").toString();c=n&&n[u]?n[u]:e.coordinateToVector3(s,0).sub(r),o.push(c),i.push(c.x,c.y,c.z)}return{positions:i,positionsV:o,lnglats:a}}function zg(t,e=1,n=1,r,i){const o=Dg(t,r,i).positionsV,a=[];for(let t=0,e=o.length;t<e;t++){const e=o[t];a.push([e.x,e.y])}const{indices:s,position:c,normal:u,uv:l}=function(t,e){e=Object.assign({},e);const n=[1/0,1/0],r=[-1/0,-1/0];for(let e=0;e<t.length;e++)Sg(t[e],n,r);e.boundingRect=e.boundingRect||{x:n[0],y:n[1],width:r[0]-n[0],height:r[1]-n[1]},gg(e);const i=e.scale||[1,1];null==e.lineWidth&&(e.lineWidth=1),null==e.miterLimit&&(e.miterLimit=2);const o=[];for(let n=0;n<t.length;n++){let r=t[n];const a=e.simplify/Math.max(i[0],i[1]);a>0&&(r=$m(r,a,!0)),o.push(bg(r,n,e))}return xg(o,e)}([a],{lineWidth:e,depth:n});return{position:c,normal:u,indices:s,uv:l}}function Ng(t){let e,n=[];return t instanceof Pp.MultiLineString?(n=t.getGeometries(),e=t.getCenter()):t instanceof Pp.LineString?(n.push(t),e=t.getCenter()):Cg(t)&&(e=kg(t),Rg(t)?n=Ig(t):n.push(t)),{lineStrings:n,center:e}}function Fg(t,e){for(let n=0,r=e.length;n<r;n++){const i=e[n];n>0&&n<r-1&&t.push(i.x,i.y,i.z),t.push(i.x,i.y,i.z)}}const Bg={altitude:0,bottomHeight:0,colors:null};var Hg=class extends Sm{constructor(t,e,n,r){e=Pp.Util.extend({},Bg,e,{layer:r,lineString:t}),super(),this._initOptions(e);const{lineStrings:i,center:o}=Ng(t),a=[];for(let t=0,e=i.length;t<e;t++){const e=i[t],{positionsV:n}=Dg(e,r,o);Fg(a,n)}const s=new no;fm(s,"position",new Vi(a,3)),Vm(s,e.bottomHeight,r);const c=function(t){const e=[];return t&&t.length&&t.forEach(t=>{t=t instanceof Ri?t:new Ri(t),e.push(t.r,t.g,t.b)}),e}(e.colors);c&&c.length&&(fm(s,"color",new Vi(c,3)),n.vertexColors=dm()),this._createLineSegments(s,n);const{altitude:u}=e,l=r.distanceToVector3(u,u).x,h=r.coordinateToVector3(o,l);this.getObject3d().position.copy(h),this.type="Line"}};const Gg=new Ri("#fff"),Ug=new Ri("#fff");function Vg(t,e,n,r,i,o){const a=Zg(t,n,r,i,!1);if(!a)return null;o?(null==o[e]&&(o[e]=n.distanceToVector3(e,e).x),e=o[e]):e=n.distanceToVector3(e,e).x;const{position:s,normal:c,uv:u,indices:l}=function(t,e){e=Object.assign({},e);const n=[1/0,1/0],r=[-1/0,-1/0];for(let e=0;e<t.length;e++)Sg(t[e][0],n,r);e.boundingRect=e.boundingRect||{x:n[0],y:n[1],width:r[0]-n[0],height:r[1]-n[1]},gg(e);const i=[],o=e.translate||[0,0],a=e.scale||[1,1],s=e.boundingRect,c={x:s.x*a[0]+o[0],y:s.y*a[1]+o[1],width:s.width*a[0],height:s.height*a[1]},u=Math.min(s.width,s.height)/1e5;for(let n=0;n<t.length;n++){let r=wg(t[n],u);if(!r)continue;const s=e.simplify/Math.max(a[0],a[1]);if(s>0&&(r=Mg(r,s)),!r)continue;const{vertices:l,holes:h,dimensions:f}=qm.a.flatten(r);for(let t=0;t<l.length;)l[t]=l[t++]*a[0]+o[0],l[t]=l[t++]*a[1]+o[1];if(mg(l,h),2!==f)throw new Error("Only 2D polygon points are supported");const d=e.bevelSize>0?dg(l,h,e.bevelSize,null,!0):l,p=cg(d,h,f);i.push({indices:p,vertices:l,topVertices:d,holes:h,rect:c,depth:"function"==typeof e.depth?e.depth(n):e.depth})}return xg(i,e)}(a,{depth:e});return{position:s,normal:c,uv:u,indices:l}}function Wg(t,e,n,r){void 0===r&&(r=0);const i=t.attributes.position.array,o=i.length;let a;if(Ug.setStyle(e),Gg.setStyle(n),Array.isArray(r)){let t=0;for(let e=0,n=r.length;e<n;e++){const{count:n}=r[e].position;t+=3*n}a=new Float32Array(t)}else a=new Float32Array(i.length);if(Array.isArray(r))for(let t=0,e=r.length;t<e;t++){const{middleZ:e,start:n,end:o}=r[t].position;for(let t=n;t<o;t+=3)i[t+2]>e?(a[t]=Gg.r,a[t+1]=Gg.g,a[t+2]=Gg.b):(a[t]=Ug.r,a[t+1]=Ug.g,a[t+2]=Ug.b)}else for(let t=0;t<o;t+=3)i[t+2]>r?(a[t]=Gg.r,a[t+1]=Gg.g,a[t+2]=Gg.b):(a[t]=Ug.r,a[t+1]=Ug.g,a[t+2]=Ug.b);return fm(t,"color",new Di(a,3,!0)),a}function Zg(t,e,n,r,i=!1){if(!t)return null;let o=[];if(t instanceof Pp.MultiPolygon)o=t.getGeometries().map(o=>qg(o,e,n||t.getCenter(),r,i));else if(t instanceof Pp.Polygon){const a=qg(t,e,n||t.getCenter(),r,i);o.push(a)}else if(Ag(t))if(Rg(t)){const a=Ig(t);for(let s=0,c=a.length;s<c;s++)o.push(qg(a[s],e,n||kg(t),r,i))}else{const a=qg(t,e,n||kg(t),r,i);o.push(a)}return o}function qg(t,e,n,r,i=!1){let o,a,s;if(Ag(t)){const e=Og(t);o=e[0],a=e.slice(1,e.length),n=n||kg(t)}else t instanceof Pp.Polygon&&(o=t.getShell(),a=t.getHoles(),n=n||t.getCenter());r=r||e.coordinateToVector3(n),s=i?new Float32Array(2*o.length):[];for(let t=0,n=o.length;t<n;t++){const n=o[t],a=e.coordinateToVector3(n).sub(r);if(i){const e=2*t;s[e]=a.x,s[e+1]=a.y}else s.push([a.x,a.y])}const c=[i?s.buffer:s];if(a&&a.length>0)for(let t=0,n=a.length;t<n;t++){const n=i?new Float32Array(2*a[t].length):[];for(let o=0,s=a[t].length;o<s;o++){const s=a[t][o],c=e.coordinateToVector3(s).sub(r);if(i){const t=2*o;n[t]=c.x,n[t+1]=c.y}else n.push([c.x,c.y])}c.push(i?n.buffer:n)}return c}const Yg={bottomHeight:0,width:3,height:1,altitude:0,topColor:null,bottomColor:"#2d2f61"};var Jg=class extends Sm{constructor(t,e,n,r){e=Pp.Util.extend({},Yg,e,{layer:r,lineString:t}),super(),this._initOptions(e);const{height:i,width:o,bottomColor:a,topColor:s,bottomHeight:c,altitude:u}=e,l=r.distanceToVector3(i,i).x,h=r.distanceToVector3(o,o).x,{lineStrings:f,center:d}=Ng(t),p=[];let m=0;const g={};for(let t=0,e=f.length;t<e;t++){const e=zg(f[t],h,l,r,d);m=Vm(e,c,r,g),p.push(e)}const v=Tm(p);s&&(Wg(v,a,s,m+l/2),n.vertexColors=dm()),this._createMesh(v,n);const y=r.distanceToVector3(u,u).x,_=r.coordinateToVector3(d,y);this.getObject3d().position.copy(_),this.type="ExtrudeLine"}};const Xg={altitude:0,height:1,bottomHeight:0,topColor:null,bottomColor:"#2d2f61"};var $g=class extends Sm{constructor(t,e,n,r){e=Pp.Util.extend({},Xg,e,{layer:r,polygon:t}),super(),this._initOptions(e);const{height:i,topColor:o,bottomColor:a,altitude:s,bottomHeight:c}=e,u=function(t,e,n,r){const{position:i,normal:o,uv:a,indices:s}=Vg(t,e,n,r),c=new Float32Array(i.length);c.fill(1,0,i.length);const u=new no;return fm(u,"color",new Di(c,3)),fm(u,"normal",new Di(o,3)),fm(u,"position",new Di(i,3)),fm(u,"uv",new Di(a,2)),u.setIndex(new Gi(s,1)),u}(t,i,r),l=Ag(t)?kg(t):t.getCenter(),h=Vm(u,c,r);o&&(Wg(u,a,o,h+r.distanceToVector3(i,i).x/2),n.vertexColors=dm()),this._createMesh(u,n);const f=r.distanceToVector3(s,s).x,d=r.coordinateToVector3(l,f);this.getObject3d().position.copy(d),this.type="ExtrudePolygon"}};const Qg={altitude:0,coordinate:null};var Kg=class extends Sm{constructor(t,e={},n){e.coordinate||(console.warn("coordinate is null,it is important to locate the model"),e.coordinate=n.getMap().getCenter()),e=Pp.Util.extend({},Qg,e,{layer:n,model:t}),super(),this._initOptions(e),this._createGroup(),this.getObject3d().add(t);const{altitude:r,coordinate:i}=e,o=n.distanceToVector3(r,r).x,a=n.coordinateToVector3(i,o);this.getObject3d().position.copy(a),this.type="Model"}};const tv=Math.PI/180;function ev(t){return t*tv}function nv(t,e){if(!t||!e)return 0;Array.isArray(t)||(t=t.toArray()),Array.isArray(e)||(e=e.toArray());let n=ev(t[1]);const r=ev(e[1]),i=n-r,o=ev(t[0])-ev(e[0]);return n=2*Math.asin(Math.sqrt(Math.pow(Math.sin(i/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin(o/2),2))),n*=6378137,Math.round(1e5*n)/1e5}function rv(t,e){const{len:n,c1:r,c2:i}=t,o=i[0]-r[0],a=i[1]-r[1],s=e/n;return[r[0]+s*o,r[1]+s*a]}function iv(t,e,n,r){const i=e.length;t.attributes.normal.count=i,t.attributes.position.count=i;const o=t.attributes.position.array,a=t.attributes.normal.array;for(let t=0;t<i;t++)o[t]=e[t],a[t]=n[t];t.index.count=r.length;for(let e=0,n=r.length;e<n;e++)t.index.array[e]=r[e]}const ov={trail:5,chunkLength:50,width:2,height:1,speed:1,altitude:0,interactive:!1};var av=class extends Sm{constructor(t,e,n,r){e=Pp.Util.extend({},ov,e,{layer:r,lineString:t}),super(),this._initOptions(e);const{width:i,height:o,altitude:a,speed:s,chunkLength:c,trail:u}=e;let l,h;Cg(t)?(l=kg(t),h=Og(t)):(l=t.getCenter(),h=t);const f=function(t,e=10){e=Math.max(e,1),Array.isArray(t)||(t=function(t){return t.getCoordinates().map(t=>t.toArray())}(t));const n=t.length;let r=[],i=0;for(let e=0;e<n-1;e++){const n=nv(t[e],t[e+1]),o=Math.floor(n);r.push({c1:t[e],len:o,c2:t[e+1]}),i+=o}if(i<=e)return r.map(t=>[t.c1,t.c2]);if(1===r.length&&r[0].len<=e)return[[r[0].c1,r[0].c2]];const o=r.length;let a,s=0,c=0;const u=[];let l=[r[0].c1];for(;s<o;){const{len:t,c2:n}=r[s];if(c+=t,c<e&&(l.push(n),s===o-1&&u.push(l),s++),c===e&&(l.push(n),c=0,u.push(l),l=[n],s++),c>e){const n=t-c+e;a=rv(r[s],n),l.push(a),u.push(l),c=0,r[s].c1=a,r[s].len=t-n,l=[],l.push(a)}}return u}(h,c),d=r.coordinateToVector3(l),p={};for(let t=0,e=f.length;t<e;t++){const e=f[t];for(let t=0,n=e.length;t<n;t++){const n=e[t],i=n.join(",").toString();p[i]||(p[i]=r.coordinateToVector3(n).sub(d))}}const m=jg(f.slice(0,1),r,p,d).positionsV,g=new no,v=new Float32Array(3e3),y=new Float32Array(3e3),_=new Uint16Array(1e3);fm(g,"position",new Di(v,3)),fm(g,"normal",new Di(y,3)),g.setIndex(new Di(_,1));const x=r.distanceToVector3(i,i).x,b=r.distanceToVector3(o,o).x,w=zg(m,x,b,r);iv(g,w.position,w.normal,w.indices),this._createMesh(g,n);const M=r.distanceToVector3(a,a).x,S=r.coordinateToVector3(l,M);this.getObject3d().position.copy(S),this._params={index:0,chunkLines:f,geometries:[],layer:r,trail:Math.max(1,u),lineWidth:x,depth:b,speed:Math.min(1,s),idx:0,loaded:!1,positionMap:p,centerPt:d},this._init(this._params),this.type="ExtrudeLineTrail"}_init(t){const{layer:e,trail:n,lineWidth:r,depth:i,chunkLines:o,positionMap:a,centerPt:s}=t,c=o.length,u=[];for(let t=0;t<c;t++){const c=jg(o.slice(t,t+n),e,a,s).positionsV;u.push(zg(c,r,i,e))}this._params.geometries=u,this._params.loaded=!0}_animation(){const{index:t,geometries:e,speed:n,idx:r,chunkLines:i,trail:o,lineWidth:a,depth:s,loaded:c,layer:u,positionMap:l,centerPt:h}=this._params;if(!c)return;const f=Math.round(t);if(f>r){this._params.idx++;let t=e[f];t||(t=zg(jg(i.slice(f,f+o),u,l,h).positionsV,a,s,u),e[f]=t);const n=this.getObject3d();iv(n.geometry,t.position,t.normal,t.indices),n.geometry.attributes.position.needsUpdate=!0,n.geometry.attributes.normal.needsUpdate=!0,n.geometry.index.needsUpdate=!0}t>=i.length-1&&(this._params.index=-1,this._params.idx=-1),this._params.index+=n}};const sv=["click","mousemove","mousedown","mouseup","dblclick","contextmenu"].join(" ").toString(),cv=new Oi;cv.vertexColors=dm();var uv=t=>class extends t{_initBaseObjectsEvent(t){if(t&&Array.isArray(t)&&t.length)for(let e=0,n=t.length;e<n;e++){const n=t[e];this._proxyEvent(n)}return this}_proxyEvent(t){t.on("add",t=>{this._showGeometry(t.target,!0)}),t.on("remove",t=>{this._showGeometry(t.target,!1)}),t.on("mouseout",t=>{this._mouseover=!1,this.fire("mouseout",Object.assign({},t,{target:this,selectMesh:this.getSelectMesh?this.getSelectMesh():null}))}),t.on(sv,t=>{this.fire(t.type,Object.assign({},t,{target:this,selectMesh:this.getSelectMesh?this.getSelectMesh():null}))})}_getHideGeometryIndex(t){const e=[];let n=0;for(let r=0,i=this._geometriesAttributes.length;r<i;r++)!0===this._geometriesAttributes[r].hide&&(e.push(r),n+=this._geometriesAttributes[r][t].count);return{indexs:e,count:n}}_updateAttribute(t,e){const{indexs:n}=this._getHideGeometryIndex(e),r=this._geometryCache.attributes[e].array,i=r.length;for(let e=0;e<i;e++)t.array[e]=r[e];let o=NaN;this.getObject3d()instanceof Yc&&(o=0);for(let r=0;r<n.length;r++){const i=n[r],{start:a,end:s}=this._geometriesAttributes[i][e];for(let e=a;e<s;e++)t.array[e]=o}return this}_showGeometry(t,e){let n;if(t&&(n=t.getOptions().index),null!=n){const t=this._geometriesAttributes[n],{hide:r}=t;if(r===e)return this;t.hide=e;const i=this.getObject3d().geometry;this._updateAttribute(i.attributes.position,"position"),i.attributes.position.needsUpdate=!0,this.isHide=e}return this}getSelectMesh(){const t=this._getIndex();if(null!=t)return{data:this._datas[t],baseObject:this._baseObjects[t]}}_getIndex(t){return null==t&&(t=this.faceIndex||this.index),t}_init(){const t=this.getLayer().getPick();this.on("add",()=>{t.add(this.pickObject3d)}),this.on("remove",()=>{t.remove(this.pickObject3d)})}_setPickObject3d(){const t=this._geometryCache||this.getObject3d().geometry.clone(),e=this.getLayer().getPick(),{_geometriesAttributes:n}=this,r=n.length,i=Wm(n);let o=0;for(let t=0;t<r;t++){const r=e.getColor(),a=r.getHex();this._colorMap[a]=t;const{count:s}=n[t].position;this._datas[t].colorIndex=a;for(let t=0;t<s;t++)i[o]=r.r,i[o+1]=r.g,i[o+2]=r.b,o+=3}fm(t,"color",new Di(i,3,!0));const a=e.getColor().getHex(),s=new bo(t,cv);s.position.copy(this.getObject3d().position),s._colorIndex=a,this.setPickObject3d(s)}};let lv;var hv;function fv(){return Pp.worker||console.error("maptalks.worker is not defined,You can't use ThreeVectorTileLayer"),hv||(hv=new lv("__maptalks.three__")),hv}Pp.worker&&(lv=class extends Pp.worker.Actor{test(t,e){this.send(t,null,e)}pushQueue(t={}){const{type:e,data:n,callback:r,layer:i,key:o,center:a,lineStrings:s}=t;let c;"Polygon"===e?c=function(t=[],e,n){const r=n.coordinateToVector3(e),i=t.length,o=[],a=[],s={};for(let c=0;c<i;c++){const i=t[c],u=Zg(i,n,e,r,!0);for(let t=0,e=u.length;t<e;t++){const e=u[t];for(let t=0,n=e.length;t<n;t++)a.push(e[t])}const l=Ag(i)?i.properties:i.getProperties()||{};let h=l.height||1,f=l.bottomHeight||0;void 0!==f&&"number"==typeof f&&0!==f&&(void 0===s[f]&&(s[f]=n.distanceToVector3(f,f).x),f=s[f]),void 0===s[h]&&(s[h]=n.distanceToVector3(h,h).x),h=s[h],o.push({data:u,height:h,bottomHeight:f})}return{datas:o,transfer:a}}(n,a,i):"LineString"===e&&(c=function(t,e,n,r){const i=[],o=[],a={},s=t.length;for(let c=0;c<s;c++){const s=t[c],u=Pg(r[c])?r[c].properties:r[c].getProperties()||{},l=u.width||1,h=u.height||1;let f=u.bottomHeight||0;void 0!==f&&"number"==typeof f&&0!==f&&(void 0===a[f]&&(a[f]=n.distanceToVector3(f,f).x),f=a[f]),void 0===a[h]&&(a[h]=n.distanceToVector3(h,h).x),void 0===a[l]&&(a[l]=n.distanceToVector3(l,l).x);const d=[];for(let t=0,r=s.length;t<r;t++){const r=Dg(s[t],n,e).positions2d;o.push(r),d.push(r)}i.push({data:d,height:a[h],width:a[l],bottomHeight:f})}return{datas:i,transfer:o}}(n,a,i,s)),this.send({type:e,datas:c.datas},c.transfe,(function(t,e){t&&console.error(t),e.key=o,r(e)}))}});const dv={altitude:0,height:1,bottomHeight:0,topColor:null,bottomColor:"#2d2f61"},pv=new Pp.Coordinate(0,0);class mv extends(uv(Sm)){constructor(t,e,n,r){Array.isArray(t)||(t=[t]);const i=t.length;0===i&&console.error("polygons is empty");let o=1/0,a=1/0,s=-1/0,c=-1/0;for(let e=0;e<i;e++){const n=t[e],r=n.getCenter?n.getCenter():kg(n,pv);let i,u;Array.isArray(r)?(i=r[0],u=r[1]):r instanceof Pp.Coordinate&&(i=r.x,u=r.y),o=Math.min(o,i),a=Math.min(a,u),s=Math.max(s,i),c=Math.max(c,u)}const u=new Pp.Coordinate((o+s)/2,(a+c)/2);e=Pp.Util.extend({},dv,e,{layer:r,polygons:t,coordinate:u});const{topColor:l,bottomColor:h,altitude:f,asynchronous:d}=e;let p;const m=[],g=[],v=[];if(d){var y=fv();p=Rm(),y.pushQueue({type:"Polygon",layer:r,key:e.key,center:u,data:t,callback:t=>{const{faceMap:e,geometriesAttributes:r}=t;this._faceMap=e,this._geometriesAttributes=r;const i=Am(t);this._geometryCache=Pm(i),l&&(Wg(i,h,l,r),n.vertexColors=dm());const o=this.getObject3d();o.geometry=i,o.material.needsUpdate=!0,this._setPickObject3d(),this._init(),this.isAdd&&this.getLayer().getPick().add(this.pickObject3d),this._fire("workerload",{target:this})}})}else{const e=r.coordinateToVector3(u),o=[];let a=0,s=0,c=0,f=0;const d={};for(let n=0;n<i;n++){const i=t[n],l=Ag(i)?i.properties:i.getProperties()||{},h=l.height||1,p=l.bottomHeight||0,m=Vg(i,h,r,u,e,d);o.push(m);const y=Vm(m,p,r,d),{position:_,normal:x,uv:b,indices:w}=m,M=w.length/3;g[n]=[a+1,a+M],a+=M;const S=_.length/3,T=x.length/3,E=b.length/2;v[n]={position:{middleZ:y+d[h]/2,count:S,start:s,end:s+3*S},normal:{count:T,start:c,end:c+3*T},uv:{count:E,start:f,end:f+2*E},hide:!1},s+=3*S,c+=3*T,f+=2*E}p=Tm(o),l&&(Wg(p,h,l,v),n.vertexColors=dm())}super(),this._initOptions(e),this._createMesh(p,n);const _=r.distanceToVector3(f,f).x,x=r.coordinateToVector3(u,_);this.getObject3d().position.copy(x),this._faceMap=g,this._baseObjects=m,this._datas=t,this._geometriesAttributes=v,this.faceIndex=null,this._geometryCache=p.clone(),this.isHide=!1,this._colorMap={},this._initBaseObjectsEvent(m),d||(this._setPickObject3d(),this._init()),this.type="ExtrudePolygons"}getSelectMesh(){const t=this._getIndex();if(null!=t){if(!this._baseObjects[t]){const e=this._datas[t],n=Object.assign({},this.options,Ag(e)?e.properties:e.getProperties(),{index:t});this._baseObjects[t]=new $g(e,n,this.getObject3d().material,this.getLayer()),this._proxyEvent(this._baseObjects[t])}return{data:this._datas[t],baseObject:this._baseObjects[t]}}}identify(t){return this.picked}}var gv=mv;function vv(t,e,n){const r=t.project(n),i=e.width/2,o=e.height/2;return{x:Math.round(r.x*i+i),y:Math.round(-r.y*o+o)}}const yv={altitude:0,height:0,color:null},_v=new or;var xv=class extends Sm{constructor(t,e,n,r){e=Pp.Util.extend({},yv,e,{layer:r,coordinate:t}),super();let{height:i,altitude:o,color:a,size:s}=e;const c=[],u=[];a&&(a=a instanceof Ri?a:new Ri(a),u.push(a.r,a.g,a.b));const l=r.distanceToVector3(i,i).x,h=r.coordinateToVector3(t,l);c.push(0,0,h.z);const f=new no;fm(f,"position",new Vi(c,3,!0)),u.length&&fm(f,"color",new Vi(u,3,!0)),void 0!==s&&fm(f,"size",new Vi([s],1,!0)),e.positions=h,this._initOptions(e),this._createPoints(f,n);const d=r.distanceToVector3(o,o).x,p=new or(h.x,h.y,d);this.getObject3d().position.copy(p),this.type="Point"}identify(t){const e=this.getLayer(),n=this.getMap().getSize(),r=this.getLayer().getCamera(),i=this.getOptions().positions,o=this.getOptions().altitude;let a=this.getObject3d().material.size;void 0===a&&(a=this.options.size||1);const s=this.getMap().coordToContainerPoint(t),c=e.distanceToVector3(o,o).x;_v.x=i.x,_v.y=i.y,_v.z=i.z+c;const u=vv(_v,n,r);return Math.sqrt(Math.pow(s.x-u.x,2)+Math.pow(s.y-u.y,2))<=a/2}};function bv(t,e){const{minx:n,miny:r,maxx:i,maxy:o}=t,[a,s]=e;return n<=a&&a<=i&&r<=s&&s<=o}class wv{constructor(t,e,n,r){this.minlng=t,this.minlat=e,this.maxlng=n,this.maxlat=r,this.minx=1/0,this.miny=1/0,this.maxx=-1/0,this.maxy=-1/0,this.coordinates=[],this.positions=[],this.indexs=[],this.key=null}updateBBoxPixel(t){let e=1/0,n=1/0,r=-1/0,i=-1/0;const{minlng:o,minlat:a,maxlng:s,maxlat:c}=this;return[[o,a],[o,c],[s,a],[s,c]].map(t=>new Pp.Coordinate(t)).map(e=>t.coordToContainerPoint(e)).forEach(t=>{e=Math.min(e,t.x),n=Math.min(n,t.y),r=Math.max(r,t.x),i=Math.max(i,t.y)}),this.minx=e,this.miny=n,this.maxx=r,this.maxy=i,this}containsCoordinate(t){let e,n;Array.isArray(t)?(e=t[0],n=t[1]):t instanceof Pp.Coordinate&&(e=t.x,n=t.y);const{minlng:r,minlat:i,maxlng:o,maxlat:a}=this;return r<=e&&e<=o&&i<=n&&n<=a}isRecCross(t,e){const{x:n,y:r}=t,i={minx:n-e/2,miny:r-e/2,maxx:n+e/2,maxy:r+e/2},{minx:o,miny:a,maxx:s,maxy:c}=i;return!!(bv(this,[o,a])||bv(this,[o,c])||bv(this,[s,a])||bv(this,[s,c])||bv(i,[this.minx,this.miny])||bv(i,[this.minx,this.maxy])||bv(i,[this.maxx,this.miny])||bv(i,[this.maxx,this.maxy]))}static initGrids(t,e,n,r){const i=[],o=(n-t)/30,a=(r-e)/30;let s=t,c=e;for(let n=0;n<30;n++){s=t+n*o;for(let t=0;t<30;t++){c=e+t*a;const r=new wv(s,c,s+o,c+a);r.key=t+"-"+n,i.push(r)}}return{grids:i,averageX:o,averageY:a,ROWS:30,COLS:30}}}var Mv=wv;const Sv={altitude:0},Tv=new or;function Ev(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}class Cv extends(uv(Sm)){constructor(t,e,n,r){Array.isArray(t)||(t=[t]),e=Pp.Util.extend({},Sv,e,{layer:r,points:t});let i=1/0,o=1/0,a=-1/0,s=-1/0;for(let e=0,n=t.length;e<n;e++){const{coordinate:n}=t[e];let r,c;Array.isArray(n)?(r=n[0],c=n[1]):n instanceof Pp.Coordinate&&(r=n.x,c=n.y),t[e].coords=[r,c],i=Math.min(i,r),o=Math.min(o,c),a=Math.max(a,r),s=Math.max(s,c)}const c=r.coordinateToVector3([(i+a)/2,(o+s)/2]),{grids:u,averageX:l,averageY:h,ROWS:f,COLS:d}=Mv.initGrids(i,o,a,s),p=(u.length,new Float32Array(3*t.length)),m=[],g=new Float32Array(3*t.length),v=new Float32Array(t.length),y=[],_=[],x={};let b=0,w=!1,M=!1;const S=new or(0,0,0);for(let e=0,n=t.length;e<n;e++){let{coordinate:n,height:a,color:s,size:d,coords:y}=t[e];const T=3*e;s&&(w=!0,s=s instanceof Ri?s:new Ri(s),g[T]=s.r,g[T+1]=s.g,g[T+2]=s.b),d&&(M=!0,v[e]=d,b=Math.max(b,d));const E=Gm(a,r,x),C=r.coordinateToVector3(n,E);S.x=C.x,S.y=C.y,S.z=C.z,S.sub(c),p[T]=S.x,p[T+1]=S.y,p[T+2]=S.z,m.push(C),_[e]={position:{count:1,start:3*e,end:3*e+3},hide:!1};let A=Ev((y[1]-o)/h,4),P=Ev((y[0]-i)/l,4);A-=1,P-=1,A=Math.max(0,A),P=Math.max(0,P),A=Math.ceil(A),P=Math.ceil(P);const L=P*f+A;u[L]&&(u[L].positions.push(C),u[L].indexs.push(e))}const T=new no;fm(T,"position",new Di(p,3,!0)),w&&fm(T,"color",new Di(g,3,!0)),M&&fm(T,"size",new Di(v,1,!0)),e.positions=m,super(),this._initOptions(e),this._createPoints(T,n);const E=e.altitude,C=r.distanceToVector3(E,E).x,A=c.clone();A.z=C,this.getObject3d().position.copy(A),this._baseObjects=y,this._datas=t,this.faceIndex=null,this._geometriesAttributes=_,this._geometryCache=T.clone(),this.isHide=!1,this._initBaseObjectsEvent(y),this._grids=u,this._bindMapEvents(),this.type="Points",this.maxSize=b}_bindMapEvents(){const t=this.getMap(),e="zoomstart zooming zoomend movestart moving moveend pitch rotate";this.on("add",()=>{this._updateGrids(),t.on(e,this._updateGrids,this)}),this.on("remove",()=>{t.off(e,this._updateGrids,this)})}_updateGrids(){const t=this.getMap();this._grids.forEach(e=>{e.indexs.length&&e.updateBBoxPixel(t)})}getSelectMesh(){const t=this.faceIndex;if(null!=t){if(!this._baseObjects[t]){const e=this._datas[t],{coordinate:n,height:r,color:i,size:o}=e;this._baseObjects[t]=new xv(n,{height:r,index:t,color:i,size:o},this.getObject3d().material,this.getLayer()),this._proxyEvent(this._baseObjects[t])}return{data:this._datas[t],baseObject:this._baseObjects[t]}}}identify(t){const e=this.getLayer(),n=this.getMap().getSize(),r=this.getLayer().getCamera(),i=this.getOptions().altitude,o=this.getMap(),a=e.distanceToVector3(i,i).x;let s=this.getObject3d().material.size;const c=void 0===s,u=o.coordToContainerPoint(t),l=[];if(this._grids.forEach(t=>{t.indexs.length&&t.isRecCross(u,c?this.maxSize:s)&&l.push(t)}),l.length<1)return!1;for(let t=0,e=l.length;t<e;t++)for(let e=l[t].positions.length-1;e>=0;e--){c&&(s=this._datas[l[t].indexs[e]].size||1);const i=l[t].positions[e];Tv.x=i.x,Tv.y=i.y,Tv.z=i.z+a;const o=vv(Tv,n,r);if(Math.sqrt(Math.pow(u.x-o.x,2)+Math.pow(u.y-o.y,2))<=s/2)return this.faceIndex=l[t].indexs[e],!0}return!1}}var Av=Cv;const Pv={coordinate:"",radius:10,height:100,radialSegments:6,altitude:0,topColor:"",bottomColor:"#2d2f61"};class Lv extends(uv(Sm)){constructor(t,e,n,r){Array.isArray(t)||(t=[t]);const i=t.length,o=Um(t),a=r.coordinateToVector3(o),s=[],c=[],u=[],l=[];let h=0,f=0,d=0,p=0;const m={};for(let e=0;e<i;e++){const i=Pp.Util.extend({index:e},Pv,t[e]),{radius:o,radialSegments:g,altitude:v,topColor:y,bottomColor:_,height:x,coordinate:b}=i,w=Gm(o,r,m),M=Gm(x,r,m),S=Gm(v,r,m),T=jm({radius:w,height:M,radialSegments:g});y&&(zm(T,_,y,"z",M/2),n.vertexColors=dm());const E=r.coordinateToVector3(b).sub(a),C=T.attributes.position.array;for(let t=0,e=C.length;t<e;t+=3)C[t+2]+=S,C[t]+=E.x,C[t+1]+=E.y,C[t+2]+=E.z;s.push(T);const A=new Hm(b,i,n,r);c.push(A);const P=T.index.count/3;l[e]=[h+1,h+P],h+=P;const L=T.attributes.position.count,R=T.attributes.normal.count,O=T.attributes.uv.count;u[e]={position:{count:L,start:f,end:f+3*L},normal:{count:R,start:d,end:d+3*R},uv:{count:O,start:p,end:p+2*O},hide:!1},f+=3*L,d+=3*R,p+=2*O}super(),e=Pp.Util.extend({},{altitude:0,layer:r,points:t},e),this._initOptions(e);const g=Nm(s);this._createMesh(g,n);const v=e.altitude,y=r.distanceToVector3(v,v).x,_=a.clone();_.z=y,this.getObject3d().position.copy(_),this._faceMap=l,this._baseObjects=c,this._datas=t,this._geometriesAttributes=u,this.faceIndex=null,this._geometryCache=g.clone(),this.isHide=!1,this._colorMap={},this._initBaseObjectsEvent(c),this._setPickObject3d(),this._init(),this.type="Bars"}identify(){return this.picked}}var Rv=Lv;const Ov={width:3,height:1,altitude:0,topColor:null,bottomColor:"#2d2f61"};class kv extends(uv(Sm)){constructor(t,e,n,r){Array.isArray(t)||(t=[t]);const i=[],o=[],a=t.length;for(let e=0;e<a;e++){const n=Ng(t[e]);i.push(n.center),o.push(n.lineStrings)}const s=Um(i);e=Pp.Util.extend({},Ov,e,{layer:r,lineStrings:t,coordinate:s});const{altitude:c,topColor:u,bottomColor:l,asynchronous:h}=e;let f;const d=[],p=[];if(h){var m=fv();f=Rm(),m.pushQueue({type:"LineString",layer:r,key:e.key,center:s,data:o,lineStrings:t,callback:t=>{const{faceMap:e,geometriesAttributes:r}=t;this._faceMap=e,this._geometriesAttributes=r;const i=Am(t);this._geometryCache=Pm(i),u&&(Wg(i,l,u,r),n.vertexColors=dm()),this.getObject3d().geometry=i,this.getObject3d().material.needsUpdate=!0,this._setPickObject3d(),this._init(),this.isAdd&&this.getLayer().getPick().add(this.pickObject3d),this._fire("workerload",{target:this})}})}else{const e=[];let i=0,c=[],h=0,d=0;const m={};for(let n=0;n<a;n++){const a=t[n],u=Pp.Util.extend({},Ov,Cg(a)?a.properties:a.getProperties(),{index:n}),{height:l,width:f,bottomHeight:g}=u,v=Gm(f,r,m),y=Gm(l,r,m),_=o[n],x=[];let b=0;for(let t=0,e=_.length;t<e;t++){const e=zg(_[t],v,y,r,s);b=Vm(e,g,r,m),x.push(e)}const w=Em(x);e.push(w);const{position:M,normal:S,indices:T}=w,E=T.length/3;c[n]=[i+1,i+E],i+=E;const C=M.length/3,A=S.length/3;p[n]={position:{middleZ:b+y/2,count:C,start:h,end:h+3*C},normal:{count:A,start:d,end:d+3*A},hide:!1},h+=3*C,d+=3*A}f=Tm(e),u&&(Wg(f,l,u,p),n.vertexColors=dm())}super(),this._initOptions(e),this._createMesh(f,n);const g=r.distanceToVector3(c,c).x,v=r.coordinateToVector3(s,g);this.getObject3d().position.copy(v),this._faceMap=[],this._baseObjects=d,this._datas=t,this._geometriesAttributes=p,this.faceIndex=null,this._geometryCache=f.clone(),this.isHide=!1,this._colorMap={},this._initBaseObjectsEvent(d),h||(this._setPickObject3d(),this._init()),this.type="ExtrudeLines"}getSelectMesh(){const t=this._getIndex();if(null!=t){if(!this._baseObjects[t]){const e=this._datas[t],n=Object.assign({},this.options,Pg(e)?e.properties:e.getProperties(),{index:t});this._baseObjects[t]=new Jg(e,n,this.getObject3d().material,this.getLayer()),this._proxyEvent(this._baseObjects[t])}return{data:this._datas[t],baseObject:this._baseObjects[t]}}}identify(t){return this.picked}}var Iv=kv;const Dv={altitude:0,colors:null};class jv extends(uv(Sm)){constructor(t,e,n,r){Array.isArray(t)||(t=[t]);const i=[],o=[],a=t.length;for(let e=0;e<a;e++){const n=Ng(t[e]);i.push(n.center),o.push(n.lineStrings)}const s=Um(i);e=Pp.Util.extend({},Dv,e,{layer:r,lineStrings:t,coordinate:s});const c=[],u={};let l=0,h=[],f=[],d=0,p=[];for(let t=0;t<a;t++){const e=o[t];let n=0;for(let t=0,i=e.length;t<i;t++){const i=Pg(e[t])?e[t].properties:e[t].getProperties()||{},{positionsV:o}=Dg(e[t],r,s);Vm(o,i.bottomHeight,r,u),n+=2*o.length-2,Fg(p,o)}const i=n;h[t]=[l,l+i],l+=i,f[t]={position:{count:n,start:d,end:d+3*n},hide:!1},d+=3*n}const m=new no;fm(m,"position",new Vi(p,3)),super(),this._initOptions(e),this._createLineSegments(m,n);const{altitude:g}=e,v=r.distanceToVector3(g,g).x,y=r.coordinateToVector3(s,v);this.getObject3d().position.copy(y),this._faceMap=h,this._baseObjects=c,this._datas=t,this._geometriesAttributes=f,this.faceIndex=null,this.index=null,this._geometryCache=m.clone(),this.isHide=!1,this._colorMap={},this._initBaseObjectsEvent(c),this._setPickObject3d(),this._init(),this.type="Lines"}getSelectMesh(){const t=this._getIndex();if(null!=t){if(!this._baseObjects[t]){const e=this._datas[t],n=Pp.Util.extend({},this.getOptions(),{index:t},Pg(e)?e.properties:e.getProperties());this._baseObjects[t]=new Hg(e,n,this.getObject3d().material,this.getLayer()),this._proxyEvent(this._baseObjects[t])}return{data:this._datas[t],baseObject:this._baseObjects[t]}}}_setPickObject3d(){const t=this._geometryCache||this.getObject3d().geometry.clone(),e=this.getLayer().getPick(),{_geometriesAttributes:n}=this,r=n.length,i=Wm(n);let o=0;for(let t=0;t<r;t++){const r=e.getColor(),a=r.getHex();this._colorMap[a]=t;const{count:s}=n[t].position;this._datas[t].colorIndex=a;for(let t=0;t<s;t++)i[o]=r.r,i[o+1]=r.g,i[o+2]=r.b,o+=3}fm(t,"color",new Di(i,3,!0));const a=this.getObject3d().material.clone();a.color.set("#fff"),a.vertexColors=dm();const s=e.getColor().getHex(),c=new Yc(t,a);c.position.copy(this.getObject3d().position),c._colorIndex=s,this.setPickObject3d(c)}identify(t){return this.picked}}var zv=jv;const Nv=[],Fv=[];function Bv(t,e){for(let n=0,r=t.length;n<r;n++){const r=t[n];if(r){const{key:i,callback:o}=r;if(e===i)return t.splice(n,1),o}}return null}const Hv=document.createElement("canvas");function Gv(t,e=!1){const n=Hv.getContext("2d");if(n.clearRect(0,0,256,256),n.save(),e){n.fillStyle="red",n.strokeStyle="rgba(255,0,0,0.4)",n.lineWidth=.2;const e=t||"tile";n.font="18px sans-serif",n.rect(0,0,256,256),n.stroke(),n.fillText(e,15,128)}return Hv.toDataURL()}function Uv(t=1,e=1){let n;return"undefined"==typeof document||(n=document.createElement("canvas"),t&&(n.width=t),e&&(n.height=e)),n}Hv.width=Hv.height=256;class Vv extends Pp.TileLayer{constructor(t,e={}){super(Pp.Util.GUID(),Pp.Util.extend({urlTemplate:t},e)),this._opts=null,this._layer=null,this.material=null,this.getMaterial=null,this._baseObjectKeys={},this._loadTiles={},this._add=null,this._layerLaodTime=(new Date).getTime()}isAsynchronous(){return this._opts.worker}getBaseObjects(){const t=this._loadTiles,e=[];for(let n in t){const t=this._baseObjectKeys[n];if(t&&Array.isArray(t)&&t.length)for(let n=0,r=t.length;n<r;n++)e.push(t[n])}return e}onSelectMesh(t,e){}formatBaseObjects(t,e){return[]}loopMessage(t){}getTileData(t){const{key:e,url:n,callback:r,img:i}=t;Pp.Ajax.getJSON(n,{},(function(t,n){t?(console.error(t),r(e,null,i)):r(e,n,i)}))}_getCurentTileKeys(){const t=this.getTiles().tileGrids||[],e=[],n={};for(let r=0,i=t.length;r<i;r++){const i=t[r].tiles||[];for(let t=0,r=i.length;t<r;t++){const{id:r}=i[t];e.push(r),n[r]=!0}}return{keys:e,keysMap:n}}_isLoad(){const{keys:t}=this._getCurentTileKeys(),e=Object.keys(this._renderer.tilesInView);return t.length===e.length}_layerOnLoad(){const t=(new Date).getTime();if(t-this._layerLaodTime<20)return;this._layerLaodTime=t;const e=this._renderer.tilesInView,n=this._loadTiles,r=this._layer,i=this._baseObjectKeys,o=Object.keys(e).length,a=Object.keys(n).length,s=[];if(o&&a)for(let t in n)e[t]||i[t]&&(i[t]||[]).forEach(t=>{s.push(t)});if(s.length&&r.removeMesh(s,!1),o&&a)for(let t in e)if(!n[t])if(i[t]){const e=i[t];r.addMesh(e)}else{const{x:e,y:n,z:r}=this._getXYZOfIndex(t);this.getTileUrl(e,n,r)}this._loadTiles=Object.assign({},e),this._diffCache()}_init(){}_workerLoad(t){const e=t.target._img;e.currentCount++,e.currentCount===e.needCount&&(e.src=Gv(e._key,this._opts.debug))}_generateBaseObjects(t,e,n){if(e&&n){const{keysMap:r}=this._getCurentTileKeys();if(!r[t])return void(n.src=Gv(t,this._opts.debug));const i=this.formatBaseObjects(t,e);if(i.length){n.needCount=i.length,n.currentCount=0;for(let e=0,r=i.length;e<r;e++){const r=i[e];r._img=n,r._vt=this,this.isVisible()||r.hide(),this._cachetile(t,r),r.isAsynchronous()||n.currentCount++}this._layer.addMesh(i,!1),n.needCount===n.currentCount&&(n.src=Gv(t,this._opts.debug)),this.isAsynchronous()?i.filter(t=>t.isAsynchronous()).forEach(t=>{t.on("workerload",this._workerLoad,this)}):n.src=Gv(t,this._opts.debug)}else n.src=Gv(t,this._opts.debug);this._loadTiles[t]=!0}else n&&(n.src=Gv(t,this._opts.debug))}_diffCache(){if(Object.keys(this._baseObjectKeys).length>this._renderer.tileCache.max){const t=this._renderer.tileCache.data,e=this._renderer.tilesInView,n=[];for(let r in this._baseObjectKeys)t[r]||e[r]||((this._baseObjectKeys[r]||[]).forEach(t=>{t.isAdd&&n.push(t)}),this._diposeBaseObject(r),delete this._baseObjectKeys[r]);n.length&&this._layer.removeMesh(n,!1)}}_diposeBaseObject(t){const e=this._baseObjectKeys[t];e&&e.length&&e.forEach(t=>{t.getObject3d().geometry.dispose(),t._geometryCache&&t._geometryCache.dispose();const e=t._baseObjects;e&&e.length&&e.forEach(t=>{t.getObject3d().geometry.dispose(),t=null}),t._datas=null,t._geometriesAttributes=null,t._faceMap=null,t._colorMap=null,t.pickObject3d&&t.pickObject3d.geometry.dispose(),t=null})}_cachetile(t,e){this._baseObjectKeys[t]||(this._baseObjectKeys[t]=[]),this._baseObjectKeys[t].push(e)}_getXYZOfIndex(t){const e=t.indexOf("_")>-1?"_":"-";let[n,r,i]=t.split(e).slice(1,4);return{x:parseInt(r),y:parseInt(n),z:parseInt(i)}}_getTileExtent(t,e,n){const r=this.getMap()._getResolution(n);return this._getTileConfig().getTilePrjExtent(t,e,r)}_getTileLngLatExtent(t,e,n){const r=this._getTileExtent(t,e,n);let i=r.getMax(),o=r.getMin();const a=this.getMap().getProjection();return o=a.unproject(o),i=a.unproject(i),new Pp.Extent(o,i)}}var Wv=Vv;const Zv={worker:!1};var qv=class extends Wv{constructor(t,e={},n,r){super(Pp.Util.GUID(),Pp.Util.extend({urlTemplate:t},Zv,e)),this._opts=e,this._layer=r,this.getMaterial=n,this._baseObjectKeys={},this._loadTiles={},this._add=null,this._layerLaodTime=(new Date).getTime(),this._init()}formatBaseObjects(t,e){const n=this._opts,r=[],i=this.isAsynchronous();for(let o in e){const a=e[o]||{};let s;if(Array.isArray(a)?s=a:"FeatureCollection"===a.type&&(s=a.features),s&&s.length){const e=[],c=[],u=[];for(let t=0,n=s.length;t<n;t++){const n=s[t];if(Ag(n))e.push(n);else if(Pg(n)){const t=Ig(n);for(let e=0,n=t.length;e<n;e++)c.push(t[e])}else if(Lg(n)){const t=Ig(n);for(let e=0,n=t.length;e<n;e++)u.push(Pp.Util.extend({},t[e].properties,t[e],{coordinate:Og(t[e])}))}}if(e.length){const s=this._getMaterial(o,e,t,a);if(s){const a=this._layer.toExtrudePolygons(e,Pp.Util.extend({},{topColor:"#fff",layerName:o,asynchronous:i,key:t},n),s);r.push(a)}}if(c.length){const e=this._getMaterial(o,c,t,a);if(e&&(e instanceof Fc||e instanceof gl)){const t=this._layer.toLines(c,Pp.Util.extend({},{layerName:o},n),e);r.push(t)}}if(u.length){const e=this._getMaterial(o,u,t,a);if(e&&e instanceof Xc){const t=this._layer.toPoints(u,Pp.Util.extend({},{layerName:o},n),e);r.push(t)}}}}return r}loopMessage(t){const{currentQueue:e}={waitingQueue:Nv,currentQueue:Fv};e.length>0&&this.getTileData(t)}_init(){this.on("layerload",this._layerOnLoad),this.on("add",()=>{if(!1===this._add){const t=this.getBaseObjects();this._layer.addMesh(t)}this._add=!0,this.intervalId=setInterval(()=>{this._isLoad()&&!this._layer.getMap().isInteracting()&&this.fire("layerload")},1e3)}),this.on("remove",()=>{this._add=!1;const t=this.getBaseObjects();this._layer.removeMesh(t),clearInterval(this.intervalId)}),this.on("show",()=>{this.getBaseObjects().forEach(t=>{t.show()});for(let t in this._baseObjectKeys)(this._baseObjectKeys[t]||[]).forEach(t=>{t.show()})}),this.on("hide",()=>{this.getBaseObjects().forEach(t=>{t.hide()});for(let t in this._baseObjectKeys)(this._baseObjectKeys[t]||[]).forEach(t=>{t.hide()})}),this.on("renderercreate",t=>{t.renderer.loadTile=function(t){var e=this.layer.getTileSize(),n=new Image;return n.width=e.width,n.height=e.height,n.onload=this.onTileLoad.bind(this,n,t),n.onerror=this.onTileError.bind(this,n,t),this.loadTileImage(n,t.url,t.id),n},t.renderer.deleteTile=function(t){t&&t.image&&(t.image.onload=null,t.image.onerror=null,function(t){const e=Bv(Nv,t);e&&e(t)}((t.info||{}).id))},t.renderer.loadTileImage=(t,e,n)=>{t._key=n,function(t,e,n,r,i){const o={key:t,url:e,callback:n,img:r,vt:i};Fv.length<10?(Fv.push(o),i.loopMessage(o)):Nv.push(o)}(n,e,(t,e,n)=>{this._generateBaseObjects(t,e,n),function(t,e){if(Bv(Fv,t),Nv.length){Fv.push(Nv[0]),Nv.splice(0,1);const t=Fv[Fv.length-1];e.loopMessage(t)}}(t,this)},t,this)}})}_getMaterial(t,e,n,r){return this.getMaterial&&Pp.Util.isFunction(this.getMaterial)?this.getMaterial(t,e,n,r):null}};function Yv(t,e,n,r){const{position:i,uv:o,normal:a,indexs:s}=function(t,e,n,r){const i=t/n,o=e/r,a=-t/2,s=e/2,c=-e/2,u=(n+1)*(r+1),l=new Float32Array(3*u),h=new Float32Array(2*u),f=new Float32Array(3*u),d=new Uint32Array(10*u);let p=0,m=0,g=0;for(let u=0;u<=r;u++)for(let v=0;v<=n;v++){const y=a+i*v,_=s-o*u;l[p]=y,l[p+1]=_,l[p+2]=0,f[p]=0,f[p+1]=0,f[p+2]=1;const x=(y-a)/t,b=(_-c)/e;if(h[m]=x,h[m+1]=b,p+=3,m+=2,v<n&&u<r){const t=u*(n+1)+v,e=t+1,r=(n+1)*(u+1)+v,i=r+1;d[g]=t,d[g+1]=r,d[g+2]=e,d[g+3]=r,d[g+4]=i,d[g+5]=e,g+=6}}const v=new Uint32Array(g);for(let t=0,e=v.length;t<e;t++)v[t]=d[t];return{position:l,uv:h,normal:f,indexs:v}}(t,e,n,r),c=new no;return fm(c,"position",new Di(i,3)),fm(c,"normal",new Di(a,3)),fm(c,"uv",new Di(o,2)),c.setIndex(new Di(s,1)),c}const Jv=new Vl,Xv=document.createElement("canvas");function $v(t){if(!t)return null;let e;return"string"==typeof t?(e=new Image,e.src=t):t instanceof HTMLCanvasElement?(e=new Image,e.src=t.toDataURL()):t instanceof Image&&(e=new Image,e.src=t.src,e.crossOrigin=t.crossOrigin),e&&!e.crossOrigin&&(e.crossOrigin="Anonymous"),e}const Qv={interactive:!1,altitude:0,image:null,imageWidth:256,imageHeight:256,texture:null};var Kv=class extends Sm{constructor(t,e,n,r){e=Pp.Util.extend({},Qv,e,{layer:r,extent:t});const{texture:i,image:o,altitude:a,imageHeight:s,imageWidth:c}=e;o||console.error("not find image"),t instanceof Pp.Extent||(t=new Pp.Extent(t));const{xmin:u,ymin:l,xmax:h,ymax:f}=t;let d=1/0,p=1/0,m=-1/0,g=-1/0;[[u,l],[u,f],[h,f],[h,l]].forEach(t=>{const e=r.coordinateToVector3(t),{x:n,y:i}=e;d=Math.min(n,d),p=Math.min(i,p),m=Math.max(n,m),g=Math.max(i,g)});const v=Math.abs(m-d),y=Math.abs(g-p),_=$v(o),x=$v(i),b=Yv(v,y,c-1,s-1);super(),this._initOptions(e),this._createMesh(b,n);const w=r.distanceToVector3(a,a).x,M=r.coordinateToVector3(t.getCenter(),w);this.getObject3d().position.copy(M),n.transparent=!0,_&&(n.opacity=0,_.onload=()=>{const t=function(t,e=256,n=256){Xv.width=e,Xv.height=n;const r=Xv.getContext("2d");return r.drawImage(t,0,0,e,n),r.getImageData(0,0,e,n).data}(_,c,s);let e=0;const i={};for(let n=0,o=t.length;n<o;n+=4){const o=Gm(.1*(256*t[n]*256+256*t[n+1]+t[n+2])-1e4,r,i);b.attributes.position.array[3*e+2]=o,e++}b.attributes.position.needsUpdate=!0,x?Jv.load(x.src,t=>{n.map=t,n.opacity=1,n.needsUpdate=!0}):n.opacity=1},_.onerror=function(){console.error("not load "+_.src)}),this.type="Terrain"}};const ty={scale:1,tileDivisor:4};var ey=class extends Wv{constructor(t,e={},n,r){super(Pp.Util.GUID(),Pp.Util.extend({urlTemplate:t},ty,e)),this._opts=e,this._layer=r,this.material=n,this._baseObjectKeys={},this._loadTiles={},this._add=null,this._imgQueue={},this._layerLaodTime=(new Date).getTime(),this._init()}isAsynchronous(){return!1}formatBaseObjects(t,e){const n=this.options,r=[],{scale:i,tileDivisor:o}=n,{x:a,y:s,z:c}=this._getXYZOfIndex(t),u=this.getMap().getZoom(),l=this.getTileUrl(a,s,c),[h,f]=this.options.tileSize,d=this._getTileLngLatExtent(a,s,c),p=this.material.clone();if(c+1>=Math.round(u)){const t=new Kv(d,{image:e,imageWidth:h/o,imageHeight:f/o,texture:l},p,this._layer);t.getObject3d().scale.set(i,i,1),r.push(t)}return r}loopMessage(t){this.getTileData(t)}_init(){this.on("layerload",this._layerOnLoad),this.on("add",()=>{if(!1===this._add){const t=this.getBaseObjects();this._layer.addMesh(t)}this._add=!0,this.intervalId=setInterval(()=>{this._isLoad()&&!this._layer.getMap().isInteracting()&&this.fire("layerload")},1e3)}),this.on("remove",()=>{this._add=!1;const t=this.getBaseObjects();this._layer.removeMesh(t),clearInterval(this.intervalId)}),this.on("show",()=>{this.getBaseObjects().forEach(t=>{t.show()});for(let t in this._baseObjectKeys)(this._baseObjectKeys[t]||[]).forEach(t=>{t.show()})}),this.on("hide",()=>{this.getBaseObjects().forEach(t=>{t.hide()});for(let t in this._baseObjectKeys)(this._baseObjectKeys[t]||[]).forEach(t=>{t.hide()})}),this.on("renderercreate",t=>{t.renderer.loadTile=function(t){var e=this.layer.getTileSize(),n=new Image;return n.width=e.width,n.height=e.height,n.onload=this.onTileLoad.bind(this,n,t),n.onerror=this.onTileError.bind(this,n,t),this.loadTileImage(n,t.url,t.id),n},t.renderer.deleteTile=t=>{if(!t||!t.image)return;t.image.onload=null,t.image.onerror=null;const e=t.info||{},n=this._imgQueue[e.id];n&&(n.src="",n.onload=null,n.onerror=null,delete this._imgQueue[e.id])},t.renderer.loadTileImage=(t,e,n)=>{t._key=n;const r=new Image;this._imgQueue[n]=r;const i={key:n,url:e,rgbImage:r,callback:(t,e,n)=>{this._generateBaseObjects(t,e,n)},img:t,vt:this};this.loopMessage(i)}})}};
|
|
29
|
+
/*!
|
|
30
|
+
* Code from baidu mapv
|
|
31
|
+
* License: BSD-3
|
|
32
|
+
* https://github.com/huiyan-fe/mapv
|
|
33
|
+
*
|
|
34
|
+
*/function ny(t){t=t||{},this.gradient=t.gradient||{.25:"rgba(0, 0, 255, 1)",.55:"rgba(0, 255, 0, 1)",.85:"rgba(255, 255, 0, 1)",1:"rgba(255, 0, 0, 1)"},this.maxSize=t.maxSize||35,this.minSize=t.minSize||0,this.max=t.max||100,this.min=t.min||0,this.initPalette()}ny.prototype.setMax=function(t){this.max=t||100},ny.prototype.setMin=function(t){this.min=t||0},ny.prototype.setMaxSize=function(t){this.maxSize=t||35},ny.prototype.setMinSize=function(t){this.minSize=t||0},ny.prototype.initPalette=function(){var t=this.gradient,e=Uv(256,1),n=this.paletteCtx=e.getContext("2d"),r=n.createLinearGradient(0,0,256,1);for(var i in t)r.addColorStop(parseFloat(i),t[i]);n.fillStyle=r,n.fillRect(0,0,256,1)},ny.prototype.getColor=function(t){var e=this.getImageData(t);return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]/256+")"},ny.prototype.getImageData=function(t){var e=this.paletteCtx.getImageData(0,0,256,1).data;if(void 0===t)return e;var n=this.max,r=this.min;t>n&&(t=n),t<r&&(t=r);var i=4*Math.floor((t-r)/(n-r)*255);return[e[i],e[i+1],e[i+2],e[i+3]]},ny.prototype.getSize=function(t){var e=this.max,n=this.min,r=this.maxSize,i=this.minSize;return t>e&&(t=e),t<n&&(t=n),e>n?i+(t-n)/(e-n)*(r-i):r},ny.prototype.getLegend=function(t){var e=this.gradient,n=t.width||20,r=t.height||180,i=Uv(n,r),o=i.getContext("2d"),a=o.createLinearGradient(0,r,0,0);for(var s in e)a.addColorStop(parseFloat(s),e[s]);return o.fillStyle=a,o.fillRect(0,0,n,r),i};var ry=ny;
|
|
35
|
+
/*!
|
|
36
|
+
* Code from baidu mapv
|
|
37
|
+
* License: BSD-3
|
|
38
|
+
* https://github.com/huiyan-fe/mapv
|
|
39
|
+
*
|
|
40
|
+
*/function iy(t,e,n){var r=oy(n),i=function(t){return t.min||0}(n),o=r-i,a=n.range||null,s=0,c=1024;a&&2===a.length&&(s=(a[0]-i)/o*1024),a&&2===a.length&&(c=(a[1]-i)/o*1024);for(var u,l=n.maxOpacity||.8,h=n.minOpacity||0,f=3,d=t.length;f<d;f+=4)u=4*t[f],t[f]/256>l&&(t[f]=256*l),t[f]/256<h&&(t[f]=256*h),u&&u>=s&&u<=c?(t[f-3]=e[u],t[f-2]=e[u+1],t[f-1]=e[u+2]):t[f]=0}function oy(t){return t.max||100}function ay(t,e,n){var r=oy(n),i=function(t){var e=t/2,n=t+e,r=1e4,i=Uv(2*n,2*n),o=i.getContext("2d");return o.shadowBlur=e,o.shadowColor="black",o.shadowOffsetX=o.shadowOffsetY=r,o.beginPath(),o.arc(n-r,n-r,t,0,2*Math.PI,!0),o.closePath(),o.fill(),i}(n._size||n.size||13),o=i.width/2,a=i.height/2,s=e,c={};for(var u in s.forEach((function(t){var e=void 0===t.count?1:t.count,n=Math.min(1,e/r).toFixed(2);c[n]=c[n]||[],c[n].push(t)})),c)if(!isNaN(u)){var l=c[u];t.beginPath(),n.withoutAlpha||(t.globalAlpha=u),l.forEach((function(e){var n=e.coordinate,s=void 0===e.count?1:e.count;t.globalAlpha=s/r,t.drawImage(i,n[0]-o,n[1]-a)}))}}var sy={draw:function(t,e,n){if(!(t.canvas.width<=0||t.canvas.height<=0)){var r=n.strength||.3;t.strokeStyle="rgba(0,0,0,"+r+")";var i=Uv(t.canvas.width,t.canvas.height),o=i.getContext("2d");o.scale(devicePixelRatio,devicePixelRatio),n=n||{},t.save();var a=new ry({gradient:n.gradient});if(ay(o,e,n),!n.absolute){var s=o.getImageData(0,0,t.canvas.width,t.canvas.height);iy(s.data,a.getImageData(),n),t.putImageData(s,0,0),t.restore()}a=null,i=null}},drawGray:ay,colorize:iy};const cy={altitude:0,interactive:!1,min:0,max:100,size:13,gradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},gridScale:.5};var uy=class extends Sm{constructor(t,e,n,r){Array.isArray(t)||(t=[t]);let i=1/0,o=1/0,a=-1/0,s=-1/0;const c=[];for(let e=0,n=t.length;e<n;e++){const{coordinate:n,lnglat:u,xy:l}=t[e],h=n||u||l;if(!h){console.warn("not find coordinate");continue}const f=r.coordinateToVector3(h);c.push(f);const{x:d,y:p}=f;i=Math.min(i,d),o=Math.min(o,p),a=Math.max(a,d),s=Math.max(s,p)}e=Pp.Util.extend({},cy,e,{layer:r,points:t});let{gridScale:u,altitude:l}=e;const h=Math.abs(a-i),f=Math.abs(s-o),d=Math.max(h*u,f*u);d>2048&&(console.warn(`gridScale: ${u} it's too big. I hope it's a smaller value,canvas max size is 2048* 2048`),u=2048/(d/u));const p=Math.ceil(h*u),m=Math.ceil(f*u),g=p/h,v=m/f,y=[];for(let e=0,n=c.length;e<n;e++){const n=c[e];n.x-=i,n.y-=o,n.x*=g,n.y*=v,n.y=m-n.y,y.push({coordinate:[n.x,n.y],count:t[e].count})}let _=Uv(p,m),x=_.getContext("2d");sy.drawGray(x,y,e);const b=x.getImageData(0,0,x.canvas.width,x.canvas.height);let w=-1/0;const M=new Float32Array(b.data.length/4),S=new Float32Array(b.data.length/4);for(let t=3,e=b.data.length,n=0;t<e;t+=4){const e=b.data[t];w=Math.max(w,e),S[n]=e,e<=0&&(M[n]=1),n++}const T=new ry({gradient:e.gradient});sy.colorize(b.data,T.getImageData(),e),_=null,x=null;const E=Yv(h,f,p-1,m-1),C=E.getIndex().array,A=E.attributes.position.array,P=new Float32Array(A.length),L=new Uint32Array(6*A.length),R=new Ri;let O=0;for(let t=0,e=A.length,n=0,r=C.length,i=0,o=b.data.length,a=0;t<Math.max(e,r,o);t+=3){if(t<e){const e=S[a];e>0&&(A[t+2]=e/w)}if(n<r){const t=C[n],e=C[n+1],r=C[n+2];M[t]&&M[e]&&M[r]||(L[O]=t,L[O+1]=e,L[O+2]=r,O+=3)}if(i<o){const t=`rgb(${b.data[i]},${b.data[i+1]},${b.data[i+2]})`;R.setStyle(t),P[n]=R.r,P[n+1]=R.g,P[n+2]=R.b}n+=3,i+=4,a++}const k=new Uint32Array(O);for(let t=0;t<O;t++)k[t]=L[t];E.setIndex(new Di(k,1)),fm(E,"color",new Di(P,3,!0)),n.vertexColors=dm(),super(),this._initOptions(e),this._createMesh(E,n);const I=r.distanceToVector3(l,l).x;this.getObject3d().position.copy(new or((i+a)/2,(o+s)/2,I)),this.type="HeatMap"}};const ly=new Ri;let hy=1;var fy=class{constructor(t){this.object3ds=[],this.layer=t,this.camera=t.getCamera(),this.renderer=t.getThreeRenderer(),this.pickingTexture=new nr(1,1),this.pickingScene=new ec}getColor(){return ly.setHex(hy),hy++,ly}add(t){if(t){const e=t._colorIndex;e&&(this.object3ds[e]=t,this.pickingScene.add(t))}return this}remove(t){if(t){const e=t._colorIndex;e&&(this.object3ds[e]=null,this.pickingScene.remove(t))}return this}isEmpty(){if(0===this.pickingScene.children.length)return!0;for(let t=0,e=this.pickingScene.children.length;t<e;t++){const e=this.pickingScene.children[t];if(e){const t=e.__parent;if(t&&!0===t.getOptions().interactive)return!1}}return!0}pick(t){if(!t)return;if(this.isEmpty())return;const{camera:e,renderer:n,pickingTexture:r,pickingScene:i,object3ds:o,layer:a}=this,s=this.pickingScene.children.length;for(let t=0;t<s;t++){const e=this.pickingScene.children[t];e&&e.__parent&&(e.__parent.picked=!1)}const{width:c,height:u}=a._getRenderer().canvas,l=r.width,h=r.height;c===l&&u===h||r.setSize(c,u),n.setRenderTarget(r),n.clear(),n.render(i,e);const f=new Uint8Array(4),{x:d,y:p}=t,m=window.devicePixelRatio,g=d*m,v=r.height-p*m;n.readRenderTargetPixels(r,Math.round(g),Math.round(v),1,1,f);const y=f[0]<<16|f[1]<<8|f[2],_=o[y];if(_)_.__parent&&(o[y].__parent.picked=!0);else for(let t=0;t<s;t++){const e=this.pickingScene.children[t];if(e&&e.__parent){const t=e.__parent;if(t._colorMap&&null!=t._colorMap[y]){t.picked=!0,t.index=t._colorMap[y];break}}}n.setRenderTarget(null)}};const dy={bottomHeight:0,altitude:0};var py=class extends Sm{constructor(t,e,n,r){e=Pp.Util.extend({},dy,e,{layer:r,lineString:t}),super(),this._initOptions(e);const{lineStrings:i,center:o}=Ng(t),a=[],s={};for(let t=0,n=i.length;t<n;t++){const n=Dg(i[t],r,o).positionsV;Vm(n,e.bottomHeight,r,s),Fg(a,n)}const c=new _m;c.setPositions(a),this._setMaterialRes(r,n),this._createLine2(c,n);const{altitude:u}=e,l=r.distanceToVector3(u,u).x,h=r.coordinateToVector3(o,l);this.getObject3d().position.copy(h),this._setPickObject3d(a,n.linewidth),this._init(),this.type="FatLine"}_init(){const t=this.getLayer().getPick();this.on("add",()=>{t.add(this.pickObject3d)}),this.on("remove",()=>{t.remove(this.pickObject3d)})}_setMaterialRes(t,e){const n=t.getMap().getSize(),r=n.width,i=n.height;e.resolution.set(r,i)}_setPickObject3d(t,e){const n=new _m;n.setPositions(t);const r=this.getLayer().getPick().getColor(),i=[];for(let e=0,n=t.length/3;e<n;e++)i.push(r.r,r.g,r.b);n.setColors(i);const o=new vm({color:"#fff",linewidth:e,vertexColors:dm()});this._setMaterialRes(this.getLayer(),o);const a=r.getHex(),s=new xm(n,o);s.position.copy(this.getObject3d().position),s._colorIndex=a,this.setPickObject3d(s)}identify(t){return this.picked}setSymbol(t){if(t&&t instanceof Si){t.needsUpdate=!0;const e=this.getMap().getSize(),n=e.width,r=e.height;t.resolution.set(n,r),this.getObject3d().material=t}return this}};const my={altitude:0,colors:null};class gy extends(uv(Sm)){constructor(t,e,n,r){Array.isArray(t)||(t=[t]);const i=[],o=[],a=t.length;for(let e=0;e<a;e++){const n=Ng(t[e]);i.push(n.center),o.push(n.lineStrings)}const s=Um(i);e=Pp.Util.extend({},my,e,{layer:r,lineStrings:t,coordinate:s});const c=[],u={};let l=0,h=[],f=[],d=0,p=[];for(let t=0;t<a;t++){const e=o[t];let n=0;for(let t=0,i=e.length;t<i;t++){const i=Pg(e[t])?e[t].properties:e[t].getProperties()||{},{positionsV:o}=Dg(e[t],r,s);Vm(o,i.bottomHeight,r,u),n+=2*o.length-2,Fg(p,o)}const i=n;h[t]=[l,l+i],l+=i,f[t]={position:{count:n,start:d,end:d+3*n},instanceStart:{count:n,start:d,end:d+3*n},instanceEnd:{count:n,start:d,end:d+3*n},hide:!1},d+=3*n}super(),this._initOptions(e);const m=new _m;m.setPositions(p),this._setMaterialRes(r,n),this._createLine2(m,n);const{altitude:g}=e,v=r.distanceToVector3(g,g).x,y=r.coordinateToVector3(s,v);this.getObject3d().position.copy(y),this._faceMap=h,this._baseObjects=c,this._datas=t,this._geometriesAttributes=f,this.faceIndex=null,this.index=null,this._geometryCache=new _m,this._geometryCache.setPositions(p),this._colorMap={},this.isHide=!1,this._initBaseObjectsEvent(c),this._setPickObject3d(p,n.linewidth),this._init(),this.type="FatLines"}_setMaterialRes(t,e){const n=t.getMap().getSize(),r=n.width,i=n.height;e.resolution.set(r,i)}_setPickObject3d(t,e){const n=this._geometryCache||new _m;n.setPositions(t);const r=this.getLayer().getPick(),{_geometriesAttributes:i}=this,o=Wm(i);let a=0;for(let t=0,e=i.length;t<e;t++){const e=r.getColor(),n=e.getHex();this._colorMap[n]=t;const{count:s}=i[t].position;this._datas[t].colorIndex=n;for(let t=0;t<s;t++)o[a]=e.r,o[a+1]=e.g,o[a+2]=e.b,a+=3}n.setColors(o);const s=new vm({color:"#fff",linewidth:e,vertexColors:dm()});this._setMaterialRes(this.getLayer(),s);const c=r.getColor().getHex(),u=new xm(n,s);u.position.copy(this.getObject3d().position),u._colorIndex=c,this.setPickObject3d(u)}identify(t){return this.picked}setSymbol(t){if(t&&t instanceof Si){t.needsUpdate=!0;const e=this.getMap().getSize(),n=e.width,r=e.height;t.resolution.set(n,r),this.getObject3d().material=t}return this}getSelectMesh(){const t=this._getIndex();if(null!=t){if(!this._baseObjects[t]){const e=this._datas[t],n=Pp.Util.extend({},this.getOptions(),{index:t},Pg(e)?e.properties:e.getProperties());this._baseObjects[t]=new py(e,n,this.getObject3d().material,this.getLayer()),this._proxyEvent(this._baseObjects[t])}return{data:this._datas[t],baseObject:this._baseObjects[t]}}}_updateAttribute(t,e){const{indexs:n}=this._getHideGeometryIndex(e),r=this._geometryCache.attributes[e].array,i=r.length;for(let e=0;e<i;e++)t.array[e]=r[e];for(let r=0;r<n.length;r++){const i=n[r],{start:o,end:a}=this._geometriesAttributes[i][e];for(let e=o;e<a;e++)t.array[e]=-1e5}return this}_showGeometry(t,e){let n;if(t&&(n=t.getOptions().index),null!=n){const t=this._geometriesAttributes[n],{hide:r}=t;if(r===e)return this;t.hide=e;const i=this.getObject3d().geometry;this._updateAttribute(i.attributes.instanceStart,"instanceStart"),this._updateAttribute(i.attributes.instanceEnd,"instanceEnd"),i.attributes.instanceStart.data.needsUpdate=!0,i.attributes.instanceEnd.data.needsUpdate=!0,this.isHide=e}return this}}var vy=gy;const yy={radius:10,height:100,altitude:0,topColor:"",bottomColor:"#2d2f61"};var _y=class extends Sm{constructor(t,e,n,r){e=Pp.Util.extend({},yy,e,{layer:r,coordinate:t}),super(),this._initOptions(e);const{height:i,radius:o,topColor:a,bottomColor:s,altitude:c}=e,u=r.distanceToVector3(i,i).x,l=r.distanceToVector3(o,o).x,h=Fm().clone();h.scale(2*l,2*l,u),a&&(zm(h,s,a,"z",u/2),n.vertexColors=dm()),this._createMesh(h,n);const f=r.distanceToVector3(c,c).x,d=r.coordinateToVector3(t,f);this.getObject3d().position.copy(d),this.type="Box"}};const xy={radius:10,height:100,altitude:0,topColor:null,bottomColor:"#2d2f61"};class by extends(uv(Sm)){constructor(t,e,n,r){Array.isArray(t)||(t=[t]);const i=t.length,o=Um(t),a=r.coordinateToVector3(o),s=[],c=[],u=[],l=[];let h=0,f=0,d=0,p=0;const m={};for(let e=0;e<i;e++){const i=Pp.Util.extend({index:e},xy,t[e]),{radius:o,altitude:g,topColor:v,bottomColor:y,height:_,coordinate:x}=i,b=Gm(o,r,m),w=Gm(_,r,m),M=Gm(g,r,m),S=Fm().clone();S.scale(2*b,2*b,w),v&&(zm(S,y,v,"z",w/2),n.vertexColors=dm());const T=r.coordinateToVector3(x).sub(a),E=S.attributes.position.array;for(let t=0,e=E.length;t<e;t+=3)E[t+2]+=M,E[t]+=T.x,E[t+1]+=T.y,E[t+2]+=T.z;s.push(S);const C=new _y(x,i,n,r);c.push(C);const A=S.index.count/3;l[e]=[h+1,h+A],h+=A;const P=S.attributes.position.count,L=S.attributes.normal.count,R=S.attributes.uv.count;u[e]={position:{count:P,start:f,end:f+3*P},normal:{count:L,start:d,end:d+3*L},uv:{count:R,start:p,end:p+2*R},hide:!1},f+=3*P,d+=3*L,p+=2*R}super(),e=Pp.Util.extend({},{altitude:0,layer:r,points:t},e),this._initOptions(e);const g=Nm(s);this._createMesh(g,n);const v=e.altitude,y=r.distanceToVector3(v,v).x,_=a.clone();_.z=y,this.getObject3d().position.copy(_),this._faceMap=l,this._baseObjects=c,this._datas=t,this._geometriesAttributes=u,this.faceIndex=null,this._geometryCache=g.clone(),this.isHide=!1,this._colorMap={},this._initBaseObjectsEvent(c),this._setPickObject3d(),this._init(),this.type="Boxs"}identify(t){return this.picked}}var wy=by;const My=Math.PI/180,Sy=[[4e3,220],[2e3,100],[1e3,30],[500,15],[100,5],[50,2],[10,1],[5,.7],[2,.1],[1,.05],[.5,.02]],Ty=["mousemove","click","mousedown","mouseup","dblclick","contextmenu","touchstart","touchmove","touchend"],Ey=new Pp.Coordinate(0,0),Cy=new Pp.Point(0,0);class Ay extends Pp.CanvasLayer{constructor(t,e){super(t,e),this._animationBaseObjectMap={},this._needsUpdate=!0,this._mousemoveTimeOut=0,this._baseObjects=[],this._delayMeshes=[],this.type="ThreeLayer"}isRendering(){const t=this.getMap();return!!t&&(t.isInteracting()||t.isAnimating())}prepareToDraw(...t){}draw(){this.renderScene()}drawOnInteracting(){this.renderScene()}coordinateToVector3(t,e=0){const n=this.getMap();if(!n)return null;const r=Array.isArray(t);r&&(Ey.x=t[0],Ey.y=t[1]),r||t instanceof Pp.Coordinate||(t=new Pp.Coordinate(t));const i=Ly(n),o=Ry(n,r?Ey:t,i,Cy);return new or(o.x,o.y,e)}distanceToVector3(t,e,n){if(0===t&&0===e||!Pp.Util.isNumber(t)||!Pp.Util.isNumber(e))return new or(0,0,0);const r=this.getMap(),i=Ly(r);let o=n||r.getCenter();o instanceof Pp.Coordinate||(o=new Pp.Coordinate(o));const a=r.locate(o,t,e),s=Ry(r,o,i),c=Ry(r,a,i),u=Math.abs(c.x-s.x)*Pp.Util.sign(t),l=Math.abs(c.y-s.y)*Pp.Util.sign(e);return new or(u,l,0)}toShape(t){if(!t)return null;if(t instanceof Pp.MultiPolygon)return t.getGeometries().map(t=>this.toShape(t));const e=t.getCenter(),n=this.coordinateToVector3(e),r=t.getShell().map(t=>{const e=this.coordinateToVector3(t).sub(n);return new Yn(e.x,e.y)}),i=new dh(r),o=t.getHoles();return o&&o.length>0&&(i.holes=o.map(t=>{const e=t.map(t=>{const e=this.coordinateToVector3(t).sub(n);return new Yn(e.x,e.y)});return new dh(e)})),i}toExtrudeMesh(t,e,n,r){if(!t)return null;if(t instanceof Pp.MultiPolygon)return t.getGeometries().map(t=>this.toExtrudeMesh(t,e,n,r));const i=t.getCoordinates();i.forEach(t=>{for(let e=t.length-1;e>=1;e--)t[e].equals(t[e-1])&&t.splice(e,1)}),t.setCoordinates(i);const o=this.toShape(t),a=this.coordinateToVector3(t.getCenter());r=Pp.Util.isNumber(r)?r:e,r=this.distanceToVector3(r,r).x;const s=this.distanceToVector3(e,e).x,c={bevelEnabled:!1,bevelSize:1};c[parseInt(h)>=93?"depth":"amount"]=r;const u=new Wu(o,c);let l=u;no.prototype.fromGeometry&&(l=new no,l.fromGeometry(u));const f=new bo(l,n);return f.position.set(a.x,a.y,s-r),f}toExtrudePolygon(t,e,n){return new $g(t,e,n,this)}toBar(t,e,n){return new Hm(t,e,n,this)}toLine(t,e,n){return new Hg(t,e,n,this)}toExtrudeLine(t,e,n){return new Jg(t,e,n,this)}toModel(t,e){return new Kg(t,e,this)}toExtrudeLineTrail(t,e,n){return new av(t,e,n,this)}toExtrudePolygons(t,e,n){return new gv(t,e,n,this)}toPoint(t,e,n){return new xv(t,e,n,this)}toPoints(t,e,n){return new Av(t,e,n,this)}toBars(t,e,n){return new Rv(t,e,n,this)}toExtrudeLines(t,e,n){return new Iv(t,e,n,this)}toLines(t,e,n){return new zv(t,e,n,this)}toThreeVectorTileLayer(t,e,n){return new qv(t,e,n,this)}toTerrain(t,e,n){return new Kv(t,e,n,this)}toTerrainVectorTileLayer(t,e,n){return new ey(t,e,n,this)}toHeatMap(t,e,n){return new uy(t,e,n,this)}toFatLine(t,e,n){return new py(t,e,n,this)}toFatLines(t,e,n){return new vy(t,e,n,this)}toBox(t,e,n){return new _y(t,e,n,this)}toBoxs(t,e,n){return new wy(t,e,n,this)}getBaseObjects(){return this.getMeshes().filter(t=>t instanceof Sm)}getMeshes(){const t=this.getScene();if(!t)return[];const e=[];for(let n=0,r=t.children.length;n<r;n++){const r=t.children[n];r instanceof si&&!(r instanceof Ao)&&e.push(r.__parent||r)}return e}clear(){return this.clearMesh()}clearMesh(){const t=this.getScene();if(!t)return this;for(let e=t.children.length-1;e>=0;e--){const n=t.children[e];if(n instanceof si&&!(n instanceof Ao)){t.remove(n);const e=n.__parent;e&&e instanceof Sm&&(e.isAdd=!1,e._fire("remove",{target:e}),delete this._animationBaseObjectMap[n.uuid])}}return this}lookAt(t){const e=this._getRenderer();return e&&e.context.lookAt(t),this}getCamera(){const t=this._getRenderer();return t?t.camera:null}getScene(){const t=this._getRenderer();return t?t.scene:null}renderScene(){const t=this._getRenderer();return t&&(t.clearCanvas(),t.renderScene()),this}loop(t=!1){const e=this._delayMeshes;if(!e.length)return;const n=this.getMap();if(!n||n.isAnimating()||n.isInteracting())return;const r=this.options.loopRenderCount||50,i=e.slice(0,r);i&&this.addMesh(i,t),e.splice(0,r)}renderPickScene(){const t=this._getRenderer();if(t){const e=t.pick;e&&e.pick(this._containerPoint)}return this}getThreeRenderer(){const t=this._getRenderer();return t?t.context:null}getPick(){const t=this._getRenderer();return t?t.pick:null}delayAddMesh(t){if(!t)return this;Array.isArray(t)||(t=[t]);for(let e=0,n=t.length;e<n;e++)this._delayMeshes.push(t[e]);return this}addMesh(t,e=!0){if(!t)return this;Array.isArray(t)||(t=[t]);const n=this.getScene();return t.forEach(t=>{t instanceof Sm?(n.add(t.getObject3d()),t.isAdd||(t.isAdd=!0,t._fire("add",{target:t})),t._animation&&Pp.Util.isFunction(t._animation)&&(this._animationBaseObjectMap[t.getObject3d().uuid]=t)):t instanceof si&&n.add(t)}),this._zoomend(),e&&this.renderScene(),this}removeMesh(t,e=!0){if(!t)return this;Array.isArray(t)||(t=[t]);const n=this.getScene();return t.forEach(t=>{if(t instanceof Sm){n.remove(t.getObject3d()),t.isAdd&&(t.isAdd=!1,t._fire("remove",{target:t})),t._animation&&Pp.Util.isFunction(t._animation)&&delete this._animationBaseObjectMap[t.getObject3d().uuid];const e=this._delayMeshes;if(e.length)for(let n=0,r=e.length;n<r;n++)if(e[n]===t){e.splice(n,1);break}}else t instanceof si&&n.remove(t)}),e&&this.renderScene(),this}_initRaycaster(){return this._raycaster||(this._raycaster=new jf,this._mouse=new Yn),this}identify(t,e){if(!t)return console.error("coordinate is null,it should be Coordinate"),[];if(Array.isArray(t)&&(t=new Pp.Coordinate(t)),!(t instanceof Pp.Coordinate))return console.error("coordinate type is error,it should be Coordinate"),[];const n=this.getMap().coordToContainerPoint(t);this._containerPoint=n;const{x:r,y:i}=n;this._initRaycaster();const o=this._raycaster,a=this._mouse,s=this.getCamera(),c=this.getScene(),u=this.getMap().getSize();if(!c)return[];const l=u.width,h=u.height;a.x=r/l*2-1,a.y=-i/h*2+1,o.setFromCamera(a,s),function(t,e){hm>113?t.params.Line.threshold=e:t.linePrecision=e}(o,this._getLinePrecision(this.getMap().getResolution()));const f=[],d=[];c.children.forEach(t=>{const e=t.__parent;if(e&&e.getOptions){const n=e;n.getOptions().interactive&&n.isVisible()&&(n.identify&&Pp.Util.isFunction(n.identify)?d.push(n):f.push(t))}else(t instanceof bo||t instanceof qs)&&f.push(t)});let p=[];const m=o.intersectObjects(f,!0);m&&Array.isArray(m)&&m.length&&(p=m.map(t=>{let e=t.object;e=this._recursionMesh(e)||{};const n=e.__parent||e;return n.faceIndex=t.faceIndex,n.index=t.index,n})),this.renderPickScene(),d.length&&d.forEach(e=>{e.identify(t)&&p.push(e)});const g=p.length;for(let t=0;t<g;t++)if(p[t])for(let e=t+1;e<g;e++)p[t]===p[e]&&p.splice(e,1);const v=(e=Pp.Util.extend({},e)).count;return Pp.Util.isNumber(v)&&v>0?p.slice(0,v):p}_recursionMesh(t){for(;t&&t.parent!==this.getScene();)t=t.parent;return t}_getLinePrecision(t=10){for(let e=0,n=Sy.length;e<n;e++){const[n,r]=Sy[e];if(t>n)return r}return.01}_identifyBaseObjectEvents(t){if(!this.options.geometryEvents)return this;const e=this.map||this.getMap();if(e.isInteracting()||!e.options.geometryEvents)return this;const{type:n,coordinate:r}=t,i=Pp.Util.now();if(this._mousemoveTimeOut&&"mousemove"===n&&i-this._mousemoveTimeOut<64)return this;this._mousemoveTimeOut=i,e.resetCursor("default");const o=this.options.identifyCountOnEvent;let a=Math.max(0,Pp.Util.isNumber(o)?o:0);0===a&&(a=1/0);const s=this.identify(r,{count:a}),c=this.getScene();if(0===s.length&&c)for(let e=0,n=c.children.length;e<n;e++){const n=(c.children[e]||{}).__parent;n&&n.fire("empty",Object.assign({},t,{target:n}))}if("mousemove"===n){s.length&&e.setCursor("pointer");const i=[];this._baseObjects&&this._baseObjects.forEach(t=>{let e=!0;s.forEach(n=>{t===n&&(e=!1)}),e&&i.push(t)}),i.forEach(e=>{e&&e instanceof Sm&&(e.getSelectMesh?e.isHide||(e._mouseover=!1,e.fire("mouseout",Object.assign({},t,{target:e,type:"mouseout",selectMesh:null})),e.closeToolTip()):(e._mouseover=!1,e.fire("mouseout",Object.assign({},t,{target:e,type:"mouseout"})),e.closeToolTip()))}),s.forEach(e=>{if(e instanceof Sm){e._mouseover||(e.fire("mouseover",Object.assign({},t,{target:e,type:"mouseover",selectMesh:e.getSelectMesh?e.getSelectMesh():null})),e._mouseover=!0),e.fire(n,Object.assign({},t,{target:e,selectMesh:e.getSelectMesh?e.getSelectMesh():null}));const i=e.getToolTip();i&&!i._owner&&i.addTo(e),e.openToolTip(r)}}),this._baseObjects=s}else s.forEach(e=>{if(e instanceof Sm&&(e.fire(n,Object.assign({},t,{target:e,selectMesh:e.getSelectMesh?e.getSelectMesh():null})),"click"===n)){const t=e.getInfoWindow();t&&!t._owner&&t.addTo(e),e.openInfoWindow(r)}});return this}_zoomend(){const t=this.getScene();if(!t)return;const e=this.getMap().getZoom();t.children.forEach(t=>{const n=t.__parent;if(n&&n.getOptions){const t=n;t.zoomChange&&Pp.Util.isFunction(t.zoomChange)&&t.zoomChange(e);const r=t.getMinZoom(),i=t.getMaxZoom();e<r||e>i?(t.isVisible()&&(t.getObject3d().visible=!1),t._zoomVisible=!1):r<=e&&e<=i&&(t._visible&&(t.getObject3d().visible=!0),t._zoomVisible=!0)}})}onAdd(){super.onAdd();const t=this.map||this.getMap();return t?(Ty.forEach(e=>{t.on(e,this._identifyBaseObjectEvents,this)}),this._needsUpdate=!0,this._animationBaseObjectMap||(this._animationBaseObjectMap={}),t.on("zooming zoomend",this._zoomend,this),this):this}onRemove(){super.onRemove();const t=this.map||this.getMap();return t?(Ty.forEach(e=>{t.off(e,this._identifyBaseObjectEvents,this)}),t.off("zooming zoomend",this._zoomend,this),this):this}_callbackBaseObjectAnimation(){const t=this;if(t._animationBaseObjectMap)for(const e in t._animationBaseObjectMap)t._animationBaseObjectMap[e]._animation();return this}_getFovRatio(){const t=this.getMap().getFov();return Math.tan(t/2*My)}}Ay.mergeOptions({renderer:"gl",doubleBuffer:!1,glOptions:null,geometryEvents:!0,identifyCountOnEvent:0,forceRenderOnZooming:!0,loopRenderCount:50});class Py extends Pp.renderer.CanvasLayerRenderer{constructor(){super(...arguments),this._renderTime=0}getPrepareParams(){return[this.scene,this.camera]}getDrawParams(){return[this.scene,this.camera]}_drawLayer(){super._drawLayer.apply(this,arguments)}hitDetect(){return!1}createCanvas(){super.createCanvas(),this.createContext()}createContext(){if(this.canvas.gl&&this.canvas.gl.wrap)this.gl=this.canvas.gl.wrap();else{const t=this.layer.options.glOptions||{alpha:!0,depth:!0,antialias:!0,stencil:!0,preserveDrawingBuffer:!1};t.preserveDrawingBuffer=!0,this.gl=this.gl||this._createGLContext(this.canvas,t)}this._initThreeRenderer(),this.layer.onCanvasCreate(this.context,this.scene,this.camera)}_initThreeRenderer(){this.matrix4=new jr;const t=new $s({context:this.gl,alpha:!0});t.autoClear=!1,t.setClearColor(new Ri(1,1,1),0),t.setSize(this.canvas.width,this.canvas.height),t.clear(),this.context=t;const e=this.scene=new ec,n=this.layer.getMap(),r=n.getFov()*Math.PI/180,i=this.camera=new Po(r,n.width/n.height,n.cameraNear,n.cameraFar);i.matrixAutoUpdate=!1,this._syncCamera(),e.add(i),this.pick=new fy(this.layer)}onCanvasCreate(){super.onCanvasCreate()}resizeCanvas(t){if(!this.canvas)return;let e,n=this.getMap();e=t||n.getSize();const r=n.getDevicePixelRatio?n.getDevicePixelRatio():Pp.Browser.retina?2:1,i=this.canvas;i.height=r*e.height,i.width=r*e.width,this.layer._canvas&&i.style&&(i.style.width=e.width+"px",i.style.height=e.height+"px"),this.context.setSize(i.width,i.height)}clearCanvas(){this.canvas&&this.context.clear()}prepareCanvas(){return this.canvas?this.clearCanvas():this.createCanvas(),this.layer.fire("renderstart",{context:this.context}),null}renderScene(){const t=Pp.Util.now();t-this._renderTime>=16&&(this.layer._callbackBaseObjectAnimation(),this._renderTime=t),this._syncCamera(),this.context.render(this.scene,this.camera),this.completeRender()}remove(){delete this._drawContext,super.remove()}_syncCamera(){const t=this.getMap(),e=this.camera;e.matrix.elements=t.cameraWorldMatrix,e.projectionMatrix.elements=t.projMatrix,this.matrix4.invert?e.projectionMatrixInverse.elements=this.matrix4.copy(e.projectionMatrix).invert().elements:e.projectionMatrixInverse.elements=this.matrix4.getInverse(e.projectionMatrix).elements}_createGLContext(t,e){const n=["webgl2","webgl","experimental-webgl"];let r=null;for(let i=0;i<n.length;++i){try{r=t.getContext(n[i],e)}catch(t){}if(r)break}return r}}function Ly(t){return t.getGLRes?t.getGLRes():t.getGLZoom()}function Ry(t,e,n,r){return t.coordToPointAtRes?t.coordToPointAtRes(e,n,r):t.coordinateToPoint(e,n,r)}Ay.registerRenderer("gl",Py),Pp.registerWorkerAdapter&&Pp.registerWorkerAdapter("__maptalks.three__",'function(e){"use strict";var d=n,t=n;function n(e,t,n){n=n||2;var r,i,o,a,v,h=t&&t.length,l=h?t[0]*n:e.length,u=p(e,0,l,n,!0),x=[];if(!u||u.next===u.prev)return x;if(h&&(u=function(e,t,n,r){var i,o,a,v,h=[];for(i=0,o=t.length;i<o;i++)a=t[i]*r,v=i<o-1?t[i+1]*r:e.length,(v=p(e,a,v,r,!1))===v.next&&(v.steiner=!0),h.push(function(e){var t=e,n=e;for(;(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next,t!==e;);return n}(v));for(h.sort(m),i=0;i<h.length;i++)!function(e,t){(t=function(e,t){var n,r=t,i=e.x,o=e.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var v=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(v<=i&&a<v){if((a=v)===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}}while(r=r.next,r!==t);if(!n)return null;if(i===a)return n;var h,l=n,u=n.x,x=n.y,f=1/0;r=n;for(;i>=r.x&&r.x>=u&&i!==r.x&&M(o<x?i:a,o,u,x,o<x?a:i,o,r.x,r.y)&&(h=Math.abs(o-r.y)/(i-r.x),Z(r,e)&&(h<f||h===f&&(r.x>n.x||r.x===n.x&&function(e,t){return w(e.prev,e,t.prev)<0&&w(t.next,e,e.next)<0}(n,r)))&&(n=r,f=h)),r=r.next,r!==l;);return n}(e,t))&&(e=S(t,e),g(t,t.next),g(e,e.next))}(h[i],n),n=g(n,n.next);return n}(e,t,u,n)),e.length>80*n){for(var f=r=e[0],s=i=e[1],c=n;c<l;c+=n)(o=e[c])<f&&(f=o),(a=e[c+1])<s&&(s=a),r<o&&(r=o),i<a&&(i=a);v=0!==(v=Math.max(r-f,i-s))?1/v:0}return y(u,x,n,f,s,v),x}function p(e,t,n,r,i){var o,a;if(i===0<z(e,t,n,r))for(o=t;o<n;o+=r)a=v(o,e[o],e[o+1],a);else for(o=n-r;t<=o;o-=r)a=v(o,e[o],e[o+1],a);return a&&u(a,a.next)&&(f(a),a=a.next),a}function g(e,t){if(!e)return e;t=t||e;var n,r=e;do{if(n=!1,r.steiner||!u(r,r.next)&&0!==w(r.prev,r,r.next))r=r.next;else{if(f(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function y(e,t,n,r,i,o,a){if(e){!a&&o&&function(e,t,n,r){for(var i=e;null===i.z&&(i.z=b(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next,i!==e;);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,a,v,h,l=1;do{for(n=e,o=e=null,a=0;n;){for(a++,r=n,t=v=0;t<l&&(v++,r=r.nextZ);t++);for(h=l;0<v||0<h&&r;)0!==v&&(0===h||!r||n.z<=r.z)?(n=(i=n).nextZ,v--):(r=(i=r).nextZ,h--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}}while(o.nextZ=null,l*=2,1<a)}(i)}(e,r,i,o);for(var v,h,l=e;e.prev!==e.next;)if(v=e.prev,h=e.next,o?function(e,t,n,r){var i=e.prev,o=e,a=e.next;if(0<=w(i,o,a))return!1;var v=(i.x<o.x?i.x<a.x?i:a:o.x<a.x?o:a).x,h=(i.y<o.y?i.y<a.y?i:a:o.y<a.y?o:a).y,l=(i.x>o.x?i.x>a.x?i:a:o.x>a.x?o:a).x,u=(i.y>o.y?i.y>a.y?i:a:o.y>a.y?o:a).y,x=b(v,h,t,n,r),f=b(l,u,t,n,r),s=e.prevZ,c=e.nextZ;for(;s&&s.z>=x&&c&&c.z<=f;){if(s!==e.prev&&s!==e.next&&M(i.x,i.y,o.x,o.y,a.x,a.y,s.x,s.y)&&0<=w(s.prev,s,s.next))return!1;if(s=s.prevZ,c!==e.prev&&c!==e.next&&M(i.x,i.y,o.x,o.y,a.x,a.y,c.x,c.y)&&0<=w(c.prev,c,c.next))return!1;c=c.nextZ}for(;s&&s.z>=x;){if(s!==e.prev&&s!==e.next&&M(i.x,i.y,o.x,o.y,a.x,a.y,s.x,s.y)&&0<=w(s.prev,s,s.next))return!1;s=s.prevZ}for(;c&&c.z<=f;){if(c!==e.prev&&c!==e.next&&M(i.x,i.y,o.x,o.y,a.x,a.y,c.x,c.y)&&0<=w(c.prev,c,c.next))return!1;c=c.nextZ}return!0}(e,r,i,o):function(e){var t=e.prev,n=e,r=e.next;if(0<=w(t,n,r))return!1;var i=e.next.next;for(;i!==e.prev;){if(M(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&0<=w(i.prev,i,i.next))return!1;i=i.next}return!0}(e))t.push(v.i/n),t.push(e.i/n),t.push(h.i/n),f(e),e=h.next,l=h.next;else if((e=h)===l){a?1===a?y(e=function(e,t,n){var r=e;do{var i=r.prev,o=r.next.next}while(!u(i,o)&&x(i,r,r.next,o)&&Z(i,o)&&Z(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),f(r),f(r.next),r=e=o),r=r.next,r!==e);return g(r)}(g(e),t,n),t,n,r,i,o,2):2===a&&function(e,t,n,r,i,o){var a=e;do{for(var v=a.next.next;v!==a.prev;){if(a.i!==v.i&&function(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&x(n,n.next,e,t))return!0}while(n=n.next,n!==e);return!1}(e,t)&&(Z(e,t)&&Z(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;for(;n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next,n!==e;);return r}(e,t)&&(w(e.prev,e,t.prev)||w(e,t.prev,t))||u(e,t)&&0<w(e.prev,e,e.next)&&0<w(t.prev,t,t.next))}(a,v)){var h=S(a,v);return a=g(a,a.next),h=g(h,h.next),y(a,t,n,r,i,o),y(h,t,n,r,i,o)}v=v.next}}while((a=a.next)!==e)}(e,t,n,r,i,o):y(g(e),t,n,r,i,o,1);break}}}function m(e,t){return e.x-t.x}function b(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function M(e,t,n,r,i,o,a,v){return 0<=(i-a)*(t-v)-(e-a)*(o-v)&&0<=(e-a)*(r-v)-(n-a)*(t-v)&&0<=(n-a)*(o-v)-(i-a)*(r-v)}function w(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function u(e,t){return e.x===t.x&&e.y===t.y}function x(e,t,n,r){var i=l(w(e,t,n)),o=l(w(e,t,r)),a=l(w(n,r,e)),v=l(w(n,r,t));return i!==o&&a!==v||(0===i&&h(e,n,t)||(0===o&&h(e,r,t)||(0===a&&h(n,e,r)||!(0!==v||!h(n,t,r)))))}function h(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function l(e){return 0<e?1:e<0?-1:0}function Z(e,t){return w(e.prev,e,e.next)<0?0<=w(e,t,e.next)&&0<=w(e,e.prev,t):w(e,t,e.prev)<0||w(e,e.next,t)<0}function S(e,t){var n=new a(e.i,e.x,e.y),r=new a(t.i,t.x,t.y),i=e.next,o=t.prev;return(e.next=t).prev=e,(n.next=i).prev=n,(r.next=n).prev=r,(o.next=r).prev=o,r}function v(e,t,n,r){n=new a(e,t,n);return r?(n.next=r.next,(n.prev=r).next.prev=n,r.next=n):(n.prev=n).next=n,n}function f(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function a(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function z(e,t,n,r){for(var i=0,o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}function r(e,t){var n=e.length-1,r=[e[0]];return function e(t,n,r,i,o){for(var a,v,h,l,u,x,f,s=i,c=n+1;c<r;c++){var p=(v=t[c],h=t[n],l=t[r],p=f=x=u=void 0,u=h[0],x=h[1],f=l[0]-u,p=l[1]-x,0===f&&0===p||(1<(h=((v[0]-u)*f+(v[1]-x)*p)/(f*f+p*p))?(u=l[0],x=l[1]):0<h&&(u+=f*h,x+=p*h)),(f=v[0]-u)*f+(p=v[1]-x)*p);s<p&&(a=c,s=p)}i<s&&(1<a-n&&e(t,n,a,i,o),o.push(t[a]),1<r-a&&e(t,a,r,i,o))}(e,0,n,t,r),r.push(e[n]),r}function A(e,t,n){if(e.length<=2)return e;t=void 0!==t?t*t:1;return e=r(e=n?e:function(e,t){for(var n,r,i,o,a=e[0],v=[a],h=1,l=e.length;h<l;h++)n=e[h],i=a,o=void 0,o=(r=n)[0]-i[0],i=r[1]-i[1],t<o*o+i*i&&(v.push(n),a=n);return a!==n&&v.push(n),v}(e,t),t)}function R(e,t){var n=t[0],r=t[1],t=Math.sqrt(n*n+r*r);return e[0]=n/t,e[1]=r/t,e}function s(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}function F(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}n.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,a=Math.abs(z(e,0,o,n));if(i)for(var v=0,h=t.length;v<h;v++){var l=t[v]*n,u=v<h-1?t[v+1]*n:e.length;a-=Math.abs(z(e,l,u,n))}for(var x=0,v=0;v<r.length;v+=3){var f=r[v]*n,s=r[v+1]*n,c=r[v+2]*n;x+=Math.abs((e[f]-e[c])*(e[1+s]-e[1+f])-(e[f]-e[s])*(e[1+c]-e[1+f]))}return 0===a&&0===x?0:Math.abs((x-a)/a)},n.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var a=0;a<t;a++)n.vertices.push(e[i][o][a]);0<i&&(r+=e[i-1].length,n.holes.push(r))}return n},d.default=t;var c=[];function ee(e,t,n,r){var i,o,a=(o=n,(i=t)[0]*o[0]+i[1]*o[1]+i[2]*o[2]),v=Math.acos(a)*r;return s(c,n,t,-a),r=(o=i=c)[0],n=o[1],a=o[2],o=Math.sqrt(r*r+n*n+a*a),i[0]=r/o,i[1]=n/o,i[2]=a/o,a=e,o=t,t=Math.cos(v),a[0]=o[0]*t,a[1]=o[1]*t,a[2]=o[2]*t,s(e,e,c,Math.sin(v)),e}function q(e,t,n){if(n-t<3)return 0;for(var r=0,i=2*(n-1),o=2*t;o<2*n;){var a=e[i],v=e[i+1],h=e[o],l=e[o+1],i=o;o+=2,r+=a*l-h*v}return r}var B=[],U=[],L=[];function O(e,t,n,r,i,o,a,v){var h=null!=a,l=i,u=null;h&&(u=new Uint32Array(r-n));for(var x=n;x<r;x++){var f=x===r-1?n:x+1,s=x===n?r-1:x-1,c=e[2*s],p=e[2*s+1],g=e[2*x],d=e[2*x+1],s=e[2*f],f=e[2*f+1];B[0]=g-c,B[1]=d-p,U[0]=s-g,U[1]=f-d,R(B,B),R(U,U),h&&(u[x]=l),v||x!==n?v||x!==r-1?(c=U,p=B,(s=L)[0]=c[0]+p[0],s[1]=c[1]+p[1],f=L[1],L[1]=-L[0],L[0]=f,R(L,L),s=U,p=(c=L)[0]*s[0]+c[1]*s[1],f=Math.sqrt(1-p*p),c=o*Math.min(10,1/f),h&&a<1/f&&o*p<0?(s=g+L[0]*o,p=d+L[1]*o,f=Math.acos(f)/2,f=Math.tan(f)*Math.abs(o),t[2*l]=s+L[1]*f,t[2*l+1]=p-L[0]*f,t[2*++l]=s-L[1]*f,t[2*l+1]=p+L[0]*f):(t[2*l]=g+L[0]*c,t[2*l+1]=d+L[1]*c)):(L[0]=B[1],L[1]=-B[0],R(L,L),t[2*l]=g+L[0]*o,t[2*l+1]=d+L[1]*o):(L[0]=U[1],L[1]=-U[0],R(L,L),t[2*l]=g+L[0]*o,t[2*l+1]=d+L[1]*o),l++}return u}function P(e,t,n,r,i){var o=null!=r?[]:new Float32Array(e.length);if(O(e,o,0,t&&t.length?t[0]:e.length/2,0,n,r,i),t)for(var a=0;a<t.length;a++){var v=t[a];O(e,o,v,t[a+1]||e.length/2,null!=r?o.length/2:v,n,r,i)}return o}function V(e,t,n,r){for(var i=0;i<Math.floor((r-n)/2);i++)for(var o=0;o<t;o++){var a=(i+n)*t+o,v=(r-i-1)*t+o,h=e[a];e[a]=e[v],e[v]=h}return e}function W(e){e.depth=e.depth||1,e.bevelSize=e.bevelSize||0,e.bevelSegments=null==e.bevelSegments?2:e.bevelSegments,e.smoothSide=e.smoothSide||!1,e.smoothBevel=e.smoothBevel||!1,e.simplify=e.simplify||0,"number"==typeof e.depth&&(e.bevelSize=Math.min(0<e.bevelSegments?e.bevelSize:0,e.depth/2)),0<e.bevelSize||(e.bevelSegments=0),e.bevelSegments=Math.round(e.bevelSegments);var t,n,r,i,o=e.boundingRect;e.translate=e.translate||[0,0],e.scale=e.scale||[1,1],e.fitRect&&(t=null==e.fitRect.x?o.x||0:e.fitRect.x,n=null==e.fitRect.y?o.y||0:e.fitRect.y,r=e.fitRect.width,i=e.fitRect.height,null==r?null!=i?r=i/o.height*o.width:(r=o.width,i=o.height):null==i&&(i=r/o.width*o.height),e.scale=[r/o.width,i/o.height],e.translate=[(t-o.x)*e.scale[0],(n-o.y)*e.scale[1]])}function j(e,t){function n(e,t,n,r){e[0]=t,e[1]=n,e[2]=r}for(var r,i,o,a,v,h,l,u=[],x=[],f=[],s=[],c=[],p=[],g=e.length,d=new Float32Array(t.length),y=0;y<g;){var m=3*e[y++],b=3*e[y++],M=3*e[y++];n(u,t[m],t[1+m],t[2+m]),n(x,t[b],t[1+b],t[2+b]),n(f,t[M],t[1+M],t[2+M]),F(s,u,x),F(c,x,f),r=p,o=c,l=h=v=a=void 0,a=(i=s)[0],v=i[1],h=i[2],l=o[0],i=o[1],o=o[2],r[0]=v*o-h*i,r[1]=h*l-a*o,r[2]=a*i-v*l;for(var w=0;w<3;w++)d[m+w]=d[m+w]+p[w],d[b+w]=d[b+w]+p[w],d[M+w]=d[M+w]+p[w]}for(var Z,S,z,A,R,q=0;q<d.length;)n(p,d[q],d[q+1],d[q+2]),R=A=z=void 0,z=(S=Z=p)[0],A=S[1],R=S[2],S=Math.sqrt(z*z+A*A+R*R),Z[0]=z/S,Z[1]=A/S,Z[2]=R/S,d[q++]=p[0],d[q++]=p[1],d[q++]=p[2];return d}var te=[[0,0],[1,0],[1,1],[0,0],[1,1],[0,1]];function H(e,t,n,r,i,o){var a=t.vertices,v=t.topVertices,h=t.depth,t=t.rect,l=r-n,u=o.smoothSide?1:2,x=l*u,f=o.smoothBevel?1:2,s=Math.min(h/2,o.bevelSize),c=o.bevelSegments,p=i.vertex,g=Math.max(t.width,t.height,h);if(0<s)for(var d=[0,0,1],y=[],m=[0,0,-1],b=[],M=0,w=new Float32Array(l),Z=0;Z<2;Z++)for(var S=0===Z?h-s:s,z=0;z<=c*f;z++){for(var A=0,R=void 0,q=void 0,F=0;F<l;F++){for(var B=0;B<u;B++){var U=2*((F+B)%l+n);y[0]=a[U]-v[U],y[1]=a[1+U]-v[1+U],y[2]=0;var L=Math.sqrt(y[0]*y[0]+y[1]*y[1]);y[0]/=L,y[1]/=L;var O=(Math.floor(z/f)+z%f)/c;0===Z?ee(b,d,y,O):ee(b,y,m,O);var P=0===Z?O:1-O,V=s*Math.sin(P*Math.PI/2),W=L*Math.cos(P*Math.PI/2),O=s*L/Math.sqrt(V*V+W*W),P=b[0]*O+v[U],L=b[1]*O+v[1+U],V=b[2]*O+S;e.position[3*i.vertex]=P,e.position[3*i.vertex+1]=L,e.position[3*i.vertex+2]=V,(0<F||0<B)&&(A+=Math.sqrt((R-P)*(R-P)+(q-L)*(q-L))),(0<z||0<Z)&&(W=3*(i.vertex-x),U=e.position[W],O=e.position[1+W],W=e.position[2+W],w[F]+=Math.sqrt((U-P)*(U-P)+(O-L)*(O-L)+(W-V)*(W-V))),e.uv[2*i.vertex]=A/g,e.uv[2*i.vertex+1]=w[F]/g,R=P,q=L,i.vertex++}if(1<f&&z%f||1==f&&1<=z)for(var j=0;j<6;j++){var H=(te[j][0]+F*u)%x,k=te[j][1]+M;e.indices[i.index++]=(k-1)*x+H+p}}M++}else for(var I=0;I<2;I++)for(var _=0===I?h-s:s,D=0,E=void 0,C=void 0,G=0;G<l;G++)for(var J=0;J<u;J++){var K=2*((G+J)%l+n),N=a[K],K=a[1+K];e.position[3*i.vertex]=N,e.position[3*i.vertex+1]=K,e.position[3*i.vertex+2]=_,(0<G||0<J)&&(D+=Math.sqrt((E-N)*(E-N)+(C-K)*(C-K))),e.uv[2*i.vertex]=D/g,e.uv[2*i.vertex+1]=_/g,E=N,C=K,i.vertex++}for(var Q=0<s?c*f+1:1,T=0;T<l;T++)for(var X=0;X<6;X++){var Y=(te[X][0]+T*u)%x,$=te[X][1]+Q;e.indices[i.index++]=($-1)*x+Y+p}}function k(e,t){for(var n=0,r=0,i=0;i<e.length;i++){var o=e[i],a=o.indices,v=o.vertices,h=o.holes,o=o.depth,l=v.length/2,u=0<Math.min(o/2,t.bevelSize)?t.bevelSegments:0;n+=a.length*(t.excludeBottom?1:2),r+=l*(t.excludeBottom?1:2);for(var x=2+2*u,f=0,s=0,c=0;c<(h?h.length:0)+1;c++){n+=6*((s=0===c?h&&h.length?h[0]:l:(f=h[c-1],h[c]||l))-f)*(x-1);var p=(s-f)*(t.smoothSide?1:2);r+=p*x+(t.smoothBevel?0:u*p*2)}}for(var g={position:new Float32Array(3*r),indices:new(65535<r?Uint32Array:Uint16Array)(n),uv:new Float32Array(2*r)},d={vertex:0,index:0},y=0;y<e.length;y++)!function(e,t,n,r){var i=e.indices,o=e.vertices,a=e.topVertices,v=e.rect,h=e.depth;if(!(o.length<=4)){for(var l=n.vertex,u=i.length,x=0;x<u;x++)t.indices[n.index++]=l+i[x];for(var f=Math.max(v.width,v.height),s=0;s<(r.excludeBottom?1:2);s++)for(var c=0;c<a.length;c+=2){var p=a[c],g=a[c+1];t.position[3*n.vertex]=p,t.position[3*n.vertex+1]=g,t.position[3*n.vertex+2]=(1-s)*h,t.uv[2*n.vertex]=(p-v.x)/f,t.uv[2*n.vertex+1]=(g-v.y)/f,n.vertex++}if(!r.excludeBottom)for(var d=o.length/2,y=0;y<u;y+=3)for(var m=0;m<3;m++)t.indices[n.index++]=l+d+i[y+2-m]}}(e[y],g,d,t);for(var m=0;m<e.length;m++){var b,M=e[m],w=M.holes,Z=M.vertices.length/2,S=w&&w.length?w[0]:Z;if(H(g,e[m],0,S,d,t),w)for(var z=0;z<w.length;z++)b=w[z],S=w[z+1]||Z,H(g,e[m],b,S,d,t)}for(var A=0;A<g.uv.length;A++){var R=g.uv[A];0<R&&Math.round(R)===R?g.uv[A]=1:g.uv[A]=R%1}return g.normal=j(g.indices,g.position),g.boundingRect=e[0]&&e[0].rect,g}function I(e,t){t=Object.assign({},t);for(var n=[1/0,1/0],r=[-1/0,-1/0],i=0;i<e.length;i++)D(e[i][0],n,r);t.boundingRect=t.boundingRect||{x:n[0],y:n[1],width:r[0]-n[0],height:r[1]-n[1]},W(t);for(var o=[],a=t.translate||[0,0],v=t.scale||[1,1],h=t.boundingRect,l={x:h.x*v[0]+a[0],y:h.y*v[1]+a[1],width:h.width*v[0],height:h.height*v[1]},u=Math.min(h.width,h.height)/1e5,x=0;x<e.length;x++){var f=function(e,t){for(var n=[],r=0;r<e.length;r++){for(var i=e[r],o=[],a=i.length,v=i[a-1][0],h=i[a-1][1],l=0,u=0;u<a;u++){var x=i[u][0],f=i[u][1],s=x-v,c=f-h;t<(l+=Math.sqrt(s*s+c*c))&&(o.push(i[u]),l=0),v=x,h=f}3<=o.length&&n.push(o)}return 0<n.length?n:null}(e[x],u);if(f){var s=t.simplify/Math.max(v[0],v[1]);if(f=0<s?function(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];3<=(i=A(i,t,!0)).length&&n.push(i)}return 0<n.length?n:null}(f,s):f){for(var c=d.flatten(f),p=c.vertices,s=c.holes,f=c.dimensions,g=0;g<p.length;)p[g]=p[g++]*v[0]+a[0],p[g]=p[g++]*v[1]+a[1];if(!function(e,t){var n=e.length/2,r=0,i=t&&t.length?t[0]:n;0<q(e,r,i)&&V(e,2,r,i);for(var o=1;o<(t?t.length:0)+1;o++)q(e,r=t[o-1],i=t[o]||n)<0&&V(e,2,r,i)}(p,s),2!==f)throw new Error("Only 2D polygon points are supported");c=0<t.bevelSize?P(p,s,t.bevelSize,null,!0):p,f=d(c,s,f=void 0===(f=f)?2:f);o.push({indices:f,vertices:p,topVertices:c,holes:s,rect:l,depth:"function"==typeof t.depth?t.depth(x):t.depth})}}}return k(o,t)}function _(e,t){t=Object.assign({},t);for(var n=[1/0,1/0],r=[-1/0,-1/0],i=0;i<e.length;i++)D(e[i],n,r);t.boundingRect=t.boundingRect||{x:n[0],y:n[1],width:r[0]-n[0],height:r[1]-n[1]},W(t);var o=t.scale||[1,1];null==t.lineWidth&&(t.lineWidth=1),null==t.miterLimit&&(t.miterLimit=2);for(var a=[],v=0;v<e.length;v++){var h=e[v],l=t.simplify/Math.max(o[0],o[1]);0<l&&(h=A(h,l,!0)),a.push(function(e,t,n){for(var r=n.lineWidth,i=e.length,o=new Float32Array(2*i),a=n.translate||[0,0],v=n.scale||[1,1],h=0,l=0;h<i;h++)o[l++]=e[h][0]*v[0]+a[0],o[l++]=e[h][1]*v[1]+a[1];q(o,0,i)<0&&V(o,2,0,i);var u=[],x=[],f=n.miterLimit,s=O(o,x,0,i,0,-r/2,f,!1);V(o,2,0,i);for(var c=O(o,u,0,i,0,-r/2,f,!1),r=(u.length+x.length)/2,p=new Float32Array(2*r),g=0,d=x.length/2,y=0;y<x.length;y++)p[g++]=x[y];for(var m=0;m<u.length;m++)p[g++]=u[m];for(var b=new(65535<r?Uint32Array:Uint16Array)(3*(2*(i-1)+(r-2*i))),M=0,w=0;w<i-1;w++){var Z=w+1;b[M++]=d-1-s[w],b[M++]=d-1-s[w]-1,b[M++]=c[w]+1+d,b[M++]=d-1-s[w],b[M++]=c[w]+1+d,b[M++]=c[w]+d,c[Z]-c[w]==2?(b[M++]=c[w]+2+d,b[M++]=c[w]+1+d,b[M++]=d-s[Z]-1):s[Z]-s[w]==2&&(b[M++]=c[Z]+d,b[M++]=d-1-(s[w]+1),b[M++]=d-1-(s[w]+2))}return f=0<n.bevelSize?P(p,[],n.bevelSize,null,!0):p,r=n.boundingRect,{vertices:p,indices:b,topVertices:f,rect:{x:r.x*v[0]+a[0],y:r.y*v[1]+a[1],width:r.width*v[0],height:r.height*v[1]},depth:"function"==typeof n.depth?n.depth(t):n.depth,holes:[]}}(h,v,t))}return k(a,t)}function D(e,t,n){for(var r=0;r<e.length;r++)t[0]=Math.min(e[r][0],t[0]),t[1]=Math.min(e[r][1],t[1]),n[0]=Math.max(e[r][0],n[0]),n[1]=Math.max(e[r][1],n[1])}function E(e){for(var t=new Float32Array(e),n=[],r=0,i=t.length;r<i;r+=2){var o=t[r],a=t[r+1];n.push([o,a])}return n}function C(e,t){void 0===t&&(t=!1);for(var n,r,i,o,a=e.length,v=[],h=[],l=[],u=0,x=0,f=0,s=0,c=0;c<a;c++){var p=t?(p=e[c],r=i=n=o=i=r=n=void 0,n=p.data,r=p.height,i=p.width,o=p.bottomHeight,p=_(n,{lineWidth:i,depth:r}),n=p.position,i=p.normal,r=p.uv,p=p.indices,G(n,o),{position:n,normal:i,uv:r,indices:p}):(d=e[c],b=m=y=b=g=m=y=void 0,y=d.data,m=d.height,g=d.bottomHeight,b=I(y,{depth:m}),d=b.position,y=b.normal,m=b.uv,b=b.indices,G(d,g),{position:d,normal:y,uv:m,indices:b}),g=e[c].bottomHeight||0,d=p.position,y=p.normal,m=p.uv,b=p.indices;h.push(p);b=b.length/3;l[c]=[u+1,u+b],u+=b;d=d.length/3,y=y.length/3,m=m.length/2;v[c]={position:{middleZ:g+(e[c].height||0)/2,count:d,start:x,end:x+3*d},normal:{count:y,start:f,end:f+3*y},uv:{count:m,start:s,end:s+2*m},hide:!1},x+=3*d,f+=3*y,s+=2*m}var M=function(e){for(var t={},n={},r=0;r<e.length;++r){var i,o=e[r];for(i in o)void 0===t[i]&&(t[i]=[],n[i]=0),t[i].push(o[i]),n[i]+=o[i].length}var a,v={},h=0,l=[];for(a in t)if("indices"===a)for(var u=t[a],x=0,f=u.length;x<f;x++){for(var s=u[x],c=0,p=s.length;c<p;c++)l.push(s[c]+h);h+=t.position[x].length/3}else{var g=function(e,t){for(var n=new Float32Array(t),r=0,i=0;i<e.length;++i)n.set(e[i],r),r+=e[i].length;return n}(t[a],n[a]);if(!g)return null;v[a]=g}return v.indices=new Uint32Array(l),v}(h),w=M.position,Z=M.normal,S=M.uv,M=M.indices;return{position:w.buffer,normal:Z.buffer,uv:S.buffer,indices:M.buffer,faceMap:l,geometriesAttributes:v}}function G(e,t){if(void 0!==t&&"number"==typeof t&&0!==t)for(var n=0,r=e.length;n<r;n+=3)e[n+2]+=t}e.initialize=function(){},e.onmessage=function(e,t){var n=e.data,e=n.type,r=n.datas;if("Polygon"===e){!function(e){for(var t=e.length,n=0;n<t;n++)for(var r=e[n].data,i=0,o=r.length;i<o;i++)for(var a=r[i],v=0,h=a.length;v<h;v++)e[n].data[i][v]=E(a[v])}(r);n=C(r);t(null,n,[n.position,n.normal,n.uv,n.indices])}else if("LineString"===e){for(var i=0,o=r.length;i<o;i++)for(var a=0,v=r[i].data.length;a<v;a++)r[i].data[a]=E(r[i].data[a]);e=C(r,!0);t(null,e,[e.position,e.normal,e.uv,e.indices])}},Object.defineProperty(e,"__esModule",{value:!0})}');var Oy={altitude:0},ky=new or,Iy={positionsConvert:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=[],i=0,o=t.length;i<o;i+=3){var a=t[i],s=t[i+1],c=t[i+2];e>0&&(c+=n.distanceToVector3(e,e).x),r.push(new or(a,s,c))}return r},vectors2Pixel:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4?arguments[4]:void 0;t[0]instanceof or||(t=Iy.positionsConvert(t,r,i));var o=t.map((function(t){return Iy.vector2Pixel(t,e,n)}));return o},vector2Pixel:function(t,e,n){var r=t.project(n),i=e.width/2,o=e.height/2;return{x:Math.round(r.x*i+i),y:Math.round(-r.y*o+o)}}};function Dy(t,e,n){return t[e]||(t[e]=n.distanceToVector3(e,e).x),t[e]}var jy=function(t){Jp(n,t);var e=Kp(n);function n(t,r,o,a,s,c){var u;i(this,n),Array.isArray(t)||(t=[t]),r=Pp.Util.extend({},Oy,r,{layer:c,points:t});for(var l=1/0,h=1/0,f=-1/0,d=-1/0,p=0,m=t.length;p<m;p++){var g=t[p].coordinate,v=void 0,y=void 0;Array.isArray(g)?(v=g[0],y=g[1]):g instanceof Pp.Coordinate&&(v=g.x,y=g.y),l=Math.min(l,v),h=Math.min(h,y),f=Math.max(f,v),d=Math.max(d,y)}for(var _=c.coordinateToVector3([(l+f)/2,(h+d)/2]),x=lm.initGrids(l,h,f,d),b=x.length,w=[],M=[],S=[],T=[],E=[],C=[],A=[],P=[],L=[],R=[],O=[],k={},I={},D={},j=0,z=t.length;j<z;j++){var N=t[j],F=N.coordinate,B=N.height,H=N.color,G=N.rotation,U=N.fcolor,V=N.imgflag,W=N.visibility,Z=N.opavalue,q=N.colorflag;if(H){var Y=H instanceof Ri?H:new Ri(H);S.push(Y.r,Y.g,Y.b)}G&&C.push(G),U&&A.push(U),V&&P.push(V),W&&L.push(W),Z&&R.push(Z),q&&O.push(q);var J=Dy(k,B,c),X=c.coordinateToVector3(F,J),$=X.clone().sub(_);w.push($.x,$.y,$.z),M.push(X),E[j]={position:{count:1,start:3*j,end:3*j+3},hide:!1};for(var Q=0;Q<b;Q++)if(x[Q].containsCoordinate(F)){x[Q].positions.push(X),x[Q].indexs.push(j);break}I[F]=j,D[j]=!(W<.5)}var K=new no;K.setAttribute("position",new Vi(w,3,!0)),S.length&&K.setAttribute("color",new Vi(S,3,!0)),C.length&&K.setAttribute("rotation",new Vi(C,1,!0)),A.length&&K.setAttribute("fcolor",new Vi(A,1,!0)),P.length&&K.setAttribute("imgflag",new Vi(P,1,!0)),L.length&&K.setAttribute("visibility",new Vi(L,1,!0)),R.length&&K.setAttribute("opavalue",new Vi(R,1,!0)),O.length&&K.setAttribute("colorflag",new Vi(O,1,!0)),r.positions=M,(u=e.call(this))._initOptions(r),u._createPoints(K,o);var tt=r.altitude,et=c.distanceToVector3(tt,tt).x,nt=_.clone();return nt.z=et,u.getObject3d().position.copy(nt),u._baseObjects=T,u._datas=t,u.faceIndex=null,u._geometriesAttributes=E,u.isHide=!1,u._initBaseObjectsEvent(T),u._grids=x,u._coord_indexs=I,u._indexs_hide=D,u._bindMapEvents(),u._marksize=a,u._markType=s,u.parent=null,u.type="Points",u}return a(n,[{key:"_bindMapEvents",value:function(){var t=this,e=this.getMap(),n="zoomstart zooming zoomend movestart moving moveend pitch rotate";this.on("add",(function(){t._updateGrids(),e.on(n,t._updateGrids,t)})),this.on("remove",(function(){e.off(n,t._updateGrids,t)}))}},{key:"updatepoints",value:function(t){Array.isArray(t)||(t=[t]);for(var e=1/0,n=1/0,r=-1/0,i=-1/0,o=0,a=t.length;o<a;o++){var s=t[o].coordinate,c=void 0,u=void 0;Array.isArray(s)?(c=s[0],u=s[1]):s instanceof Pp.Coordinate&&(c=s.x,u=s.y),e=Math.min(e,c),n=Math.min(n,u),r=Math.max(r,c),i=Math.max(i,u)}for(var l=this.getLayer().coordinateToVector3([(e+r)/2,(n+i)/2]),h=lm.initGrids(e,n,r,i),f=h.length,d={},p=[],m=0,g=t.length;m<g;m++){var v=t[m],y=v.coordinate,_=Dy(d,v.height,this.getLayer()),x=this.getLayer().coordinateToVector3(y,_),b=x.clone().sub(l);p.push(b.x,b.y,b.z);for(var w=0;w<f;w++)if(h[w].containsCoordinate(y)){h[w].positions.push(x),h[w].indexs.push(m);break}}for(var M=this.getObject3d().geometry.attributes.position.array,S=0;S<p.length;S++)M[3*S+0]=p[3*S+0],M[3*S+1]=p[3*S+1],M[3*S+2]=p[3*S+2];this.getObject3d().geometry.attributes.position.needsUpdate=!0;var T=l.clone();T.z=0,this.getObject3d().position.copy(T),this._grids=h,this._updateGrids()}},{key:"_updateGrids",value:function(){var t=this.getMap();this._grids.forEach((function(e){e.indexs.length&&e.updateBBoxPixel(t)}))}},{key:"getSelectMesh",value:function(){var t=this.faceIndex;if(null!=t){if(!this._baseObjects[t]){var e=this._datas[t],n=e.coordinate,r=e.height,i=e.color;this._baseObjects[t]=this.getLayer().toPoint(n,{height:r,index:t,color:i},this.getObject3d().material),this._proxyEvent(this._baseObjects[t])}return{data:this._datas[t],baseObject:this._baseObjects[t]}}}},{key:"identify",value:function(t){var e=this.getLayer(),n=this.getMap().getSize(),r=this.getLayer().getCamera(),i=this.getOptions().altitude,o=this.getMap(),a=e.distanceToVector3(i,i).x,s=this.getObject3d().material.size;if(0==this._markType){var c=this.getMap().getZoom()-3,u=.1*(c=c>9?9:c)+.1;s=this._marksize*u}else if(1==this._markType){var l=this.getMap().getZoom()-8,h=.2*(l=l>4?4:l)+.2;s=this._marksize*h}else s=this._marksize;var f=o.coordToContainerPoint(t),d=[];if(this._grids&&this._grids.forEach((function(t){t.indexs.length&&t.isRecCross(f,s)&&d.push(t)})),d.length<1)return!1;for(var p=0,m=d.length;p<m;p++)for(var g=0,v=d[p].positions.length;g<v;g++){var y=d[p].positions[g];ky.x=y.x,ky.y=y.y,ky.z=y.z+a;var _=Iy.vector2Pixel(ky,n,r);if(Math.sqrt(Math.pow(f.x-_.x,2)+Math.pow(f.y-_.y,2))<=s/2){if(this.faceIndex=d[p].indexs[g],!this._indexs_hide[this.faceIndex])continue;return!0}}return!1}}]),n}(uv(Sm)),zy=(n("b7dd"),n("8f74"),n("d3f4")),Ny=n.n(zy),Fy=function(){function t(e,n,r){var o=this;i(this,t);var a=n.altitude,s=n.isLabel,c=n.labelMinZoom,u=n.labelMaxZoom,l=n.labelLayerName,h=n.labelVisible,f=n.canvasSize,d=n.markSize,p=n.pointMinZoom,m=n.pointOrder,g=n.setInfoContent,v=n.isToolTip,y=n.isPointNum,_=n.sizeType,x=n.iconFile;if(0!=e.length){var b=new Xc({sizeAttenuation:!1,transparent:!0,depthTest:!1});s&&l&&(this.layerLabel=new Pp.VectorLayer(l,{minZoom:c||15,geometryEvents:!1,hitDetect:!1,visible:h||!1}).addTo(r.map),this.all_labels=[]);var w=[];if(this.typeValues={},this.initTypeValue=-.9,this._initChildVar(n,r),console.log("绘制点位,点位数量:".concat(e.length,", 第一条数据的类型为:").concat(e[0].businessType)),e.slice(0,1/0).map((function(t){if(1*t.longitude>70&&1*t.longitude<138&&1*t.latitude>0&&1*t.latitude<56){var e=o._getImgType(t.businessType,t.imgSrc);o._bindDataItem(w,t,e),o.layerLabel&&new Pp.Marker([parseFloat(t.longitude),parseFloat(t.latitude)],{properties:{name:t.name,type:t.businessType,code:t.code,status:1},symbol:{textFaceName:"sans-serif",textName:"{name}",textSize:12,textFill:"#FFFFFF",textDx:0,textDy:30}}).addTo(o.layerLabel)}})),this.layerLabel)for(var M=this.layerLabel.getGeometries(),S=0;S<M.length;S++)this.all_labels.push(M[S]);this.textures=null,this.threeLayer=r,this.map=r.map,this.canvasSize=f||48,this.markSize=d||40,this.m=b,this.dataItems=w,this.point=null,this.shader=null,this.minZoom=p||8,this.markType=0===_?0:1,this.order=m||1,this.isToolTip=v||!1,this.setInfoContent=g||null,this.iconFile=x||null,console.log(this.iconFile),this.isPointNum=y||!1,this.setInfoContent&&(this.Infolayer=this.map.getLayer("infoLayer"),this.Infolayer||(this.Infolayer=new Pp.VectorLayer("infoLayer",{geometryEvents:!1,hitDetect:!1}).addTo(r.map)),this.infoWindow=new Pp.ui.InfoWindow({custom:!0,dy:-48,content:"",autoOpenOn:null}).addTo(this.map)),this.layerPointNumLabel=new Pp.VectorLayer(Pp.Util.GUID(),{hitDetect:!1,zIndex:1001}).addTo(r.map),this.selectItems=[],this.funcsNew={},this.fitZoom=null,this.isCtrol=!0,this.rbush=new Ny.a,this.GLOBALSCALE=32768,this.XMAX=178,this.YMAX=85,this.MAXZOOM=31,this.SCALES=[];for(var T=0;T<this.MAXZOOM;T++)this.SCALES.push(129202.08021/Math.pow(2,T));this.clusterItemsCache={},this.clusterMinZoom=9,this.clusterMaxZoom=18,this.altitude=a,this.labelMaxZoom=u}else console.error("需要绘制的点位数量为0")}return a(t,[{key:"_initChildVar",value:function(t,e){throw new Error(e,"需要在派生类中实现")}},{key:"_bindMapEvents",value:function(){this.map.on("zooming zoomend",this._setSizeOn,this),this.point&&this.point.on("click empty mousemove",this._setPointEvent,this)}},{key:"_setSizeOn",value:function(){var t=this._getRate();for(var e in this.shader&&(this.shader.uniforms.size1.value=this.markSize*t),this.funcsNew)this.funcsNew[e]()}},{key:"addContent",value:function(){var t=c(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setInfoContent(this.infoWindow,e);case 2:this.iconFile&&(this.Infolayer.clear(),new Pp.Marker([e.coordinate[0],e.coordinate[1]],{symbol:{markerFile:this.iconFile,markerWidth:48,markerHeight:48,markerDx:0,markerDy:0,markerOpacity:1}}).addTo(this.Infolayer)),this.infoWindow.show({x:e.coordinate[0],y:e.coordinate[1]});case 4:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"_setPointEvent",value:function(t){var e,n=t.selectMesh;if(n&&(e=n.data),"mousemove"===t.type&&e){var r=e.value;this.isToolTip&&(this.point.getToolTip()._content="".concat(r))}"click"===t.type&&e&&this.setInfoContent&&this.addContent(e)}},{key:"_bindDataItem",value:function(t,e,n){throw new Error(t,e,n,"需要在派生类中实现")}},{key:"_getImgType",value:function(t,e){throw new Error(t,e,"需要在派生类中实现")}},{key:"_deleteFunsKey",value:function(t){if(t){for(var e in this.funcsNew)if(t&&t===e){delete this.funcsNew[e];break}}else for(var n in this.funcsNew)delete this.funcsNew[n]}},{key:"dispose",value:function(){for(var t in this.isToolTip&&this.point&&this.point.removeToolTip(),this.clearIcon(),this.Infolayer&&this.map.removeLayer(this.Infolayer),this.rbush&&(this.rbush.clear(),delete this.rbush),this.layerLabel&&this.map.removeLayer(this.layerLabel),this.layerPointNumLabel&&this.map&&this.map.removeLayer(this.layerPointNumLabel),this._closeEvent(),this._deleteFunsKey(),this.typeValues)delete this.typeValues[t];if(this.typeValues={},this.point){if(this.threeLayer.removeMesh(this.point),this.point.object3d.geometry&&this.point.object3d.geometry.dispose(),this.point.object3d.material&&this.point.object3d.material.dispose(),this.point._coord_indexs){for(var e in this.point._coord_indexs)delete this.point._coord_indexs[e];delete this.point._coord_indexs}this.point._datas=[],this.point._geometriesAttributes=[],this.point._grids=[],this.point._indexs_hide=[],delete this.point.object3d,this.point.toolTip&&delete this.point.toolTip,this.point.options.points=[],this.point.options.positions=[],delete this.point}this.layerLabel&&(delete this.layerLabel,this.all_labels=[]),this.infoWindow&&(this.infoWindow.remove(),delete this.infoWindow,delete this.setInfoContent),this.textures&&this.textures.length>0&&(this.textures.forEach((function(t){t.dispose()})),delete this.textures),this.dataItems=[],this.threeLayer=null,this.map=null,delete this.shader,this.m&&(this.m.dispose(),delete this.m),this.selectItems=[]}},{key:"findItemByCode",value:function(t){for(var e=0;e<this.dataItems.length;e++)if(this.dataItems[e].code===t)return e}},{key:"changePointMinZoom",value:function(t){this.point&&(this.point.options.minZoom=t)}},{key:"_closeEvent",value:function(){this.point&&this.map.off("zooming zoomend",this._setSizeOn,this),this.point&&this.point.off("click empty mousemove",this._setPointEvent,this)}},{key:"clearIcon",value:function(){this.Infolayer&&this.Infolayer.clear()}},{key:"_loadTexture",value:function(){var t=c(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("需要在派生类中实现");case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{key:"pointShowHide",value:function(t,e,n,r,i){this.layerPointNumLabel&&this.layerPointNumLabel.clear(),this._deleteFunsKey(),this.selectItems=[],console.log(this.point),this.point.show(),this._pointShowHide(t,e,n,r,i)}},{key:"_pointShowHide",value:function(t,e,n,r,i){throw new Error(t,e,n,r,i,"需要在派生类中实现")}},{key:"_changePtVisible",value:function(t){var e=this;this.layerLabel&&this.layerLabel.clear();var n=this.point.object3d.geometry.attributes.visibility.array;if(0===t.length)for(var r=0;r<this.dataItems.length;r++)1===this.dataItems[r].visibility?(n[r]=1,this.point._indexs_hide[r]=!0,this.layerLabel.addGeometry(this.all_labels[r])):(n[r]=.1,this.point._indexs_hide[r]=!1);else{this.dataItems.forEach((function(t){t.visibility=.1})),t.forEach((function(t){e.dataItems[t].visibility=1}));for(var i=0;i<this.dataItems.length;i++)1===this.dataItems[i].visibility?(n[i]=1,this.point._indexs_hide[i]=!0,this.layerLabel&&this.layerLabel.addGeometry(this.all_labels[i])):(n[i]=.1,this.point._indexs_hide[i]=!1)}this.point.object3d.geometry.attributes.visibility.needsUpdate=!0}},{key:"pointShowHideByCode",value:function(t,e){this.layerPointNumLabel&&this.layerPointNumLabel.clear(),this._deleteFunsKey(),this.selectItems=[],this.point.show();for(var n=1/0,r=1/0,i=-1/0,o=-1/0,a=0;a<this.dataItems.length;a++){var s=this.dataItems[a];t.includes(s.code)?(n=Math.min(n,this.dataItems[a].coordinate[0]),r=Math.min(r,this.dataItems[a].coordinate[1]),i=Math.max(i,this.dataItems[a].coordinate[0]),o=Math.max(o,this.dataItems[a].coordinate[1]),s.visibility=1):s.visibility=.1}this._changePtVisible([]),e&&this.map.fitExtent(new Pp.Extent(n,r,i,o),0)}},{key:"_itemHide",value:function(t,e,n,r,i,o){var a=n||!0,s=r||!0;if(this.point){var c;this.layerLabel&&this.layerLabel.clear(),this.bzlayerNum&&this.bzlayerNum.clear(),e&&"MultiPolygon"===e.getType()&&(c=e.toGeoJSON());var u=this.point.object3d.geometry.attributes.visibility.array;if(t.length>0){for(var l=0;l<this.dataItems.length;l++){var h=this.dataItems[l],f=!0;if(1===h.status?f=!0===a:0===h.status&&(f=!0===s),e&&(f&=!!("MultiPolygon"===e.getType()?am.containsCoordinate2(this.dataItems[l].coordinate,c):am.containsCoordinate1(this.dataItems[l].coordinate,e))),i&&i.rangeArr.length>0){var d=1*dataItems[l].pvalue;f&=!!am.isInLevels(i,d)}h.imgflag==o&&(f?(u[l]=1,this.point._indexs_hide[l]=!0,this.selectItems.push(l),this.layerLabel&&this.layerLabel.addGeometry(this.all_labels[l]),this.bzlayerNum&&this.bzlayerNum.addGeometry(this.bz_all_nums[l])):(u[l]=.1,this.point._indexs_hide[l]=!1))}this.point.object3d.geometry.attributes.visibility.needsUpdate=!0}else{for(var p=0;p<this.dataItems.length;p++)this.dataItems[p].imgflag==o&&(u[p]=.1,this.point._indexs_hide[p]=!1);this.point.object3d.geometry.attributes.visibility.needsUpdate=!0}}}},{key:"_getRate",value:function(){var t=this.map.getZoom()-8;return.2*(t=t>4?4:t)+.2}},{key:"addPoint",value:function(){var t=c(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("需要在派生类中实现");case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{key:"pointShowHideShowNumSingle",value:function(t,e,n){var r=this,i=n||12;this.layerPointNumLabel.clear(),this.layerPointNumLabel.show(),this._deleteFunsKey(),this.selectItems=[],this._pointShowHide(t,e);var o=1/0,a=1/0,s=-1/0,c=-1/0;this.selectItems.forEach((function(t){o=Math.min(o,r.dataItems[t].coordinate[0]),a=Math.min(a,r.dataItems[t].coordinate[1]),s=Math.max(s,r.dataItems[t].coordinate[0]),c=Math.max(c,r.dataItems[t].coordinate[1])}));var u=[(o+s)/2,(a+c)/2];this._addClusterLabel(u,this.selectItems.length,{}).on("click",(function(){r.layerPointNumLabel.hide(),r.map.fitExtent(new Pp.Extent(o,a,s,c),0),setTimeout((function(){r.point.show()}),500)})),this.point.hide(),this.funcsNew.a=function(){r.map.getZoom()<i?(r.point.hide(),r.layerPointNumLabel.show()):(r.point.show(),r.layerPointNumLabel.hide())}}},{key:"_clearClusterCache",value:function(){for(var t in this.clusterItemsCache)delete this.clusterItemsCache[t];this.clusterItemsCache={}}},{key:"pointShowHideShowNumbyCodeMultiple",value:function(t,e){var n=this;this.layerPointNumLabel.clear(),this.layerPointNumLabel.show(),this._deleteFunsKey();for(var r=[],i=[],o=0;o<e.length;o++)r.push({code:o,geo:e[o],geojson:e[o].toGeoJSON(),ptnum:0,val:t,ptids:[]});this.dataItems.forEach((function(t){t.visibility=.1})),r.forEach((function(e){for(var r=0;r<n.dataItems.length;r++){var o=n.dataItems[r];t.includes(o.code)&&am.containsCoordinate2(n.dataItems[r].coordinate,e.geojson)&&(e.ptnum+=1,e.ptids.push(r),i.push(r),o.visibility=1)}})),r.forEach((function(t){n._addClusterLabel(t.geo.getCenter(),t.ptnum,t).on("click",(function(t){n.selectItems=[];var e=t.target.properties.item;e.ptnum>0&&(setTimeout((function(){n.point.show()}),500),n._changePtVisible(e.ptids),n._zoomSelect1(e.ptids,e.geo,i))}))})),this._changePtVisible(i),this.map.getZoom()<9.4?this.point.hide():(this.point.show(),this.layerPointNumLabel.hide()),this.funcsNew.b=function(){n.isCtrol&&(n.map.getZoom()<9.4?(n.point.hide(),n.layerPointNumLabel.show()):(n.point.show(),n.layerPointNumLabel.hide()))}}},{key:"pointShowHideShowNumMultiple",value:function(t,e){var n=this;this.layerPointNumLabel.clear(),this.layerPointNumLabel.show(),this._deleteFunsKey();for(var r=[],i=[],o=0;o<e.length;o++)r.push({code:o,geo:e[o],geojson:e[o].toGeoJSON(),ptnum:0,val:t,ptids:[]});this.dataItems.forEach((function(t){t.visibility=.1})),r.forEach((function(e){for(var r=function(r){var o=n.dataItems[r];t.filter((function(t){return t===o.type})).length>0&&am.containsCoordinate2(n.dataItems[r].coordinate,e.geojson)&&(e.ptnum+=1,e.ptids.push(r),i.push(r),o.visibility=1)},o=0;o<n.dataItems.length;o++)r(o)})),r.forEach((function(t){n._addClusterLabel(t.geo.getCenter(),t.ptnum,t).on("click",(function(t){n.selectItems=[];var e=t.target.properties.item;e.ptnum>0&&(setTimeout((function(){n.point.show()}),500),n._changePtVisible(e.ptids),n._zoomSelect1(e.ptids,e.geo,i))}))})),this._changePtVisible(i),this.map.getZoom()<9.4?this.point.hide():(this.point.show(),this.layerPointNumLabel.hide()),this.funcsNew.b=function(){n.isCtrol&&(n.map.getZoom()<9.4?(n.point.hide(),n.layerPointNumLabel.show()):(n.point.show(),n.layerPointNumLabel.hide()))}}},{key:"_zoomSelect1",value:function(t,e,n){var r=this,i=1/0,o=1/0,a=-1/0,s=-1/0;t.forEach((function(t){i=Math.min(i,r.dataItems[t].coordinate[0]),o=Math.min(o,r.dataItems[t].coordinate[1]),a=Math.max(a,r.dataItems[t].coordinate[0]),s=Math.max(s,r.dataItems[t].coordinate[1])})),this.layerPointNumLabel.hide(),this.map.fitExtent(new Pp.Extent(i,o,a,s),0),this.isCtrol=!1,setTimeout((function(){r.funcsNew.a=function(){r.fitZoom||(r.fitZoom=r.map.getZoom()),r.map.getZoom()<r.fitZoom-.5&&(r.point.hide(),r.layerPointNumLabel.show(),r._deleteFunsKey("a"),r.fitZoom=null,r.isCtrol=!0,r._changePtVisible(n))}}),500)}},{key:"_addClusterLabelSmall",value:function(t,e,n,r,i){var o=r||"#50fcfc",a=i||"#000",s=new Pp.Marker(t,{properties:{item:n},symbol:[{type:"1",markerType:"ellipse",markerFill:o,markerFillOpacity:1,markerLineWidth:0,markerLineOpacity:1,markerWidth:{stops:[[9,32],[12,52]]},markerHeight:{stops:[[9,32],[12,52]]}}]});return this.layerPointNumLabel.addGeometry(s),new Pp.Marker(t,{properties:{name:e},symbol:{textFaceName:"sans-serif",textName:"{name}",textSize:{stops:[[9,12],[12,18],[15,24]]},textFill:a}}).addTo(this.layerPointNumLabel),s}},{key:"_addClusterLabel",value:function(t,e,n,r,i){var o=r||"#50fcfc",a=i||"#000",s=new Pp.Marker(t,{properties:{item:n},symbol:[{type:"1",markerType:"ellipse",markerFill:o,markerFillOpacity:1,markerLineWidth:0,markerLineOpacity:1,markerWidth:{stops:[[9,32],[12,52],[15,82]]},markerHeight:{stops:[[9,32],[12,52],[15,82]]}},{type:"2",markerType:"ellipse",markerFill:o,markerFillOpacity:"0.4",markerLineWidth:0,markerLineOpacity:1,markerWidth:{stops:[[9,54],[12,74],[15,104]]},markerHeight:{stops:[[9,54],[12,74],[15,104]]}}]});return this.layerPointNumLabel.addGeometry(s),new Pp.Marker(t,{properties:{name:e},symbol:{textFaceName:"sans-serif",textName:"{name}",textSize:{stops:[[9,12],[12,18],[15,24]]},textFill:a}}).addTo(this.layerPointNumLabel),s}},{key:"getClosestZoom",value:function(t){for(var e=0;e<this.MAXZOOM-1;e++){var n=this.SCALES[e],r=this.SCALES[e+1];if(n===t)return e;if(r===t)return e+1;if(t<n&&r<t)return Math.abs(t-n)<=Math.abs(t-r)?e:e+1}}},{key:"calColNum",value:function(t,e,n){var r=this;this.rbush.clear();for(var i=[],o=[],a=0;a<this.dataItems.length;a++)if(e&&e.length>0&&e.includes(a)){var s=this.getRect(this.dataItems[a],a);this.rbush.insert(s)}for(var c=0;c<this.dataItems.length;c++)if(e.includes(c))if(t>=18){var u=[c];o.push(u)}else i.includes(c)||function(){var t=r.getRect(r.dataItems[c]),e=r.rbush.search(t),n=[];if(e.forEach((function(t){n.push(t.idx)})),o.length>0){for(var a=[],s=0;s<o.length;s++)o[s].filter((function(t){return n.includes(t)})).length>0&&a.push(s);if(0===a.length)o.push(n.sort((function(t,e){return t-e})));else if(1===a.length){var u=o[a[0]].concat(n.filter((function(t){return!o[a[0]].includes(t)})));o[a[0]]=u.sort((function(t,e){return t-e}))}else{for(var l=[],h=[],f=0;f<o.length;f++)a.includes(f)?h.push(o[f]):l.push(o[f]);var d=h.flat(),p=d.concat(n.filter((function(t){return!d.includes(t)})));o=[],l.forEach((function(t){o.push(t)})),o.push(p)}}else o.push(n);i=o.flat()}();n.push(o)}},{key:"testCluster",value:function(t){var e=this;this.layerPointNumLabel.clear(),t.forEach((function(t){if(t.length>1){var n=1/0,r=1/0,i=-1/0,o=-1/0;t.forEach((function(t){n=Math.min(n,e.dataItems[t].coordinate[0]),r=Math.min(r,e.dataItems[t].coordinate[1]),i=Math.max(i,e.dataItems[t].coordinate[0]),o=Math.max(o,e.dataItems[t].coordinate[1]),e.dataItems[t].visibility=.1}));var a=[(n+i)/2,(r+o)/2];e._addClusterLabelSmall(a,t.length,{})}else e.dataItems[t[0]].visibility=1})),this._changePtVisible([])}},{key:"testMinClusterZoom",value:function(t){var e=this;this.layerPointNumLabel.clear(),t.forEach((function(t){e._addClusterLabel(t.geo.getCenter(),t.ptnum,t)})),this.dataItems.forEach((function(t){t.visibility=.1})),this._changePtVisible([])}},{key:"getRect",value:function(t,e){var n=this.threeLayer.coordinateToVector3(t.coordinate,0),r=this.getPixel(n),i=r.x,o=r.y,a=this._getRate(),s=this.markSize*a;return{minX:i-s/2,minY:o-s/2,maxX:i+s/2,maxY:o+s/2,idx:e}}},{key:"getPixel",value:function(t){var e=this.map.getSize(),n=this.threeLayer.getCamera();return am.vector2Pixel(t,e,n)}}]),t}(),By={factor:{aqi:{unit:"",name:"AQI",colorMap:{"00e400":[0,50],ffff00:[50,100],ff7e00:[100,150],ff0000:[150,200],"99004c":[200,300],"7e0023":[300,500],"6e6e6e":[500]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},pm25:{unit:"μg/m³",name:"PM2.5",colorMap:{"00e400":[0,35],ffff00:[35,75],ff7e00:[75,115],ff0000:[115,150],"99004c":[150,250],"7e0023":[250,500],"7e0022":[500]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},pm10:{unit:"μg/m³",name:"PM10",colorMap:{"00e400":[0,50],ffff00:[50,150],ff7e00:[150,250],ff0000:[250,350],"99004c":[350,420],"7e0023":[420,600],"7e0022":[600]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},so2:{unit:"μg/m³",name:"SO₂",colorMap:{"00e400":[0,50],ffff00:[50,150],ff7e00:[150,475],ff0000:[475,800],"99004c":[800,1600],"7e0023":[1600,2620],"6e6e6e":[2620]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},no2:{unit:"μg/m³",name:"NO₂",colorMap:{"00e400":[0,40],ffff00:[40,80],ff7e00:[80,180],ff0000:[180,280],"99004c":[280,565],"7e0023":[565,940],"6e6e6e":[940]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},co:{unit:"mg/m³",name:"CO",colorMap:{"00e400":[0,2],ffff00:[2,4],ff7e00:[4,14],ff0000:[14,24],"99004c":[24,36],"7e0023":[36,60],"6e6e6e":[60]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},o3:{unit:"μg/m³",name:"O₃",colorMap:{"00e400":[0,100],ffff00:[100,160],ff7e00:[160,215],ff0000:[215,265],"99004c":[265,800],"7e0023":[800,1200],"6e6e6e":[1200]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},ci:{unit:"μg/m³",name:"CI",colorMap:{"00e400":[0,1.3],ffff00:[1.3,4],ff7e00:[4,8],ff0000:[8,12],"99004c":[12,20],"7e0023":[20]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},tsp:{unit:"μg/m³",name:"TSP",colorMap:{"00e400":[0,120],ffff00:[120,300],ff7e00:[300,400],ff0000:[400,500],"99004c":[500,625],"7e0023":[625,3e3],"6e6e6e":[3e3]},degreeMap:{"00e400":"",ffff00:"",ff7e00:"",ff0000:"","99004c":"","7e0023":""}},voc:{unit:"mg/m³",name:"VOC",colorMap:{"00e400":[0,.19],ffff00:[.19,.59],ff7e00:[.59,1.79],ff0000:[1.79,2.29],"99004c":[2.29,3],"7e0023":[3]},degreeMap:{"00e400":"",ffff00:"",ff7e00:"",ff0000:"","99004c":"","7e0023":""}},temperature:{unit:"℃",name:"温度",colorMap:{"8274cc":[-40,-30],acb3e2:[-30,-20],"95d0d8":[-20,-10],"61afff":[-10,0],"87b922":[0,10],e5aa06:[10,20],e45914:[20,30],"8a2b0a":[30]},degreeMap:{"8274cc":"",acb3e2:"","95d0d8":"","61afff":"","87b922":"",e5aa06:"",e45914:"","8a2b0a":""}},humidity:{unit:"%",name:"湿度",colorMap:{c4be20:[0,20],c4be21:[20,40],"4fcb46":[40,60],"45afde":[60,80],"6661f1":[80]},degreeMap:{c4be20:"",c4be21:"","4fcb46":"","45afde":"","6661f1":""}},pressure:{unit:"Pa",name:"气压",colorMap:{"6493FF":[1,1e17]},degreeMap:{"6493FF":""}}},colorForValue:{"00e400":"优",ffff00:"良",ff7e00:"轻度",ff0000:"中度","99004c":"重度","7e0023":"严重","6e6e6e":"无"},colorForFont:{"#00e400":"#000","#ffff00":"#000","#ff7e00":"#fff","#ff0000":"#fff","#99004c":"#fff","#7e0023":"#fff","#6e6e6e":"#fff"},wind:{"东北⻛":[22.5,67.5],"东⻛":[67.5,112.5],"东南⻛":[112.5,157.5],"南⻛":[157.5,202.5],"⻄南⻛":[202.5,247.5],"⻄⻛":[247.5,292.5],"⻄北⻛":[292.5,337.5]},windLevel:{"0级":[0,.2],"1级":[.2,1.5],"2级":[1.5,3.3],"3级":[3.3,5.4],"4级":[5.4,7.9],"5级":[7.9,10.7],"6级":[10.7,13.8],"7级":[13.8,17.1],"8级":[17.1,20.7],"9级":[20.7,24.4],"10级":[24.4,28.4],"11级":[28.4,32.6]},windLevelZh:{"零级(⽆⻛)":[0,.2],"⼀级(软⻛)":[.2,1.5],"⼆级(轻⻛)":[1.5,3.3],"三级(微⻛)":[3.3,5.4],"四级(和⻛)":[5.4,7.9],"五级(劲⻛)":[7.9,10.7],"六级(强⻛)":[10.7,13.8],"七级(疾⻛)":[13.8,17.1],"⼋级(⼤⻛)":[17.1,20.7],"九级(烈⻛)":[20.7,24.4],"⼗级(狂⻛)":[24.4,28.4],"⼗⼀级(暴⻛)":[28.4,32.6]}},Hy=function(t,e){if(!e)return"#8a97a0";var n=(By.factor[e]||By.factor[e.toLowerCase()]||{}).colorMap;if(!n)return"#8a97a0";for(var r in t=+t,n){if(1===n[r].length&&n[r][0]<t)return"#"+r;if(n[r][0]<t&&t<=n[r][1])return"#"+r}return"#8a97a0"},Gy=function(t,e){return By.colorForFont[Hy(t,e.toLowerCase())]},Uy=function(t){Jp(n,t);var e=Kp(n);function n(t,r,o){var a;return i(this,n),(a=e.call(this,t,r,o)).InforItems=[],a.curZoom=9,a.clusterMinZoom=9,a}return a(n,[{key:"_initChildVar",value:function(t,e){this.paraName=t.paraName||"pm25"}},{key:"_bindDataItem",value:function(t,e,n){var r=parseFloat(e.value)||0,i=e.status?1:0,o=e.value?parseFloat(e.value):-1,a=1===i&&o<=0?.3:1,s=(parseFloat(e.windDirection)||0)+.01,c=parseFloat(s*(Math.PI/180)),u=.9;!1===e.isChangeColor&&(u=1.9),t.push({coordinate:[parseFloat(e.longitude),parseFloat(e.latitude)],height:0,color:Hy(r,this.paraName),colorflag:u,value:e.name,imgflag:n,rotation:c,visibility:1==e.visibility?1:.1,code:e.code,status:i,opavalue:a,pvalue:e.value||0,data:e})}},{key:"_getRate",value:function(){if(1===this.markType)return qp(Wp(n.prototype),"_getRate",this).call(this);var t=this.map.getZoom()-3;return.1*(t=t>9?9:t)+.1}},{key:"_getImgType",value:function(t,e){return void 0===this.typeValues[t]&&(0===Object.keys(this.typeValues).length?this.initTypeValue=.9:this.initTypeValue+=1,this.typeValues[t]={v:this.initTypeValue,img:e}),this.typeValues[t].v}},{key:"_pointShowHide",value:function(t,e,n,r,i){var o=this;this.layerLabel&&this.layerLabel.clear();var a=function(a){var s=t.filter((function(t){return t===a}));o._itemHide(s,e,n,r,i,o.typeValues[a].v)};for(var s in this.typeValues)a(s)}},{key:"_loadTexture",value:function(){var t=c(regeneratorRuntime.mark((function t(){var e,n,r,i,o,a,s,c,u,l,h,f,d;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=[],t.t0=regeneratorRuntime.keys(this.typeValues);case 2:if((t.t1=t.t0()).done){t.next=27;break}if(n=t.t1.value,!this.typeValues[n].img){t.next=25;break}if(r=this.typeValues[n].img,i=r,!r.includes(".svg")){t.next=14;break}return t.next=10,fetch(r);case 10:return o=t.sent,t.next=13,o.text();case 13:i=t.sent;case 14:return a=new DOMParser,s=a.parseFromString(i,"image/svg+xml"),c=1*(s.documentElement.getAttribute("width")||1),u=1*(s.documentElement.getAttribute("height")||1),l=u/c,h=parseInt(40/l),f=parseInt(h*l),t.next=23,am.addImageProcess(i);case 23:d=t.sent,e.push({src:d,w:40,h:40,iw:h,ih:f});case 25:t.next=2;break;case 27:return console.log(e),t.abrupt("return",am.generateTexture(e));case 29:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"addPoint",value:function(){var t=c(regeneratorRuntime.mark((function t(){var e,n,r,i,o=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.dataItems){t.next=2;break}return t.abrupt("return",null);case 2:return t.next=4,this._loadTexture();case 4:return e=t.sent,this.textures||(this.textures=[]),this.textures.push(e.texture),n=this._getRate(),this.m.onBeforeCompile=function(t){r=o._createShaderPol(t,e.texture,e.xys,e.textureSize,o.markSize*n),o.shader=r},i=new jy(this.dataItems,{minZoom:this.minZoom},this.m,this.markSize,this.markType,this.threeLayer),this.isToolTip&&i.setToolTip("hello",{showTimeout:0,eventsPropagation:!0,dx:10}),i.object3d.renderOrder=this.order,this.point=i,this.point.parent=this,this.threeLayer.addMesh(this.point),this._bindMapEvents(),t.abrupt("return",i);case 17:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"addInfo",value:function(t){if(t.length!==this.InforItems.length)for(var e=0;e<this.dataItems.length;e++)if(t.includes(e)){var n=this.dataItems[e],r=n.data.infoWindowData;if(n.data.law_num&&n.data.punish_num&&(r=[{key:"案件数",value:n.data.law_num},{key:"处罚金额",value:"".concat(n.data.punish_num,"万元")}]),!r||!r.length)continue;var i={single:!1,custom:!0,dy:-16,autoOpenOn:null,animation:!1,autoPanDuration:!1,autoPan:!1,content:'<div style="background: rgba(0,0,0,0.42); border-radius: 6px; font-size: 12px; color: #ffffff; padding: 6px;display: flex;\n flex-direction: column;\n align-items: center; width: 128px">\n <span>'.concat(r[0].key,":").concat(r[0].value,"</span>\n <span>").concat(r[1].key,":").concat(r[1].value,"</span>\n </div>")},o=new Pp.ui.InfoWindow(i);this.InforItems.push(o),o.addTo(this.map).show({x:n.coordinate[0],y:n.coordinate[1]})}}},{key:"hideInfoWindows",value:function(){this.InforItems.length>0&&(this.InforItems.forEach((function(t){t.remove()})),this.InforItems=[])}},{key:"pointShowStatisticsByeCodeMultiple",value:function(t,e,n,r,i){var o=this;this.layerPointNumLabel.clear(),this.layerPointNumLabel.show(),this.hideInfoWindows(),this._deleteFunsKey();for(var a=[],s=[],c=0;c<e.length;c++)a.push({code:c,geo:e[c],geojson:e[c].toGeoJSON(),ptnum:0,val:t,sum:0,ptids:[]});a.forEach((function(e){for(var r=0;r<o.dataItems.length;r++){var i=o.dataItems[r];t.includes(i.code)&&am.containsCoordinate2(o.dataItems[r].coordinate,e.geojson)&&(e.ptnum+=1,e.ptids.push(r),s.push(r),o.dataItems[r].data[n]?(e.sum+=parseFloat(o.dataItems[r].data[n])||0,e.sum=Math.floor(100*e.sum)/100):e.sum+=0)}})),this._clearClusterCache();var u=this.clusterMinZoom;this.clusterItemsCache[u]=a,this.testMinClusterZoom1(this.clusterItemsCache[u],r,i),this.funcsNew.c=function(){var t=o.getClosestZoom(o.map.pixelToDistance(1,0));if(!(t<9||t>18)&&o.curZoom!==t)if(o.curZoom=t,o.clusterItemsCache[t])if(t===o.clusterMinZoom)o.hideInfoWindows(),o.testMinClusterZoom1(o.clusterItemsCache[t],r,i);else{var e=o.clusterItemsCache[t];o.testCluster1(e,r,i,n)}else{var s=[];a.forEach((function(e){o.calColNum(t,e.ptids,s)})),o.clusterItemsCache[t]=s.flat(),o.testCluster1(o.clusterItemsCache[t],r,i,n)}}}},{key:"testMinClusterZoom1",value:function(t,e,n){var r=this;this.layerPointNumLabel.clear(),t.forEach((function(t){r._addClusterLabel(t.geo.getCenter(),t.sum,t,e,n)})),this.dataItems.forEach((function(t){t.visibility=.1})),this._changePtVisible([])}},{key:"testCluster1",value:function(t,e,n,r){var i=this;this.layerPointNumLabel.clear();var o=[];t.forEach((function(t){if(t.length>1){var a=1/0,s=1/0,c=-1/0,u=-1/0,l=0;t.forEach((function(t){a=Math.min(a,i.dataItems[t].coordinate[0]),s=Math.min(s,i.dataItems[t].coordinate[1]),c=Math.max(c,i.dataItems[t].coordinate[0]),u=Math.max(u,i.dataItems[t].coordinate[1]),i.dataItems[t].visibility=.1,i.dataItems[t].data[r]?(l+=parseFloat(i.dataItems[t].data[r])||0,l=Math.floor(100*l)/100):l+=0}));var h=[(a+c)/2,(s+u)/2];i._addClusterLabelSmall(h,l,{},e,n)}else i.dataItems[t[0]].visibility=1,o.push(t[0])})),this._changePtVisible([]),this.hideInfoWindows(),this.addInfo(o)}},{key:"pointShowStatisticsByeTypeMultiple",value:function(t,e,n){var r=this;this.layerPointNumLabel.clear(),this.layerPointNumLabel.show(),this._deleteFunsKey();for(var i=[],o=0;o<e.length;o++)i.push({code:o,geo:e[o],geojson:e[o].toGeoJSON(),sum:0,val:t,ptnum:0});i.forEach((function(e){for(var i=function(i){var o=r.dataItems[i];t.filter((function(t){return t.includes(o.type)})).length>0&&am.containsCoordinate2(r.dataItems[i].coordinate,e.geojson)&&(e.ptnum+=1,r.dataItems[i].data[n]?e.sum+=parseFloat(r.dataItems[i].data[n])||0:e.sum+=0)},o=0;o<r.dataItems.length;o++)i(o)})),i.forEach((function(e){r._addClusterLabel(e.geo.getCenter(),e.sum,e).on("click",(function(e){r.selectItems=[];var n=e.target.properties.item;n.ptnum>0&&(setTimeout((function(){r.point.show()}),500),r._pointShowHide(n.val,n.geo),r._zoomSelect(t,n.geo))}))})),this._pointShowHide(t),this.map.getZoom()<9.4?this.point.hide():(this.point.show(),this.layerPointNumLabel.hide()),this.funcsNew.b=function(){r.isCtrol&&(r.map.getZoom()<9.4?(r.point.hide(),r.layerPointNumLabel.show()):(r.point.show(),r.layerPointNumLabel.hide()))}}},{key:"dispose",value:function(){this.InforItems.length>0&&this.hideInfoWindows(),qp(Wp(n.prototype),"dispose",this).call(this)}},{key:"_createShaderPol",value:function(t,e,n,r,i){return t.uniforms.imgdatas={value:n},t.uniforms.texture1={value:e},t.uniforms.textureSize={value:r},t.uniforms.size1={value:i},t.uniforms.flag={value:1},t.vertexShader="uniform float size1;\n attribute float imgflag;\n attribute float rotation;\n attribute vec3 color;\n varying float vimgflag;\n attribute float visibility;\n varying float vVisible;\n varying float vRotation;\n varying vec3 vColor;\n attribute float opavalue;\n varying float vOpavalue;\n attribute float colorflag;\n varying float vColorflag;\n "+t.vertexShader,t.vertexShader=t.vertexShader.replace("#include <project_vertex>","\n #include <project_vertex>\n vimgflag = imgflag;\n vVisible = visibility;\n vRotation = rotation;\n vColor = color;\n vOpavalue = opavalue;\n vColorflag = colorflag;\n ").replace("gl_PointSize = size;","\n gl_PointSize = size1;\n "),t.fragmentShader="struct imgdata {\n float u;\n float v;\n float w;\n float h;\n };\n uniform imgdata imgdatas[".concat(n.length,"];\n uniform sampler2D texture1;\n uniform float textureSize;\n varying float vimgflag;\n varying float vVisible;\n varying float vRotation;\n varying vec3 vColor;\n varying float vOpavalue;\n varying float vColorflag;\n ")+t.fragmentShader,t.fragmentShader=t.fragmentShader.replace("gl_FragColor = vec4( outgoingLight, diffuseColor.a );","\n highp int index = int(vimgflag);\n float width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n float height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n float x = imgdatas[index].u;\n float y = 1.0 - imgdatas[index].v;\n vec2 uv = vec2(x + width, y - height);\n\n float xx = x + 0.5 / textureSize * imgdatas[index].w;\n float yy = y - 0.5 / textureSize * imgdatas[index].h;\n float angle = 1.0;\n float s = sin(vRotation);\n float c = cos(vRotation);\n mat2 rotationMatrix = mat2( c, s,\n -s, c);\n vec2 pivot = vec2( xx, yy);\n uv = rotationMatrix * (uv - pivot) + pivot;\n\n vec4 rotatedTexture = texture2D( texture1, uv);\n vec4 texColor;\n if (vColorflag < 1.0) {\n texColor = vec4(vColor, vOpavalue) * rotatedTexture;\n } else {\n texColor = rotatedTexture;\n }\n outgoingLight *= texColor.xyz;\n gl_FragColor = vec4( outgoingLight, texColor.a * diffuseColor.a );\n "),t}}]),n}(Fy),Vy=function(t){Jp(n,t);var e=Kp(n);function n(t,r,o){var a;if(i(this,n),(a=e.call(this,t,r,o)).bzlayerNum)for(var s=a.bzlayerNum.getGeometries(),c=0;c<s.length;c++)a.bz_all_nums.push(s[c]);return a}return a(n,[{key:"_initChildVar",value:function(t,e){this.bzlayerNum=new Pp.VectorLayer(Pp.Util.GUID(),{minZoom:11,geometryEvents:!1,hitDetect:!1,visible:!1}).addTo(e.map),this.bz_all_nums=[],this.paraName=t.paraName||"pm25"}},{key:"changeParaValue",value:function(t,e){var n=this;if(this.point){this.paraName=e;var r=this.point.object3d.geometry.attributes.color.array,i=this.point.object3d.geometry.attributes.fcolor.array,o=this.point.object3d.geometry.attributes.opavalue.array;t.slice(0,1/0).map((function(t){var e=parseFloat(t.value)||0,r="#000"===Gy(e,n.paraName)?2:.9,i=Hy(e,n.paraName),o=1===parseInt(t.status)?1:0,a=parseFloat(t.value)?parseFloat(t.value):-1,s=1===o&&a<=0?.3:1,c=n.findItemByCode(t.code);void 0!==c&&(n.dataItems[c].color=i,n.dataItems[c].fcolor=r,n.dataItems[c].pvalue=e,n.dataItems[c].opavalue=s,n.dataItems[c].data=t)}));for(var a=0;a<this.dataItems.length;a++){var s=new Ri(this.dataItems[a].color);r[3*a+0]=s.r,r[3*a+1]=s.g,r[3*a+2]=s.b,i[a]=this.dataItems[a].fcolor,o[a]=this.dataItems[a].opavalue}this.point.object3d.geometry.attributes.color.needsUpdate=!0,this.point.object3d.geometry.attributes.fcolor.needsUpdate=!0,this.point.object3d.geometry.attributes.opavalue.needsUpdate=!0}}},{key:"_bindDataItem",value:function(t,e,n){var r=parseFloat(e.value)||0,i=e.status?1:0,o=e.value?parseFloat(e.value):-1,a=1===i&&o<=0?.3:1,s=Gy(r,this.paraName),c="#000"===s?2:.9,u=(parseFloat(e.windDirection)||0)+.01,l=parseFloat(u*(Math.PI/180));t.push({coordinate:[parseFloat(e.longitude),parseFloat(e.latitude)],height:0,color:Hy(r,this.paraName),fcolor:c,value:e.name,imgflag:n,rotation:l,visibility:1==e.visibility?1:.1,code:e.code,status:i,opavalue:a,pvalue:e.value||0,data:e}),new Pp.Marker([parseFloat(e.longitude),parseFloat(e.latitude)],{properties:{name:r,type:e.businessType,status:i,pvalue:r},symbol:{textFaceName:"sans-serif",textName:"{name}",textSize:12,textFill:s}}).addTo(this.bzlayerNum)}},{key:"_getImgType",value:function(t,e){return void 0===this.typeValues[t]&&(0===Object.keys(this.typeValues).length?this.initTypeValue=.9:this.initTypeValue+=1,this.typeValues[t]={v:this.initTypeValue,img:e.img,txt:e.txt}),this.typeValues[t].v}},{key:"_pointShowHide",value:function(t,e,n,r,i){var o=this;this.layerLabel&&this.layerLabel.clear();var a=function(a){var s=t.filter((function(t){return t===a}));o._itemHide(s,e,n,r,i,o.typeValues[a].v)};for(var s in this.typeValues)a(s)}},{key:"showValue",value:function(t){if(this.shader){var e=!0===t?0:1;this.shader.uniforms.flag.value=e,this.bzlayerNum&&(this.bzlayerNum.options.visible=t)}}},{key:"_loadTexture",value:function(){var t=c(regeneratorRuntime.mark((function t(){var e,n,r,i,o,a,s,c,u,l,h,f,d;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=[],t.t0=regeneratorRuntime.keys(this.typeValues);case 2:if((t.t1=t.t0()).done){t.next=28;break}if(n=t.t1.value,!this.typeValues[n].img){t.next=25;break}if(r=this.typeValues[n].img,i=r,!r.includes(".svg")){t.next=14;break}return t.next=10,fetch(r);case 10:return o=t.sent,t.next=13,o.text();case 13:i=t.sent;case 14:return a=new DOMParser,s=a.parseFromString(i,"image/svg+xml"),c=1*(s.documentElement.getAttribute("width")||1),u=1*(s.documentElement.getAttribute("height")||1),l=u/c,h=parseInt(40/l),f=parseInt(h*l),t.next=23,am.addImageProcess(i);case 23:d=t.sent,e.push({type:"img",src:d,w:40,h:40,iw:h,ih:f});case 25:this.typeValues[n].txt&&(e.push({type:"txt",src:this.typeValues[n].txt,w:40,h:40,color:"#000",size:20,offx:10,offy:26}),e.push({type:"txt",src:this.typeValues[n].txt,w:40,h:40,color:"#fff",size:20,offx:10,offy:26})),t.next=2;break;case 28:return console.log(e),t.abrupt("return",am.generateTexture(e));case 30:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"addPoint",value:function(){var t=c(regeneratorRuntime.mark((function t(){var e,n,r,i,o=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.dataItems){t.next=2;break}return t.abrupt("return",null);case 2:return t.next=4,this._loadTexture();case 4:return e=t.sent,this.textures||(this.textures=[]),this.textures.push(e.texture),n=this._getRate(),this.m.onBeforeCompile=function(t){r=o._createBzShader(t,e.texture,e.xys,e.textureSize,3,o.markSize*n),o.shader=r},i=new jy(this.dataItems,{minZoom:this.minZoom},this.m,this.markSize,this.markType,this.threeLayer),this.isToolTip&&i.setToolTip("hello",{showTimeout:0,eventsPropagation:!0,dx:10}),i.object3d.renderOrder=this.order,this.point=i,this.point.parent=this,this.threeLayer.addMesh(this.point),this._bindMapEvents(),t.abrupt("return",i);case 17:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"dispose",value:function(){this.bzlayerNum&&(this.map.removeLayer(this.bzlayerNum),this.bz_all_nums=[]),qp(Wp(n.prototype),"dispose",this).call(this)}},{key:"_createBzShader",value:function(t,e,n,r,i,o){return t.uniforms.imgdatas={value:n},t.uniforms.texture1={value:e},t.uniforms.textureSize={value:r},t.uniforms.textureOffset={value:i},t.uniforms.size1={value:o},t.uniforms.flag={value:1},t.vertexShader="uniform float size1;\n attribute float imgflag;\n varying float vimgflag;\n attribute float visibility;\n varying float vVisible;\n attribute vec3 color;\n varying vec3 vColor;\n attribute float opavalue;\n varying float vOpavalue;\n attribute float fcolor;\n varying float vFcolor;\n "+t.vertexShader,t.vertexShader=t.vertexShader.replace("#include <project_vertex>","\n #include <project_vertex>\n vimgflag = imgflag;\n vVisible = visibility;\n vColor = color;\n vOpavalue = opavalue;\n vFcolor = fcolor;\n ").replace("gl_PointSize = size;","\n gl_PointSize = size1;\n "),t.fragmentShader="struct imgdata {\n float u;\n float v;\n float w;\n float h;\n };\n uniform imgdata imgdatas[".concat(n.length,"];\n uniform sampler2D texture1;\n uniform float textureSize;\n uniform float textureOffset;\n varying float vimgflag;\n varying float vVisible;\n varying vec3 vColor;\n varying float vOpavalue;\n varying float vFcolor;\n uniform int flag;\n ")+t.fragmentShader,t.fragmentShader=t.fragmentShader.replace("gl_FragColor = vec4( outgoingLight, diffuseColor.a );","\n highp int index = int(vimgflag);\n if (index > 0) {\n //index += int(textureOffset);\n index = index * int(textureOffset);\n }\n float width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n float height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n float x = imgdatas[index].u;\n float y = 1.0 - imgdatas[index].v;\n vec4 texColor = vec4(vColor, vOpavalue) * texture2D( texture1, vec2(x + width, y - height) );\n outgoingLight *= texColor.xyz;\n gl_FragColor = vec4( outgoingLight, texColor.a * diffuseColor.a );\n\n if(flag == 1){\n if(vFcolor > 1.0){ \n index += 1;\n } else {\n index += 2;\n }\n width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n x = imgdatas[index].u;\n y = 1.0 - imgdatas[index].v;\n vec4 Ca = texture2D( texture1, vec2(x + width, y - height) );\n gl_FragColor = mix(gl_FragColor, Ca, Ca.a);\n }\n\n if (vVisible < 0.5) discard;\n "),t}}]),n}(Fy),Wy=function(t){Jp(n,t);var e=Kp(n);function n(){return i(this,n),e.apply(this,arguments)}return a(n,[{key:"_getImgType",value:function(t,e){return void 0===this.typeValues[t]&&(0===Object.keys(this.typeValues).length?this.initTypeValue=.9:this.initTypeValue+=1,this.typeValues[t]={v:this.initTypeValue,img:e}),this.typeValues[t].v}},{key:"_loadTexture",value:function(){var t=c(regeneratorRuntime.mark((function t(){var e,n,r,i,o,a,s,c,u,l,h,f,d,p;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=[],t.t0=regeneratorRuntime.keys(this.typeValues);case 2:if((t.t1=t.t0()).done){t.next=32;break}if(n=t.t1.value,!this.typeValues[n].img||!Array.isArray(this.typeValues[n].img)){t.next=30;break}r=0;case 6:if(!(r<this.typeValues[n].img.length)){t.next=30;break}if(i=this.typeValues[n].img[r],o=i,!i.includes(".svg")){t.next=16;break}return t.next=12,fetch(i);case 12:return a=t.sent,t.next=15,a.text();case 15:o=t.sent;case 16:return s=new DOMParser,c=s.parseFromString(o,"image/svg+xml"),u=1*(c.documentElement.getAttribute("width")||1),l=1*(c.documentElement.getAttribute("height")||1),h=l/u,f=parseInt(40/h),d=parseInt(f*h),t.next=25,am.addImageProcess(o);case 25:p=t.sent,0===r?0===e.length&&e.push({type:"img",src:p,w:40,h:40,iw:f,ih:d}):(f=parseInt(16/h),d=parseInt(f*h),e.push({type:"img1",src:p,w:40,h:40,iw:f,ih:d}));case 27:r++,t.next=6;break;case 30:t.next=2;break;case 32:return console.log(e),t.abrupt("return",am.generateTexture(e));case 34:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"addPoint",value:function(){var t=c(regeneratorRuntime.mark((function t(){var e,n,r,i,o=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.dataItems){t.next=2;break}return t.abrupt("return",null);case 2:return t.next=4,this._loadTexture();case 4:return e=t.sent,this.textures||(this.textures=[]),this.textures.push(e.bgTexture),this.textures.push(e.texture),n=this._getRate(),this.m.onBeforeCompile=function(t){r=o._createWgShader(t,e.texture,e.xys,e.textureSize,o.markSize*n),o.shader=r},i=new jy(this.dataItems,{minZoom:this.minZoom},this.m,this.markSize,this.markType,this.threeLayer),this.isToolTip&&i.setToolTip("hello",{showTimeout:0,eventsPropagation:!0,dx:10}),i.object3d.renderOrder=this.order,this.point=i,this.point.parent=this,this.threeLayer.addMesh(this.point),this._bindMapEvents(),t.abrupt("return",i);case 18:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"_createWgShader",value:function(t,e,n,r,i){return t.uniforms.imgdatas={value:n},t.uniforms.texture1={value:e},t.uniforms.textureSize={value:r},t.uniforms.size1={value:i},t.uniforms.flag={value:1},t.vertexShader="uniform float size1;\n attribute float imgflag;\n varying float vimgflag;\n attribute float visibility;\n varying float vVisible;\n attribute vec3 color;\n varying vec3 vColor;\n attribute float opavalue;\n varying float vOpavalue;\n attribute float fcolor;\n varying float vFcolor;\n attribute float rotation;\n varying float vRotation;\n "+t.vertexShader,t.vertexShader=t.vertexShader.replace("#include <project_vertex>","\n #include <project_vertex>\n vimgflag = imgflag;\n vVisible = visibility;\n vColor = color;\n vOpavalue = opavalue;\n vFcolor = fcolor;\n vRotation = rotation;\n ").replace("gl_PointSize = size;","\n gl_PointSize = size1;\n "),t.fragmentShader="struct imgdata {\n float u;\n float v;\n float w;\n float h;\n };\n uniform imgdata imgdatas[".concat(n.length,"];\n uniform sampler2D texture1;\n uniform float textureSize;\n varying float vimgflag;\n varying float vVisible;\n varying vec3 vColor;\n varying float vOpavalue;\n varying float vFcolor;\n varying float vRotation;\n uniform int flag;\n ")+t.fragmentShader,t.fragmentShader=t.fragmentShader.replace("gl_FragColor = vec4( outgoingLight, diffuseColor.a );","\n int index = 0;\n float width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n float height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n float x = imgdatas[index].u;\n float y = 1.0 - imgdatas[index].v;\n vec2 uv = vec2(x + width, y - height);\n\n float xx = x + 0.5 / textureSize * imgdatas[index].w;\n float yy = y - 0.5 / textureSize * imgdatas[index].h;\n float angle = 1.0;\n float s = sin(vRotation);\n float c = cos(vRotation);\n mat2 rotationMatrix = mat2( c, s,\n -s, c);\n vec2 pivot = vec2( xx, yy);\n uv = rotationMatrix * (uv - pivot) + pivot;\n\n vec4 rotatedTexture = texture2D( texture1, uv);\n vec4 texColor = vec4(vColor, vOpavalue) * rotatedTexture;\n outgoingLight *= texColor.xyz;\n gl_FragColor = vec4( outgoingLight, texColor.a * diffuseColor.a );\n\n if(flag == 1){\n highp int index = int(vimgflag);\n index += 1;\n float width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n float height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n float x = imgdatas[index].u;\n float y = 1.0 - imgdatas[index].v;\n vec4 img = texture2D( texture1, vec2(x + width, y - height) );\n vec4 Ca;\n if(vFcolor > 1.0){\n Ca = vec4(0.0, 0.0, 0.0, 1.0) * img;\n }\n else{\n Ca = img;\n }\n gl_FragColor = mix(gl_FragColor, Ca, Ca.a);\n }\n\n\n /*float mid = 0.5;\n vec2 rotated = vec2(cos(vRotation) * (gl_PointCoord.x - mid) + sin(vRotation) * (gl_PointCoord.y - mid) + mid,\n cos(vRotation) * (gl_PointCoord.y - mid) - sin(vRotation) * (gl_PointCoord.x - mid) + mid);\n vec4 rotatedTexture = texture2D( bgtexture, rotated);\n vec2 pUv = gl_PointCoord;\n pUv.y = 1. - pUv.y;\n vec4 texColor = vec4(vColor, vOpavalue) * rotatedTexture;\n outgoingLight *= texColor.xyz;\n gl_FragColor = vec4( outgoingLight, texColor.a * diffuseColor.a );\n\n if(flag == 1){\n highp int index = int(vimgflag);\n float width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n float height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n float x = imgdatas[index].u;\n float y = 1.0 - imgdatas[index].v;\n vec4 img = texture2D( texture1, vec2(x + width, y - height) );\n vec4 Ca;\n if(vFcolor > 1.0){\n Ca = vec4(0.0, 0.0, 0.0, 1.0) * img;\n }\n else{\n Ca = img;\n }\n gl_FragColor = mix(gl_FragColor, Ca, Ca.a);\n }*/\n\n if (vVisible < 0.5) discard;\n "),t}}]),n}(Vy);n("622a"),n("5ffc"),n("ac3e"),n("2ed2");var Zy=function(){function t(e){i(this,t),this.map=e,this.threeLayer=null,this.animationId=null}return a(t,[{key:"createIepLayer",value:function(t){var e=this,n=function(){var t="xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}));return"iep".concat(t,"layer")}();if(!this.threeLayer){var r=this.threeLayer=new Ay(n,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Vp(Object(n),!0).forEach((function(e){Up(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vp(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({forceRenderOnMoving:!0,forceRenderOnRotating:!0,identifyCountOnEvent:1},t)),i=function t(){var n;r._needsUpdate=!r._needsUpdate,r._needsUpdate&&(null==r||null===(n=r.getRenderer())||void 0===n||n.clearCanvas(),r.renderScene()),e.animationId=requestAnimationFrame(t)};return this.threeLayer.prepareToDraw=function(t,e,n){var r=new Ph(16777215);r.position.set(0,-10,10).normalize(),e.add(r),i()},r.addTo(this.map),{layerId:n,layer:r}}}},{key:"removeIepLayer",value:function(){cancelAnimationFrame(this.animationId),this.threeLayer.getMeshes().forEach((function(t){var e;"Points"===t.type&&(null===(e=t.parent)||void 0===e||e.dispose())})),this.map.removeLayer(this.threeLayer),this.threeLayer=null,this.animationId=null}},{key:"prepareToDraw",value:function(t){var e=this;return new Promise((function(t){e.threeLayer.prepareToDraw=function(e,n,r){var i=new Ph(16777215);i.position.set(0,-10,10).normalize(),n.add(i),console.log("1111111111111111"),t()}}))}},{key:"drawPoint",value:function(t,e){var n=this;return this.createIepLayer(),this.threeLayer.getScene()?new Promise((function(r){var i=new Uy(t,e,n.threeLayer);i.addPoint().then((function(){r(i)}))})):new Promise((function(r){setTimeout((function(){var i=new Uy(t,e,n.threeLayer);i.addPoint().then((function(){r(i)}))}))}))}},{key:"drawbzPoint",value:function(t,e){var n=this;return this.createIepLayer(),this.threeLayer.getScene()?new Promise((function(r){var i=new Vy(t,e,n.threeLayer);i.addPoint().then((function(){r(i)}))})):new Promise((function(r){setTimeout((function(){var i=new Vy(t,e,n.threeLayer);i.addPoint().then((function(){r(i)}))}))}))}},{key:"drawWgPoint",value:function(t,e){var n=this;return this.createIepLayer(),this.threeLayer.getScene()?new Promise((function(r){var i=new Wy(t,e,n.threeLayer);i.addPoint().then((function(){r(i)}))})):new Promise((function(r){setTimeout((function(){var i=new Wy(t,e,n.threeLayer);i.addPoint().then((function(){r(i)}))}))}))}},{key:"saveIndexedDb",value:function(){return new Promise((function(t,e){var n=window.indexedDB.open("iep_db");n.onsuccess=function(e){var n=e.target.result;t(n)},n.onerror=function(t){e(t)},n.onupgradeneeded=function(t){var e=t.target.result;if(!e.objectStoreNames.contains("svg_dict")){var n=e.createObjectStore("svg_dict",{keyPath:"code"});n.createIndex("code","code",{unique:!0}),n.createIndex("file","file",{unique:!1})}}}))}},{key:"getType",value:function(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}},{key:"getDbRecord",value:function(t){var e=this,n="string"===this.getType(t)?[t]:t;return new Promise((function(t){e.saveIndexedDb().then((function(e){var r=e.transaction("svg_dict","readwrite").objectStore("svg_dict");Promise.all(n.map((function(t){return new Promise((function(e){var n=r.get(t);n.onsuccess=function(t){console.log(t),e(t.target.result)},n.onerror=function(t){e()}}))}))).then((function(e){t(e)}))}))}))}}]),t}(),qy=function(t){return new Zy(t)};
|
|
41
|
+
/*!
|
|
42
|
+
* maptalks.amap v0.10.1
|
|
43
|
+
* LICENSE : MIT
|
|
44
|
+
* (c) 2016-2021 maptalks.org
|
|
45
|
+
*/function Yy(){return(Yy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function Jy(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Xy(t,e)}function Xy(t,e){return(Xy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var $y=function(){function t(){}return t.prototype.load=function(){return Promise.resolve(this)},t}(),Qy="created",Ky="loading",t_="loaded",e_="failed",n_=Symbol("promise"),r_=function(){function t(t){if(!window||!document)throw Error("ScriptLoader can only be used in Browser.");this.url=t,this.status=Qy,this[n_]=null}return t.prototype.load=function(){var t=this;return this[n_]||(this.status=Ky,this[n_]=new Promise((function(e,n){var r=document.createElement("script");r.onload=function(){t.status=t_,e(t)},r.onerror=function(){t[n_]=null,t.status=e_,n(new Error("Failed to load tile"))},r.src=t.url;var i=document.getElementsByTagName("script")[0]||document.head||document.getElementsByTagName("head")[0];i.parentNode.insertBefore(r,i),r.parentNode&&r.parentNode.removeChild(r)}))),this[n_]},t}(),i_="loading",o_="loaded",a_="failed",s_={key:"",version:"1.4.15",plugins:[]},c_=Symbol("promise"),u_=0,l_=function(t){function e(e){var n;if(!window||!document)throw Error("ScriptLoader can only be used in Browser.");n=t.call(this,e)||this;var r=Yy({},s_,e),i=r.key,o=r.version,a=r.plugins;return n.key=i,n.version=o,n.plugins=a,n.AMap=null,n[c_]=null,n}Jy(e,t);var n=e.prototype;return n.load=function(){var t=this;return this[c_]||(this.status=i_,this[c_]=new Promise((function(e,n){var r="__onAMapLoaded"+u_++,i=new r_("https://webapi.amap.com/maps?key="+t.key+"&v="+t.version+"&plugin="+t.plugins.join(",")+"&callback="+r);window[r]=function(){delete window[r],t.AMap=window.AMap,t.status=o_,e(t)},i.load().catch((function(e){delete window[r],t[c_]=null,t.status=a_,n(e)}))}))),this[c_]},n.loadPlugin=function(t){var e=this;return void 0===t&&(t=[]),new Promise((function(n,r){if(!e.AMap)return r("请先加载AMap.");for(var i=[],o=0;o<t.length;o+=1)-1==e.plugins.indexOf(t[o])&&i.push(t[o]);i.length?e.AMap.plugin(i,(function(){e.plugins=e.plugins.concat(i),n(e)})):n(e)}))},e}($y),h_=function(t){function e(e,n){var r,i=n.style,o=void 0===i?"":i,a=n.showLable,s=void 0===a||a,c=n.skyColor,u=void 0===c?"#000000":c,l=n.features,h=void 0===l?"all":l,f=n.showBuilding,d=void 0!==f&&f;if(r=t.call(this)||this,void 0===e)throw new Error("key参数未定义");var p=new l_({key:e,version:"1.4.15",plugins:[]});return r.loader=p,r.style=o,r.shwoLabel=s,r.skyColor=u,r.features=h,r.autoFov=!0,r.showBuilding=d,r}Jy(e,t),e.fromJSON=function(t){return t&&"amapLayer"===t.type?new e(t.id,t.options):null};var n=e.prototype;return n.getAMap=function(){var t=this._getRenderer();return t?t.amap:null},n.setAutoFov=function(t){this.autoFov=t},n.toJSON=function(){return{type:this.getJSONType(),id:this.getId(),options:this.config()}},e}(Pp.Layer);h_.mergeOptions({renderer:"dom",container:"back",mapOptions:{viewMode:"3D",pitchEnable:!0,rotateEnable:!0,expandZoomRange:!0,animateEnable:!1,doubleClickZoom:!1,dragEnable:!1,isHotspot:!1,jogEnable:!1,keyboardEnable:!1,resizeEnable:!1,scrollWheel:!1,touchZoom:!1,zoomEnable:!1}}),h_.registerJSONType("amapLayer"),h_.registerRenderer("dom",function(){function t(t){this.layer=t}var e=t.prototype;return e.getMap=function(){return this.layer?this.layer.getMap():null},e.show=function(){this._container&&(this.render(),this._show())},e.hide=function(){this._container&&(this._hide(),this.clear())},e.remove=function(){delete this.layer,this.amap&&this.amap.remove(),this._container&&Pp.DomUtil.removeDomNode(this._container),delete this._container,delete this.amap},e.clear=function(){this._container&&(this._container.innerHTML="")},e.setZIndex=function(t){this._zIndex=t,this._container&&(this._container.style.zIndex=t)},e.needToRedraw=function(){var t=this.getMap(),e=t._getRenderer();return t.isInteracting()||e&&e.isViewChanged()},e.render=function(){var t=this;if(this._container||this._createLayerContainer(),!this.amap){var e=this.getMap(),n=e.getCenter(),r=Pp.Util.extend({},this.layer.options.mapOptions,{center:[n.x,n.y],zoom:e.getZoom(),pitch:e.getPitch(),rotation:360-e.getBearing(),mapStyle:this.layer.style,showLabel:this.layer.shwoLabel,skyColor:this.layer.skyColor,features:this.layer.features,showBuildingBlock:this.layer.showBuilding});this.layer.loader.load().then((function(e){var n=e.AMap;t.AMap=n,t.amap=new t.AMap.Map(t._container,r),t.amap.on("complete",(function(){t.layer.fire("layerload")}))})).catch((function(t){throw new Error(t)}))}this._syncMap()},e.drawOnInteracting=function(){var t=this.getMap();this.amap&&t&&this._syncMap()},e.getEvents=function(){return{resize:this.onResize}},e.onResize=function(){this._resize()},e._createLayerContainer=function(){var t=this._container=Pp.DomUtil.createEl("div","maptalks-amapllayer");t.style.cssText="position:absolute;",this._resize(),this._zIndex&&(t.style.zIndex=this._zIndex),("front"===this.layer.options.container?this.getMap()._panels.frontStatic:this.getMap()._panels.backStatic).appendChild(t)},e._resize=function(){var t=this._container;if(t){var e=this.getMap().getSize();t.style.width=e.width+"px",t.style.height=e.height+"px"}},e._show=function(){this._container.style.display=""},e._hide=function(){this._container.style.display="none"},e._syncMap=function(){var t=this.getMap();if(this.amap&&t){var e=t.getCenter();this.amap.setZoomAndCenter(function(t){return 19-Math.log(t/f_)/Math.LN2}(t.getResolution())+1,new this.AMap.LngLat(e.x,e.y)),this.amap.setRotation(360-t.getBearing()),this.amap.setPitch(t.getPitch()),this.amap.render(!0),this.layer.autoFov&&void 0!==this.amap.camera&&this.getMap().setFov(this.amap.camera.fov/(Math.PI/180))}},t}());var f_=12756274*Math.PI/(256*Math.pow(2,20));"undefined"!=typeof console&&console.log("maptalks.amap v0.10.1, requires maptalks@>=0.39.0.");var d_=n("1579"),p_=n.n(d_),m_={name:"GMap",data:function(){return{maps:null,animationId:null,isLoad:!1}},computed:{rkOptions:function(){return Gp.get("RK_MAP_STORE_OPTIONS")}},created:function(){this.handleWindowResize=Object(u.debounce)(this.handleWindowResize,300)},mounted:function(){window.addEventListener("resize",this.handleWindowResize),this.initMap()},methods:{addChartResizeListener:function(){var t=this;p_()({strategy:"scroll",callOnAdd:!0}).listenTo(this.$el,(function(){t.maps&&t.maps.resize()}))},initMap:function(){var t=this,e=window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI;this.maps=new Pp.Map(this.$refs.rkMap,{center:this.rkOptions&&this.rkOptions.center?this.rkOptions.center:[112.549248,37.857014],pitch:0,bearing:0,baseLayer:this.rkOptions&&this.rkOptions.baseLayer?this.rkOptions.baseLayer:new h_(this.rkOptions.aMapKey||"e308e03eaa92516f170fba2c598ce74f",{style:this.rkOptions.aMapStyle||"amap://styles/2fa29a356dbc3a567b473b846fe84ed1",showLable:this.rkOptions.showLabel||!1,id:"global_air_baseLayer",showBuilding:this.rkOptions.showBuilding||!0}),doubleClickZoom:!1,zoom:this.rkOptions.zoom?this.rkOptions.zoom:15,maxPitch:60,minZoom:3,maxZoom:18,zoomAnimation:!0,seamlessZoom:!0,attribution:!1,devicePixelRatio:Math.ceil(e)}),this.maps&&Object.keys(this._events).forEach((function(e){t.maps.on(e,(function(n){t.$emit(e,n)}))})),this.maps.on("baselayerload",(function(){t.isLoad=t.maps.isLoaded();var e=qy(t.maps);t.maps.$iepMap=e,t.$emit("load",{isLoad:t.maps.isLoaded(),instance:t.maps,maptalks:Pp,three:r})}))},handleWindowResize:function(){this.maps&&this.maps.checkSize()}},render:function(){var t=arguments[0],e="rk-map";return t("div",{class:e},[t("div",{class:"".concat(e,"-core"),ref:"rkMap"}),this.isLoad?null:t("div",{class:"".concat(e,"-spin")},[t(Rp)])])}},g_=(n("1671"),function(){function t(e){i(this,t),this.options=e,this.initSvgStatic(e.svgFile),Gp.set("RK_MAP_STORE_OPTIONS",e)}return a(t,[{key:"initSvgStatic",value:function(t){var e=this;(function(t){return new l(t)})().getSvgDict(t).then((function(t){e.saveIndexedDb().then((function(e){var n=e.transaction("svg_dict","readwrite").objectStore("svg_dict");t.map((function(t){n.put({code:t.id,file:t.svg})}))}))}))}},{key:"saveIndexedDb",value:function(){return new Promise((function(t,e){var n=window.indexedDB.open("iep_db");n.onsuccess=function(e){var n=e.target.result;t(n)},n.onerror=function(t){e(t)},n.onupgradeneeded=function(t){var e=t.target.result;if(!e.objectStoreNames.contains("svg_dict")){var n=e.createObjectStore("svg_dict",{keyPath:"code"});n.createIndex("code","code",{unique:!0}),n.createIndex("file","file",{unique:!1})}}}))}},{key:"getDbRecord",value:function(t){var e=this;return new Promise((function(n){e.saveIndexedDb().then((function(e){var r=e.transaction("svg_dict","readwrite").objectStore("svg_dict").get(t);r.onsuccess=function(t){n(t.target.result)},r.onerror=function(t){n()}}))}))}}]),t}()),v_=function(t){t.use(m_)};"undefined"!=typeof window&&window.Vue&&v_(window.Vue),m_.install=function(t){t.component(m_.name,m_)},e.default=function(t){return new g_(t)}},c7e7:function(t,e,n){var r=n("c252"),i=n("41a4"),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},c813:function(t,e,n){var r=n("c814");t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},c814:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},c829:function(t,e,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);e.f=o?function(t){var e=i(this,t);return!!e&&e.enumerable}:r},c8b4:function(t,e,n){"use strict";var r=n("961e"),i=n("ee4f").includes,o=n("9acd");r({target:"Array",proto:!0},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},ca14:function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n("2409"))},cae7:function(t,e,n){"use strict";var r=n("e1ca").forEach;t.exports=function(t){var e=(t=t||{}).reporter,n=t.batchProcessor,i=t.stateHandler.getState,o=(t.stateHandler.hasState,t.idHandler);if(!n)throw new Error("Missing required dependency: batchProcessor");if(!e)throw new Error("Missing required dependency: reporter.");var a=function(){var t=500,e=500,n=document.createElement("div");n.style.cssText=u(["position: absolute","width: 1000px","height: 1000px","visibility: hidden","margin: 0","padding: 0"]);var r=document.createElement("div");r.style.cssText=u(["position: absolute","width: 500px","height: 500px","overflow: scroll","visibility: none","top: -1500px","left: -1500px","visibility: hidden","margin: 0","padding: 0"]),r.appendChild(n),document.body.insertBefore(r,document.body.firstChild);var i=t-r.clientWidth,o=e-r.clientHeight;return document.body.removeChild(r),{width:i,height:o}}(),s="erd_scroll_detection_container";function c(t){!function(t,e,n){if(!t.getElementById(e)){var r=n+"_animation",i=n+"_animation_active",o="/* Created by the element-resize-detector library. */\n";o+="."+n+" > div::-webkit-scrollbar { "+u(["display: none"])+" }\n\n",o+="."+i+" { "+u(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+r,"animation-name: "+r])+" }\n",o+="@-webkit-keyframes "+r+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",function(n,r){r=r||function(e){t.head.appendChild(e)};var i=t.createElement("style");i.innerHTML=n,i.id=e,r(i)}(o+="@keyframes "+r+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}}(t,"erd_scroll_detection_scrollbar_style",s)}function u(e){var n=t.important?" !important; ":"; ";return(e.join(n)+n).trim()}function l(t,n,r){if(t.addEventListener)t.addEventListener(n,r);else{if(!t.attachEvent)return e.error("[scroll] Don't know how to add event listeners.");t.attachEvent("on"+n,r)}}function h(t,n,r){if(t.removeEventListener)t.removeEventListener(n,r);else{if(!t.detachEvent)return e.error("[scroll] Don't know how to remove event listeners.");t.detachEvent("on"+n,r)}}function f(t){return i(t).container.childNodes[0].childNodes[0].childNodes[0]}function d(t){return i(t).container.childNodes[0].childNodes[0].childNodes[1]}return c(window.document),{makeDetectable:function(t,c,h){function p(){if(t.debug){var n=Array.prototype.slice.call(arguments);if(n.unshift(o.get(c),"Scroll: "),e.log.apply)e.log.apply(null,n);else for(var r=0;r<n.length;r++)e.log(n[r])}}function m(t){var e=i(t).container.childNodes[0],n=window.getComputedStyle(e);return!n.width||-1===n.width.indexOf("px")}function g(){var t=window.getComputedStyle(c),e={};return e.position=t.position,e.width=c.offsetWidth,e.height=c.offsetHeight,e.top=t.top,e.right=t.right,e.bottom=t.bottom,e.left=t.left,e.widthCSS=t.width,e.heightCSS=t.height,e}function v(){if(p("storeStyle invoked."),i(c)){var t=g();i(c).style=t}else p("Aborting because element has been uninstalled")}function y(t,e,n){i(t).lastWidth=e,i(t).lastHeight=n}function _(){return 2*a.width+1}function x(){return 2*a.height+1}function b(t){return t+10+_()}function w(t){return t+10+x()}function M(t,e,n){var r=f(t),i=d(t),o=b(e),a=w(n),s=function(t){return 2*t+_()}(e),c=function(t){return 2*t+x()}(n);r.scrollLeft=o,r.scrollTop=a,i.scrollLeft=s,i.scrollTop=c}function S(){var t=i(c).container;if(!t){(t=document.createElement("div")).className=s,t.style.cssText=u(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),i(c).container=t,function(t){t.className+=" "+s+"_animation_active"}(t),c.appendChild(t);var e=function(){i(c).onRendered&&i(c).onRendered()};l(t,"animationstart",e),i(c).onAnimationStart=e}return t}function T(){if(p("Injecting elements"),i(c)){!function(){var n=i(c).style;if("static"===n.position){c.style.setProperty("position","relative",t.important?"important":"");var r=function(t,e,n,r){var i=n[r];"auto"!==i&&"0"!==function(t){return t.replace(/[^-\d\.]/g,"")}(i)&&(t.warn("An element that is positioned static has style."+r+"="+i+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+r+" will be set to 0. Element: ",e),e.style[r]=0)};r(e,c,n,"top"),r(e,c,n,"right"),r(e,c,n,"bottom"),r(e,c,n,"left")}}();var n=i(c).container;n||(n=S());var r=a.width,o=a.height,h=u(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),f=u(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(function(t,e,n,r){return["left: "+(t=t?t+"px":"0"),"top: "+(e=e?e+"px":"0"),"right: "+(r=r?r+"px":"0"),"bottom: "+(n=n?n+"px":"0")]}(-(1+r),-(1+o),-o,-r))),d=u(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),m=u(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),g=u(["position: absolute","left: 0","top: 0"]),v=u(["position: absolute","width: 200%","height: 200%"]),y=document.createElement("div"),_=document.createElement("div"),x=document.createElement("div"),b=document.createElement("div"),w=document.createElement("div"),M=document.createElement("div");y.dir="ltr",y.style.cssText=h,y.className=s,_.className=s,_.style.cssText=f,x.style.cssText=d,b.style.cssText=g,w.style.cssText=m,M.style.cssText=v,x.appendChild(b),w.appendChild(M),_.appendChild(x),_.appendChild(w),y.appendChild(_),n.appendChild(y),l(x,"scroll",T),l(w,"scroll",E),i(c).onExpandScroll=T,i(c).onShrinkScroll=E}else p("Aborting because element has been uninstalled");function T(){i(c).onExpand&&i(c).onExpand()}function E(){i(c).onShrink&&i(c).onShrink()}}function E(){function a(e,n,r){var i=function(t){return f(t).childNodes[0]}(e),o=b(n),a=w(r);i.style.setProperty("width",o+"px",t.important?"important":""),i.style.setProperty("height",a+"px",t.important?"important":"")}function s(r){var s=c.offsetWidth,l=c.offsetHeight,h=s!==i(c).lastWidth||l!==i(c).lastHeight;p("Storing current size",s,l),y(c,s,l),n.add(0,(function(){if(h)if(i(c))if(u()){if(t.debug){var n=c.offsetWidth,r=c.offsetHeight;n===s&&r===l||e.warn(o.get(c),"Scroll: Size changed before updating detector elements.")}a(c,s,l)}else p("Aborting because element container has not been initialized");else p("Aborting because element has been uninstalled")})),n.add(1,(function(){i(c)?u()?M(c,s,l):p("Aborting because element container has not been initialized"):p("Aborting because element has been uninstalled")})),h&&r&&n.add(2,(function(){i(c)?u()?r():p("Aborting because element container has not been initialized"):p("Aborting because element has been uninstalled")}))}function u(){return!!i(c).container}function l(){p("notifyListenersIfNeeded invoked");var t=i(c);return void 0===i(c).lastNotifiedWidth&&t.lastWidth===t.startSize.width&&t.lastHeight===t.startSize.height?p("Not notifying: Size is the same as the start size, and there has been no notification yet."):t.lastWidth===t.lastNotifiedWidth&&t.lastHeight===t.lastNotifiedHeight?p("Not notifying: Size already notified"):(p("Current size not notified, notifying..."),t.lastNotifiedWidth=t.lastWidth,t.lastNotifiedHeight=t.lastHeight,void r(i(c).listeners,(function(t){t(c)})))}function h(){p("Scroll detected."),m(c)?p("Scroll event fired while unrendered. Ignoring..."):s(l)}if(p("registerListenersAndPositionElements invoked."),i(c)){i(c).onRendered=function(){if(p("startanimation triggered."),m(c))p("Ignoring since element is still unrendered...");else{p("Element rendered.");var t=f(c),e=d(c);0!==t.scrollLeft&&0!==t.scrollTop&&0!==e.scrollLeft&&0!==e.scrollTop||(p("Scrollbars out of sync. Updating detector elements..."),s(l))}},i(c).onExpand=h,i(c).onShrink=h;var g=i(c).style;a(c,g.width,g.height)}else p("Aborting because element has been uninstalled")}function C(){if(p("finalizeDomMutation invoked."),i(c)){var t=i(c).style;y(c,t.width,t.height),M(c,t.width,t.height)}else p("Aborting because element has been uninstalled")}function A(){h(c)}function P(){p("Installing..."),i(c).listeners=[],function(){var t=g();i(c).startSize={width:t.width,height:t.height},p("Element start size",i(c).startSize)}(),n.add(0,v),n.add(1,T),n.add(2,E),n.add(3,C),n.add(4,A)}h||(h=c,c=t,t=null),t=t||{},p("Making detectable..."),function(t){return!function(t){var e=t.getRootNode&&t.getRootNode().contains(t);return t===t.ownerDocument.body||t.ownerDocument.body.contains(t)||e}(t)||null===window.getComputedStyle(t)}(c)?(p("Element is detached"),S(),p("Waiting until element is attached..."),i(c).onRendered=function(){p("Element is now attached"),P()}):P()},addListener:function(t,e){if(!i(t).listeners.push)throw new Error("Cannot add listener to an element that is not detectable.");i(t).listeners.push(e)},uninstall:function(t){var e=i(t);e&&(e.onExpandScroll&&h(f(t),"scroll",e.onExpandScroll),e.onShrinkScroll&&h(d(t),"scroll",e.onShrinkScroll),e.onAnimationStart&&h(e.container,"animationstart",e.onAnimationStart),e.container&&t.removeChild(e.container))},initDocument:c}}},cbac:function(t,e){var n=Function.prototype.call;t.exports=n.bind?n.bind(n):function(){return n.apply(n,arguments)}},cbe4:function(t,e,n){t.exports=[n("5eb3"),n("7e14"),n("3ac5"),n("9192"),n("8179"),n("3552")]},cc43:function(t,e,n){var r=n("c252"),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},cce4:function(t,e,n){var r=n("961e"),i=n("6446"),o=n("4b1a"),a=n("097d"),s=n("064b"),c=n("0074");r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),i=s.f,u=o(r),l={},h=0;u.length>h;)void 0!==(n=i(r,e=u[h++]))&&c(l,e,n);return l}})},cdf3:function(t,e,n){"use strict";var r=n("3fa4"),i=n("1262");t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},cf94:function(t,e,n){var r=n("4748");t.exports=/MSIE|Trident/.test(r)},d3a9:function(t,e,n){var r=n("6446"),i=n("6c01"),o=n("7e3c");t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},d3f4:function(t,e,n){t.exports=function(){"use strict";function t(t,r,i,o,a){!function t(n,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,c=r-i+1,u=Math.log(s),l=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*l*(s-l)/s)*(c-s/2<0?-1:1);t(n,r,Math.max(i,Math.floor(r-c*l/s+h)),Math.min(o,Math.floor(r+(s-c)*l/s+h)),a)}var f=n[r],d=i,p=o;for(e(n,i,r),a(n[o],f)>0&&e(n,i,o);d<p;){for(e(n,d,p),d++,p--;a(n[d],f)<0;)d++;for(;a(n[p],f)>0;)p--}0===a(n[i],f)?e(n,i,p):e(n,++p,o),p<=r&&(i=p+1),r<=p&&(o=p-1)}}(t,r,i||0,o||t.length-1,a||n)}function e(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function n(t,e){return t<e?-1:t>e?1:0}var r=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 i(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}function o(t,e){a(t,0,t.children.length,e,t)}function a(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 o=e;o<n;o++){var a=t.children[o];s(i,t.leaf?r(a):a)}return i}function s(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 c(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function l(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function f(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function d(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 m(e,n,r,i,o){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=i)){var s=n+Math.ceil((r-n)/i/2)*i;t(e,s,n,r,o),a.push(n,s,s,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var e=this.data,n=[];if(!d(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],s=e.leaf?r(a):a;d(t,s)&&(e.leaf?n.push(a):f(t,s)?this._all(a,n):i.push(a))}e=i.pop()}return n},r.prototype.collides=function(t){var e=this.data;if(!d(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(d(t,o)){if(e.leaf||f(t,o))return!0;n.push(i)}}e=n.pop()}return!1},r.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},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=p([]),this},r.prototype.remove=function(t,e){if(!t)return this;for(var n,r,o,a=this.data,s=this.toBBox(t),c=[],u=[];a||c.length;){if(a||(a=c.pop(),r=c[c.length-1],n=u.pop(),o=!0),a.leaf){var l=i(t,a.children,e);if(-1!==l)return a.children.splice(l,1),c.push(a),this._condense(c),this}o||a.leaf||!f(a,s)?r?(n++,a=r.children[n],o=!1):a=null:(c.push(a),u.push(n),n=0,r=a,a=a.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,e){return t.minX-e.minX},r.prototype.compareMinY=function(t,e){return t.minY-e.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.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},r.prototype._build=function(t,e,n,r){var i,a=n-e+1,s=this._maxEntries;if(a<=s)return o(i=p(t.slice(e,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(a)/Math.log(s)),s=Math.ceil(a/Math.pow(s,r-1))),(i=p([])).leaf=!1,i.height=r;var c=Math.ceil(a/s),u=c*Math.ceil(Math.sqrt(s));m(t,e,n,u,this.compareMinX);for(var l=e;l<=n;l+=u){var h=Math.min(l+u-1,n);m(t,l,h,c,this.compareMinY);for(var f=l;f<=h;f+=c){var d=Math.min(f+c-1,h);i.children.push(this._build(t,f,d,r-1))}}return o(i,this.toBBox),i},r.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,s=0;s<e.children.length;s++){var c=e.children[s],u=l(c),h=(f=t,d=c,(Math.max(d.maxX,f.maxX)-Math.min(d.minX,f.minX))*(Math.max(d.maxY,f.maxY)-Math.min(d.minY,f.minY))-u);h<o?(o=h,i=u<i?u:i,a=c):h===o&&u<i&&(i=u,a=c)}e=a||e.children[0]}var f,d;return e},r.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,e,i);for(o.children.push(t),s(o,r);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)},r.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var a=this._chooseSplitIndex(n,i,r),s=p(n.children.splice(a,n.children.length-a));s.height=n.height,s.leaf=n.leaf,o(n,this.toBBox),o(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(n,s)},r.prototype._splitRoot=function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,o,s,c,u,h,f=1/0,d=1/0,p=e;p<=n-e;p++){var m=a(t,0,p,this.toBBox),g=a(t,p,n,this.toBBox),v=(i=m,o=g,s=Math.max(i.minX,o.minX),c=Math.max(i.minY,o.minY),u=Math.min(i.maxX,o.maxX),h=Math.min(i.maxY,o.maxY),Math.max(0,u-s)*Math.max(0,h-c)),y=l(m)+l(g);v<f?(f=v,r=p,d=y<d?y:d):v===f&&y<d&&(d=y,r=p)}return r||n-e},r.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:c,i=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,o=a(t,0,e,i),c=a(t,n-e,n,i),u=h(o)+h(c),l=e;l<n-e;l++){var f=t.children[l];s(o,t.leaf?i(f):f),u+=h(o)}for(var d=n-e-1;d>=e;d--){var p=t.children[d];s(c,t.leaf?i(p):p),u+=h(c)}return u},r.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)s(e[r],t)},r.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():o(t[e],this.toBBox)},r}()},d42b:function(t,e,n){var r=n("519f");e.f=r},d45e:function(t,e,n){var r=n("ca14"),i=n("081e"),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t]):r[t]&&r[t][e]}},d582:function(t,e,n){"use strict";var r,i,o,a=n("c814"),s=n("081e"),c=n("a30f"),u=n("f97a"),l=n("7219"),h=n("519f"),f=n("9153"),d=h("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(i=u(u(o)))!==Object.prototype&&(r=i):p=!0),null==r||a((function(){var t={};return r[d].call(t)!==t}))?r={}:f&&(r=c(r)),s(r[d])||l(r,d,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},d796:function(t,e,n){var r=n("ad0f"),i=n("c252"),o=n("96a5"),a=n("41a4"),s=n("28dc"),c=n("433e"),u=i([].push),l=function(t){var e=1==t,n=2==t,i=3==t,l=4==t,h=6==t,f=7==t,d=5==t||h;return function(p,m,g,v){for(var y,_,x=a(p),b=o(x),w=r(m,g),M=s(b),S=0,T=v||c,E=e?T(p,M):n||f?T(p,0):void 0;M>S;S++)if((d||S in b)&&(_=w(y=b[S],S,x),t))if(e)E[S]=_;else if(_)switch(t){case 3:return!0;case 5:return y;case 6:return S;case 2:u(E,y)}else switch(t){case 4:return!1;case 7:u(E,y)}return h?-1:i||l?l:E}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},d7ed:function(t,e,n){var r=n("ca14"),i=n("6d9b"),o=n("82b8"),a=r.TypeError;t.exports=function(t){if(i(t))return t;throw a(o(t)+" is not a constructor")}},d92c:function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},db7f:function(t,e){t.exports={}},dbce:function(t,e,n){var r=n("ca14"),i=n("8e04"),o=n("6d9b"),a=n("9a02"),s=n("519f")("species"),c=r.Array;t.exports=function(t){var e;return i(t)&&(e=t.constructor,(o(e)&&(e===c||i(e.prototype))||a(e)&&null===(e=e[s]))&&(e=void 0)),void 0===e?c:e}},dc61:function(t,e,n){"use strict";var r=n("d796").forEach,i=n("a849")("forEach");t.exports=i?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},dc9b:function(t,e,n){var r=n("b155"),i=n("c015"),o=n("b7f4"),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},ddc4:function(module,exports){"object"!=typeof JSON&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;function f(t){return t<10?"0"+t:t}function this_value(){return this.valueOf()}function quote(t){return rx_escapable.lastIndex=0,rx_escapable.test(t)?'"'+t.replace(rx_escapable,(function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function str(t,e){var n,r,i,o,a,s=gap,c=e[t];switch(c&&"object"==typeof c&&"function"==typeof c.toJSON&&(c=c.toJSON(t)),"function"==typeof rep&&(c=rep.call(e,t,c)),typeof c){case"string":return quote(c);case"number":return isFinite(c)?String(c):"null";case"boolean":case"null":return String(c);case"object":if(!c)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(c)){for(o=c.length,n=0;n<o;n+=1)a[n]=str(n,c)||"null";return i=0===a.length?"[]":gap?"[\n"+gap+a.join(",\n"+gap)+"\n"+s+"]":"["+a.join(",")+"]",gap=s,i}if(rep&&"object"==typeof rep)for(o=rep.length,n=0;n<o;n+=1)"string"==typeof rep[n]&&(i=str(r=rep[n],c))&&a.push(quote(r)+(gap?": ":":")+i);else for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(i=str(r,c))&&a.push(quote(r)+(gap?": ":":")+i);return i=0===a.length?"{}":gap?"{\n"+gap+a.join(",\n"+gap)+"\n"+s+"}":"{"+a.join(",")+"}",gap=s,i}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value),"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(t,e,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;r<n;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=e,e&&"function"!=typeof e&&("object"!=typeof e||"number"!=typeof e.length))throw new Error("JSON.stringify");return str("",{"":t})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){var j;function walk(t,e){var n,r,i=t[e];if(i&&"object"==typeof i)for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(void 0!==(r=walk(i,n))?i[n]=r:delete i[n]);return reviver.call(t,e,i)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,(function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},de5a:function(t,e,n){"use strict";var r=t.exports={};r.isIE=function(t){return!(!function(){var t=navigator.userAgent.toLowerCase();return-1!==t.indexOf("msie")||-1!==t.indexOf("trident")||-1!==t.indexOf(" edge/")}()||t&&t!==function(){var t=3,e=document.createElement("div"),n=e.getElementsByTagName("i");do{e.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e"}while(n[0]);return t>4?t:void 0}())},r.isLegacyOpera=function(){return!!window.opera}},e13b:function(t,e,n){var r,i,o,a=n("79b5"),s=n("ca14"),c=n("c252"),u=n("9a02"),l=n("d3a9"),h=n("c7e7"),f=n("efd9"),d=n("53b8"),p=n("f448"),m="Object already initialized",g=s.TypeError,v=s.WeakMap;if(a||f.state){var y=f.state||(f.state=new v),_=c(y.get),x=c(y.has),b=c(y.set);r=function(t,e){if(x(y,t))throw new g(m);return e.facade=t,b(y,t,e),e},i=function(t){return _(y,t)||{}},o=function(t){return x(y,t)}}else{var w=d("state");p[w]=!0,r=function(t,e){if(h(t,w))throw new g(m);return e.facade=t,l(t,w,e),e},i=function(t){return h(t,w)?t[w]:{}},o=function(t){return h(t,w)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=i(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return n}}}},e186:function(t,e,n){var r=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(r||[]);return o._invoke=function(t,e,n){var r=h;return function(i,o){if(r===f)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===h)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var c=l(t,e,n);if("normal"===c.type){if(r=n.done?d:"suspendedYield",c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=d,n.method="throw",n.arg=c.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h="suspendedStart",f="executing",d="completed",p={};function m(){}function g(){}function v(){}var y={};c(y,o,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(A([])));x&&x!==n&&r.call(x,o)&&(y=x);var b=v.prototype=m.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function M(t,e){function n(i,o,a,s){var c=l(t[i],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(h).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,s)}))}s(c.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function S(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method))return p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var i=l(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,p;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:P}}function P(){return{value:e,done:!0}}return g.prototype=v,c(b,"constructor",v),c(v,"constructor",g),g.displayName=c(v,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(M.prototype),c(M.prototype,a,(function(){return this})),t.AsyncIterator=M,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new M(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),c(b,s,"Generator"),c(b,o,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=A,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},e1ca:function(t,e,n){"use strict";(t.exports={}).forEach=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n]);if(r)return r}}},e280:function(t,e,n){t.exports=function(){return n("ddc4"),{}}},e505:function(t,e,n){"use strict";t.exports=function(t,e){return e||(e={}),"string"!=typeof(t=t&&t.__esModule?t.default:t)?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t)}},e921:function(t,e,n){var r=n("6446"),i=n("6c01"),o=n("97d8"),a=n("097d"),s=n("5c75");t.exports=r?Object.defineProperties:function(t,e){o(t);for(var n,r=a(e),c=s(e),u=c.length,l=0;u>l;)i.f(t,n=c[l++],r[n]);return t}},ea06:function(t,e,n){var r=n("6446"),i=n("c252"),o=n("5c75"),a=n("097d"),s=i(n("c829").f),c=i([].push),u=function(t){return function(e){for(var n,i=a(e),u=o(i),l=u.length,h=0,f=[];l>h;)n=u[h++],r&&!s(i,n)||c(f,t?[n,i[n]]:i[n]);return f}};t.exports={entries:u(!0),values:u(!1)}},ebba:function(t,e,n){var r,i,o,a,s,c,u,l,h=n("ca14"),f=n("ad0f"),d=n("064b").f,p=n("675d").set,m=n("2a67"),g=n("802d"),v=n("716d"),y=n("801d"),_=h.MutationObserver||h.WebKitMutationObserver,x=h.document,b=h.process,w=h.Promise,M=d(h,"queueMicrotask"),S=M&&M.value;S||(r=function(){var t,e;for(y&&(t=b.domain)&&t.exit();i;){e=i.fn,i=i.next;try{e()}catch(t){throw i?a():o=void 0,t}}o=void 0,t&&t.enter()},m||y||v||!_||!x?!g&&w&&w.resolve?((u=w.resolve(void 0)).constructor=w,l=f(u.then,u),a=function(){l(r)}):y?a=function(){b.nextTick(r)}:(p=f(p,h),a=function(){p(r)}):(s=!0,c=x.createTextNode(""),new _(r).observe(c,{characterData:!0}),a=function(){c.data=s=!s})),t.exports=S||function(t){var e={fn:t,next:void 0};o&&(o.next=e),i||(i=e,a()),o=e}},ee4f:function(t,e,n){var r=n("097d"),i=n("a10c"),o=n("28dc"),a=function(t){return function(e,n,a){var s,c=r(e),u=o(c),l=i(a,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},eef6:function(t,e,n){e.nextTick=function(t){var e=Array.prototype.slice.call(arguments);e.shift(),setTimeout((function(){t.apply(null,e)}),0)},e.platform=e.arch=e.execPath=e.title="browser",e.pid=1,e.browser=!0,e.env={},e.argv=[],e.binding=function(t){throw new Error("No such module. (Possibly not yet loaded)")},function(){var t,r="/";e.cwd=function(){return r},e.chdir=function(e){t||(t=n("6266")),r=t.resolve(e,r)}}(),e.exit=e.kill=e.umask=e.dlopen=e.uptime=e.memoryUsage=e.uvCounters=function(){},e.features={}},efd9:function(t,e,n){var r=n("ca14"),i=n("a2c2"),o="__core-js_shared__",a=r[o]||i(o,{});t.exports=a},eff4:function(t,e,n){"use strict";var r=n("61a6"),i=n("cbac"),o=n("c252"),a=n("3b2d"),s=n("c814"),c=n("97d8"),u=n("081e"),l=n("4799"),h=n("f4b1"),f=n("54ab"),d=n("c39c"),p=n("bc8b"),m=n("1ffe"),g=n("fdf1"),v=n("a7fb"),y=n("519f")("replace"),_=Math.max,x=Math.min,b=o([].concat),w=o([].push),M=o("".indexOf),S=o("".slice),T=function(t){return void 0===t?t:String(t)},E="$0"==="a".replace(/./,"$0"),C=!!/./[y]&&""===/./[y]("a","$0");a("replace",(function(t,e,n){var o=C?"$":"$0";return[function(t,n){var r=d(this),o=null==t?void 0:m(t,y);return o?i(o,t,r,n):i(e,f(r),t,n)},function(t,i){var a=c(this),s=f(t);if("string"==typeof i&&-1===M(i,o)&&-1===M(i,"$<")){var d=n(e,a,s,i);if(d.done)return d.value}var m=u(i);m||(i=f(i));var y=a.global;if(y){var E=a.unicode;a.lastIndex=0}for(var C=[];;){var A=v(a,s);if(null===A)break;if(w(C,A),!y)break;""===f(A[0])&&(a.lastIndex=p(s,h(a.lastIndex),E))}for(var P="",L=0,R=0;R<C.length;R++){for(var O=f((A=C[R])[0]),k=_(x(l(A.index),s.length),0),I=[],D=1;D<A.length;D++)w(I,T(A[D]));var j=A.groups;if(m){var z=b([O],I,k,s);void 0!==j&&w(z,j);var N=f(r(i,void 0,z))}else N=g(O,s,k,I,j,i);k>=L&&(P+=S(s,L,k)+N,L=k+O.length)}return P+S(s,L)}]}),!!s((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!E||C)},f0f8:function(t,e,n){var r=n("7219");t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},f18d:function(t,e,n){(e=n("a1a8")(!1)).push([t.i,".rk-map{position:relative;overflow:hidden}.rk-map,.rk-map-spin{width:100%;height:100%}.rk-map-spin{position:absolute;top:0;left:0;right:0;bottom:0;z-index:99}.rk-map-core{width:100%;height:100%}.maptalks-wrapper{transition:all .5s}",""]),t.exports=e},f1d5:function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},f227:function(t,e,n){var r=n("2721")(Object.getPrototypeOf,Object);t.exports=r},f448:function(t,e){t.exports={}},f4b1:function(t,e,n){var r=n("4799"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},f56c:function(t,e,n){"use strict";var r=n("2aa5").charAt,i=n("54ab"),o=n("e13b"),a=n("b45e"),s="String Iterator",c=o.set,u=o.getterFor(s);a(String,"String",(function(t){c(this,{type:s,string:i(t),index:0})}),(function(){var t,e=u(this),n=e.string,i=e.index;return i>=n.length?{value:void 0,done:!0}:(t=r(n,i),e.index+=t.length,{value:t,done:!1})}))},f7eb:function(t,e,n){"use strict";n.r(e),function(t,r){n.d(e,"Util",(function(){return Ht})),n.d(e,"DomUtil",(function(){return an})),n.d(e,"StringUtil",(function(){return Le})),n.d(e,"MapboxUtil",(function(){return Et})),n.d(e,"Map",(function(){return ii})),n.d(e,"ui",(function(){return Zo})),n.d(e,"control",(function(){return na})),n.d(e,"renderer",(function(){return ws})),n.d(e,"symbolizer",(function(){return Br})),n.d(e,"animation",(function(){return vi})),n.d(e,"Browser",(function(){return he})),n.d(e,"Ajax",(function(){return sn})),n.d(e,"Canvas",(function(){return hn})),n.d(e,"Promise",(function(){return _n})),n.d(e,"Class",(function(){return Mn})),n.d(e,"Eventable",(function(){return xn})),n.d(e,"JSONAble",(function(){return Tn})),n.d(e,"Handlerable",(function(){return En})),n.d(e,"Handler",(function(){return wn})),n.d(e,"DragHandler",(function(){return Ln})),n.d(e,"MapTool",(function(){return ro})),n.d(e,"DrawTool",(function(){return oo})),n.d(e,"AreaTool",(function(){return Ao})),n.d(e,"DistanceTool",(function(){return Co})),n.d(e,"SpatialReference",(function(){return Qr})),n.d(e,"INTERNAL_LAYER_PREFIX",(function(){return i})),n.d(e,"GEOMETRY_COLLECTION_TYPES",(function(){return o})),n.d(e,"GEOJSON_TYPES",(function(){return a})),n.d(e,"RESOURCE_PROPERTIES",(function(){return s})),n.d(e,"RESOURCE_SIZE_PROPERTIES",(function(){return c})),n.d(e,"NUMERICAL_PROPERTIES",(function(){return u})),n.d(e,"COLOR_PROPERTIES",(function(){return l})),n.d(e,"DEFAULT_TEXT_SIZE",(function(){return h})),n.d(e,"projection",(function(){return dr})),n.d(e,"measurer",(function(){return ar})),n.d(e,"Coordinate",(function(){return Rn})),n.d(e,"CRS",(function(){return On})),n.d(e,"Extent",(function(){return Wn})),n.d(e,"Point",(function(){return me})),n.d(e,"PointExtent",(function(){return Zn})),n.d(e,"Size",(function(){return ge})),n.d(e,"Transformation",(function(){return qn})),n.d(e,"Layer",(function(){return ei})),n.d(e,"TileLayer",(function(){return Ta})),n.d(e,"GroupTileLayer",(function(){return Ea})),n.d(e,"WMSTileLayer",(function(){return Pa})),n.d(e,"CanvasTileLayer",(function(){return La})),n.d(e,"ImageLayer",(function(){return Ha})),n.d(e,"OverlayLayer",(function(){return Qi})),n.d(e,"VectorLayer",(function(){return eo})),n.d(e,"CanvasLayer",(function(){return qa})),n.d(e,"ParticleLayer",(function(){return Ja})),n.d(e,"TileSystem",(function(){return ra})),n.d(e,"TileConfig",(function(){return oa})),n.d(e,"ArcCurve",(function(){return Bi})),n.d(e,"Circle",(function(){return Di})),n.d(e,"ConnectorLine",(function(){return Xi})),n.d(e,"ArcConnectorLine",(function(){return $i})),n.d(e,"CubicBezierCurve",(function(){return Hi})),n.d(e,"Curve",(function(){return Fi})),n.d(e,"Ellipse",(function(){return ji})),n.d(e,"GeoJSON",(function(){return Ii})),n.d(e,"Geometry",(function(){return Kr})),n.d(e,"GeometryCollection",(function(){return Ei})),n.d(e,"Label",(function(){return qi})),n.d(e,"LineString",(function(){return Ti})),n.d(e,"Marker",(function(){return Mi})),n.d(e,"MultiLineString",(function(){return Ri})),n.d(e,"MultiPoint",(function(){return Pi})),n.d(e,"MultiPolygon",(function(){return Oi})),n.d(e,"Polygon",(function(){return bi})),n.d(e,"QuadBezierCurve",(function(){return Gi})),n.d(e,"Rectangle",(function(){return zi})),n.d(e,"Sector",(function(){return Ni})),n.d(e,"TextBox",(function(){return Zi})),n.d(e,"TextMarker",(function(){return Wi}));
|
|
46
|
+
/*!
|
|
47
|
+
* maptalks v0.49.4
|
|
48
|
+
* LICENSE : BSD-3-Clause
|
|
49
|
+
* (c) 2016-2021 maptalks.org
|
|
50
|
+
*/
|
|
51
|
+
var i="_maptalks__internal_layer_",o=["MultiPoint","MultiLineString","MultiPolygon","GeometryCollection"],a=["FeatureCollection","Feature","Point","LineString","Polygon"].concat(o),s=["markerFile","polygonPatternFile","linePatternFile","markerFillPatternFile","markerLinePatternFile"],c=[["markerWidth","markerHeight"],[],[null,"lineWidth"],[],[null,"markerLineWidth"]],u={lineWidth:1,lineOpacity:1,lineDx:1,lineDy:1,polygonOpacity:1,markerWidth:1,markerHeight:1,markerDx:1,markerDy:1,markerOpacity:1,markerFillOpacity:1,markerLineWidth:1,markerLineOpacity:1,textSize:1,textOpacity:1,textHaloRadius:1,textWrapWidth:1,textLineSpacing:1,textDx:1,textDy:1},l=["lineColor","polygonFill","markerFill","markerLineColor","textFill"],h=14;function f(){return Date.now()}function d(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function p(t){return null==t}function m(t){return"number"==typeof t&&!isNaN(t)}function g(t){return(0|t)===t}function v(t){return"object"==typeof t&&!!t}function y(t){return!p(t)&&("string"==typeof t||null!==t.constructor&&t.constructor===String)}function _(t){return!p(t)&&("function"==typeof t||null!==t.constructor&&t.constructor===Function)}var x=Object.prototype.hasOwnProperty;function b(t,e){return x.call(t,e)}var w=Math.PI/180;function M(t){return t*w}function S(t){return t/w}var T,E,C="[object process]"===Object.prototype.toString.call(void 0!==t?t:0)&&!t.versions.electron&&!t.versions.nw&&!t.versions["node-webkit"];function A(t){var e="data:image/svg+xml";return t.length>4&&".svg"===t.slice(-4)?1:t.slice(0,e.length)===e?2:0}function P(t,e){C&&P.node?P.node(t,e):t.src=e[0]}!function(){if(C)return T=function(t){return setTimeout(t,16)},void(E=clearTimeout);var t,e;function n(t){return setTimeout(t,1e3/30)}function r(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}"undefined"!=typeof window?(t=window.requestAnimationFrame||r("RequestAnimationFrame")||n,e=window.cancelAnimationFrame||r("CancelAnimationFrame")||r("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)}):(t=n,e=clearTimeout),T=function(e){return t(e)},E=function(t){t&&e(t)}}();var L=0;function R(){return L++}var O=R;function k(t){return t&&y(t)?JSON.parse(t):t}function I(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];if(n)for(var r=0,i=n.length;r<i;r++)t.push(n[r])}return t.length}function D(t,e){var n=e.indexOf(t);n>-1&&e.splice(n,1)}function j(t,e,n){if(!Array.isArray(t))return n?e.call(n,t):e(t);for(var r,i,o=[],a=0,s=t.length;a<s;a++)p(r=t[a])?o.push(null):Array.isArray(r)?o.push(j(r,e,n)):(i=n?e.call(n,r):e(r),o.push(i));return o}function z(t,e){return void 0===t?e:t}function N(t){return Math.sign?Math.sign(t):0==(t=+t)||isNaN(t)?Number(t):t>0?1:-1}function F(t){if(Math.log2)return Math.log2(t);var e=Math.log(t)*Math.LOG2E,n=Math.round(e);return Math.abs(n-e)<1e-14?n:e}function B(t,e,n){return t*(1-n)+e*n}function H(t,e,n){if(t===n||t===e)return t;var r=n-e;return((t-e)%r+r)%r+e}function G(t,e,n){return Math.min(n,Math.max(e,t))}function U(t){return Array.isArray(t)&&t.length>0}var V=/^([a-z][a-z\d+\-.]*:)?\/\//i,W=/^url\((['"])(.+)\1\)$/i,Z=/^url\(([^'"].*[^'"])\)$/i;function q(t){return y(t)?Z.test(t)?1:W.test(t)?2:3:0}function Y(t){var e=q(t);return 3===e?t:1===e?Z.exec(t)[1]:2===e?W.exec(t)[2]:t}function J(t){if("undefined"!=typeof window&&window.btoa)return window.btoa(t);for(var e,n,r=String(t),i="",o=0,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.charAt(0|o)||(a="=",o%1);i+=a.charAt(63&e>>8-o%1*8)){if((n=r.charCodeAt(o+=3/4))>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");e=e<<8|n}return i}function X(t,e){for(var n=atob(t),r=new ArrayBuffer(n.length),i=new Uint8Array(r),o=0;o<n.length;o++)i[o]=255&n.charCodeAt(o);return new Blob([r],{type:e})}function $(t,e,n,r){var i=n-t,o=r-e;return Math.atan2(o,i)}var Q="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function K(t,e){if(!t&&!e)return!0;if(!t||!e)return!1;for(var n in t)if("center"===n){if(!e[n]||!tt(t[n][0],e[n][0])||!tt(t[n][1],e[n][1]))return!1}else if(t[n]!==e[n])return!1;return!0}function tt(t,e,n){return null==n&&(n=1e-6),t>=e-n&&t<=e+n}function et(t,e,n,r){t||(t=100),e||(e=4);var i=this;return e*=2,this._flashTimeout&&clearTimeout(this._flashTimeout),this._flashTimeout=setTimeout((function o(){if(0===e)return i.show(),void(n&&(r?n.call(r):n()));e%2==0?i.hide():i.show(),e--,i._flashTimeout=setTimeout(o,t)}),t),this}var nt=["Unknown","Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon","GeometryCollection"];function rt(t){return new Function("f","var p = (f && f.properties || {}); return "+it(t))}function it(t){if(!t)return"true";var e=t[0];return t.length<=1?"any"===e?"false":"true":"("+("=="===e?at(t[1],t[2],"===",!1):"!="===e?at(t[1],t[2],"!==",!1):"<"===e||">"===e||"<="===e||">="===e?at(t[1],t[2],e,!0):"any"===e?st(t.slice(1),"||"):"all"===e?st(t.slice(1),"&&"):"none"===e?lt(st(t.slice(1),"||")):"in"===e?ct(t[1],t.slice(2)):"!in"===e?lt(ct(t[1],t.slice(2))):"has"===e?ut(t[1]):"!has"===e?lt(ut(t[1])):"true")+")"}function ot(t){return"$"===t[0]?"f."+t.substring(1):"p["+JSON.stringify(t)+"]"}function at(t,e,n,r){var i=ot(t),o="$type"===t?nt.indexOf(e):JSON.stringify(e);return(r?"typeof "+i+"=== typeof "+o+"&&":"")+i+n+o}function st(t,e){return t.map(it).join(e)}function ct(t,e){"$type"===t&&(e=e.map((function(t){return nt.indexOf(t)})));var n=JSON.stringify(e.sort(ht)),r=ot(t);return e.length<=200?n+".indexOf("+r+") !== -1":"function(v, a, i, j) {\n while (i <= j) { var m = (i + j) >> 1;\n if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;\n }\n return false; }("+r+", "+n+",0,"+(e.length-1)+")"}function ut(t){return"$id"===t?'"id" in f':JSON.stringify(t)+" in p"}function lt(t){return"!("+t+")"}function ht(t,e){return t<e?-1:t>e?1:0}function ft(t){var e=t._toJSON(),n=e.feature;return n.type=nt.indexOf(n.geometry.type),n.subType=e.subType,n}function dt(t){if(!Array.isArray(t))return dt([t]);for(var e=[],n=0;n<t.length;n++){var r;r=!0===t[n].filter?function(){return!0}:rt(t[n].filter),e.push(pt({},t[n],{filter:r}))}return e}function pt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function mt(t,e){for(var n=0;n<t.stops.length;n++)if(e===t.stops[n][0])return t.stops[n][1];return t.default}function gt(t,e){for(var n=0;n<t.stops.length&&!(e<t.stops[n][0]);n++);return t.stops[Math.max(n-1,0)][1]}function vt(t,e){for(var n=void 0!==t.base?t.base:1,r=0;!(r>=t.stops.length||e<=t.stops[r][0]);)r++;return 0===r?t.stops[r][1]:r===t.stops.length?t.stops[r-1][1]:function t(e,n,r,i,o,a){return"function"==typeof o?function(){var s=o.apply(void 0,arguments),c=a.apply(void 0,arguments);return t(e,n,r,i,s,c)}:o.length?function(t,e,n,r,i,o){for(var a=[],s=0;s<i.length;s++)a[s]=_t(t,e,n,r,i[s],o[s]);return a}(e,n,r,i,o,a):_t(e,n,r,i,o,a)}(e,n,t.stops[r-1][0],t.stops[r][0],t.stops[r-1][1],t.stops[r][1])}function yt(t,e){return function(t,e,n){return void 0!==t?t:void 0!==e?e:void 0!==n?n:null}(e,t.default)}function _t(t,e,n,r,i,o){var a,s=r-n,c=t-n;return i*(1-(a=1===e?c/s:(Math.pow(e,c)-1)/(Math.pow(e,s)-1)))+o*a}function xt(t){return t&&"object"==typeof t&&(t.stops||t.property&&"identity"===t.type)}function bt(t){for(var e in t)if(xt(t[e]))return!0;return!1}function wt(t){return Tt(t,"exponential")}function Mt(t,e){if(!t)return null;var n=!1;if(Array.isArray(t)){for(var r,i=[],o=0;o<t.length;o++)(r=Mt(t[o],e))?(i.push(r),n=!0):i.push(t[o]);return n?i:t}var a,s={__fn_types_loaded:!0},c=[];for(a in t)t.hasOwnProperty(a)&&c.push(a);for(var u=function(t){Object.defineProperty(s,t,{get:function(){return this["__fn_"+t]||(this["__fn_"+t]=wt(this["_"+t])),this["__fn_"+t].apply(this,e())},set:function(e){this["_"+t]=e},configurable:!0,enumerable:!0})},l=0,h=c.length;l<h;l++)xt(t[a=c[l]])?(n=!0,s["_"+a]=t[a],u(a)):s[a]=t[a];return n?s:t}function St(t){if(!t||!t.stops)return[];for(var e=[],n=0,r=t.stops.length;n<r;n++)e.push(t.stops[n][1]);return e}function Tt(t,e){if(!xt(t))return function(){return t};var n=!0,r=!0,i=(t=JSON.parse(JSON.stringify(t))).stops;if(i)for(var o=0;o<i.length;o++)if(xt(i[o][1])){var a=Tt(i[o][1],e);n=n&&a.isZoomConstant,r=r&&a.isFeatureConstant,i[o]=[i[o][0],a]}var s=function t(e,n){var r,i,o;if(xt(e)){var a,s=e.stops&&"object"==typeof e.stops[0][0],c=s||void 0!==e.property,u=s||!c,l=e.type||n||"exponential";if("exponential"===l)a=vt;else if("interval"===l)a=gt;else if("categorical"===l)a=mt;else{if("identity"!==l)throw new Error('Unknown function type "'+l+'"');a=yt}if(s){for(var h={},f=[],d=0;d<e.stops.length;d++){var p=e.stops[d];void 0===h[p[0].zoom]&&(h[p[0].zoom]={zoom:p[0].zoom,type:e.type,property:e.property,default:e.default,stops:[]}),h[p[0].zoom].stops.push([p[0].value,p[1]])}for(var m in h)f.push([h[m].zoom,t(h[m])]);r=function(t,n){var r=vt({stops:f,base:e.base},t)(t,n);return"function"==typeof r?r(t,n):r},i=!1,o=!1}else u?(r=function(t){var n=a(e,t);return"function"==typeof n?n(t):n},i=!0,o=!1):(r=function(t,n){var r=a(e,n?n[e.property]:null);return"function"==typeof r?r(t,n):r},i=!1,o=!0)}else r=function(){return e},i=!0,o=!0;return r.isZoomConstant=o,r.isFeatureConstant=i,r}(t,e);return s.isZoomConstant=n&&s.isZoomConstant,s.isFeatureConstant=r&&s.isFeatureConstant,s}var Et=Object.freeze({createFilter:rt,getFilterFeature:ft,compileStyle:dt,isFunctionDefinition:xt,hasFunctionDefinition:bt,interpolated:wt,piecewiseConstant:function(t){return Tt(t,"interval")},loadFunctionTypes:Mt,getFunctionTypeResources:St});function Ct(t){var e={stroke:{stroke:t.markerLineColor,"stroke-width":t.markerLineWidth,"stroke-opacity":t.markerLineOpacity,"stroke-dasharray":null,"stroke-linecap":"butt","stroke-linejoin":"round"},fill:{fill:t.markerFill,"fill-opacity":t.markerFillOpacity}};return 0===e.stroke["stroke-width"]&&(e.stroke["stroke-opacity"]=0),e}function At(t,e,n){if(!t.markerPath)return null;var r=1,i=Ct(t);m(t.markerOpacity)&&(r=t.markerOpacity),m(t.opacity)&&(r*=t.opacity);var o={};if(i){for(var a in i.stroke)i.stroke.hasOwnProperty(a)&&(p(i.stroke[a])||(o[a]=i.stroke[a]));for(var s in i.fill)i.fill.hasOwnProperty(s)&&(p(i.fill[s])||(o[s]=i.fill[s]))}for(var c,u=Array.isArray(t.markerPath)?t.markerPath:[t.markerPath],l=[],h=0;h<u.length;h++)(c=d({},c=y(u[h])?{path:u[h]}:u[h],o)).d=c.path,delete c.path,l.push(c);var f=['<svg version="1.1"','xmlns="http://www.w3.org/2000/svg"'];r<1&&f.push('opacity="'+r+'"'),t.markerPathWidth&&t.markerPathHeight&&f.push('viewBox="0 0 '+t.markerPathWidth+" "+t.markerPathHeight+'"'),f.push('preserveAspectRatio="none"'),e&&f.push('width="'+e+'"'),n&&f.push('height="'+n+'"'),f.push("><defs></defs>");for(var g=0;g<l.length;g++){var v="<path ";for(var _ in l[g])l[g].hasOwnProperty(_)&&(v+=" "+_+'="'+l[g][_]+'"');v+="></path>",f.push(v)}return f.push("</svg>"),"data:image/svg+xml;base64,"+J(f.join(" "))}function Pt(t,e){if(!t)return[];var n=t;Array.isArray(t)||(n=[t]);for(var r,i,o,a,u=[],l=s,h=n.length-1;h>=0;h--)if(t=n[h]){e&&(t=Lt(t));for(var f=0;f<l.length;f++)if(xt(r=t[l[f]])&&(r=St(r)),r){Array.isArray(r)||(r=[r]);for(var d=0;d<r.length;d++)"url("===r[d].slice(0,4)&&(r[d]=Y(r[d])),i=c[f],u.push([r[d],t[i[0]],t[i[1]]])}if("path"===t.markerType&&t.markerPath)if(o=xt(t.markerWidth)?200:t.markerWidth,a=xt(t.markerHeight)?200:t.markerHeight,xt(t.markerPath)){r=St(t.markerPath);for(var p=t.markerPath,m=0;m<r.length;m++)t.markerPath=r[m],u.push([At(t),o,a]);t.markerPath=p}else u.push([At(t),o,a])}return u}function Lt(t){if(!t)return null;var e=t;if(C)return e;for(var n,r=s,i=0,o=r.length;i<o;i++)(n=e[r[i]])&&(e[r[i]]=Rt(n));return e}function Rt(t){if(xt(t)){for(var e=t.stops,n=0;n<e.length;n++)e[n][1]=Rt(e[n][1]);return t}return"url("===t.slice(0,4)&&(t=Y(t)),t}function Ot(t){return t&&t.colorStops}function kt(t){var e=[t.type];if(t.places&&e.push(t.places.join()),t.colorStops){for(var n=[],r=t.colorStops.length-1;r>=0;r--)n.push(t.colorStops[r].join());e.push(n.join(","))}return e.join("_")}function It(t,e){function n(t,e){p(t.opacity)?t.opacity=e:t.opacity*=e}var r;if(Array.isArray(t)){r=[];for(var i=0;i<t.length;i++){var o=d({},t[i]);n(o,e),r.push(o)}}else n(r=d({},t),e);return r}function Dt(t){var e=Array.prototype.slice.call(arguments,1);if(e&&e.length||(e=[{}]),Array.isArray(t)){for(var n,r,i=[],o=0,a=t.length;o<a;o++){n=t[o],r={};for(var s=0,c=e.length;s<c;s++)Array.isArray(e[s])?p(e[s][o])?d(r,n||{}):d(r,n,e[s][o]):d(r,n,e[s]?e[s]:{});i.push(r)}return i}var u=[{},t];return u.push.apply(u,e),d.apply(this,u)}function jt(t){if(t.symbol&&(t=[t]),Array.isArray(t))return t;var e=t.$root,n=t.$iconset;return t=t.style,(e||n)&&(e&&"/"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n&&"/"===n[n.length-1]&&(n=n.substring(0,n.length-1)),t=zt(t,(function(t){return"{$root}"===t?e:"{$iconset}"===t?n:null}))),t}function zt(t,e){for(var n=0;n<t.length;n++){var r=t[n].symbol;r&&Ft(r,e)}}var Nt=/(\{\$root\}|\{\$iconset\})/g;function Ft(t,e){for(var n in t)t.hasOwnProperty(n)&&"textName"!==n&&(y(t[n])&&t[n].length>2?t[n]=t[n].replace(Nt,e):xt(t[n])?t[n]=Bt(t[n],e):v(t[n])&&Ft(t[n],e))}function Bt(t,e){var n=t.default;y(n)&&(t.default=n.replace(Nt,e));for(var r=t.stops,i=0;i<r.length;i++)Array.isArray(r[i])&&(y(r[i][1])?r[i][1]=r[i][1].replace(Nt,e):xt(r[i][1])&&(r[i][1]=Bt(r[i][1],e)));return t}var Ht=Object.freeze({now:f,extend:d,isNil:p,isNumber:m,isInteger:g,isObject:v,isString:y,isFunction:_,hasOwn:b,join:function(t,e){return t.join?t.join(e||","):Array.prototype.join.call(t,e||",")},isEmpty:function(t){var e;for(e in t)return!1;return!e},toRadian:M,toDegree:S,IS_NODE:C,get requestAnimFrame(){return T},get cancelAnimFrame(){return E},isSVG:A,loadImage:P,UID:R,GUID:O,parseJSON:k,pushIn:I,removeFromArray:D,forEachCoord:j,getValueOrDefault:z,sign:N,log2:F,interpolate:B,wrap:H,clamp:G,isArrayHasData:U,isURL:function(t){return V.test(t)},isCssUrl:q,extractCssUrl:Y,btoa:J,b64toBlob:X,computeDegree:$,emptyImageUrl:Q,equalMapView:K,flash:et,_defaults:function(t,e){for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(e,i);o&&o.configurable&&void 0===t[i]&&Object.defineProperty(t,i,o)}return t},translateToSVGStyles:Ct,getMarkerPathBase64:At,getExternalResources:Pt,convertResourceUrl:Lt,isGradient:Ot,getGradientStamp:kt,getSymbolStamp:function t(e){var n=[];if(Array.isArray(e)){for(var r=0;r<e.length;r++)n.push(t(e[r]));return"[ "+n.join(" , ")+" ]"}for(var i in e)b(e,i)&&(_(e[i])||(Ot(e[i])?n.push(i+"="+kt(e[i])):n.push(i+"="+e[i])));return n.join(";")},lowerSymbolOpacity:It,extendSymbol:Dt,parseStyleRootPath:jt,convertStylePath:zt}),Gt={};if(!C){var Ut=navigator.userAgent.toLowerCase(),Vt=document.documentElement,Wt="ActiveXObject"in window,Zt=-1!==Ut.indexOf("webkit"),qt=-1!==Ut.indexOf("phantom"),Yt=-1!==Ut.search("android [23]"),Jt=-1!==Ut.indexOf("chrome"),Xt=-1!==Ut.indexOf("gecko")&&!Zt&&!window.opera&&!Wt,$t="undefined"!=typeof orientation||-1!==Ut.indexOf("mobile"),Qt=!window.PointerEvent&&window.MSPointerEvent,Kt=window.PointerEvent&&navigator.pointerEnabled||Qt,te=Wt&&"transition"in Vt.style,ee="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Yt,ne="MozPerspective"in Vt.style,re="OTransition"in Vt.style,ie=(te||ee||ne)&&!re&&!qt,oe=0;Jt&&(oe=Ut.match(/chrome\/([\d.]+)/)[1]);var ae,se=!qt&&(Kt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch);try{var ce=document.createElement("canvas"),ue=ce.getContext("webgl")||ce.getContext("experimental-webgl");ae=ue&&ue instanceof WebGLRenderingContext}catch(t){ae=!1}var le=window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI;Gt={ie:Wt,ielt9:Wt&&!document.addEventListener,edge:"msLaunchUri"in navigator&&!("documentMode"in document),webkit:Zt,gecko:Xt,android:-1!==Ut.indexOf("android"),android23:Yt,chrome:Jt,chromeVersion:oe,safari:!Jt&&-1!==Ut.indexOf("safari"),phantomjs:qt,ie3d:te,webkit3d:ee,gecko3d:ne,opera12:re,any3d:ie,mobile:$t,mobileWebkit:$t&&Zt,mobileWebkit3d:$t&&ee,mobileOpera:$t&&window.opera,mobileGecko:$t&&Xt,touch:!!se,msPointer:!!Qt,pointer:!!Kt,retina:le>1,devicePixelRatio:le,language:navigator.browserLanguage?navigator.browserLanguage:navigator.language,ie9:Wt&&9===document.documentMode,ie10:Wt&&10===document.documentMode,webgl:ae}}var he=Gt;function fe(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function de(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var pe=function(){function t(t,e){if(p(t)||p(e)?p(t.x)||p(t.y)?Array.isArray(t)&&(this.x=+t[0],this.y=+t[1]):(this.x=+t.x,this.y=+t.y):(this.x=+t,this.y=+e),this._isNaN())throw new Error("Position is NaN")}var e=t.prototype;return e.set=function(t,e){return this.x=t,this.y=e,this},e.abs=function(){return new this.constructor(Math.abs(this.x),Math.abs(this.y))},e._abs=function(){return this.x=Math.abs(this.x),this.y=Math.abs(this.y),this},e._round=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},e.round=function(){return new this.constructor(Math.round(this.x),Math.round(this.y))},e._ceil=function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},e.ceil=function(){return new this.constructor(Math.ceil(this.x),Math.ceil(this.y))},e.distanceTo=function(t){var e=t.x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},e._floor=function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},e.floor=function(){return new this.constructor(Math.floor(this.x),Math.floor(this.y))},e.copy=function(){return new this.constructor(this.x,this.y)},e._add=function(t,e){return p(t.x)?p(t[0])?(this.x+=t,this.y+=e):(this.x+=t[0],this.y+=t[1]):(this.x+=t.x,this.y+=t.y),this},e.add=function(t,e){var n,r;return p(t.x)?p(t[0])?(n=this.x+t,r=this.y+e):(n=this.x+t[0],r=this.y+t[1]):(n=this.x+t.x,r=this.y+t.y),new this.constructor(n,r)},e._sub=function(t,e){return p(t.x)?p(t[0])?(this.x-=t,this.y-=e):(this.x-=t[0],this.y-=t[1]):(this.x-=t.x,this.y-=t.y),this},e._substract=function(){return this._sub.apply(this,arguments)},e.sub=function(t,e){var n,r;return p(t.x)?p(t[0])?(n=this.x-t,r=this.y-e):(n=this.x-t[0],r=this.y-t[1]):(n=this.x-t.x,r=this.y-t.y),new this.constructor(n,r)},e.substract=function(){return this.sub.apply(this,arguments)},e.multi=function(t){return new this.constructor(this.x*t,this.y*t)},e._multi=function(t){return this.x*=t,this.y*=t,this},e.div=function(t){return this.multi(1/t)},e._div=function(t){return this._multi(1/t)},e.equals=function(t){return t instanceof this.constructor&&this.x===t.x&&this.y===t.y},e._isNaN=function(){return isNaN(this.x)||isNaN(this.y)},e.isZero=function(){return 0===this.x&&0===this.y},e.toArray=function(){return[this.x,this.y]},e.toFixed=function(t){return new this.constructor(this.x.toFixed(t),this.y.toFixed(t))},e.toJSON=function(){return{x:this.x,y:this.y}},t}(),me=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.closeTo=function(t,e){return e||(e=0),this.x>=t.x-e&&this.x<=t.x+e&&this.y>=t.y-e&&this.y<=t.y+e},n.mag=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},n.unit=function(){return this.copy()._unit()},n._unit=function(){return this._div(this.mag()),this},n.perp=function(){return this.copy()._perp()},n._perp=function(){var t=this.y;return this.y=this.x,this.x=-t,this},n.angleWith=function(t){return this.angleWithSep(t.x,t.y)},n.angleWithSep=function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},n._rotate=function(t){var e=Math.cos(t),n=Math.sin(t),r=e*this.x-n*this.y,i=n*this.x+e*this.y;return this.x=r,this.y=i,this},n.rotate=function(t){return this.copy()._rotate(t)},e}(pe),ge=function(){function t(t,e){m(t)&&m(e)?(this.width=t,this.height=e):m(t.width)?(this.width=t.width,this.height=t.height):Array.isArray(t)&&(this.width=t[0],this.height=t[1])}var e=t.prototype;return e.copy=function(){return new t(this.width,this.height)},e.add=function(e,n){var r,i;return e instanceof t?(r=this.width+e.width,i=this.height+e.height):(r=this.width+e,i=this.height+n),new t(r,i)},e.equals=function(t){return this.width===t.width&&this.height===t.height},e.multi=function(e){return new t(this.width*e,this.height*e)},e._multi=function(t){return this.width*=t,this.height*=t,this},e._round=function(){return this.width=Math.round(this.width),this.height=Math.round(this.height),this},e.toPoint=function(){return new me(this.width,this.height)},e.toArray=function(){return[this.width,this.height]},e.toJSON=function(){return{width:this.width,height:this.height}},t}();function ve(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}var ye=/[\b\t\r\v\f]/gim;function _e(t){return y(t)?t.replace(ye,""):t}function xe(t){return ve(t).split(/\s+/)}var be="undefined"!=typeof document?document.createElement("canvas").getContext("2d"):null;function we(t,e){return we.node?we.node(t,e):(be.font=e,be.measureText(t).width)}function Me(t,e,n){var r=we(t,e);return new ge(r,n||h)}function Se(t,e,n,r){if(!t||0===t.length)return[{text:"",width:0}];var i=p(r)?we(t,e):r,o=i/t.length,a=Math.floor(n/o/2);if(o>=n||a<=0)return[{text:"",width:n}];if(i<=n)return[{text:t,width:i}];for(var s=[],c=t.substring(0,a),u=o*a,l=a,h=t.length;l<h;l++){var f=t[l],d=we(c+f);d>=n?(s.push({text:c,width:u}),c=t.substring(l,a+l),l+=a-1,u=o*a):(c+=f,u=d),l>=h-1&&(u=we(c),s.push({text:c,width:u}))}return s}var Te=/\{([\w_]+)\}/g;function Ee(t,e){return y(t)?t.replace(Te,(function(t,n){if(!e)return"";var r=e[n];return p(r)?"":Array.isArray(r)?r.join():r})):t}function Ce(t,e,n){var r=t.width,i=t.height;return new me("left"===e?-r:"right"===e?0:-r/2,"top"===n?-i:"bottom"===n?0:-i/2)}function Ae(t){return t.textFont?t.textFont:(t.textStyle&&"normal"!==t.textStyle?t.textStyle+" ":"")+(t.textWeight&&"normal"!==t.textWeight?t.textWeight+" ":"")+t.textSize+"px "+(t.textFaceName?'"'===t.textFaceName[0]?t.textFaceName:'"'+t.textFaceName+'"':"monospace")}function Pe(t,e){var n=Ae(e),r=e.textLineSpacing||0,i=Me(t,n,e.textSize),o=i.width,a=i.height,s=e.textWrapCharacter,c=[],u=e.textWrapWidth;(!u||u>o)&&(u=o),y(t)||(t+="");var l=0;if(s&&t.indexOf(s)>=0)for(var h=t.split(s),f=0,d=h.length;f<d;f++){var p=h[f],m=we(p,n);if(m>u)for(var g=Se(p,n,u,m),v=0,_=g.length;v<_;v++){var x=g[v].width;x>l&&(l=x),c.push({text:g[v].text,size:new ge(x,a)})}else m>l&&(l=m),c.push({text:p,size:new ge(m,a)})}else if(o>u)for(var b=Se(t,n,u,o),w=0;w<b.length;w++){var M=b[w].width;M>l&&(l=M),c.push({text:b[w].text,size:new ge(M,a)})}else o>l&&(l=o),c.push({text:t,size:i});var S=c.length;return{total:S,size:new ge(l,a*S+r*(S-1)),rows:c,rawSize:i}}var Le=Object.freeze({trim:ve,escapeSpecialChars:_e,splitWords:xe,stringWidth:we,stringLength:Me,getFontHeight:function(t){var e=nn("span");"_default_"!==t&&(e.style.font=t),e.innerHTML="秦";var n=e.clientHeight;return Ne(e),n},splitContent:Se,replaceVariable:Ee,getAlignPoint:Ce,getFont:Ae,splitTextToRow:Pe}),Re=C?function(t){return t[0]}:function(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1},Oe=Re(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),ke=Re(["transformOrigin","WebkitTransformOrigin","OTransformOrigin","MozTransformOrigin","msTransformOrigin"]),Ie=Re(["transition","WebkitTransition","OTransition","MozTransition","msTransition"]),De=Re(["filter","WebkitFilter","OFilter","MozFilter","msFilter"]);function je(t,e){var n=document.createElement(t);return e&&$e(n,e),n}function ze(t,e,n){var r=je(t);return e&&Ye(r,e),n&&n.appendChild(r),r}function Ne(t){if(!t)return this;if(he.ielt9||he.ie9){var e=je("div");e.appendChild(t),e.innerHTML="",e=null}else t.parentNode&&t.parentNode.removeChild(t);return this}function Fe(t,e,n,r){if(!(t&&t.addEventListener&&e&&n))return this;for(var i=function(e){e||(e=window.event),n.call(r||t,e)},o=e.split(" "),a=o.length-1;a>=0;a--){var s=o[a];s&&(t["Z__"+s]||(t["Z__"+s]=[]),He(t,s,n)>=0&&Be(t,s,n),t["Z__"+s].push({callback:i,src:n}),he.ie?t.addEventListener(s,i,!1):t.addEventListener(s,i,{capture:!1,passive:!1}))}return this}function Be(t,e,n){function r(e,n){"mousewheel"===e&&he.gecko&&(e="DOMMouseScroll"),t.removeEventListener(e,n,!1)}if(!t||!t.removeEventListener||!e)return this;for(var i=e.split(" "),o=i.length-1;o>=0;o--){var a=i[o];if(a){if(!n&&t["Z__"+a]){for(var s=t["Z__"+a],c=0,u=s.length;c<u;c++)r(s[c].callback);return delete t["Z__"+a],this}var l=He(t,a,n);if(l<0)return this;r(a,t["Z__"+a][l].callback),t["Z__"+a].splice(l,1)}}return this}function He(t,e,n){if(!t||!t["Z__"+e]||!n)return-1;for(var r=t["Z__"+e],i=0,o=r.length;i<o;i++)if(r[i].src===n)return i;return-1}function Ge(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ue(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,this}function Ve(t){return t.onselectstart=function(){return!1},t.ondragstart=function(){return!1},t.setAttribute("unselectable","on"),this}function We(t,e){return t?(he.any3d?Ke(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px"),e):null}function Ze(t){var e=window.getComputedStyle(t),n=[parseInt(e["padding-left"]),parseInt(e["padding-top"])],r=t.getBoundingClientRect(),i=t.offsetWidth,o=t.offsetHeight,a=i?r.width/i:1,s=o?r.height/o:1;return t.__position=[r.left+n[0],r.top+n[1],a,s],t.__position}function qe(t,e){t||(t=window.event);var n=e.__position;return n||(n=Ze(e)),new me((t.clientX-n[0]-e.clientLeft)/n[2],(t.clientY-n[1]-e.clientTop)/n[3])}function Ye(t,e){var n=t.style.cssText;return function(t,e){var n=t.length-e.length;return n>=0&&t.indexOf(e,n)===n}(n,";")||(n+=";"),t.style.cssText=n+e,this}function Je(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=Qe(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function Xe(t,e){if(void 0===t.classList||Je(t,e)){var n=Qe(t);$e(t,(n?n+" ":"")+e)}else for(var r=xe(e),i=0,o=r.length;i<o;i++)t.classList.add(r[i]);return this}function $e(t,e){return p(t.className.baseVal)?t.className=e:t.className.baseVal=e,this}function Qe(t){return p(t.className.baseVal)?t.className:t.className.baseVal}function Ke(t,e){var n=e||new me(0,0);return t.style[Oe]=he.any3d?"translate3d("+n.x+"px,"+n.y+"px,0px)":"translate("+n.x+"px,"+n.y+"px)",this}function tn(t){return/<[a-z\][\s\S]*>/i.test(t)}function en(t,e){var n=nn(t);y(e)?n.innerHTML=e:n.appendChild(e);var r=new ge(n.clientWidth,n.clientHeight);return Ne(n),r}function nn(t){var e=document.createElement(t);return e.style.cssText="position:absolute;left:-10000px;top:-10000px;",document.body.appendChild(e),e}var rn=Fe,on=Be,an=Object.freeze({TRANSFORM:Oe,TRANSFORMORIGIN:ke,TRANSITION:Ie,CSSFILTER:De,createEl:je,createElOn:ze,removeDomNode:Ne,addDomEvent:Fe,removeDomEvent:Be,listensDomEvent:He,preventDefault:Ge,stopPropagation:Ue,preventSelection:Ve,offsetDom:We,computeDomPosition:Ze,getEventContainerPoint:qe,setStyle:Ye,hasClass:Je,addClass:Xe,setClass:$e,getClass:Qe,setOpacity:function(t,e){return t.style.opacity=e,this},setTransform:Ke,setTransformMatrix:function(t,e){var n="matrix("+(y(e)?e:e.join())+")";return t.style[Oe]!==n&&(t.style[Oe]=n),this},removeTransform:function(t){return t.style[Oe]&&(t.style[Oe]=""),this},isHTML:tn,measureDom:en,getDomRuler:nn,on:rn,off:on}),sn={jsonp:function(t,e){var n="_maptalks_jsonp_"+R();t.match(/\?/)?t+="&callback="+n:t+="?callback="+n;var r=document.createElement("script");return r.type="text/javascript",r.src=t,window[n]=function(t){e(null,t),document.getElementsByTagName("head")[0].removeChild(r),r=null,delete window[n]},document.getElementsByTagName("head")[0].appendChild(r),this},get:function(t,e,n){if(_(e)){var r=n;n=e,e=r}if(C&&sn.get.node)return sn.get.node(t,n,e);var i=sn._getClient(n);if(i.open("GET",t,!0),e){for(var o in e.headers)i.setRequestHeader(o,e.headers[o]);i.withCredentials="include"===e.credentials,e.responseType&&(i.responseType=e.responseType)}return i.send(null),i},post:function(t,e,n){var r;if(y(t)){if(_(e)){var i=n;n=e,e=i}r=(e=e||{}).postData}else{var o=n;r=e,t=(e=t).url,n=o}if(C&&sn.post.node)return e.url=t,sn.post.node(e,r,n);var a=sn._getClient(n);if(a.open("POST",e.url,!0),e.headers||(e.headers={}),e.headers["Content-Type"]||(e.headers["Content-Type"]="application/x-www-form-urlencoded"),"setRequestHeader"in a)for(var s in e.headers)e.headers.hasOwnProperty(s)&&a.setRequestHeader(s,e.headers[s]);return y(r)||(r=JSON.stringify(r)),a.send(r),a},_wrapCallback:function(t,e){return function(){4===t.readyState&&(200===t.status?"arraybuffer"===t.responseType?0===t.response.byteLength?e(new Error("http status 200 returned without content.")):e(null,{data:t.response,cacheControl:t.getResponseHeader("Cache-Control"),expires:t.getResponseHeader("Expires"),contentType:t.getResponseHeader("Content-Type")}):e(null,t.responseText):e(new Error(t.statusText+","+t.status)))}},_getClient:function(t){var e;try{e=new XMLHttpRequest}catch(t){try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}}return e.onreadystatechange=sn._wrapCallback(e,t),e},getArrayBuffer:function(t,e,n){if(_(e)){var r=n;n=e,e=r}return e||(e={}),e.responseType="arraybuffer",sn.get(t,e,n)},getImage:function(t,e,n){return sn.getArrayBuffer(e,n,(function(e,n){if(e)t.onerror&&t.onerror(e);else if(n){var r=window.URL||window.webkitURL,i=t.onload;t.onload=function(){i&&i(),r.revokeObjectURL(t.src)};var o=new Blob([new Uint8Array(n.data)],{type:n.contentType});t.cacheControl=n.cacheControl,t.expires=n.expires,t.src=n.data.byteLength?r.createObjectURL(o):Q}}))},getJSON:function(t,e,n){if(_(e)){var r=n;n=e,e=r}var i=function(t,e){var r=e?k(e):null;n(t,r)};return e&&e.jsonp?sn.jsonp(t,i):sn.get(t,e,i)}},cn=!1,un=null,ln=Math.PI/180,hn={setHitTesting:function(t){cn=t},createCanvas:function(t,e,n){var r;return C?r=new n(t,e):((r=je("canvas")).width=t,r.height=e),r},prepareCanvasFont:function(t,e){t.textBaseline="top",t.font=Ae(e);var n=e.textFill;n||(n="#000"),t.fillStyle=hn.getRgba(n,e.textOpacity)},prepareCanvas:function(t,e,n,r){if(e){var i=e.lineWidth;p(i)||t.lineWidth===i||(t.lineWidth=i);var o=e.linePatternFile,a=e.lineColor||"#000";if(r)t.strokeStyle="#000";else if(o&&n){var s;(e.linePatternDx||e.linePatternDy)&&(s=[e.linePatternDx,e.linePatternDy]),hn._setStrokePattern(t,o,i,s,n),e.lineDasharray=[]}else Ot(a)?e.lineGradientExtent?t.strokeStyle=hn._createGradient(t,a,e.lineGradientExtent):t.strokeStyle="#000":t.strokeStyle=a;e.lineJoin&&(t.lineJoin=e.lineJoin),e.lineCap&&(t.lineCap=e.lineCap),t.setLineDash&&U(e.lineDasharray)&&t.setLineDash(e.lineDasharray);var c=e.polygonPatternFile,u=e.polygonFill||"rgba(255,255,255,0)";if(r)t.fillStyle="#000";else if(c&&n){var l=pn(c),h=n.getImage([l,null,null]);if(h||(h=n.getImage([l+"-texture",null,i])),A(l)&&h instanceof Image&&(he.edge||he.ie)){var f=h.width||20,d=h.height||20,m=hn.createCanvas(f,d);hn.image(m.getContext("2d"),h,0,0,f,d),h=m}h?(t.fillStyle=t.createPattern(h,"repeat"),(e.polygonPatternDx||e.polygonPatternDy)&&(t.fillStyle.polygonPatternOffset=[e.polygonPatternDx,e.polygonPatternDy])):"undefined"!=typeof console&&console.warn("img not found for",l)}else Ot(u)?e.polygonGradientExtent?t.fillStyle=hn._createGradient(t,u,e.polygonGradientExtent):t.fillStyle="rgba(255,255,255,0)":t.fillStyle=u}},_createGradient:function(t,e,n){var r=null,i=e.places,o=n.getMin(),a=n.getMax(),s=n.getWidth(),c=n.getHeight();if(e.type&&"linear"!==e.type){if("radial"===e.type){if(i){if(6!==i.length)throw new Error("A radial gradient's places should have 6 numbers.");i=[o.x+i[0]*s,o.y+i[1]*c,s*i[2],o.x+i[3]*s,o.y+i[4]*c,s*i[5]]}else{var u=n.getCenter()._round();i=[u.x,u.y,Math.abs(u.x-o.x),u.x,u.y,0]}r=t.createRadialGradient.apply(t,i)}}else{if(i){if(4!==i.length)throw new Error("A linear gradient's places should have 4 numbers.");i=[o.x+i[0]*s,o.y+i[1]*c,o.x+i[2]*s,o.y+i[3]*c]}else i=[o.x,o.y,a.x,o.y];r=t.createLinearGradient.apply(t,i)}return e.colorStops.forEach((function(t){r.addColorStop.apply(r,t)})),r},_setStrokePattern:function(t,e,n,r,i){var o,a=pn(e);if(C)o=i.getImage([a,null,n]);else{var s=a+"-texture-"+n;if(!(o=i.getImage(s))){var c=i.getImage([a,null,null]);if(c){var u;u=c.width&&c.height?Math.round(c.width*n/c.height):n;var l=hn.createCanvas(u,n,t.canvas.constructor);hn.image(l.getContext("2d"),c,0,0,u,n),i.addResource([s,null,n],l),o=l}}}o?(t.strokeStyle=t.createPattern(o,"repeat"),t.strokeStyle.linePatternOffset=r):"undefined"!=typeof console&&console.warn("img not found for",a)},clearRect:function(t,e,n,r,i){t.canvas._drawn=!1,t.clearRect(e,n,r,i)},fillCanvas:function(t,e,n,r){if(cn&&(e=1),t.canvas._drawn=!0,0!==e){var i,o=hn._isPattern(t.fillStyle),a=t.fillStyle&&t.fillStyle.polygonPatternOffset,s=a?a[0]:0,c=a?a[1]:0;p(e)&&(e=1),e<1&&(i=t.globalAlpha,t.globalAlpha*=e),o&&(n=n||0,r=r||0,t.translate(n+s,r+c)),t.fill(),o&&t.translate(-n-s,-r-c),e<1&&(t.globalAlpha=i)}},getRgba:function(t,e){return p(e)&&(e=1),"#"!==t[0]?t:(7===t.length?(n=parseInt(t.substring(1,3),16),r=parseInt(t.substring(3,5),16),i=parseInt(t.substring(5,7),16)):(n=17*parseInt(t.substring(1,2),16),r=17*parseInt(t.substring(2,3),16),i=17*parseInt(t.substring(3,4),16)),"rgba("+n+","+r+","+i+","+e+")");var n,r,i},image:function(t,e,n,r,i,o){t.canvas._drawn=!0;try{m(i)&&m(o)?t.drawImage(e,n,r,i,o):t.drawImage(e,n,r)}catch(t){console&&(console.warn("error when drawing image on canvas:",t),console.warn(e))}},text:function(t,e,n,r,i){hn._textOnMultiRow(t,i.rows,r,n,i.size,i.rawSize)},_textOnMultiRow:function(t,e,n,r,i,o){for(var a,s,c=Ce(i,n.textHorizontalAlignment,n.textVerticalAlignment),u=o.height+n.textLineSpacing,l=r.add(0,c.y),h=n.textMaxHeight,f=0,d=0,p=e.length;d<p&&(a=e[d].text,s=Ce(e[d].size,n.textHorizontalAlignment,n.textVerticalAlignment),hn._textOnLine(t,a,l.add(s.x,d*u),n.textHaloRadius,n.textHaloFill,n.textHaloOpacity),!(h>0&&(f+=u,f+o.height>=h)));d++);},_textOnLine:function(t,e,n,r,i,o){cn&&(o=1);var a,s,c=0!==o&&0!==r;t.textBaseline="top";var u=t.shadowBlur,l=t.shadowOffsetX,h=t.shadowOffsetY;if(c){var f=t.globalAlpha;t.globalAlpha*=o,t.miterLimit=2,t.lineJoin="round",t.lineCap="round",t.lineWidth=2*r,t.strokeStyle=i,t.strokeText(e,n.x,n.y+1),t.miterLimit=10,t.globalAlpha=f,a=t.globalCompositeOperation,t.globalCompositeOperation="destination-out",s=t.fillStyle,t.fillStyle="#000"}u&&c&&(t.shadowBlur=t.shadowOffsetX=t.shadowOffsetY=0),hn.fillText(t,e,n),a&&(t.globalCompositeOperation=a,hn.fillText(t,e,n,s),u&&(t.shadowBlur=u,t.shadowOffsetX=l,t.shadowOffsetY=h))},fillText:function(t,e,n,r){t.canvas._drawn=!0,r&&(t.fillStyle=r),t.fillText(e,n.x,n.y+1)},_stroke:function(t,e,n,r){if(cn&&(e=1),t.canvas._drawn=!0,0!==e){var i,o=t.strokeStyle&&t.strokeStyle.linePatternOffset,a=o?o[0]:0,s=o?o[1]:0,c=hn._isPattern(t.strokeStyle)&&(!p(n)&&!p(r)||!p(a)&&!p(s));p(e)&&(e=1),e<1&&(i=t.globalAlpha,t.globalAlpha*=e),c&&(n=n||0,r=r||0,t.translate(n+a,r+s)),t.stroke(),c&&t.translate(-n-a,-r-s),e<1&&(t.globalAlpha=i)}},_path:function(t,e,n,r,i){if(U(e))for(var o,a,s=U(n),c=!0!==i&&hn._isPattern(t.strokeStyle),u=0,l=e.length;u<l;u++)if(o=e[u],!s||t.setLineDash)t.lineTo(o.x,o.y),c&&u>0&&(h(e[u-1],o),t.beginPath(),t.moveTo(o.x,o.y));else if(s){if(u===l-1)break;a=e[u+1],fn(t,o,a,n)}function h(e,n){var i=$(e.x,e.y,n.x,n.y);t.save();var o=Math.cos(i);Math.abs(o)<1e-7?t.translate(e.x-t.lineWidth/2,e.y):t.translate(e.x,e.y-t.lineWidth/2/o),t.rotate(i),hn._stroke(t,r),t.restore()}},path:function(t,e,n,r,i){U(e)&&(t.beginPath(),t.moveTo(e[0].x,e[0].y),hn._path(t,e,i,n),hn._stroke(t,n))},_multiClip:function(t,e){if(e&&0!==e.length)for(var n=0,r=(e=e[0]).length;n<r;n++){var i=e[n],o=i.x,a=i.y;0===n?t.moveTo(o,a):t.lineTo(o,a),n===r-1&&(o=e[0].x,a=e[0].y,t.lineTo(o,a))}},polygon:function(t,e,n,r,i,o){if(t.isMultiClip)hn._multiClip(t,e);else if(U(e)){var a=hn._isPattern(t.strokeStyle),s=U(i)&&!t.setLineDash||a&&!o;U(e[0])||(e=[e]);var c,u,l,h=t;if(e.length>1&&!C&&(un||(un=hn.createCanvas(1,1)),t.canvas._drawn=!1,un.width=t.canvas.width,un.height=t.canvas.height,mn(t=un.getContext("2d"),h)),s){for(t.save(),u=0,l=e.length;u<l;u++)U(e[u])&&(hn._ring(t,e[u],null,0,!0),c=r,u>0&&(t.globalCompositeOperation="destination-out",c=1),hn.fillCanvas(t,c,e[u][0].x,e[u][0].y),u>0?t.globalCompositeOperation="source-over":l>1&&(t.fillStyle="#fff"),hn._stroke(t,0));t.restore()}for(u=0,l=e.length;u<l;u++)U(e[u])&&(o?(hn.paintSmoothLine(t,e[u],n,o,!0),t.closePath()):hn._ring(t,e[u],i,n),s||(c=r,u>0&&(t.globalCompositeOperation="destination-out",c=1),hn.fillCanvas(t,c,e[u][0].x,e[u][0].y),u>0?t.globalCompositeOperation="source-over":l>1&&(t.fillStyle="#fff")),hn._stroke(t,n));e.length>1&&!C&&(h.drawImage(un,0,0),h.canvas._drawn=t.canvas._drawn,mn(h,t))}},_ring:function(t,e,n,r,i){var o=hn._isPattern(t.strokeStyle);i||!o||e[0].equals(e[e.length-1])||(e=e.concat([e[0]])),t.beginPath(),t.moveTo(e[0].x,e[0].y),hn._path(t,e,n,r,i),o||t.closePath()},paintSmoothLine:function(t,e,n,r,i,o,a){if(e)if(e.length<=2||!r)hn.path(t,e,n);else{var s,c=e.length,u=i?c:c-1;t.beginPath(),t.moveTo(e[0].x,e[0].y),void 0!==a&&(u-=Math.max(u-o-1,0));for(var l=0;l<u;l++){var h=e[l].x,f=e[l].y,d=void 0,p=void 0,m=void 0,g=void 0,v=void 0,y=void 0;l-1<0?i?(d=e[u-1].x,p=e[u-1].y):(d=e[l+1].x,p=e[l+1].y):(d=e[l-1].x,p=e[l-1].y),l+1<c?(m=e[l+1].x,g=e[l+1].y):(m=e[l+1-c].x,g=e[l+1-c].y),l+2<c?(v=e[l+2].x,y=e[l+2].y):i?(v=e[l+2-c].x,y=e[l+2-c].y):(v=e[l].x,y=e[l].y);var _=b(d,p,h,f,m,g,v,y,r,l===u-1?a:1);if(l===u-1&&a>=0&&a<1){t.bezierCurveTo(_[0],_[1],_[2],_[3],_[4],_[5]),e.splice(u-1,c-(u-1)-1);var x=new me(_[4],_[5]);x.prevCtrlPoint=new me(_[2],_[3]),e.push(x),c=e.length}else t.bezierCurveTo(_[0],_[1],_[2],_[3],m,g);e[l].nextCtrlPoint=_.slice(0,2),e[l].prevCtrlPoint=s?s.slice(2):null,s=_}!i&&e[1].prevCtrlPoint&&(e[0].nextCtrlPoint=e[1].prevCtrlPoint,delete e[0].prevCtrlPoint),e[c-1].prevCtrlPoint||(e[c-1].prevCtrlPoint=e[c-2].nextCtrlPoint),hn._stroke(t,n)}function b(t,e,n,r,i,o,a,s,c,u){var l=(t+n)/2,h=(e+r)/2,f=(n+i)/2,d=(r+o)/2,p=(i+a)/2,m=(o+s)/2,g=Math.sqrt((n-t)*(n-t)+(r-e)*(r-e)),v=Math.sqrt((i-n)*(i-n)+(o-r)*(o-r)),y=g/(g+v),_=v/(v+Math.sqrt((a-i)*(a-i)+(s-o)*(s-o))),x=l+(f-l)*y,b=h+(d-h)*y,w=f+(p-f)*_,M=d+(m-d)*_,S=x+(f-x)*c+n-x,T=b+(d-b)*c+r-b,E=w+(f-w)*c+i-w,C=M+(d-M)*c+o-M,A=[S,T,E,C];return u<1?function(t,e,n,r,i,o,a,s,c,u){var l=1-t,h=1-e,f=n*h*h+2*i*e*h+a*e*e,d=i*h*h+2*a*e*h+c*e*e,p=r*h*h+2*o*e*h+s*e*e,m=o*h*h+2*s*e*h+u*e*e;return[(n*l*l+2*i*t*l+a*t*t)*h+(i*l*l+2*a*t*l+c*t*t)*e,(r*l*l+2*o*t*l+s*t*t)*h+(o*l*l+2*s*t*l+u*t*t)*e,f*l+d*t,p*l+m*t,f*h+d*e,p*h+m*e]}(0,u,n,r,S,T,E,C,i,o):A}},_arcBetween:function(t,e,n,r){var i=r,o=e.distanceTo(n),a=o/2/Math.sin(i/2),s=Math.asin((n.y-e.y)/o);e.x>n.x&&(s=Math.PI-s);var c=s-(90*ln-i/2),u=Math.cos(c)*a,l=Math.sin(c)*a,h=e.x+u,f=e.y+l,d=Math.asin((n.y-f)/a);h>n.x&&(d=Math.PI-d);var p=d+i;return t.beginPath(),t.arc(h,f,a,d,p),[h,f]},_lineTo:function(t,e){t.lineTo(e.x,e.y)},bezierCurveAndFill:function(t,e,n,r){t.beginPath();var i=e[0];t.moveTo(i.x,i.y);var o=[t];o.push.apply(o,e.splice(1)),hn._bezierCurveTo.apply(hn,o),hn.fillCanvas(t,r),hn._stroke(t,n)},_bezierCurveTo:function(t,e,n,r){t.bezierCurveTo(e.x,e.y,n.x,n.y,r.x,r.y)},ellipse:function(t,e,n,r,i,o,a){t.beginPath(),n===r&&n===i?t.arc(e.x,e.y,n,0,2*Math.PI):t.ellipse?r!==i?(t.ellipse(e.x,e.y,n,r,0,180*ln,360*ln,!1),t.ellipse(e.x,e.y,n,i,0,0,180*ln,!1)):t.ellipse(e.x,e.y,n,r,0,0,360*ln,!1):function(e,n,r,i,o){var a=.5522848,s=r*a,c=i*a,u=o*a;t.moveTo(e-r,n),t.bezierCurveTo(e-r,n-c,e-s,n-i,e,n-i),t.bezierCurveTo(e+s,n-i,e+r,n-c,e+r,n),t.bezierCurveTo(e+r,n+u,e+s,n+o,e,n+o),t.bezierCurveTo(e-s,n+o,e-r,n+u,e-r,n),t.closePath()}(e.x,e.y,n,r,i),hn.fillCanvas(t,a,e.x-n,e.y-r),hn._stroke(t,o,e.x-n,e.y-r)},rectangle:function(t,e,n,r,i){var o=e.x,a=e.y;t.beginPath(),t.rect(o,a,n.width,n.height),hn.fillCanvas(t,i,o,a),hn._stroke(t,r,o,a)},sector:function(t,e,n,r,i,o){var a=ln,s=r[0],c=r[1];!function(t,e,n,r,s,c){var u=a*-c,l=a*-s;t.beginPath(),t.moveTo(e,n),t.arc(e,n,r,u,l),t.lineTo(e,n),hn.fillCanvas(t,o,e-r,n-r),hn._stroke(t,i,e-r,n-r)}(t,e.x,e.y,n,s,c)},_isPattern:function(t){return!y(t)&&!("addColorStop"in t)},drawCross:function(t,e,n,r,i){t.canvas._drawn=!0,t.strokeStyle=i,t.lineWidth=r,t.beginPath(),t.moveTo(e-5,n),t.lineTo(e+5,n),t.moveTo(e,n-5),t.lineTo(e,n+5),t.stroke()},copy:function(t,e){var n=e||je("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").drawImage(t,0,0),n}};function fn(t,e,n,r){var i=e.x,o=e.y,a=n.x,s=n.y,c=r,u=function(t,e){return t<=e},l=function(t,e){return t>=e},h=function(t,e){return Math.min(t,e)},f=function(t,e){return Math.max(t,e)},d={thereYet:l,cap:h},p={thereYet:l,cap:h};o-s>0&&(p.thereYet=u,p.cap=f),i-a>0&&(d.thereYet=u,d.cap=f),t.moveTo(i,o);for(var m,g,v=i,y=o,_=0,x=!0;!d.thereYet(v,a)||!p.thereYet(y,s);)m=Math.atan2(s-o,a-i),g=c[_],v=d.cap(a,v+Math.cos(m)*g),y=p.cap(s,y+Math.sin(m)*g),x?t.lineTo(v,y):t.moveTo(v,y),_=(_+1)%c.length,x=!x}var dn="data:image/";function pn(t){return t.substring(0,dn.length)===dn?t:Y(t)}function mn(t,e){t.filter=e.filter,t.fillStyle=e.fillStyle,t.globalAlpha=e.globalAlpha,t.lineCap=e.lineCap,t.lineDashOffset=e.lineDashOffset,t.lineJoin=e.lineJoin,t.lineWidth=e.lineWidth,t.shadowBlur=e.shadowBlur,t.shadowColor=e.shadowColor,t.shadowOffsetX=e.shadowOffsetX,t.shadowOffsetY=e.shadowOffsetY,t.strokeStyle=e.strokeStyle}var gn="undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:{};function vn(t,e){return t(e={exports:{}},e.exports),e.exports}var yn=vn((function(t){!function(e){function n(t){if(t){var e=this;t((function(t){e.resolve(t)}),(function(t){e.reject(t)}))}}function r(t,e){if("function"==typeof t.y)try{var n=t.y.call(a,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.resolve(e)}function i(t,e){if("function"==typeof t.n)try{var n=t.n.call(a,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.reject(e)}var o,a,s="fulfilled",c="undefined",u=function(){function t(){for(;n.length-r;){try{n[r]()}catch(t){e.console&&e.console.error(t)}n[r++]=a,r==i&&(n.splice(0,i),r=0)}}var n=[],r=0,i=1024,o=function(){if(typeof MutationObserver!==c){var e=document.createElement("div");return new MutationObserver(t).observe(e,{attributes:!0}),function(){e.setAttribute("a",0)}}return typeof setImmediate!==c?function(){setImmediate(t)}:function(){setTimeout(t,0)}}();return function(t){n.push(t),n.length-r==1&&o()}}();n.prototype={resolve:function(t){if(this.state===o){if(t===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var e=this;if(t&&("function"==typeof t||"object"==typeof t))try{var n=!0,i=t.then;if("function"==typeof i)return void i.call(t,(function(t){n&&(n=!1,e.resolve(t))}),(function(t){n&&(n=!1,e.reject(t))}))}catch(t){return void(n&&this.reject(t))}this.state=s,this.v=t,e.c&&u((function(){for(var n=0,i=e.c.length;i>n;n++)r(e.c[n],t)}))}},reject:function(t){if(this.state===o){this.state="rejected",this.v=t;var r=this.c;r?u((function(){for(var e=0,n=r.length;n>e;e++)i(r[e],t)})):!n.suppressUncaughtRejectionError&&e.console&&e.console.log("You upset Zousan. Please catch rejections: ",t,t?t.stack:null)}},then:function(t,e){var a=new n,c={y:t,n:e,p:a};if(this.state===o)this.c?this.c.push(c):this.c=[c];else{var l=this.state,h=this.v;u((function(){l===s?r(c,h):i(c,h)}))}return a},catch:function(t){return this.then(null,t)},finally:function(t){return this.then(t,t)},timeout:function(t,e){e=e||"Timeout";var r=this;return new n((function(n,i){setTimeout((function(){i(Error(e))}),t),r.then((function(t){n(t)}),(function(t){i(t)}))}))}},n.resolve=function(t){var e=new n;return e.resolve(t),e},n.reject=function(t){var e=new n;return e.reject(t),e},n.all=function(t){function e(e,a){e&&"function"==typeof e.then||(e=n.resolve(e)),e.then((function(e){r[a]=e,++i==t.length&&o.resolve(r)}),(function(t){o.reject(t)}))}for(var r=[],i=0,o=new n,a=0;a<t.length;a++)e(t[a],a);return t.length||o.resolve(r),o},t.exports&&(t.exports=n),e.define&&e.define.amd&&e.define([],(function(){return n})),e.Zousan=n,n.soon=u}(gn)})),_n="undefined"!=typeof Promise?Promise:yn,xn=function(t){return function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.on=function(t,e,n){if(!t)return this;if(!y(t))return this._switch("on",t,e);if(!e)return this;this._eventMap||(this._eventMap={});var r,i,o=t.toLowerCase().split(" ");n||(n=this);for(var a=0,s=o.length;a<s;a++){r=o[a],(i=this._eventMap[r])||(i=[],this._eventMap[r]=i);var c=i.length;if(c>0)for(var u=0;u<c;u++)if(e===i[u].handler&&i[u].context===n)return this;i.push({handler:e,context:n})}return this},n.addEventListener=function(){return this.on.apply(this,arguments)},n.once=function(t,e,n){if(!y(t)){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]=this._wrapOnceHandler(i,t[i],n));return this._switch("on",r)}for(var o=t.split(" "),a=0,s=o.length;a<s;a++)this.on(o[a],this._wrapOnceHandler(o[a],e,n));return this},n.off=function(t,e,n){if(!this._eventMap||!t)return this;if(!y(t))return this._switch("off",t,e);if(!e)return this;var r,i,o,a=t.split(" ");n||(n=this);for(var s=0,c=a.length;s<c;s++){if(o="Z__"+(r=a[s].toLowerCase()),!(i=this._eventMap[r]))return this;for(var u=i.length-1;u>=0;u--){var l=i[u];e!==l.handler&&e!==l.handler[o]||l.context!==n||(delete l.handler[o],i.splice(u,1))}i.length||delete this._eventMap[r]}return this},n.removeEventListener=function(){return this.off.apply(this,arguments)},n.listens=function(t,e,n){if(!this._eventMap||!y(t))return 0;var r=this._eventMap[t.toLowerCase()];if(!r||!r.length)return 0;if(!e)return r.length;for(var i=0,o=r.length;i<o;i++)if(e===r[i].handler&&(p(n)||r[i].context===n))return 1;return 0},n.getListeningEvents=function(){return this._eventMap?Object.keys(this._eventMap):[]},n.copyEventListeners=function(t){var e,n=t._eventMap;if(!n)return this;for(var r in n)for(var i=0,o=(e=n[r]).length;i<o;i++)this.on(r,e[i].handler,e[i].context);return this},n.fire=function(){return this._eventParent?this._eventParent.fire.apply(this._eventParent,arguments):this._fire.apply(this,arguments)},n._wrapOnceHandler=function(t,e,n){var r=this,i="Z__"+t,o=!1,a=function s(){o||(delete a[i],o=!0,n?e.apply(n,arguments):e.apply(this,arguments),r.off(t,s,this))};return a[i]=e,a},n._switch=function(t,e,n){for(var r in e)e.hasOwnProperty(r)&&this[t](r,e[r],n);return this},n._clearListeners=function(t){this._eventMap&&y(t)&&this._eventMap[t.toLowerCase()]&&(this._eventMap[t]=null)},n._clearAllListeners=function(){this._eventMap=null},n._setEventParent=function(t){return this._eventParent=t,this},n._setEventTarget=function(t){return this._eventTarget=t,this},n._fire=function(t,e){if(!this._eventMap)return this;var n=this._eventMap[t.toLowerCase()];if(!n)return this;e||(e={}),e.type=t,e.target=this._eventTarget||this;for(var r,i,o=n.slice(0),a=0,s=o.length;a<s;a++)o[a]&&(r=o[a].context,i=d({},e),!1===(r?o[a].handler.call(r,i):o[a].handler(i))&&e.domEvent&&Ue(e.domEvent));return this},e}(t)},bn=function(){function t(t){this.target=t}var e=t.prototype;return e.enable=function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},e.disable=function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},e.enabled=function(){return!!this._enabled},e.remove=function(){this.disable(),delete this.target,delete this.dom},t}(),wn=xn(bn),Mn=function(){function t(t){if(!this||!this.setOptions)throw new Error('Class instance is being created without "new" operator.');this.setOptions(t),this.callInitHooks()}var e=t.prototype;return e.callInitHooks=function(){var t=Object.getPrototypeOf(this);return this._visitInitHooks(t),this},e.setOptions=function(t){if(this.hasOwnProperty("options")||(this.options=this.options?Object.create(this.options):{}),!t)return this;for(var e in t)this.options[e]=t[e];return this},e.config=function(t){if(!t){var e={};for(var n in this.options)this.options.hasOwnProperty(n)&&(e[n]=this.options[n]);return e}if(2===arguments.length){var r={};r[t]=arguments[1],t=r}for(var i in t)this.options[i]=t[i],this[i]&&this[i]instanceof wn&&(t[i]?this[i].enable():this[i].disable());return this.onConfig(t),this},e.onConfig=function(){},e._visitInitHooks=function(t){if(!this._initHooksCalled){var e=Object.getPrototypeOf(t);e._visitInitHooks&&e._visitInitHooks.call(this,e),this._initHooksCalled=!0;var n=t._initHooks;if(n&&n!==e._initHooks)for(var r=0;r<n.length;r++)n[r].call(this)}},t.addInitHook=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i="function"==typeof t?t:function(){this[t].apply(this,n)},o=this.prototype,a=Object.getPrototypeOf(o);return o._initHooks&&o._initHooks!==a._initHooks||(o._initHooks=[]),o._initHooks.push(i),this},t.include=function(){for(var t=0;t<arguments.length;t++)d(this.prototype,t<0||arguments.length<=t?void 0:arguments[t]);return this},t.mergeOptions=function(t){var e=this.prototype,n=Object.getPrototypeOf(e);return e.options&&e.options!==n.options||(e.options=e.options?Object.create(e.options):{}),d(e.options,t),this},t}(),Sn={},Tn=function(t){return function(t){function e(){return t.apply(this,arguments)||this}return fe(e,t),e.registerJSONType=function(t){return t?(Sn[t]=this,this):this},e.getJSONClass=function(t){return t?Sn[t]:null},e.prototype.getJSONType=function(){if(void 0===this._jsonType){var t=Object.getPrototypeOf(this).constructor;for(var e in Sn)if(Sn[e]===t){this._jsonType=e;break}}if(!this._jsonType)throw new Error("Found an unregistered geometry class!");return this._jsonType},e}(t)};function En(t){return function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addHandler=function(t,e){if(!e)return this;if(this._handlers||(this._handlers=[]),this[t])return this[t].enable(),this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},n.removeHandler=function(t){if(!t)return this;var e=this[t];if(e){var n=this._handlers.indexOf(e);n>=0&&this._handlers.splice(n,1),this[t].remove(),delete this[t]}return this},n._clearHandlers=function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].remove();this._handlers=[]},e}(t)}var Cn="touchstart mousedown",An={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},Pn={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Ln=function(t){function e(e,n){var r;return void 0===n&&(n={}),(r=t.call(this,null)||this).dom=e,r.options=n,r}fe(e,t);var n=e.prototype;return n.enable=function(){return this.dom?(this._onMouseDown=function(t){return this.onMouseDown(t)},rn(this.dom,Cn,this._onMouseDown,this),this):this},n.disable=function(){return this.dom?(this._offEvents(),on(this.dom,Cn,this._onMouseDown),delete this._onMouseDown,this):this},n.onMouseDown=function(t){if((this.options.rightclick||2!==t.button)&&!(t.touches&&t.touches.length>1)&&(!this.options.cancelOn||!0!==this.options.cancelOn(t))){var e=this.dom;e.setCapture?e.setCapture():window.captureEvents&&window.captureEvents(window.Event.MOUSEMOVE|window.Event.MOUSEUP),e.ondragstart=function(){return!1},delete this.moved;var n=t.touches?t.touches[0]:t;this.startPos=new me(n.clientX,n.clientY),rn(document,An[t.type],this.onMouseMove,this),rn(document,Pn[t.type],this.onMouseUp,this),this.options.ignoreMouseleave||rn(this.dom,"mouseleave",this.onMouseUp,this),this.fire("mousedown",{domEvent:t,mousePos:new me(n.clientX,n.clientY)})}},n.onMouseMove=function(t){if(t.touches&&t.touches.length>1)this.moved&&(this.interupted=!0,this.onMouseUp(t));else{var e=t.touches?t.touches[0]:t,n=new me(e.clientX,e.clientY).sub(this.startPos);(n.x||n.y)&&(this.moved?this.fire("dragging",{domEvent:t,mousePos:new me(e.clientX,e.clientY)}):(this.fire("dragstart",{domEvent:t,mousePos:this.startPos.copy()}),this.moved=!0))}},n.onMouseUp=function(t){var e=t.changedTouches?t.changedTouches[0]:t;this._offEvents();var n={domEvent:t};m(e.clientX)&&(n.mousePos=new me(parseInt(e.clientX,0),parseInt(e.clientY,0))),this.moved&&(n.interupted=this.interupted,this.fire("dragend",n),delete this.interupted,delete this.moved),this.fire("mouseup",n)},n._offEvents=function(){var t=this.dom;if(on(t,"mouseleave",this.onMouseUp,this),"undefined"!=typeof document&&"undefined"!=typeof window){for(var e in An)on(document,An[e],this.onMouseMove,this),on(document,Pn[e],this.onMouseUp,this);t.releaseCapture?t.releaseCapture():window.captureEvents&&window.captureEvents(window.Event.MOUSEMOVE|window.Event.MOUSEUP)}},e}(wn),Rn=function(t){function e(){return t.apply(this,arguments)||this}return fe(e,t),e.toNumberArrays=function(t){return Array.isArray(t)?j(t,(function(t){return[t.x,t.y]})):[t.x,t.y]},e.toCoordinates=function(t){if(m(t[0])&&m(t[1]))return new e(t);for(var n=[],r=0,i=t.length;r<i;r++){var o=t[r];Array.isArray(o)?m(o[0])?n.push(new e(o)):n.push(e.toCoordinates(o)):n.push(new e(o))}return n},e}(pe),On=function(){function t(t,e){this.type=t,this.properties=e}return t.createProj4=function(e){return new t("proj4",{proj:e})},t.fromProjectionCode=function(e){return e&&t[e=e.toUpperCase().replace(":","")]||null},t}();On.WGS84=On.createProj4("+proj=longlat +datum=WGS84 +no_defs"),On.EPSG4326=On.WGS84,On.EPSG3857=On.createProj4("+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"),On.IDENTITY=On.createProj4("+proj=identity +no_defs"),On.CGCS2000=On.createProj4("+proj=longlat +datum=CGCS2000"),On.EPSG4490=On.CGCS2000,On.BD09LL=On.createProj4("+proj=longlat +datum=BD09"),On.GCJ02=On.createProj4("+proj=longlat +datum=GCJ02");var kn,In=new me(0,0),Dn=new Rn(0,0),jn=new Rn(0,0),zn=new Rn(0,0),Nn=new Rn(0,0),Fn=new Rn(0,0),Bn=new Rn(0,0),Hn=new Rn(0,0),Gn=new Rn(0,0),Un=[],Vn=[],Wn=function(){function t(t,e,n,r){this._clazz=Rn;var i=arguments.length,o=i>0?arguments[i-1]:null;o&&o.unproject&&(this.projection=arguments[i-1]),this._dirty=!0,this._initialize(t,e,n,r)}var e=t.prototype;return e._initialize=function(t,e,n,r){if(this.xmin=null,this.xmax=null,this.ymin=null,this.ymax=null,!p(t)){var i=this.projection;m(t)&&m(e)&&m(n)&&m(r)?i?this.set(t,e,n,r):this.set(Math.min(t,n),Math.min(e,r),Math.max(t,n),Math.max(e,r)):Array.isArray(t)?i?this.set(t[0],t[1],t[2],t[3]):this.set(Math.min(t[0],t[2]),Math.min(t[1],t[3]),Math.max(t[0],t[2]),Math.max(t[1],t[3])):m(t.x)&&m(e.x)&&m(t.y)&&m(e.y)?i?this.set(t.x,t.y,e.x,e.y):(t.x>e.x?(this.xmin=e.x,this.xmax=t.x):(this.xmin=t.x,this.xmax=e.x),t.y>e.y?(this.ymin=e.y,this.ymax=t.y):(this.ymin=t.y,this.ymax=e.y)):m(t.xmin)&&m(t.xmax)&&m(t.ymin)&&m(t.ymax)&&this.set(t.xmin,t.ymin,t.xmax,t.ymax)}},e._add=function(t){return this._dirty=!0,p(t.x)?p(t.xmin)?p(t[0])||(this.xmin+=t[0],this.ymin+=t[1],this.xmax+=t[0],this.ymax+=t[1]):(this.xmin+=t.xmin,this.ymin+=t.ymin,this.xmax+=t.xmax,this.ymax+=t.ymax):(this.xmin+=t.x,this.ymin+=t.y,this.xmax+=t.x,this.ymax+=t.y),this},e.add=function(){var t=new this.constructor(this.xmin,this.ymin,this.xmax,this.ymax,this.projection);return t._add.apply(t,arguments)},e._scale=function(t){return this._dirty=!0,this.xmin*=t,this.ymin*=t,this.xmax*=t,this.ymax*=t,this},e._sub=function(t){return this._dirty=!0,p(t.x)?p(t.xmin)?p(t[0])||(this.xmin-=t[0],this.ymin-=t[1],this.xmax-=t[0],this.ymax-=t[1]):(this.xmin-=t.xmin,this.ymin-=t.ymin,this.xmax-=t.xmax,this.ymax-=t.ymax):(this.xmin-=t.x,this.ymin-=t.y,this.xmax-=t.x,this.ymax-=t.y),this},e._substract=function(){return this._sub.apply(this,arguments)},e.sub=function(){var t=new this.constructor(this.xmin,this.ymin,this.xmax,this.ymax,this.projection);return t._sub.apply(t,arguments)},e.substract=function(){return this.sub.apply(this,arguments)},e.round=function(){return new this.constructor(Math.round(this.xmin),Math.round(this.ymin),Math.round(this.xmax),Math.round(this.ymax),this.projection)},e._round=function(){return this._dirty=!0,this.xmin=Math.round(this.xmin),this.ymin=Math.round(this.ymin),this.xmax=Math.round(this.xmax),this.ymax=Math.round(this.ymax),this},e.getMin=function(t){return t?(t.set(this.xmin,this.ymin),t):new this._clazz(this.xmin,this.ymin)},e.getMax=function(t){return t?(t.set(this.xmax,this.ymax),t):new this._clazz(this.xmax,this.ymax)},e.getCenter=function(t){var e=(this.xmin+this.xmax)/2,n=(this.ymin+this.ymax)/2;return t?(t.set(e,n),t):new this._clazz(e,n)},e.isValid=function(){return!(p(this.xmin)||p(this.ymin)||p(this.xmax)||p(this.ymax))},e.equals=function(t){return this.xmin===t.xmin&&this.xmax===t.xmax&&this.ymin===t.ymin&&this.ymax===t.ymax},e.intersects=function(t){this._project(this),this._project(t);var e=Math.max(this.pxmin,t.pxmin),n=Math.max(this.pymin,t.pymin),r=Math.min(this.pxmax,t.pxmax),i=Math.min(this.pymax,t.pymax);return!(e>r||n>i)},e.within=function(t){return this._project(this),this._project(t),this.pxmin>=t.pxmin&&this.pxmax<=t.pxmax&&this.pymin>=t.pymin&&this.pymax<=t.pymax},e.contains=function(t){if(!t)return!1;this._project(this);var e=this.projection;if(e)if(void 0!==t.x){var n=Dn;Array.isArray(t)?(n.x=t[0],n.y=t[1]):(n.x=t.x,n.y=t.y),t=e.project(n,n)}else void 0!==t.xmin&&this._project(t);return(t.x||t.pxmin||0)>=this.pxmin&&(t.x||t.pxmax||0)<=this.pxmax&&(t.y||t.pymin||0)>=this.pymin&&(t.y||t.pymax||0)<=this.pymax},e.getWidth=function(){return Math.abs(this.xmax-this.xmin)},e.getHeight=function(){return Math.abs(this.ymax-this.ymin)},e.getSize=function(){return new ge(this.getWidth(),this.getHeight())},e.set=function(t,e,n,r){return this.xmin=t,this.ymin=e,this.xmax=n,this.ymax=r,this._dirty=!0,this},e.__combine=function(t){var e,n,r,i;void 0!==t.x&&(kn.xmin=kn.xmax=t.x,kn.ymin=kn.ymax=t.y,t=kn),this._project(t),this._project(this),m(this.pxmin)?(e=Math.min(this.pxmin,t.pxmin),n=Math.min(this.pymin,t.pymin),r=Math.max(this.pxmax,t.pxmax),i=Math.max(this.pymax,t.pymax)):(e=t.pxmin,n=t.pymin,r=t.pxmax,i=t.pymax);var o=this.projection;if(o){jn.set(e,n),zn.set(r,i);var a=o.unproject(jn,jn),s=o.unproject(zn,zn);e=a.x,n=a.y,r=s.x,i=s.y}return Vn[0]=e,Vn[1]=n,Vn[2]=r,Vn[3]=i,Vn},e._combine=function(t){if(!t||t.isValid&&!t.isValid())return this;var e=this.__combine(t);return this.set(e[0],e[1],e[2],e[3]),this._dirty=!0,this},e.combine=function(t){if(!t||t.isValid&&!t.isValid())return this;var e=this.__combine(t);return new this.constructor(e[0],e[1],e[2],e[3],this.projection)},e.intersection=function(t){if(!this.intersects(t))return null;Nn.x=Math.max(this.pxmin,t.pxmin),Nn.y=Math.max(this.pymin,t.pymin),Fn.x=Math.min(this.pxmax,t.pxmax),Fn.y=Math.min(this.pymax,t.pymax);var e=Nn,n=Fn,r=this.projection;return r&&(e=r.unproject(e,e),n=r.unproject(n,n)),new this.constructor(e,n,r)},e.expand=function(t){var e,n;return m(t)?e=n=t:(e=t.width||t.x||t[0]||0,n=t.height||t.y||t[1]||0),new this.constructor(this.xmin-e,this.ymin-n,this.xmax+e,this.ymax+n,this.projection)},e._expand=function(t){var e,n;return m(t)?e=n=t:(e=t.width||t.x||t[0]||0,n=t.height||t.y||t[1]||0),this.xmin-=e,this.ymin-=n,this.xmax+=e,this.ymax+=n,this._dirty=!0,this},e.toJSON=function(){return{xmin:this.xmin,ymin:this.ymin,xmax:this.xmax,ymax:this.ymax}},e.toArray=function(){var t=this.xmin,e=this.ymin,n=this.xmax,r=this.ymax;return[new this._clazz([t,r]),new this._clazz([n,r]),new this._clazz([n,e]),new this._clazz([t,e]),new this._clazz([t,r])]},e.toString=function(){return this.xmin+","+this.ymin+","+this.xmax+","+this.ymax},e.copy=function(){return new this.constructor(this.xmin,this.ymin,this.xmax,this.ymax,this.projection)},e.convertTo=function(t,e){if(!this.isValid())return null;var n,r=e||new this.constructor;return e&&r.set(null,null,null,null),this._clazz===Rn?n=Bn:this._clazz===me&&(n=In),n.x=this.xmin,n.y=this.ymax,r._combine(t(n)),n.x=this.xmax,r._combine(t(n)),n.y=this.ymin,r._combine(t(n)),n.x=this.xmin,r._combine(t(n)),r},e._project=function(t){if(t&&t.isValid()){var e=this.projection;if(e){if(t._dirty){Hn.set(t.xmax,t.ymin),Gn.set(t.xmin,t.ymax),Un[0]=Hn,Un[1]=Gn;var n=e.projectCoords(Un),r=n[0],i=n[1];t.pxmin=Math.min(r.x,i.x),t.pymin=Math.min(r.y,i.y),t.pxmax=Math.max(r.x,i.x),t.pymax=Math.max(r.y,i.y)}delete t._dirty}else t.pxmin=t.xmin,t.pxmax=t.xmax,t.pymin=t.ymin,t.pymax=t.ymax}else t&&(t.pxmin=t.pxmax=t.pymin=t.pymax=null)},t}();kn=new Wn(0,0,0,0);var Zn=function(t){function e(e,n,r,i){var o;return(o=t.call(this,e,n,r,i)||this)._clazz=me,o}return fe(e,t),e}(Wn),qn=function(){function t(t){this.matrix=t}var e=t.prototype;return e.transform=function(t,e,n){var r=this.matrix[0]*(t.x-this.matrix[2])/e,i=-this.matrix[1]*(t.y-this.matrix[3])/e;return n?(n.x=r,n.y=i,n):new me(r,i)},e.untransform=function(t,e,n){var r=t.x*e/this.matrix[0]+this.matrix[2],i=t.y*e/-this.matrix[1]+this.matrix[3];return n?(n.x=r,n.y=i,n):new Rn(r,i)},t}(),Yn={project:function(){},unproject:function(){},projectCoords:function(t){var e=this;if(!t)return[];if(!Array.isArray(t))return this.project(t);if(0===t.length)return[];if(!this.isSphere())return j(t,this.project,this);if(Array.isArray(t[0]))return t.map((function(t){return e.projectCoords(t)}));for(var n,r,i,o,a,s,c=this.getCircum(),u=this.getSphereExtent(),l=u.sx,h=u.sy,f=t[0],d=[this.project(f)],p=1,m=t.length;p<m;p++)o=(i=t[p]).x-f.x,a=i.y-f.y,s=this.project(i),Math.abs(o)>180&&(void 0===n&&(n=i.x>f.x),n&&(s._add(-c.x*N(o)*l,0),i._add(-360*N(o),0))),Math.abs(a)>90&&(void 0===r&&(r=i.y<f.y),r&&(s._add(0,-c.y*N(a)*h),i._add(0,-180*N(a)))),f=i,d.push(s);return d},unprojectCoords:function(t){return t?Array.isArray(t)?j(t,this.unproject,this):this.unproject(t):[]},isSphere:function(){return!!this.sphere},isOutSphere:function(t){return!!this.isSphere()&&!this.getSphereExtent().contains(t)},wrapCoord:function(t){if(!this.isSphere())return t;var e=this.getSphereExtent(),n=new Rn(t);return e.contains(n)||(n.x=H(t.x,e.xmin,e.xmax),n.y=H(t.y,e.ymin,e.ymax)),n},getCircum:function(){if(!this.circum&&this.isSphere()){var t=this.getSphereExtent();this.circum={x:t.getWidth(),y:t.getHeight()}}return this.circum},getSphereExtent:function(){if(!this.extent&&this.isSphere()){var t=this.project(new Rn(180,90)),e=this.project(new Rn(-180,-90));this.extent=new Wn(e,t,this),this.extent.sx=t.x>e.x?1:-1,this.extent.sy=t.y>e.y?1:-1}return this.extent}},Jn={measureLength:function(t,e){if(!Array.isArray(t))return this.measureLenBetween(t,e);for(var n=0,r=0,i=t.length;r<i-1;r++)n+=this.measureLenBetween(t[r],t[r+1]);return n}},Xn=d({measure:"IDENTITY",measureLenBetween:function(t,e){if(!t||!e)return 0;try{return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}catch(t){return 0}},measureArea:function(t){if(!Array.isArray(t))return 0;for(var e=0,n=0,r=t.length;n<r;n++){var i,o=t[n];i=n===r-1?t[0]:t[n+1],e+=o.x*i.y-o.y*i.x}return Math.abs(e/2)},locate:function(t,e,n){return t=new Rn(t.x,t.y),this._locate(t,e,n)},_locate:function(t,e,n){return t?(e||(e=0),n||(n=0),e||n?(t.x=t.x+e,t.y=t.y+n,t):t):null},rotate:function(t,e,n){return t=new Rn(t.x,t.y),this._rotate(t,e,n)},_rotate:function(){var t=new me(0,0);return function(e,n,r){return t.x=e.x-n.x,t.y=e.y-n.y,t._rotate(r*Math.PI/180),e.x=n.x+t.x,e.y=n.y+t.y,e}}()},Jn),$n=function(){function t(t){this.radius=t}var e=t.prototype;return e.measureLenBetween=function(t,e){if(!t||!e)return 0;var n=M(t.y),r=M(e.y),i=n-r,o=M(t.x)-M(e.x);return n=2*Math.asin(Math.sqrt(Math.pow(Math.sin(i/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin(o/2),2))),n*=this.radius,Math.round(1e5*n)/1e5},e.measureArea=function(t){var e,n=M(this.radius),r=0,i=t,o=i.length;if(o<3)return 0;for(e=0;e<o-1;e++){var a=i[e],s=i[e+1];r+=a.x*n*Math.cos(M(a.y))*s.y*n-s.x*n*Math.cos(M(s.y))*a.y*n}return o=i[e],i=i[0],r+=o.x*n*Math.cos(M(o.y))*i.y*n-i.x*n*Math.cos(M(i.y))*o.y*n,.5*Math.abs(r)},e.locate=function(t,e,n){return t=new Rn(t.x,t.y),this._locate(t,e,n)},e._locate=function(t,e,n){if(!t)return null;if(e||(e=0),n||(n=0),!e&&!n)return t;var r,i,o=M(t.y);if(0!==n){var a=Math.abs(n);i=H(180*(o+=2*Math.sin(a/(2*this.radius))*(n>0?1:-1))/Math.PI,-90,90)}else i=t.y;if(0!==e){var s=Math.abs(e),c=M(t.x);r=H(180*(c+=2*Math.sqrt(Math.pow(Math.sin(s/(2*this.radius)),2)/Math.pow(Math.cos(o),2))*(e>0?1:-1))/Math.PI,-180,180)}else r=t.x;return t.x=r,t.y=i,t},e.rotate=function(t,e,n){return t=new Rn(t),this._rotate(t,e,n)},e._rotate=function(t,e,n){var r=function(t,e,n){var r;return void 0===n&&(n={}),(r=n.final?Qn(e,t):Qn(t,e))>180?-(360-r):r}(e,t)-n,i=this.measureLenBetween(e,t);return t.x=e.x,t.y=e.y,function(t,e,n,r){var i=e/r,o=t.x*Math.PI/180,a=M(t.y),s=M(n),c=i*Math.cos(s),u=a+c;Math.abs(u)>Math.PI/2&&(u=u>0?Math.PI-u:-Math.PI-u);var l=Math.log(Math.tan(u/2+Math.PI/4)/Math.tan(a/2+Math.PI/4)),h=Math.abs(l)>1e-11?c/l:Math.cos(a),f=i*Math.sin(s)/h,d=o+f;return t.x=(180*d/Math.PI+540)%360-180,t.y=180*u/Math.PI,t}(t,i,r,this.radius)},t}();function Qn(t,e){var n=M(t.y),r=M(e.y),i=M(e.x-t.x);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var o=Math.log(Math.tan(r/2+Math.PI/4)/Math.tan(n/2+Math.PI/4));return(S(Math.atan2(i,o))+360)%360}var Kn=d({measure:"EPSG:4326",sphere:new $n(6378137),measureLenBetween:function(){return this.sphere.measureLenBetween.apply(this.sphere,arguments)},measureArea:function(){return this.sphere.measureArea.apply(this.sphere,arguments)},_locate:function(){return this.sphere._locate.apply(this.sphere,arguments)},locate:function(){return this.sphere.locate.apply(this.sphere,arguments)},_rotate:function(){return this.sphere._rotate.apply(this.sphere,arguments)},rotate:function(){return this.sphere.rotate.apply(this.sphere,arguments)}},Jn),tr=d({measure:"BAIDU",sphere:new $n(6370996.81),measureLenBetween:function(){return this.sphere.measureLenBetween.apply(this.sphere,arguments)},measureArea:function(){return this.sphere.measureArea.apply(this.sphere,arguments)},_locate:function(){return this.sphere._locate.apply(this.sphere,arguments)},locate:function(){return this.sphere.locate.apply(this.sphere,arguments)},_rotate:function(){return this.sphere._rotate.apply(this.sphere,arguments)},rotate:function(){return this.sphere.rotate.apply(this.sphere,arguments)}},Jn),er=Kn,nr={};function rr(t){nr[t.measure]=t}rr(Xn),rr(Kn),rr(tr);var ir,or={getInstance:function(t){if(!t)return er;for(var e in nr)if(b(nr,e)){var n=nr[e].measure;if(!n)continue;if(t.toLowerCase()===n.toLowerCase())return nr[e]}return null}},ar=Object.freeze({Identity:Xn,DEFAULT:er,Measurer:or,WGS84Sphere:Kn,BaiduSphere:tr}),sr=d({},Yn,{code:"EPSG:3857",rad:Math.PI/180,metersPerDegree:6378137*Math.PI/180,maxLatitude:85.0511287798,project:function(t,e){var n=this.rad,r=this.metersPerDegree,i=this.maxLatitude,o=t.x,a=Math.max(Math.min(i,t.y),-i),s=o*r,c=(0===a?0:Math.log(Math.tan((90+a)*n/2))/n)*r;return e?(e.x=s,e.y=c,e):new Rn(s,c)},unproject:function(t,e){var n,r=this.rad,i=this.metersPerDegree,o=t.x/i,a=t.y;0===a?n=0:(n=a/i,n=(2*Math.atan(Math.exp(n*r))-Math.PI/2)/r),Math.abs(Math.abs(o)-180)<1e-7&&(o=180*N(o)),Math.abs(Math.abs(n)-this.maxLatitude)<1e-7&&(n=N(n)*this.maxLatitude);var s=H(o,-180,180),c=H(n,-this.maxLatitude,this.maxLatitude);return e?(e.x=s,e.y=c,e):new Rn(s,c)}},Kn),cr=d({},Yn,{code:"EPSG:4326",project:function(t,e){return e?(e.x=t.x,e.y=t.y,e):new Rn(t)},unproject:function(t,e){return e?(e.x=t.x,e.y=t.y,e):new Rn(t)}},Kn),ur=d({},cr,{code:"EPSG:4490"}),lr=d({},Yn,{code:"BAIDU",project:function(t,e){return this.convertLL2MC(t,e)},unproject:function(t,e){return this.convertMC2LL(t,e)}},tr,{EARTHRADIUS:6370996.81,MCBAND:[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],LLBAND:[75,60,45,30,15,0],MC2LL:[[1.410526172116255e-8,898305509648872e-20,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-.03801003308653,17337981.2],[-7.435856389565537e-9,8983055097726239e-21,-.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,10260144.86],[-3.030883460898826e-8,898305509983578e-20,.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,.32710905363475,6856817.37],[-1.981981304930552e-8,8983055099779535e-21,.03278182852591,40.31678527705744,.65659298677277,-4.44255534477492,.85341911805263,.12923347998204,-.04625736007561,4482777.06],[3.09191371068437e-9,8983055096812155e-21,6995724062e-14,23.10934304144901,-.00023663490511,-.6321817810242,-.00663494467273,.03430082397953,-.00466043876332,2555164.4],[2.890871144776878e-9,8983055095805407e-21,-3.068298e-8,7.47137025468032,-353937994e-14,-.02145144861037,-1234426596e-14,.00010322952773,-323890364e-14,826088.5]],LL2MC:[[-.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[.0008277824516172526,111320.7020463578,647795574.6671607,-4082003173.641316,10774905663.51142,-15171875531.51559,12053065338.62167,-5124939663.577472,913311935.9512032,67.5],[.00337398766765,111320.7020202162,4481351.045890365,-23393751.19931662,79682215.47186455,-115964993.2797253,97236711.15602145,-43661946.33752821,8477230.501135234,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837.749470245,992013.7397791013,-1221952.21711287,1340652.697009075,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758.690035394,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]],convertMC2LL:function(t,e){for(var n,r=0,i=this.MCBAND.length;r<i;r++)if(Math.abs(t.y)>=this.MCBAND[r]){n=this.MC2LL[r];break}return this.convertor(t,n,e)},convertLL2MC:function(t,e){var n,r,i;t.x=this.getLoop(t.x,-180,180),t.y=this.getRange(t.y,-74,74);var o=new Rn(t.x,t.y);for(r=0,i=this.LLBAND.length;r<i;r++)if(o.y>=this.LLBAND[r]){n=this.LL2MC[r];break}if(!n)for(r=this.LLBAND.length-1;r>=0;r--)if(o.y<=-this.LLBAND[r]){n=this.LL2MC[r];break}return this.convertor(t,n,e)},convertor:function(t,e,n){if(!t||!e)return null;var r=e[0]+e[1]*Math.abs(t.x),i=Math.abs(t.y)/e[9],o=e[2]+e[3]*i+e[4]*i*i+e[5]*i*i*i+e[6]*i*i*i*i+e[7]*i*i*i*i*i+e[8]*i*i*i*i*i*i;return r*=t.x<0?-1:1,o*=t.y<0?-1:1,n?(n.x=r,n.y=o,n):new Rn(r,o)},toRadians:function(t){return Math.PI*t/180},toDegrees:function(t){return 180*t/Math.PI},getRange:function(t,e,n){return null!=e&&(t=Math.max(t,e)),null!=n&&(t=Math.min(t,n)),t},getLoop:function(t,e,n){if(t===1/0)return n;if(t===-1/0)return e;for(;t>n;)t-=n-e;for(;t<e;)t+=n-e;return t}}),hr=d({},Yn,{code:"IDENTITY",project:function(t,e){return e?(e.x=t.x,e.y=t.y,e):t.copy()},unproject:function(t,e){return e?(e.x=t.x,e.y=t.y,e):t.copy()}},Xn),fr=sr,dr=Object.freeze({EPSG3857:sr,DEFAULT:fr,EPSG4326:cr,EPSG4490:ur,BAIDU:lr,IDENTITY:hr,Common:Yn}),pr=function(t){return function(t){function e(){return t.apply(this,arguments)||this}return fe(e,t),e.registerRenderer=function(t,e){var n=this.prototype,r=Object.getPrototypeOf(n);return n._rendererClasses&&n._rendererClasses!==r._rendererClasses||(n._rendererClasses=n._rendererClasses?Object.create(n._rendererClasses):{}),n._rendererClasses[t.toLowerCase()]=e,this},e.getRendererClass=function(t){var e=this.prototype;return e._rendererClasses?e._rendererClasses[t.toLowerCase()]:null},e}(t)},mr=function(t){function e(e){var n;return(n=t.call(this)||this).layer=e,n._painted=!1,n._drawTime=0,n.setToRedraw(),n}fe(e,t);var n=e.prototype;return n.render=function(t){this.prepareRender(),this.getMap()&&this.layer.isVisible()&&(this.resources||(this.resources=new gr),this.checkAndDraw(this._tryToDraw,t))},n.checkAndDraw=function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.checkResources){var o=this.checkResources();o.length>0?(this._loadingResource=!0,this.loadResources(o).then((function(){e._loadingResource=!1,e.layer&&(e.layer.fire("resourceload"),e.setToRedraw())}))):t.call.apply(t,[this].concat(r))}else t.call.apply(t,[this].concat(r))},n.testIfNeedRedraw=function(){var t=this.getMap();return!(this._loadingResource||!this._toRedraw&&(t.isInteracting()&&!this.drawOnInteracting||!this.needToRedraw()))},n.needToRedraw=function(){var t=this.getMap();return!(!t.isInteracting()&&!t.getRenderer().isViewChanged()||!t.getPitch()&&t.isMoving()&&!t.isZooming()&&!t.isRotating()&&!this.layer.options.forceRenderOnMoving)},n.onSkipDrawOnInteracting=function(){},n.isLoadingResource=function(){return this._loadingResource},n.isRenderComplete=function(){return!!this._renderComplete},n.mustRenderOnInteracting=function(){return!this._painted},n.setToRedraw=function(){return this._toRedraw=!0,this},n.setCanvasUpdated=function(){return this._canvasUpdated=!0,this},n.isCanvasUpdated=function(){return!!this._canvasUpdated},n.remove=function(){this.onRemove(),delete this._loadingResource,delete this.southWest,delete this.canvas,delete this.context,delete this.canvasExtent2D,delete this._extent2D,delete this.resources,delete this.layer},n.onRemove=function(){},n.onAdd=function(){},n.getMap=function(){return this.layer?this.layer.getMap():null},n.getCanvasImage=function(){var t=this.getMap();if(this._canvasUpdated=!1,this._renderZoom!==t.getZoom()||!this.canvas||!this._extent2D)return null;if(this.isBlank())return null;if(this.layer.isEmpty&&this.layer.isEmpty())return null;var e=t._pointToContainerPoint(this.southWest)._add(0,-t.height);return{image:this.canvas,layer:this.layer,point:e}},n.clear=function(){this.clearCanvas()},n.isBlank=function(){return!this._painted},n.show=function(){this.setToRedraw()},n.hide=function(){this.clear(),this.setToRedraw()},n.setZIndex=function(){this.setToRedraw()},n.hitDetect=function(t){if(!this.context||this.layer.isEmpty&&this.layer.isEmpty()||this.isBlank()||this._errorThrown)return!1;var e=this.getMap(),n=e.getDevicePixelRatio(),r=e.getSize();if(t.x<0||t.x>r.width*n||t.y<0||t.y>r.height*n)return!1;try{if(this.context.getImageData(n*t.x,n*t.y,1,1).data[3]>0)return!0}catch(t){return this._errorThrown||(console&&console.warn("hit detect failed with tainted canvas, some geometries have external resources in another domain:\n",t),this._errorThrown=!0),!1}return!1},n.loadResources=function(t){this.resources||(this.resources=new gr);var e=this.resources,n=[];if(U(t))for(var r={},i=t.length-1;i>=0;i--){var o=t[i];o&&o.length&&!r[o.join("-")]&&(r[o.join("-")]=1,e.isResourceLoaded(o,!0)||n.push(new _n(this._promiseResource(o))))}return _n.all(n)},n.prepareRender=function(){delete this._renderComplete;var t=this.getMap();this._renderZoom=t.getZoom(),this.canvasExtent2D=this._extent2D=t._get2DExtent(),this.southWest=t._containerPointToPoint(new me(0,t.height))},n.createCanvas=function(){if(!this.canvas){var t=this.getMap(),e=t.getSize(),n=t.getDevicePixelRatio(),r=n*e.width,i=n*e.height;if(this.layer._canvas){var o=this.layer._canvas;o.width=r,o.height=i,o.style&&(o.style.width=e.width+"px",o.style.height=e.height+"px"),this.canvas=this.layer._canvas}else this.canvas=hn.createCanvas(r,i,t.CanvasClass);this.onCanvasCreate()}},n.onCanvasCreate=function(){},n.createContext=function(){if(!(this.gl&&this.gl.canvas===this.canvas||this.context)&&(this.context=this.canvas.getContext("2d"),this.context)){this.layer.options.globalCompositeOperation&&(this.context.globalCompositeOperation=this.layer.options.globalCompositeOperation);var t=this.getMap().getDevicePixelRatio();1!==t&&this.context.scale(t,t)}},n.resetCanvasTransform=function(){if(this.context){var t=this.getMap().getDevicePixelRatio();this.context.setTransform(t,0,0,t,0,0)}},n.resizeCanvas=function(t){var e=this.canvas;if(e){var n=t||this.getMap().getSize(),r=this.getMap().getDevicePixelRatio();e.width===r*n.width&&e.height===r*n.height||(e.height=r*n.height,e.width=r*n.width,1!==r&&this.context&&this.context.scale(r,r),this.layer._canvas&&e.style&&(e.style.width=n.width+"px",e.style.height=n.height+"px"))}},n.clearCanvas=function(){this.context&&hn.clearRect(this.context,0,0,this.canvas.width,this.canvas.height)},n.prepareCanvas=function(){this.canvas?(this.resetCanvasTransform(),this.clearCanvas(),this.resizeCanvas()):(this.createCanvas(),this.createContext(),this.layer.onCanvasCreate(),this.layer.fire("canvascreate",{context:this.context,gl:this.gl})),delete this._maskExtent;var t=this.layer.getMask();if(!t)return this.layer.fire("renderstart",{context:this.context,gl:this.gl}),null;var e=this._maskExtent=t._getMaskPainter().get2DExtent();return e.intersects(this._extent2D),this.layer.fire("renderstart",{context:this.context,gl:this.gl}),e},n.clipCanvas=function(t){var e=this.layer.getMask();if(!e)return!1;var n=this.southWest,r=this.getMap();this.southWest=r._containerPointToPoint(new me(0,r.height)),t.save();var i=r.getDevicePixelRatio();if(1!==i&&(t.save(),t.scale(i,i)),e.getGeometries){t.isMultiClip=!0;var o=e.getGeometries()||[];t.beginPath(),o.forEach((function(e){e._getMaskPainter().paint(null,t)})),t.stroke(),delete t.isMultiClip}else e._getMaskPainter().paint(null,t);return 1!==i&&t.restore(),t.clip(),this.southWest=n,!0},n.getViewExtent=function(){return{extent:this._extent2D,maskExtent:this._maskExtent,zoom:this._renderZoom,southWest:this.southWest}},n.completeRender=function(){this.getMap()&&(this._renderComplete=!0,this.layer.fire("renderend",{context:this.context,gl:this.gl}),this.setCanvasUpdated())},n.getEvents=function(){return{_zoomstart:this.onZoomStart,_zooming:this.onZooming,_zoomend:this.onZoomEnd,_resize:this.onResize,_movestart:this.onMoveStart,_moving:this.onMoving,_moveend:this.onMoveEnd,_dragrotatestart:this.onDragRotateStart,_dragrotating:this.onDragRotating,_dragrotateend:this.onDragRotateEnd,_spatialreferencechange:this.onSpatialReferenceChange}},n.onZoomStart=function(){},n.onZoomEnd=function(){this.setToRedraw()},n.onZooming=function(){},n.onMoveStart=function(){},n.onMoving=function(){},n.onMoveEnd=function(){this.setToRedraw()},n.onResize=function(){delete this._extent2D,this.resizeCanvas(),this.setToRedraw()},n.onDragRotateStart=function(){},n.onDragRotating=function(){},n.onDragRotateEnd=function(){this.setToRedraw()},n.onSpatialReferenceChange=function(){},n.getDrawTime=function(){return this._drawTime},n._tryToDraw=function(t){this._toRedraw=!1,!this.canvas&&this.layer.isEmpty&&this.layer.isEmpty()?this._renderComplete=!0:this._drawAndRecord(t)},n._drawAndRecord=function(t){if(this.getMap()){var e=this._painted;this._painted=!0;var n=f();this.draw(t),n=f()-n,this._drawTime=e?n:n/2,e&&this.layer&&this.layer.options.logDrawTime&&console.log(this.layer.getId(),"frameTimeStamp:",t,"drawTime:",this._drawTime)}},n._promiseResource=function(t){var e=this,n=this.resources,r=this.layer.options.crossOrigin;return function(i){if(n.isResourceLoaded(t,!0))i(t);else{var o=new Image;p(r)||(o.crossOrigin=r),A(t[0])&&!C&&(t[1]&&(t[1]*=2),t[2]&&(t[2]*=2)),o.onload=function(){e._cacheResource(t,o),i(t)},o.onabort=function(e){console&&console.warn("image loading aborted: "+t[0]),e&&console&&console.warn(e),i(t)},o.onerror=function(e){e&&"undefined"!=typeof console&&console.warn(e),n.markErrorResource(t),i(t)},P(o,t)}}},n._cacheResource=function(t,e){if(this.layer&&this.resources){var n=t[1],r=t[2];if(this.layer.options.cacheSvgOnCanvas&&1===A(t[0])&&(he.edge||he.ie)){p(n)&&(n=e.width||this.layer.options.defaultIconSize[0]),p(r)&&(r=e.height||this.layer.options.defaultIconSize[1]);var i=hn.createCanvas(n,r);hn.image(i.getContext("2d"),e,0,0,n,r),e=i}this.resources.addResource(t,e)}},e}(Mn),gr=function(){function t(){this.resources={},this._errors={}}var e=t.prototype;return e.addResource=function(t,e){this.resources[t[0]]={image:e,width:+t[1],height:+t[2]}},e.isResourceLoaded=function(t,e){if(!t)return!1;var n=this._getImgUrl(t);if(this._errors[n])return!0;var r=this.resources[n];return!(!r||e&&A(t[0])&&(+t[1]>r.width||+t[2]>r.height))},e.getImage=function(t){var e=this._getImgUrl(t);return!this.isResourceLoaded(t)||this._errors[e]?null:this.resources[e].image},e.markErrorResource=function(t){this._errors[this._getImgUrl(t)]=1},e.merge=function(t){if(!t)return this;for(var e in t.resources){var n=t.resources[e];this.addResource([e,n.width,n.height],n.image)}return this},e.forEach=function(t){if(!this.resources)return this;for(var e in this.resources)b(this.resources,e)&&t(e,this.resources[e]);return this},e._getImgUrl=function(t){return Array.isArray(t)?t[0]:t},t}();function vr(t,e,n,r){for(var i,o=[],a=0,s=0,c=t.length;s<c-1;s++)(i=yr(t[s],t[s+1],e,s,n,r))&&(o[a]=o[a]||[],o[a].push({point:i[0],index:s}),i[1]===t[s+1]&&s!==c-2||(o[a].push({point:i[1],index:s+1}),a++));return o}function yr(t,e,n,r,i,o){var a,s,c,u=r?ir:br(t,n),l=br(e,n);for(ir=l;;){if(!(u|l))return[t,e];if(u&l)return!1;if(o)return[t,e];c=br(s=xr(t,e,a=u||l,n,i),n),a===u?(t=s,u=c):(e=s,l=c)}}function _r(t,e,n){var r,i,o,a,s,c,u,l,h,f=[1,4,2,8];for(i=0,u=t.length;i<u;i++)t[i]._code=br(t[i],e);for(a=0;a<4;a++){for(l=f[a],r=[],i=0,o=(u=t.length)-1;i<u;o=i++)s=t[i],c=t[o],s._code&l?c._code&l||((h=xr(c,s,l,e,n))._code=br(h,e),r.push(h)):(c._code&l&&((h=xr(c,s,l,e,n))._code=br(h,e),r.push(h)),r.push(s));t=r}return t}function xr(t,e,n,r,i){var o,a,s=e.x-t.x,c=e.y-t.y,u=r.getMin(),l=r.getMax();8&n?(o=t.x+s*(l.y-t.y)/c,a=l.y):4&n?(o=t.x+s*(u.y-t.y)/c,a=u.y):2&n?(o=l.x,a=t.y+c*(l.x-t.x)/s):1&n&&(o=u.x,a=t.y+c*(u.x-t.x)/s);var h=new me(o,a);return i&&h._round(),h}function br(t,e){var n=0;return t.x<e.getMin().x?n|=1:t.x>e.getMax().x&&(n|=2),t.y<e.getMin().y?n|=4:t.y>e.getMax().y&&(n|=8),n}function wr(t,e,n,r){t=new me(t);var i,o,a,s=Math.abs(n.x-e.x),c=Math.abs(n.y-e.y),u=Math.sqrt(Math.abs(s*s-c*c));return s>=c?(i=new me(e.x-u,e.y),o=new me(e.x+u,e.y),a=2*s):(i=new me(e.x,e.y-u),o=new me(e.x,e.y+u),a=2*c),t.distanceTo(i)+t.distanceTo(o)<=a+2*r}var Mr=function(){function t(){}var e=t.prototype;return e.getMap=function(){return this.geometry.getMap()},e.getPainter=function(){return this.painter},e.isDynamicSize=function(){return!1},t.testColor=function(t){return!(!t||!y(t))&&l.indexOf(t)>=0},t}(),Sr=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n._prepareContext=function(t){m(this.symbol.opacity)?t.globalAlpha!==this.symbol.opacity&&(t.globalAlpha=this.symbol.opacity):1!==t.globalAlpha&&(t.globalAlpha=1)},n.prepareCanvas=function(t,e,n){hn.prepareCanvas(t,e,n,this.getPainter().isHitTesting())},n.remove=function(){},n.setZIndex=function(){},n.show=function(){},n.hide=function(){},n._defineStyle=function(t){return function(){var e=this,n=[],r={};return Mt(t,(function(){var t=e.getMap();return function(t,e,n){return t[0]=e,t[1]=n,t}(n,t.getZoom(),d({},e.geometry.getProperties(),function(t,e,n,r){return t["{bearing}"]=e,t["{pitch}"]=n,t["{zoom}"]=r,t}(r,t.getBearing(),t.getPitch(),t.getZoom())))}))}.bind(this)()},e}(Mr),Tr=new me(0,0),Er=new me(0,0),Cr=function(t){function e(e,n,r){var i;return(i=t.call(this)||this).symbol=e,i.geometry=n,i.painter=r,i}fe(e,t);var n=e.prototype;return n.get2DExtent=function(){for(var t=this.getMap(),e=t.getGLZoom(),n=new Zn,r=this._getRenderPoints()[0],i=r.length-1;i>=0;i--)r[i]&&n._combine(t._pointToPoint(r[i],e));return n},n.isDynamicSize=function(){var t=this.symbol;return xt(t.markerWidth)||xt(t.markerHeight)||xt(t.textSize)},n._rotateExtent=function(t,e){return t.convertTo((function(t){return t._rotate(e)}))},n._getRenderPoints=function(){var t=this.getPainter().isSpriting()?"center":this.getPlacement();return this.getPainter().getRenderPoints(t)},n._getRenderContainerPoints=function(t){var e=this.getPainter(),n=this._getRenderPoints()[0];if(e.isSpriting())return n;var r=this.getDxDy(),i=this.painter._pointContainerPoints(n,r.x,r.y,t,!0,this.getPlacement());if(!i||!Array.isArray(i[0]))return i;for(var o=[],a=0,s=i.length;a<s;a++)for(var c=0,u=i[a].length;c<u;c++)o.push(i[a][c]);return o},n._getRotationAt=function(t){var e=this.getRotation();e||(e=0);var n=this._getRenderPoints()[1];if(!n||!n[t])return e;var r=this.getMap(),i=n[t][0],o=n[t][1];if(r.isTransforming()){var a=r.getGLZoom();return i=r._pointToContainerPoint(n[t][0],a,0,Tr),o=r._pointToContainerPoint(n[t][1],a,0,Er),e+$(i.x,i.y,o.x,o.y)}return e+-$(i.x,i.y,o.x,o.y)},n._rotate=function(t,e,n){if(n){var r=this.getDxDy(),i=e.sub(r);return t.save(),t.translate(i.x,i.y),t.rotate(n),this.getDxDy()}return null},e}(Sr),Ar=function(t){function e(n,r,i){var o;(o=t.call(this,n,r,i)||this)._dynamic=bt(n),o.style=o._defineStyle(o.translate()),o.strokeAndFill=o._defineStyle(e.translateLineAndFill(o.style));var a=o.strokeAndFill.lineWidth;return o.padding=a%2==0?2:1.5,o}fe(e,t),e.test=function(t){return!!t&&!(!p(t.markerFile)||p(t.markerType)||"path"===t.markerType)};var n=e.prototype;return n.symbolize=function(t,e){var n=this.style;if(this.painter.isHitTesting()||0!==n.markerWidth&&0!==n.markerHeight&&(0!==n.polygonOpacity||0!==n.lineOpacity)){var r=this._getRenderContainerPoints();U(r)&&(this._prepareContext(t),this.getPainter().isSpriting()||this.geometry.getLayer().getMask()===this.geometry||this._dynamic||!1===this.geometry.getLayer().options.cacheVectorOnCanvas?this._drawMarkers(t,r,e):this._drawMarkersWithCache(t,r,e))}},n.getDxDy=function(){var t=this.style,e=t.markerDx,n=t.markerDy;return new me(e,n)},n._drawMarkers=function(t,e,n){var r=this.strokeAndFill;Ot(r.lineColor)||Ot(r.polygonFill)||this.prepareCanvas(t,r,n);for(var i=e.length-1;i>=0;i--){var o=e[i],a=this._rotate(t,o,this._getRotationAt(i));a&&(o=a),this._drawVectorMarker(t,o,n),a&&t.restore()}},n._drawMarkersWithCache=function(t,e,n){var r=this._stampSymbol(),i=n.getImage(r);i||(i=this._createMarkerImage(t,n),n.addResource([r,i.width,i.height],i));for(var o=this._getAnchor(i.width,i.height),a=e.length-1;a>=0;a--){var s=e[a],c=this._rotate(t,s,this._getRotationAt(a));c&&(s=c),hn.image(t,i,s.x+o.x,s.y+o.y),c&&t.restore()}},n._calMarkerSize=function(){if(!this._size){var t=this.strokeAndFill.lineWidth,e=2*(this.symbol.shadowBlur||0),n=Math.round(this.style.markerWidth+t+2*e+2*this.padding),r=Math.round(this.style.markerHeight+t+2*e+2*this.padding);if(xt(this.symbol.markerWidth)||xt(this.symbol.markerHeight))return[n,r];this._size=[n,r]}return this._size},n._createMarkerImage=function(t,e){var n=t.canvas.constructor,r=this._calMarkerSize(),i=hn.createCanvas(r[0],r[1],n),o=this._getCacheImageAnchor(r[0],r[1]),a=i.getContext("2d");return Ot(this.strokeAndFill.lineColor)||Ot(this.strokeAndFill.polygonFill)||this.prepareCanvas(a,this.strokeAndFill,e),this._drawVectorMarker(a,o,e),i},n._stampSymbol=function(){return this._stamp||(this._stamp=[this.style.markerType,Ot(this.style.markerFill)?kt(this.style.markerFill):this.style.markerFill,this.style.markerFillOpacity,this.style.markerFillPatternFile,Ot(this.style.markerLineColor)?kt(this.style.markerLineColor):this.style.markerLineColor,this.style.markerLineWidth,this.style.markerLineOpacity,this.style.markerLineDasharray?this.style.markerLineDasharray.join(","):"",this.style.markerLinePatternFile,this.style.markerWidth,this.style.markerHeight,this.style.markerHorizontalAlignment,this.style.markerVerticalAlignment].join("_")),this._stamp},n._getAnchor=function(t,e){var n=2*(this.symbol.shadowBlur||0)+this.padding,r=Ce(new ge(t,e),this.style.markerHorizontalAlignment,this.style.markerVerticalAlignment);return r.x!==-t/2&&(r.x-=N(r.x+t/2)*n),r.y!==-e/2&&(r.y-=N(r.y+e/2)*n),r},n._getCacheImageAnchor=function(t,e){var n=2*(this.symbol.shadowBlur||0)+this.padding,r=this.style.markerType;return"bar"===r||"pie"===r||"pin"===r?new me(t/2,e-n):"rectangle"===r?new me(n,n):new me(t/2,e/2)},n._getGraidentExtent=function(t){var e=new Zn,n=this.getDxDy(),r=this.getFixedExtent();if(Array.isArray(t))for(var i=t.length-1;i>=0;i--)e._combine(t[i]);else e._combine(t);return e.xmin+=r.xmin-n.x,e.ymin+=r.ymin-n.y,e.xmax+=r.xmax-n.x,e.ymax+=r.ymax-n.y,e},n._drawVectorMarker=function(t,n,r){var i,o=this.style,a=this.strokeAndFill,s=o.markerType.toLowerCase(),c=e._getVectorPoints(s,o.markerWidth,o.markerHeight),u=a.lineOpacity,l=a.polygonOpacity;(Ot(a.lineColor)||Ot(a.polygonFill))&&(Ot(a.lineColor)&&(i=this._getGraidentExtent(n),a.lineGradientExtent=i.expand(a.lineWidth)),Ot(a.polygonFill)&&(i||(i=this._getGraidentExtent(n)),a.polygonGradientExtent=i),this.prepareCanvas(t,a,r));var h=o.markerWidth,f=o.markerHeight,d=o.markerLineWidth/2;if("ellipse"===s)hn.ellipse(t,n,h/2,f/2,f/2,u,l);else if("cross"===s||"x"===s){for(var p=c.length-1;p>=0;p--)c[p]._add(n);hn.path(t,c.slice(0,2),u),hn.path(t,c.slice(2,4),u)}else if("diamond"===s||"bar"===s||"square"===s||"rectangle"===s||"triangle"===s){"bar"===s?n=n.add(0,-d):"rectangle"===s&&(n=n.add(d,d));for(var m=c.length-1;m>=0;m--)c[m]._add(n);hn.polygon(t,c,u,l)}else if("pin"===s){n=n.add(0,-d);for(var g=c.length-1;g>=0;g--)c[g]._add(n);var v=t.lineCap;t.lineCap="round",hn.bezierCurveAndFill(t,c,u,l),t.lineCap=v}else{if("pie"!==s)throw new Error("unsupported markerType: "+s);n=n.add(0,d);var y=180*Math.atan(h/2/f)/Math.PI,_=t.lineCap;t.lineCap="round",hn.sector(t,n,f,[90-y,90+y],u,l),t.lineCap=_}},n.getPlacement=function(){return this.symbol.markerPlacement},n.getRotation=function(){var t=this.style.markerRotation;return m(t)?-t*Math.PI/180:null},n.getFixedExtent=function(){var t=this.getDxDy(),e=2*this.padding,n=this._calMarkerSize().map((function(t){return t-e})),r=this._getAnchor(n[0],n[1]),i=new Zn(t.add(0,0),t.add(n[0],n[1]));i._add(r);var o=this.getRotation();return o&&(i=this._rotateExtent(i,o)),i},n.translate=function(){var t,e,n=this.symbol,r={markerType:z(n.markerType,"ellipse"),markerFill:z(n.markerFill,"#00f"),markerFillOpacity:z(n.markerFillOpacity,1),markerFillPatternFile:z(n.markerFillPatternFile,null),markerLineColor:z(n.markerLineColor,"#000"),markerLineWidth:z(n.markerLineWidth,1),markerLineOpacity:z(n.markerLineOpacity,1),markerLineDasharray:z(n.markerLineDasharray,[]),markerLinePatternFile:z(n.markerLinePatternFile,null),markerDx:z(n.markerDx,0),markerDy:z(n.markerDy,0),markerWidth:z(n.markerWidth,10),markerHeight:z(n.markerHeight,10),markerRotation:z(n.markerRotation,0)},i=r.markerType;return"bar"===i||"pie"===i||"pin"===i?(t="middle",e="top"):"rectangle"===i?(t="right",e="bottom"):(t="middle",e="middle"),r.markerHorizontalAlignment=z(n.markerHorizontalAlignment,t),r.markerVerticalAlignment=z(n.markerVerticalAlignment,e),m(n.markerOpacity)&&(m(n.markerFillOpacity)&&(r.markerFillOpacity*=n.markerOpacity),m(n.markerLineOpacity)&&(r.markerLineOpacity*=n.markerOpacity)),r},e.translateLineAndFill=function(t){var e={lineColor:t.markerLineColor,linePatternFile:t.markerLinePatternFile,lineWidth:t.markerLineWidth,lineOpacity:t.markerLineOpacity,lineDasharray:t.markerLineDasharray,lineCap:"butt",lineJoin:"round",polygonFill:t.markerFill,polygonPatternFile:t.markerFillPatternFile,polygonOpacity:t.markerFillOpacity};return 0===e.lineWidth&&(e.lineOpacity=0),e},e._getVectorPoints=function(t,e,n){var r,i,o,a,s=n/2,c=e/2;if("triangle"===t)return[r=new me(0,0-s),i=new me(0-c,0+s),o=new me(0+c,0+s)];if("cross"===t)return[r=new me(0-c,0),i=new me(0+c,0),o=new me(0,0-s),a=new me(0,0+s)];if("diamond"===t)return[r=new me(0-c,0),i=new me(0,0-s),o=new me(0+c,0),a=new me(0,0+s)];if("square"===t)return[r=new me(0-c,0+s),i=new me(0+c,0+s),o=new me(0+c,0-s),a=new me(0-c,0-s)];if("rectangle"===t)return i=(r=new me(0,0)).add(e,0),o=r.add(e,n),a=r.add(0,n),[r,i,o,a];if("x"===t)return[r=new me(0-c,0+s),i=new me(0+c,0-s),o=new me(0+c,0+s),a=new me(0-c,0-s)];if("bar"===t)return[r=new me(0-c,0-n),i=new me(0+c,0-n),o=new me(0+c,0),a=new me(0-c,0)];if("pin"===t){var u=n*Math.atan(c/s);return[r=new me(0,0),i=new me(0-u,0-n),o=new me(0+u,0-n),a=new me(0,0)]}return[]},e}(Cr),Pr=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.getPlacement=function(){return"point"},n.getDxDy=function(){return new me(0,0)},n.symbolize=function(t){var e=this.geometry,n=e.getLayer();if(e.options.debug||!n||n.options.debug){var r=this.getMap();if(r&&!r.isZooming()){var i=n.options.debugOutline;t.strokeStyle=i,t.fillStyle=i;var o=this.getPainter().getContainerExtent().toArray();hn.polygon(t,[o],1,0);for(var a=this._getRenderContainerPoints(),s=this.geometry.getId(),c=Ar._getVectorPoints("cross",10,10),u=0;u<a.length;u++){var l=a[u];p(s)||hn.fillText(t,s,l.add(8,-4),i);for(var h=[],f=0;f<c.length;f++)h.push(c[f].add(l));hn.path(t,h.slice(0,2),1),hn.path(t,h.slice(2,4),1)}}}},e}(Cr),Lr=function(t){function e(e,n,r){var i;return(i=t.call(this,e,n,r)||this).style=i._defineStyle(i.translate()),i}fe(e,t),e.test=function(t){return!!t&&!p(t.markerFile)};var n=e.prototype;return n.symbolize=function(t,e){var n=this.style;if(this.painter.isHitTesting()||0!==n.markerWidth&&0!==n.markerHeight&&0!==n.markerOpacity){var r=this._getRenderContainerPoints();if(U(r)){var i=this._getImage(e);if(i){this._prepareContext(t);var o,a=n.markerWidth,s=n.markerHeight;if(!m(a)||!m(s)){a=i.width,s=i.height,n.markerWidth=a,n.markerHeight=s;var c=[n.markerFile,n.markerWidth,n.markerHeight];e.isResourceLoaded(c)||e.addResource(c,i);var u=this.getPainter();u.isSpriting()||u.removeCache()}"path"!==this.symbol.markerType&&m(n.markerOpacity)&&n.markerOpacity<1&&(o=t.globalAlpha,t.globalAlpha*=n.markerOpacity);for(var l=Ce(new ge(a,s),n.markerHorizontalAlignment,n.markerVerticalAlignment),h=0,f=r.length;h<f;h++){var d=r[h],p=this._rotate(t,d,this._getRotationAt(h));p&&(d=p),hn.image(t,i,d.x+l.x,d.y+l.y,a,s),p&&t.restore()}void 0!==o&&(t.globalAlpha=o)}else"undefined"!=typeof console&&console.warn("no img found for "+(this.style.markerFile||this._url[0]))}}},n._getImage=function(t){return t?t.getImage([this.style.markerFile,this.style.markerWidth,this.style.markerHeight]):null},n.getPlacement=function(){return this.symbol.markerPlacement},n.getRotation=function(){var t=this.style.markerRotation;return m(t)?-t*Math.PI/180:null},n.getDxDy=function(){var t=this.style,e=t.markerDx,n=t.markerDy;return new me(e,n)},n.getFixedExtent=function(t){var e=this.style,n=e.markerFile,r=t?t.getImage(n):null,i=e.markerWidth||(r?r.width:0),o=e.markerHeight||(r?r.height:0),a=this.getDxDy(),s=Ce(new ge(i,o),e.markerHorizontalAlignment,e.markerVerticalAlignment),c=new Zn(a.add(0,0),a.add(i,o));c._add(s);var u=this.getRotation();return u&&(c=this._rotateExtent(c,u)),c},n.translate=function(){var t=this.symbol;return{markerFile:t.markerFile,markerOpacity:z(t.markerOpacity,1),markerWidth:z(t.markerWidth,null),markerHeight:z(t.markerHeight,null),markerRotation:z(t.markerRotation,0),markerDx:z(t.markerDx,0),markerDy:z(t.markerDy,0),markerHorizontalAlignment:z(t.markerHorizontalAlignment,"middle"),markerVerticalAlignment:z(t.markerVerticalAlignment,"top")}},e}(Cr),Rr=new Rn(0,0),Or=new Rn(0,0),kr=function(t){function e(e,n,r){var i;return(i=t.call(this)||this).symbol=e,i.geometry=n,i.painter=r,"Point"===n.type?de(i):(i.style=i._defineStyle(i.translate()),i)}fe(e,t),e.test=function(t,e){if(!t)return!1;if(e&&"Point"===e.type)return!1;for(var n in t){var r=n.slice(0,4);if("line"===r||"poly"===r)return!0}return!1};var n=e.prototype;return n.symbolize=function(t,e){var n=this.style;if(0!==n.polygonOpacity||0!==n.lineOpacity||this.painter.isHitTesting()){var r=this._getPaintParams();if(r){this._prepareContext(t);var i=Ot(n.lineColor),o="Polygon"===this.geometry.getJSONType()||"LineString"===this.geometry.type;!i||!n.lineColor.places&&o||(n.lineGradientExtent=this.getPainter().getContainerExtent()._expand(n.lineWidth)),Ot(n.polygonFill)&&(n.polygonGradientExtent=this.getPainter().getContainerExtent());var a=r[0];if("Polygon"===this.geometry.getJSONType()&&a.length>0&&Array.isArray(a[0][0])||"LineString"===this.geometry.type&&a.length>0&&Array.isArray(a[0]))for(var s=0;s<a.length;s++){this.prepareCanvas(t,n,e),i&&o&&!n.lineColor.places&&this._createGradient(t,a[s],n.lineColor);var c=[t,a[s]];r.length>1&&c.push.apply(c,r.slice(1)),c.push(n.lineOpacity,n.polygonOpacity,n.lineDasharray),this.geometry._paintOn.apply(this.geometry,c)}else{this.prepareCanvas(t,n,e),i&&o&&!n.lineColor.places&&this._createGradient(t,a,n.lineColor);var u=[t];u.push.apply(u,r),u.push(n.lineOpacity,n.polygonOpacity,n.lineDasharray),this.geometry._paintOn.apply(this.geometry,u)}t.setLineDash&&Array.isArray(n.lineDasharray)&&t.setLineDash([])}}},n.get2DExtent=function(){var t=this.getMap(),e=this.geometry._getPrjExtent();if(!e)return null;this._extMin&&this._extMax||(this._extMin=new Rn(0,0),this._extMax=new Rn(0,0)),this._extMin.x=e.xmin,this._extMin.y=e.ymin,this._extMax.x=e.xmax,this._extMax.y=e.ymax;var n=t._prjToPoint(this._extMin,void 0,Rr),r=t._prjToPoint(this._extMax,void 0,Or);return this._pxExtent?this._pxExtent.set(Math.min(n.x,r.x),Math.min(n.y,r.y),Math.max(n.x,r.x),Math.max(n.y,r.y)):this._pxExtent=new Zn(n,r),this._pxExtent},n.getFixedExtent=function(){var t=this.style.lineWidth/2;return new Zn(-t,-t,t,t)},n._getPaintParams=function(){return this.getPainter().getPaintParams(this.style.lineDx,this.style.lineDy)},n.translate=function(){var t=this.symbol,e={lineColor:z(t.lineColor,"#000"),lineWidth:z(t.lineWidth,2),lineOpacity:z(t.lineOpacity,1),lineDasharray:z(t.lineDasharray,[]),lineCap:z(t.lineCap,"butt"),lineJoin:z(t.lineJoin,"miter"),linePatternFile:z(t.linePatternFile,null),lineDx:z(t.lineDx,0),lineDy:z(t.lineDy,0),polygonFill:z(t.polygonFill,null),polygonOpacity:z(t.polygonOpacity,1),polygonPatternFile:z(t.polygonPatternFile,null),polygonPatternDx:z(t.polygonPatternDx,0),polygonPatternDy:z(t.polygonPatternDy,0),linePatternDx:z(t.linePatternDx,0),linePatternDy:z(t.linePatternDy,0)};return 0===e.lineWidth&&(e.lineOpacity=0),"LineString"!==this.geometry.type||e.polygonFill||(e.polygonFill=e.lineColor),e},n._createGradient=function(t,e,n){if(Array.isArray(e)&&e.length){var r=e.length,i=t.createLinearGradient(e[0].x,e[0].y,e[r-1].x,e[r-1].y);n.colorStops.forEach((function(t){i.addColorStop.apply(i,t)})),t.strokeStyle=i}},e}(Sr),Ir="___text_symbol_cache",Dr=function(t){function e(e,n,r){var i;if((i=t.call(this,e,n,r)||this)._dynamic=bt(e),i.style=i._defineStyle(i.translate()),0===i.style.textWrapWidth)return de(i);i.strokeAndFill=i._defineStyle(i.translateLineAndFill(i.style));var o=Ee(i.style.textName,i.geometry.getProperties());return i._dynamic||(i._cacheKey=function(t,e){var n=[t];for(var r in e)e.hasOwnProperty(r)&&r.length>4&&"text"===r.substring(0,4)&&n.push(r+"="+e[r]);return n.join("-")}(o,i.style)),i._descText(o),i}fe(e,t),e.test=function(t){return!!t&&!p(t.textName)};var n=e.prototype;return n.symbolize=function(t,e){if(this.painter.isHitTesting()||0!==this.style.textSize&&(this.style.textOpacity||this.style.textHaloRadius&&this.style.textHaloOpacity)&&0!==this.style.textWrapWidth){var n=this._getRenderContainerPoints();if(U(n)){var r=this.style,i=this.strokeAndFill,o=Ee(this.style.textName,this.geometry.getProperties());this._descText(o),this._prepareContext(t),this.prepareCanvas(t,i,e),hn.prepareCanvasFont(t,r);for(var a=0,s=n.length;a<s;a++){var c=n[a],u=this._rotate(t,c,this._getRotationAt(a));u&&(c=u),hn.text(t,o,c,r,this.textDesc),u&&t.restore()}}}},n.getPlacement=function(){return this.symbol.textPlacement},n.getRotation=function(){var t=this.style.textRotation;return m(t)?-t*Math.PI/180:null},n.getDxDy=function(){var t=this.style;return new me(t.textDx,t.textDy)},n.getFixedExtent=function(){var t=this.getDxDy(),e=this.style,n=this.textDesc.size,r=Ce(n,e.textHorizontalAlignment,e.textVerticalAlignment),i=r.x,o=r.y;if(e.textHaloRadius){var a=e.textHaloRadius;n=n.add(2*a,2*a)}var s=new Zn(t.add(i,o),t.add(i+n.width,o+n.height)),c=this.getRotation();return c&&(s=this._rotateExtent(s,c)),s},n.translate=function(){var t=this.symbol,e={textName:t.textName,textFaceName:z(t.textFaceName,"monospace"),textWeight:z(t.textWeight,"normal"),textStyle:z(t.textStyle,"normal"),textSize:z(t.textSize,h),textFont:z(t.textFont,null),textFill:z(t.textFill,"#000"),textOpacity:z(t.textOpacity,1),textHaloFill:z(t.textHaloFill,"#ffffff"),textHaloRadius:z(t.textHaloRadius,0),textHaloOpacity:z(t.textHaloOpacity,1),textWrapWidth:z(t.textWrapWidth,null),textWrapCharacter:z(t.textWrapCharacter,"\n"),textLineSpacing:z(t.textLineSpacing,0),textDx:z(t.textDx,0),textDy:z(t.textDy,0),textHorizontalAlignment:z(t.textHorizontalAlignment,"middle"),textVerticalAlignment:z(t.textVerticalAlignment,"middle"),textAlign:z(t.textAlign,"center"),textRotation:z(t.textRotation,0),textMaxWidth:z(t.textMaxWidth,0),textMaxHeight:z(t.textMaxHeight,0)};return e.textMaxWidth>0&&(!e.textWrapWidth||e.textWrapWidth>e.textMaxWidth)&&(e.textWrapWidth||(e.textMaxHeight=1),e.textWrapWidth=e.textMaxWidth),e},n.translateLineAndFill=function(t){return{lineColor:t.textHaloRadius?t.textHaloFill:t.textFill,lineWidth:t.textHaloRadius,lineOpacity:t.textOpacity,lineDasharray:null,lineCap:"butt",lineJoin:"round",polygonFill:t.textFill,polygonOpacity:t.textOpacity}},n._descText=function(t){this._dynamic?this.textDesc=this._measureText(t):(this.textDesc=this._loadFromCache(),this.textDesc||(this.textDesc=this._measureText(t),this._storeToCache(this.textDesc)))},n._measureText=function(t){var e=this.style.textMaxHeight,n=Pe(t,this.style);return e&&e<n.size.height&&(n.size.height=e),n},n._storeToCache=function(t){C||(this.geometry[Ir]||(this.geometry[Ir]={}),this.geometry[Ir][this._cacheKey]={desc:t,active:!0})},n._loadFromCache=function(){if(!this.geometry[Ir])return null;var t=this.geometry[Ir][this._cacheKey];return t?(t.active=!0,t.desc):null},e}(Cr);Dr.CACHE_KEY=Ir;var jr,zr=function(t){function e(e,n,r){var i;p(e.markerWidth)&&(e.markerWidth=80),p(e.markerHeight)&&(e.markerHeight=80),e=d(e,(i=t.call(this,e,n,r)||this).translate());var o=i.style=i._defineStyle(e);return he.gecko?i._url=[At(o,o.markerWidth,o.markerHeight),o.markerWidth,o.markerHeight]:i._url=[At(o),o.markerWidth,o.markerHeight],i}fe(e,t),e.test=function(t){return!!t&&!(!p(t.markerFile)||"path"!==t.markerType)};var n=e.prototype;return n._prepareContext=function(){},n._getImage=function(t){var e=this;if(t&&t.isResourceLoaded(this._url))return t.getImage(this._url);var n=this.painter,r=new Image;return r.onload=function(){var t=n.getLayer()&&n.getLayer().getRenderer();t&&t.setToRedraw()},r.onerror=function(n){n&&"undefined"!=typeof console&&console.warn(n),t.markErrorResource(e._url)},r.src=this._url[0],t&&t.addResource(this._url,r),r},e}(Lr),Nr={lineWidth:1,polygonFill:"#fff",polygonOpacity:.5},Fr=function(t){function e(e,n,r){var i;return(i=t.call(this,e,n,r)||this).style=n.getLayer().options.drawAltitude,i.style&&v(i.style)||(i.style={lineWidth:2}),i.style.lineWidth||(i.style.lineWidth=0),i.dxdy=i._defineStyle({dx:e.textDx||e.markerDx,dy:e.textDy||e.markerDy}),i}fe(e,t),e.test=function(t,e){if(!e.getLayer())return!1;var n=e.getJSONType();return"Marker"===n||"LineString"===n};var n=e.prototype;return n.symbolize=function(t){var e=this.geometry.getLayer();if(e.options.drawAltitude){var n=this.geometry.getProperties();if(n&&n[e.options.altitudeProperty]){var r=this._getStyle();if(this._prepareContext(t),"LineString"===this.geometry.type){var i=this._getPaintParams(r.lineDx,r.lineDy);if(!i)return;var o=this.getPainter().getPaintParams(r.lineDx,r.lineDy,!0)[0];this._drawLineAltitude(t,i[0],o)}else{var a=this._getRenderContainerPoints(),s=this._getRenderContainerPoints(!0);if(!a||0===a.length)return;this._drawMarkerAltitude(t,a[0],s[0])}}}},n.getDxDy=function(){var t=this.dxdy;return new me(t.dx||0,t.dy||0)},n.get2DExtent=function(){return"LineString"===this.geometry.type?kr.prototype.get2DExtent.apply(this):t.prototype.get2DExtent.call(this)},n.getPlacement=function(){return"point"},n._getPaintParams=function(t,e){return this.getPainter().getPaintParams(t||0,e||0)},n._drawMarkerAltitude=function(t,e,n){var r=this._getStyle();this.prepareCanvas(t,r),hn.path(t,[e,n],r.lineOpacity,null,r.lineDasharray)},n._drawLineAltitude=function(t,e,n){var r=this._getStyle();if(e.length>0&&Array.isArray(e[0]))for(var i=0;i<e.length;i++)this._drawLine(t,e[i],n[i]);else this._drawLine(t,e,n);t.setLineDash&&Array.isArray(r.lineDasharray)&&t.setLineDash([])},n._drawLine=function(t,e,n){var r=this._getStyle();this.prepareCanvas(t,r);for(var i=0,o=e.length-1;i<o;i++)hn.polygon(t,[e[i],e[i+1],n[i+1],n[i]],r.lineOpacity,r.polygonOpacity,r.lineDasharray)},n._getStyle=function(){var t=this.geometry.getLayer().options.drawAltitude;return v(t)||(t=Nr),t.lineWidth||(t.lineWidth=0,t.lineOpacity=0),t},e}(Cr),Br=Object.freeze({Symbolizer:Mr,CanvasSymbolizer:Sr,DebugSymbolizer:Pr,ImageMarkerSymbolizer:Lr,PointSymbolizer:Cr,StrokeAndFillSymbolizer:kr,TextMarkerSymbolizer:Dr,VectorMarkerSymbolizer:Ar,VectorPathMarkerSymbolizer:zr,DrawAltitudeSymbolizer:Fr}),Hr=[Fr,kr,Lr,zr,Ar,Dr],Gr=new me(0,0),Ur=new Zn,Vr=new Zn,Wr=new Zn,Zr=new Zn,qr=new Zn,Yr=function(t){function e(e){var n;return(n=t.call(this)||this).geometry=e,n.symbolizers=n._createSymbolizers(),n._altAtGLZoom=n._getGeometryAltitude(),n}fe(e,t);var n=e.prototype;return n.getMap=function(){return this.geometry.getMap()},n.getLayer=function(){return this.geometry.getLayer()},n._createSymbolizers=function(){var t=this.getSymbol(),e=[],n=Hr,r=t;Array.isArray(t)||(r=[t]);for(var i=r.length-1;i>=0;i--)for(var o=r[i],a=n.length-1;a>=0;a--)if(n[a].test(o,this.geometry)){var s=new n[a](o,this.geometry,this);e.push(s),s instanceof Cr&&(this._hasPoint=!0)}if(!e.length&&console){var c=this.geometry.getId();console.warn("invalid symbol for geometry("+(this.geometry?this.geometry.getType()+(c?":"+c:""):"")+") to draw : "+JSON.stringify(t))}return this._debugSymbolizer=new Pr(t,this.geometry,this),e},n.hasPoint=function(){return!!this._hasPoint},n.getRenderPoints=function(t){return this._renderPoints||(this._renderPoints={}),t||(t="center"),this._renderPoints[t]||(this._renderPoints[t]=this.geometry._getRenderPoints(t)),this._renderPoints[t]},n.getPaintParams=function(t,e,n){var r=this.getMap(),i=this.geometry,o=r.getResolution(),a=0!==r.getPitch(),s=0!==r.getBearing(),c=this._cachedParams,u=i._paintAsPath&&i._paintAsPath();if(u&&this._unsimpledParams&&o<=this._unsimpledParams._res)c=this._unsimpledParams;else if(!c||c._res!==r.getResolution()||this._pitched!==a&&i._redrawWhenPitch()||this._rotated!==s&&i._redrawWhenRotate()){if(!(c=i._getPaintParams()))return null;c._res=o,!i._simplified&&u&&(this._unsimpledParams||(this._unsimpledParams=c),o>this._unsimpledParams._res&&(this._unsimpledParams._res=o)),this._cachedParams=c}if(!c)return null;this._pitched=a,this._rotated=s;var l=r.getGLScale(),h=[],f=c[0],d=r.getContainerExtent(),p=this._pointContainerPoints(f,t,e,n,this._hitPoint&&!d.contains(this._hitPoint));if(!p)return null;h.push(p);for(var g=1,v=c.length;g<v;g++)m(c[g])||c[g]instanceof ge?m(c[g])?h.push(c[g]/l):h.push(c[g].multi(1/l)):h.push(c[g]);return h},n._pointContainerPoints=function(t,e,n,r,i,o){if(this._aboveCamera())return null;var a,s=this.getMap(),c=s.getGLZoom(),u=this.containerOffset;function l(t,r){var i=s._pointToContainerPoint(t,c,r)._sub(u);return(e||n)&&i._add(e||0,n||0),i}var h=this.getAltitude();if(Array.isArray(t)){var f,d=this.geometry,p=(f=!i&&d.options.enableClip?this._clip(t,h):{points:t,altitude:h}).points;h=f.altitude,r&&(h=0);var m=h;a=[];for(var g=0,v=p.length;g<v;g++){var y=p[g];if(Array.isArray(y)){for(var _=[],x=0,b=y.length;x<b;x++){var w=y[x];Array.isArray(h)&&(m=h[g]?h[g][x]:0),_.push(l(w,m))}a.push(_)}else Array.isArray(h)&&(m="vertex-last"===o?h[h.length-1-g]:"line"===o?(h[g]+h[g+1])/2:h[g]),a.push(l(y,m))}}else t instanceof me&&(r&&(h=0),a=s._pointToContainerPoint(t,c,h)._sub(u),(e||n)&&a._add(e,n));return a},n._clip=function(t,e){var n=this.getMap(),r=this.geometry,i=this.getSymbol().lineWidth;m(i)||(i=4);var o=n._get2DExtent(void 0,Zr)._expand(i);if(n.getPitch()>0&&e){var a=n.cameraLookAt,s=n.cameraPosition;Gr.set(s.x,s.y),o=o._combine(Gr._add(N(a[0]-s[0]),N(a[1]-s[1])))}var c=t;if(this.get2DExtent(null,qr).within(o))return{points:c,altitude:e};var u=n._get2DExtent(n.getGLZoom(),Zr)._expand(i*n._glScale),l=r.options.smoothness;if(r.getShell&&this.geometry.getHoles&&!l)if(Array.isArray(t[0])){c=[];for(var h=0;h<t.length;h++){var f=_r(t[h],u);f.length&&c.push(f)}}else c=_r(t,u);else if("LineString"===r.getJSONType()&&!l){if(Array.isArray(t[0])){c=[];for(var d=0;d<t.length;d++)I(c,vr(t[d],u,!1,!!l))}else c=vr(t,u,!1,!!l);return this._interpolateSegAlt(c,t,e)}return{points:c,altitude:e}},n._interpolateSegAlt=function(t,e,n){if(!Array.isArray(n)){var r=function(t){return t.point};return{points:t.map((function(t){return Array.isArray(t)?t.map(r):t.point})),altitude:n}}var i=function t(e,n,r){if(!Array.isArray(r))return e;for(var i=[],o=0,a=e.length;o<a;o++)if(Array.isArray(e[o]))i.push(t(e[o],n,r));else{var s=e[o];if(s.point.equals(n[s.index]))s.altitude=r[s.index],i.push(s);else{var c=void 0,u=void 0;0===s.index?(c=s.index,u=s.index+1):(c=s.index-1,u=s.index);var l=s.point.distanceTo(n[u]),h=l/(l+n[c].distanceTo(s.point)),f=B(r[c],r[u],1-h);s.altitude=f,i.push(s)}}return i}(t,e,n);return n=[],{points:i.map((function(t){if(Array.isArray(t)){var e=[],r=t.map((function(t){return e.push(t.altitude),t.point}));return n.push(e),r}return n.push(t.altitude),t.point})),altitude:n}},n.getSymbol=function(){return this.geometry._getInternalSymbol()},n.paint=function(t,e,n){if(this.symbolizers){var r=this.getLayer()._getRenderer();if(r&&(r.context||e)&&(!t||t.intersects(this.get2DExtent(r.resources,Ur)))){var i=this.getMap(),o=this.getMinAltitude(),a=i.getFrustumAltitude();if(!(o&&a&&a<o)){this.containerOffset=n||i._pointToContainerPoint(r.southWest)._add(0,-i.height),this._beforePaint();for(var s=e||r.context,c=[s,r.resources],u=this.symbolizers.length-1;u>=0;u--)this._prepareShadow(s,this.symbolizers[u].symbol),this.symbolizers[u].symbolize.apply(this.symbolizers[u],c);this._afterPaint(),this._painted=!0,this._debugSymbolizer.symbolize.apply(this._debugSymbolizer,c)}}}},n.getSprite=function(t,e){if("Point"!==this.geometry.type)return null;if(this._spriting=!0,!this._sprite&&this.symbolizers.length>0){var n=new Zn;this.symbolizers.forEach((function(e){var r=e.getFixedExtent(t);n._combine(r)}));var r,i=n.getMin().multi(-1),o=e||(this.getMap()?this.getMap().CanvasClass:null),a=hn.createCanvas(n.getWidth(),n.getHeight(),o);this._renderPoints&&(r=this._renderPoints);for(var s=a.getContext("2d"),c=[s,t],u=this.symbolizers.length-1;u>=0;u--){var l=this.symbolizers[u].getDxDy();this._renderPoints={center:[[i.add(l)]]},this._prepareShadow(s,this.symbolizers[u].symbol),this.symbolizers[u].symbolize.apply(this.symbolizers[u],c)}r&&(this._renderPoints=r),this._sprite={canvas:a,offset:n.getCenter()}}return this._spriting=!1,this._sprite},n.isSpriting=function(){return!!this._spriting},n.hitTest=function(t,e){(!e||e<.5)&&(e=.5),jr||(jr=hn.createCanvas(1,1)),hn.setHitTesting(!0),jr.width=jr.height=2*e;var n=jr.getContext("2d");this._hitPoint=t.sub(e,e);try{this.paint(null,n,this._hitPoint)}catch(t){throw t}finally{hn.setHitTesting(!1)}delete this._hitPoint;for(var r=n.getImageData(0,0,jr.width,jr.height).data,i=3,o=r.length;i<o;i+=4)if(r[i]>0)return!0;return!1},n.isHitTesting=function(){return!!this._hitPoint},n._prepareShadow=function(t,e){e.shadowBlur?(t.shadowBlur=this.isHitTesting()?0:e.shadowBlur,t.shadowColor=e.shadowColor||"#000",t.shadowOffsetX=e.shadowOffsetX||0,t.shadowOffsetY=e.shadowOffsetY||0):t.shadowBlur&&(t.shadowBlur=null,t.shadowColor=null,t.shadowOffsetX=null,t.shadowOffsetY=null)},n._eachSymbolizer=function(t,e){if(this.symbolizers){e||(e=this);for(var n=this.symbolizers.length-1;n>=0;n--)t.apply(e,[this.symbolizers[n]])}},n.get2DExtent=function(t,e){this._verifyProjection();var n=this.getMap();t=t||this.getLayer()._getRenderer().resources;var r=n.getZoom(),i=this._isDynamicSize();if(this._extent2D&&this._extent2D._zoom===r&&this._fixedExtent||(this._extent2D&&this._extent2D._zoom!==r&&delete this._extent2D,this.symbolizers&&(this._extent2D||(this._extent2D=this._computeExtent2D(new Zn),this._extent2D._zoom=r),this._fixedExtent||(this._fixedExtent=this._computeFixedExtent(t,new Zn)))),!this._extent2D)return i&&delete this._fixedExtent,null;var o=this._fixedExtent,a=o.xmin,s=o.ymin,c=o.xmax,u=o.ymax;return i&&delete this._fixedExtent,Wr.set(a,-u,c,-s),e?(e.set(this._extent2D.xmin,this._extent2D.ymin,this._extent2D.xmax,this._extent2D.ymax),e._add(Wr),e):this._extent2D.add(Wr)},n._computeExtent2D=function(t){for(var e=this.symbolizers.length-1;e>=0;e--){var n=this.symbolizers[e];t._combine(n.get2DExtent())}return t},n._computeFixedExtent=function(t,e){for(var n=this.symbolizers.length-1;n>=0;n--){var r=this.symbolizers[n];r.getFixedExtent&&e._combine(r.getFixedExtent(t))}return e},n._isDynamicSize=function(){for(var t=this.symbolizers.length-1;t>=0;t--)if(this.symbolizers[t].isDynamicSize())return!0;return!1},n.getContainerExtent=function(t){if(this._aboveCamera())return null;this._verifyProjection();var e=this.getMap(),n=e.getZoom(),r=e._glScale;this._extent2D&&this._extent2D._zoom===n||this.get2DExtent(null,Vr);var i=this.getMinAltitude(),o=this._extent2D.convertTo((function(t){return e._pointToContainerPoint(t,n,i/r,Gr)}),t),a=this.getMaxAltitude();if(a!==i){var s=this._extent2D.convertTo((function(t){return e._pointToContainerPoint(t,n,a/r,Gr)}),Vr);o._combine(s)}var c=this.geometry.getLayer();if("LineString"===this.geometry.type&&a&&c.options.drawAltitude){var u=this._extent2D.convertTo((function(t){return e._pointToContainerPoint(t,n,0,Gr)}),Vr);o._combine(u)}return o&&o._add(this._fixedExtent||this._computeFixedExtent(null,new Zn)),this.geometry.options.smoothness&&o._expand(.15*o.getWidth()),o},n._aboveCamera=function(){var t=this.getMinAltitude(),e=this.getMap().getFrustumAltitude();return t&&e&&e<t},n.getFixedExtent=function(){var t=this.getMap().getZoom();return this._isDynamicSize()?this._computeFixedExtent(null,new Zn):(this._extent2D&&this._extent2D._zoom===t||this.get2DExtent(null,Wr),this._fixedExtent)},n.setZIndex=function(t){this._eachSymbolizer((function(e){e.setZIndex(t)}))},n.show=function(){this._painted?(this.removeCache(),this._eachSymbolizer((function(t){t.show()}))):this.getLayer().isCanvasRender()||this.paint()},n.hide=function(){this._eachSymbolizer((function(t){t.hide()}))},n.repaint=function(){this._altAtGLZoom=this._getGeometryAltitude(),this.removeCache();var t=this.getLayer();if(t){var e=t.getRenderer();e&&e.setToRedraw()&&e.setToRedraw()}},n.refreshSymbol=function(){this.removeCache(),this._removeSymbolizers(),this.symbolizers=this._createSymbolizers()},n.remove=function(){this.removeCache(),this._removeSymbolizers()},n._removeSymbolizers=function(){this._eachSymbolizer((function(t){delete t.painter,t.remove()})),delete this.symbolizers},n.removeCache=function(){delete this._renderPoints,delete this._paintParams,delete this._sprite,delete this._extent2D,delete this._fixedExtent,delete this._cachedParams,delete this._unsimpledParams,this.geometry&&delete this.geometry[Dr.CACHE_KEY]},n.getAltitude=function(){return this.geometry.getAltitude()!==this._propAlt&&(this._altAtGLZoom=this._getGeometryAltitude()),this._altAtGLZoom?this._altAtGLZoom:0},n.getMinAltitude=function(){return this.minAltitude?this.minAltitude:0},n.getMaxAltitude=function(){return this.maxAltitude?this.maxAltitude:0},n._getGeometryAltitude=function(){var t=this;if(!this.getMap())return 0;var e=this.geometry.getAltitude();if(this._propAlt=e,!e)return this.minAltitude=this.maxAltitude=0,0;var n=this.geometry.getCenter();return n?Array.isArray(e)?(this.minAltitude=Number.MAX_VALUE,this.maxAltitude=Number.MIN_VALUE,e.map((function(e){var r=t._meterToPoint(n,e);return r<t.minAltitude&&(t.minAltitude=r),r>t.maxAltitude&&(t.maxAltitude=r),r}))):(this.minAltitude=this.maxAltitude=this._meterToPoint(n,e),this.minAltitude):0},n._meterToPoint=function(t,e){var n=this.getMap(),r=n.getGLZoom();return n.distanceToPoint(e,0,r,t).x*N(e)},n._verifyProjection=function(){var t=this.geometry._getProjection();this._projCode&&this._projCode!==t.code&&this.removeCache(),this._projCode=t.code},n._beforePaint=function(){var t=this.geometry[Dr.CACHE_KEY];if(t)for(var e in t)b(t,e)&&(t[e].active=!1)},n._afterPaint=function(){var t=this.geometry[Dr.CACHE_KEY];if(t)for(var e in t)b(t,e)&&(t[e].active||delete t[e])},e}(Mn),Jr=new Zn,Xr=function(t){function e(e,n){var r;return(r=t.call(this)||this).geometry=e,r.isMask=n,r}fe(e,t);var n=e.prototype;return n._eachPainter=function(t){for(var e,n=this.geometry.getGeometries(),r=0,i=n.length;r<i&&(!(e=this.isMask?n[r]._getMaskPainter():n[r]._getPainter())||!e||!1!==t.call(this,e));r++);},n.paint=function(t){this.geometry&&this._eachPainter((function(e){e.paint(t)}))},n.get2DExtent=function(t,e){e&&e.set(null,null,null,null);var n=e||new Zn;return this._eachPainter((function(e){n=n._combine(e.get2DExtent(t,Jr))})),n},n.getContainerExtent=function(){var t=new Zn;return this._eachPainter((function(e){t=t.combine(e.getContainerExtent())})),t},n.remove=function(){var t=arguments;this._eachPainter((function(e){e.remove.apply(e,t)}))},n.setZIndex=function(){var t=arguments;this._eachPainter((function(e){e.setZIndex.apply(e,t)}))},n.show=function(){var t=arguments;this._eachPainter((function(e){e.show.apply(e,t)}))},n.hide=function(){var t=arguments;this._eachPainter((function(e){e.hide.apply(e,t)}))},n.repaint=function(){var t=arguments;this._eachPainter((function(e){e.repaint.apply(e,t)}))},n.refreshSymbol=function(){var t=arguments;this._eachPainter((function(e){e.refreshSymbol.apply(e,t)}))},n.hasPoint=function(){var t=!1;return this._eachPainter((function(e){return!e.hasPoint()||(t=!0,!1)})),t},n.getMinAltitude=function(){var t=!0,e=0;return this._eachPainter((function(n){var r=n.getMinAltitude();(t||r<e)&&(t=!1,e=r)})),e},n.getMaxAltitude=function(){var t=0;return this._eachPainter((function(e){var n=e.getMaxAltitude();n>t&&(t=n)})),t},e}(Mn),$r={"EPSG:3857":{resolutions:function(){for(var t=[],e=12756274*Math.PI,n=0;n<21;n++)t[n]=e/(256*Math.pow(2,n));return t}(),fullExtent:{top:6378137*Math.PI,left:-6378137*Math.PI,bottom:-6378137*Math.PI,right:6378137*Math.PI}},"EPSG:4326":{fullExtent:{top:90,left:-180,bottom:-90,right:180},resolutions:function(){for(var t=[],e=0;e<20;e++)t[e]=180/(128*Math.pow(2,e));return t}()},BAIDU:{resolutions:function(){for(var t=Math.pow(2,18),e=[],n=0;n<20;n++)e[n]=t,t*=.5;return e}(),fullExtent:{top:33554432,left:-33554432,bottom:-33554432,right:33554432}},IDENTITY:{resolutions:function(){for(var t=Math.pow(2,8),e=[],n=0;n<18;n++)e[n]=t,t*=.5;return e}(),fullExtent:{top:2e5,left:-2e5,bottom:-2e5,right:2e5}}};$r["EPSG:4490"]=$r["EPSG:4326"];var Qr=function(){function t(t){void 0===t&&(t={}),this.options=t,this._initSpatialRef()}t.getProjectionInstance=function(t){if(!t)return null;if(v(t))return t;for(var e in t=(t+"").toLowerCase(),dr)if(b(dr,e)){var n=dr[e].code;if(n&&n.toLowerCase()===t)return dr[e]}return null},t.equals=function(t,e){if(!t&&!e)return!0;if(!t||!e)return!1;if(t.projection!==e.projection)return!1;var n=t.fullExtent,r=e.fullExtent;if(n&&!r||!n&&r)return!1;if(n&&r&&(n.top!==r.top||n.bottom!==r.bottom||n.left!==r.left||n.right!==r.right))return!1;var i=t.resolutions,o=e.resolutions;if(i&&o){if(i.length!==o.length)return!1;for(var a=0;a<i.length;a++)if(i[a]!==o[a])return!1}return!0};var e=t.prototype;return e._initSpatialRef=function(){var e=this.options.projection;if(!(e=e?t.getProjectionInstance(e):fr))throw new Error("must provide a valid projection in map's spatial reference.");(e=d({},Yn,e)).measureLength||d(e,or.DEFAULT),this._projection=e;var n,r=this.options.resolutions;if(!r&&(e.code&&(n=$r[e.code])&&(r=n.resolutions,this.isEPSG="IDENTITY"!==e.code),!r))throw new Error("must provide valid resolutions in map's spatial reference.");this._resolutions=r;var i=this.options.fullExtent;if(!i&&(e.code&&(n=$r[e.code])&&(i=n.fullExtent),!i))throw new Error("must provide a valid fullExtent in map's spatial reference.");if(p(i.left)?(this._fullExtent=new Wn(i),i.left=i.xmin,i.right=i.xmax,i.top=i.ymax,i.bottom=i.ymin):this._fullExtent=new Wn(new Rn(i.left,i.top),new Rn(i.right,i.bottom)),p(i.top)||p(i.bottom)||p(i.left)||p(i.right))throw new Error("must provide valid top/bottom/left/right in fullExtent.");d(this._fullExtent,i),this._projection.fullExtent=i;var o=i.right>=i.left?1:-1,a=i.top>=i.bottom?-1:1;this._transformation=new qn([o,a,0,0])},e.getResolutions=function(){return this._resolutions||[]},e.getResolution=function(t){var e=0|t;e<0?e=0:e>this._resolutions.length-1&&(e=this._resolutions.length-1);var n=this._resolutions[e];return e!==t&&t>0&&e<this._resolutions.length-1?n+(this._resolutions[e+1]-n)*(t-e):n},e.getProjection=function(){return this._projection},e.getFullExtent=function(){return this._fullExtent},e.getTransformation=function(){return this._transformation},e.getMinZoom=function(){for(var t=0;t<this._resolutions.length;t++)if(!p(this._resolutions[t]))return t;return 0},e.getMaxZoom=function(){for(var t=this._resolutions.length-1;t>=0;t--)if(!p(this._resolutions[t]))return t;return this._resolutions.length-1},e.getZoomDirection=function(){return N(this._resolutions[this.getMinZoom()]-this._resolutions[this.getMaxZoom()])},e.toJSON=function(){return this.json||(this.json={resolutions:this._resolutions,fullExtent:{top:this._fullExtent.top,left:this._fullExtent.left,bottom:this._fullExtent.bottom,right:this._fullExtent.right},projection:this._projection.code}),this.json},t}(),Kr=function(t){function e(e){var n,r=d({},e),i=r.symbol,o=r.properties,a=r.id;return delete r.symbol,delete r.id,delete r.properties,n=t.call(this,r)||this,i&&n.setSymbol(i),o&&n.setProperties(o),p(a)||n.setId(a),n}fe(e,t);var n=e.prototype;return n.getFirstCoordinate=function(){if("GeometryCollection"===this.type){var t=this.getGeometries();return t.length?t[0].getFirstCoordinate():null}var e=this.getCoordinates();if(!Array.isArray(e))return e;do{e=e[0]}while(Array.isArray(e)&&e.length>0);return e},n.getLastCoordinate=function(){if("GeometryCollection"===this.type){var t=this.getGeometries();return t.length?t[t.length-1].getLastCoordinate():null}var e=this.getCoordinates();if(!Array.isArray(e))return e;do{e=e[e.length-1]}while(Array.isArray(e)&&e.length>0);return e},n.addTo=function(t,e){return t.addGeometry(this,e),this},n.getLayer=function(){return this._layer?this._layer:null},n.getMap=function(){return this._layer?this._layer.getMap():null},n.getId=function(){return this._id},n.setId=function(t){var e=this.getId();return this._id=t,this._fireEvent("idchange",{old:e,new:t}),this},n.getProperties=function(){return this.properties?this.properties:this._getParent()?this._getParent().getProperties():null},n.setProperties=function(t){var e=this.properties;return this.properties=v(t)?d({},t):t,this._repaint(),this._fireEvent("propertieschange",{old:e,new:t}),this},n.getType=function(){return this.type},n.getSymbol=function(){var t=this._symbol;return t?Array.isArray(t)?Dt(t):d({},t):null},n.setSymbol=function(t){return this._symbol=this._prepareSymbol(t),this.onSymbolChanged(),this},n.updateSymbol=function(t){if(!t)return this;var e=this._getSymbol();return e=Dt(e||this._getInternalSymbol(),t),this._eventSymbolProperties=t,this.setSymbol(e)},n.getCenter=function(){return this._computeCenter(this._getMeasurer())},n.getExtent=function(){var t=this._getPrjExtent(),e=this._getProjection();if(t&&e){var n=e.unproject(new Rn(t.xmin,t.ymin)),r=e.unproject(new Rn(t.xmax,t.ymax));return new Wn(n,r,e)}return this._computeExtent(this._getMeasurer())},n.getContainerExtent=function(t){var e=this._getPainter();return e?e.getContainerExtent(t):null},n.getSize=function(){var t=this.getContainerExtent();return t?t.getSize():null},n.containsPoint=function(t,e){if(!this.getMap())throw new Error('The geometry is required to be added on a map to perform "containsPoint".');return t instanceof Rn&&(t=this.getMap().coordToContainerPoint(t)),this._containsPoint(t,e)},n._containsPoint=function(t,e){var n=this._getPainter();return!!n&&(p(e)&&this._hitTestTolerance&&(e=this._hitTestTolerance()),n.hitTest(t,e))},n.show=function(){if(this.options.visible=!0,this.getMap()){var t=this._getPainter();t&&t.show(),this._fireEvent("show")}return this},n.hide=function(){if(this.options.visible=!1,this.getMap()){this.onHide();var t=this._getPainter();t&&t.hide(),this._fireEvent("hide")}return this},n.isVisible=function(){if(!this.options.visible)return!1;var t=this._getInternalSymbol();if(!t)return!0;if(Array.isArray(t)){if(!t.length)return!0;for(var e=0,n=t.length;e<n;e++)if(p(t[e].opacity)||t[e].opacity>0)return!0;return!1}return p(t.opacity)||m(t.opacity)&&t.opacity>0},n.getZIndex=function(){return this.options.zIndex||0},n.setZIndex=function(t){var e=this.options.zIndex;return this.options.zIndex=t,this._fireEvent("zindexchange",{old:e,new:t}),this},n.setZIndexSilently=function(t){return this.options.zIndex=t,this},n.bringToFront=function(){var t=this.getLayer();if(!t||!t.getGeoMaxZIndex)return this;var e=t.getGeoMaxZIndex();return this.setZIndex(e+1),this},n.bringToBack=function(){var t=this.getLayer();if(!t||!t.getGeoMinZIndex)return this;var e=t.getGeoMinZIndex();return this.setZIndex(e-1),this},n.translate=function(t,e){if(p(t))return this;var n=new Rn(t,e);if(0===n.x&&0===n.y)return this;var r=this.getCoordinates();if(r)if(Array.isArray(r)){var i=j(r,(function(t){return t.add(n)}));this.setCoordinates(i)}else this.setCoordinates(r.add(n));return this},n.flash=function(t,e,n,r){return et.call(this,t,e,n,r)},n.copy=function(){var t=this.toJSON(),n=e.fromJSON(t);return n.options.visible=!0,n},n.remove=function(){return this.getLayer()?(this._fireEvent("removestart"),this._unbind(),this._fireEvent("removeend"),this._fireEvent("remove"),this):this},n.toGeoJSONGeometry=function(){return this._exportGeoJSONGeometry()},n.toGeoJSON=function(t){t||(t={});var e={type:"Feature",geometry:null};if(p(t.geometry)||t.geometry){var n=this._exportGeoJSONGeometry();e.geometry=n}var r,i=this.getId();return p(i)||(e.id=i),(p(t.properties)||t.properties)&&(r=this._exportProperties()),e.properties=r,e},n.toJSON=function(t){t||(t={});var e=this._toJSON(t);return d(e,this._exportGraphicOptions(t)),e},n.getLength=function(){return this._computeGeodesicLength(this._getMeasurer())},n.getArea=function(){return this._computeGeodesicArea(this._getMeasurer())},n.rotate=function(t,e){if("GeometryCollection"===this.type)return this.getGeometries().forEach((function(n){return n.rotate(t,e)})),this;e=e?new Rn(e):this.getCenter();var n=this._getMeasurer(),r=this.getCoordinates();if(!Array.isArray(r)){if(e.x!==r.x||e.y!==r.y){var i=n._rotate(r,e,t);this.setCoordinates(i)}return this}return j(r,(function(r){return n._rotate(r,e,t)})),this.setCoordinates(r),this},n._getConnectPoints=function(){return[this.getCenter()]},n._initOptions=function(t){var e=d({},t),n=e.symbol,r=e.properties,i=e.id;delete e.symbol,delete e.id,delete e.properties,this.setOptions(e),n&&this.setSymbol(n),r&&this.setProperties(r),p(i)||this.setId(i)},n._bindLayer=function(t){if(this.getLayer())throw new Error("Geometry cannot be added to two or more layers at the same time.");this._layer=t,this._clearCache()},n._prepareSymbol=function(t){if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n++)e.push(Lt(this._checkAndCopySymbol(t[n])));return e}return t?Lt(t=this._checkAndCopySymbol(t)):null},n._checkAndCopySymbol=function(t){var e={};for(var n in t)u[n]&&y(t[n])?e[n]=+t[n]:e[n]=t[n];return e},n._getSymbol=function(){return this._symbol},n._setExternSymbol=function(t){return this._eventSymbolProperties=t,this._externSymbol=this._prepareSymbol(t),this.onSymbolChanged(),this},n._getInternalSymbol=function(){return this._symbol?this._symbol:this._externSymbol?this._externSymbol:this.options.symbol?this.options.symbol:null},n._getPrjExtent=function(){var t=this._getProjection();return this._verifyProjection(),!this._extent&&t&&(this._extent=this._computePrjExtent(t)),this._extent},n._unbind=function(){var t=this.getLayer();t&&(this._animPlayer&&this._animPlayer.finish(),this._clearHandlers(),this._unbindMenu(),this._unbindInfoWindow(),this.isEditing()&&this.endEdit(),this._removePainter(),this.onRemove&&this.onRemove(),t.onRemoveGeometry&&t.onRemoveGeometry(this),delete this._layer,delete this._internalId,delete this._extent)},n._getInternalId=function(){return this._internalId},n._setInternalId=function(t){this._internalId=t},n._getMeasurer=function(){return this._getProjection()?this._getProjection():Qr.getProjectionInstance(this.options.defaultProjection)},n._getProjection=function(){var t=this.getMap();return t?t.getProjection():null},n._verifyProjection=function(){var t=this._getProjection();this._projCode&&t&&this._projCode!==t.code&&this._clearProjection(),this._projCode=t?t.code:this._projCode},n._getExternalResources=function(){return Pt(this._getInternalSymbol())},n._getPainter=function(){var t=this.getLayer();if(!this._painter&&t)if(-1!==o.indexOf(this.type)){if(t.constructor.getCollectionPainterClass){var e=t.constructor.getCollectionPainterClass();this._painter=new e(this)}}else if(t.constructor.getPainterClass){var n=t.constructor.getPainterClass();this._painter=new n(this)}return this._painter},n._getMaskPainter=function(){return this._maskPainter||(this._maskPainter=this.getGeometries&&this.getGeometries()?new Xr(this,!0):new Yr(this)),this._maskPainter},n._removePainter=function(){this._painter&&this._painter.remove(),delete this._painter},n._paint=function(t){this._painter&&this._painter.paint(t)},n._clearCache=function(){delete this._extent},n._clearProjection=function(){delete this._extent},n._repaint=function(){this._painter&&this._painter.repaint()},n.onHide=function(){this.closeMenu(),this.closeInfoWindow()},n.onShapeChanged=function(){this._clearCache(),this._repaint(),this._fireEvent("shapechange")},n.onPositionChanged=function(){this._clearCache(),this._repaint(),this._fireEvent("positionchange")},n.onSymbolChanged=function(){this._painter&&this._painter.refreshSymbol();var t={};this._eventSymbolProperties&&(t.properties=d({},this._eventSymbolProperties),delete this._eventSymbolProperties),this._fireEvent("symbolchange",t)},n.onConfig=function(t){var e;t.properties&&(e=t.properties,delete t.properties);var n=!1;for(var r in t)if(t.hasOwnProperty(r)){var i=r.slice(0,5);if("arrow"===i||"smoot"===i){n=!0;break}}e?(this.setProperties(e),this._repaint()):n&&this._repaint()},n._setParent=function(t){t&&(this._parent=t)},n._getParent=function(){return this._parent},n._fireEvent=function(t,e){this.getLayer()&&this.getLayer()._onGeometryEvent&&(e||(e={}),e.type=t,e.target=this,this.getLayer()._onGeometryEvent(e)),this.fire(t,e)},n._toJSON=function(t){return{feature:this.toGeoJSON(t)}},n._exportGraphicOptions=function(t){var e={};return(p(t.options)||t.options)&&(e.options=this.config()),(p(t.symbol)||t.symbol)&&(e.symbol=this.getSymbol()),(p(t.infoWindow)||t.infoWindow)&&this._infoWinOptions&&(e.infoWindow=this._infoWinOptions),e},n._exportGeoJSONGeometry=function(){var t=this.getCoordinates(),e=Rn.toNumberArrays(t);return{type:this.getType(),coordinates:e}},n._exportProperties=function(){var t=null,e=this.getProperties();return p(e)||(t=v(e)?d({},e):e),t},n.getAltitude=function(){var t=this.getLayer();if(!t)return 0;var e=t.options,n=this.getProperties(),r=e.enableAltitude&&n?n[e.altitudeProperty]:0,i=t.getAltitude?t.getAltitude():0;return Array.isArray(r)?r.map((function(t){return t+i})):r+i},e}(Tn(xn(En(Mn))));Kr.mergeOptions({id:null,visible:!0,interactive:!0,editable:!0,cursor:null,defaultProjection:"EPSG:4326"});var ti={attribution:null,minZoom:null,maxZoom:null,visible:!0,opacity:1,globalCompositeOperation:null,renderer:"canvas",debugOutline:"#0f0",cssFilter:null,forceRenderOnMoving:!1,forceRenderOnZooming:!1,forceRenderOnRotating:!1,hitDetect:!he.mobile},ei=function(t){function e(e,n){var r,i;return n&&(i=n.canvas,delete n.canvas),(r=t.call(this,n)||this)._canvas=i,r.setId(e),n&&(r.setZIndex(n.zIndex),n.mask&&r.setMask(Kr.fromJSON(n.mask))),r}fe(e,t);var n=e.prototype;return n.load=function(){if(!this.getMap())return this;if(this.onLoad()){this._initRenderer();var t=this.getZIndex();p(t)||(this._renderer.setZIndex(t),this.isCanvasRender()||this._renderer.render()),this.onLoadEnd()}return this},n.getId=function(){return this._id},n.setId=function(t){var e=this._id;return p(t)||(t+=""),this._id=t,this.fire("idchange",{old:e,new:t}),this},n.addTo=function(t){return t.addLayer(this),this},n.setZIndex=function(t){return this._zIndex=t,p(t)?delete this.options.zIndex:this.options.zIndex=t,this.map&&this.map._sortLayersByZIndex(),this._renderer&&this._renderer.setZIndex(t),this},n.getZIndex=function(){return this._zIndex||0},n.getMinZoom=function(){var t=this.getMap(),e=this.options.minZoom;return t?Math.max(t.getMinZoom(),e||0):e},n.getMaxZoom=function(){var t=this.getMap(),e=this.options.maxZoom;return t?Math.min(t.getMaxZoom(),p(e)?1/0:e):e},n.getOpacity=function(){return this.options.opacity},n.setOpacity=function(t){return this.config("opacity",t),this},n.isCanvasRender=function(){var t=this._getRenderer();return t&&t instanceof mr},n.getMap=function(){return this.map?this.map:null},n.getProjection=function(){var t=this.getMap();return t?t.getProjection():null},n.bringToFront=function(){var t=this._getLayerList();if(!t.length)return this;var e=t[t.length-1];if(1===t.length||e===this)return this;var n=e.getZIndex();return this.setZIndex(n+1),this},n.bringToBack=function(){var t=this._getLayerList();if(!t.length)return this;var e=t[0];if(1===t.length||e===this)return this;var n=e.getZIndex();return this.setZIndex(n-1),this},n.show=function(){var t=this;if(!this.options.visible){this.options.visible=!0;var e=this.getRenderer();e&&e.show();var n=this.getMap();e&&n?n.once("renderend",(function(){t.fire("show")})):this.fire("show")}return this},n.hide=function(){var t=this;if(this.options.visible){this.options.visible=!1;var e=this.getRenderer();e&&e.hide();var n=this.getMap();e&&n?n.once("renderend",(function(){t.fire("hide")})):this.fire("hide")}return this},n.isVisible=function(){if(m(this.options.opacity)&&this.options.opacity<=0)return!1;var t=this.getMap();if(t){var e=t.getZoom();if(!p(this.options.maxZoom)&&this.options.maxZoom<e||!p(this.options.minZoom)&&this.options.minZoom>e)return!1}return p(this.options.visible)&&(this.options.visible=!0),this.options.visible},n.remove=function(){return this.map&&this.map.removeLayer(this),this},n.getMask=function(){return this._mask},n.setMask=function(t){if(!("Point"===t.type&&t._isVectorMarker()||"Polygon"===t.type||"MultiPolygon"===t.type))throw new Error("Mask for a layer must be a marker with vector marker symbol or a Polygon(MultiPolygon).");if(t._bindLayer(this),"Point"===t.type?t.updateSymbol({markerLineColor:"rgba(0, 0, 0, 0)",markerFillOpacity:0}):t.setSymbol({lineColor:"rgba(0, 0, 0, 0)",polygonOpacity:0}),this._mask=t,this.options.mask=t.toJSON(),!this.getMap()||this.getMap().isZooming())return this;var e=this._getRenderer();return e&&e.setToRedraw&&this._getRenderer().setToRedraw(),this},n.removeMask=function(){if(delete this._mask,delete this.options.mask,!this.getMap()||this.getMap().isZooming())return this;var t=this._getRenderer();return t&&t.setToRedraw&&this._getRenderer().setToRedraw(),this},n.onLoad=function(){return!0},n.onLoadEnd=function(){},n.isLoaded=function(){return!!this._loaded},n.getRenderer=function(){return this._getRenderer()},n.onConfig=function(t){if(m(t.opacity)||t.cssFilter){var e=this.getRenderer();e&&e.setToRedraw()}},n.onAdd=function(){},n.onRendererCreate=function(){},n.onCanvasCreate=function(){},n.onRemove=function(){},n._bindMap=function(t,e){t&&(this.map=t,p(e)||this.setZIndex(e),this._switchEvents("on",this),this.onAdd(),this.fire("add"))},n._initRenderer=function(){var t=this.options.renderer;if(this.constructor.getRendererClass){var e=this.constructor.getRendererClass(t);if(!e)throw new Error("Invalid renderer for Layer("+this.getId()+"):"+t);this._renderer=new e(this),this._renderer.layer=this,this._renderer.setZIndex(this.getZIndex()),this._switchEvents("on",this._renderer),this._renderer.onAdd&&this._renderer.onAdd(),this.onRendererCreate(),this.fire("renderercreate",{renderer:this._renderer})}},n._doRemove=function(){this._loaded=!1,this.onRemove(),this._switchEvents("off",this),this._renderer&&(this._switchEvents("off",this._renderer),this._renderer.remove(),delete this._renderer),delete this.map},n._switchEvents=function(t,e){e&&e.getEvents&&this.getMap()[t](e.getEvents(),e)},n._getRenderer=function(){return this._renderer},n._getLayerList=function(){return this.map?this.map._layers:[]},n._getMask2DExtent=function(){if(!this._mask||!this.getMap())return null;var t=this._mask._getMaskPainter();return t?t.get2DExtent():null},e}(Tn(xn(pr(Mn))));ei.mergeOptions(ti);var ni=ei.prototype.fire;ei.prototype.fire=function(t,e){return"layerload"===t&&(this._loaded=!0),this.map&&(e||(e={}),e.type=t,e.target=this,this.map._onLayerEvent(e)),ni.apply(this,arguments)};var ri={maxVisualPitch:70,maxPitch:80,centerCross:!1,zoomInCenter:!1,zoomOrigin:null,zoomAnimation:!C,zoomAnimationDuration:330,panAnimation:!C,panAnimationDuration:600,zoomable:!0,enableInfoWindow:!0,hitDetect:!he.mobile,hitDetectLimit:5,fpsOnInteracting:25,layerCanvasLimitOnInteracting:-1,maxZoom:null,minZoom:null,maxExtent:null,fixCenterOnResize:!0,checkSize:!0,checkSizeInterval:1e3,renderer:"canvas",cascadePitches:[10,60]},ii=function(t){function e(n,r){var i;if(!r)throw new Error("Invalid options when creating map.");if(!r.center)throw new Error("Invalid center when creating map.");var o=d({},r),a=o.zoom;delete o.zoom;var s=new Rn(o.center);delete o.center;var c=o.baseLayer;delete o.baseLayer;var u=o.layers;return delete o.layers,(i=t.call(this,o)||this).VERSION=e.VERSION,Object.defineProperty(de(de(i)),"id",{value:R(),writable:!1}),i._loaded=!1,i._initContainer(n),i._panels={},i._baseLayer=null,i._layers=[],i._zoomLevel=a,i._center=s,i.setSpatialReference(o.spatialReference||o.view),i.setMaxExtent(o.maxExtent),i._mapViewPoint=new me(0,0),i._initRenderer(),i._updateMapSize(i._getContainerDomSize()),c&&i.setBaseLayer(c),u&&i.addLayer(u),i._Load(),i}fe(e,t),e.addOnLoadHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._onLoadHooks=this.prototype._onLoadHooks||[],this.prototype._onLoadHooks.push(n),this};var n=e.prototype;return n.isLoaded=function(){return!!this._loaded},n.getContainer=function(){return this._containerDOM},n.getSpatialReference=function(){return this._spatialReference},n.setSpatialReference=function(t){var e=this.options.spatialReference;return this._loaded&&Qr.equals(e,t)||this._updateSpatialReference(t,e),this},n._updateSpatialReference=function(t,e){if(t=d({},t),this._center=this.getCenter(),this.options.spatialReference=t,this._spatialReference=new Qr(t),this.options.spatialReference&&_(this.options.spatialReference.projection)){var n=this._spatialReference.getProjection();this.options.spatialReference.projection=n.code}return this._resetMapStatus(),this._fireEvent("spatialreferencechange",{old:e,new:d({},this.options.spatialReference)}),this},n.onConfig=function(t){var e=t.spatialReference||t.view;return p(e)||this._updateSpatialReference(e,null),this},n.getProjection=function(){return this._spatialReference?this._spatialReference.getProjection():null},n.getFullExtent=function(){return this._spatialReference?this._spatialReference.getFullExtent():null},n.setCursor=function(t){return delete this._cursor,this._trySetCursor(t),this._cursor=t,this},n.resetCursor=function(){return this.setCursor(null)},n.getCenter=function(){return this._loaded&&this._prjCenter?this.getProjection().unproject(this._prjCenter):this._center},n.setCenter=function(t){if(!t)return this;t=new Rn(t);var e=this.getProjection().project(t);return this._verifyExtent(e)?this._loaded?(this.onMoveStart(),this._setPrjCenter(e),this.onMoveEnd(this._parseEventFromCoord(this.getCenter())),this):(this._center=t,this):this},n.getSize=function(){return p(this.width)||p(this.height)?this._getContainerDomSize():new ge(this.width,this.height)},n.getContainerExtent=function(){var t=this.height,e=this.getPitch(),n=this.options.maxVisualPitch;return n&&e>n&&(t=this._getVisualHeight(n)),new Zn(0,this.height-t,this.width,this.height)},n._getVisualHeight=function(t){t=t||.01;var e=(90-this.getPitch())*Math.PI/180,n=this.getFov()*Math.PI/180;t*=Math.PI/180;var r=this.cameraCenterDistance/this.getGLScale(),i=Math.tan(n/2),o=r*i/(1/Math.tan(t)-i)/Math.sin(t),a=r*(Math.sin(e)*o/(r+Math.cos(e)*o));return this.height/2+a},n.getExtent=function(){return this._pointToExtent(this._get2DExtent())},n.getProjExtent=function(){var t=this._get2DExtent();return new Wn(this._pointToPrj(t.getMin()),this._pointToPrj(t.getMax()))},n.getPrjExtent=function(){return this.getProjExtent()},n.getMaxExtent=function(){return this.options.maxExtent?new Wn(this.options.maxExtent,this.getProjection()):null},n.setMaxExtent=function(t){if(t){var e=new Wn(t,this.getProjection());this.options.maxExtent=e,this._verifyExtent(this._getPrjCenter())||this._panTo(this._prjMaxExtent().getCenter());var n=this.getProjection();this._prjMaxExtent=e.convertTo((function(t){return n.project(t)}))}else delete this.options.maxExtent,delete this._prjMaxExtent;return this},n.getZoom=function(){return this._zoomLevel},n.getZoomForScale=function(t,e,n){var r=this.getZoom();if(p(e)&&(e=r),1===t&&e===r)return r;var i=this._getResolution(e)/t,o=this.getZoomFromRes(i);if(n)return o;var a=1e-6;return this.getSpatialReference().getZoomDirection()<0?Math.ceil(o-a):Math.floor(o+a)},n.getZoomFromRes=function(t){var e=this._getResolutions(),n=this._getResolution(this.getMinZoom()),r=this._getResolution(this.getMaxZoom());if(n<=r){if(t<=n)return this.getMinZoom();if(t>=r)return this.getMaxZoom()}else{if(t>=n)return this.getMinZoom();if(t<=r)return this.getMaxZoom()}for(var i=e.length,o=0;o<i-1;o++)if(e[o]){var a=e[o+1]-e[o],s=t-e[o];if(N(a)===N(s)&&Math.abs(a)>=Math.abs(s))return o+s/a}return i-1},n.setZoom=function(t,e){return void 0===e&&(e={animation:!0}),isNaN(t)||p(t)||(t=+t,this._loaded&&this.options.zoomAnimation&&e.animation?this._zoomAnimation(t):this._zoom(t)),this},n.getMaxZoom=function(){return p(this.options.maxZoom)?this.getMaxNativeZoom():this.options.maxZoom},n.setMaxZoom=function(t){var e=this.getMaxNativeZoom();return t>e&&(t=e),null!==t&&t<this._zoomLevel&&(this.setZoom(t),t=+t),this.options.maxZoom=t,this},n.getMinZoom=function(){return p(this.options.minZoom)?this._spatialReference.getMinZoom():this.options.minZoom},n.setMinZoom=function(t){if(null!==t){t=+t;var e=this._spatialReference.getMinZoom();t<e&&(t=e),t>this._zoomLevel&&this.setZoom(t)}return this.options.minZoom=t,this},n.getMaxNativeZoom=function(){var t=this.getSpatialReference();return t?t.getMaxZoom():null},n.getGLZoom=function(){return this.getMaxNativeZoom()/2},n.getGLScale=function(t){return p(t)&&(t=this.getZoom()),this._getResolution(t)/this._getResolution(this.getGLZoom())},n.zoomIn=function(){return this.setZoom(this.getZoom()+1)},n.zoomOut=function(){return this.setZoom(this.getZoom()-1)},n.isZooming=function(){return!!this._zooming},n.isInteracting=function(){return this.isZooming()||this.isMoving()||this.isRotating()},n.setCenterAndZoom=function(t,e){return p(e)||this._zoomLevel===e?this.setCenter(t):(this.setCenter(t),this.setZoom(e,{animation:!1})),this},n.getFitZoom=function(t,e){var n=this;if(!(t&&t instanceof Wn))return this._zoomLevel;if(t.xmin===t.xmax&&t.ymin===t.ymax)return this.getMaxZoom();var r=this.getSize(),i=t.convertTo((function(t){return n.coordToContainerPoint(t)})),o=i.getWidth(),a=i.getHeight(),s=r.width/o,c=r.height/a,u=this.getSpatialReference().getZoomDirection()<0?Math.max(s,c):Math.min(s,c);return this.getZoomForScale(u,null,e)},n.getView=function(){return{center:this.getCenter().toArray(),zoom:this.getZoom(),pitch:this.getPitch(),bearing:this.getBearing()}},n.setView=function(t){return t?(t.center&&this.setCenter(t.center),null===t.zoom||isNaN(+t.zoom)||this.setZoom(+t.zoom,{animation:!1}),null===t.pitch||isNaN(+t.pitch)||this.setPitch(+t.pitch),null===t.pitch||isNaN(+t.bearing)||this.setBearing(+t.bearing),this):this},n.getResolution=function(t){return this._getResolution(t)},n.getScale=function(t){var e=p(t)?this.getZoom():t,n=this._getResolution(this.getMaxNativeZoom());return this._getResolution(e)/n},n.fitExtent=function(t,e,n,r){if(void 0===n&&(n={}),!t)return this;t=new Wn(t,this.getProjection());var i=this.getFitZoom(t)+(e||0),o=t.getCenter();return void 0===n.animation||n.animation?this._animateTo({center:o,zoom:i},{duration:n.duration||this.options.zoomAnimationDuration,easing:n.easing||"out"},r):this.setCenterAndZoom(o,i)},n.getBaseLayer=function(){return this._baseLayer},n.setBaseLayer=function(t){var e=!1;return this._baseLayer&&(e=!0,this._fireEvent("baselayerchangestart"),this._baseLayer.remove()),t?(this._baseLayer=t,t._bindMap(this,-1),this._baseLayer.on("layerload",(function(){this._fireEvent("baselayerload"),e&&(e=!1,this._fireEvent("baselayerchangeend"))}),this),this._loaded&&this._baseLayer.load(),this._fireEvent("setbaselayer"),this):(delete this._baseLayer,this._fireEvent("baselayerchangeend"),this._fireEvent("setbaselayer"),this)},n.removeBaseLayer=function(){return this._baseLayer&&(this._baseLayer.remove(),delete this._baseLayer,this._fireEvent("baselayerremove")),this},n.getLayers=function(t){return this._getLayers((function(e){return!(e===this._baseLayer||e.getId().indexOf(i)>=0)&&(!t||t(e))}))},n.getLayer=function(t){if(!t)return null;var e=this._layerCache?this._layerCache[t]:null;if(e)return e;var n=this.getBaseLayer();return n&&n.getId()===t?n:null},n.addLayer=function(t){if(!t)return this;if(!Array.isArray(t))return t=Array.prototype.slice.call(arguments,0),this.addLayer(t);this._layerCache||(this._layerCache={});for(var e=this._layers,n=0,r=t.length;n<r;n++){var i=t[n],o=i.getId();if(p(o))throw new Error("Invalid id for the layer: "+o);if(i.getMap()!==this){if(this._layerCache[o])throw new Error("Duplicate layer id in the map: "+o);this._layerCache[o]=i,i._bindMap(this),e.push(i),this._loaded&&i.load()}}return this._sortLayersByZIndex(),this._fireEvent("addlayer",{layers:t}),this},n.removeLayer=function(t){if(!t)return this;if(!Array.isArray(t))return this.removeLayer([t]);for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];if(i instanceof ei||(i=this.getLayer(i)),i){var o=i.getMap();if(o&&o===this){e.push(i),this._removeLayer(i,this._layers),this._loaded&&i._doRemove();var a=i.getId();this._layerCache&&delete this._layerCache[a]}}}if(e.length>0){var s=this.getRenderer();s&&s.setLayerCanvasUpdated(),this.once("frameend",(function(){e.forEach((function(t){t.fire("remove")}))}))}return this._fireEvent("removelayer",{layers:t}),this},n.sortLayers=function(t){if(!t||!Array.isArray(t))return this;for(var e=[],n=Number.MAX_VALUE,r=0,i=t.length;r<i;r++){var o=t[r];if(y(t[r])&&(o=this.getLayer(o)),!(o instanceof ei&&o.getMap()&&o.getMap()===this))throw new Error("It must be a layer added to this map to order.");o.getZIndex()<n&&(n=o.getZIndex()),e.push(o)}for(var a=0,s=e.length;a<s;a++)e[a].setZIndex(n+a);return this},n.toDataURL=function(t){t||(t={});var e=t.mimeType;e||(e="image/png");var n=t.save,r=this._getRenderer();if(r&&r.toDataURL){var i=t.fileName;i||(i="export");var o=r.toDataURL(e);if(n&&o){var a;if("undefined"!=typeof Blob&&"undefined"!=typeof atob){var s=X(o.replace(/^data:image\/(png|jpeg|jpg);base64,/,""),e);a=URL.createObjectURL(s)}else a=o;var c=document.createElement("a");c.download=i,c.href=a,document.body.appendChild(c),c.click(),document.body.removeChild(c)}return o}return null},n.coordToPoint=function(t,e,n){return this.coordinateToPoint(t,e,n)},n.pointToCoord=function(t,e,n){return this.pointToCoordinate(t,e,n)},n.coordToViewPoint=function(t,e,n){return this.coordinateToViewPoint(t,e,n)},n.viewPointToCoord=function(t,e){return this.viewPointToCoordinate(t,e)},n.coordToContainerPoint=function(t,e,n){return this.coordinateToContainerPoint(t,e,n)},n.containerPointToCoord=function(t,e){return this.containerPointToCoordinate(t,e)},n.containerPointToViewPoint=function(t,e){return e?e.set(t.x,t.y):e=t.copy(),e._sub(this.getViewPoint())},n.viewPointToContainerPoint=function(t,e){return e?e.set(t.x,t.y):e=t.copy(),e._add(this.getViewPoint())},n.checkSize=function(){var t=f()-this._initTime<1500&&0===this.width||0===this.height,e=this._getContainerDomSize(),n=this.height,r=this.width;if(e.width===r&&e.height===n)return this;var i=this.getCenter();if(this.options.fixCenterOnResize)this._updateMapSize(e);else{var o=this._getVisualHeight(this.getPitch()),a=new me(0,this.height-o),s=this._containerPointToPrj(a);this._updateMapSize(e);var c=this._getVisualHeight(this.getPitch()),u=new me(0,this.height-c);this._setPrjCoordAtContainerPoint(s,u),this._mapViewCoord=this._getPrjCenter()}var l=0===e.width||0===e.height||0===r||0===n;return(t||l)&&(this._eventSilence=!0,this.setCenter(i),delete this._eventSilence),this._fireEvent("resize"),this},n.locate=function(t,e,n){return this.getProjection()._locate(new Rn(t),e,n)},n.getMainPanel=function(){return this._getRenderer().getMainPanel()},n.getPanels=function(){return this._panels},n.remove=function(){var t=this;if(this.isRemoved())return this;this._fireEvent("removestart"),this._removeDomEvents(),this._clearHandlers(),this.removeBaseLayer();for(var e=this.getLayers(),n=0;n<e.length;n++)e[n].remove();return this._getRenderer()&&this._getRenderer().remove(),this._containerDOM.childNodes&&this._containerDOM.childNodes.length>0&&Array.prototype.slice.call(this._containerDOM.childNodes,0).filter((function(t){return"maptalks-wrapper"===t.className})).forEach((function(e){return t._containerDOM.removeChild(e)})),delete this._panels,delete this._containerDOM,delete this.renderer,this._fireEvent("removeend"),this._clearAllListeners(),this},n.isRemoved=function(){return!this._containerDOM},n.isMoving=function(){return!!this._moving},n.onMoveStart=function(t){var e=this._getPrjCenter();this._originCenter&&!this._verifyExtent(e)||(this._originCenter=e),this._moving=!0,this._trySetCursor("move"),this._fireEvent("movestart",this._parseEvent(t?t.domEvent:null,"movestart"))},n.onMoving=function(t){this._fireEvent("moving",this._parseEvent(t?t.domEvent:null,"moving"))},n.onMoveEnd=function(t){if(this._moving=!1,this._trySetCursor("default"),this._fireEvent("moveend",t&&t.domEvent?this._parseEvent(t.domEvent,"moveend"):t),!this._verifyExtent(this._getPrjCenter())&&this._originCenter){var e=this._originCenter;this._panTo(e)}},n.onDragRotateStart=function(t){this._dragRotating=!0,this._fireEvent("dragrotatestart",this._parseEvent(t?t.domEvent:null,"dragrotatestart"))},n.onDragRotating=function(t){this._fireEvent("dragrotating",this._parseEvent(t?t.domEvent:null,"dragrotating"))},n.onDragRotateEnd=function(t){this._dragRotating=!1,this._fireEvent("dragrotateend",this._parseEvent(t?t.domEvent:null,"dragrotateend"))},n.isDragRotating=function(){return!!this._dragRotating},n.getRenderer=function(){return this._getRenderer()},n.getDevicePixelRatio=function(){return this.options.devicePixelRatio||he.devicePixelRatio||1},n._initContainer=function(t){if(y(t)){if(this._containerDOM=document.getElementById(t),!this._containerDOM)throw new Error("Invalid container when creating map: '"+t+"'")}else this._containerDOM=t,C&&(this.CanvasClass=this._containerDOM.constructor);if(this._containerDOM.childNodes&&this._containerDOM.childNodes.length>0&&"maptalks-wrapper"===this._containerDOM.childNodes[0].className)throw new Error("Container is already loaded with another map instance, use map.remove() to clear it.")},n._trySetCursor=function(t){return this._cursor||this._priorityCursor||(t||(t="default"),this._setCursorToPanel(t)),this},n._setPriorityCursor=function(t){if(t)this._priorityCursor=t,this._setCursorToPanel(t);else{var e=!1;this._priorityCursor&&(e=!0),delete this._priorityCursor,e&&this.setCursor(this._cursor)}return this},n._setCursorToPanel=function(t){var e=this.getMainPanel();e&&e.style&&e.style.cursor!==t&&(e.style.cursor=t)},n._removeLayer=function(t,e){if(t&&e){var n=e.indexOf(t);n>-1&&e.splice(n,1)}},n._sortLayersByZIndex=function(){if(this._layers){for(var t=0,e=this._layers.length;t<e;t++)this._layers[t]._order=t;this._layers.sort((function(t,e){var n=t.getZIndex()-e.getZIndex();return 0===n?t._order-e._order:n}))}},n._fireEvent=function(t,e){this._eventSilence||(this.fire("_"+t,e),this.fire(t,e))},n._Load=function(){this._resetMapStatus(),this.options.pitch&&(this.setPitch(this.options.pitch),delete this.options.pitch),this.options.bearing&&(this.setBearing(this.options.bearing),delete this.options.bearing),this._loadAllLayers(),this._getRenderer().onLoad(),this._loaded=!0,this._callOnLoadHooks(),this._initTime=f()},n._initRenderer=function(){var t=this.options.renderer,n=e.getRendererClass(t);this._renderer=new n(this),this._renderer.load()},n._getRenderer=function(){return this._renderer},n._loadAllLayers=function(){this._baseLayer&&this._baseLayer.load(),this._eachLayer((function(t){t&&t.load()}),this.getLayers())},n._getLayers=function(t){for(var e=this._baseLayer?[this._baseLayer].concat(this._layers):this._layers,n=[],r=0;r<e.length;r++)t&&!t.call(this,e[r])||n.push(e[r]);return n},n._eachLayer=function(t){if(!(arguments.length<2)){var e=Array.prototype.slice.call(arguments,1);e&&!Array.isArray(e)&&(e=[e]);for(var n=[],r=0,i=e.length;r<i;r++)n=n.concat(e[r]);for(var o=0,a=n.length;o<a;o++)t.call(t,n[o])}},n._onLayerEvent=function(t){t&&"idchange"===t.type&&(delete this._layerCache[t.old],this._layerCache[t.new]=t.target)},n._resetMapStatus=function(){var t=this.getMaxZoom(),e=this.getMinZoom(),n=this._spatialReference.getMaxZoom(),r=this._spatialReference.getMinZoom();(p(t)||-1===t||t>n)&&this.setMaxZoom(n),(p(e)||-1===e||e<r)&&this.setMinZoom(r),(t=this.getMaxZoom())<(e=this.getMinZoom())&&this.setMaxZoom(e),(p(this._zoomLevel)||this._zoomLevel>t)&&(this._zoomLevel=t),this._zoomLevel<e&&(this._zoomLevel=e),delete this._prjCenter;var i=this.getProjection();this._prjCenter=i.project(this._center),this._calcMatrices();var o=this._getRenderer();o&&o.resetContainer()},n._getContainerDomSize=function(){if(!this._containerDOM)return null;var t,e,n=this._containerDOM;if(p(n.width)||p(n.height)){if(p(n.clientWidth)||p(n.clientHeight))throw new Error("can not get size of container");t=parseInt(n.clientWidth,0),e=parseInt(n.clientHeight,0)}else{t=n.width,e=n.height;var r=this.getDevicePixelRatio();1!==r&&n.layer&&(t/=r,e/=r)}return new ge(t,e)},n._updateMapSize=function(t){return this.width=t.width,this.height=t.height,this._getRenderer().updateMapSize(t),this._calcMatrices(),this},n._getPrjCenter=function(){return this._prjCenter},n._setPrjCenter=function(t){this._prjCenter=t,this.isInteracting()&&!this.isMoving()&&(this._mapViewCoord=t),this._calcMatrices()},n._setPrjCoordAtContainerPoint=function(t,e){if(e.x===this.width/2&&e.y===this.height/2)return this;var n=this._containerPointToPoint(e)._sub(this._prjToPoint(this._getPrjCenter())),r=this._pointToPrj(this._prjToPoint(t).sub(n));return this._setPrjCenter(r),this},n._verifyExtent=function(t){if(!t)return!1;var e=this._prjMaxExtent;return!e||e.contains(t)},n._offsetCenterByPixel=function(t){var e=new me(this.width/2-t.x,this.height/2-t.y),n=this._containerPointToPrj(e);return this._setPrjCenter(n),n},n.offsetPlatform=function(t){return t?(this._getRenderer().offsetPlatform(t),this._mapViewCoord=this._getPrjCenter(),this._mapViewPoint=this._mapViewPoint.add(t),this):this._mapViewPoint},n.getViewPoint=function(){var t=this._getViewPointFrameOffset(),e=this.offsetPlatform();return t&&(e=e.add(t)),e},n._resetMapViewPoint=function(){this._mapViewPoint=new me(0,0),this._mapViewCoord=this._getPrjCenter()},n._getResolution=function(t){return void 0!==t&&t!==this._zoomLevel||void 0===this._mapRes?t===this.getGLZoom()&&void 0!==this._mapGlRes?this._mapGlRes:(p(t)&&(t=this._zoomLevel),this._spatialReference.getResolution(t)):this._mapRes},n._getResolutions=function(){return this._spatialReference.getResolutions()},n._prjToPoint=function(t,e,n){return e=p(e)?this.getZoom():e,this._spatialReference.getTransformation().transform(t,this._getResolution(e),n)},n._pointToPrj=function(t,e,n){return e=p(e)?this.getZoom():e,this._spatialReference.getTransformation().untransform(t,this._getResolution(e),n)},n._pointToPoint=function(t,e,n){return n?(n.x=t.x,n.y=t.y):n=t.copy(),p(e)?n:n._multi(this._getResolution(e)/this._getResolution())},n._pointToPointAtZoom=function(t,e,n){return n?(n.x=t.x,n.y=t.y):n=t.copy(),p(e)?n:n._multi(this._getResolution()/this._getResolution(e))},n._containerPointToPrj=function(t,e){return this._pointToPrj(this._containerPointToPoint(t,void 0,e),void 0,e)},n._callOnLoadHooks=function(){var t=e.prototype;if(t._onLoadHooks)for(var n=0,r=t._onLoadHooks.length;n<r;n++)t._onLoadHooks[n].call(this)},e}(En(xn(pr(Mn))));ii.include({coordinateToPoint:function(){var t=new Rn(0,0);return function(e,n,r){var i=this.getProjection().project(e,t);return this._prjToPoint(i,n,r)}}(),pointToCoordinate:function(){var t=new Rn(0,0);return function(e,n,r){var i=this._pointToPrj(e,n,t);return this.getProjection().unproject(i,r)}}(),coordinateToViewPoint:function(){var t=new Rn(0,0);return function(e,n,r){return this._prjToViewPoint(this.getProjection().project(e,t),n,r)}}(),viewPointToCoordinate:function(){var t=new Rn(0,0);return function(e,n){return this.getProjection().unproject(this._viewPointToPrj(e,t),n)}}(),coordinateToContainerPoint:function(){var t=new Rn(0,0);return function(e,n,r){var i=this.getProjection().project(e,t);return this._prjToContainerPoint(i,n,r)}}(),containerPointToCoordinate:function(){var t=new Rn(0,0);return function(e,n){var r=this._containerPointToPrj(e,t);return this.getProjection().unproject(r,n)}}(),containerToExtent:function(){var t=new me(0,0),e=new me(0,0);return function(n){var r=new Zn(this._containerPointToPoint(n.getMin(t),void 0,t),this._containerPointToPoint(n.getMax(e),void 0,e));return this._pointToExtent(r)}}(),distanceToPixel:function(){var t=new me(0,0),e=new me(0,0);return function(n,r,i){var o=this.getProjection();if(!o)return null;var a=this.getScale()/this.getScale(i),s=this.getCenter(),c=o.locate(s,n,r),u=this.coordToContainerPoint(s,void 0,t),l=this.coordToContainerPoint(c,void 0,e);return l._sub(u)._multi(a)._abs(),new ge(l.x,l.y)}}(),distanceToPoint:function(){var t=new me(0,0);return function(e,n,r,i){var o=this.getProjection();if(!o)return null;var a=i||this.getCenter(),s=o.locate(a,e,n),c=this.coordToPoint(a,r,t),u=this.coordToPoint(s,r);return u._sub(c)._abs(),u}}(),pixelToDistance:function(){var t=new Rn(0,0),e=new Rn(0,0);return function(n,r){var i=this.getProjection();if(!i)return null;var o=this.getFullExtent(),a=o.top>o.bottom?-1:1,s=t.set(this.width/2+n,this.height/2+a*r),c=this.containerPointToCoord(s,e);return i.measureLength(this.getCenter(),c)}}(),pointToDistance:function(){var t=new me(0,0),e=new Rn(0,0);return function(n,r,i){var o=this.getProjection();if(!o)return null;var a=this._prjToPoint(this._getPrjCenter(),i,t);a._add(n,r);var s=this.pointToCoord(a,i,e);return o.measureLength(this.getCenter(),s)}}(),locateByPoint:function(){var t=new me(0,0);return function(e,n,r){var i=this.coordToContainerPoint(e,void 0,t);return this.containerPointToCoord(i._add(n,r))}}(),_get2DExtent:function(){var t=new me(0,0);return function(e,n){var r,i=this;return void 0!==e&&e!==this._zoomLevel||!this._mapExtent2D?e===this.getGLZoom()&&this._mapGlExtent2D&&(r=this._mapGlExtent2D):r=this._mapExtent2D,r?n?(n.set(r.xmin,r.ymin,r.xmax,r.ymax),n):r.copy():this.getContainerExtent().convertTo((function(n){return i._containerPointToPoint(n,e,t)}),n)}}(),_pointToExtent:function(){var t=new Rn(0,0),e=new Rn(0,0);return function(n){var r=n.getMin(),i=n.getMax(),o=this.getFullExtent(),a=!o||o.left<=o.right?[r.x,i.x]:[i.x,r.x],s=a[0],c=a[1],u=!o||o.top>o.bottom?[i.y,r.y]:[r.y,i.y],l=u[0],h=u[1],f=r.set(s,h),d=i.set(c,l);return new Wn(this.pointToCoord(f,void 0,t),this.pointToCoord(d,void 0,e),this.getProjection())}}(),_getViewPointFrameOffset:function(){var t=new me(0,0);return function(){if(this.isZooming())return null;var e=this._getPrjCenter();return this._mapViewCoord&&!this._mapViewCoord.equals(e)?this._prjToContainerPoint(this._mapViewCoord)._sub(this._prjToContainerPoint(e,void 0,t)):null}}(),_viewPointToPrj:function(){var t=new me(0,0);return function(e,n){return this._containerPointToPrj(this.viewPointToContainerPoint(e,t),n)}}(),_prjToContainerPoint:function(){var t=new me(0,0);return function(e,n,r,i){return this._pointToContainerPoint(this._prjToPoint(e,n,t),n,i||0,r)}}(),_prjToViewPoint:function(){var t=new me(0,0);return function(e,n,r){var i=this._prjToContainerPoint(e,void 0,t,r);return this.containerPointToViewPoint(i,n)}}(),_viewPointToPoint:function(){var t=new me(0,0);return function(e,n,r){return this._containerPointToPoint(this.viewPointToContainerPoint(e,t),n,r)}}(),_pointToViewPoint:function(){var t=new Rn(0,0);return function(e,n,r){return this._prjToViewPoint(this._pointToPrj(e,n,t),r)}}()}),ii.mergeOptions(ri);var oi=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){this.target&&this.target.on("_dblclick",this._onDoubleClick,this)},n.removeHooks=function(){this.target&&this.target.off("_dblclick",this._onDoubleClick,this)},n._onDoubleClick=function(t){var e=this.target;if(e.options.doubleClickZoom){var n=e.getZoom(),r=t.domEvent.shiftKey?Math.ceil(n)-1:Math.floor(n)+1;e._zoomAnimation(r,t.containerPoint)}},e}(wn);ii.mergeOptions({doubleClickZoom:!0}),ii.addOnLoadHook("addHandler","doubleClickZoom",oi);var ai=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){var t=this.target;if(t){var e=t._panels.mapWrapper||t._containerDOM;this._dragHandler=new Ln(e,{cancelOn:this._cancelOn.bind(this),rightclick:!0}),this._dragHandler.on("mousedown",this._onMouseDown,this).on("dragstart",this._onDragStart,this).on("dragging",this._onDragging,this).on("dragend",this._onDragEnd,this).enable()}},n.removeHooks=function(){this._dragHandler.off("mousedown",this._onMouseDown,this).off("dragstart",this._onDragStart,this).off("dragging",this._onDragging,this).off("dragend",this._onDragEnd,this),this._dragHandler.remove(),delete this._dragHandler},n._cancelOn=function(t){return!(!this.target.isZooming()&&!this._ignore(t))},n._ignore=function(t){return!!t&&(t.domEvent&&(t=t.domEvent),this.target._ignoreEvent(t))},n._onMouseDown=function(t){delete this.startDragTime,delete this._mode,2===t.domEvent.button||t.domEvent.ctrlKey?(this.target.options.dragRotate||this.target.options.dragPitch)&&(this._mode="rotatePitch"):this.target.options.dragPan&&(this._mode="move"),this.target._stopAnim(this.target._mapAnimPlayer),Ge(t.domEvent)},n._onDragStart=function(t){this.startDragTime=f(),"move"===this._mode?this._moveStart(t):"rotatePitch"===this._mode&&this._rotateStart(t)},n._onDragging=function(t){this.target._isEventOutMap(t.domEvent)||("move"===this._mode?this._moving(t):"rotatePitch"===this._mode&&this._rotating(t))},n._onDragEnd=function(t){"move"===this._mode?this._moveEnd(t):"rotatePitch"===this._mode&&this._rotateEnd(t),delete this.startDragTime,delete this.startBearing},n._start=function(t){this.preX=t.mousePos.x,this.preY=t.mousePos.y,this.startX=this.preX,this.startY=this.preY},n._moveStart=function(t){this._start(t);var e=this.target;e.onMoveStart(t);var n=qe(e._getActualEvent(t.domEvent),e.getContainer());this.startPrjCoord=e._containerPointToPrj(n)},n._moving=function(t){if(this.startDragTime){var e=this.target,n=qe(e._getActualEvent(t.domEvent),e.getContainer());e._setPrjCoordAtContainerPoint(this.startPrjCoord,n),e.onMoving(t)}},n._moveEnd=function(t){if(this.startDragTime){var e=this.target,n=f()-this.startDragTime,r=t.mousePos.x,i=t.mousePos.y,o=r-this.startX,a=i-this.startY;this._clear(),e.options.panAnimation&&!t.interupted&&e._verifyExtent(e._getPrjCenter())&&n<280&&Math.abs(a)+Math.abs(o)>5?(n=5*n*(Math.abs(o)+Math.abs(a))/500,e.panBy(new me(o,a),{duration:n})):e.onMoveEnd(t)}},n._rotateStart=function(t){this._start(t),delete this._rotateMode,this.startBearing=this.target.getBearing(),this.target.onDragRotateStart(t),this._db=0},n._rotating=function(t){var e=this.target,n=t.mousePos.x,r=t.mousePos.y,i=e.getPitch(),o=e.getBearing(),a=Math.abs(n-this.preX),s=Math.abs(r-this.preY);if(this._rotateMode||(e.options.dragRotatePitch?this._rotateMode="rotate_pitch":this._rotateMode=a>s?"rotate":a<s?"pitch":"rotate"),!("pitch"===this._rotateMode&&0===i&&s<10)){if(this._rotateMode.indexOf("rotate")>=0&&e.options.dragRotate){var c;c=e.options.dragPitch||a>s?-.6*(this.preX-n):n>e.width/2?.6*(this.preY-r):-.6*(this.preY-r);var u=e.getBearing()+c;this._db=this._db||0,this._db+=c,e.setBearing(u)}this._rotateMode.indexOf("pitch")>=0&&e.options.dragPitch&&e.setPitch(e.getPitch()+.4*(this.preY-r)),this.preX=n,this.preY=r,e.getBearing()===o&&e.getPitch()===i||e.onDragRotating(t)}},n._rotateEnd=function(t){var e=this.target,n=e.getBearing();this._clear();var r=f()-this.startDragTime;if(e.onDragRotateEnd(t),Math.abs(n-this.startBearing)>20&&("rotate"===this._rotateMode||"rotate_pitch"===this._rotateMode)&&!t.interupted&&r<400){var i=e.getBearing();e._animateTo({bearing:i+this._db/2},{easing:"out",duration:800})}},n._clear=function(){delete this.startPrjCoord,delete this.preX,delete this.preY,delete this.startX,delete this.startY},e}(wn);ii.mergeOptions({draggable:!0,dragPan:!0,dragRotatePitch:!0,dragRotate:!0,dragPitch:!0}),ii.addOnLoadHook("addHandler","draggable",ai);var si="mousedown mouseup mousemove click dblclick contextmenu touchstart touchmove touchend",ci=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){var t=this.target,e=t._panels.allLayers||t._containerDOM;rn(e,si,this._identifyGeometryEvents,this)},n.removeHooks=function(){var t=this.target,e=t._panels.allLayers||t._containerDOM;on(e,si,this._identifyGeometryEvents,this)},n._identifyGeometryEvents=function(t,e){var n=this.target;if(!n.isInteracting()&&!n._ignoreEvent(t)){var r=n._getLayers((function(t){return!(!t.identify||!t.options.geometryEvents)}));if(r.length){var i=null,o=e||t.type;if("mousedown"===o||"touchstart"===o&&1===t.touches.length)this._mouseDownTime=f();else if(("click"===o||"touchend"===o)&&this._mouseDownTime){var a=this._mouseDownTime;if(delete this._mouseDownTime,f()-a>300){if("click"===o)return}else"touchend"===o&&(i="click")}var s=t.touches&&t.touches.length>0?t.touches[0]:t.changedTouches&&t.changedTouches.length>0?t.changedTouches[0]:t;if(s){var c=qe(s,n._containerDOM),u=n.containerPointToCoordinate(c);"touchstart"===o&&Ge(t);var l=null,h={includeInternals:!0,filter:function(e){if(!(e instanceof Kr))return!1;var n=e._getEventTypeToFire(t);if("mousemove"===o){if(!l&&e.options.cursor&&(l=e.options.cursor),!e.listens("mousemove")&&!e.listens("mouseover")&&!e.listens("mouseenter"))return!1}else if(!e.listens(n)&&!e.listens(i))return!1;return!0},count:1,coordinate:u,onlyVisible:n.options.onlyVisibleGeometryEvents,layers:r},d=function(e){var r=!0;if("mousemove"===o){var a={};if(e.length>0)for(var s=e.length-1;s>=0;s--){var c=e[s];if(c instanceof Kr){var u=c._getInternalId();a[u]=c,c._onEvent(t),this._prevOverGeos&&this._prevOverGeos.geomap[u]||c._onEvent(t,"mouseenter"),r=c._onEvent(t,"mouseover")}}n._setPriorityCursor(l);var h=this._prevOverGeos&&this._prevOverGeos.geos;if(this._prevOverGeos={geos:e,geomap:a},h&&h.length>0)for(var f=h.length-1;f>=0;f--){var d=h[f];if(d instanceof Kr){var p=h[f]._getInternalId();a[p]||(r=d._onEvent(t,"mouseout"))}}}else{if(!e||!e.length)return;for(var m=e.length-1;m>=0;m--)if(e[m]instanceof Kr){r=e[m]._onEvent(t),i&&e[m]._onEvent(t,i);break}}!1===r&&Ue(t)}.bind(this);"mousemove"===o||"touchmove"===o?this._queryIdentifyTimeout=n.getRenderer().callInNextFrame((function(){n.isInteracting()||n.identify(h,d)})):n.identify(h,d)}}}},e}(wn);ii.mergeOptions({geometryEvents:!0,onlyVisibleGeometryEvents:!0}),ii.addOnLoadHook("addHandler","geometryEvents",ci);var ui=4.000244140625,li=function(t){function e(e){var n;return(n=t.call(this,e)||this)._thisScrollZoom=n._scrollZoom.bind(de(de(n))),n._wheelZoomRate=1/450,n._defaultZoomRate=.01,n._delta=0,n}fe(e,t);var n=e.prototype;return n.addHooks=function(){Fe(this.target._containerDOM,"wheel",this._onWheelScroll,this)},n.removeHooks=function(){Be(this.target._containerDOM,"wheel",this._onWheelScroll)},n._onWheelScroll=function(t){Ge(t),Ue(t);var e=this.target;if(e._ignoreEvent(t)||!e.options.zoomable)return!1;var n=e._containerDOM,r=e._checkZoomOrigin(qe(t,n));return e.options.seamlessZoom?(this._zooming||(this._trackPadSuspect=0,this._ensureTrackpad=!1),this._seamless(t,r)):this._interval(t,r)},n._seamless=function(t,e){var n=t.deltaMode===window.WheelEvent.DOM_DELTA_LINE?60*t.deltaY:t.deltaY;if(n%ui!=0&&(this._ensureTrackpad||(Math.abs(n)<60?this._trackPadSuspect++:this._trackPadSuspect=0,this._trackPadSuspect>=2&&(this._ensureTrackpad=!0)),this._ensureTrackpad&&(n*=14)),t.shiftKey&&n&&(n/=4),this._lastWheelEvent=t,this._delta-=n,!this._zooming&&this._delta){var r=this.target;this._zoomOrigin=e,r.onZoomStart(null,e)}this._start()},n._start=function(){if(this._delta){this._zooming=!0;var t=this.target;this._active||(t.getRenderer().callInNextFrame(this._thisScrollZoom),this._active=!0)}},n._scrollZoom=function(){var t=this;if(this._active=!1,this._delta){var e=Math.abs(this._delta)>ui?this._wheelZoomRate:this._defaultZoomRate,n=2/(1+Math.exp(-Math.abs(this._delta*e)));this._delta<0&&0!==n&&(n=1/n);var r=this.target,i=r.getZoom(),o=r.getZoomForScale(n,i,!0);this._delta=0,r.onZooming(o,this._zoomOrigin),this._timeout&&clearTimeout(this._timeout),this._timeout=setTimeout((function(){t._zooming=!1,delete t._timeout,r.onZoomEnd(r.getZoom(),t._zoomOrigin)}),210)}},n._interval=function(t,e){var n=this,r=this.target;if(this._zooming)return this._requesting++,!1;this._requesting=0;var i=(t.deltaY?-1*t.deltaY:t.wheelDelta?t.wheelDelta:t.detail)>0?1:-1;t.detail&&(i*=-1);var o=r.getZoom(),a=o+i;return(a=r._checkZoom(i>0?Math.ceil(a):Math.floor(a)))===o||(this._zooming=!0,this._delta||(r.onZoomStart(null,e),this._origin=e,this._delta=i,this._startZoom=r.getZoom()),r._animateTo({zoom:a-1*this._delta/2,around:this._origin},{continueOnViewChanged:!0,easing:"linear",duration:90,wheelZoom:!0},(function(e){"finished"===e.state.playState?n._requesting<1||Math.abs(a-n._startZoom)>2||a===r.getMaxZoom()||a===r.getMinZoom()?(r._animateTo({zoom:a,around:n._origin},{continueOnViewChanged:!0,duration:100},(function(t){"running"!==t.state.playState&&(delete n._zooming,delete n._requesting)})),delete n._startZoom,delete n._origin,delete n._delta,n._requesting=0):p(n._requesting)||(delete n._zooming,n._onWheelScroll(t)):"running"!==e.state.playState&&(delete n._zooming,delete n._requesting)}))),!1},e}(wn);ii.mergeOptions({scrollWheelZoom:!0,seamlessZoom:!1}),ii.addOnLoadHook("addHandler","scrollWheelZoom",li);var hi=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){Fe(this.target.getContainer(),"touchstart",this._onTouchStart,this)},n.removeHooks=function(){Be(this.target.getContainer(),"touchstart",this._onTouchStart)},n._onTouchStart=function(t){var e=this.target;if(t.touches&&!(t.touches.length<2)){var n=e.getContainer(),r=qe(t.touches[0],n),i=qe(t.touches[1],n);this.preY=r.y,this._startP1=r,this._startP2=i,this._startDist=r.distanceTo(i),this._startVector=r.sub(i),this._startZoom=e.getZoom(),this._startBearing=e.getBearing(),on(document,"touchmove",this._onTouchMove,this),on(document,"touchend",this._onTouchEnd,this),Fe(document,"touchmove",this._onTouchMove,this),Fe(document,"touchend",this._onTouchEnd,this),Ge(t),e._fireEvent("touchactstart")}},n._onTouchMove=function(t){var e=this.target;if(t.touches&&!(t.touches.length<2)){var n=e.getContainer(),r=qe(t.touches[0],n),i=qe(t.touches[1],n),o=r.sub(this._startP1),a=i.sub(this._startP2),s=r.sub(i),c=r.distanceTo(i)/this._startDist,u=180*s.angleWith(this._startVector)/Math.PI,l=.4*((this.preY||r.y)-r.y);this.preY=r.y;var h={domEvent:t,mousePos:[r,i]};if(this.mode||(e.options.touchRotate&&Math.abs(u)>8?this.mode=e.options.touchZoomRotate?"rotate_zoom":"rotate":e.options.touchPitch&&o.y*a.y>0&&Math.abs(o.y)>10&&Math.abs(a.y)>10?this.mode="pitch":e.options.zoomable&&e.options.touchZoom&&Math.abs(1-c)>.15&&(this.mode=e.options.touchZoomRotate&&e.options.touchRotate?"rotate_zoom":"zoom"),this._startTouching(h)),"zoom"===this.mode||"rotate_zoom"===this.mode){this._scale=c;var f=e._getResolution(this._startZoom)/c,d=e.getZoomFromRes(f);e.onZooming(d,this._Origin)}"rotate"===this.mode||"rotate_zoom"===this.mode?(e.setBearing(this._startBearing+u),e.onDragRotating(h)):"pitch"===this.mode&&(e.setPitch(e.getPitch()+l),e.onDragRotating(h)),e._fireEvent("touchactinging")}},n._startTouching=function(t){var e=this.target;if("zoom"===this.mode||"rotate_zoom"===this.mode){var n=e.getSize();this._Origin=new me(n.width/2,n.height/2),e.onZoomStart(null,this._Origin)}"rotate"!==this.mode&&"pitch"!==this.mode&&"rotate_zoom"!==this.mode||e.onDragRotateStart(t)},n._onTouchEnd=function(t){delete this.preY;var e=this.target;if(on(document,"touchmove",this._onTouchMove,this),on(document,"touchend",this._onTouchEnd,this),"zoom"===this.mode||"rotate_zoom"===this.mode){var n=this._scale,r=e._getResolution(this._startZoom)/n,i=e.getZoomFromRes(r);e.onZoomEnd(i,this._Origin)}"pitch"!==this.mode&&"rotate"!==this.mode&&"rotate_zoom"!==this.mode||e.onDragRotateEnd({domEvent:t}),delete this.mode,e._fireEvent("touchactend")},e}(wn);ii.mergeOptions({touchGesture:!0,touchZoom:!0,touchPitch:!0,touchRotate:!0,touchZoomRotate:!1}),ii.addOnLoadHook("addHandler","touchGesture",hi);var fi="__anim_player",di={in:function(t){return Math.pow(t,2)},out:function(t){return 1-di.in(1-t)},inAndOut:function(t){return 3*t*t-2*t*t*t},linear:function(t){return t},upAndDown:function(t){return t<.5?di.inAndOut(2*t):1-di.inAndOut(2*(t-.5))}},pi=function(t,e){this.state=t,this.styles=e},mi=function(t,e,n,r){this._animation=t,this.options=e,this._onFrame=n,this.playState="idle",this.ready=!0,this.finished=!1,this.target=r},gi={speed:{slow:2e3,normal:1e3,fast:500},_resolveStyles:function(t){if(!t)return null;function e(t){if(!Array.isArray(t))return gi._resolveStyles(t);for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=gi._resolveStyles(t[i]);o&&(e.push(o[0]),n.push(o[1]),r.push(o[2]))}return e.length?[e,n,r]:null}function n(t){var e,n=t;Array.isArray(t)||(n=m(t)?[0,t]:t instanceof me||t instanceof Rn?[new(e=t.constructor)(0,0),t]:[t,t]);var r=n[0],i=n[1];return m(r)&&m(i)?r===i?null:[r,i-r,i]:Array.isArray(r)&&m(r[0])||r instanceof Rn||r instanceof me?(Array.isArray(r)?(r=new Rn(r),i=new Rn(i)):(r=new(e=r.constructor)(r),i=new e(i)),r.equals(i)?null:[r,i.sub(r),i]):[r,i,i]}function r(t){return!Array.isArray(t)&&t.constructor===Object||!(!Array.isArray(t)||t[0].constructor!==Object)}var i={},o={},a={};for(var s in t)if(t.hasOwnProperty(s)){var c,u=t[s];if(!u)continue;if(Array.isArray(u)&&(p(u[0])||p(u[1])))continue;(c=r(u)?e(u):n(u))&&(o[s]=c[0],i[s]=c[1],a[s]=c[2])}return[o,i,a]},framing:function(t,e){e||(e={});var n,r,i,o=e.easing?di[e.easing]:di.linear;return o||(o=di.linear),(t=gi._resolveStyles(t))&&(r=t[0],n=t[1],i=t[2]),function(t,e){var a,s;if(t<0)a={playState:"idle",delta:0},s=r;else if(t<e){var c=o(t/e);a={playState:"running",delta:c},s=function t(e,n,r){if(!n||!r)return null;var o={};for(var a in r)if(r.hasOwnProperty(a)){if(n[a]===i[a]){o[a]=n[a];continue}var s=n[a],c=r[a];if(m(c))o[a]=s+e*c;else if(Array.isArray(c)){for(var u=[],l=0;l<c.length;l++)u.push(t(e,s[l],c[l]));o[a]=u}else{var h=c.constructor;o[a]=h===Object?t(e,s,c):s instanceof me||s instanceof Rn?s.add(c.multi(e)):c}}return o}(c,r,n)}else a={playState:"finished",delta:1},s=i;return a.startStyles=r,a.destStyles=i,a.progress=t,a.remainingMs=e-t,new pi(a,s)}},_requestAnimFrame:function(t){this._frameQueue||(this._frameQueue=[]),this._frameQueue.push(t),this._a()},_a:function(){this._animationFrameId||(this._animationFrameId=T(gi._frameFn))},_run:function(){if(this._frameQueue.length){var t=this._frameQueue;this._frameQueue=[];for(var e=0,n=t.length;e<n;e++)t[e]();this._frameQueue.length?this._animationFrameId=T(gi._frameFn):delete this._animationFrameId}},animate:function(t,e,n,r){e||(e={});var i=gi.framing(t,e);return new mi(i,e,n,r)}};gi._frameFn=gi._run.bind(gi),d(mi.prototype,{_prepare:function(){var t=this.options,e=t.speed||t.duration;y(e)&&((e=gi.speed[e])||(e=+e)),e||(e=gi.speed.normal),this.duration=e,this._framer=t.framer||gi._requestAnimFrame.bind(gi)},play:function(){if("idle"!==this.playState&&"paused"!==this.playState||this.target&&this.target[fi])return this;this.target&&(this.target[fi]=1),"idle"===this.playState&&(this.currentTime=0,this._prepare());var t=f();if(!this.startTime){var e=this.options;this.startTime=e.startTime?e.startTime:t}return this._playStartTime=Math.max(t,this.startTime),"paused"===this.playState&&(this._playStartTime-=this.currentTime),this.playState="running",this._run(),this},pause:function(){return"paused"===this.playState||(this.playState="paused",this._run()),this},cancel:function(){return"idle"===this.playState||(this.playState="idle",this.finished=!1,this._run()),this},finish:function(){return"finished"===this.playState||(this.playState="finished",this.finished=!0,this._run()),this},reverse:function(){},_run:function(){var t=this,e=this._onFrame,n=f(),r=n-this._playStartTime;if(this.options.repeat&&r>=this.duration&&(this._playStartTime=n,r=0),"running"===this.playState){var i=this._animation(r,this.duration);this.playState=i.state.playState,"running"!==this.playState&&this.target&&delete this.target[fi],"idle"===this.playState?this.startTime>n&&setTimeout(this._run.bind(this),this.startTime-n):"running"===this.playState?this._framer((function(){"running"===t.playState&&(t.currentTime=r,e&&e(i),t._run())})):"finished"===this.playState&&(this.finished=!0,e&&e(i))}else if(this.target&&delete this.target[fi],e){"finished"===this.playState?r=this.duration:"idle"===this.playState&&(r=0);var o=this._animation(r,this.duration);o.state.playState=this.playState,e(o)}}});var vi=Object.freeze({Animation:gi,Easing:di,Player:mi,Frame:pi}),yi=vn((function(t){!function(){function e(t,e){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r}function n(t,e,n){var r=e.x,i=e.y,o=n.x-r,a=n.y-i;if(0!==o||0!==a){var s=((t.x-r)*o+(t.y-i)*a)/(o*o+a*a);s>1?(r=n.x,i=n.y):s>0&&(r+=o*s,i+=a*s)}return(o=t.x-r)*o+(a=t.y-i)*a}function r(t,n){for(var r,i=t[0],o=[i],a=1,s=t.length;a<s;a++)e(r=t[a],i)>n&&(o.push(r),i=r);return i!==r&&o.push(r),o}function i(t,e,r,o,a){for(var s,c=o,u=e+1;u<r;u++){var l=n(t[u],t[e],t[r]);l>c&&(s=u,c=l)}c>o&&(s-e>1&&i(t,e,s,o,a),a.push(t[s]),r-s>1&&i(t,s,r,o,a))}function o(t,e){var n=t.length-1,r=[t[0]];return i(t,0,n,e,r),r.push(t[n]),r}function a(t,e,n){if(t.length<=2)return t;var i=void 0!==e?e*e:1;return t=o(t=n?t:r(t,i),i)}t.exports=a,t.exports.default=a}()})),_i=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.getOutline=function(){if(!this._getPainter())return null;var t=this.getExtent();return new bi(t.toArray(),{symbol:{lineWidth:1,lineColor:"6b707b"}})},n.animateShow=function(t,e){var n=this;void 0===t&&(t={}),this._showPlayer&&this._showPlayer.finish(),_(t)&&(e=t={});var r=this.getCoordinates();if(0===r.length)return this;this._animIdx=0,this._animLenSoFar=0,this.show();var i=this.getShell?this.getShell().concat(this.getShell()[0]):this.getCoordinates(),o=this._getProjection(),a=o.projectCoords(i);this._prjAniShowCenter=this._getPrjExtent().getCenter(),this._aniShowCenter=o.unproject(this._prjAniShowCenter);var s=t.duration||1e3,c=t.easing||"out";this.setCoordinates([]);for(var u=0,l=1;l<a.length;l++)u+=a[l].distanceTo(a[l-1]);var h=this._showPlayer=gi.animate({t:s},{duration:s,easing:c},(function(t){if(n.getMap()){var o=n._drawAnimShowFrame(t.styles.t,s,u,i,a);"finished"===t.state.playState&&(delete n._showPlayer,delete n._aniShowCenter,delete n._prjAniShowCenter,delete n._animIdx,delete n._animLenSoFar,delete n._animTailRatio,n.setCoordinates(r)),e&&e(t,o)}else if("finished"!==h.playState&&(h.finish(),e)){var c=n.getCoordinates();e(t,c[c.length-1])}}),this);return h.play(),h},n._drawAnimShowFrame=function(t,e,n,r,i){if(0===t)return r[0];var o,a,s=this._getProjection(),c=t/e*n,u=0;for(o=this._animIdx,a=i.length;o<a-1&&(u=i[o].distanceTo(i[o+1]),!(this._animLenSoFar+u>c));o++)this._animLenSoFar+=u;if(this._animIdx=o,this._animIdx>=a-1)return this.setCoordinates(r),r[r.length-1];var l=this._animIdx,h=i[l],f=i[l+1],d=(c-this._animLenSoFar)/u;this._animTailRatio=d;var p=h.x+(f.x-h.x)*d,m=h.y+(f.y-h.y)*d,g=new Rn(p,m),v=s.unproject(g),y=!!this.getShell;if(!y&&this.options.smoothness>0){var _=r.slice(0,this._animIdx+3);this.setCoordinates(_);var x=i.slice(0,this._animIdx+3);this._setPrjCoordinates(x)}else{var b=r.slice(0,this._animIdx+1);b.push(v);var w=i.slice(0,this._animIdx+1);w.push(g),y?(this.setCoordinates([this._aniShowCenter].concat(b)),this._setPrjCoordinates([this._prjAniShowCenter].concat(w))):(this.setCoordinates(b),this._setPrjCoordinates(w))}return v},n._getCenterInExtent=function(t,e,n){var r=this.getExtent();if(!t.intersects(r))return null;var i=n(e,t);if(0===i.length)return null;var o=0,a=0,s=0;i.forEach((function(t){Array.isArray(t)?t.forEach((function(t){t.point&&(t=t.point),o+=t.x,a+=t.y,s++})):(t.point&&(t=t.point),o+=t.x,a+=t.y,s++)}));var c=new Rn(o,a)._multi(1/s);return c.count=s,c},n._getPath2DPoints=function(t,e,n){if(!U(t))return[];var r=this.getMap(),i=!e&&this._shouldSimplify(),o=this.options.simplifyTolerance*r._getResolution(),a=Array.isArray(t[0]);if(delete this._simplified,i&&!a){var s=t.length;t=yi(t,o,!1),this._simplified=t.length<s}return p(n)&&(n=r.getZoom()),j(t,(function(t){return r._prjToPoint(t,n)}))},n._shouldSimplify=function(){var t=this.getLayer(),e=this.getProperties(),n=e&&t.options.enableAltitude&&!p(e[t.options.altitudeProperty]);return t&&t.options.enableSimplify&&!n&&this.options.enableSimplify&&!this._showPlayer},n._setPrjCoordinates=function(t){this._prjCoords=t,this.onShapeChanged()},n._getPrjCoordinates=function(){return this._verifyProjection(),!this._prjCoords&&this._getProjection()&&(this._prjCoords=this._projectCoords(this._coordinates)),this._prjCoords},n._updateCache=function(){this._clearCache(),this._getProjection()&&this._prjCoords&&(this._coordinates=this._unprojectCoords(this._getPrjCoordinates()))},n._clearProjection=function(){this._prjCoords=null,t.prototype._clearProjection.call(this)},n._projectCoords=function(t){var e=this._getProjection();return e?e.projectCoords(t):[]},n._unprojectCoords=function(t){var e=this._getProjection();return e?e.unprojectCoords(t):[]},n._computeCenter=function(){var t=this._coordinates;if(!U(t))return null;for(var e=0,n=0,r=0,i=t.length,o=0;o<i;o++)t[o]&&m(t[o].x)&&m(t[o].y)&&(e+=t[o].x,n+=t[o].y,r++);return new Rn(e/r,n/r)},n._computeExtent=function(){var t=this._coordinates;if(!U(t))return null;var e=[t];return this.hasHoles&&this.hasHoles()&&e.push.apply(e,this.getHoles()),this._coords2Extent(e,this._getProjection())},n._computePrjExtent=function(){var t=[this._getPrjCoordinates()];return this.hasHoles&&this.hasHoles()&&t.push.apply(t,this._getPrjHoles()),this._coords2Extent(t)},n._get2DLength=function(){for(var t=this._getPath2DPoints(this._getPrjCoordinates(),!0),e=0,n=1,r=t.length;n<r;n++)e+=t[n].distanceTo(t[n-1]);return e},n._hitTestTolerance=function(){var t,e=this._getInternalSymbol();if(Array.isArray(e)){t=0;for(var n=0;n<e.length;n++)m(e[n].lineWidth)&&e[n].lineWidth>t&&(t=e[n].lineWidth)}else t=e.lineWidth;return m(t)?t/2:1.5},n._coords2Extent=function(t,e){for(var n=new Wn(e),r=0,i=t.length;r<i;r++)for(var o=0,a=t[r].length;o<a;o++)n._combine(t[r][o]);return n},e}(Kr);_i.mergeOptions({smoothness:0,enableClip:!0,enableSimplify:!0,simplifyTolerance:2,symbol:{lineColor:"#000",lineWidth:2,lineOpacity:1,polygonFill:"#fff",polygonOpacity:1,opacity:1}});var xi="Polygon",bi=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).type="Polygon",e&&r.setCoordinates(e),r}fe(e,t);var n=e.prototype;return n.setCoordinates=function(t){if(!t)return this._coordinates=null,this._holes=null,this._projectRings(),this;var e=Rn.toCoordinates(t),n=e.length;if(Array.isArray(e[0])){if(this._coordinates=this._trimRing(e[0]),n>1){for(var r=[],i=1;i<n;i++)e[i]&&r.push(this._trimRing(e[i]));this._holes=r}}else this._coordinates=this._trimRing(e);return this._projectRings(),this},n.getCoordinates=function(){if(!this._coordinates)return[];for(var t=this.getHoles(),e=[this._copyAndCloseRing(this._coordinates)],n=0,r=t.length;n<r;n++)e.push(this._copyAndCloseRing(t[n]));return e},n.getCenterInExtent=function(t){return this._getCenterInExtent(t,this.getShell(),_r)},n.getShell=function(){return this._coordinates||[]},n.getHoles=function(){return this._holes||[]},n.hasHoles=function(){return this.getHoles().length>0},n._projectRings=function(){this.getMap()?(this._prjCoords=this._projectCoords(this._coordinates),this._prjHoles=this._projectCoords(this._holes),this.onShapeChanged()):this.onShapeChanged()},n._setPrjCoordinates=function(t){this._prjCoords=t,this.onShapeChanged()},n._cleanRing=function(t){for(var e=t.length-1;e>=0;e--)t[e]||t.splice(e,1)},n._checkRing=function(t){if(this._cleanRing(t),!t||!U(t))return!1;var e=t[t.length-1],n=!0;return t[0].x===e.x&&t[0].y===e.y||(n=!1),n},n._trimRing=function(t){var e=this._checkRing(t);return U(t)&&e&&t.splice(t.length-1,1),t},n._copyAndCloseRing=function(t){t=t.slice(0);var e=this._checkRing(t);return U(t)&&!e?(t.push(t[0].copy()),t):t},n._getPrjShell=function(){return this.getJSONType()===xi?this._getPrjCoordinates():(this._verifyProjection(),this._getProjection()&&!this._prjShell&&(this._prjShell=this._projectCoords(this.getShell())),this._prjShell)},n._getPrjHoles=function(){var t=this._getProjection();return this._verifyProjection(),t&&!this._prjHoles&&(this._prjHoles=this._projectCoords(this.getHoles())),this._prjHoles},n._computeGeodesicLength=function(t){var e=this.getCoordinates();if(!U(e))return 0;for(var n=0,r=0,i=e.length;r<i;r++)n+=t.measureLength(e[r]);return n},n._computeGeodesicArea=function(t){var e=this.getCoordinates();if(!U(e))return 0;for(var n=t.measureArea(e[0]),r=1,i=e.length;r<i;r++)n-=t.measureArea(e[r]);return n},n._updateCache=function(){t.prototype._updateCache.call(this),this._prjHoles&&(this._holes=this._unprojectCoords(this._getPrjHoles()))},n._clearCache=function(){return delete this._prjShell,t.prototype._clearCache.call(this)},n._clearProjection=function(){this._prjHoles&&(this._prjHoles=null),this._prjShell&&(this._prjShell=null),t.prototype._clearProjection.call(this)},e}(_i);function wi(t){return function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.getCoordinates=function(){return this._coordinates},n.setCoordinates=function(t){var e=t instanceof Rn?t:new Rn(t);if(e.equals(this._coordinates))return this;if(this._coordinates=e,!this.getMap())return this.onPositionChanged(),this;var n=this._getProjection();return this._setPrjCoordinates(n.project(this._coordinates)),this},n._getCenter2DPoint=function(t){var e=this.getMap();if(!e)return null;var n=p(t)?e.getZoom():e.getGLZoom(),r=this._getPrjCoordinates();return r?e._prjToPoint(r,n):null},n._getPrjCoordinates=function(){var t=this._getProjection();return this._verifyProjection(),!this._pcenter&&t&&this._coordinates&&(this._pcenter=t.project(this._coordinates)),this._pcenter},n._setPrjCoordinates=function(t){this._pcenter=t,this.onPositionChanged()},n._updateCache=function(){this._clearCache();var t=this._getProjection();this._pcenter&&t&&(this._coordinates=t.unproject(this._pcenter))},n._clearProjection=function(){this._pcenter=null,t.prototype._clearProjection.call(this)},n._computeCenter=function(){return this._coordinates?this._coordinates.copy():null},e}(t)}bi.registerJSONType(xi);var Mi=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).type="Point",e&&r.setCoordinates(e),r}fe(e,t);var n=e.prototype;return n.getOutline=function(){var t=this._getPainter();if(!t)return null;var n=this.getCoordinates(),r=t.getContainerExtent(),i=this.getMap().coordToContainerPoint(n);return new e(n,{symbol:{markerType:"square",markerWidth:r.getWidth(),markerHeight:r.getHeight(),markerLineWidth:1,markerLineColor:"6b707b",markerFill:"rgba(0, 0, 0, 0)",markerDx:r.xmin-(i.x-r.getWidth()/2),markerDy:r.ymin-(i.y-r.getHeight()/2)}})},n._isVectorMarker=function(){var t=this._getInternalSymbol();return!Array.isArray(t)&&Ar.test(t)},n._canEdit=function(){var t=this._getInternalSymbol();return!Array.isArray(t)&&(Ar.test(t)||zr.test(t)||Lr.test(t))},n._containsPoint=function(e,n){var r=this.getContainerExtent();return n&&(r=r.expand(n)),!!r.contains(e)&&(!this.options.hitTestForEvent||t.prototype._containsPoint.call(this,e,n))},n._computeExtent=function(){return Si.call(this,"getCenter")},n._computePrjExtent=function(){return Si.call(this,"_getPrjCoordinates")},n._computeGeodesicLength=function(){return 0},n._computeGeodesicArea=function(){return 0},n._getSprite=function(t,e){return this._getPainter()?this._getPainter().getSprite(t,e):new Yr(this).getSprite(t,e)},e}(wi(Kr));function Si(t){var e=this[t]();return e?new Wn(e,e,this._getProjection()):null}Mi.mergeOptions({symbol:{markerType:"path",markerPath:[{path:"M8 23l0 0 0 0 0 0 0 0 0 0c-4,-5 -8,-10 -8,-14 0,-5 4,-9 8,-9l0 0 0 0c4,0 8,4 8,9 0,4 -4,9 -8,14z M3,9 a5,5 0,1,0,0,-0.9Z",fill:"#DE3333"}],markerPathWidth:16,markerPathHeight:23,markerWidth:24,markerHeight:34},hitTestForEvent:!1}),Mi.registerJSONType("Marker");var Ti=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).type="LineString",e&&r.setCoordinates(e),r}fe(e,t);var n=e.prototype;return n.setCoordinates=function(t){return t?(this._coordinates=Rn.toCoordinates(t),this.getMap()?this._setPrjCoordinates(this._projectCoords(this._coordinates)):this.onShapeChanged(),this):(this._coordinates=null,this._setPrjCoordinates(null),this)},n.getCoordinates=function(){return this._coordinates||[]},n.getCenterInExtent=function(t){return this._getCenterInExtent(t,this.getCoordinates(),vr)},n._computeGeodesicLength=function(t){return t.measureLength(this.getCoordinates())},n._computeGeodesicArea=function(){return 0},e}(_i);Ti.mergeOptions({arrowStyle:null,arrowPlacement:"vertex-last"}),Ti.registerJSONType("LineString");var Ei=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).type="GeometryCollection",r.setGeometries(e),r}fe(e,t);var n=e.prototype;return n.setGeometries=function(t){for(var e=this._checkGeometries(t||[]),n=this._getSymbol(),r=this.config(),i=e.length-1;i>=0;i--)e[i]._initOptions(r),e[i]._setParent(this),e[i]._setEventParent(this),n&&e[i].setSymbol(n);return this._geometries=e,this.getLayer()&&(this._bindGeometriesToLayer(),this.onShapeChanged()),this},n.getGeometries=function(){return this._geometries||[]},n.forEach=function(t,e){for(var n=this.getGeometries(),r=0,i=n.length;r<i;r++)n[r]&&(e?t.call(e,n[r],r):t(n[r],r));return this},n.filter=function(t,n){if(!t)return new e;var r=[],i=_(t),o=i?t:rt(t);return this.forEach((function(t){var e=i?t:ft(t);(n?o.call(n,e):o(e))&&r.push(t)}),this),new e(r)},n.translate=function(t){if(!t)return this;if(this.isEmpty())return this;var e=arguments;return this.forEach((function(t){t&&t.translate&&t.translate.apply(t,e)})),this},n.isEmpty=function(){return!U(this.getGeometries())},n.remove=function(){return this.forEach((function(t){t._unbind()})),Kr.prototype.remove.apply(this,arguments)},n.show=function(){return this.options.visible=!0,this.forEach((function(t){t.show()})),this},n.hide=function(){return this.options.visible=!1,this.forEach((function(t){t.hide()})),this},n.onConfig=function(t){this.forEach((function(e){e.config(t)}))},n.getSymbol=function(){var e=t.prototype.getSymbol.call(this);if(!e){var n=[],r=!1;this.forEach((function(t){t.getSymbol()&&!r&&(r=!0),n.push(t.getSymbol())})),r&&(e={children:n})}return e},n.setSymbol=function(t){if(t&&t.children)this._symbol=null,this.forEach((function(e,n){e.setSymbol(t.children[n])}));else{var e=this._prepareSymbol(t);this._symbol=e,this.forEach((function(t){t.setSymbol(e)}))}return this.onSymbolChanged(),this},n._setExternSymbol=function(t){return t=this._prepareSymbol(t),this._externSymbol=t,this.forEach((function(e){e._setExternSymbol(t)})),this.onSymbolChanged(),this},n._bindLayer=function(){t.prototype._bindLayer.apply(this,arguments),this._bindGeometriesToLayer()},n._bindGeometriesToLayer=function(){var t=this.getLayer();this.forEach((function(e){e._bindLayer(t)}))},n._checkGeometries=function(t){var e="The geometry added to collection is invalid.";if(t&&!Array.isArray(t)){if(t instanceof Kr)return[t];throw new Error(e)}for(var n=0,r=t.length;n<r;n++)if(!this._checkGeo(t[n]))throw new Error(e+" Index: "+n);return t},n._checkGeo=function(t){return t instanceof Kr},n._updateCache=function(){this._clearCache(),this.isEmpty()||this.forEach((function(t){t&&t._updateCache&&t._updateCache()}))},n._removePainter=function(){this._painter&&this._painter.remove(),delete this._painter,this.forEach((function(t){t._removePainter()}))},n._computeCenter=function(t){if(!t||this.isEmpty())return null;for(var e=0,n=0,r=0,i=this.getGeometries(),o=0,a=i.length;o<a;o++)if(i[o]){var s=i[o]._computeCenter(t);s&&(e+=s.x,n+=s.y,r++)}return 0===r?null:new Rn(e/r,n/r)},n._containsPoint=function(t,e){if(this.isEmpty())return!1;for(var n=this.getGeometries(),r=0,i=n.length;r<i;r++)if(n[r]._containsPoint(t,e))return!0;return!1},n._computeExtent=function(t){return Ci.call(this,t,"_computeExtent")},n._computePrjExtent=function(t){return Ci.call(this,t,"_computePrjExtent")},n._computeGeodesicLength=function(t){if(!t||this.isEmpty())return 0;for(var e=this.getGeometries(),n=0,r=0,i=e.length;r<i;r++)e[r]&&(n+=e[r]._computeGeodesicLength(t));return n},n._computeGeodesicArea=function(t){if(!t||this.isEmpty())return 0;for(var e=this.getGeometries(),n=0,r=0,i=e.length;r<i;r++)e[r]&&(n+=e[r]._computeGeodesicArea(t));return n},n._exportGeoJSONGeometry=function(){var t=[];if(!this.isEmpty())for(var e=this.getGeometries(),n=0,r=e.length;n<r;n++)e[n]&&t.push(e[n]._exportGeoJSONGeometry());return{type:"GeometryCollection",geometries:t}},n._clearProjection=function(){if(!this.isEmpty())for(var t=this.getGeometries(),e=0,n=t.length;e<n;e++)t[e]&&t[e]._clearProjection()},n._getConnectPoints=function(){var t=this.getExtent();return[new Rn(t.xmin,t.ymax),new Rn(t.xmax,t.ymin),new Rn(t.xmin,t.ymin),new Rn(t.xmax,t.ymax)]},n._getExternalResources=function(){if(this.isEmpty())return[];for(var t,e,n=this.getGeometries(),r=[],i={},o=0,a=n.length;o<a;o++)if(n[o])for(var s=0,c=(t=Pt(n[o]._getInternalSymbol())).length;s<c;s++)i[e=t[s].join()]||(r.push(t[s]),i[e]=1);return r},n.startEdit=function(t){var e=this;if(this.isEmpty())return this;t||(t={}),t.symbol&&(this._originalSymbol=this.getSymbol(),this.setSymbol(t.symbol)),this._draggbleBeforeEdit=this.options.draggable,this.config("draggable",!1);for(var n=this.getGeometries(),r=0,i=n.length;r<i;r++)n[r].startEdit(t);return this._editing=!0,this.hide(),setTimeout((function(){e.fire("editstart")}),1),this},n.endEdit=function(){if(this.isEmpty())return this;for(var t=this.getGeometries(),e=0,n=t.length;e<n;e++)t[e].endEdit();return this._originalSymbol&&(this.setSymbol(this._originalSymbol),delete this._originalSymbol),this._editing=!1,this.show(),this.config("draggable",this._draggbleBeforeEdit),this.fire("editend"),this},n.isEditing=function(){return!!this._editing},e}(Kr);function Ci(t,e){if(this.isEmpty())return null;for(var n=this.getGeometries(),r=null,i=0,o=n.length;i<o;i++){var a=n[i];if(a){var s=a[e](t);s&&(r=s.combine(r))}}return r}Ei.registerJSONType("GeometryCollection");var Ai=function(t){function e(e,n,r,i){var o;return(o=t.call(this,null,i)||this).GeometryType=e,o.type=n,o._initData(r),o}fe(e,t);var n=e.prototype;return n.getCoordinates=function(){for(var t=[],e=this.getGeometries(),n=0,r=e.length;n<r;n++){var i=e[n];t.push(i.getShell&&"Polygon"!==i.getJSONType()?[i.getShell()]:i.getCoordinates())}return t},n.setCoordinates=function(t){for(var e=[],n=0,r=(t=t||[]).length;n<r;n++){var i=new this.GeometryType(t[n],this.config());e.push(i)}return this.setGeometries(e),this},n._initData=function(t){(t=t||[]).length&&(t[0]instanceof this.GeometryType?this.setGeometries(t):this.setCoordinates(t))},n._checkGeo=function(t){return t instanceof this.GeometryType},n._exportGeoJSONGeometry=function(){var t=this.getCoordinates(),e=Rn.toNumberArrays(t);return{type:this.getType(),coordinates:e}},e}(Ei),Pi=function(t){function e(e,n){return t.call(this,Mi,"MultiPoint",e,n)||this}return fe(e,t),e.prototype.findClosest=function(t){if(!t)return null;var e=this.getCoordinates(),n=null,r=1/0;return e.forEach((function(e){var i=function(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}(e,t);i<r&&(n=e,r=i)})),n},e}(Ai);Pi.registerJSONType("MultiPoint");var Li=function(t){function e(){return t.apply(this,arguments)||this}return fe(e,t),e.prototype.getCenterInExtent=function(t){var e=this.getGeometries(),n=0,r=0,i=0;return e.forEach((function(e){var o=e.getCenterInExtent(t);o&&(n+=o.x*o.count,r+=o.y*o.count,i+=o.count)})),0===i?null:new Rn(n,r)._multi(1/i)},e}(Ai),Ri=function(t){function e(e,n){return t.call(this,Ti,"MultiLineString",e,n)||this}return fe(e,t),e}(Li);Ri.registerJSONType("MultiLineString");var Oi=function(t){function e(e,n){return t.call(this,bi,"MultiPolygon",e,n)||this}return fe(e,t),e}(Li);Oi.registerJSONType("MultiPolygon");var ki={Marker:Mi,LineString:Ti,Polygon:bi,MultiPoint:Pi,MultiLineString:Ri,MultiPolygon:Oi},Ii={toGeometry:function(t,e){if(y(t)&&(t=k(t)),Array.isArray(t)){for(var n=[],r=0,i=t.length;r<i;r++){var o=Ii._convert(t[r],e);Array.isArray(o)?I(n,o):n.push(o)}return n}return Ii._convert(t,e)},_convert:function(t,e){if(!t||p(t.type))return null;var n=t.type;if("Feature"===n){var r=t.geometry,i=Ii._convert(r);return i?(i.setId(t.id),i.setProperties(t.properties),e&&e(i),i):null}if("FeatureCollection"===n){var o=t.features;return o?Ii.toGeometry(o,e):null}if(["Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon"].indexOf(n)>=0){var a=new ki["Point"===n?"Marker":n](t.coordinates);return e&&e(a),a}if("GeometryCollection"===n){var s=t.geometries;if(!U(s)){var c=new Ei;return e&&e(c),c}for(var u=[],l=s.length,h=0;h<l;h++)u.push(Ii._convert(s[h]));var f=new Ei(u);return e&&e(f),f}return null}},Di=function(t){function e(e,n,r){var i;return i=t.call(this,null,r)||this,e&&i.setCoordinates(e),i._radius=n,i}fe(e,t),e.fromJSON=function(t){var n=t.feature,r=new e(t.coordinates,t.radius,t.options);return r.setProperties(n.properties),r};var n=e.prototype;return n.getRadius=function(){return this._radius},n.setRadius=function(t){return this._radius=t,this.onShapeChanged(),this},n.getShell=function(){for(var t,e,n,r=this._getMeasurer(),i=this.getCoordinates(),o=this.options.numberOfShellPoints,a=this.getRadius(),s=[],c=0,u=o-1;c<u;c++){t=360*c/u*Math.PI/180,e=a*Math.cos(t),n=a*Math.sin(t);var l=r.locate(i,e,n);s.push(l)}return s.push(s[0]),s},n.getHoles=function(){return[]},n.animateShow=function(){return this.show()},n._containsPoint=function(e,n){var r=this.getMap();if(r.getPitch())return t.prototype._containsPoint.call(this,e,n);var i=r._pointToContainerPoint(this._getCenter2DPoint()),o=this.getSize(),a=p(n)?this._hitTestTolerance():n,s=i.add(o.width/2,o.height/2);return wr(e,i,s,a)},n._computePrjExtent=function(t){var e=this._getMinMax(t);if(!e)return null;var n=this._getPrjCoordinates(),r=e.map((function(e){return t.project(e)})),i=r[0].x-n.x,o=r[1].x-n.x,a=r[2].y-n.y,s=r[3].y-n.y;return new Wn(n.add(i,a),n.add(o,s))},n._computeExtent=function(t){var e=this._getMinMax(t);return e?new Wn(e[0].x,e[2].y,e[1].x,e[3].y,this._getProjection()):null},n._getMinMax=function(t){if(!t||!this._coordinates||p(this._radius))return null;var e=this._radius;return[t.locate(this._coordinates,-e,0),t.locate(this._coordinates,e,0),t.locate(this._coordinates,0,e),t.locate(this._coordinates,0,-e)]},n._computeGeodesicLength=function(){return p(this._radius)?0:2*Math.PI*this._radius},n._computeGeodesicArea=function(){return p(this._radius)?0:Math.PI*Math.pow(this._radius,2)},n._exportGeoJSONGeometry=function(){return{type:"Polygon",coordinates:Rn.toNumberArrays([this.getShell()])}},n._toJSON=function(t){var e=this.getCenter(),n=d({},t);n.geometry=!1;var r=this.toGeoJSON(n);return r.geometry={type:"Polygon"},{feature:r,subType:"Circle",coordinates:[e.x,e.y],radius:this.getRadius()}},e}(wi(bi));Di.mergeOptions({numberOfShellPoints:60}),Di.registerJSONType("Circle");var ji=function(t){function e(e,n,r,i){var o;return o=t.call(this,null,i)||this,e&&o.setCoordinates(e),o.width=n,o.height=r,o}fe(e,t),e.fromJSON=function(t){var n=t.feature,r=new e(t.coordinates,t.width,t.height,t.options);return r.setProperties(n.properties),r};var n=e.prototype;return n.getWidth=function(){return this.width},n.setWidth=function(t){return this.width=t,this.onShapeChanged(),this},n.getHeight=function(){return this.height},n.setHeight=function(t){return this.height=t,this.onShapeChanged(),this},n.getShell=function(){for(var t,e,n,r,i=this._getMeasurer(),o=this.getCoordinates(),a=this.options.numberOfShellPoints,s=this.getWidth(),c=this.getHeight(),u=[],l=Math.pow(s/2,2)*Math.pow(c/2,2),h=Math.pow(s/2,2),f=Math.pow(c/2,2),d=0;d<a;d++){e=(t=360*d/a)*Math.PI/180,n=Math.sqrt(l/(h*Math.pow(Math.tan(e),2)+f)),r=Math.sqrt(l/(f*Math.pow(1/Math.tan(e),2)+h)),t>90&&t<270&&(n*=-1),t>180&&t<360&&(r*=-1);var p=i.locate(o,n,r);u.push(p)}return u},n.getHoles=function(){return[]},n.animateShow=function(){return this.show()},n._containsPoint=function(e,n){var r=this.getMap();if(r.isTransforming())return t.prototype._containsPoint.call(this,e,n);var i=r.getProjection(),o=p(n)?this._hitTestTolerance():n,a=i.projectCoords([this._coordinates,r.locate(this._coordinates,this.getWidth()/2,this.getHeight()/2)]);return wr(e,r._prjToContainerPoint(a[0]),r._prjToContainerPoint(a[1]),o)},n._computePrjExtent=function(){return Di.prototype._computePrjExtent.apply(this,arguments)},n._computeExtent=function(){return Di.prototype._computeExtent.apply(this,arguments)},n._getMinMax=function(t){if(!t||!this._coordinates||p(this.width)||p(this.height))return null;var e=this.getWidth(),n=this.getHeight();return[t.locate(this._coordinates,-e/2,0),t.locate(this._coordinates,e/2,0),t.locate(this._coordinates,0,-n/2),t.locate(this._coordinates,0,n/2)]},n._computeGeodesicLength=function(){if(p(this.width)||p(this.height))return 0;var t=this.width>this.height?this.width:this.height;return 2*Math.PI*t/2-4*Math.abs(this.width-this.height)},n._computeGeodesicArea=function(){return p(this.width)||p(this.height)?0:Math.PI*this.width*this.height/4},n._exportGeoJSONGeometry=function(){return{type:"Polygon",coordinates:Rn.toNumberArrays([this.getShell()])}},n._toJSON=function(t){var e=d({},t),n=this.getCenter();e.geometry=!1;var r=this.toGeoJSON(e);return r.geometry={type:"Polygon"},{feature:r,subType:"Ellipse",coordinates:[n.x,n.y],width:this.getWidth(),height:this.getHeight()}},e}(wi(bi));ji.mergeOptions({numberOfShellPoints:80}),ji.registerJSONType("Ellipse");var zi=function(t){function e(e,n,r,i){var o;return o=t.call(this,null,i)||this,e&&o.setCoordinates(e),o._width=n,o._height=r,o}fe(e,t),e.fromJSON=function(t){var n=t.feature,r=new e(t.coordinates,t.width,t.height,t.options);return r.setProperties(n.properties),r};var n=e.prototype;return n.getCoordinates=function(){return this._coordinates},n.setCoordinates=function(t){if(this._coordinates=t instanceof Rn?t:new Rn(t),!this._coordinates||!this.getMap())return this.onPositionChanged(),this;var e=this._getProjection();return this._setPrjCoordinates(e.project(this._coordinates)),this},n.getWidth=function(){return this._width},n.setWidth=function(t){return this._width=t,this.onShapeChanged(),this},n.getHeight=function(){return this._height},n.setHeight=function(t){return this._height=t,this.onShapeChanged(),this},n.getShell=function(){var t=this._getMeasurer(),e=this._coordinates,n=this.getMap(),r=1,i=-1;if(n){var o=n.getFullExtent();o.left>o.right&&(r=-1),o.bottom>o.top&&(i=1)}var a=[];return a.push(e),a.push(t.locate(e,r*this._width,0)),a.push(t.locate(e,r*this._width,i*this._height)),a.push(t.locate(e,0,i*this._height)),a.push(e),a},n.getHoles=function(){return[]},n.animateShow=function(){return this.show()},n._getPrjCoordinates=function(){var t=this._getProjection();return this._verifyProjection(),!this._pnw&&t&&this._coordinates&&(this._pnw=t.project(this._coordinates)),this._pnw},n._setPrjCoordinates=function(t){this._pnw=t,this.onPositionChanged()},n._getPrjShell=function(){var e=t.prototype._getPrjShell.call(this),n=this._getProjection();if(!n.isSphere())return e;for(var r=n.getSphereExtent(),i=r.sx,o=r.sy,a=this._getProjection().getCircum(),s=e[0],c=1,u=e.length;c<u;c++){var l=e[c],h=0,f=0;i*(s.x-l.x)>0&&(h=a.x*i),o*(s.y-l.y)<0&&(f=a.y*o),e[c]._add(h,f)}return e},n._updateCache=function(){this._clearCache();var t=this._getProjection();this._pnw&&t&&(this._coordinates=t.unproject(this._pnw))},n._clearProjection=function(){this._pnw=null,t.prototype._clearProjection.call(this)},n._computeCenter=function(t){return t.locate(this._coordinates,this._width/2,-this._height/2)},n._containsPoint=function(e,n){var r=this.getMap();if(r.isTransforming())return t.prototype._containsPoint.call(this,e,n);var i=p(n)?this._hitTestTolerance():n,o=r._getResolution()*i,a=this._getPrjExtent().expand(o),s=r._containerPointToPrj(e);return a.contains(s)},n._computePrjExtent=function(t){var e=this._getSouthEast(t);if(!e)return null;var n=t.projectCoords([new Rn(this._coordinates.x,e.y),new Rn(e.x,this._coordinates.y)]);return new Wn(n[0],n[1])},n._computeExtent=function(t){var e=this._getSouthEast(t);return e?new Wn(this._coordinates,e,this._getProjection()):null},n._getSouthEast=function(t){if(!t||!this._coordinates||p(this._width)||p(this._height))return null;var e=this.getWidth(),n=-this.getHeight();if(t.fullExtent){var r=t.fullExtent;e*=r.right>r.left?1:-1,n*=r.top>r.bottom?1:-1}return t.locate(this._coordinates,e,n)},n._computeGeodesicLength=function(){return p(this._width)||p(this._height)?0:2*(this._width+this._height)},n._computeGeodesicArea=function(){return p(this._width)||p(this._height)?0:this._width*this._height},n._exportGeoJSONGeometry=function(){return{type:"Polygon",coordinates:Rn.toNumberArrays([this.getShell()])}},n._toJSON=function(t){var e=d({},t),n=this.getCoordinates();e.geometry=!1;var r=this.toGeoJSON(e);return r.geometry={type:"Polygon"},{feature:r,subType:"Rectangle",coordinates:[n.x,n.y],width:this.getWidth(),height:this.getHeight()}},e}(bi);zi.registerJSONType("Rectangle");var Ni=function(t){function e(e,n,r,i,o){var a;return(a=t.call(this,e,n,o)||this).startAngle=r,a.endAngle=i,a}fe(e,t),e.fromJSON=function(t){var n=t.feature,r=new e(t.coordinates,t.radius,t.startAngle,t.endAngle,t.options);return r.setProperties(n.properties),r};var n=e.prototype;return n.getStartAngle=function(){return this.startAngle},n.setStartAngle=function(t){return this.startAngle=t,this.onShapeChanged(),this},n.getEndAngle=function(){return this.endAngle},n.setEndAngle=function(t){return this.endAngle=t,this.onShapeChanged(),this},n.getShell=function(){for(var t,e,n,r=this._getMeasurer(),i=this.getCoordinates(),o=this.options.numberOfShellPoints-2,a=this.getRadius(),s=[i.copy()],c=this.getStartAngle(),u=this.getEndAngle()-c,l=0;l<o;l++){t=(u*l/(o-1)+c)*Math.PI/180,e=a*Math.cos(t),n=a*Math.sin(t);var h=r.locate(i,e,n);s.push(h)}return s.push(i.copy()),s},n._containsPoint=function(e,n){var r=this.getMap();if(r.isTransforming())return t.prototype._containsPoint.call(this,e,n);var i,o=r._pointToContainerPoint(this._getCenter2DPoint()),a=p(n)?this._hitTestTolerance():n,s=this.getSize(),c=o,u=e,l=u.x-c.x,h=c.y-u.y,f=Math.atan2(h,l),d=f<0?360*(f+2*Math.PI)/(2*Math.PI):360*f/(2*Math.PI),m=this.startAngle%360,g=this.endAngle%360;return i=m>g?!(d>g&&d<m):d>=m&&d<=g,u.distanceTo(c)<=s.width/2+a&&i},n._computeGeodesicLength=function(){return p(this._radius)?0:2*Math.PI*this._radius*Math.abs(this.startAngle-this.endAngle)/360+2*this._radius},n._computeGeodesicArea=function(){return p(this._radius)?0:Math.PI*Math.pow(this._radius,2)*Math.abs(this.startAngle-this.endAngle)/360},n._toJSON=function(t){var e=d({},t),n=this.getCenter();e.geometry=!1;var r=this.toGeoJSON(e);return r.geometry={type:"Polygon"},{feature:r,subType:"Sector",coordinates:[n.x,n.y],radius:this.getRadius(),startAngle:this.getStartAngle(),endAngle:this.getEndAngle()}},e}(Di);Ni.mergeOptions({numberOfShellPoints:60}),Ni.registerJSONType("Sector");var Fi=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n._arc=function(t,e,n){for(var r=this.options.arcDegree*Math.PI/180,i=1,o=e.length;i<o;i++){var a=hn._arcBetween(t,e[i-1],e[i],r),s=[e[i-1].x+e[i].x-a[0],e[i-1].y+e[i].y-a[1]];e[i-1].nextCtrlPoint=s,e[i].prevCtrlPoint=s,hn._stroke(t,n)}},n._quadraticCurve=function(t,e){if(e.length<=2)hn._path(t,e);else{var n,r;for(n=2,r=e.length;n<r;n+=2)t.quadraticCurveTo(e[n-1].x,e[n-1].y,e[n].x,e[n].y);if((n-=1)<r)for(;n<r;n++)t.lineTo(e[n].x,e[n].y)}},n._bezierCurve=function(t,e){if(e.length<=3)hn._path(t,e);else{var n,r;for(n=1,r=e.length;n+2<r;n+=3)t.bezierCurveTo(e[n].x,e[n].y,e[n+1].x,e[n+1].y,e[n+2].x,e[n+2].y);if(n<r)for(;n<r;n++)t.lineTo(e[n].x,e[n].y)}},n._getCurveArrowPoints=function(t,e,n,r,i,o){var a,s=e.length;for(a=o;a<s;a+=o){var c=this._getArrowShape(e[a-1],e[a],n,r,i);c&&t.push(c)}if((a-=o)<s-1)for(a+=1;a<s;a++){var u=this._getArrowShape(e[a-1],e[a],n,r,i);u&&t.push(u)}},e}(Ti);Fi.mergeOptions({enableSimplify:!1,enableClip:!1});var Bi=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n._toJSON=function(t){return{feature:this.toGeoJSON(t),subType:"ArcCurve"}},n._paintOn=function(t,e,n){t.beginPath(),this._arc(t,e,n),hn._stroke(t,n),this._paintArrow(t,e,n)},e.fromJSON=function(t){var n=t.feature,r=new e(n.geometry.coordinates,t.options);return r.setProperties(n.properties),r},e}(Fi);Bi.registerJSONType("ArcCurve"),Bi.mergeOptions({arcDegree:90});var Hi=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t),e.fromJSON=function(t){var n=t.feature,r=new e(n.geometry.coordinates,t.options);return r.setProperties(n.properties),r};var n=e.prototype;return n._toJSON=function(t){return{feature:this.toGeoJSON(t),subType:"CubicBezierCurve"}},n._paintOn=function(t,e,n){t.beginPath(),t.moveTo(e[0].x,e[0].y),this._bezierCurve(t,e),hn._stroke(t,n),this._paintArrow(t,e,n)},n._getArrowPoints=function(t,e,n,r,i){return this._getCurveArrowPoints(t,e,n,r,i,3)},e}(Fi);Hi.registerJSONType("CubicBezierCurve");var Gi=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t),e.fromJSON=function(t){var n=t.feature,r=new e(n.geometry.coordinates,t.options);return r.setProperties(n.properties),r};var n=e.prototype;return n._toJSON=function(t){return{feature:this.toGeoJSON(t),subType:"QuadBezierCurve"}},n._paintOn=function(t,e,n){t.beginPath(),t.moveTo(e[0].x,e[0].y),this._quadraticCurve(t,e,n),hn._stroke(t,n),this._paintArrow(t,e,n)},n._getArrowPoints=function(t,e,n,r,i){return this._getCurveArrowPoints(t,e,n,r,i,2)},e}(Fi);Gi.registerJSONType("QuadBezierCurve");var Ui={textFaceName:"monospace",textSize:12,textLineSpacing:8,textWrapCharacter:"\n",textHorizontalAlignment:"middle",textVerticalAlignment:"middle"},Vi={markerType:"square",markerLineColor:"#000",markerLineWidth:2,markerLineOpacity:1,markerFill:"#fff",markerOpacity:1},Wi=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.getContent=function(){return this._content},n.setContent=function(t){var e=this._content;return this._content=_e(t),this._refresh(),this._fireEvent("contentchange",{old:e,new:t}),this},n.onAdd=function(){this._refresh()},n.toJSON=function(){var e=t.prototype.toJSON.call(this);return delete e.symbol,e},n.setSymbol=function(e){if(this._refreshing||!e)return t.prototype.setSymbol.call(this,e);var n=this._parseSymbol(e);if(this.setTextStyle){var r=this.getTextStyle()||{};r.symbol=n[0],this.setTextStyle(r)}else this.setTextSymbol&&this.setTextSymbol(n[0]);if(this.setBoxStyle){var i=this.getBoxStyle()||{};i.symbol=n[1],this.setBoxStyle(i)}else this.setBoxSymbol&&this.setBoxSymbol(n[1]);return this},n._parseSymbol=function(t){var e={},n={};for(var r in t)b(t,r)&&(0===r.indexOf("text")?e[r]=t[r]:n[r]=t[r]);return[e,n]},n._getTextSize=function(t){return Pe(this._content,t).size},n._getInternalSymbol=function(){return this._symbol},n._getDefaultTextSymbol=function(){return d({},Ui)},n._getDefaultBoxSymbol=function(){return d({},Vi)},n._getDefaultPadding=function(){return[12,8]},e}(Mi),Zi=function(t){function e(e,n,r,i,o){var a;return void 0===o&&(o={}),(a=t.call(this,n,o)||this)._content=_e(e),a._width=p(r)?100:r,a._height=p(i)?40:i,o.boxSymbol&&a.setBoxSymbol(o.boxSymbol),o.textStyle&&a.setTextStyle(o.textStyle),a._refresh(),a}fe(e,t);var n=e.prototype;return n.getWidth=function(){return this._width},n.setWidth=function(t){return this._width=t,this._refresh(),this},n.getHeight=function(){return this._height},n.setHeight=function(t){return this._height=t,this._refresh(),this},n.getBoxSymbol=function(){return d({},this.options.boxSymbol)},n.setBoxSymbol=function(t){return this.options.boxSymbol=t?d({},t):t,this.getSymbol()&&this._refresh(),this},n.getTextStyle=function(){return this.options.textStyle?d({},this.options.textStyle):null},n.setTextStyle=function(t){return this.options.textStyle=t?d({},t):t,this.getSymbol()&&this._refresh(),this},e.fromJSON=function(t){var n=t.feature,r=new e(t.content,n.geometry.coordinates,t.width,t.height,t.options);return r.setProperties(n.properties),r.setId(n.id),t.symbol&&r.setSymbol(t.symbol),r},n._toJSON=function(t){return{feature:this.toGeoJSON(t),width:this.getWidth(),height:this.getHeight(),subType:"TextBox",content:this._content}},n._refresh=function(){var t=this.getTextStyle()||{},e=t.padding||[12,8],n=this._width-2*e[0],r=this._height-2*e[1],i=d({},t.symbol||this._getDefaultTextSymbol(),this.options.boxSymbol||this._getDefaultBoxSymbol(),{textName:this._content,markerWidth:this._width,markerHeight:this._height,textHorizontalAlignment:"middle",textVerticalAlignment:"middle",textMaxWidth:n,textMaxHeight:r});t.wrap&&!i.textWrapWidth&&(i.textWrapWidth=n);var o=t.horizontalAlignment;i.textDx=i.markerDx||0;var a=i.markerWidth/2-e[0];"left"===o?(i.textHorizontalAlignment="right",i.textDx=i.textDx-a):"right"===o&&(i.textHorizontalAlignment="left",i.textDx=i.textDx+a);var s=t.verticalAlignment;i.textDy=i.markerDy||0;var c=i.markerHeight/2-e[1];"top"===s?(i.textVerticalAlignment="bottom",i.textDy-=c):"bottom"===s&&(i.textVerticalAlignment="top",i.textDy+=c),this._refreshing=!0,this.updateSymbol(i),delete this._refreshing},e}(Wi);Zi.mergeOptions({textStyle:{wrap:!0,padding:[12,8],verticalAlignment:"middle",horizontalAlignment:"middle"},boxSymbol:null}),Zi.registerJSONType("TextBox");var qi=function(t){function e(e,n,r){var i;return void 0===r&&(r={}),i=t.call(this,n,r)||this,r.textSymbol&&i.setTextSymbol(r.textSymbol),r.boxStyle&&i.setBoxStyle(r.boxStyle),i._content=_e(e),i._refresh(),i}fe(e,t);var n=e.prototype;return n.getBoxStyle=function(){return this.options.boxStyle?d({},this.options.boxStyle):null},n.setBoxStyle=function(t){return this.options.boxStyle=t?d({},t):t,this._refresh(),this},n.getTextSymbol=function(){return d({},this._getDefaultTextSymbol(),this.options.textSymbol)},n.setTextSymbol=function(t){return this.options.textSymbol=t?d({},t):t,this._refresh(),this},e.fromJSON=function(t){var n=t.feature,r=new e(t.content,n.geometry.coordinates,t.options);return r.setProperties(n.properties),r.setId(n.id),t.symbol&&r.setSymbol(t.symbol),r},n._canEdit=function(){return!1},n._toJSON=function(t){return{feature:this.toGeoJSON(t),subType:"Label",content:this._content}},n._refresh=function(){var t=d({},this.getTextSymbol(),{textName:this._content}),e=this.getBoxStyle();if(e){d(t,e.symbol);var n=this._getBoxSize(t),r=n[1],i=e.padding||this._getDefaultPadding(),o=n[0];t.markerWidth=o.width,t.markerHeight=o.height;var a=t.textDx||0,s=t.textDy||0,c=Ce(r,t.textHorizontalAlignment,t.textVerticalAlignment)._add(a,s),u=e.horizontalAlignment||"middle";t.markerDx=c.x,"left"===u?t.markerDx+=t.markerWidth/2-i[0]:"right"===u?t.markerDx-=t.markerWidth/2-r.width-i[0]:t.markerDx+=r.width/2;var l=e.verticalAlignment||"middle";t.markerDy=c.y,"top"===l?t.markerDy+=t.markerHeight/2-i[1]:"bottom"===l?t.markerDy-=t.markerHeight/2-r.height-i[1]:t.markerDy+=r.height/2}this._refreshing=!0,this.updateSymbol(t),delete this._refreshing},n._getBoxSize=function(t){t.markerType||(t.markerType="square");var e,n,r=this.getBoxStyle(),i=this._getTextSize(t),o=r.padding||this._getDefaultPadding();return e=i.width+2*o[0],n=i.height+2*o[1],r.minWidth&&(!e||e<r.minWidth)&&(e=r.minWidth),r.minHeight&&(!n||n<r.minHeight)&&(n=r.minHeight),[new ge(e,n),i]},e}(Wi);qi.mergeOptions({boxStyle:null,textSymbol:null}),qi.registerJSONType("Label");var Yi=function(t){return function(t){function e(){return t.apply(this,arguments)||this}fe(e,t),e._hasConnectors=function(t){return!p(t.__connectors)&&t.__connectors.length>0},e._getConnectors=function(t){return t.__connectors};var n=e.prototype;return n.getConnectSource=function(){return this._connSource},n.setConnectSource=function(t){var e=this._connTarget;return this.onRemove(),this._connSource=t,this._connTarget=e,this.onAdd(),this},n.getConnectTarget=function(){return this._connTarget},n.setConnectTarget=function(t){var e=this._connSource;return this.onRemove(),this._connSource=e,this._connTarget=t,this._updateCoordinates(),this._registerEvents(),this},n._updateCoordinates=function(){var t=this.getMap();if(!t&&this._connSource&&(t=this._connSource.getMap()),!t&&this._connTarget&&(t=this._connTarget.getMap()),t&&this._connSource&&this._connTarget){for(var e,n,r=this._connSource._getConnectPoints(),i=this._connTarget._getConnectPoints(),o=0,a=this.getCoordinates(),s=0,c=r.length;s<c;s++)for(var u=r[s],l=0,h=i.length;l<h;l++){var f=i[l],d=t.computeLength(u,f);0===s&&0===l?(e=u,n=f,o=d):d<o&&(e=u,n=f)}U(a)&&a[0].equals(e)&&a[1].equals(n)||this.setCoordinates([e,n])}},n.onAdd=function(){this._registerEvents(),this._updateCoordinates()},n.onRemove=function(){if(this._connSource&&(this._connSource.__connectors&&D(this,this._connSource.__connectors),this._connSource.off("dragging positionchange",this._updateCoordinates,this).off("remove",this.onRemove,this),this._connSource.off("dragstart mousedown mouseover",this._showConnect,this),this._connSource.off("dragend mouseup mouseout",this.hide,this),this._connSource.off("show",this._showConnect,this).off("hide",this.hide,this),delete this._connSource),this._connTarget&&(D(this,this._connTarget.__connectors),this._connTarget.off("dragging positionchange",this._updateCoordinates,this).off("remove",this.onRemove,this),this._connTarget.off("show",this._showConnect,this).off("hide",this.hide,this),delete this._connTarget),!(this._connSource instanceof Kr&&this._connTarget instanceof Kr)){var t=this.getMap();t&&t.off("movestart moving moveend zoomstart zooming zoomend rotate pitch fovchange spatialreferencechange",this._updateCoordinates,this)}},n._showConnect=function(){this._connSource&&this._connTarget&&this._connSource.isVisible()&&this._connTarget.isVisible()&&(this._updateCoordinates(),this.show())},n._registerEvents=function(){if(this._connSource&&this._connTarget){this._connSource.__connectors||(this._connSource.__connectors=[]),this._connTarget.__connectors||(this._connTarget.__connectors=[]),this._connSource.__connectors.push(this),this._connTarget.__connectors.push(this),this._connSource.on("dragging positionchange",this._updateCoordinates,this).on("remove",this.remove,this),this._connTarget.on("dragging positionchange",this._updateCoordinates,this).on("remove",this.remove,this),this._connSource.on("show",this._showConnect,this).on("hide",this.hide,this),this._connTarget.on("show",this._showConnect,this).on("hide",this.hide,this);var t=this.options.showOn;if(this.hide(),"moving"===t?(this._connSource.on("dragstart",this._showConnect,this).on("dragend",this.hide,this),this._connTarget.on("dragstart",this._showConnect,this).on("dragend",this.hide,this)):"click"===t?(this._connSource.on("mousedown",this._showConnect,this).on("mouseup",this.hide,this),this._connTarget.on("mousedown",this._showConnect,this).on("mouseup",this.hide,this)):"mouseover"===t?(this._connSource.on("mouseover",this._showConnect,this).on("mouseout",this.hide,this),this._connTarget.on("mouseover",this._showConnect,this).on("mouseout",this.hide,this)):this._showConnect(),!(this._connSource instanceof Kr&&this._connTarget instanceof Kr)){var e=this.getMap();e&&e.on("movestart moving moveend zoomstart zooming zoomend rotate pitch fovchange spatialreferencechange",this._updateCoordinates,this)}}},e}(t)},Ji={showOn:"always"},Xi=function(t){function e(e,n,r){var i;return i=t.call(this,null,r)||this,1===arguments.length&&(r=e,e=null,n=null),i._connSource=e,i._connTarget=n,i}return fe(e,t),e}(Yi(Ti));Xi.mergeOptions(Ji),Xi.registerJSONType("ConnectorLine");var $i=function(t){function e(e,n,r){var i;return i=t.call(this,null,r)||this,1===arguments.length&&(r=e,e=null,n=null),i._connSource=e,i._connTarget=n,i}return fe(e,t),e}(Yi(Bi));$i.mergeOptions(Ji),$i.registerJSONType("ArcConnectorLine");var Qi=function(t){function e(e,n,r){var i;n&&!(n instanceof Kr)&&!Array.isArray(n)&&a.indexOf(n.type)<0&&(r=n,n=null),(i=t.call(this,e,r)||this)._maxZIndex=0,i._minZIndex=0,i._initCache(),n&&i.addGeometry(n);var o=i.options.style;return o&&i.setStyle(o),i}fe(e,t);var n=e.prototype;return n.getGeometryById=function(t){return p(t)||""===t?null:this._geoMap[t]?this._geoMap[t]:null},n.getGeometries=function(t,e){if(!t)return this._geoList.slice(0);for(var n,r=[],i=0,o=this._geoList.length;i<o;i++)n=this._geoList[i],(e?t.call(e,n):t(n))&&r.push(n);return r},n.getFirstGeometry=function(){return this._geoList.length?this._geoList[0]:null},n.getLastGeometry=function(){var t=this._geoList.length;return 0===t?null:this._geoList[t-1]},n.getCount=function(){return this._geoList.length},n.getExtent=function(){if(0===this.getCount())return null;var t=new Wn(this.getProjection());return this.forEach((function(e){t._combine(e.getExtent())})),t},n.forEach=function(t,e){for(var n=this._geoList.slice(0),r=0,i=n.length;r<i;r++)e?t.call(e,n[r],r):t(n[r],r);return this},n.filter=function(t,e){var n=[],r=_(t),i=r?t:rt(t);return this.forEach((function(t){var o=r?t:ft(t);(e?i.call(e,o):i(o))&&n.push(t)}),this),n},n.isEmpty=function(){return!this._geoList.length},n.addGeometry=function(t,e){if(!t)return this;if("FeatureCollection"===t.type)return this.addGeometry(Ii.toGeometry(t),e);if(!Array.isArray(t)){var n=arguments.length,r=arguments[n-1];return t=Array.prototype.slice.call(arguments,0,n-1),e=r,r&&v(r)&&("type"in r||r instanceof Kr)&&(t.push(r),e=!1),this.addGeometry(t,e)}if(0===t.length)return this;var i;this._initCache(),e&&(i=new Wn),this._toSort=this._maxZIndex>0;for(var o=[],a=0,s=t.length;a<s;a++){var c=t[a];if(!c)throw new Error("Invalid geometry to add to layer("+this.getId()+") at index:"+a);if(!(c instanceof Kr)&&(c=Kr.fromJSON(c),Array.isArray(c)))for(var u=0,l=c.length;u<l;u++)this._add(c[u],i,a),o.push(c[u]);Array.isArray(c)||(this._add(c,i,a),o.push(c))}var h=this.getMap();if(h&&(this._getRenderer().onGeometryAdd(o),i&&!p(i.xmin))){var f=i.getCenter(),m=h.getFitZoom(i);if(v(e)){var g=_(e.step)?e.step:function(){};h.animateTo({center:f,zoom:m},d({duration:h.options.zoomAnimationDuration,easing:"out"},e),g)}else!0===e&&h.setCenterAndZoom(f,m)}return this.fire("addgeo",{geometries:t}),this},n.getGeoMinZIndex=function(){return this._minZIndex},n.getGeoMaxZIndex=function(){return this._maxZIndex},n._add=function(t,e,n){this._toSort||(this._toSort=0!==t.getZIndex()),this._updateZIndex(t.getZIndex());var r=t.getId();if(!p(r)){if(!p(this._geoMap[r]))throw new Error("Duplicate geometry id in layer("+this.getId()+"):"+r+", at index:"+n);this._geoMap[r]=t}var i=R();t._setInternalId(i),this._geoList.push(t),this.onAddGeometry(t),t._bindLayer(this),t.onAdd&&t.onAdd(),e&&e._combine(t.getExtent()),t._fireEvent("add",{layer:this}),this._cookedStyles&&this._styleGeometry(t)},n.removeGeometry=function(t){if(!Array.isArray(t))return this.removeGeometry([t]);for(var e=t.length-1;e>=0;e--)t[e]instanceof Kr||(t[e]=this.getGeometryById(t[e])),t[e]&&this===t[e].getLayer()&&t[e].remove();return this.fire("removegeo",{geometries:t}),this},n.clear=function(){this._clearing=!0,this.forEach((function(t){t.remove()})),this._geoMap={};var t=this._geoList;return this._geoList=[],this._getRenderer()&&this._getRenderer().onGeometryRemove(t),this._clearing=!1,this.fire("clear"),this},n.onRemoveGeometry=function(t){if(t&&!this._clearing&&this===t.getLayer()&&!p(t._getInternalId())){var e=t.getId();p(e)||delete this._geoMap[e];var n=this._findInList(t);n>=0&&this._geoList.splice(n,1),this._getRenderer()&&this._getRenderer().onGeometryRemove([t])}},n.getStyle=function(){return this.options.style?this.options.style:null},n.setStyle=function(t){return this.options.style=t,t=jt(t),this._cookedStyles=dt(t),this.forEach((function(t){this._styleGeometry(t)}),this),this.fire("setstyle",{style:t}),this},n._styleGeometry=function(t){if(!this._cookedStyles)return!1;for(var e=ft(t),n=0,r=this._cookedStyles.length;n<r;n++)if(!0===this._cookedStyles[n].filter(e))return t._setExternSymbol(this._cookedStyles[n].symbol),!0;return!1},n.removeStyle=function(){return this.options.style?(delete this.options.style,delete this._cookedStyles,this.forEach((function(t){t._setExternSymbol(null)}),this),this.fire("removestyle"),this):this},n.onAddGeometry=function(t){this.getStyle()&&this._styleGeometry(t)},n.hide=function(){for(var t=0,e=this._geoList.length;t<e;t++)this._geoList[t].onHide();return ei.prototype.hide.call(this)},n._initCache=function(){this._geoList||(this._geoList=[],this._geoMap={})},n._updateZIndex=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._maxZIndex=Math.max(this._maxZIndex,Math.max.apply(Math,e)),this._minZIndex=Math.min(this._minZIndex,Math.min.apply(Math,e))},n._sortGeometries=function(){var t=this;this._toSort&&(this._maxZIndex=0,this._minZIndex=0,this._geoList.sort((function(e,n){return t._updateZIndex(e.getZIndex(),n.getZIndex()),t._compare(e,n)})),this._toSort=!1)},n._compare=function(t,e){return t.getZIndex()===e.getZIndex()?t._getInternalId()-e._getInternalId():t.getZIndex()-e.getZIndex()},n._findInList=function(t){var e=this._geoList.length;if(0===e)return-1;this._sortGeometries();for(var n,r=0,i=e-1;r<=i;){if(n=Math.floor((r+i)/2),this._geoList[n]===t)return n;this._compare(this._geoList[n],t)>0?i=n-1:r=n+1}return-1},n._onGeometryEvent=function(t){if(t&&t.target){var e=t.type;"idchange"===e?this._onGeometryIdChange(t):"zindexchange"===e?this._onGeometryZIndexChange(t):"positionchange"===e?this._onGeometryPositionChange(t):"shapechange"===e?this._onGeometryShapeChange(t):"symbolchange"===e?this._onGeometrySymbolChange(t):"show"===e?this._onGeometryShow(t):"hide"===e?this._onGeometryHide(t):"propertieschange"===e&&this._onGeometryPropertiesChange(t)}},n._onGeometryIdChange=function(t){if(t.new!==t.old||!this._geoMap[t.old]||this._geoMap[t.old]!==t.target){if(!p(t.new)){if(this._geoMap[t.new])throw new Error("Duplicate geometry id in layer("+this.getId()+"):"+t.new);this._geoMap[t.new]=t.target}p(t.old)||t.new===t.old||delete this._geoMap[t.old]}},n._onGeometryZIndexChange=function(t){t.old!==t.new&&(this._updateZIndex(t.new),this._toSort=!0,this._getRenderer()&&this._getRenderer().onGeometryZIndexChange(t))},n._onGeometryPositionChange=function(t){this._getRenderer()&&this._getRenderer().onGeometryPositionChange(t)},n._onGeometryShapeChange=function(t){this._getRenderer()&&this._getRenderer().onGeometryShapeChange(t)},n._onGeometrySymbolChange=function(t){this._getRenderer()&&this._getRenderer().onGeometrySymbolChange(t)},n._onGeometryShow=function(t){this._getRenderer()&&this._getRenderer().onGeometryShow(t)},n._onGeometryHide=function(t){this._getRenderer()&&this._getRenderer().onGeometryHide(t)},n._onGeometryPropertiesChange=function(t){this._getRenderer()&&this._getRenderer().onGeometryPropertiesChange(t)},e}(ei);Qi.mergeOptions({drawImmediate:!1});var Ki=new Zn,to={debug:!1,enableSimplify:!0,geometryEvents:!0,defaultIconSize:[20,20],cacheVectorOnCanvas:!0,cacheSvgOnCanvas:he.gecko,enableAltitude:!1,altitudeProperty:"altitude",drawAltitude:!1,altitude:0},eo=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}fe(e,t);var n=e.prototype;return n.onConfig=function(e){if(t.prototype.onConfig.call(this,e),e.enableAltitude||e.drawAltitude||e.altitudeProperty){var n=this.getRenderer();n&&n.setToRedraw&&n.setToRedraw()}},n.identify=function(t,e){void 0===e&&(e={});var n=this.getRenderer();return e.onlyVisible&&n&&n.identify?n.identify(t,e):(t instanceof Rn||(t=new Rn(t)),this._hitGeos(this._geoList,t,e))},n._hitGeos=function(t,e,n){void 0===n&&(n={});for(var r=n.filter,i=n.tolerance,o=[],a=this.getMap(),s=a.coordToPoint(e),c=a._pointToContainerPoint(s,void 0,0,s),u=t.length-1;u>=0;u--){var l=t[u];if(l&&l.isVisible()&&l._getPainter()&&l.options.interactive){if(!(l instanceof Ti&&(l._getArrowStyle()||l instanceof Fi))){var h=l.getContainerExtent(Ki);if(i&&(h=h._expand(i)),!h||!h.contains(c))continue}if(l._containsPoint(c,i)&&(!r||r(l))&&(o.push(l),n.count&&o.length>=n.count))break}}return o},n.getAltitude=function(){return this.options.altitude||0},n.toJSON=function(t){t||(t={});var e={type:this.getJSONType(),id:this.getId(),options:this.config()};if(p(t.geometries)||t.geometries){var n;if(t.clipExtent){var r=this.getMap(),i=r?r.getProjection():null;n=new Wn(t.clipExtent,i)}for(var o=[],a=this.getGeometries(),s=0,c=a.length;s<c;s++){var u=a[s],l=u.getExtent();if(l&&(!n||n.intersects(l))){var h=u.toJSON(t.geometries);o.push(h)}}e.geometries=o}return e},e.fromJSON=function(t){if(!t||"VectorLayer"!==t.type)return null;for(var n=new e(t.id,t.options),r=t.geometries,i=[],o=0;o<r.length;o++){var a=Kr.fromJSON(r[o]);a&&i.push(a)}return n.addGeometry(i),n},e.getPainterClass=function(){return Yr},e.getCollectionPainterClass=function(){return Xr},e}(Qi);eo.mergeOptions(to),eo.registerJSONType("VectorLayer");var no="_map_tool",ro=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addTo=function(t){return t?(this._map=t,t[no]&&t[no].disable(),this.onAdd&&this.onAdd(),this.enable(),t[no]=this,this._fireEvent("add"),this):this},n.getMap=function(){return this._map},n.enable=function(){return!this._map||this._enabled||(this._enabled=!0,this._switchEvents("off"),this._registerEvents(),this.onEnable&&this.onEnable(),this._fireEvent("enable")),this},n.disable=function(){return this._enabled&&this._map?(this._enabled=!1,this._switchEvents("off"),this.onDisable&&this.onDisable(),this._fireEvent("disable"),this):this},n.isEnabled=function(){return!!this._enabled},n.remove=function(){return this._map?(this.disable(),this._map&&(delete this._map[no],delete this._map),this._fireEvent("remove"),this):this},n._registerEvents=function(){this._switchEvents("on")},n._switchEvents=function(t){var e=this.getEvents();e&&this._map[t](e,this)},n._fireEvent=function(t,e){e||(e={}),this.fire(t,e)},e}(xn(Mn)),io={},oo=function(t){function e(e){var n;return(n=t.call(this,e)||this)._checkMode(),n._events={click:n._clickHandler,mousemove:n._mouseMoveHandler,dblclick:n._doubleClickHandler,mousedown:n._mouseDownHandler,mouseup:n._mouseUpHandler},n}fe(e,t),e.registerMode=function(t,e){io[t.toLowerCase()]=e},e.getRegisterMode=function(t){return io[t.toLowerCase()]};var n=e.prototype;return n.getMode=function(){return this.options.mode?this.options.mode.toLowerCase():null},n.setMode=function(t){return this._geometry&&(this._geometry.remove(),delete this._geometry),this._clearStage(),this._switchEvents("off"),this.options.mode=t,this._checkMode(),this.isEnabled()&&(this._switchEvents("on"),this._restoreMapCfg(),this._saveMapCfg()),this},n.getSymbol=function(){return Dt(this.options.symbol||this.options.symbol)},n.setSymbol=function(t){return t?(this.options.symbol=t,this._geometry&&this._geometry.setSymbol(t),this):this},n.getCurrentGeometry=function(){return this._geometry},n.onAdd=function(){this._checkMode()},n.onEnable=function(){if(this._saveMapCfg(),this._drawToolLayer=this._getDrawLayer(),this._clearStage(),this._loadResources(),this.options.autoPanAtEdge){var t=this.getMap();this._mapAutoPanAtEdge=t.options.autoPanAtEdge,this._mapAutoPanAtEdge||t.config({autoPanAtEdge:!0})}return this},n.onDisable=function(){var t=this.getMap();return this._restoreMapCfg(),this.endDraw(),this._map&&(t.removeLayer(this._getDrawLayer()),this.options.autoPanAtEdge&&(this._mapAutoPanAtEdge||t.config({autoPanAtEdge:!1}))),this},n.undo=function(){var t=this._getRegisterMode(),e=t.action;if(!this._shouldRecordHistory(e)||!this._historyPointer)return this;var n=this._clickCoords.slice(0,--this._historyPointer);return t.update(this.getMap().getProjection(),n,this._geometry),this},n.redo=function(){var t=this._getRegisterMode(),e=t.action;if(!this._shouldRecordHistory(e)||p(this._historyPointer)||this._historyPointer===this._clickCoords.length)return this;var n=this._clickCoords.slice(0,++this._historyPointer);return t.update(this.getMap().getProjection(),n,this._geometry),this},n._shouldRecordHistory=function(t){return Array.isArray(t)&&"click"===t[0]&&"mousemove"===t[1]&&"dblclick"===t[2]},n._checkMode=function(){this._getRegisterMode()},n._saveMapCfg=function(){var t=this.getMap();if(this._mapDoubleClickZoom=t.options.doubleClickZoom,t.config({doubleClickZoom:this.options.doubleClickZoom}),this._getRegisterMode().action.indexOf("mousedown")>-1){var e=this.getMap();this._mapDraggable=e.options.draggable,e.config({draggable:!1})}},n._restoreMapCfg=function(){var t=this.getMap();t.config({doubleClickZoom:this._mapDoubleClickZoom}),p(this._mapDraggable)||t.config("draggable",this._mapDraggable),delete this._mapDraggable,delete this._mapDoubleClickZoom},n._loadResources=function(){var t=Pt(this.getSymbol());t.length>0&&this._drawToolLayer._getRenderer().loadResources(t)},n._getProjection=function(){return this._map.getProjection()},n._getRegisterMode=function(){var t=this.getMode(),n=e.getRegisterMode(t);if(!n)throw new Error(t+" is not a valid mode of DrawTool.");return n},n.getEvents=function(){var t=this._getRegisterMode().action,e={};if(Array.isArray(t)){for(var n=0;n<t.length;n++)e[t[n]]=this._events[t[n]];return e}return null},n._mouseDownHandler=function(t){this._createGeometry(t)},n._mouseUpHandler=function(t){this.endDraw(t)},n._clickHandler=function(t){var e=this._getRegisterMode();if(this._geometry){var n=this.getMap()._pointToPrj(t.point2d);p(this._historyPointer)||(this._clickCoords=this._clickCoords.slice(0,this._historyPointer)),this._clickCoords.push(n),this._historyPointer=this._clickCoords.length,t.drawTool=this,e.update(this.getMap().getProjection(),this._clickCoords,this._geometry,t),this._fireEvent("drawvertex",t),e.clickLimit&&e.clickLimit===this._historyPointer&&this.endDraw(t)}else this._createGeometry(t)},n._createGeometry=function(t){var e=this.getMode(),n=this._getRegisterMode(),r=this.getMap()._pointToPrj(t.point2d),i=this.getSymbol();this._geometry||(this._clickCoords=[r],t.drawTool=this,this._geometry=n.create(this.getMap().getProjection(),this._clickCoords,t),i&&"point"!==e?this._geometry.setSymbol(i):this.options.hasOwnProperty("symbol")&&this._geometry.setSymbol(this.options.symbol),this._addGeometryToStage(this._geometry),this._fireEvent("drawstart",t)),"point"===e&&this.endDraw(t)},n._mouseMoveHandler=function(t){var e=this.getMap();if(this._geometry&&e&&!e.isInteracting()){var n=this._getMouseContainerPoint(t);if(this._isValidContainerPoint(n)){var r=this.getMap()._pointToPrj(t.point2d),i=e.getProjection();t.drawTool=this;var o=this._getRegisterMode();if(this._shouldRecordHistory(o.action)){var a=this._clickCoords.slice(0,this._historyPointer);if(a&&a.length>0&&r.equals(a[a.length-1]))return;o.update(i,a.concat([r]),this._geometry,t)}else o.update(i,r,this._geometry,t);this._fireEvent("mousemove",t)}}},n._doubleClickHandler=function(t){if(this._geometry){var e=this._getMouseContainerPoint(t);if(this._isValidContainerPoint(e)){var n=this._getRegisterMode(),r=this._clickCoords;if(!(r.length<2)){for(var i=this.getMap().getProjection(),o=[r[0]],a=1,s=r.length;a<s;a++)r[a].x===r[a-1].x&&r[a].y===r[a-1].y||o.push(r[a]);o.length<2||this._geometry&&this._geometry instanceof bi&&o.length<3||(t.drawTool=this,n.update(i,o,this._geometry,t),this.endDraw(t))}}}},n._addGeometryToStage=function(t){this._getDrawLayer().addGeometry(t)},n.endDraw=function(t){if(!this._geometry||this._ending)return this;this._ending=!0;var e=this._geometry;return this._clearStage(),t=t||{},this._geometry=e,this._fireEvent("drawend",t),delete this._geometry,this.options.once&&this.disable(),delete this._ending,delete this._historyPointer,this},n._clearStage=function(){this._getDrawLayer().clear(),delete this._geometry,delete this._clickCoords},n._getMouseContainerPoint=function(t){return"mousedown"===this._getRegisterMode().action&&Ue(t.domEvent),t.containerPoint},n._isValidContainerPoint=function(t){var e=this._map.getSize(),n=e.width,r=e.height;return!(t.x<0||t.y<0||t.x>n||t.y>r)},n._getDrawLayer=function(){var t=i+"drawtool",e=this._map.getLayer(t);return e||(e=new eo(t,{enableSimplify:!1}),this._map.addLayer(e)),e},n._fireEvent=function(t,e){e||(e={}),this._geometry&&(e.geometry=this._getRegisterMode().generate(this._geometry,{drawTool:this})),ro.prototype._fireEvent.call(this,t,e)},e}(ro);oo.mergeOptions({symbol:{lineColor:"#000",lineWidth:2,lineOpacity:1,polygonFill:"#fff",polygonOpacity:.3},doubleClickZoom:!1,mode:null,once:!1,autoPanAtEdge:!1,ignoreMouseleave:!0});var ao=function(t){function e(e){var n;return(n=t.call(this,e)||this).drawTool=new oo({mode:"boxZoom",ignoreMouseleave:!1}),n}fe(e,t);var n=e.prototype;return n.addHooks=function(){this.target.on("_mousedown",this._onMouseDown,this)},n.removeHooks=function(){this.target.off("_mousedown",this._onMouseDown,this),this.drawTool.isEnabled()&&this.drawTool.remove()},n._onMouseDown=function(t){this.target.options.boxZoom&&t.domEvent.shiftKey&&this.drawTool.setSymbol(this.target.options.boxZoomSymbol).on("drawend",this._boxZoom,this).addTo(this.target)},n._boxZoom=function(t){var e=this.target;this.drawTool.remove();var n=t.geometry,r=n.getCenter(),i=n.getSymbol(),o=i.markerWidth,a=i.markerHeight,s=new Wn(r,e.locateByPoint(r,o,a),e.getProjection()),c=e.getFitZoom(s);e._animateTo({center:s.getCenter(),zoom:c})},e}(wn);ii.mergeOptions({boxZoom:!0,boxZoomSymbol:{markerType:"rectangle",markerLineWidth:3,markerLineColor:"#1bbc9b",markerLineDasharray:[10,5],markerFillOpacity:.1,markerFill:"#1bbc9b",markerWidth:1,markerHeight:1}}),ii.addOnLoadHook("addHandler","boxZoom",ao);var so=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){this.target&&this.target.on("_mousemove",this._onMouseMove,this)},n.removeHooks=function(){this.target&&this.target.off("_mousemove",this._onMouseMove,this)},n._onMouseMove=function(t){var e=this.target;if(e.options.autoPanAtEdge){var n=t.containerPoint,r=e.getContainerExtent();if(r){var i,o=n.x,a=n.y,s=r.xmax,c=r.ymax;o<30&&(i=[Math.abs(o-30),0]),a<30&&(i=[0,Math.abs(a-30)]),o+30>s&&(i=[-Math.abs(o+30-s),0]),a+30>c&&(i=[0,-Math.abs(a+30-c)]),i&&e.panBy(i,{duration:1})}}},e}(wn);ii.mergeOptions({autoPanAtEdge:!1}),ii.addOnLoadHook("addHandler","autoPanAtEdge",so),ii.include({animateTo:function(t,e,n){var r=this;void 0===e&&(e={}),_(e)&&(n=e,e={});var i=this.getProjection(),o=this.getView(),a={},s=!0;for(var c in t)if(b(t,c)&&!p(t[c])&&("prjCenter"===c||!p(o[c])))if(s=!1,"center"===c){var u=new Rn(o[c]).toFixed(7),l=new Rn(t[c]).toFixed(7);u.equals(l)||(a.center=[u,l])}else if("prjCenter"===c){var h=new Rn(this._getPrjCenter()),f=new Rn(t[c]);h.equals(f)||(a.prjCenter=[h,f])}else o[c]!==t[c]&&"around"!==c&&(a[c]=[o[c],t[c]]);if(s)return null;this._animPlayer&&(this._isInternalAnimation?"running"===this._animPlayer.playState&&(this._animPlayer.pause(),this._prevAnimPlayer=this._animPlayer):(delete this._prevAnimPlayer,this._stopAnim(this._animPlayer)));var d=t.around||new me(this.width/2,this.height/2),m=this._getRenderer(),g=this._animPlayer=gi.animate(a,{easing:e.easing||"out",duration:e.duration||this.options.zoomAnimationDuration,framer:function(t){m.callInNextFrame(t)}},(function(t){if(r.isRemoved())g.finish();else{if("running"===g.playState){if(t.styles.center){var o=t.styles.center;r._setPrjCenter(i.project(o)),r.onMoving(r._parseEventFromCoord(r.getCenter()))}else if(t.styles.prjCenter){var s=t.styles.prjCenter;r._setPrjCenter(s),r.onMoving(r._parseEventFromCoord(r.getCenter()))}p(t.styles.zoom)||r.onZooming(t.styles.zoom,d),p(t.styles.pitch)||r.setPitch(t.styles.pitch),p(t.styles.bearing)||r.setBearing(t.styles.bearing),r._fireEvent("animating")}else"paused"===g.playState&&g!==r._mapAnimPlayer||(g._interupted||(a.center?r._setPrjCenter(i.project(a.center[1])):a.prjCenter&&r._setPrjCenter(a.prjCenter[1]),p(a.pitch)||r.setPitch(a.pitch[1]),p(a.bearing)||r.setBearing(a.bearing[1])),r._endAnim(g,a,d,e));n&&n(t)}}),this);return this._startAnim(a,d),g},_animateTo:function(t,e,n){return void 0===e&&(e={}),this._mapAnimPlayer&&this._stopAnim(this._mapAnimPlayer),this._isInternalAnimation=!0,this._mapAnimPlayer=this.animateTo(t,e,n),delete this._isInternalAnimation,this._mapAnimPlayer},isAnimating:function(){return!!this._animPlayer},isRotating:function(){return this.isDragRotating()||!!this._animRotating},_endAnim:function(t,e,n,r){delete this._animRotating;var i,o=t._interupted?"animateinterrupted":"animateend";if(t===this._animPlayer&&delete this._animPlayer,t===this._mapAnimPlayer&&delete this._mapAnimPlayer,e.center)i=t._interupted?this.getCenter():e.center[1],this.onMoveEnd(this._parseEventFromCoord(i));else if(e.prjCenter){var a;a=t._interupted?this._getPrjCenter():e.prjCenter[1];var s=this._parseEventFromCoord(this.getProjection().unproject(a));s.point2d=this._prjToPoint(a),this.onMoveEnd(s)}p(e.zoom)||(t._interupted?this.onZoomEnd(this.getZoom(),n):r.wheelZoom?this.onZooming(e.zoom[1],n):this.onZoomEnd(e.zoom[1],n)),o&&this._fireEvent(o),p(e.pitch)||this.getPitch()||this.getRenderer().setToRedraw(),this._resumePrev(t)},_startAnim:function(t,e){this._animPlayer&&(t.center&&this.onMoveStart(),t.zoom&&!this.isZooming()&&this.onZoomStart(t.zoom[1],e),(t.pitch||t.bearing)&&(this._animRotating=!0),this._fireEvent("animatestart"),this._animPlayer.play())},_stopAnim:function(t){t&&(delete this._animRotating,"finished"!==t.playState&&(t._interupted=!0,t.cancel()),t===this._animPlayer&&delete this._animPlayer,t===this._mapAnimPlayer&&delete this._mapAnimPlayer)},_resumePrev:function(t){if(this._prevAnimPlayer){var e=this._prevAnimPlayer;"paused"!==e.playState&&delete this._prevAnimPlayer,t!==e&&(this._animPlayer=e,e.play())}}});var co="mousedown mouseup mouseover mouseout mouseenter mouseleave mousemove click dblclick contextmenu keypress touchstart touchmove touchend ";function uo(t,e,n,r,i){var o=1/Math.tan(e/2),a=1/(r-i);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+r)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*r*a,t[15]=0,t}function lo(t,e,n){var r,i,o,a,s,c,u,l,h,f,d,p,m=n[0],g=n[1],v=n[2];return e===t?(t[12]=e[0]*m+e[4]*g+e[8]*v+e[12],t[13]=e[1]*m+e[5]*g+e[9]*v+e[13],t[14]=e[2]*m+e[6]*g+e[10]*v+e[14],t[15]=e[3]*m+e[7]*g+e[11]*v+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],u=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=c,t[6]=u,t[7]=l,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*m+s*g+h*v+e[12],t[13]=i*m+c*g+f*v+e[13],t[14]=o*m+u*g+d*v+e[14],t[15]=a*m+l*g+p*v+e[15]),t}function ho(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 fo(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],u=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],m=e[12],g=e[13],v=e[14],y=e[15],_=n[0],x=n[1],b=n[2],w=n[3];return t[0]=_*r+x*s+b*h+w*m,t[1]=_*i+x*c+b*f+w*g,t[2]=_*o+x*u+b*d+w*v,t[3]=_*a+x*l+b*p+w*y,_=n[4],x=n[5],b=n[6],w=n[7],t[4]=_*r+x*s+b*h+w*m,t[5]=_*i+x*c+b*f+w*g,t[6]=_*o+x*u+b*d+w*v,t[7]=_*a+x*l+b*p+w*y,_=n[8],x=n[9],b=n[10],w=n[11],t[8]=_*r+x*s+b*h+w*m,t[9]=_*i+x*c+b*f+w*g,t[10]=_*o+x*u+b*d+w*v,t[11]=_*a+x*l+b*p+w*y,_=n[12],x=n[13],b=n[14],w=n[15],t[12]=_*r+x*s+b*h+w*m,t[13]=_*i+x*c+b*f+w*g,t[14]=_*o+x*u+b*d+w*v,t[15]=_*a+x*l+b*p+w*y,t}function po(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=e[6],u=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=n*s-r*a,_=n*c-i*a,x=n*u-o*a,b=r*c-i*s,w=r*u-o*s,M=i*u-o*c,S=l*m-h*p,T=l*g-f*p,E=l*v-d*p,C=h*g-f*m,A=h*v-d*m,P=f*v-d*g,L=y*P-_*A+x*C+b*E-w*T+M*S;return L?(L=1/L,t[0]=(s*P-c*A+u*C)*L,t[1]=(i*A-r*P-o*C)*L,t[2]=(m*M-g*w+v*b)*L,t[3]=(f*w-h*M-d*b)*L,t[4]=(c*E-a*P-u*T)*L,t[5]=(n*P-i*E+o*T)*L,t[6]=(g*x-p*M-v*_)*L,t[7]=(l*M-f*x+d*_)*L,t[8]=(a*A-s*E+u*S)*L,t[9]=(r*E-n*A-o*S)*L,t[10]=(p*w-m*x+v*y)*L,t[11]=(h*x-l*w-d*y)*L,t[12]=(s*T-a*C-c*S)*L,t[13]=(n*C-r*T+i*S)*L,t[14]=(m*_-p*b-g*y)*L,t[15]=(l*b-h*_+f*y)*L,t):null}function mo(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 go(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 vo(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function yo(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function _o(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function xo(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 bo(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],c=n[2];return t[0]=i*c-o*s,t[1]=o*a-r*c,t[2]=r*s-i*a,t}function wo(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot?Math.hypot(n,r,i):function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)}(n,r,i)}function Mo(t,e,n){var r=e[0],i=e[1],o=e[2],a=1/(n[3]*r+n[7]*i+n[11]*o+n[15]);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}ii.include({_registerDomEvents:function(){Fe(this._panels.mapWrapper||this._containerDOM,co,this._handleDOMEvent,this)},_removeDomEvents:function(){Be(this._panels.mapWrapper||this._containerDOM,co,this._handleDOMEvent)},_handleDOMEvent:function(t){var e=t.type;if("contextmenu"===e&&Ge(t),!this._ignoreEvent(t)){var n=!1;if("mousedown"===e||"touchstart"===e&&1===t.touches.length)this._mouseDownTime=f();else if("click"===e||"touchend"===e||"contextmenu"===e){if(!this._mouseDownTime)return;var r=this._mouseDownTime;if(delete this._mouseDownTime,f()-r>300){if("click"===e||"contextmenu"===e)return}else"touchend"===e&&(n=!0)}this._fireDOMEvent(this,t,e),n&&(this._clickTime&&f()-this._clickTime<=300?(delete this._clickTime,this._fireDOMEvent(this,t,"dblclick")):(this._clickTime=f(),this._fireDOMEvent(this,t,"click")))}},_ignoreEvent:function(t){if(!t||!this._panels.control)return!1;if(this._isEventOutMap(t))return!0;var e,n=t.srcElement||t.target;if(n)for(;n&&n!==this._containerDOM;){if(n.className&&n.className.indexOf&&(n.className.indexOf("maptalks-control")>=0||n.className.indexOf("maptalks-ui")>=0&&!e.eventsPropagation))return!0;e=n,n=n.parentNode}return!1},_isEventOutMap:function(t){if(this.getPitch()>this.options.maxVisualPitch){var e=qe(this._getActualEvent(t),this._containerDOM);if(!this.getContainerExtent().contains(e))return!0}return!1},_parseEvent:function(t,e){if(!t)return null;var n={domEvent:t};if("keypress"!==e){var r=this._getActualEvent(t);if(r){var i=qe(r,this._containerDOM);n=d(n,{coordinate:this.containerPointToCoord(i),containerPoint:i,viewPoint:this.containerPointToViewPoint(i),point2d:this._containerPointToPoint(i)})}}return n},_parseEventFromCoord:function(t){var e=this.coordToContainerPoint(t);return{coordinate:t,containerPoint:e,viewPoint:this.containerPointToViewPoint(e),point2d:this.coordToPoint(t)}},_getActualEvent:function(t){return t.touches&&t.touches.length>0?t.touches[0]:t.changedTouches&&t.changedTouches.length>0?t.changedTouches[0]:t},_fireDOMEvent:function(t,e,n){if(!this.isRemoved()){var r=this._parseEvent(e,n);this._fireEvent(n,r)}}}),ii.addOnLoadHook("_registerDomEvents"),ii.include({isFullScreen:function(){return!!(document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement)},requestFullScreen:function(t){return this._fireEvent("fullscreenstart"),this._requestFullScreen(t||this._containerDOM),this._fireEvent("fullscreenend"),this},cancelFullScreen:function(){return this._cancelFullScreen(),this._fireEvent("cancelfullscreen"),this},_requestFullScreen:function(t){if(t.requestFullscreen)t.requestFullscreen();else if(t.mozRequestFullScreen)t.mozRequestFullScreen();else if(t.webkitRequestFullScreen)t.webkitRequestFullScreen();else if(t.msRequestFullScreen)t.msRequestFullScreen();else{var e="fullscreen=1,status=no,resizable=yes,top=0,left=0,scrollbars=no,titlebar=no,menubar=no,location=no,toolbar=no,z-look=yes,width="+(screen.availWidth-8)+",height="+(screen.availHeight-45);null!==window.open(location.href,"_blank",e)&&(window.opener=null,window.close())}},_cancelFullScreen:function(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():null!==window.open(location.href,"_blank","fullscreen=no,status=yes,resizable=yes,scrollbars=no,titlebar=no,menubar=yes,location=yes,toolbar=yes,z-look=yes")&&(window.opener=null,window.close())}}),ii.include({panTo:function(t,e,n){if(void 0===e&&(e={}),!t)return this;if(_(e)&&(n=e,e={}),t=new Rn(t),void 0===e.animation||e.animation){var r=this.getProjection().project(t);return this._panAnimation(r,e.duration,n)}return this.setCenter(t),this},_panTo:function(t,e){return void 0===e&&(e={}),void 0===e.animation||e.animation?this._panAnimation(t,e.duration):(this.onMoveStart(),this._setPrjCenter(t),this.onMoveEnd(this._parseEventFromCoord(this.getCenter())),this)},panBy:function(t,e,n){if(void 0===e&&(e={}),!t)return this;if(_(e)&&(n=e,e={}),t=new me(t),this.getContainerExtent().ymin>0&&t.y>30){var r=t.y;t.y=30,t.x=30*t.x/r,console.warn("offset is limited to panBy when pitch is above maxPitch")}if(this.onMoveStart(),void 0===e.animation||e.animation){t=t.multi(-1);var i=this._containerPointToPrj(new me(this.width/2+t.x,this.height/2+t.y));this._panAnimation(i,e.duration,n)}else this._offsetCenterByPixel(t),this.onMoveEnd(this._parseEventFromCoord(this.getCenter()));return this},_panAnimation:function(t,e,n){return this._animateTo({prjCenter:t},{duration:e||this.options.panAnimationDuration},n)}}),Kr.fromJSON=function(t){if(Array.isArray(t)){for(var e=[],n=0,r=t.length;n<r;n++){var i=Kr.fromJSON(t[n]);Array.isArray(t)?e=e.concat(i):e.push(i)}return e}return t&&!t.feature?Ii.toGeometry(t):(t.subType?(o=Kr.getJSONClass(t.subType).fromJSON(t),p(t.feature.id)||o.setId(t.feature.id)):(o=Ii.toGeometry(t.feature),t.options&&o.config(t.options)),t.symbol&&o.setSymbol(t.symbol),t.infoWindow&&o.setInfoWindow(t.infoWindow),o);var o},ei.fromJSON=function(t){if(!t)return null;var e=t.type,n=ei.getJSONClass(e);if(!n||!n.fromJSON)throw new Error("unsupported layer type:"+e);return n.fromJSON(t)},ii.include({JSON_VERSION:"1.0",toJSON:function(t){t||(t={});var e={jsonVersion:this.JSON_VERSION,version:this.VERSION,extent:this.getExtent().toJSON()};e.options=this.config(),e.options.center=this.getCenter(),e.options.zoom=this.getZoom(),e.options.bearing=this.getBearing(),e.options.pitch=this.getPitch();var n=this.getBaseLayer();(p(t.baseLayer)||t.baseLayer)&&n&&(e.baseLayer=n.toJSON(t.baseLayer));var r={};t.clipExtent&&(!0===t.clipExtent?r.clipExtent=this.getExtent():r.clipExtent=t.clipExtent);var i=[];if(p(t.layers)||t.layers&&!Array.isArray(t.layers)){for(var o=this.getLayers(),a=0,s=o.length;a<s;a++)if(o[a].toJSON){var c=d({},v(t.layers)?t.layers:{},r);i.push(o[a].toJSON(c))}e.layers=i}else if(U(t.layers)){for(var u=t.layers,l=0;l<u.length;l++){var h=u[l],f=this.getLayer(h.id);if(f.toJSON){var m=d({},h.options,r);i.push(f.toJSON(m))}}e.layers=i}else e.layers=[];return e}}),ii.fromJSON=function(t,e,n){if(!t||!e)return null;n||(n={});var r=new ii(t,e.options);if(p(n.baseLayer)||n.baseLayer){var i=ei.fromJSON(e.baseLayer);i&&r.setBaseLayer(i)}if(p(n.layers)||n.layers){for(var o=[],a=e.layers,s=0;s<a.length;s++){var c=ei.fromJSON(a[s]);o.push(c)}r.addLayer(o)}return r},ii.include({computeLength:function(t,e){if(!this.getProjection())return null;var n=new Rn(t),r=new Rn(e);return n.equals(r)?0:this.getProjection().measureLength(n,r)},computeGeometryLength:function(t){return t._computeGeodesicLength(this.getProjection())},computeGeometryArea:function(t){return t._computeGeodesicArea(this.getProjection())},identify:function(t,e){if(!t)return this;var n=t.layers;if(!U(n))return this;for(var r=[],o=0,a=n.length;o<a;o++)y(n[o])?r.push(this.getLayer(n[o])):r.push(n[o]);for(var s=new Rn(t.coordinate),c=d({},t),u=[],l=r.length-1;l>=0&&!(t.count&&u.length>=t.count);l--){var h=r[l];if(h&&h.getMap()&&(t.includeInvisible||h.isVisible())&&(t.includeInternals||!(h.getId().indexOf(i)>=0))){var f=h.identify(s,c);f&&(Array.isArray(f)?I(u,f):u.push(f))}}return e.call(this,u),this}}),ii.include({_zoom:function(t,e){this.options.zoomable&&!this.isZooming()&&(e=this._checkZoomOrigin(e),t=this._checkZoom(t),this.onZoomStart(t,e),this._frameZoom=this.getZoom(),this.onZoomEnd(t,e))},_zoomAnimation:function(t,e,n){this.options.zoomable&&!this.isZooming()&&(t=this._checkZoom(t),this.getZoom()!==t&&(e=this._checkZoomOrigin(e),this._startZoomAnim(t,e,n)))},_checkZoomOrigin:function(t){return t&&!this.options.zoomInCenter||(t=new me(this.width/2,this.height/2)),this.options.zoomOrigin&&(t=new me(this.options.zoomOrigin)),t},_startZoomAnim:function(t,e,n){p(n)&&(n=1);var r=this._getResolution(this._startZoomVal)/this._getResolution(t),i=this.options.zoomAnimationDuration*Math.abs(r-n)/Math.abs(r-1);this._frameZoom=this._startZoomVal,this._animateTo({zoom:t,around:e},{continueOnViewChanged:!0,duration:i})},onZoomStart:function(t,e){this.options.zoomable&&!this.isZooming()&&(this._mapAnimPlayer&&this._stopAnim(this._mapAnimPlayer),this._zooming=!0,this._startZoomVal=this.getZoom(),this._startZoomCoord=this._containerPointToPrj(e),this._fireEvent("zoomstart",{from:this._startZoomVal,to:t}))},onZooming:function(t,e,n){if(this.options.zoomable&&this._frameZoom!==t){p(n)&&(n=1),this._zoomTo(t,e);var r=this.getResolution(t),i=this.getResolution(this._startZoomVal)/r/n,o=this._prjToContainerPoint(this._startZoomCoord,this._startZoomVal),a=this.getViewPoint();if(!this.isRotating()&&!o.equals(e)&&1!==i){var s=this.getPitch(),c=o._sub(e)._multi(1/(1-i));s&&(c.y/=Math.cos(s*Math.PI/180)),e=e.add(c)}var u={view:[i,0,0,i,(e.x-a.x)*(1-i),(e.y-a.y)*(1-i)]},l=this.getDevicePixelRatio();1!==l&&(e=e.multi(l)),u.container=[i,0,0,i,e.x*(1-i),e.y*(1-i)],this._fireEvent("zooming",{from:this._startZoomVal,to:t,origin:e,matrix:u}),this._frameZoom=t}},onZoomEnd:function(t,e){if(this.options.zoomable){var n=this._startZoomVal;this._zoomTo(t,e),this._zooming=!1,this._getRenderer().onZoomEnd(),this._fireEvent("zoomend",{from:n,to:t}),this._verifyExtent(this._getPrjCenter())||this._panTo(this._prjMaxExtent.getCenter())}},_zoomTo:function(t,e){this._zoomLevel=t,this._calcMatrices(),e&&this._setPrjCoordAtContainerPoint(this._startZoomCoord,e)},_checkZoom:function(t){var e=this.getMaxZoom(),n=this.getMinZoom();return t<n&&(t=n),t>e&&(t=e),t}});var So=Math.PI/180,To=new Rn(0,0);function Eo(){return mo(new Array(16))}ii.include({getFov:function(){return this._fov||(this._fov=.6435011087932844),this._fov/So},setFov:function(t){if(this.isZooming())return this;if(t=Math.max(.01,Math.min(60,t)),this._fov===t)return this;var e=this.getFov();return this._fov=t*So,this._calcMatrices(),this._renderLayers(),this._fireEvent("fovchange",{from:e,to:this.getFov()}),this},getBearing:function(){return this._angle?-this._angle/So:0},setBearing:function(t){if(he.ie9)throw new Error("map can't rotate in IE9.");var e=-H(t,-180,180)*So;if(this._angle===e)return this;var n=this.getBearing();return this._fireEvent("rotatestart",{from:n,to:e}),this._angle=e,this._calcMatrices(),this._renderLayers(),this._fireEvent("rotate",{from:n,to:e}),this._fireEvent("rotateend",{from:n,to:e}),this},getPitch:function(){return this._pitch?this._pitch/Math.PI*180:0},setPitch:function(t){if(he.ie9)throw new Error("map can't tilt in IE9.");var e=G(t,0,this.options.maxPitch)*So;if(this._pitch===e)return this;var n=this.getPitch();return this._fireEvent("pitchstart",{from:n,to:e}),this._pitch=e,this._calcMatrices(),this._renderLayers(),this._fireEvent("pitch",{from:n,to:e}),this._fireEvent("pitchend",{from:n,to:e}),this},isTransforming:function(){return!(!this._pitch&&!this._angle)},getFrustumAltitude:function(){return this._frustumAltitude},_calcFrustumAltitude:function(){var t=90-this.getPitch(),e=this.getFov()/2,n=this.cameraPosition?this.cameraPosition[2]:0;if(e<=t)return n;e=Math.PI*e/180;var r=new me(this.cameraPosition).distanceTo(new me(this.cameraLookAt)),i=n*Math.tan(2*e);return n+Math.tan(e)*(r+i)},_pointToContainerPoint:function(){var t=[0,0,0];return function(e,n,r,i){if(void 0===r&&(r=0),e=this._pointToPoint(e,n,i),this.isTransforming()||r){r*=this._getResolution(n)/this._getResolution();var o=this._glScale;vo(t,e.x*o,e.y*o,r*o);var a=this._projIfBehindCamera(t,this.cameraPosition,this.cameraForward);Mo(a,a,this.projViewMatrix);var s=this.width/2,c=this.height/2;return a[0]=a[0]*s+s,a[1]=-a[1]*c+c,i?(i.x=a[0],i.y=a[1],i):new me(a[0],a[1])}var u=this._prjToPoint(this._getPrjCenter(),void 0,To);return i?(i.x=e.x,i.y=e.y):i=e,i._sub(u.x,u.y),i.set(i.x,-i.y),i._add(this.width/2,this.height/2)}}(),_projIfBehindCamera:function(){var t=new Array(3),e=new Array(3),n=new Array(3);return function(r,i,o){yo(t,r,i);var a=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}(o,t);return a<=0&&(function(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}(e,o,1.01*a),function(t,e,n){t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2]}(r,i,yo(n,t,e))),r}}(),_containerPointToPoint:function(){var t=[0,0,0],e=[0,0,0,1],n=[0,0,0,1];return function(r,i,o){if(this.isTransforming()){var a=this.width/2||1,s=this.height/2||1;vo(t,(r.x-a)/a,(s-r.y)/s,0),vo(e,t[0],t[1],0),vo(n,t[0],t[1],1),e[3]=n[3]=1,Mo(e,e,this.projViewMatrixInverse),Mo(n,n,this.projViewMatrixInverse);var c=e[0],u=n[0],l=e[1],h=n[1],f=e[2],d=n[2],p=f===d?0:(0-f)/(d-f),m=B(c,u,p),g=B(l,h,p);return o?(o.x=m,o.y=g):o=new me(m,g),o._multi(1/this._glScale),void 0===i||this.getZoom()===i?o:this._pointToPointAtZoom(o,i,o)}var v=this._prjToPoint(this._getPrjCenter(),i,o),y=void 0!==i?this._getResolution()/this._getResolution(i):1,_=y*(r.x-this.width/2),x=y*(r.y-this.height/2);return v._add(_,-x)}}(),_calcMatrices:function(){var t=Eo();return function(){delete this._mapRes,delete this._mapGlRes,delete this._mapExtent2D,delete this._mapGlExtent2D;var e=this.getSize(),n=e.width||1,r=e.height||1;this._glScale=this.getGLScale();var i=this.getPitch()*Math.PI/180,o=this._getCameraWorldMatrix(),a=this.getFov()*Math.PI/180,s=this._getCameraFar(a,this.getPitch());this.cameraFar=s,this.cameraNear=Math.max(this._glScale*this.getResolution(this.getGLZoom())*Math.cos(i),.1);var c=this.projMatrix||Eo();uo(c,a,n/r,this.cameraNear,s),this.projMatrix=c,this.viewMatrix=po(this.viewMatrix||Eo(),o),this.projViewMatrix=fo(this.projViewMatrix||Eo(),c,this.viewMatrix),this._calcCascadeMatrixes(),this.projViewMatrixInverse=fo(this.projViewMatrixInverse||Eo(),o,po(t,c)),this.domCssMatrix=this._calcDomMatrix(),this._frustumAltitude=this._calcFrustumAltitude(),this._mapRes=this._getResolution(),this._mapGlRes=this._getResolution(this.getGLZoom()),this._mapExtent2D=this._get2DExtent(),this._mapGlExtent2D=this._get2DExtent(this.getGLZoom())}}(),_getCameraFar:function(t,e){var n=this.cameraCenterDistance=wo(this.cameraPosition,this.cameraLookAt),r=n;if(e>0){var i;if(e=e*Math.PI/180,2/Math.PI-e<=t/2)i=4*n;else{var o=Math.tan(t/2);i=n*o/(1/Math.tan(e)-o)}r+=i}return r+1},_calcCascadeMatrixes:function(){var t=Eo();function e(e,n,r){var i=this.width,o=this.height,a=this.getFov()*Math.PI/180,s=this._getCameraFar(a,n),c=this.cameraCenterDistance;s=c+(s-c)/Math.cos((90-n)*Math.PI/180)*Math.cos((90-e)*Math.PI/180),uo(t,a,i/o,.1,s);var u=this.viewMatrix;return fo(r,t,u)}return function(){var t=this.getPitch(),n=this.options.cascadePitches[0],r=this.options.cascadePitches[1],i=this.cascadeFrustumMatrix0=this.cascadeFrustumMatrix0||Eo(),o=this.cascadeFrustumMatrix1=this.cascadeFrustumMatrix1||Eo();t>n?e.call(this,t,n,i):go(this.cascadeFrustumMatrix0,this.projViewMatrix),t>r?e.call(this,t,r,o):go(this.cascadeFrustumMatrix1,this.cascadeFrustumMatrix0)}}(),_calcDomMatrix:function(){var t=Eo(),e=Eo(),n=[1,-1,1],r=[0,0,0];return function(){var i=this.width||1,o=this.height||1,a=.5/Math.tan(this._fov/2)*o;return ho(t,this.projMatrix,n),lo(t,t,vo(r,0,0,-a)),this._pitch&&function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],c=e[7],u=e[8],l=e[9],h=e[10],f=e[11];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+l*r,t[6]=s*i+h*r,t[7]=c*i+f*r,t[8]=u*i-o*r,t[9]=l*i-a*r,t[10]=h*i-s*r,t[11]=f*i-c*r}(t,t,this._pitch),this._angle&&function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],c=e[3],u=e[4],l=e[5],h=e[6],f=e[7];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+l*r,t[2]=s*i+h*r,t[3]=c*i+f*r,t[4]=u*i-o*r,t[5]=l*i-a*r,t[6]=h*i-s*r,t[7]=f*i-c*r}(t,t,this._angle),mo(e),ho(e,e,vo(r,i/2,-o/2,1)),fo(this.domCssMatrix||Eo(),e,t)}}(),_getCameraWorldMatrix:function(){var t={};return function(){var e=this.getGLZoom(),n=this.getSize(),r=this.getGLScale(),i=this._prjToPoint(this._prjCenter,e);this.cameraLookAt=vo(this.cameraLookAt||[0,0,0],i.x,i.y,0);var o=this.getPitch()*So,a=this.getBearing()*So,s=this._getFovRatio(),c=r*(n.height||1)/2/s,u=c*Math.cos(o),l=Math.sin(o)*c,h=i.x-l*Math.sin(a),f=i.y-l*Math.cos(a);this.cameraPosition=vo(this.cameraPosition||[0,0,0],h,f,u);var d=l||1,p=this.cameraUp=vo(this.cameraUp||[0,0,0],Math.sin(a)*d,Math.cos(a)*d,0),m=this.cameraWorldMatrix=this.cameraWorldMatrix||Eo();!function(t,e,n,r){var i=[0,0,0],o=[0,0,0],a=[0,0,0];yo(a,e,n),0===_o(a)&&(a[2]=1),xo(a,a),bo(i,r,a),0===_o(a)&&(1===Math.abs(r[2])?a[0]+=1e-4:a[2]+=1e-4,xo(a,a),bo(i,r,a)),xo(i,i),bo(o,a,i),t[0]=i[0],t[4]=o[0],t[8]=a[0],t[1]=i[1],t[5]=o[1],t[9]=a[1],t[2]=i[2],t[6]=o[2],t[10]=a[2]}(m,this.cameraPosition,this.cameraLookAt,p);var g=this.cameraForward||[0,0,0];return yo(g,this.cameraLookAt,this.cameraPosition),this.cameraForward=xo(g,g),function(t,e){var n,r=e[0],i=e[4],o=e[8],a=e[1],s=e[5],c=e[9],u=e[2],l=e[6],h=e[10],f=r+s+h;f>0?(n=.5/Math.sqrt(f+1),t.w=.25/n,t.x=(l-c)*n,t.y=(o-u)*n,t.z=(a-i)*n):r>s&&r>h?(n=2*Math.sqrt(1+r-s-h),t.w=(l-c)/n,t.x=.25*n,t.y=(i+a)/n,t.z=(o+u)/n):s>h?(n=2*Math.sqrt(1+s-r-h),t.w=(o-u)/n,t.x=(i+a)/n,t.y=.25*n,t.z=(c+l)/n):(n=2*Math.sqrt(1+h-r-s),t.w=(a-i)/n,t.x=(o+u)/n,t.y=(c+l)/n,t.z=.25*n)}(t,m),function(t,e){var n=t,r=e.x,i=e.y,o=e.z,a=e.w,s=r+r,c=i+i,u=o+o,l=r*s,h=r*c,f=r*u,d=i*c,p=i*u,m=o*u,g=a*s,v=a*c,y=a*u;n[0]=1-(d+m),n[4]=h-y,n[8]=f+v,n[1]=h+y,n[5]=1-(l+m),n[9]=p-g,n[2]=f-v,n[6]=p+g,n[10]=1-(l+d),n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1}(m,t),function(t,e){var n=t;n[12]=e[0],n[13]=e[1],n[14]=e[2]}(m,this.cameraPosition),m}}(),_getFovRatio:function(){var t=this.getFov();return Math.tan(t/2*So)},_renderLayers:function(){this.isInteracting()||this._getLayers().forEach((function(t){if(t){var e=t._getRenderer();e&&e.setToRedraw&&e.setToRedraw()}}))}}),ii.include({_onViewChange:function(t){this._viewHistory||(this._viewHistory=[],this._viewHistoryPointer=0);for(var e=this._getCurrentView(),n=this._viewHistory.length-1;n>=0;n--)if(K(t,this._viewHistory[n]))return this._viewHistoryPointer=n,void this._fireViewChange(e,t);this._viewHistoryPointer<this._viewHistory.length-1&&this._viewHistory.splice(this._viewHistoryPointer+1),this._viewHistory.push(t);var r=this.options.viewHistoryCount;r>0&&this._viewHistory.length>r&&this._viewHistory.splice(0,this._viewHistory.length-r),this._viewHistoryPointer=this._viewHistory.length-1,this._fireViewChange(e,t)},zoomToPreviousView:function(t){if(void 0===t&&(t={}),!this.hasPreviousView())return null;var e=this._viewHistory[--this._viewHistoryPointer];return this._zoomToView(e,t),e},hasPreviousView:function(){return!(!this._viewHistory||0===this._viewHistoryPointer)},zoomToNextView:function(t){if(void 0===t&&(t={}),!this.hasNextView())return null;var e=this._viewHistory[++this._viewHistoryPointer];return this._zoomToView(e,t),e},hasNextView:function(){return!(!this._viewHistory||this._viewHistoryPointer===this._viewHistory.length-1)},_zoomToView:function(t,e){var n=this,r=this.getView();e.animation?this._animateTo(t,{duration:e.duration},(function(e){"finished"===e.state.playState&&n._fireViewChange(r,t)})):(this.setView(t),this._fireViewChange(r,t))},getViewHistory:function(){return this._viewHistory},_fireViewChange:function(t,e){this._fireEvent("viewchange",{old:t,new:e})},_getCurrentView:function(){return this._viewHistory?this._viewHistory[this._viewHistoryPointer]:null}}),ii.mergeOptions({viewHistory:!0,viewHistoryCount:10});var Co=function(t){function e(e){var n;return(n=t.call(this,e)||this).on("enable",n._afterEnable,de(de(n))).on("disable",n._afterDisable,de(de(n))),n._measureLayers=[],n}fe(e,t);var n=e.prototype;return n.clear=function(){if(U(this._measureLayers))for(var t=0;t<this._measureLayers.length;t++)this._measureLayers[t].remove();return delete this._lastMeasure,delete this._lastVertex,this._measureLayers=[],this},n.getMeasureLayers=function(){return this._measureLayers},n.getLastMeasure=function(){return this._lastMeasure?this._lastMeasure:0},n.undo=function(){t.prototype.undo.call(this);var e=this._historyPointer;if(e!==this._vertexes.length)for(var n=e;n<this._vertexes.length;n++)this._vertexes[n].label&&this._vertexes[n].label.remove(),this._vertexes[n].marker.remove();return this},n.redo=function(){t.prototype.redo.call(this);var e=this._historyPointer-1;return this._vertexes[e]&&(this._vertexes[e].marker.getLayer()||(this._vertexes[e].label&&this._vertexes[e].label.addTo(this._measureMarkerLayer),this._vertexes[e].marker.addTo(this._measureMarkerLayer))),this},n._measure=function(t){var e,n,r=this.getMap();t instanceof Kr?e=r.computeGeometryLength(t):Array.isArray(t)&&(e=r.getProjection().measureLength(t)),this._lastMeasure=e,n="zh-CN"===this.options.language?[" 米"," 公里"," 英尺"," 英里"]:[" m"," km"," feet"," mile"];var i="";return this.options.metric&&(i+=e<1e3?e.toFixed(0)+n[0]:(e/1e3).toFixed(2)+n[1]),this.options.imperial&&(e*=3.2808399,i.length>0&&(i+="\n"),i+=e<5280?e.toFixed(0)+n[2]:(e/5280).toFixed(2)+n[3]),i},n._registerMeasureEvents=function(){this.on("drawstart",this._msOnDrawStart,this).on("drawvertex",this._msOnDrawVertex,this).on("mousemove",this._msOnMouseMove,this).on("drawend",this._msOnDrawEnd,this)},n._afterEnable=function(){this._registerMeasureEvents()},n._afterDisable=function(){this.off("drawstart",this._msOnDrawStart,this).off("drawvertex",this._msOnDrawVertex,this).off("mousemove",this._msOnMouseMove,this).off("drawend",this._msOnDrawEnd,this)},n._msOnDrawStart=function(t){var e=this.getMap(),n=e._pointToPrj(t.point2d),r=R(),i="distancetool_"+r,o="distancetool_markers_"+r;e.getLayer(i)?(this._measureLineLayer=e.getLayer(i),this._measureMarkerLayer=e.getLayer(o)):(this._measureLineLayer=new eo(i).addTo(e),this._measureMarkerLayer=new eo(o).addTo(e)),this._measureLayers.push(this._measureLineLayer),this._measureLayers.push(this._measureMarkerLayer);var a=new Mi(t.coordinate,{symbol:this.options.vertexSymbol});a._setPrjCoordinates(n);var s="zh-CN"===this.options.language?"起点":"start",c=new qi(s,t.coordinate,this.options.labelOptions);c._setPrjCoordinates(n),this._lastVertex=c,this._addVertexMarker(a,c)},n._msOnMouseMove=function(t){var e=this._measure(this._msGetCoordsToMeasure(t));if(!this._tailMarker){var n=Dt(this.options.vertexSymbol);n.markerWidth/=2,n.markerHeight/=2,this._tailMarker=new Mi(t.coordinate,{symbol:n}).addTo(this._measureMarkerLayer),this._tailLabel=new qi(e,t.coordinate,this.options.labelOptions).addTo(this._measureMarkerLayer)}var r=this._geometry._getPrjCoordinates(),i=r[r.length-1];this._tailMarker.setCoordinates(t.coordinate),this._tailMarker._setPrjCoordinates(i),this._tailLabel.setContent(e),this._tailLabel.setCoordinates(t.coordinate),this._tailLabel._setPrjCoordinates(i)},n._msGetCoordsToMeasure=function(t){return t.geometry.getCoordinates().concat([t.coordinate])},n._msOnDrawVertex=function(t){var e=this._geometry._getPrjCoordinates(),n=e[e.length-1],r=t.geometry,i=new Mi(t.coordinate,{symbol:this.options.vertexSymbol}),o=this._measure(r),a=new qi(o,t.coordinate,this.options.labelOptions);this._addVertexMarker(i,a),a._setPrjCoordinates(n),i._setPrjCoordinates(n),this._lastVertex=a},n._addVertexMarker=function(t,e){this._vertexes||(this._vertexes=[]),this._vertexes.push({label:e,marker:t}),void 0!==this._historyPointer&&(this._vertexes.length=this._historyPointer),this._measureMarkerLayer.addGeometry(t),e&&this._measureMarkerLayer.addGeometry(e)},n._msOnDrawEnd=function(t){this._clearTailMarker();var e=this._lastVertex.getSize();e||(e=new ge(10,10)),this._addClearMarker(this._lastVertex.getCoordinates(),this._lastVertex._getPrjCoordinates(),e.width);var n=t.geometry.copy();n._setPrjCoordinates(t.geometry._getPrjCoordinates()),n.addTo(this._measureLineLayer),this._lastMeasure=n.getLength()},n._addClearMarker=function(t,e,n){var r=this.options.clearButtonSymbol,i={markerDx:(r.markerDx||0)+n,textDx:(r.textDx||0)+n};Array.isArray(r)&&(i=r.map((function(t){return t?{markerDx:(t.markerDx||0)+n,textDx:(t.textDx||0)+n}:null}))),r=Dt(r,i);var o=new Mi(t,{symbol:r}),a=this._measureLineLayer,s=this._measureMarkerLayer;o.on("click",(function(){return a.remove(),s.remove(),!1}),this),o.addTo(this._measureMarkerLayer),o._setPrjCoordinates(e)},n._clearTailMarker=function(){this._tailMarker&&(this._tailMarker.remove(),delete this._tailMarker),this._tailLabel&&(this._tailLabel.remove(),delete this._tailLabel)},e}(oo);Co.mergeOptions({mode:"LineString",language:"zh-CN",metric:!0,imperial:!1,symbol:{lineColor:"#000",lineWidth:3,lineOpacity:1},vertexSymbol:{markerType:"ellipse",markerFill:"#fff",markerLineColor:"#000",markerLineWidth:3,markerWidth:11,markerHeight:11},labelOptions:{textSymbol:{textFaceName:"monospace",textLineSpacing:1,textHorizontalAlignment:"right",textDx:15},boxStyle:{padding:[6,2],symbol:{markerType:"square",markerFill:"#fff",markerFillOpacity:.9,markerLineColor:"#b4b3b3"}}},clearButtonSymbol:[{markerType:"square",markerFill:"#fff",markerLineColor:"#b4b3b3",markerLineWidth:2,markerWidth:15,markerHeight:15,markerDx:20},{markerType:"x",markerWidth:10,markerHeight:10,markerDx:20}]});var Ao=function(t){function e(e){var n;return(n=t.call(this,e)||this).on("enable",n._afterEnable,de(de(n))).on("disable",n._afterDisable,de(de(n))),n._measureLayers=[],n}fe(e,t);var n=e.prototype;return n._measure=function(t){var e,n,r=this.getMap();t instanceof Kr?e=r.computeGeometryArea(t):Array.isArray(t)&&(e=r.getProjection().measureArea(t)),this._lastMeasure=e,n="zh-CN"===this.options.language?[" 平方米"," 平方公里"," 平方英尺"," 平方英里"]:[" sq.m"," sq.km"," sq.ft"," sq.mi"];var i="";if(this.options.metric&&(i+=e<1e6?e.toFixed(0)+n[0]:(e/1e6).toFixed(2)+n[1]),this.options.imperial){e*=3.2808399,i.length>0&&(i+="\n");var o=27878400;i+=e<o?e.toFixed(0)+n[2]:(e/o).toFixed(2)+n[3]}return i},n._msGetCoordsToMeasure=function(t){return t.geometry.getShell().concat([t.coordinate])},n._msOnDrawVertex=function(t){var e=this.getMap()._pointToPrj(t.point2d),n=new Mi(t.coordinate,{symbol:this.options.vertexSymbol});n._setPrjCoordinates(e),this._measure(t.geometry),this._lastVertex=n,this._addVertexMarker(n)},n._msOnDrawEnd=function(t){this._clearTailMarker();var e=this.getMap()._pointToPrj(t.point2d),n=this._measure(t.geometry),r=new qi(n,t.coordinate,this.options.labelOptions).addTo(this._measureMarkerLayer);r._setPrjCoordinates(e);var i=r.getSize();i||(i=new ge(10,10)),this._addClearMarker(t.coordinate,e,i.width);var o=t.geometry.copy();o._setPrjCoordinates(t.geometry._getPrjCoordinates()),o.addTo(this._measureLineLayer),this._lastMeasure=o.getArea()},e}(Co);Ao.mergeOptions({mode:"Polygon",symbol:{lineColor:"#000000",lineWidth:2,lineOpacity:1,lineDasharray:"",polygonFill:"#ffffff",polygonOpacity:.5}});var Po={create:function(t,e){var n=t.unproject(e[0]),r=new Di(n,0);return r._setPrjCoordinates(e[0]),r},update:function(t,e,n){var r=n.getMap(),i=Array.isArray(e)?e[e.length-1]:e,o=t.unproject(i),a=r.computeLength(n.getCenter(),o);n.setRadius(a)},generate:function(t){return t}};oo.registerMode("circle",d({clickLimit:2,action:["click","mousemove","click"]},Po)),oo.registerMode("freeHandCircle",d({action:["mousedown","mousemove","mouseup"]},Po));var Lo={create:function(t,e){var n=t.unproject(e[0]),r=new ji(n,0,0);return r._setPrjCoordinates(e[0]),r},update:function(t,e,n){var r=n.getMap(),i=n.getCenter(),o=Array.isArray(e)?e[e.length-1]:e,a=t.unproject(o),s=r.computeLength(i,new Rn({x:a.x,y:i.y})),c=r.computeLength(i,new Rn({x:i.x,y:a.y}));n.setWidth(2*s),n.setHeight(2*c)},generate:function(t){return t}};oo.registerMode("ellipse",d({clickLimit:2,action:["click","mousemove","click"]},Lo)),oo.registerMode("freeHandEllipse",d({action:["mousedown","mousemove","mouseup"]},Lo));var Ro={create:function(t,e){var n=new bi([]);return n._firstClick=e[0],n},update:function(t,e,n,r){var i=n.getMap(),o=r.containerPoint,a=i._prjToContainerPoint(n._firstClick),s=[[a.x,a.y],[o.x,a.y],[o.x,o.y],[a.x,o.y]];n.setCoordinates(s.map((function(t){return i.containerPointToCoord(new me(t))}))),n._setPrjCoordinates(s.map((function(t){return i._containerPointToPrj(new me(t))})))},generate:function(t){return t}};oo.registerMode("rectangle",d({clickLimit:2,action:["click","mousemove","click"]},Ro)),oo.registerMode("freeHandRectangle",d({action:["mousedown","mousemove","mouseup"]},Ro)),oo.registerMode("point",{clickLimit:1,action:["click"],create:function(t,e){var n=t.unproject(e[0]),r=new Mi(n);return r._setPrjCoordinates(e[0]),r},generate:function(t){return t}});var Oo={create:function(t,e){var n=e.map((function(e){return t.unproject(e)})),r=new Ti(n);return r._setPrjCoordinates(e),r},update:function(t,e,n){var r,i=n.getSymbol();Array.isArray(e)?r=e:(r=n._getPrjCoordinates()).push(e);var o=r.map((function(e){return t.unproject(e)}));n.setCoordinates(o),n._setPrjCoordinates(r);var a=n.getLayer();if(a){var s=a.getGeometryById("polygon");if(!s&&r.length>=3){if(s=new bi([o],{id:"polygon"}),i){var c=Dt(i,{lineOpacity:0});s.setSymbol(c)}s.addTo(a)}s&&s._setPrjCoordinates(r)}},generate:function(t){var e=new bi(t.getCoordinates(),{symbol:t.getSymbol()});return e._setPrjCoordinates(t._getPrjCoordinates()),e._projCode=t._projCode,e}};oo.registerMode("polygon",d({action:["click","mousemove","dblclick"]},Oo)),oo.registerMode("freeHandPolygon",d({action:["mousedown","mousemove","mouseup"]},Oo));var ko={create:function(t,e){var n=e.map((function(e){return t.unproject(e)})),r=new Ti(n);return r._setPrjCoordinates(e),r},update:function(t,e,n){var r;Array.isArray(e)?r=e:(r=n._getPrjCoordinates()).push(e);var i=r.map((function(e){return t.unproject(e)}));n.setCoordinates(i),n._setPrjCoordinates(r)},generate:function(t){return t}};function Io(t){for(var e=t.tileInfo,n=[e.cols,e.rows],r=[],i=e.lods,o=0,a=i.length;o<a;o++)r.push(i[o].resolution);var s=t.fullExtent,c=e.origin,u=[1,-1,c.x,c.y];return delete s.spatialReference,{spatialReference:{resolutions:r,fullExtent:s},tileSystem:u,tileSize:n}}function Do(t,e){return void 0===e&&(e=[]),e.forEach((function(e){var n=e[0],r=e[1];t=t.replace(n,r)})),t}function jo(t,e,n){void 0===n&&(n={});var r,i,o=t[e],a=o.getElementsByTagName("TileMatrix"),s=[],c=[],u=[];if(!r){var l=o.getElementsByTagName("ows:SupportedCRS")[0];if(l){for(r=(r=l.textContent).split("EPSG")[1];r.indexOf(":")>-1;)r=r.replace(":","");r=function(t){var e=t.indexOf("EPSG")>-1?t:"EPSG:"+t;return e=Do(e,[["4490","4326"],["102100","3857"],["900913","3857"]])}(r)}}i||(i=o.getElementsByTagName("ows:Identifier")[0])&&(i=i.textContent);var h=.0002645833333333333;n.isArcgis&&(h=28e-5),r&&r.indexOf("4326")>-1&&(h=2.3767925226029154e-9,n.isArcgis&&(h=2.518101729011901e-9));for(var f=1/0,d=0;d<a.length;d++){var p=a[d],m=p.getElementsByTagName("ows:Identifier")[0].textContent;m=parseInt(m),f=Math.min(f,m);var g=p.getElementsByTagName("ScaleDenominator")[0].textContent,v=p.getElementsByTagName("TopLeftCorner")[0].textContent,y=p.getElementsByTagName("TileWidth")[0].textContent,_=p.getElementsByTagName("TileHeight")[0].textContent;if(0===u.length&&u.push(parseInt(y),parseInt(_)),0===c.length){var x=v.split(" ").filter((function(t){return""!==t})).map((function(t){return parseFloat(t)})),b=x[0],w=x[1];b>0?c.push(1,-1,w,b):c.push(1,-1,b,w)}var M=parseFloat(g)*h;s.push(M)}if(f>0)for(var S=s[0],T=f-1;T>=0;T--)S*=2,s.splice(0,0,S);return{resolutions:s,tileSize:u,tileSystem:c,projection:r,TileMatrixSet:i}}oo.registerMode("linestring",d({action:["click","mousemove","dblclick"]},ko)),oo.registerMode("freeHandLinestring",d({action:["mousedown","mousemove","mouseup"]},ko)),oo.registerMode("arccurve",{action:["click","mousemove","dblclick"],create:function(t,e){var n=e.map((function(e){return t.unproject(e)})),r=new Bi(n);return r._setPrjCoordinates(e),r},update:ko.update,generate:function(t){return t}}),oo.registerMode("quadbeziercurve",{action:["click","mousemove","dblclick"],create:function(t,e){var n=e.map((function(e){return t.unproject(e)})),r=new Gi(n);return r._setPrjCoordinates(e),r},update:ko.update,generate:function(t){return t}}),oo.registerMode("cubicbeziercurve",{action:["click","mousemove","dblclick"],create:function(t,e){var n=e.map((function(e){return t.unproject(e)})),r=new Hi(n);return r._setPrjCoordinates(e),r},update:ko.update,generate:function(t){return t}}),oo.registerMode("boxZoom",{action:["mousedown","mousemove","mouseup"],create:function(t,e){e=e[0];var n=t.unproject(e),r=new Mi(n);return r._firstClick=e,r},update:function(t,e,n,r){var i=n.getMap(),o=i._prjToContainerPoint(n._firstClick),a=r.containerPoint;e=i._containerPointToPrj(new Rn(Math.min(o.x,a.x),Math.min(o.y,a.y)));var s=t.unproject(e);n.setCoordinates(s)._setPrjCoordinates(e),n.updateSymbol({markerWidth:Math.abs(o.x-a.x),markerHeight:Math.abs(o.y-a.y)})},generate:function(t){return t}}),Qr.loadArcgis=function(t,e,n){if(void 0===n&&(n={jsonp:!0}),y(t)&&"{"!==t.substring(0,1))sn.getJSON(t,(function(t,n){if(t)e(t);else{var r=Io(n);e(null,r)}}),n);else{y(t)&&(t=k(t));var r=Io(t);e(null,r)}return this},Qr.loadWMTS=function(t,e,n){return void 0===n&&(n={jsonp:!0}),y(t)&&sn.get(t,(function(r,i){if(r)e(r);else{var o=function(t,e,n){var r=(new DOMParser).parseFromString(t,"text/xml").querySelectorAll("Contents")[0];if(!r)return[];var i=r.getElementsByTagName("Layer");if(!i.length)return[];for(var o=[],a=0,s=r.childNodes.length;a<s;a++)"TileMatrixSet"===r.childNodes[a].nodeName&&o.push(r.childNodes[a]);if(!o.length)return[];for(var c=[],u=0,l=i.length;u<l;u++){var h=i[u],f=h.querySelectorAll("Style")[0];f&&(f=f.getElementsByTagName("ows:Identifier")[0])&&(f=f.textContent);var d=h.getElementsByTagName("ows:Identifier")[0];d&&(d=d.textContent);var p=h.querySelectorAll("ResourceURL")[0],m="";p&&(m=p.attributes.template.value);var g=jo(o,u,n),v=g.resolutions,y=g.tileSize,_=g.tileSystem,x=g.projection,b=g.TileMatrixSet;m.length||(m=e.substr(0,e.lastIndexOf("?")),m+="?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER={LAYER}&STYLE={Style}&TILEMATRIXSET={TileMatrixSet}&FORMAT=tiles&TILEMATRIX={TileMatrix}&TILEROW={TileRow}&TILECOL={TileCol}");var w=Do(m,[["{LAYER}",d],["{Layer}",d],["{layer}",d],["{STYLE}",f],["{Style}",f],["{style}",f],["{TileMatrixSet}",b],["{TileMatrix}","{z}"],["{TileRow}","{y}"],["{TileCol}","{x}"]]);c.push({tileSize:y,tileSystem:_,spatialReference:{resolutions:v,projection:x},urlTemplate:w,info:{layerName:d,TileMatrixSet:b,style:f,tileSize:y,tileSystem:_,resolutions:v,projection:x,urlTemplate:w}})}return c}(i,t,n);e(null,o)}}),n),this};var zo=function(t){function e(e){return t.call(this,e)||this}fe(e,t);var n=e.prototype;return n.addTo=function(t){return this._owner=t,this._switchEvents("on"),this.onAdd&&this.onAdd(),this.fire("add"),this},n.getMap=function(){return this._owner?this._owner.getBaseLayer?this._owner:this._owner.getMap():null},n.show=function(t){var e=this.getMap();if(!e)return this;this._mapEventsOn||this._switchMapEvents("on"),t=t||this._coordinate||this._owner.getCenter();var n=this.isVisible();this.fire("showstart");var r=this._getUIContainer();this._coordinate=t,this._removePrevDOM();var i=this.__uiDOM=this.buildOn(e);if(i.eventsPropagation=this.options.eventsPropagation,!i)return this.fire("showend"),this;this._measureSize(i),this._singleton()&&(e[this._uiDomKey()]=i),this._setPosition(),i.style[Ie]=null,r.appendChild(i);var o=this._getAnimation();if(n&&(o.ok=!1),o.ok&&(o.fade&&(i.style.opacity=0),o.scale)){if(this.getTransformOrigin){var a=this.getTransformOrigin();i.style[ke]=a}i.style[Oe]=this._toCSSTranslate(this._pos)+" scale(0)"}i.style.display="",this.options.eventsToStop&&rn(i,this.options.eventsToStop,Ue),this.options.autoPan&&this._autoPan();var s=o.transition;return o.ok&&s&&(i.offsetHeight,s&&(i.style[Ie]=s),o.fade&&(i.style.opacity=1),o.scale&&(i.style[Oe]=this._toCSSTranslate(this._pos)+" scale(1)")),this.fire("showend"),this},n.hide=function(){var t=this;if(!this.getDOM()||!this.getMap())return this;var e=this._getAnimation(),n=this.getDOM();return this.options.animationOnHide||(e.ok=!1),e.ok?(n.offsetHeight,n.style[Ie]=e.transition,setTimeout((function(){n.style.display="none",t.fire("hide")}),this.options.animationDuration)):(n.style.display="none",this.fire("hide")),e.fade&&(n.style.opacity=0),e.scale&&(n.style[Oe]=this._toCSSTranslate(this._pos)+" scale(0)"),this},n.isVisible=function(){var t=this.getDOM();return this.getMap()&&t&&t.parentNode&&"none"!==t.style.display},n.remove=function(){return delete this._mapEventsOn,this._owner?(this.hide(),this._switchEvents("off"),this.onRemove&&this.onRemove(),!this._singleton()&&this.__uiDOM&&this._removePrevDOM(),delete this._owner,this.fire("remove"),this):this},n.getSize=function(){return this._size?this._size.copy():null},n.getOwner=function(){return this._owner},n.getDOM=function(){return this.__uiDOM},n.getPosition=function(){if(!this.getMap())return null;var t=this._getViewPoint()._round();if(this.getOffset){var e=this.getOffset()._round();e&&t._add(e)}return t},n._getAnimation=function(){for(var t={fade:!1,scale:!1},e=this.options.animation?this.options.animation.split(","):[],n=0;n<e.length;n++){var r=ve(e[n]);"fade"===r?t.fade=!0:"scale"===r&&(t.scale=!0)}var i=null;return t.fade&&(i="opacity "+this.options.animationDuration+"ms"),t.scale&&(i=i?i+",":"",i+=Oe+" "+this.options.animationDuration+"ms"),t.transition=i,t.ok=null!==i,t},n._getViewPoint=function(){var t=0;if(this._owner&&this._owner.getAltitude){var e=this._owner.getAltitude();e>0&&(t=this._meterToPoint(this._coordinate,e))}return this.getMap().coordToViewPoint(this._coordinate,void 0,t)._add(this.options.dx,this.options.dy)},n._meterToPoint=function(t,e){return this.getMap().distanceToPoint(e,0,void 0,t).x*N(e)},n._autoPan=function(){var t=this.getMap(),e=this.getDOM();if(!t.isMoving()){var n=this._pos,r=t.getSize(),i=r.width,o=r.height,a=t.viewPointToContainerPoint(n),s=parseInt(e.clientWidth),c=parseInt(e.clientHeight),u=0,l=0;a.x<0?u=-(a.x-s/2):a.x+s-35>i&&(u=i-(a.x+3*s/2)),a.y-c<0?l=50-(a.y-c):a.y>o&&(l=o-a.y-c-30),0===l&&0===u||t.panBy(new me(u,l),{duration:this.options.autoPanDuration})}},n._measureSize=function(t){var e=this._getUIContainer();t.style.position="absolute",t.style.left="-99999px";var n=t.style.bottom?"bottom":"top";return t.style[n]="-99999px",t.style.display="",e.appendChild(t),this._size=new ge(t.clientWidth,t.clientHeight),t.style.display="none",t.style.left="0px",t.style[n]="0px",this._size},n._removePrevDOM=function(){this.onDomRemove&&this.onDomRemove();var t=this.options.eventsToStop;if(this._singleton()){var e=this.getMap(),n=this._uiDomKey();e[n]&&(t&&on(e[n],t,Ue),Ne(e[n]),delete e[n]),delete this.__uiDOM}else this.__uiDOM&&(t&&on(this.__uiDOM,t,Ue),Ne(this.__uiDOM),delete this.__uiDOM)},n._uiDomKey=function(){return"__ui_"+this._getClassName()},n._singleton=function(){return this.options.single},n._getUIContainer=function(){return this.getMap()._panels.ui},n._getClassName=function(){return"UIComponent"},n._switchMapEvents=function(t){var e=this.getMap();if(e){this._mapEventsOn="on"===t;var n=this._getDefaultEvents();if(this.getEvents&&d(n,this.getEvents()),n)for(var r in n)n.hasOwnProperty(r)&&e[t](r,n[r],this)}},n._switchEvents=function(t){this._switchMapEvents(t);var e=this._getOwnerEvents();if(this._owner)for(var n in e)e.hasOwnProperty(n)&&this._owner[t](n,e[n],this)},n._getDefaultEvents=function(){return{"zooming rotate pitch":this.onEvent,zoomend:this.onZoomEnd,moving:this.onMoving,resize:this.onResize}},n._getOwnerEvents=function(){var t={};return this._owner&&this._owner instanceof Kr&&(t.positionchange=this.onGeometryPositionChange),this.getOwnerEvents&&d(t,this.getOwnerEvents()),t},n.onGeometryPositionChange=function(t){this._owner&&this.isVisible()&&this.show(t.target.getCenter())},n.onMoving=function(){this.isVisible()&&this.getMap().isTransforming()&&this._updatePosition()},n.onEvent=function(){this.isVisible()&&this._updatePosition()},n.onZoomEnd=function(){this.isVisible()&&this._setPosition()},n.onResize=function(){this.isVisible()&&this._setPosition()},n._updatePosition=function(){this.getMap()._getRenderer().callInNextFrame(this._setPosition.bind(this))},n._setPosition=function(){var t=this.getDOM();if(t){t.style[Ie]=null;var e=this.getPosition();this._pos=e,t.style[Oe]=this._toCSSTranslate(e)+" scale(1)"}},n._toCSSTranslate=function(t){if(!t)return"";if(he.any3d){var e=this.getMap(),n=e?e.getBearing():0,r=e?e.getPitch():0,i="";return this.options.pitchWithMap&&r&&(i+=" rotateX("+Math.round(r)+"deg)"),this.options.rotateWithMap&&n&&(i+=" rotateZ("+Math.round(-n)+"deg)"),"translate3d("+t.x+"px,"+t.y+"px, 0px)"+i}return"translate("+t.x+"px,"+t.y+"px)"},e.isSupport=function(t){return!!(t&&_(t.on)&&_(t.off)&&_(t.getCenter))},e}(xn(Mn));zo.mergeOptions({eventsPropagation:!1,eventsToStop:null,dx:0,dy:0,autoPan:!1,autoPanDuration:600,single:!0,animation:"scale",animationOnHide:!0,animationDuration:500,pitchWithMap:!1,rotateWithMap:!1});var No="mousedown mouseup mouseenter mouseover mouseout mousemove click dblclick contextmenu keypress touchstart touchmove touchend",Fo=function(t){function e(e,n){var r;return(r=t.call(this,n)||this)._markerCoord=new Rn(e),r}fe(e,t);var n=e.prototype;return n._getClassName=function(){return"UIMarker"},n.setCoordinates=function(t){return this._markerCoord=t,this.fire("positionchange"),this.isVisible()&&(this._coordinate=this._markerCoord,this._setPosition()),this},n.getCoordinates=function(){return this._markerCoord},n.setContent=function(t){var e=this.options.content;return this.options.content=t,this.fire("contentchange",{old:e,new:t}),this.isVisible()&&this.show(),this},n.getContent=function(){return this.options.content},n.onAdd=function(){this.show()},n.show=function(){return t.prototype.show.call(this,this._markerCoord)},n.flash=function(t,e,n,r){return et.call(this,t,e,n,r)},n.buildOn=function(){var t;return y(this.options.content)?(t=je("div")).innerHTML=this.options.content:t=this.options.content,this.options.containerClass&&(t.className=this.options.containerClass),this._registerDOMEvents(t),t},n.getOffset=function(){var t=this.getSize();return new me(-t.width/2,-t.height/2)},n.getTransformOrigin=function(){return"center center"},n.onDomRemove=function(){var t=this.getDOM();this._removeDOMEvents(t)},n.isDragging=function(){return!!this.draggable&&this.draggable.isDragging()},n._registerDOMEvents=function(t){rn(t,No,this._onDomEvents,this)},n._onDomEvents=function(t){var e=this.getMap()._parseEvent(t,t.type);this.fire(t.type,e)},n._removeDOMEvents=function(t){on(t,No,this._onDomEvents,this)},n._getConnectPoints=function(){var t=this.getMap(),e=t.coordToContainerPoint(this.getCoordinates()),n=this.getSize(),r=n.width,i=n.height;return[t.containerPointToCoordinate(e.add(-r/2,0)),t.containerPointToCoordinate(e.add(r/2,0)),t.containerPointToCoordinate(e.add(0,i/2)),t.containerPointToCoordinate(e.add(0,-i/2))]},e}(En(zo));Fo.mergeOptions({containerClass:null,eventsPropagation:!0,draggable:!1,single:!1,content:null});var Bo=he.touch?"touchstart mousedown":"mousedown",Ho=function(t){function e(e){return t.call(this,e)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){this.target.on(Bo,this._startDrag,this)},n.removeHooks=function(){this.target.off(Bo,this._startDrag,this)},n._startDrag=function(t){var e=t.domEvent;e.touches&&e.touches.length>1||2===e.button||this.isDragging()||(this.target.on("click",this._endDrag,this),this._lastCoord=t.coordinate,this._lastPoint=t.containerPoint,this._prepareDragHandler(),this._dragHandler.onMouseDown(t.domEvent),this.target.fire("dragstart",t))},n._prepareDragHandler=function(){this._dragHandler=new Ln(this.target.getDOM(),{cancelOn:this._cancelOn.bind(this),ignoreMouseleave:!0}),this._dragHandler.on("mousedown",this._onMouseDown,this),this._dragHandler.on("dragging",this._dragging,this),this._dragHandler.on("mouseup",this._endDrag,this),this._dragHandler.enable()},n._cancelOn=function(t){var e=(t.srcElement||t.target).tagName.toLowerCase();return"button"===e||"input"===e||"select"===e||"option"===e||"textarea"===e},n._onMouseDown=function(t){Ue(t.domEvent)},n._dragging=function(t){var e=this.target,n=e.getMap()._parseEvent(t.domEvent),r=n.domEvent;if(!(r.touches&&r.touches.length>1))if(this._isDragging){var i=n.coordinate,o=n.containerPoint;this._lastCoord||(this._lastCoord=i),this._lastPoint||(this._lastPoint=o);var a=i.sub(this._lastCoord),s=o.sub(this._lastPoint);this._lastCoord=i,this._lastPoint=o,this.target.setCoordinates(this.target.getCoordinates().add(a)),n.coordOffset=a,n.pointOffset=s,e.fire("dragging",n)}else this._isDragging=!0},n._endDrag=function(t){var e=this.target,n=e.getMap();if(this._dragHandler&&(e.off("click",this._endDrag,this),this._dragHandler.disable(),delete this._dragHandler),delete this._lastCoord,delete this._lastPoint,this._isDragging=!1,n){var r=n._parseEvent(t.domEvent);e.fire("dragend",r)}},n.isDragging=function(){return!!this._isDragging},e}(wn);Fo.addInitHook("addHandler","draggable",Ho);var Go=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n._getClassName=function(){return"InfoWindow"},n.addTo=function(e){return e instanceof Kr&&(e.getInfoWindow()&&e.getInfoWindow()!==this&&e.removeInfoWindow(),e._infoWindow=this),t.prototype.addTo.call(this,e)},n.setContent=function(t){var e=this.options.content;return this.options.content=t,this.fire("contentchange",{old:e,new:t}),this.isVisible()&&this.show(this._coordinate),this},n.getContent=function(){return this.options.content},n.setTitle=function(t){var e=t;return this.options.title=t,this.fire("contentchange",{old:e,new:t}),this.isVisible()&&this.show(this._coordinate),this},n.getTitle=function(){return this.options.title},n.buildOn=function(){if(this.options.custom){if(y(this.options.content)){var t=je("div");return t.innerHTML=this.options.content,t}return this.options.content}var e=je("div");this.options.containerClass&&(e.className=this.options.containerClass),e.style.width=this._getWindowWidth()+"px",e.style.bottom="0px";var n='<em class="maptalks-ico"></em>';this.options.title&&(n+="<h2>"+this.options.title+"</h2>"),n+='<a href="javascript:void(0);" class="maptalks-close"></a><div class="maptalks-msgContent"></div>',e.innerHTML=n;var r=e.querySelector(".maptalks-msgContent");return y(this.options.content)?r.innerHTML=this.options.content:r.appendChild(this.options.content),this._onCloseBtnClick=this.hide.bind(this),Fe(e.querySelector(".maptalks-close"),"click touchend",this._onCloseBtnClick),e},n.getTransformOrigin=function(){return this.getSize().width/2+"px bottom"},n.getOffset=function(){var t=this.getSize(),e=new me(-t.width/2,0);this.options.custom?e._sub(0,t.height):e._sub(4,12);var n=this.getOwner();if(n instanceof Mi||n instanceof Pi){var r,i;if(n instanceof Mi)r=n._getPainter(),i=n.getSize();else{var o=n.getGeometries();if(!o||!o.length)return e;r=o[0]._getPainter(),i=o[0].getSize()}if(r){var a=r.getFixedExtent();e._add(a.xmax-i.width/2,a.ymin)}else e._add(0,-i.height)}return e},n.show=function(e){return this.getMap()&&this.getMap().options.enableInfoWindow?t.prototype.show.call(this,e):this},n.getEvents=function(){if(!this.options.autoCloseOn)return null;var t={};return t[this.options.autoCloseOn]=this.hide,t},n.getOwnerEvents=function(){var t=this.getOwner();if(!this.options.autoOpenOn||!t)return null;var e={};return e[this.options.autoOpenOn]=this._onAutoOpen,e},n.onRemove=function(){this.onDomRemove()},n.onDomRemove=function(){this._onCloseBtnClick&&(Be(this.getDOM().childNodes[2],"click touchend",this._onCloseBtnClick),delete this._onCloseBtnClick)},n._onAutoOpen=function(t){var e=this,n=this.getOwner();setTimeout((function(){n instanceof Mi||n instanceof zo?e.show(n.getCoordinates()):n instanceof Pi?e.show(n.findClosest(t.coordinate)):n instanceof Ti||n instanceof Ri?(e.getMap().getScale()>=8&&(t.coordinate=e._rectifyMouseCoordinte(n,t.coordinate)),e.show(t.coordinate)):e.show(t.coordinate)}),1)},n._rectifyMouseCoordinte=function(t,e){var n=this;return t instanceof Ti?this._rectifyLineStringMouseCoordinate(t,e).coordinate:t instanceof Ri?t.getGeometries().map((function(t){return n._rectifyLineStringMouseCoordinate(t,e)})).sort((function(t,e){return t.dis-e.dis}))[0].coordinate:e},n._rectifyLineStringMouseCoordinate=function(t,e){for(var n=this,r=t.getCoordinates().map((function(t){return n.getMap().coordToContainerPoint(t)})),i=this.getMap().coordToContainerPoint(e),o=1/0,a=-1,s=0,c=r.length;s<c;s++){var u=r[s],l=i.distanceTo(u);l<o&&(o=l,a=s)}var h=[];0===a?h.push(r[0],r[1]):a===r.length-1?h.push(r[a-1],r[a]):h.push(r[a-1],r[a],r[a+1]);for(var f=[],d=this.getMap().getSize(),p=d.width,m=d.height,g=0,v=h.length-1;g<v;g++){var y=h[g],_=h[g+1];if(y.x===_.x)for(var x=Math.max(0,Math.min(y.y,_.y)),b=Math.min(m,Math.max(y.y,_.y)),w=x;w<=b;w++)f.push(new me(y.x,w));else for(var M=(_.y-y.y)/(_.x-y.x),S=Math.max(0,Math.min(y.x,_.x)),T=Math.min(p,Math.max(y.x,_.x)),E=S;E<=T;E++){var C=M*(E-y.x)+y.y;f.push(new me(E,C))}}for(var A=1/0,P=-1,L=0,R=f.length;L<R;L++){var O=f[L],k=i.distanceTo(O);k<A&&(A=k,P=L)}return{dis:A,coordinate:P<0?e:this.getMap().containerPointToCoord(f[P])}},n._getWindowWidth=function(){var t=this.options.width;return t||(t=300),t},e}(zo);Go.mergeOptions({containerClass:"maptalks-msgBox",autoPan:!0,autoCloseOn:null,autoOpenOn:"click",width:300,minHeight:120,custom:!1,title:null,content:null});var Uo=function(t){fe(n,t);var e=n.prototype;function n(e,n){var r;return void 0===n&&(n={}),(r=t.call(this,n)||this)._content=e,r}return e._getClassName=function(){return"ToolTip"},e.addTo=function(e){if(n.isSupport(e))return e.on("mousemove",this.onMouseMove,this),e.on("mouseout",this.onMouseOut,this),t.prototype.addTo.call(this,e);throw new Error("Invalid geometry or UIMarker the tooltip is added to.")},e.setStyle=function(t){return this.options.containerClass=t,this},e.getStyle=function(){return this.options.containerClass},e.getContent=function(){return this._content},e.buildOn=function(){var t=je("div"),e=this.options||{};e.height&&(t.style.height=e.height+"px"),e.width&&(t.style.width=e.width+"px");var n=e.containerClass||e.cssName;return!n&&e.height&&(t.style.lineHeight=e.height+"px"),t.innerHTML='<div class="'+n+'">'+this._content+"</div>",t},e.onMouseOut=function(){clearTimeout(this._timeout),this.isVisible()&&this._removePrevDOM()},e.onMouseMove=function(t){var e=this;clearTimeout(this._timeout);var n=this.getMap();if(n){var r=n.locateByPoint(t.coordinate,-5,25);0===this.options.showTimeout?this.show(r):this._timeout=setTimeout((function(){n&&e.show(r)}),this.options.showTimeout)}},e.onRemove=function(){clearTimeout(this._timeout),this._owner&&(this._owner.off("mouseover",this.onMouseOver,this),this._owner.off("mouseout",this.onMouseOut,this))},e._getViewPoint=function(){return this.getMap().coordToViewPoint(this._coordinate,void 0,0)._add(this.options.dx,this.options.dy)},n}(zo);Uo.mergeOptions({width:0,height:0,animation:"fade",containerClass:"maptalks-tooltip",showTimeout:400});var Vo=function(t){function e(e){return t.call(this,e)||this}fe(e,t);var n=e.prototype;return n._getClassName=function(){return"Menu"},n.addTo=function(t){return t._menu&&t._menu!==this&&t.removeMenu(),t._menu=this,zo.prototype.addTo.apply(this,arguments)},n.setItems=function(t){return this.options.items=t,this},n.getItems=function(){return this.options.items||[]},n.buildOn=function(){if(this.options.custom){if(y(this.options.items)){var t=je("div");return t.innerHTML=this.options.items,t}return this.options.items}var e=je("div");this.options.containerClass&&Xe(e,this.options.containerClass),e.style.width=this._getMenuWidth()+"px";var n=this._createMenuItemDom();return e.appendChild(n),rn(e,"contextmenu",Ge),e},n.getOffset=function(){if(!this.getMap())return null;var t=this.getMap().getSize(),e=this.getMap().viewPointToContainerPoint(this._getViewPoint()),n=this.getSize(),r=0,i=0;return e.x+n.width>t.width&&(r=-n.width),e.y+n.height>t.height&&(i=-n.height),new me(r,i)},n.getTransformOrigin=function(){var t=this.getOffset()._multi(-1);return t.x+"px "+t.y+"px"},n.getEvents=function(){return{"_zoomstart _zoomend _movestart _dblclick _click":this._removePrevDOM}},n._createMenuItemDom=function(){var t=this,e=this.getMap(),n=je("ul");Xe(n,"maptalks-menu-items");var r,i,o=this.getItems();function a(n){return function(r){var i=e._parseEvent(r,"click");i.target=t,i.owner=t._owner,i.index=n,!1!==this._callback(i)&&t.hide()}}for(var s=0,c=o.length;s<c;s++){if("-"===(r=o[s])||"_"===r)Xe(i=je("li"),"maptalks-menu-splitter");else{i=je("li");var u=r.item;_(u)&&(u=u({owner:this._owner,index:s})),i.innerHTML=u,i._callback=r.click,rn(i,"click",a(s))}n.appendChild(i)}var l=this.options.maxHeight||0;return l>0&&Ye(n,"max-height: "+l+"px; overflow-y: auto;"),n},n._getMenuWidth=function(){return this.options.width||160},e}(zo);Vo.mergeOptions({containerClass:"maptalks-menu",animation:null,animationDelay:10,animationOnHide:!1,autoPan:!1,width:160,maxHeight:0,custom:!1,items:[]});var Wo={setMenu:function(t){return this._menuOptions=t,this._menu?this._menu.setOptions(t):this.on("contextmenu",this._defaultOpenMenu,this),this},openMenu:function(t){var e=this instanceof ii?this:this.getMap();return t||(t=this.getCenter()),this._menu?this._menu.show(t):this._menuOptions&&e&&(this._bindMenu(this._menuOptions),this._menu.show(t)),this},setMenuItems:function(t){return this._menuOptions||(this._menuOptions={}),Array.isArray(t)&&(this._menuOptions.custom=!1),this._menuOptions.items=t,this.setMenu(this._menuOptions),this},getMenuItems:function(){return this._menu?this._menu.getItems():this._menuOptions&&this._menuOptions.items||[]},closeMenu:function(){return this._menu&&this._menu.hide(),this},removeMenu:function(){return this.off("contextmenu",this._defaultOpenMenu,this),this._unbindMenu(),delete this._menuOptions,this},_bindMenu:function(t){return this._menu=new Vo(t),this._menu.addTo(this),this},_unbindMenu:function(){return this._menu&&(this.closeMenu(),this._menu.remove(),delete this._menu),this},_defaultOpenMenu:function(t){return this.listens("contextmenu")>1||(this.openMenu(t.coordinate),!1)}};ii.include(Wo),Kr.include(Wo);var Zo=Object.freeze({UIComponent:zo,UIMarker:Fo,InfoWindow:Go,ToolTip:Uo,Menuable:Wo,Menu:Vo}),qo=function(t){function e(e){return e&&e.position&&!y(e.position)&&(e.position=d({},e.position)),t.call(this,e)||this}fe(e,t);var n=e.prototype;return n.addTo=function(t){if(this.remove(),!t.options.control)return this;this._map=t;var e=t._panels.control;return this.__ctrlContainer=je("div"),Ye(this.__ctrlContainer,"position:absolute;overflow:visible;"),this.update(),e.appendChild(this.__ctrlContainer),this.onAdd&&this.onAdd(),this.fire("add",{dom:e}),this},n.update=function(){return this.__ctrlContainer.innerHTML="",this._controlDom=this.buildOn(this.getMap()),this._controlDom&&(this._updatePosition(),this.__ctrlContainer.appendChild(this._controlDom)),this},n.getMap=function(){return this._map},n.getPosition=function(){return d({},this._parse(this.options.position))},n.setPosition=function(t){return y(t)?this.options.position=t:this.options.position=d({},t),this._updatePosition(),this},n.getContainerPoint=function(){var t,e,n=this.getPosition(),r=this.getMap().getSize();return p(n.left)?p(n.right)||(t=r.width-parseInt(n.right)):t=parseInt(n.left),p(n.top)?p(n.bottom)||(e=r.height-parseInt(n.bottom)):e=parseInt(n.top),new me(t,e)},n.getContainer=function(){return this.__ctrlContainer},n.getDOM=function(){return this._controlDom},n.show=function(){return this.__ctrlContainer.style.display="",this},n.hide=function(){return this.__ctrlContainer.style.display="none",this},n.isVisible=function(){return this.__ctrlContainer&&""===this.__ctrlContainer.style.display},n.remove=function(){return this._map?(Ne(this.__ctrlContainer),this.onRemove&&this.onRemove(),delete this._map,delete this.__ctrlContainer,delete this._controlDom,this.fire("remove"),this):this},n._parse=function(t){var n=t;return y(t)&&(n=e.positions[n]),n},n._updatePosition=function(){var t=this.getPosition();for(var e in t||(t={top:20,left:20}),t)t.hasOwnProperty(e)&&(t[e]=parseInt(t[e]),this.__ctrlContainer.style[e]=t[e]+"px");this.fire("positionchange",{position:d({},t)})},e}(xn(Mn));qo.positions={"top-left":{top:20,left:20},"top-right":{top:20,right:20},"bottom-left":{bottom:20,left:20},"bottom-right":{bottom:20,right:20}},ii.mergeOptions({control:!0}),ii.include({addControl:function(t){return this._containerDOM.getContext||t.addTo(this),this},removeControl:function(t){return t&&t.getMap()===this?(t.remove(),this):this}});var Yo="addlayer removelayer setbaselayer baselayerremove",Jo=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(){return this._attributionContainer=je("div"),this._attributionContainer.className="maptalks-attribution",this._update(),this._attributionContainer},n.onAdd=function(){this.getMap().on(Yo,this._update,this)},n.onRemove=function(){this.getMap().off(Yo,this._update,this)},n._update=function(){var t=this.getMap();if(t){var e=t._getLayers((function(t){return t.options.attribution})).reverse().map((function(t){return t.options.attribution})),n=this.options.content+(e.length>0?" - "+e.join(", "):"");this._attributionContainer.innerHTML='<span style="padding:0px 4px">'+n+"</span>"}},e}(qo);Jo.mergeOptions({position:{bottom:0,left:0},content:'<a href="http://maptalks.org" target="_blank">maptalks</a>'}),ii.mergeOptions({attribution:!0}),ii.addOnLoadHook((function(){var t=this.options.attribution||this.options.attributionControl;t&&(this.attributionControl=new Jo(t),this.addControl(this.attributionControl))}));var Xo=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(){var t=this.container=je("div",this.options.containerClass),e=this.panel=je("div","panel"),n=this.button=je("button");return t.appendChild(n),t.appendChild(e),t},n.onAdd=function(){rn(this.button,"mouseover",this._show,this),rn(this.panel,"mouseleave",this._hide,this),rn(this.getMap(),"click",this._hide,this)},n.onRemove=function(){this.panel&&(on(this.button,"mouseover",this._show,this),on(this.panel,"mouseleave",this._hide,this),on(this.getMap(),"click",this._hide,this),Ne(this.panel),Ne(this.button),delete this.panel,delete this.button,delete this.container)},n._show=function(){Je(this.container,"shown")||(Xe(this.container,"shown"),this._createPanel())},n._hide=function(t){this.panel.contains(t.toElement||t.relatedTarget)||$e(this.container,this.options.containerClass)},n._createPanel=function(){this.panel.innerHTML="";var t=je("ul");this.panel.appendChild(t),this._renderLayers(this.getMap(),t)},n._renderLayers=function(t,e){var n=t.getBaseLayer(),r=t.getLayers(),i=r.length;if(n){var o=n.layers||[n],a=je("li","group"),s=je("ul"),c=je("label");c.innerHTML=this.options.baseTitle,a.appendChild(c);for(var u=0,l=o.length;u<l;u++){var h=o[u];this._isExcluded(h)&&(s.appendChild(this._renderLayer(o[u],!0)),a.appendChild(s),e.appendChild(a))}}if(i){var f=je("li","group"),d=je("ul"),p=je("label");p.innerHTML=this.options.overlayTitle,f.appendChild(p);for(var m=0;m<i;m++){var g=r[m];this._isExcluded(g)&&d.appendChild(this._renderLayer(g))}f.appendChild(d),e.appendChild(f)}},n._isExcluded=function(t){var e=t.getId(),n=this.options.excludeLayers;return!(n.length&&n.indexOf(e)>=0)},n._renderLayer=function(t,e){var n=this,r=je("li","layer"),i=je("label"),o=je("input"),a=this.getMap(),s=t.options.visible;t.options.visible=!0;var c=t.isVisible();return t.options.visible=s,r.className="layer",e?(o.type="radio",o.name="base"):o.type="checkbox",o.checked=s&&c,c||o.setAttribute("disabled","disabled"),o.onchange=function(e){if("radio"===e.target.type){var r=a.getBaseLayer(),i=r.layers;if(i)for(var o=0,s=i.length;o<s;o++){var c=i[o];c[c===t?"show":"hide"]()}else r.isVisible()||r.show();a._fireEvent("setbaselayer")}else t[e.target.checked?"show":"hide"]();n.fire("layerchange",{target:t})},r.appendChild(o),i.innerHTML=t.getId(),r.appendChild(i),r},e}(qo);Xo.mergeOptions({position:"top-right",baseTitle:"Base Layers",overlayTitle:"Layers",excludeLayers:[],containerClass:"maptalks-layer-switcher"}),ii.mergeOptions({layerSwitcherControl:!1}),ii.addOnLoadHook((function(){this.options.layerSwitcherControl&&(this.layerSwitcherControl=new Xo(this.options.layerSwitcherControl),this.addControl(this.layerSwitcherControl))}));var $o=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(){var t=this.options.size;this.options.maximize||(t=[0,0]);var e=je("div"),n=this.mapContainer=je("div");n.style.width=t[0]+"px",n.style.height=t[1]+"px",n.className=this.options.containerClass;var r=this.button=je("div");return r.className=this.options.buttonClass,e.appendChild(n),e.appendChild(r),e},n.onAdd=function(){this.options.maximize&&this._createOverview(),this.getMap().on("resize moving zooming rotate dragrotating viewchange",this._update,this).on("setbaselayer",this._updateBaseLayer,this).on("spatialreferencechange",this._updateSpatialReference,this),rn(this.button,"click",this._onButtonClick,this),this._updateButtonText()},n.onRemove=function(){this.getMap().off("resize moving zooming rotate dragrotating viewchange",this._update,this).off("setbaselayer",this._updateBaseLayer,this).off("spatialreferencechange",this._updateSpatialReference,this),this._overview&&(this._overview.remove(),delete this._overview,delete this._perspective),on(this.button,"click",this._onButtonClick,this)},n.maxmize=function(){var t=this.options.size,e=this.mapContainer;return e.style.width=t[0]+"px",e.style.height=t[1]+"px",this._createOverview(),this},n.minimize=function(){this._overview&&this._overview.remove(),delete this._overview,delete this._perspective;var t=this.mapContainer;return t.style.width="0px",t.style.height="0px",this},n.getOverviewMap=function(){return this._overview},n._onButtonClick=function(){this._overview?this.minimize():this.maxmize(),this._updateButtonText()},n._updateButtonText=function(){this._overview?this.button.innerHTML="-":this.button.innerHTML="+"},n._createOverview=function(){var t=this.getMap(),e=this.mapContainer,n=t.config();d(n,{center:t.getCenter(),zoom:this._getOverviewZoom(),zoomAnimationDuration:150,pitch:0,bearing:0,scrollWheelZoom:!1,checkSize:!1,doubleClickZoom:!1,touchZoom:!1,control:!1,draggable:!1,maxExtent:null}),this._overview=new ii(e,n),this._updateBaseLayer(),this._perspective=new bi(this._getPerspectiveCoords(),{draggable:!0,cursor:"move",symbol:this.options.symbol}).on("dragend",this._onDragEnd,this),new eo("perspective_layer",this._perspective).addTo(this._overview),this.fire("load")},n._getOverviewZoom=function(){var t=this.getMap(),e=t.getZoom(),n=t.getMinZoom(),r=this.options.level;if(r>0){for(var i=r;i>0;i--)if(e-i>=n)return e-i}else for(var o=r;o<0;o++)if(e-o>=n)return e-o;return e},n._onDragEnd=function(){var t=this._perspective.getCenter();this._overview.setCenter(t),this.getMap().panTo(t)},n._getPerspectiveCoords=function(){var t=this.getMap();return t.getContainerExtent().toArray().map((function(e){return t.containerPointToCoordinate(e)}))},n._update=function(){if(this._overview){Ze(this._overview._containerDOM);var t=this._getPerspectiveCoords();this._perspective.setCoordinates(t),this._overview.setCenterAndZoom(this.getMap().getCenter(),this._getOverviewZoom())}},n._updateSpatialReference=function(){if(this._overview){var t=this.getMap().options.spatialReference;this._overview.setSpatialReference(t)}},n._updateBaseLayer=function(){if(this._overview){var t=this.getMap().getBaseLayer();if(t){var e=t.layers,n=0;if(e)for(var r=0,i=e.length;r<i;r++)if(e[r].isVisible()){n=r;break}var o=t.toJSON(),a=null;e?(a=o.layers[n].options).visible=!0:a=o.options,this._overview.setMinZoom(a.minZoom||null).setMaxZoom(a.maxZoom||null),delete a.minZoom,delete a.maxZoom,delete o.options.canvas,o.options.visible=!0,o.options.renderer="canvas";var s=ei.fromJSON(o);for(var c in t)_(t[c])&&t.hasOwnProperty(c)&&t[c]!==t.constructor.prototype[c]&&(s[c]=t[c]);this._overview.setBaseLayer(s)}else this._overview.setBaseLayer(null)}},e}(qo);$o.mergeOptions({level:4,position:{right:1,bottom:1},size:[300,200],maximize:!0,symbol:{lineWidth:3,lineColor:"#1bbc9b",polygonFill:"#1bbc9b",polygonOpacity:.4},containerClass:"maptalks-overview",buttonClass:"maptalks-overview-button"}),ii.mergeOptions({overviewControl:!1}),ii.addOnLoadHook((function(){this.options.overviewControl&&(this.overviewControl=new $o(this.options.overviewControl),this.addControl(this.overviewControl))}));var Qo=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(){var t;if(this.options.custom)y(this.options.content)?(t=je("div")).innerHTML=this.options.content:t=this.options.content;else{if(t=je("div","maptalks-panel"),this.options.closeButton){var e=je("a","maptalks-close");e.href="javascript:;",e.onclick=function(){t.style.display="none"},t.appendChild(e)}var n=je("div","maptalks-panel-content");n.innerHTML=this.options.content,t.appendChild(n)}return this.draggable=new Ln(t,{cancelOn:this._cancelOn.bind(this),ignoreMouseleave:!0}),this.draggable.on("dragstart",this._onDragStart,this).on("dragging",this._onDragging,this).on("dragend",this._onDragEnd,this),this.options.draggable&&this.draggable.enable(),t},n.update=function(){return this.draggable&&(this.draggable.disable(),delete this.draggable),qo.prototype.update.call(this)},n.setContent=function(t){var e=this.options.content;return this.options.content=t,this.fire("contentchange",{old:e,new:t}),this.isVisible()&&this.update(),this},n.getContent=function(){return this.options.content},n._cancelOn=function(t){var e=(t.srcElement||t.target).tagName.toLowerCase();return"button"===e||"input"===e||"select"===e||"option"===e||"textarea"===e},n._onDragStart=function(t){this._startPos=t.mousePos,this._startPosition=d({},this.getPosition()),this.fire("dragstart",t)},n._onDragging=function(t){var e=t.mousePos.sub(this._startPos),n=this._startPosition,r=this.getPosition();p(r.top)||(r.top=parseInt(n.top)+e.y),p(r.bottom)||(r.bottom=parseInt(n.bottom)-e.y),p(r.left)||(r.left=parseInt(n.left)+e.x),p(r.right)||(r.right=parseInt(n.right)-e.x),this.setPosition(r),this.fire("dragging",t)},n._onDragEnd=function(t){delete this._startPos,delete this._startPosition,this.fire("dragend",t)},n._getConnectPoints=function(){var t=this.getMap(),e=this.getContainerPoint(),n=this.getDOM(),r=parseInt(n.clientWidth),i=parseInt(n.clientHeight);return[t.containerPointToCoordinate(e.add(r/2,0)),t.containerPointToCoordinate(e.add(r,i/2)),t.containerPointToCoordinate(e.add(r/2,i)),t.containerPointToCoordinate(e.add(0,i/2))]},e}(qo);Qo.mergeOptions({position:"top-right",draggable:!0,custom:!1,content:"",closeButton:!0});var Ko=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(t){return this._map=t,this._scaleContainer=je("div",this.options.containerClass),this._addScales(),t.on("zoomend",this._update,this),this._map._loaded&&this._update(),this._scaleContainer},n.onRemove=function(){this.getMap().off("zoomend",this._update,this)},n._addScales=function(){var t="border: 2px solid #000000;border-top: none;line-height: 1.1;padding: 0px;color: #000000;font-size: 11px;text-align:center;white-space: nowrap;overflow: hidden;-moz-box-sizing: content-box;box-sizing: content-box;background: #fff; background: rgba(255, 255, 255, 0);";this.options.metric&&(this._mScale=ze("div",this.options.containerClass?null:t,this._scaleContainer)),this.options.imperial&&(this._iScale=ze("div",this.options.containerClass?null:t,this._scaleContainer))},n._update=function(){var t=this._map.pixelToDistance(this.options.maxWidth,0);this._updateScales(t)},n._updateScales=function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},n._updateMetric=function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},n._updateImperial=function(t){var e,n,r,i=3.2808399*t;i>5280?(e=i/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mile",n/e)):(r=this._getRoundNum(i),this._updateScale(this._iScale,r+" feet",r/i))},n._updateScale=function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},n._getRoundNum=function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)},e}(qo);Ko.mergeOptions({position:"bottom-left",maxWidth:100,metric:!0,imperial:!1,containerClass:null}),ii.mergeOptions({scaleControl:!1}),ii.addOnLoadHook((function(){this.options.scaleControl&&(this.scaleControl=new Ko(this.options.scaleControl),this.addControl(this.scaleControl))}));var ta=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(t){this._map=t;var e=je("div"),n=je("ul","maptalks-toolbar-hx");e.appendChild(n),this.options.vertical?Xe(e,"maptalks-toolbar-vertical"):Xe(e,"maptalks-toolbar-horizonal");var r=this;function i(t,e,n,i){var o=r._getItems()[e];return function(r){return Ue(r),t({target:o,index:e,childIndex:n,dom:i})}}var o=this.options.items;if(U(o))for(var a=0,s=o.length;a<s;a++){var c=o[a],u=je("li");if(28!==this.options.height&&(u.style.lineHeight=this.options.height+"px"),u.style.height=this.options.height+"px",u.style.cursor="pointer",tn(c.item)){u.style.textAlign="center";var l=en("div",c.item);u.innerHTML='<div style="margin-top:'+(this.options.height-l.height)/2+'px;">'+c.item+"</div>"}else u.innerHTML=c.item;if(c.click&&rn(u,"click",i(c.click,a,null,u)),U(c.children)){var h=this._createDropMenu(a);u.appendChild(h),u._menu=h,rn(u,"mouseover",(function(){this._menu.style.display=""})),rn(u,"mouseout",(function(){this._menu.style.display="none"}))}n.appendChild(u)}return e},n._createDropMenu=function(t){var e=this;function n(t,n,r){var i=e._getItems()[n].children[r];return function(e){return Ue(e),t({target:i,index:n,childIndex:r})}}var r=je("div","maptalks-dropMenu"),i=this._getItems(),o=i.length,a=je("ul"),s=i[t].children;t===o-1&&s&&(r.style.cssText="right: 0px;",a.style.cssText="right: 0px;position: absolute;",this.options.reverseMenu&&(a.style.bottom=0)),r.appendChild(je("em","maptalks-ico"));for(var c=0,u=0,l=s.length;u<l;u++){var h=Me(s[u].item,"12px");h.width>c&&(c=h.width)}for(var f=0,d=s.length;f<d;f++){var p=s[f],m=je("li");m.innerHTML='<a href="javascript:;">'+p.item+"</a>",m.style.cursor="pointer",m.style.width=c+24+"px",rn(m.childNodes[0],"click",n(p.click,t,f)),a.appendChild(m)}if(this.options.vertical){var g=c<95?95:c;this.options.reverseMenu?r.style.right=-(g+20)+"px":r.style.left=-(g+20)+"px"}else this.options.reverseMenu?r.style.bottom="28px":r.style.top="28px";return r.appendChild(a),r.style.display="none",r},n._getItems=function(){return this.options.items||[]},e}(qo);ta.mergeOptions({height:28,vertical:!1,position:"top-right",reverseMenu:!1,items:{}});var ea=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(t){var e=this.options,n=je("div","maptalks-zoom");if(e.zoomLevel){var r=je("span","maptalks-zoom-zoomlevel");n.appendChild(r),this._levelDOM=r}var i=je("div","maptalks-zoom-slider"),o=je("a","maptalks-zoom-zoomin");if(o.href="javascript:;",o.innerHTML="+",i.appendChild(o),this._zoomInButton=o,e.slider){var a=je("div","maptalks-zoom-slider-box"),s=je("div","maptalks-zoom-slider-ruler"),c=je("span","maptalks-zoom-slider-reading"),u=je("span","maptalks-zoom-slider-dot");s.appendChild(c),a.appendChild(s),a.appendChild(u),i.appendChild(a),this._sliderBox=a,this._sliderRuler=s,this._sliderReading=c,this._sliderDot=u}var l=je("a","maptalks-zoom-zoomout");return l.href="javascript:;",l.innerHTML="-",i.appendChild(l),this._zoomOutButton=l,n.appendChild(i),t.on("_zoomend _zooming _zoomstart _spatialreferencechange",this._update,this),this._update(),this._registerDomEvents(),n},n.onRemove=function(){this.getMap().off("_zoomend _zooming _zoomstart _spatialreferencechange",this._update,this),this._zoomInButton&&on(this._zoomInButton,"click",this._onZoomInClick,this),this._zoomOutButton&&on(this._zoomOutButton,"click",this._onZoomOutClick,this),this._sliderRuler&&(on(this._sliderRuler,"click",this._onClickRuler,this),this.dotDragger.disable(),delete this.dotDragger)},n._update=function(){var t=this.getMap();if(this._sliderBox){var e=10*(t.getMaxZoom()-t.getMinZoom());this._sliderBox.style.height=e+16+"px",this._sliderRuler.style.height=e+8+"px",this._sliderRuler.style.cursor="pointer";var n=10*(t.getMaxZoom()-t.getZoom());this._sliderReading.style.height=10*(t.getZoom()-t.getMinZoom()+1)+"px",this._sliderDot.style.top=n+"px"}this._updateText()},n._updateText=function(){if(this._levelDOM){var t=this.getMap().getZoom();g(t)||(t=Math.floor(10*t)/10),this._levelDOM.innerHTML=t}},n._registerDomEvents=function(){this._zoomInButton&&rn(this._zoomInButton,"click",this._onZoomInClick,this),this._zoomOutButton&&rn(this._zoomOutButton,"click",this._onZoomOutClick,this),this._sliderRuler&&(rn(this._sliderRuler,"click",this._onClickRuler,this),this.dotDragger=new Ln(this._sliderDot,{ignoreMouseleave:!0}),this.dotDragger.on("dragstart",this._onDotDragstart,this).on("dragging dragend",this._onDotDrag,this).enable())},n._onZoomInClick=function(t){Ge(t),this.getMap().zoomIn()},n._onZoomOutClick=function(t){Ge(t),this.getMap().zoomOut()},n._onClickRuler=function(t){Ge(t);var e=this.getMap(),n=qe(t,this._sliderRuler).y,r=e.getMaxZoom(),i=Math.floor(r-n/10);e.setZoom(i)},n._onDotDragstart=function(t){Ge(t.domEvent);var e=this.getMap(),n=e.getSize().toPoint()._multi(.5);e.onZoomStart(e.getZoom(),n)},n._onDotDrag=function(t){Ge(t.domEvent);var e=this.getMap(),n=e.getSize().toPoint()._multi(.5),r=qe(t.domEvent,this._sliderRuler),i=e.getMaxZoom(),o=e.getMinZoom(),a=r.y,s=i-a/10;i<s?(s=i,a=0):o>s&&(s=o,a=10*(i-o)),"dragging"===t.type?e.onZooming(s,n,1):"dragend"===t.type&&(this.options.seamless?e.onZoomEnd(s,n):e.onZoomEnd(Math.round(s),n)),this._sliderDot.style.top=a+"px",this._sliderReading.style.height=10*(e.getZoom()-o+1)+"px",this._updateText()},e}(qo);ea.mergeOptions({position:"top-left",slider:!0,zoomLevel:!0,seamless:!1}),ii.mergeOptions({zoomControl:!1}),ii.addOnLoadHook((function(){this.options.zoomControl&&(this.zoomControl=new ea(this.options.zoomControl),this.addControl(this.zoomControl))}));var na=Object.freeze({Control:qo,Attribution:Jo,LayerSwitcher:Xo,Overview:$o,Panel:Qo,Scale:Ko,Toolbar:ta,Zoom:ea}),ra=function(){function t(t,e,n,r){Array.isArray(t)?(this.scale={x:t[0],y:t[1]},this.origin={x:t[2],y:t[3]}):(this.scale={x:t,y:e},this.origin={x:n,y:r})}return t.getDefault=function(t){return"baidu"===t.code.toLowerCase()?"baidu":t.code.toLowerCase()==="EPSG:4326".toLowerCase()?"tms-global-geodetic":"identity"===t.code.toLowerCase()?[1,-1,0,0]:"web-mercator"},t}(),ia=6378137*Math.PI;d(ra,{"web-mercator":new ra([1,-1,-ia,ia]),"tms-global-mercator":new ra([1,1,-ia,-ia]),"tms-global-geodetic":new ra([1,1,-180,-90]),baidu:new ra([1,1,0,0])});for(var oa=function(){function t(t,e,n,r){this.map=t,this.tileSize=r,this.fullExtent=n,this.prepareTileInfo(e,n),this._xScale=n.right>=n.left?1:-1,this._yScale=n.top>=n.bottom?1:-1,this._pointOrigin=t._prjToPoint(new me(this.tileSystem.origin),t.getGLZoom()),this._glRes=t.getResolution(t.getGLZoom())}var e=t.prototype;return e.prepareTileInfo=function(t,e){if(y(t)?t=ra[t.toLowerCase()]:Array.isArray(t)&&(t=new ra(t)),!t)throw new Error("Invalid TileSystem");this.tileSystem=t;var n=e.right>e.left?1:-1,r=e.top>e.bottom?-1:1,i=t.origin.x,o=t.origin.y;this.transformation=new qn([n,r,i,o])},e._getTileNum=function(t,e){var n=this.tileSystem,r=this.tileSize,i=Math.floor(1e-7*n.scale.x+t.x/(r.width*e)),o=Math.ceil(1e-7*n.scale.y+t.y/(r.height*e));return{x:n.scale.x*i,y:n.scale.y*o}},e.getTileIndex=function(t,e,n){var r=this.tileSystem,i=this.transformation.transform(t,1),o=this._getTileNum(i,e);return r.scale.x<0&&(o.x-=1),r.scale.y>0&&(o.y-=1),this.getNeighorTileIndex(o.x,o.y,0,0,e,n)},e.getNeighorTileIndex=function(t,e,n,r,i,o){var a=this.tileSystem,s=t+a.scale.x*n,c=e-a.scale.y*r,u=!1,l=s,h=c,f=this._getTileFullIndex(i);return o&&(!0!==o&&"x"!==o||(f.xmax===f.xmin?s=f.xmin:s<f.xmin?(s=f.xmax-(f.xmin-s)%(f.xmax-f.xmin))===f.xmax&&(s=f.xmin):s>=f.xmax&&(s=f.xmin+(s-f.xmin)%(f.xmax-f.xmin))),!0!==o&&"y"!==o||(f.ymax===f.ymin?c=f.ymin:c>=f.ymax?c=f.ymin+(c-f.ymin)%(f.ymax-f.ymin):c<f.ymin&&(c=f.ymax-(f.ymin-c)%(f.ymax-f.ymin))===f.ymax&&(c=f.ymin))),(s<f.xmin||s>f.xmax||c>f.ymax||c<f.ymin)&&(u=!0),{x:s,y:c,idx:l,idy:h,out:u}},e._getTileFullIndex=function(t){if(this._tileFullIndex||(this._tileFullIndex={}),this._tileFullIndex[t])return this._tileFullIndex[t];var e=this.fullExtent,n=this.transformation,r=this._getTileNum(n.transform(new Rn(e.left,e.top),1),t),i=this._getTileNum(n.transform(new Rn(e.right,e.bottom),1),t),o=this.tileSystem;return o.scale.x<0&&(r.x-=1,i.x-=1),o.scale.y>0&&(r.y-=1,i.y-=1),this._tileFullIndex[t]=new Wn(r,i),this._tileFullIndex[t]},e.getTilePrjNW=function(t,e,n){var r=this.tileSystem,i=this.tileSize,o=r.origin.y+this._yScale*r.scale.y*(e+(1===r.scale.y?1:0))*n*i.height,a=r.origin.x+this._xScale*r.scale.x*(t+(1===r.scale.x?0:1))*n*i.width;return new Rn(a,o)},e.getTilePointNW=function(t,e,n){var r=this._glRes/n,i=this.tileSystem,o=this.tileSize,a=this._pointOrigin.y*r+this._yScale*i.scale.y*(e+(1===i.scale.y?1:0))*o.height,s=this._pointOrigin.x*r+this._xScale*i.scale.x*(t+(1===i.scale.x?0:1))*o.width;return new me(s,a)},e.getTilePrjSE=function(t,e,n){var r=this.tileSystem,i=this.tileSize,o=r.origin.y+this._yScale*r.scale.y*(e+(1===r.scale.y?0:1))*n*i.height,a=r.origin.x+this._xScale*r.scale.x*(t+(1===r.scale.x?1:0))*n*i.width;return new Rn(a,o)},e.getTilePointSE=function(t,e,n){var r=this._glRes/n,i=this.tileSystem,o=this.tileSize,a=this._pointOrigin.y*r+this._yScale*i.scale.y*(e+(1===i.scale.y?0:1))*o.height,s=this._pointOrigin.x*r+this._xScale*i.scale.x*(t+(1===i.scale.x?1:0))*o.width;return new me(s,a)},e.getTilePrjExtent=function(t,e,n){var r=this.getTilePrjNW(t,e,n),i=this.getTilePrjSE(t,e,n);return new Wn(r,i)},t}(),aa=[],sa=0;sa<6;sa++)aa[sa]=[];var ca=[];function ua(t,e,n){!function(t){var e=t,n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=e[6],u=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15];la(aa[0],o-n,u-a,d-l,v-p),la(aa[1],o+n,u+a,d+l,v+p),la(aa[2],o+r,u+s,d+h,v+m),la(aa[3],o-r,u-s,d-h,v-m),la(aa[4],o-i,u-c,d-f,v-g),la(aa[5],o+i,u+c,d+f,v+g)}(t);for(var r=0;r<6;r++)if(!n||"0"!==n.charAt(r)){var i=aa[r];if(ca[0]=i[0]>0?e[1][0]:e[0][0],ca[1]=i[1]>0?e[1][1]:e[0][1],ca[2]=i[2]>0?e[1][2]:e[0][2],ha(i,ca)<0)return!1}return!0}function la(t,e,n,r,i){return t[0]=e*(1/6),t[1]=n*(1/6),t[2]=r*(1/6),t[3]=i*(1/6),t}function ha(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]}var fa="undefined"!=typeof Set,da=function(){function t(){this._table=fa?new Set:{}}var e=t.prototype;return e.add=function(t){fa?this._table.add(t):this._table[t]=!0},e.has=function(t){return fa?this._table.has(t):this._table[t]},e.reset=function(){fa?this._table.clear():this._table={}},t}(),pa={urlTemplate:null,subdomains:null,errorUrl:null,repeatWorld:!0,background:!0,backgroundZoomDiff:6,loadingLimitOnInteracting:3,tileRetryCount:0,placeholder:!1,crossOrigin:null,tileSize:[256,256],offset:[0,0],tileSystem:null,fadeAnimation:!C,debug:!1,spatialReference:null,maxCacheSize:256,renderer:he.webgl?"gl":"canvas",clipByPitch:!0,maxAvailableZoom:null,cascadeTiles:!0,zoomOffset:0},ma=/\{ *([\w_]+) *\}/g,ga=new me(0,0),va=new me(0,0),ya=new me(0,0),_a=new me(0,0),xa=new me(0,0),ba=new me(0,0),wa=new me(0,0),Ma=[[0,0,0],[0,0,0]],Sa=[],Ta=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t),e.fromJSON=function(t){return t&&"TileLayer"===t.type?new e(t.id,t.options):null};var n=e.prototype;return n.getTileSize=function(){if(this._tileSize)return this._tileSize;var t=this.options.tileSize;return m(t)&&(t=[t,t]),this._tileSize=new ge(t),this._tileSize},n.getTiles=function(t,e){var n=this.getMap(),r=n.getPitch(),i=e&&e.getRenderer(),o=n.getContainerExtent(),a=[],s=0,c=this.getMinZoom(),u=n.options.cascadePitches[0],l=n.options.cascadePitches[1],h=Math.floor(n._getVisualHeight(l)),f=p(t)?this._getTileZoom(n.getZoom()):t;if(this._visitedTiles=new da,this._coordCache={},!p(t)||!this.options.cascadeTiles||r<=u||!p(c)&&f<=c){var d=r<=l?o:new Zn(0,n.height-h,n.width,n.height),m=this._getTiles(f,d,2,i);return m&&(s+=m.tiles.length,a.push(m)),{tileGrids:a,count:s}}var g=Math.floor(n._getVisualHeight(u)),v=new Zn(0,n.height-g,n.width,n.height),y=this._getTiles(f,v,0,i);s+=y?y.tiles.length:0,a.push(y);var _,x,b=v.ymin,w=n.getSpatialReference().getZoomDirection(),M=w;if(r>l){f-M<=c&&(M=0);var S=new Zn(0,n.height-h,n.width,b);s+=(_=this._getTiles(f-M,S,1,i))?_.tiles.length:0,b=S.ymin,M+=4*w}if(f-M>=c){var T=new Zn(0,o.ymin,n.width,b);s+=(x=this._getTiles(f-M,T,2,i))?x.tiles.length:0,a.push(x)}return _&&x&&(a[1]=x,a[2]=_),{tileGrids:a,count:s}},n.getTileUrl=function(t,e,n){var r=this.options.urlTemplate,i="";if(this.options.subdomains){var o=this.options.subdomains;if(U(o)){var a=(t+e)%o.length;a<0&&(a=0),i=o[a]}}if(_(r))return r(t,e,n,i);var s={x:t,y:e,z:n,s:i};return r.replace(ma,(function(t,e){var n=s[e];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(s)),n}))},n.clear=function(){return this._renderer&&this._renderer.clear(),this.fire("clear"),this},n.toJSON=function(){return{type:this.getJSONType(),id:this.getId(),options:this.config()}},n.getSpatialReference=function(){var t=this.getMap();return!t||this.options.spatialReference&&!Qr.equals(this.options.spatialReference,t.options.spatialReference)?(this._sr=this._sr||new Qr(this.options.spatialReference),void 0===this._srMinZoom&&(this._srMinZoom=this._sr.getMinZoom(),this._srMaxZoom=this._sr.getMaxZoom()),this._sr):t.getSpatialReference()},n.getMinZoom=function(){return this.getSpatialReference()!==this.getMap().getSpatialReference()?Math.max(t.prototype.getMinZoom.call(this),this._srMinZoom):t.prototype.getMinZoom.call(this)},n.getMaxZoom=function(){return this.getSpatialReference()!==this.getMap().getSpatialReference()?Math.min(t.prototype.getMaxZoom.call(this),this._srMaxZoom):t.prototype.getMaxZoom.call(this)},n._getTileZoom=function(t){g(t)||(t=Math.round(t));var e=this.options.maxAvailableZoom;return!p(e)&&t>e&&(t=e),t},n._getTiles=function(t,e,n,r){var i=this,o=this.getMap(),a=t,s=o.projViewMatrix;n<2&&(0===n&&(a-=1),s=0===n?o.cascadeFrustumMatrix0:1===n?o.cascadeFrustumMatrix1:o.projViewMatrix);var c=a+this.options.zoomOffset,u=this._getTileOffset(c),l=u[0]||u[1],h={zoom:a,extent:null,offset:u,tiles:[]};if(c<0)return h;var f=this.getMinZoom(),d=this.getMaxZoom();if(!(o&&this.isVisible()&&o.width&&o.height))return h;if(!p(f)&&a<f||!p(d)&&a>d)return h;var m=this._getTileConfig();if(!m)return h;var g={zoom:u},v=this.getSpatialReference(),y=o.getSpatialReference(),_=v.getResolution(c),x=o.getGLScale(a),b=v===y&&this.options.repeatWorld,w=e.convertTo((function(t){if(t.y>0&&t.y<o.height){var e=(0===t.x?0:1)+t.y;i._coordCache[e]||(i._coordCache[e]=o._containerPointToPoint(t)),i._coordCache[e]}return o._containerPointToPoint(t,void 0,ga)})),M=this._getMask2DExtent();if(M){var S=M.intersection(w);if(!S)return h;e=S.convertTo((function(t){return o._pointToContainerPoint(t,void 0,0,ga)}))}var T,E=o._containerPointToPrj(e.getCenter(),va),C=o._prjToPoint(E,c,ya);T=l?this._project(o._pointToPrj(C._add(u),c,ya),ya):this._project(E,ya);var A=o.getGLScale()/o.getGLScale(c);_a.x=w.xmin*A,_a.y=w.ymax*A,xa.x=w.xmax*A,xa.y=w.ymin*A;for(var P=this._project(o._pointToPrj(_a._add(u),c,_a),_a),L=this._project(o._pointToPrj(xa._add(u),c,xa),xa),R=m.getTileIndex(T,_,b),O=m.getTileIndex(P,_,b),k=m.getTileIndex(L,_,b),I=Math.ceil(Math.abs(R.idy-O.idy)),D=Math.ceil(Math.abs(R.idx-O.idx)),j=Math.ceil(Math.abs(R.idy-k.idy)),z=Math.ceil(Math.abs(R.idx-k.idx)),N=(I+j+1)*(D+z+1),F=this.getTileSize(),B=this.getRenderer()||r,H=this._getTileConfig().tileSystem.scale,G=[],U=new Zn,V=new me(0,0),W=-I;W<=j;W++)for(var Z=-D,q=-1/0,Y=!1;Z>=q&&Z<=z;){var J=m.getNeighorTileIndex(R.idx,R.idy,Z,W,_,b);q===-1/0?Z++:Z--;var X=this._getTileId(J.idx,J.idy,a);if(!(J.out||this._visitedTiles&&this._visitedTiles.has(X))){var $=B&&B.isTileCachedOrLoading(X);$&&($=$.info);var Q=void 0;if($){var K=$.extent2d;V.set(K.xmin,K.ymax),Q=V}else if(this._hasOwnSR){var tt=m.getTilePrjNW(J.x,J.y,_);Q=o._prjToPoint(this._unproject(tt,xa),a)}else Q=m.getTilePointNW(J.x,J.y,_);var et=void 0,nt=void 0;if(v===y)et=F.width,nt=F.height;else{var rt=void 0;if(this._hasOwnSR){var it=m.getTilePrjSE(J.x,J.y,_);rt=o._prjToPoint(this._unproject(it,xa),a,xa)}else rt=m.getTilePointSE(J.x,J.y,_);et=Math.ceil(Math.abs(rt.x-Q.x)),nt=Math.ceil(Math.abs(rt.y-Q.y))}var ot=H.x*(J.idx-J.x)*et,at=H.y*(J.idy-J.y)*nt;$||!ot&&!at||Q._add(ot,at);var st=$&&$.extent2d||new Zn(Q.x,Q.y-nt,Q.x+et,Q.y);(N<=4||Y||this._isTileInExtent(s,st,u,x))&&(this._visitedTiles&&0===n&&this._visitedTiles.add(X),0===n?(this._splitTiles(s,G,B,J,a+1,st,ot,at,g,r),U._combine(st)):($?($.offset[0]=u[0],$.offset[1]=u[1]):($={z:a,x:J.x,y:J.y,extent2d:st,offset:u,id:X,url:this.getTileUrl(J.x,J.y,a)},r&&($.layer=this.getId())),G.push($),U._combine(st)),q===-1/0?(q=Z,Z=z):Y||(Y=!0))}}if(G.length){var ct=o._containerPointToPoint(e.getCenter(),a,ga)._add(u),ut=new me(0,0),lt=new me(0,0);G.sort((function(t,e){return ut.set((t.extent2d.xmin+t.extent2d.xmax)/2,(t.extent2d.ymin+t.extent2d.ymax)/2),lt.set((e.extent2d.xmin+e.extent2d.xmax)/2,(e.extent2d.ymin+e.extent2d.ymax)/2),ut.distanceTo(ct)-lt.distanceTo(ct)}))}return{offset:u,zoom:t,extent:U,tiles:G}},n._splitTiles=function(t,e,n,r,i,o,a,s,c,u){var l=this._getTileConfig().tileSystem.scale.y,h=this.getMap().getGLScale(i),f=ba.set(2*o.xmin,l<0?2*o.ymax:2*o.ymin),d=o.getWidth(),p=o.getHeight(),m=2*r.idx,g=2*r.idy,v=2*r.x,y=2*r.y,_=this._checkAndAddTile(t,n,m,g,v,y,i,0,0,d,p,f,h,c,u);_&&e.push(_),(_=this._checkAndAddTile(t,n,m,g,v,y,i,0,1,d,p,f,h,c,u))&&e.push(_),(_=this._checkAndAddTile(t,n,m,g,v,y,i,1,0,d,p,f,h,c,u))&&e.push(_),(_=this._checkAndAddTile(t,n,m,g,v,y,i,1,1,d,p,f,h,c,u))&&e.push(_)},n._checkAndAddTile=function(t,e,n,r,i,o,a,s,c,u,l,h,f,d,p){var m=this._getTileId(n+s,r+c,a);if(this._visitedTiles&&this._visitedTiles.has(m))return null;var g=d[a];g||(g=d[a]=this._getTileOffset(a));var v=this._getTileConfig().tileSystem.scale.y,y=new Zn(h.x+s*u,h.y+v*c*l,h.x+(s+1)*u,h.y+v*(c+1)*l);if(!this._isSplittedTileInExtent(t,y,g,f))return null;var _=e&&e.isTileCachedOrLoading(m);return _?_=_.info:(_={z:a,x:i+s,y:o+c,extent2d:y,id:m,offset:g,url:this.getTileUrl(i+s,o+c,a+this.options.zoomOffset)},p&&(_.layer=this.getId())),_},n._getTileOffset=function(t){var e=this.options.offset;return _(e)&&(e=e(t)),e},n._getTileId=function(t,e,n,r){return(r||this.getId())+"_"+e+"_"+t+"_"+n},n._project=function(t,e){if(this._hasOwnSR){var n=this.getMap().getProjection();return this.getSpatialReference().getProjection().project(n.unproject(t,e),e)}return t},n._unproject=function(t,e){if(this._hasOwnSR){var n=this.getMap(),r=this.getSpatialReference(),i=n.getProjection(),o=r.getProjection();return i.project(o.unproject(t,e),e)}return t},n._initTileConfig=function(){var t=this.getMap(),e=this.getTileSize(),n=this.getSpatialReference(),r=n.getProjection(),i=n.getFullExtent();this._defaultTileConfig=new oa(t,ra.getDefault(r),i,e),this.options.tileSystem&&(this._tileConfig=new oa(t,this.options.tileSystem,i,e)),this._hasOwnSR=n!==t.getSpatialReference()},n._getTileConfig=function(){return this._defaultTileConfig||this._initTileConfig(),this._tileConfig||this._defaultTileConfig},n._bindMap=function(e){var n=e.getBaseLayer();return n===this&&(n.options.hasOwnProperty("forceRenderOnMoving")||this.config({forceRenderOnMoving:!0})),t.prototype._bindMap.apply(this,arguments)},n._isTileInExtent=function(t,e,n,r){var i,o=this.getMap();if(t!==o.projViewMatrix){var a=e.getCenter(wa)._sub(n[0],n[1])._multi(r);vo(Sa,a.x,a.y,0),i=function(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}(Sa,Sa,o.projViewMatrix)[1]<0?o.projViewMatrix:t}else i=o.projViewMatrix;return Ma[0][0]=(e.xmin-n[0])*r,Ma[0][1]=(e.ymin-n[1])*r,Ma[1][0]=(e.xmax-n[0])*r,Ma[1][1]=(e.ymax-n[1])*r,ua(i,Ma)},n._isSplittedTileInExtent=function(t,e,n,r){var i=this.getMap();return Ma[0][0]=(e.xmin-n[0])*r,Ma[0][1]=(e.ymin-n[1])*r,Ma[1][0]=(e.xmax-n[0])*r,Ma[1][1]=(e.ymax-n[1])*r,ua(i.projViewMatrix,Ma)},n.getEvents=function(){return{spatialreferencechange:this._onSpatialReferenceChange}},n._onSpatialReferenceChange=function(){delete this._tileConfig,delete this._defaultTileConfig,delete this._sr;var t=this.getRenderer();t&&t.clear()},e}(ei);Ta.registerJSONType("TileLayer"),Ta.mergeOptions(pa);var Ea=function(t){function e(e,n,r){var i;return(i=t.call(this,e,r)||this).layers=n||[],i._checkChildren(),i.layerMap={},i._groupChildren=[],i}fe(e,t),e.fromJSON=function(t){if(!t||"GroupTileLayer"!==t.type)return null;var n=t.layers.map((function(t){return ei.fromJSON(t)}));return new e(t.id,n,t.options)};var n=e.prototype;return n.getLayers=function(){return this.layers},n.toJSON=function(){return{type:this.getJSONType(),id:this.getId(),layers:this.layers.map((function(t){return t.toJSON()})),options:this.config()}},n.getTiles=function(t){for(var e=this.layers,n=[],r=0,i=0,o=e.length;i<o;i++){var a=e[i];if(a.options.visible){var s=a.getTiles(t,this);s&&0!==s.count&&(r+=s.count,I(n,s.tileGrids))}}return{count:r,tileGrids:n}},n.onAdd=function(){var e=this,n=this.getMap();this.layers.forEach((function(t){e.layerMap[t.getId()]=t,t.getChildLayer&&e._groupChildren.push(t),t._bindMap(n),t.on("show hide",e._onLayerShowHide,e)})),t.prototype.onAdd.call(this)},n.onRemove=function(){var e=this;this.layers.forEach((function(t){t._doRemove(),t.off("show hide",e._onLayerShowHide,e)})),this.layerMap={},this._groupChildren=[],t.prototype.onRemove.call(this)},n.getChildLayer=function(t){var e=this.layerMap[t];if(e)return e;for(var n=0;n<this._groupChildren.length;n++){var r=this._groupChildren[n].getChildLayer(t);if(r)return r}return null},n._onLayerShowHide=function(){var t=this.getRenderer();t&&t.setToRedraw()},n.isVisible=function(){if(!t.prototype.isVisible.call(this))return!1;for(var e=this.layers,n=0,r=e.length;n<r;n++)if(e[n].isVisible())return!0;return!1},n._checkChildren=function(){var t=this,e={};this.layers.forEach((function(n){var r=n.getId();if(e[r])throw new Error("Duplicate child layer id ("+r+") in the GroupTileLayer ("+t.getId()+")");e[r]=1}))},e}(Ta);Ea.registerJSONType("GroupTileLayer");var Ca={crs:null,uppercase:!1,detectRetina:!1},Aa={service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},Pa=function(t){function e(e,n){var r;r=t.call(this,e)||this;var i=d({},Aa);for(var o in n)o in r.options||(i[o]=n[o]);r.setOptions(n),r.setZIndex(n.zIndex);var a=r.getTileSize();return i.width=a.width,i.height=a.height,r.wmsParams=i,r._wmsVersion=parseFloat(i.version),r}fe(e,t);var n=e.prototype;return n.onAdd=function(){var e=this.getMap().getDevicePixelRatio(),n=Ca.detectRetina?e:1;this.wmsParams.width*=n,this.wmsParams.height*=n;var r=this.options.crs||this.getMap().getProjection().code,i=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[i]=r,t.prototype.onAdd.call(this)},n.getTileUrl=function(e,n,r){var i=this.getSpatialReference().getResolution(r),o=this._getTileConfig().getTilePrjExtent(e,n,i),a=o.getMax(),s=o.getMin(),c=(this._wmsVersion>=1.3&&"EPSG:4326"===this.wmsParams.crs?[s.y,s.x,a.y,a.x]:[s.x,s.y,a.x,a.y]).join(","),u=t.prototype.getTileUrl.call(this,e,n,r);return u+function(t,e,n){var r=[];for(var i in t)r.push(encodeURIComponent(n?i.toUpperCase():i)+"="+encodeURIComponent(t[i]));return(e&&-1!==e.indexOf("?")?"&":"?")+r.join("&")}(this.wmsParams,u,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+c},n.toJSON=function(){return{type:"WMSTileLayer",id:this.getId(),options:this.config()}},e.fromJSON=function(t){return t&&"WMSTileLayer"===t.type?new e(t.id,t.options):null},e}(Ta);Pa.registerJSONType("WMSTileLayer"),Pa.mergeOptions(Ca);var La=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).options.hasOwnProperty("forceRenderOnMoving")||(r.options.forceRenderOnMoving=!1),r}fe(e,t);var n=e.prototype;return n.drawTile=function(){},n.toJSON=function(){return{type:"CanvasTileLayer",id:this.getId(),options:this.config()}},e.fromJSON=function(t){return t&&"CanvasTileLayer"===t.type?new e(t.id,t.options):null},e}(Ta);function Ra(t,e,n){var r=t.createShader(e);if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS)){var i=t.getShaderInfoLog(r);throw t.deleteShader(r),new Error("Failed to compile shader: "+i)}return r}La.registerJSONType("CanvasTileLayer");var Oa="\n attribute vec2 a_position;\n\n attribute vec2 a_texCoord;\n\n uniform mat4 u_matrix;\n\n varying vec2 v_texCoord;\n\n void main() {\n gl_Position = u_matrix * vec4(a_position, 0., 1.);\n\n v_texCoord = a_texCoord;\n }\n ",ka="\n precision mediump float;\n\n uniform sampler2D u_image;\n\n uniform float u_opacity;\n uniform float u_debug_line;\n\n varying vec2 v_texCoord;\n\n void main() {\n if (u_debug_line == 1.) {\n gl_FragColor = vec4(0., 1., 0., 1.);\n } else {\n gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n }\n }\n ",Ia=[0,0],Da=[0,0,0],ja=new Array(16),za=new me(20,20),Na=function(t){var e=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.drawGLImage=function(t,e,n,r,i,o,a,s){this.gl.program!==this.program&&this.useProgram(this.program);var c=this.gl;this.loadTexture(t),Da[0]=e||0,Da[1]=n||0;var u=mo(ja);lo(u,u,Da),ho(u,u,[o,o,1]),fo(u,this.getMap().projViewMatrix,u),c.uniformMatrix4fv(this.program.u_matrix,!1,u),c.uniform1f(this.program.u_opacity,a),c.uniform1f(this.program.u_debug_line,0);var l=t.glBuffer;!l||l.width===r&&l.height===i||(this.saveImageBuffer(l),delete t.glBuffer),t.glBuffer?c.bindBuffer(c.ARRAY_BUFFER,l):t.glBuffer=this.bufferTileData(0,0,r,i),Ia[0]="a_position",Ia[1]=2,Ia[2]=t.glBuffer.type,this.enableVertexAttrib(Ia),c.drawArrays(c.TRIANGLE_STRIP,0,4),s&&this.drawDebug(u,Ia,0,0,r,i,s)},n.drawDebug=function(t,e,n,r,i,o,a){var s=this.gl;s.bindBuffer(s.ARRAY_BUFFER,this._debugBuffer),this.enableVertexAttrib(["a_position",2,"FLOAT"]),s.bufferData(s.ARRAY_BUFFER,new Float32Array([n,r,n+i,r,n+i,r-o,n,r-o,n,r]),s.DYNAMIC_DRAW),s.uniformMatrix4fv(this.program.u_matrix,!1,t),s.uniform1f(this.program.u_debug_line,1),s.drawArrays(s.LINE_STRIP,0,5);var c=this._debugInfoCanvas;if(!c){var u=this.getMap().getDevicePixelRatio()>1?2:1;(c=this._debugInfoCanvas=document.createElement("canvas")).width=256*u,c.height=32*u;var l=c.getContext("2d");l.font="20px monospace",l.scale(u,u)}var h=c.getContext("2d");h.clearRect(0,0,c.width,c.height);var f=this.layer.options.debugOutline;hn.fillText(h,a,za,f),this.loadTexture(c),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,c);var d=n,p=n+(i=256),m=r,g=r-(o=32);s.bufferData(s.ARRAY_BUFFER,this.set8(d,m,d,g,p,m,p,g),s.DYNAMIC_DRAW),s.uniform1f(this.program.u_debug_line,0),s.drawArrays(s.TRIANGLE_STRIP,0,4)},n.bufferTileData=function(t,e,n,r,i){var o,a=t,s=t+n,c=e,u=e-r;o=g(a)&&g(s)&&g(c)&&g(u)?this.set8Int(a,c,a,u,s,c,s,u):this.set8(a,c,a,u,s,c,s,u);var l=this.loadImageBuffer(o,i);return l.width=n,l.height=r,l.type=o instanceof Int16Array?"SHORT":"FLOAT",l},n.drawTinImage=function(t,e,n,r,i){var o=this.gl;this.loadTexture(t),o.uniformMatrix4fv(this.program.u_matrix,!1,this.getMap().projViewMatrix),o.uniform1f(this.program.u_opacity,i),o.bindBuffer(o.ARRAY_BUFFER,this.posBuffer),this.enableVertexAttrib(["a_position",3]),o.bufferData(o.ARRAY_BUFFER,new Float32Array(e),o.DYNAMIC_DRAW),o.bindBuffer(o.ARRAY_BUFFER,this.texBuffer),this.enableVertexAttrib(["a_texCoord",2]),o.bufferData(o.ARRAY_BUFFER,new Float32Array(n),o.DYNAMIC_DRAW),o.bufferData(o.ELEMENT_ARRAY_BUFFER,new Uint16Array(r),o.DYNAMIC_DRAW),o.drawElements(o.TRIANGLES,r.length,o.UNSIGNED_SHORT,0)},n.createCanvas2=function(){this.canvas2=hn.createCanvas(this.canvas.width,this.canvas.height)},n.createGLContext=function(){this.canvas.gl&&this.canvas.gl.wrap?this.gl=this.canvas.gl.wrap():this.gl=function(t,e){for(var n={alpha:!0,stencil:!0,preserveDrawingBuffer:!0,antialias:!1},r=["webgl","experimental-webgl"],i=null,o=0;o<r.length;++o){try{i=t.getContext(r[o],e||n)}catch(t){}if(i)break}return i}(this.canvas2||this.canvas,this.layer.options.glOptions);var t=this.gl;t.clearColor(0,0,0,0),t.disable(t.DEPTH_TEST),t.enable(t.STENCIL_TEST),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),this.program=this.createProgram(Oa,this.layer.options.fragmentShader||ka,["u_matrix","u_image","u_opacity","u_debug_line"]),this._debugBuffer=this.createBuffer(),this.useProgram(this.program),this.texBuffer=this.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,this.texBuffer),this.enableVertexAttrib(["a_texCoord",2,"UNSIGNED_BYTE"]),t.bufferData(t.ARRAY_BUFFER,new Uint8Array([0,0,0,1,1,0,1,1]),t.STATIC_DRAW),this.enableSampler("u_image"),t.activeTexture(t.TEXTURE0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0)},n.resizeGLCanvas=function(){this.gl&&this.gl.viewport(0,0,this.canvas.width,this.canvas.height),this.canvas2&&(this.canvas2.width===this.canvas.width&&this.canvas2.height===this.canvas.height||(this.canvas2.width=this.canvas.width,this.canvas2.height=this.canvas.height))},n.clearGLCanvas=function(){this.gl&&this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.STENCIL_BUFFER_BIT)},n.disposeImage=function(t){t&&(t.texture&&this.saveTexture(t.texture),t.glBuffer&&this.saveImageBuffer(t.glBuffer),delete t.texture,delete t.glBuffer)},n._createTexture=function(t){var e=this.gl,n=this.getTexture()||e.createTexture();return e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),g(F(t.width))&&g(F(t.width))&&e.generateMipmap(e.TEXTURE_2D),n},n.getTexture=function(){this._textures||(this._textures=[]);var t=this._textures;return t&&t.length>0?t.pop():null},n.saveTexture=function(t){this._textures.push(t)},n.loadTexture=function(t){var e=this.gl,n=t.texture;return n||(n=this._createTexture(t),t.texture=n),e.bindTexture(e.TEXTURE_2D,n),n},n.getImageBuffer=function(){this._imageBuffers||(this._imageBuffers=[]);var t=this._imageBuffers;return t&&t.length>0?t.pop():null},n.saveImageBuffer=function(t){this._imageBuffers.push(t)},n.loadImageBuffer=function(t,e){var n=this.gl,r=e||this.createImageBuffer();return n.bindBuffer(n.ARRAY_BUFFER,r),n.bufferData(n.ARRAY_BUFFER,t,n.STATIC_DRAW),r},n.createImageBuffer=function(){return this.getImageBuffer()||this.createBuffer()},n.removeGLCanvas=function(){var t=this.gl;if(t){if(this._debugBuffer&&(t.deleteBuffer(this._debugBuffer),delete this._debugBuffer),this._buffers&&(this._buffers.forEach((function(e){t.deleteBuffer(e)})),delete this._buffers),this._textures&&(this._textures.forEach((function(e){return t.deleteTexture(e)})),delete this._textures),this._debugInfoCanvas){var e=this._debugInfoCanvas.texture;e&&t.deleteTexture(e),delete this._debugInfoCanvas.texture,delete this._debugInfoCanvas}var n=t.program;t.deleteShader(n.fragmentShader),t.deleteShader(n.vertexShader),t.deleteProgram(n),delete this.gl,delete this.canvas2}},n.createBuffer=function(){var t=this.gl.createBuffer();if(!t)throw new Error("Failed to create the buffer object");return this._buffers||(this._buffers=[]),this._buffers.push(t),t},n.enableVertexAttrib=function(t){!function(t,e,n){if(Array.isArray(n[0])){for(var r=Float32Array.BYTES_PER_ELEMENT,i=0,o=0;o<n.length;o++)i+=n[o][1]||0;for(var a=0,s=0;s<n.length;s++){var c=t.getAttribLocation(e,n[s][0]);if(c<0)throw new Error("Failed to get the storage location of "+n[s][0]);t.vertexAttribPointer(c,n[s][1],t[n[s][2]||"FLOAT"],!1,r*i,r*a),a+=n[s][1]||0,t.enableVertexAttribArray(c)}}else{var u=t.getAttribLocation(e,n[0]);t.vertexAttribPointer(u,n[1],t[n[2]||"FLOAT"],!1,0,0),t.enableVertexAttribArray(u)}}(this.gl,this.gl.program,t)},n.createProgram=function(t,e,n){var r=function(t,e,n){var r=Ra(t,t.VERTEX_SHADER,e),i=Ra(t,t.FRAGMENT_SHADER,n);if(!r||!i)return null;var o=t.createProgram();return o?(t.attachShader(o,r),t.attachShader(o,i),t.linkProgram(o),{program:o,vertexShader:r,fragmentShader:i}):null}(this.gl,t,e),i=r.program,o=r.vertexShader,a=r.fragmentShader;return i.vertexShader=o,i.fragmentShader=a,this._initUniforms(i,n),i},n.useProgram=function(t){var e=this.gl;return e.useProgram(t),e.program=t,this},n.enableSampler=function(t,e){var n=this.gl,r=this._getUniform(n.program,t);return e||(e=0),n.uniform1i(r,e),r},n._initUniforms=function(t,e){for(var n=0;n<e.length;n++){var r=e[n],i=e[n],o=r.indexOf("[");o>=0&&(r=r.substring(0,o),C||(i=i.substring(0,o))),t[r]=this._getUniform(t,i)}},n._getUniform=function(t,e){var n=this.gl.getUniformLocation(t,e);if(!n)throw new Error("Failed to get the storage location of "+e);return n},e}(t);return d(e.prototype,{set8:function(){var t=he.ie9?null:new Float32Array(8);return function(e,n,r,i,o,a,s,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=c,t}}(),set8Int:function(){var t=he.ie9?null:new Int16Array(8);return function(e,n,r,i,o,a,s,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=c,t}}()}),e},Fa={renderer:he.webgl?"gl":"canvas",crossOrigin:null},Ba=new me(0,0),Ha=function(t){function e(e,n,r){var i;return!n||Array.isArray(n)||n.url||(r=n,n=null),(i=t.call(this,e,r)||this)._images=n,i}fe(e,t);var n=e.prototype;return n.onAdd=function(){this._prepareImages(this._images)},n.setImages=function(t){return this._images=t,this._prepareImages(t),this},n.getImages=function(){return this._images},n._prepareImages=function(t){t=t||[],Array.isArray(t)||(t=[t]);var e=this.getMap();this._imageData=t.map((function(t){var n=new Wn(t.extent);return d({},t,{extent:n,extent2d:n.convertTo((function(t){return e.coordToPoint(t,e.getGLZoom())}))})})),this._images=t;var n=this.getRenderer();n&&n.refreshImages()},e}(ei);Ha.mergeOptions(Fa);var Ga=[],Ua=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.isDrawable=function(){return!this.getMap().getPitch()||(console&&console.warn("ImageLayer with canvas renderer can't be pitched, use gl renderer ('renderer' : 'gl') instead."),!1)},n.checkResources=function(){var t=this;if(this._imageLoaded)return Ga;var e=this.layer._imageData.map((function(t){return[t.url,null,null]}));if(this.resources){var n=[],r=new gr;e.forEach((function(e){if(t.resources.isResourceLoaded(e)){var i=t.resources.getImage(e);r.addResource(e,i)}else n.push(e)})),this.resources.forEach((function(e,n){r.isResourceLoaded(e)||t.retireImage(n.image)})),this.resources=r,e=n}return this._imageLoaded=!0,e},n.retireImage=function(){},n.refreshImages=function(){this._imageLoaded=!1,this.setToRedraw()},n.needToRedraw=function(){var e=this.getMap();return!(e.isZooming()&&!e.getPitch())&&t.prototype.needToRedraw.call(this)},n.draw=function(){this.isDrawable()&&(this.prepareCanvas(),this._painted=!1,this._drawImages(),this.completeRender())},n._drawImages=function(){var t=this.layer._imageData,e=this.getMap(),n=e._get2DExtent(e.getGLZoom());if(t&&t.length)for(var r=0;r<t.length;r++){var i=t[r].extent2d,o=this.resources&&this.resources.getImage(t[r].url);o&&n.intersects(i)&&(this._painted=!0,this._drawImage(o,i,t[r].opacity||1))}},n._drawImage=function(t,e,n){var r=0,i=this.context;n<1&&(r=i.globalAlpha,i.globalAlpha=n);var o=this.getMap(),a=Ba.set(e.xmin,e.ymax),s=o._pointToContainerPoint(a,o.getGLZoom()),c=s.x,u=s.y,l=o.getBearing();l&&(i.save(),i.translate(c,u),l&&i.rotate(-l*Math.PI/180),c=u=0);var h=o.getGLScale();i.drawImage(t,c,u,e.getWidth()/h,e.getHeight()/h),l&&i.restore(),r&&(i.globalAlpha=r)},n.drawOnInteracting=function(){this.draw()},e}(mr),Va=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.isDrawable=function(){return!0},n._drawImage=function(t,e,n){this.drawGLImage(t,e.xmin,e.ymax,e.getWidth(),e.getHeight(),1,n)},n.createContext=function(){this.createGLContext()},n.resizeCanvas=function(e){this.canvas&&(t.prototype.resizeCanvas.call(this,e),this.resizeGLCanvas())},n.clearCanvas=function(){this.canvas&&(t.prototype.clearCanvas.call(this),this.clearGLCanvas())},n.retireImage=function(t){this.disposeImage(t)},n.onRemove=function(){this.removeGLCanvas(),t.prototype.onRemove.call(this)},e}(Na(Ua));Ha.registerRenderer("canvas",Ua),Ha.registerRenderer("gl",Va);var Wa=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.getPrepareParams=function(){return[]},n.getDrawParams=function(){return[]},n.onCanvasCreate=function(){this.canvas&&this.layer.options.doubleBuffer&&(this.buffer=hn.createCanvas(this.canvas.width,this.canvas.height,this.getMap().CanvasClass))},n.needToRedraw=function(){return!!this.layer.options.animation||!(this.getMap().isInteracting()&&!this.layer.drawOnInteracting)&&t.prototype.needToRedraw.call(this)},n.draw=function(){this.prepareCanvas(),this.prepareDrawContext(),this._drawLayer()},n.drawOnInteracting=function(){this._drawLayerOnInteracting()},n.getCanvasImage=function(){var e=t.prototype.getCanvasImage.call(this);if(e&&e.image&&this.layer.options.doubleBuffer){var n=e.image;this.buffer.width===n.width&&this.buffer.height===n.height||(this.buffer.width=n.width,this.buffer.height=n.height);var r=this.buffer.getContext("2d"),i=this.layer.doubleBuffer(r,this.context);(void 0===i||i)&&(hn.image(r,n,0,0),e.image=this.buffer)}return e},n.remove=function(){return delete this._drawContext,t.prototype.remove.call(this)},n.onZoomStart=function(e){this.layer.onZoomStart(e),t.prototype.onZoomStart.call(this,e)},n.onZooming=function(e){this.layer.onZooming(e),t.prototype.onZooming.call(this,e)},n.onZoomEnd=function(e){this.layer.onZoomEnd(e),t.prototype.onZoomEnd.call(this,e)},n.onMoveStart=function(e){this.layer.onMoveStart(e),t.prototype.onMoveStart.call(this,e)},n.onMoving=function(e){this.layer.onMoving(e),t.prototype.onMoving.call(this,e)},n.onMoveEnd=function(e){this.layer.onMoveEnd(e),t.prototype.onMoveEnd.call(this,e)},n.onResize=function(e){this.layer.onResize(e),t.prototype.onResize.call(this,e)},n.prepareDrawContext=function(){if(!this._predrawed){var t=Za(this.getPrepareParams());this._drawContext=this.layer.prepareToDraw.apply(this.layer,[this.context].concat(t)),this._drawContext||(this._drawContext=[]),Array.isArray(this._drawContext)||(this._drawContext=[this._drawContext]),this._predrawed=!0}},n._prepareDrawParams=function(){if(!this.getMap())return null;var t=this.getViewExtent();if(t.maskExtent&&!t.extent.intersects(t.maskExtent))return this.completeRender(),null;var e=[this.context,t],n=Za(this.getDrawParams());return e.push.apply(e,n),e.push.apply(e,this._drawContext),e},n._drawLayer=function(){var t=this._prepareDrawParams();t&&(this.layer.draw.apply(this.layer,t),this.completeRender())},n._drawLayerOnInteracting=function(){if(this.layer.drawOnInteracting){var t=this._prepareDrawParams();t&&(this.layer.drawOnInteracting.apply(this.layer,t),this.completeRender())}},e}(mr);function Za(t){return t||(t=[]),Array.isArray(t)||(t=[t]),t}var qa=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.isCanvasRender=function(){return!0},n.prepareToDraw=function(){},n.draw=function(){},n.redraw=function(){return this._getRenderer()&&this._getRenderer().setToRedraw(),this},n.play=function(){return this.config("animation",!0),this},n.pause=function(){return this.config("animation",!1),this},n.isPlaying=function(){return this.options.animation},n.clearCanvas=function(){return this._getRenderer()&&this._getRenderer().clearCanvas(),this},n.requestMapToRender=function(){return this._getRenderer()&&this._getRenderer().requestMapToRender(),this},n.completeRender=function(){return this._getRenderer()&&this._getRenderer().completeRender(),this},n.onCanvasCreate=function(){return this},n.onZoomStart=function(){},n.onZooming=function(){},n.onZoomEnd=function(){},n.onMoveStart=function(){},n.onMoving=function(){},n.onMoveEnd=function(){},n.onResize=function(){},n.doubleBuffer=function(t){return t.clearRect(0,0,t.canvas.width,t.canvas.height),this},e}(ei);qa.mergeOptions({doubleBuffer:!1,animation:!1}),qa.registerRenderer("canvas",Wa);var Ya=new me(0,0),Ja=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.getParticles=function(){},n.draw=function(t,e){var n=this.getParticles(f());if(n&&0!==n.length){var r=this.getMap(),i=e.extent;e.maskExtent&&(i=e.extent.intersection(e.maskExtent)),i=i.convertTo((function(t){return r._pointToContainerPoint(t,void 0,0,Ya)}));for(var o=2*Math.PI,a=0,s=n.length;a<s;a++){var c=n[a].point;if(i.contains(c)){var u=n[a].color||this.options.lineColor||"#fff",l=n[a].r;t.fillStyle!==u&&(t.fillStyle=u),l<=2?t.fillRect(c.x-l/2,c.y-l/2,l,l):(t.beginPath(),t.arc(c.x,c.y,l/2,0,o),t.fill())}}this._fillCanvas(t)}else this._getRenderer()&&(this._getRenderer()._shouldClear=!0)},n._fillCanvas=function(t){var e=t.globalCompositeOperation;t.globalCompositeOperation="destination-out";var n=this.options.trail||30;t.fillStyle="rgba(0, 0, 0, "+1/n+")",t.fillRect(0,0,t.canvas.width,t.canvas.height),t.globalCompositeOperation=e},e}(qa);Ja.mergeOptions({animation:!0}),Ja.registerRenderer("canvas",function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.draw=function(){this.canvas&&this.layer.options.animation&&!this._shouldClear||(this.prepareCanvas(),this._shouldClear=!1),this.prepareDrawContext(),this._drawLayer()},n.drawOnInteracting=function(){this.draw(),this._shouldClear=!1},n.onSkipDrawOnInteracting=function(){this._shouldClear=!0},e}(Wa));var Xa=i+"_edit_stage_";function $a(t,e){return{markerType:t,markerFill:"#fff",markerLineColor:"#000",markerLineWidth:2,markerWidth:10,markerHeight:10,opacity:e}}var Qa={fixAspectRatio:!1,symbol:null,removeVertexOn:"contextmenu",centerHandleSymbol:$a("ellipse",1),vertexHandleSymbol:$a("square",1),newVertexHandleSymbol:$a("square",.4)},Ka=function(t){function e(e,n){var r;return(r=t.call(this,n)||this)._geometry=e,r._geometry?r:de(r)}fe(e,t);var n=e.prototype;return n.getMap=function(){return this._geometry.getMap()},n.prepare=function(){this.getMap()&&(this.options.symbol&&(this._originalSymbol=this._geometry.getSymbol(),this._geometry.setSymbol(this.options.symbol)),this._prepareEditStageLayer())},n._prepareEditStageLayer=function(){var t=this.getMap(),e=R(),n=Xa+e,r=Xa+e+"_shadow";this._editStageLayer=t.getLayer(n),this._shadowLayer=t.getLayer(r),this._editStageLayer||(this._editStageLayer=new eo(n),t.addLayer(this._editStageLayer)),this._shadowLayer||(this._shadowLayer=new eo(r),t.addLayer(this._shadowLayer))},n.start=function(){var t=this;if(this._geometry&&this._geometry.getMap()&&!this._geometry.editing){var e=this.getMap();this.editing=!0;var n=this._geometry;this._geometryDraggble=n.options.draggable,n.config("draggable",!1),this.prepare();var r=n.copy();r.setSymbol(n._getInternalSymbol()),r.copyEventListeners(n),n._getParent()&&r.copyEventListeners(n._getParent()),r._setEventTarget(n),r.setId(null).config({draggable:!1}),this._shadow=r,this._switchGeometryEvents("on"),n.hide(),(n instanceof Mi||n instanceof Di||n instanceof zi||n instanceof ji)&&this._createOrRefreshOutline(),this._shadowLayer.bringToFront().addGeometry(r),this._editStageLayer.bringToFront(),this._addListener([e,"zoomstart",function(){t._editStageLayer.hide()}]),this._addListener([e,"zoomend",function(){t._editStageLayer.show()}]),n instanceof Mi?(r.config("draggable",!0),r.on("dragend",this._onMarkerDragEnd,this)):this._createCenterHandle(),n instanceof Mi?this.createMarkerEditor():n instanceof Di?this.createCircleEditor():n instanceof zi||n instanceof ji?this.createEllipseOrRectEditor():n instanceof Ni||(n instanceof bi||n instanceof Ti)&&this.createPolygonEditor()}},n.stop=function(){delete this._history,delete this._historyPointer,delete this._editOutline,this._switchGeometryEvents("off"),this.getMap()&&(delete this._shadow,this._geometry.config("draggable",this._geometryDraggble),delete this._geometryDraggble,this._geometry.show(),this._editStageLayer.remove(),this._shadowLayer.remove(),this._clearAllListeners(),this._refreshHooks=[],this.options.symbol&&(this._geometry.setSymbol(this._originalSymbol),delete this._originalSymbol),this.editing=!1)},n.isEditing=function(){return!p(this.editing)&&this.editing},n._getGeometryEvents=function(){return{symbolchange:this._onGeoSymbolChange,"positionchange shapechange":this._exeAndReset}},n._switchGeometryEvents=function(t){if(this._geometry){var e=this._getGeometryEvents();for(var n in e)this._geometry[t](n,e[n],this)}},n._onGeoSymbolChange=function(t){this._shadow&&this._shadow.setSymbol(t.target._getInternalSymbol())},n._onMarkerDragEnd=function(){this._update("setCoordinates",this._shadow.getCoordinates().toArray()),this._refresh()},n._createOrRefreshOutline=function(){var t=this._geometry,e=this._editOutline;return e?(e.remove(),this._editOutline=e=t.getOutline(),this._editStageLayer.addGeometry(e)):(e=t.getOutline(),this._editStageLayer.addGeometry(e),this._editOutline=e,this._addRefreshHook(this._createOrRefreshOutline)),e},n._createCenterHandle=function(){var t,e=this,n=this._shadow.getCenter(),r=this.options.centerHandleSymbol,i=this.createHandle(n,{symbol:r,cursor:"move",onDown:function(){var n=It((t=e._shadow.copy())._getInternalSymbol(),.5);t.setSymbol(n).addTo(e._editStageLayer)},onMove:function(e,n){var r=n.coordOffset;t.translate(r)},onUp:function(){e._update("setCoordinates",Rn.toNumberArrays(t.getCoordinates())),t.remove(),e._refresh()}});this._addRefreshHook((function(){var t=e._shadow.getCenter();i.setCoordinates(t)}))},n._createHandleInstance=function(t,e){var n=e.symbol;return new Mi(t,{draggable:!0,dragShadow:!1,dragOnAxis:e.axis,cursor:e.cursor,symbol:n})},n.createHandle=function(t,e){e||(e={});var n=this.getMap(),r=this._createHandleInstance(t,e),i=this;function o(t){return e.onDown&&(this._geometry.fire("handledragstart"),e.onDown.call(i,t.viewPoint,t)),!1}function a(t){i._hideContext();var o=n._prjToViewPoint(r._getPrjCoordinates());return e.onMove&&(this._geometry.fire("handledragging"),e.onMove.call(i,o,t)),!1}function s(t){return e.onUp&&(this._geometry.fire("handledragend"),e.onUp.call(i,t)),!1}return r.on("dragstart",o,this),r.on("dragging",a,this),r.on("dragend",s,this),r.on("removestart",(function t(){r.config("draggable",!1),r.off("dragstart",o,i),r.off("dragging",a,i),r.off("dragend",s,i),r.off("removestart",t,i),delete r["maptalks--editor-refresh-fn"]}),this),e.onRefresh&&(r["maptalks--editor-refresh-fn"]=e.onRefresh),this._editStageLayer.addGeometry(r),r},n._createResizeHandles=function(t,e,n){var r=this,i=["nw-resize","n-resize","ne-resize","w-resize","e-resize","sw-resize","s-resize","se-resize"],o=[null,"y",null,"x","x",null,"y",null],a=this._geometry;t||(t=[]);var s=this,c=[],u={},l=this.getMap(),h=this.options.vertexHandleSymbol,f=function(){for(var f=function(t){return[new me(t.xmin,t.ymax),new me((t.xmax+t.xmin)/2,t.ymax),new me(t.xmax,t.ymax),new me(t.xmin,(t.ymax+t.ymin)/2),new me(t.xmax,(t.ymax+t.ymin)/2),new me(t.xmin,t.ymin),new me((t.xmax+t.xmin)/2,t.ymin),new me(t.xmax,t.ymin)]}(a._getPainter().get2DExtent()),d=function(d){if(Array.isArray(t)&&t.some((function(t){return t===d})))return"continue";var p=f[d],m=l.pointToCoordinate(p);if(c.length<f.length-t.length){var g=r.createHandle(m,{symbol:h,cursor:i[d],axis:o[d],onMove:function(t){return function(n){s._updating=!0,e(n,t),a.fire("resizing")}}(d),onUp:function(){s._updating=!1,n(),r._refresh()}});g.setId(d),u[d]=c.length,c.push(g)}else c[u[d]].setCoordinates(m)},p=0;p<f.length;p++)d(p)};return f(),this._addRefreshHook(f),c},n.createMarkerEditor=function(){var t=this,e=this._geometry,n=this._shadow,r=this.getMap();if(n._canEdit()){this._history||this._recordHistory(h());var i=n._getInternalSymbol(),o=new me(0,0);m(i.markerDx)&&(o.x=i.markerDx),m(i.markerDy)&&(o.y=i.markerDy);var a=null;Ar.test(i)?"pin"!==i.markerType&&"pie"!==i.markerType&&"bar"!==i.markerType||(a=[5,6,7]):(Lr.test(i)||zr.test(i))&&(a=[5,6,7]);var s,c=[2,1,2,0,0,2,1,2];if(this.options.fixAspectRatio){var u=n.getSize();s=u.width/u.height}var l=this._createResizeHandles(null,(function(i,u){if(a&&a.indexOf(u)>=0){var h=r.viewPointToCoordinate(i.sub(o)),f=n.getCoordinates();h.x=f.x,n.setCoordinates(h),t._updateCoordFromShadow(!0);var d=l[l.length-1-u];i=r.coordToViewPoint(d.getCoordinates())}var p=r._pointToViewPoint(n._getCenter2DPoint()).add(o),m=n._getInternalSymbol(),g=i.sub(p);a&&i.y>p.y&&(g.y=0);var v=a?1:2,y=2*Math.abs(g.x),_=Math.abs(g.y)*v;s&&(_=(y=Math.max(y,_*s))/s);var x=c[u];n instanceof Zi?((s||0===x||2===x)&&(n.setWidth(y),e.setWidth(y)),(s||1===x||2===x)&&(n.setHeight(_),e.setHeight(_))):((s||0===x||2===x)&&(m.markerWidth=y),(s||1===x||2===x)&&(m.markerHeight=_),n.setSymbol(m),e.setSymbol(m))}),(function(){t._update(h())}));this._addListener([r,"zoomend",function(){this._refresh()}])}else console&&console.warn("A marker can't be resized with symbol:",n.getSymbol());function h(){var t=[["setCoordinates",n.getCoordinates().toArray()]];return n instanceof Zi?(t.push(["setWidth",n.getWidth()]),t.push(["setHeight",n.getHeight()])):t.push(["setSymbol",n.getSymbol()]),t}},n.createCircleEditor=function(){var t=this,e=this._geometry,n=this._shadow,r=this.getMap();this._history||this._recordHistory([["setCoordinates",n.getCoordinates().toArray()],["setRadius",n.getRadius()]]),this._createResizeHandles(null,(function(t){var i=e.getCenter(),o=r.viewPointToCoordinate(t),a=new Ti([[i.x,i.y],[o.x,i.y]]),s=new Ti([[i.x,i.y],[i.x,o.y]]),c=Math.max(r.computeGeometryLength(a),r.computeGeometryLength(s));n.setRadius(c),e.setRadius(c)}),(function(){t._update("setRadius",n.getRadius())}))},n.createEllipseOrRectEditor=function(){var t=this,e=[2,1,2,0,0,2,1,2],n=this._geometry,r=this._shadow;this._history||this._recordHistory(c());var i,o=this.getMap(),a=this._geometry instanceof zi;this.options.fixAspectRatio&&(i=n.getWidth()/n.getHeight());var s=this._createResizeHandles(null,(function(c,u){var l,h,f,d=a?1:2,p=c,m=e[u];if(a){var g=s[7-u],v=o.coordToViewPoint(g.getCoordinates()),y=(l=p.sub(v)).abs();h=o.pixelToDistance(y.x,0),f=o.pixelToDistance(0,y.y);var _=n.getSize(),x=s[0].getCoordinates(),b=o.viewPointToCoordinate(c),w=g.getCoordinates(),M=new Ti([[w.x,w.y],[b.x,w.y]]),S=new Ti([[w.x,w.y],[w.x,b.y]]);h=o.computeGeometryLength(M),f=o.computeGeometryLength(S),0===m?(i&&(y.y=y.x/i,_.height=Math.abs(y.y),f=h/i),p.y=v.y-_.height/2,b.y=x.y,b.x=4===u?Math.min(b.x,x.x):Math.min(b.x,w.x)):1===m?(i&&(y.x=y.y*i,_.width=Math.abs(y.x),h=f*i),p.x=v.x-_.width/2,b.x=x.x,b.y=Math.max(b.y,w.y)):(i&&(h>f*i?(f=h/i,p.y=v.y+y.x*N(l.y)/i):(h=f*i,p.x=v.x+y.y*N(l.x)*i)),b.x=Math.min(b.x,w.x),b.y=Math.max(b.y,w.y)),r.setCoordinates(b),t._updateCoordFromShadow(!0)}else{var T=n.getCenter(),E=o.viewPointToCoordinate(p),C=new Ti([[T.x,T.y],[E.x,T.y]]),A=new Ti([[T.x,T.y],[T.x,E.y]]);h=o.computeGeometryLength(C),f=o.computeGeometryLength(A),i&&(f=(h=Math.max(h,f*i))/i)}(i||0===m||2===m)&&(r.setWidth(h*d),n.setWidth(h*d)),(i||1===m||2===m)&&(r.setHeight(f*d),n.setHeight(f*d))}),(function(){t._update(c())}));function c(){return[["setCoordinates",r.getCoordinates().toArray()],["setWidth",r.getWidth()],["setHeight",r.getHeight()]]}},n.createPolygonEditor=function(){var t=this.getMap(),e=this._shadow,n=this,r=t.getProjection();this._history||this._recordHistory("setCoordinates",Rn.toNumberArrays(e.getCoordinates()));var i=e instanceof bi?3:2,o="maptalks--editor-refresh-fn",a="maptalks--editor-vertex-index",s={0:[]},c={0:[]};function u(t){if(void 0===t&&(t=0),e instanceof bi){var n=e.getCoordinates()[t]||[];return n.slice(0,n.length-1)}return e.getCoordinates()}function l(t){return void 0===t&&(t=0),0===t?e._getPrjCoordinates():e._getPrjHoles()[t-1]}function h(){for(var t in s){for(var e=s[t].length-1;e>=0;e--)s[t][e][a]=e;for(var r=c[t].length-1;r>=0;r--)c[t][r][a]=r}n._updateCoordFromShadow()}function f(t){var r,o=t.target,u=o[a],f=m(o._ringIndex)?o._ringIndex:0,d=l(f);d.length<=i||(d.splice(u,1),f>0?e._prjHoles[f-1]=d:e._setPrjCoordinates(d),e._updateCache(),s[f].splice(u,1)[0].remove(),u<c[f].length&&c[f].splice(u,1)[0].remove(),r=0===u?c[f].length-1:u-1,c[f].splice(r,1)[0].remove(),c[f].splice(r,0,g.call(n,r,f)),h(),n._refresh())}function d(r,i,a){void 0===a&&(a=0);var s,u=l(a),h=t._viewPointToPrj(r),f=u[i];f.x=h.x,f.y=h.y,e._updateCache(),e.onShapeChanged(),n._updateCoordFromShadow(!0),s=0===i?c[a].length-1:i-1,c[a][i]&&c[a][i][o](),c[a][s]&&c[a][s][o]()}function p(t,e){void 0===e&&(e=0);var r=u(e)[t],i=n.createHandle(r,{symbol:n.options.vertexHandleSymbol,cursor:"pointer",axis:null,onMove:function(t){d(t,i[a],e)},onRefresh:function(){r=u(e)[i[a]],i.setCoordinates(r)},onUp:function(){n._refresh(),n._updateCoordFromShadow()},onDown:function(t,e){!e||!e.domEvent||e.domEvent.button}});return i[a]=t,i._ringIndex=e,i.on(n.options.removeVertexOn,f),i}function g(t,i){void 0===i&&(i=0);var o,f=u(i);o=t+1>=f.length?f[0]:f[t+1];var m=f[t].add(o).multi(.5),v=n.createHandle(m,{symbol:n.options.newVertexHandleSymbol,cursor:"pointer",axis:null,onDown:function(t,o){if(!o||!o.domEvent||2!==o.domEvent.button){var s=l(i),u=v[a],h=r.project(v.getCoordinates());s.splice(u+1,0,h),i>0?e._prjHoles[i-1]=s:e._setPrjCoordinates(s),e._updateCache();var f=v.getSymbol();delete f.opacity,v.setSymbol(f),c[i].splice(u,0,g.call(n,u,i),g.call(n,u+1,i))}},onMove:function(t){d(t,v[a]+1,i)},onUp:function(t){if(!t||!t.domEvent||2!==t.domEvent.button){var e=v[a];D(v,c[i]),v.remove(),s[i].splice(e+1,0,p.call(n,e+1,i)),h(),n._updateCoordFromShadow(),n._refresh()}},onRefresh:function(){f=u(i);var t,e=v[a];t=e===f.length-1?0:e+1;var n=f[e].add(f[t]).multi(.5);v.setCoordinates(n)}});return v[a]=t,v}if(e instanceof bi)for(var v=e.getHoles().length+1,y=0;y<v;y++){s[y]=[],c[y]=[];for(var _=u(y),x=0,b=_.length;x<b;x++)s[y].push(p.call(this,x,y)),x<b-1&&c[y].push(g.call(this,x,y));c[y].push(g.call(this,_.length-1,y))}else for(var w=0,M=u(0).length;w<M;w++)s[0].push(p.call(this,w,0)),w<M-1&&c[0].push(g.call(this,w,0));this._addRefreshHook((function(){for(var t in c)for(var e=c[t].length-1;e>=0;e--)c[t][e][o](t);for(var n in s)for(var r=s[n].length-1;r>=0;r--)s[n][r][o](n)}))},n._refresh=function(){if(this._refreshHooks)for(var t=this._refreshHooks.length-1;t>=0;t--)this._refreshHooks[t].call(this)},n._hideContext=function(){this._geometry&&(this._geometry.closeMenu(),this._geometry.closeInfoWindow())},n._addListener=function(t){this._eventListeners||(this._eventListeners=[]),this._eventListeners.push(t),t[0].on(t[1],t[2],this)},n._clearAllListeners=function(){if(this._eventListeners&&this._eventListeners.length>0){for(var t=this._eventListeners.length-1;t>=0;t--){var e=this._eventListeners[t];e[0].off(e[1],e[2],this)}this._eventListeners=[]}},n._addRefreshHook=function(t){t&&(this._refreshHooks||(this._refreshHooks=[]),this._refreshHooks.push(t))},n._update=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this._exeHistory([t,n]),this._recordHistory.apply(this,[t].concat(n))},n._updateCoordFromShadow=function(t){if(this._shadow){var e=this._shadow.getCoordinates(),n=this._geometry,r=this._updating;this._updating=!0,n.setCoordinates(e),t||this._recordHistory("setCoordinates",Rn.toNumberArrays(n.getCoordinates())),this._updating=r}},n._recordHistory=function(t){this._history||(this._history=[],this._historyPointer=0);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(this._history.length){var i=this._history[this._history.length-1];if(i[0]===t&&JSON.stringify(i[1])===JSON.stringify(n))return}this._historyPointer<this._history.length-1&&this._history.splice(this._historyPointer+1),this._history.push([t,n]),this._historyPointer=this._history.length-1,this._geometry.fire("editrecord")},n.cancel=function(){if(!this._history||0===this._historyPointer)return this;this._historyPointer=0;var t=this._history[0];return this._exeAndReset(t),this},n.undo=function(){if(!this._history||0===this._historyPointer)return this;var t=this._history[--this._historyPointer];return this._exeAndReset(t),this},n.redo=function(){if(!this._history||this._historyPointer===this._history.length-1)return this;var t=this._history[++this._historyPointer];return this._exeAndReset(t),this},n._exeAndReset=function(t){if(!this._updating){this._exeHistory(t);var e=this._history,n=this._historyPointer;this.stop(),this._history=e,this._historyPointer=n,this.start()}},n._exeHistory=function(t){var e=this;if(Array.isArray(t)){var n=this._updating;this._updating=!0;var r=this._geometry;Array.isArray(t[0])?t[0].forEach((function(t){var n=t[0],i=t.slice(1);e._shadow[n].apply(e._shadow,i),r[n].apply(r,i)})):(this._shadow[t[0]].apply(this._shadow,t[1]),r[t[0]].apply(r,t[1])),this._updating=n}},e}(xn(Mn));Ka.mergeOptions(Qa);var ts={startEditText:function(){return this.getMap()?(this.hide(),this.endEditText(),this._prepareEditor(),this._fireEvent("edittextstart"),this):this},endEditText:function(){if(this._textEditor){var t=this._textEditor.innerHTML;t=t.replace(/<p>/gi,"").replace(/<\/p>/gi,"<br/>"),this._textEditor.innerHTML=t;var e=this._textEditor.innerText.replace(/[\r\n]+$/gi,"");this.setContent(e),on(this._textEditor,"mousedown dblclick",Ue),this.getMap().off("mousedown",this.endEditText,this),this._editUIMarker.remove(),delete this._editUIMarker,this._textEditor.onkeyup=null,delete this._textEditor,this.show(),this._fireEvent("edittextend")}return this},isEditingText:function(){return!!this._textEditor},getTextEditor:function(){return this._editUIMarker},_prepareEditor:function(){var t=this.getMap(),e=this._createEditor();this._textEditor=e,t.on("mousedown",this.endEditText,this);var n=this._getEditorOffset();this._editUIMarker=new Fo(this.getCoordinates(),{animation:null,content:e,dx:n.dx,dy:n.dy}).addTo(t),this._setCursorToLast(this._textEditor)},_getEditorOffset:function(){var t=this._getInternalSymbol()||{},e=0,n=0,r=t.textHorizontalAlignment;return"middle"===r||p(r)?(e=(t.textDx||0)-2,n=(t.textDy||0)-2):(e=(t.markerDx||0)-2,n=(t.markerDy||0)-2),{dx:e,dy:n}},_createEditor:function(){var t=this.getContent(),e=this.getSize(),n=this._getInternalSymbol()||{},r=e.width,i=n.textFill||"#000000",o=n.textSize||12,a=e.height,s=n.markerLineColor||"#000",c=n.markerFill||"#3398CC",u=n.textLineSpacing||0,l=je("div");return l.contentEditable=!0,l.style.cssText="background:"+c+"; border:1px solid "+s+";\n color:"+i+";font-size:"+o+"px;width:"+(r-2)+"px;height:"+(a-2)+"px;margin: auto;\n line-height:"+(o+u)+"px;outline: 0; padding:0; margin:0;word-wrap: break-word;\n overflow: hidden;-webkit-user-modify: read-write-plaintext-only;",l.innerText=t,rn(l,"mousedown dblclick",Ue),l.onkeyup=function(t){var e=l.style.height||0;13===t.keyCode&&(l.style.height=parseInt(e)+o/2+"px")},l},_setCursorToLast:function(t){var e;window.getSelection?(t.focus(),(e=window.getSelection()).selectAllChildren(t),e.collapseToEnd()):document.selection&&((e=document.selection.createRange()).moveToElementText(t),e.collapse(!1),e.select())}};Wi.include(ts),Kr.include({animate:function(t,e,n){var r=this;this._animPlayer&&this._animPlayer.finish(),_(e)&&(n=e),e||(e={});var i,o=this.getMap(),a=this._getProjection(),s=this.getSymbol()||{},c=this._prepareAnimationStyles(t),u=e.focus;if(delete this._animationStarted,o){var l=o._getRenderer();e.framer=function(t){l.callInNextFrame(t)}}var h=gi.animate(c,e,(function(t){if(o&&o.isRemoved())h.finish();else{o&&!r._animationStarted&&u&&o.onMoveStart();var e=t.styles;for(var c in e)if("symbol"!==c&&"translate"!==c&&e.hasOwnProperty(c)){var l="set"+c[0].toUpperCase()+c.slice(1);r[l](e[c])}var f=e.translate;if(f){var d=f;i&&(d=f.sub(i)),i=f,r.translate(d)}var p=e.symbol;if(p&&r.setSymbol(Dt(s,p)),o&&u){var m=a.project(r.getCenter());o._setPrjCenter(m);var g=o._parseEventFromCoord(a.unproject(m));"running"!==h.playState?o.onMoveEnd(g):o.onMoving(g)}r._fireAnimateEvent(h.playState),n&&n(t)}}),this);return this._animPlayer=h,this._animPlayer.play()},_prepareAnimationStyles:function(t){var e=this._getInternalSymbol(),n={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if("translate"!==r&&"symbol"!==r){var o=this["get"+r[0].toUpperCase()+r.substring(1)]();n[r]=[o,i]}else if("symbol"===r){var a=void 0;if(Array.isArray(t.symbol)){if(!Array.isArray(e))throw new Error("geometry'symbol isn't a composite symbol, while the symbol in styles is.");a=[];for(var s=t.symbol,c=0;c<s.length;c++)if(s[c]){var u={};for(var l in s[c])s[c].hasOwnProperty(l)&&(u[l]=[e[c][l],s[c][l]]);a.push(u)}else a.push(null)}else{if(Array.isArray(e))throw new Error("geometry'symbol is a composite symbol, while the symbol in styles isn't.");for(var h in a={},i)i.hasOwnProperty(h)&&(a[h]=[e[h],i[h]])}n.symbol=a}else"translate"===r&&(n.translate=new Rn(i))}return n},_fireAnimateEvent:function(t){"finished"===t?(delete this._animationStarted,this._fireEvent("animateend")):"running"===t&&(this._animationStarted?this._fireEvent("animating"):(this._fireEvent("animatestart"),this._animationStarted=!0))}});var es=i+"_drag_stage",ns=he.touch?"touchstart mousedown":"mousedown",rs=function(t){function e(e){return t.call(this,e)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){this.target.on(ns,this._startDrag,this)},n.removeHooks=function(){this._endDrag(),this.target.off(ns,this._startDrag,this),delete this.container},n._prepareDragHandler=function(){this._dragHandler=new Ln(this.container),this._dragHandler.on("dragging",this._dragging,this).on("mouseup",this._endDrag,this).enable()},n._prepareShadow=function(){var t=this,e=this.target;this._prepareDragStageLayer(),this._shadow&&this._shadow.remove();var n=this._shadow=e.copy();if(n.getGeometries){var r=n.getGeometries(),i=e.getGeometries();r.forEach((function(e,n){t._updateShadowSymbol(e,i[n])}))}else this._updateShadowSymbol(n,e);n.setId(null),this._prepareShadowConnectors()},n._updateShadowSymbol=function(t,e){if(t.setSymbol(e._getInternalSymbol()),e.options.dragShadow){var n=It(t._getInternalSymbol(),.5);t.setSymbol(n)}},n._prepareShadowConnectors=function(){var t=this.target,e=this._shadow,n=this._dragStageLayer._getRenderer().resources,r=[];if(Xi._hasConnectors(t))for(var i=Xi._getConnectors(t),o=0,a=i.length;o<a;o++){var s,c=i[o],u=c.config(),l=c._getInternalSymbol();u.symbol=It(l,.5),s=c.getConnectSource()===t?new c.constructor(e,c.getConnectTarget(),u):new c.constructor(c.getConnectSource(),e,u),r.push(s),c.getLayer()&&c.getLayer()._getRenderer()&&n.merge(c.getLayer()._getRenderer().resources)}this._shadowConnectors=r,r.push(e),this._dragStageLayer.bringToFront().addGeometry(r)},n._onTargetUpdated=function(){this._shadow&&this._shadow.setSymbol(this.target._getSymbol())},n._prepareDragStageLayer=function(){var t=this.target.getMap(),e=this.target.getLayer();this._dragStageLayer=t.getLayer(es),this._dragStageLayer||(this._dragStageLayer=new eo(es,{enableAltitude:e.options.enableAltitude,altitudeProperty:e.options.altitudeProperty}),t.addLayer(this._dragStageLayer));var n=new gr;n.merge(e._getRenderer().resources),this._dragStageLayer._getRenderer().resources=n},n._startDrag=function(t){var e=this.target.getMap();if(e&&!this.target._getParent()&&!this.isDragging()){var n=t.domEvent;n.touches&&n.touches.length>1||2===n.button||(this.container=e._panels.mapWrapper||e._containerDOM,this.target.on("click",this._endDrag,this),this._lastCoord=this._correctCoord(t.coordinate),this._lastPoint=t.containerPoint,this._prepareDragHandler(),this._dragHandler.onMouseDown(t.domEvent),rn(this.container,"mouseleave",this._endDrag,this),this._startParam=t,this._moved=!1)}},n._dragging=function(t){var e=this.target,n=e.getMap()._parseEvent(t.domEvent),r=n.domEvent;if(!(r.touches&&r.touches.length>1)){if(!this._moved)return this._moved=!0,e.on("symbolchange",this._onTargetUpdated,this),this._isDragging=!0,this._prepareShadow(),e.options.dragShadow||e.hide(),this._shadow._fireEvent("dragstart",n),this.target._fireEvent("dragstart",this._startParam||n),void delete this._startParam;if(this._shadow){var i=this._shadow.options.dragOnAxis,o=this._correctCoord(n.coordinate),a=n.containerPoint;this._lastPoint=this._lastPoint||a,this._lastCoord=this._lastCoord||o;var s=a.sub(this._lastPoint),c=o.sub(this._lastCoord);"x"===i?s.y=c.y=0:"y"===i&&(s.x=c.x=0),this._lastPoint=a,this._lastCoord=o,this._shadow.translate(c),e.options.dragShadow||e.translate(c),n.coordOffset=c,n.pointOffset=s,this._shadow._fireEvent("dragging",n),e._fireEvent("dragging",n)}}},n._endDrag=function(t){if(this._dragHandler&&(this._dragHandler.disable(),delete this._dragHandler),this.container&&on(this.container,"mouseleave",this._endDrag,this),this.target){var e=this.target;e.off("click",this._endDrag,this),e.off("symbolchange",this._onTargetUpdated,this),delete this._lastCoord,delete this._lastPoint,this._isDragging=!1;var n=e.getMap();if(this.enabled()&&n){var r=n._parseEvent(t?t.domEvent:null);this._updateTargetAndRemoveShadow(r),this._moved&&e._fireEvent("dragend",r)}}},n.isDragging=function(){return!!this._isDragging},n._updateTargetAndRemoveShadow=function(t){var e=this.target,n=e.getMap();e.options.dragShadow||e.show();var r=this._shadow;if(r){if(e.options.dragShadow)if(e.getGeometries){var i=r.getGeometries(),o=e.getGeometries();i.forEach((function(t,e){o[e].setCoordinates(i[e].getCoordinates())}))}else e.setCoordinates(r.getCoordinates());r._fireEvent("dragend",t),r.remove(),delete this._shadow}this._shadowConnectors&&(n.getLayer(es).removeGeometry(this._shadowConnectors),delete this._shadowConnectors),this._dragStageLayer&&this._dragStageLayer.remove()},n._correctCoord=function(t){var e=this.target.getMap();if(!e.getPitch())return t;var n=this.target._getPainter();if(!n.getMinAltitude())return t;var r=(n.getMinAltitude()+n.getMaxAltitude())/2;return e.locateByPoint(t,0,-r)},e}(wn);Kr.mergeOptions({draggable:!1,dragShadow:!0,dragOnAxis:null}),Kr.addInitHook("addHandler","draggable",rs),Kr.include({isDragging:function(){return this._getParent()?this._getParent().isDragging():!!this.draggable&&this.draggable.isDragging()}}),Kr.include({startEdit:function(t){return this.getMap()&&this.options.editable?(this.endEdit(),this._editor=new Ka(this,t),this._editor.start(),this.fire("editstart"),this):this},endEdit:function(){return this._editor&&(this._editor.stop(),delete this._editor,this.fire("editend")),this},redoEdit:function(){return this.isEditing()?(this._editor.redo(),this.fire("redoedit"),this):this},undoEdit:function(){return this.isEditing()?(this._editor.undo(),this.fire("undoedit"),this):this},cancelEdit:function(){return this.isEditing()?(this._editor.cancel(),this.fire("canceledit"),this):this},isEditing:function(){return!!this._editor&&this._editor.isEditing()}}),Kr.include({_onEvent:function(t,e){if(this.getMap()){var n=e||this._getEventTypeToFire(t);"contextmenu"===n&&this.listens("contextmenu")&&(Ue(t),Ge(t));var r=this._getEventParams(t);this._fireEvent(n,r)}},_getEventTypeToFire:function(t){return t.type},_getEventParams:function(t){var e=this.getMap(),n={domEvent:t},r=t.touches&&t.touches.length>0?t.touches[0]:t.changedTouches&&t.changedTouches.length>0?t.changedTouches[0]:t;if(r){var i=qe(r,e._containerDOM);n.coordinate=e.containerPointToCoordinate(i),n.containerPoint=i,n.viewPoint=e.containerPointToViewPoint(i),n.pont2d=e._containerPointToPoint(i)}return n}}),Kr.include({setInfoWindow:function(t){return this.removeInfoWindow(),t instanceof Go?(this._infoWindow=t,this._infoWinOptions=d({},this._infoWindow.options),this._infoWindow.addTo(this),this):(this._infoWinOptions=d({},t),this._infoWindow?this._infoWindow.setOptions(t):this.getMap()&&this._bindInfoWindow(this._infoWinOptions),this)},getInfoWindow:function(){return this._infoWindow?this._infoWindow:null},openInfoWindow:function(t){return this.getMap()?(t||(t=this.getCenter()),this._infoWindow?this._infoWindow.show(t):this._infoWinOptions&&this.getMap()&&(this._bindInfoWindow(this._infoWinOptions),this._infoWindow.show(t)),this):this},closeInfoWindow:function(){return this._infoWindow&&this._infoWindow.hide(),this},removeInfoWindow:function(){return this._unbindInfoWindow(),delete this._infoWinOptions,delete this._infoWindow,this},_bindInfoWindow:function(t){return this._infoWindow=new Go(t),this._infoWindow.addTo(this),this},_unbindInfoWindow:function(){return this._infoWindow&&(this.closeInfoWindow(),this._infoWindow.remove(),delete this._infoWindow),this}});var is=function(){function t(t,e){this.max=t,this.onRemove=e,this.reset()}var e=t.prototype;return e.reset=function(){for(var t in this.data)this.onRemove(this.data[t]);return this.data={},this.order=[],this},e.clear=function(){this.reset(),delete this.onRemove},e.add=function(t,e){if(this.has(t))this.order.splice(this.order.indexOf(t),1),this.data[t]=e,this.order.push(t);else if(this.data[t]=e,this.order.push(t),this.order.length>this.max){var n=this.getAndRemove(this.order[0]);n&&this.onRemove(n)}return this},e.has=function(t){return t in this.data},e.keys=function(){return this.order},e.getAndRemove=function(t){if(!this.has(t))return null;var e=this.data[t];return delete this.data[t],this.order.splice(this.order.indexOf(t),1),e},e.get=function(t){return this.has(t)?this.data[t]:null},e.remove=function(t){if(!this.has(t))return this;var e=this.data[t];return delete this.data[t],this.onRemove(e),this.order.splice(this.order.indexOf(t),1),this},e.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this.getAndRemove(this.order[0]);e&&this.onRemove(e)}return this},t}(),os=new me(0,0),as=new me(0,0),ss=new me(0,0),cs=new me(0,0),us=function(t){function e(e){var n;return(n=t.call(this,e)||this).tilesInView={},n.tilesLoading={},n._parentTiles=[],n._childTiles=[],n.tileCache=new is(e.options.maxCacheSize,n.deleteTile.bind(de(de(n)))),n}fe(e,t);var n=e.prototype;return n.getCurrentTileZoom=function(){return this._tileZoom},n.draw=function(){var t=this.getMap();if(this.isDrawable()){var e=this.prepareCanvas();if(!e||e.intersects(this.canvasExtent2D)){var n=this.layer.getTiles().tileGrids;if(n&&n.length){var r=0,i=!1,o={},a=[],s=[],c={},u=[],l={},h=[],f={},d={},p=this._markTiles(),m=this._getLoadLimit(),g=n.length;this._tileZoom=n[0].zoom;for(var v=0;v<g;v++)for(var y=n[v],_=y.tiles,x=this._generatePlaceHolder(y.zoom),b=0,w=_.length;b<w;b++){var M=_[b],S=M.id,T=!1;if(this._isLoadingTile(S))T=i=!0,this.tilesLoading[S].current=!0;else{var E=this._getCachedTile(S);E?(E.image&&this.getTileOpacity(E.image)<1&&(T=i=!0),a.push(E)):(T=i=!0,m&&r+p[0]>m||t.isInteracting()&&!t.isMoving()&&!t.isRotating()||(r++,d[S]=M))}if(T&&!o[S]){o[S]=1,x&&!f[S]&&(M.cache=!1,h.push({image:x,info:M}),f[S]=1);var C=this._findParentTile(M);if(C){var A=C.info.id;void 0===c[A]&&(c[A]=s.length,s.push(C))}else if(!s.length){var P=this._findChildTiles(M);P.length&&P.forEach((function(t){l[t.info.id]||(u.push(t),l[t.info.id]=1)}))}}}s.length&&(u.length=0,this._childTiles.length=0),this._drawTiles(a,s,u,h),r?this.loadTileQueue(d):i||(t.isAnimating()||!this._parentTiles.length&&!this._childTiles.length||(this._parentTiles=[],this._childTiles=[],this.setToRedraw()),this.completeRender()),this._retireTiles()}else this.completeRender()}else this.completeRender()}},n.isTileCachedOrLoading=function(t){return this.tilesLoading[t]||this.tilesInView[t]||this.tileCache.get(t)},n._drawTiles=function(t,e,n,r){var i=this;e.length&&(e.sort((function(t,e){return Math.abs(e.info.z-i._tileZoom)-Math.abs(t.info.z-i._tileZoom)})),this._parentTiles=e),n.length&&(this._childTiles=n);var o={tiles:t,parentTiles:this._parentTiles,childTiles:this._childTiles};this.onDrawTileStart(o),this._parentTiles.forEach((function(t){return i._drawTileAndCache(t)})),this._childTiles.forEach((function(t){return i._drawTile(t.info,t.image)})),r.forEach((function(t){return i._drawTile(t.info,t.image)}));var a=this.layer,s=this.getMap();if(!a.options.cascadeTiles||s.getPitch()<=s.options.cascadePitches[0])t.forEach((function(t){return i._drawTileAndCache(t)}));else{this.writeZoomStencil();for(var c=!1,u=0,l=t.length;u<l;u++)t[u].info.z!==this._tileZoom?c?this.resumeZoomStencilTest():(this.startZoomStencilTest(),c=!0):c&&this.pauseZoomStencilTest(),this._drawTileAndCache(t[u]);this.endZoomStencilTest()}this.onDrawTileEnd(o)},n.writeZoomStencil=function(){},n.startZoomStencilTest=function(){},n.endZoomStencilTest=function(){},n.pauseZoomStencilTest=function(){},n.resumeZoomStencilTest=function(){},n.onDrawTileStart=function(){},n.onDrawTileEnd=function(){},n._drawTile=function(t,e){e&&this.drawTile(t,e)},n._drawTileAndCache=function(t){t.current=!0,this.tilesInView[t.info.id]=t,this._drawTile(t.info,t.image),this.tileCache.add(t.info.id,t)},n.drawOnInteracting=function(){this.draw()},n.needToRedraw=function(){var e=this.getMap();return e.getPitch()?t.prototype.needToRedraw.call(this):!(!e.isRotating()&&!e.isZooming())||(e.isMoving()?!!this.layer.options.forceRenderOnMoving:t.prototype.needToRedraw.call(this))},n.hitDetect=function(){return!1},n._getLoadLimit=function(){return this.getMap().isInteracting()?this.layer.options.loadingLimitOnInteracting:0},n.isDrawable=function(){return!this.getMap().getPitch()||(console&&console.warn("TileLayer with canvas renderer can't be pitched, use gl renderer ('renderer' : 'gl') instead."),this.clear(),!1)},n.clear=function(){this._retireTiles(!0),this.tileCache.reset(),this.tilesInView={},this.tilesLoading={},this._parentTiles=[],this._childTiles=[],t.prototype.clear.call(this)},n._isLoadingTile=function(t){return!!this.tilesLoading[t]},n.clipCanvas=function(e){return t.prototype.clipCanvas.call(this,e)},n._clipByPitch=function(t){var e=this.getMap();if(e.getPitch()<=e.options.maxVisualPitch)return!1;if(!this.layer.options.clipByPitch)return!1;var n=e.getContainerExtent(),r=e.getDevicePixelRatio();return t.save(),t.strokeStyle="rgba(0, 0, 0, 0)",t.beginPath(),t.rect(0,Math.ceil(n.ymin)*r,Math.ceil(n.getWidth())*r,Math.ceil(n.getHeight())*r),t.stroke(),t.clip(),!0},n.loadTileQueue=function(t){for(var e in t)if(t.hasOwnProperty(e)){var n=t[e],r=this.loadTile(n);void 0===r.loadTime&&(this.tilesLoading[n.id]={image:r,current:!0,info:n})}},n.loadTile=function(t){var e=this.layer.getTileSize(),n=new Image;return n.width=e.width,n.height=e.height,n.onload=this.onTileLoad.bind(this,n,t),n.onerror=this.onTileError.bind(this,n,t),this.loadTileImage(n,t.url),n},n.loadTileImage=function(t,e){var n=this.layer.options.crossOrigin;return p(n)||(t.crossOrigin=n),P(t,[e])},n.abortTileLoading=function(t){t&&(t.onload=ls,t.onerror=ls,t.src=Q)},n.onTileLoad=function(t,e){if(this.layer){var n=e.id;if(this.tilesInView){var r={tile:e,tileImage:t};this.layer.fire("tileload",r),(t=r.tileImage).loadTime=f(),delete this.tilesLoading[n],this._addTileToCache(e,t),this.setToRedraw()}}},n.onTileError=function(t,e){if(this.layer){if(t.onerrorTick=t.onerrorTick||0,this.layer.options.tileRetryCount>t.onerrorTick)return t.onerrorTick++,void(t.src=e.url);if(t instanceof Image){var n=this.layer.options.errorUrl;if(n&&t.src!==n)return void(t.src=n);this.abortTileLoading(t,e)}t.loadTime=0,delete this.tilesLoading[e.id],this._addTileToCache(e,t),this.setToRedraw(),this.layer.fire("tileerror",{tile:e})}},n.drawTile=function(t,e){if(e&&this.getMap()){var n=t.extent2d,r=t.offset,i=os.set(n.xmin-r[0],n.ymax-r[1]),o=t.z,a=t.id,s=this.getMap(),c=this.layer.getTileSize(),u=s.getZoom(),l=this.context,h=s._pointToContainerPoint(i,o,0,as),f=s.getBearing(),d=f||u!==o,p=this.getTileOpacity(e),m=l.globalAlpha;p<1&&(l.globalAlpha=p,this.setToRedraw()),d||h._round();var g=h.x,v=h.y,y=c.width,_=c.height;if(d){if(l.save(),l.translate(g,v),f&&(l.rotate(-f*Math.PI/180),y+=.1,_+=.1),u!==o){var x=s._getResolution(o)/s._getResolution();l.scale(x,x)}g=v=0}if(hn.image(l,e,g,v,y,_),this.layer.options.debug){var b=this.layer.options.debugOutline;l.save(),l.strokeStyle=b,l.fillStyle=b,l.strokeWidth=10,l.font="20px monospace";var w=new me(g,v);hn.rectangle(l,w,{width:y,height:_},1,0),hn.fillText(l,this.getDebugInfo(a),w._add(10,20),b),hn.drawCross(l,g+y/2,v+_/2,2,b),l.restore()}d&&l.restore(),l.globalAlpha!==m&&(l.globalAlpha=m),this.setCanvasUpdated()}},n.getDebugInfo=function(t){var e=t.split("_"),n=e.length;return"x:"+e[n-2]+", y:"+e[n-3]+", z:"+e[n-1]},n._findChildTiles=function(t){var e=this._getLayerOfTile(t.layer);if(!e.options.background)return[];for(var n=this.getMap(),r=[],i=t.extent2d.getMin(),o=t.extent2d.getMax(),a=t.offset,s=e._project(n._pointToPrj(i,t.z,ss),ss),c=e._project(n._pointToPrj(o,t.z,cs),cs),u=1;u<2;u++)this._findChildTilesAt(r,s,c,e,t.z+u,a);return r},n._findChildTilesAt=function(t,e,n,r,i,o){var a=r.options.zoomOffset,s=r.getId(),c=r.getSpatialReference().getResolution(i+a);if(c)for(var u,l,h=r._getTileConfig().getTileIndex(e,c,o),f=r._getTileConfig().getTileIndex(n,c,o),d=Math.min(h.idx,f.idx),p=Math.max(h.idx,f.idx),m=Math.min(h.idy,f.idy),g=Math.max(h.idy,f.idy),v=d;v<p;v++)for(var y=m;y<g;y++)u=r._getTileId(v,y,i+a,s),this.tileCache.has(u)&&(l=this.tileCache.getAndRemove(u),t.push(l),this.tileCache.add(u,l))},n._findParentTile=function(t){var e=this.getMap(),n=this._getLayerOfTile(t.layer);if(!n.options.background)return null;for(var r=n.getSpatialReference(),i=r.getZoomDirection(),o=n.options.zoomOffset,a=n.options.backgroundZoomDiff,s=t.extent2d.getCenter(),c=t.offset,u=n._project(e._pointToPrj(s,t.z)),l=1;l<=a;l++){var h=t.z-i*l,f=r.getResolution(h+o);if(f){var d=n._getTileConfig().getTileIndex(u,f,c),p=n._getTileId(d.x,d.y,h+o,t.layer);if(this.tileCache.has(p)){var m=this.tileCache.getAndRemove(p);return this.tileCache.add(p,m),m}}}return null},n._getLayerOfTile=function(t){return this.layer.getChildLayer?this.layer.getChildLayer(t):this.layer},n._getCachedTile=function(t){var e=this.tilesInView,n=this.tileCache.getAndRemove(t);if(n){e[t]=n;var r=this.tilesLoading;if(r&&r[t]){r[t].current=!1;var i=r[t],o=i.image,a=i.info;this.abortTileLoading(o,a),delete r[t]}}else n=e[t];return n},n._addTileToCache=function(t,e){this.tilesInView[t.id]={image:e,current:!0,info:t}},n.getTileOpacity=function(t){return this.layer.options.fadeAnimation&&t.loadTime?Math.min(1,(f()-t.loadTime)/(1e3/60*10)):1},n.onRemove=function(){this.clear(),delete this.tileCache,delete this._tilePlaceHolder,t.prototype.onRemove.call(this)},n._markTiles=function(){var t=0,e=0;if(this.tilesLoading)for(var n in this.tilesLoading)this.tilesLoading[n].current=!1,t++;if(this.tilesInView)for(var r in this.tilesInView)this.tilesInView[r].current=!1,e++;return[t,e]},n._retireTiles=function(t){for(var e in this.tilesLoading){var n=this.tilesLoading[e];!t&&n.current||(n.image&&this.abortTileLoading(n.image,n.info),this.deleteTile(n),delete this.tilesLoading[e])}for(var r in this.tilesInView){var i=this.tilesInView[r];i.current||(delete this.tilesInView[r],this.tileCache.has(r)||this.deleteTile(i))}},n.deleteTile=function(t){t&&t.image&&(t.image.onload=null,t.image.onerror=null)},n._generatePlaceHolder=function(t){var e=this.getMap(),n=this.layer.options.placeholder;if(!n||e.getPitch())return null;var r=this.layer.getTileSize(),i=e._getResolution(t)/e._getResolution(),o=this._tilePlaceHolder=this._tilePlaceHolder||hn.createCanvas(1,1,e.CanvasClass);return o.width=r.width*i,o.height=r.height*i,_(n)?n(o):function(t){var e=t.getContext("2d"),n=t.width,r=t.height,i=n/16,o=r/16;e.beginPath();for(var a=0;a<16;a++)e.moveTo(0,a*o),e.lineTo(n,a*o),e.moveTo(a*i,0),e.lineTo(a*i,r);e.strokeStyle="rgba(180, 180, 180, 0.1)",e.lineWidth=1,e.stroke(),e.beginPath();for(var s=[[0,0],[n,0],[0,r],[n,r],[0,0],[0,r],[n,0],[n,r],[0,r/2],[n,r/2],[n/2,0],[n/2,r]],c=1;c<s.length;c+=2)e.moveTo(s[c-1][0],s[c-1][1]),e.lineTo(s[c][0],s[c][1]);e.lineWidth=4,e.stroke()}(o),o},e}(mr);function ls(){return!1}Ta.registerRenderer("canvas",us);var hs=new me(0,0),fs=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.isDrawable=function(){return!0},n.needToRedraw=function(){var e=this.getMap();return!(!this._gl()||e.getPitch()||!e.isZooming()||e.isMoving()||e.isRotating())||t.prototype.needToRedraw.call(this)},n.drawTile=function(e,n){var r=this.getMap();if(e&&r&&n){var i=e._glScale=e._glScale||r.getGLScale(e.z),o=this.layer.getTileSize(),a=o.width,s=o.height;if(!1!==e.cache&&this._bindGLBuffer(n,a,s),this._gl()){var c=e.extent2d,u=e.offset,l=hs.set(c.xmin-u[0],e.extent2d.ymax-u[1]),h=l.x*i,f=l.y*i,d=this.getTileOpacity(n),p=null;this.layer.options.debug&&(p=this.getDebugInfo(e.id)),this.drawGLImage(n,h,f,a,s,i,d,p),d<1?this.setToRedraw():this.setCanvasUpdated()}else t.prototype.drawTile.call(this,e,n)}},n.writeZoomStencil=function(){var t=this.gl;t.stencilFunc(t.ALWAYS,1,255),t.stencilOp(t.KEEP,t.KEEP,t.REPLACE)},n.startZoomStencilTest=function(){var t=this.gl;t.stencilOp(t.KEEP,t.KEEP,t.KEEP),t.stencilFunc(t.EQUAL,0,255)},n.endZoomStencilTest=function(){this.pauseZoomStencilTest()},n.pauseZoomStencilTest=function(){var t=this.gl;t.stencilFunc(t.ALWAYS,1,255)},n.resumeZoomStencilTest=function(){var t=this.gl;t.stencilFunc(t.EQUAL,0,255)},n._bindGLBuffer=function(t,e,n){t.glBuffer||(t.glBuffer=this.bufferTileData(0,0,e,n))},n.loadTileImage=function(t,e){var n=this.layer.options.crossOrigin;t.crossOrigin=null!==n?n:"",t.src=e},n.onCanvasCreate=function(){this.canvas.gl&&this.canvas.gl.wrap||this.createCanvas2()},n.createContext=function(){t.prototype.createContext.call(this),this.createGLContext()},n.resizeCanvas=function(e){this.canvas&&(t.prototype.resizeCanvas.call(this,e),this.resizeGLCanvas())},n.clearCanvas=function(){this.canvas&&(t.prototype.clearCanvas.call(this),this.clearGLCanvas())},n.getCanvasImage=function(){if(!this._gl()||!this.canvas2)return t.prototype.getCanvasImage.call(this);var e=t.prototype.getCanvasImage.call(this);return e&&(e.image=this.canvas2),e},n._gl=function(){if(this.canvas.gl&&this.canvas.gl.wrap)return!0;var t=this.getMap();return t&&(t.getPitch()||t.getBearing())||this.layer&&!!this.layer.options.fragmentShader},n.deleteTile=function(e){t.prototype.deleteTile.call(this,e),e&&e.image&&this.disposeImage(e.image),delete e.image},n.onRemove=function(){t.prototype.onRemove.call(this),this.removeGLCanvas()},e}(Na(us));function ds(t){var e=this.layer.getTileSize(),n=this.canvas.constructor,r=this.getMap(),i=r.getDevicePixelRatio(),o=hn.createCanvas(e.width*i,e.height*i,n);o.layer=this.layer;var a=this,s=new me(t.extent2d.xmin,t.extent2d.ymax),c=new Wn(r.pointToCoordinate(s),r.pointToCoordinate(s.add(e.width,e.height)),r.getProjection());return this.layer.drawTile(o,{url:t.url,point:s,center:r.pointToCoordinate(s.add(e.width/2,e.height/2)),extent:c,z:t.z,x:t.x,y:t.y},(function(e){e?a.onTileError(o,t):a.onTileLoad(o,t)})),o}Ta.registerRenderer("gl",fs);var ps=function(t){function e(){return t.apply(this,arguments)||this}return fe(e,t),e.prototype.loadTile=function(){return ds.apply(this,arguments)},e}(us),ms=function(t){function e(){return t.apply(this,arguments)||this}return fe(e,t),e.prototype.loadTile=function(){return ds.apply(this,arguments)},e}(fs);La.registerRenderer("canvas",ps),La.registerRenderer("gl",ms);var gs=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.checkResources=function(){var t=this._geosToCheck;if(this._resourceChecked||t||(t=this.layer._geoList),!U(t))return[];for(var e=[],n={},r=t.length-1;r>=0;r--){var i=t[r]._getExternalResources();if(i.length)if(this.resources)for(var o=0;o<i.length;o++){var a=i[o][0];this.resources.isResourceLoaded(i[o])||n[a]||(e.push(i[o]),n[a]=1)}else e.push.apply(e,i)}return this._resourceChecked=!0,delete this._geosToCheck,e},n.render=function(){return this.layer._sortGeometries(),t.prototype.render.apply(this,arguments)},n._addGeoToCheckRes=function(t){t&&(Array.isArray(t)||(t=[t]),this._geosToCheck||(this._geosToCheck=[]),I(this._geosToCheck,t))},n.onGeometryAdd=function(t){this._addGeoToCheckRes(t),vs(this)},n.onGeometryRemove=function(){vs(this)},n.onGeometrySymbolChange=function(t){this._addGeoToCheckRes(t.target),vs(this)},n.onGeometryShapeChange=function(){vs(this)},n.onGeometryPositionChange=function(){vs(this)},n.onGeometryZIndexChange=function(){vs(this)},n.onGeometryShow=function(){vs(this)},n.onGeometryHide=function(){vs(this)},n.onGeometryPropertiesChange=function(){vs(this)},e}(mr);function vs(t){t.layer.options.drawImmediate&&t.render(),t.setToRedraw()}var ys=new Zn,_s=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.checkResources=function(){var e=this,n=t.prototype.checkResources.apply(this,arguments),r=this.layer.getStyle();return r&&(Array.isArray(r)||(r=[r]),r.forEach((function(t){for(var r=Pt(t.symbol,!0),i=0,o=r.length;i<o;i++)e.resources.isResourceLoaded(r[i])||n.push(r[i])}))),n},n.needToRedraw=function(){var e=this.getMap();return!(!e.isInteracting()||!this.layer.options.enableAltitude)||!(e.isZooming()&&!e.isRotating()&&!e.getPitch()&&!this._hasPoint&&this.layer.constructor===eo)&&t.prototype.needToRedraw.call(this)},n.draw=function(){if(this.getMap()){if(!this.layer.isVisible()||this.layer.isEmpty())return this.clearCanvas(),void this.completeRender();this.prepareCanvas(),this.drawGeos(),this.completeRender()}},n.isBlank=function(){return!!this.context&&!this.context.canvas._drawn},n.drawOnInteracting=function(){if(this._geosToDraw){this._updateDisplayExtent();var t=this.getMap(),e=this.layer.getCount(),n=this.getMap().getResolution();(t.isZooming()&&t.options.seamlessZoom&&void 0!==this._drawnRes&&n>1.5*this._drawnRes&&this._geosToDraw.length<e||t.isMoving()||t.isInteracting())&&(this.prepareToDraw(),this.forEachGeo(this.checkGeo,this),this._drawnRes=n);for(var r=0,i=this._geosToDraw.length;r<i;r++){var o=this._geosToDraw[r];o.isVisible()&&o._paint(this._displayExtent)}}},n.show=function(){this.layer.forEach((function(t){t._repaint()})),t.prototype.show.apply(this,arguments)},n.forEachGeo=function(t,e){this.layer.forEach(t,e)},n.drawGeos=function(){this._drawnRes=this.getMap().getResolution(),this._updateDisplayExtent(),this.prepareToDraw(),this.forEachGeo(this.checkGeo,this);for(var t=0,e=this._geosToDraw.length;t<e;t++)this._geosToDraw[t]._paint()},n.prepareToDraw=function(){this._hasPoint=!1,this._geosToDraw=[]},n.checkGeo=function(t){if(t&&t.isVisible()&&t.getMap()&&t.getLayer()&&t.getLayer().isCanvasRender()){var e=t._getPainter(),n=e.get2DExtent(this.resources,ys);n&&n.intersects(this._displayExtent)&&(e.hasPoint()&&(this._hasPoint=!0),this._geosToDraw.push(t))}},n.onZoomEnd=function(){delete this.canvasExtent2D,t.prototype.onZoomEnd.apply(this,arguments)},n.onRemove=function(){this.forEachGeo((function(t){t.onHide()})),delete this._geosToDraw},n.onGeometryPropertiesChange=function(e){e&&this.layer._styleGeometry(e.target),t.prototype.onGeometryPropertiesChange.call(this,e)},n._updateDisplayExtent=function(){var t=this.canvasExtent2D;if(this._maskExtent){if(!this._maskExtent.intersects(t))return void this.completeRender();t=t.intersection(this._maskExtent)}this._displayExtent=t},n.identify=function(t,e){void 0===e&&(e={});var n=this._geosToDraw;return n?this.layer._hitGeos(n,t,e):[]},e}(gs);eo.registerRenderer("canvas",_s);var xs=function(t){function e(e){var n;return(n=t.call(this)||this).map=e,n._handlerQueue={},n}fe(e,t);var n=e.prototype;return n.callInNextFrame=function(t){this._handlerQueue.push(t)},n.executeFrameCallbacks=function(){var t=this._handlerQueue;this._handlerQueue=[];for(var e=0,n=t.length;e<n;e++)t[e]()},n.offsetPlatform=function(t,e){if(!this.map._panels.front)return this;if(!e&&0===t.x&&0===t.y)return this;var n=this.map._panels,r=this._frontCount=n.back.layerDOM.childElementCount,i=this._backCount=n.front.layerDOM.childElementCount,o=this._uiCount=n.front.uiDOM.childElementCount;if(r||i||o){var a=this.map.offsetPlatform();a=t?a.add(t)._round():a.round(),i&&We(n.back,a),(r||o)&&We(n.front,a)}return this},n.domChanged=function(){var t=this.map._panels;if(!t.front)return!1;var e=t.back.layerDOM.childElementCount;if(void 0===this._frontCount||this._frontCount!==e)return!0;var n=t.front.layerDOM.childElementCount;if(void 0===this._backCount||this._backCount!==n)return!0;var r=t.front.uiDOM.childElementCount;return void 0===this._uiCount||this._uiCount!==r},n.resetContainer=function(){if(this.map&&(this.map._resetMapViewPoint(),this.map._panels.front)){var t=new me(0,0);We(this.map._panels.back,t),We(this.map._panels.front,t)}},n.onZoomEnd=function(){this.resetContainer()},n.onLoad=function(){this._frameLoop()},e}(Mn),bs=function(t){function e(e){var n;return(n=t.call(this,e)||this)._containerIsCanvas=!!e._containerDOM.getContext,n._thisVisibilitychange=n._onVisibilitychange.bind(de(de(n))),n._registerEvents(),n._loopTime=0,n}fe(e,t);var n=e.prototype;return n.load=function(){this.initContainer()},n.renderFrame=function(t){if(!this.map)return!1;delete this._isViewChanged;var e=this.map;e._fireEvent("framestart"),this.updateMapDOM();var n=this._getAllLayerToRender();return this.drawLayers(n,t),this.drawLayerCanvas(n)&&this._drawCenterCross(),e._fireEvent("frameend"),this._recordView(),this._mapview=this._getMapView(),delete this._spatialRefChanged,this._fireLayerLoadEvents(),this.executeFrameCallbacks(),this._canvasUpdated=!1,!0},n.updateMapDOM=function(){var t=this.map;if(!t.isZooming()){var e=t._getViewPointFrameOffset();e?t.offsetPlatform(e):this.domChanged()&&this.offsetPlatform(null,!0)}},n.drawLayers=function(t,e){for(var n=this.map,r=n.isInteracting(),i=[],o=[],a=n.options.fpsOnInteracting||0,s=0===a?0:1e3/a,c=this.map.options.layerCanvasLimitOnInteracting,u=t.length,l=n.getBaseLayer(),h=0,f=0;f<u;f++){var d=t[f];if(d.isVisible()){var p=d.isCanvasRender();p&&i.push(d.getId());var m=d._getRenderer();if(m){var g=this._checkLayerRedraw(d);p&&m.isCanvasUpdated()&&(g||o.push(d.getId()),this.setLayerCanvasUpdated());var v=m.__zoomTransformMatrix;if(delete m.__zoomTransformMatrix,g){if(r&&p){if(c>0&&u-1-f>c&&d!==l){d._getRenderer().clearCanvas();continue}h+=this._drawCanvasLayerOnInteracting(d,h,s,e)}else r&&m.drawOnInteracting?(m.prepareRender&&m.prepareRender(),m.checkAndDraw?m.checkAndDraw(m.drawOnInteracting,this._eventParam,e):m.drawOnInteracting(this._eventParam,e)):(m.render(e),p&&v&&m.isLoadingResource()&&(m.__zoomTransformMatrix=v));p&&(o.push(d.getId()),this.setLayerCanvasUpdated())}else p&&r&&(n.isZooming()&&!n.getPitch()?(m.prepareRender(),m.__zoomTransformMatrix=this._zoomMatrix):(n.getPitch()||n.isRotating())&&m.clearCanvas())}}}var y=this._canvasIds||[],_=this._updatedIds||[];if(this._canvasIds=i,this._updatedIds=o,!this.isLayerCanvasUpdated()){var x="---";y.join(x)===i.join(x)&&_.join(x)===o.join(x)||this.setLayerCanvasUpdated()}},n._checkLayerRedraw=function(t){if(this.isSpatialReferenceChanged())return!0;var e=this.map,n=t._getRenderer();return t.isCanvasRender()?n.testIfNeedRedraw():!(!n.needToRedraw||!n.needToRedraw())||e.isInteracting()||this.isViewChanged()},n._drawCanvasLayerOnInteracting=function(t,e,n,r){var i=this.map,o=t._getRenderer(),a=o.getDrawTime(),s=0===n||n>0&&e+a<=n;if(o.mustRenderOnInteracting&&o.mustRenderOnInteracting())o.render(r);else{if(o.drawOnInteracting&&(t===i.getBaseLayer()||s||i.isZooming()&&t.options.forceRenderOnZooming||i.isMoving()&&t.options.forceRenderOnMoving||i.isRotating()&&t.options.forceRenderOnRotating))return o.prepareRender(),o.prepareCanvas(),o.checkAndDraw?o.checkAndDraw(o.drawOnInteracting,this._eventParam,r):o.drawOnInteracting(this._eventParam,r),a;!i.isZooming()||i.getPitch()||i.isRotating()?(i.getPitch()||i.isRotating())&&o.clearCanvas():(o.prepareRender(),o.__zoomTransformMatrix=this._zoomMatrix)}return o.drawOnInteracting&&!s&&o.onSkipDrawOnInteracting(this._eventParam,r),0},n._fireLayerLoadEvents=function(){if(this._updatedIds&&this._updatedIds.length>0){var t=this.map;this._updatedIds.reverse().forEach((function(e){var n=t.getLayer(e);if(n){var r=n._getRenderer();r&&r.isRenderComplete()&&n.fire("layerload")}}))}},n.isLayerCanvasUpdated=function(){return this._canvasUpdated},n.setLayerCanvasUpdated=function(){this._canvasUpdated=!0},n.drawLayerCanvas=function(t){var e=this.map;if(!e)return!1;if(!this.isLayerCanvasUpdated()&&!this.isViewChanged())return!1;this.canvas||this.createCanvas(),e._fireEvent("renderstart",{context:this.context}),this._updateCanvasSize()||this.clearCanvas();for(var n,r=e.isInteracting(),i=e.options.layerCanvasLimitOnInteracting,o=t.length,a=[],s=0;s<o;s++)if(t[s].isVisible()&&t[s].isCanvasRender()&&t[s]._getRenderer()){var c=this._getLayerImage(t[s]);c&&c.image&&(t[s]===e.getBaseLayer()?n=[t[s],c]:a.push([t[s],c]))}n&&(this._drawLayerCanvasImage(n[0],n[1]),this._drawFog()),o=a.length;for(var u=r&&i>=0&&o>i?o-i:0;u<o;u++)this._drawLayerCanvasImage(a[u][0],a[u][1]);return e._fireEvent("renderend",{context:this.context}),!0},n.setToRedraw=function(){for(var t=this._getAllLayerToRender(),e=0,n=t.length;e<n;e++){var r=t[e].getRenderer();r&&r.canvas&&r.setToRedraw&&r.setToRedraw()}},n.updateMapSize=function(t){if(t&&!this._containerIsCanvas){var e=t.width+"px",n=t.height+"px",r=this.map._panels;r.mapWrapper.style.width=e,r.mapWrapper.style.height=n,this._updateCanvasSize()}},n.getMainPanel=function(){return this.map?this._containerIsCanvas?this.map._containerDOM:this.map._panels?this.map._panels.mapWrapper:null:null},n.toDataURL=function(t){return this.canvas?this.canvas.toDataURL(t):null},n.remove=function(){he.webgl&&"undefined"!=typeof document&&Be(document,"visibilitychange",this._thisVisibilitychange),this._resizeInterval&&clearInterval(this._resizeInterval),delete this.context,delete this.canvas,delete this.map,delete this._spatialRefChanged,this._cancelFrameLoop()},n.hitDetect=function(t){var e=this.map;if(e&&e.options.hitDetect&&!e.isInteracting()){for(var n=e._getLayers(),r="default",i=e.options.hitDetectLimit||0,o=0,a=n.length-1;a>=0;a--){var s=n[a];if(!(!s.options.hitDetect||s.isEmpty&&s.isEmpty())){var c=s._getRenderer();if(c&&c.hitDetect&&(!c.isBlank||!c.isBlank())){if("default"!==s.options.cursor&&c.hitDetect(t)){r=s.options.cursor||"pointer";break}if(o++,i>0&&o>i)break}}}e._trySetCursor(r)}},n._getLayerImage=function(t){var e=t._getRenderer();return e.getCanvasImage?e.getCanvasImage():null},n.initContainer=function(){var t=this.map._panels;function e(e,n,r,i){var o=je("div",n);return r&&(o.style.cssText=r),t[e]=o,i||Ve(o),o}var n=this.map._containerDOM;if(!this._containerIsCanvas){n.innerHTML="";var r="position:absolute;top:0px;left:0px;",i=e("mapWrapper","maptalks-wrapper","position:absolute;overflow:hidden;",!0),o=e("allLayers","maptalks-all-layers",r+"padding:0px;margin:0px;z-index:0;overflow:visible;",!0),a=e("backStatic","maptalks-back-static",r+"z-index:0;",!0),s=e("back","maptalks-back",r+"z-index:1;"),c=e("backLayer","maptalks-back-layer",r),u=e("canvasContainer","maptalks-canvas-layer",r+"border:none;z-index:2;"),l=e("frontStatic","maptalks-front-static",r+"z-index:3;",!0),h=e("front","maptalks-front",r+"z-index:4;",!0),f=e("frontLayer","maptalks-front-layer",r+"z-index:0;"),d=e("ui","maptalks-ui",r+"border:none;z-index:1;",!0),p=e("control","maptalks-control","z-index:1",!0);n.appendChild(i),o.appendChild(a),s.appendChild(c),s.layerDOM=c,o.appendChild(s),o.appendChild(u),h.appendChild(f),h.layerDOM=f,h.uiDOM=d,o.appendChild(l),o.appendChild(h),h.appendChild(d),i.appendChild(o),i.appendChild(p),this.createCanvas(),this.resetContainer();var m=this.map._getContainerDomSize();this.updateMapSize(m)}},n.isViewChanged=function(){if(void 0!==this._isViewChanged)return this._isViewChanged;var t=this._mapview,e=this._getMapView();return this._isViewChanged=!t||!K(t,e),this._isViewChanged},n._recordView=function(){var t=this.map;!t._onViewChange||t.isInteracting()||t.isAnimating()||K(t.getView(),t._getCurrentView())||t._onViewChange(t.getView())},n.isSpatialReferenceChanged=function(){return this._spatialRefChanged},n._getMapView=function(){var t=this.map,e=t._getPrjCenter();return{x:e.x,y:e.y,zoom:t.getZoom(),pitch:t.getPitch(),bearing:t.getBearing(),width:t.width,height:t.height}},n._frameLoop=function(t){var e=this;this.map?(this.renderFrame(t),this._animationFrame=T((function(t){e._frameLoop(t)}))):this._cancelFrameLoop()},n._cancelFrameLoop=function(){this._animationFrame&&E(this._animationFrame)},n._drawLayerCanvasImage=function(t,e){var n=this.context,r=e.point.round(),i=this.map.getDevicePixelRatio();1!==i&&r._multi(i);var o=e.image,a=o.width,s=o.height;if(!(r.x+a<=0||r.y+s<=0)){var c=t.options.opacity;if(m(c)||(c=1),!(c<=0)){var u=e.opacity;if(m(u)||(u=1),!(u<=0)){var l=n.globalAlpha;c<1&&(n.globalAlpha*=c),u<1&&(n.globalAlpha*=u),t.options.cssFilter&&(n.filter=t.options.cssFilter);var h=t.getRenderer(),f=h.__zoomTransformMatrix,d=h.clipCanvas(this.context);f&&(n.save(),n.setTransform.apply(n,f)),n.drawImage(o,0,0,a,s,r.x,r.y,a,s),f&&n.restore(),d&&n.restore(),"none"!==n.filter&&(n.filter="none"),n.globalAlpha=l}}}},n._drawCenterCross=function(){var t=this.map.options.centerCross;if(t){var e=this.context,n=new me(this.canvas.width/2,this.canvas.height/2);_(t)?t(e,n):hn.drawCross(this.context,n.x,n.y,2,"#f00")}},n._drawContainerExtent=function(){var t=this.map.options.cascadePitches,e=this.map.height-this.map._getVisualHeight(t[0]),n=this.map.height-this.map._getVisualHeight(t[1]),r=this.map.getContainerExtent(),i=this.context;i.beginPath(),i.moveTo(0,r.ymin),i.lineTo(r.xmax,r.ymin),i.stroke(),i.beginPath(),i.moveTo(0,e),i.lineTo(r.xmax,e),i.stroke(),i.beginPath(),i.moveTo(0,n),i.lineTo(r.xmax,n),i.stroke()},n._drawFog=function(){var t=this.map;if(!(t.getPitch()<=t.options.maxVisualPitch)&&t.options.fog){var e=t.getDevicePixelRatio(),n=this.context,r=t.getContainerExtent(),i=(t.height-t._getVisualHeight(75))*e;i<0&&(i=0);var o=r.ymin*e,a=Math.ceil(o-i),s=t.options.fogColor.join(),c=n.createLinearGradient(0,i,0,o+30),u=1-30/(a+30);c.addColorStop(0,"rgba("+s+", 0)"),c.addColorStop(.3,"rgba("+s+", 0.3)"),c.addColorStop(u,"rgba("+s+", 1)"),c.addColorStop(1,"rgba("+s+", 0)"),n.beginPath(),n.fillStyle=c,n.fillRect(0,i,Math.ceil(r.getWidth())*e,Math.ceil(a+30))}},n._getAllLayerToRender=function(){return this.map._getLayers()},n.clearCanvas=function(){this.canvas&&hn.clearRect(this.context,0,0,this.canvas.width,this.canvas.height)},n._updateCanvasSize=function(){if(!this.canvas||this._containerIsCanvas)return!1;var t=this.map,e=t.getSize(),n=this.canvas,r=t.getDevicePixelRatio();return(e.width*r!==n.width||e.height*r!==n.height)&&(n.height=r*e.height,n.width=r*e.width,n.style&&(n.style.width=e.width+"px",n.style.height=e.height+"px"),!0)},n.createCanvas=function(){this._containerIsCanvas?this.canvas=this.map._containerDOM:(this.canvas=je("canvas"),this._updateCanvasSize(),this.map._panels.canvasContainer.appendChild(this.canvas)),this.context=this.canvas.getContext("2d")},n._checkSize=function(){this.map&&!this.map.isInteracting()&&(Ze(this.map._containerDOM),this.map.checkSize())},n._setCheckSizeInterval=function(t){var e=this;clearInterval(this._resizeInterval),this._checkSizeInterval=t,this._resizeInterval=setInterval((function(){!e.map||e.map.isRemoved()?clearInterval(e._resizeInterval):e._checkSize()}),this._checkSizeInterval)},n._registerEvents=function(){var t=this,e=this.map;e.options.checkSize&&!C&&"undefined"!=typeof window&&this._setCheckSizeInterval(e.options.checkSizeInterval),he.mobile||e.on("_mousemove",this._onMapMouseMove,this),e.on("_dragrotatestart _dragrotating _dragrotateend _movestart _moving _moveend _zoomstart",(function(e){t._eventParam=e})),e.on("_zooming",(function(n){e.getPitch()||(t._zoomMatrix=n.matrix.container),t._eventParam=n})),e.on("_zoomend",(function(e){t._eventParam=e,delete t._zoomMatrix})),e.on("_spatialreferencechange",(function(){t._spatialRefChanged=!0})),he.webgl&&"undefined"!=typeof document&&Fe(document,"visibilitychange",this._thisVisibilitychange,this)},n._onMapMouseMove=function(t){var e=this,n=this.map;!n.isInteracting()&&n.options.hitDetect&&(this._hitDetectFrame&&E(this._hitDetectFrame),this._hitDetectFrame=T((function(){e.hitDetect(t.containerPoint)})))},n._getCanvasLayers=function(){return this.map._getLayers((function(t){return t.isCanvasRender()}))},n._onVisibilitychange=function(){"visible"===document.visibilityState&&this.setToRedraw()},e}(xs);ii.registerRenderer("canvas",bs),ii.mergeOptions({fog:!1,fogColor:[233,233,233]});var ws=Object.freeze({ResourceCache:gr,CanvasRenderer:mr,ImageGLRenderable:Na,MapRenderer:xs,MapCanvasRenderer:bs,Renderable:pr,ImageLayerCanvasRenderer:Ua,ImageLayerGLRenderer:Va,TileLayerCanvasRenderer:us,TileLayerGLRenderer:fs,CanvasTileLayerCanvasRenderer:ps,CanvasTileLayerGLRenderer:ms,OverlayLayerCanvasRenderer:gs,VectorLayerCanvasRenderer:_s,CanvasLayerRenderer:Wa}),Ms={_getRenderPoints:function(){return[[this._getCenter2DPoint(this.getMap().getGLZoom())],null]}};Mi.include(Ms),ji.include(Ms),Di.include(Ms),Ni.include(Ms),zi.include({_getRenderPoints:function(t){var e=this.getMap();if("vertex"===t){for(var n=this._trimRing(this.getShell()),r=[],i=0,o=n.length;i<o;i++)r.push(e.coordToPoint(n[i],e.getGLZoom()));return[r,null]}return[[e.coordToPoint(this.getCenter(),e.getGLZoom())],null]}});var Ss={_getRenderPoints:function(t){var e,n=this.getMap(),r=n.getGLZoom(),i=null;if("point"===t)(e=this._getPath2DPoints(this._getPrjCoordinates(),!1,r))&&e.length>0&&Array.isArray(e[0])&&(e=e[0].concat(e[1]));else if("vertex"===t)if(i=[],(e=this._getPath2DPoints(this._getPrjCoordinates(),!1,r))&&e.length>0&&Array.isArray(e[0])){for(var o=0,a=e.length;o<a;o++)for(var s=0,c=e[o].length;s<c;s++)0===s?i.push([e[o][s],e[o][s+1]]):i.push([e[o][s-1],e[o][s]]);e=e[0].concat(e[1])}else for(var u=0,l=e.length;u<l;u++)0===u?i.push([e[u],e[u+1]]):i.push([e[u-1],e[u]]);else if("line"===t){e=[],i=[];var h=this._getPath2DPoints(this._getPrjCoordinates(),!1,r);if(h.length>0&&Array.isArray(h[0]))for(var f,d=1,p=h.length;d<p;d++){f=h[d],this instanceof bi&&f.length>0&&!f[0].equals(f[f.length-1])&&f.push(f[0]);for(var m=1,g=f.length;m<g;m++)e.push(f[m].add(f[m-1])._multi(.5)),i.push([f[m-1],f[m]])}else{this instanceof bi&&h.length>0&&!h[0].equals(h[h.length-1])&&h.push(h[0]);for(var v=1,y=h.length;v<y;v++)e.push(h[v].add(h[v-1])._multi(.5)),i.push([h[v-1],h[v]])}}else if("vertex-first"===t){var _=this._getPrjCoordinates();e=_.length?[n._prjToPoint(_[0],r)]:[],i=_.length?[[n._prjToPoint(_[0],r),n._prjToPoint(_[1],r)]]:[]}else if("vertex-last"===t){var x=this._getPrjCoordinates(),b=x.length;e=b?[n._prjToPoint(x[b-1],r)]:[];var w=b-1,M=b>1?b-2:b-1;i=b?[[n._prjToPoint(x[M],r),n._prjToPoint(x[w],r)]]:[]}else{var S=this._getProjection().project(this.getCenter());e=[n._prjToPoint(S,r)]}return[e,i]}};Ti.include(Ss),bi.include(Ss),Kr.include({_redrawWhenPitch:function(){return!1},_redrawWhenRotate:function(){return!1}});var Ts={_redrawWhenPitch:function(){return!0},_redrawWhenRotate:function(){return this instanceof ji||this instanceof Ni},_paintAsPath:function(){var t=this.getMap();return this.getAltitude()>0||t.getPitch()||this instanceof ji&&t.getBearing()},_getPaintParams:function(){var t=this.getMap();if(this._paintAsPath())return bi.prototype._getPaintParams.call(this,!0);var e=this._getPrjCoordinates(),n=t._prjToPoint(e,t.getGLZoom()),r=this._getRenderSize(n);return[n].concat(r)},_paintOn:function(){return this._paintAsPath()?hn.polygon.apply(hn,arguments):hn.ellipse.apply(hn,arguments)},_getRenderSize:function(t){var e=this.getMap(),n=e.getGLZoom(),r=this._getPrjExtent(),i=e._prjToPoint(r.getMin(),n),o=e._prjToPoint(r.getMax(),n);return[Math.abs(o.x-i.x)/2,Math.abs(o.y-t.y),Math.abs(t.y-i.y)]}};ji.include(Ts),Di.include(Ts),zi.include({_getPaintParams:function(){var t=this.getMap().getGLZoom(),e=this._getPrjShell();return[this._getPath2DPoints(e,!1,t)]},_paintOn:hn.polygon}),Ni.include(Ts,{_redrawWhenPitch:function(){return!0},_getPaintParams:function(){if(this._paintAsPath())return bi.prototype._getPaintParams.call(this,!0);var t=this.getMap(),e=t._prjToPoint(this._getPrjCoordinates(),t.getGLZoom());return[e,this._getRenderSize(e)[0],[this.getStartAngle(),this.getEndAngle()]]},_paintOn:function(){if(this._paintAsPath())return hn.polygon.apply(hn,arguments);var t=this.getMap().getBearing(),e=arguments;return t&&(e[3]=e[3].slice(0),e[3][0]+=t,e[3][1]+=t),hn.sector.apply(hn,e)}}),_i.include({_paintAsPath:function(){return!0}}),Ti.include({arrowStyles:{classic:[3,4]},_getArrowShape:function(t,e,n,r,i){if(!t||!e||t.equals(e))return null;i||(i=0);var o,a=n*r[0],s=n*r[1]+i,c=a/2+i;(o=e.nextCtrlPoint||e.prevCtrlPoint?e.prevCtrlPoint?e.sub(new me(e.prevCtrlPoint)):e.sub(new me(e.nextCtrlPoint)):e.sub(t))._unit();var u=e.sub(o.multi(s));o._perp();var l=u.add(o.multi(c));return o._multi(-1),[l,e,u.add(o.multi(c)),l]},_getPaintParams:function(){var t=this._getPrjCoordinates();return[this._getPath2DPoints(t,!1,this.getMap().getGLZoom())]},_paintOn:function(t,e,n,r,i){this.options.smoothness?hn.paintSmoothLine(t,e,n,this.options.smoothness,!1,this._animIdx,this._animTailRatio):hn.path(t,e,n,null,i),this._paintArrow(t,e,n)},_getArrowPlacement:function(){return this.options.arrowPlacement},_getArrowStyle:function(){var t=this.options.arrowStyle;return t?Array.isArray(t)?t:this.arrowStyles[t]:null},_getArrows:function(t,e,n){var r=this._getArrowStyle();if(!r||t.length<2)return[];for(var i=t.length>0&&Array.isArray(t[0])?t:[t],o=this._getArrowPlacement(),a=[],s=this.getMap(),c=s.coordToContainerPoint(this.getFirstCoordinate()),u=s.coordToContainerPoint(this.getLastCoordinate()),l=i.length-1;l>=0;l--){if("vertex-first"===o||"vertex-firstlast"===o&&i[l][0].closeTo(c,.01)){var h=this._getArrowShape(i[l][1],i[l][0],e,r,n);h&&a.push(h)}if("vertex-last"===o||"vertex-firstlast"===o&&i[l][i[l].length-1].closeTo(u,.01)){var f=this._getArrowShape(i[l][i[l].length-2],i[l][i[l].length-1],e,r,n);f&&a.push(f)}else"point"===o&&this._getArrowPoints(a,i[l],e,r,n)}return a},_getArrowPoints:function(t,e,n,r,i){for(var o=0,a=e.length-1;o<a;o++){var s=this._getArrowShape(e[o],e[o+1],n,r,i);s&&t.push(s)}},_paintArrow:function(t,e,n){var r=this._getInternalSymbol().lineWidth;(!m(r)||r<3)&&(r=3);var i=this._getArrows(e,r);if(i.length){t.setLineDash&&t.setLineDash([]);for(var o=i.length-1;o>=0;o--)t.fillStyle=t.strokeStyle,hn.polygon(t,i[o],n,n)}}}),bi.include({_getPaintParams:function(t){var e=this.getMap().getGLZoom(),n=this._getPrjShell(),r=this._getPath2DPoints(n,t,e),i=r.length>0&&Array.isArray(r[0]);i&&(r=[[r[0]],[r[1]]]);var o=this._getPrjHoles(),a=[];if(o&&o.length>0){for(var s=this._simplified,c=0;c<o.length;c++){var u=this._getPath2DPoints(o[c],t,e);Array.isArray(u)&&i?Array.isArray(u[0])?(r[0].push(u[0]),r[1].push(u[1])):r[0].push(u):a.push(u)}s&&(this._simplified=s)}return i||I(r=[r],a),[r]},_paintOn:function(t,e,n,r,i){hn.polygon(t,e,n,r,i,this.options.smoothness)}}),ii.VERSION="0.49.4"}.call(this,n("eef6"),n("2409"))},f97a:function(t,e,n){var r=n("ca14"),i=n("c7e7"),o=n("081e"),a=n("41a4"),s=n("53b8"),c=n("c813"),u=s("IE_PROTO"),l=r.Object,h=l.prototype;t.exports=c?l.getPrototypeOf:function(t){var e=a(t);if(i(e,u))return e[u];var n=e.constructor;return o(n)&&e instanceof n?n.prototype:e instanceof l?h:null}},fc50:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHCAIAAACk8qu6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA0ppVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RTM3RTZFNDFBOTZDMTFFNUE2QTA4M0M3MDI4QUVDMTQiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RTM3RTZFNDBBOTZDMTFFNUE2QTA4M0M3MDI4QUVDMTQiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDo3ZmI2MGZkMi1hOTZjLTExZTUtYWU4Yi1kYzQ2ODQxNzA1ZmIiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDo3ZmI2MGZkMi1hOTZjLTExZTUtYWU4Yi1kYzQ2ODQxNzA1ZmIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6Qths+AAAAgElEQVR42iSNMQ4EERiFrd3KKHEBKkeYYziAxAXVCiq9SkPpDMQ0s9k/s694yZd8eQ/NOccY3yettfu+31LKnLMQopQSQsAYv2qt3ntQEELHcVhrsdZaKYWenOfJOf/EGHvvhJDrulJKjDG81qKUOueMMSACIljZe/8fgaF/AgwARJdHBal88EIAAAAASUVORK5CYII="},fdf1:function(t,e,n){var r=n("c252"),i=n("41a4"),o=Math.floor,a=r("".charAt),s=r("".replace),c=r("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,r,h,f){var d=n+t.length,p=r.length,m=l;return void 0!==h&&(h=i(h),m=u),s(f,m,(function(i,s){var u;switch(a(s,0)){case"$":return"$";case"&":return t;case"`":return c(e,0,n);case"'":return c(e,d);case"<":u=h[c(s,1,-1)];break;default:var l=+s;if(0===l)return i;if(l>p){var f=o(l/10);return 0===f?i:f<=p?void 0===r[f-1]?a(s,1):r[f-1]+a(s,1):i}u=r[l-1]}return void 0===u?"":u}))}},fe2f:function(t,e,n){"use strict";var r=n("d582").IteratorPrototype,i=n("a30f"),o=n("7e3c"),a=n("9207"),s=n("db7f"),c=function(){return this};t.exports=function(t,e,n){var u=e+" Iterator";return t.prototype=i(r,{next:o(1,n)}),a(t,u,!1,!0),s[u]=c,t}},fec6:function(t,e,n){var r=n("cc43"),i=n("097d"),o=n("9cd9").f,a=n("9a1e"),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"Window"==r(t)?function(t){try{return o(t)}catch(t){return a(s)}}(t):o(i(t))}}})},module.exports=e()}).call(this,__webpack_require__(103).setImmediate)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5),i=n(6),o=s(n(10)),a=s(n(219));function s(t){return t&&t.__esModule?t:{default:t}}e.default={name:"Sidebar",computed:{nav:function(){return this.$store.state.user.addRouters}},props:{theme:{type:String,default:"light"},sidebarList:{type:Array,default:function(){return[]}}},data:function(){return{currentSelect:[],openKeys:[],currentOpen:[],isOpenSideBar:!0}},mounted:function(){var t=this;this.$watch("$route",(function(e){console.log(e),e.path&&t.highMenu(e)}),{immediate:!0,deep:!0})},methods:{findParent:function(t,e){var n=[];return function e(r,i){for(var o=0;o<r.length;o++){var a=r[o];if(a.name===i){n.push(a),e(t,a.meta.parentId);break}a.children&&e(a.children,i)}}(t,e),n},highMenu:function(t){var e=this.findParent(this.nav[0].children,t.name),n=(0,i.find)(e,{type:1});if(this.currentSelect=[n.name],(0,i.isEmpty)(t.meta.subType))this.isOpenSideBar=!0;else{var r=JSON.parse(t.meta.subType);r&&"1"===r.fullPage?this.isOpenSideBar=!1:this.isOpenSideBar=!0}},findCurrentNodes:function(t,e,n){var r=this;return t.forEach((function(t){t.name===e?n.push(t):t.children&&r.findCurrentNodes(t.children,e,n)})),n},handleNav:function(t){t.item;var e=t.key;t.keyPath;if(!e)return!1;var n=[];if(this.findCurrentNodes(this.nav[0].children,e,n),!(0,i.isEmpty)(n))if(1===n[0].meta.chainType){var r=e.indexOf("http")>-1?e:"http://"+e;window.open(r)}else this.currentSelect=[e],this.$router.push({name:e}).then((function(t){}))},renderIcon:function(t){var e=this.$createElement;return t?e("i",{class:(0,o.default)(["icon","iconfont",t])}):e(a.default)},getChildrenType1:function(t){return t.children.every((function(t){return 3===t.type}))}},render:function(){var t=this,e=arguments[0],n=function n(r){if(r){if(t.getChildrenType1(r))return e("a-menu-item",{key:r.name},[t.renderIcon(r.meta.icon),e("span",[r.meta.title])]);var i=r.children.map((function(r){return r.children?n(r):1===r.type?e("a-menu-item",{key:r.name},[t.renderIcon(r.meta.icon),e("span",[r.meta.title])]):null}));return e("a-sub-menu",{key:r.name},[e("span",{slot:"title"},[t.renderIcon(r.meta.icon),e("span",[r.meta.title])]),i])}return[]},o=this.sidebarList&&!(0,i.isEmpty)(this.sidebarList)?this.sidebarList.map((function(r){return r.meta&&r.meta.subType?null:!r.children||t.getChildrenType1(r)?e("a-menu-item",{key:r.name},[t.renderIcon(r.meta.icon),e("span",[r.meta.title])]):n(r)})):null,a=o&&o.length?e("a-menu",{attrs:{mode:"inline",theme:this.theme,inlineCollapsed:!0,selectedKeys:this.currentSelect},on:{click:this.handleNav}},[o]):null;return e("a-layout-sider",{class:r.prefixCls+"-slider",attrs:{width:this.isOpenSideBar?250:0}},[a])}}},function(t,e,n){var r=n(31),i=n(33);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,e,n){var r=n(241),i=n(246);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(62);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e,n){t.exports={default:n(109),__esModule:!0}},function(t,e,n){var r=n(25);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(0),i=n(2),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(43)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){"use strict";var r=n(43),i=n(4),o=n(130),a=n(11),s=n(13),c=n(131),u=n(51),l=n(134),h=n(3)("iterator"),f=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,n,p,m,g,v){c(n,e,p);var y,_,x,b=function(t){if(!f&&t in T)return T[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},w=e+" Iterator",M="values"==m,S=!1,T=t.prototype,E=T[h]||T["@@iterator"]||m&&T[m],C=E||b(m),A=m?M?b("entries"):C:void 0,P="Array"==e&&T.entries||E;if(P&&(x=l(P.call(new t)))!==Object.prototype&&x.next&&(u(x,w,!0),r||"function"==typeof x[h]||a(x,h,d)),M&&E&&"values"!==E.name&&(S=!0,C=function(){return E.call(this)}),r&&!v||!f&&!S&&T[h]||a(T,h,C),s[e]=C,s[w]=d,m)if(y={values:M?C:b("values"),keys:g?C:b("keys"),entries:A},v)for(_ in y)_ in T||o(T,_,y[_]);else i(i.P+i.F*(f||S),e,y);return y}},function(t,e,n){var r=n(2).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(7);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(13),i=n(3)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){var r=n(7),i=n(26),o=n(3)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[o])?e:i(n)}},function(t,e,n){var r,i,o,a=n(17),s=n(141),c=n(72),u=n(44),l=n(2),h=l.process,f=l.setImmediate,d=l.clearImmediate,p=l.MessageChannel,m=l.Dispatch,g=0,v={},y=function(){var t=+this;if(v.hasOwnProperty(t)){var e=v[t];delete v[t],e()}},_=function(t){y.call(t.data)};f&&d||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return v[++g]=function(){s("function"==typeof t?t:Function(t),e)},r(g),g},d=function(t){delete v[t]},"process"==n(25)(h)?r=function(t){h.nextTick(a(y,t,1))}:m&&m.now?r=function(t){m.now(a(y,t,1))}:p?(o=(i=new p).port2,i.port1.onmessage=_,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",_,!1)):r="onreadystatechange"in u("script")?function(t){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),y.call(t)}}:function(t){setTimeout(a(y,t,1),0)}),t.exports={set:f,clear:d}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(7),i=n(18),o=n(55);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){var r=n(3)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},function(t,e,n){var r=n(14),i=r.slice,o=r.pluck,a=r.each,s=r.bind,c=r.create,u=r.isList,l=r.isFunction,h=r.isObject;t.exports={createStore:d};var f={version:"2.0.12",enabled:!1,get:function(t,e){var n=this.storage.read(this._namespacePrefix+t);return this._deserialize(n,e)},set:function(t,e){return void 0===e?this.remove(t):(this.storage.write(this._namespacePrefix+t,this._serialize(e)),e)},remove:function(t){this.storage.remove(this._namespacePrefix+t)},each:function(t){var e=this;this.storage.each((function(n,r){t.call(e,e._deserialize(n),(r||"").replace(e._namespaceRegexp,""))}))},clearAll:function(){this.storage.clearAll()},hasNamespace:function(t){return this._namespacePrefix=="__storejs_"+t+"_"},createStore:function(){return d.apply(this,arguments)},addPlugin:function(t){this._addPlugin(t)},namespace:function(t){return d(this.storage,this.plugins,t)}};function d(t,e,n){n||(n=""),t&&!u(t)&&(t=[t]),e&&!u(e)&&(e=[e]);var r=n?"__storejs_"+n+"_":"",d=n?new RegExp("^"+r):null;if(!/^[a-zA-Z0-9_\-]*$/.test(n))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var p=c({_namespacePrefix:r,_namespaceRegexp:d,_testStorage:function(t){try{var e="__storejs__test__";t.write(e,e);var n=t.read(e)===e;return t.remove(e),n}catch(t){return!1}},_assignPluginFnProp:function(t,e){var n=this[e];this[e]=function(){var e=i(arguments,0),r=this;function o(){if(n)return a(arguments,(function(t,n){e[n]=t})),n.apply(r,e)}var s=[o].concat(e);return t.apply(r,s)}},_serialize:function(t){return JSON.stringify(t)},_deserialize:function(t,e){if(!t)return e;var n="";try{n=JSON.parse(t)}catch(e){n=t}return void 0!==n?n:e},_addStorage:function(t){this.enabled||this._testStorage(t)&&(this.storage=t,this.enabled=!0)},_addPlugin:function(t){var e=this;if(u(t))a(t,(function(t){e._addPlugin(t)}));else if(!o(this.plugins,(function(e){return t===e}))){if(this.plugins.push(t),!l(t))throw new Error("Plugins must be function values that return objects");var n=t.call(this);if(!h(n))throw new Error("Plugins must return an object of function properties");a(n,(function(n,r){if(!l(n))throw new Error("Bad plugin property: "+r+" from plugin "+t.name+". Plugins should only return functions.");e._assignPluginFnProp(n,r)}))}},addStorage:function(t){!function(){var t="undefined"==typeof console?null:console;if(t){var e=t.warn?t.warn:t.log;e.apply(t,arguments)}}("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(t)}},f,{plugins:[]});return p.raw={},a(p,(function(t,e){l(t)&&(p.raw[e]=s(p,t))})),a(t,(function(t){p._addStorage(t)})),a(e,(function(t){p._addPlugin(t)})),p}},function(t,e,n){var r=n(80),i=n(148),o=[n(152)];t.exports=r.createStore(i,o)},function(t,e,n){var r=n(14).Global;function i(){return r.localStorage}function o(t){return i().getItem(t)}t.exports={name:"localStorage",read:o,write:function(t,e){return i().setItem(t,e)},each:function(t){for(var e=i().length-1;e>=0;e--){var n=i().key(e);t(o(n),n)}},remove:function(t){return i().removeItem(t)},clearAll:function(){return i().clear()}}},function(t,e,n){var r=n(14),i=r.Global,o=r.trim;t.exports={name:"cookieStorage",read:function(t){if(!t||!u(t))return null;var e="(?:^|.*;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(a.cookie.replace(new RegExp(e),"$1"))},write:function(t,e){if(!t)return;a.cookie=escape(t)+"="+escape(e)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"},each:s,remove:c,clearAll:function(){s((function(t,e){c(e)}))}};var a=i.document;function s(t){for(var e=a.cookie.split(/; ?/g),n=e.length-1;n>=0;n--)if(o(e[n])){var r=e[n].split("="),i=unescape(r[0]);t(unescape(r[1]),i)}}function c(t){t&&u(t)&&(a.cookie=escape(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function u(t){return new RegExp("(?:^|;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(a.cookie)}},function(t,e,n){var r=n(14).Global;function i(){return r.sessionStorage}function o(t){return i().getItem(t)}t.exports={name:"sessionStorage",read:o,write:function(t,e){return i().setItem(t,e)},each:function(t){for(var e=i().length-1;e>=0;e--){var n=i().key(e);t(o(n),n)}},remove:function(t){return i().removeItem(t)},clearAll:function(){return i().clear()}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(n(19)),i=c(n(50)),o=c(n(87)),a=n(16),s=n(9);function c(t){return t&&t.__esModule?t:{default:t}}var u=!1,l=[],h=o.default.create({timeout:6e4,withCredentials:!0});function f(t){if(!t)return{};if(t instanceof FormData)return t;var e=new FormData,n=function(n){var r=t[n];Array.isArray(t[n])?t[n].forEach((function(t){e.append(n,t)})):e.append(n,r)};for(var r in t)n(r);return e}h.interceptors.request.use((function(t){return t.headers["Authorization-sys"]||(t.headers["Authorization-sys"]="Bearer "+s.localStore.get("access_token")),t.url=t.url.replace(/{\w+}/g,(function(e){var n=e.substring(1,e.length-1),r=t.params[n];return["delete","get"].includes(t.method)&&delete t.params[n],r})),t.baseURL=s.sessionStore.get("BASE_URL"),t}),(function(t){return i.default.reject(t)})),h.interceptors.response.use((function(t){return t.data}),(function(t){if(t&&t.response&&(401===t.response.status||400===t.response.status)){console.log(t.response);var e=s.sessionStore.get("IAM_BASE_URL")+"/iam/v1/oauth/logout?redirect_uri="+window.origin;return(t.response.config.url.includes("refresh/token")||t.response.config.url.includes("oauth/token"))&&(s.storage.clearAll(),window.open(e,"_self")),u?new i.default((function(e){l.push((function(n){t.config.headers["Authorization-sys"]="Bearer "+n,e(h(t.config))}))})):(u=!0,(0,a.refreshToken)({refreshToken:"Bearer "+s.localStore.get("refresh_token")}).then((function(e){var n=e.data,r=n.access_token,i=n.refresh_token;return s.localStore.set("access_token",r),s.localStore.set("refresh_token",i),t.config.headers["Authorization-sys"]="Bearer "+r,l.forEach((function(t){return t(r)})),l=[],h(t.config)})).catch((function(t){s.storage.clearAll(),window.open(e,"_self")})).finally((function(){u=!1})))}return i.default.reject(t)})),e.default={service:h,get:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return h.get(t,{params:e,headers:(0,r.default)({},n)})},post:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return h.post(t,e,{headers:n})},postQuery:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return h.post(t,{},{headers:n,params:e})},put:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return h.put(t,e,{headers:n})},file:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return h.post(t,f(e),{headers:(0,r.default)({"Content-Type":"multipart/form-data"},n)})},download:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return h.get(t,{params:e,responseType:"blob",headers:(0,r.default)({},n)})},delete:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return h.delete(t,{params:e,headers:(0,r.default)({"Content-Type":"multipart/form-data"},n)})}}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){t.exports=n(160)},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(1);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var a=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(i(e)+"="+i(t))})))})),o=a.join("&")}if(o){var s=t.indexOf("#");-1!==s&&(t=t.slice(0,s)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,h=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(f);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new p(t,e)),1!==u.length||l||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,e,n){"use strict";var r=n(1),i=n(166),o=n(167),a=n(89),s=n(168),c=n(171),u=n(172),l=n(93);t.exports=function(t){return new Promise((function(e,n){var h=t.data,f=t.headers,d=t.responseType;r.isFormData(h)&&delete f["Content-Type"];var p=new XMLHttpRequest;if(t.auth){var m=t.auth.username||"",g=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";f.Authorization="Basic "+btoa(m+":"+g)}var v=s(t.baseURL,t.url);function y(){if(p){var r="getAllResponseHeaders"in p?c(p.getAllResponseHeaders()):null,o={data:d&&"text"!==d&&"json"!==d?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:r,config:t,request:p};i(e,n,o),p=null}}if(p.open(t.method.toUpperCase(),a(v,t.params,t.paramsSerializer),!0),p.timeout=t.timeout,"onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))&&setTimeout(y)},p.onabort=function(){p&&(n(l("Request aborted",t,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(l("Network Error",t,null,p)),p=null},p.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(l(e,t,t.transitional&&t.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var _=(t.withCredentials||u(v))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;_&&(f[t.xsrfHeaderName]=_)}"setRequestHeader"in p&&r.forEach(f,(function(t,e){void 0===h&&"content-type"===e.toLowerCase()?delete f[e]:p.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(p.withCredentials=!!t.withCredentials),d&&"json"!==d&&(p.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&p.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){p&&(p.abort(),n(t),p=null)})),h||(h=null),p.send(h)}))}},function(t,e,n){"use strict";var r=n(91);t.exports=function(t,e,n,i,o){var a=new Error(t);return r(a,e,n,i,o)}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";var r=n(1);t.exports=function(t,e){e=e||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function u(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=c(void 0,t[i])):n[i]=c(t[i],e[i])}r.forEach(i,(function(t){r.isUndefined(e[t])||(n[t]=c(void 0,e[t]))})),r.forEach(o,u),r.forEach(a,(function(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=c(void 0,t[i])):n[i]=c(void 0,e[i])})),r.forEach(s,(function(r){r in e?n[r]=c(t[r],e[r]):r in t&&(n[r]=c(void 0,t[r]))}));var l=i.concat(o).concat(a).concat(s),h=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===l.indexOf(t)}));return r.forEach(h,u),n}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,i=Array.isArray,o=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),a=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},r=0;r<t.length;++r)void 0!==t[r]&&(n[r]=t[r]);return n};t.exports={arrayToObject:a,assign:function(t,e){return Object.keys(e).reduce((function(t,n){return t[n]=e[n],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],r=0;r<e.length;++r)for(var o=e[r],a=o.obj[o.prop],s=Object.keys(a),c=0;c<s.length;++c){var u=s[c],l=a[u];"object"==typeof l&&null!==l&&-1===n.indexOf(l)&&(e.push({obj:a,prop:u}),n.push(l))}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(i(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);e.obj[e.prop]=r}}}(e),t},decode:function(t,e,n){var r=t.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(t){return r}},encode:function(t,e,n){if(0===t.length)return t;var r="string"==typeof t?t:String(t);if("iso-8859-1"===n)return escape(r).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var i="",a=0;a<r.length;++a){var s=r.charCodeAt(a);45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?i+=r.charAt(a):s<128?i+=o[s]:s<2048?i+=o[192|s>>6]+o[128|63&s]:s<55296||s>=57344?i+=o[224|s>>12]+o[128|s>>6&63]+o[128|63&s]:(a+=1,s=65536+((1023&s)<<10|1023&r.charCodeAt(a)),i+=o[240|s>>18]+o[128|s>>12&63]+o[128|s>>6&63]+o[128|63&s])}return i},isBuffer:function(t){return!(!t||"object"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},merge:function t(e,n,o){if(!n)return e;if("object"!=typeof n){if(i(e))e.push(n);else{if(!e||"object"!=typeof e)return[e,n];(o&&(o.plainObjects||o.allowPrototypes)||!r.call(Object.prototype,n))&&(e[n]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(n);var s=e;return i(e)&&!i(n)&&(s=a(e,o)),i(e)&&i(n)?(n.forEach((function(n,i){if(r.call(e,i)){var a=e[i];a&&"object"==typeof a&&n&&"object"==typeof n?e[i]=t(a,n,o):e.push(n)}else e[i]=n})),e):Object.keys(n).reduce((function(e,i){var a=n[i];return r.call(e,i)?e[i]=t(e[i],a,o):e[i]=a,e}),s)}}},function(t,e,n){"use strict";var r=String.prototype.replace,i=/%20/g;t.exports={default:"RFC3986",formatters:{RFC1738:function(t){return r.call(t,i,"+")},RFC3986:function(t){return t}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(t,e,n){var r=n(8),i=n(22),o=n(24),a=n(86).f;t.exports=function(t){return function(e){for(var n,s=o(e),c=i(s),u=c.length,l=0,h=[];u>l;)n=c[l++],r&&!a.call(s,n)||h.push(t?[n,s[n]]:s[n]);return h}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(n(10)),i=n(5),o=l(n(58)),a=n(6),s=l(n(101)),c=l(n(102)),u=l(n(208));function l(t){return t&&t.__esModule?t:{default:t}}e.default={name:"MapAndBasicHeader",inject:["slotsList"],props:{theme:{type:String,default:"light"},fixed:{type:Boolean,default:!1},navList:{type:Array,default:function(){return[]}}},data:function(){return{currentPath:void 0,currentIndex:0}},mounted:function(){var t=this;this.$watch("$route",(function(e){var n=e.matched;if(t.navList&&!(0,a.isEmpty)(t.navList)){var r=(0,i.treeFindPath)(t.navList,(function(t){return t.meta.id===n[n.length-1].meta.id}));t.currentPath=r[0].path;var o=t.navList.findIndex((function(e){return e.path===t.currentPath}));t.currentIndex=-1!==o?o:0,u.default._toggle(t.currentIndex)}}),{immediate:!0}),this.$nextTick((function(){u.default.drawNav({index:t.currentIndex,canvas:document.getElementById("navCanvas"),navItem:document.querySelector(".rk-web-core-header-right-nav-item"),navCount:t.navList.length})}))},methods:{renderNav:function(){var t=this,e=this.$createElement;return this.navList&&!(0,a.isEmpty)(this.navList)?this.navList.filter((function(t){return 1===t.type})).map((function(n,o){var a="dark"!==t.theme?(0,r.default)([i.prefixCls+"-header-right-nav-item",n.path===t.currentPath?i.prefixCls+"-header-right-nav-active":""]):(0,r.default)([i.prefixCls+"-header-right-nav-item",i.prefixCls+"-header-dark-nav-item",n.path===t.currentPath?i.prefixCls+"-header-dark-nav-active":""]);return e("div",{class:a,ref:"navItem",on:{click:function(){return t.handleTap(n,o)}}},[n.meta.title])})):null},handleTap:function(t,e){if(1===t.meta.chainType){var n=t.path.indexOf("http")>-1?t.path:"http://"+t.path;window.open(n)}else u.default._toggle(e),this.currentPath=t.path,this.$store.commit("user/SET_NAV_INDEX",e),this.$router.push(t.path).then((function(t){})),this.$emit("change",t)},setNavIndex:function(t){u.default._toggle(t)}},render:function(){var t=arguments[0],e=this.theme,n=this.fixed,a=this.slotsList,u=(0,r.default)([i.prefixCls+"-header",i.prefixCls+"-header-"+e,n?i.prefixCls+"-header-fixed":""]);return t("a-layout-header",{class:u},[t("div",{class:[i.prefixCls+"-header-"+e+"-inner",i.prefixCls+"-header-inner"]},[a.logo?a.logo:t(o.default,{attrs:{prefix:"basic",theme:e}}),t("div",{class:i.prefixCls+"-header-right"},[t("div",{class:[i.prefixCls+"-header-right-nav","dark"===e?i.prefixCls+"-header-dark":""]},[t("canvas",{attrs:{id:"navCanvas"},style:"position: absolute; z-index: -1"}),this.renderNav()]),t("div",{class:i.prefixCls+"-header-right-extra"},[a.header,t(s.default,{attrs:{theme:e}}),t(c.default,{attrs:{theme:e}})])])])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=d(n(48)),o=d(n(49)),a=d(n(19)),s=n(5),c=n(9),u=d(n(81)),l=n(16),h=n(6),f=d(n(10));function d(t){return t&&t.__esModule?t:{default:t}}e.default={name:"AppExternal",props:{theme:{type:String,default:"light"}},computed:{currentUser:function(){return c.localStore.get("userName")},currentProject:function(){return c.localStore.get("currentProject")}},data:function(){return{projectList:[],currentProjectInfo:void 0}},mounted:function(){this.getAllProject()},methods:{getAllProject:function(){var t=this;(0,l.getBelongList)().then((function(e){c.sessionStore.get("CLIENT_ID");t.projectList=e.data.map((function(e){return(0,a.default)({},e,{check:e.id===t.currentProject.id})}));var n=(0,h.find)(t.projectList,["id",t.currentProject.id]);(0,h.isEmpty)(n)||(t.currentProjectInfo=n.name)}))},changeBtn:(r=(0,o.default)(i.default.mark((function t(e,n){var r,o;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(1!==e){t.next=14;break}return localStorage.removeItem("menuList"),localStorage.removeItem("consumer"),localStorage.removeItem("currentProject"),localStorage.removeItem("consumerExtList"),localStorage.removeItem("userMessage"),c.localStore.set("currentProject",n),t.next=9,(0,l.postConsumer)(n.id);case 9:r=t.sent,o=r.data,!(0,h.isEmpty)(o)&&o.access_token&&(localStorage.removeItem("access_token"),localStorage.setItem("access_token",o.access_token),this.$nextTick((function(){window.location.reload()}))),t.next=16;break;case 14:u.default.clearAll(),window.open(sessionStorage.getItem("IAM_BASE_URL")+"/iam/v1/oauth/logout?redirect_uri="+window.origin,"_self");case 16:case"end":return t.stop()}}),t,this)}))),function(t,e){return r.apply(this,arguments)})},render:function(){var t=this,e=arguments[0],n=this.projectList.map((function(n){var r=(0,f.default)([s.prefixCls+"-app-external-cell",n.check?s.prefixCls+"-app-external-active":""]);return e("div",{class:r,on:{click:function(){return t.changeBtn(1,n)}}},[n.name])}));return e("a-dropdown",{attrs:{trigger:["click"]}},[e("span",{class:[s.prefixCls+"-app-external-link",s.prefixCls+"-app-external-link-"+this.theme]},[e("span",{class:s.prefixCls+"-app-external-link-title"},[this.currentUser]),this.currentProject?e("span",{class:s.prefixCls+"-app-external-link-sub"},["【",this.currentProjectInfo,"】"]):null,e("a-icon",{attrs:{type:"caret-down"}})]),e("div",{slot:"overlay",class:s.prefixCls+"-app-external-wrapper"},[(0,h.isEmpty)(this.projectList)?null:e("div",{class:s.prefixCls+"-app-external-list"},[n]),e("div",{class:s.prefixCls+"-app-external-btn",on:{click:function(){return t.changeBtn(2)}}},[e("span",["退出登录"])])])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=u(n(66)),i=u(n(204)),o=n(5),a=n(16),s=u(n(207)),c=n(9);function u(t){return t&&t.__esModule?t:{default:t}}var l={"东北⻛":[22.5,67.5],"东⻛":[67.5,112.5],"东南⻛":[112.5,157.5],"南⻛":[157.5,202.5],"⻄南⻛":[202.5,247.5],"⻄⻛":[247.5,292.5],"⻄北⻛":[292.5,337.5]},h={"0级":[0,.2],"1级":[.2,1.5],"2级":[1.5,3.3],"3级":[3.3,5.4],"4级":[5.4,7.9],"5级":[7.9,10.7],"6级":[10.7,13.8],"7级":[13.8,17.1],"8级":[17.1,20.7],"9级":[20.7,24.4],"10级":[24.4,28.4],"11级":[28.4,32.6]};e.default={name:"HeaderInfoGroup",inject:["propsList"],props:{theme:{type:String,default:"light"}},data:function(){return{ymd:"00-00-00",hms:"--:--:--",regionDataInfo:{temperature:0,time:void 0,url:void 0,value:0,windDirection:0,windSpeed:0,iconDay:void 0,iconNight:void 0,weather:"晴",windDegrees:180,windLevel:2},isDay:!0}},mounted:function(){var t=this;this.timer=setInterval((function(){t.initDateTime()}),1e3),this.getRealDate()},methods:{calcWindDirection:function(t){return{transform:"rotateZ("+t+"deg)"}},calcWind:function(t){var e=(0,i.default)(l).findIndex((function(e){return t>e[0]&&t<=e[1]}));return""+((0,r.default)(l)[e]||"北风")},calcWindLevel:function(t){if(0===t)return"0级";var e=(0,i.default)(h).findIndex((function(e){return t>e[0]&&t<=e[1]}));return""+((0,r.default)(h)[e]||"12级")},initDateTime:function(){var t=new Date,e=t.getFullYear(),n=t.getMonth()+1,r=t.getDate(),i=(new Date).getHours(),o=(new Date).getMinutes(),a=(new Date).getSeconds();this.ymd=e+"-"+this.addZero(n)+"-"+this.addZero(r),this.isDay=i>6&&i<=18,this.hms=this.addZero(i)+":"+this.addZero(o)+":"+this.addZero(a)},addZero:function(t){return t<10?"0"+t:t},getRealDate:function(){var t=this,e=c.localStore.get("consumer").regionId;(0,a.getRegionDataInfo)({areaCode:e}).then((function(e){t.regionDataInfo=e.data.live}))}},beforeDestroy:function(){this.timer&&clearInterval(this.timer)},render:function(){var t=arguments[0];return t("div",{class:[o.prefixCls+"-header-info-group",o.prefixCls+"-header-info-group-"+this.theme]},[this.propsList.datetime?t("div",{class:[o.prefixCls+"-header-info-group-time",o.prefixCls+"-header-info-group-item"]},[t("span",[this.hms]),t("small",[this.ymd])]):null,this.propsList.weather?t("div",{class:[o.prefixCls+"-header-info-group-weather",o.prefixCls+"-header-info-group-item"]},[t("img",{attrs:{src:this.regionDataInfo.icon,alt:""}}),t("span",[this.regionDataInfo.temperature,"℃"])]):null,this.propsList.wind?t("div",{class:[o.prefixCls+"-header-info-group-wind",o.prefixCls+"-header-info-group-item"]},[t("div",{class:o.prefixCls+"-header-info-group-wind-img"},[t(s.default,{style:this.calcWindDirection(this.regionDataInfo.windDegrees)})]),t("div",{class:o.prefixCls+"-header-info-group-wind-info"},[t("span",[this.regionDataInfo.windLevel,"级"]),t("span",[this.regionDataInfo.windDirection])])]):null])}}},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(214),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(15))},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(63),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e,n){var r=n(272),i=n(33),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GMap=e.AppLayout=e.install=void 0;var r=_(n(66)),i=_(n(46)),o=_(n(47)),a=n(120),s=_(n(121)),c=n(122),u=_(n(124)),l=n(181),h=_(n(85)),f=n(228),d=n(30),p=_(n(229)),m=_(n(87)),g=_(n(286));n(287);var v=n(60),y=_(v);function _(t){return t&&t.__esModule?t:{default:t}}var x={loadView:void 0,store:{},filters:[],vueConfig:{},authToken:void 0,svgFile:"https://at.alicdn.com/t/font_614860_f0motpq03e.js",isNeedMapTalks:!1,mapOptions:{}},b=function(){function t(e,n){(0,i.default)(this,t),this.vueInstance=e,this.basicRouter=s.default,this.initOptions(n)}return(0,o.default)(t,[{key:"initOptions",value:function(t){var e=(0,r.default)(x);this.basicOptions=(0,p.default)((0,d.mergeProps)(x,t),e),this.storeInstance=this.basicOptions.store,this.useInstance(),this.filterInstance(),this.vueConfigPick()}},{key:"getRequestInstance",value:function(){return h.default}},{key:"useInstance",value:function(){this.vueInstance.use(this.basicRouter),this.routerInstance=(0,c.routerInit)(this.basicRouter),this.storeInstance.registerModule("user",u.default),(0,l.registerPermission)(this,(0,c.pkRouter)(this.basicRouter)),this.basicOptions.isNeedMapTalks&&this.loadAMap()}},{key:"loadAMap",value:function(){var t=this;this.routerInstance.onReady((function(){(0,y.default)((0,d.mergeProps)({svgFile:t.basicOptions.svgFile,zoom:9.6},t.basicOptions.mapOptions))}))}},{key:"filterInstance",value:function(){var t=this;(0,r.default)(this.basicOptions.filters).forEach((function(e){t.vueInstance.filter(e,t.basicOptions.filters[e])}))}},{key:"vueConfigPick",value:function(){var t=this;(0,r.default)(this.basicOptions.vueConfig).forEach((function(e){t.vueInstance.config[e]=t.basicOptions.vueConfig[e]}))}},{key:"mount",value:function(){return{version:a.version,router:this.routerInstance,store:this.storeInstance,resetRouter:(0,c.pkRouter)(this.basicRouter),request:this.getRequestInstance(),axios:m.default,vueInstance:this.vueInstance,bootstrap:(0,f.noLogin)(this.routerInstance,this.basicOptions.authToken)}}}]),t}(),w=function(t){t.use(g.default)};"undefined"!=typeof window&&window.Vue&&w(window.Vue),g.default.install=function(t){t.component(g.default.name,g.default)},e.install=w,e.AppLayout=g.default,e.GMap=v.GMap,e.default=function(t,e){return new b(t,e)}},function(t,e,n){n(110),t.exports=n(0).Object.keys},function(t,e,n){var r=n(21),i=n(22);n(114)("keys",(function(){return function(t){return i(r(t))}}))},function(t,e,n){var r=n(23),i=n(24),o=n(112)(!1),a=n(42)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~o(u,n)||u.push(n));return u}},function(t,e,n){var r=n(24),i=n(40),o=n(113);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=i(c.length),l=o(a,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(41),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(4),i=n(0),o=n(27);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},function(t,e,n){t.exports=!n(8)&&!n(27)((function(){return 7!=Object.defineProperty(n(44)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(18);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){t.exports={default:n(118),__esModule:!0}},function(t,e,n){n(119);var r=n(0).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(4);r(r.S+r.F*!n(8),"Object",{defineProperty:n(12).f})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.version="V0.6.26"},function(t,e,n){"use strict";function r(t,e){for(var n in e)t[n]=e[n];return t}n.r(e);var i=/[!'()*]/g,o=function(t){return"%"+t.charCodeAt(0).toString(16)},a=/%2C/g,s=function(t){return encodeURIComponent(t).replace(i,o).replace(a,",")};function c(t){try{return decodeURIComponent(t)}catch(t){0}return t}var u=function(t){return null==t||"object"==typeof t?t:String(t)};function l(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach((function(t){var n=t.replace(/\+/g," ").split("="),r=c(n.shift()),i=n.length>0?c(n.join("=")):null;void 0===e[r]?e[r]=i:Array.isArray(e[r])?e[r].push(i):e[r]=[e[r],i]})),e):e}function h(t){var e=t?Object.keys(t).map((function(e){var n=t[e];if(void 0===n)return"";if(null===n)return s(e);if(Array.isArray(n)){var r=[];return n.forEach((function(t){void 0!==t&&(null===t?r.push(s(e)):r.push(s(e)+"="+s(t)))})),r.join("&")}return s(e)+"="+s(n)})).filter((function(t){return t.length>0})).join("&"):null;return e?"?"+e:""}var f=/\/?$/;function d(t,e,n,r){var i=r&&r.options.stringifyQuery,o=e.query||{};try{o=p(o)}catch(t){}var a={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:o,params:e.params||{},fullPath:v(e,i),matched:t?g(t):[]};return n&&(a.redirectedFrom=v(n,i)),Object.freeze(a)}function p(t){if(Array.isArray(t))return t.map(p);if(t&&"object"==typeof t){var e={};for(var n in t)e[n]=p(t[n]);return e}return t}var m=d(null,{path:"/"});function g(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function v(t,e){var n=t.path,r=t.query;void 0===r&&(r={});var i=t.hash;return void 0===i&&(i=""),(n||"/")+(e||h)(r)+i}function y(t,e,n){return e===m?t===e:!!e&&(t.path&&e.path?t.path.replace(f,"")===e.path.replace(f,"")&&(n||t.hash===e.hash&&_(t.query,e.query)):!(!t.name||!e.name)&&(t.name===e.name&&(n||t.hash===e.hash&&_(t.query,e.query)&&_(t.params,e.params))))}function _(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var n=Object.keys(t).sort(),r=Object.keys(e).sort();return n.length===r.length&&n.every((function(n,i){var o=t[n];if(r[i]!==n)return!1;var a=e[n];return null==o||null==a?o===a:"object"==typeof o&&"object"==typeof a?_(o,a):String(o)===String(a)}))}function x(t){for(var e=0;e<t.matched.length;e++){var n=t.matched[e];for(var r in n.instances){var i=n.instances[r],o=n.enteredCbs[r];if(i&&o){delete n.enteredCbs[r];for(var a=0;a<o.length;a++)i._isBeingDestroyed||o[a](i)}}}}var b={name:"RouterView",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,e){var n=e.props,i=e.children,o=e.parent,a=e.data;a.routerView=!0;for(var s=o.$createElement,c=n.name,u=o.$route,l=o._routerViewCache||(o._routerViewCache={}),h=0,f=!1;o&&o._routerRoot!==o;){var d=o.$vnode?o.$vnode.data:{};d.routerView&&h++,d.keepAlive&&o._directInactive&&o._inactive&&(f=!0),o=o.$parent}if(a.routerViewDepth=h,f){var p=l[c],m=p&&p.component;return m?(p.configProps&&w(m,a,p.route,p.configProps),s(m,a,i)):s()}var g=u.matched[h],v=g&&g.components[c];if(!g||!v)return l[c]=null,s();l[c]={component:v},a.registerRouteInstance=function(t,e){var n=g.instances[c];(e&&n!==t||!e&&n===t)&&(g.instances[c]=e)},(a.hook||(a.hook={})).prepatch=function(t,e){g.instances[c]=e.componentInstance},a.hook.init=function(t){t.data.keepAlive&&t.componentInstance&&t.componentInstance!==g.instances[c]&&(g.instances[c]=t.componentInstance),x(u)};var y=g.props&&g.props[c];return y&&(r(l[c],{route:u,configProps:y}),w(v,a,u,y)),s(v,a,i)}};function w(t,e,n,i){var o=e.props=function(t,e){switch(typeof e){case"undefined":return;case"object":return e;case"function":return e(t);case"boolean":return e?t.params:void 0;default:0}}(n,i);if(o){o=e.props=r({},o);var a=e.attrs=e.attrs||{};for(var s in o)t.props&&s in t.props||(a[s]=o[s],delete o[s])}}function M(t,e,n){var r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return e+t;var i=e.split("/");n&&i[i.length-1]||i.pop();for(var o=t.replace(/^\//,"").split("/"),a=0;a<o.length;a++){var s=o[a];".."===s?i.pop():"."!==s&&i.push(s)}return""!==i[0]&&i.unshift(""),i.join("/")}function S(t){return t.replace(/\/\//g,"/")}var T=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},E=B,C=O,A=function(t,e){return I(O(t,e),e)},P=I,L=F,R=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function O(t,e){for(var n,r=[],i=0,o=0,a="",s=e&&e.delimiter||"/";null!=(n=R.exec(t));){var c=n[0],u=n[1],l=n.index;if(a+=t.slice(o,l),o=l+c.length,u)a+=u[1];else{var h=t[o],f=n[2],d=n[3],p=n[4],m=n[5],g=n[6],v=n[7];a&&(r.push(a),a="");var y=null!=f&&null!=h&&h!==f,_="+"===g||"*"===g,x="?"===g||"*"===g,b=n[2]||s,w=p||m;r.push({name:d||i++,prefix:f||"",delimiter:b,optional:x,repeat:_,partial:y,asterisk:!!v,pattern:w?j(w):v?".*":"[^"+D(b)+"]+?"})}}return o<t.length&&(a+=t.substr(o)),a&&r.push(a),r}function k(t){return encodeURI(t).replace(/[\/?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}function I(t,e){for(var n=new Array(t.length),r=0;r<t.length;r++)"object"==typeof t[r]&&(n[r]=new RegExp("^(?:"+t[r].pattern+")$",N(e)));return function(e,r){for(var i="",o=e||{},a=(r||{}).pretty?k:encodeURIComponent,s=0;s<t.length;s++){var c=t[s];if("string"!=typeof c){var u,l=o[c.name];if(null==l){if(c.optional){c.partial&&(i+=c.prefix);continue}throw new TypeError('Expected "'+c.name+'" to be defined')}if(T(l)){if(!c.repeat)throw new TypeError('Expected "'+c.name+'" to not repeat, but received `'+JSON.stringify(l)+"`");if(0===l.length){if(c.optional)continue;throw new TypeError('Expected "'+c.name+'" to not be empty')}for(var h=0;h<l.length;h++){if(u=a(l[h]),!n[s].test(u))throw new TypeError('Expected all "'+c.name+'" to match "'+c.pattern+'", but received `'+JSON.stringify(u)+"`");i+=(0===h?c.prefix:c.delimiter)+u}}else{if(u=c.asterisk?encodeURI(l).replace(/[?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})):a(l),!n[s].test(u))throw new TypeError('Expected "'+c.name+'" to match "'+c.pattern+'", but received "'+u+'"');i+=c.prefix+u}}else i+=c}return i}}function D(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function j(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function z(t,e){return t.keys=e,t}function N(t){return t&&t.sensitive?"":"i"}function F(t,e,n){T(e)||(n=e||n,e=[]);for(var r=(n=n||{}).strict,i=!1!==n.end,o="",a=0;a<t.length;a++){var s=t[a];if("string"==typeof s)o+=D(s);else{var c=D(s.prefix),u="(?:"+s.pattern+")";e.push(s),s.repeat&&(u+="(?:"+c+u+")*"),o+=u=s.optional?s.partial?c+"("+u+")?":"(?:"+c+"("+u+"))?":c+"("+u+")"}}var l=D(n.delimiter||"/"),h=o.slice(-l.length)===l;return r||(o=(h?o.slice(0,-l.length):o)+"(?:"+l+"(?=$))?"),o+=i?"$":r&&h?"":"(?="+l+"|$)",z(new RegExp("^"+o,N(n)),e)}function B(t,e,n){return T(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return z(t,e)}(t,e):T(t)?function(t,e,n){for(var r=[],i=0;i<t.length;i++)r.push(B(t[i],e,n).source);return z(new RegExp("(?:"+r.join("|")+")",N(n)),e)}(t,e,n):function(t,e,n){return F(O(t,n),e,n)}(t,e,n)}E.parse=C,E.compile=A,E.tokensToFunction=P,E.tokensToRegExp=L;var H=Object.create(null);function G(t,e,n){e=e||{};try{var r=H[t]||(H[t]=E.compile(t));return"string"==typeof e.pathMatch&&(e[0]=e.pathMatch),r(e,{pretty:!0})}catch(t){return""}finally{delete e[0]}}function U(t,e,n,i){var o="string"==typeof t?{path:t}:t;if(o._normalized)return o;if(o.name){var a=(o=r({},t)).params;return a&&"object"==typeof a&&(o.params=r({},a)),o}if(!o.path&&o.params&&e){(o=r({},o))._normalized=!0;var s=r(r({},e.params),o.params);if(e.name)o.name=e.name,o.params=s;else if(e.matched.length){var c=e.matched[e.matched.length-1].path;o.path=G(c,s,e.path)}else 0;return o}var h=function(t){var e="",n="",r=t.indexOf("#");r>=0&&(e=t.slice(r),t=t.slice(0,r));var i=t.indexOf("?");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{path:t,query:n,hash:e}}(o.path||""),f=e&&e.path||"/",d=h.path?M(h.path,f,n||o.append):f,p=function(t,e,n){void 0===e&&(e={});var r,i=n||l;try{r=i(t||"")}catch(t){r={}}for(var o in e){var a=e[o];r[o]=Array.isArray(a)?a.map(u):u(a)}return r}(h.query,o.query,i&&i.options.parseQuery),m=o.hash||h.hash;return m&&"#"!==m.charAt(0)&&(m="#"+m),{_normalized:!0,path:d,query:p,hash:m}}var V,W=function(){},Z={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(t){var e=this,n=this.$router,i=this.$route,o=n.resolve(this.to,i,this.append),a=o.location,s=o.route,c=o.href,u={},l=n.options.linkActiveClass,h=n.options.linkExactActiveClass,p=null==l?"router-link-active":l,m=null==h?"router-link-exact-active":h,g=null==this.activeClass?p:this.activeClass,v=null==this.exactActiveClass?m:this.exactActiveClass,_=s.redirectedFrom?d(null,U(s.redirectedFrom),null,n):s;u[v]=y(i,_,this.exactPath),u[g]=this.exact||this.exactPath?u[v]:function(t,e){return 0===t.path.replace(f,"/").indexOf(e.path.replace(f,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var n in e)if(!(n in t))return!1;return!0}(t.query,e.query)}(i,_);var x=u[v]?this.ariaCurrentValue:null,b=function(t){q(t)&&(e.replace?n.replace(a,W):n.push(a,W))},w={click:q};Array.isArray(this.event)?this.event.forEach((function(t){w[t]=b})):w[this.event]=b;var M={class:u},S=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:c,route:s,navigate:b,isActive:u[g],isExactActive:u[v]});if(S){if(1===S.length)return S[0];if(S.length>1||!S.length)return 0===S.length?t():t("span",{},S)}if("a"===this.tag)M.on=w,M.attrs={href:c,"aria-current":x};else{var T=function t(e){var n;if(e)for(var r=0;r<e.length;r++){if("a"===(n=e[r]).tag)return n;if(n.children&&(n=t(n.children)))return n}}(this.$slots.default);if(T){T.isStatic=!1;var E=T.data=r({},T.data);for(var C in E.on=E.on||{},E.on){var A=E.on[C];C in w&&(E.on[C]=Array.isArray(A)?A:[A])}for(var P in w)P in E.on?E.on[P].push(w[P]):E.on[P]=b;var L=T.data.attrs=r({},T.data.attrs);L.href=c,L["aria-current"]=x}else M.on=w}return t(this.tag,M,this.$slots.default)}};function q(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||void 0!==t.button&&0!==t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}var Y="undefined"!=typeof window;function J(t,e,n,r,i){var o=e||[],a=n||Object.create(null),s=r||Object.create(null);t.forEach((function(t){!function t(e,n,r,i,o,a){var s=i.path,c=i.name;0;var u=i.pathToRegexpOptions||{},l=function(t,e,n){n||(t=t.replace(/\/$/,""));if("/"===t[0])return t;if(null==e)return t;return S(e.path+"/"+t)}(s,o,u.strict);"boolean"==typeof i.caseSensitive&&(u.sensitive=i.caseSensitive);var h={path:l,regex:X(l,u),components:i.components||{default:i.component},alias:i.alias?"string"==typeof i.alias?[i.alias]:i.alias:[],instances:{},enteredCbs:{},name:c,parent:o,matchAs:a,redirect:i.redirect,beforeEnter:i.beforeEnter,meta:i.meta||{},props:null==i.props?{}:i.components?i.props:{default:i.props}};i.children&&i.children.forEach((function(i){var o=a?S(a+"/"+i.path):void 0;t(e,n,r,i,h,o)}));n[h.path]||(e.push(h.path),n[h.path]=h);if(void 0!==i.alias)for(var f=Array.isArray(i.alias)?i.alias:[i.alias],d=0;d<f.length;++d){0;var p={path:f[d],children:i.children};t(e,n,r,p,o,h.path||"/")}c&&(r[c]||(r[c]=h))}(o,a,s,t,i)}));for(var c=0,u=o.length;c<u;c++)"*"===o[c]&&(o.push(o.splice(c,1)[0]),u--,c--);return{pathList:o,pathMap:a,nameMap:s}}function X(t,e){return E(t,[],e)}function $(t,e){var n=J(t),r=n.pathList,i=n.pathMap,o=n.nameMap;function a(t,n,a){var s=U(t,n,!1,e),u=s.name;if(u){var l=o[u];if(!l)return c(null,s);var h=l.regex.keys.filter((function(t){return!t.optional})).map((function(t){return t.name}));if("object"!=typeof s.params&&(s.params={}),n&&"object"==typeof n.params)for(var f in n.params)!(f in s.params)&&h.indexOf(f)>-1&&(s.params[f]=n.params[f]);return s.path=G(l.path,s.params),c(l,s,a)}if(s.path){s.params={};for(var d=0;d<r.length;d++){var p=r[d],m=i[p];if(Q(m.regex,s.path,s.params))return c(m,s,a)}}return c(null,s)}function s(t,n){var r=t.redirect,i="function"==typeof r?r(d(t,n,null,e)):r;if("string"==typeof i&&(i={path:i}),!i||"object"!=typeof i)return c(null,n);var s=i,u=s.name,l=s.path,h=n.query,f=n.hash,p=n.params;if(h=s.hasOwnProperty("query")?s.query:h,f=s.hasOwnProperty("hash")?s.hash:f,p=s.hasOwnProperty("params")?s.params:p,u){o[u];return a({_normalized:!0,name:u,query:h,hash:f,params:p},void 0,n)}if(l){var m=function(t,e){return M(t,e.parent?e.parent.path:"/",!0)}(l,t);return a({_normalized:!0,path:G(m,p),query:h,hash:f},void 0,n)}return c(null,n)}function c(t,n,r){return t&&t.redirect?s(t,r||n):t&&t.matchAs?function(t,e,n){var r=a({_normalized:!0,path:G(n,e.params)});if(r){var i=r.matched,o=i[i.length-1];return e.params=r.params,c(o,e)}return c(null,e)}(0,n,t.matchAs):d(t,n,r,e)}return{match:a,addRoute:function(t,e){var n="object"!=typeof t?o[t]:void 0;J([e||t],r,i,o,n),n&&J(n.alias.map((function(t){return{path:t,children:[e]}})),r,i,o,n)},getRoutes:function(){return r.map((function(t){return i[t]}))},addRoutes:function(t){J(t,r,i,o)}}}function Q(t,e,n){var r=e.match(t);if(!r)return!1;if(!n)return!0;for(var i=1,o=r.length;i<o;++i){var a=t.keys[i-1];a&&(n[a.name||"pathMatch"]="string"==typeof r[i]?c(r[i]):r[i])}return!0}var K=Y&&window.performance&&window.performance.now?window.performance:Date;function tt(){return K.now().toFixed(3)}var et=tt();function nt(){return et}function rt(t){return et=t}var it=Object.create(null);function ot(){"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual");var t=window.location.protocol+"//"+window.location.host,e=window.location.href.replace(t,""),n=r({},window.history.state);return n.key=nt(),window.history.replaceState(n,"",e),window.addEventListener("popstate",ct),function(){window.removeEventListener("popstate",ct)}}function at(t,e,n,r){if(t.app){var i=t.options.scrollBehavior;i&&t.app.$nextTick((function(){var o=function(){var t=nt();if(t)return it[t]}(),a=i.call(t,e,n,r?o:null);a&&("function"==typeof a.then?a.then((function(t){dt(t,o)})).catch((function(t){0})):dt(a,o))}))}}function st(){var t=nt();t&&(it[t]={x:window.pageXOffset,y:window.pageYOffset})}function ct(t){st(),t.state&&t.state.key&&rt(t.state.key)}function ut(t){return ht(t.x)||ht(t.y)}function lt(t){return{x:ht(t.x)?t.x:window.pageXOffset,y:ht(t.y)?t.y:window.pageYOffset}}function ht(t){return"number"==typeof t}var ft=/^#\d/;function dt(t,e){var n,r="object"==typeof t;if(r&&"string"==typeof t.selector){var i=ft.test(t.selector)?document.getElementById(t.selector.slice(1)):document.querySelector(t.selector);if(i){var o=t.offset&&"object"==typeof t.offset?t.offset:{};e=function(t,e){var n=document.documentElement.getBoundingClientRect(),r=t.getBoundingClientRect();return{x:r.left-n.left-e.x,y:r.top-n.top-e.y}}(i,o={x:ht((n=o).x)?n.x:0,y:ht(n.y)?n.y:0})}else ut(t)&&(e=lt(t))}else r&&ut(t)&&(e=lt(t));e&&("scrollBehavior"in document.documentElement.style?window.scrollTo({left:e.x,top:e.y,behavior:t.behavior}):window.scrollTo(e.x,e.y))}var pt,mt=Y&&((-1===(pt=window.navigator.userAgent).indexOf("Android 2.")&&-1===pt.indexOf("Android 4.0")||-1===pt.indexOf("Mobile Safari")||-1!==pt.indexOf("Chrome")||-1!==pt.indexOf("Windows Phone"))&&window.history&&"function"==typeof window.history.pushState);function gt(t,e){st();var n=window.history;try{if(e){var i=r({},n.state);i.key=nt(),n.replaceState(i,"",t)}else n.pushState({key:rt(tt())},"",t)}catch(n){window.location[e?"replace":"assign"](t)}}function vt(t){gt(t,!0)}function yt(t,e,n){var r=function(i){i>=t.length?n():t[i]?e(t[i],(function(){r(i+1)})):r(i+1)};r(0)}var _t={redirected:2,aborted:4,cancelled:8,duplicated:16};function xt(t,e){return wt(t,e,_t.redirected,'Redirected when going from "'+t.fullPath+'" to "'+function(t){if("string"==typeof t)return t;if("path"in t)return t.path;var e={};return Mt.forEach((function(n){n in t&&(e[n]=t[n])})),JSON.stringify(e,null,2)}(e)+'" via a navigation guard.')}function bt(t,e){return wt(t,e,_t.cancelled,'Navigation cancelled from "'+t.fullPath+'" to "'+e.fullPath+'" with a new navigation.')}function wt(t,e,n,r){var i=new Error(r);return i._isRouter=!0,i.from=t,i.to=e,i.type=n,i}var Mt=["params","query","hash"];function St(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function Tt(t,e){return St(t)&&t._isRouter&&(null==e||t.type===e)}function Et(t){return function(e,n,r){var i=!1,o=0,a=null;Ct(t,(function(t,e,n,s){if("function"==typeof t&&void 0===t.cid){i=!0,o++;var c,u=Lt((function(e){var i;((i=e).__esModule||Pt&&"Module"===i[Symbol.toStringTag])&&(e=e.default),t.resolved="function"==typeof e?e:V.extend(e),n.components[s]=e,--o<=0&&r()})),l=Lt((function(t){var e="Failed to resolve async component "+s+": "+t;a||(a=St(t)?t:new Error(e),r(a))}));try{c=t(u,l)}catch(t){l(t)}if(c)if("function"==typeof c.then)c.then(u,l);else{var h=c.component;h&&"function"==typeof h.then&&h.then(u,l)}}})),i||r()}}function Ct(t,e){return At(t.map((function(t){return Object.keys(t.components).map((function(n){return e(t.components[n],t.instances[n],t,n)}))})))}function At(t){return Array.prototype.concat.apply([],t)}var Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Lt(t){var e=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var Rt=function(t,e){this.router=t,this.base=function(t){if(!t)if(Y){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=m,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function Ot(t,e,n,r){var i=Ct(t,(function(t,r,i,o){var a=function(t,e){"function"!=typeof t&&(t=V.extend(t));return t.options[e]}(t,e);if(a)return Array.isArray(a)?a.map((function(t){return n(t,r,i,o)})):n(a,r,i,o)}));return At(r?i.reverse():i)}function kt(t,e){if(e)return function(){return t.apply(e,arguments)}}Rt.prototype.listen=function(t){this.cb=t},Rt.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},Rt.prototype.onError=function(t){this.errorCbs.push(t)},Rt.prototype.transitionTo=function(t,e,n){var r,i=this;try{r=this.router.match(t,this.current)}catch(t){throw this.errorCbs.forEach((function(e){e(t)})),t}var o=this.current;this.confirmTransition(r,(function(){i.updateRoute(r),e&&e(r),i.ensureURL(),i.router.afterHooks.forEach((function(t){t&&t(r,o)})),i.ready||(i.ready=!0,i.readyCbs.forEach((function(t){t(r)})))}),(function(t){n&&n(t),t&&!i.ready&&(Tt(t,_t.redirected)&&o===m||(i.ready=!0,i.readyErrorCbs.forEach((function(e){e(t)}))))}))},Rt.prototype.confirmTransition=function(t,e,n){var r=this,i=this.current;this.pending=t;var o,a,s=function(t){!Tt(t)&&St(t)&&(r.errorCbs.length?r.errorCbs.forEach((function(e){e(t)})):console.error(t)),n&&n(t)},c=t.matched.length-1,u=i.matched.length-1;if(y(t,i)&&c===u&&t.matched[c]===i.matched[u])return this.ensureURL(),s(((a=wt(o=i,t,_t.duplicated,'Avoided redundant navigation to current location: "'+o.fullPath+'".')).name="NavigationDuplicated",a));var l=function(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n<r&&t[n]===e[n];n++);return{updated:e.slice(0,n),activated:e.slice(n),deactivated:t.slice(n)}}(this.current.matched,t.matched),h=l.updated,f=l.deactivated,d=l.activated,p=[].concat(function(t){return Ot(t,"beforeRouteLeave",kt,!0)}(f),this.router.beforeHooks,function(t){return Ot(t,"beforeRouteUpdate",kt)}(h),d.map((function(t){return t.beforeEnter})),Et(d)),m=function(e,n){if(r.pending!==t)return s(bt(i,t));try{e(t,i,(function(e){!1===e?(r.ensureURL(!0),s(function(t,e){return wt(t,e,_t.aborted,'Navigation aborted from "'+t.fullPath+'" to "'+e.fullPath+'" via a navigation guard.')}(i,t))):St(e)?(r.ensureURL(!0),s(e)):"string"==typeof e||"object"==typeof e&&("string"==typeof e.path||"string"==typeof e.name)?(s(xt(i,t)),"object"==typeof e&&e.replace?r.replace(e):r.push(e)):n(e)}))}catch(t){s(t)}};yt(p,m,(function(){yt(function(t){return Ot(t,"beforeRouteEnter",(function(t,e,n,r){return function(t,e,n){return function(r,i,o){return t(r,i,(function(t){"function"==typeof t&&(e.enteredCbs[n]||(e.enteredCbs[n]=[]),e.enteredCbs[n].push(t)),o(t)}))}}(t,n,r)}))}(d).concat(r.router.resolveHooks),m,(function(){if(r.pending!==t)return s(bt(i,t));r.pending=null,e(t),r.router.app&&r.router.app.$nextTick((function(){x(t)}))}))}))},Rt.prototype.updateRoute=function(t){this.current=t,this.cb&&this.cb(t)},Rt.prototype.setupListeners=function(){},Rt.prototype.teardown=function(){this.listeners.forEach((function(t){t()})),this.listeners=[],this.current=m,this.pending=null};var It=function(t){function e(e,n){t.call(this,e,n),this._startLocation=Dt(this.base)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router,n=e.options.scrollBehavior,r=mt&&n;r&&this.listeners.push(ot());var i=function(){var n=t.current,i=Dt(t.base);t.current===m&&i===t._startLocation||t.transitionTo(i,(function(t){r&&at(e,t,n,!0)}))};window.addEventListener("popstate",i),this.listeners.push((function(){window.removeEventListener("popstate",i)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,(function(t){gt(S(r.base+t.fullPath)),at(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,(function(t){vt(S(r.base+t.fullPath)),at(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.ensureURL=function(t){if(Dt(this.base)!==this.current.fullPath){var e=S(this.base+this.current.fullPath);t?gt(e):vt(e)}},e.prototype.getCurrentLocation=function(){return Dt(this.base)},e}(Rt);function Dt(t){var e=window.location.pathname;return t&&0===e.toLowerCase().indexOf(t.toLowerCase())&&(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var jt=function(t){function e(e,n,r){t.call(this,e,n),r&&function(t){var e=Dt(t);if(!/^\/#/.test(e))return window.location.replace(S(t+"/#"+e)),!0}(this.base)||zt()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router.options.scrollBehavior,n=mt&&e;n&&this.listeners.push(ot());var r=function(){var e=t.current;zt()&&t.transitionTo(Nt(),(function(r){n&&at(t.router,r,e,!0),mt||Ht(r.fullPath)}))},i=mt?"popstate":"hashchange";window.addEventListener(i,r),this.listeners.push((function(){window.removeEventListener(i,r)}))}},e.prototype.push=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,(function(t){Bt(t.fullPath),at(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,(function(t){Ht(t.fullPath),at(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;Nt()!==e&&(t?Bt(e):Ht(e))},e.prototype.getCurrentLocation=function(){return Nt()},e}(Rt);function zt(){var t=Nt();return"/"===t.charAt(0)||(Ht("/"+t),!1)}function Nt(){var t=window.location.href,e=t.indexOf("#");return e<0?"":t=t.slice(e+1)}function Ft(t){var e=window.location.href,n=e.indexOf("#");return(n>=0?e.slice(0,n):e)+"#"+t}function Bt(t){mt?gt(Ft(t)):window.location.hash=t}function Ht(t){mt?vt(Ft(t)):window.location.replace(Ft(t))}var Gt=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)}),n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var t=e.current;e.index=n,e.updateRoute(r),e.router.afterHooks.forEach((function(e){e&&e(r,t)}))}),(function(t){Tt(t,_t.duplicated)&&(e.index=n)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Rt),Ut=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=$(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!mt&&!1!==t.fallback,this.fallback&&(e="hash"),Y||(e="abstract"),this.mode=e,e){case"history":this.history=new It(this,t.base);break;case"hash":this.history=new jt(this,t.base,this.fallback);break;case"abstract":this.history=new Gt(this,t.base);break;default:0}},Vt={currentRoute:{configurable:!0}};function Wt(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}Ut.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},Vt.currentRoute.get=function(){return this.history&&this.history.current},Ut.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()})),!this.app){this.app=t;var n=this.history;if(n instanceof It||n instanceof jt){var r=function(t){n.setupListeners(),function(t){var r=n.current,i=e.options.scrollBehavior;mt&&i&&"fullPath"in t&&at(e,t,r,!1)}(t)};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},Ut.prototype.beforeEach=function(t){return Wt(this.beforeHooks,t)},Ut.prototype.beforeResolve=function(t){return Wt(this.resolveHooks,t)},Ut.prototype.afterEach=function(t){return Wt(this.afterHooks,t)},Ut.prototype.onReady=function(t,e){this.history.onReady(t,e)},Ut.prototype.onError=function(t){this.history.onError(t)},Ut.prototype.push=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.push(t,e,n)}));this.history.push(t,e,n)},Ut.prototype.replace=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.replace(t,e,n)}));this.history.replace(t,e,n)},Ut.prototype.go=function(t){this.history.go(t)},Ut.prototype.back=function(){this.go(-1)},Ut.prototype.forward=function(){this.go(1)},Ut.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},Ut.prototype.resolve=function(t,e,n){var r=U(t,e=e||this.history.current,n,this),i=this.match(r,e),o=i.redirectedFrom||i.fullPath;return{location:r,route:i,href:function(t,e,n){var r="hash"===n?"#"+e:e;return t?S(t+"/"+r):r}(this.history.base,o,this.mode),normalizedTo:r,resolved:i}},Ut.prototype.getRoutes=function(){return this.matcher.getRoutes()},Ut.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},Ut.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Ut.prototype,Vt),Ut.install=function t(e){if(!t.installed||V!==e){t.installed=!0,V=e;var n=function(t){return void 0!==t},r=function(t,e){var r=t.$options._parentVnode;n(r)&&n(r=r.data)&&n(r=r.registerRouteInstance)&&r(t,e)};e.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),e.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(e.prototype,"$route",{get:function(){return this._routerRoot._route}}),e.component("RouterView",b),e.component("RouterLink",Z);var i=e.config.optionMergeStrategies;i.beforeRouteEnter=i.beforeRouteLeave=i.beforeRouteUpdate=i.created}},Ut.version="3.5.1",Ut.isNavigationFailure=Tt,Ut.NavigationFailureType=_t,Ut.START_LOCATION=m,Y&&window.Vue&&window.Vue.use(Ut),e.default=Ut},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pkRouter=e.routerInit=void 0;var r,i=n(123),o=(r=i)&&r.__esModule?r:{default:r};e.routerInit=function(t){var e=t.prototype.push,n=t.prototype.replace;t.prototype.push=function(t,n,r){return n||r?e.call(this,t,n,r):e.call(this,t).catch((function(t){return t}))},t.prototype.replace=function(t,e,r){return e||r?n.call(this,t,e,r):n.call(this,t).catch((function(t){return t}))};var r=a(t);return s(r),r};var a=e.pkRouter=function(t){var e=function(){return new t({mode:"history",routes:[{path:"/404",component:o.default}],scrollBehavior:function(t,e,n){return n||{x:0,y:0}}})},n=e(),r=e();return n.matcher=r.matcher,n},s=function(t){t.onError((function(e){console.log("\n *************************ROUTER ERROR BEGIN**********************************\n\n "+e+"\n\n *************************ROUTER ERROR FINAL**********************************\n ");var n=e.message.match(/Loading chunk (\w)+ failed/g),r=t.history.pending.fullPath;n&&t.replace(r).then()}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={render:function(){var t=arguments[0];return t("a-result",{attrs:{status:"404",title:"404","sub-title":"Sorry, the page you visited does not exist."}},[t("a-button",{attrs:{type:"primary"},slot:"extra",on:{click:this.toHome}},["Back Home"])])},methods:{toHome:function(){return this.$router.replace({path:"/"}),!1}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MENU_LIST=void 0;var r=c(n(48)),i=c(n(49)),o=c(n(50)),a=n(9),s=n(16);function c(t){return t&&t.__esModule?t:{default:t}}var u=e.MENU_LIST="menuList",l={namespaced:!0,state:{menu_list:a.localStore.get(u)||[],addRouters:[],appRouters:[],appCurrentHeader:{},currentMap:{},navIndex:0,timeStamp:{}},mutations:{SET_MENU_LIST:function(t,e){t.menu_list=e},SET_ROUTERS:function(t,e){t.addRouters=e},SET_APP_ROUTERS:function(t,e){t.appRouters=e},SET_APP_CURRENT_HEADER:function(t,e){t.appCurrentHeader=e},SET_CURRENT_MAP:function(t,e){t.currentMap=e},SET_NAV_INDEX:function(t,e){t.navIndex=e},SET_TIME_STAMP:function(t,e){t.timeStamp=e}},actions:{appRouters:function(t,e){(0,t.commit)("SET_ROUTERS",e)},GetUserInfo:function(t,e){var n,c=this,l=t.commit;return new o.default((n=(0,i.default)(r.default.mark((function t(n,i){var o,h,f,d,p,m,g,v;return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,s.getUserInfo)(e);case 2:o=t.sent,h=o.data,f=h.id,d=h.phone,p=h.consumer,m=h.menuList,g=h.userName,m||(i({message:"获取菜单失败,请重新登录"}),a.localStore.clearAll(),window.open(sessionStorage.getItem("IAM_BASE_URL")+"/iam/v1/oauth/logout?redirect_uri="+window.origin,"_self")),a.localStore.set(u,m),l("SET_MENU_LIST",m),v={userId:f,userName:g,phone:d},a.localStore.set("userMessage",v),a.localStore.set("consumer",p),a.localStore.set("userName",g),a.localStore.set("currentProject",{id:p.id,name:p.name,regionId:p.regionId}),o.data.consumerExtList&&a.localStore.set("consumerExtList",o.data.consumerExtList),n(m);case 14:case"end":return t.stop()}}),t,c)}))),function(t,e){return n.apply(this,arguments)}))},LogOut:function(t){var e=t.commit;a.localStore.clearAll(),e("SET_MENU_LIST",[]),e("SET_ROUTERS",[]),window.open(sessionStorage.getItem("IAM_BASE_URL")+"/iam/v1/oauth/logout?redirect_uri="+window.origin,"_self")}}};e.default=l},function(t,e,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(126),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";var n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag",c="object"==typeof t,u=e.regeneratorRuntime;if(u)c&&(t.exports=u);else{(u=e.regeneratorRuntime=c?t.exports:{}).wrap=m;var l={},h={};h[o]=function(){return this};var f=Object.getPrototypeOf,d=f&&f(f(E([])));d&&d!==n&&r.call(d,o)&&(h=d);var p=_.prototype=v.prototype=Object.create(h);y.prototype=p.constructor=_,_.constructor=y,_[s]=y.displayName="GeneratorFunction",u.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},u.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(p),t},u.awrap=function(t){return{__await:t}},x(b.prototype),b.prototype[a]=function(){return this},u.AsyncIterator=b,u.async=function(t,e,n,r){var i=new b(m(t,e,n,r));return u.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},x(p),p[s]="Generator",p[o]=function(){return this},p.toString=function(){return"[object Generator]"},u.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},u.values=E,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}}}function m(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,o=Object.create(i.prototype),a=new T(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=g(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,a),o}function g(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function v(){}function y(){}function _(){}function x(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function b(t){var e;this._invoke=function(n,i){function o(){return new Promise((function(e,o){!function e(n,i,o,a){var s=g(t[n],t,i);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?Promise.resolve(u.__await).then((function(t){e("next",t,o,a)}),(function(t){e("throw",t,o,a)})):Promise.resolve(u).then((function(t){c.value=t,o(c)}),a)}a(s.arg)}(n,i,e,o)}))}return e=e?e.then(o,o):o()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=g(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function M(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(M,this),this.reset(!0)}function E(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}}(function(){return this}()||Function("return this")())},function(t,e,n){n(128),n(28),n(52),n(138),n(146),n(147),t.exports=n(0).Promise},function(t,e){},function(t,e,n){var r=n(41),i=n(39);t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):o:t?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}}},function(t,e,n){t.exports=n(11)},function(t,e,n){"use strict";var r=n(132),i=n(45),o=n(51),a={};n(11)(a,n(3)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(7),i=n(133),o=n(70),a=n(42)("IE_PROTO"),s=function(){},c=function(){var t,e=n(44)("iframe"),r=o.length;for(e.style.display="none",n(72).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[o[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=c(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(12),i=n(7),o=n(22);t.exports=n(8)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,c=0;s>c;)r.f(t,n=a[c++],e[n]);return t}},function(t,e,n){var r=n(23),i=n(21),o=n(42)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){"use strict";var r=n(136),i=n(137),o=n(13),a=n(24);t.exports=n(71)(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r,i,o,a,s=n(43),c=n(2),u=n(17),l=n(53),h=n(4),f=n(18),d=n(26),p=n(139),m=n(140),g=n(75),v=n(76).set,y=n(142)(),_=n(55),x=n(77),b=n(143),w=n(78),M=c.TypeError,S=c.process,T=S&&S.versions,E=T&&T.v8||"",C=c.Promise,A="process"==l(S),P=function(){},L=i=_.f,R=!!function(){try{var t=C.resolve(1),e=(t.constructor={})[n(3)("species")]=function(t){t(P,P)};return(A||"function"==typeof PromiseRejectionEvent)&&t.then(P)instanceof e&&0!==E.indexOf("6.6")&&-1===b.indexOf("Chrome/66")}catch(t){}}(),O=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},k=function(t,e){if(!t._n){t._n=!0;var n=t._c;y((function(){for(var r=t._v,i=1==t._s,o=0,a=function(e){var n,o,a,s=i?e.ok:e.fail,c=e.resolve,u=e.reject,l=e.domain;try{s?(i||(2==t._h&&j(t),t._h=1),!0===s?n=r:(l&&l.enter(),n=s(r),l&&(l.exit(),a=!0)),n===e.promise?u(M("Promise-chain cycle")):(o=O(n))?o.call(n,c,u):c(n)):u(r)}catch(t){l&&!a&&l.exit(),u(t)}};n.length>o;)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&I(t)}))}},I=function(t){v.call(c,(function(){var e,n,r,i=t._v,o=D(t);if(o&&(e=x((function(){A?S.emit("unhandledRejection",i,t):(n=c.onunhandledrejection)?n({promise:t,reason:i}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",i)})),t._h=A||D(t)?2:1),t._a=void 0,o&&e.e)throw e.v}))},D=function(t){return 1!==t._h&&0===(t._a||t._c).length},j=function(t){v.call(c,(function(){var e;A?S.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})}))},z=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),k(e,!0))},N=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw M("Promise can't be resolved itself");(e=O(t))?y((function(){var r={_w:n,_d:!1};try{e.call(t,u(N,r,1),u(z,r,1))}catch(t){z.call(r,t)}})):(n._v=t,n._s=1,k(n,!1))}catch(t){z.call({_w:n,_d:!1},t)}}};R||(C=function(t){p(this,C,"Promise","_h"),d(t),r.call(this);try{t(u(N,this,1),u(z,this,1))}catch(t){z.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(144)(C.prototype,{then:function(t,e){var n=L(g(this,C));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=A?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&k(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=u(N,t,1),this.reject=u(z,t,1)},_.f=L=function(t){return t===C||t===a?new o(t):i(t)}),h(h.G+h.W+h.F*!R,{Promise:C}),n(51)(C,"Promise"),n(145)("Promise"),a=n(0).Promise,h(h.S+h.F*!R,"Promise",{reject:function(t){var e=L(this);return(0,e.reject)(t),e.promise}}),h(h.S+h.F*(s||!R),"Promise",{resolve:function(t){return w(s&&this===a?C:this,t)}}),h(h.S+h.F*!(R&&n(79)((function(t){C.all(t).catch(P)}))),"Promise",{all:function(t){var e=this,n=L(e),r=n.resolve,i=n.reject,o=x((function(){var n=[],o=0,a=1;m(t,!1,(function(t){var s=o++,c=!1;n.push(void 0),a++,e.resolve(t).then((function(t){c||(c=!0,n[s]=t,--a||r(n))}),i)})),--a||r(n)}));return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=L(e),r=n.reject,i=x((function(){m(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(17),i=n(73),o=n(74),a=n(7),s=n(40),c=n(54),u={},l={};(e=t.exports=function(t,e,n,h,f){var d,p,m,g,v=f?function(){return t}:c(t),y=r(n,h,e?2:1),_=0;if("function"!=typeof v)throw TypeError(t+" is not iterable!");if(o(v)){for(d=s(t.length);d>_;_++)if((g=e?y(a(p=t[_])[0],p[1]):y(t[_]))===u||g===l)return g}else for(m=v.call(t);!(p=m.next()).done;)if((g=i(m,y,p.value,e))===u||g===l)return g}).BREAK=u,e.RETURN=l},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(2),i=n(76).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n(25)(a);t.exports=function(){var t,e,n,u=function(){var r,i;for(c&&(r=a.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var l=s.resolve(void 0);n=function(){l.then(u)}}else n=function(){i.call(r,u)};else{var h=!0,f=document.createTextNode("");new o(u).observe(f,{characterData:!0}),n=function(){f.data=h=!h}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e,n){var r=n(2).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){var r=n(11);t.exports=function(t,e,n){for(var i in e)n&&t[i]?t[i]=e[i]:r(t,i,e[i]);return t}},function(t,e,n){"use strict";var r=n(2),i=n(0),o=n(12),a=n(8),s=n(3)("species");t.exports=function(t){var e="function"==typeof i[t]?i[t]:r[t];a&&e&&!e[s]&&o.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){"use strict";var r=n(4),i=n(0),o=n(2),a=n(75),s=n(78);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,i.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then((function(){return n}))}:t,n?function(n){return s(e,t()).then((function(){throw n}))}:t)}})},function(t,e,n){"use strict";var r=n(4),i=n(55),o=n(77);r(r.S,"Promise",{try:function(t){var e=i.f(this),n=o(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){t.exports=[n(82),n(149),n(150),n(83),n(84),n(151)]},function(t,e,n){var r=n(14).Global;t.exports={name:"oldFF-globalStorage",read:function(t){return i[t]},write:function(t,e){i[t]=e},each:o,remove:function(t){return i.removeItem(t)},clearAll:function(){o((function(t,e){delete i[t]}))}};var i=r.globalStorage;function o(t){for(var e=i.length-1;e>=0;e--){var n=i.key(e);t(i[n],n)}}},function(t,e,n){var r=n(14).Global;t.exports={name:"oldIE-userDataStorage",write:function(t,e){if(a)return;var n=c(t);o((function(t){t.setAttribute(n,e),t.save("storejs")}))},read:function(t){if(a)return;var e=c(t),n=null;return o((function(t){n=t.getAttribute(e)})),n},each:function(t){o((function(e){for(var n=e.XMLDocument.documentElement.attributes,r=n.length-1;r>=0;r--){var i=n[r];t(e.getAttribute(i.name),i.name)}}))},remove:function(t){var e=c(t);o((function(t){t.removeAttribute(e),t.save("storejs")}))},clearAll:function(){o((function(t){var e=t.XMLDocument.documentElement.attributes;t.load("storejs");for(var n=e.length-1;n>=0;n--)t.removeAttribute(e[n].name);t.save("storejs")}))}};var i=r.document,o=function(){if(!i||!i.documentElement||!i.documentElement.addBehavior)return null;var t,e,n;try{(e=new ActiveXObject("htmlfile")).open(),e.write('<script>document.w=window<\/script><iframe src="/favicon.ico"></iframe>'),e.close(),t=e.w.frames[0].document,n=t.createElement("div")}catch(e){n=i.createElement("div"),t=i.body}return function(e){var r=[].slice.call(arguments,0);r.unshift(n),t.appendChild(n),n.addBehavior("#default#userData"),n.load("storejs"),e.apply(this,r),t.removeChild(n)}}(),a=(r.navigator?r.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);var s=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function c(t){return t.replace(/^\d/,"___$&").replace(s,"___")}},function(t,e){t.exports={name:"memoryStorage",read:function(t){return n[t]},write:function(t,e){n[t]=e},each:function(t){for(var e in n)n.hasOwnProperty(e)&&t(n[e],e)},remove:function(t){delete n[t]},clearAll:function(t){n={}}};var n={}},function(t,e,n){t.exports=function(){return n(153),{}}},function(module,exports){"object"!=typeof JSON&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;function f(t){return t<10?"0"+t:t}function this_value(){return this.valueOf()}function quote(t){return rx_escapable.lastIndex=0,rx_escapable.test(t)?'"'+t.replace(rx_escapable,(function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function str(t,e){var n,r,i,o,a,s=gap,c=e[t];switch(c&&"object"==typeof c&&"function"==typeof c.toJSON&&(c=c.toJSON(t)),"function"==typeof rep&&(c=rep.call(e,t,c)),typeof c){case"string":return quote(c);case"number":return isFinite(c)?String(c):"null";case"boolean":case"null":return String(c);case"object":if(!c)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(c)){for(o=c.length,n=0;n<o;n+=1)a[n]=str(n,c)||"null";return i=0===a.length?"[]":gap?"[\n"+gap+a.join(",\n"+gap)+"\n"+s+"]":"["+a.join(",")+"]",gap=s,i}if(rep&&"object"==typeof rep)for(o=rep.length,n=0;n<o;n+=1)"string"==typeof rep[n]&&(i=str(r=rep[n],c))&&a.push(quote(r)+(gap?": ":":")+i);else for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(i=str(r,c))&&a.push(quote(r)+(gap?": ":":")+i);return i=0===a.length?"{}":gap?"{\n"+gap+a.join(",\n"+gap)+"\n"+s+"}":"{"+a.join(",")+"}",gap=s,i}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value),"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(t,e,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;r<n;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=e,e&&"function"!=typeof e&&("object"!=typeof e||"number"!=typeof e.length))throw new Error("JSON.stringify");return str("",{"":t})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){var j;function walk(t,e){var n,r,i=t[e];if(i&&"object"==typeof i)for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(void 0!==(r=walk(i,n))?i[n]=r:delete i[n]);return reviver.call(t,e,i)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,(function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},function(t,e){t.exports=function(){var t=this.createStore(this.storage,null,this._namespacePrefix+"expire_mixin");return{set:function(e,n,r,i){this.hasNamespace("expire_mixin")||t.set(n,i);return e()},get:function(t,n){this.hasNamespace("expire_mixin")||e.call(this,n);return t()},remove:function(e,n){this.hasNamespace("expire_mixin")||t.remove(n);return e()},getExpiration:function(e,n){return t.get(n)},removeExpiredKeys:function(t){var n=[];this.each((function(t,e){n.push(e)}));for(var r=0;r<n.length;r++)e.call(this,n[r])}};function e(e){t.get(e,Number.MAX_VALUE)<=(new Date).getTime()&&(this.raw.remove(e),t.remove(e))}}},function(t,e,n){t.exports={default:n(156),__esModule:!0}},function(t,e,n){n(157),t.exports=n(0).Object.assign},function(t,e,n){var r=n(4);r(r.S+r.F,"Object",{assign:n(158)})},function(t,e,n){"use strict";var r=n(8),i=n(22),o=n(159),a=n(86),s=n(21),c=n(67),u=Object.assign;t.exports=!u||n(27)((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r}))?function(t,e){for(var n=s(t),u=arguments.length,l=1,h=o.f,f=a.f;u>l;)for(var d,p=c(arguments[l++]),m=h?i(p).concat(h(p)):i(p),g=m.length,v=0;g>v;)d=m[v++],r&&!f.call(p,d)||(n[d]=p[d]);return n}:u},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){"use strict";var r=n(1),i=n(88),o=n(161),a=n(95);function s(t){var e=new o(t),n=i(o.prototype.request,e);return r.extend(n,o.prototype,e),r.extend(n,e),n}var c=s(n(56));c.Axios=o,c.create=function(t){return s(a(c.defaults,t))},c.Cancel=n(96),c.CancelToken=n(175),c.isCancel=n(94),c.all=function(t){return Promise.all(t)},c.spread=n(176),c.isAxiosError=n(177),t.exports=c,t.exports.default=c},function(t,e,n){"use strict";var r=n(1),i=n(89),o=n(162),a=n(163),s=n(95),c=n(173),u=c.validators;function l(t){this.defaults=t,this.interceptors={request:new o,response:new o}}l.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=t.transitional;void 0!==e&&c.assertOptions(e,{silentJSONParsing:u.transitional(u.boolean,"1.0.0"),forcedJSONParsing:u.transitional(u.boolean,"1.0.0"),clarifyTimeoutError:u.transitional(u.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(t){o.push(t.fulfilled,t.rejected)})),!r){var l=[a,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(o),i=Promise.resolve(t);l.length;)i=i.then(l.shift(),l.shift());return i}for(var h=t;n.length;){var f=n.shift(),d=n.shift();try{h=f(h)}catch(t){d(t);break}}try{i=a(h)}catch(t){return Promise.reject(t)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},l.prototype.getUri=function(t){return t=s(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){l.prototype[t]=function(e,n){return this.request(s(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){l.prototype[t]=function(e,n,r){return this.request(s(r||{},{method:t,url:e,data:n}))}})),t.exports=l},function(t,e,n){"use strict";var r=n(1);function i(){this.handlers=[]}i.prototype.use=function(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},function(t,e,n){"use strict";var r=n(1),i=n(164),o=n(94),a=n(56);function s(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return s(t),t.headers=t.headers||{},t.data=i.call(t,t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return s(t),e.data=i.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(s(t),e&&e.response&&(e.response.data=i.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,n){"use strict";var r=n(1),i=n(56);t.exports=function(t,e,n){var o=this||i;return r.forEach(n,(function(n){t=n.call(o,t,e)})),t}},function(t,e,n){"use strict";var r=n(1);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},function(t,e,n){"use strict";var r=n(93);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";var r=n(1);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";var r=n(169),i=n(170);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(1),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,a={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}})),a):a}},function(t,e,n){"use strict";var r=n(1);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r=n(174),i={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){i[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));var o={},a=r.version.split(".");function s(t,e){for(var n=e?e.split("."):a,r=t.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]<r[i])return!1}return!1}i.transitional=function(t,e,n){var i=e&&s(e);function a(t,e){return"[Axios v"+r.version+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,r,s){if(!1===t)throw new Error(a(r," has been removed in "+e));return i&&!o[r]&&(o[r]=!0,console.warn(a(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,s)}},t.exports={isOlderVersion:s,assertOptions:function(t,e,n){if("object"!=typeof t)throw new TypeError("options must be an object");for(var r=Object.keys(t),i=r.length;i-- >0;){var o=r[i],a=e[o];if(a){var s=t[o],c=void 0===s||a(s,o,t);if(!0!==c)throw new TypeError("option "+o+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},function(t){t.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"__npminstall_done":true,"_from":"axios@0.21.4","_resolved":"https://registry.npmmirror.com/axios/download/axios-0.21.4.tgz"}')},function(t,e,n){"use strict";var r=n(96);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},function(t,e,n){"use strict";var r=n(179),i=n(180),o=n(98);t.exports={formats:o,parse:i,stringify:r}},function(t,e,n){"use strict";var r=n(97),i=n(98),o=Object.prototype.hasOwnProperty,a={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},s=Array.isArray,c=Array.prototype.push,u=function(t,e){c.apply(t,s(e)?e:[e])},l=Date.prototype.toISOString,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,formatter:i.formatters[i.default],indices:!1,serializeDate:function(t){return l.call(t)},skipNulls:!1,strictNullHandling:!1},f=function t(e,n,i,o,a,c,l,f,d,p,m,g,v){var y=e;if("function"==typeof l?y=l(n,y):y instanceof Date?y=p(y):"comma"===i&&s(y)&&(y=y.join(",")),null===y){if(o)return c&&!g?c(n,h.encoder,v):n;y=""}if("string"==typeof y||"number"==typeof y||"boolean"==typeof y||r.isBuffer(y))return c?[m(g?n:c(n,h.encoder,v))+"="+m(c(y,h.encoder,v))]:[m(n)+"="+m(String(y))];var _,x=[];if(void 0===y)return x;if(s(l))_=l;else{var b=Object.keys(y);_=f?b.sort(f):b}for(var w=0;w<_.length;++w){var M=_[w];a&&null===y[M]||(s(y)?u(x,t(y[M],"function"==typeof i?i(n,M):n,i,o,a,c,l,f,d,p,m,g,v)):u(x,t(y[M],n+(d?"."+M:"["+M+"]"),i,o,a,c,l,f,d,p,m,g,v)))}return x};t.exports=function(t,e){var n,r=t,c=function(t){if(!t)return h;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||h.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=i.default;if(void 0!==t.format){if(!o.call(i.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var r=i.formatters[n],a=h.filter;return("function"==typeof t.filter||s(t.filter))&&(a=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:h.addQueryPrefix,allowDots:void 0===t.allowDots?h.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:h.charsetSentinel,delimiter:void 0===t.delimiter?h.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:h.encode,encoder:"function"==typeof t.encoder?t.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:h.encodeValuesOnly,filter:a,formatter:r,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:h.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:h.strictNullHandling}}(e);"function"==typeof c.filter?r=(0,c.filter)("",r):s(c.filter)&&(n=c.filter);var l,d=[];if("object"!=typeof r||null===r)return"";l=e&&e.arrayFormat in a?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var p=a[l];n||(n=Object.keys(r)),c.sort&&n.sort(c.sort);for(var m=0;m<n.length;++m){var g=n[m];c.skipNulls&&null===r[g]||u(d,f(r[g],g,p,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.formatter,c.encodeValuesOnly,c.charset))}var v=d.join(c.delimiter),y=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),v.length>0?y+v:""}},function(t,e,n){"use strict";var r=n(97),i=Object.prototype.hasOwnProperty,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},s=function(t,e,n){if(t){var r=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/g,a=/(\[[^[\]]*])/.exec(r),s=a?r.slice(0,a.index):r,c=[];if(s){if(!n.plainObjects&&i.call(Object.prototype,s)&&!n.allowPrototypes)return;c.push(s)}for(var u=0;null!==(a=o.exec(r))&&u<n.depth;){if(u+=1,!n.plainObjects&&i.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;c.push(a[1])}return a&&c.push("["+r.slice(a.index)+"]"),function(t,e,n){for(var r=e,i=t.length-1;i>=0;--i){var o,a=t[i];if("[]"===a&&n.parseArrays)o=[].concat(r);else{o=n.plainObjects?Object.create(null):{};var s="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,c=parseInt(s,10);n.parseArrays||""!==s?!isNaN(c)&&a!==s&&String(c)===s&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(o=[])[c]=r:o[s]=r:o={0:r}}r=o}return r}(c,e,n)}};t.exports=function(t,e){var n=function(t){if(!t)return o;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?o.charset:t.charset;return{allowDots:void 0===t.allowDots?o.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:o.allowPrototypes,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:o.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:o.comma,decoder:"function"==typeof t.decoder?t.decoder:o.decoder,delimiter:"string"==typeof t.delimiter||r.isRegExp(t.delimiter)?t.delimiter:o.delimiter,depth:"number"==typeof t.depth?t.depth:o.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:o.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:o.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:o.strictNullHandling}}(e);if(""===t||null==t)return n.plainObjects?Object.create(null):{};for(var c="string"==typeof t?function(t,e){var n,s={},c=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,u=e.parameterLimit===1/0?void 0:e.parameterLimit,l=c.split(e.delimiter,u),h=-1,f=e.charset;if(e.charsetSentinel)for(n=0;n<l.length;++n)0===l[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===l[n]?f="utf-8":"utf8=%26%2310003%3B"===l[n]&&(f="iso-8859-1"),h=n,n=l.length);for(n=0;n<l.length;++n)if(n!==h){var d,p,m=l[n],g=m.indexOf("]="),v=-1===g?m.indexOf("="):g+1;-1===v?(d=e.decoder(m,o.decoder,f),p=e.strictNullHandling?null:""):(d=e.decoder(m.slice(0,v),o.decoder,f),p=e.decoder(m.slice(v+1),o.decoder,f)),p&&e.interpretNumericEntities&&"iso-8859-1"===f&&(p=a(p)),p&&e.comma&&p.indexOf(",")>-1&&(p=p.split(",")),i.call(s,d)?s[d]=r.combine(s[d],p):s[d]=p}return s}(t,n):t,u=n.plainObjects?Object.create(null):{},l=Object.keys(c),h=0;h<l.length;++h){var f=l[h],d=s(f,c[f],n);u=r.merge(u,d,n)}return r.compact(u)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerPermission=void 0;var r=f(n(19)),i=f(n(48)),o=f(n(49)),a=n(16),s=n(9),c=f(n(182));n(183);var u=n(6),l=n(186),h=n(30);function f(t){return t&&t.__esModule?t:{default:t}}e.registerPermission=function(t,e){var n,r=t.routerInstance,f=t.storeInstance,p=t.basicOptions;r.beforeEach((n=(0,o.default)(i.default.mark((function t(n,o,m){var g,v,y,_;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c.default.start(),n.meta.title&&(g=s.sessionStore.get("SYS_PROJECT_NAME"),document.title=n.meta.title+(g?"-"+g:"")),!s.localStore.get("access_token")){t.next=15;break}if(!f.state.user.addRouters.length){t.next=8;break}d(n,m),t.next=13;break;case 8:return t.next=10,f.dispatch("user/GetUserInfo",{loadAuth:!0,sysCode:s.sessionStore.get("CLIENT_ID")});case 10:v=t.sent,(0,l.setAsyncRoutes)(r,f,v,e,p),m({path:n.fullPath,replace:!0});case 13:t.next=17;break;case 15:y=(0,h.getUrlParam)("code"),(0,u.isEmpty)(y)?window.open(s.sessionStore.get("IAM_BASE_URL")+"/iam/v1/oauth/oauth/authorize?response_type=code&client_id="+s.sessionStore.get("CLIENT_ID")+"&redirect_uri="+window.origin+"&scope=all&state=hello","_self"):(_={code:y,grantType:"authorization_code",redirectUri:window.origin,sysCode:s.sessionStore.get("CLIENT_ID"),sysSecret:s.sessionStore.get("SYS_SECRET")},(0,a.getToken)(_).then((function(t){if(t.data){var e=t.data,r=e.access_token,i=e.refresh_token;s.localStore.set("access_token",r),s.localStore.set("code",y),s.localStore.set("refresh_token",i),m({path:n.fullPath,replace:!0})}})));case 17:case"end":return t.stop()}}),t,void 0)}))),function(t,e,r){return n.apply(this,arguments)})),r.afterEach((function(t){c.default.done()}))};var d=function(t,e){var n=s.localStore.get("test_project");n?t.query.shopId?e():e({path:t.path,query:(0,r.default)({},t.query,{shopId:n.shopId,noLogin:!0,flag:n.flag})}):e()}},function(t,e,n){var r,i;
|
|
52
|
+
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
|
53
|
+
* @license MIT */void 0===(i="function"==typeof(r=function(){var t,e,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function i(t,e,n){return t<e?e:t>n?n:t}function o(t){return 100*(-1+t)}n.configure=function(t){var e,n;for(e in t)void 0!==(n=t[e])&&t.hasOwnProperty(e)&&(r[e]=n);return this},n.status=null,n.set=function(t){var e=n.isStarted();t=i(t,r.minimum,1),n.status=1===t?null:t;var c=n.render(!e),u=c.querySelector(r.barSelector),l=r.speed,h=r.easing;return c.offsetWidth,a((function(e){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(u,function(t,e,n){var i;return(i="translate3d"===r.positionUsing?{transform:"translate3d("+o(t)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(t)+"%,0)"}:{"margin-left":o(t)+"%"}).transition="all "+e+"ms "+n,i}(t,l,h)),1===t?(s(c,{transition:"none",opacity:1}),c.offsetWidth,setTimeout((function(){s(c,{transition:"all "+l+"ms linear",opacity:0}),setTimeout((function(){n.remove(),e()}),l)}),l)):setTimeout(e,l)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var t=function(){setTimeout((function(){n.status&&(n.trickle(),t())}),r.trickleSpeed)};return r.trickle&&t(),this},n.done=function(t){return t||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(t){var e=n.status;return e?("number"!=typeof t&&(t=(1-e)*i(Math.random()*e,.1,.95)),e=i(e+t,0,.994),n.set(e)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},t=0,e=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===e&&n.start(),t++,e++,r.always((function(){0==--e?(t=0,n.done()):n.set((t-e)/t)})),this):this},n.render=function(t){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var e=document.createElement("div");e.id="nprogress",e.innerHTML=r.template;var i,a=e.querySelector(r.barSelector),c=t?"-100":o(n.status||0),l=document.querySelector(r.parent);return s(a,{transition:"all 0 linear",transform:"translate3d("+c+"%,0,0)"}),r.showSpinner||(i=e.querySelector(r.spinnerSelector))&&f(i),l!=document.body&&u(l,"nprogress-custom-parent"),l.appendChild(e),e},n.remove=function(){l(document.documentElement,"nprogress-busy"),l(document.querySelector(r.parent),"nprogress-custom-parent");var t=document.getElementById("nprogress");t&&f(t)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var t=document.body.style,e="WebkitTransform"in t?"Webkit":"MozTransform"in t?"Moz":"msTransform"in t?"ms":"OTransform"in t?"O":"";return e+"Perspective"in t?"translate3d":e+"Transform"in t?"translate":"margin"};var a=function(){var t=[];function e(){var n=t.shift();n&&n(e)}return function(n){t.push(n),1==t.length&&e()}}(),s=function(){var t=["Webkit","O","Moz","ms"],e={};function n(n){return n=n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(t,e){return e.toUpperCase()})),e[n]||(e[n]=function(e){var n=document.body.style;if(e in n)return e;for(var r,i=t.length,o=e.charAt(0).toUpperCase()+e.slice(1);i--;)if((r=t[i]+o)in n)return r;return e}(n))}function r(t,e,r){e=n(e),t.style[e]=r}return function(t,e){var n,i,o=arguments;if(2==o.length)for(n in e)void 0!==(i=e[n])&&e.hasOwnProperty(n)&&r(t,n,i);else r(t,o[1],o[2])}}();function c(t,e){return("string"==typeof t?t:h(t)).indexOf(" "+e+" ")>=0}function u(t,e){var n=h(t),r=n+e;c(n,e)||(t.className=r.substring(1))}function l(t,e){var n,r=h(t);c(t,e)&&(n=r.replace(" "+e+" "," "),t.className=n.substring(1,n.length-1))}function h(t){return(" "+(t.className||"")+" ").replace(/\s+/gi," ")}function f(t){t&&t.parentNode&&t.parentNode.removeChild(t)}return n})?r.call(e,n,e,t):r)||(t.exports=i)},function(t,e,n){(e=n(184)(!1)).push([t.i,"/* Make clicks pass-through */\n#nprogress {\n pointer-events: none;\n}\n\n#nprogress .bar {\n background: #29d;\n\n position: fixed;\n z-index: 1031;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 2px;\n}\n\n/* Fancy blur effect */\n#nprogress .peg {\n display: block;\n position: absolute;\n right: 0px;\n width: 100px;\n height: 100%;\n box-shadow: 0 0 10px #29d, 0 0 5px #29d;\n opacity: 1.0;\n\n -webkit-transform: rotate(3deg) translate(0px, -4px);\n -ms-transform: rotate(3deg) translate(0px, -4px);\n transform: rotate(3deg) translate(0px, -4px);\n}\n\n/* Remove these to get rid of the spinner */\n#nprogress .spinner {\n display: block;\n position: fixed;\n z-index: 1031;\n top: 15px;\n right: 15px;\n}\n\n#nprogress .spinner-icon {\n width: 18px;\n height: 18px;\n box-sizing: border-box;\n\n border: solid 2px transparent;\n border-top-color: #29d;\n border-left-color: #29d;\n border-radius: 50%;\n\n -webkit-animation: nprogress-spinner 400ms linear infinite;\n animation: nprogress-spinner 400ms linear infinite;\n}\n\n.nprogress-custom-parent {\n overflow: hidden;\n position: relative;\n}\n\n.nprogress-custom-parent #nprogress .spinner,\n.nprogress-custom-parent #nprogress .bar {\n position: absolute;\n}\n\n@-webkit-keyframes nprogress-spinner {\n 0% { -webkit-transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); }\n}\n@keyframes nprogress-spinner {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n",""]),t.exports=e},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=(a=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(c," */")),o=r.sources.map((function(t){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(t," */")}));return[n].concat(o).concat([i]).join("\n")}var a,s,c;return[n].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(r)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(i[a]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);r&&i[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setAsyncRoutes=e.getAsyncRoutes=void 0;c(n(29));var r=c(n(19)),i=n(30),o=c(n(202)),a=n(6),s=c(n(222));function c(t){return t&&t.__esModule?t:{default:t}}var u=e.getAsyncRoutes=function t(e,n,s,c,u){return e.map((function(e){var l={path:e.data.path,name:e.data.id,meta:(0,r.default)({require:!0,title:e.data.name,groupName:n?n.name:null},e.data),type:e.data.type};if((0,a.isEmpty)(e.data.layout)?1!==e.data.type&&3!==e.data.type||(l.component=u.loadView?u.loadView(e.data.path):(0,i.loadView)(e.data.path,u.routerPathPrefix,u.routerContext)):l.component=o.default[e.data.layout],l.props={router:s,store:c},l.path.startsWith("http")||(l.path=l.path.replace("//","/")),e.children&&e.children.length){var h=e.children.findIndex((function(t){return 1===t.data.type}));h>-1&&(l.redirect=""+e.children[h].data.path),l.children=t(e.children,l,s,c,u)}return l}))};e.setAsyncRoutes=function(t,e,n,r,a){var c=function(t){var e=new s.default;!function t(n,r){n.forEach((function(n){e.add(n,r,e.traverseBF),n.childMenuList&&t(n.childMenuList,n)}))}(t);return function t(n,r){n.forEach((function(n){n.subType&&(e.remove(n,r,e.traverseBF),e.traverseDF((function(t){t.data.id===r.parentId&&e.add(n,t.data,e.traverseBF)}))),n.childMenuList&&t(n.childMenuList,n)}))}(t),e}(function t(e,n){return e.filter((function(e){return!!e.path&&(e.keys=n+1,e.childMenuList&&(e.childMenuList=t(e.childMenuList,e.keys)),!0)}))}(n,0))._root;if("BlankLayout"===c.data.layout&&c.children.length&&c.children.length>0){var l=c.children.map((function(n){var r=u([n],null,t,e,a)[0];return console.log(r),{path:r.path,redirect:r.children[0].path,children:r.children,component:r.component?r.component:o.default.BlankLayout,props:{router:t,store:e}}})),h=[{path:"/",redirect:l[0].path,children:l,component:o.default.BlankLayout,props:{router:t,store:e}}];t.addRoutes([].concat(h,[i.notFoundRouter])),e.commit("user/SET_ROUTERS",[h[0].children[0]]),e.commit("user/SET_APP_ROUTERS",h)}else{var f=u(c,null,t,e,a),d=[{path:"/",redirect:f[0].redirect,children:f[0].children,component:f[0].component?f[0].component:o.default.BlankLayout,props:{router:t,store:e}}];t.addRoutes([].concat(d,[i.notFoundRouter])),e.commit("user/SET_ROUTERS",d)}return t}},function(t,e,n){n(52),n(28),t.exports=n(188)},function(t,e,n){var r=n(7),i=n(54);t.exports=n(0).getIterator=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},function(t,e,n){t.exports={default:n(190),__esModule:!0}},function(t,e,n){n(191),t.exports=n(0).Object.entries},function(t,e,n){var r=n(4),i=n(99)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,e,n){"use strict";e.__esModule=!0;var r=o(n(193)),i=o(n(29));function o(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e){if(Array.isArray(t))return t;if((0,r.default)(Object(t)))return function(t,e){var n=[],r=!0,o=!1,a=void 0;try{for(var s,c=(0,i.default)(t);!(r=(s=c.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){o=!0,a=t}finally{try{!r&&c.return&&c.return()}finally{if(o)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(t,e,n){t.exports={default:n(194),__esModule:!0}},function(t,e,n){n(52),n(28),t.exports=n(195)},function(t,e,n){var r=n(53),i=n(3)("iterator"),o=n(13);t.exports=n(0).isIterable=function(t){var e=Object(t);return void 0!==e[i]||"@@iterator"in e||o.hasOwnProperty(r(e))}},function(t,e,n){var r=n(31),i=n(200),o=n(33),a=Function.prototype,s=Object.prototype,c=a.toString,u=s.hasOwnProperty,l=c.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=u.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(15))},function(t,e,n){var r=n(32),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r=n(201)(Object.getPrototypeOf,Object);t.exports=r},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=h(n(203)),i=h(n(215)),o=h(n(216)),a=h(n(217)),s=h(n(218)),c=h(n(220)),u=h(n(221)),l=h(n(34));function h(t){return t&&t.__esModule?t:{default:t}}e.default={MapNavLayout:r.default,BasicLayout:i.default,MapWrapper:o.default,NoSidebarWrapper:a.default,SidebarWrapper:s.default,AdminLayout:c.default,FullHeaderLayout:u.default,BlankLayout:l.default}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(n(10)),i=n(5),o=c(n(100)),a=c(n(59)),s=n(60);c(s);function c(t){return t&&t.__esModule?t:{default:t}}e.default={name:"MapNavLayout",inject:["slotsList","propsList","instance"],components:{GMap:s.GMap},computed:{nav:function(){return this.$store.state.user.addRouters},appRouter:function(){return this.$store.state.user.appRouters}},data:function(){return{isLoaded:!1}},methods:{mapLoad:function(t){t&&(this.isLoaded=!0),a.default.$emit("loadMap",t)},changeLayout:function(){"MapNavLayout"===this.$route.matched[1].components.default.name&&this.$store.commit("user/SET_ROUTERS",[this.appRouter[0].children[0]])}},created:function(){this.changeLayout()},updated:function(){var t=this;this.$nextTick((function(){t.$store.commit("user/SET_TIME_STAMP",{type:"map",timeStamp:""+(new Date).getTime()})}))},render:function(){var t=this,e=arguments[0],n=(0,r.default)([i.prefixCls+"-layout-light",i.prefixCls+"-basic-layout"]),a=function(){return t.propsList.needMap?[e(s.GMap,{on:{load:t.mapLoad}}),t.isLoaded?e("router-view",{attrs:{theme:"dark",fixed:!0},ref:"$$coreContent",class:i.prefixCls+"-layout-content"}):null]:e("router-view",{attrs:{theme:"dark",fixed:!0},ref:"$$coreContent",class:i.prefixCls+"-layout-content"})};return e("a-layout",{class:n},[e(o.default,{attrs:{theme:"dark",fixed:!0,"nav-list":this.nav[0].children}}),e("a-layout-content",[this.slotsList.content?this.slotsList.content:null,a()])])}}},function(t,e,n){t.exports={default:n(205),__esModule:!0}},function(t,e,n){n(206),t.exports=n(0).Object.values},function(t,e,n){var r=n(4),i=n(99)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"WindIcon",render:function(){var t=arguments[0];return t("svg",{attrs:{t:"1631762801140",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"11652",width:"200",height:"200"},class:"rk-web-core-normal-icon"},[t("path",{attrs:{d:"M534.272 236.544a32 32 0 0 0-58.848 0L263.84 727.872a32 32 0 0 0 41.536 42.144l200-82.368 195.584 84.064a32 32 0 0 0 42.08-41.856z","p-id":"11653"}})])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(n(209)),i=a(n(46)),o=a(n(47));function a(t){return t&&t.__esModule?t:{default:t}}var s=new(function(){function t(){(0,i.default)(this,t),this.c=Math.min,this.h=r.default,this.m=Math.max,this.n=Math.abs,this.j=.85,this.k=10,this.l=4,this.opt={},this.opt.currentIndex=1}return(0,o.default)(t,[{key:"calcAVGSpeed",value:function(t){var e=(this.l*this.j*t+this.k*(1-this.j)*t)/(this.k*this.l*20);return e=this.m(this.n(e),2.5)*this.h(e)}},{key:"getCurSpeed",value:function(t,e){return this.n(t)>this.n(this.j*e)?this.l*this.opt.avgSpeed:this.k*this.opt.avgSpeed}},{key:"_calCurve",value:function(t,e,n,r,i,o){i.bezierCurveTo(t+o,e,n-o,r,n,r)}},{key:"_initCanvas",value:function(t,e,n){var r=window.devicePixelRatio,i=t.getContext("2d");t.width=e*r,t.height=n*r,t.style.width=e+"px",t.style.height=n+"px",i.scale(r,r)}},{key:"resize",value:function(){this.opt.timer&&cancelAnimationFrame(this.opt.timer),this._initCanvas(this.opt.canvas,this.opt.width,this.opt.height),this.draw(0)}},{key:"_toggle",value:function(t){return void 0!==t&&t!==this.opt.currentIndex&&this.opt.tabWidthList&&this.opt,this.opt.tabWidthList&&this.opt.tabWidthList.length&&(!this.opt.animating||t!==this.opt.nextIndex)&&(this.opt.animating=!0,this.opt.distance=this.opt.tabWidthList[t]-this.opt.tabWidthList[this.opt.currentIndex],this.opt.avgSpeed=this.calcAVGSpeed(this.opt.distance),this.opt.curDisX=0,this.opt.nextIndex=t),!1}},{key:"_createPattern",value:function(t){var e=document.createElement("canvas");e.width=140,e.height=63,e.style.width="140px",e.style.height="63px";var n=e.getContext("2d");n.scale(1,1),n.lineWidth=.4;for(var r=.8,i=1;30>i;i++)n.strokeStyle="RGBA(22, 120, 160, "+r+")",n.beginPath(),n.moveTo(0,3*i),n.lineTo(140,3*i),n.stroke(),n.closePath(),10<i&&(r-=.1);var o=t.getContext("2d").createPattern(e,"repeat-x");this.opt.pattern=o,e=null}},{key:"_drawHightlight",value:function(t){var e=this.opt.canvas.getContext("2d");e.clearRect(0,0,2*this.opt.width,2*this.opt.height),e.shadowColor="rgba(0, 193, 220, 1)",e.shadowBlur=5,e.strokeStyle="#004CB3",e.lineWidth=.8,e.fillStyle="none",this._draw(e,!1);var n=e.createLinearGradient(this.opt.tabWidthList[this.opt.currentIndex]-this.opt.tabWidth/2,0,this.opt.tabWidthList[this.opt.currentIndex+1]+this.opt.tabWidth/2,this.opt.height),r=t-.3,i=this.c(1,this.m(0,0+r)),o=this.c(1,this.m(0,0+r+.1)),a=this.c(1,0+r+.3),s=this.c(1,0+r+.3+.1),c=1-i;n.addColorStop(i,"rgba(0,0,0,0)"),n.addColorStop(o,"rgba(142,214,255,"+c+")"),n.addColorStop(a,"rgba(142,214,255,"+c+")"),n.addColorStop(s,"rgba(0,0,0,0)"),n.addColorStop(1,"rgba(0,0,0,0)"),e.lineWidth=1.5,e.strokeStyle=n,e.fillStyle=this.opt.pattern,this._draw(e,!0)}},{key:"draw",value:function(t){this._drawHightlight(t),this.opt.timer=requestAnimationFrame(function(){this.draw((t+.005)%1.6)}.bind(this))}},{key:"_draw",value:function(t,e){var n=this.opt.currentIndex,r=this.opt.tabHeight,i=.5,o=0,a=this.opt.tabWidthList[n]-(e?this.opt.tabWidth/2:0);if(t.beginPath(),t.moveTo(a,this.opt.height+10),t.lineTo(a,r+i),this.opt.animating){var s=this.getCurSpeed(this.opt.curDisX,this.opt.distance);o=this.c(this.n(this.opt.distance),this.n(this.opt.curDisX+s))*this.h(s)}if(t.lineTo(0+this.opt.tabWidthList[n]+o-20,r+i),this._calCurve(0+this.opt.tabWidthList[n]+o-20,r+i,0+this.opt.tabWidthList[n]+o+20,3,t,20),this.opt.animating){var c=this.opt.tabWidthList[this.opt.nextIndex+1]-this.opt.tabWidthList[this.opt.nextIndex];t.lineTo(0+this.opt.tabWidthList[n]+c+o-20,3),this._calCurve(0+this.opt.tabWidthList[n]+c+o-20,3,0+this.opt.tabWidthList[n]+c+o+20,r+i,t,20)}else t.lineTo(0+this.opt.tabWidthList[n+1]+o-20,3),this._calCurve(0+this.opt.tabWidthList[n+1]+o-20,3,0+this.opt.tabWidthList[n+1]+o+20,r+i,t,20);e&&(t.lineTo(this.opt.tabWidthList[n+1]+this.opt.tabWidth/2,r+i),t.lineTo(this.opt.tabWidthList[n+1]+this.opt.tabWidth/2,this.opt.height)),t.closePath(),t.stroke(),e&&t.fill(),this.opt.animating&&e&&(this.opt.curDisX=o,this.n(o)>=this.n(this.opt.distance)&&(this.opt.animating=!1,this.opt.currentIndex=this.opt.nextIndex))}},{key:"initTabs",value:function(){this.opt.tabHeight=this.opt.navItem.offsetHeight,this.opt.tabWidth=this.opt.navItem.offsetWidth,this.opt.height=this.opt.navItem.offsetHeight,this.opt.width=this.opt.tabWidth*this.opt.navCount+this.opt.tabWidth,this.opt.canvas.style.left=-this.opt.tabWidth/2+"px",this.opt.tabWidthList=[];for(var t=0;t<=this.opt.navCount;t++)this.opt.tabWidthList.push(this.opt.tabWidth/2+t*this.opt.tabWidth)}},{key:"drawNav",value:function(t){this.opt.canvas=t.canvas,this.opt.navItem=t.navItem,this.opt.navCount=t.navCount,this.initTabs(),this._toggle(t.index),this._initCanvas(this.opt.canvas,this.opt.width,this.opt.height),this._createPattern(this.opt.canvas),this.draw(0),window.addEventListener("resize",function(){this.initTabs(),this._initCanvas(this.opt.canvas,this.opt.width,this.opt.height),this._createPattern(this.opt.canvas),this.draw(0)}.bind(this),!1)}}]),t}());e.default=s},function(t,e,n){t.exports={default:n(210),__esModule:!0}},function(t,e,n){n(211),t.exports=n(0).Math.sign},function(t,e,n){var r=n(4);r(r.S,"Math",{sign:n(212)})},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,n){"use strict";n.r(e),function(t,n){
|
|
54
|
+
/*!
|
|
55
|
+
* Vue.js v2.6.14
|
|
56
|
+
* (c) 2014-2021 Evan You
|
|
57
|
+
* Released under the MIT License.
|
|
58
|
+
*/
|
|
59
|
+
var r=Object.freeze({});function i(t){return null==t}function o(t){return null!=t}function a(t){return!0===t}function s(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function c(t){return null!==t&&"object"==typeof t}var u=Object.prototype.toString;function l(t){return"[object Object]"===u.call(t)}function h(t){return"[object RegExp]"===u.call(t)}function f(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function d(t){return o(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function p(t){return null==t?"":Array.isArray(t)||l(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function m(t){var e=parseFloat(t);return isNaN(e)?t:e}function g(t,e){for(var n=Object.create(null),r=t.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}var v=g("slot,component",!0),y=g("key,ref,slot,slot-scope,is");function _(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}var x=Object.prototype.hasOwnProperty;function b(t,e){return x.call(t,e)}function w(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var M=/-(\w)/g,S=w((function(t){return t.replace(M,(function(t,e){return e?e.toUpperCase():""}))})),T=w((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),E=/\B([A-Z])/g,C=w((function(t){return t.replace(E,"-$1").toLowerCase()}));var A=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function P(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function L(t,e){for(var n in e)t[n]=e[n];return t}function R(t){for(var e={},n=0;n<t.length;n++)t[n]&&L(e,t[n]);return e}function O(t,e,n){}var k=function(t,e,n){return!1},I=function(t){return t};function D(t,e){if(t===e)return!0;var n=c(t),r=c(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var i=Array.isArray(t),o=Array.isArray(e);if(i&&o)return t.length===e.length&&t.every((function(t,n){return D(t,e[n])}));if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(i||o)return!1;var a=Object.keys(t),s=Object.keys(e);return a.length===s.length&&a.every((function(n){return D(t[n],e[n])}))}catch(t){return!1}}function j(t,e){for(var n=0;n<t.length;n++)if(D(t[n],e))return n;return-1}function z(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}var N=["component","directive","filter"],F=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],B={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:k,isReservedAttr:k,isUnknownElement:k,getTagNamespace:O,parsePlatformTagName:I,mustUseProp:k,async:!0,_lifecycleHooks:F},H=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function G(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function U(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var V=new RegExp("[^"+H.source+".$_\\d]");var W,Z="__proto__"in{},q="undefined"!=typeof window,Y="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,J=Y&&WXEnvironment.platform.toLowerCase(),X=q&&window.navigator.userAgent.toLowerCase(),$=X&&/msie|trident/.test(X),Q=X&&X.indexOf("msie 9.0")>0,K=X&&X.indexOf("edge/")>0,tt=(X&&X.indexOf("android"),X&&/iphone|ipad|ipod|ios/.test(X)||"ios"===J),et=(X&&/chrome\/\d+/.test(X),X&&/phantomjs/.test(X),X&&X.match(/firefox\/(\d+)/)),nt={}.watch,rt=!1;if(q)try{var it={};Object.defineProperty(it,"passive",{get:function(){rt=!0}}),window.addEventListener("test-passive",null,it)}catch(t){}var ot=function(){return void 0===W&&(W=!q&&!Y&&void 0!==t&&(t.process&&"server"===t.process.env.VUE_ENV)),W},at=q&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function st(t){return"function"==typeof t&&/native code/.test(t.toString())}var ct,ut="undefined"!=typeof Symbol&&st(Symbol)&&"undefined"!=typeof Reflect&&st(Reflect.ownKeys);ct="undefined"!=typeof Set&&st(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var lt=O,ht=0,ft=function(){this.id=ht++,this.subs=[]};ft.prototype.addSub=function(t){this.subs.push(t)},ft.prototype.removeSub=function(t){_(this.subs,t)},ft.prototype.depend=function(){ft.target&&ft.target.addDep(this)},ft.prototype.notify=function(){var t=this.subs.slice();for(var e=0,n=t.length;e<n;e++)t[e].update()},ft.target=null;var dt=[];function pt(t){dt.push(t),ft.target=t}function mt(){dt.pop(),ft.target=dt[dt.length-1]}var gt=function(t,e,n,r,i,o,a,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},vt={child:{configurable:!0}};vt.child.get=function(){return this.componentInstance},Object.defineProperties(gt.prototype,vt);var yt=function(t){void 0===t&&(t="");var e=new gt;return e.text=t,e.isComment=!0,e};function _t(t){return new gt(void 0,void 0,void 0,String(t))}function xt(t){var e=new gt(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var bt=Array.prototype,wt=Object.create(bt);["push","pop","shift","unshift","splice","sort","reverse"].forEach((function(t){var e=bt[t];U(wt,t,(function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var i,o=e.apply(this,n),a=this.__ob__;switch(t){case"push":case"unshift":i=n;break;case"splice":i=n.slice(2)}return i&&a.observeArray(i),a.dep.notify(),o}))}));var Mt=Object.getOwnPropertyNames(wt),St=!0;function Tt(t){St=t}var Et=function(t){this.value=t,this.dep=new ft,this.vmCount=0,U(t,"__ob__",this),Array.isArray(t)?(Z?function(t,e){t.__proto__=e}(t,wt):function(t,e,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];U(t,o,e[o])}}(t,wt,Mt),this.observeArray(t)):this.walk(t)};function Ct(t,e){var n;if(c(t)&&!(t instanceof gt))return b(t,"__ob__")&&t.__ob__ instanceof Et?n=t.__ob__:St&&!ot()&&(Array.isArray(t)||l(t))&&Object.isExtensible(t)&&!t._isVue&&(n=new Et(t)),e&&n&&n.vmCount++,n}function At(t,e,n,r,i){var o=new ft,a=Object.getOwnPropertyDescriptor(t,e);if(!a||!1!==a.configurable){var s=a&&a.get,c=a&&a.set;s&&!c||2!==arguments.length||(n=t[e]);var u=!i&&Ct(n);Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){var e=s?s.call(t):n;return ft.target&&(o.depend(),u&&(u.dep.depend(),Array.isArray(e)&&Rt(e))),e},set:function(e){var r=s?s.call(t):n;e===r||e!=e&&r!=r||s&&!c||(c?c.call(t,e):n=e,u=!i&&Ct(e),o.notify())}})}}function Pt(t,e,n){if(Array.isArray(t)&&f(e))return t.length=Math.max(t.length,e),t.splice(e,1,n),n;if(e in t&&!(e in Object.prototype))return t[e]=n,n;var r=t.__ob__;return t._isVue||r&&r.vmCount?n:r?(At(r.value,e,n),r.dep.notify(),n):(t[e]=n,n)}function Lt(t,e){if(Array.isArray(t)&&f(e))t.splice(e,1);else{var n=t.__ob__;t._isVue||n&&n.vmCount||b(t,e)&&(delete t[e],n&&n.dep.notify())}}function Rt(t){for(var e=void 0,n=0,r=t.length;n<r;n++)(e=t[n])&&e.__ob__&&e.__ob__.dep.depend(),Array.isArray(e)&&Rt(e)}Et.prototype.walk=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)At(t,e[n])},Et.prototype.observeArray=function(t){for(var e=0,n=t.length;e<n;e++)Ct(t[e])};var Ot=B.optionMergeStrategies;function kt(t,e){if(!e)return t;for(var n,r,i,o=ut?Reflect.ownKeys(e):Object.keys(e),a=0;a<o.length;a++)"__ob__"!==(n=o[a])&&(r=t[n],i=e[n],b(t,n)?r!==i&&l(r)&&l(i)&&kt(r,i):Pt(t,n,i));return t}function It(t,e,n){return n?function(){var r="function"==typeof e?e.call(n,n):e,i="function"==typeof t?t.call(n,n):t;return r?kt(r,i):i}:e?t?function(){return kt("function"==typeof e?e.call(this,this):e,"function"==typeof t?t.call(this,this):t)}:e:t}function Dt(t,e){var n=e?t?t.concat(e):Array.isArray(e)?e:[e]:t;return n?function(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(n):n}function jt(t,e,n,r){var i=Object.create(t||null);return e?L(i,e):i}Ot.data=function(t,e,n){return n?It(t,e,n):e&&"function"!=typeof e?t:It(t,e)},F.forEach((function(t){Ot[t]=Dt})),N.forEach((function(t){Ot[t+"s"]=jt})),Ot.watch=function(t,e,n,r){if(t===nt&&(t=void 0),e===nt&&(e=void 0),!e)return Object.create(t||null);if(!t)return e;var i={};for(var o in L(i,t),e){var a=i[o],s=e[o];a&&!Array.isArray(a)&&(a=[a]),i[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return i},Ot.props=Ot.methods=Ot.inject=Ot.computed=function(t,e,n,r){if(!t)return e;var i=Object.create(null);return L(i,t),e&&L(i,e),i},Ot.provide=It;var zt=function(t,e){return void 0===e?t:e};function Nt(t,e,n){if("function"==typeof e&&(e=e.options),function(t,e){var n=t.props;if(n){var r,i,o={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(i=n[r])&&(o[S(i)]={type:null});else if(l(n))for(var a in n)i=n[a],o[S(a)]=l(i)?i:{type:i};else 0;t.props=o}}(e),function(t,e){var n=t.inject;if(n){var r=t.inject={};if(Array.isArray(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(l(n))for(var o in n){var a=n[o];r[o]=l(a)?L({from:o},a):{from:a}}else 0}}(e),function(t){var e=t.directives;if(e)for(var n in e){var r=e[n];"function"==typeof r&&(e[n]={bind:r,update:r})}}(e),!e._base&&(e.extends&&(t=Nt(t,e.extends,n)),e.mixins))for(var r=0,i=e.mixins.length;r<i;r++)t=Nt(t,e.mixins[r],n);var o,a={};for(o in t)s(o);for(o in e)b(t,o)||s(o);function s(r){var i=Ot[r]||zt;a[r]=i(t[r],e[r],n,r)}return a}function Ft(t,e,n,r){if("string"==typeof n){var i=t[e];if(b(i,n))return i[n];var o=S(n);if(b(i,o))return i[o];var a=T(o);return b(i,a)?i[a]:i[n]||i[o]||i[a]}}function Bt(t,e,n,r){var i=e[t],o=!b(n,t),a=n[t],s=Vt(Boolean,i.type);if(s>-1)if(o&&!b(i,"default"))a=!1;else if(""===a||a===C(t)){var c=Vt(String,i.type);(c<0||s<c)&&(a=!0)}if(void 0===a){a=function(t,e,n){if(!b(e,"default"))return;var r=e.default;0;if(t&&t.$options.propsData&&void 0===t.$options.propsData[n]&&void 0!==t._props[n])return t._props[n];return"function"==typeof r&&"Function"!==Gt(e.type)?r.call(t):r}(r,i,t);var u=St;Tt(!0),Ct(a),Tt(u)}return a}var Ht=/^\s*function (\w+)/;function Gt(t){var e=t&&t.toString().match(Ht);return e?e[1]:""}function Ut(t,e){return Gt(t)===Gt(e)}function Vt(t,e){if(!Array.isArray(e))return Ut(e,t)?0:-1;for(var n=0,r=e.length;n<r;n++)if(Ut(e[n],t))return n;return-1}function Wt(t,e,n){pt();try{if(e)for(var r=e;r=r.$parent;){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{if(!1===i[o].call(r,t,e,n))return}catch(t){qt(t,r,"errorCaptured hook")}}qt(t,e,n)}finally{mt()}}function Zt(t,e,n,r,i){var o;try{(o=n?t.apply(e,n):t.call(e))&&!o._isVue&&d(o)&&!o._handled&&(o.catch((function(t){return Wt(t,r,i+" (Promise/async)")})),o._handled=!0)}catch(t){Wt(t,r,i)}return o}function qt(t,e,n){if(B.errorHandler)try{return B.errorHandler.call(null,t,e,n)}catch(e){e!==t&&Yt(e,null,"config.errorHandler")}Yt(t,e,n)}function Yt(t,e,n){if(!q&&!Y||"undefined"==typeof console)throw t;console.error(t)}var Jt,Xt=!1,$t=[],Qt=!1;function Kt(){Qt=!1;var t=$t.slice(0);$t.length=0;for(var e=0;e<t.length;e++)t[e]()}if("undefined"!=typeof Promise&&st(Promise)){var te=Promise.resolve();Jt=function(){te.then(Kt),tt&&setTimeout(O)},Xt=!0}else if($||"undefined"==typeof MutationObserver||!st(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())Jt=void 0!==n&&st(n)?function(){n(Kt)}:function(){setTimeout(Kt,0)};else{var ee=1,ne=new MutationObserver(Kt),re=document.createTextNode(String(ee));ne.observe(re,{characterData:!0}),Jt=function(){ee=(ee+1)%2,re.data=String(ee)},Xt=!0}function ie(t,e){var n;if($t.push((function(){if(t)try{t.call(e)}catch(t){Wt(t,e,"nextTick")}else n&&n(e)})),Qt||(Qt=!0,Jt()),!t&&"undefined"!=typeof Promise)return new Promise((function(t){n=t}))}var oe=new ct;function ae(t){!function t(e,n){var r,i,o=Array.isArray(e);if(!o&&!c(e)||Object.isFrozen(e)||e instanceof gt)return;if(e.__ob__){var a=e.__ob__.dep.id;if(n.has(a))return;n.add(a)}if(o)for(r=e.length;r--;)t(e[r],n);else for(i=Object.keys(e),r=i.length;r--;)t(e[i[r]],n)}(t,oe),oe.clear()}var se=w((function(t){var e="&"===t.charAt(0),n="~"===(t=e?t.slice(1):t).charAt(0),r="!"===(t=n?t.slice(1):t).charAt(0);return{name:t=r?t.slice(1):t,once:n,capture:r,passive:e}}));function ce(t,e){function n(){var t=arguments,r=n.fns;if(!Array.isArray(r))return Zt(r,null,arguments,e,"v-on handler");for(var i=r.slice(),o=0;o<i.length;o++)Zt(i[o],null,t,e,"v-on handler")}return n.fns=t,n}function ue(t,e,n,r,o,s){var c,u,l,h;for(c in t)u=t[c],l=e[c],h=se(c),i(u)||(i(l)?(i(u.fns)&&(u=t[c]=ce(u,s)),a(h.once)&&(u=t[c]=o(h.name,u,h.capture)),n(h.name,u,h.capture,h.passive,h.params)):u!==l&&(l.fns=u,t[c]=l));for(c in e)i(t[c])&&r((h=se(c)).name,e[c],h.capture)}function le(t,e,n){var r;t instanceof gt&&(t=t.data.hook||(t.data.hook={}));var s=t[e];function c(){n.apply(this,arguments),_(r.fns,c)}i(s)?r=ce([c]):o(s.fns)&&a(s.merged)?(r=s).fns.push(c):r=ce([s,c]),r.merged=!0,t[e]=r}function he(t,e,n,r,i){if(o(e)){if(b(e,n))return t[n]=e[n],i||delete e[n],!0;if(b(e,r))return t[n]=e[r],i||delete e[r],!0}return!1}function fe(t){return s(t)?[_t(t)]:Array.isArray(t)?function t(e,n){var r,c,u,l,h=[];for(r=0;r<e.length;r++)i(c=e[r])||"boolean"==typeof c||(u=h.length-1,l=h[u],Array.isArray(c)?c.length>0&&(de((c=t(c,(n||"")+"_"+r))[0])&&de(l)&&(h[u]=_t(l.text+c[0].text),c.shift()),h.push.apply(h,c)):s(c)?de(l)?h[u]=_t(l.text+c):""!==c&&h.push(_t(c)):de(c)&&de(l)?h[u]=_t(l.text+c.text):(a(e._isVList)&&o(c.tag)&&i(c.key)&&o(n)&&(c.key="__vlist"+n+"_"+r+"__"),h.push(c)));return h}(t):void 0}function de(t){return o(t)&&o(t.text)&&!1===t.isComment}function pe(t,e){if(t){for(var n=Object.create(null),r=ut?Reflect.ownKeys(t):Object.keys(t),i=0;i<r.length;i++){var o=r[i];if("__ob__"!==o){for(var a=t[o].from,s=e;s;){if(s._provided&&b(s._provided,a)){n[o]=s._provided[a];break}s=s.$parent}if(!s)if("default"in t[o]){var c=t[o].default;n[o]="function"==typeof c?c.call(e):c}else 0}}return n}}function me(t,e){if(!t||!t.length)return{};for(var n={},r=0,i=t.length;r<i;r++){var o=t[r],a=o.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,o.context!==e&&o.fnContext!==e||!a||null==a.slot)(n.default||(n.default=[])).push(o);else{var s=a.slot,c=n[s]||(n[s]=[]);"template"===o.tag?c.push.apply(c,o.children||[]):c.push(o)}}for(var u in n)n[u].every(ge)&&delete n[u];return n}function ge(t){return t.isComment&&!t.asyncFactory||" "===t.text}function ve(t){return t.isComment&&t.asyncFactory}function ye(t,e,n){var i,o=Object.keys(e).length>0,a=t?!!t.$stable:!o,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&n&&n!==r&&s===n.$key&&!o&&!n.$hasNormal)return n;for(var c in i={},t)t[c]&&"$"!==c[0]&&(i[c]=_e(e,c,t[c]))}else i={};for(var u in e)u in i||(i[u]=xe(e,u));return t&&Object.isExtensible(t)&&(t._normalized=i),U(i,"$stable",a),U(i,"$key",s),U(i,"$hasNormal",o),i}function _e(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({}),e=(t=t&&"object"==typeof t&&!Array.isArray(t)?[t]:fe(t))&&t[0];return t&&(!e||1===t.length&&e.isComment&&!ve(e))?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function xe(t,e){return function(){return t[e]}}function be(t,e){var n,r,i,a,s;if(Array.isArray(t)||"string"==typeof t)for(n=new Array(t.length),r=0,i=t.length;r<i;r++)n[r]=e(t[r],r);else if("number"==typeof t)for(n=new Array(t),r=0;r<t;r++)n[r]=e(r+1,r);else if(c(t))if(ut&&t[Symbol.iterator]){n=[];for(var u=t[Symbol.iterator](),l=u.next();!l.done;)n.push(e(l.value,n.length)),l=u.next()}else for(a=Object.keys(t),n=new Array(a.length),r=0,i=a.length;r<i;r++)s=a[r],n[r]=e(t[s],s,r);return o(n)||(n=[]),n._isVList=!0,n}function we(t,e,n,r){var i,o=this.$scopedSlots[t];o?(n=n||{},r&&(n=L(L({},r),n)),i=o(n)||("function"==typeof e?e():e)):i=this.$slots[t]||("function"==typeof e?e():e);var a=n&&n.slot;return a?this.$createElement("template",{slot:a},i):i}function Me(t){return Ft(this.$options,"filters",t)||I}function Se(t,e){return Array.isArray(t)?-1===t.indexOf(e):t!==e}function Te(t,e,n,r,i){var o=B.keyCodes[e]||n;return i&&r&&!B.keyCodes[e]?Se(i,r):o?Se(o,t):r?C(r)!==e:void 0===t}function Ee(t,e,n,r,i){if(n)if(c(n)){var o;Array.isArray(n)&&(n=R(n));var a=function(a){if("class"===a||"style"===a||y(a))o=t;else{var s=t.attrs&&t.attrs.type;o=r||B.mustUseProp(e,s,a)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}var c=S(a),u=C(a);c in o||u in o||(o[a]=n[a],i&&((t.on||(t.on={}))["update:"+a]=function(t){n[a]=t}))};for(var s in n)a(s)}else;return t}function Ce(t,e){var n=this._staticTrees||(this._staticTrees=[]),r=n[t];return r&&!e||Pe(r=n[t]=this.$options.staticRenderFns[t].call(this._renderProxy,null,this),"__static__"+t,!1),r}function Ae(t,e,n){return Pe(t,"__once__"+e+(n?"_"+n:""),!0),t}function Pe(t,e,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]&&"string"!=typeof t[r]&&Le(t[r],e+"_"+r,n);else Le(t,e,n)}function Le(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}function Re(t,e){if(e)if(l(e)){var n=t.on=t.on?L({},t.on):{};for(var r in e){var i=n[r],o=e[r];n[r]=i?[].concat(i,o):o}}else;return t}function Oe(t,e,n,r){e=e||{$stable:!n};for(var i=0;i<t.length;i++){var o=t[i];Array.isArray(o)?Oe(o,e,n):o&&(o.proxy&&(o.fn.proxy=!0),e[o.key]=o.fn)}return r&&(e.$key=r),e}function ke(t,e){for(var n=0;n<e.length;n+=2){var r=e[n];"string"==typeof r&&r&&(t[e[n]]=e[n+1])}return t}function Ie(t,e){return"string"==typeof t?e+t:t}function De(t){t._o=Ae,t._n=m,t._s=p,t._l=be,t._t=we,t._q=D,t._i=j,t._m=Ce,t._f=Me,t._k=Te,t._b=Ee,t._v=_t,t._e=yt,t._u=Oe,t._g=Re,t._d=ke,t._p=Ie}function je(t,e,n,i,o){var s,c=this,u=o.options;b(i,"_uid")?(s=Object.create(i))._original=i:(s=i,i=i._original);var l=a(u._compiled),h=!l;this.data=t,this.props=e,this.children=n,this.parent=i,this.listeners=t.on||r,this.injections=pe(u.inject,i),this.slots=function(){return c.$slots||ye(t.scopedSlots,c.$slots=me(n,i)),c.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return ye(t.scopedSlots,this.slots())}}),l&&(this.$options=u,this.$slots=this.slots(),this.$scopedSlots=ye(t.scopedSlots,this.$slots)),u._scopeId?this._c=function(t,e,n,r){var o=Ue(s,t,e,n,r,h);return o&&!Array.isArray(o)&&(o.fnScopeId=u._scopeId,o.fnContext=i),o}:this._c=function(t,e,n,r){return Ue(s,t,e,n,r,h)}}function ze(t,e,n,r,i){var o=xt(t);return o.fnContext=n,o.fnOptions=r,e.slot&&((o.data||(o.data={})).slot=e.slot),o}function Ne(t,e){for(var n in e)t[S(n)]=e[n]}De(je.prototype);var Fe={init:function(t,e){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){var n=t;Fe.prepatch(n,n)}else{(t.componentInstance=function(t,e){var n={_isComponent:!0,_parentVnode:t,parent:e},r=t.data.inlineTemplate;o(r)&&(n.render=r.render,n.staticRenderFns=r.staticRenderFns);return new t.componentOptions.Ctor(n)}(t,Qe)).$mount(e?t.elm:void 0,e)}},prepatch:function(t,e){var n=e.componentOptions;!function(t,e,n,i,o){0;var a=i.data.scopedSlots,s=t.$scopedSlots,c=!!(a&&!a.$stable||s!==r&&!s.$stable||a&&t.$scopedSlots.$key!==a.$key||!a&&t.$scopedSlots.$key),u=!!(o||t.$options._renderChildren||c);t.$options._parentVnode=i,t.$vnode=i,t._vnode&&(t._vnode.parent=i);if(t.$options._renderChildren=o,t.$attrs=i.data.attrs||r,t.$listeners=n||r,e&&t.$options.props){Tt(!1);for(var l=t._props,h=t.$options._propKeys||[],f=0;f<h.length;f++){var d=h[f],p=t.$options.props;l[d]=Bt(d,p,e,t)}Tt(!0),t.$options.propsData=e}n=n||r;var m=t.$options._parentListeners;t.$options._parentListeners=n,$e(t,n,m),u&&(t.$slots=me(o,i.context),t.$forceUpdate());0}(e.componentInstance=t.componentInstance,n.propsData,n.listeners,e,n.children)},insert:function(t){var e,n=t.context,r=t.componentInstance;r._isMounted||(r._isMounted=!0,nn(r,"mounted")),t.data.keepAlive&&(n._isMounted?((e=r)._inactive=!1,on.push(e)):en(r,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?function t(e,n){if(n&&(e._directInactive=!0,tn(e)))return;if(!e._inactive){e._inactive=!0;for(var r=0;r<e.$children.length;r++)t(e.$children[r]);nn(e,"deactivated")}}(e,!0):e.$destroy())}},Be=Object.keys(Fe);function He(t,e,n,s,u){if(!i(t)){var l=n.$options._base;if(c(t)&&(t=l.extend(t)),"function"==typeof t){var h;if(i(t.cid)&&void 0===(t=function(t,e){if(a(t.error)&&o(t.errorComp))return t.errorComp;if(o(t.resolved))return t.resolved;var n=We;n&&o(t.owners)&&-1===t.owners.indexOf(n)&&t.owners.push(n);if(a(t.loading)&&o(t.loadingComp))return t.loadingComp;if(n&&!o(t.owners)){var r=t.owners=[n],s=!0,u=null,l=null;n.$on("hook:destroyed",(function(){return _(r,n)}));var h=function(t){for(var e=0,n=r.length;e<n;e++)r[e].$forceUpdate();t&&(r.length=0,null!==u&&(clearTimeout(u),u=null),null!==l&&(clearTimeout(l),l=null))},f=z((function(n){t.resolved=Ze(n,e),s?r.length=0:h(!0)})),p=z((function(e){o(t.errorComp)&&(t.error=!0,h(!0))})),m=t(f,p);return c(m)&&(d(m)?i(t.resolved)&&m.then(f,p):d(m.component)&&(m.component.then(f,p),o(m.error)&&(t.errorComp=Ze(m.error,e)),o(m.loading)&&(t.loadingComp=Ze(m.loading,e),0===m.delay?t.loading=!0:u=setTimeout((function(){u=null,i(t.resolved)&&i(t.error)&&(t.loading=!0,h(!1))}),m.delay||200)),o(m.timeout)&&(l=setTimeout((function(){l=null,i(t.resolved)&&p(null)}),m.timeout)))),s=!1,t.loading?t.loadingComp:t.resolved}}(h=t,l)))return function(t,e,n,r,i){var o=yt();return o.asyncFactory=t,o.asyncMeta={data:e,context:n,children:r,tag:i},o}(h,e,n,s,u);e=e||{},Tn(t),o(e.model)&&function(t,e){var n=t.model&&t.model.prop||"value",r=t.model&&t.model.event||"input";(e.attrs||(e.attrs={}))[n]=e.model.value;var i=e.on||(e.on={}),a=i[r],s=e.model.callback;o(a)?(Array.isArray(a)?-1===a.indexOf(s):a!==s)&&(i[r]=[s].concat(a)):i[r]=s}(t.options,e);var f=function(t,e,n){var r=e.options.props;if(!i(r)){var a={},s=t.attrs,c=t.props;if(o(s)||o(c))for(var u in r){var l=C(u);he(a,c,u,l,!0)||he(a,s,u,l,!1)}return a}}(e,t);if(a(t.options.functional))return function(t,e,n,i,a){var s=t.options,c={},u=s.props;if(o(u))for(var l in u)c[l]=Bt(l,u,e||r);else o(n.attrs)&&Ne(c,n.attrs),o(n.props)&&Ne(c,n.props);var h=new je(n,c,a,i,t),f=s.render.call(null,h._c,h);if(f instanceof gt)return ze(f,n,h.parent,s,h);if(Array.isArray(f)){for(var d=fe(f)||[],p=new Array(d.length),m=0;m<d.length;m++)p[m]=ze(d[m],n,h.parent,s,h);return p}}(t,f,e,n,s);var p=e.on;if(e.on=e.nativeOn,a(t.options.abstract)){var m=e.slot;e={},m&&(e.slot=m)}!function(t){for(var e=t.hook||(t.hook={}),n=0;n<Be.length;n++){var r=Be[n],i=e[r],o=Fe[r];i===o||i&&i._merged||(e[r]=i?Ge(o,i):o)}}(e);var g=t.options.name||u;return new gt("vue-component-"+t.cid+(g?"-"+g:""),e,void 0,void 0,void 0,n,{Ctor:t,propsData:f,listeners:p,tag:u,children:s},h)}}}function Ge(t,e){var n=function(n,r){t(n,r),e(n,r)};return n._merged=!0,n}function Ue(t,e,n,r,u,l){return(Array.isArray(n)||s(n))&&(u=r,r=n,n=void 0),a(l)&&(u=2),function(t,e,n,r,s){if(o(n)&&o(n.__ob__))return yt();o(n)&&o(n.is)&&(e=n.is);if(!e)return yt();0;Array.isArray(r)&&"function"==typeof r[0]&&((n=n||{}).scopedSlots={default:r[0]},r.length=0);2===s?r=fe(r):1===s&&(r=function(t){for(var e=0;e<t.length;e++)if(Array.isArray(t[e]))return Array.prototype.concat.apply([],t);return t}(r));var u,l;if("string"==typeof e){var h;l=t.$vnode&&t.$vnode.ns||B.getTagNamespace(e),u=B.isReservedTag(e)?new gt(B.parsePlatformTagName(e),n,r,void 0,void 0,t):n&&n.pre||!o(h=Ft(t.$options,"components",e))?new gt(e,n,r,void 0,void 0,t):He(h,n,t,r,e)}else u=He(e,n,t,r);return Array.isArray(u)?u:o(u)?(o(l)&&function t(e,n,r){e.ns=n,"foreignObject"===e.tag&&(n=void 0,r=!0);if(o(e.children))for(var s=0,c=e.children.length;s<c;s++){var u=e.children[s];o(u.tag)&&(i(u.ns)||a(r)&&"svg"!==u.tag)&&t(u,n,r)}}(u,l),o(n)&&function(t){c(t.style)&&ae(t.style);c(t.class)&&ae(t.class)}(n),u):yt()}(t,e,n,r,u)}var Ve,We=null;function Ze(t,e){return(t.__esModule||ut&&"Module"===t[Symbol.toStringTag])&&(t=t.default),c(t)?e.extend(t):t}function qe(t){if(Array.isArray(t))for(var e=0;e<t.length;e++){var n=t[e];if(o(n)&&(o(n.componentOptions)||ve(n)))return n}}function Ye(t,e){Ve.$on(t,e)}function Je(t,e){Ve.$off(t,e)}function Xe(t,e){var n=Ve;return function r(){var i=e.apply(null,arguments);null!==i&&n.$off(t,r)}}function $e(t,e,n){Ve=t,ue(e,n||{},Ye,Je,Xe,t),Ve=void 0}var Qe=null;function Ke(t){var e=Qe;return Qe=t,function(){Qe=e}}function tn(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function en(t,e){if(e){if(t._directInactive=!1,tn(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var n=0;n<t.$children.length;n++)en(t.$children[n]);nn(t,"activated")}}function nn(t,e){pt();var n=t.$options[e],r=e+" hook";if(n)for(var i=0,o=n.length;i<o;i++)Zt(n[i],t,null,t,r);t._hasHookEvent&&t.$emit("hook:"+e),mt()}var rn=[],on=[],an={},sn=!1,cn=!1,un=0;var ln=0,hn=Date.now;if(q&&!$){var fn=window.performance;fn&&"function"==typeof fn.now&&hn()>document.createEvent("Event").timeStamp&&(hn=function(){return fn.now()})}function dn(){var t,e;for(ln=hn(),cn=!0,rn.sort((function(t,e){return t.id-e.id})),un=0;un<rn.length;un++)(t=rn[un]).before&&t.before(),e=t.id,an[e]=null,t.run();var n=on.slice(),r=rn.slice();un=rn.length=on.length=0,an={},sn=cn=!1,function(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,en(t[e],!0)}(n),function(t){var e=t.length;for(;e--;){var n=t[e],r=n.vm;r._watcher===n&&r._isMounted&&!r._isDestroyed&&nn(r,"updated")}}(r),at&&B.devtools&&at.emit("flush")}var pn=0,mn=function(t,e,n,r,i){this.vm=t,i&&(t._watcher=this),t._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++pn,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ct,this.newDepIds=new ct,this.expression="","function"==typeof e?this.getter=e:(this.getter=function(t){if(!V.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}(e),this.getter||(this.getter=O)),this.value=this.lazy?void 0:this.get()};mn.prototype.get=function(){var t;pt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(t){if(!this.user)throw t;Wt(t,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&ae(t),mt(),this.cleanupDeps()}return t},mn.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},mn.prototype.cleanupDeps=function(){for(var t=this.deps.length;t--;){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},mn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(t){var e=t.id;if(null==an[e]){if(an[e]=!0,cn){for(var n=rn.length-1;n>un&&rn[n].id>t.id;)n--;rn.splice(n+1,0,t)}else rn.push(t);sn||(sn=!0,ie(dn))}}(this)},mn.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||c(t)||this.deep){var e=this.value;if(this.value=t,this.user){var n='callback for watcher "'+this.expression+'"';Zt(this.cb,this.vm,[t,e],this.vm,n)}else this.cb.call(this.vm,t,e)}}},mn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},mn.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},mn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||_(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var gn={enumerable:!0,configurable:!0,get:O,set:O};function vn(t,e,n){gn.get=function(){return this[e][n]},gn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,gn)}function yn(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var n=t.$options.propsData||{},r=t._props={},i=t.$options._propKeys=[];t.$parent&&Tt(!1);var o=function(o){i.push(o);var a=Bt(o,e,n,t);At(r,o,a),o in t||vn(t,"_props",o)};for(var a in e)o(a);Tt(!0)}(t,e.props),e.methods&&function(t,e){t.$options.props;for(var n in e)t[n]="function"!=typeof e[n]?O:A(e[n],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;l(e=t._data="function"==typeof e?function(t,e){pt();try{return t.call(e,e)}catch(t){return Wt(t,e,"data()"),{}}finally{mt()}}(e,t):e||{})||(e={});var n=Object.keys(e),r=t.$options.props,i=(t.$options.methods,n.length);for(;i--;){var o=n[i];0,r&&b(r,o)||G(o)||vn(t,"_data",o)}Ct(e,!0)}(t):Ct(t._data={},!0),e.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),r=ot();for(var i in e){var o=e[i],a="function"==typeof o?o:o.get;0,r||(n[i]=new mn(t,a||O,O,_n)),i in t||xn(t,i,o)}}(t,e.computed),e.watch&&e.watch!==nt&&function(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)Mn(t,n,r[i]);else Mn(t,n,r)}}(t,e.watch)}var _n={lazy:!0};function xn(t,e,n){var r=!ot();"function"==typeof n?(gn.get=r?bn(e):wn(n),gn.set=O):(gn.get=n.get?r&&!1!==n.cache?bn(e):wn(n.get):O,gn.set=n.set||O),Object.defineProperty(t,e,gn)}function bn(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),ft.target&&e.depend(),e.value}}function wn(t){return function(){return t.call(this,this)}}function Mn(t,e,n,r){return l(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=t[n]),t.$watch(e,n,r)}var Sn=0;function Tn(t){var e=t.options;if(t.super){var n=Tn(t.super);if(n!==t.superOptions){t.superOptions=n;var r=function(t){var e,n=t.options,r=t.sealedOptions;for(var i in n)n[i]!==r[i]&&(e||(e={}),e[i]=n[i]);return e}(t);r&&L(t.extendOptions,r),(e=t.options=Nt(n,t.extendOptions)).name&&(e.components[e.name]=t)}}return e}function En(t){this._init(t)}function Cn(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,i=t._Ctor||(t._Ctor={});if(i[r])return i[r];var o=t.name||n.options.name;var a=function(t){this._init(t)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=e++,a.options=Nt(n.options,t),a.super=n,a.options.props&&function(t){var e=t.options.props;for(var n in e)vn(t.prototype,"_props",n)}(a),a.options.computed&&function(t){var e=t.options.computed;for(var n in e)xn(t.prototype,n,e[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,N.forEach((function(t){a[t]=n[t]})),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=L({},a.options),i[r]=a,a}}function An(t){return t&&(t.Ctor.options.name||t.tag)}function Pn(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!h(t)&&t.test(e)}function Ln(t,e){var n=t.cache,r=t.keys,i=t._vnode;for(var o in n){var a=n[o];if(a){var s=a.name;s&&!e(s)&&Rn(n,o,r,i)}}}function Rn(t,e,n,r){var i=t[e];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),t[e]=null,_(n,e)}!function(t){t.prototype._init=function(t){var e=this;e._uid=Sn++,e._isVue=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=Nt(Tn(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&$e(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,i=n&&n.context;t.$slots=me(e._renderChildren,i),t.$scopedSlots=r,t._c=function(e,n,r,i){return Ue(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return Ue(t,e,n,r,i,!0)};var o=n&&n.data;At(t,"$attrs",o&&o.attrs||r,null,!0),At(t,"$listeners",e._parentListeners||r,null,!0)}(e),nn(e,"beforeCreate"),function(t){var e=pe(t.$options.inject,t);e&&(Tt(!1),Object.keys(e).forEach((function(n){At(t,n,e[n])})),Tt(!0))}(e),yn(e),function(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}(e),nn(e,"created"),e.$options.el&&e.$mount(e.$options.el)}}(En),function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=Pt,t.prototype.$delete=Lt,t.prototype.$watch=function(t,e,n){if(l(e))return Mn(this,t,e,n);(n=n||{}).user=!0;var r=new mn(this,t,e,n);if(n.immediate){var i='callback for immediate watcher "'+r.expression+'"';pt(),Zt(e,this,[r.value],this,i),mt()}return function(){r.teardown()}}}(En),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){var r=this;if(Array.isArray(t))for(var i=0,o=t.length;i<o;i++)r.$on(t[i],n);else(r._events[t]||(r._events[t]=[])).push(n),e.test(t)&&(r._hasHookEvent=!0);return r},t.prototype.$once=function(t,e){var n=this;function r(){n.$off(t,r),e.apply(n,arguments)}return r.fn=e,n.$on(t,r),n},t.prototype.$off=function(t,e){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(t)){for(var r=0,i=t.length;r<i;r++)n.$off(t[r],e);return n}var o,a=n._events[t];if(!a)return n;if(!e)return n._events[t]=null,n;for(var s=a.length;s--;)if((o=a[s])===e||o.fn===e){a.splice(s,1);break}return n},t.prototype.$emit=function(t){var e=this,n=e._events[t];if(n){n=n.length>1?P(n):n;for(var r=P(arguments,1),i='event handler for "'+t+'"',o=0,a=n.length;o<a;o++)Zt(n[o],e,r,e,i)}return e}}(En),function(t){t.prototype._update=function(t,e){var n=this,r=n.$el,i=n._vnode,o=Ke(n);n._vnode=t,n.$el=i?n.__patch__(i,t):n.__patch__(n.$el,t,e,!1),o(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},t.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){nn(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||_(e.$children,t),t._watcher&&t._watcher.teardown();for(var n=t._watchers.length;n--;)t._watchers[n].teardown();t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),nn(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}(En),function(t){De(t.prototype),t.prototype.$nextTick=function(t){return ie(t,this)},t.prototype._render=function(){var t,e=this,n=e.$options,r=n.render,i=n._parentVnode;i&&(e.$scopedSlots=ye(i.data.scopedSlots,e.$slots,e.$scopedSlots)),e.$vnode=i;try{We=e,t=r.call(e._renderProxy,e.$createElement)}catch(n){Wt(n,e,"render"),t=e._vnode}finally{We=null}return Array.isArray(t)&&1===t.length&&(t=t[0]),t instanceof gt||(t=yt()),t.parent=i,t}}(En);var On=[String,RegExp,Array],kn={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:On,exclude:On,max:[String,Number]},methods:{cacheVNode:function(){var t=this.cache,e=this.keys,n=this.vnodeToCache,r=this.keyToCache;if(n){var i=n.tag,o=n.componentInstance,a=n.componentOptions;t[r]={name:An(a),tag:i,componentInstance:o},e.push(r),this.max&&e.length>parseInt(this.max)&&Rn(t,e[0],e,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Rn(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){Ln(t,(function(t){return Pn(e,t)}))})),this.$watch("exclude",(function(e){Ln(t,(function(t){return!Pn(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=qe(t),n=e&&e.componentOptions;if(n){var r=An(n),i=this.include,o=this.exclude;if(i&&(!r||!Pn(i,r))||o&&r&&Pn(o,r))return e;var a=this.cache,s=this.keys,c=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;a[c]?(e.componentInstance=a[c].componentInstance,_(s,c),s.push(c)):(this.vnodeToCache=e,this.keyToCache=c),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return B}};Object.defineProperty(t,"config",e),t.util={warn:lt,extend:L,mergeOptions:Nt,defineReactive:At},t.set=Pt,t.delete=Lt,t.nextTick=ie,t.observable=function(t){return Ct(t),t},t.options=Object.create(null),N.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,L(t.options.components,kn),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=P(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Nt(this.options,t),this}}(t),Cn(t),function(t){N.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&l(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(En),Object.defineProperty(En.prototype,"$isServer",{get:ot}),Object.defineProperty(En.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(En,"FunctionalRenderContext",{value:je}),En.version="2.6.14";var In=g("style,class"),Dn=g("input,textarea,option,select,progress"),jn=function(t,e,n){return"value"===n&&Dn(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},zn=g("contenteditable,draggable,spellcheck"),Nn=g("events,caret,typing,plaintext-only"),Fn=g("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Bn="http://www.w3.org/1999/xlink",Hn=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Gn=function(t){return Hn(t)?t.slice(6,t.length):""},Un=function(t){return null==t||!1===t};function Vn(t){for(var e=t.data,n=t,r=t;o(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=Wn(r.data,e));for(;o(n=n.parent);)n&&n.data&&(e=Wn(e,n.data));return function(t,e){if(o(t)||o(e))return Zn(t,qn(e));return""}(e.staticClass,e.class)}function Wn(t,e){return{staticClass:Zn(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Zn(t,e){return t?e?t+" "+e:t:e||""}function qn(t){return Array.isArray(t)?function(t){for(var e,n="",r=0,i=t.length;r<i;r++)o(e=qn(t[r]))&&""!==e&&(n&&(n+=" "),n+=e);return n}(t):c(t)?function(t){var e="";for(var n in t)t[n]&&(e&&(e+=" "),e+=n);return e}(t):"string"==typeof t?t:""}var Yn={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Jn=g("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Xn=g("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),$n=function(t){return Jn(t)||Xn(t)};function Qn(t){return Xn(t)?"svg":"math"===t?"math":void 0}var Kn=Object.create(null);var tr=g("text,number,password,search,email,tel,url");function er(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}var nr=Object.freeze({createElement:function(t,e){var n=document.createElement(t);return"select"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(t,e){return document.createElementNS(Yn[t],e)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,e,n){t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},appendChild:function(t,e){t.appendChild(e)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,e){t.textContent=e},setStyleScope:function(t,e){t.setAttribute(e,"")}}),rr={create:function(t,e){ir(e)},update:function(t,e){t.data.ref!==e.data.ref&&(ir(t,!0),ir(e))},destroy:function(t){ir(t,!0)}};function ir(t,e){var n=t.data.ref;if(o(n)){var r=t.context,i=t.componentInstance||t.elm,a=r.$refs;e?Array.isArray(a[n])?_(a[n],i):a[n]===i&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])?a[n].indexOf(i)<0&&a[n].push(i):a[n]=[i]:a[n]=i}}var or=new gt("",{},[]),ar=["create","activate","update","remove","destroy"];function sr(t,e){return t.key===e.key&&t.asyncFactory===e.asyncFactory&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&function(t,e){if("input"!==t.tag)return!0;var n,r=o(n=t.data)&&o(n=n.attrs)&&n.type,i=o(n=e.data)&&o(n=n.attrs)&&n.type;return r===i||tr(r)&&tr(i)}(t,e)||a(t.isAsyncPlaceholder)&&i(e.asyncFactory.error))}function cr(t,e,n){var r,i,a={};for(r=e;r<=n;++r)o(i=t[r].key)&&(a[i]=r);return a}var ur={create:lr,update:lr,destroy:function(t){lr(t,or)}};function lr(t,e){(t.data.directives||e.data.directives)&&function(t,e){var n,r,i,o=t===or,a=e===or,s=fr(t.data.directives,t.context),c=fr(e.data.directives,e.context),u=[],l=[];for(n in c)r=s[n],i=c[n],r?(i.oldValue=r.value,i.oldArg=r.arg,pr(i,"update",e,t),i.def&&i.def.componentUpdated&&l.push(i)):(pr(i,"bind",e,t),i.def&&i.def.inserted&&u.push(i));if(u.length){var h=function(){for(var n=0;n<u.length;n++)pr(u[n],"inserted",e,t)};o?le(e,"insert",h):h()}l.length&&le(e,"postpatch",(function(){for(var n=0;n<l.length;n++)pr(l[n],"componentUpdated",e,t)}));if(!o)for(n in s)c[n]||pr(s[n],"unbind",t,t,a)}(t,e)}var hr=Object.create(null);function fr(t,e){var n,r,i=Object.create(null);if(!t)return i;for(n=0;n<t.length;n++)(r=t[n]).modifiers||(r.modifiers=hr),i[dr(r)]=r,r.def=Ft(e.$options,"directives",r.name);return i}function dr(t){return t.rawName||t.name+"."+Object.keys(t.modifiers||{}).join(".")}function pr(t,e,n,r,i){var o=t.def&&t.def[e];if(o)try{o(n.elm,t,n,r,i)}catch(r){Wt(r,n.context,"directive "+t.name+" "+e+" hook")}}var mr=[rr,ur];function gr(t,e){var n=e.componentOptions;if(!(o(n)&&!1===n.Ctor.options.inheritAttrs||i(t.data.attrs)&&i(e.data.attrs))){var r,a,s=e.elm,c=t.data.attrs||{},u=e.data.attrs||{};for(r in o(u.__ob__)&&(u=e.data.attrs=L({},u)),u)a=u[r],c[r]!==a&&vr(s,r,a,e.data.pre);for(r in($||K)&&u.value!==c.value&&vr(s,"value",u.value),c)i(u[r])&&(Hn(r)?s.removeAttributeNS(Bn,Gn(r)):zn(r)||s.removeAttribute(r))}}function vr(t,e,n,r){r||t.tagName.indexOf("-")>-1?yr(t,e,n):Fn(e)?Un(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):zn(e)?t.setAttribute(e,function(t,e){return Un(e)||"false"===e?"false":"contenteditable"===t&&Nn(e)?e:"true"}(e,n)):Hn(e)?Un(n)?t.removeAttributeNS(Bn,Gn(e)):t.setAttributeNS(Bn,e,n):yr(t,e,n)}function yr(t,e,n){if(Un(n))t.removeAttribute(e);else{if($&&!Q&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var _r={create:gr,update:gr};function xr(t,e){var n=e.elm,r=e.data,a=t.data;if(!(i(r.staticClass)&&i(r.class)&&(i(a)||i(a.staticClass)&&i(a.class)))){var s=Vn(e),c=n._transitionClasses;o(c)&&(s=Zn(s,qn(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var br,wr,Mr,Sr,Tr,Er,Cr={create:xr,update:xr},Ar=/[\w).+\-_$\]]/;function Pr(t){var e,n,r,i,o,a=!1,s=!1,c=!1,u=!1,l=0,h=0,f=0,d=0;for(r=0;r<t.length;r++)if(n=e,e=t.charCodeAt(r),a)39===e&&92!==n&&(a=!1);else if(s)34===e&&92!==n&&(s=!1);else if(c)96===e&&92!==n&&(c=!1);else if(u)47===e&&92!==n&&(u=!1);else if(124!==e||124===t.charCodeAt(r+1)||124===t.charCodeAt(r-1)||l||h||f){switch(e){case 34:s=!0;break;case 39:a=!0;break;case 96:c=!0;break;case 40:f++;break;case 41:f--;break;case 91:h++;break;case 93:h--;break;case 123:l++;break;case 125:l--}if(47===e){for(var p=r-1,m=void 0;p>=0&&" "===(m=t.charAt(p));p--);m&&Ar.test(m)||(u=!0)}}else void 0===i?(d=r+1,i=t.slice(0,r).trim()):g();function g(){(o||(o=[])).push(t.slice(d,r).trim()),d=r+1}if(void 0===i?i=t.slice(0,r).trim():0!==d&&g(),o)for(r=0;r<o.length;r++)i=Lr(i,o[r]);return i}function Lr(t,e){var n=e.indexOf("(");if(n<0)return'_f("'+e+'")('+t+")";var r=e.slice(0,n),i=e.slice(n+1);return'_f("'+r+'")('+t+(")"!==i?","+i:i)}function Rr(t,e){console.error("[Vue compiler]: "+t)}function Or(t,e){return t?t.map((function(t){return t[e]})).filter((function(t){return t})):[]}function kr(t,e,n,r,i){(t.props||(t.props=[])).push(Gr({name:e,value:n,dynamic:i},r)),t.plain=!1}function Ir(t,e,n,r,i){(i?t.dynamicAttrs||(t.dynamicAttrs=[]):t.attrs||(t.attrs=[])).push(Gr({name:e,value:n,dynamic:i},r)),t.plain=!1}function Dr(t,e,n,r){t.attrsMap[e]=n,t.attrsList.push(Gr({name:e,value:n},r))}function jr(t,e,n,r,i,o,a,s){(t.directives||(t.directives=[])).push(Gr({name:e,rawName:n,value:r,arg:i,isDynamicArg:o,modifiers:a},s)),t.plain=!1}function zr(t,e,n){return n?"_p("+e+',"'+t+'")':t+e}function Nr(t,e,n,i,o,a,s,c){var u;(i=i||r).right?c?e="("+e+")==='click'?'contextmenu':("+e+")":"click"===e&&(e="contextmenu",delete i.right):i.middle&&(c?e="("+e+")==='click'?'mouseup':("+e+")":"click"===e&&(e="mouseup")),i.capture&&(delete i.capture,e=zr("!",e,c)),i.once&&(delete i.once,e=zr("~",e,c)),i.passive&&(delete i.passive,e=zr("&",e,c)),i.native?(delete i.native,u=t.nativeEvents||(t.nativeEvents={})):u=t.events||(t.events={});var l=Gr({value:n.trim(),dynamic:c},s);i!==r&&(l.modifiers=i);var h=u[e];Array.isArray(h)?o?h.unshift(l):h.push(l):u[e]=h?o?[l,h]:[h,l]:l,t.plain=!1}function Fr(t,e,n){var r=Br(t,":"+e)||Br(t,"v-bind:"+e);if(null!=r)return Pr(r);if(!1!==n){var i=Br(t,e);if(null!=i)return JSON.stringify(i)}}function Br(t,e,n){var r;if(null!=(r=t.attrsMap[e]))for(var i=t.attrsList,o=0,a=i.length;o<a;o++)if(i[o].name===e){i.splice(o,1);break}return n&&delete t.attrsMap[e],r}function Hr(t,e){for(var n=t.attrsList,r=0,i=n.length;r<i;r++){var o=n[r];if(e.test(o.name))return n.splice(r,1),o}}function Gr(t,e){return e&&(null!=e.start&&(t.start=e.start),null!=e.end&&(t.end=e.end)),t}function Ur(t,e,n){var r=n||{},i=r.number,o="$$v";r.trim&&(o="(typeof $$v === 'string'? $$v.trim(): $$v)"),i&&(o="_n("+o+")");var a=Vr(e,o);t.model={value:"("+e+")",expression:JSON.stringify(e),callback:"function ($$v) {"+a+"}"}}function Vr(t,e){var n=function(t){if(t=t.trim(),br=t.length,t.indexOf("[")<0||t.lastIndexOf("]")<br-1)return(Sr=t.lastIndexOf("."))>-1?{exp:t.slice(0,Sr),key:'"'+t.slice(Sr+1)+'"'}:{exp:t,key:null};wr=t,Sr=Tr=Er=0;for(;!Zr();)qr(Mr=Wr())?Jr(Mr):91===Mr&&Yr(Mr);return{exp:t.slice(0,Tr),key:t.slice(Tr+1,Er)}}(t);return null===n.key?t+"="+e:"$set("+n.exp+", "+n.key+", "+e+")"}function Wr(){return wr.charCodeAt(++Sr)}function Zr(){return Sr>=br}function qr(t){return 34===t||39===t}function Yr(t){var e=1;for(Tr=Sr;!Zr();)if(qr(t=Wr()))Jr(t);else if(91===t&&e++,93===t&&e--,0===e){Er=Sr;break}}function Jr(t){for(var e=t;!Zr()&&(t=Wr())!==e;);}var Xr;function $r(t,e,n){var r=Xr;return function i(){var o=e.apply(null,arguments);null!==o&&ti(t,i,n,r)}}var Qr=Xt&&!(et&&Number(et[1])<=53);function Kr(t,e,n,r){if(Qr){var i=ln,o=e;e=o._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=i||t.timeStamp<=0||t.target.ownerDocument!==document)return o.apply(this,arguments)}}Xr.addEventListener(t,e,rt?{capture:n,passive:r}:n)}function ti(t,e,n,r){(r||Xr).removeEventListener(t,e._wrapper||e,n)}function ei(t,e){if(!i(t.data.on)||!i(e.data.on)){var n=e.data.on||{},r=t.data.on||{};Xr=e.elm,function(t){if(o(t.__r)){var e=$?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}o(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(n),ue(n,r,Kr,ti,$r,e.context),Xr=void 0}}var ni,ri={create:ei,update:ei};function ii(t,e){if(!i(t.data.domProps)||!i(e.data.domProps)){var n,r,a=e.elm,s=t.data.domProps||{},c=e.data.domProps||{};for(n in o(c.__ob__)&&(c=e.data.domProps=L({},c)),s)n in c||(a[n]="");for(n in c){if(r=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),r===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=r;var u=i(r)?"":String(r);oi(a,u)&&(a.value=u)}else if("innerHTML"===n&&Xn(a.tagName)&&i(a.innerHTML)){(ni=ni||document.createElement("div")).innerHTML="<svg>"+r+"</svg>";for(var l=ni.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}else if(r!==s[n])try{a[n]=r}catch(t){}}}}function oi(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,r=t._vModifiers;if(o(r)){if(r.number)return m(n)!==m(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var ai={create:ii,update:ii},si=w((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function ci(t){var e=ui(t.style);return t.staticStyle?L(t.staticStyle,e):e}function ui(t){return Array.isArray(t)?R(t):"string"==typeof t?si(t):t}var li,hi=/^--/,fi=/\s*!important$/,di=function(t,e,n){if(hi.test(e))t.style.setProperty(e,n);else if(fi.test(n))t.style.setProperty(C(e),n.replace(fi,""),"important");else{var r=mi(e);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)t.style[r]=n[i];else t.style[r]=n}},pi=["Webkit","Moz","ms"],mi=w((function(t){if(li=li||document.createElement("div").style,"filter"!==(t=S(t))&&t in li)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<pi.length;n++){var r=pi[n]+e;if(r in li)return r}}));function gi(t,e){var n=e.data,r=t.data;if(!(i(n.staticStyle)&&i(n.style)&&i(r.staticStyle)&&i(r.style))){var a,s,c=e.elm,u=r.staticStyle,l=r.normalizedStyle||r.style||{},h=u||l,f=ui(e.data.style)||{};e.data.normalizedStyle=o(f.__ob__)?L({},f):f;var d=function(t,e){var n,r={};if(e)for(var i=t;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=ci(i.data))&&L(r,n);(n=ci(t.data))&&L(r,n);for(var o=t;o=o.parent;)o.data&&(n=ci(o.data))&&L(r,n);return r}(e,!0);for(s in h)i(d[s])&&di(c,s,"");for(s in d)(a=d[s])!==h[s]&&di(c,s,null==a?"":a)}}var vi={create:gi,update:gi},yi=/\s+/;function _i(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(yi).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function xi(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(yi).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function bi(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&L(e,wi(t.name||"v")),L(e,t),e}return"string"==typeof t?wi(t):void 0}}var wi=w((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),Mi=q&&!Q,Si="transition",Ti="transitionend",Ei="animation",Ci="animationend";Mi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Si="WebkitTransition",Ti="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Ei="WebkitAnimation",Ci="webkitAnimationEnd"));var Ai=q?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Pi(t){Ai((function(){Ai(t)}))}function Li(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),_i(t,e))}function Ri(t,e){t._transitionClasses&&_(t._transitionClasses,e),xi(t,e)}function Oi(t,e,n){var r=Ii(t,e),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s="transition"===i?Ti:Ci,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout((function(){c<a&&u()}),o+1),t.addEventListener(s,l)}var ki=/\b(transform|all)(,|$)/;function Ii(t,e){var n,r=window.getComputedStyle(t),i=(r[Si+"Delay"]||"").split(", "),o=(r[Si+"Duration"]||"").split(", "),a=Di(i,o),s=(r[Ei+"Delay"]||"").split(", "),c=(r[Ei+"Duration"]||"").split(", "),u=Di(s,c),l=0,h=0;return"transition"===e?a>0&&(n="transition",l=a,h=o.length):"animation"===e?u>0&&(n="animation",l=u,h=c.length):h=(n=(l=Math.max(a,u))>0?a>u?"transition":"animation":null)?"transition"===n?o.length:c.length:0,{type:n,timeout:l,propCount:h,hasTransform:"transition"===n&&ki.test(r[Si+"Property"])}}function Di(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map((function(e,n){return ji(e)+ji(t[n])})))}function ji(t){return 1e3*Number(t.slice(0,-1).replace(",","."))}function zi(t,e){var n=t.elm;o(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var r=bi(t.data.transition);if(!i(r)&&!o(n._enterCb)&&1===n.nodeType){for(var a=r.css,s=r.type,u=r.enterClass,l=r.enterToClass,h=r.enterActiveClass,f=r.appearClass,d=r.appearToClass,p=r.appearActiveClass,g=r.beforeEnter,v=r.enter,y=r.afterEnter,_=r.enterCancelled,x=r.beforeAppear,b=r.appear,w=r.afterAppear,M=r.appearCancelled,S=r.duration,T=Qe,E=Qe.$vnode;E&&E.parent;)T=E.context,E=E.parent;var C=!T._isMounted||!t.isRootInsert;if(!C||b||""===b){var A=C&&f?f:u,P=C&&p?p:h,L=C&&d?d:l,R=C&&x||g,O=C&&"function"==typeof b?b:v,k=C&&w||y,I=C&&M||_,D=m(c(S)?S.enter:S);0;var j=!1!==a&&!Q,N=Bi(O),F=n._enterCb=z((function(){j&&(Ri(n,L),Ri(n,P)),F.cancelled?(j&&Ri(n,A),I&&I(n)):k&&k(n),n._enterCb=null}));t.data.show||le(t,"insert",(function(){var e=n.parentNode,r=e&&e._pending&&e._pending[t.key];r&&r.tag===t.tag&&r.elm._leaveCb&&r.elm._leaveCb(),O&&O(n,F)})),R&&R(n),j&&(Li(n,A),Li(n,P),Pi((function(){Ri(n,A),F.cancelled||(Li(n,L),N||(Fi(D)?setTimeout(F,D):Oi(n,s,F)))}))),t.data.show&&(e&&e(),O&&O(n,F)),j||N||F()}}}function Ni(t,e){var n=t.elm;o(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var r=bi(t.data.transition);if(i(r)||1!==n.nodeType)return e();if(!o(n._leaveCb)){var a=r.css,s=r.type,u=r.leaveClass,l=r.leaveToClass,h=r.leaveActiveClass,f=r.beforeLeave,d=r.leave,p=r.afterLeave,g=r.leaveCancelled,v=r.delayLeave,y=r.duration,_=!1!==a&&!Q,x=Bi(d),b=m(c(y)?y.leave:y);0;var w=n._leaveCb=z((function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[t.key]=null),_&&(Ri(n,l),Ri(n,h)),w.cancelled?(_&&Ri(n,u),g&&g(n)):(e(),p&&p(n)),n._leaveCb=null}));v?v(M):M()}function M(){w.cancelled||(!t.data.show&&n.parentNode&&((n.parentNode._pending||(n.parentNode._pending={}))[t.key]=t),f&&f(n),_&&(Li(n,u),Li(n,h),Pi((function(){Ri(n,u),w.cancelled||(Li(n,l),x||(Fi(b)?setTimeout(w,b):Oi(n,s,w)))}))),d&&d(n,w),_||x||w())}}function Fi(t){return"number"==typeof t&&!isNaN(t)}function Bi(t){if(i(t))return!1;var e=t.fns;return o(e)?Bi(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function Hi(t,e){!0!==e.data.show&&zi(e)}var Gi=function(t){var e,n,r={},c=t.modules,u=t.nodeOps;for(e=0;e<ar.length;++e)for(r[ar[e]]=[],n=0;n<c.length;++n)o(c[n][ar[e]])&&r[ar[e]].push(c[n][ar[e]]);function l(t){var e=u.parentNode(t);o(e)&&u.removeChild(e,t)}function h(t,e,n,i,s,c,l){if(o(t.elm)&&o(c)&&(t=c[l]=xt(t)),t.isRootInsert=!s,!function(t,e,n,i){var s=t.data;if(o(s)){var c=o(t.componentInstance)&&s.keepAlive;if(o(s=s.hook)&&o(s=s.init)&&s(t,!1),o(t.componentInstance))return f(t,e),d(n,t.elm,i),a(c)&&function(t,e,n,i){var a,s=t;for(;s.componentInstance;)if(s=s.componentInstance._vnode,o(a=s.data)&&o(a=a.transition)){for(a=0;a<r.activate.length;++a)r.activate[a](or,s);e.push(s);break}d(n,t.elm,i)}(t,e,n,i),!0}}(t,e,n,i)){var h=t.data,m=t.children,g=t.tag;o(g)?(t.elm=t.ns?u.createElementNS(t.ns,g):u.createElement(g,t),y(t),p(t,m,e),o(h)&&v(t,e),d(n,t.elm,i)):a(t.isComment)?(t.elm=u.createComment(t.text),d(n,t.elm,i)):(t.elm=u.createTextNode(t.text),d(n,t.elm,i))}}function f(t,e){o(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,m(t)?(v(t,e),y(t)):(ir(t),e.push(t))}function d(t,e,n){o(t)&&(o(n)?u.parentNode(n)===t&&u.insertBefore(t,e,n):u.appendChild(t,e))}function p(t,e,n){if(Array.isArray(e)){0;for(var r=0;r<e.length;++r)h(e[r],n,t.elm,null,!0,e,r)}else s(t.text)&&u.appendChild(t.elm,u.createTextNode(String(t.text)))}function m(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return o(t.tag)}function v(t,n){for(var i=0;i<r.create.length;++i)r.create[i](or,t);o(e=t.data.hook)&&(o(e.create)&&e.create(or,t),o(e.insert)&&n.push(t))}function y(t){var e;if(o(e=t.fnScopeId))u.setStyleScope(t.elm,e);else for(var n=t;n;)o(e=n.context)&&o(e=e.$options._scopeId)&&u.setStyleScope(t.elm,e),n=n.parent;o(e=Qe)&&e!==t.context&&e!==t.fnContext&&o(e=e.$options._scopeId)&&u.setStyleScope(t.elm,e)}function _(t,e,n,r,i,o){for(;r<=i;++r)h(n[r],o,t,e,!1,n,r)}function x(t){var e,n,i=t.data;if(o(i))for(o(e=i.hook)&&o(e=e.destroy)&&e(t),e=0;e<r.destroy.length;++e)r.destroy[e](t);if(o(e=t.children))for(n=0;n<t.children.length;++n)x(t.children[n])}function b(t,e,n){for(;e<=n;++e){var r=t[e];o(r)&&(o(r.tag)?(w(r),x(r)):l(r.elm))}}function w(t,e){if(o(e)||o(t.data)){var n,i=r.remove.length+1;for(o(e)?e.listeners+=i:e=function(t,e){function n(){0==--n.listeners&&l(t)}return n.listeners=e,n}(t.elm,i),o(n=t.componentInstance)&&o(n=n._vnode)&&o(n.data)&&w(n,e),n=0;n<r.remove.length;++n)r.remove[n](t,e);o(n=t.data.hook)&&o(n=n.remove)?n(t,e):e()}else l(t.elm)}function M(t,e,n,r){for(var i=n;i<r;i++){var a=e[i];if(o(a)&&sr(t,a))return i}}function S(t,e,n,s,c,l){if(t!==e){o(e.elm)&&o(s)&&(e=s[c]=xt(e));var f=e.elm=t.elm;if(a(t.isAsyncPlaceholder))o(e.asyncFactory.resolved)?C(t.elm,e,n):e.isAsyncPlaceholder=!0;else if(a(e.isStatic)&&a(t.isStatic)&&e.key===t.key&&(a(e.isCloned)||a(e.isOnce)))e.componentInstance=t.componentInstance;else{var d,p=e.data;o(p)&&o(d=p.hook)&&o(d=d.prepatch)&&d(t,e);var g=t.children,v=e.children;if(o(p)&&m(e)){for(d=0;d<r.update.length;++d)r.update[d](t,e);o(d=p.hook)&&o(d=d.update)&&d(t,e)}i(e.text)?o(g)&&o(v)?g!==v&&function(t,e,n,r,a){var s,c,l,f=0,d=0,p=e.length-1,m=e[0],g=e[p],v=n.length-1,y=n[0],x=n[v],w=!a;for(0;f<=p&&d<=v;)i(m)?m=e[++f]:i(g)?g=e[--p]:sr(m,y)?(S(m,y,r,n,d),m=e[++f],y=n[++d]):sr(g,x)?(S(g,x,r,n,v),g=e[--p],x=n[--v]):sr(m,x)?(S(m,x,r,n,v),w&&u.insertBefore(t,m.elm,u.nextSibling(g.elm)),m=e[++f],x=n[--v]):sr(g,y)?(S(g,y,r,n,d),w&&u.insertBefore(t,g.elm,m.elm),g=e[--p],y=n[++d]):(i(s)&&(s=cr(e,f,p)),i(c=o(y.key)?s[y.key]:M(y,e,f,p))?h(y,r,t,m.elm,!1,n,d):sr(l=e[c],y)?(S(l,y,r,n,d),e[c]=void 0,w&&u.insertBefore(t,l.elm,m.elm)):h(y,r,t,m.elm,!1,n,d),y=n[++d]);f>p?_(t,i(n[v+1])?null:n[v+1].elm,n,d,v,r):d>v&&b(e,f,p)}(f,g,v,n,l):o(v)?(o(t.text)&&u.setTextContent(f,""),_(f,null,v,0,v.length-1,n)):o(g)?b(g,0,g.length-1):o(t.text)&&u.setTextContent(f,""):t.text!==e.text&&u.setTextContent(f,e.text),o(p)&&o(d=p.hook)&&o(d=d.postpatch)&&d(t,e)}}}function T(t,e,n){if(a(n)&&o(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r<e.length;++r)e[r].data.hook.insert(e[r])}var E=g("attrs,class,staticClass,staticStyle,key");function C(t,e,n,r){var i,s=e.tag,c=e.data,u=e.children;if(r=r||c&&c.pre,e.elm=t,a(e.isComment)&&o(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(o(c)&&(o(i=c.hook)&&o(i=i.init)&&i(e,!0),o(i=e.componentInstance)))return f(e,n),!0;if(o(s)){if(o(u))if(t.hasChildNodes())if(o(i=c)&&o(i=i.domProps)&&o(i=i.innerHTML)){if(i!==t.innerHTML)return!1}else{for(var l=!0,h=t.firstChild,d=0;d<u.length;d++){if(!h||!C(h,u[d],n,r)){l=!1;break}h=h.nextSibling}if(!l||h)return!1}else p(e,u,n);if(o(c)){var m=!1;for(var g in c)if(!E(g)){m=!0,v(e,n);break}!m&&c.class&&ae(c.class)}}else t.data!==e.text&&(t.data=e.text);return!0}return function(t,e,n,s){if(!i(e)){var c,l=!1,f=[];if(i(t))l=!0,h(e,f);else{var d=o(t.nodeType);if(!d&&sr(t,e))S(t,e,f,null,null,s);else{if(d){if(1===t.nodeType&&t.hasAttribute("data-server-rendered")&&(t.removeAttribute("data-server-rendered"),n=!0),a(n)&&C(t,e,f))return T(e,f,!0),t;c=t,t=new gt(u.tagName(c).toLowerCase(),{},[],void 0,c)}var p=t.elm,g=u.parentNode(p);if(h(e,f,p._leaveCb?null:g,u.nextSibling(p)),o(e.parent))for(var v=e.parent,y=m(e);v;){for(var _=0;_<r.destroy.length;++_)r.destroy[_](v);if(v.elm=e.elm,y){for(var w=0;w<r.create.length;++w)r.create[w](or,v);var M=v.data.hook.insert;if(M.merged)for(var E=1;E<M.fns.length;E++)M.fns[E]()}else ir(v);v=v.parent}o(g)?b([t],0,0):o(t.tag)&&x(t)}}return T(e,f,l),e.elm}o(t)&&x(t)}}({nodeOps:nr,modules:[_r,Cr,ri,ai,vi,q?{create:Hi,activate:Hi,remove:function(t,e){!0!==t.data.show?Ni(t,e):e()}}:{}].concat(mr)});Q&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&Xi(t,"input")}));var Ui={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?le(n,"postpatch",(function(){Ui.componentUpdated(t,e,n)})):Vi(t,e,n.context),t._vOptions=[].map.call(t.options,qi)):("textarea"===n.tag||tr(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",Yi),t.addEventListener("compositionend",Ji),t.addEventListener("change",Ji),Q&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){Vi(t,e,n.context);var r=t._vOptions,i=t._vOptions=[].map.call(t.options,qi);if(i.some((function(t,e){return!D(t,r[e])})))(t.multiple?e.value.some((function(t){return Zi(t,i)})):e.value!==e.oldValue&&Zi(e.value,i))&&Xi(t,"change")}}};function Vi(t,e,n){Wi(t,e,n),($||K)&&setTimeout((function(){Wi(t,e,n)}),0)}function Wi(t,e,n){var r=e.value,i=t.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=t.options.length;s<c;s++)if(a=t.options[s],i)o=j(r,qi(a))>-1,a.selected!==o&&(a.selected=o);else if(D(qi(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}}function Zi(t,e){return e.every((function(e){return!D(e,t)}))}function qi(t){return"_value"in t?t._value:t.value}function Yi(t){t.target.composing=!0}function Ji(t){t.target.composing&&(t.target.composing=!1,Xi(t.target,"input"))}function Xi(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function $i(t){return!t.componentInstance||t.data&&t.data.transition?t:$i(t.componentInstance._vnode)}var Qi={model:Ui,show:{bind:function(t,e,n){var r=e.value,i=(n=$i(n)).data&&n.data.transition,o=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&i?(n.data.show=!0,zi(n,(function(){t.style.display=o}))):t.style.display=r?o:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=$i(n)).data&&n.data.transition?(n.data.show=!0,r?zi(n,(function(){t.style.display=t.__vOriginalDisplay})):Ni(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,i){i||(t.style.display=t.__vOriginalDisplay)}}},Ki={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function to(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?to(qe(e.children)):t}function eo(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var i=n._parentListeners;for(var o in i)e[S(o)]=i[o];return e}function no(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var ro=function(t){return t.tag||ve(t)},io=function(t){return"show"===t.name},oo={name:"transition",props:Ki,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(ro)).length){0;var r=this.mode;0;var i=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return i;var o=to(i);if(!o)return i;if(this._leaving)return no(t,i);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:s(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var c=(o.data||(o.data={})).transition=eo(this),u=this._vnode,l=to(u);if(o.data.directives&&o.data.directives.some(io)&&(o.data.show=!0),l&&l.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(o,l)&&!ve(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var h=l.data.transition=L({},c);if("out-in"===r)return this._leaving=!0,le(h,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),no(t,i);if("in-out"===r){if(ve(o))return u;var f,d=function(){f()};le(c,"afterEnter",d),le(c,"enterCancelled",d),le(h,"delayLeave",(function(t){f=t}))}}return i}}},ao=L({tag:String,moveClass:String},Ki);function so(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function co(t){t.data.newPos=t.elm.getBoundingClientRect()}function uo(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,i=e.top-n.top;if(r||i){t.data.moved=!0;var o=t.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete ao.mode;var lo={Transition:oo,TransitionGroup:{props:ao,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var i=Ke(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,i(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=eo(this),s=0;s<i.length;s++){var c=i[s];if(c.tag)if(null!=c.key&&0!==String(c.key).indexOf("__vlist"))o.push(c),n[c.key]=c,(c.data||(c.data={})).transition=a;else;}if(r){for(var u=[],l=[],h=0;h<r.length;h++){var f=r[h];f.data.transition=a,f.data.pos=f.elm.getBoundingClientRect(),n[f.key]?u.push(f):l.push(f)}this.kept=t(e,null,u),this.removed=l}return t(e,null,o)},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(so),t.forEach(co),t.forEach(uo),this._reflow=document.body.offsetHeight,t.forEach((function(t){if(t.data.moved){var n=t.elm,r=n.style;Li(n,e),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Ti,n._moveCb=function t(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Ti,t),n._moveCb=null,Ri(n,e))})}})))},methods:{hasMove:function(t,e){if(!Mi)return!1;if(this._hasMove)return this._hasMove;var n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach((function(t){xi(n,t)})),_i(n,e),n.style.display="none",this.$el.appendChild(n);var r=Ii(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}}};En.config.mustUseProp=jn,En.config.isReservedTag=$n,En.config.isReservedAttr=In,En.config.getTagNamespace=Qn,En.config.isUnknownElement=function(t){if(!q)return!0;if($n(t))return!1;if(t=t.toLowerCase(),null!=Kn[t])return Kn[t];var e=document.createElement(t);return t.indexOf("-")>-1?Kn[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Kn[t]=/HTMLUnknownElement/.test(e.toString())},L(En.options.directives,Qi),L(En.options.components,lo),En.prototype.__patch__=q?Gi:O,En.prototype.$mount=function(t,e){return function(t,e,n){var r;return t.$el=e,t.$options.render||(t.$options.render=yt),nn(t,"beforeMount"),r=function(){t._update(t._render(),n)},new mn(t,r,O,{before:function(){t._isMounted&&!t._isDestroyed&&nn(t,"beforeUpdate")}},!0),n=!1,null==t.$vnode&&(t._isMounted=!0,nn(t,"mounted")),t}(this,t=t&&q?er(t):void 0,e)},q&&setTimeout((function(){B.devtools&&at&&at.emit("init",En)}),0);var ho=/\{\{((?:.|\r?\n)+?)\}\}/g,fo=/[-.*+?^${}()|[\]\/\\]/g,po=w((function(t){var e=t[0].replace(fo,"\\$&"),n=t[1].replace(fo,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")}));var mo={staticKeys:["staticClass"],transformNode:function(t,e){e.warn;var n=Br(t,"class");n&&(t.staticClass=JSON.stringify(n));var r=Fr(t,"class",!1);r&&(t.classBinding=r)},genData:function(t){var e="";return t.staticClass&&(e+="staticClass:"+t.staticClass+","),t.classBinding&&(e+="class:"+t.classBinding+","),e}};var go,vo={staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;var n=Br(t,"style");n&&(t.staticStyle=JSON.stringify(si(n)));var r=Fr(t,"style",!1);r&&(t.styleBinding=r)},genData:function(t){var e="";return t.staticStyle&&(e+="staticStyle:"+t.staticStyle+","),t.styleBinding&&(e+="style:("+t.styleBinding+"),"),e}},yo=function(t){return(go=go||document.createElement("div")).innerHTML=t,go.textContent},_o=g("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),xo=g("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),bo=g("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),wo=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Mo=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,So="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+H.source+"]*",To="((?:"+So+"\\:)?"+So+")",Eo=new RegExp("^<"+To),Co=/^\s*(\/?)>/,Ao=new RegExp("^<\\/"+To+"[^>]*>"),Po=/^<!DOCTYPE [^>]+>/i,Lo=/^<!\--/,Ro=/^<!\[/,Oo=g("script,style,textarea",!0),ko={},Io={"<":"<",">":">",""":'"',"&":"&"," ":"\n","	":"\t","'":"'"},Do=/&(?:lt|gt|quot|amp|#39);/g,jo=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,zo=g("pre,textarea",!0),No=function(t,e){return t&&zo(t)&&"\n"===e[0]};function Fo(t,e){var n=e?jo:Do;return t.replace(n,(function(t){return Io[t]}))}var Bo,Ho,Go,Uo,Vo,Wo,Zo,qo,Yo=/^@|^v-on:/,Jo=/^v-|^@|^:|^#/,Xo=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,$o=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Qo=/^\(|\)$/g,Ko=/^\[.*\]$/,ta=/:(.*)$/,ea=/^:|^\.|^v-bind:/,na=/\.[^.\]]+(?=[^\]]*$)/g,ra=/^v-slot(:|$)|^#/,ia=/[\r\n]/,oa=/[ \f\t\r\n]+/g,aa=w(yo);function sa(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:pa(e),rawAttrsMap:{},parent:n,children:[]}}function ca(t,e){Bo=e.warn||Rr,Wo=e.isPreTag||k,Zo=e.mustUseProp||k,qo=e.getTagNamespace||k;var n=e.isReservedTag||k;(function(t){return!(!(t.component||t.attrsMap[":is"]||t.attrsMap["v-bind:is"])&&(t.attrsMap.is?n(t.attrsMap.is):n(t.tag)))}),Go=Or(e.modules,"transformNode"),Uo=Or(e.modules,"preTransformNode"),Vo=Or(e.modules,"postTransformNode"),Ho=e.delimiters;var r,i,o=[],a=!1!==e.preserveWhitespace,s=e.whitespace,c=!1,u=!1;function l(t){if(h(t),c||t.processed||(t=ua(t,e)),o.length||t===r||r.if&&(t.elseif||t.else)&&ha(r,{exp:t.elseif,block:t}),i&&!t.forbidden)if(t.elseif||t.else)a=t,(s=function(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}(i.children))&&s.if&&ha(s,{exp:a.elseif,block:a});else{if(t.slotScope){var n=t.slotTarget||'"default"';(i.scopedSlots||(i.scopedSlots={}))[n]=t}i.children.push(t),t.parent=i}var a,s;t.children=t.children.filter((function(t){return!t.slotScope})),h(t),t.pre&&(c=!1),Wo(t.tag)&&(u=!1);for(var l=0;l<Vo.length;l++)Vo[l](t,e)}function h(t){if(!u)for(var e;(e=t.children[t.children.length-1])&&3===e.type&&" "===e.text;)t.children.pop()}return function(t,e){for(var n,r,i=[],o=e.expectHTML,a=e.isUnaryTag||k,s=e.canBeLeftOpenTag||k,c=0;t;){if(n=t,r&&Oo(r)){var u=0,l=r.toLowerCase(),h=ko[l]||(ko[l]=new RegExp("([\\s\\S]*?)(</"+l+"[^>]*>)","i")),f=t.replace(h,(function(t,n,r){return u=r.length,Oo(l)||"noscript"===l||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),No(l,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""}));c+=t.length-f.length,t=f,E(l,c-u,c)}else{var d=t.indexOf("<");if(0===d){if(Lo.test(t)){var p=t.indexOf("--\x3e");if(p>=0){e.shouldKeepComment&&e.comment(t.substring(4,p),c,c+p+3),M(p+3);continue}}if(Ro.test(t)){var m=t.indexOf("]>");if(m>=0){M(m+2);continue}}var g=t.match(Po);if(g){M(g[0].length);continue}var v=t.match(Ao);if(v){var y=c;M(v[0].length),E(v[1],y,c);continue}var _=S();if(_){T(_),No(_.tagName,t)&&M(1);continue}}var x=void 0,b=void 0,w=void 0;if(d>=0){for(b=t.slice(d);!(Ao.test(b)||Eo.test(b)||Lo.test(b)||Ro.test(b)||(w=b.indexOf("<",1))<0);)d+=w,b=t.slice(d);x=t.substring(0,d)}d<0&&(x=t),x&&M(x.length),e.chars&&x&&e.chars(x,c-x.length,c)}if(t===n){e.chars&&e.chars(t);break}}function M(e){c+=e,t=t.substring(e)}function S(){var e=t.match(Eo);if(e){var n,r,i={tagName:e[1],attrs:[],start:c};for(M(e[0].length);!(n=t.match(Co))&&(r=t.match(Mo)||t.match(wo));)r.start=c,M(r[0].length),r.end=c,i.attrs.push(r);if(n)return i.unarySlash=n[1],M(n[0].length),i.end=c,i}}function T(t){var n=t.tagName,c=t.unarySlash;o&&("p"===r&&bo(n)&&E(r),s(n)&&r===n&&E(n));for(var u=a(n)||!!c,l=t.attrs.length,h=new Array(l),f=0;f<l;f++){var d=t.attrs[f],p=d[3]||d[4]||d[5]||"",m="a"===n&&"href"===d[1]?e.shouldDecodeNewlinesForHref:e.shouldDecodeNewlines;h[f]={name:d[1],value:Fo(p,m)}}u||(i.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:h,start:t.start,end:t.end}),r=n),e.start&&e.start(n,h,u,t.start,t.end)}function E(t,n,o){var a,s;if(null==n&&(n=c),null==o&&(o=c),t)for(s=t.toLowerCase(),a=i.length-1;a>=0&&i[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=i.length-1;u>=a;u--)e.end&&e.end(i[u].tag,n,o);i.length=a,r=a&&i[a-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,o):"p"===s&&(e.start&&e.start(t,[],!1,n,o),e.end&&e.end(t,n,o))}E()}(t,{warn:Bo,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,outputSourceRange:e.outputSourceRange,start:function(t,n,a,s,h){var f=i&&i.ns||qo(t);$&&"svg"===f&&(n=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];ma.test(r.name)||(r.name=r.name.replace(ga,""),e.push(r))}return e}(n));var d,p=sa(t,n,i);f&&(p.ns=f),"style"!==(d=p).tag&&("script"!==d.tag||d.attrsMap.type&&"text/javascript"!==d.attrsMap.type)||ot()||(p.forbidden=!0);for(var m=0;m<Uo.length;m++)p=Uo[m](p,e)||p;c||(!function(t){null!=Br(t,"v-pre")&&(t.pre=!0)}(p),p.pre&&(c=!0)),Wo(p.tag)&&(u=!0),c?function(t){var e=t.attrsList,n=e.length;if(n)for(var r=t.attrs=new Array(n),i=0;i<n;i++)r[i]={name:e[i].name,value:JSON.stringify(e[i].value)},null!=e[i].start&&(r[i].start=e[i].start,r[i].end=e[i].end);else t.pre||(t.plain=!0)}(p):p.processed||(la(p),function(t){var e=Br(t,"v-if");if(e)t.if=e,ha(t,{exp:e,block:t});else{null!=Br(t,"v-else")&&(t.else=!0);var n=Br(t,"v-else-if");n&&(t.elseif=n)}}(p),function(t){null!=Br(t,"v-once")&&(t.once=!0)}(p)),r||(r=p),a?l(p):(i=p,o.push(p))},end:function(t,e,n){var r=o[o.length-1];o.length-=1,i=o[o.length-1],l(r)},chars:function(t,e,n){if(i&&(!$||"textarea"!==i.tag||i.attrsMap.placeholder!==t)){var r,o,l,h=i.children;if(t=u||t.trim()?"script"===(r=i).tag||"style"===r.tag?t:aa(t):h.length?s?"condense"===s&&ia.test(t)?"":" ":a?" ":"":"")u||"condense"!==s||(t=t.replace(oa," ")),!c&&" "!==t&&(o=function(t,e){var n=e?po(e):ho;if(n.test(t)){for(var r,i,o,a=[],s=[],c=n.lastIndex=0;r=n.exec(t);){(i=r.index)>c&&(s.push(o=t.slice(c,i)),a.push(JSON.stringify(o)));var u=Pr(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),c=i+r[0].length}return c<t.length&&(s.push(o=t.slice(c)),a.push(JSON.stringify(o))),{expression:a.join("+"),tokens:s}}}(t,Ho))?l={type:2,expression:o.expression,tokens:o.tokens,text:t}:" "===t&&h.length&&" "===h[h.length-1].text||(l={type:3,text:t}),l&&h.push(l)}},comment:function(t,e,n){if(i){var r={type:3,text:t,isComment:!0};0,i.children.push(r)}}}),r}function ua(t,e){var n;!function(t){var e=Fr(t,"key");if(e){t.key=e}}(t),t.plain=!t.key&&!t.scopedSlots&&!t.attrsList.length,function(t){var e=Fr(t,"ref");e&&(t.ref=e,t.refInFor=function(t){var e=t;for(;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}(t))}(t),function(t){var e;"template"===t.tag?(e=Br(t,"scope"),t.slotScope=e||Br(t,"slot-scope")):(e=Br(t,"slot-scope"))&&(t.slotScope=e);var n=Fr(t,"slot");n&&(t.slotTarget='""'===n?'"default"':n,t.slotTargetDynamic=!(!t.attrsMap[":slot"]&&!t.attrsMap["v-bind:slot"]),"template"===t.tag||t.slotScope||Ir(t,"slot",n,function(t,e){return t.rawAttrsMap[":"+e]||t.rawAttrsMap["v-bind:"+e]||t.rawAttrsMap[e]}(t,"slot")));if("template"===t.tag){var r=Hr(t,ra);if(r){0;var i=fa(r),o=i.name,a=i.dynamic;t.slotTarget=o,t.slotTargetDynamic=a,t.slotScope=r.value||"_empty_"}}else{var s=Hr(t,ra);if(s){0;var c=t.scopedSlots||(t.scopedSlots={}),u=fa(s),l=u.name,h=u.dynamic,f=c[l]=sa("template",[],t);f.slotTarget=l,f.slotTargetDynamic=h,f.children=t.children.filter((function(t){if(!t.slotScope)return t.parent=f,!0})),f.slotScope=s.value||"_empty_",t.children=[],t.plain=!1}}}(t),"slot"===(n=t).tag&&(n.slotName=Fr(n,"name")),function(t){var e;(e=Fr(t,"is"))&&(t.component=e);null!=Br(t,"inline-template")&&(t.inlineTemplate=!0)}(t);for(var r=0;r<Go.length;r++)t=Go[r](t,e)||t;return function(t){var e,n,r,i,o,a,s,c,u=t.attrsList;for(e=0,n=u.length;e<n;e++){if(r=i=u[e].name,o=u[e].value,Jo.test(r))if(t.hasBindings=!0,(a=da(r.replace(Jo,"")))&&(r=r.replace(na,"")),ea.test(r))r=r.replace(ea,""),o=Pr(o),(c=Ko.test(r))&&(r=r.slice(1,-1)),a&&(a.prop&&!c&&"innerHtml"===(r=S(r))&&(r="innerHTML"),a.camel&&!c&&(r=S(r)),a.sync&&(s=Vr(o,"$event"),c?Nr(t,'"update:"+('+r+")",s,null,!1,0,u[e],!0):(Nr(t,"update:"+S(r),s,null,!1,0,u[e]),C(r)!==S(r)&&Nr(t,"update:"+C(r),s,null,!1,0,u[e])))),a&&a.prop||!t.component&&Zo(t.tag,t.attrsMap.type,r)?kr(t,r,o,u[e],c):Ir(t,r,o,u[e],c);else if(Yo.test(r))r=r.replace(Yo,""),(c=Ko.test(r))&&(r=r.slice(1,-1)),Nr(t,r,o,a,!1,0,u[e],c);else{var l=(r=r.replace(Jo,"")).match(ta),h=l&&l[1];c=!1,h&&(r=r.slice(0,-(h.length+1)),Ko.test(h)&&(h=h.slice(1,-1),c=!0)),jr(t,r,i,o,h,c,a,u[e])}else Ir(t,r,JSON.stringify(o),u[e]),!t.component&&"muted"===r&&Zo(t.tag,t.attrsMap.type,r)&&kr(t,r,"true",u[e])}}(t),t}function la(t){var e;if(e=Br(t,"v-for")){var n=function(t){var e=t.match(Xo);if(!e)return;var n={};n.for=e[2].trim();var r=e[1].trim().replace(Qo,""),i=r.match($o);i?(n.alias=r.replace($o,"").trim(),n.iterator1=i[1].trim(),i[2]&&(n.iterator2=i[2].trim())):n.alias=r;return n}(e);n&&L(t,n)}}function ha(t,e){t.ifConditions||(t.ifConditions=[]),t.ifConditions.push(e)}function fa(t){var e=t.name.replace(ra,"");return e||"#"!==t.name[0]&&(e="default"),Ko.test(e)?{name:e.slice(1,-1),dynamic:!0}:{name:'"'+e+'"',dynamic:!1}}function da(t){var e=t.match(na);if(e){var n={};return e.forEach((function(t){n[t.slice(1)]=!0})),n}}function pa(t){for(var e={},n=0,r=t.length;n<r;n++)e[t[n].name]=t[n].value;return e}var ma=/^xmlns:NS\d+/,ga=/^NS\d+:/;function va(t){return sa(t.tag,t.attrsList.slice(),t.parent)}var ya=[mo,vo,{preTransformNode:function(t,e){if("input"===t.tag){var n,r=t.attrsMap;if(!r["v-model"])return;if((r[":type"]||r["v-bind:type"])&&(n=Fr(t,"type")),r.type||n||!r["v-bind"]||(n="("+r["v-bind"]+").type"),n){var i=Br(t,"v-if",!0),o=i?"&&("+i+")":"",a=null!=Br(t,"v-else",!0),s=Br(t,"v-else-if",!0),c=va(t);la(c),Dr(c,"type","checkbox"),ua(c,e),c.processed=!0,c.if="("+n+")==='checkbox'"+o,ha(c,{exp:c.if,block:c});var u=va(t);Br(u,"v-for",!0),Dr(u,"type","radio"),ua(u,e),ha(c,{exp:"("+n+")==='radio'"+o,block:u});var l=va(t);return Br(l,"v-for",!0),Dr(l,":type",n),ua(l,e),ha(c,{exp:i,block:l}),a?c.else=!0:s&&(c.elseif=s),c}}}}];var _a,xa,ba={expectHTML:!0,modules:ya,directives:{model:function(t,e,n){n;var r=e.value,i=e.modifiers,o=t.tag,a=t.attrsMap.type;if(t.component)return Ur(t,r,i),!1;if("select"===o)!function(t,e,n){var r='var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(n&&n.number?"_n(val)":"val")+"});";r=r+" "+Vr(e,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),Nr(t,"change",r,null,!0)}(t,r,i);else if("input"===o&&"checkbox"===a)!function(t,e,n){var r=n&&n.number,i=Fr(t,"value")||"null",o=Fr(t,"true-value")||"true",a=Fr(t,"false-value")||"false";kr(t,"checked","Array.isArray("+e+")?_i("+e+","+i+")>-1"+("true"===o?":("+e+")":":_q("+e+","+o+")")),Nr(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Vr(e,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Vr(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Vr(e,"$$c")+"}",null,!0)}(t,r,i);else if("input"===o&&"radio"===a)!function(t,e,n){var r=n&&n.number,i=Fr(t,"value")||"null";kr(t,"checked","_q("+e+","+(i=r?"_n("+i+")":i)+")"),Nr(t,"change",Vr(e,i),null,!0)}(t,r,i);else if("input"===o||"textarea"===o)!function(t,e,n){var r=t.attrsMap.type;0;var i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?"__r":"input",l="$event.target.value";s&&(l="$event.target.value.trim()");a&&(l="_n("+l+")");var h=Vr(e,l);c&&(h="if($event.target.composing)return;"+h);kr(t,"value","("+e+")"),Nr(t,u,h,null,!0),(s||a)&&Nr(t,"blur","$forceUpdate()")}(t,r,i);else{if(!B.isReservedTag(o))return Ur(t,r,i),!1}return!0},text:function(t,e){e.value&&kr(t,"textContent","_s("+e.value+")",e)},html:function(t,e){e.value&&kr(t,"innerHTML","_s("+e.value+")",e)}},isPreTag:function(t){return"pre"===t},isUnaryTag:_o,mustUseProp:jn,canBeLeftOpenTag:xo,isReservedTag:$n,getTagNamespace:Qn,staticKeys:function(t){return t.reduce((function(t,e){return t.concat(e.staticKeys||[])}),[]).join(",")}(ya)},wa=w((function(t){return g("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(t?","+t:""))}));function Ma(t,e){t&&(_a=wa(e.staticKeys||""),xa=e.isReservedTag||k,function t(e){if(e.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||v(t.tag)||!xa(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(_a)))}(e),1===e.type){if(!xa(e.tag)&&"slot"!==e.tag&&null==e.attrsMap["inline-template"])return;for(var n=0,r=e.children.length;n<r;n++){var i=e.children[n];t(i),i.static||(e.static=!1)}if(e.ifConditions)for(var o=1,a=e.ifConditions.length;o<a;o++){var s=e.ifConditions[o].block;t(s),s.static||(e.static=!1)}}}(t),function t(e,n){if(1===e.type){if((e.static||e.once)&&(e.staticInFor=n),e.static&&e.children.length&&(1!==e.children.length||3!==e.children[0].type))return void(e.staticRoot=!0);if(e.staticRoot=!1,e.children)for(var r=0,i=e.children.length;r<i;r++)t(e.children[r],n||!!e.for);if(e.ifConditions)for(var o=1,a=e.ifConditions.length;o<a;o++)t(e.ifConditions[o].block,n)}}(t,!1))}var Sa=/^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/,Ta=/\([^)]*?\);*$/,Ea=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ca={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Aa={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Pa=function(t){return"if("+t+")return null;"},La={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Pa("$event.target !== $event.currentTarget"),ctrl:Pa("!$event.ctrlKey"),shift:Pa("!$event.shiftKey"),alt:Pa("!$event.altKey"),meta:Pa("!$event.metaKey"),left:Pa("'button' in $event && $event.button !== 0"),middle:Pa("'button' in $event && $event.button !== 1"),right:Pa("'button' in $event && $event.button !== 2")};function Ra(t,e){var n=e?"nativeOn:":"on:",r="",i="";for(var o in t){var a=Oa(t[o]);t[o]&&t[o].dynamic?i+=o+","+a+",":r+='"'+o+'":'+a+","}return r="{"+r.slice(0,-1)+"}",i?n+"_d("+r+",["+i.slice(0,-1)+"])":n+r}function Oa(t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map((function(t){return Oa(t)})).join(",")+"]";var e=Ea.test(t.value),n=Sa.test(t.value),r=Ea.test(t.value.replace(Ta,""));if(t.modifiers){var i="",o="",a=[];for(var s in t.modifiers)if(La[s])o+=La[s],Ca[s]&&a.push(s);else if("exact"===s){var c=t.modifiers;o+=Pa(["ctrl","shift","alt","meta"].filter((function(t){return!c[t]})).map((function(t){return"$event."+t+"Key"})).join("||"))}else a.push(s);return a.length&&(i+=function(t){return"if(!$event.type.indexOf('key')&&"+t.map(ka).join("&&")+")return null;"}(a)),o&&(i+=o),"function($event){"+i+(e?"return "+t.value+".apply(null, arguments)":n?"return ("+t.value+").apply(null, arguments)":r?"return "+t.value:t.value)+"}"}return e||n?t.value:"function($event){"+(r?"return "+t.value:t.value)+"}"}function ka(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var n=Ca[t],r=Aa[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var Ia={on:function(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}},bind:function(t,e){t.wrapData=function(n){return"_b("+n+",'"+t.tag+"',"+e.value+","+(e.modifiers&&e.modifiers.prop?"true":"false")+(e.modifiers&&e.modifiers.sync?",true":"")+")"}},cloak:O},Da=function(t){this.options=t,this.warn=t.warn||Rr,this.transforms=Or(t.modules,"transformCode"),this.dataGenFns=Or(t.modules,"genData"),this.directives=L(L({},Ia),t.directives);var e=t.isReservedTag||k;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function ja(t,e){var n=new Da(e);return{render:"with(this){return "+(t?"script"===t.tag?"null":za(t,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function za(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return Na(t,e);if(t.once&&!t.onceProcessed)return Fa(t,e);if(t.for&&!t.forProcessed)return Ha(t,e);if(t.if&&!t.ifProcessed)return Ba(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return function(t,e){var n=t.slotName||'"default"',r=Wa(t,e),i="_t("+n+(r?",function(){return "+r+"}":""),o=t.attrs||t.dynamicAttrs?Ya((t.attrs||[]).concat(t.dynamicAttrs||[]).map((function(t){return{name:S(t.name),value:t.value,dynamic:t.dynamic}}))):null,a=t.attrsMap["v-bind"];!o&&!a||r||(i+=",null");o&&(i+=","+o);a&&(i+=(o?"":",null")+","+a);return i+")"}(t,e);var n;if(t.component)n=function(t,e,n){var r=e.inlineTemplate?null:Wa(e,n,!0);return"_c("+t+","+Ga(e,n)+(r?","+r:"")+")"}(t.component,t,e);else{var r;(!t.plain||t.pre&&e.maybeComponent(t))&&(r=Ga(t,e));var i=t.inlineTemplate?null:Wa(t,e,!0);n="_c('"+t.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o<e.transforms.length;o++)n=e.transforms[o](t,n);return n}return Wa(t,e)||"void 0"}function Na(t,e){t.staticProcessed=!0;var n=e.pre;return t.pre&&(e.pre=t.pre),e.staticRenderFns.push("with(this){return "+za(t,e)+"}"),e.pre=n,"_m("+(e.staticRenderFns.length-1)+(t.staticInFor?",true":"")+")"}function Fa(t,e){if(t.onceProcessed=!0,t.if&&!t.ifProcessed)return Ba(t,e);if(t.staticInFor){for(var n="",r=t.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o("+za(t,e)+","+e.onceId+++","+n+")":za(t,e)}return Na(t,e)}function Ba(t,e,n,r){return t.ifProcessed=!0,function t(e,n,r,i){if(!e.length)return i||"_e()";var o=e.shift();return o.exp?"("+o.exp+")?"+a(o.block)+":"+t(e,n,r,i):""+a(o.block);function a(t){return r?r(t,n):t.once?Fa(t,n):za(t,n)}}(t.ifConditions.slice(),e,n,r)}function Ha(t,e,n,r){var i=t.for,o=t.alias,a=t.iterator1?","+t.iterator1:"",s=t.iterator2?","+t.iterator2:"";return t.forProcessed=!0,(r||"_l")+"(("+i+"),function("+o+a+s+"){return "+(n||za)(t,e)+"})"}function Ga(t,e){var n="{",r=function(t,e){var n=t.directives;if(!n)return;var r,i,o,a,s="directives:[",c=!1;for(r=0,i=n.length;r<i;r++){o=n[r],a=!0;var u=e.directives[o.name];u&&(a=!!u(t,o,e.warn)),a&&(c=!0,s+='{name:"'+o.name+'",rawName:"'+o.rawName+'"'+(o.value?",value:("+o.value+"),expression:"+JSON.stringify(o.value):"")+(o.arg?",arg:"+(o.isDynamicArg?o.arg:'"'+o.arg+'"'):"")+(o.modifiers?",modifiers:"+JSON.stringify(o.modifiers):"")+"},")}if(c)return s.slice(0,-1)+"]"}(t,e);r&&(n+=r+","),t.key&&(n+="key:"+t.key+","),t.ref&&(n+="ref:"+t.ref+","),t.refInFor&&(n+="refInFor:true,"),t.pre&&(n+="pre:true,"),t.component&&(n+='tag:"'+t.tag+'",');for(var i=0;i<e.dataGenFns.length;i++)n+=e.dataGenFns[i](t);if(t.attrs&&(n+="attrs:"+Ya(t.attrs)+","),t.props&&(n+="domProps:"+Ya(t.props)+","),t.events&&(n+=Ra(t.events,!1)+","),t.nativeEvents&&(n+=Ra(t.nativeEvents,!0)+","),t.slotTarget&&!t.slotScope&&(n+="slot:"+t.slotTarget+","),t.scopedSlots&&(n+=function(t,e,n){var r=t.for||Object.keys(e).some((function(t){var n=e[t];return n.slotTargetDynamic||n.if||n.for||Ua(n)})),i=!!t.if;if(!r)for(var o=t.parent;o;){if(o.slotScope&&"_empty_"!==o.slotScope||o.for){r=!0;break}o.if&&(i=!0),o=o.parent}var a=Object.keys(e).map((function(t){return Va(e[t],n)})).join(",");return"scopedSlots:_u(["+a+"]"+(r?",null,true":"")+(!r&&i?",null,false,"+function(t){var e=5381,n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e>>>0}(a):"")+")"}(t,t.scopedSlots,e)+","),t.model&&(n+="model:{value:"+t.model.value+",callback:"+t.model.callback+",expression:"+t.model.expression+"},"),t.inlineTemplate){var o=function(t,e){var n=t.children[0];0;if(n&&1===n.type){var r=ja(n,e.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map((function(t){return"function(){"+t+"}"})).join(",")+"]}"}}(t,e);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",t.dynamicAttrs&&(n="_b("+n+',"'+t.tag+'",'+Ya(t.dynamicAttrs)+")"),t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function Ua(t){return 1===t.type&&("slot"===t.tag||t.children.some(Ua))}function Va(t,e){var n=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!n)return Ba(t,e,Va,"null");if(t.for&&!t.forProcessed)return Ha(t,e,Va);var r="_empty_"===t.slotScope?"":String(t.slotScope),i="function("+r+"){return "+("template"===t.tag?t.if&&n?"("+t.if+")?"+(Wa(t,e)||"undefined")+":undefined":Wa(t,e)||"undefined":za(t,e))+"}",o=r?"":",proxy:true";return"{key:"+(t.slotTarget||'"default"')+",fn:"+i+o+"}"}function Wa(t,e,n,r,i){var o=t.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?e.maybeComponent(a)?",1":",0":"";return""+(r||za)(a,e)+s}var c=n?function(t,e){for(var n=0,r=0;r<t.length;r++){var i=t[r];if(1===i.type){if(Za(i)||i.ifConditions&&i.ifConditions.some((function(t){return Za(t.block)}))){n=2;break}(e(i)||i.ifConditions&&i.ifConditions.some((function(t){return e(t.block)})))&&(n=1)}}return n}(o,e.maybeComponent):0,u=i||qa;return"["+o.map((function(t){return u(t,e)})).join(",")+"]"+(c?","+c:"")}}function Za(t){return void 0!==t.for||"template"===t.tag||"slot"===t.tag}function qa(t,e){return 1===t.type?za(t,e):3===t.type&&t.isComment?function(t){return"_e("+JSON.stringify(t.text)+")"}(t):function(t){return"_v("+(2===t.type?t.expression:Ja(JSON.stringify(t.text)))+")"}(t)}function Ya(t){for(var e="",n="",r=0;r<t.length;r++){var i=t[r],o=Ja(i.value);i.dynamic?n+=i.name+","+o+",":e+='"'+i.name+'":'+o+","}return e="{"+e.slice(0,-1)+"}",n?"_d("+e+",["+n.slice(0,-1)+"])":e}function Ja(t){return t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)");function Xa(t,e){try{return new Function(t)}catch(n){return e.push({err:n,code:t}),O}}function $a(t){var e=Object.create(null);return function(n,r,i){(r=L({},r)).warn;delete r.warn;var o=r.delimiters?String(r.delimiters)+n:n;if(e[o])return e[o];var a=t(n,r);var s={},c=[];return s.render=Xa(a.render,c),s.staticRenderFns=a.staticRenderFns.map((function(t){return Xa(t,c)})),e[o]=s}}var Qa,Ka,ts=(Qa=function(t,e){var n=ca(t.trim(),e);!1!==e.optimize&&Ma(n,e);var r=ja(n,e);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}},function(t){function e(e,n){var r=Object.create(t),i=[],o=[];if(n)for(var a in n.modules&&(r.modules=(t.modules||[]).concat(n.modules)),n.directives&&(r.directives=L(Object.create(t.directives||null),n.directives)),n)"modules"!==a&&"directives"!==a&&(r[a]=n[a]);r.warn=function(t,e,n){(n?o:i).push(t)};var s=Qa(e.trim(),r);return s.errors=i,s.tips=o,s}return{compile:e,compileToFunctions:$a(e)}})(ba),es=(ts.compile,ts.compileToFunctions);function ns(t){return(Ka=Ka||document.createElement("div")).innerHTML=t?'<a href="\n"/>':'<div a="\n"/>',Ka.innerHTML.indexOf(" ")>0}var rs=!!q&&ns(!1),is=!!q&&ns(!0),os=w((function(t){var e=er(t);return e&&e.innerHTML})),as=En.prototype.$mount;En.prototype.$mount=function(t,e){if((t=t&&er(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=os(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(r){0;var i=es(r,{outputSourceRange:!1,shouldDecodeNewlines:rs,shouldDecodeNewlinesForHref:is,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return as.call(this,t,e)},En.compile=es,e.default=En}.call(this,n(15),n(103).setImmediate)},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,s,c=1,u={},l=!1,h=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){p(t.data)},r=function(t){o.port2.postMessage(t)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,r=function(t){var e=h.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(p,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&p(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),f.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var i={callback:t,args:e};return u[c]=i,r(c),c++},f.clearImmediate=d}function d(t){delete u[t]}function p(t){if(l)setTimeout(p,0,t);else{var e=u[t];if(e){l=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(void 0,n)}}(e)}finally{d(t),l=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(15),n(90))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(n(100)),i=n(5),o=s(n(10)),a=n(6);function s(t){return t&&t.__esModule?t:{default:t}}e.default={name:"BasicLayout",inject:["slotsList"],computed:{nav:function(){return this.$store.state.user.addRouters},appRouter:function(){return this.$store.state.user.appRouters}},data:function(){return{layout:"SidebarWrapper"}},methods:{changeLayout:function(){"BasicLayout"===this.$route.matched[1].components.default.name&&this.$store.commit("user/SET_ROUTERS",[this.appRouter[0].children[1]])}},created:function(){this.changeLayout()},mounted:function(){var t=this;this.$watch("$route",(function(e){var n=e.matched;if(t.nav&&!(0,a.isEmpty)(t.nav)&&!(0,a.isEmpty)(t.nav[0].children)){var r=(0,i.treeFindPath)(t.nav[0].children,(function(t){return t.meta.id===n[n.length-1].meta.id}));(0,a.isEmpty)(r)||!r.length||(0,a.isFunction)(r[0].component)||(t.layout=r[0].component.name)}}),{immediate:!0,deep:!0})},render:function(){var t=arguments[0],e=(0,o.default)([i.prefixCls+"-layout-light",i.prefixCls+"-basic-layout"]);return t("a-layout",{class:e},[t(r.default,{attrs:{theme:"MapWrapper"===this.layout?"dark":"light",fixed:"MapWrapper"===this.layout,"nav-list":this.nav[0].children}}),t("a-layout-content",[this.slotsList.content?this.slotsList.content:null,t("router-view",{class:i.prefixCls+"-layout-content"})])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5),i=a(n(59)),o=n(60);a(o);function a(t){return t&&t.__esModule?t:{default:t}}e.default={name:"MapWrapper",components:{GMap:o.GMap},data:function(){return{isLoaded:!1}},methods:{mapLoad:function(t,e,n){t&&(this.isLoaded=!0),i.default.$emit("loadMap",t)}},render:function(){var t=arguments[0];return t("span",[t(o.GMap,{on:{load:this.mapLoad}}),this.isLoaded?t("router-view",{attrs:{theme:"dark",fixed:!0},class:r.prefixCls+"-layout-content"}):null])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"NoSliderWrapper",render:function(){var t=arguments[0];return t("router-view")}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(n(61)),i=c(n(34)),o=n(5),a=n(6),s=c(n(10));function c(t){return t&&t.__esModule?t:{default:t}}e.default={name:"SliderWrapper",props:{theme:{type:String,default:"light"},fixed:{type:Boolean,default:!1}},computed:{nav:function(){return this.$store.state.user.addRouters}},data:function(){return{sidebarList:[],openKeys:[],selectedKeys:[]}},mounted:function(){var t=this;this.$watch("$route",(function(e){var n=e.matched;if(t.nav&&!(0,a.isEmpty)(t.nav)&&!(0,a.isEmpty)(t.nav[0].children)){var r=(0,o.treeFindPath)(t.nav[0].children,(function(t){return t.meta.id===n[n.length-1].meta.id}));t.sidebarList=r[0].children}}),{immediate:!0})},render:function(){var t=arguments[0],e=(0,s.default)([o.prefixCls+"-slider-"+this.theme,this.fixed?o.prefixCls+"-slider-fixed":""]);return t("a-layout",{class:o.prefixCls+"-full-layout"},[this.fixed?t("a-affix",{attrs:{"offset-top":70}},[t(r.default,{attrs:{sidebarList:this.sidebarList,theme:this.theme},class:e})]):t(r.default,{attrs:{sidebarList:this.sidebarList,theme:this.theme},class:e}),t("a-layout-content",[t(i.default)])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"NormalIcon",render:function(){var t=arguments[0];return t("svg",{attrs:{t:"1631500138971",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"12851",width:"200",height:"200"},class:"rk-web-core-normal-icon"},[t("path",{attrs:{d:"M51.2 320m51.2 0l102.4 0q51.2 0 51.2 51.2l0 512q0 51.2-51.2 51.2l-102.4 0q-51.2 0-51.2-51.2l0-512q0-51.2 51.2-51.2Z","p-id":"12852"}}),t("path",{attrs:{d:"M409.6 512m51.2 0l102.4 0q51.2 0 51.2 51.2l0 307.2q0 51.2-51.2 51.2l-102.4 0q-51.2 0-51.2-51.2l0-307.2q0-51.2 51.2-51.2Z","p-id":"12853"}}),t("path",{attrs:{d:"M768 115.2m51.2 0l102.4 0q51.2 0 51.2 51.2l0 716.8q0 51.2-51.2 51.2l-102.4 0q-51.2 0-51.2-51.2l0-716.8q0-51.2 51.2-51.2Z","p-id":"12854"}})])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(n(10)),i=n(5),o=l(n(34)),a=l(n(58)),s=l(n(61)),c=l(n(101)),u=l(n(102));function l(t){return t&&t.__esModule?t:{default:t}}e.default={name:"AdminLayout",inject:["slotsList"],computed:{nav:function(){return this.$store.state.user.addRouters}},data:function(){return{sidebarList:[],openKeys:[],selectedKeys:[]}},render:function(){var t=arguments[0],e=(0,r.default)([i.prefixCls+"-layout-light",i.prefixCls+"-basic-layout",i.prefixCls+"-admin-layout"]),n=(0,r.default)([i.prefixCls+"-header",i.prefixCls+"-header-light",i.prefixCls+"-header-light-header"]),l=(0,r.default)([i.prefixCls+"-slider-light"]);return t("a-layout",{class:e},[t("a-layout-sider",{class:i.prefixCls+"-slider",attrs:{width:250}},[this.slotsList.logo?this.slotsList.logo:t(a.default,{attrs:{prefix:"basic",theme:"light"}}),t(s.default,{attrs:{sidebarList:this.nav[0].children},class:l})]),t("a-layout",[t("a-layout-header",{class:n},[t("div",{class:[i.prefixCls+"-header-light-inner",i.prefixCls+"-header-inner"]},[this.slotsList.header?this.slotsList.header:null,t(c.default),t(u.default)])]),t("a-layout-content",[t(o.default)])])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(n(10)),i=n(5),o=c(n(34)),a=c(n(58)),s=c(n(61));function c(t){return t&&t.__esModule?t:{default:t}}e.default={name:"FullHeaderLayout",inject:["slotsList"],computed:{nav:function(){return this.$store.state.user.addRouters}},data:function(){return{sidebarList:[],openKeys:[],selectedKeys:[]}},mounted:function(){console.log(this.nav)},render:function(){var t=arguments[0],e=(0,r.default)([i.prefixCls+"-layout-light",i.prefixCls+"-basic-layout",i.prefixCls+"-admin-layout",i.prefixCls+"-fullHeader-layout"]),n=(0,r.default)([i.prefixCls+"-header",i.prefixCls+"-header-light"]),c=(0,r.default)([i.prefixCls+"-slider-light"]);return t("a-layout",{class:e},[t("a-layout-header",{class:n},[t("div",{class:[i.prefixCls+"-header-light-inner",i.prefixCls+"-header-inner"]},[this.slotsList.logo?this.slotsList.logo:t(a.default,{attrs:{prefix:"basic",theme:"light"}}),t("div",{class:i.prefixCls+"-header-right"},["1",t("div",{class:i.prefixCls+"-header-right-extra"},[this.slotsList.header])])])]),t("a-layout",[t(s.default,{attrs:{sidebarList:this.nav[0].children},class:c}),t("a-layout-content",[t(o.default)])])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(n(223)),i=a(n(47)),o=a(n(46));function a(t){return t&&t.__esModule?t:{default:t}}var s=function t(e){(0,o.default)(this,t),this.data=e,this.parent=null,this.children=[]},c=function(){function t(){(0,o.default)(this,t),this._root=null}return(0,i.default)(t,[{key:"traverseDF",value:function(t){var e=[],n=!1;e.unshift(this._root);for(var i=e.shift();!n&&i;)(n=!0===t(i))||(e.unshift.apply(e,(0,r.default)(i.children)),i=e.shift())}},{key:"traverseBF",value:function(t){var e=[],n=!1;e.push(this._root);for(var i=e.shift();!n&&i;)(n=!0===t(i))||(e.push.apply(e,(0,r.default)(i.children)),i=e.shift())}},{key:"contains",value:function(t,e){e.call(this,t)}},{key:"add",value:function(t,e,n){var r=new s(t);if(null===this._root)return this._root=r,this;var i=null;if(this.contains((function(t){if(t.data===e)return i=t,!0}),n),i)return i.children.push(r),r.parent=i,this;throw new Error("Cannot add node to a non-existent parent.")}},{key:"remove",value:function(t,e,n){var r=null;if(this.contains((function(t){if(t.data===e)return r=t,!0}),n),!r)throw new Error("Parent does not exist.");var i=this._findIndex(r.children,t);if(i<0)throw new Error("Node to remove does not exist.");return r.children.splice(i,1)}},{key:"_findIndex",value:function(t,e){for(var n=-1,r=0,i=t.length;r<i;r++)if(t[r].data===e){n=r;break}return n}}]),t}();e.default=c},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(224),o=(r=i)&&r.__esModule?r:{default:r};e.default=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return(0,o.default)(t)}},function(t,e,n){t.exports={default:n(225),__esModule:!0}},function(t,e,n){n(28),n(226),t.exports=n(0).Array.from},function(t,e,n){"use strict";var r=n(17),i=n(4),o=n(21),a=n(73),s=n(74),c=n(40),u=n(227),l=n(54);i(i.S+i.F*!n(79)((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,i,h,f=o(t),d="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,g=void 0!==m,v=0,y=l(f);if(g&&(m=r(m,p>2?arguments[2]:void 0,2)),null==y||d==Array&&s(y))for(n=new d(e=c(f.length));e>v;v++)u(n,v,g?m(f[v],v):f[v]);else for(h=y.call(f),n=new d;!(i=h.next()).done;v++)u(n,v,g?a(h,m,[i.value,v],!0):i.value);return n.length=v,n}})},function(t,e,n){"use strict";var r=n(12),i=n(45);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.noLogin=void 0;var r=n(30),i=n(9);e.noLogin=function(t,e){return e&&console.warn("token is not undefined"),function(){var n=(0,r.getUrlParam)("shopId");n?(i.localStore.set("access_token",e),i.localStore.set("code","demo"),i.localStore.set("test_project",{shopId:(0,r.getUrlParam)("shopId")||i.localStore.get("test_project").shopId,flag:(0,r.getUrlParam)("flag")||i.localStore.get("test_project").flag}),t.replace({path:"/",query:{shopId:n}}).then()):(i.localStore.remove("test_project"),sessionStorage.removeItem("noLogin"))}}},function(t,e,n){var r=n(230),i=n(274)((function(t,e){return null==t?{}:r(t,e)}));t.exports=i},function(t,e,n){var r=n(231),i=n(269);t.exports=function(t,e){return r(t,e,(function(e,n){return i(t,n)}))}},function(t,e,n){var r=n(232),i=n(266),o=n(35);t.exports=function(t,e,n){for(var a=-1,s=e.length,c={};++a<s;){var u=e[a],l=r(t,u);n(l,u)&&i(c,o(u,t),l)}return c}},function(t,e,n){var r=n(35),i=n(65);t.exports=function(t,e){for(var n=0,o=(e=r(e,t)).length;null!=t&&n<o;)t=t[i(e[n++])];return n&&n==o?t:void 0}},function(t,e,n){var r=n(20),i=n(62),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||(a.test(t)||!o.test(t)||null!=e&&t in Object(e))}},function(t,e,n){var r=n(235),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(o,"$1"):n||t)})),e}));t.exports=a},function(t,e,n){var r=n(236);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},function(t,e,n){var r=n(237);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},function(t,e,n){var r=n(238),i=n(258),o=n(260),a=n(261),s=n(262);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=a,c.prototype.set=s,t.exports=c},function(t,e,n){var r=n(239),i=n(251),o=n(257);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(t,e,n){var r=n(240),i=n(247),o=n(248),a=n(249),s=n(250);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=a,c.prototype.set=s,t.exports=c},function(t,e,n){var r=n(36);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e,n){var r=n(242),i=n(243),o=n(64),a=n(245),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,h=u.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?f:s).test(a(t))}},function(t,e,n){var r=n(31),i=n(64);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r,i=n(244),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},function(t,e,n){var r=n(57)["__core-js_shared__"];t.exports=r},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(36),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(36),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},function(t,e,n){var r=n(36);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,n){var r=n(252),i=n(253),o=n(254),a=n(255),s=n(256);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=a,c.prototype.set=s,t.exports=c},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(37),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():i.call(e,n,1),--this.size,!0)}},function(t,e,n){var r=n(37);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(37);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(37);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(63)(n(57),"Map");t.exports=r},function(t,e,n){var r=n(38);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(38);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(38);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(38);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},function(t,e,n){var r=n(264);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(32),i=n(265),o=n(20),a=n(62),s=r?r.prototype:void 0,c=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(a(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},function(t,e,n){var r=n(267),i=n(35),o=n(106),a=n(64),s=n(65);t.exports=function(t,e,n,c){if(!a(t))return t;for(var u=-1,l=(e=i(e,t)).length,h=l-1,f=t;null!=f&&++u<l;){var d=s(e[u]),p=n;if("__proto__"===d||"constructor"===d||"prototype"===d)return t;if(u!=h){var m=f[d];void 0===(p=c?c(m,d,f):void 0)&&(p=a(m)?m:o(e[u+1])?[]:{})}r(f,d,p),f=f[d]}return t}},function(t,e,n){var r=n(268),i=n(104),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];o.call(t,e)&&i(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(105);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e,n){var r=n(270),i=n(271);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,n){var r=n(35),i=n(107),o=n(20),a=n(106),s=n(273),c=n(65);t.exports=function(t,e,n){for(var u=-1,l=(e=r(e,t)).length,h=!1;++u<l;){var f=c(e[u]);if(!(h=null!=t&&n(t,f)))break;t=t[f]}return h||++u!=l?h:!!(l=null==t?0:t.length)&&s(l)&&a(f,l)&&(o(t)||i(t))}},function(t,e,n){var r=n(31),i=n(33);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){var r=n(275),i=n(279),o=n(281);t.exports=function(t){return o(i(t,void 0,r),t+"")}},function(t,e,n){var r=n(276);t.exports=function(t){return(null==t?0:t.length)?r(t,1):[]}},function(t,e,n){var r=n(277),i=n(278);t.exports=function t(e,n,o,a,s){var c=-1,u=e.length;for(o||(o=i),s||(s=[]);++c<u;){var l=e[c];n>0&&o(l)?n>1?t(l,n-1,o,a,s):r(s,l):a||(s[s.length]=l)}return s}},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},function(t,e,n){var r=n(32),i=n(107),o=n(20),a=r?r.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(a&&t&&t[a])}},function(t,e,n){var r=n(280),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,s=i(o.length-e,0),c=Array(s);++a<s;)c[a]=o[e+a];a=-1;for(var u=Array(e+1);++a<e;)u[a]=o[a];return u[e]=n(c),r(t,this,u)}}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(282),i=n(285)(r);t.exports=i},function(t,e,n){var r=n(283),i=n(105),o=n(284),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:o;t.exports=a},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){t.exports=function(t){return t}},function(t,e){var n=Date.now;t.exports=function(t){var e=0,r=0;return function(){var i=n(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(59),o=(r=i)&&r.__esModule?r:{default:r};n(6);var a={name:"AppLayout",props:{datetime:{type:Boolean,default:!0},weather:{type:Boolean,default:!0},wind:{type:Boolean,default:!0},needMap:{type:Boolean,default:!1}},provide:function(){return{slotsList:this.$slots,propsList:this.$props,instance:this}},mounted:function(){var t=this;o.default.$on("loadMap",(function(e){console.log("***************MAPTALKS*****************"),console.log(e),console.log("***************MAPTALKS*****************"),t.$emit("load",e)}))},updated:function(){var t=this;this.$nextTick((function(){t.$store.commit("user/SET_TIME_STAMP",{type:"app",timeStamp:""+(new Date).getTime()})}))},beforeDestroy:function(){o.default.$off("loadMap")},methods:{},render:function(){var t=arguments[0],e=this.$slots;return t("div",{class:"rk-web-core-layout"},[e.default])},install:function(t){t.component(a.name,a)}};e.default=a},function(t,e,n){"use strict";n(288),n(289),n(290),n(291),n(292),n(293),n(294),n(295)},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){}])}));
|