@hatiolab/things-scene 2.7.14 → 2.7.18
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/db.sqlite +0 -0
- package/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +8 -3
- package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +3 -23
- package/logs/application-2021-11-30-22.log +4 -0
- package/logs/application-2021-11-30-23.log +1 -0
- package/logs/connections-2021-11-30-22.log +32 -0
- package/package.json +3 -3
- package/things-scene-ie.js +1 -1
- package/things-scene-min.js +1 -1
- package/things-scene.d.ts +186 -14
- package/things-scene.mjs +1 -1
- package/logs/application-2021-11-15-23.log +0 -4
- package/logs/connections-2021-11-08-22.log +0 -32
- package/logs/connections-2021-11-09-19.log +0 -32
- package/logs/connections-2021-11-10-23.log +0 -32
- package/logs/connections-2021-11-13-21.log +0 -32
- package/logs/connections-2021-11-15-23.log +0 -32
package/things-scene-min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.scene=e():t.scene=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.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 o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));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=581)}([function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(2),i=n(19).f,a=n(24),u=n(14),c=n(119),s=n(120),f=n(69);t.exports=function(t,e){var n,l,h,p,y,d=t.target,v=t.global,g=t.stat;if(n=v?o:g?o[d]||c(d,{}):(o[d]||{}).prototype)for(l in e){if(p=e[l],h=t.noTargetGet?(y=i(n,l))&&y.value:n[l],!f(v?l:d+(g?".":"#")+l,t.forced)&&void 0!==h){if(r(p)===r(h))continue;s(p,h)}(t.sham||h&&h.sham)&&a(p,"sham",!0),u(n,l,p,t)}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){(function(e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==("undefined"==typeof globalThis?"undefined":n(globalThis))&&globalThis)||r("object"==("undefined"==typeof window?"undefined":n(window))&&window)||r("object"==("undefined"==typeof self?"undefined":n(self))&&self)||r("object"==(void 0===e?"undefined":n(e))&&e)||function(){return this}()||Function("return this")()}).call(this,n(157))},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(8);t.exports=function(t){return"object"===r(t)?null!==t:o(t)}},function(t,e,n){var r=n(3);t.exports=function(t){if(r(t))return t;throw TypeError(String(t)+" is not an object")}},function(t,e,n){var r=n(1);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,n){var r=n(2),o=n(84),i=n(12),a=n(66),u=n(116),c=n(158),s=o("wks"),f=r.Symbol,l=c?f:f&&f.withoutSetter||a;t.exports=function(t){return i(s,t)&&(u||"string"==typeof s[t])||(u&&i(f,t)?s[t]=f[t]:s[t]=l("Symbol."+t)),s[t]}},function(t,e,n){"use strict";var r,o,i,a=n(133),u=n(5),c=n(2),s=n(8),f=n(3),l=n(12),h=n(52),p=n(117),y=n(24),d=n(14),v=n(10).f,g=n(29),m=n(36),b=n(6),w=n(66),x=c.Int8Array,_=x&&x.prototype,k=c.Uint8ClampedArray,A=k&&k.prototype,S=x&&g(x),O=_&&g(_),E=Object.prototype,P=E.isPrototypeOf,j=b("toStringTag"),M=w("TYPED_ARRAY_TAG"),R=w("TYPED_ARRAY_CONSTRUCTOR"),T=a&&!!m&&"Opera"!==h(c.opera),I=!1,C={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},z={BigInt64Array:8,BigUint64Array:8},B=function(t){if(!f(t))return!1;var e=h(t);return l(C,e)||l(z,e)};for(r in C)(i=(o=c[r])&&o.prototype)?y(i,R,o):T=!1;for(r in z)(i=(o=c[r])&&o.prototype)&&y(i,R,o);if((!T||!s(S)||S===Function.prototype)&&(S=function(){throw TypeError("Incorrect invocation")},T))for(r in C)c[r]&&m(c[r],S);if((!T||!O||O===E)&&(O=S.prototype,T))for(r in C)c[r]&&m(c[r].prototype,O);if(T&&g(A)!==O&&m(A,O),u&&!l(O,j))for(r in I=!0,v(O,j,{get:function(){return f(this)?this[M]:void 0}}),C)c[r]&&y(c[r],M,r);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:T,TYPED_ARRAY_CONSTRUCTOR:R,TYPED_ARRAY_TAG:I&&M,aTypedArray:function(t){if(B(t))return t;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(t){if(s(t)&&(!m||P.call(S,t)))return t;throw TypeError(p(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n){if(u){if(n)for(var r in C){var o=c[r];if(o&&l(o.prototype,t))try{delete o.prototype[t]}catch(t){}}O[t]&&!n||d(O,t,n?e:T&&_[t]||e)}},exportTypedArrayStaticMethod:function(t,e,n){var r,o;if(u){if(m){if(n)for(r in C)if((o=c[r])&&l(o,t))try{delete o[t]}catch(t){}if(S[t]&&!n)return;try{return d(S,t,n?e:T&&S[t]||e)}catch(t){}}for(r in C)!(o=c[r])||o[t]&&!n||d(o,t,e)}},isView:function(t){if(!f(t))return!1;var e=h(t);return"DataView"===e||l(C,e)||l(z,e)},isTypedArray:B,TypedArray:S,TypedArrayPrototype:O}},function(t,e){t.exports=function(t){return"function"==typeof t}},function(t,e,n){var r=n(52);t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)}},function(t,e,n){var r=n(5),o=n(160),i=n(4),a=n(42),u=Object.defineProperty;e.f=r?u:function(t,e,n){if(i(t),e=a(e),i(n),o)try{return u(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,n){var r=n(15);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(11),o={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return o.call(r(t),e)}},function(t,e,n){var r=n(25);t.exports=function(t){return r(t.length)}},function(t,e,n){var r=n(2),o=n(8),i=n(12),a=n(24),u=n(119),c=n(86),s=n(16),f=n(50).CONFIGURABLE,l=s.get,h=s.enforce,p=String(String).split("String");(t.exports=function(t,e,n,c){var s,l=!!c&&!!c.unsafe,y=!!c&&!!c.enumerable,d=!!c&&!!c.noTargetGet,v=c&&void 0!==c.name?c.name:e;o(n)&&("Symbol("===String(v).slice(0,7)&&(v="["+String(v).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(n,"name")||f&&n.name!==v)&&a(n,"name",v),(s=h(n)).source||(s.source=p.join("string"==typeof v?v:""))),t!==r?(l?!d&&t[e]&&(y=!0):delete t[e],y?t[e]=n:a(t,e,n)):y?t[e]=n:u(e,n)})(Function.prototype,"toString",(function(){return o(this)&&l(this).source||c(this)}))},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,o,i,a=n(161),u=n(2),c=n(3),s=n(24),f=n(12),l=n(118),h=n(87),p=n(67),y=u.WeakMap;if(a||l.state){var d=l.state||(l.state=new y),v=d.get,g=d.has,m=d.set;r=function(t,e){if(g.call(d,t))throw new TypeError("Object already initialized");return e.facade=t,m.call(d,t,e),e},o=function(t){return v.call(d,t)||{}},i=function(t){return g.call(d,t)}}else{var b=h("state");p[b]=!0,r=function(t,e){if(f(t,b))throw new TypeError("Object already initialized");return e.facade=t,s(t,b,e),e},o=function(t){return f(t,b)?t[b]:{}},i=function(t){return f(t,b)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},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)}},function(t,e,n){var r=n(46),o=n(64),i=n(11),a=n(13),u=n(71),c=[].push,s=function(t){var e=1==t,n=2==t,s=3==t,f=4==t,l=6==t,h=7==t,p=5==t||l;return function(y,d,v,g){for(var m,b,w=i(y),x=o(w),_=r(d,v,3),k=a(x),A=0,S=g||u,O=e?S(y,k):n||h?S(y,0):void 0;k>A;A++)if((p||A in x)&&(b=_(m=x[A],A,w),t))if(e)O[A]=b;else if(b)switch(t){case 3:return!0;case 5:return m;case 6:return A;case 2:c.call(O,m)}else switch(t){case 4:return!1;case 7:c.call(O,m)}return l?-1:s||f?f:O}};t.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}},function(t,e,n){var r=n(5),o=n(83),i=n(33),a=n(23),u=n(42),c=n(12),s=n(160),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=u(e),s)try{return f(t,e)}catch(t){}if(c(t,e))return i(!o.f.call(t,e),t[e])}},function(t,e,n){var r=n(2),o=n(8),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},function(t,e,n){var r=n(8),o=n(117);t.exports=function(t){if(r(t))return t;throw TypeError(o(t)+" is not a function")}},function(t,e,n){var r=n(165),o=n(12),i=n(164),a=n(10).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},function(t,e,n){var r=n(64),o=n(15);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(5),o=n(10),i=n(33);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(17),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(15),o=n(9),i=/"/g;t.exports=function(t,e,n,a){var u=o(r(t)),c="<"+e;return""!==n&&(c+=" "+n+'="'+o(a).replace(i,""")+'"'),c+">"+u+"</"+e+">"}},function(t,e,n){var r=n(1);t.exports=function(t){return r((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},function(t,e){t.exports=!1},function(t,e,n){var r=n(12),o=n(8),i=n(11),a=n(87),u=n(127),c=a("IE_PROTO"),s=Object.prototype;t.exports=u?Object.getPrototypeOf:function(t){var e=i(t);if(r(e,c))return e[c];var n=e.constructor;return o(n)&&e instanceof n?n.prototype:e instanceof Object?s:null}},function(t,e,n){var r,o=n(4),i=n(125),a=n(122),u=n(67),c=n(163),s=n(85),f=n(87),l=f("IE_PROTO"),h=function(){},p=function(t){return"<script>"+t+"<\/script>"},y=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},d=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;d="undefined"!=typeof document?document.domain&&r?y(r):((e=s("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):y(r);for(var n=a.length;n--;)delete d.prototype[a[n]];return d()};u[l]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(h.prototype=o(t),n=new h,h.prototype=null,n[l]=t):n=d(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(10).f,o=n(12),i=n(6)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(204),i="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,a=o||i||Function("return this")();t.exports=a},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(20);t.exports=r("navigator","userAgent")||""},function(t,e,n){var r=n(21);t.exports=function(t,e){var n=t[e];return null==n?void 0:r(n)}},function(t,e,n){var r=n(4),o=n(166);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,i){return r(n),o(i),e?t.call(n,i):n.__proto__=i,n}}():void 0)},function(t,e,n){var r=n(6),o=n(30),i=n(10),a=r("unscopables"),u=Array.prototype;null==u[a]&&i.f(u,a,{configurable:!0,value:o(null)}),t.exports=function(t){u[a][t]=!0}},function(t,e,n){"use strict";var r=n(1);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(5),a=n(147),u=n(7),c=n(92),s=n(48),f=n(33),l=n(24),h=n(139),p=n(25),y=n(177),d=n(195),v=n(42),g=n(12),m=n(52),b=n(3),w=n(65),x=n(30),_=n(36),k=n(44).f,A=n(196),S=n(18).forEach,O=n(58),E=n(10),P=n(19),j=n(16),M=n(94),R=j.get,T=j.set,I=E.f,C=P.f,z=Math.round,B=o.RangeError,L=c.ArrayBuffer,F=c.DataView,N=u.NATIVE_ARRAY_BUFFER_VIEWS,D=u.TYPED_ARRAY_CONSTRUCTOR,U=u.TYPED_ARRAY_TAG,Y=u.TypedArray,G=u.TypedArrayPrototype,W=u.aTypedArrayConstructor,H=u.isTypedArray,V=function(t,e){for(var n=0,r=e.length,o=new(W(t))(r);r>n;)o[n]=e[n++];return o},X=function(t,e){I(t,e,{get:function(){return R(this)[e]}})},q=function(t){var e;return t instanceof L||"ArrayBuffer"==(e=m(t))||"SharedArrayBuffer"==e},K=function(t,e){return H(t)&&!w(e)&&e in t&&h(+e)&&e>=0},Q=function(t,e){return e=v(e),K(t,e)?f(2,t[e]):C(t,e)},J=function(t,e,n){return e=v(e),!(K(t,e)&&b(n)&&g(n,"value"))||g(n,"get")||g(n,"set")||n.configurable||g(n,"writable")&&!n.writable||g(n,"enumerable")&&!n.enumerable?I(t,e,n):(t[e]=n.value,t)};i?(N||(P.f=Q,E.f=J,X(G,"buffer"),X(G,"byteOffset"),X(G,"byteLength"),X(G,"length")),r({target:"Object",stat:!0,forced:!N},{getOwnPropertyDescriptor:Q,defineProperty:J}),t.exports=function(t,e,n){var i=t.match(/\d+$/)[0]/8,u=t+(n?"Clamped":"")+"Array",c="get"+t,f="set"+t,h=o[u],v=h,g=v&&v.prototype,m={},w=function(t,e){I(t,e,{get:function(){return function(t,e){var n=R(t);return n.view[c](e*i+n.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,r){var o=R(t);n&&(r=(r=z(r))<0?0:r>255?255:255&r),o.view[f](e*i+o.byteOffset,r,!0)}(this,e,t)},enumerable:!0})};N?a&&(v=e((function(t,e,n,r){return s(t,v,u),M(b(e)?q(e)?void 0!==r?new h(e,d(n,i),r):void 0!==n?new h(e,d(n,i)):new h(e):H(e)?V(v,e):A.call(v,e):new h(y(e)),t,v)})),_&&_(v,Y),S(k(h),(function(t){t in v||l(v,t,h[t])})),v.prototype=g):(v=e((function(t,e,n,r){s(t,v,u);var o,a,c,f=0,l=0;if(b(e)){if(!q(e))return H(e)?V(v,e):A.call(v,e);o=e,l=d(n,i);var h=e.byteLength;if(void 0===r){if(h%i)throw B("Wrong length");if((a=h-l)<0)throw B("Wrong length")}else if((a=p(r)*i)+l>h)throw B("Wrong length");c=a/i}else c=y(e),o=new L(a=c*i);for(T(t,{buffer:o,byteOffset:l,byteLength:a,length:c,view:new F(o)});f<c;)w(t,f++)})),_&&_(v,Y),g=v.prototype=x(G)),g.constructor!==v&&l(g,"constructor",v),l(g,D,v),U&&l(g,U,u),m[u]=v,r({global:!0,forced:v!=h,sham:!N},m),"BYTES_PER_ELEMENT"in v||l(v,"BYTES_PER_ELEMENT",i),"BYTES_PER_ELEMENT"in g||l(g,"BYTES_PER_ELEMENT",i),O(u)}):t.exports=function(){}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){var e=n(t);return null!=t&&("object"==e||"function"==e)}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return null!=t&&"object"==n(t)}},function(t,e,n){var r=n(115),o=n(65);t.exports=function(t){var e=r(t,"string");return o(e)?e:String(e)}},function(t,e,n){var r,o,i=n(2),a=n(34),u=i.process,c=i.Deno,s=u&&u.versions||c&&c.version,f=s&&s.v8;f?o=(r=f.split("."))[0]<4?1:r[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),t.exports=o&&+o},function(t,e,n){var r=n(162),o=n(122).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(17),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},function(t,e,n){var r=n(21);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};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,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(4),i=n(128),a=n(13),u=n(46),c=n(88),s=n(74),f=n(167),l=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,n){var h,p,y,d,v,g,m,b=n&&n.that,w=!(!n||!n.AS_ENTRIES),x=!(!n||!n.IS_ITERATOR),_=!(!n||!n.INTERRUPTED),k=u(e,b,1+w+_),A=function(t){return h&&f(h,"normal",t),new l(!0,t)},S=function(t){return w?(o(t),_?k(t[0],t[1],A):k(t[0],t[1])):_?k(t,A):k(t)};if(x)h=t;else{if(!(p=s(t)))throw TypeError(String(t)+" is not iterable");if(i(p)){for(y=0,d=a(t);d>y;y++)if((v=S(t[y]))&&v instanceof l)return v;return new l(!1)}h=c(t,p)}for(g=h.next;!(m=g.call(h)).done;){try{v=S(m.value)}catch(t){f(h,"throw",t)}if("object"==r(v)&&v&&v instanceof l)return v}return new l(!1)}},function(t,e){t.exports=function(t,e,n){if(t instanceof e)return t;throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(5),o=n(12),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,u=o(i,"name"),c=u&&"something"===function(){}.name,s=u&&(!r||r&&a(i,"name").configurable);t.exports={EXISTS:u,PROPER:c,CONFIGURABLE:s}},function(t,e,n){var r=n(49);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(124),o=n(8),i=n(49),a=n(6)("toStringTag"),u="Arguments"==i(function(){return arguments}());t.exports=r?i: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=Object(t),a))?n:u?i(e):"Object"==(r=i(e))&&o(e.callee)?"Arguments":r}},function(t,e,n){"use strict";var r=n(42),o=n(10),i=n(33);t.exports=function(t,e,n){var a=r(e);a in t?o.f(t,a,i(0,n)):t[a]=n}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(0),i=n(67),a=n(3),u=n(12),c=n(10).f,s=n(44),f=n(126),l=n(66),h=n(76),p=!1,y=l("meta"),d=0,v=Object.isExtensible||function(){return!0},g=function(t){c(t,y,{value:{objectID:"O"+d++,weakData:{}}})},m=t.exports={enable:function(){m.enable=function(){},p=!0;var t=s.f,e=[].splice,n={};n[y]=1,t(n).length&&(s.f=function(n){for(var r=t(n),o=0,i=r.length;o<i;o++)if(r[o]===y){e.call(r,o,1);break}return r},o({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:f.f}))},fastKey:function(t,e){if(!a(t))return"symbol"==r(t)?t:("string"==typeof t?"S":"P")+t;if(!u(t,y)){if(!v(t))return"F";if(!e)return"E";g(t)}return t[y].objectID},getWeakData:function(t,e){if(!u(t,y)){if(!v(t))return!0;if(!e)return!1;g(t)}return t[y].weakData},onFreeze:function(t){return h&&p&&v(t)&&!u(t,y)&&g(t),t}};i[y]=!0},function(t,e,n){var r=n(496),o=n(501);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(80),o=n(497),i=n(498),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)?o(t):i(t)}},function(t,e,n){var r=n(49),o=n(2);t.exports="process"==r(o.process)},function(t,e,n){"use strict";var r=n(20),o=n(10),i=n(6),a=n(5),u=i("species");t.exports=function(t){var e=r(t),n=o.f;a&&e&&!e[u]&&n(e,u,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(14);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},function(t,e,n){var r=n(4),o=n(134),i=n(6)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},function(t,e,n){var r=n(15),o=n(9),i="["+n(96)+"]",a=RegExp("^"+i+i+"*"),u=RegExp(i+i+"*$"),c=function(t){return function(e){var n=o(r(e));return 1&t&&(n=n.replace(a,"")),2&t&&(n=n.replace(u,"")),n}};t.exports={start:c(1),end:c(2),trim:c(3)}},function(t,e,n){"use strict";var r=n(4);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}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(1),o=n(49),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(8),i=n(20),a=n(158);t.exports=a?function(t){return"symbol"==r(t)}:function(t){var e=i("Symbol");return o(e)&&Object(t)instanceof e}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},function(t,e){t.exports={}},function(t,e,n){var r=n(23),o=n(45),i=n(13),a=function(t){return function(e,n,a){var u,c=r(e),s=i(c),f=o(a,s);if(t&&n!=n){for(;s>f;)if((u=c[f++])!=u)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,e,n){var r=n(1),o=n(8),i=/#|\.prototype\./,a=function(t,e){var n=c[u(t)];return n==f||n!=s&&(o(e)?r(e):!!e)},u=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},s=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},function(t,e,n){var r=n(162),o=n(122);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(241);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},function(t,e,n){var r=n(1),o=n(8),i=n(52),a=n(20),u=n(86),c=[],s=a("Reflect","construct"),f=/^\s*(?:class|function)\b/,l=f.exec,h=!f.exec((function(){})),p=function(t){if(!o(t))return!1;try{return s(Object,c,t),!0}catch(t){return!1}};t.exports=!s||r((function(){var t;return p(p.call)||!p(Object)||!p((function(){t=!0}))||t}))?function(t){if(!o(t))return!1;switch(i(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return h||!!l.call(f,u(t))}:p},function(t,e){t.exports={}},function(t,e,n){var r=n(52),o=n(35),i=n(73),a=n(6)("iterator");t.exports=function(t){if(null!=t)return o(t,a)||o(t,"@@iterator")||i[r(t)]}},function(t,e,n){var r=n(1),o=n(6),i=n(43),a=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,n){var r=n(1);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,n){var r=n(3),o=n(49),i=n(6)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){var r=n(4),o=n(8),i=n(49),a=n(100);t.exports=function(t,e){var n=t.exec;if(o(n)){var u=n.call(t,e);return null!==u&&r(u),u}if("RegExp"===i(t))return a.call(t,e);throw TypeError("RegExp#exec called on incompatible receiver")}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(32).Symbol;t.exports=r},function(t,e,n){var r=n(529),o=n(148),i=n(530),a=n(531),u=n(532),c=n(56),s=n(205),f=s(r),l=s(o),h=s(i),p=s(a),y=s(u),d=c;(r&&"[object DataView]"!=d(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=d(new o)||i&&"[object Promise]"!=d(i.resolve())||a&&"[object Set]"!=d(new a)||u&&"[object WeakMap]"!=d(new u))&&(d=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,r=n?s(n):"";if(r)switch(r){case f:return"[object DataView]";case l:return"[object Map]";case h:return"[object Promise]";case p:return"[object Set]";case y:return"[object WeakMap]"}return e}),t.exports=d},function(t,e,n){var r=n(219),o=n(220);t.exports=function(t,e,n,i){var a=!n;n||(n={});for(var u=-1,c=e.length;++u<c;){var s=e[u],f=i?i(n[s],t[s],s,n,t):void 0;void 0===f&&(f=t[s]),a?o(n,s,f):r(n,s,f)}return n}},function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},function(t,e,n){var r=n(28),o=n(118);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.18.3",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(2),o=n(3),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},function(t,e,n){var r=n(8),o=n(118),i=Function.toString;r(o.inspectSource)||(o.inspectSource=function(t){return i.call(t)}),t.exports=o.inspectSource},function(t,e,n){var r=n(84),o=n(66),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,n){var r=n(21),o=n(4),i=n(74);t.exports=function(t,e){var n=arguments.length<2?i(t):e;if(r(n))return o(n.call(t));throw TypeError(String(t)+" is not iterable")}},function(t,e,n){var r=n(6)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(23),o=n(37),i=n(73),a=n(16),u=n(130),c=a.set,s=a.getterFor("Array Iterator");t.exports=u(Array,"Array",(function(t,e){c(this,{type:"Array Iterator",target:r(t),index:0,kind:e})}),(function(){var t=s(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"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,n){var r=n(21),o=n(11),i=n(64),a=n(13),u=function(t){return function(e,n,u,c){r(n);var s=o(e),f=i(s),l=a(s),h=t?l-1:0,p=t?-1:1;if(u<2)for(;;){if(h in f){c=f[h],h+=p;break}if(h+=p,t?h<0:l<=h)throw TypeError("Reduce of empty array with no initial value")}for(;t?h>=0:l>h;h+=p)h in f&&(c=n(c,f[h],h,s));return c}};t.exports={left:u(!1),right:u(!0)}},function(t,e,n){"use strict";var r=n(2),o=n(5),i=n(133),a=n(50),u=n(24),c=n(59),s=n(1),f=n(48),l=n(17),h=n(25),p=n(177),y=n(289),d=n(29),v=n(36),g=n(44).f,m=n(10).f,b=n(129),w=n(31),x=n(16),_=a.PROPER,k=a.CONFIGURABLE,A=x.get,S=x.set,O=r.ArrayBuffer,E=O,P=r.DataView,j=P&&P.prototype,M=Object.prototype,R=r.RangeError,T=y.pack,I=y.unpack,C=function(t){return[255&t]},z=function(t){return[255&t,t>>8&255]},B=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},L=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},F=function(t){return T(t,23,4)},N=function(t){return T(t,52,8)},D=function(t,e){m(t.prototype,e,{get:function(){return A(this)[e]}})},U=function(t,e,n,r){var o=p(n),i=A(t);if(o+e>i.byteLength)throw R("Wrong index");var a=A(i.buffer).bytes,u=o+i.byteOffset,c=a.slice(u,u+e);return r?c:c.reverse()},Y=function(t,e,n,r,o,i){var a=p(n),u=A(t);if(a+e>u.byteLength)throw R("Wrong index");for(var c=A(u.buffer).bytes,s=a+u.byteOffset,f=r(+o),l=0;l<e;l++)c[s+l]=f[i?l:e-l-1]};if(i){var G=_&&"ArrayBuffer"!==O.name;if(s((function(){O(1)}))&&s((function(){new O(-1)}))&&!s((function(){return new O,new O(1.5),new O(NaN),G&&!k})))G&&k&&u(O,"name","ArrayBuffer");else{for(var W,H=(E=function(t){return f(this,E),new O(p(t))}).prototype=O.prototype,V=g(O),X=0;V.length>X;)(W=V[X++])in E||u(E,W,O[W]);H.constructor=E}v&&d(j)!==M&&v(j,M);var q=new P(new E(2)),K=j.setInt8;q.setInt8(0,2147483648),q.setInt8(1,2147483649),!q.getInt8(0)&&q.getInt8(1)||c(j,{setInt8:function(t,e){K.call(this,t,e<<24>>24)},setUint8:function(t,e){K.call(this,t,e<<24>>24)}},{unsafe:!0})}else E=function(t){f(this,E,"ArrayBuffer");var e=p(t);S(this,{bytes:b.call(new Array(e),0),byteLength:e}),o||(this.byteLength=e)},P=function(t,e,n){f(this,P,"DataView"),f(t,E,"DataView");var r=A(t).byteLength,i=l(e);if(i<0||i>r)throw R("Wrong offset");if(i+(n=void 0===n?r-i:h(n))>r)throw R("Wrong length");S(this,{buffer:t,byteLength:n,byteOffset:i}),o||(this.buffer=t,this.byteLength=n,this.byteOffset=i)},o&&(D(E,"byteLength"),D(P,"buffer"),D(P,"byteLength"),D(P,"byteOffset")),c(P.prototype,{getInt8:function(t){return U(this,1,t)[0]<<24>>24},getUint8:function(t){return U(this,1,t)[0]},getInt16:function(t){var e=U(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=U(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return L(U(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return L(U(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return I(U(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return I(U(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){Y(this,1,t,C,e)},setUint8:function(t,e){Y(this,1,t,C,e)},setInt16:function(t,e){Y(this,2,t,z,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){Y(this,2,t,z,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){Y(this,4,t,B,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){Y(this,4,t,B,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){Y(this,4,t,F,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){Y(this,8,t,N,e,arguments.length>2?arguments[2]:void 0)}});w(E,"ArrayBuffer"),w(P,"DataView"),t.exports={ArrayBuffer:E,DataView:P}},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(69),a=n(14),u=n(54),c=n(47),s=n(48),f=n(8),l=n(3),h=n(1),p=n(89),y=n(31),d=n(94);t.exports=function(t,e,n){var v=-1!==t.indexOf("Map"),g=-1!==t.indexOf("Weak"),m=v?"set":"add",b=o[t],w=b&&b.prototype,x=b,_={},k=function(t){var e=w[t];a(w,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(g&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!l(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!l(t))&&e.call(this,0===t?0:t)}:function(t,n){return e.call(this,0===t?0:t,n),this})};if(i(t,!f(b)||!(g||w.forEach&&!h((function(){(new b).entries().next()})))))x=n.getConstructor(e,t,v,m),u.enable();else if(i(t,!0)){var A=new x,S=A[m](g?{}:-0,1)!=A,O=h((function(){A.has(1)})),E=p((function(t){new b(t)})),P=!g&&h((function(){for(var t=new b,e=5;e--;)t[m](e,e);return!t.has(-0)}));E||((x=e((function(e,n){s(e,x,t);var r=d(new b,e,x);return null!=n&&c(n,r[m],{that:r,AS_ENTRIES:v}),r}))).prototype=w,w.constructor=x),(O||P)&&(k("delete"),k("has"),v&&k("get")),(P||S)&&k(m),g&&w.clear&&delete w.clear}return _[t]=x,r({global:!0,forced:x!=b},_),y(x,t),g||n.setStrong(x,t,v),x}},function(t,e,n){var r=n(8),o=n(3),i=n(36);t.exports=function(t,e,n){var a,u;return i&&r(a=e.constructor)&&a!==n&&o(u=a.prototype)&&u!==n.prototype&&i(t,u),t}},function(t,e){var n=Math.expm1,r=Math.exp;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:r(t)-1}:n},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,n){"use strict";var r=n(28),o=n(2),i=n(1),a=n(132);t.exports=r||!i((function(){if(!(a&&a<535)){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete o[t]}}))},function(t,e,n){"use strict";var r=n(21),o=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 o(t)}},function(t,e,n){var r=n(1),o=n(2).RegExp;e.UNSUPPORTED_Y=r((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=r((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},function(t,e,n){"use strict";var r,o,i=n(9),a=n(62),u=n(99),c=n(84),s=n(30),f=n(16).get,l=n(142),h=n(191),p=RegExp.prototype.exec,y=c("native-string-replace",String.prototype.replace),d=p,v=(r=/a/,o=/b*/g,p.call(r,"a"),p.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),g=u.UNSUPPORTED_Y||u.BROKEN_CARET,m=void 0!==/()??/.exec("")[1];(v||m||g||l||h)&&(d=function(t){var e,n,r,o,u,c,l,h=this,b=f(h),w=i(t),x=b.raw;if(x)return x.lastIndex=h.lastIndex,e=d.call(x,w),h.lastIndex=x.lastIndex,e;var _=b.groups,k=g&&h.sticky,A=a.call(h),S=h.source,O=0,E=w;if(k&&(-1===(A=A.replace("y","")).indexOf("g")&&(A+="g"),E=w.slice(h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==w.charAt(h.lastIndex-1))&&(S="(?: "+S+")",E=" "+E,O++),n=new RegExp("^(?:"+S+")",A)),m&&(n=new RegExp("^"+S+"$(?!\\s)",A)),v&&(r=h.lastIndex),o=p.call(k?n:h,E),k?o?(o.input=o.input.slice(O),o[0]=o[0].slice(O),o.index=h.lastIndex,h.lastIndex+=o[0].length):h.lastIndex=0:v&&o&&(h.lastIndex=h.global?o.index+o[0].length:r),m&&o&&o.length>1&&y.call(o[0],n,(function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(o[u]=void 0)})),o&&_)for(o.groups=c=s(null),u=0;u<_.length;u++)c[(l=_[u])[0]]=o[l[1]];return o}),t.exports=d},function(t,e,n){var r=n(17),o=n(9),i=n(15),a=function(t){return function(e,n){var a,u,c=o(i(e)),s=r(n),f=c.length;return s<0||s>=f?t?"":void 0:(a=c.charCodeAt(s))<55296||a>56319||s+1===f||(u=c.charCodeAt(s+1))<56320||u>57343?t?c.charAt(s):a:t?c.slice(s,s+2):u-56320+(a-55296<<10)+65536}};t.exports={codeAt:a(!1),charAt:a(!0)}},function(t,e,n){"use strict";n(143);var r=n(14),o=n(100),i=n(1),a=n(6),u=n(24),c=a("species"),s=RegExp.prototype;t.exports=function(t,e,n,f){var l=a(t),h=!i((function(){var e={};return e[l]=function(){return 7},7!=""[t](e)})),p=h&&!i((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[l]=/./[l]),n.exec=function(){return e=!0,null},n[l](""),!e}));if(!h||!p||n){var y=/./[l],d=e(l,""[t],(function(t,e,n,r,i){var a=e.exec;return a===o||a===s.exec?h&&!i?{done:!0,value:y.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}));r(String.prototype,t,d[0]),r(s,l,d[1])}f&&u(s[l],"sham",!0)}},function(t,e,n){"use strict";var r=n(101).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r=n(7),o=n(60),i=r.TYPED_ARRAY_CONSTRUCTOR,a=r.aTypedArrayConstructor;t.exports=function(t){return a(o(t,t[i]))}},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){var r=n(486),o=n(487),i=n(488),a=n(489),u=n(490);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=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,t.exports=c},function(t,e,n){var r=n(79);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(55)(Object,"create");t.exports=r},function(t,e,n){var r=n(510);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(213),o=n(217),i=n(113);t.exports=function(t){return i(t)?r(t):o(t)}},function(t,e,n){(function(t){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(32),i=n(526),a="object"==r(e)&&e&&!e.nodeType&&e,u=a&&"object"==r(t)&&t&&!t.nodeType&&t,c=u&&u.exports===a?o.Buffer:void 0,s=(c?c.isBuffer:void 0)||i;t.exports=s}).call(this,n(105)(t))},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(203),o=n(216);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},function(t,e,n){var r=n(213),o=n(540),i=n(113);t.exports=function(t){return i(t)?r(t,!0):o(t)}},function(t,e,n){var r=n(3),o=n(65),i=n(35),a=n(159),u=n(6)("toPrimitive");t.exports=function(t,e){if(!r(t)||o(t))return t;var n,c=i(t,u);if(c){if(void 0===e&&(e="default"),n=c.call(t,e),!r(n)||o(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},function(t,e,n){var r=n(43),o=n(1);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(t,e){t.exports=function(t){try{return String(t)}catch(t){return"Object"}}},function(t,e,n){var r=n(2),o=n(119),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,e,n){var r=n(2);t.exports=function(t,e){try{Object.defineProperty(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},function(t,e,n){var r=n(12),o=n(121),i=n(19),a=n(10);t.exports=function(t,e){for(var n=o(e),u=a.f,c=i.f,s=0;s<n.length;s++){var f=n[s];r(t,f)||u(t,f,c(e,f))}}},function(t,e,n){var r=n(20),o=n(44),i=n(123),a=n(4);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r={};r[n(6)("toStringTag")]="z",t.exports="[object z]"===String(r)},function(t,e,n){var r=n(5),o=n(10),i=n(4),a=n(70);t.exports=r?Object.defineProperties:function(t,e){i(t);for(var n,r=a(e),u=r.length,c=0;u>c;)o.f(t,n=r[c++],e[n]);return t}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(23),i=n(44).f,a={}.toString,u="object"==("undefined"==typeof window?"undefined":r(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"[object Window]"==a.call(t)?function(t){try{return i(t)}catch(t){return u.slice()}}(t):i(o(t))}},function(t,e,n){var r=n(1);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,n){var r=n(6),o=n(73),i=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},function(t,e,n){"use strict";var r=n(11),o=n(45),i=n(13);t.exports=function(t){for(var e=r(this),n=i(e),a=arguments.length,u=o(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,s=void 0===c?n:o(c,n);s>u;)e[u++]=t;return e}},function(t,e,n){"use strict";var r=n(0),o=n(28),i=n(50),a=n(8),u=n(131),c=n(29),s=n(36),f=n(31),l=n(24),h=n(14),p=n(6),y=n(73),d=n(172),v=i.PROPER,g=i.CONFIGURABLE,m=d.IteratorPrototype,b=d.BUGGY_SAFARI_ITERATORS,w=p("iterator"),x=function(){return this};t.exports=function(t,e,n,i,p,d,_){u(n,e,i);var k,A,S,O=function(t){if(t===p&&R)return R;if(!b&&t in j)return j[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},E=e+" Iterator",P=!1,j=t.prototype,M=j[w]||j["@@iterator"]||p&&j[p],R=!b&&M||O(p),T="Array"==e&&j.entries||M;if(T&&(k=c(T.call(new t)))!==Object.prototype&&k.next&&(o||c(k)===m||(s?s(k,m):a(k[w])||h(k,w,x)),f(k,E,!0,!0),o&&(y[E]=x)),v&&"values"==p&&M&&"values"!==M.name&&(!o&&g?l(j,"name","values"):(P=!0,R=function(){return M.call(this)})),p)if(A={values:O("values"),keys:d?R:O("keys"),entries:O("entries")},_)for(S in A)(b||P||!(S in j))&&h(j,S,A[S]);else r({target:e,proto:!0,forced:b||P},A);return o&&!_||j[w]===R||h(j,w,R,{name:p}),y[e]=R,A}},function(t,e,n){"use strict";var r=n(172).IteratorPrototype,o=n(30),i=n(33),a=n(31),u=n(73),c=function(){return this};t.exports=function(t,e,n){var s=e+" Iterator";return t.prototype=o(r,{next:i(1,n)}),a(t,s,!1,!0),u[s]=c,t}},function(t,e,n){var r=n(34).match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},function(t,e){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(t,e,n){var r=n(72),o=n(117);t.exports=function(t){if(r(t))return t;throw TypeError(o(t)+" is not a constructor")}},function(t,e,n){var r=n(25),o=n(9),i=n(136),a=n(15),u=Math.ceil,c=function(t){return function(e,n,c){var s,f,l=o(a(e)),h=r(n),p=l.length,y=void 0===c?" ":o(c);return h<=p||""==y?l:(s=h-p,(f=i.call(y,u(s/y.length))).length>s&&(f=f.slice(0,s)),t?l+f:f+l)}};t.exports={start:c(!1),end:c(!0)}},function(t,e,n){"use strict";var r=n(17),o=n(9),i=n(15);t.exports=function(t){var e=o(i(this)),n="",a=r(t);if(a<0||a==1/0)throw RangeError("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(e+=e))1&a&&(n+=e);return n}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e){var n=1..valueOf;t.exports=function(t){return n.call(t)}},function(t,e,n){var r=n(3),o=Math.floor;t.exports=Number.isInteger||function(t){return!r(t)&&isFinite(t)&&o(t)===t}},function(t,e,n){var r,o,i,a,u=n(2),c=n(8),s=n(1),f=n(46),l=n(163),h=n(85),p=n(187),y=n(57),d=u.setImmediate,v=u.clearImmediate,g=u.process,m=u.MessageChannel,b=u.Dispatch,w=0,x={};try{r=u.location}catch(t){}var _=function(t){if(x.hasOwnProperty(t)){var e=x[t];delete x[t],e()}},k=function(t){return function(){_(t)}},A=function(t){_(t.data)},S=function(t){u.postMessage(String(t),r.protocol+"//"+r.host)};d&&v||(d=function(t){for(var e=[],n=arguments.length,r=1;n>r;)e.push(arguments[r++]);return x[++w]=function(){(c(t)?t:Function(t)).apply(void 0,e)},o(w),w},v=function(t){delete x[t]},y?o=function(t){g.nextTick(k(t))}:b&&b.now?o=function(t){b.now(k(t))}:m&&!p?(a=(i=new m).port2,i.port1.onmessage=A,o=f(a.postMessage,a,1)):u.addEventListener&&c(u.postMessage)&&!u.importScripts&&r&&"file:"!==r.protocol&&!s(S)?(o=S,u.addEventListener("message",A,!1)):o="onreadystatechange"in h("script")?function(t){l.appendChild(h("script")).onreadystatechange=function(){l.removeChild(this),_(t)}}:function(t){setTimeout(k(t),0)}),t.exports={set:d,clear:v}},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e,n){var r=n(1),o=n(2).RegExp;t.exports=r((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},function(t,e,n){"use strict";var r=n(0),o=n(100);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(t,e,n){var r=n(77);t.exports=function(t){if(r(t))throw TypeError("The method doesn't accept regular expressions");return t}},function(t,e,n){var r=n(6)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},function(t,e,n){var r=n(50).PROPER,o=n(1),i=n(96);t.exports=function(t){return o((function(){return!!i[t]()||"
"!=="
"[t]()||r&&i[t].name!==t}))}},function(t,e,n){var r=n(2),o=n(1),i=n(89),a=n(7).NATIVE_ARRAY_BUFFER_VIEWS,u=r.ArrayBuffer,c=r.Int8Array;t.exports=!a||!o((function(){c(1)}))||!o((function(){new c(-1)}))||!i((function(t){new c,new c(null),new c(1.5),new c(t)}),!0)||o((function(){return 1!==new c(new u(2),1,void 0).length}))},function(t,e,n){var r=n(55)(n(32),"Map");t.exports=r},function(t,e,n){var r=n(523),o=n(212),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,u=a?function(t){return null==t?[]:(t=Object(t),r(a(t),(function(e){return i.call(t,e)})))}:o;t.exports=u},function(t,e,n){var r=n(527),o=n(151),i=n(152),a=i&&i.isTypedArray,u=a?o(a):r;t.exports=u},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){(function(t){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(204),i="object"==r(e)&&e&&!e.nodeType&&e,a=i&&"object"==r(t)&&t&&!t.nodeType&&t,u=a&&a.exports===i&&o.process,c=function(){try{var t=a&&a.require&&a.require("util").types;return t||u&&u.binding&&u.binding("util")}catch(t){}}();t.exports=c}).call(this,n(105)(t))},function(t,e,n){var r=n(218)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(208);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},function(t,e,n){var r=n(40),o=n(575),i=n(233),a=Math.max,u=Math.min;t.exports=function(t,e,n){var c,s,f,l,h,p,y=0,d=!1,v=!1,g=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function m(e){var n=c,r=s;return c=s=void 0,y=e,l=t.apply(r,n)}function b(t){return y=t,h=setTimeout(x,e),d?m(t):l}function w(t){var n=t-p;return void 0===p||n>=e||n<0||v&&t-y>=f}function x(){var t=o();if(w(t))return _(t);h=setTimeout(x,function(t){var n=e-(t-p);return v?u(n,f-(t-y)):n}(t))}function _(t){return h=void 0,g&&c?m(t):(c=s=void 0,l)}function k(){var t=o(),n=w(t);if(c=arguments,s=this,p=t,n){if(void 0===h)return b(p);if(v)return clearTimeout(h),h=setTimeout(x,e),m(p)}return void 0===h&&(h=setTimeout(x,e)),l}return e=i(e)||0,r(n)&&(d=!!n.leading,f=(v="maxWait"in n)?a(i(n.maxWait)||0,e):f,g="trailing"in n?!!n.trailing:g),k.cancel=function(){void 0!==h&&clearTimeout(h),y=0,c=p=s=h=void 0},k.flush=function(){return void 0===h?l:_(o())},k}},function(t,e,n){var r=n(484);t.exports=function(t,e){return r(t,e)}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}t.exports=r},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(116);t.exports=o&&!Symbol.sham&&"symbol"==r(Symbol.iterator)},function(t,e,n){var r=n(8),o=n(3);t.exports=function(t,e){var n,i;if("string"===e&&r(n=t.toString)&&!o(i=n.call(t)))return i;if(r(n=t.valueOf)&&!o(i=n.call(t)))return i;if("string"!==e&&r(n=t.toString)&&!o(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(5),o=n(1),i=n(85);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(2),o=n(8),i=n(86),a=r.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},function(t,e,n){var r=n(12),o=n(23),i=n(68).indexOf,a=n(67);t.exports=function(t,e){var n,u=o(t),c=0,s=[];for(n in u)!r(a,n)&&r(u,n)&&s.push(n);for(;e.length>c;)r(u,n=e[c++])&&(~i(s,n)||s.push(n));return s}},function(t,e,n){var r=n(20);t.exports=r("document","documentElement")},function(t,e,n){var r=n(6);e.f=r},function(t,e,n){var r=n(2);t.exports=r},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(8);t.exports=function(t){if("object"===r(t)||o(t))return t;throw TypeError("Can't set "+String(t)+" as a prototype")}},function(t,e,n){var r=n(4),o=n(35);t.exports=function(t,e,n){var i,a;r(t);try{if(!(i=o(t,"return"))){if("throw"===e)throw n;return n}i=i.call(t)}catch(t){a=!0,i=t}if("throw"===e)throw n;if(a)throw i;return r(i),n}},function(t,e,n){"use strict";var r=n(11),o=n(45),i=n(13),a=Math.min;t.exports=[].copyWithin||function(t,e){var n=r(this),u=i(n),c=o(t,u),s=o(e,u),f=arguments.length>2?arguments[2]:void 0,l=a((void 0===f?u:o(f,u))-s,u-c),h=1;for(s<c&&c<s+l&&(h=-1,s+=l-1,c+=l-1);l-- >0;)s in n?n[c]=n[s]:delete n[c],c+=h,s+=h;return n}},function(t,e,n){"use strict";var r=n(51),o=n(13),i=n(46);t.exports=function t(e,n,a,u,c,s,f,l){for(var h,p=c,y=0,d=!!f&&i(f,l,3);y<u;){if(y in a){if(h=d?d(a[y],y,n):a[y],s>0&&r(h))p=t(e,n,h,o(h),p,s-1)-1;else{if(p>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[p]=h}p++}y++}return p}},function(t,e,n){"use strict";var r=n(18).forEach,o=n(38)("forEach");t.exports=o?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,n){"use strict";var r=n(46),o=n(11),i=n(270),a=n(128),u=n(72),c=n(13),s=n(53),f=n(88),l=n(74);t.exports=function(t){var e=o(t),n=u(this),h=arguments.length,p=h>1?arguments[1]:void 0,y=void 0!==p;y&&(p=r(p,h>2?arguments[2]:void 0,2));var d,v,g,m,b,w,x=l(e),_=0;if(!x||this==Array&&a(x))for(d=c(e),v=n?new this(d):Array(d);d>_;_++)w=y?p(e[_],_):e[_],s(v,_,w);else for(b=(m=f(e,x)).next,v=n?new this:[];!(g=b.call(m)).done;_++)w=y?i(m,p,[g.value,_],!0):g.value,s(v,_,w);return v.length=_,v}},function(t,e,n){"use strict";var r,o,i,a=n(1),u=n(8),c=n(30),s=n(29),f=n(14),l=n(6),h=n(28),p=l("iterator"),y=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(r=o):y=!0),null==r||a((function(){var t={};return r[p].call(t)!==t}))?r={}:h&&(r=c(r)),u(r[p])||f(r,p,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:y}},function(t,e,n){"use strict";var r=n(23),o=n(17),i=n(13),a=n(38),u=Math.min,c=[].lastIndexOf,s=!!c&&1/[1].lastIndexOf(1,-0)<0,f=a("lastIndexOf"),l=s||!f;t.exports=l?function(t){if(s)return c.apply(this,arguments)||0;var e=r(this),n=i(e),a=n-1;for(arguments.length>1&&(a=u(a,o(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in e&&e[a]===t)return a||0;return-1}:c},function(t,e){var n=Math.floor,r=function(t,e){for(var n,r,o=t.length,i=1;i<o;){for(r=i,n=t[i];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==i++&&(t[r]=n)}return t},o=function(t,e,n){for(var r=t.length,o=e.length,i=0,a=0,u=[];i<r||a<o;)i<r&&a<o?u.push(n(t[i],e[a])<=0?t[i++]:e[a++]):u.push(i<r?t[i++]:e[a++]);return u};t.exports=function t(e,i){var a=e.length,u=n(a/2);return a<8?r(e,i):o(t(e.slice(0,u),i),t(e.slice(u),i),i)}},function(t,e,n){var r=n(34).match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},function(t,e,n){var r=n(34);t.exports=/MSIE|Trident/.test(r)},function(t,e,n){var r=n(17),o=n(25);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=o(e);if(e!==n)throw RangeError("Wrong length or index");return n}},function(t,e,n){"use strict";var r=n(21),o=n(3),i=[].slice,a={},u=function(t,e,n){if(!(e in a)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";a[e]=Function("C,a","return new C("+r.join(",")+")")}return a[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=i.call(arguments,1),a=function(){var r=n.concat(i.call(arguments));return this instanceof a?u(e,r.length,r):e.apply(t,r)};return o(e.prototype)&&(a.prototype=e.prototype),a}},function(t,e,n){"use strict";var r=n(10).f,o=n(30),i=n(59),a=n(46),u=n(48),c=n(47),s=n(130),f=n(58),l=n(5),h=n(54).fastKey,p=n(16),y=p.set,d=p.getterFor;t.exports={getConstructor:function(t,e,n,s){var f=t((function(t,r){u(t,f,e),y(t,{type:e,index:o(null),first:void 0,last:void 0,size:0}),l||(t.size=0),null!=r&&c(r,t[s],{that:t,AS_ENTRIES:n})})),p=d(e),v=function(t,e,n){var r,o,i=p(t),a=g(t,e);return a?a.value=n:(i.last=a={index:o=h(e,!0),key:e,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),l?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},g=function(t,e){var n,r=p(t),o=h(e);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==e)return n};return i(f.prototype,{clear:function(){for(var t=p(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,l?t.size=0:this.size=0},delete:function(t){var e=p(this),n=g(this,t);if(n){var r=n.next,o=n.previous;delete e.index[n.index],n.removed=!0,o&&(o.next=r),r&&(r.previous=o),e.first==n&&(e.first=r),e.last==n&&(e.last=o),l?e.size--:this.size--}return!!n},forEach:function(t){for(var e,n=p(this),r=a(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!g(this,t)}}),i(f.prototype,n?{get:function(t){var e=g(this,t);return e&&e.value},set:function(t,e){return v(this,0===t?0:t,e)}}:{add:function(t){return v(this,t=0===t?0:t,t)}}),l&&r(f.prototype,"size",{get:function(){return p(this).size}}),f},setStrong:function(t,e,n){var r=e+" Iterator",o=d(e),i=d(r);s(t,e,(function(t,e){y(this,{type:r,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),f(e)}}},function(t,e){var n=Math.log;t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:n(1+t)}},function(t,e,n){var r=n(2),o=n(1),i=n(9),a=n(61).trim,u=n(96),c=r.parseFloat,s=r.Symbol,f=s&&s.iterator,l=1/c(u+"-0")!=-1/0||f&&!o((function(){c(Object(f))}));t.exports=l?function(t){var e=a(i(t)),n=c(e);return 0===n&&"-"==e.charAt(0)?-0:n}:c},function(t,e,n){var r=n(2),o=n(1),i=n(9),a=n(61).trim,u=n(96),c=r.parseInt,s=r.Symbol,f=s&&s.iterator,l=/^[+-]?0x/i,h=8!==c(u+"08")||22!==c(u+"0x16")||f&&!o((function(){c(Object(f))}));t.exports=h?function(t,e){var n=a(i(t));return c(n,e>>>0||(l.test(n)?16:10))}:c},function(t,e,n){"use strict";var r=n(5),o=n(1),i=n(70),a=n(123),u=n(83),c=n(11),s=n(64),f=Object.assign,l=Object.defineProperty;t.exports=!f||o((function(){if(r&&1!==f({b:1},f(l({},"a",{enumerable:!0,get:function(){l(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=f({},t)[n]||"abcdefghijklmnopqrst"!=i(f({},e)).join("")}))?function(t,e){for(var n=c(t),o=arguments.length,f=1,l=a.f,h=u.f;o>f;)for(var p,y=s(arguments[f++]),d=l?i(y).concat(l(y)):i(y),v=d.length,g=0;v>g;)p=d[g++],r&&!h.call(y,p)||(n[p]=y[p]);return n}:f},function(t,e,n){var r=n(5),o=n(70),i=n(23),a=n(83).f,u=function(t){return function(e){for(var n,u=i(e),c=o(u),s=c.length,f=0,l=[];s>f;)n=c[f++],r&&!a.call(u,n)||l.push(t?[n,u[n]]:u[n]);return l}};t.exports={entries:u(!0),values:u(!1)}},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){var r=n(2);t.exports=r.Promise},function(t,e,n){var r=n(34);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},function(t,e,n){var r,o,i,a,u,c,s,f,l=n(2),h=n(19).f,p=n(140).set,y=n(187),d=n(373),v=n(374),g=n(57),m=l.MutationObserver||l.WebKitMutationObserver,b=l.document,w=l.process,x=l.Promise,_=h(l,"queueMicrotask"),k=_&&_.value;k||(r=function(){var t,e;for(g&&(t=w.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},y||g||v||!m||!b?!d&&x&&x.resolve?((s=x.resolve(void 0)).constructor=x,f=s.then,a=function(){f.call(s,r)}):a=g?function(){w.nextTick(r)}:function(){p.call(l,r)}:(u=!0,c=b.createTextNode(""),new m(r).observe(c,{characterData:!0}),a=function(){c.data=u=!u})),t.exports=k||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},function(t,e,n){var r=n(4),o=n(3),i=n(98);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){var r=n(12);t.exports=function(t){return void 0!==t&&(r(t,"value")||r(t,"writable"))}},function(t,e,n){var r=n(1),o=n(2).RegExp;t.exports=r((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},function(t,e,n){"use strict";var r=n(101).charAt,o=n(9),i=n(16),a=n(130),u=i.set,c=i.getterFor("String Iterator");a(String,"String",(function(t){u(this,{type:"String Iterator",string:o(t),index:0})}),(function(){var t,e=c(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){var r=n(34);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(r)},function(t,e,n){var r=n(11),o=Math.floor,i="".replace,a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,c,s,f){var l=n+t.length,h=c.length,p=u;return void 0!==s&&(s=r(s),p=a),i.call(f,p,(function(r,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(l);case"<":a=s[i.slice(1,-1)];break;default:var u=+i;if(0===u)return r;if(u>h){var f=o(u/10);return 0===f?r:f<=h?void 0===c[f-1]?i.charAt(1):c[f-1]+i.charAt(1):r}a=c[u-1]}return void 0===a?"":a}))}},function(t,e,n){var r=n(435);t.exports=function(t,e){var n=r(t);if(n%e)throw RangeError("Wrong offset");return n}},function(t,e,n){var r=n(134),o=n(11),i=n(13),a=n(88),u=n(74),c=n(128),s=n(46),f=n(7).aTypedArrayConstructor;t.exports=function(t){var e,n,l,h,p,y,d=r(this),v=o(t),g=arguments.length,m=g>1?arguments[1]:void 0,b=void 0!==m,w=u(v);if(w&&!c(w))for(y=(p=a(v,w)).next,v=[];!(h=y.call(p)).done;)v.push(h.value);for(b&&g>2&&(m=s(m,arguments[2],2)),n=i(v),l=new(f(d))(n),e=0;n>e;e++)l[e]=b?m(v[e],e):v[e];return l}},function(t,e,n){"use strict";var r=n(59),o=n(54).getWeakData,i=n(4),a=n(3),u=n(48),c=n(47),s=n(18),f=n(12),l=n(16),h=l.set,p=l.getterFor,y=s.find,d=s.findIndex,v=0,g=function(t){return t.frozen||(t.frozen=new m)},m=function(){this.entries=[]},b=function(t,e){return y(t.entries,(function(t){return t[0]===e}))};m.prototype={get:function(t){var e=b(this,t);if(e)return e[1]},has:function(t){return!!b(this,t)},set:function(t,e){var n=b(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=d(this.entries,(function(e){return e[0]===t}));return~e&&this.entries.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,s){var l=t((function(t,r){u(t,l,e),h(t,{type:e,id:v++,frozen:void 0}),null!=r&&c(r,t[s],{that:t,AS_ENTRIES:n})})),y=p(e),d=function(t,e,n){var r=y(t),a=o(i(e),!0);return!0===a?g(r).set(e,n):a[r.id]=n,t};return r(l.prototype,{delete:function(t){var e=y(this);if(!a(t))return!1;var n=o(t);return!0===n?g(e).delete(t):n&&f(n,e.id)&&delete n[e.id]},has:function(t){var e=y(this);if(!a(t))return!1;var n=o(t);return!0===n?g(e).has(t):n&&f(n,e.id)}}),r(l.prototype,n?{get:function(t){var e=y(this);if(a(t)){var n=o(t);return!0===n?g(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return d(this,t,e)}}:{add:function(t){return d(this,t,!0)}}),l}}},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}},function(t,e,n){var r=n(85)("span").classList,o=r&&r.constructor&&r.constructor.prototype;t.exports=o===Object.prototype?void 0:o},function(t,e,n){var r=n(1),o=n(6),i=n(28),a=o("iterator");t.exports=!r((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),i&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},function(t,e,n){"use strict";n(90);var r=n(0),o=n(20),i=n(200),a=n(14),u=n(59),c=n(31),s=n(131),f=n(16),l=n(48),h=n(8),p=n(12),y=n(46),d=n(52),v=n(4),g=n(3),m=n(9),b=n(30),w=n(33),x=n(88),_=n(74),k=n(6),A=o("fetch"),S=o("Request"),O=S&&S.prototype,E=o("Headers"),P=k("iterator"),j=f.set,M=f.getterFor("URLSearchParams"),R=f.getterFor("URLSearchParamsIterator"),T=/\+/g,I=Array(4),C=function(t){return I[t-1]||(I[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},z=function(t){try{return decodeURIComponent(t)}catch(e){return t}},B=function(t){var e=t.replace(T," "),n=4;try{return decodeURIComponent(e)}catch(t){for(;n;)e=e.replace(C(n--),z);return e}},L=/[!'()~]|%20/g,F={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},N=function(t){return F[t]},D=function(t){return encodeURIComponent(t).replace(L,N)},U=function(t,e){if(e)for(var n,r,o=e.split("&"),i=0;i<o.length;)(n=o[i++]).length&&(r=n.split("="),t.push({key:B(r.shift()),value:B(r.join("="))}))},Y=function(t){this.entries.length=0,U(this.entries,t)},G=function(t,e){if(t<e)throw TypeError("Not enough arguments")},W=s((function(t,e){j(this,{type:"URLSearchParamsIterator",iterator:x(M(t).entries),kind:e})}),"Iterator",(function(){var t=R(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n})),H=function(){l(this,H,"URLSearchParams");var t,e,n,r,o,i,a,u,c,s=arguments.length>0?arguments[0]:void 0,f=this,h=[];if(j(f,{type:"URLSearchParams",entries:h,updateURL:function(){},updateSearchParams:Y}),void 0!==s)if(g(s))if(t=_(s))for(n=(e=x(s,t)).next;!(r=n.call(e)).done;){if((a=(i=(o=x(v(r.value))).next).call(o)).done||(u=i.call(o)).done||!i.call(o).done)throw TypeError("Expected sequence with length 2");h.push({key:m(a.value),value:m(u.value)})}else for(c in s)p(s,c)&&h.push({key:c,value:m(s[c])});else U(h,"string"==typeof s?"?"===s.charAt(0)?s.slice(1):s:m(s))},V=H.prototype;if(u(V,{append:function(t,e){G(arguments.length,2);var n=M(this);n.entries.push({key:m(t),value:m(e)}),n.updateURL()},delete:function(t){G(arguments.length,1);for(var e=M(this),n=e.entries,r=m(t),o=0;o<n.length;)n[o].key===r?n.splice(o,1):o++;e.updateURL()},get:function(t){G(arguments.length,1);for(var e=M(this).entries,n=m(t),r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){G(arguments.length,1);for(var e=M(this).entries,n=m(t),r=[],o=0;o<e.length;o++)e[o].key===n&&r.push(e[o].value);return r},has:function(t){G(arguments.length,1);for(var e=M(this).entries,n=m(t),r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){G(arguments.length,1);for(var n,r=M(this),o=r.entries,i=!1,a=m(t),u=m(e),c=0;c<o.length;c++)(n=o[c]).key===a&&(i?o.splice(c--,1):(i=!0,n.value=u));i||o.push({key:a,value:u}),r.updateURL()},sort:function(){var t,e,n,r=M(this),o=r.entries,i=o.slice();for(o.length=0,n=0;n<i.length;n++){for(t=i[n],e=0;e<n;e++)if(o[e].key>t.key){o.splice(e,0,t);break}e===n&&o.push(t)}r.updateURL()},forEach:function(t){for(var e,n=M(this).entries,r=y(t,arguments.length>1?arguments[1]:void 0,3),o=0;o<n.length;)r((e=n[o++]).value,e.key,this)},keys:function(){return new W(this,"keys")},values:function(){return new W(this,"values")},entries:function(){return new W(this,"entries")}},{enumerable:!0}),a(V,P,V.entries,{name:"entries"}),a(V,"toString",(function(){for(var t,e=M(this).entries,n=[],r=0;r<e.length;)t=e[r++],n.push(D(t.key)+"="+D(t.value));return n.join("&")}),{enumerable:!0}),c(H,"URLSearchParams"),r({global:!0,forced:!i},{URLSearchParams:H}),!i&&h(E)){var X=function(t){if(g(t)){var e,n=t.body;if("URLSearchParams"===d(n))return(e=t.headers?new E(t.headers):new E).has("content-type")||e.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),b(t,{body:w(0,String(n)),headers:w(0,e)})}return t};if(h(A)&&r({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return A(t,arguments.length>1?X(arguments[1]):{})}}),h(S)){var q=function(t){return l(this,q,"Request"),new S(t,arguments.length>1?X(arguments[1]):{})};O.constructor=q,q.prototype=O,r({global:!0,forced:!0},{Request:q})}}t.exports={URLSearchParams:H,getState:M}},function(t,e,n){var r=n(106),o=n(491),i=n(492),a=n(493),u=n(494),c=n(495);function s(t){var e=this.__data__=new r(t);this.size=e.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=u,s.prototype.set=c,t.exports=s},function(t,e,n){var r=n(56),o=n(40);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){(function(e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r="object"==(void 0===e?"undefined":n(e))&&e&&e.Object===Object&&e;t.exports=r}).call(this,n(157))},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,n){var r=n(502),o=n(509),i=n(511),a=n(512),u=n(513);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=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,t.exports=c},function(t,e,n){var r=n(514),o=n(517),i=n(518);t.exports=function(t,e,n,a,u,c){var s=1&n,f=t.length,l=e.length;if(f!=l&&!(s&&l>f))return!1;var h=c.get(t),p=c.get(e);if(h&&p)return h==e&&p==t;var y=-1,d=!0,v=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++y<f;){var g=t[y],m=e[y];if(a)var b=s?a(m,g,y,e,t,c):a(g,m,y,t,e,c);if(void 0!==b){if(b)continue;d=!1;break}if(v){if(!o(e,(function(t,e){if(!i(v,e)&&(g===t||u(g,t,n,a,c)))return v.push(e)}))){d=!1;break}}else if(g!==m&&!u(g,m,n,a,c)){d=!1;break}}return c.delete(t),c.delete(e),d}},function(t,e,n){var r=n(32).Uint8Array;t.exports=r},function(t,e,n){var r=n(210),o=n(149),i=n(110);t.exports=function(t){return r(t,i,o)}},function(t,e,n){var r=n(211),o=n(63);t.exports=function(t,e,n){var i=e(t);return o(t)?i:r(i,n(t))}},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(524),o=n(214),i=n(63),a=n(111),u=n(215),c=n(150),s=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),f=!n&&o(t),l=!n&&!f&&a(t),h=!n&&!f&&!l&&c(t),p=n||f||l||h,y=p?r(t.length,String):[],d=y.length;for(var v in t)!e&&!s.call(t,v)||p&&("length"==v||l&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||u(v,d))||y.push(v);return y}},function(t,e,n){var r=n(525),o=n(41),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!u.call(t,"callee")};t.exports=c},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var o=n(t);return!!(e=null==e?9007199254740991:e)&&("number"==o||"symbol"!=o&&r.test(t))&&t>-1&&t%1==0&&t<e}},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(112),o=n(528),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){var r=n(220),o=n(79),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];i.call(t,e)&&o(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(221);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(55),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e,n){var r=n(223),o=n(535),i=n(536);t.exports=function(t,e){return i(o(t,e,r),t+"")}},function(t,e){t.exports=function(t){return t}},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){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(79),i=n(113),a=n(215),u=n(40);t.exports=function(t,e,n){if(!u(n))return!1;var c=r(e);return!!("number"==c?i(n)&&a(e,n.length):"string"==c&&e in n)&&o(n[e],t)}},function(t,e,n){var r=n(56),o=n(41),i=n(543);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Error]"==e||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!i(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},function(t,e){t.exports=/<%=([\s\S]+?)%>/g},function(t,e,n){var r=n(551);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(56),i=n(41);t.exports=function(t){return"symbol"==r(t)||i(t)&&"[object Symbol]"==o(t)}},function(t,e,n){var r=n(554);t.exports=function(t){return r(t,4)}},function(t,e,n){var r=n(211),o=n(153),i=n(149),a=n(212),u=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,i(t)),t=o(t);return e}:a;t.exports=u},function(t,e,n){var r=n(576),o=n(40),i=n(230),a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,s=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=u.test(t);return n||c.test(t)?s(t.slice(2),n?2:8):a.test(t)?NaN:+t}},function(t,e,n){var r=n(155),o=n(40);t.exports=function(t,e,n){var i=!0,a=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),r(t,e,{leading:i,maxWait:e,trailing:a})}},function(t,e,n){var r=n(578);t.exports=function(t){return r(2,t)}},function(t,e,n){var r=n(217),o=n(81),i=n(214),a=n(63),u=n(113),c=n(111),s=n(112),f=n(150),l=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(u(t)&&(a(t)||"string"==typeof t||"function"==typeof t.splice||c(t)||f(t)||i(t)))return!t.length;var e=o(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(s(t))return!r(t).length;for(var n in t)if(l.call(t,n))return!1;return!0}},function(t,e,n){var r=n(533),o=n(542),i=n(544),a=n(545),u=n(546),c=n(226),s=n(225),f=n(110),l=n(228),h=n(547),p=n(229),y=/\b__p \+= '';/g,d=/\b(__p \+=) '' \+/g,v=/(__e\(.*?\)|\b__t\)) \+\n'';/g,g=/[()=,{}\[\]\/\s]/,m=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,b=/($^)/,w=/['\n\r\u2028\u2029\\]/g,x=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var _=h.imports._.templateSettings||h;n&&s(t,e,n)&&(e=void 0),t=p(t),e=r({},e,_,a);var k,A,S=r({},e.imports,_.imports,a),O=f(S),E=i(S,O),P=0,j=e.interpolate||b,M="__p += '",R=RegExp((e.escape||b).source+"|"+j.source+"|"+(j===l?m:b).source+"|"+(e.evaluate||b).source+"|$","g"),T=x.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(R,(function(e,n,r,o,i,a){return r||(r=o),M+=t.slice(P,a).replace(w,u),n&&(k=!0,M+="' +\n__e("+n+") +\n'"),i&&(A=!0,M+="';\n"+i+";\n__p += '"),r&&(M+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),P=a+e.length,e})),M+="';\n";var I=x.call(e,"variable")&&e.variable;if(I){if(g.test(I))throw new Error("Invalid `variable` option passed into `_.template`")}else M="with (obj) {\n"+M+"\n}\n";M=(A?M.replace(y,""):M).replace(d,"$1").replace(v,"$1;"),M="function("+(I||"obj")+") {\n"+(I?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(k?", __e = _.escape":"")+(A?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+M+"return __p\n}";var C=o((function(){return Function(O,T+"return "+M).apply(void 0,E)}));if(C.source=M,c(C))throw C;return C}},function(t,e,n){var r,o,i;o=[],void 0===(i="function"==typeof(r=function(){var t=function(t){return t.reduce((function(t,e){return 2*t+e}),0)},e=function(t){for(var e=[],n=7;n>=0;n--)e.push(!!(t&1<<n));return e},n=function(t){this.data=t,this.len=this.data.length,this.pos=0,this.readByte=function(){if(this.pos>=this.data.length)throw new Error("Attempted to read past end of stream.");return t instanceof Uint8Array?t[this.pos++]:255&t.charCodeAt(this.pos++)},this.readBytes=function(t){for(var e=[],n=0;n<t;n++)e.push(this.readByte());return e},this.read=function(t){for(var e="",n=0;n<t;n++)e+=String.fromCharCode(this.readByte());return e},this.readUnsigned=function(){var t=this.readBytes(2);return(t[1]<<8)+t[0]}},r=function(n,r){r||(r={});var o=function(t){for(var e=[],r=0;r<t;r++)e.push(n.readBytes(3));return e},i=function(){var t,e;e="";do{t=n.readByte(),e+=n.read(t)}while(0!==t);return e},a=function(a){a.leftPos=n.readUnsigned(),a.topPos=n.readUnsigned(),a.width=n.readUnsigned(),a.height=n.readUnsigned();var u=e(n.readByte());a.lctFlag=u.shift(),a.interlaced=u.shift(),a.sorted=u.shift(),a.reserved=u.splice(0,2),a.lctSize=t(u.splice(0,3)),a.lctFlag&&(a.lct=o(1<<a.lctSize+1)),a.lzwMinCodeSize=n.readByte();var c=i();a.pixels=function(t,e){for(var n,r,o=0,i=function(t){for(var n=0,r=0;r<t;r++)e.charCodeAt(o>>3)&1<<(7&o)&&(n|=1<<r),o++;return n},a=[],u=1<<t,c=u+1,s=t+1,f=[],l=function(){f=[],s=t+1;for(var e=0;e<u;e++)f[e]=[e];f[u]=[],f[c]=null};;)if(r=n,(n=i(s))!==u){if(n===c)break;if(n<f.length)r!==u&&f.push(f[r].concat(f[n][0]));else{if(n!==f.length)throw new Error("Invalid LZW code.");f.push(f[r].concat(f[r][0]))}a.push.apply(a,f[n]),f.length===1<<s&&s<12&&s++}else l();return a}(a.lzwMinCodeSize,c),a.interlaced&&(a.pixels=function(t,e){for(var n=new Array(t.length),r=t.length/e,o=function(r,o){var i=t.slice(o*e,(o+1)*e);n.splice.apply(n,[r*e,e].concat(i))},i=[0,4,2,1],a=[8,8,4,2],u=0,c=0;c<4;c++)for(var s=i[c];s<r;s+=a[c])o(s,u),u++;return n}(a.pixels,a.width)),r.img&&r.img(a)},u=function o(){var u={};switch(u.sentinel=n.readByte(),String.fromCharCode(u.sentinel)){case"!":u.type="ext",function(o){switch(o.label=n.readByte(),o.label){case 249:o.extType="gce",function(o){n.readByte();var i=e(n.readByte());o.reserved=i.splice(0,3),o.disposalMethod=t(i.splice(0,3)),o.userInput=i.shift(),o.transparencyGiven=i.shift(),o.delayTime=n.readUnsigned(),o.transparencyIndex=n.readByte(),o.terminator=n.readByte(),r.gce&&r.gce(o)}(o);break;case 254:o.extType="com",function(t){t.comment=i(),r.com&&r.com(t)}(o);break;case 1:o.extType="pte",function(t){n.readByte(),t.ptHeader=n.readBytes(12),t.ptData=i(),r.pte&&r.pte(t)}(o);break;case 255:o.extType="app",function(t){switch(n.readByte(),t.identifier=n.read(8),t.authCode=n.read(3),t.identifier){case"NETSCAPE":!function(t){n.readByte(),t.unknown=n.readByte(),t.iterations=n.readUnsigned(),t.terminator=n.readByte(),r.app&&r.app.NETSCAPE&&r.app.NETSCAPE(t)}(t);break;default:!function(t){t.appData=i(),r.app&&r.app[t.identifier]&&r.app[t.identifier](t)}(t)}}(o);break;default:o.extType="unknown",function(t){t.data=i(),r.unknown&&r.unknown(t)}(o)}}(u);break;case",":u.type="img",a(u);break;case";":u.type="eof",r.eof&&r.eof(u);break;default:throw new Error("Unknown block: 0x"+u.sentinel.toString(16))}"eof"!==u.type&&requestAnimationFrame(o)};!function(){var i={};if(i.sig=n.read(3),i.ver=n.read(3),"GIF"!==i.sig)throw new Error("Not a GIF file.");i.width=n.readUnsigned(),i.height=n.readUnsigned();var a=e(n.readByte());i.gctFlag=a.shift(),i.colorRes=t(a.splice(0,3)),i.sorted=a.shift(),i.gctSize=t(a.splice(0,3)),i.bgColor=n.readByte(),i.pixelAspectRatio=n.readByte(),i.gctFlag&&(i.gct=o(1<<i.gctSize+1)),r.hdr&&r.hdr(i)}(),requestAnimationFrame(u)};return function(t){var e,o,i={vp_l:0,vp_t:0,vp_w:null,vp_h:null,c_w:null,c_h:null};for(var a in t)i[a]=t[a];i.vp_w&&i.vp_h&&(i.is_vp=!0);var u=null,c=!1,s=null,f=null,l=null,h=null,p=null,y=null,d=null,v=!0,g=!1,m=[],b=[],w=i.gif;void 0===i.auto_play&&(i.auto_play=!w.getAttribute("rel:auto_play")||"1"==w.getAttribute("rel:auto_play"));var x,_,k,A,S=i.hasOwnProperty("on_end")?i.on_end:null,O=i.hasOwnProperty("loop_delay")?i.loop_delay:0,E=i.hasOwnProperty("loop_mode")?i.loop_mode:"auto",P=!i.hasOwnProperty("draw_while_loading")||i.draw_while_loading,j=!!P&&(!i.hasOwnProperty("show_progress_bar")||i.show_progress_bar),M=i.hasOwnProperty("progressbar_height")?i.progressbar_height:25,R=i.hasOwnProperty("progressbar_background_color")?i.progressbar_background_color:"rgba(255,255,255,0.4)",T=i.hasOwnProperty("progressbar_foreground_color")?i.progressbar_foreground_color:"rgba(255,0,22,.8)",I=function(){s=null,f=null,p=l,l=null,y=null},C=function(){try{r(e,G)}catch(t){L("parse")}},z=function(t,e){x.width=t*H(),x.height=e*H(),k.style.minWidth=t*H()+"px",A.width=t,A.height=e,A.style.width=t+"px",A.style.height=e+"px",A.getContext("2d").setTransform(1,0,0,1,0,0)},B=function(t,e,n){if(n&&j){var r,o,a,u=M;i.is_vp?g?(o=(i.vp_t+i.vp_h-u)/H(),u/=H(),r=i.vp_l/H()+t/e*(i.vp_w/H()),a=x.width/H()):(o=i.vp_t+i.vp_h-u,u=u,r=i.vp_l+t/e*i.vp_w,a=x.width):(o=(x.height-u)/(g?H():1),r=t/e*x.width/(g?H():1),a=x.width/(g?H():1),u/=g?H():1),_.fillStyle=R,_.fillRect(r,o,a-r,u),_.fillStyle=T,_.fillRect(0,o,r,u)}},L=function(t){u=t,o={width:w.width,height:w.height},m=[],_.fillStyle="black",_.fillRect(0,0,i.c_w?i.c_w:o.width,i.c_h?i.c_h:o.height),_.strokeStyle="red",_.lineWidth=3,_.moveTo(0,0),_.lineTo(i.c_w?i.c_w:o.width,i.c_h?i.c_h:o.height),_.moveTo(0,i.c_h?i.c_h:o.height),_.lineTo(i.c_w?i.c_w:o.width,0),_.stroke()},F=function(){y&&(m.push({data:y.getImageData(0,0,o.width,o.height),delay:f}),b.push({x:0,y:0}))},N=function(){var t,e,n,r=-1,o=0,a=function(t){r+=t,s()},c=(t=!1,e=function(){null!==S&&S(w),o++,!1!==E||o<0?n():(t=!1,v=!1)},n=function n(){if(t=v){a(1);var o=10*m[r].delay;o||(o=100),0==(r+1+m.length)%m.length?(o+=O,setTimeout(e,o)):setTimeout(n,o)}},function(){t||requestAnimationFrame(n)}),s=function(){var t;(r=parseInt(r,10))>m.length-1&&(r=0),r<0&&(r=0),t=b[r],A.getContext("2d").putImageData(m[r].data,t.x,t.y),_.globalCompositeOperation="copy",_.drawImage(A,0,0)};return{init:function(){u||(i.c_w&&i.c_h||_.scale(H(),H()),i.auto_play?c():(r=0,s()))},step:c,play:function(){v=!0,c()},pause:function(){v=!1},playing:v,move_relative:a,current_frame:function(){return r},length:function(){return m.length},move_to:function(t){r=t,s()}}}(),D=function(t){B(e.pos,e.data.length,t)},U=function(){},Y=function(t,e){return function(n){t(n),D(e)}},G={hdr:Y((function(t){z((o=t).width,o.height)})),gce:Y((function(t){F(),I(),s=t.transparencyGiven?t.transparencyIndex:null,f=t.delayTime,l=t.disposalMethod})),com:Y(U),app:{NETSCAPE:Y(U)},img:Y((function(t){y||(y=A.getContext("2d"));var e=m.length,n=t.lctFlag?t.lct:o.gct;e>0&&(3===p?null!==h?y.putImageData(m[h].data,0,0):y.clearRect(d.leftPos,d.topPos,d.width,d.height):h=e-1,2===p&&y.clearRect(d.leftPos,d.topPos,d.width,d.height));var r=y.getImageData(t.leftPos,t.topPos,t.width,t.height);t.pixels.forEach((function(t,e){t!==s&&(r.data[4*e+0]=n[t][0],r.data[4*e+1]=n[t][1],r.data[4*e+2]=n[t][2],r.data[4*e+3]=255)})),y.putImageData(r,t.leftPos,t.topPos),g||(_.scale(H(),H()),g=!0),P&&(_.drawImage(A,0,0),P=i.auto_play),d=t}),!0),eof:function(t){F(),D(!1),i.c_w&&i.c_h||(x.width=o.width*H(),x.height=o.height*H()),N.init(),c=!1,X&&X(w)}},W=function(){var t=w.parentNode,e=document.createElement("div");(x=document.createElement("canvas")).style.width="100%",x.style.height="100%",_=x.getContext("2d"),k=document.createElement("div"),A=document.createElement("canvas"),e.width=x.width=w.width,e.height=x.height=w.height,k.style.minWidth=w.width+"px",e.className="jsgif",e.style.width="100%",e.style.height="100%",k.className="jsgif_toolbar",e.appendChild(x),e.appendChild(k),t.insertBefore(e,w),t.removeChild(w),i.c_w&&i.c_h&&z(i.c_w,i.c_h),V=!0},H=function(){return i.max_width&&o&&o.width>i.max_width?i.max_width/o.width:1},V=!1,X=!1,q=function(t){return!c&&(X=t||!1,c=!0,m=[],I(),h=null,p=null,y=null,d=null,!0)};return{play:N.play,pause:N.pause,move_relative:N.move_relative,move_to:N.move_to,get_playing:function(){return v},get_canvas:function(){return x},get_canvas_scale:function(){return H()},get_loading:function(){return c},get_auto_play:function(){return i.auto_play},get_length:function(){return N.length()},get_current_frame:function(){return N.current_frame()},load_url:function(t,r){if(q(r)){var o=new XMLHttpRequest;o.open("GET",t,!0),"overrideMimeType"in o?o.overrideMimeType("text/plain; charset=x-user-defined"):"responseType"in o?o.responseType="arraybuffer":o.setRequestHeader("Accept-Charset","x-user-defined"),o.onloadstart=function(){V||W()},o.onload=function(t){200!=this.status&&L("xhr - response"),"response"in this||(this.response=new VBArray(this.responseText).toArray().map(String.fromCharCode).join(""));var r=this.response;r.toString().indexOf("ArrayBuffer")>0&&(r=new Uint8Array(r)),e=new n(r),requestAnimationFrame(C)},o.onprogress=function(t){t.lengthComputable&&B(t.loaded,t.total,!0)},o.onerror=function(){L("xhr")},o.send()}},load:function(t){this.load_url(w.getAttribute("rel:animated_src")||w.src,t)},load_raw:function(t,r){q(r)&&(V||W(),e=new n(t),requestAnimationFrame(C))},set_frame_offset:function(t,e){b[t]?(void 0!==e.x&&(b[t].x=e.x),void 0!==e.y&&(b[t].y=e.y)):b[t]=e}}}})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){n(240),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(271),n(272),n(273),n(90),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(290),n(291),n(292),n(293),n(294),n(295),n(296),n(297),n(299),n(300),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(320),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(334),n(335),n(336),n(337),n(338),n(339),n(340),n(341),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(365),n(366),n(367),n(369),n(370),n(371),n(372),n(377),n(378),n(379),n(380),n(381),n(382),n(383),n(384),n(385),n(386),n(387),n(388),n(389),n(390),n(391),n(392),n(393),n(394),n(395),n(143),n(396),n(397),n(398),n(399),n(400),n(401),n(402),n(403),n(404),n(405),n(192),n(406),n(407),n(408),n(409),n(410),n(411),n(412),n(413),n(414),n(415),n(416),n(417),n(418),n(419),n(420),n(421),n(422),n(423),n(424),n(425),n(426),n(427),n(428),n(429),n(430),n(431),n(432),n(433),n(434),n(436),n(437),n(438),n(439),n(440),n(441),n(442),n(443),n(444),n(445),n(446),n(447),n(448),n(451),n(452),n(453),n(454),n(455),n(456),n(457),n(458),n(459),n(460),n(461),n(462),n(463),n(464),n(465),n(466),n(467),n(468),n(469),n(470),n(471),n(472),n(473),n(474),n(475),n(476),n(477),n(478),n(479),n(480),n(482),n(201),t.exports=n(165)},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(20),a=n(28),u=n(5),c=n(116),s=n(1),f=n(12),l=n(51),h=n(8),p=n(3),y=n(65),d=n(4),v=n(11),g=n(23),m=n(42),b=n(9),w=n(33),x=n(30),_=n(70),k=n(44),A=n(126),S=n(123),O=n(19),E=n(10),P=n(83),j=n(14),M=n(84),R=n(87),T=n(67),I=n(66),C=n(6),z=n(164),B=n(22),L=n(31),F=n(16),N=n(18).forEach,D=R("hidden"),U=C("toPrimitive"),Y=F.set,G=F.getterFor("Symbol"),W=Object.prototype,H=o.Symbol,V=i("JSON","stringify"),X=O.f,q=E.f,K=A.f,Q=P.f,J=M("symbols"),Z=M("op-symbols"),$=M("string-to-symbol-registry"),tt=M("symbol-to-string-registry"),et=M("wks"),nt=o.QObject,rt=!nt||!nt.prototype||!nt.prototype.findChild,ot=u&&s((function(){return 7!=x(q({},"a",{get:function(){return q(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=X(W,e);r&&delete W[e],q(t,e,n),r&&t!==W&&q(W,e,r)}:q,it=function(t,e){var n=J[t]=x(H.prototype);return Y(n,{type:"Symbol",tag:t,description:e}),u||(n.description=e),n},at=function(t,e,n){t===W&&at(Z,e,n),d(t);var r=m(e);return d(n),f(J,r)?(n.enumerable?(f(t,D)&&t[D][r]&&(t[D][r]=!1),n=x(n,{enumerable:w(0,!1)})):(f(t,D)||q(t,D,w(1,{})),t[D][r]=!0),ot(t,r,n)):q(t,r,n)},ut=function(t,e){d(t);var n=g(e),r=_(n).concat(lt(n));return N(r,(function(e){u&&!ct.call(n,e)||at(t,e,n[e])})),t},ct=function(t){var e=m(t),n=Q.call(this,e);return!(this===W&&f(J,e)&&!f(Z,e))&&(!(n||!f(this,e)||!f(J,e)||f(this,D)&&this[D][e])||n)},st=function(t,e){var n=g(t),r=m(e);if(n!==W||!f(J,r)||f(Z,r)){var o=X(n,r);return!o||!f(J,r)||f(n,D)&&n[D][r]||(o.enumerable=!0),o}},ft=function(t){var e=K(g(t)),n=[];return N(e,(function(t){f(J,t)||f(T,t)||n.push(t)})),n},lt=function(t){var e=t===W,n=K(e?Z:g(t)),r=[];return N(n,(function(t){!f(J,t)||e&&!f(W,t)||r.push(J[t])})),r};(c||(j((H=function(){if(this instanceof H)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?b(arguments[0]):void 0,e=I(t),n=function t(n){this===W&&t.call(Z,n),f(this,D)&&f(this[D],e)&&(this[D][e]=!1),ot(this,e,w(1,n))};return u&&rt&&ot(W,e,{configurable:!0,set:n}),it(e,t)}).prototype,"toString",(function(){return G(this).tag})),j(H,"withoutSetter",(function(t){return it(I(t),t)})),P.f=ct,E.f=at,O.f=st,k.f=A.f=ft,S.f=lt,z.f=function(t){return it(C(t),t)},u&&(q(H.prototype,"description",{configurable:!0,get:function(){return G(this).description}}),a||j(W,"propertyIsEnumerable",ct,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:H}),N(_(et),(function(t){B(t)})),r({target:"Symbol",stat:!0,forced:!c},{for:function(t){var e=b(t);if(f($,e))return $[e];var n=H(e);return $[e]=n,tt[n]=e,n},keyFor:function(t){if(!y(t))throw TypeError(t+" is not a symbol");if(f(tt,t))return tt[t]},useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(t,e){return void 0===e?x(t):ut(x(t),e)},defineProperty:at,defineProperties:ut,getOwnPropertyDescriptor:st}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:ft,getOwnPropertySymbols:lt}),r({target:"Object",stat:!0,forced:s((function(){S.f(1)}))},{getOwnPropertySymbols:function(t){return S.f(v(t))}}),V)&&r({target:"JSON",stat:!0,forced:!c||s((function(){var t=H();return"[null]"!=V([t])||"{}"!=V({a:t})||"{}"!=V(Object(t))}))},{stringify:function(t,e,n){for(var r,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(r=e,(p(e)||void 0!==t)&&!y(t))return l(e)||(e=function(t,e){if(h(r)&&(e=r.call(this,t,e)),!y(e))return e}),o[1]=e,V.apply(null,o)}});if(!H.prototype[U]){var ht=H.prototype.valueOf;j(H.prototype,U,(function(){return ht.apply(this,arguments)}))}L(H,"Symbol"),T[D]=!0},function(t,e,n){var r=n(51),o=n(72),i=n(3),a=n(6)("species");t.exports=function(t){var e;return r(t)&&(e=t.constructor,(o(e)&&(e===Array||r(e.prototype))||i(e)&&null===(e=e[a]))&&(e=void 0)),void 0===e?Array:e}},function(t,e,n){"use strict";var r=n(0),o=n(5),i=n(2),a=n(12),u=n(8),c=n(3),s=n(10).f,f=n(120),l=i.Symbol;if(o&&u(l)&&(!("description"in l.prototype)||void 0!==l().description)){var h={},p=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof p?new l(t):void 0===t?l():l(t);return""===t&&(h[e]=!0),e};f(p,l);var y=p.prototype=l.prototype;y.constructor=p;var d=y.toString,v="Symbol(test)"==String(l("test")),g=/^Symbol\((.*)\)[^)]+$/;s(y,"description",{configurable:!0,get:function(){var t=c(this)?this.valueOf():this,e=d.call(t);if(a(h,t))return"";var n=v?e.slice(7,-1):e.replace(g,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:p})}},function(t,e,n){n(22)("asyncIterator")},function(t,e,n){n(22)("hasInstance")},function(t,e,n){n(22)("isConcatSpreadable")},function(t,e,n){n(22)("iterator")},function(t,e,n){n(22)("match")},function(t,e,n){n(22)("matchAll")},function(t,e,n){n(22)("replace")},function(t,e,n){n(22)("search")},function(t,e,n){n(22)("species")},function(t,e,n){n(22)("split")},function(t,e,n){n(22)("toPrimitive")},function(t,e,n){n(22)("toStringTag")},function(t,e,n){n(22)("unscopables")},function(t,e,n){"use strict";var r=n(0),o=n(29),i=n(36),a=n(120),u=n(30),c=n(24),s=n(33),f=n(257),l=n(47),h=n(9),p=function(t,e){var n=this,r=arguments.length>2?arguments[2]:void 0;if(!(n instanceof p))return new p(t,e,r);i&&(n=i(new Error(void 0),o(n))),void 0!==e&&c(n,"message",h(e)),f(n,r);var a=[];return l(t,a.push,{that:a}),c(n,"errors",a),n};i?i(p,Error):a(p,Error),p.prototype=u(Error.prototype,{constructor:s(1,p),message:s(1,""),name:s(1,"AggregateError")}),r({global:!0},{AggregateError:p})},function(t,e,n){var r=n(3),o=n(24);t.exports=function(t,e){r(e)&&"cause"in e&&o(t,"cause",e.cause)}},function(t,e,n){"use strict";var r=n(0),o=n(11),i=n(13),a=n(17),u=n(37);r({target:"Array",proto:!0},{at:function(t){var e=o(this),n=i(e),r=a(t),u=r>=0?r:n+r;return u<0||u>=n?void 0:e[u]}}),u("at")},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(51),a=n(3),u=n(11),c=n(13),s=n(53),f=n(71),l=n(75),h=n(6),p=n(43),y=h("isConcatSpreadable"),d=p>=51||!o((function(){var t=[];return t[y]=!1,t.concat()[0]!==t})),v=l("concat"),g=function(t){if(!a(t))return!1;var e=t[y];return void 0!==e?!!e:i(t)};r({target:"Array",proto:!0,forced:!d||!v},{concat:function(t){var e,n,r,o,i,a=u(this),l=f(a,0),h=0;for(e=-1,r=arguments.length;e<r;e++)if(g(i=-1===e?a:arguments[e])){if(h+(o=c(i))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<o;n++,h++)n in i&&s(l,h,i[n])}else{if(h>=9007199254740991)throw TypeError("Maximum allowed index exceeded");s(l,h++,i)}return l.length=h,l}})},function(t,e,n){var r=n(0),o=n(168),i=n(37);r({target:"Array",proto:!0},{copyWithin:o}),i("copyWithin")},function(t,e,n){"use strict";var r=n(0),o=n(18).every;r({target:"Array",proto:!0,forced:!n(38)("every")},{every:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(0),o=n(129),i=n(37);r({target:"Array",proto:!0},{fill:o}),i("fill")},function(t,e,n){"use strict";var r=n(0),o=n(18).filter;r({target:"Array",proto:!0,forced:!n(75)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0),o=n(18).find,i=n(37),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("find")},function(t,e,n){"use strict";var r=n(0),o=n(18).findIndex,i=n(37),a=!0;"findIndex"in[]&&Array(1).findIndex((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("findIndex")},function(t,e,n){"use strict";var r=n(0),o=n(169),i=n(11),a=n(13),u=n(17),c=n(71);r({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=i(this),n=a(e),r=c(e,0);return r.length=o(r,e,e,n,0,void 0===t?1:u(t)),r}})},function(t,e,n){"use strict";var r=n(0),o=n(169),i=n(21),a=n(11),u=n(13),c=n(71);r({target:"Array",proto:!0},{flatMap:function(t){var e,n=a(this),r=u(n);return i(t),(e=c(n,0)).length=o(e,n,n,r,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},function(t,e,n){"use strict";var r=n(0),o=n(170);r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},function(t,e,n){var r=n(0),o=n(171);r({target:"Array",stat:!0,forced:!n(89)((function(t){Array.from(t)}))},{from:o})},function(t,e,n){var r=n(4),o=n(167);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){o(t,"throw",e)}}},function(t,e,n){"use strict";var r=n(0),o=n(68).includes,i=n(37);r({target:"Array",proto:!0},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(t,e,n){"use strict";var r=n(0),o=n(68).indexOf,i=n(38),a=[].indexOf,u=!!a&&1/[1].indexOf(1,-0)<0,c=i("indexOf");r({target:"Array",proto:!0,forced:u||!c},{indexOf:function(t){return u?a.apply(this,arguments)||0:o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){n(0)({target:"Array",stat:!0},{isArray:n(51)})},function(t,e,n){"use strict";var r=n(0),o=n(64),i=n(23),a=n(38),u=[].join,c=o!=Object,s=a("join",",");r({target:"Array",proto:!0,forced:c||!s},{join:function(t){return u.call(i(this),void 0===t?",":t)}})},function(t,e,n){var r=n(0),o=n(173);r({target:"Array",proto:!0,forced:o!==[].lastIndexOf},{lastIndexOf:o})},function(t,e,n){"use strict";var r=n(0),o=n(18).map;r({target:"Array",proto:!0,forced:!n(75)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(72),a=n(53);r({target:"Array",stat:!0,forced:o((function(){function t(){}return!(Array.of.call(t)instanceof t)}))},{of:function(){for(var t=0,e=arguments.length,n=new(i(this)?this:Array)(e);e>t;)a(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(0),o=n(91).left,i=n(38),a=n(43),u=n(57);r({target:"Array",proto:!0,forced:!i("reduce")||!u&&a>79&&a<83},{reduce:function(t){return o(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0),o=n(91).right,i=n(38),a=n(43),u=n(57);r({target:"Array",proto:!0,forced:!i("reduceRight")||!u&&a>79&&a<83},{reduceRight:function(t){return o(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0),o=n(51),i=[].reverse,a=[1,2];r({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return o(this)&&(this.length=this.length),i.call(this)}})},function(t,e,n){"use strict";var r=n(0),o=n(51),i=n(72),a=n(3),u=n(45),c=n(13),s=n(23),f=n(53),l=n(6),h=n(75)("slice"),p=l("species"),y=[].slice,d=Math.max;r({target:"Array",proto:!0,forced:!h},{slice:function(t,e){var n,r,l,h=s(this),v=c(h),g=u(t,v),m=u(void 0===e?v:e,v);if(o(h)&&(n=h.constructor,(i(n)&&(n===Array||o(n.prototype))||a(n)&&null===(n=n[p]))&&(n=void 0),n===Array||void 0===n))return y.call(h,g,m);for(r=new(void 0===n?Array:n)(d(m-g,0)),l=0;g<m;g++,l++)g in h&&f(r,l,h[g]);return r.length=l,r}})},function(t,e,n){"use strict";var r=n(0),o=n(18).some;r({target:"Array",proto:!0,forced:!n(38)("some")},{some:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0),o=n(21),i=n(11),a=n(13),u=n(9),c=n(1),s=n(174),f=n(38),l=n(175),h=n(176),p=n(43),y=n(132),d=[],v=d.sort,g=c((function(){d.sort(void 0)})),m=c((function(){d.sort(null)})),b=f("sort"),w=!c((function(){if(p)return p<70;if(!(l&&l>3)){if(h)return!0;if(y)return y<603;var t,e,n,r,o="";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++)d.push({k:e+r,v:n})}for(d.sort((function(t,e){return e.v-t.v})),r=0;r<d.length;r++)e=d[r].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));r({target:"Array",proto:!0,forced:g||!m||!b||!w},{sort:function(t){void 0!==t&&o(t);var e=i(this);if(w)return void 0===t?v.call(e):v.call(e,t);var n,r,c=[],f=a(e);for(r=0;r<f;r++)r in e&&c.push(e[r]);for(n=(c=s(c,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:u(e)>u(n)?1:-1}}(t))).length,r=0;r<n;)e[r]=c[r++];for(;r<f;)delete e[r++];return e}})},function(t,e,n){n(58)("Array")},function(t,e,n){"use strict";var r=n(0),o=n(45),i=n(17),a=n(13),u=n(11),c=n(71),s=n(53),f=n(75)("splice"),l=Math.max,h=Math.min;r({target:"Array",proto:!0,forced:!f},{splice:function(t,e){var n,r,f,p,y,d,v=u(this),g=a(v),m=o(t,g),b=arguments.length;if(0===b?n=r=0:1===b?(n=0,r=g-m):(n=b-2,r=h(l(i(e),0),g-m)),g+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(f=c(v,r),p=0;p<r;p++)(y=m+p)in v&&s(f,p,v[y]);if(f.length=r,n<r){for(p=m;p<g-r;p++)d=p+n,(y=p+r)in v?v[d]=v[y]:delete v[d];for(p=g;p>g-r+n;p--)delete v[p-1]}else if(n>r)for(p=g-r;p>m;p--)d=p+n-1,(y=p+r-1)in v?v[d]=v[y]:delete v[d];for(p=0;p<n;p++)v[p+m]=arguments[p+2];return v.length=g-r+n,f}})},function(t,e,n){n(37)("flat")},function(t,e,n){n(37)("flatMap")},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(92),a=n(58),u=i.ArrayBuffer;r({global:!0,forced:o.ArrayBuffer!==u},{ArrayBuffer:u}),a("ArrayBuffer")},function(t,e){var n=Math.abs,r=Math.pow,o=Math.floor,i=Math.log,a=Math.LN2;t.exports={pack:function(t,e,u){var c,s,f,l=new Array(u),h=8*u-e-1,p=(1<<h)-1,y=p>>1,d=23===e?r(2,-24)-r(2,-77):0,v=t<0||0===t&&1/t<0?1:0,g=0;for((t=n(t))!=t||t===1/0?(s=t!=t?1:0,c=p):(c=o(i(t)/a),t*(f=r(2,-c))<1&&(c--,f*=2),(t+=c+y>=1?d/f:d*r(2,1-y))*f>=2&&(c++,f/=2),c+y>=p?(s=0,c=p):c+y>=1?(s=(t*f-1)*r(2,e),c+=y):(s=t*r(2,y-1)*r(2,e),c=0));e>=8;l[g++]=255&s,s/=256,e-=8);for(c=c<<e|s,h+=e;h>0;l[g++]=255&c,c/=256,h-=8);return l[--g]|=128*v,l},unpack:function(t,e){var n,o=t.length,i=8*o-e-1,a=(1<<i)-1,u=a>>1,c=i-7,s=o-1,f=t[s--],l=127&f;for(f>>=7;c>0;l=256*l+t[s],s--,c-=8);for(n=l&(1<<-c)-1,l>>=-c,c+=e;c>0;n=256*n+t[s],s--,c-=8);if(0===l)l=1-u;else{if(l===a)return n?NaN:f?-1/0:1/0;n+=r(2,e),l-=u}return(f?-1:1)*n*r(2,l-e)}}},function(t,e,n){var r=n(0),o=n(7);r({target:"ArrayBuffer",stat:!0,forced:!o.NATIVE_ARRAY_BUFFER_VIEWS},{isView:o.isView})},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(92),a=n(4),u=n(45),c=n(25),s=n(60),f=i.ArrayBuffer,l=i.DataView,h=f.prototype.slice;r({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:o((function(){return!new f(2).slice(1,void 0).byteLength}))},{slice:function(t,e){if(void 0!==h&&void 0===e)return h.call(a(this),t);for(var n=a(this).byteLength,r=u(t,n),o=u(void 0===e?n:e,n),i=new(s(this,f))(c(o-r)),p=new l(this),y=new l(i),d=0;r<o;)y.setUint8(d++,p.getUint8(r++));return i}})},function(t,e,n){var r=n(0),o=n(92);r({global:!0,forced:!n(133)},{DataView:o.DataView})},function(t,e,n){"use strict";var r=n(0),o=n(1)((function(){return 120!==new Date(16e11).getYear()})),i=Date.prototype.getFullYear;r({target:"Date",proto:!0,forced:o},{getYear:function(){return i.call(this)-1900}})},function(t,e,n){n(0)({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(0),o=n(17),i=Date.prototype.getTime,a=Date.prototype.setFullYear;r({target:"Date",proto:!0},{setYear:function(t){i.call(this);var e=o(t),n=0<=e&&e<=99?e+1900:e;return a.call(this,n)}})},function(t,e,n){n(0)({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})},function(t,e,n){var r=n(0),o=n(298);r({target:"Date",proto:!0,forced:Date.prototype.toISOString!==o},{toISOString:o})},function(t,e,n){"use strict";var r=n(1),o=n(135).start,i=Math.abs,a=Date.prototype,u=a.getTime,c=a.toISOString;t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=c.call(new Date(-50000000000001))}))||!r((function(){c.call(new Date(NaN))}))?function(){if(!isFinite(u.call(this)))throw RangeError("Invalid time value");var t=this.getUTCFullYear(),e=this.getUTCMilliseconds(),n=t<0?"-":t>9999?"+":"";return n+o(i(t),n?6:4,0)+"-"+o(this.getUTCMonth()+1,2,0)+"-"+o(this.getUTCDate(),2,0)+"T"+o(this.getUTCHours(),2,0)+":"+o(this.getUTCMinutes(),2,0)+":"+o(this.getUTCSeconds(),2,0)+"."+o(e,3,0)+"Z"}:c},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(11),a=n(115);r({target:"Date",proto:!0,forced:o((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=i(this),n=a(e,"number");return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(14),o=n(301),i=n(6)("toPrimitive"),a=Date.prototype;i in a||r(a,i,o)},function(t,e,n){"use strict";var r=n(4),o=n(159);t.exports=function(t){if(r(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw TypeError("Incorrect hint");return o(this,t)}},function(t,e,n){var r=n(14),o=Date.prototype,i=o.toString,a=o.getTime;"Invalid Date"!=String(new Date(NaN))&&r(o,"toString",(function(){var t=a.call(this);return t==t?i.call(this):"Invalid Date"}))},function(t,e,n){"use strict";var r=n(0),o=n(9),i=/[\w*+\-./@]/,a=function(t,e){for(var n=t.toString(16);n.length<e;)n="0"+n;return n};r({global:!0},{escape:function(t){for(var e,n,r=o(t),u="",c=r.length,s=0;s<c;)e=r.charAt(s++),i.test(e)?u+=e:u+=(n=e.charCodeAt(0))<256?"%"+a(n,2):"%u"+a(n,4).toUpperCase();return u}})},function(t,e,n){n(0)({target:"Function",proto:!0},{bind:n(178)})},function(t,e,n){"use strict";var r=n(8),o=n(3),i=n(10),a=n(29),u=n(6)("hasInstance"),c=Function.prototype;u in c||i.f(c,u,{value:function(t){if(!r(this)||!o(t))return!1;if(!o(this.prototype))return t instanceof this;for(;t=a(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(5),o=n(50).EXISTS,i=n(10).f,a=Function.prototype,u=a.toString,c=/^\s*function ([^ (]*)/;r&&!o&&i(a,"name",{configurable:!0,get:function(){try{return u.call(this).match(c)[1]}catch(t){return""}}})},function(t,e,n){n(0)({global:!0},{globalThis:n(2)})},function(t,e,n){var r=n(0),o=n(20),i=n(1),a=o("JSON","stringify"),u=/[\uD800-\uDFFF]/g,c=/^[\uD800-\uDBFF]$/,s=/^[\uDC00-\uDFFF]$/,f=function(t,e,n){var r=n.charAt(e-1),o=n.charAt(e+1);return c.test(t)&&!s.test(o)||s.test(t)&&!c.test(r)?"\\u"+t.charCodeAt(0).toString(16):t},l=i((function(){return'"\\udf06\\ud834"'!==a("\udf06\ud834")||'"\\udead"'!==a("\udead")}));a&&r({target:"JSON",stat:!0,forced:l},{stringify:function(t,e,n){var r=a.apply(null,arguments);return"string"==typeof r?r.replace(u,f):r}})},function(t,e,n){var r=n(2);n(31)(r.JSON,"JSON",!0)},function(t,e,n){"use strict";var r=n(93),o=n(179);t.exports=r("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),o)},function(t,e,n){var r=n(0),o=n(180),i=Math.acosh,a=Math.log,u=Math.sqrt,c=Math.LN2;r({target:"Math",stat:!0,forced:!i||710!=Math.floor(i(Number.MAX_VALUE))||i(1/0)!=1/0},{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?a(t)+c:o(t-1+u(t-1)*u(t+1))}})},function(t,e,n){var r=n(0),o=Math.asinh,i=Math.log,a=Math.sqrt;r({target:"Math",stat:!0,forced:!(o&&1/o(0)>0)},{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):i(e+a(e*e+1)):e}})},function(t,e,n){var r=n(0),o=Math.atanh,i=Math.log;r({target:"Math",stat:!0,forced:!(o&&1/o(-0)<0)},{atanh:function(t){return 0==(t=+t)?t:i((1+t)/(1-t))/2}})},function(t,e,n){var r=n(0),o=n(137),i=Math.abs,a=Math.pow;r({target:"Math",stat:!0},{cbrt:function(t){return o(t=+t)*a(i(t),1/3)}})},function(t,e,n){var r=n(0),o=Math.floor,i=Math.log,a=Math.LOG2E;r({target:"Math",stat:!0},{clz32:function(t){return(t>>>=0)?31-o(i(t+.5)*a):32}})},function(t,e,n){var r=n(0),o=n(95),i=Math.cosh,a=Math.abs,u=Math.E;r({target:"Math",stat:!0,forced:!i||i(710)===1/0},{cosh:function(t){var e=o(a(t)-1)+1;return(e+1/(e*u*u))*(u/2)}})},function(t,e,n){var r=n(0),o=n(95);r({target:"Math",stat:!0,forced:o!=Math.expm1},{expm1:o})},function(t,e,n){n(0)({target:"Math",stat:!0},{fround:n(319)})},function(t,e,n){var r=n(137),o=Math.abs,i=Math.pow,a=i(2,-52),u=i(2,-23),c=i(2,127)*(2-u),s=i(2,-126);t.exports=Math.fround||function(t){var e,n,i=o(t),f=r(t);return i<s?f*(i/s/u+1/a-1/a)*s*u:(n=(e=(1+u/a)*i)-(e-i))>c||n!=n?f*(1/0):f*n}},function(t,e,n){var r=n(0),o=Math.hypot,i=Math.abs,a=Math.sqrt;r({target:"Math",stat:!0,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function(t,e){for(var n,r,o=0,u=0,c=arguments.length,s=0;u<c;)s<(n=i(arguments[u++]))?(o=o*(r=s/n)*r+1,s=n):o+=n>0?(r=n/s)*r:n;return s===1/0?1/0:s*a(o)}})},function(t,e,n){var r=n(0),o=n(1),i=Math.imul;r({target:"Math",stat:!0,forced:o((function(){return-5!=i(4294967295,5)||2!=i.length}))},{imul:function(t,e){var n=+t,r=+e,o=65535&n,i=65535&r;return 0|o*i+((65535&n>>>16)*i+o*(65535&r>>>16)<<16>>>0)}})},function(t,e,n){var r=n(0),o=Math.log,i=Math.LOG10E;r({target:"Math",stat:!0},{log10:function(t){return o(t)*i}})},function(t,e,n){n(0)({target:"Math",stat:!0},{log1p:n(180)})},function(t,e,n){var r=n(0),o=Math.log,i=Math.LN2;r({target:"Math",stat:!0},{log2:function(t){return o(t)/i}})},function(t,e,n){n(0)({target:"Math",stat:!0},{sign:n(137)})},function(t,e,n){var r=n(0),o=n(1),i=n(95),a=Math.abs,u=Math.exp,c=Math.E;r({target:"Math",stat:!0,forced:o((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(t){return a(t=+t)<1?(i(t)-i(-t))/2:(u(t-1)-u(-t-1))*(c/2)}})},function(t,e,n){var r=n(0),o=n(95),i=Math.exp;r({target:"Math",stat:!0},{tanh:function(t){var e=o(t=+t),n=o(-t);return e==1/0?1:n==1/0?-1:(e-n)/(i(t)+i(-t))}})},function(t,e,n){n(31)(Math,"Math",!0)},function(t,e,n){var r=n(0),o=Math.ceil,i=Math.floor;r({target:"Math",stat:!0},{trunc:function(t){return(t>0?i:o)(t)}})},function(t,e,n){"use strict";var r=n(5),o=n(2),i=n(69),a=n(14),u=n(12),c=n(94),s=n(65),f=n(115),l=n(1),h=n(44).f,p=n(19).f,y=n(10).f,d=n(138),v=n(61).trim,g=o.Number,m=g.prototype,b=function(t){var e=f(t,"number");return"bigint"==typeof e?e:w(e)},w=function(t){var e,n,r,o,i,a,u,c,l=f(t,"number");if(s(l))throw TypeError("Cannot convert a Symbol value to a number");if("string"==typeof l&&l.length>2)if(43===(e=(l=v(l)).charCodeAt(0))||45===e){if(88===(n=l.charCodeAt(2))||120===n)return NaN}else if(48===e){switch(l.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+l}for(a=(i=l.slice(2)).length,u=0;u<a;u++)if((c=i.charCodeAt(u))<48||c>o)return NaN;return parseInt(i,r)}return+l};if(i("Number",!g(" 0o1")||!g("0b1")||g("+0x1"))){for(var x,_=function(t){var e=arguments.length<1?0:g(b(t)),n=this;return n instanceof _&&l((function(){d(n)}))?c(Object(e),n,_):e},k=r?h(g):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),A=0;k.length>A;A++)u(g,x=k[A])&&!u(_,x)&&y(_,x,p(g,x));_.prototype=m,m.constructor=_,a(o,"Number",_)}},function(t,e,n){n(0)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(t,e,n){n(0)({target:"Number",stat:!0},{isFinite:n(333)})},function(t,e,n){var r=n(2).isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&r(t)}},function(t,e,n){n(0)({target:"Number",stat:!0},{isInteger:n(139)})},function(t,e,n){n(0)({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(0),o=n(139),i=Math.abs;r({target:"Number",stat:!0},{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},function(t,e,n){n(0)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){n(0)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(0),o=n(181);r({target:"Number",stat:!0,forced:Number.parseFloat!=o},{parseFloat:o})},function(t,e,n){var r=n(0),o=n(182);r({target:"Number",stat:!0,forced:Number.parseInt!=o},{parseInt:o})},function(t,e,n){"use strict";var r=n(0),o=n(17),i=n(138),a=n(136),u=n(1),c=1..toFixed,s=Math.floor,f=function t(e,n,r){return 0===n?r:n%2==1?t(e,n-1,r*e):t(e*e,n/2,r)},l=function(t,e,n){for(var r=-1,o=n;++r<6;)o+=e*t[r],t[r]=o%1e7,o=s(o/1e7)},h=function(t,e){for(var n=6,r=0;--n>=0;)r+=t[n],t[n]=s(r/e),r=r%e*1e7},p=function(t){for(var e=6,n="";--e>=0;)if(""!==n||0===e||0!==t[e]){var r=String(t[e]);n=""===n?r:n+a.call("0",7-r.length)+r}return n};r({target:"Number",proto:!0,forced:c&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!u((function(){c.call({})}))},{toFixed:function(t){var e,n,r,u,c=i(this),s=o(t),y=[0,0,0,0,0,0],d="",v="0";if(s<0||s>20)throw RangeError("Incorrect fraction digits");if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(d="-",c=-c),c>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(c*f(2,69,1))-69)<0?c*f(2,-e,1):c/f(2,e,1),n*=4503599627370496,(e=52-e)>0){for(l(y,0,n),r=s;r>=7;)l(y,1e7,0),r-=7;for(l(y,f(10,r,1),0),r=e-1;r>=23;)h(y,1<<23),r-=23;h(y,1<<r),l(y,1,1),h(y,2),v=p(y)}else l(y,0,n),l(y,1<<-e,0),v=p(y)+a.call("0",s);return v=s>0?d+((u=v.length)<=s?"0."+a.call("0",s-u)+v:v.slice(0,u-s)+"."+v.slice(u-s)):d+v}})},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(138),a=1..toPrecision;r({target:"Number",proto:!0,forced:o((function(){return"1"!==a.call(1,void 0)}))||!o((function(){a.call({})}))},{toPrecision:function(t){return void 0===t?a.call(i(this)):a.call(i(this),t)}})},function(t,e,n){var r=n(0),o=n(183);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,e,n){n(0)({target:"Object",stat:!0,sham:!n(5)},{create:n(30)})},function(t,e,n){"use strict";var r=n(0),o=n(5),i=n(97),a=n(21),u=n(11),c=n(10);o&&r({target:"Object",proto:!0,forced:i},{__defineGetter__:function(t,e){c.f(u(this),t,{get:a(e),enumerable:!0,configurable:!0})}})},function(t,e,n){var r=n(0),o=n(5);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperties:n(125)})},function(t,e,n){var r=n(0),o=n(5);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:n(10).f})},function(t,e,n){"use strict";var r=n(0),o=n(5),i=n(97),a=n(21),u=n(11),c=n(10);o&&r({target:"Object",proto:!0,forced:i},{__defineSetter__:function(t,e){c.f(u(this),t,{set:a(e),enumerable:!0,configurable:!0})}})},function(t,e,n){var r=n(0),o=n(184).entries;r({target:"Object",stat:!0},{entries:function(t){return o(t)}})},function(t,e,n){var r=n(0),o=n(76),i=n(1),a=n(3),u=n(54).onFreeze,c=Object.freeze;r({target:"Object",stat:!0,forced:i((function(){c(1)})),sham:!o},{freeze:function(t){return c&&a(t)?c(u(t)):t}})},function(t,e,n){var r=n(0),o=n(47),i=n(53);r({target:"Object",stat:!0},{fromEntries:function(t){var e={};return o(t,(function(t,n){i(e,t,n)}),{AS_ENTRIES:!0}),e}})},function(t,e,n){var r=n(0),o=n(1),i=n(23),a=n(19).f,u=n(5),c=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!u||c,sham:!u},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}})},function(t,e,n){var r=n(0),o=n(5),i=n(121),a=n(23),u=n(19),c=n(53);r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),o=u.f,s=i(r),f={},l=0;s.length>l;)void 0!==(n=o(r,e=s[l++]))&&c(f,e,n);return f}})},function(t,e,n){var r=n(0),o=n(1),i=n(126).f;r({target:"Object",stat:!0,forced:o((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:i})},function(t,e,n){var r=n(0),o=n(1),i=n(11),a=n(29),u=n(127);r({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!u},{getPrototypeOf:function(t){return a(i(t))}})},function(t,e,n){n(0)({target:"Object",stat:!0},{hasOwn:n(12)})},function(t,e,n){n(0)({target:"Object",stat:!0},{is:n(185)})},function(t,e,n){var r=n(0),o=n(1),i=n(3),a=Object.isExtensible;r({target:"Object",stat:!0,forced:o((function(){a(1)}))},{isExtensible:function(t){return!!i(t)&&(!a||a(t))}})},function(t,e,n){var r=n(0),o=n(1),i=n(3),a=Object.isFrozen;r({target:"Object",stat:!0,forced:o((function(){a(1)}))},{isFrozen:function(t){return!i(t)||!!a&&a(t)}})},function(t,e,n){var r=n(0),o=n(1),i=n(3),a=Object.isSealed;r({target:"Object",stat:!0,forced:o((function(){a(1)}))},{isSealed:function(t){return!i(t)||!!a&&a(t)}})},function(t,e,n){var r=n(0),o=n(11),i=n(70);r({target:"Object",stat:!0,forced:n(1)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},function(t,e,n){"use strict";var r=n(0),o=n(5),i=n(97),a=n(11),u=n(42),c=n(29),s=n(19).f;o&&r({target:"Object",proto:!0,forced:i},{__lookupGetter__:function(t){var e,n=a(this),r=u(t);do{if(e=s(n,r))return e.get}while(n=c(n))}})},function(t,e,n){"use strict";var r=n(0),o=n(5),i=n(97),a=n(11),u=n(42),c=n(29),s=n(19).f;o&&r({target:"Object",proto:!0,forced:i},{__lookupSetter__:function(t){var e,n=a(this),r=u(t);do{if(e=s(n,r))return e.set}while(n=c(n))}})},function(t,e,n){var r=n(0),o=n(3),i=n(54).onFreeze,a=n(76),u=n(1),c=Object.preventExtensions;r({target:"Object",stat:!0,forced:u((function(){c(1)})),sham:!a},{preventExtensions:function(t){return c&&o(t)?c(i(t)):t}})},function(t,e,n){var r=n(0),o=n(3),i=n(54).onFreeze,a=n(76),u=n(1),c=Object.seal;r({target:"Object",stat:!0,forced:u((function(){c(1)})),sham:!a},{seal:function(t){return c&&o(t)?c(i(t)):t}})},function(t,e,n){n(0)({target:"Object",stat:!0},{setPrototypeOf:n(36)})},function(t,e,n){var r=n(124),o=n(14),i=n(368);r||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e,n){"use strict";var r=n(124),o=n(52);t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,e,n){var r=n(0),o=n(184).values;r({target:"Object",stat:!0},{values:function(t){return o(t)}})},function(t,e,n){var r=n(0),o=n(181);r({global:!0,forced:parseFloat!=o},{parseFloat:o})},function(t,e,n){var r=n(0),o=n(182);r({global:!0,forced:parseInt!=o},{parseInt:o})},function(t,e,n){"use strict";var r,o,i,a,u=n(0),c=n(28),s=n(2),f=n(20),l=n(186),h=n(14),p=n(59),y=n(36),d=n(31),v=n(58),g=n(21),m=n(8),b=n(3),w=n(48),x=n(86),_=n(47),k=n(89),A=n(60),S=n(140).set,O=n(188),E=n(189),P=n(375),j=n(98),M=n(141),R=n(16),T=n(69),I=n(6),C=n(376),z=n(57),B=n(43),L=I("species"),F="Promise",N=R.get,D=R.set,U=R.getterFor(F),Y=l&&l.prototype,G=l,W=Y,H=s.TypeError,V=s.document,X=s.process,q=j.f,K=q,Q=!!(V&&V.createEvent&&s.dispatchEvent),J=m(s.PromiseRejectionEvent),Z=!1,$=T(F,(function(){var t=x(G),e=t!==String(G);if(!e&&66===B)return!0;if(c&&!W.finally)return!0;if(B>=51&&/native code/.test(t))return!1;var n=new G((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[L]=r,!(Z=n.then((function(){}))instanceof r)||!e&&C&&!J})),tt=$||!k((function(t){G.all(t).catch((function(){}))})),et=function(t){var e;return!(!b(t)||!m(e=t.then))&&e},nt=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;O((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var a,u,c,s=n[i++],f=o?s.ok:s.fail,l=s.resolve,h=s.reject,p=s.domain;try{f?(o||(2===t.rejection&&at(t),t.rejection=1),!0===f?a=r:(p&&p.enter(),a=f(r),p&&(p.exit(),c=!0)),a===s.promise?h(H("Promise-chain cycle")):(u=et(a))?u.call(a,l,h):l(a)):h(r)}catch(t){p&&!c&&p.exit(),h(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&ot(t)}))}},rt=function(t,e,n){var r,o;Q?((r=V.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),s.dispatchEvent(r)):r={promise:e,reason:n},!J&&(o=s["on"+t])?o(r):"unhandledrejection"===t&&P("Unhandled promise rejection",n)},ot=function(t){S.call(s,(function(){var e,n=t.facade,r=t.value;if(it(t)&&(e=M((function(){z?X.emit("unhandledRejection",r,n):rt("unhandledrejection",n,r)})),t.rejection=z||it(t)?2:1,e.error))throw e.value}))},it=function(t){return 1!==t.rejection&&!t.parent},at=function(t){S.call(s,(function(){var e=t.facade;z?X.emit("rejectionHandled",e):rt("rejectionhandled",e,t.value)}))},ut=function(t,e,n){return function(r){t(e,r,n)}},ct=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,nt(t,!0))},st=function t(e,n,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===n)throw H("Promise can't be resolved itself");var o=et(n);o?O((function(){var r={done:!1};try{o.call(n,ut(t,r,e),ut(ct,r,e))}catch(t){ct(r,t,e)}})):(e.value=n,e.state=1,nt(e,!1))}catch(t){ct({done:!1},t,e)}}};if($&&(W=(G=function(t){w(this,G,F),g(t),r.call(this);var e=N(this);try{t(ut(st,e),ut(ct,e))}catch(t){ct(e,t)}}).prototype,(r=function(t){D(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=U(this),r=q(A(this,G));return r.ok=!m(t)||t,r.fail=m(e)&&e,r.domain=z?X.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&nt(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=N(t);this.promise=t,this.resolve=ut(st,e),this.reject=ut(ct,e)},j.f=q=function(t){return t===G||t===i?new o(t):K(t)},!c&&m(l)&&Y!==Object.prototype)){a=Y.then,Z||(h(Y,"then",(function(t,e){var n=this;return new G((function(t,e){a.call(n,t,e)})).then(t,e)}),{unsafe:!0}),h(Y,"catch",W.catch,{unsafe:!0}));try{delete Y.constructor}catch(t){}y&&y(Y,W)}u({global:!0,wrap:!0,forced:$},{Promise:G}),d(G,F,!1,!0),v(F),i=f(F),u({target:F,stat:!0,forced:$},{reject:function(t){var e=q(this);return e.reject.call(void 0,t),e.promise}}),u({target:F,stat:!0,forced:c||$},{resolve:function(t){return E(c&&this===i?G:this,t)}}),u({target:F,stat:!0,forced:tt},{all:function(t){var e=this,n=q(e),r=n.resolve,o=n.reject,i=M((function(){var n=g(e.resolve),i=[],a=0,u=1;_(t,(function(t){var c=a++,s=!1;i.push(void 0),u++,n.call(e,t).then((function(t){s||(s=!0,i[c]=t,--u||r(i))}),o)})),--u||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=q(e),r=n.reject,o=M((function(){var o=g(e.resolve);_(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},function(t,e,n){var r=n(34),o=n(2);t.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==o.Pebble},function(t,e,n){var r=n(34);t.exports=/web0s(?!.*chrome)/i.test(r)},function(t,e,n){var r=n(2);t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports="object"==("undefined"==typeof window?"undefined":n(window))},function(t,e,n){"use strict";var r=n(0),o=n(21),i=n(98),a=n(141),u=n(47);r({target:"Promise",stat:!0},{allSettled:function(t){var e=this,n=i.f(e),r=n.resolve,c=n.reject,s=a((function(){var n=o(e.resolve),i=[],a=0,c=1;u(t,(function(t){var o=a++,u=!1;i.push(void 0),c++,n.call(e,t).then((function(t){u||(u=!0,i[o]={status:"fulfilled",value:t},--c||r(i))}),(function(t){u||(u=!0,i[o]={status:"rejected",reason:t},--c||r(i))}))})),--c||r(i)}));return s.error&&c(s.value),n.promise}})},function(t,e,n){"use strict";var r=n(0),o=n(21),i=n(20),a=n(98),u=n(141),c=n(47);r({target:"Promise",stat:!0},{any:function(t){var e=this,n=a.f(e),r=n.resolve,s=n.reject,f=u((function(){var n=o(e.resolve),a=[],u=0,f=1,l=!1;c(t,(function(t){var o=u++,c=!1;a.push(void 0),f++,n.call(e,t).then((function(t){c||l||(l=!0,r(t))}),(function(t){c||l||(c=!0,a[o]=t,--f||s(new(i("AggregateError"))(a,"No one promise resolved")))}))})),--f||s(new(i("AggregateError"))(a,"No one promise resolved"))}));return f.error&&s(f.value),n.promise}})},function(t,e,n){"use strict";var r=n(0),o=n(28),i=n(186),a=n(1),u=n(20),c=n(8),s=n(60),f=n(189),l=n(14);if(r({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){i.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=s(this,u("Promise")),n=c(t);return this.then(n?function(n){return f(e,t()).then((function(){return n}))}:t,n?function(n){return f(e,t()).then((function(){throw n}))}:t)}}),!o&&c(i)){var h=u("Promise").prototype.finally;i.prototype.finally!==h&&l(i.prototype,"finally",h,{unsafe:!0})}},function(t,e,n){var r=n(0),o=n(20),i=n(21),a=n(4),u=n(1),c=o("Reflect","apply"),s=Function.apply;r({target:"Reflect",stat:!0,forced:!u((function(){c((function(){}))}))},{apply:function(t,e,n){return i(t),a(n),c?c(t,e,n):s.call(t,e,n)}})},function(t,e,n){var r=n(0),o=n(20),i=n(134),a=n(4),u=n(3),c=n(30),s=n(178),f=n(1),l=o("Reflect","construct"),h=f((function(){function t(){}return!(l((function(){}),[],t)instanceof t)})),p=!f((function(){l((function(){}))})),y=h||p;r({target:"Reflect",stat:!0,forced:y,sham:y},{construct:function(t,e){i(t),a(e);var n=arguments.length<3?t:i(arguments[2]);if(p&&!h)return l(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 r.push.apply(r,e),new(s.apply(t,r))}var o=n.prototype,f=c(u(o)?o:Object.prototype),y=Function.apply.call(t,f,e);return u(y)?y:f}})},function(t,e,n){var r=n(0),o=n(5),i=n(4),a=n(42),u=n(10);r({target:"Reflect",stat:!0,forced:n(1)((function(){Reflect.defineProperty(u.f({},1,{value:1}),1,{value:2})})),sham:!o},{defineProperty:function(t,e,n){i(t);var r=a(e);i(n);try{return u.f(t,r,n),!0}catch(t){return!1}}})},function(t,e,n){var r=n(0),o=n(4),i=n(19).f;r({target:"Reflect",stat:!0},{deleteProperty:function(t,e){var n=i(o(t),e);return!(n&&!n.configurable)&&delete t[e]}})},function(t,e,n){var r=n(0),o=n(3),i=n(4),a=n(190),u=n(19),c=n(29);r({target:"Reflect",stat:!0},{get:function t(e,n){var r,s,f=arguments.length<3?e:arguments[2];return i(e)===f?e[n]:(r=u.f(e,n))?a(r)?r.value:void 0===r.get?void 0:r.get.call(f):o(s=c(e))?t(s,n,f):void 0}})},function(t,e,n){var r=n(0),o=n(5),i=n(4),a=n(19);r({target:"Reflect",stat:!0,sham:!o},{getOwnPropertyDescriptor:function(t,e){return a.f(i(t),e)}})},function(t,e,n){var r=n(0),o=n(4),i=n(29);r({target:"Reflect",stat:!0,sham:!n(127)},{getPrototypeOf:function(t){return i(o(t))}})},function(t,e,n){n(0)({target:"Reflect",stat:!0},{has:function(t,e){return e in t}})},function(t,e,n){var r=n(0),o=n(4),i=Object.isExtensible;r({target:"Reflect",stat:!0},{isExtensible:function(t){return o(t),!i||i(t)}})},function(t,e,n){n(0)({target:"Reflect",stat:!0},{ownKeys:n(121)})},function(t,e,n){var r=n(0),o=n(20),i=n(4);r({target:"Reflect",stat:!0,sham:!n(76)},{preventExtensions:function(t){i(t);try{var e=o("Object","preventExtensions");return e&&e(t),!0}catch(t){return!1}}})},function(t,e,n){var r=n(0),o=n(4),i=n(3),a=n(190),u=n(1),c=n(10),s=n(19),f=n(29),l=n(33);r({target:"Reflect",stat:!0,forced:u((function(){var t=function(){},e=c.f(new t,"a",{configurable:!0});return!1!==Reflect.set(t.prototype,"a",1,e)}))},{set:function t(e,n,r){var u,h,p,y=arguments.length<4?e:arguments[3],d=s.f(o(e),n);if(!d){if(i(h=f(e)))return t(h,n,r,y);d=l(0)}if(a(d)){if(!1===d.writable||!i(y))return!1;if(u=s.f(y,n)){if(u.get||u.set||!1===u.writable)return!1;u.value=r,c.f(y,n,u)}else c.f(y,n,l(0,r))}else{if(void 0===(p=d.set))return!1;p.call(y,r)}return!0}})},function(t,e,n){var r=n(0),o=n(4),i=n(166),a=n(36);a&&r({target:"Reflect",stat:!0},{setPrototypeOf:function(t,e){o(t),i(e);try{return a(t,e),!0}catch(t){return!1}}})},function(t,e,n){var r=n(0),o=n(2),i=n(31);r({global:!0},{Reflect:{}}),i(o.Reflect,"Reflect",!0)},function(t,e,n){var r=n(5),o=n(2),i=n(69),a=n(94),u=n(24),c=n(10).f,s=n(44).f,f=n(77),l=n(9),h=n(62),p=n(99),y=n(14),d=n(1),v=n(12),g=n(16).enforce,m=n(58),b=n(6),w=n(142),x=n(191),_=b("match"),k=o.RegExp,A=k.prototype,S=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,O=/a/g,E=/a/g,P=new k(O)!==O,j=p.UNSUPPORTED_Y,M=r&&(!P||j||w||x||d((function(){return E[_]=!1,k(O)!=O||k(E)==E||"/a/i"!=k(O,"i")})));if(i("RegExp",M)){for(var R=function(t,e){var n,r,o,i,c,s,p=this instanceof R,y=f(t),d=void 0===e,m=[],b=t;if(!p&&y&&d&&t.constructor===R)return t;if((y||t instanceof R)&&(t=t.source,d&&(e="flags"in b?b.flags:h.call(b))),t=void 0===t?"":l(t),e=void 0===e?"":l(e),b=t,w&&"dotAll"in O&&(r=!!e&&e.indexOf("s")>-1)&&(e=e.replace(/s/g,"")),n=e,j&&"sticky"in O&&(o=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,"")),x&&(t=(i=function(t){for(var e,n=t.length,r=0,o="",i=[],a={},u=!1,c=!1,s=0,f="";r<=n;r++){if("\\"===(e=t.charAt(r)))e+=t.charAt(++r);else if("]"===e)u=!1;else if(!u)switch(!0){case"["===e:u=!0;break;case"("===e:S.test(t.slice(r+1))&&(r+=2,c=!0),o+=e,s++;continue;case">"===e&&c:if(""===f||v(a,f))throw new SyntaxError("Invalid capture group name");a[f]=!0,i.push([f,s]),c=!1,f="";continue}c?f+=e:o+=e}return[o,i]}(t))[0],m=i[1]),c=a(k(t,e),p?this:A,R),(r||o||m.length)&&(s=g(c),r&&(s.dotAll=!0,s.raw=R(function(t){for(var e,n=t.length,r=0,o="",i=!1;r<=n;r++)"\\"!==(e=t.charAt(r))?i||"."!==e?("["===e?i=!0:"]"===e&&(i=!1),o+=e):o+="[\\s\\S]":o+=e+t.charAt(++r);return o}(t),n)),o&&(s.sticky=!0),m.length&&(s.groups=m)),t!==b)try{u(c,"source",""===b?"(?:)":b)}catch(t){}return c},T=function(t){t in R||c(R,t,{configurable:!0,get:function(){return k[t]},set:function(e){k[t]=e}})},I=s(k),C=0;I.length>C;)T(I[C++]);A.constructor=R,R.prototype=A,y(o,"RegExp",R)}m("RegExp")},function(t,e,n){var r=n(5),o=n(142),i=n(10).f,a=n(16).get,u=RegExp.prototype;r&&o&&i(u,"dotAll",{configurable:!0,get:function(){if(this!==u){if(this instanceof RegExp)return!!a(this).dotAll;throw TypeError("Incompatible receiver, RegExp required")}}})},function(t,e,n){var r=n(5),o=n(10),i=n(62),a=n(1);r&&a((function(){return"sy"!==Object.getOwnPropertyDescriptor(RegExp.prototype,"flags").get.call({dotAll:!0,sticky:!0})}))&&o.f(RegExp.prototype,"flags",{configurable:!0,get:i})},function(t,e,n){var r=n(5),o=n(99).UNSUPPORTED_Y,i=n(10).f,a=n(16).get,u=RegExp.prototype;r&&o&&i(u,"sticky",{configurable:!0,get:function(){if(this!==u){if(this instanceof RegExp)return!!a(this).sticky;throw TypeError("Incompatible receiver, RegExp required")}}})},function(t,e,n){"use strict";n(143);var r,o,i=n(0),a=n(8),u=n(3),c=(r=!1,(o=/[ac]/).exec=function(){return r=!0,/./.exec.apply(this,arguments)},!0===o.test("abc")&&r),s=/./.test;i({target:"RegExp",proto:!0,forced:!c},{test:function(t){var e=this.exec;if(!a(e))return s.call(this,t);var n=e.call(this,t);if(null!==n&&!u(n))throw new Error("RegExp exec method returned something other than an Object or null");return!!n}})},function(t,e,n){"use strict";var r=n(50).PROPER,o=n(14),i=n(4),a=n(9),u=n(1),c=n(62),s=RegExp.prototype,f=s.toString,l=u((function(){return"/a/b"!=f.call({source:"a",flags:"b"})})),h=r&&"toString"!=f.name;(l||h)&&o(RegExp.prototype,"toString",(function(){var t=i(this),e=a(t.source),n=t.flags;return"/"+e+"/"+a(void 0===n&&t instanceof RegExp&&!("flags"in s)?c.call(t):n)}),{unsafe:!0})},function(t,e,n){"use strict";var r=n(93),o=n(179);t.exports=r("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),o)},function(t,e,n){"use strict";var r=n(0),o=n(15),i=n(17),a=n(9);r({target:"String",proto:!0,forced:n(1)((function(){return"\ud842"!=="𠮷".at(0)}))},{at:function(t){var e=a(o(this)),n=e.length,r=i(t),u=r>=0?r:n+r;return u<0||u>=n?void 0:e.charAt(u)}})},function(t,e,n){"use strict";var r=n(0),o=n(101).codeAt;r({target:"String",proto:!0},{codePointAt:function(t){return o(this,t)}})},function(t,e,n){"use strict";var r,o=n(0),i=n(19).f,a=n(25),u=n(9),c=n(144),s=n(15),f=n(145),l=n(28),h="".endsWith,p=Math.min,y=f("endsWith");o({target:"String",proto:!0,forced:!!(l||y||(r=i(String.prototype,"endsWith"),!r||r.writable))&&!y},{endsWith:function(t){var e=u(s(this));c(t);var n=arguments.length>1?arguments[1]:void 0,r=e.length,o=void 0===n?r:p(a(n),r),i=u(t);return h?h.call(e,i,o):e.slice(o-i.length,o)===i}})},function(t,e,n){var r=n(0),o=n(45),i=String.fromCharCode,a=String.fromCodePoint;r({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],o(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?i(e):i(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){"use strict";var r=n(0),o=n(144),i=n(15),a=n(9);r({target:"String",proto:!0,forced:!n(145)("includes")},{includes:function(t){return!!~a(i(this)).indexOf(a(o(t)),arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(102),o=n(4),i=n(25),a=n(9),u=n(15),c=n(35),s=n(103),f=n(78);r("match",(function(t,e,n){return[function(e){var n=u(this),r=null==e?void 0:c(e,t);return r?r.call(e,n):new RegExp(e)[t](a(n))},function(t){var r=o(this),u=a(t),c=n(e,r,u);if(c.done)return c.value;if(!r.global)return f(r,u);var l=r.unicode;r.lastIndex=0;for(var h,p=[],y=0;null!==(h=f(r,u));){var d=a(h[0]);p[y]=d,""===d&&(r.lastIndex=s(u,i(r.lastIndex),l)),y++}return 0===y?null:p}]}))},function(t,e,n){"use strict";var r=n(0),o=n(131),i=n(15),a=n(25),u=n(9),c=n(4),s=n(49),f=n(77),l=n(62),h=n(35),p=n(14),y=n(1),d=n(6),v=n(60),g=n(103),m=n(78),b=n(16),w=n(28),x=d("matchAll"),_=b.set,k=b.getterFor("RegExp String Iterator"),A=RegExp.prototype,S="".matchAll,O=!!S&&!y((function(){"a".matchAll(/./)})),E=o((function(t,e,n,r){_(this,{type:"RegExp String Iterator",regexp:t,string:e,global:n,unicode:r,done:!1})}),"RegExp String",(function(){var t=k(this);if(t.done)return{value:void 0,done:!0};var e=t.regexp,n=t.string,r=m(e,n);return null===r?{value:void 0,done:t.done=!0}:t.global?(""===u(r[0])&&(e.lastIndex=g(n,a(e.lastIndex),t.unicode)),{value:r,done:!1}):(t.done=!0,{value:r,done:!1})})),P=function(t){var e,n,r,o,i,s,f=c(this),h=u(t);return e=v(f,RegExp),void 0===(n=f.flags)&&f instanceof RegExp&&!("flags"in A)&&(n=l.call(f)),r=void 0===n?"":u(n),o=new e(e===RegExp?f.source:f,r),i=!!~r.indexOf("g"),s=!!~r.indexOf("u"),o.lastIndex=a(f.lastIndex),new E(o,h,i,s)};r({target:"String",proto:!0,forced:O},{matchAll:function(t){var e,n,r,o=i(this);if(null!=t){if(f(t)&&!~u(i("flags"in A?t.flags:l.call(t))).indexOf("g"))throw TypeError("`.matchAll` does not allow non-global regexes");if(O)return S.apply(o,arguments);if(void 0===(n=h(t,x))&&w&&"RegExp"==s(t)&&(n=P),n)return n.call(t,o)}else if(O)return S.apply(o,arguments);return e=u(o),r=new RegExp(t,"g"),w?P.call(r,e):r[x](e)}}),w||x in A||p(A,x,P)},function(t,e,n){"use strict";var r=n(0),o=n(135).end;r({target:"String",proto:!0,forced:n(193)},{padEnd:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0),o=n(135).start;r({target:"String",proto:!0,forced:n(193)},{padStart:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(0),o=n(23),i=n(11),a=n(9),u=n(13),c=Array.prototype,s=c.push,f=c.join;r({target:"String",stat:!0},{raw:function(t){for(var e=o(i(t).raw),n=u(e),r=arguments.length,c=[],l=0;n>l;){if(s.call(c,a(e[l++])),l===n)return f.call(c,"");l<r&&s.call(c,a(arguments[l]))}}})},function(t,e,n){n(0)({target:"String",proto:!0},{repeat:n(136)})},function(t,e,n){"use strict";var r=n(102),o=n(1),i=n(4),a=n(8),u=n(17),c=n(25),s=n(9),f=n(15),l=n(103),h=n(35),p=n(194),y=n(78),d=n(6)("replace"),v=Math.max,g=Math.min,m="$0"==="a".replace(/./,"$0"),b=!!/./[d]&&""===/./[d]("a","$0");r("replace",(function(t,e,n){var r=b?"$":"$0";return[function(t,n){var r=f(this),o=null==t?void 0:h(t,d);return o?o.call(t,r,n):e.call(s(r),t,n)},function(t,o){var f=i(this),h=s(t);if("string"==typeof o&&-1===o.indexOf(r)&&-1===o.indexOf("$<")){var d=n(e,f,h,o);if(d.done)return d.value}var m=a(o);m||(o=s(o));var b=f.global;if(b){var w=f.unicode;f.lastIndex=0}for(var x=[];;){var _=y(f,h);if(null===_)break;if(x.push(_),!b)break;""===s(_[0])&&(f.lastIndex=l(h,c(f.lastIndex),w))}for(var k,A="",S=0,O=0;O<x.length;O++){_=x[O];for(var E=s(_[0]),P=v(g(u(_.index),h.length),0),j=[],M=1;M<_.length;M++)j.push(void 0===(k=_[M])?k:String(k));var R=_.groups;if(m){var T=[E].concat(j,P,h);void 0!==R&&T.push(R);var I=s(o.apply(void 0,T))}else I=p(E,h,P,j,R,o);P>=S&&(A+=h.slice(S,P)+I,S=P+E.length)}return A+h.slice(S)}]}),!!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!m||b)},function(t,e,n){"use strict";var r=n(0),o=n(15),i=n(8),a=n(77),u=n(9),c=n(35),s=n(62),f=n(194),l=n(6),h=n(28),p=l("replace"),y=RegExp.prototype,d=Math.max,v=function(t,e,n){return n>t.length?-1:""===e?n:t.indexOf(e,n)};r({target:"String",proto:!0},{replaceAll:function(t,e){var n,r,l,g,m,b,w,x,_=o(this),k=0,A=0,S="";if(null!=t){if((n=a(t))&&!~u(o("flags"in y?t.flags:s.call(t))).indexOf("g"))throw TypeError("`.replaceAll` does not allow non-global regexes");if(r=c(t,p))return r.call(t,_,e);if(h&&n)return u(_).replace(t,e)}for(l=u(_),g=u(t),(m=i(e))||(e=u(e)),b=g.length,w=d(1,b),k=v(l,g,0);-1!==k;)x=m?u(e(g,k,l)):f(g,l,k,[],void 0,e),S+=l.slice(A,k)+x,A=k+b,k=v(l,g,k+w);return A<l.length&&(S+=l.slice(A)),S}})},function(t,e,n){"use strict";var r=n(102),o=n(4),i=n(15),a=n(185),u=n(9),c=n(35),s=n(78);r("search",(function(t,e,n){return[function(e){var n=i(this),r=null==e?void 0:c(e,t);return r?r.call(e,n):new RegExp(e)[t](u(n))},function(t){var r=o(this),i=u(t),c=n(e,r,i);if(c.done)return c.value;var f=r.lastIndex;a(f,0)||(r.lastIndex=0);var l=s(r,i);return a(r.lastIndex,f)||(r.lastIndex=f),null===l?-1:l.index}]}))},function(t,e,n){"use strict";var r=n(102),o=n(77),i=n(4),a=n(15),u=n(60),c=n(103),s=n(25),f=n(9),l=n(35),h=n(78),p=n(100),y=n(99),d=n(1),v=y.UNSUPPORTED_Y,g=[].push,m=Math.min;r("split",(function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r=f(a(this)),i=void 0===n?4294967295:n>>>0;if(0===i)return[];if(void 0===t)return[r];if(!o(t))return e.call(r,t,i);for(var u,c,s,l=[],h=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),y=0,d=new RegExp(t.source,h+"g");(u=p.call(d,r))&&!((c=d.lastIndex)>y&&(l.push(r.slice(y,u.index)),u.length>1&&u.index<r.length&&g.apply(l,u.slice(1)),s=u[0].length,y=c,l.length>=i));)d.lastIndex===u.index&&d.lastIndex++;return y===r.length?!s&&d.test("")||l.push(""):l.push(r.slice(y)),l.length>i?l.slice(0,i):l}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var o=a(this),i=null==e?void 0:l(e,t);return i?i.call(e,o,n):r.call(f(o),e,n)},function(t,o){var a=i(this),l=f(t),p=n(r,a,l,o,r!==e);if(p.done)return p.value;var y=u(a,RegExp),d=a.unicode,g=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(v?"g":"y"),b=new y(v?"^(?:"+a.source+")":a,g),w=void 0===o?4294967295:o>>>0;if(0===w)return[];if(0===l.length)return null===h(b,l)?[l]:[];for(var x=0,_=0,k=[];_<l.length;){b.lastIndex=v?0:_;var A,S=h(b,v?l.slice(_):l);if(null===S||(A=m(s(b.lastIndex+(v?_:0)),l.length))===x)_=c(l,_,d);else{if(k.push(l.slice(x,_)),k.length===w)return k;for(var O=1;O<=S.length-1;O++)if(k.push(S[O]),k.length===w)return k;_=x=A}}return k.push(l.slice(x)),k}]}),!!d((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),v)},function(t,e,n){"use strict";var r,o=n(0),i=n(19).f,a=n(25),u=n(9),c=n(144),s=n(15),f=n(145),l=n(28),h="".startsWith,p=Math.min,y=f("startsWith");o({target:"String",proto:!0,forced:!!(l||y||(r=i(String.prototype,"startsWith"),!r||r.writable))&&!y},{startsWith:function(t){var e=u(s(this));c(t);var n=a(p(arguments.length>1?arguments[1]:void 0,e.length)),r=u(t);return h?h.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";var r=n(0),o=n(15),i=n(17),a=n(9),u="".slice,c=Math.max,s=Math.min;r({target:"String",proto:!0,forced:!"".substr||"b"!=="ab".substr(-1)},{substr:function(t,e){var n,r,f=a(o(this)),l=f.length,h=i(t);return h===1/0&&(h=0),h<0&&(h=c(l+h,0)),(n=void 0===e?l:i(e))<=0||n===1/0||h>=(r=s(h+n,l))?"":u.call(f,h,r)}})},function(t,e,n){"use strict";var r=n(0),o=n(61).trim;r({target:"String",proto:!0,forced:n(146)("trim")},{trim:function(){return o(this)}})},function(t,e,n){"use strict";var r=n(0),o=n(61).end,i=n(146)("trimEnd"),a=i?function(){return o(this)}:"".trimEnd;r({target:"String",proto:!0,name:"trimEnd",forced:i},{trimEnd:a,trimRight:a})},function(t,e,n){"use strict";var r=n(0),o=n(61).start,i=n(146)("trimStart"),a=i?function(){return o(this)}:"".trimStart;r({target:"String",proto:!0,name:"trimStart",forced:i},{trimStart:a,trimLeft:a})},function(t,e,n){"use strict";var r=n(0),o=n(26);r({target:"String",proto:!0,forced:n(27)("anchor")},{anchor:function(t){return o(this,"a","name",t)}})},function(t,e,n){"use strict";var r=n(0),o=n(26);r({target:"String",proto:!0,forced:n(27)("big")},{big:function(){return o(this,"big","","")}})},function(t,e,n){"use strict";var r=n(0),o=n(26);r({target:"String",proto:!0,forced:n(27)("blink")},{blink:function(){return o(this,"blink","","")}})},function(t,e,n){"use strict";var r=n(0),o=n(26);r({target:"String",proto:!0,forced:n(27)("bold")},{bold:function(){return o(this,"b","","")}})},function(t,e,n){"use strict";var r=n(0),o=n(26);r({target:"String",proto:!0,forced:n(27)("fixed")},{fixed:function(){return o(this,"tt","","")}})},function(t,e,n){"use strict";var r=n(0),o=n(26);r({target:"String",proto:!0,forced:n(27)("fontcolor")},{fontcolor:function(t){return o(this,"font","color",t)}})},function(t,e,n){"use strict";var r=n(0),o=n(26);r({target:"String",proto:!0,forced:n(27)("fontsize")},{fontsize:function(t){return o(this,"font","size",t)}})},function(t,e,n){"use strict";var r=n(0),o=n(26);r({target:"String",proto:!0,forced:n(27)("italics")},{italics:function(){return o(this,"i","","")}})},function(t,e,n){"use strict";var r=n(0),o=n(26);r({target:"String",proto:!0,forced:n(27)("link")},{link:function(t){return o(this,"a","href",t)}})},function(t,e,n){"use strict";var r=n(0),o=n(26);r({target:"String",proto:!0,forced:n(27)("small")},{small:function(){return o(this,"small","","")}})},function(t,e,n){"use strict";var r=n(0),o=n(26);r({target:"String",proto:!0,forced:n(27)("strike")},{strike:function(){return o(this,"strike","","")}})},function(t,e,n){"use strict";var r=n(0),o=n(26);r({target:"String",proto:!0,forced:n(27)("sub")},{sub:function(){return o(this,"sub","","")}})},function(t,e,n){"use strict";var r=n(0),o=n(26);r({target:"String",proto:!0,forced:n(27)("sup")},{sup:function(){return o(this,"sup","","")}})},function(t,e,n){n(39)("Float32",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){var r=n(17);t.exports=function(t){var e=r(t);if(e<0)throw RangeError("The argument can't be less than 0");return e}},function(t,e,n){n(39)("Float64",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(39)("Int8",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(39)("Int16",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(39)("Int32",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(39)("Uint8",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(39)("Uint8",(function(t){return function(e,n,r){return t(this,e,n,r)}}),!0)},function(t,e,n){n(39)("Uint16",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(39)("Uint32",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){"use strict";var r=n(7),o=n(13),i=n(17),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("at",(function(t){var e=a(this),n=o(e),r=i(t),u=r>=0?r:n+r;return u<0||u>=n?void 0:e[u]}))},function(t,e,n){"use strict";var r=n(7),o=n(168),i=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",(function(t,e){return o.call(i(this),t,e,arguments.length>2?arguments[2]:void 0)}))},function(t,e,n){"use strict";var r=n(7),o=n(18).every,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("every",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(7),o=n(129),i=r.aTypedArray;(0,r.exportTypedArrayMethod)("fill",(function(t){return o.apply(i(this),arguments)}))},function(t,e,n){"use strict";var r=n(7),o=n(18).filter,i=n(449),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("filter",(function(t){var e=o(a(this),t,arguments.length>1?arguments[1]:void 0);return i(this,e)}))},function(t,e,n){var r=n(450),o=n(104);t.exports=function(t,e){return r(o(t),e)}},function(t,e){t.exports=function(t,e){for(var n=0,r=e.length,o=new t(r);r>n;)o[n]=e[n++];return o}},function(t,e,n){"use strict";var r=n(7),o=n(18).find,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("find",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(7),o=n(18).findIndex,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("findIndex",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(7),o=n(18).forEach,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("forEach",(function(t){o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(147);(0,n(7).exportTypedArrayStaticMethod)("from",n(196),r)},function(t,e,n){"use strict";var r=n(7),o=n(68).includes,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("includes",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(7),o=n(68).indexOf,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("indexOf",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(2),o=n(50).PROPER,i=n(7),a=n(90),u=n(6)("iterator"),c=r.Uint8Array,s=a.values,f=a.keys,l=a.entries,h=i.aTypedArray,p=i.exportTypedArrayMethod,y=c&&c.prototype[u],d=!!y&&"values"===y.name,v=function(){return s.call(h(this))};p("entries",(function(){return l.call(h(this))})),p("keys",(function(){return f.call(h(this))})),p("values",v,o&&!d),p(u,v,o&&!d)},function(t,e,n){"use strict";var r=n(7),o=r.aTypedArray,i=r.exportTypedArrayMethod,a=[].join;i("join",(function(t){return a.apply(o(this),arguments)}))},function(t,e,n){"use strict";var r=n(7),o=n(173),i=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",(function(t){return o.apply(i(this),arguments)}))},function(t,e,n){"use strict";var r=n(7),o=n(18).map,i=n(104),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("map",(function(t){return o(a(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(i(t))(e)}))}))},function(t,e,n){"use strict";var r=n(7),o=n(147),i=r.aTypedArrayConstructor;(0,r.exportTypedArrayStaticMethod)("of",(function(){for(var t=0,e=arguments.length,n=new(i(this))(e);e>t;)n[t]=arguments[t++];return n}),o)},function(t,e,n){"use strict";var r=n(7),o=n(91).left,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduce",(function(t){return o(i(this),t,arguments.length,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(7),o=n(91).right,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduceRight",(function(t){return o(i(this),t,arguments.length,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(7),o=r.aTypedArray,i=r.exportTypedArrayMethod,a=Math.floor;i("reverse",(function(){for(var t,e=o(this).length,n=a(e/2),r=0;r<n;)t=this[r],this[r++]=this[--e],this[e]=t;return this}))},function(t,e,n){"use strict";var r=n(7),o=n(13),i=n(195),a=n(11),u=n(1),c=r.aTypedArray;(0,r.exportTypedArrayMethod)("set",(function(t){c(this);var e=i(arguments.length>1?arguments[1]:void 0,1),n=this.length,r=a(t),u=o(r),s=0;if(u+e>n)throw RangeError("Wrong length");for(;s<u;)this[e+s]=r[s++]}),u((function(){new Int8Array(1).set({})})))},function(t,e,n){"use strict";var r=n(7),o=n(104),i=n(1),a=r.aTypedArray,u=r.exportTypedArrayMethod,c=[].slice;u("slice",(function(t,e){for(var n=c.call(a(this),t,e),r=o(this),i=0,u=n.length,s=new r(u);u>i;)s[i]=n[i++];return s}),i((function(){new Int8Array(1).slice()})))},function(t,e,n){"use strict";var r=n(7),o=n(18).some,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("some",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(7),o=n(2),i=n(1),a=n(21),u=n(13),c=n(174),s=n(175),f=n(176),l=n(43),h=n(132),p=r.aTypedArray,y=r.exportTypedArrayMethod,d=o.Uint16Array,v=d&&d.prototype.sort,g=!!v&&!i((function(){var t=new d(2);t.sort(null),t.sort({})})),m=!!v&&!i((function(){if(l)return l<74;if(s)return s<67;if(f)return!0;if(h)return h<602;var t,e,n=new d(516),r=Array(516);for(t=0;t<516;t++)e=t%4,n[t]=515-t,r[t]=t-2*e+3;for(n.sort((function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(n[t]!==r[t])return!0}));y("sort",(function(t){if(void 0!==t&&a(t),m)return v.call(this,t);p(this);var e,n=u(this),r=Array(n);for(e=0;e<n;e++)r[e]=this[e];for(r=c(this,function(t){return function(e,n){return void 0!==t?+t(e,n)||0:n!=n?-1:e!=e?1:0===e&&0===n?1/e>0&&1/n<0?1:-1:e>n}}(t)),e=0;e<n;e++)this[e]=r[e];return this}),!m||g)},function(t,e,n){"use strict";var r=n(7),o=n(25),i=n(45),a=n(104),u=r.aTypedArray;(0,r.exportTypedArrayMethod)("subarray",(function(t,e){var n=u(this),r=n.length,c=i(t,r);return new(a(n))(n.buffer,n.byteOffset+c*n.BYTES_PER_ELEMENT,o((void 0===e?r:i(e,r))-c))}))},function(t,e,n){"use strict";var r=n(2),o=n(7),i=n(1),a=r.Int8Array,u=o.aTypedArray,c=o.exportTypedArrayMethod,s=[].toLocaleString,f=[].slice,l=!!a&&i((function(){s.call(new a(1))}));c("toLocaleString",(function(){return s.apply(l?f.call(u(this)):u(this),arguments)}),i((function(){return[1,2].toLocaleString()!=new a([1,2]).toLocaleString()}))||!i((function(){a.prototype.toLocaleString.call([1,2])})))},function(t,e,n){"use strict";var r=n(7).exportTypedArrayMethod,o=n(1),i=n(2).Uint8Array,a=i&&i.prototype||{},u=[].toString,c=[].join;o((function(){u.call({})}))&&(u=function(){return c.call(this)});var s=a.toString!=u;r("toString",u,s)},function(t,e,n){"use strict";var r=n(0),o=n(9),i=String.fromCharCode,a=/^[\da-f]{2}$/i,u=/^[\da-f]{4}$/i;r({global:!0},{unescape:function(t){for(var e,n,r=o(t),c="",s=r.length,f=0;f<s;){if("%"===(e=r.charAt(f++)))if("u"===r.charAt(f)){if(n=r.slice(f+1,f+5),u.test(n)){c+=i(parseInt(n,16)),f+=5;continue}}else if(n=r.slice(f,f+2),a.test(n)){c+=i(parseInt(n,16)),f+=2;continue}c+=e}return c}})},function(t,e,n){"use strict";var r,o=n(2),i=n(59),a=n(54),u=n(93),c=n(197),s=n(3),f=n(16).enforce,l=n(161),h=!o.ActiveXObject&&"ActiveXObject"in o,p=Object.isExtensible,y=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},d=t.exports=u("WeakMap",y,c);if(l&&h){r=c.getConstructor(y,"WeakMap",!0),a.enable();var v=d.prototype,g=v.delete,m=v.has,b=v.get,w=v.set;i(v,{delete:function(t){if(s(t)&&!p(t)){var e=f(this);return e.frozen||(e.frozen=new r),g.call(this,t)||e.frozen.delete(t)}return g.call(this,t)},has:function(t){if(s(t)&&!p(t)){var e=f(this);return e.frozen||(e.frozen=new r),m.call(this,t)||e.frozen.has(t)}return m.call(this,t)},get:function(t){if(s(t)&&!p(t)){var e=f(this);return e.frozen||(e.frozen=new r),m.call(this,t)?b.call(this,t):e.frozen.get(t)}return b.call(this,t)},set:function(t,e){if(s(t)&&!p(t)){var n=f(this);n.frozen||(n.frozen=new r),m.call(this,t)?w.call(this,t,e):n.frozen.set(t,e)}else w.call(this,t,e);return this}})}},function(t,e,n){"use strict";n(93)("WeakSet",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(197))},function(t,e,n){var r=n(2),o=n(198),i=n(199),a=n(170),u=n(24),c=function(t){if(t&&t.forEach!==a)try{u(t,"forEach",a)}catch(e){t.forEach=a}};for(var s in o)o[s]&&c(r[s]&&r[s].prototype);c(i)},function(t,e,n){var r=n(2),o=n(198),i=n(199),a=n(90),u=n(24),c=n(6),s=c("iterator"),f=c("toStringTag"),l=a.values,h=function(t,e){if(t){if(t[s]!==l)try{u(t,s,l)}catch(e){t[s]=l}if(t[f]||u(t,f,e),o[e])for(var n in a)if(t[n]!==a[n])try{u(t,n,a[n])}catch(e){t[n]=a[n]}}};for(var p in o)h(r[p]&&r[p].prototype,p);h(i,"DOMTokenList")},function(t,e,n){var r=n(0),o=n(2),i=n(140);r({global:!0,bind:!0,enumerable:!0,forced:!o.setImmediate||!o.clearImmediate},{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,n){var r=n(0),o=n(2),i=n(188),a=n(57),u=o.process;r({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(t){var e=a&&u.domain;i(e?e.bind(t):t)}})},function(t,e,n){var r=n(0),o=n(2),i=n(8),a=n(34),u=[].slice,c=function(t){return function(e,n){var r=arguments.length>2,o=r?u.call(arguments,2):void 0;return t(r?function(){(i(e)?e:Function(e)).apply(this,o)}:e,n)}};r({global:!0,bind:!0,forced:/MSIE .\./.test(a)},{setTimeout:c(o.setTimeout),setInterval:c(o.setInterval)})},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n(192);var o,i=n(0),a=n(5),u=n(200),c=n(2),s=n(125),f=n(14),l=n(48),h=n(12),p=n(183),y=n(171),d=n(101).codeAt,v=n(481),g=n(9),m=n(31),b=n(201),w=n(16),x=c.URL,_=b.URLSearchParams,k=b.getState,A=w.set,S=w.getterFor("URL"),O=Math.floor,E=Math.pow,P=/[a-z]/i,j=/[\d+-.a-z]/i,M=/\d/,R=/^0x/i,T=/^[0-7]+$/,I=/^\d+$/,C=/^[\da-f]+$/i,z=/[\0\t\n\r #%/:<>?@[\\\]^|]/,B=/[\0\t\n\r #/:<>?@[\\\]^|]/,L=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,F=/[\t\n\r]/g,N=function(t,e){var n,r,o;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return"Invalid host";if(!(n=U(e.slice(1,-1))))return"Invalid host";t.host=n}else if(K(t)){if(e=v(e),z.test(e))return"Invalid host";if(null===(n=D(e)))return"Invalid host";t.host=n}else{if(B.test(e))return"Invalid host";for(n="",r=y(e),o=0;o<r.length;o++)n+=X(r[o],G);t.host=n}},D=function(t){var e,n,r,o,i,a,u,c=t.split(".");if(c.length&&""==c[c.length-1]&&c.pop(),(e=c.length)>4)return t;for(n=[],r=0;r<e;r++){if(""==(o=c[r]))return t;if(i=10,o.length>1&&"0"==o.charAt(0)&&(i=R.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)a=0;else{if(!(10==i?I:8==i?T:C).test(o))return t;a=parseInt(o,i)}n.push(a)}for(r=0;r<e;r++)if(a=n[r],r==e-1){if(a>=E(256,5-e))return null}else if(a>255)return null;for(u=n.pop(),r=0;r<n.length;r++)u+=n[r]*E(256,3-r);return u},U=function(t){var e,n,r,o,i,a,u,c=[0,0,0,0,0,0,0,0],s=0,f=null,l=0,h=function(){return t.charAt(l)};if(":"==h()){if(":"!=t.charAt(1))return;l+=2,f=++s}for(;h();){if(8==s)return;if(":"!=h()){for(e=n=0;n<4&&C.test(h());)e=16*e+parseInt(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,s>6)return;for(r=0;h();){if(o=null,r>0){if(!("."==h()&&r<4))return;l++}if(!M.test(h()))return;for(;M.test(h());){if(i=parseInt(h(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;l++}c[s]=256*c[s]+o,2!=++r&&4!=r||s++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;c[s++]=e}else{if(null!==f)return;l++,f=++s}}if(null!==f)for(a=s-f,s=7;0!=s&&a>0;)u=c[s],c[s--]=c[f+a-1],c[f+--a]=u;else if(8!=s)return;return c},Y=function(t){var e,n,o,i;if("number"==typeof t){for(e=[],n=0;n<4;n++)e.unshift(t%256),t=O(t/256);return e.join(".")}if("object"==r(t)){for(e="",o=function(t){for(var e=null,n=1,r=null,o=0,i=0;i<8;i++)0!==t[i]?(o>n&&(e=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(e=r,n=o),e}(t),n=0;n<8;n++)i&&0===t[n]||(i&&(i=!1),o===n?(e+=n?":":"::",i=!0):(e+=t[n].toString(16),n<7&&(e+=":")));return"["+e+"]"}return t},G={},W=p({},G,{" ":1,'"':1,"<":1,">":1,"`":1}),H=p({},W,{"#":1,"?":1,"{":1,"}":1}),V=p({},H,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),X=function(t,e){var n=d(t,0);return n>32&&n<127&&!h(e,t)?t:encodeURIComponent(t)},q={ftp:21,file:null,http:80,https:443,ws:80,wss:443},K=function(t){return h(q,t.scheme)},Q=function(t){return""!=t.username||""!=t.password},J=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},Z=function(t,e){var n;return 2==t.length&&P.test(t.charAt(0))&&(":"==(n=t.charAt(1))||!e&&"|"==n)},$=function(t){var e;return t.length>1&&Z(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},tt=function(t){var e=t.path,n=e.length;!n||"file"==t.scheme&&1==n&&Z(e[0],!0)||e.pop()},et=function(t){return"."===t||"%2e"===t.toLowerCase()},nt={},rt={},ot={},it={},at={},ut={},ct={},st={},ft={},lt={},ht={},pt={},yt={},dt={},vt={},gt={},mt={},bt={},wt={},xt={},_t={},kt=function(t,e,n,r){var i,a,u,c,s,f=n||nt,l=0,p="",d=!1,v=!1,g=!1;for(n||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(L,"")),e=e.replace(F,""),i=y(e);l<=i.length;){switch(a=i[l],f){case nt:if(!a||!P.test(a)){if(n)return"Invalid scheme";f=ot;continue}p+=a.toLowerCase(),f=rt;break;case rt:if(a&&(j.test(a)||"+"==a||"-"==a||"."==a))p+=a.toLowerCase();else{if(":"!=a){if(n)return"Invalid scheme";p="",f=ot,l=0;continue}if(n&&(K(t)!=h(q,p)||"file"==p&&(Q(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=p,n)return void(K(t)&&q[t.scheme]==t.port&&(t.port=null));p="","file"==t.scheme?f=dt:K(t)&&r&&r.scheme==t.scheme?f=it:K(t)?f=st:"/"==i[l+1]?(f=at,l++):(t.cannotBeABaseURL=!0,t.path.push(""),f=wt)}break;case ot:if(!r||r.cannotBeABaseURL&&"#"!=a)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==a){t.scheme=r.scheme,t.path=r.path.slice(),t.query=r.query,t.fragment="",t.cannotBeABaseURL=!0,f=_t;break}f="file"==r.scheme?dt:ut;continue;case it:if("/"!=a||"/"!=i[l+1]){f=ut;continue}f=ft,l++;break;case at:if("/"==a){f=lt;break}f=bt;continue;case ut:if(t.scheme=r.scheme,a==o)t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.query=r.query;else if("/"==a||"\\"==a&&K(t))f=ct;else if("?"==a)t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.query="",f=xt;else{if("#"!=a){t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.path.pop(),f=bt;continue}t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.query=r.query,t.fragment="",f=_t}break;case ct:if(!K(t)||"/"!=a&&"\\"!=a){if("/"!=a){t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,f=bt;continue}f=lt}else f=ft;break;case st:if(f=ft,"/"!=a||"/"!=p.charAt(l+1))continue;l++;break;case ft:if("/"!=a&&"\\"!=a){f=lt;continue}break;case lt:if("@"==a){d&&(p="%40"+p),d=!0,u=y(p);for(var m=0;m<u.length;m++){var b=u[m];if(":"!=b||g){var w=X(b,V);g?t.password+=w:t.username+=w}else g=!0}p=""}else if(a==o||"/"==a||"?"==a||"#"==a||"\\"==a&&K(t)){if(d&&""==p)return"Invalid authority";l-=y(p).length+1,p="",f=ht}else p+=a;break;case ht:case pt:if(n&&"file"==t.scheme){f=gt;continue}if(":"!=a||v){if(a==o||"/"==a||"?"==a||"#"==a||"\\"==a&&K(t)){if(K(t)&&""==p)return"Invalid host";if(n&&""==p&&(Q(t)||null!==t.port))return;if(c=N(t,p))return c;if(p="",f=mt,n)return;continue}"["==a?v=!0:"]"==a&&(v=!1),p+=a}else{if(""==p)return"Invalid host";if(c=N(t,p))return c;if(p="",f=yt,n==pt)return}break;case yt:if(!M.test(a)){if(a==o||"/"==a||"?"==a||"#"==a||"\\"==a&&K(t)||n){if(""!=p){var x=parseInt(p,10);if(x>65535)return"Invalid port";t.port=K(t)&&x===q[t.scheme]?null:x,p=""}if(n)return;f=mt;continue}return"Invalid port"}p+=a;break;case dt:if(t.scheme="file","/"==a||"\\"==a)f=vt;else{if(!r||"file"!=r.scheme){f=bt;continue}if(a==o)t.host=r.host,t.path=r.path.slice(),t.query=r.query;else if("?"==a)t.host=r.host,t.path=r.path.slice(),t.query="",f=xt;else{if("#"!=a){$(i.slice(l).join(""))||(t.host=r.host,t.path=r.path.slice(),tt(t)),f=bt;continue}t.host=r.host,t.path=r.path.slice(),t.query=r.query,t.fragment="",f=_t}}break;case vt:if("/"==a||"\\"==a){f=gt;break}r&&"file"==r.scheme&&!$(i.slice(l).join(""))&&(Z(r.path[0],!0)?t.path.push(r.path[0]):t.host=r.host),f=bt;continue;case gt:if(a==o||"/"==a||"\\"==a||"?"==a||"#"==a){if(!n&&Z(p))f=bt;else if(""==p){if(t.host="",n)return;f=mt}else{if(c=N(t,p))return c;if("localhost"==t.host&&(t.host=""),n)return;p="",f=mt}continue}p+=a;break;case mt:if(K(t)){if(f=bt,"/"!=a&&"\\"!=a)continue}else if(n||"?"!=a)if(n||"#"!=a){if(a!=o&&(f=bt,"/"!=a))continue}else t.fragment="",f=_t;else t.query="",f=xt;break;case bt:if(a==o||"/"==a||"\\"==a&&K(t)||!n&&("?"==a||"#"==a)){if(".."===(s=(s=p).toLowerCase())||"%2e."===s||".%2e"===s||"%2e%2e"===s?(tt(t),"/"==a||"\\"==a&&K(t)||t.path.push("")):et(p)?"/"==a||"\\"==a&&K(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&Z(p)&&(t.host&&(t.host=""),p=p.charAt(0)+":"),t.path.push(p)),p="","file"==t.scheme&&(a==o||"?"==a||"#"==a))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==a?(t.query="",f=xt):"#"==a&&(t.fragment="",f=_t)}else p+=X(a,H);break;case wt:"?"==a?(t.query="",f=xt):"#"==a?(t.fragment="",f=_t):a!=o&&(t.path[0]+=X(a,G));break;case xt:n||"#"!=a?a!=o&&("'"==a&&K(t)?t.query+="%27":t.query+="#"==a?"%23":X(a,G)):(t.fragment="",f=_t);break;case _t:a!=o&&(t.fragment+=X(a,W))}l++}},At=function(t){var e,n,r=l(this,At,"URL"),o=arguments.length>1?arguments[1]:void 0,i=g(t),u=A(r,{type:"URL"});if(void 0!==o)if(o instanceof At)e=S(o);else if(n=kt(e={},g(o)))throw TypeError(n);if(n=kt(u,i,null,e))throw TypeError(n);var c=u.searchParams=new _,s=k(c);s.updateSearchParams(u.query),s.updateURL=function(){u.query=String(c)||null},a||(r.href=Ot.call(r),r.origin=Et.call(r),r.protocol=Pt.call(r),r.username=jt.call(r),r.password=Mt.call(r),r.host=Rt.call(r),r.hostname=Tt.call(r),r.port=It.call(r),r.pathname=Ct.call(r),r.search=zt.call(r),r.searchParams=Bt.call(r),r.hash=Lt.call(r))},St=At.prototype,Ot=function(){var t=S(this),e=t.scheme,n=t.username,r=t.password,o=t.host,i=t.port,a=t.path,u=t.query,c=t.fragment,s=e+":";return null!==o?(s+="//",Q(t)&&(s+=n+(r?":"+r:"")+"@"),s+=Y(o),null!==i&&(s+=":"+i)):"file"==e&&(s+="//"),s+=t.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==u&&(s+="?"+u),null!==c&&(s+="#"+c),s},Et=function(){var t=S(this),e=t.scheme,n=t.port;if("blob"==e)try{return new At(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&K(t)?e+"://"+Y(t.host)+(null!==n?":"+n:""):"null"},Pt=function(){return S(this).scheme+":"},jt=function(){return S(this).username},Mt=function(){return S(this).password},Rt=function(){var t=S(this),e=t.host,n=t.port;return null===e?"":null===n?Y(e):Y(e)+":"+n},Tt=function(){var t=S(this).host;return null===t?"":Y(t)},It=function(){var t=S(this).port;return null===t?"":String(t)},Ct=function(){var t=S(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},zt=function(){var t=S(this).query;return t?"?"+t:""},Bt=function(){return S(this).searchParams},Lt=function(){var t=S(this).fragment;return t?"#"+t:""},Ft=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(a&&s(St,{href:Ft(Ot,(function(t){var e=S(this),n=g(t),r=kt(e,n);if(r)throw TypeError(r);k(e.searchParams).updateSearchParams(e.query)})),origin:Ft(Et),protocol:Ft(Pt,(function(t){var e=S(this);kt(e,g(t)+":",nt)})),username:Ft(jt,(function(t){var e=S(this),n=y(g(t));if(!J(e)){e.username="";for(var r=0;r<n.length;r++)e.username+=X(n[r],V)}})),password:Ft(Mt,(function(t){var e=S(this),n=y(g(t));if(!J(e)){e.password="";for(var r=0;r<n.length;r++)e.password+=X(n[r],V)}})),host:Ft(Rt,(function(t){var e=S(this);e.cannotBeABaseURL||kt(e,g(t),ht)})),hostname:Ft(Tt,(function(t){var e=S(this);e.cannotBeABaseURL||kt(e,g(t),pt)})),port:Ft(It,(function(t){var e=S(this);J(e)||(""==(t=g(t))?e.port=null:kt(e,t,yt))})),pathname:Ft(Ct,(function(t){var e=S(this);e.cannotBeABaseURL||(e.path=[],kt(e,g(t),mt))})),search:Ft(zt,(function(t){var e=S(this);""==(t=g(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",kt(e,t,xt)),k(e.searchParams).updateSearchParams(e.query)})),searchParams:Ft(Bt),hash:Ft(Lt,(function(t){var e=S(this);""!=(t=g(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",kt(e,t,_t)):e.fragment=null}))}),f(St,"toJSON",(function(){return Ot.call(this)}),{enumerable:!0}),f(St,"toString",(function(){return Ot.call(this)}),{enumerable:!0}),x){var Nt=x.createObjectURL,Dt=x.revokeObjectURL;Nt&&f(At,"createObjectURL",(function(t){return Nt.apply(x,arguments)})),Dt&&f(At,"revokeObjectURL",(function(t){return Dt.apply(x,arguments)}))}m(At,"URL"),i({global:!0,forced:!u,sham:!a},{URL:At})},function(t,e,n){"use strict";var r=/[^\0-\u007E]/,o=/[.\u3002\uFF0E\uFF61]/g,i="Overflow: input needs wider integers to process",a=Math.floor,u=String.fromCharCode,c=function(t){return t+22+75*(t<26)},s=function(t,e,n){var r=0;for(t=n?a(t/700):t>>1,t+=a(t/e);t>455;r+=36)t=a(t/35);return a(r+36*t/(t+38))},f=function(t){var e,n,r=[],o=(t=function(t){for(var e=[],n=0,r=t.length;n<r;){var o=t.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){var i=t.charCodeAt(n++);56320==(64512&i)?e.push(((1023&o)<<10)+(1023&i)+65536):(e.push(o),n--)}else e.push(o)}return e}(t)).length,f=128,l=0,h=72;for(e=0;e<t.length;e++)(n=t[e])<128&&r.push(u(n));var p=r.length,y=p;for(p&&r.push("-");y<o;){var d=2147483647;for(e=0;e<t.length;e++)(n=t[e])>=f&&n<d&&(d=n);var v=y+1;if(d-f>a((2147483647-l)/v))throw RangeError(i);for(l+=(d-f)*v,f=d,e=0;e<t.length;e++){if((n=t[e])<f&&++l>2147483647)throw RangeError(i);if(n==f){for(var g=l,m=36;;m+=36){var b=m<=h?1:m>=h+26?26:m-h;if(g<b)break;var w=g-b,x=36-b;r.push(u(c(b+w%x))),g=a(w/x)}r.push(u(c(g))),h=s(l,v,y==p),l=0,++y}}++l,++f}return r.join("")};t.exports=function(t){var e,n,i=[],a=t.toLowerCase().replace(o,".").split(".");for(e=0;e<a.length;e++)n=a[e],i.push(r.test(n)?"xn--"+f(n):n);return i.join(".")}},function(t,e,n){"use strict";n(0)({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},function(t,e,n){(function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n=function(t){"use strict";var n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.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 s(t,e,n,r){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),a=new A(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=x(a,n);if(u){if(u===l)continue;return u}}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=f(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),i}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function h(){}function p(){}function y(){}var d={};d[i]=function(){return this};var v=Object.getPrototypeOf,g=v&&v(v(S([])));g&&g!==n&&r.call(g,i)&&(d=g);var m=y.prototype=h.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,n){var o;this._invoke=function(i,a){function u(){return new n((function(o,u){!function o(i,a,u,c){var s=f(t[i],t,a);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"===e(h)&&r.call(h,"__await")?n.resolve(h.__await).then((function(t){o("next",t,u,c)}),(function(t){o("throw",t,u,c)})):n.resolve(h).then((function(t){l.value=t,u(l)}),(function(t){return o("throw",t,u,c)}))}c(s.arg)}(i,a,o,u)}))}return o=o?o.then(u,u):u()}}function x(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,x(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=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function _(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 k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=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 o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=m.constructor=y,y.constructor=p,p.displayName=c(y,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,u,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(w.prototype),w.prototype[a]=function(){return this},t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),c(m,u,"Generator"),m[i]=function(){return this},m.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=S,A.prototype={constructor:A,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(k),!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 o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.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),k(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 o=r.arg;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}("object"===e(t)?t.exports:{});try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}}).call(this,n(105)(t))},function(t,e,n){var r=n(485),o=n(41);t.exports=function t(e,n,i,a,u){return e===n||(null==e||null==n||!o(e)&&!o(n)?e!=e&&n!=n:r(e,n,i,a,t,u))}},function(t,e,n){var r=n(202),o=n(207),i=n(519),a=n(522),u=n(81),c=n(63),s=n(111),f=n(150),l="[object Object]",h=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,p,y,d){var v=c(t),g=c(e),m=v?"[object Array]":u(t),b=g?"[object Array]":u(e),w=(m="[object Arguments]"==m?l:m)==l,x=(b="[object Arguments]"==b?l:b)==l,_=m==b;if(_&&s(t)){if(!s(e))return!1;v=!0,w=!1}if(_&&!w)return d||(d=new r),v||f(t)?o(t,e,n,p,y,d):i(t,e,m,n,p,y,d);if(!(1&n)){var k=w&&h.call(t,"__wrapped__"),A=x&&h.call(e,"__wrapped__");if(k||A){var S=k?t.value():t,O=A?e.value():e;return d||(d=new r),y(S,O,n,p,d)}}return!!_&&(d||(d=new r),a(t,e,n,p,y,d))}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(107),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():o.call(e,n,1),--this.size,!0)}},function(t,e,n){var r=n(107);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(107);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(107);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},function(t,e,n){var r=n(106);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(106),o=n(148),i=n(206);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(203),o=n(499),i=n(40),a=n(205),u=/^\[object .+?Constructor\]$/,c=Function.prototype,s=Object.prototype,f=c.toString,l=s.hasOwnProperty,h=RegExp("^"+f.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?h:u).test(a(t))}},function(t,e,n){var r=n(80),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[u]=n:delete t[u]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r,o=n(500),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},function(t,e,n){var r=n(32)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(503),o=n(106),i=n(148);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(t,e,n){var r=n(504),o=n(505),i=n(506),a=n(507),u=n(508);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=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,t.exports=c},function(t,e,n){var r=n(108);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},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(108),o=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 o.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(108),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:o.call(e,t)}},function(t,e,n){var r=n(108);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(109);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){var e=n(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(109);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(109);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(109);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},function(t,e,n){var r=n(206),o=n(515),i=n(516);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,t.exports=a},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(80),o=n(208),i=n(79),a=n(207),u=n(520),c=n(521),s=r?r.prototype:void 0,f=s?s.valueOf:void 0;t.exports=function(t,e,n,r,s,l,h){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!l(new o(t),new o(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var p=u;case"[object Set]":var y=1&r;if(p||(p=c),t.size!=e.size&&!y)return!1;var d=h.get(t);if(d)return d==e;r|=2,h.set(t,e);var v=a(p(t),p(e),r,s,l,h);return h.delete(t),v;case"[object Symbol]":if(f)return f.call(t)==f.call(e)}return!1}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},function(t,e,n){var r=n(209),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,i,a,u){var c=1&n,s=r(t),f=s.length;if(f!=r(e).length&&!c)return!1;for(var l=f;l--;){var h=s[l];if(!(c?h in e:o.call(e,h)))return!1}var p=u.get(t),y=u.get(e);if(p&&y)return p==e&&y==t;var d=!0;u.set(t,e),u.set(e,t);for(var v=c;++l<f;){var g=t[h=s[l]],m=e[h];if(i)var b=c?i(m,g,h,e,t,u):i(g,m,h,t,e,u);if(!(void 0===b?g===m||a(g,m,n,i,u):b)){d=!1;break}v||(v="constructor"==h)}if(d&&!v){var w=t.constructor,x=e.constructor;w==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(d=!1)}return u.delete(t),u.delete(e),d}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(56),o=n(41);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(56),o=n(216),i=n(41),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!a[r(t)]}},function(t,e,n){var r=n(218)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(55)(n(32),"DataView");t.exports=r},function(t,e,n){var r=n(55)(n(32),"Promise");t.exports=r},function(t,e,n){var r=n(55)(n(32),"Set");t.exports=r},function(t,e,n){var r=n(55)(n(32),"WeakMap");t.exports=r},function(t,e,n){var r=n(82),o=n(534),i=n(114),a=o((function(t,e,n,o){r(e,i(e),t,o)}));t.exports=a},function(t,e,n){var r=n(222),o=n(225);t.exports=function(t){return r((function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,u=i>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,u&&o(n[0],n[1],u)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var c=n[r];c&&t(e,c,r,a)}return e}))}},function(t,e,n){var r=n(224),o=Math.max;t.exports=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,a=-1,u=o(i.length-e,0),c=Array(u);++a<u;)c[a]=i[e+a];a=-1;for(var s=Array(e+1);++a<e;)s[a]=i[a];return s[e]=n(c),r(t,this,s)}}},function(t,e,n){var r=n(537),o=n(539)(r);t.exports=o},function(t,e,n){var r=n(538),o=n(221),i=n(223),a=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:i;t.exports=a},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){var n=Date.now;t.exports=function(t){var e=0,r=0;return function(){var o=n(),i=16-(o-r);if(r=o,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(40),o=n(112),i=n(541),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=o(t),n=[];for(var u in t)("constructor"!=u||!e&&a.call(t,u))&&n.push(u);return n}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){var r=n(224),o=n(222),i=n(226),a=o((function(t,e){try{return r(t,void 0,e)}catch(t){return i(t)?t:new Error(t)}}));t.exports=a},function(t,e,n){var r=n(56),o=n(153),i=n(41),a=Function.prototype,u=Object.prototype,c=a.toString,s=u.hasOwnProperty,f=c.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=r(t))return!1;var e=o(t);if(null===e)return!0;var n=s.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==f}},function(t,e,n){var r=n(227);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},function(t,e,n){var r=n(79),o=Object.prototype,i=o.hasOwnProperty;t.exports=function(t,e,n,a){return void 0===t||r(t,o[n])&&!i.call(a,n)?e:t}},function(t,e){var n={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};t.exports=function(t){return"\\"+n[t]}},function(t,e,n){var r=n(548),o={escape:n(552),evaluate:n(553),interpolate:n(228),variable:"",imports:{_:{escape:r}}};t.exports=o},function(t,e,n){var r=n(549),o=n(229),i=/[&<>"']/g,a=RegExp(i.source);t.exports=function(t){return(t=o(t))&&a.test(t)?t.replace(i,r):t}},function(t,e,n){var r=n(550)({"&":"&","<":"<",">":">",'"':""","'":"'"});t.exports=r},function(t,e){t.exports=function(t){return function(e){return null==t?void 0:t[e]}}},function(t,e,n){var r=n(80),o=n(227),i=n(63),a=n(230),u=r?r.prototype:void 0,c=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(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=/<%-([\s\S]+?)%>/g},function(t,e){t.exports=/<%([\s\S]+?)%>/g},function(t,e,n){var r=n(202),o=n(555),i=n(219),a=n(556),u=n(557),c=n(558),s=n(559),f=n(560),l=n(561),h=n(209),p=n(562),y=n(81),d=n(563),v=n(564),g=n(569),m=n(63),b=n(111),w=n(571),x=n(40),_=n(573),k=n(110),A=n(114),S={};S["[object Arguments]"]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S["[object Object]"]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S["[object Function]"]=S["[object WeakMap]"]=!1,t.exports=function t(e,n,O,E,P,j){var M,R=1&n,T=2&n,I=4&n;if(O&&(M=P?O(e,E,P,j):O(e)),void 0!==M)return M;if(!x(e))return e;var C=m(e);if(C){if(M=d(e),!R)return s(e,M)}else{var z=y(e),B="[object Function]"==z||"[object GeneratorFunction]"==z;if(b(e))return c(e,R);if("[object Object]"==z||"[object Arguments]"==z||B&&!P){if(M=T||B?{}:g(e),!R)return T?l(e,u(M,e)):f(e,a(M,e))}else{if(!S[z])return P?e:{};M=v(e,z,R)}}j||(j=new r);var L=j.get(e);if(L)return L;j.set(e,M),_(e)?e.forEach((function(r){M.add(t(r,n,O,r,e,j))})):w(e)&&e.forEach((function(r,o){M.set(o,t(r,n,O,o,e,j))}));var F=C?void 0:(I?T?p:h:T?A:k)(e);return o(F||e,(function(r,o){F&&(r=e[o=r]),i(M,o,t(r,n,O,o,e,j))})),M}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e,n){var r=n(82),o=n(110);t.exports=function(t,e){return t&&r(e,o(e),t)}},function(t,e,n){var r=n(82),o=n(114);t.exports=function(t,e){return t&&r(e,o(e),t)}},function(t,e,n){(function(t){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(32),i="object"==r(e)&&e&&!e.nodeType&&e,a=i&&"object"==r(t)&&t&&!t.nodeType&&t,u=a&&a.exports===i?o.Buffer:void 0,c=u?u.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=c?c(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(105)(t))},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},function(t,e,n){var r=n(82),o=n(149);t.exports=function(t,e){return r(t,o(t),e)}},function(t,e,n){var r=n(82),o=n(232);t.exports=function(t,e){return r(t,o(t),e)}},function(t,e,n){var r=n(210),o=n(232),i=n(114);t.exports=function(t){return r(t,i,o)}},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&n.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},function(t,e,n){var r=n(154),o=n(565),i=n(566),a=n(567),u=n(568);t.exports=function(t,e,n){var c=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return o(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return u(t,n);case"[object Map]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return i(t);case"[object Set]":return new c;case"[object Symbol]":return a(t)}}},function(t,e,n){var r=n(154);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},function(t,e){var n=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,n){var r=n(80),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;t.exports=function(t){return i?Object(i.call(t)):{}}},function(t,e,n){var r=n(154);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){var r=n(570),o=n(153),i=n(112);t.exports=function(t){return"function"!=typeof t.constructor||i(t)?{}:r(o(t))}},function(t,e,n){var r=n(40),o=Object.create,i=function(){function t(){}return function(e){if(!r(e))return{};if(o)return o(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=i},function(t,e,n){var r=n(572),o=n(151),i=n(152),a=i&&i.isMap,u=a?o(a):r;t.exports=u},function(t,e,n){var r=n(81),o=n(41);t.exports=function(t){return o(t)&&"[object Map]"==r(t)}},function(t,e,n){var r=n(574),o=n(151),i=n(152),a=i&&i.isSet,u=a?o(a):r;t.exports=u},function(t,e,n){var r=n(81),o=n(41);t.exports=function(t){return o(t)&&"[object Set]"==r(t)}},function(t,e,n){var r=n(32);t.exports=function(){return r.Date.now()}},function(t,e,n){var r=n(577),o=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(o,""):t}},function(t,e){var n=/\s/;t.exports=function(t){for(var e=t.length;e--&&n.test(t.charAt(e)););return e}},function(t,e,n){var r=n(579);t.exports=function(t,e){var n;if("function"!=typeof e)throw new TypeError("Expected a function");return t=r(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}},function(t,e,n){var r=n(580);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},function(t,e,n){var r=n(233);t.exports=function(t){return t?(t=r(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},function(t,e,n){"use strict";n.r(e),n.d(e,"polyfill",(function(){return c})),n.d(e,"create",(function(){return Ec})),n.d(e,"Model",(function(){return wh})),n.d(e,"Layer",(function(){return Qr})),n.d(e,"EventMap",(function(){return hu})),n.d(e,"NOTHING",(function(){return Jt})),n.d(e,"MODE_VIEW",(function(){return Zt})),n.d(e,"MODE_EDIT",(function(){return $t})),n.d(e,"MODE_SHIFT",(function(){return te})),n.d(e,"MAX_UNDO_SIZE",(function(){return ee})),n.d(e,"DPPX",(function(){return ne})),n.d(e,"GESTURES",(function(){return re})),n.d(e,"KEYEVENTS",(function(){return oe})),n.d(e,"DEFAULT",(function(){return ie})),n.d(e,"Component",(function(){return mn})),n.d(e,"ContainerAbstract",(function(){return Yr})),n.d(e,"Container",(function(){return yi})),n.d(e,"RootContainer",(function(){return Au})),n.d(e,"Shape",(function(){return En})),n.d(e,"Line",(function(){return Yc})),n.d(e,"Ellipse",(function(){return Qc})),n.d(e,"Rect",(function(){return Eo})),n.d(e,"Polygon",(function(){return is})),n.d(e,"Polyline",(function(){return ys})),n.d(e,"Ruler",(function(){return vo})),n.d(e,"ImageView",(function(){return As})),n.d(e,"GifView",(function(){return Ws})),n.d(e,"AudioPlayer",(function(){return tf})),n.d(e,"Text",(function(){return sf})),n.d(e,"Group",(function(){return Ei})),n.d(e,"LocalRef",(function(){return bf})),n.d(e,"GlobalRef",(function(){return Ff})),n.d(e,"InfoWindow",(function(){return Vn})),n.d(e,"Popup",(function(){return qf})),n.d(e,"HTMLOverlayElement",(function(){return Rs})),n.d(e,"HTMLOverlayContainer",(function(){return Ef})),n.d(e,"Path",(function(){return nl})),n.d(e,"Triangle",(function(){return fl})),n.d(e,"Donut",(function(){return wl})),n.d(e,"Star",(function(){return Ml})),n.d(e,"Variable",(function(){return Nl})),n.d(e,"RectPath",(function(){return zn})),n.d(e,"ValueHolder",(function(){return ql})),n.d(e,"DataSource",(function(){return nh})),n.d(e,"MoveHandle",(function(){return Ir})),n.d(e,"Layout",(function(){return Qn})),n.d(e,"AbsoluteLayout",(function(){return hr})),n.d(e,"CardLayout",(function(){return dr})),n.d(e,"LinearHorizontalLayout",(function(){return mr})),n.d(e,"LinearVerticalLayout",(function(){return xr})),n.d(e,"TableLayout",(function(){return kr})),n.d(e,"HTMLAbsoluteLayout",(function(){return Zn})),n.d(e,"ReferenceMap",(function(){return ah})),n.d(e,"ScriptLoader",(function(){return yh})),n.d(e,"error",(function(){return pe})),n.d(e,"warn",(function(){return ye})),n.d(e,"debug",(function(){return de})),n.d(e,"Scene",(function(){return Oc})),n.d(e,"version",(function(){return dh})),n.d(e,"FPS",(function(){return bh})),n.d(e,"license",(function(){return xh}));var r={};n.r(r),n.d(r,"insertAt",(function(){return R})),n.d(r,"append",(function(){return T})),n.d(r,"prepend",(function(){return I})),n.d(r,"remove",(function(){return C})),n.d(r,"getAt",(function(){return z})),n.d(r,"forEach",(function(){return B})),n.d(r,"indexOf",(function(){return L})),n.d(r,"size",(function(){return F})),n.d(r,"clear",(function(){return N})),n.d(r,"moveForward",(function(){return D})),n.d(r,"moveBackward",(function(){return U})),n.d(r,"moveToHead",(function(){return Y})),n.d(r,"moveToTail",(function(){return G}));var o={};n.r(o),n.d(o,"push",(function(){return W})),n.d(o,"pop",(function(){return H}));var i={};n.r(i),n.d(i,"intercept",(function(){return ve})),n.d(i,"reset",(function(){return ge})),n.d(i,"clear",(function(){return me}));var a={};n.r(a),n.d(a,"hide",(function(){return cr})),n.d(a,"show",(function(){return sr}));var u={};n.r(u),n.d(u,"compile",(function(){return ia})),n.d(u,"duplicate",(function(){return Ga})),n.d(u,"select",(function(){return g})),n.d(u,"match",(function(){return d}));n(239),n(483);var c="done";"function"!=typeof Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var o in r)r.hasOwnProperty(o)&&(e[o]=r[o])}return e}),"function"!=typeof Object.values&&(Object.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e}),"function"!=typeof Object.keys&&(Object.values=function(t){var e=[];for(var n in t)e.push(n);return e}),"undefined"!=typeof CanvasRenderingContext2D&&null==CanvasRenderingContext2D.prototype.ellipse&&(CanvasRenderingContext2D.prototype.ellipse=function(t,e,n,r,o,i,a,u){this.save(),this.translate(t,e),this.rotate(o),this.translate(-n,-r),this.scale(n,r),this.arc(1,1,1,i,a,u),this.restore()}),function(){for(var t=0,e=["ms","moz","webkit","o"],n=0;n<e.length&&!window.requestAnimationFrame;++n)window.requestAnimationFrame=window[e[n]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[n]+"CancelAnimationFrame"]||window[e[n]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(console.warn("requestAnimationFrame not supported"),window.requestAnimationFrame=function(e,n){var r=performance.now(),o=Math.max(0,33-(r-t)),i=window.setTimeout((function(){e(r+o)}),o);return t=r+o,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}(),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t});var s=n(156),f=n.n(s),l=n(237),h=n.n(l);function p(t,e,n,r){var o=e.get("class");return!!o&&(o.split(" ")||[]).indexOf(t.substr(1))>=0}function y(t,e,n,r){return t==e.get("type")}function d(t,e,n,r){if("(all)"==t)return!0;switch(t.charAt(0)){case"#":return function(t,e,n,r){return t.substr(1)==e.get("id")}(t,e);case".":return p(t,e);case"(":return function(t,e,n,r){switch(t){case"(all)":return!0;case"(self)":return r===e;case"(root)":return!r.parent&&r===e;case"(descendant)":return r!==e;case"(child)":return r===e.parent;default:return!1}}(t,e,0,r);default:return y(t,e)}}function v(t,e,n,r){switch(t){case"(all)":return!0;case"(parent)":return n&&n.parent===e;case"(child)":case"(children)":return n&&n===e.parent;case"(sibling)":case"(siblings)":return n&&n.parent===e.parent&&n!==e;default:return!1}}function g(t,e,n){if("(root)"==t)return[e];if("(self)"==t)return n?[n]:[];var r;switch(t.charAt(0)){case"#":var o=e.root.findById(t.substr(1));return o?[o]:[];case".":r=p;break;case"(":r=v;break;default:r=y}return function t(e,n,r,o,i,a){return e(n,r,o,i)&&a.push(r),r.components&&r.components.forEach((function(r){t(e,n,r,o,i,a)})),a}(r,t,e,n,e,[])}var m=n(231),b=n.n(m),w=n(155),x=n.n(w),_=n(234),k=n.n(_),A=n(235),S=n.n(A),O=n(236),E=n.n(O);function P(t){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var j=0;function M(t){for(;t&&"object"===P(t);){var e=t;for(var n in t){t=t[n];break}if(t===e){t=void 0;break}}return t}function R(t,e){return this.__collection__?(-1==(t=this.__collection__.indexOf(e))&&this.__collection__.splice(t,0,e),this):this}function T(t){return this.__collection__||(this.__collection__=[]),-1==this.__collection__.indexOf(t)&&this.__collection__.push(t),this}function I(t){return this.__collection__||(this.__collection__=[]),-1==this.__collection__.indexOf(t)&&this.__collection__.unshift(t),this}function C(t){if(!this.__collection__)return this;var e=this.__collection__.indexOf(t);return e>=0&&this.__collection__.splice(e,1),this}function z(t){if(this.__collection__)return this.__collection__[t]}function B(t,e){this.__collection__&&this.__collection__.forEach(t,e)}function L(t){if(this.__collection__)return this.__collection__.indexOf(t)}function F(){return this.__collection__?this.__collection__.length:0}function N(){this.__collection__=[]}function D(t){var e=this.indexOf(t);-1!=e&&0!=e&&(this.__collection__[e]=this.__collection__[e-1],this.__collection__[e-1]=t)}function U(t){var e=this.indexOf(t);-1!=e&&e!=this.size()-1&&(this.__collection__[e]=this.__collection__[e+1],this.__collection__[e+1]=t)}function Y(t){var e=this.indexOf(t);if(-1!=e&&0!=e){var n=this.__collection__.splice(0,e),r=this.__collection__.splice(1);this.__collection__=this.__collection__.concat(n,r)}}function G(t){var e=this.indexOf(t);if(-1!=e&&e!=this.size()-1){var n=this.__collection__.splice(0,e),r=this.__collection__.splice(1);this.__collection__=n.concat(r,this.__collection__)}}function W(t){throw new Error("Not Implemented Yet")}function H(t){throw new Error("Not Implemented Yet")}function V(){}function X(t){return(X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}V.prototype=r;var q=/\s+/;function K(t,e,n,r){if(!n)return!0;if("object"==X(n)){for(var o in n){var i=n[o];t[e].apply(t,[o,i])}return!1}return!q.test(n)||(n.split(q).forEach((function(n){return t[e].apply(t,[n].concat(r))})),!1)}var Q=["on","off","once","delegate_on","delegate_off","trigger","listenTo"],J={withEvent:function(){var t=this;Q.forEach((function(e){return t[e]=J[e]}))},on:function(t,e,n){return K(this,"on",t,[e,n])&&e?(this._listeners||(this._listeners={}),(this._listeners[t]||(this._listeners[t]=[])).push({callback:e,context:n,ctx:n||this}),this):this},once:function(t,e,n){if(!K(this,"once",t,[e,n])||!e)return this;var r=this,o=S.a((function(){r.off(t,o),e.apply(r,arguments)}));o._callback=e,this.on(t,o,n)},off:function(t,e,n){if(!this._listeners||!K(this,"off",t,[e,n]))return this;if(!t&&!e&&!n)return this._listeners=void 0,this;var r;r=t?[t]:Object.keys(this._listeners);for(var o=0;o<r.length;o++){var i=r[o],a=this._listeners[i];if(a){var u=[];if(this._listeners[i]=u,e||n)for(var c=0;c<a.length;c++){var s=a[c];(e&&e!==s.callback&&e!==s.callback._callback||n&&n!==s.context)&&u.push(s)}u.length||delete this._listeners[i]}}return this},delegate_on:function(t){return this._delegators||(this._delegators=new V),this._delegators.append(t),this},delegate_off:function(t){return this._delegators?(this._delegators.remove(t),this):this},delegate:function(){if(this._delegators&&this._delegators.size()>0&&$(this._delegators,arguments),!this._listeners)return this;var t=arguments.length-1,e=arguments[t];arguments[t]={origin:e.origin,name:e.name,deliverer:this};var n=this._listeners[e.name],r=this._listeners["(all)"];return n&&Z(n,arguments),r&&Z(r,arguments),this},trigger:function(t){var e=[].slice.call(arguments,1);if(e.push({origin:this,name:t,deliverer:this}),this._delegators&&this._delegators.size()>0&&$(this._delegators,e),!this._listeners)return this;if(!K(this,"trigger",t,e))return this;var n=this._listeners[t],r=this._listeners["(all)"];return n&&Z(n,e),r&&Z(r,e),this},stopListening:function(t,e,n){var r=this._listeningTo;if(!r)return this;var o=!e&&!n;for(var i in n||"object"!=X(e)||(n=this),t&&((r={})[t._listenId]=t),r){var a=r[i];a.off(e,n,this),(o||E.a(a._events))&&delete this._listeningTo[i]}return this}};function Z(t,e){t.forEach((function(t){return t.callback.apply(t.ctx,e)}))}function $(t,e){t.forEach((function(t){return J.delegate.apply(t,e)}))}var tt={listenTo:"on",listenToOnce:"once"};for(var et in tt){var nt=tt[et];J[et]=function(t,e,n){this._listeningTo||(this._listeningTo={});var r=this._listeningTo;return t._listenId||(t._listenId="".concat("l"||"").concat(++j)),r[t._listenId]=t,n||"object"!=X(e)||(n=this),t[nt](e,n,this),this}}var rt=J;function ot(t,e){if(e instanceof Array)e.forEach((function(e){return ot(t,e)}));else{if(t.mixedIn=t.hasOwnProperty("mixedIn")?t.mixedIn:[],t.mixingIn=t.hasOwnProperty("mixingIn")?t.mixingIn:[],t.mixedIn.indexOf(e)>=0)return t;if(t.mixingIn.indexOf(e)>=0)throw new Error("found cyclic dependencies between ".concat(t.mixingIn));t.mixingIn.push(e),e.call(t),t.mixingIn.pop(),t.mixedIn.push(e)}return t}var it={linear:function(t){return t},quad:function(t){return Math.pow(t,2)},circ:function(t){return 1-Math.sin(Math.acos(t))},back:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{x:1.5};return Math.pow(t,2)*((e.x+1)*t-e.x)},bounce:function(t){for(var e=0,n=1;;e+=n,n/=2)if(t>=(7-4*e)/11)return-Math.pow((11-6*e-11*t)/4,2)+Math.pow(n,2)},elastic:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{x:1.5};return Math.pow(2,10*(t-1))*Math.cos(20*Math.PI*e.x/3*t)}};function at(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)}}var ut=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.client=e,this.config=n,this._started=!1;var r=this.config,o=r.delta,i=void 0===o?"linear":o,a=r.options,u=r.ease;"string"==typeof i&&(i=it[i]),this.delta="out"==u?function(t,e){return function(n){return 1-t(1-n,e)}}(i,a):"inout"==u?function(t,e){return function(n){return n<.5?t(2*n,e)/2:(2-t(2*(1-n),e))/2}}(i,a):i,this.init()}var e,n,r;return e=t,(n=[{key:"dispose",value:function(){this.stop(),delete this.client}},{key:"init",value:function(){}},{key:"start",value:function(){var t=this;if(!this._started){var e=this.config,n=e.duration,r=void 0===n?2e3:n,o=e.delay,i=void 0===o?0:o,a=e.repeat,u=void 0!==a&&a;this._started=!0;var c=0,s=r+i;this._raf=requestAnimationFrame((function e(){if(t._started){0==c&&(c=performance.now(),t.client.touch());var n=performance.now()-c,o=Math.max(n%s-i,0)/r;t.step(t.delta(o)),t.client&&t.client.invalidate(),!(n>=s)||u&&t._started||(t.step(1),t.stop(),c=0),t._started&&(t._raf=requestAnimationFrame(e))}}))}}},{key:"stop",value:function(){this._raf&&cancelAnimationFrame(this._raf),this._raf=null,this._started=!1}},{key:"started",get:function(){return this._started},set:function(t){this.started!=!!t&&(t?this.start():this.stop())}}])&&at(e.prototype,n),r&&at(e,r),t}();function ct(t){return(ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function st(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ft(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 lt(t,e){return(lt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ht(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=yt(t);if(e){var o=yt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return pt(this,n)}}function pt(t,e){return!e||"object"!==ct(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function yt(t){return(yt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function dt(t){return(dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gt(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 mt(t,e){return(mt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function bt(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=xt(t);if(e){var o=xt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wt(this,n)}}function wt(t,e){return!e||"object"!==dt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function xt(t){return(xt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _t(t){return(_t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function kt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function At(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 St(t,e){return(St=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ot(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=Pt(t);if(e){var o=Pt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Et(this,n)}}function Et(t,e){return!e||"object"!==_t(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Pt(t){return(Pt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function jt(t){return(jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Mt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rt(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 Tt(t,e){return(Tt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function It(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=zt(t);if(e){var o=zt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ct(this,n)}}function Ct(t,e){return!e||"object"!==jt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function zt(t){return(zt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Bt(t){return(Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Lt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ft(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 Nt(t,e){return(Nt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Dt(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=Yt(t);if(e){var o=Yt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ut(this,n)}}function Ut(t,e){return!e||"object"!==Bt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Yt(t){return(Yt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Gt(t){return(Gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ht(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 Vt(t,e){return(Vt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Xt(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=Kt(t);if(e){var o=Kt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return qt(this,n)}}function qt(t,e){return!e||"object"!==Gt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Kt(t){return(Kt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Qt={rotation:function(t){!function(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&<(t,e)}(i,t);var e,n,r,o=ht(i);function i(){return st(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"step",value:function(t){var e=this.config.theta,n=void 0===e?6.28:e;this.client.delta("theta",t*n)}}])&&ft(e.prototype,n),r&&ft(e,r),i}(ut),vibration:function(t){!function(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&&mt(t,e)}(i,t);var e,n,r,o=bt(i);function i(){return vt(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"step",value:function(t){var e=this.config.theta,n=void 0===e?.2617993877991494:e,r=4*n,o=t*r;t<1/4?o*=-1:t<3/4?o-=2*n:o=r-o,this.client.delta("theta",o)}}])&>(e.prototype,n),r&>(e,r),i}(ut),heartbeat:function(t){!function(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&&St(t,e)}(i,t);var e,n,r,o=Ot(i);function i(){return kt(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"step",value:function(t){var e,n=this.config.scale,r=2*((void 0===n?1.3:n)-1);e=t<.5?1+r*t:1+(1-t)*r,this.client.delta("sx",e),this.client.delta("sy",e)}}])&&At(e.prototype,n),r&&At(e,r),i}(ut),moving:function(t){!function(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&&Tt(t,e)}(i,t);var e,n,r,o=It(i);function i(){return Mt(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"step",value:function(t){var e=this.config,n=e.x,r=void 0===n?0:n,o=e.y,i=void 0===o?0:o;this.client.delta("tx",t*r),this.client.delta("ty",t*i)}}])&&Rt(e.prototype,n),r&&Rt(e,r),i}(ut),outline:function(t){!function(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&&Nt(t,e)}(i,t);var e,n,r,o=Dt(i);function i(){return Lt(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"step",value:function(t){var e=this.config.rideOn,n=this.client;if(e&&n&&n.root){var r=n.center,o=n.root.findById(e);if(o){var i=o.outline(t);r=n.transcoordS2T(r.x,r.y),o&&(n.delta("tx",i.x-r.x),n.delta("ty",i.y-r.y))}}}}])&&Ft(e.prototype,n),r&&Ft(e,r),i}(ut),fade:function(t){!function(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&&Vt(t,e)}(i,t);var e,n,r,o=Xt(i);function i(){return Wt(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"step",value:function(t){var e,n=this.config,r=n.startAlpha,o=void 0===r?1:r,i=n.endAlpha,a=void 0===i?0:i,u=Math.max(Math.min(o,a,1),0),c=2*(Math.min(Math.max(o,a,1),1)-u);e=t<.5?c*t:(1-t)*c,this.client.delta("fade",e)}}])&&Ht(e.prototype,n),r&&Ht(e,r),i}(ut)};var Jt={},Zt=0,$t=1,te=2,ee=30,ne="undefined"==typeof window?1:window.devicePixelRatio||(window.matchMedia&&window.matchMedia("(min-resolution: 2dppx), (-webkit-min-device-pixel-ratio: 1.5),(-moz-min-device-pixel-ratio: 1.5),(min-device-pixel-ratio: 1.5)").matches?2:1)||1,re=["mousemove","mouseup","mousedown","mouseout","wheel","click","touchstart","touchmove","touchend","dblclick"],oe=["keydown","keyup"],ie={ALPHA:1,FONT_SIZE:15,FONT_FAMILY:"serif",FONT_COLOR:"black",TEXT_ALIGN:"center",TEXT_BASELINE:"middle",TEXT_WRAP:!1,BOLD:!1,ITALIC:!1,STROKE_STYLE:"#999",LINE_DASH:"solid"},ae={x:1,y:1};function ue(t,e,n){var r=e.left,o=void 0===r?0:r,i=e.top,a=void 0===i?0:i,u=e.blurSize,c=void 0===u?0:u,s=e.color,f=void 0===s?"transparent":s,l=n.rootModel.get("scale")||ae;t.shadowOffsetX=o*l.x*ne,t.shadowOffsetY=a*l.y*ne,t.shadowBlur=c*l.x*ne,t.shadowColor=f}var ce={gradation:function(t,e,n){n.type;var r=n.subType,o=n.from,i=n.to,a=n.colors;switch(r){case"linear":var u=e.createLinearGradient(o.x,o.y,i.x,i.y);break;case"radial":u=e.createRadialGradient(o.x,o.y,o.r,i.x,i.y,i.r);break;default:u=e.createLinearGradient(o.x,o.y,i.x,i.y)}a&&(a.forEach((function(t){u.addColorStop(t.endPoint,t.color)})),e.fillStyle=u,e.fill())},shadow:ue};"undefined"==typeof window||window;var se,fe="[ERROR]",le="[WARN]",he="[DEBUG]",pe=function(){for(var t,e=[],n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];r.forEach((function(t){return t&&t.stack&&e.push(t.stack)})),(t=console).error.apply(t,[fe].concat(r,[e.join(" ")]))},ye=function(){for(var t,e=[],n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];r.forEach((function(t){return t&&t.stack&&e.push(t.stack)})),(t=console).warn.apply(t,[le].concat(r,[e.join(" ")]))},de=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=console).log.apply(t,[he].concat(n))};function ve(t,e,n){var r=t.__lookupGetter__(e);r?n?t.__defineGetter__(e,(function(){return void 0===this.__cache__[e]&&(this.__cache__[e]=r.call(this)),b.a(this.__cache__[e])})):t.__defineGetter__(e,(function(){return void 0===this.__cache__[e]&&(this.__cache__[e]=r.call(this)),this.__cache__[e]})):pe("".concat(e," is not defined in ").concat(t.constructor.name))}function ge(t){t.__cache__={}}function me(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];0==n.length?t.__cache__={}:n.forEach((function(e){return delete t.__cache__[e]}))}function be(t){var e=t.duration,n=void 0===e?1e3:e,r=(t.delay,t.step),o=t.delta,i=t.ease,a=t.options,u=t.repeat,c=void 0!==u&&u;"string"==typeof o&&(o=it[o]),"out"==i?o=function(t,e){return function(n){return 1-t(1-n,e)}}(o,a):"inout"==i&&(o=function(t,e){return function(n){return n<.5?t(2*n,e)/2:(2-t(2*(1-n),e))/2}}(o,a));var s=!1;return{start:function(){var t=this;if(s)return this;s=!0;var e=0;return requestAnimationFrame((function i(){if(s){0==e&&(e=performance.now());var u=(performance.now()-e)/n,f=c?u%1:Math.min(u,1);r(o(f,a)),!(u>=1)||c&&s||(t.stop(),e=0),s&&requestAnimationFrame(i)}})),this},stop:function(){return s=!1,this}}}function we(t){return(we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function xe(t,e,n,r,o){var i=r.alpha,a=void 0===i?1:i,u=o.fillStyle;if(t.globalAlpha*=a,u)if("string"==typeof u)t.fillStyle=u,t.fill();else if("object"==we(u))if("gradient"==u.type){t.translate(n.x,n.y);var c,s=e.width,f=e.height;if("linear"==u.gradientType){var l=3.141592653589793,h=u.rotation;if(h>=.436332&&h<=1.13446||h>=2.00713&&h<=2.70526||h>=3.57792&&h<=4.27606||h>=5.14872&&h<=5.84685){var p=Math.sqrt(Math.pow((s-4)/2,2)+Math.pow((f-4)/2,2));p-=p-(s+f)/3,c=t.createLinearGradient(p*Math.cos(h+l),p*Math.sin(h+l),p*Math.cos(h),p*Math.sin(h))}else c=t.createLinearGradient((s-4)/2*Math.cos(h+l),(f-4)/2*Math.sin(h+l),(s-4)/2*Math.cos(h),(f-4)/2*Math.sin(h))}else if("radial"==u.gradientType){var y=.95*Math.sqrt(Math.pow((s-4)/2,2)+Math.pow((f-4)/2,2));switch(u.center){case"center":c=t.createRadialGradient(0,0,0,0,0,y);break;case"left-top":c=t.createRadialGradient(-s/2,-f/2,0,-s/2,-f/2,2*y);break;case"right-top":c=t.createRadialGradient(s/2,-f/2,0,s/2,-f/2,2*y);break;case"left-bottom":c=t.createRadialGradient(-s/2,f/2,0,-s/2,f/2,2*y);break;case"right-bottom":c=t.createRadialGradient(s/2,f/2,0,s/2,f/2,2*y);break;default:c=t.createRadialGradient(0,0,0,0,0,y)}}u.colorStops.forEach((function(t){if(t.position>=0&&t.position<=1)try{c.addColorStop(t.position,t.color)}catch(e){ye("Invalid Color for colorstop : ",t.color),c.addColorStop(t.position,"#fff")}})),t.fillStyle=c,t.fill(),t.translate(-n.x,-n.y)}else if("pattern"==u.type&&u.image){o.prepareFillIf(!o._pattern_image_origin);var d=o._pattern_image;if(!d)return;var v=0,g=0,m=0,b=0,w=e.left,x=e.top;if(!u.fitPattern){switch(v=u.offsetX,g=u.offsetY,u.align){case"center":m=e.width/2-(u.width?u.width/2:0),b=e.height/2+(u.height?u.height/2:0);break;case"left-top":break;case"left-bottom":b=u.height?e.height%u.height:e.height;break;case"right-top":m=u.width?e.width%u.width:e.width;break;case"right-bottom":m=u.width?e.width%u.width:e.width,b=u.height?e.height%u.height:e.height;break;case"left":b=e.height/2+(u.height?u.height/2:0);break;case"right":m=u.width?e.width%u.width:e.width,b=e.height/2+(u.height?u.height/2:0);break;case"top":m=e.width/2-(u.width?u.width/2:0);break;case"bottom":m=e.width/2-(u.width?u.width/2:0),b=u.height?e.height%u.height:e.height}w+=v+m,x+=g+b}t.translate(w,x),u.fitPattern?Math.abs((d.width-e.width)*(d.height-e.height))>1?(delete o._pattern_image,delete o._pattern_image_origin):t.fillStyle=t.createPattern(d,"no-repeat"):t.fillStyle=t.createPattern(d,"repeat"),t.fill(),t.translate(-w,-x)}}function _e(t,e,n){var r=e.strokeStyle,o=e.lineDash,i=e.lineWidth,a=e.lineCap,u=e.lineJoin,c=e.alpha;if(r&&0!=i){if(a&&(t.lineCap=a),o){var s="round"==a;switch(o){case"solid":o=[0,0];break;case"round-dot":o=s?[0,2*i]:[i,i];break;case"square-dot":o=s?[i,2*i]:[2*i,i];break;case"dash":o=s?[3*i,2.5*i]:[4*i,1.5*i];break;case"dash-dot":o=s?[3*i,3*i,0,3*i]:[4*i,2*i,i,2*i];break;case"long-dash":o=s?[5*i,4*i]:[6*i,3*i];break;case"long-dash-dot":o=s?[5*i,3*i,0,3*i]:[6*i,2*i,i,2*i];break;case"long-dash-dot-dot":o=s?[5*i,2*i,0,2*i,0,2*i]:[6*i,i,i,i,i,i]}t.setLineDash(o)}t.globalAlpha*=c,t.strokeStyle=r,t.lineWidth=i,t.lineJoin=u,t.stroke()}}function ke(t,e,n){if(e.length<2)return e;for(var r=2;r<e.length;r++){var o=e.substring(0,r);if(!(t.measureText(o).width<n))break}return e.substring(0,r-1)}function Ae(t,e,n,r){var o=String(e).split("\n");return r?[].concat.apply([],o.map((function(e){return function(t,e,n){var r,o,i=e.split(" "),a=[],u=[];for(r=0,o=1;o<=i.length;o++)if(u=i.slice(r,o),t.measureText(u.join(" ")).width>n){if(o-r==1){var c=ke(t,u[0],n);a.push([c]),i.splice(r,1,c,u[0].substring(c.length))}else{for(;""==i[o-1];)o++;a.push(i.slice(r,--o))}r=o}return o-r>1&&a.push(u),0==a.length&&a.push([""]),a}(t,e,n)}))):o.map((function(t){return t.split(" ")}))}function Se(t,e,n,r,o){if(!r)return[];t.save(),t.font=n;var i=Ae(t,r,e,!!o);return t.restore(),i}function Oe(t){var e=t.fontFamily,n=void 0===e?ie.FONT_FAMILY:e,r=t.bold,o=void 0===r?ie.BOLD:r,i=t.italic,a=void 0===i?ie.ITALIC:i,u=t.fontSize,c=void 0===u?ie.FONT_SIZE:u,s=[];return o&&s.push("bold"),a&&s.push("italic"),s.push(c+"px"),s.push(n),s.join(" ")}function Ee(t,e,n,r){var o=r.alpha,i=void 0===o?ie.FONT_COLOR:o,a=r.fontColor,u=void 0===a?ie.FONT_COLOR:a,c=r.textAlign,s=void 0===c?ie.TEXT_ALIGN:c,f=r.textBaseline,l=void 0===f?ie.TEXT_BASELINE:f,h=r.fontSize,p=void 0===h?ie.FONT_SIZE:h,y=r.lineHeight,d=void 0===y?1.2*p:y;t.save(),t.beginPath();var v=e.left,g=e.top,m=e.width,b=e.height;t.font=Oe(r);var w,x,_=n.length*d;switch(l){case"top":w=g,t.textBaseline="top";break;case"bottom":w=g+b-_+d,t.textBaseline="bottom";break;case"middle":default:w=g+b/2-_/2+d/2,t.textBaseline="middle"}switch(s){case"left":x=v,t.textAlign="left";break;case"right":x=v+m,t.textAlign="right";break;case"justify":x=v,t.textAlign="left";break;case"center":default:x=v+m/2,t.textAlign="center"}t.globalAlpha*=i,t.fillStyle=u,"justify"!=s?n.forEach((function(e,n){t.fillText(e.join(" "),x,w+n*d)})):n.forEach((function(e,n){var r=w+n*d;if(1==e.length)t.fillText(e[0],x,r);else{var o=e.map((function(e){return t.measureText(e).width})),i=o.reduce((function(t,e){return t+e}),0),a=(m-i)/(e.length-1),u=x;e.forEach((function(e,n){t.fillText(e,u,r),u+=o[n]+a}))}})),t.restore()}function Pe(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{x:1,y:1};return t-=n.x,e-=n.y,{x:(t*Math.cos(-r)-e*Math.sin(-r)+n.x)/o.x,y:(t*Math.sin(-r)+e*Math.cos(-r)+n.y)/o.y}}function je(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{x:1,y:1};return t-=n.x,e-=n.y,{x:(t*Math.cos(r)-e*Math.sin(r)+n.x)*o.x,y:(t*Math.sin(r)+e*Math.cos(r)+n.y)*o.y}}se="undefined"==typeof document?function(t,e){return new Canvas(t,e)}:function(t,e){var n=document.createElement("canvas");return n.width=t,n.height=e,n};var Me=function(t){return t};function Re(t){var e=t.indexOf("||"),n="",r="";-1!=e&&(n=t,r=t.substring(e+2,t.length-1).trim(),t=t.replace(t.substring(e,t.length-1),"").trim());var o=t.substr(2,t.length-3).trim().replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".").filter((function(t){return!!t.trim()})),i=o.slice(1);return{defaultValue:r,match:t,originText:n||t,target:o[0],accessor:i.length>0?function(t){return i.reduce((function(t,e){return t?t[e]:void 0}),t)}:Me}}function Te(t,e,n){if(t){var r=n||M,o=String(t),i=(o.match(/#{[^}]*}/gi)||[]).map((function(t){return Re(t)})),a=(o.match(/\${[^}]*}/gi)||[]).map((function(t){return Re(t)}));if(0!=i.length||0!=a.length)return function(){var t=o;return i.forEach((function(n){var o=r(n.accessor(e.getState(n.target)));t=t.replace(n.originText,void 0===o?n.defaultValue||"":o)})),a.forEach((function(n){var o=e.root.findById(n.target),i=r(n.accessor(o&&o.data));t=t.replace(n.originText,void 0===i?n.defaultValue||"":i)})),t}}}function Ie(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)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Ce(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ce(t,e)}(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 Ce(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 ze(t){var e=M(t);return null==e?"":String(e)}function Be(t){return Number(M(t))}function Le(t){return t}function Fe(t){return ze(t)}function Ne(t){return Be(t)}function De(t){if(this.param)return t=ze(t),this.param.hasOwnProperty(t)?this.param[t]:this.param.default}function Ue(t){var e=this.param;if(e){for(var n in e){var r=Ie(n.split("~"),2),o=r[0],i=r[1],a=!!o,u=!!i;if(o=parseFloat(o),i=parseFloat(i),t=Be(t),a&&!u&&t>=o)return e[n];if(!a&&u&&t<o)return e[n];if(t>=o&&t<i)return e[n]}return e.default}}function Ye(t){return Be(t)*Math.PI/180}function Ge(){}function We(t,e,n,r,o){switch(n){case"value":return"text"===o||"string"===o?Fe.bind(t):"number"===o?Ne.bind(t):Le.bind(e);case"map":return De.bind(t);case"range":return Ue.bind(t);case"radian":return Ye.bind(t);case"eval":return function(t){try{return new Function("value","targets",t)}catch(t){return pe(t),Ge}}(r).bind(e);default:return Le.bind(e)}}var He=function(t){return t};function Ve(t){if(!t)return He;var e=String(t).trim().replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".").filter((function(t){return!!t.trim()}));return e.length>0?function(t){return e.reduce((function(t,e){return t?t[e]:void 0}),t)}:He}function Xe(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)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return qe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qe(t,e)}(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 qe(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 Ke(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)}}var Qe=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.owner=n,this.model=e}var e,n,r;return e=t,(n=[{key:"dispose",value:function(){delete this._model,delete this.owner,delete this.evaluator,delete this.accessor}},{key:"model",get:function(){return this._model},set:function(t){var e=t.target,n=t.property,r=t.rule,o=t.param,i=t.accessor;this._model=t,this.evaluator=We(this,this.owner,r,o,function(t){switch(t){case"ref":case"fillStyle":case"strokeStyle":return"string";default:return}}(n)),this.accessor=Ve(i);var a=e.match(/\[(.*?)\]/);if(a){var u=Xe(a[1].split(":"),2),c=u[0],s=u[1];this.propAccessor=Ve(c),this.partAccessor=Ve(s)}}},{key:"target",get:function(){return this.model.target}},{key:"property",get:function(){return this.model.property}},{key:"param",get:function(){return this.model.param}}])&&Ke(e.prototype,n),r&&Ke(e,r),t}();function Je(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(e||void 0!==this.data)&&this.mappings&&this.mappings.forEach((function(e){try{var n=e.target,r=e.property,o=e.accessor,i=e.propAccessor,a=e.partAccessor,u=o(t.data);if("(root)"==(n=n.trim())||"(key)"==n){if(null==u)return;var c=Object.keys(u||{}).map((function(e){return t.root.findOrCreate(e)})).filter((function(t){return!!t}));c.length>0&&c.forEach((function(t){return t[r]=e.evaluator(u[t.get("id")],[t])}))}else if(n.startsWith("[")){if(null==u)return;if(u instanceof Array)u.forEach((function(n){var o=i(n);if(o){var u=t.root.findOrCreate(o);u&&(u[r]=e.evaluator(a(n),[u]))}}));else{if(!(u instanceof Object))throw String("mapping data should be an object to target property-id.("+u+")");var s=i(u);if(s){var f=t.root.findOrCreate(s);f&&(f[r]=e.evaluator(a(u),[f]))}}}else{var l=t.root.findAll(n,t);if(l.length>0){var h=e.evaluator(u,l);l.forEach((function(t){return t[r]=h}))}}}catch(n){pe(n,t,e)}}))}function Ze(t){var e=t.element,n=t.fillStyle,r=e.style;if(n)if("string"==typeof n)r.backgroundColor=n;else switch(n.type){case"pattern":r.backgroundImage="url("+n.image+")",r.backgroundColor="transparent",n.fitPattern?r.backgroundSize="100% 100%":n.width||n.height?r.backgroundSize="".concat(n.width?n.width+"px":"auto"," ").concat(n.height?n.height+"px":"auto"):r.backgroundSize="contain";break;case"gradient":r.background=function(t,e){var n=e.colorStops,r=e.gradientType;if(n instanceof Array&&n.length>0)switch(r){case"radial":var o=e.center||"center";return"radial-gradient(farthest-corner at "+function(t,e){var n=t.bounds,r=n.width,o=n.height;switch(e){case"center":return[r/2,o/2];case"left-top":return[0,0];case"right-top":return[r,0];case"left-bottom":return[0,o];default:return[r,o]}}(t,o).map((function(t){return t+"px"})).join(" ")+","+n.map((function(t){return"".concat(t.color," ").concat(100*t.position,"%")})).join(",")+")";case"linear":return"linear-gradient("+(180*(e.rotation||0)/3.141592653589793+90+"deg")+", "+n.map((function(t){return"".concat(t.color," ").concat(100*t.position,"%")})).join(",")+")"}return""}(t,n)}else r.background="transparent"}var $e={x:1,y:1},tn={boxSizing:"border-box",margin:"0px",position:"absolute",outline:"none"};function en(t){var e=t.state,n=e.id,r=e.scale,o=void 0===r?$e:r,i=(e.translate,e.bold),a=e.italic,u=e.fontFamily,c=void 0===u?"":u,s=e.textAlign,f=e.textBaseline,l=e.paddingTop,h=void 0===l?0:l,p=e.paddingBottom,y=void 0===p?0:p,d=e.paddingLeft,v=void 0===d?0:d,g=e.paddingRight,m=void 0===g?0:g,b=e.fontSize,w=void 0===b?ie.FONT_SIZE:b,x=e.lineWidth,_=void 0===x?0:x,k=e.lineDash,A=t.state.class,S=(t.text,t.strokeStyle),O=(t.fillStyle,t.rotation),E=void 0===O?0:O,P=t.fontColor,j=t.hidden,M=t.bounds,R=M.left,T=M.top,I=M.width,C=M.height,z=t.element;z.hidden=j,n&&(z.id=n),A&&(z.className=A),Object.assign(z.style,tn,{fontFamily:c,fontSize:w+"px",left:R+"px",top:T+"px",width:I+"px",height:C+"px",paddingTop:h+"px",paddingRight:m+"px",paddingBottom:y+"px",paddingLeft:v+"px",border:_+"px",borderColor:S,borderStyle:_>0?k||ie.LINE_DASH:"",color:P,fontWeight:i?"bold":"",fontStyle:a?"italic":"",textAlign:"end"==s?"right":"start"==s?"left":s,verticalAlign:f}),Ze(t),function(t){if(t.isShadowable()&&t.state.shadow){var e=t.element,n=t.state.shadow,r=n.left,o=void 0===r?0:r,i=n.top,a=void 0===i?0:i,u=n.blurSize,c=void 0===u?0:u,s=n.color,f=void 0===s?"transparent":s;e.style.boxShadow="".concat(o,"px ").concat(a,"px ").concat(c,"px ").concat(f)}}(t);var B=t.delta(),L=(o&&o.x||1)*B.sx,F=(o&&o.y||1)*B.sy,N=(E||0)+B.theta,D=B.tx||0,U=B.ty||0;["-webkit-","-moz-","-ms-","-o-",""].forEach((function(t){z.style[t+"transform"]="rotate(".concat(N,"rad) translate(").concat(D,"px, ").concat(U,"px) scale(").concat(L,", ").concat(F,") perspective(1px)")}))}function nn(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)}}var rn,on=[];function an(){rn=null;var t=performance.now(),e=(on=on.filter((function(t){return un(t)}))).reduce((function(e,n){var r=t-n.updatedAt;return r>=n.retention?e.kills.push(n):e.next=0==e.next?n.retention-r:Math.min(e.next,n.retention-r),e}),{next:0,kills:[]});e.kills.forEach((function(t){var e=on.indexOf(t);-1!=e?(on.splice(e,1),t.removeSelf(!0)):pe("Should not be here. Maybe reentrance problem.")})),e.next>0&&(rn=setTimeout(cn,Math.max(e.next,500)))}function un(t){return!t.disposed&&t.retention>0&&!t.isTemplate()&&t.app&&t.app.isViewMode}var cn=k()((function(){requestAnimationFrame(an)}),500),sn=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r;return e=t,(n=[{key:"add",value:function(t){un(t)&&-1==on.indexOf(t)&&(on.push(t),t.touch()),this.touch()}},{key:"remove",value:function(t){var e=on.indexOf(t);e>0&&on.splice(e,1),this.touch()}},{key:"touch",value:function(){null!==rn&&(clearTimeout(rn),rn=null),cn()}},{key:"length",get:function(){return on.length}}])&&nn(e.prototype,n),r&&nn(e,r),t}());function fn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ln(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)}}var hn={},pn={mutable:!1,resizable:!0,rotatable:!0,properties:[],"value-property":"text",sample:{xx:0}},yn=[],dn={theta:0,tx:0,ty:0,sx:1,sy:1,fade:0},vn=new WeakMap,gn=0,mn=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._app=n,this._model=e||{},this._state={},this._delta=b.a(dn),n&&this.animation&&(this.animation.started=!0),this.clearCache(),sn.add(this),vn.set(this,gn++)}var e,n,r;return e=t,r=[{key:"nature",get:function(){return pn}},{key:"buildSample",value:function(t,e){var n=this.register(t);if(n){var r=n.nature.sample||{};return Object.assign({type:t},r,e)}console.error("Class not registered.",t)}},{key:"register",value:function(t,e){if(!e)return hn[t];hn[t]=e}},{key:"residents",get:function(){return vn}}],(n=[{key:"created",value:function(){}},{key:"added",value:function(t){}},{key:"removed",value:function(t){}},{key:"ready",value:function(){}},{key:"touch",value:function(){this.updatedAt=performance.now()}},{key:"clearCache",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];me.apply(i,[this].concat(e))}},{key:"removeSelf",value:function(t){t?this.dispose():this.parent&&this.parent.removeComponent(this)}},{key:"dispose",value:function(){this._animation&&(this._animation.dispose(),delete this._animation),this.disposeMappings(),this.parent&&this.parent.removeComponent(this),delete this._text_substitutor,delete this._value_substitutor,this._disposed=!0,this.retention&&sn.touch(),this.clearCache(),delete this._app}},{key:"nature",get:function(){return this.constructor.nature}},{key:"disposed",get:function(){return!!this._disposed}},{key:"isLayer",value:function(){return!1}},{key:"isGroup",value:function(){return!1}},{key:"isContainer",value:function(){return!1}},{key:"isLine",value:function(){return!1}},{key:"isRoot",value:function(){return!1}},{key:"isRootModel",value:function(){return!1}},{key:"is3dish",value:function(){return!1}},{key:"isTemplate",value:function(){return!!this.get("templatePrefix")}},{key:"isHTMLElement",value:function(){return!1}},{key:"retention",get:function(){return Number(this.get("retention"))||0}},{key:"hasTextProperty",get:function(){return!0}},{key:"app",get:function(){return!this._app&&this.parent&&(this._app=this.parent.app),this._app}},{key:"model",get:function(){return this._model}},{key:"state",get:function(){return Object.assign({},this._model,this._state)}},{key:"hierarchy",get:function(){var t=b.a(this._model);return this.volatile.forEach((function(e){delete t[e]})),t}},{key:"volatile",get:function(){return yn}},{key:"textHidden",get:function(){return!!this._textHidden},set:function(t){this._textHidden=!!t,this.invalidate()}},{key:"get",value:function(t){return this._model[t]}},{key:"set",value:function(t,e){if("string"==typeof t)return this.set(fn({},t,e));var n={},r={},o=!1,i=(t=b.a(t),this);return Object.getOwnPropertyNames(t).forEach((function(e){var a=i._model[e],u=t[e];f()(a,u)||(r[e]=a,n[e]=u,i._model[e]=u,delete i._state[e],o=!0)})),o&&(this.clearCache(),n.hasOwnProperty("text")&&delete this._text_substitutor,n.hasOwnProperty("retention")&&sn.add(this),n.hasOwnProperty("fillStyle")&&this.onchangeFill(n,r),n.hasOwnProperty("mappings")&&this.onchangeMappings(n,r),n.hasOwnProperty("data")&&this.onchangeData(n,r),this.onchange&&this.onchange(n,r),this.trigger("change",n,r)),this}},{key:"getState",value:function(t){return this._state.hasOwnProperty(t)?this._state[t]:this.get(t)}},{key:"setState",value:function(t,e){if("string"==typeof t)return this.setState(fn({},t,e));var n={},r={},o=!1,i=(t=b.a(t),this),a=this.getState("sensitive");return Object.getOwnPropertyNames(t).forEach((function(e){var u=i.getState(e),c=t[e];!a&&f()(u,c)||(r[e]=u,n[e]=c,i._state[e]=c,o=!0)})),o&&(this.clearCache(),n.hasOwnProperty("text")&&delete this._text_substitutor,n.hasOwnProperty("fillStyle")&&this.onchangeFill(n,r),n.hasOwnProperty("data")&&this.onchangeData(n,r),this.onchange&&this.onchange(n,r),this.trigger("change",n,r)),this}},{key:"root",get:function(){return this.isRoot()?this:this.parent&&this.parent.root}},{key:"rootModel",get:function(){return this.isRootModel()?this:this.parent&&this.parent.rootModel}},{key:"parent",get:function(){return this._parent},set:function(t){this._parent=t}},{key:"isDescendible",value:function(t){return!0}},{key:"getContext",value:function(){return this._parent.getContext()}},{key:"center",get:function(){var t=this.bounds;return{x:t.left+t.width/2,y:t.top+t.height/2}},set:function(t){if(t&&!isNaN(t.x)&&!isNaN(t.y)){var e=this.center;if(Math.round(100*t.x)/100!=Math.round(100*e.x)/100||Math.round(100*t.y)/100!=Math.round(100*e.y)/100){var n=t.x-e.x,r=t.y-e.y;this.path=this.path.map((function(t){return{x:t.x+n,y:t.y+r}}))}}}},{key:"location",get:function(){return this.center},set:function(t){this.center=t}},{key:"dimension",get:function(){return this.get("dimension")},set:function(t){this.set("dimension",t)}},{key:"bounds",get:function(){var t,e,n,r,o=this.path;t=e=o[0].x,n=r=o[0].y;for(var i=1;i<o.length;i++){var a=o[i];a.x<t?t=a.x:a.x>e&&(e=a.x),a.y<n?n=a.y:a.y>r&&(r=a.y)}return{left:t,top:n,width:e-t,height:r-n}},set:function(t){var e=this.bounds;if(Math.round(100*t.width)/100!=Math.round(100*e.width)/100||Math.round(100*t.height)/100!=Math.round(100*e.height)/100||Math.round(100*t.left)/100!=Math.round(100*e.left)/100||Math.round(100*t.top)/100!=Math.round(100*e.top)/100){var n=0==e.width?1:t.width/e.width,r=0==e.height?1:t.height/e.height;this.path=this.path.map((function(o){return{x:t.left+(o.x-e.left)*n,y:t.top+(o.y-e.top)*r}}))}}},{key:"path",get:function(){return pe("이 컴포넌트에 get path 가 구현되어있지 않음.",this),[]},set:function(t){pe("이 컴포넌트에 get path 가 구현되어있지 않음.",this)}},{key:"outline",value:function(t){return function(t,e){var n=t.path.slice();if(n&&n.length){var r=1,o=[];if(t.isLine()||n.push(n[0]),e<=0)return t.transcoordS2T(n[0].x,n[0].y);if(e>=1)return t.transcoordS2T(n[n.length-1].x,n[n.length-1].y);for(;n[r];){var i=n[r-1],a=n[r],u=a.x-i.x,c=a.y-i.y;o.push(Math.sqrt(u*u+c*c)),r++}var s=o.reduce((function(t,e){return t+e}),0);r=0;var f=0;do{f+=o[r++]}while(f/s<e);e=(e-(f-=o[--r])/s)*(s/o[r]);var l=n[r%n.length],h=n[(r+1)%n.length],p=l.x+Math.round((h.x-l.x)*e),y=l.y+Math.round((h.y-l.y)*e);return t.transcoordS2T(p,y)}pe("path should not be empty")}(this,t||0)}},{key:"anchors",get:function(){return[]}},{key:"strokeStyle",get:function(){return this.get("strokeStyle")},set:function(t){this.set("strokeStyle",t)}},{key:"fillStyle",get:function(){return this.getState("fillStyle")},set:function(t){this.setState("fillStyle",t)}},{key:"fontColor",get:function(){return this.get("fontColor")},set:function(t){this.set("fontColor",String(M(t)))}},{key:"rotation",get:function(){return this.getState("rotation")},set:function(t){this.setState("rotation",Number(M(t)))}},{key:"contains",value:function(t,e){return!1}},{key:"mutable",get:function(){return pn.mutable}},{key:"resizable",get:function(){return pn.resizable&&!this.stuck}},{key:"adjustResize",value:function(t,e,n){if(n){var r=this.bounds,o=r.height/r.width,i=t.width-r.width,a=t.height-r.height;i*o>a?a=i*o:i=a/o;var u=t.left-r.left,c=t.top-r.top;return 0!=u&&0!=c?(c=-a,u=-i):0!=u?u=-i:0!=c&&(c=-a),{left:r.left+u,top:r.top+c,width:r.width+i,height:r.height+a}}return t}},{key:"rotatable",get:function(){return pn.rotatable&&!this.stuck}},{key:"adjustRotation",value:function(t,e){if(e||this.app.rotateStepForced){var n=this.app.rotateStep;return Math.floor((t+n/2)/n)*n}return t}},{key:"capturable",get:function(){return!1!==this.get("capturable")&&(this.app.isEditMode||!this.hidden)}},{key:"stuck",get:function(){return!!(this.parent&&this.parent.layout.isStuck(this)||this.get("locked"))}},{key:"findFirst",value: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];if(t.apply(void 0,[this].concat(n)))return this}},{key:"findAll",value: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];return"string"==typeof t?g(t,this,n[0]||this):"function"==typeof t&&t.apply(void 0,[this].concat(n))?[this]:void 0}},{key:"capture",value:function(t,e){if(!this.capturable)return!1;var n=this.transcoordP2S(t,e);return this.contains(n.x,n.y)?this:void 0}},{key:"prepare",value:function(t,e){t(this)}},{key:"prepareIf",value:function(t){var e=this;t&&this.prepare&&this.prepare((function(t){e.invalidate()}),(function(t){pe(t)}))}},{key:"tag",get:function(){return this.get("id")?"#".concat(this.get("id")):""}},{key:"hidden",get:function(){return this.getState("hidden")||this.getState("ndns")&&void 0===this.data||this.isTemplate()},set:function(t){this.setState("hidden",t)}},{key:"draw",value:function(t){t.save(),this.__proto__.hasOwnProperty("_pre_draw")?this._pre_draw(t):this.prerender(t),this.__proto__.hasOwnProperty("_draw")?this._draw(t):this.render(t),this.__proto__.hasOwnProperty("_post_draw")?this._post_draw(t):this.postrender(t),t.restore()}},{key:"delta",value:function(t,e){if(void 0===e)return t?this._delta[t]:this._delta;this._delta[t]=e}},{key:"prerender",value:function(t){var e=this.rotatePoint,n=this.model,r=n.scale,o=n.rotation,i=n.shadow,a=n.alpha,u=(r&&r.x||1)*this._delta.sx,c=(r&&r.y||1)*this._delta.sy,s=(o||0)+this._delta.theta,f=this._delta,l=f.tx,h=void 0===l?0:l,p=f.ty,y=void 0===p?0:p,d=(a||1)-this._delta.fade;(h||y)&&t.translate(h,y),(1!=u||1!=c||s)&&(t.translate(e.x,e.y),1==u&&1==c||t.scale(u,c),s&&t.rotate(s),t.translate(-e.x,-e.y)),d&&(t.globalAlpha=d),i&&ue(t,i,this),this.app.isEditMode&&this.hidden&&(t.globalAlpha*=.5)}},{key:"render",value:function(t){}},{key:"postrender",value:function(t){this.drawText(t)}},{key:"drawText",value:function(t){!this.textHidden&&this.text&&this.hasTextProperty&&Ee(t,this.textBounds,this.textLines(t),this.model)}},{key:"drawStroke",value:function(t){_e(t,this.model)}},{key:"drawFill",value:function(t){this.fillStyle&&"transparent"!=this.fillStyle&&(xe(t,this.bounds,this.center,this.model,this),function(t){t.shadowColor="transparent"}(t))}},{key:"animate",value:function(t){return this._animate&&this._animate.stop(),this._animate=be(t),this._animate}},{key:"move",value:function(t){var e=t.x,n=t.y,r=this.path,o=e,i=n;this.path=r.map((function(t){return{x:t.x+o,y:t.y+i}}))}},{key:"symmetryX",value:function(t){"number"!=typeof t&&(t=this.center.x);var e=this.model.rotation,n=this.fillStyle;if(this.set("rotation",2*Math.PI-e),n&&"gradient"===n.type&&"linear"===n.gradientType){var r=b.a(n);r.rotation=(Math.PI-parseFloat(n.rotation||0))%(2*Math.PI),this.set("fillStyle",r)}this.path=this.path.map((function(e){return{x:2*t-e.x,y:e.y}}))}},{key:"symmetryY",value:function(t){this.symmetryX(),this.set("rotation",(Math.PI+this.model.rotation)%(2*Math.PI)),t&&this.move({x:0,y:2*(t-this.center.y)})}},{key:"animation",get:function(){if(this.app.isViewMode&&!this.isTemplate()){if(!this._animation){var t=this.model.animation;t&&t.oncreate&&(this._animation=(e=this,n=t.oncreate,(r=Qt[n.type])?new r(e,n):null))}var e,n,r;return this._animation}}},{key:"effect",value:function(t,e){return function(t,e,n){var r=ce[n.type];r&&r(t,e,n)}(this,t,e)}},{key:"started",set:function(t){this.animation&&(this.animation.started=t)}},{key:"invalidate",value:function(){this.parent&&this.parent.invalidate()}},{key:"font",get:function(){return Oe(this.model)}},{key:"lineHeight",get:function(){var t=this.get("lineHeight");return t||1.2*this.fontSize}},{key:"defaultTextSubstitutor",value:function(){var t=this.getState("text");return null==t?"":String(t)}},{key:"textSubstitutor",get:function(){return this._text_substitutor||(this._text_substitutor=Te(this.getState("text"),this)||this.defaultTextSubstitutor),this._text_substitutor}},{key:"text",get:function(){var t=this.get("textFormat");return t?function(t,e){if(!t||isNaN(+e))return e;var n,r,o,i,a,u,c,s,f,l=t.length,h=t.search(/[0-9\-\+#]/),p=h>0?t.substring(0,h):"",y=t.split("").reverse().join(""),d=y.search(/[0-9\-\+#]/),v=l-d,g=t.substring(v,v+1),m=v+("."===g||","===g?1:0),b=d>0?t.substring(m,l):"";if(n=(e="-"===(t=t.substring(h,m)).charAt(0)?-e:+e)<0?e=-e:0,o=(r=t.match(/[^\d\-\+#]/g))&&r[1]&&r[0]||",",t=t.split("."),e=+(e=e.toFixed(t[1]&&t[1].length))+"",a=t[1]&&t[1].lastIndexOf("0"),(!(c=e.split("."))[1]||c[1]&&c[1].length<=a)&&(e=(+e).toFixed(a+1)),s=t[0].split(o),t[0]=s.join(""),(i=t[0]&&t[0].indexOf("0"))>-1)for(;c[0].length<t[0].length-i;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((e=e.split("."))[0]=c[0],u=s[1]&&s[s.length-1].length){for(y="",v=(f=e[0]).length%u,l=f.length,m=0;m<l;m++)y+=f.charAt(m),!((m-v+1)%u)&&m<l-u&&(y+=o);e[0]=y}return e[1]=t[1]&&e[1]?"."+e[1]:"","0"!==(r=e.join(""))&&""!==r||(n=!1),p+("+"==t[0].substring(0,1)?n?"-":"+":n?"-":"")+r+b}(t,this.textSubstitutor()):this.textSubstitutor()},set:function(t){delete this._text_substitutor;var e=M(t);this.setState("text",null==e?"":String(e))}},{key:"textLines",value:function(t){return Se(t||this.getContext(),this.textBounds.width,this.font,this.text,this.get("textWrap"))}},{key:"textBounds",get:function(){var t=this.model,e=t.paddingTop,n=void 0===e?0:e,r=t.paddingLeft,o=void 0===r?0:r,i=t.paddingRight,a=void 0===i?0:i,u=t.paddingBottom,c=void 0===u?0:u,s=this.bounds,f=s.left,l=s.top,h=s.width,p=s.height;return{left:f+o,top:l+n,width:Math.max(h-o-a,0),height:Math.max(p-n-c,0)}}},{key:"rotatePoint",get:function(){return this.center}},{key:"trim",value:function(){delete this._model[""],"chartjs"!==this._model.type&&delete this._model.chart}},{key:"value",get:function(){var t=this.nature["value-property"]||"text";return"value"==t?this.getState("value"):this[t]},set:function(t){var e=this.nature["value-property"]||"text";"value"==e?this.setState("value",t):this[e]=t}},{key:"data",get:function(){return this.getState("data")},set:function(t){this.setState("data",t),this.touch()}},{key:"mappings",get:function(){return!this._mappings&&this.parent&&this.buildMappings(),this._mappings}},{key:"serialize",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return JSON.stringify.apply(JSON,[this.hierarchy].concat(e))}},{key:"controls",get:function(){}}])&&ln(e.prototype,n),r&&ln(e,r),t}();function bn(t){return(bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function wn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xn(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 _n(t,e,n){return(_n="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=On(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function kn(t,e){return(kn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function An(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=On(t);if(e){var o=On(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Sn(this,n)}}function Sn(t,e){return!e||"object"!==bn(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function On(t){return(On=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.union=function(t){var e,n,r,o;return t.forEach((function(t){void 0===e?(e=t.left,n=t.top,r=t.left+t.width,o=t.top+t.height):(e=Math.min(t.left,e),n=Math.min(t.top,n),r=Math.max(t.left+t.width,r),o=Math.max(t.top+t.height,o))})),{left:e,top:n,width:r-e,height:o-n}},mn.transcoordR=Pe,mn.transcoordRR=je,mn.createCanvas=se,mn.memoize=ve,mn.mixin=ot,mn.drawText=Ee,mn.font=Oe,mn.textLines=Se,mn.drawStroke=_e,mn.drawFill=xe,mn.reposition=en,mn.RetentionManager=sn,mn.template=h.a,mn.buildSubstitutor=Te,Object.assign(mn.prototype,{drawEffect:function(t){var e=this;this._model.effects&&this._model.effects.forEach((function(n){e.effect(t,n)}))},prepareFill:function(t,e){var n=this.fillStyle;if(n&&"pattern"==n.type&&n.image){if("string"!=typeof n.image)return this._pattern_image_origin=this._pattern_image=n.image,void t(this);this._pattern_image=null,this._pattern_image_origin=new Image;var r=this;this._pattern_image_origin.onload=function(){if(!n.fitPattern&&!n.width&&!n.height)return r._pattern_image=r._pattern_image_origin,void t(this);var e=n.width||this.width,o=n.height||this.height;n.fitPattern&&(e=r.bounds.width,o=r.bounds.height);var i=se(e,o);i.getContext("2d").drawImage(this,0,0,this.width,this.height,0,0,e,o),r._pattern_image=i,t(this)},this._pattern_image_origin.onerror=function(t){e(t)};try{"data"!==String(n.image).substring(0,4)?this._pattern_image_origin.crossOrigin="use-credentials":this._pattern_image_origin.crossOrigin=null,this._pattern_image_origin.src=this.app.url(n.image)}catch(t){e(t)}}else t(this)},prepareFillIf:function(t){var e=this;t&&this.prepareFill((function(t){e.invalidate()}),(function(t){pe(t)}))},onchangeFill:function(t,e){var n=this.fillStyle;n&&"pattern"!==n.type?this._pattern_image&&(this._pattern_image=null,this._pattern_image_origin=null):(null==n?void 0:n.image)&&this.prepareFillIf(n.image)},drawImage:function(t,e,n,r,o,i){var a=this;e.complete?t.drawImage(e,n,r,o,i):e.addEventListener("load",(function(){a.invalidate()}))},mutateBounds:function(t,e){var n=this.bounds,r=this.rotatePoint,o=this.get("rotation"),i=this.get("scale");if(t){var a=t.call(e,n);a&&(n=a)}var u=n,c=u.left,s=u.top,f=[{x:c,y:s},{x:c+u.width,y:s+u.height}],l=(f=f.map((function(t){return je(t.x,t.y,r,o,i)})))[0],h=f[1];r={x:(l.x+h.x)/2,y:(l.y+h.y)/2},l=(f=f.map((function(t){return Pe(t.x,t.y,r,o,i)})))[0],h=f[1],this.bounds={left:l.x,top:l.y,width:h.x-l.x,height:h.y-l.y}},mutatePath:function(t,e,n){var r=this,o=this.path,i=this.rotatePoint;this.get("rotation"),this.get("scale"),t&&(o=t.call(n,o));var a=o.map((function(t){return r.transcoordS2P(t.x,t.y)}));e&&(o=e.call(n,a))&&(a=o);var u,c,s,f,l={x:0,y:0};u=c=(o=a.map((function(t){return r.transcoordP2S(t.x,t.y,l)})))[0].x,s=f=o[0].y;for(var h=1;h<o.length;h++){var p=o[h];p.x<u?u=p.x:p.x>c&&(c=p.x),p.y<s?s=p.y:p.y>f&&(f=p.y)}i={x:(u+c)/2,y:(s+f)/2},i=this.transcoordS2P(i.x,i.y,l),this.path=a.map((function(t){return r.transcoordP2S(t.x,t.y,i)}))},access:function(t){if(t){var e=String(t),n=(e.match(/#{(\S*)}/)||[]).map((function(t){return Re(t)}))[0];if(n)return n.accessor(this.getState(n.target));var r=(e.match(/\${[^}]*}/)||[]).map((function(t){return Re(t)}))[0];if(r){var o=this.root.findById(r.target);return r.accessor(this.getState(o))}return t}},substitute:function(t,e){var n=this;if(t){var r=String(t),o=e||M,i=(r.match(/#{(\S*)}/gi)||[]).map((function(t){return Re(t)})),a=(r.match(/\${[^}]*}/gi)||[]).map((function(t){return Re(t)}));if(0==i.length&&0==a.length)return r;var u=r;return i.forEach((function(t){var e=o(t.accessor(n.getState(t.target)));u=u.replace(t.match,void 0===e?"":e)})),a.forEach((function(t){var e=n.root.findById(t.target),r=o(t.accessor(e&&e.data));u=u.replace(t.match,void 0===r?"":r)})),u}},onchangeMappings:function(t,e){this.disposeMappings(),Je.call(this)},onchangeData:function(t,e){Je.call(this,[!0])},buildMappings:function(){var t=this;if(this._model.mappings)return!this._model.mappings instanceof Array?(pe("Mappings model is invalid (should be a Array) ..",this._model.mappings),void(this._mappings=[])):void(this._mappings=(this._model.mappings||[]).map((function(e){return new Qe(e,t)})));this._mappings=[]},executeMappings:Je,disposeMappings:function(){this._mappings&&this._mappings.forEach((function(t){return t.dispose()})),delete this._mappings},ondropfile:function(t,e){for(var n=0;n<t.length;n++)if(t[n].type.startsWith("image/"))return void this.set("fillStyle",{type:"pattern",image:e[n],fitPattern:!0})},transcoordS2P:function(t,e,n){if(!this.parent)return{x:t,y:e};var r=this.model,o=r.rotation,i=void 0===o?0:o,a=r.scale,u=void 0===a?{x:1,y:1}:a;if(this.isLayer()){var c=this.model.translate,s=je(t,e,void 0,i,u);return c&&(s.x+=c.x,s.y+=c.y),s}var f=je(t,e,n=n||this.rotatePoint,i,u);return{x:f.x-(n.x-n.x/u.x),y:f.y-(n.y-n.y/u.y)}},transcoordP2S:function(t,e,n){if(!this.parent)return{x:t,y:e};var r=this.model,o=r.rotation,i=void 0===o?0:o,a=r.scale,u=void 0===a?{x:1,y:1}:a;if(this.isLayer()){var c=this.model.translate,s=Pe(t,e,c,i,u);return c&&(s.x-=c.x/(u?u.x:1),s.y-=c.y/(u?u.y:1)),s}var f=Pe(t,e,n=n||this.rotatePoint,i,u);return{x:f.x+(n.x-n.x/u.x),y:f.y+(n.y-n.y/u.y)}},transcoordS2T:function(t,e,n){n=n||this.rootModel;for(var r=[],o=this.parent;o&&o!==n;o=o.parent)r.push(o);var i=this.transcoordS2P(t,e);return r.forEach((function(t){var e=t.model.scale,n=t.bounds;if(e){var r=t.rotatePoint;i.x+=(r.x-n.left)*e.x,i.y+=(r.y-n.top)*e.y}else i.x+=n.left,i.y+=n.top;i=t.transcoordS2P(i.x,i.y)})),i},transcoordT2S:function(t,e,n){n=n||this.rootModel;for(var r=[],o=this.parent;o&&o!==n;o=o.parent)r.splice(0,0,o);var i={x:t,y:e};return r.forEach((function(t){var e=t.model.scale;i=t.transcoordP2S(i.x,i.y);var n=t.bounds;if(e){var r=t.rotatePoint;i.x-=(r.x-n.left)/e.x,i.y-=(r.y-n.top)/e.y}else i.x-=n.left,i.y-=n.top})),this.transcoordP2S(i.x,i.y)},transcoordS2TR:function(t,e,n){n=n||this.rootModel;var r=this.transcoordS2T(t,e,n);return je(r.x,r.y,void 0,n.get("rotation")||0)},transcoordS2O:function(t,e,n){var r=this.rootModel,o=this.transcoordS2T(t,e,r);return n.transcoordT2S(o.x,o.y,r)},transcoordC2S:function(t,e,n){if(!n)for(n=this;n&&!n.isLayer();)n=n.parent;var r=n.model,o=r.translate,i=r.scale,a=Pe(t,e,o,r.rotation,i);return o&&(a.x-=o.x/(i?i.x:1),a.y-=o.y/(i?i.y:1)),n===this?a:this.transcoordT2S(a.x,a.y,n)},transcoordS2C:function(t,e,n){if(!n)for(n=this;n&&!n.isLayer();)n=n.parent;if(n!==this)var r=this.transcoordS2T(t,e,n);else r={x:t,y:e};var o=n.model,i=o.translate,a=o.rotation,u=o.scale;return r=je(r.x,r.y,void 0,a,u),i&&(r.x+=i.x,r.y+=i.y),r},_pre_draw:mn.prototype.prerender,_draw:mn.prototype.render,_post_draw:mn.prototype.postrender}),["rotatePoint","font","lineHeight","retention"].forEach((function(t){return mn.memoize(mn.prototype,t,!1)})),["bounds","center","textBounds"].forEach((function(t){return mn.memoize(mn.prototype,t,!0)})),mn.mixin(mn.prototype,rt.withEvent);var En=function(t){!function(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&&kn(t,e)}(i,t);var e,n,r,o=An(i);function i(){return wn(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"rotationX",get:function(){return this.getState("rotationX")},set:function(t){this.setState("rotationX",t)}},{key:"rotationY",get:function(){return this.getState("rotationY")},set:function(t){this.setState("rotationY",t)}},{key:"rotationZ",get:function(){return this.getState("rotation")},set:function(t){this.setState("rotation",t)}},{key:"zPos",get:function(){return this.getState("zPos")},set:function(t){this.setState("zPos",t)}},{key:"depth",get:function(){return this.getState("depth")},set:function(t){this.setState("depth",t)}},{key:"postrender",value:function(t){this.drawFill(t),this.drawStroke(t),_n(On(i.prototype),"postrender",this).call(this,t)}}])&&xn(e.prototype,n),r&&xn(e,r),i}(mn);function Pn(t){return(Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function jn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mn(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 Rn(t,e){return(Rn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Tn(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=Cn(t);if(e){var o=Cn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return In(this,n)}}function In(t,e){return!e||"object"!==Pn(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Cn(t){return(Cn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var zn=function(t){var e=function(t){!function(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&&Rn(t,e)}(i,t);var e,n,r,o=Tn(i);function i(){return jn(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"contains",value:function(t,e){var n=this.model,r=n.left,o=n.top,i=n.width,a=n.height,u=n.lineWidth,c=(void 0===u?0:u)/2;return t<Math.max(r+i,r)+c&&t>Math.min(r+i,r)-c&&e<Math.max(o+a,o)+c&&e>Math.min(o+a,o)-c}},{key:"path",get:function(){var t=this.model,e=t.left,n=void 0===e?0:e,r=t.top,o=void 0===r?0:r,i=t.width,a=void 0===i?0:i,u=t.height,c=void 0===u?0:u;return[{x:n,y:o},{x:n+a,y:o},{x:n+a,y:o+c},{x:n,y:o+c}]},set:function(t){var e=t[0],n=t[2],r=this.model;r.width,r.height,this.set({left:e.x,top:e.y,width:n.x-e.x,height:n.y-e.y})}}])&&Mn(e.prototype,n),r&&Mn(e,r),i}(t);return ve(e.prototype,"path",!1),e};function Bn(t){return(Bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ln(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fn(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 Nn(t,e,n){return(Nn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Gn(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Dn(t,e){return(Dn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Un(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=Gn(t);if(e){var o=Gn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Yn(this,n)}}function Yn(t,e){return!e||"object"!==Bn(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Gn(t){return(Gn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Wn={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"textarea",label:"front-side-template",name:"frontSideTemplate",property:{language:"html"}},{type:"textarea",label:"back-side-template",name:"backSideTemplate",property:{language:"html"}},{type:"textarea",label:"style",name:"style",property:{language:"css"}}],help:"scene/component/info-window"};function Hn(t,e){var n=t.split(/\s+/),r=n.indexOf(e);return-1!=r?n.splice(r,1):n.splice(-1,0,e),n.join(" ")}var Vn=function(t){!function(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&&Dn(t,e)}(i,t);var e,n,r,o=Un(i);function i(){return Ln(this,i),o.apply(this,arguments)}return e=i,r=[{key:"image",get:function(){return i._image||(i._image=new Image,i._image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAY1BMVEVHcEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADIAbxiAAAAIHRSTlMA+gPshCwwWFzYCeLRm7QRG6rLeDZI9JOJJDtjb1HAf1sAT80AAAQQSURBVHhe7MCBAAAAAMKw/KkzOMG2BAAAAKeu3lUohIEggO7jQi5qHqpgwML5/6+0F0y02z31FlvMMLKt86QMQ1ined2Evih1hFFjLfRWjgzDOGZ6JSiM00B9EuHALtQxJLiQBmqSBCeSUEuEGzs1BDjSaHxWOKK5Eyz/4SoMV/hp4+vtcPkdwZD/udwevNg7t1xXYRiKmkB7C+ENlPLq8fxHeX+RGjWQ1D45ldcIulBIvCvYJGBEadyTzxAcfY57NBjpLScOO/bzugcTHe7IMwiSLMcdHZhocMcMgTLjjgZM7F1bCJZ2v27ARGzYDwIk2Z+JYGJ/iiwQLMv+JAEThjkmRG64Q0Q+gIiIiIiIiIiIyFy0KRFt0bOJZAWSUigmkQaJaXhENiRnYBEpkZySRSRGcmIWEaQnYhHRSI5mESmQnIJFZIqQmGhiEYEbEnPjGlEGjYTogW/WUkOXENENSqZfEXmDiIiIiIiIiIiIiIiIiIiImq5ETIpRpBpjJCMeKy6Ri0ZS9MQjkmkkJs1YRDokp2MRyZGclkUkQnIiEQltaX3Lzb6yiGTpl2y/avqSAxGgelCOKI+Kc2isL0TUSsZ4EREREREREREREREREREREfnIQzXrNWSRTeNxnlOwIgueIr6AAyE+CpiqMEUK71IDO4E+LluEKYKnKcMUifEsTZgiJZ5lDVNkwJPcqzBFoPF/HplfxL/w6b4EPGv1h18Weya1TL8iIiIeiIiIiIiIiEjkPefxV+5YA9PPHylB+u5aqgZ39H+jKOxrqtu+pkzvr9YbzoZ6w2OFkzcrA3yE4WZlSSyFk54VoA/wR43+FaD+r9w32QdWvgvjp2ty2xq8qHPHmtyPFxfrK3hw1ejERlAlfR/Ame2OTow05d4rOLLSlHtDVhI0uRO01JeZ405op6zgNNXT+bIRfpIgn+AkU4pOxBscohojdCHu4RRzjC5EYwVHqRONDkSnEvK/CB3QSU32IRW3ZPnj9iEVoGCNTLVrh8ia1x+6wq8xvB5mz8pxu7oPwIn9lcR0AiuX1+1KX+BXqdvXzWsAC0NsGjzZsS/2Bd6yRA5RgIHkXNhSD3whASZ8rrB9mItuEAizac0fDlHxDMEwpQfD1tW4y3Hjfy5s9nOHH3uwWA+EqEJBWCjoTL/S5toBB/7hu6zer74NgqSP39zJU+qQX3ix763mHTqvIVRUVprCljlElRkEjBqNYevH8veBJ2xhiyhE8YctmhDFH7ZoQhR/2KIJUfxhiyRE8YctmhDFH7ZoQhR/2OIJUfxhC9Ppf/t1jgJACERRsHGyYRZB0Ujvf0xD8w6kP7y6RZmgf/oTFTtbbzJVxZWo2Nlqw6TVy5GowNl6ssm7v50obamfSxQAAAAAAAsKLM15fb3vpQAAAABJRU5ErkJggg=="),i._image}},{key:"toggle",value:function(t,e,n,r){if(e){var o=t.root.findById(e);o?o._findInfoWindowByComponent(t)?i.hide(t,e):i.show(t,e,n,r):console.warn("InfoWindow Not Found.",e)}else console.warn("InfoWindow not defined.")}},{key:"hide",value:function(t,e){if(e){var n=t.root.findById(e);n?n._removeInfoWindow(t):console.warn("InfoWindow Not Found.",e)}}},{key:"show",value:function(t,e,n,r){if(e){var o=t.root.findById(e);if(o){if(!o._findInfoWindowByComponent(t)){var a=o.model,u=a.frontSideTemplate,c=void 0===u?"":u,s=a.backSideTemplate,f=[c,void 0===s?"":s].filter((function(t){return String(t).trim()}));if(0!=(f=f.map((function(t){return mn.template(function(t,e,n){return(e||n?['<div class="info-window-btns">',e?'<button class="closable">X</button>':"",n?'<button class="flipable">⇌</button>':"","</div>"]:[]).concat(['<div class="info-window-content">',t,"</div>"]).join("")}(t,!n,2==f.length))}))).length){var l='\n.flip {\n backface-visibility: hidden;\n -moz-backface-visibility: hidden;\n -ms-backface-visibility: hidden;\n -o-backface-visibility: hidden;\n -webkit-backface-visibility: hidden;\n border-radius: 7px;\n height: auto;\n font: normal 14px helvetica, arial, san serif;\n position: absolute;\n opacity:.9;\n transform-origin: 50% 50% 0px;\n -moz-transform-origin: 50% 50% 0px;\n -ms-transform-origin: 50% 50% 0px;\n -o-transform-origin: 50% 50% 0px;\n -webkit-transform-origin: 50% 50% 0px;\n transition: all 2s;\n -moz-transition: all 2s;\n -ms-transition: all 2s;\n -o-transition: all 2s;\n -webkit-transition: all 2s;\n min-width: 100px;min-height:50px;\n background-color:#3e424e;\n box-shadow: 2px 3px 2px 0px rgba(0,0,0,0.15);\n}\n\n#side-1 {\n transform: rotateY( 0deg );\n -moz-transform: rotateY( 0deg );\n -ms-transform: rotateY( 0deg );\n -o-transform: rotateY( 0deg );\n -webkit-transform: rotateY( 0deg );\n}\n.flip:after{\n content:"";\n display:block;\n position: absolute;\n opacity:.9;\n width: 0;\n height: 0;\n}\n.flip.arrow-top:after{\n left:45%;\n top:-17px;\n border-left:10px solid transparent;\n border-bottom:18px solid #323b44;\n border-right:10px solid transparent;\n}\n.flip.arrow-right:after{\n left:100%;\n top:48%;\n border-top:10px solid transparent;\n border-left:18px solid #323b44;\n border-bottom:10px solid transparent;\n}\n.flip.arrow-bottom:after{\n left:45%;\n top:100%;\n border-left:10px solid transparent;\n border-top:18px solid #323b44;\n border-right:10px solid transparent;\n}\n.flip.arrow-left:after{\n right:100%;\n top:48%;\n border-top:10px solid transparent;\n border-right:18px solid #323b44;\n border-bottom:10px solid transparent;\n}\n\n#side-2 {\n transform: rotateY( 180deg );\n -moz-transform: rotateY( 180deg );\n -ms-transform: rotateY( 180deg );\n -o-transform: rotateY( 180deg );\n -webkit-transform: rotateY( 180deg );\n}\n\n.flip-side-1 {\n transform: rotateY( 0deg ) !important;\n -moz-transform: rotateY( 0deg ) !important;\n -ms-transform: rotateY( 0deg ) !important;\n -o-transform: rotateY( 0deg ) !important;\n -webkit-transform: rotateY( 0deg ) !important;\n}\n\n.flip-side-2 {\n transform: rotateY( 180deg ) !important;\n -moz-transform: rotateY( 180deg ) !important;\n -ms-transform: rotateY( 180deg ) !important;\n -o-transform: rotateY( 180deg ) !important;\n -webkit-transform: rotateY( 180deg ) !important;\n}\n\n.info-window-btns{\n position:absolute;\n top:-18px;\n right:5px;\n overflow:hidden;\n}\n.info-window-content{\n padding:10px;\n color:#efefef;\n font-size:13px;\n line-height:1.4;\n}\n.info-window-btns button{\n width:40px;height:40px;\n float:right;\n border:0;\n border-radius:50%;\n background-color:#2a7da1;\n margin-right:3px;\n text-align:center;\n cursor:pointer;\n font-size:35px;\n color:#fff;\n line-height:0;\n}\n.info-window-btns button:hover{\n background-color:#60bb23;\n}\n'+o.get("style"),h=t.bounds,p=h.left,y=h.top,d=r?t.rootModel.transcoordC2S(r.x,r.y):t.transcoordS2T(p,y);p=d.x,y=d.y;var v=document.createElement("span");v.style.position="absolute";var g=document.createElement("style");if(g.type="text/css",g.styleSheet?g.styleSheet.cssText=l:g.appendChild(document.createTextNode(l)),v.appendChild(g),f[0]){var m=document.createElement("div");m.id="side-1",m.className="flip",m.style.display="inline-block",m.innerHTML=f[0](t)}if(f[1]){var b=document.createElement("div");b.id="side-2",b.className="flip",b.style.display="inline-block",b.innerHTML=f[1](t)}re.forEach((function(t){v.addEventListener(t,(function(t){t.stopPropagation()}))})),oe.forEach((function(t){v.addEventListener(t,(function(t){t.stopPropagation()}))}));var w=t.root.model_layer.overlay;if(m&&v.appendChild(m),b&&v.appendChild(b),w.appendChild(v),o._addInfoWindow(t,v,g),m){var x=m.querySelector(".info-window-btns > .flipable");x&&x.addEventListener("click",(function(t){t.preventDefault(),b.className=Hn(b.className,"flip-side-1"),m.className=Hn(m.className,"flip-side-2")}),!1);var _=m.querySelector(".info-window-btns > .closable");_&&_.addEventListener("click",(function(n){n.preventDefault(),i.hide(t,e)}),!1)}if(b){var k=b.querySelector(".info-window-btns > .flipable");k&&k.addEventListener("click",(function(t){t.preventDefault(),b.className=Hn(b.className,"flip-side-1"),m.className=Hn(m.className,"flip-side-2")}),!1);var A=b.querySelector(".info-window-btns > .closable");A&&A.addEventListener("click",(function(n){n.preventDefault(),i.hide(t,e)}),!1)}var S=m.offsetWidth,O=m.offsetHeight,E=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,t.rootModel.target.getBoundingClientRect()),P=[];m&&P.push(m),b&&P.push(b);var j={x:p,y:y},M=t.transcoordS2C(j.x,j.y);if(M.x+S/2+E.left<E.right&&M.x-S/2>E.left){if(O+20<M.y)return v.style.marginLeft=j.x-S/2+"px",v.style.marginTop=j.y-O-20+"px",void P.forEach((function(t){return t.className+=" arrow-bottom"}));if(M=t.transcoordS2C(j.x,j.y+O+20),E.bottom>M.y+E.top)return v.style.marginLeft=j.x-S/2+"px",v.style.marginTop=j.y+20+"px",void P.forEach((function(t){return t.className+=" arrow-top"}))}if((M=t.transcoordS2C(j.x,j.y)).x-(S+20)>E.left)return v.style.marginLeft=j.x-S-20+"px",v.style.marginTop=j.y-O/2+"px",void P.forEach((function(t){return t.className+=" arrow-right"}));v.style.marginLeft=j.x+20+"px",v.style.marginTop=j.y-O/2+"px",P.forEach((function(t){return t.className+=" arrow-left"}))}}}else console.warn("InfoWindow Not Found.",e)}else console.warn("InfoWindow not defined.")}}],(n=[{key:"dispose",value:function(){var t=this;this.infoWindows.map((function(t){return t.component})).forEach((function(e){return t._removeInfoWindow(e)})),Nn(Gn(i.prototype),"dispose",this).call(this)}},{key:"infoWindows",get:function(){return this._windows||(this._windows=[]),this._windows}},{key:"_findInfoWindowByComponent",value:function(t){return this.infoWindows.find((function(e){return e.component===t}))}},{key:"_addInfoWindow",value:function(t,e,n){this._findInfoWindowByComponent(t)||this._windows.push({component:t,window:e,styleElement:n})}},{key:"_removeInfoWindow",value:function(t){var e=this._findInfoWindowByComponent(t);if(e){var n=e.window;n&&n.parentNode.removeChild(n);var r=this.infoWindows.lastIndexOf(e);this.infoWindows.splice(r,1)}}},{key:"render",value:function(t){var e=this.bounds,n=e.left,r=e.top,o=e.width,a=e.height;t.beginPath(),this.drawImage(t,i.image,n,r,o,a)}},{key:"hasTextProperty",get:function(){return!1}},{key:"nature",get:function(){return Wn}}])&&Fn(e.prototype,n),r&&Fn(e,r),i}(zn(En));function Xn(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 qn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}mn.register("info-window",Vn);var Kn={};var Qn={list:function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Xn(Object(n),!0).forEach((function(e){qn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},Kn)},register:function(t,e){Kn[t]=e},unregister:function(t){delete Kn[t]},get:function(t){if(t){var e=Kn[t];return e||pe("Layout Not Found - ",t),e}}},Jn={reflow:function(t,e){this.drawables(t).filter((function(t){return t.isHTMLElement()})).forEach((function(t){return t.reposition()}))},capturables:function(t){return t.components},drawables:function(t){return t.app&&!t.app.isViewMode?t.components:t.components.filter((function(t){return!t.hidden}))},isStuck:function(t){return!1},ABSOLUTE:!0};Qn.register("html-absolute",Jn);var Zn=Jn;function $n(t){t.hasOwnProperty("_backupStrokeStyle")||(t._backupStrokeStyle=t.model.strokeStyle,t.set("strokeStyle","#f26522"),t.hasOwnProperty("_backupLineWidth")||(t._backupLineWidth=t.model.lineWidth,t.set("lineWidth",t.model.lineWidth+5)))}function tr(t){t.hasOwnProperty("_backupStrokeStyle")&&(t.set("strokeStyle",t._backupStrokeStyle),delete t._backupStrokeStyle,t.hasOwnProperty("_backupLineWidth")&&(t.set("lineWidth",t._backupLineWidth),delete t._backupLineWidth))}function er(t){return function(t){if(Array.isArray(t))return nr(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return nr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nr(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nr(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}var rr='\n<div class="popup-content">\n</div>\n<button class="closable-1945">X</button>\n',or="\nbutton.closable-1945 {\n width: 20px;\n height: 20px;\n right: 0px;\n top: 0px;\n padding: 0;\n margin: 0;\n border: 0px;\n text-align: center;\n cursor: pointer;\n font-size: 12px;\n color: black;\n position: absolute;\n background-color: transparent;\n}\n\nbutton.closable-1945:hover {\n background-color:#60bb23;\n}\n",ir=new WeakMap;function ar(t,e,n){var r=t.root;if(r!==t){ur(t);var o=ir.get(r)||[];o=[].concat(er(o),[[t,{div:e,scene:n}]]),ir.set(r,o)}}function ur(t){var e=t.root,n=ir.get(e);if(n)if(e!==t){var r=n.findIndex((function(e){return e[0]===t}));if(-1!==r){var o=n[r][1],i=o.div.parentNode;i&&i.removeChild(o.div);var a=o.scene;a.target=null,a.release(),n.splice(r,1)}}else{for(var u in n)ur(u[0]);ir.delete(e)}}function cr(t){ur(t)}function sr(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.data,o=n.location,i=void 0===o?"center":o,a=n.modal,u=void 0!==a&&a,c=n.closable,s=void 0===c||c,f=t.app.refProvider;f&&f.get(e,!0).then((function(e){var n,o=document.createElement("div"),a=o.style;if(u){var c=t.rootModel.bounds,f=c.width,l=c.height;a.position="fixed",a.zIndex=1,a.left=0,a.top=0,a.width=f+"px",a.height=l+"px",a.overflow="auto",a.backgroundColor="rgba(0,0,0,0.3)"}else a.position="absolute",a.display="inline-block";o.innerHTML=!u&&s?rr:'\n<div class="popup-content">\n</div>\n';var h=o.querySelector(".popup-content"),p=e.root.model;f=p.width,l=p.height;h.style.width=f+"px",h.style.height=l+"px";var y=document.createElement("style");y.type="text/css",y.styleSheet?y.styleSheet.cssText=or:y.appendChild(document.createTextNode(or)),o.appendChild(y);var d=o.querySelector(".popup-content");re.forEach((function(t){d.addEventListener(t,(function(t){t.stopPropagation()}))})),oe.forEach((function(t){d.addEventListener(t,(function(t){t.stopPropagation()}))})),o.addEventListener("click",(function(e){s&&cr(t)})),re.forEach((function(t){o.addEventListener(t,(function(t){t.stopPropagation()}))})),oe.forEach((function(t){o.addEventListener(t,(function(t){t.stopPropagation()}))})),t.root.model_layer.overlay.appendChild(o),ar(t,o,e),null===(n=o.querySelector(".closable-1945"))||void 0===n||n.addEventListener("click",(function(e){e.preventDefault(),cr(t)}),!1),o.addEventListener("close-scene",(function(e){e.preventDefault(),cr(t),t.data=e.detail}),!1),e.target=h,e.data=r||t.data,e.fit("both");var v=fr(t.rootModel,e.root,t.center,i);u?(h.style.left=v.x+"px",h.style.top=v.y+"px",h.style.width=f+"px",h.style.height=l+"px"):(o.style.left=v.x+"px",o.style.top=v.y+"px",o.style.width=f+"px",o.style.height=l+"px")}),(function(t){console.error("cannot fetch board: "+e,t)}))}function fr(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"center",o=t.bounds,i=e.bounds,a=Math.max(o.width/4-i.width/2,20),u=Math.min(3*o.width/4+i.width/2,o.width-20)-i.width,c=Math.max(o.height/4-i.height/2,20),s=Math.min(3*o.height/4+i.height/2,o.height-20)-i.height;switch(r){case"auto":return{x:n.x<o.width/2?u:a,y:n.y<o.height/2?s:c};case"left-top":return{x:a,y:c};case"right-top":return{x:u,y:c};case"left-bottom":return{x:a,y:s};case"right-bottom":return{x:u,y:s};case"center":default:return{x:(o.width-i.width)/2,y:(o.height-i.height)/2}}}var lr={reflow:function(t,e){},capturables:function(t){return t.components},drawables:function(t){return t.app.isViewMode?t.components.filter((function(t){return!t.hidden})):t.components},isStuck:function(t){return!1},ABSOLUTE:!0};Qn.register("absolute",lr);var hr=lr;function pr(t){var e=t.components.filter((function(t){return!t.hidden})),n=t.get("layoutConfig")||{},r=e[n&&n.activeIndex||0];return r&&[r]||[]}var yr={reflow:function(t){var e=t.bounds,n=t.get("layoutConfig")||{},r={left:0,top:0,width:e.width,height:e.height};t.forEach((function(t,e){var o=e!=n.activeIndex;t.bounds=r,t.set("rotation",0),t.element&&(t.element.style.display=o?"none":"block")}))},capturables:function(t){return pr(t)},drawables:function(t){return pr(t)},isStuck:function(t){return!0}};Qn.register("card",yr);var dr=yr;function vr(t){var e=t.get("layoutConfig");return e&&e.weight||1}var gr={reflow:function(t){var e=this.drawables(t),n=t.get("padding")||{},r=e.reduce((function(t,e){return t+vr(e)}),0),o=t.bounds,i=r>0?(o.width-((n.left||0)+(n.right||0)))/r:o.width,a=o.height-((n.top||0)+(n.bottom||0)),u=0;e.forEach((function(t){var e=vr(t),r=t.get("margin")||{};t.bounds={left:i*u+(n.left||0)+(r.left||0),top:0+(n.top||0)+(r.top||0),width:e*i-((r.left||0)+(r.right||0)),height:a-((r.top||0)+(r.bottom||0))},t.set("rotation",0),u+=e}))},capturables:function(t){return t.components},drawables:function(t){return t.app.isViewMode?t.components.filter((function(t){return!t.hidden})):t.components},isStuck:function(t){return!0}};Qn.register("linear-horizontal",gr);var mr=gr;function br(t){var e=t.get("layoutConfig");return e&&e.weight||1}var wr={reflow:function(t){var e=this.drawables(t),n=t.get("padding")||{},r=e.reduce((function(t,e){return t+br(e)}),0),o=t.bounds,i=r>0?(o.height-((n.top||0)+(n.bottom||0)))/r:o.height,a=o.width-((n.left||0)+(n.right||0)),u=0;e.forEach((function(t){var e=br(t),r=t.get("margin")||{};t.bounds={left:0+(n.left||0)+(r.left||0),top:i*u+(n.top||0)+(r.top||0),width:a-((r.left||0)+(r.right||0)),height:e*i-((r.top||0)+(r.bottom||0))},t.set("rotation",0),u+=e}))},capturables:function(t){return t.components},drawables:function(t){return t.app.isViewMode?t.components.filter((function(t){return!t.hidden})):t.components},isStuck:function(t){return!0}};Qn.register("linear-vertical",wr);var xr=wr,_r={reflow:function(t){var e=t.get("layoutConfig"),n=e&&e.columns||t.get("columns"),r=e&&e.rows||t.get("rows"),o=e&&e.widths||t.get("widths"),i=e&&e.heights||t.get("heights"),a=o?o.filter((function(t,e){return e<n})).reduce((function(t,e){return t+e}),0):n,u=i?i.filter((function(t,e){return e<r})).reduce((function(t,e){return t+e}),0):r,c=t.textBounds,s=t.get("paddingLeft")||0,f=t.get("paddingTop")||0,l=c.width/a,h=c.height/u,p=0,y=0;t.components.forEach((function(t,e){for(var r=o?o[e%n]:1,a=i?i[Math.floor(e/n)]:1,u=t.colspan||1,c=0;--u>0;)c+=o?o[(e+u)%n]:1;for(var d=t.rowspan||1,v=0;--d>0;)v+=i?i[Math.floor(e/n)+d]:1;t.bounds={left:s+p,top:f+y,width:l*(r+c),height:h*(a+v)},t.set("rotation",0),e%n==n-1?(p=0,y+=a*h):p+=r*l}))},capturables:function(t){return t.components.filter((function(t){return!t.merged}))},drawables:function(t){return t.components.filter((function(t){return!t.merged&&!t.hidden}))},isStuck:function(t){return!0},keyNavigate:function(t,e,n){var r=t.get("layoutConfig"),o=r&&r.columns||t.get("columns"),i=r&&r.rows||t.get("rows"),a=t.getRowColumn(e),u=a.row,c=a.column;switch(n.code){case"ArrowUp":if(u>0)return t.getAt((u-1)*o+c);break;case"ArrowDown":if(u<i-1)return t.getAt((u+1)*o+c);break;case"ArrowRight":if(c<o-1)return t.getAt(u*o+c+1);break;case"ArrowLeft":if(c>0)return t.getAt(u*o+c-1);break;default:return e}},joinType:!0};Qn.register("table",_r);var kr=_r;function Ar(t){return(Ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Sr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Or(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 Er(t,e,n){return(Er="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Rr(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Pr(t,e){return(Pr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function jr(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=Rr(t);if(e){var o=Rr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Mr(this,n)}}function Mr(t,e){return!e||"object"!==Ar(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Rr(t){return(Rr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Tr=new Image;Tr.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAclBMVEVHcEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC0BbqFAAAAJXRSTlMAgAP3VSI6/g9fBk5FavJsMrariSjzPnO1enRRL5SMhmOOWB9keFTE0wAAANxJREFUOMutk9kWgyAMRLFuiLjUtdp9yf//YglVsQXz1HniMPcEMgHGvpX2O0Ypi+EgCL+IAShC+wB7QfubRDT7AFcnUPoLMLiP4PyJbsb55i05AgnR5iaQDsICgtH0cotBWoAP1c7kC6kFxEseCfZfB6gEgbNeBrira2QmH1uVYCXlA3is8UmgUCPIyQJKEmu8QtQJN0e9DPXVpzG2G216c1CqRmcBOdxXk07sWUSPv07zo0amCNQycv+NzmR6cRcwmfbuI7p2nZ/z4be0P83Foz6vIkhfZXr82XgDlZsspIq4peUAAAAASUVORK5CYII=";var Ir=function(t){return function(t){!function(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&&Pr(t,e)}(i,t);var e,n,r,o=jr(i);function i(){return Sr(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"postrender",value:function(t){Er(Rr(i.prototype),"postrender",this).call(this,t),this.app.isEditMode&&this._focused&&this.showMoveHandle&&this._draw_move_handle(t)}},{key:"_draw_move_handle",value:function(t){var e=this.bounds,n=e.left,r=e.top,o=e.width;t.save(),t.beginPath(),t.rect(n+o,r,25,25),t.fillStyle="rgba(".concat(235,", ").concat(235,", ").concat(235,", 1)"),t.strokeStyle="#333",t.fill(),t.stroke(),t.drawImage(Tr,n+o+3.75,r+3.75,17.5,17.5),t.closePath(),t.restore()}},{key:"contains",value:function(t,e){var n=Er(Rr(i.prototype),"contains",this).call(this,t,e);if(this.app.isViewMode)return n;var r=this.bounds,o=r.left,a=r.top,u=r.width,c=(r.height,o+u);return this.showMoveHandle&&(n=n||t<Math.max(c+25,c)&&t>Math.min(c+25,c)&&e<Math.max(a+25,a)&&e>Math.min(a+25,a)),this._focused=!!n,this.invalidate(),n}}])&&Or(e.prototype,n),r&&Or(e,r),i}(t)};function Cr(t){return(Cr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zr(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 Br(t,e,n){return(Br="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Dr(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Lr(t,e){return(Lr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Fr(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=Dr(t);if(e){var o=Dr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Nr(this,n)}}function Nr(t,e){return!e||"object"!==Cr(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Dr(t){return(Dr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ur=[],Yr=function(t){!function(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&&Lr(t,e)}(i,t);var e,n,r,o=Fr(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e))._components=[],n}return e=i,(n=[{key:"showMoveHandle",get:function(){return!0}},{key:"dispose",value:function(){this.components.slice().forEach((function(t){return t.dispose()})),Br(Dr(i.prototype),"dispose",this).call(this)}},{key:"isContainer",value:function(){return!0}},{key:"containable",value:function(t){return t.isDescendible(this)&&"variable"!==t.get("type")}},{key:"hasTextProperty",get:function(){return!1}},{key:"components",get:function(){return this._components}},{key:"focusible",get:function(){return!0}},{key:"layout",get:function(){return Qn.get(this.get("layout"))||hr}},{key:"reflow",value:function(){this.layout.reflow(this),this.components&&this.components.forEach((function(t){t.isContainer()&&t.reflow()}))}},{key:"hierarchy",get:function(){var t=Br(Dr(i.prototype),"hierarchy",this);return this.components&&(t.components=this.components.map((function(t){return t.hierarchy}))),t}},{key:"addComponent",value:function(t){var e=t.parent;if(e){if(this===e)return;e.removeComponent(t)}var n=this._components.push(t)-1;t.parent=this,t.added(this),this.trigger("add",this,t,n),t.delegate_on(this),t.trigger("added",this,t,n),this.root&&this.root.isReady&&t.ready()}},{key:"removeComponent",value:function(t){var e=this._components.indexOf(t);-1!=e&&(this._components.splice(e,1),t.parent=null,t.removed(this),this.trigger("remove",this,t),t.trigger("removed",this,t),t.delegate_off(this))}},{key:"insertComponentAt",value:function(t,e){var n=t.parent;n&&n.removeComponent(t);var r=this._components.splice(0,e);this._components=r.concat(t,this._components),e=this._components.indexOf(t),t.parent=this,t.added(this),this.trigger("add",this,t,e),t.delegate_on(this),t.trigger("added",this,t,e)}},{key:"add",value:function(t){var e=this;return t instanceof Array?(t.forEach((function(t){-1==e._components.indexOf(t)&&e.addComponent(t)})),this):this.add.call(this,[t])}},{key:"remove",value:function(t){var e=this;return t instanceof Array?this._components?(t.forEach((function(t){e.removeComponent(t)})),this):this:this.remove.call(this,[t])}},{key:"getAt",value:function(t){if(this._components)return this._components[t]}},{key:"forEach",value:function(t,e){this._components&&this._components.forEach(t,e)}},{key:"traverse",value:function(t,e){t.call(e,this),this._components&&this._components.forEach((function(n){n.isContainer()?n.traverse(t,e):t.call(e,n)}))}},{key:"indexOf",value:function(t){return(this._components||Ur).indexOf(t)}},{key:"size",value:function(){return(this._components||Ur).length}},{key:"moveChildAt",value:function(t,e){var n=this.indexOf(e);if(-1!=n){var r=this._components.splice(0,n),o=this._components.splice(1);this._components=r.concat(o),t=Math.max(0,t),t=Math.min(t,this._components.length),r=this._components.splice(0,t),this._components=r.concat(e,this._components)}}},{key:"moveChildForward",value:function(t){var e=this.indexOf(t);-1!=e&&e!=this.size()-1&&(this._components[e]=this._components[e+1],this._components[e+1]=t)}},{key:"moveChildBackward",value:function(t){var e=this.indexOf(t);-1!=e&&0!=e&&(this._components[e]=this._components[e-1],this._components[e-1]=t)}},{key:"moveChildToFront",value:function(t){var e=this.indexOf(t);if(-1!=e&&e!=this.size()-1){var n=this._components.splice(0,e),r=this._components.splice(1);this._components=n.concat(r,this._components)}}},{key:"moveChildToBack",value:function(t){var e=this.indexOf(t);if(-1!=e&&0!=e){var n=this._components.splice(0,e),r=this._components.splice(0);this._components=this._components.concat(n,r)}}},{key:"symmetryX",value:function(t){Br(Dr(i.prototype),"symmetryX",this).call(this,t),this.components.map((function(t){t.symmetryX(0)}))}},{key:"findAll",value: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];if("string"==typeof t)return g(t,this,n[0]||this);if("function"==typeof t){for(var o=[],i=this.components.length-1;i>=0;i--){var a,u=(a=this.components[i]).findAll.apply(a,[t].concat(n));u&&(o=o.concat(u))}return t.apply(void 0,[this].concat(n))&&o.push(this),o}}},{key:"findFirst",value: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];if("string"==typeof t)return g(t,this,n[0])[0];if("function"==typeof t){for(var o=this.components.length-1;o>=0;o--){var i,a=(i=this.components[o]).findFirst.apply(i,[t].concat(n));if(null!=a)return a}return t.apply(void 0,[this].concat(n))?this:null}}},{key:"findById",value:function(t){return this.root.findById(t)}},{key:"contains",value:function(t,e){var n=Br(Dr(i.prototype),"contains",this).call(this,t,e);if(!n){var r=this.model,o=r.left,a=r.top,u=r.width,c=r.height,s=r.lineWidth,f=void 0===s?0:s,l=this.stuck?0:10+f/2;n=t<Math.max(o+u,o)+l&&t>Math.min(o+u,o)-l&&e<Math.max(a+c,a)+l&&e>Math.min(a+c,a)-l}return n}},{key:"capture",value:function(t,e){var n=this.transcoordP2S(t,e);if(!this.contains(n.x,n.y))return!1;var r=this.bounds;n.x-=r.left,n.y-=r.top;for(var o=this.layout.capturables(this),i=o.length-1;i>=0;i--){var a=o[i].capture(n.x,n.y);if(a)return a}return this.capturable&&this}},{key:"capturePath",value:function(t,e){if(e){if(e.indexOf(this)>-1)return!1;for(var n=0;n<e.length;n++)if(!this.containable(e[n]))return!1}for(var r=[],o=this.bounds,i=o.left,a=o.top,u=o.width,c=o.height,s=0;s<t.length;s++){var f=this.transcoordP2S(t[s].x,t[s].y);if(f.x<i||f.x>i+u||f.y<a||f.y>a+c)return!1;f.x-=i,f.y-=a,r.push(f)}for(var l=this.layout.capturables(this),h=l.length-1;h>=0;h--){var p=l[h];if(p.isContainer()){var y=p.capturePath(r,e);if(y)return y}}return this.focusible&&this}},{key:"render",value:function(t){var e=this.bounds,n=e.left,r=void 0===n?0:n,o=e.top,i=void 0===o?0:o,a=e.width,u=e.height;t.beginPath(),t.rect(r,i,a,u),this.drawFill(t),this.drawStroke(t)}},{key:"postrender",value:function(t){Br(Dr(i.prototype),"postrender",this).call(this,t);var e=this.model,n=e.top,r=e.left;e.scale,t.translate(r,n),this.layout.drawables(this).forEach((function(e){e.draw(t)})),t.translate(-r,-n),this.drawText(t)}},{key:"trim",value:function(){this.components.forEach((function(t){t.trim()})),Br(Dr(i.prototype),"trim",this).call(this)}}])&&zr(e.prototype,n),r&&zr(e,r),i}(Ir(zn(mn)));function Gr(t){return(Gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wr(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 Hr(t,e,n){return(Hr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kr(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Vr(t,e){return(Vr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Xr(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=Kr(t);if(e){var o=Kr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return qr(this,n)}}function qr(t,e){return!e||"object"!==Gr(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Kr(t){return(Kr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}["layout"].forEach((function(t){return mn.memoize(Yr.prototype,t,!1)}));var Qr=function(t){!function(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&&Vr(t,e)}(i,t);var e,n,r,o=Xr(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),n=o.call(this,t,e),t.translate=t.translate||{x:0,y:0},n._draw_reserved=!1,n.__draw__=function(){n._draw_reserved=!1,n.trigger("redraw"),n.reflow(),n.draw()},n.throttle_render=function(){n._draw_reserved||requestAnimationFrame(n.__draw__),n._draw_reserved=!0},n}return e=i,(n=[{key:"fitSize",value:function(t,e,n,r){if(this.target){if(e){var o=getComputedStyle(this.target);n=n||(o?parseFloat(o.getPropertyValue("width")):this.target.offsetWidth),r=r||(o?parseFloat(o.getPropertyValue("height")):this.target.offsetHeight)}else n=this.model.width,r=this.model.height;"CANVAS"==t.tagName&&(t.setAttribute("width",n*ne),t.setAttribute("height",r*ne)),t.style.width=n+"px",t.style.height=r+"px"}}},{key:"resize",value:function(){var t=this.root.fitMode||this.model.fitMode||"ratio";this.fitSize(this.element,"none"!==t)}},{key:"isLayer",value:function(){return!0}},{key:"createElement",value:function(){var t=mn.createCanvas(1,1);return t.style.position="absolute",t}},{key:"target",get:function(){return this._target},set:function(t){this._target&&this.element&&this._target.removeChild(this.element),this._target=t,t&&(this.element||(this.element=this.createElement()),this.resize(),t.appendChild(this.element))}},{key:"canvas",get:function(){return this.element}},{key:"dispose",value:function(){Hr(Kr(i.prototype),"dispose",this).call(this),this.target=null,this.element=null}},{key:"selected",get:function(){return this.root.selected},set:function(t){this.root.selected=t}},{key:"focused",get:function(){return this.root.focused},set:function(t){this.root.focused=t}},{key:"getContext",value:function(){return this._context2D||(this._context2D=this.canvas&&this.canvas.getContext("2d")),this._context2D}},{key:"draw",value:function(t){this.canvas&&(t=t||this.getContext())&&Hr(Kr(i.prototype),"draw",this).call(this,t)}},{key:"prerender",value:function(t){var e=this.model,n=e.translate,r=e.scale,o=void 0===r?{x:1,y:1}:r,i=e.rotation;t.clearRect(0,0,t.canvas.width,t.canvas.height),n&&t.translate(n.x*ne,n.y*ne),t.scale(o.x*ne,o.y*ne),i&&t.rotate(i)}},{key:"rotatePoint",get:function(){return{x:0,y:0}}},{key:"contains",value:function(t,e){return!1}},{key:"invalidate",value:function(){this.throttle_render()}},{key:"move",value:function(t){var e=this.get("translate")||{x:0,y:0};this.set({translate:{x:e.x+t.x,y:e.y+t.y}})}}])&&Wr(e.prototype,n),r&&Wr(e,r),i}(Yr);function Jr(t){return(Jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zr(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 $r(t,e,n){return($r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ro(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function to(t,e){return(to=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function eo(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=ro(t);if(e){var o=ro(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return no(this,n)}}function no(t,e){return!e||"object"!==Jr(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ro(t){return(ro=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var oo={x:1,y:1},io={x:0,y:0},ao=function(t){!function(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&&to(t,e)}(i,t);var e,n,r,o=eo(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,t,e)}return e=i,(n=[{key:"dispose",value:function(){$r(ro(i.prototype),"dispose",this).call(this),delete this._canvas,delete this._overlay}},{key:"contains",value:function(t,e){return!0}},{key:"isRootModel",value:function(){return!0}},{key:"stuck",get:function(){return!0}},{key:"layout",get:function(){return Zn}},{key:"overlay",get:function(){if(!this._overlay){var t=document.createElement("div");t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="initial",t.style["user-select"]="none",t.style["transform-origin"]="top left",this.element&&this.element.appendChild(t),this._overlay=t,this._repositionOverlay()}return this._overlay}},{key:"createElement",value:function(){var t=document.createElement("div");return t.style.position="absolute",t.style["user-select"]="none",t.style.overflow="hidden",this._canvas=mn.createCanvas(1,1),this._canvas.style.position="absolute",t.appendChild(this._canvas),this._overlay&&t.appendChild(this._overlay),t}},{key:"resize",value:function(){if(this.target){var t,e,n=this.model,r=n.width,o=n.height,i=n.fitMode;this.root.fitMode?i=this.root.fitMode:i||(i="ratio");try{var a=getComputedStyle(this.target)}catch(t){return void console.error(t,this.target)}switch(i){case"both":case"ratio":t=a?parseFloat(a.getPropertyValue("width")):this.target.offsetWidth,e=a?parseFloat(a.getPropertyValue("height")):this.target.offsetHeight;break;case"width":e=o*(t=a?parseFloat(a.getPropertyValue("width")):this.target.offsetWidth)/r;break;case"height":t=r*(e=a?parseFloat(a.getPropertyValue("height")):this.target.offsetHeight)/o;break;default:t=r,e=o}switch(this.fitSize(this.canvas,"none"!==i,t,e),i){case"ratio":case"both":break;case"width":this.element.style.overflowX="hidden",this.element.style.overflowY="auto";break;case"height":this.element.style.overflowX="auto",this.element.style.overflowY="hidden";break;default:this.element.style.overflowX="auto",this.element.style.overflowY="auto"}this.fitSize(this.element,!0)}}},{key:"canvas",get:function(){return this._canvas}},{key:"MPP",get:function(){var t=this.model,e=t.scale,n=void 0===e?{x:1,y:1}:e;switch(t.unit){case"mm":case"cm":return 1/this.app.PPM/n.x;case"in":return 1/this.app.PPI/n.x;case"px":default:return 1/n.x}}},{key:"capturePath",value:function(t,e){for(var n=this.layout.capturables(this),r=n.length-1;r>=0;r--){var o=n[r];if(o.isContainer()){var i=o.capturePath(t,e);if(i)return i}}return!1}},{key:"eventMap",get:function(){return{"(self)":{"(all)":{change:this._onchanged_all,mouseenter:this._onmouseenter_all,mouseleave:this._onmouseleave_all,click:this._onclick,mousedown:this._onmousedownup,mouseup:this._onmousedownup,touchstart:this._onmousedownup,touchend:this._onmousedownup}}}}},{key:"_repositionOverlay",value:function(){var t=this._overlay;if(t){var e=this.model,n=e.translate,r=void 0===n?io:n,o=e.scale,i=void 0===o?oo:o,a=e.rotation,u=void 0===a?0:a,c=this.bounds,s=c.left,f=c.top;c.width,c.height,t.style.left=s+"px",t.style.top=f+"px";var l="rotate(".concat(u,"rad) scale(").concat(i.x,", ").concat(i.y,") perspective(1px)");t.style["margin-left"]=r.x+"px",t.style["margin-top"]=r.y+"px",["-webkit-","-moz-","-ms-","-o-",""].forEach((function(e){t.style[e+"transform"]=l}))}}},{key:"onchange",value:function(t){var e=this._model;delete e.id,delete e.text,delete e.class,this._repositionOverlay()}},{key:"_onchanged_all",value:function(t,e,n){this.invalidate()}},{key:"_onmouseenter_all",value:function(t,e){if(t.stopPropagation(),this.app&&!this.app.isEditMode&&e){var n=e.origin;if(!(n instanceof i)&&n.model.event&&n.model.event.hover&&!n.hidden){var r=n.model.event.hover;r&&this._doEventAction(r,n,!0,!0,t)}}}},{key:"_onmouseleave_all",value:function(t,e){if(t.stopPropagation(),this.app&&!this.app.isEditMode&&e){var n=e.origin,r=n.model.event&&n.model.event.hover;r&&this._doEventAction(r,n,!1,!0,t)}}},{key:"_onclick",value:function(t,e){if(t.stopPropagation(),!this.app.isEditMode&&e){var n=e.origin,r=n.model.event&&n.model.event.tap;r&&this._doEventAction(r,n,!0,!1,t)}}},{key:"_onmousedownup",value:function(t,e){if(t.stopPropagation(),!this.app.isEditMode&&e){var n=e.origin,r=n.model.event&&n.model.event.tap;r&&r.pressed&&this._doMouseDownUpEventAction_1_1(r,n,"mousedown"==t.type||"touchstart"==t.type,t)}}},{key:"_doEventAction",value:function(t,e,n,r,o){t.action?this._doEventAction_1_1(t,e,n,o):this._doEventAction_1_0(t,e,n,r,o)}},{key:"_doEventAction_1_0",value:function(t,e,n,r,o){var i=t.infoWindow,a=t.emphasize,u=t.target,c=t.value;if(a&&(n?$n(e):r&&tr(e)),i&&!e.hidden&&(n?Vn.show(e,i,!1,{x:o.offsetX,y:o.offsetY}):r&&Vn.hide(e,i)),u)if(/^\$/.test(u)){if(!("value"in t))return;n?(r&&(e._lastValue=this.root.variable(u.substring(1))),this.root.variable(u.substring(1),e.access(c))):(this.root.variable(u,e._lastValue),delete e._lastValue)}else"popup"==u?sr(e,c):"modal-popup"==u?sr(e,c,{modal:!0}):"close-scene"==u?(this.overlay.dispatchEvent(new CustomEvent("close-scene",{bubbles:!0,composed:!0,detail:e.data})),this.trigger("close-scene",this)):"infoWindow"==u||"info-window"==u?"click"==o.type&&Vn.show(e,c,r,{x:o.offsetX,y:o.offsetY}):"toggle-info-window"==u?Vn.toggle(e,c,!1,{x:o.offsetX,y:o.offsetY}):this.trigger(u,e.access(c),e)}},{key:"_doMouseDownUpEventAction_1_1",value:function(t,e,n,r){var o=t.pressed;void 0!==o&&o&&(n?function(t){if(!t.hasOwnProperty("_backupShadow")){var e=t.get("shadow");t._backupShadow=e;var n=e||{},r=n.left,o=void 0===r?0:r,i=n.top,a=void 0===i?0:i;t.delta("tx",o),t.delta("ty",a),t.set("shadow",{})}}(e):function(t){t.hasOwnProperty("_backupShadow")&&(t.delta("tx",0),t.delta("ty",0),t.set("shadow",t._backupShadow),delete t._backupShadow)}(e))}},{key:"_doEventAction_1_1",value:function(t,e,n,r){var o=t.action,i=t.target,a=t.value,u=t.emphasize,c=void 0!==u&&u,s=t.restore,f=void 0!==s&&s;if(t.pressed,i&&(i=e.access(i)),a&&(a=e.access(a)),c&&(n?$n(e):f&&tr(e)),o)switch(o){case"data-toggle":if(!i)return;(n||f)&&this.root.findAll(i,e).forEach((function(t){t.data=!t.data}));break;case"data-tristate":if(!i)return;(n||f)&&this.root.findAll(i,e).forEach((function(t){var e=Math.round(Math.max(Number(t.data)||0,0));t.data=(e+(n?1:2))%3}));break;case"data-set":if(!i)return;if(n){var l=a;this.root.findAll(i,e).forEach((function(t){t.data=l}))}break;case"value-set":if(!i)return;n&&(l=a,this.root.findAll(i,e).forEach((function(t){t.value=l})));break;case"infoWindow":case"info-window":if(!i)return;"click"==r.type||n?Vn.show(e,i,f,{x:r.offsetX,y:r.offsetY}):f&&Vn.hide(e,i);break;case"toggle-info-window":if(!i)return;Vn.toggle(e,i,!1,{x:r.offsetX,y:r.offsetY});break;case"popup":if(!i)return;sr(e,i);break;case"modal-popup":if(!i)return;sr(e,i,{modal:!0});break;case"close-scene":this.overlay.dispatchEvent(new CustomEvent("close-scene",{bubbles:!0,composed:!0,detail:e.data}));break;default:this.trigger(o,i,a,e)}}}])&&Zr(e.prototype,n),r&&Zr(e,r),i}(Qr);function uo(t){return(uo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function co(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function so(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 fo(t,e){return(fo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function lo(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=po(t);if(e){var o=po(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ho(this,n)}}function ho(t,e){return!e||"object"!==uo(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function po(t){return(po=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}ao.Popup=a,mn.register("model-layer",ao);var yo=[1,2,10,20,50,50,50,50,50,50],vo=function(t){!function(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&&fo(t,e)}(i,t);var e,n,r,o=lo(i);function i(){return co(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(t){var e=this.model,n=e.lineWidth,r=void 0===n?1:n,o=e.fillStyle,i=void 0===o?"lightgray":o,a=e.font,u=void 0===a?"15px Arial":a,c=e.left,s=e.top,f=(e.rotation,e.origin),l=(e.margin,e.width),h=e.height,p=e.side,y=void 0===p?"bottom":p,d=e.strokeStyle,v=void 0===d?"#000000":d,g=e.scale,m=void 0===g?1:g;t.translate(c,s),t.beginPath();var b=Math.round(r/2);t.rect(-b,-b,l+2*b,h+2*b),t.clip(),t.beginPath(),t.rect(0,0,l,h),i&&(t.fillStyle=i,t.fill()),t.lineWidth=r,t.strokeStyle=v,t.stroke(),t.beginPath(),t.font=u;var w="bottom"!==y,x=w?0:h,_=4*h/5,k=2*h/3,A=1*h/2,S=3*h/5;w&&(_=h-_,k=h-k,A=h-A,S=h-1.5*h/5);var O=m*this.app.PPM/this.root.unitScale,E=Math.ceil(f/O),P=this.app.PPM/O,j=P<=1.1?1:yo[Math.round(P)]||100;1!=j&&(E+=(j-E%j)%j);var M=Math.ceil(E*O),R=f+l;for(t.fillStyle=v;M<R;){if(E%10==0){t.moveTo(M-f,A),t.lineTo(M-f,x);var T=(E/10).toString(),I=t.measureText(T);t.fillText(T,M-f-I.width-6,S)}else E%5==0?(t.moveTo(M-f,k),t.lineTo(M-f,x)):(t.moveTo(M-f,_),t.lineTo(M-f,x));E+=j,M=Math.ceil(E*O)}}}])&&so(e.prototype,n),r&&so(e,r),i}(zn(En));function go(t){return(go="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function mo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bo(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 wo(t,e){return(wo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function xo(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=ko(t);if(e){var o=ko(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _o(this,n)}}function _o(t,e){return!e||"object"!==go(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ko(t){return(ko=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("ruler",vo);var Ao={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"number",label:"round",name:"round",property:"round"}],help:"scene/component/rect"},So={ondragmove:function(t,e,n){var r=n.model,o=r.left,i=(r.top,r.width),a=r.height,u=(n.transcoordP2S(t.x,t.y).x-o)/(i/2)*100;u=Oo(u,i,a),n.set({round:u})}};function Oo(t,e,n){var r=e>n?n/e*100:100;return t>=r?t=r:t<=0&&(t=0),t}var Eo=function(t){!function(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&&wo(t,e)}(i,t);var e,n,r,o=xo(i);function i(){return mo(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"is3dish",value:function(){return!0}},{key:"render",value:function(t){var e=this.model.round,n=void 0===e?0:e,r=this.bounds,o=r.left,i=r.top,a=r.width,u=r.height;t.translate(o,i),t.beginPath();var c=(n=Oo(n,a,u))/100*(a/2);t.moveTo(c,0),t.arcTo(a,0,a,u,c),t.arcTo(a,u,0,u,c),t.arcTo(0,u,0,0,c),t.arcTo(0,0,a,0,c),t.translate(-o,-i)}},{key:"controls",get:function(){var t=this.model,e=t.left,n=t.top,r=t.width,o=t.round,i=t.height;return[{x:e+r/2*((o=null==o?0:Oo(o,r,i))/100),y:n,handler:So}]}},{key:"nature",get:function(){return Ao}}])&&bo(e.prototype,n),r&&bo(e,r),i}(zn(En));function Po(t){return(Po="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function jo(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 Mo(t,e,n){return(Mo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Co(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Ro(t,e){return(Ro=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function To(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=Co(t);if(e){var o=Co(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Io(this,n)}}function Io(t,e){return!e||"object"!==Po(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Co(t){return(Co=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("rect",Eo);var zo=90*Math.PI/180;function Bo(t,e,n){return{left:-t.x,top:-t.y,width:20,height:20}}function Lo(t,e,n,r){return{left:20-t.x,top:0-t.y,origin:20-t.x,width:e-20,height:20}}function Fo(t,e,n,r){var o={x:0-t.x+10,y:20-t.y+(n-20)/2},i=mn.transcoordRR(0-t.x,20-t.y,o,zo);return{left:i.x-(n-20),top:i.y,origin:20-t.y,width:n-20,height:20}}function No(t){var e=t.get("translate");return{left:-e.x,top:-e.y,width:t.canvas.width/ne,height:t.canvas.height/ne}}var Do=function(t){!function(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&&Ro(t,e)}(i,t);var e,n,r,o=To(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).appScale={x:1,y:1},"disabled"!==t.ruler&&(n.hruler=new vo({left:20,top:0,origin:20,margin:0,height:20,unit:"m",rotation:0,font:"9px Verdana",fillStyle:"#f4f4f4",strokeStyle:"#999",capturable:!1}),n.vruler=new vo({left:0,top:0,origin:20,margin:0,height:20,unit:"m",rotation:zo,font:"9px Verdana",side:"top",fillStyle:"#f4f4f4",strokeStyle:"#999",capturable:!1}),n.origin_rect=new Eo({left:-20,top:-20,width:20,height:20,fillStyle:"#f4f4f4",strokeStyle:"#999",lineWidth:1}),n.addComponent(n.hruler),n.addComponent(n.vruler),n.addComponent(n.origin_rect)),n.invalidate(),n}return e=i,(n=[{key:"capturable",get:function(){return!1}},{key:"ready",value:function(){if(this.hruler){var t=this.rootModel,e=Object.assign({},t.get("translate"));e.x<20&&(e.x+=20),e.y<20&&(e.y+=20);var n=t.get("scale")||{x:1,y:1};this.appScale=n,this.hruler.set("scale",n.x),this.vruler.set("scale",n.y),t.set("translate",e),this.set("translate",e),this.screen_coord=No(this);var r=this.screen_coord,o=r.width,i=r.height;this.hruler.set(Lo(e,o,0,this.hruler)),this.vruler.set(Fo(e,0,i,this.vruler)),this.origin_rect.set(Bo(e))}else this.screen_coord=No(this)}},{key:"resize",value:function(){Mo(Co(i.prototype),"resize",this).call(this),this.screen_coord=No(this);var t=this.screen_coord,e=t.width,n=t.height;this.hruler&&(this.hruler.set(Lo(this.model.translate,e,0,this.hruler)),this.vruler.set(Fo(this.model.translate,0,n,this.vruler)),this.origin_rect.set(Bo(this.model.translate)))}},{key:"render",value:function(t){if(this.guide){t.save();var e=this.guide,n=e.x,r=e.y,o=this.screen_coord,i=o.top,a=o.left,u=o.width,c=o.height;t.beginPath(),t.moveTo(n,i),t.lineTo(n,i+c),t.moveTo(a,r),t.lineTo(a+u,r),t.lineWidth=1,t.strokeStyle="tomato",t.setLineDash([2,3]),t.font="10px tahoma",t.fillStyle="#333";var s=this.transcoordS2C(n,r,this.rootModel);t.textBaseline=s.y>200?"bottom":"top",t.textAlign=s.x>200?"right":"left";var f=s.y>200?-5:5,l=s.x>200?-5:5,h=Math.round(n/this.appScale.x),p=Math.round(r/this.appScale.y);t.fillText(" ".concat(h,", ").concat(p," "),n+l,r+f),t.stroke(),t.restore()}}},{key:"guide",get:function(){return this._guide},set:function(t){this._guide=t,this.invalidate()}},{key:"contains",value:function(t,e){return!0}},{key:"eventMap",get:function(){return{"(root)":{"(descendant)":{mousemove:this.onmousemove_child,mouseout:this.onmouseout_child,dragmove:this.onmousemove_child},"model-layer":{change:this.onchange_root_model}},"(self)":{"(descendant)":{mousedown:this.onmousedown_origin}}}}},{key:"onmousedown_origin",value:function(t,e){this.rootModel.set("translate",{x:20,y:20})}},{key:"onchange_root_model",value:function(t,e,n){if(t.scale&&(this.appScale=t.scale,this.hruler&&(this.hruler.set("scale",t.scale.x),this.vruler.set("scale",t.scale.y))),t.translate&&this.set({translate:{x:t.translate.x,y:t.translate.y}}),t.scale||t.translate){if(this.screen_coord=No(this),this.hruler){var r=this.model.translate,o=this.screen_coord,i=o.width,a=o.height;this.hruler.set(Lo(r,i,0,this.hruler)),this.vruler.set(Fo(r,0,a,this.vruler)),this.origin_rect.set(Bo(r))}this._guide=null}this.invalidate()}},{key:"onmouseout_child",value:function(t){this._guide=null,this.invalidate()}},{key:"onmousemove_child",value:function(t,e){t.target&&"CANVAS"!==t.target.tagName?this.guide=null:this.guide=this.transcoordC2S(t.offsetX,t.offsetY)}}])&&jo(e.prototype,n),r&&jo(e,r),i}(Qr);function Uo(t){return(Uo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Yo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Go(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 Wo(t,e){return(Wo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ho(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=Xo(t);if(e){var o=Xo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Vo(this,n)}}function Vo(t,e){return!e||"object"!==Uo(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Xo(t){return(Xo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("guide-layer",Do);var qo=function(t){!function(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&&Wo(t,e)}(i,t);var e,n,r,o=Ho(i);function i(){return Yo(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"ready",value:function(){var t=this.rootModel.get("translate");this.set("translate",t)}},{key:"render",value:function(t){}},{key:"contains",value:function(t,e){return!(this.app.mode!=te)}},{key:"eventMap",get:function(){return{"(root)":{"(self)":{keydown:this.onkeydown,keyup:this.onkeyup}}}}},{key:"onkeydown",value:function(t){32==t.keyCode&&void 0===this.before_mode&&(this.before_mode=this.app.mode,this.app.mode=te)}},{key:"onkeyup",value:function(t){32==t.keyCode&&(null!=this.before_mode&&(this.app.mode=this.before_mode),delete this.before_mode)}},{key:"ondragstart",value:function(t){this.last_position=this.transcoordC2S(t.offsetX,t.offsetY)}},{key:"ondragmove",value:function(t){var e=this.transcoordC2S(t.offsetX,t.offsetY),n=e.x,r=e.y;this.rootModel.move({x:n-this.last_position.x,y:r-this.last_position.y}),this.last_position=this.transcoordC2S(t.offsetX,t.offsetY)}}])&&Go(e.prototype,n),r&&Go(e,r),i}(Qr);function Ko(t){return(Ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Qo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jo(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 Zo(t,e,n){return(Zo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ni(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function $o(t,e){return($o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ti(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=ni(t);if(e){var o=ni(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ei(this,n)}}function ei(t,e){return!e||"object"!==Ko(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ni(t){return(ni=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("shift-layer",qo);var ri=function(t){return function(t){!function(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&&$o(t,e)}(i,t);var e,n,r,o=ti(i);function i(){return Qo(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"isHTMLElement",value:function(){return!0}},{key:"isShadowable",value:function(){return!0}},{key:"element",get:function(){return this._element},set:function(t){this._element=t}},{key:"tagName",get:function(){return this.get("type")}},{key:"setElementProperties",value:function(t){throw new Error("Not Implemented Yet")}},{key:"createElement",value:function(){var t=this;this.element=document.createElement(this.tagName),this.element&&(this.parent.isHTMLElement()?this.parent.element.appendChild(this.element):this.root.model_layer.overlay.appendChild(this.element),re.forEach((function(e){t.element.addEventListener(e,t.userInputEventHandler.bind(t))})),oe.forEach((function(e){t.element.addEventListener(e,t.userInputEventHandler.bind(t))})),this.oncreate_element&&this.oncreate_element(this.element))}},{key:"userInputEventHandler",value:function(t){t.stopPropagation()}},{key:"reposition",value:function(){this.element&&en(this)}},{key:"disposeElement",value:function(){var t=this.element;t&&t.parentElement&&t.parentElement.removeChild(t),delete this.element}},{key:"ready",value:function(){!this.element&&this.createElement(),this.parent.isHTMLElement()?this.parent.element.appendChild(this.element):this.root.model_layer.overlay.appendChild(this.element),this.setElementProperties(this.element),this.reposition()}},{key:"dispose",value:function(){this.disposeElement(this),Zo(ni(i.prototype),"dispose",this).call(this)}},{key:"hasTextProperty",get:function(){return!0}},{key:"textHidden",get:function(){return!0}},{key:"onchange",value:function(t,e){this.element&&this.setElementProperties(this.element),this.reposition()}},{key:"isDescendible",value:function(t){return t.isHTMLElement()}}])&&Jo(e.prototype,n),r&&Jo(e,r),i}(t)};function oi(t){return(oi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ii(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ai(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 ui(t,e){return(ui=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ci(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=fi(t);if(e){var o=fi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return si(this,n)}}function si(t,e){return!e||"object"!==oi(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function fi(t){return(fi=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var li={x:1,y:1},hi={boxSizing:"border-box",margin:"0px",position:"absolute",outline:"none"},pi={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"layout",label:"layout",name:"layoutOption"}],help:"scene/component/container"},yi=function(t){!function(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&&ui(t,e)}(i,t);var e,n,r,o=ci(i);function i(){return ii(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"tagName",get:function(){return"div"}},{key:"nature",get:function(){return pi}},{key:"setElementProperties",value:function(t){}},{key:"layout",get:function(){return Qn.get(this.get("layout"))||Zn}},{key:"reposition",value:function(){if(this.element){var t=this.state,e=t.id,n=t.class,r=t.scale,o=void 0===r?li:r,i=this.rotation,a=void 0===i?0:i,u=this.hidden,c=this.bounds,s=c.left,f=c.top,l=c.width,h=c.height,p=l/2,y=h/2,d=this.element;d.hidden=u,e&&(d.id=e),n&&(d.className=n),Object.assign(d.style,hi,{left:s+"px",top:f+"px",width:"0px",height:"0px",backgroundColor:"transparent"});var v=this.delta(),g=(o&&o.x||1)*v.sx,m=(o&&o.y||1)*v.sy,b=(a||0)+v.theta,w=v.tx||0,x=v.ty||0;["-webkit-","-moz-","-ms-","-o-",""].forEach((function(t){d.style[t+"transform"]="translate(".concat(w+p,"px, ").concat(x+y,"px) rotate(").concat(b,"rad) translate(").concat(-p,"px, ").concat(-y,"px) scale(").concat(g,", ").concat(m,") perspective(1px)")}))}}}])&&ai(e.prototype,n),r&&ai(e,r),i}(ri(Yr));function di(t){return(di="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gi(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 mi(t,e,n,r){return(mi="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,n,r){var o,i=xi(t,e);if(i){if((o=Object.getOwnPropertyDescriptor(i,e)).set)return o.set.call(r,n),!0;if(!o.writable)return!1}if(o=Object.getOwnPropertyDescriptor(r,e)){if(!o.writable)return!1;o.value=n,Object.defineProperty(r,e,o)}else bi(r,e,n);return!0})(t,e,n,r)}function bi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wi(t,e,n){return(wi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=xi(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function xi(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Si(t)););return t}function _i(t,e){return(_i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ki(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=Si(t);if(e){var o=Si(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ai(this,n)}}function Ai(t,e){return!e||"object"!==di(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Si(t){return(Si=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("container",yi);var Oi=["left","top","width","height","rotation","animation"],Ei=function(t){!function(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&&_i(t,e)}(i,t);var e,n,r,o=ki(i);function i(){return vi(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"isGroup",value:function(){return!0}},{key:"get",value:function(t){return this._model[t]}},{key:"set",value:function(t,e){if("string"==typeof t)return this.set(bi({},t,e));var n=Oi.reduce((function(e,n){return t.hasOwnProperty(n)&&(e[n]=t[n]),e}),{});return wi(Si(i.prototype),"set",this).call(this,n)}},{key:"capture",value:function(t,e){var n=wi(Si(i.prototype),"capture",this).call(this,t,e);if(n!==this)return n}},{key:"bounds",get:function(){return wi(Si(i.prototype),"bounds",this)},set:function(t){if(this.__MUTATING__)!function(t,e,n,r,o){if(!mi(t,e,n,r||t)&&o)throw new Error("failed to set property")}(Si(i.prototype),"bounds",t,this,!0);else{var e=this.bounds,n=t.width/e.width,r=t.height/e.height;this.path=this.path.map((function(o){return{x:t.left+(o.x-e.left)*n,y:t.top+(o.y-e.top)*r}})),this.components&&this.components.forEach((function(t){if(t.mutable)t.mutatePath(null,(function(t){return t.map((function(t){return{x:t.x*n,y:t.y*r}}))}));else{var e=t.bounds,o=t.center,i={x:o.x*(1-n),y:o.y*(1-r)},a=e.width*(1-n),u=e.height*(1-r),c=-(i.x-a/2),s=-(i.y-u/2);t.bounds={left:e.left+c,top:e.top+s,width:e.width*n,height:e.height*r}}}))}}},{key:"focusible",get:function(){return!1}},{key:"hasTextProperty",get:function(){return!1}},{key:"calculateBounds",value:function(){this.clearCache(),this.__MUTATING__=!0,this.mutateBounds((function(t){var e=mn.union(this.components.map((function(t){return t.bounds})));return this.components.forEach((function(t){var n=t.bounds;t.bounds={left:n.left-e.left,top:n.top-e.top,width:n.width,height:n.height}})),{left:t.left+e.left,top:t.top+e.top,width:e.width,height:e.height}}),this),this.__MUTATING__=!1,this.parent.isGroup()&&this.parent.calculateBounds()}},{key:"render",value:function(t){}},{key:"postrender",value:function(t){var e=this.model,n=e.top,r=e.left;e.scale,t.translate(r,n),this.layout.drawables(this).forEach((function(e){e.draw(t)})),t.translate(-r,-n)}}])&&gi(e.prototype,n),r&&gi(e,r),i}(yi);function Pi(t){return(Pi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ji(t){return function(t){if(Array.isArray(t))return Mi(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Mi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mi(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mi(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 Ri(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ti(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 Ii(t,e){return(Ii=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ci(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=Bi(t);if(e){var o=Bi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zi(this,n)}}function zi(t,e){return!e||"object"!==Pi(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Bi(t){return(Bi=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Li(t,e,n,r){var o=t.selected,i=r?o.slice(0):[];r&&i.length>0?e=i[0].parent:e.isContainer()||(e=e.parent);var a=e.layout.capturables(e),u=!!e.layout.joinType;if(r&&n.selected.forEach((function(t){i.splice(i.indexOf(t),1)})),n.selected=[],a.forEach((function(t){t.capturable&&function(t,e,n){var r,o,i,a,u=e.sx,c=e.sy,s=e.ex,f=e.ey;if(u>s?(r=s,o=u):(r=u,o=s),c>f?(i=f,a=c):(i=c,a=f),n){var l=t.bounds,h=t.transcoordS2TR(l.left,l.top),p=t.transcoordS2TR(l.left+l.width,l.top+l.height),y=h.x,d=p.x,v=h.y,g=p.y,m=Math.min(r,y,o,d),b=Math.max(r,y,o,d),w=Math.min(i,v,a,g),x=Math.max(i,v,a,g);return!(b-m>Math.abs(o-r)+Math.abs(d-y))&&!(x-w>Math.abs(a-i)+Math.abs(g-v))}var _=t.path;if(!_)return pe("컴포넌트에 get path가 잘못 구현되어있음.",t),!1;for(var k=0;k<_.length;k++){var A=t.transcoordS2TR(_[k].x,_[k].y);if(r>A.x||o<A.x||i>A.y||a<A.y)return!1}return!0}(t,n,u)&&-1==i.indexOf(t)&&n.selected.push(t)})),i=i.concat(n.selected),o.length!==i.length)t.selected=i;else for(var c=0;c<i.length;c++)if(o[c]!=i[c]){t.selected=i;break}}function Fi(t,e,n,r,o){o||Li(t,e,n,r)}mn.register("group",Ei);var Ni=function(t){!function(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&&Ii(t,e)}(i,t);var e,n,r,o=Ci(i);function i(){return Ri(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"ready",value:function(){var t=this.rootModel,e=t.get("translate"),n=t.get("scale");this.set("translate",e),this.set("scale",n)}},{key:"contains",value:function(t,e){return!1}},{key:"render",value:function(t){var e=this.selbox;if(e){var n=e.sx,r=e.sy,o=e.ex,i=e.ey,a=this.get("scale")||{x:1,y:1};t.beginPath(),t.rect(n,r,o-n,i-r),t.setLineDash([2/a.x,4/a.y]),t.lineWidth=1/a.x,t.strokeStyle="black",t.stroke()}}},{key:"eventMap",get:function(){return{"(root)":{"(self)":{keydown:this.onkeydown}},"model-layer":{"(self)":{change:this.onchange_root_model},"(all)":{dragstart:this.ondragstart_selbox,dragmove:this.ondragmove_selbox,dragend:this.ondragend_selbox,mousedown:this.onmousedown_comp,mouseup:this.onmouseup_comp}}}}},{key:"onkeydown",value:function(t,e){e.origin;var n=e.deliverer,r=n.selected;if(1!=r.length)return!1;var o=r[0],i=o.parent;if(!i||i===n)return!1;if("Tab"==t.code){if("Tab"!=t.code)return!1;var a=i.layout.capturables(i),u=a.indexOf(o);if(-1==u){if(!i.indexOf(o))return ye("Container not contains [",o,"] as a component"),!1;u=0}var c=a.length;t.shiftKey?u--:u++,o=a[(u+c)%c]}else{if(!i.layout.keyNavigate)return!1;o=i.layout.keyNavigate(i,o,t)||o}n.selected=[o],t.preventDefault()}},{key:"onchange_root_model",value:function(t,e,n){t.translate&&this.set("translate",t.translate),t.scale&&this.set("scale",t.scale)}},{key:"_pendingDecision",value:function(t){this.downpoint={x:t.offsetX,y:t.offsetY}}},{key:"_selectGroupItem",value:function(t,e){for(var n=this.selected.indexOf(t),r=t.parent;r.parent.isGroup();)r=r.parent;var o=[],i=!1,a=!1;if(this.selected.forEach((function(t){var e=t.parent;if(t!==r){for(;e.parent&&e.parent.isGroup();)e=e.parent;e===r&&(o.push(t),i=!0)}else a=!0})),i)if(e.shiftKey){if(-1!=n)return void this._pendingDecision(e);o.push(t)}else{if(-1!=n)return void this._pendingDecision(e);o=[t]}else{if(a)return void this._pendingDecision(e);if(e.shiftKey)if(this.selected.length>0){if(-1!=this.selected.indexOf(r)||this.selected[0].parent!==r.parent)return;o=[].concat(ji(this.selected),[r])}else o=[r];else o=[r]}this.selected=o}},{key:"onmousedown_comp",value:function(t,e){var n=e.origin;if(this.downpoint=null,t.shiftKey){if(n.parent.isGroup())return void this._selectGroupItem(n,t);if(-1!=this.selected.indexOf(n))return void this._pendingDecision(t);var r=this.selected.filter((function(t){return!t.isRootModel()&&!!t.parent})),o=r.length>0&&r[0].parent;if(o&&o!==n.parent)return void(n.parent.isGroup()&&this._pendingDecision(t));r.push(n),this.selected=r}else{if(n.parent.isGroup())return void this._selectGroupItem(n,t);if(-1!=this.selected.indexOf(n))return;this.selected=[n]}}},{key:"onmouseup_comp",value:function(t,e){if(this.downpoint&&this.downpoint.x===t.offsetX&&this.downpoint.y===t.offsetY){var n=e.origin,r=this.selected.indexOf(n);if(-1==r&&n.parent.isGroup()&&(r=this.selected.indexOf(n.parent)),-1!==r&&t.shiftKey){var o=this.selected.slice();return r>-1&&o.splice(r,1),void(this.selected=o)}n.parent.isGroup()&&(this.selected=[n])}}},{key:"ondragstart_selbox",value:function(t,e){if(e.origin.stuck){var n=this.transcoordC2S(t.offsetX,t.offsetY),r=n.x,o=n.y;this.selbox={sx:r,sy:o,selected:[]}}}},{key:"ondragmove_selbox",value:function(t,e){var n=e.origin;if(n.stuck){var r=this.transcoordC2S(t.offsetX,t.offsetY),o=r.x,i=r.y;e.deliverer,this.selbox&&(this.selbox.ex=o,this.selbox.ey=i,Fi(this,n,this.selbox,t.shiftKey),this.invalidate())}}},{key:"ondragend_selbox",value:function(t,e){e.origin.stuck&&(this.last_pos=null,this.selbox=null,Fi(this,null,null,!1,!0),this.invalidate())}}])&&Ti(e.prototype,n),r&&Ti(e,r),i}(Qr);function Di(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)}}mn.register("selection-layer",Ni);var Ui=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.params=Object.assign({},e)}var e,n,r;return e=t,(n=[{key:"excute",value:function(){}}])&&Di(e.prototype,n),r&&Di(e,r),t}();function Yi(t){return(Yi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Gi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wi(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 Hi(t,e){return(Hi=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Vi(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=qi(t);if(e){var o=qi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Xi(this,n)}}function Xi(t,e){return!e||"object"!==Yi(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function qi(t){return(qi=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ki=function(t){!function(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&&Hi(t,e)}(i,t);var e,n,r,o=Vi(i);function i(){return Gi(this,i),o.apply(this,arguments)}return e=i,r=[{key:"before",value:function(t){return t.map((function(t){return{component:t}}))}},{key:"after",value:function(t,e){e.execute(null,!1)}},{key:"around",value:function(t,e,n){e.call(n),t.execute(null,!1)}}],(n=[{key:"execute",value:function(){this.params.changes.forEach((function(t){return t.component.set(t.after)}))}}])&&Wi(e.prototype,n),r&&Wi(e,r),i}(Ui);function Qi(t){return(Qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ji(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Zi(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 $i(t,e){return($i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ta(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=na(t);if(e){var o=na(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ea(this,n)}}function ea(t,e){return!e||"object"!==Qi(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function na(t){return(na=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ra(t){for(var e=0;t&&!t.isRootModel();)e+=t.get("rotation")||0,t=t.parent;return e%(2*Math.PI)}var oa=function(t){!function(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&&$i(t,e)}(i,t);var e,n,r,o=ta(i);function i(){return Ji(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"execute",value:function(){this.params.changes.forEach((function(t){var e=t.component,n=t.to_container,r=t.to_index,o=t.to_left,i=t.to_top,a=(t.hint,function(t){if(t.isRootModel())return t.bounds;var e=t.bounds,n=t.rotatePoint,r=n;return{left:(r=t.transcoordS2T(r.x,r.y)).x-(n.x-e.left),top:r.y-(n.y-e.top),width:e.width,height:e.height}}(e)),u=ra(e);if(e.removeSelf(!n),e.bounds=a,e.set("rotation",u),n){e.set("rotation",function(t,e){return((t.get("rotation")||0)-ra(e))%(2*Math.PI)}(e,n));var c=function(t,e){if(e.isRootModel())return t.bounds;var n=t.bounds,r=t.rotatePoint,o=e.transcoordT2S(r.x,r.y),i=e.bounds;return{left:o.x-(r.x-n.left)-i.left,top:o.y-(r.y-n.top)-i.top,width:n.width,height:n.height}}(e,n);t.to_left=void 0!==o?o:c.left,t.to_top=void 0!==i?i:c.top,e.bounds={left:t.to_left,top:t.to_top,width:c.width,height:c.height},void 0===r?n.addComponent(e):n.insertComponentAt(e,r)}}))}}])&&Zi(e.prototype,n),r&&Zi(e,r),i}(Ui);function ia(t,e){var n=mn.register(t.type);if(!n)return ye("Class not found",t.type),null;var r=new n(t,e);return t.components&&r.isContainer()&&(t.components.forEach((function(t){var n=ia(t,e);n&&r.addComponent(n)})),delete t.components),r.created(),r}function aa(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)}}var ua=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.layer=e}var e,n,r;return e=t,(n=[{key:"draw",value:function(t,e,n){var r=e.bounds;0!=r.width&&0!=r.height&&(t.beginPath(),t.rect(r.left,r.top,r.width,r.height),t.clip(),t.beginPath(),t.strokeStyle="#f26522",t.lineWidth=4,t.shadowBlur=10,t.shadowColor="black",t.shadowOffsetX=0,t.shadowOffsetY=0,t.rect(r.left,r.top,r.width,r.height),t.stroke(),t.closePath())}}])&&aa(e.prototype,n),r&&aa(e,r),t}();function ca(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)}}var sa=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.layer=e}var e,n,r;return e=t,(n=[{key:"draw",value:function(t,e,n){var r=e.bounds;t.beginPath(),t.rect(r.left,r.top,r.width,r.height),t.setLineDash([3/n.x,4/n.y]),t.lineWidth=1/n.x,t.strokeStyle="black",t.stroke(),t.setLineDash([]),t.closePath()}}])&&ca(e.prototype,n),r&&ca(e,r),t}();function fa(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)}}var la=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.layer=e}var e,n,r;return e=t,(n=[{key:"reset",value:function(){this.active=null}},{key:"selected",get:function(){return this.layer.selected}},{key:"contains",value:function(t,e,n,r){var o=this,i=n.controls;return!!i&&(i.every((function(i,a){return Math.abs(t-i.x)<=4/r.x&&Math.abs(e-i.y)<=4/r.y&&(o.active={component:n,index:a,handler:i.handler}),!o.active})),!!this.active)}},{key:"draw",value:function(t,e,n){var r=e.controls;r&&r.forEach((function(e,r){t.beginPath(),t.lineWidth=1/n.x,t.ellipse(e.x,e.y,4/n.x,4/n.y,0,0,2*Math.PI,!0),t.fillStyle="#ff5d72",t.fill(),t.strokeStyle="#fff",t.stroke()}))}},{key:"onevent",value:function(t,e){var n=this.active,r=n.handler,o=n.component,i=n.index,a=o.transcoordC2S(e.offsetX,e.offsetY);a=o.transcoordS2P(a.x,a.y),r&&"function"==typeof r[t]&&r[t](a,i,o)}},{key:"onmousedown",value:function(t){this.onevent("onmousedown",t)}},{key:"ondragstart",value:function(t){var e=this.active;e.changes=Ki.before([e.component]),this.onevent("ondragstart",t)}},{key:"ondragmove",value:function(t){this.onevent("ondragmove",t)}},{key:"ondragend",value:function(t){this.onevent("ondragend",t);var e=this.active,n=e.component,r=e.changes;Ki.after(r,n.app.commander),n.parent&&n.parent.calculateBounds&&n.parent.calculateBounds()}}])&&fa(e.prototype,n),r&&fa(e,r),t}();function ha(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 pa(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}var ya=15*Math.PI/180,da=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.layer=e}var e,n,r;return e=t,(n=[{key:"reset",value:function(){this.active=null}},{key:"selected",get:function(){return this.layer.selected}},{key:"contains",value:function(t,e,n,r){var o=this;return!!n.mutable&&(n.path.every((function(i,a){return Math.abs(t-i.x)<=4/r.x&&Math.abs(e-i.y)<=4/r.y&&(o.active={component:n,index:a}),!o.active})),!!this.active)}},{key:"draw",value:function(t,e,n){if(e.mutable&&!e.stuck){var r=e.path,o=this.active;r.forEach((function(r,i){t.beginPath(),t.ellipse(r.x,r.y,4/n.x,4/n.y,0,0,2*Math.PI,!0),t.lineWidth=1/n.x,t.strokeStyle="#656565",t.fillStyle="#fff",o&&o.component===e&&o.index===i&&(t.strokeStyle="#fa7703",o.toFill&&(t.fillStyle="#ffb80c")),t.fill(),t.stroke()}))}}},{key:"ondblclick",value:function(t){var e=this.active.component;if(e.pathExtendable){var n=e.path.slice();n.length<4||(n.splice(this.active.index,1),e.path=n)}}},{key:"onmousedown",value:function(t){this.active.toFill=!0}},{key:"ondragstart",value:function(t){var e=this.active;e.changes=Ki.before([e.component])}},{key:"ondragmove",value:function(t){var e,n,r=this.active,o=r.component,i=r.index,a=o.transcoordC2S(t.offsetX,t.offsetY);if(a=o.transcoordS2P(a.x,a.y),t.shiftKey){var u=o.path.length,c=o.isLine()&&0==i?o.path[1]:o.path[(i-1+u)%u];c=o.transcoordS2P(c.x,c.y);var s,f=0;u>2&&(o.isLine()?0==i?s=o.path[2]:1!=i&&(s=o.path[i-2]):s=o.path[(i-2+u)%u],s&&(f=pa(s=o.transcoordS2P(s.x,s.y),c)));var l=Math.round((pa(c,a)-f)/ya)*ya+f;a=function(t,e,n){return{x:Math.cos(e)*n+t.x,y:Math.sin(e)*n+t.y}}(c,l,(e=c,n=a,Math.sqrt((n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y))))}o.mutatePath(null,(function(t){t[i]=a}))}},{key:"ondragend",value:function(t){var e=this.active,n=e.component,r=e.changes;Ki.after(r,n.app.commander),n.parent&&n.parent.calculateBounds&&n.parent.calculateBounds()}}])&&ha(e.prototype,n),r&&ha(e,r),t}();function va(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 ga(t,e,n){var r,o,i=t.bounds,a=i.left,u=i.top,c=i.width,s=i.height;switch(e){case 0:r=a,o=u;break;case 1:r=a+c/2,o=u;break;case 2:r=a+c,o=u;break;case 3:r=a+c,o=u+s/2;break;case 4:r=a+c,o=u+s;break;case 5:r=a+c/2,o=u+s;break;case 6:r=a,o=u+s;break;case 7:r=a,o=u+s/2}var f=r,l=o,h=t.transcoordT2S(n.x,n.y);return{dx:h.x-f,dy:h.y-l}}function ma(t,e,n,r,o,i){var a=t.bounds,u=a.left,c=a.top,s=a.width,f=a.height,l={left:u,top:c,width:s,height:f};switch(e){case 0:u+=r,c+=o,s-=r,f-=o;break;case 1:c+=o,f-=o;break;case 2:c+=o,s+=r,f-=o;break;case 3:s+=r;break;case 4:s+=r,f+=o;break;case 5:f+=o;break;case 6:u+=r,s-=r,f+=o;break;case 7:u+=r,s-=r}if(t.mutateBounds((function(e){return Math.abs(s)<=.001&&(s=.001),Math.abs(f)<=.001&&(f=.001),t.adjustResize({left:u,top:c,width:s,height:f},l,n)}),this),t.isContainer()&&t.layout.ABSOLUTE&&!t.isGroup()){var h=l.left-u,p=l.top-c;i?t.components.forEach((function(t){t.delta("tx",0),t.delta("ty",0),t.move({x:h,y:p})})):t.components.forEach((function(t){t.delta("tx",h),t.delta("ty",p)}))}else{var y=i&&t.parent;y&&y.isGroup()&&y.calculateBounds()}}function ba(t){var e=t.left,n=t.top,r=t.width,o=t.height,i=e+r/2,a=n+o/2,u=e+r,c=n+o;return[{x:e,y:n},{x:i,y:n},{x:u,y:n},{x:u,y:a},{x:u,y:c},{x:i,y:c},{x:e,y:c},{x:e,y:a}]}var wa=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.layer=e}var e,n,r;return e=t,(n=[{key:"reset",value:function(){this.active=null}},{key:"selected",get:function(){return this.layer.selected}},{key:"contains",value:function(t,e,n,r){var o=this;return!!n.resizable&&(ba(n.bounds).every((function(i,a){return Math.abs(t-i.x)<=4/r.x&&Math.abs(e-i.y)<=4/r.y&&(o.active={component:n,index:a}),!o.active})),!!this.active)}},{key:"draw",value:function(t,e,n){if(!e.isLine()){var r=e.bounds;if(t.beginPath(),t.rect(r.left,r.top,r.width,r.height),t.setLineDash([3/n.x,4/n.y]),t.lineWidth=1/n.x,t.strokeStyle="black",t.stroke(),t.setLineDash([]),e.resizable){var o=this.active;ba(r).forEach((function(r,i){t.beginPath(),t.rect(r.x-4/n.x,r.y-4/n.y,8/n.x,8/n.y),t.setLineDash([0,0]),t.strokeStyle="#656565",t.stroke(),t.fillStyle="#fff",o&&o.component===e&&o.index===i&&(t.strokeStyle="#fa7703",o.focus&&(t.fillStyle="#ffb80c")),t.fill(),t.stroke()}))}}}},{key:"onmousedown",value:function(t){this.active.focus=!0}},{key:"ondragstart",value:function(t){var e=this.active.component;this.active.bounds=e.bounds,this.active.boundsList=this.layer.selected.filter((function(t){return t.resizable})).map((function(t){return t.bounds}))}},{key:"ondragmove",value:function(t){var e=this.active,n=e.component,r=e.index,o=e.boundsList,i=e.bounds,a=this.layer.transcoordC2S(t.offsetX,t.offsetY);n.bounds=i;var u=ga(n,r,a);this.layer.selected.filter((function(t){return t.resizable})).forEach((function(e,n){e.bounds=o[n],ma(e,r,t.shiftKey,u.dx,u.dy,!1)}))}},{key:"ondragend",value:function(t){var e=this.active,n=e.component,r=e.index,o=e.boundsList,i=e.bounds,a=this.layer.transcoordC2S(t.offsetX,t.offsetY);n.bounds=i;var u=ga(n,r,a);this.layer.selected.filter((function(t){return t.resizable})).forEach((function(e,n){e.bounds=o[n],ma(e,r,t.shiftKey,u.dx,u.dy,!0)})),this.active.component.app.commander.execute(null,!1)}}])&&va(e.prototype,n),r&&va(e,r),t}();function xa(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)}}var _a=2*Math.PI,ka=Math.PI/2;function Aa(t,e){var n=t.bounds;return{x:n.left+n.width/2,y:n.top-20/e.y}}var Sa=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.layer=e}var e,n,r;return e=t,(n=[{key:"reset",value:function(){this.active=null}},{key:"selected",get:function(){return this.layer.selected}},{key:"contains",value:function(t,e,n,r){if(!n.rotatable)return!1;var o=Aa(n,r);return Math.abs(t-o.x)<=4/r.x&&Math.abs(e-o.y)<=4/r.y&&(this.active={component:n},!0)}},{key:"draw",value:function(t,e,n){if(e.rotatable){t.beginPath();var r=Aa(e,n);t.lineWidth=1.5/n.x,t.moveTo(r.x,r.y+20/n.y),t.lineTo(r.x,r.y),t.strokeStyle="#656565",t.stroke(),t.beginPath(),t.ellipse(r.x,r.y,4/n.x,4/n.y,0,0,_a,!0),t.stroke(),t.fillStyle="#fff",t.fill();var o=this.active;o&&o.component===e&&(t.strokeStyle="#fa7703",t.stroke(),o.toFill&&(t.fillStyle="#ffb80c",t.fill()))}}},{key:"onmousedown",value:function(t){this.active.toFill=!0}},{key:"ondragstart",value:function(t){var e=this.active;e.component,e.start_rotation=e.component.get("rotation"),e.rotations=this.layer.selected.filter((function(t){return t.rotatable})).map((function(t){return t.get("rotation")}))}},{key:"ondragmove",value:function(t){var e=this.active.component,n=e.transcoordC2S(t.offsetX,t.offsetY);n=e.transcoordS2P(n.x,n.y);var r=e.rotatePoint,o=e.get("rotation")||0,i=Math.atan((r.y-n.y)/(r.x-n.x)),a=(i=r.x>=n.x?i-ka:ka+i)-o;this.layer.selected.filter((function(t){return t.rotatable})).forEach((function(e,n){var r=((e.get("rotation")||0)+a)%_a;e.set("rotation",e.adjustRotation(r,t.shiftKey))}))}},{key:"ondragend",value:function(t){var e=this.active,n=e.component;e.rotations,n.app.commander.execute(null,!1)}}])&&xa(e.prototype,n),r&&xa(e,r),t}();function Oa(t){return(Oa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ea(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 Pa(t,e){return(Pa=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ja(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=Ta(t);if(e){var o=Ta(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ma(this,n)}}function Ma(t,e){return!e||"object"!==Oa(e)&&"function"!=typeof e?Ra(t):e}function Ra(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ta(t){return(Ta=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ia=function(t){!function(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&&Pa(t,e)}(i,t);var e,n,r,o=ja(i);function i(t,e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),n=o.call(this,t,e);var r=new da(Ra(n)),a=new la(Ra(n)),u=new wa(Ra(n)),c=new Sa(Ra(n));return n._modelers=[r,a,u,c],n._control_mode_modelers=[a,r,u,c],n.focusOutline=new ua(Ra(n)),n.groupOutline=new sa(Ra(n)),n._reversed_modelers=n._modelers.slice().reverse(),n._control_mode_reverse_modelers=n._control_mode_modelers.slice().reverse(),n}return e=i,(n=[{key:"modelers",get:function(){return this._control_mode?this._control_mode_modelers:this._modelers}},{key:"reversedModelers",get:function(){return this._control_mode?this._control_mode_reverse_modelers:this._reversed_modelers}},{key:"ready",value:function(){var t=this.rootModel,e=t.get("translate"),n=t.get("scale");this.set("translate",e),this.set("scale",n)}},{key:"contains",value:function(t,e){if(this._state_dragging)return!0;this.modelers.forEach((function(t){return t.reset()}));for(var n=this.selected.filter((function(t){return!!t.parent})),r=this.get("scale")||{x:1,y:1},o=0;o<n.length;o++)for(var i=n[o],a=i.transcoordT2S(t,e),u=0;u<this.modelers.length;u++){var c=this.modelers[u];if(c.contains(a.x,a.y,i,r))return this.currentModeler=c,!0}return!1}},{key:"_componentDrawer",value:function(t,e,n,r){var o=[],i=e.parent;if(e.isRootModel())return t.save(),r(t,e,n),void t.restore();for(;i&&!i.isRootModel();)o.push(i),i=i.parent;t.save(),o.reverse().forEach((function(e){var n=e.rotatePoint;t.translate(n.x,n.y);var r=e.get("scale");r&&t.scale(r.x,r.y),t.rotate(e.get("rotation")),t.translate(-n.x,-n.y);var o=e.bounds;t.translate(o.left,o.top)}));var a=e.rotatePoint;t.translate(a.x,a.y);var u=e.get("scale");u&&t.scale(u.x,u.y),t.rotate(e.get("rotation")),t.translate(-a.x,-a.y),r(t,e,n),t.restore()}},{key:"prerender",value:function(t){var e=this.model,n=e.translate,r=e.scale,o=void 0===r?{x:1,y:1}:r,i=e.rotation;t.save(),t.beginPath(),t.clearRect(0,0,t.canvas.width,t.canvas.height),t.rect(0,0,t.canvas.width,t.canvas.height),t.fillStyle="black",t.globalAlpha=.5,t.fill(),t.restore(),n&&t.translate(n.x*ne,n.y*ne),t.scale(o.x*ne,o.y*ne),i&&t.rotate(i),t.clearRect(0,0,this.rootModel.get("width"),this.rootModel.get("height"))}},{key:"render",value:function(t){var e=this;t.beginPath();var n=this.get("scale")||{x:1,y:1},r=this.selected.filter((function(t){return!!t.parent}));if(this.focused&&this._componentDrawer(t,this.focused,n,(function(t,n,r){e.focusOutline.draw(t,n,r)})),r.length>0&&r[0].parent.isGroup()){for(var o=r[0].parent;o.parent.isGroup();)o=o.parent;this._componentDrawer(t,o,n,(function(t,n,r){e.groupOutline.draw(t,n,r)}))}r.forEach((function(r){e._componentDrawer(t,r,n,(function(t,n,r){e.reversedModelers.forEach((function(e){return e.draw(t,n,r)}))}))}))}},{key:"eventMap",get:function(){return{"model-layer":{"(all)":{change:this.onchange_model,wheel:this.onwheel_scale,drop:this.ondrop}},"(root)":{"(self)":{selected:this.onselected,keydown:this.onkeydown,keyup:this.onkeyup}}}}},{key:"onkeydown",value:function(t){"Alt"==t.key&&(this._control_mode=!0,this.invalidate())}},{key:"onkeyup",value:function(t){"Alt"==t.key&&(this._control_mode=!1,this.invalidate())}},{key:"onselected",value:function(t,e){this.invalidate()}},{key:"onchange_model",value:function(t,e,n){n.origin===n.deliverer&&(t.translate&&this.set("translate",t.translate),void 0!==t.rotation&&this.set("rotation",t.rotation),t.scale&&this.set("scale",t.scale)),this.invalidate()}},{key:"ondblclick",value:function(t){"function"==typeof this.currentModeler.ondblclick&&this.currentModeler.ondblclick(t),this.invalidate()}},{key:"onmousedown",value:function(t){this.currentModeler.onmousedown(t),this.invalidate()}},{key:"onmouseup",value:function(t){"function"==typeof this.currentModeler.onmouseup&&this.currentModeler.onmouseup(t),this.invalidate()}},{key:"onmouseenter",value:function(t,e){this.invalidate()}},{key:"onmouseleave",value:function(t,e){this.invalidate()}},{key:"ondragstart",value:function(t){this.currentModeler.ondragstart(t),this._state_dragging=!0}},{key:"ondragmove",value:function(t){this.currentModeler.ondragmove(t),this.invalidate()}},{key:"ondragend",value:function(t){this._state_dragging=!1,this.currentModeler.ondragend(t),this.invalidate()}},{key:"ondrop",value:function(t,e){var n=this,r=e.origin,o=t.dataTransfer.files;if(!(o.length<1)){var i=this.rootModel.transcoordC2S(t.offsetX,t.offsetY),a=this.rootModel;Promise.all(Array.from(o).map((function(t){return new Promise((function(e,n){var r=new FileReader;r.addEventListener("loadend",(function(t){e(r.result)})),["error","abort"].forEach((function(t){return r.addEventListener(t,(function(t){n(t)}))})),r.readAsDataURL(t)}))}))).then((function(e){if(t.altKey)return Ki.around(n.app.commander,(function(){r.ondropfile(o,e)})),void(n.selected=[r]);var u=[],c=e.map((function(t,e){var n,r=o[e].type,c=o[e].name;return r.startsWith("image/")?(n=ia({type:r.startsWith("image/gif")?"gif-view":"image-view",top:0,left:0,width:200,height:200,src:t},a.app),u.push(new Promise((function(e,r){var o=new Image;o.src=t,o.onload=function(){n.set({width:o.width,height:o.height}),e()},o.onerror=function(t){r(t)}})))):r.startsWith("audio/")?n=ia({type:"audio",top:0,left:0,width:100,height:100,src:t},a.app):r.startsWith("vnd.ms-excel/")||/\.xlsx?$/.test(c)?n=ia({type:"excel",top:0,left:0,width:100,height:100,src:t},a.app):console.log("droped file",o[e]),n&&(n.center=i,i.x+=50,i.y+=50),n})).filter((function(t){return t})).map((function(t){return{component:t,to_container:a}}));c.length>0&&Promise.all(u).then((function(){n.app.commander.execute(new oa({changes:c})),n.selected=c.map((function(t){return t.component}))}),(function(t){console.error(t)}))}),(function(t){console.error(t)}))}}},{key:"onwheel_scale",value:function(t,e){if(0!=t.deltaY||0!=t.deltaX){var n=e.deliverer;if(t.shiftKey){if(-1!=navigator.userAgent.indexOf("Win"))var r=t.deltaY<0?1:-1;else r=t.deltaX<0?1:-1;Ki.around(this.app.commander,(function(){n.selected.forEach((function(t){var e=t.get("fontSize")||ie.FONT_SIZE;e<1&&(e=1),e+=r,t.set("fontSize",e)}))}))}else{r=t.deltaY<0?1:-1;var o=n.get("scale")||{x:1,y:1},i=n.get("translate"),a=t.offsetX,u=t.offsetY,c=n.transcoordC2S(a,u),s=.1*r,f={x:o.x+s,y:o.y+s};if(r<0&&o.x<.2||r>0&&o.x>10)return;n.set("scale",f);var l=n.transcoordC2S(a,u);n.set("translate",{x:i.x+(l.x-c.x)*f.x,y:i.y+(l.y-c.y)*f.y})}}}}])&&Ea(e.prototype,n),r&&Ea(e,r),i}(Qr);function Ca(t){return(Ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function za(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 Ba(t,e){return(Ba=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function La(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=Na(t);if(e){var o=Na(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Fa(this,n)}}function Fa(t,e){return!e||"object"!==Ca(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Na(t){return(Na=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("modeling-layer",Ia);var Da=225*Math.PI/180,Ua=135*Math.PI/180,Ya=function(t){!function(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&&Ba(t,e)}(i,t);var e,n,r,o=La(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e))._anim_alpha=1,n}return e=i,(n=[{key:"_drawArrow",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,o=n.x-e.x,i=n.y-e.y,a=Math.atan2(i,o),u=n.x+r*Math.cos(a+Da),c=n.y+r*Math.sin(a+Da),s=n.x+r*Math.cos(a+Ua),f=n.y+r*Math.sin(a+Ua);t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(n.x,n.y),t.moveTo(n.x,n.y),t.lineTo(u,c),t.moveTo(n.x,n.y),t.lineTo(s,f),t.stroke()}},{key:"animOnTargetChange",value:function(t){var e=this;t!==this._lastTargets&&(this._lastTargets=t,this._anim_alpha=1,this.animate({step:function(t){e._anim_alpha=1-t*t,e.invalidate()},duration:5e3,delta:"linear",options:{x:1},ease:"out"}).start())}},{key:"render",value:function(t){var e=this,n=this.targets&&this.targets.filter((function(t){return t.rootModel}));if(!n||0==n.length)return this._animate&&this._animate.stop(),void delete this._animate;var r=!1;n.forEach((function(n){var o=n.tag;if(t.globalAlpha*=e._anim_alpha,o){var i=o,a=n.bounds,u=a.left,c=a.top,s=n.transcoordS2C(u,c,n.rootModel),f=s.x,l=s.y;f=Math.max(f,0),l=Math.max(l-18,0),t.font="12px Arial";var h=t.measureText(i);t.fillStyle="#FF0000",t.fillRect(f,l,h.width+6,16),t.fillStyle="white",t.fillText(i,f+3,l+13),r=!0}t.lineWidth=2,t.strokeStyle="orange",n.mappings&&n.mappings.forEach((function(o){var i=e.root.findAll(o.target,n);i&&i.forEach((function(r){var o=n.center,i=r.center;o=n.transcoordS2C(o.x,o.y,n.rootModel),i=r.transcoordS2C(i.x,i.y,r.rootModel),e._drawArrow(t,o,i)})),r=!0}))})),r&&this.animOnTargetChange(this.targets)}},{key:"targets",get:function(){return this._targets},set:function(t){this._targets=t&&t.filter((function(t){return!t.isLayer()})),this.invalidate()}},{key:"_ontag",value:function(t){this.targets&&-1!==this.targets.lastIndexOf(t)||(this.targets=(this.targets||[]).concat(t))}},{key:"_offtag",value:function(t){if(this.targets){var e=this.targets.slice();e.splice(this.targets.lastIndexOf(t),1),this.targets=e}}},{key:"_resettag",value:function(){this.targets=[]}},{key:"ontagreset",value:function(t,e){this._resettag()}},{key:"ontag",value:function(t,e){this._ontag(e.origin)}},{key:"offtag",value:function(t,e){this._offtag(e.origin)}},{key:"onmouseenter",value:function(t,e){this._resettag(),this._ontag(e.origin)}},{key:"onmouseleave",value:function(t,e){this._resettag()}},{key:"eventMap",get:function(){return{"model-layer":{"(descendant)":{tag:this.ontag,tagreset:this.ontagreset,mouseenter:this.onmouseenter,mouseleave:this.onmouseleave}}}}}])&&za(e.prototype,n),r&&za(e,r),i}(Qr);function Ga(t){var e=b()(t.hierarchy);return void 0!==e.id&&delete e.id,ia(e,t.app)}function Wa(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 Ha(t,e,n,r,o){for(var i in n){var a=n[i];if(d(i,r.origin,0,t))for(var u in a){var c=a[u];u==r.name&&(r.listener=e,c.apply(e,o))}}}function Va(){var t=arguments,e=t[t.length-1],n=this.event_pump;n.listeners.forEach((function(r){Ha(n.deliverer,r.listener,r.cloned_handlers,e,t)}))}mn.register("tag-layer",Ya);var Xa=function(){function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),void 0===e.on)throw new Error("Deliverer should be a event handlable object.");this.deliverer=e,this.listeners=[]}var e,n,r;return e=t,(n=[{key:"start",value:function(){this.deliverer.on("(all)",Va,{event_pump:this})}},{key:"stop",value:function(){this.deliverer.off("(all)",Va)}},{key:"on",value:function(t,e){var n=Object.assign({},e);Object.keys(n).forEach((function(e){if(0==e.indexOf("?")){var r=n[e],o=e.substr(1),i=t.get(o);delete n[e],i?n[i]=r:ye("EventPump#on","variable #{selector} is not evaluated on listener")}})),this.listeners.push({listener:t,handlers:e,cloned_handlers:n})}},{key:"off",value:function(t,e){for(var n=0;n<this.listeners.length;n++){var r=this.listeners[n];r.listener!==t||e&&r.handlers!==e||this.listeners.splice(n,1)}}},{key:"clear",value:function(){this.listeners=[]}},{key:"dispose",value:function(){this.stop(),this.clear()}}])&&Wa(e.prototype,n),r&&Wa(e,r),t}();function qa(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)}}var Ka=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.eventMaps=[],this.root=e,e.eventMap&&this.add(e,e.eventMap)}var e,n,r;return e=t,(n=[{key:"root",get:function(){return this._root},set:function(t){this._root=t}},{key:"stop",value:function(){this.eventMaps.forEach((function(t){return t.eventPump.stop()}))}},{key:"add",value:function(t,e){var n=this;if(this.root){var r=function(r){var o=e[r];if("(self)"===r&&void 0===t.on)throw new Error("(self) selector not available when deliverer is not a event handlable object.");g(r,n.root,t).forEach((function(r){var i=new Xa(r);i.on(t,o),i.start(),n.eventMaps.push({eventPump:i,listener:t,handlerMap:e,deliverer:r})}))};for(var o in e)r(o)}}},{key:"remove",value:function(t,e){for(var n=this.eventMaps.slice(0),r=0;r<n.length;r++){var o=n[r];o.listener!==t||e&&o.handlerMap!==e||(this.eventMaps.splice(r,1),o.eventPump.dispose())}}},{key:"clear",value:function(){this.eventMaps.slice(0).forEach((function(t){return t.eventPump.dispose()})),this.eventMaps=[]}},{key:"dispose",value:function(){this.stop(),this.clear()}}])&&qa(e.prototype,n),r&&qa(e,r),t}();function Qa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ja(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 Za(t,e,n){return e&&Ja(t.prototype,e),n&&Ja(t,n),t}var $a=0,tu=1,eu=2,nu=0,ru=1,ou=2,iu={},au=0;var uu=function(){function t(e){Qa(this,t),this._type=e.type,this._ctrlKey=e.ctrlKey,this._altKey=e.altKey,this._shiftKey=e.shiftKey,this._metaKey=e.metaKey;var n=function(t){if(t.touches){var e=t.touches[0];if(!e)return iu;var n=e.target.getBoundingClientRect();return iu={x:t.offsetX||e.clientX-(n.x||n.left),y:t.offsetY||e.clientY-(n.y||n.top)}}return{x:t.offsetX,y:t.offsetY}}(e);if(this._offsetX=n.x,this._offsetY=n.y,"wheel"==e.type)this.deltaX=e.deltaX,this.deltaY=e.deltaY,this.deltaZ=e.deltaZ;else if("drop"==e.type)this.dataTransfer=e.dataTransfer;else if(e.type.match(/^touch/)&&(this._scale=e.scale,this._touches=e.touches,this._changedTouches=e.changedTouches,null==this._scale)){var r=function(t){var e,n,r=0,o=0,i=0;if(1===t.touches.length)return i;Array.from(t.touches).forEach((function(t){e=null!=e?Math.min(t.screenX,e):t.screenX,r=Math.max(t.screenX,r),n=null!=n?Math.min(t.screenY,n):t.screenY,o=Math.max(t.screenY,o)}));var a=r-e||0,u=o-n||0;return i=Math.sqrt(Math.pow(a,2)+Math.pow(u,2))||0}(e);au>0&&(this._scale=r/au),au=r}}return Za(t,[{key:"type",get:function(){return this._type},set:function(t){this._type=t}},{key:"offsetX",get:function(){return this._offsetX}},{key:"offsetY",get:function(){return this._offsetY}},{key:"altKey",get:function(){return this._altKey}},{key:"ctrlKey",get:function(){return this._ctrlKey}},{key:"shiftKey",get:function(){return this._shiftKey}},{key:"metaKey",get:function(){return this._metaKey}},{key:"touches",get:function(){return this._touches}},{key:"changedTouches",get:function(){return this._changedTouches}},{key:"scale",get:function(){return this._scale}},{key:"stopPropagation",value:function(){this._stop_=!0}},{key:"isPropagationStopped",value:function(){return this._stop_}}]),t}();function cu(t,e){return t.capture(e.offsetX,e.offsetY)}function su(t,e,n){if(t&&t.app&&(!t.app.isViewMode||!t.hidden)){(n=new uu(n)).type=e;var r="on"+e;t[r]&&t[r](n),n.isPropagationStopped()||t.trigger(e,n)}}var fu=function(){function t(e,n){var r=this;Qa(this,t),this.container=e,this.html_element=n,this.status=$a,this.last_target=null,this.gesture_handlers=re.map((function(t){return r.gestureHandlerBuilder(t)})),this.keyevent_handlers=oe.map((function(t){return r.keyeventHandlerBuilder(t)})),re.forEach((function(t,e){return n.addEventListener(t,r.gesture_handlers[e])})),oe.forEach((function(t,e){return n.addEventListener(t,r.keyevent_handlers[e])})),n.ondragover=this.gestureHandlerBuilder("dragover"),n.ondrop=this.gestureHandlerBuilder("drop"),n.tabIndex=1}return Za(t,[{key:"dispose",value:function(){var t=this;this.last_enter_target&&su(this.last_enter_target,"mouseleave",new CustomEvent("mouseleave")),re.forEach((function(e,n){return t.html_element.removeEventListener(e,t.gesture_handlers[n])})),oe.forEach((function(e,n){return t.html_element.removeEventListener(e,t.keyevent_handlers[n])})),delete this.gesture_handlers,delete this.keyevent_handlers,delete this.last_target}},{key:"gestureHandlerBuilder",value:function(t){var e=this["on".concat(t)].bind(this);return function(t){return e(new uu(t))&&t.preventDefault(),!1}}},{key:"keyeventHandlerBuilder",value:function(t){return this["on".concat(t)].bind(this)}},{key:"ondragover",value:function(t){return su(cu(this.container,t),t.type,t),!1}},{key:"ondrop",value:function(t){return su(cu(this.container,t),t.type,t),!1}},{key:"onclick",value:function(t){return su(cu(this.container,t),t.type,t),this.last_target=null,!1}},{key:"ondblclick",value:function(t){return su(cu(this.container,t),t.type,t),this.last_target=null,!1}},{key:"onkeydown",value:function(t){return this.container.trigger(t.type,t),!1}},{key:"onkeyup",value:function(t){return this.container.trigger(t.type,t),!1}},{key:"onmousemove",value:function(t){switch(this.status){case tu:var e=t.offsetX-this.__dragstart_e.offsetX,n=t.offsetY-this.__dragstart_e.offsetY;if(e*e+n*n<16)break;this.status=eu,su(this.last_target,"dragstart",this.__dragstart_e),this.__dragmove_e=t,su(this.last_target,"dragmove",t);break;case eu:this.__dragmove_e=t,su(this.last_target,"dragmove",t);break;default:var r=cu(this.container,t);this.last_enter_target!==r&&(this.last_enter_target&&su(this.last_enter_target,"mouseleave",t),r&&su(r,"mouseenter",t),this.last_enter_target=r),su(r,t.type,t),this.last_target=r}return!1}},{key:"onmousedown",value:function(t){switch(this.status){case eu:su(this.last_target,"dragend",t),this.last_target=null,this.status=$a;break;default:var e=cu(this.container,t);this.last_target=e,this.status=tu,this.__dragstart_e=t,su(e,t.type,t)}return!1}},{key:"onmouseup",value:function(t){switch(this.status){case eu:su(this.last_target,"dragend",t);break;default:su(cu(this.container,t),t.type,t)}return this.last_target=null,this.status=$a,!1}},{key:"onmouseout",value:function(t){var e=cu(this.container,t);switch(this.status){case eu:su(this.last_target,"dragend",t);break;default:if(this.last_target&&this.last_target===e)return;this.last_enter_target&&(su(this.last_enter_target,"mouseleave",t),delete this.last_enter_target)}return this.last_target=null,this.status=$a,!1}},{key:"ontouchstart",value:function(t){var e=this,n=cu(this.container,t);return this.last_target=n,this.status=ru,this.touchPoints||(this.touchPoints=[]),this.touchPoints.push(t.changedTouches[0]),this.holdTimer=setTimeout((function(){e.status=nu,su(e.last_target,"hold",t),delete e.holdTimer}),500),su(n,t.type,t),!1}},{key:"ontouchmove",value:function(t){var e=this;if(!t.touches||!t.changedTouches)return su(this.last_target,"dragstart",t),su(this.last_target,"dragmove",t),!1;var n=cu(this.container,t);switch(this.status){case ru:Array.from(t.changedTouches).forEach((function(t){var n=e.touchPoints.find((function(e){return e.identifier===t.identifier}));if(n){var r=n.clientX-t.clientX,o=n.clientY-t.clientY;return Math.sqrt(Math.pow(r,2)+Math.pow(o,2))>=16?(e.status=ou,void(e.holdTimer&&(clearTimeout(e.holdTimer),delete e.holdTimer))):void 0}}));break;case ou:if(this.holdTimer&&(clearTimeout(this.holdTimer),delete this.holdTimer),2===t.changedTouches.length&&null!=t.scale&&1!==t.scale&&(t.scale<.9||t.scale>1.1))return su(this.last_target,"pinch",t),!1;su(this.last_target,"pan",t),n=this.last_target;break;default:this.last_enter_target!==n&&(this.last_enter_target&&su(this.last_enter_target,"mouseleave",t),n&&su(n,"mouseenter",t),this.last_enter_target=n),this.last_target=n}return su(n,"touchmove",t),!1}},{key:"ontouchend",value:function(t){var e=cu(this.container,t);switch(this.status){case ou:e=this.last_target;break;case ru:var n=performance.now(),r=n-this.touchedAt;this.holdTimer&&(clearTimeout(this.holdTimer),delete this.holdTimer,su(e,r<500?"doubletap":"tap",t),this.touchedAt=n)}su(e,"touchend",t);var o=this.touchPoints.findIndex((function(e){return e.identifier===t.changedTouches[0].identifier}));return this.touchPoints.splice(o,1),this.last_target=null,this.status=nu,!1}},{key:"onwheel",value:function(t){return su(cu(this.container,t),t.type,t),!1}}]),t}(),lu={};var hu={register:function(t,e){lu[t]=e},unregister:function(t){delete lu[t]},get:function(t){return lu[t]}};function pu(t){if(t.hasTextProperty&&!t.textHidden){var e=t.model,n=e.text,r=void 0===n?"":n,o=e.rotation,i=e.bold,a=void 0===i?ie.BOLD:i,u=e.italic,c=void 0===u?ie.ITALIC:u,s=e.textWrap,f=void 0===s?ie.TEXT_WRAP:s,l=e.fontFamily,h=void 0===l?ie.FONT_FAMILY:l,p=e.fontColor,y=void 0===p?ie.FONT_COLOR:p,d=e.textAlign,v=void 0===d?ie.TEXT_ALIGN:d,g=e.textBaseline,m=void 0===g?ie.TEXT_BASELINE:g,b=e.paddingTop,w=void 0===b?0:b,x=e.paddingBottom,_=void 0===x?0:x,k=e.paddingLeft,A=void 0===k?0:k,S=e.paddingRight,O=void 0===S?0:S,E=e.fontSize,P=void 0===E?ie.FONT_SIZE:E,j=e.lineHeight,M=void 0===j?1.2*P:j,R=t.bounds,T=R.left,I=R.top,C=R.width,z=R.height;t.textHidden=!0;var B=document.createElement("textarea");re.forEach((function(t){B.addEventListener(t,(function(t){t.stopPropagation()}),!0)}));var L=t.transcoordS2C(T,I),F=function(t){for(var e=0,n=1,r=t;r;){e+=r.get("rotation")||0;var o=r.get("scale")||{x:1,y:1},i=o.x,a=o.y;n*=Math.max(i,a)||1,r=r.parent}return{rotation:e,scale:n}}(t),N=F.rotation,D=F.scale,U=C-A-O,Y=U,G=z-w-_;switch(B.style.position="absolute",B.style.width=Y+"px",B.style.height=G+"px",B.style.paddingLeft=Math.max(A,0)+"px",B.style.paddingRight=O+"px",B.style.paddingTop=Math.max(w,0)+"px",B.style.paddingBottom=_+"px",B.value=r,B.style.fontFamily=h,B.style.fontSize=P+"px",B.style.lineHeight=M+"px",B.style.overflow="hidden",B.style.resize="none",B.style.outline="none",B.style.border=0,B.style.backgroundColor="transparent",B.style.display="inline-block",B.style.color=y,a&&(B.style.fontWeight="bold"),c&&(B.style.fontStyle="italic"),v){case"right":case"end":B.style.textAlign="right";break;case"justify":B.style.textAlign="justify";break;case"left":case"start":B.style.textAlign="left";break;case"center":default:B.style.textAlign="center"}var W=[a,c,P+"px",h].filter((function(t){return!!t})).join(" ");K(r);var H=t.root.target_element;H.appendChild(B),B.select();var V,X=!1;B.addEventListener("keydown",(function(t){t.stopPropagation(),"Escape"!=t.code&&(t.shiftKey||"Enter"!=t.code&&"NumpadEnter"!=t.code)?setTimeout((function(){K(B.value)})):(X=V.skipUpdate="Escape"==t.code,document.createEvent?B.dispatchEvent(V):B.fireEvent(V.eventType,V))})),document.createEvent?(V=document.createEvent("HTMLEvents")).initEvent("blur",!0,!1):(V=document.createEventObject()).eventType="blur";var q=t.root.selected;B.addEventListener("blur",(function e(n){t.root.selected=q,t.textHidden=!1,B.removeEventListener("blur",e,!1),B.parentElement&&B.parentElement.removeChild(B),H.focus(),n.skipUpdate||X||t.app.commander.execute(new Ki({changes:[{component:t,before:{text:r},after:{text:B.value}}]}))}),!1)}function K(e){var n={left:0,top:0},r=M*function(t,e,n,r){var o,i=t.getContext();return i.save(),i.font=n,o=Ae(i,e,r,t.get("textWrap")).length,i.restore(),o}(t,e,W,U);switch(B.style.height=r+"px",m){case"top":case"hanging":break;case"bottom":case"alphabetic":n.top=G-r;break;case"middle":default:n.top=G/2-r/2}if(!f){var o=function(t,e,n,r){var o=e.split("\n"),i=r,a=t.getContext();return a.save(),a.font=n,o.forEach((function(t){var e=a.measureText(t).width;e>i&&(i=e)})),a.restore(),i}(t,e,W,U);switch(B.style.width=o+"px",v){case"right":case"end":n.left=U-o;break;case"left":case"start":break;case"center":case"justify":default:n.left=(U-o)/2}}B.style.marginLeft=n.left+"px",B.style.marginTop=n.top+"px";var i="translate(".concat(L.x,"px, ").concat(L.y,"px) scale(").concat(D,") rotate(").concat(N,"rad) perspective(1px)");["-webkit-","-moz-","-ms-","-o-",""].forEach((function(t){B.style[t+"transform"]=i,B.style[t+"transform-origin"]="".concat(-n.left,"px ").concat(-n.top,"px")}))}}hu.register("text-editor",{"(root)":{"(self)":{keydown:function(t,e){e.origin;var n=e.deliverer.selected;return!(1!==n.length||!n[0].hasTextProperty)&&(("Enter"==t.code||"NumpadEnter"==t.code)&&(pu(n[0]),t.preventDefault(),!0))}}},"model-layer":{"(descendant)":{dblclick:function(t,e){pu(e.origin)}}}});var yu=x()((function(t,e,n){if(n)t.focused=null;else{var r=[];e[0].parent.isGroup()?t.focused=e[0].parent:(e.forEach((function(t){t.path.forEach((function(e){r.push(t.transcoordS2T(e.x,e.y))}))})),t.focused=t.capturePath(r,e))}}),300);function du(t){return(du="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vu(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 gu(t,e,n){return(gu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_u(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function mu(t,e){return(mu=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function bu(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=_u(t);if(e){var o=_u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wu(this,n)}}function wu(t,e){return!e||"object"!==du(e)&&"function"!=typeof e?xu(t):e}function xu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _u(t){return(_u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}hu.register("move-handler",{"model-layer":{"(descendant)":{dragstart:function(t,e){var n=e.origin,r=e.deliverer;if(!n.stuck){var o=r.selected,i=r.selected.filter((function(t){return!t.stuck}));if(o.length!==i.length&&(o=r.selected=i),0!=o.length){var a=o[0].transcoordC2S(t.offsetX,t.offsetY);a=o[0].transcoordS2P(a.x,a.y),this.last_pos=a,this.direction=0,r.focused=o[0].parent,t.altKey?(r.selected=o.map((function(t){var e=Ga(t);return t.parent.addComponent(e),e})),this.duplicates=r.selected.map((function(t){return{component:t}}))):this.changes=Ki.before(o)}}},dragmove:function(t,e){var n=e.origin,r=e.deliverer;if(!n.stuck){var o=r.selected;if(0!=o.length){var i=o[0].transcoordC2S(t.offsetX,t.offsetY),a=i.x,u=i.y,c=o[0].transcoordS2P(a,u);t.shiftKey?2==this.direction&&(this.direction=0):this.direction=2;var s=c.x-this.last_pos.x,f=c.y-this.last_pos.y;if(0==this.direction){if(s*s+f*f<25)return;Math.abs(s)>Math.abs(f)?this.direction=3:this.direction=4}3==this.direction?f=0:4==this.direction&&(s=0),o.forEach((function(t){t.move({x:s,y:f})})),this.last_pos=c,yu(r,o)}}},dragend:function(t,e){var n=e.origin,r=e.deliverer;if(!n.stuck){var o=r.selected;if(0!=o.length){var i=n.parent,a=r.focused||e.deliverer;if(this.changes&&!a.isGroup())if(a&&a!==i){var u=this.changes.map((function(t){var e=t.component;t.before;return{component:e,to_container:a}}));r.app.commander.execute(new oa({changes:u}))}else Ki.after(this.changes,r.app.commander);else if(this.duplicates){this.duplicates=this.duplicates.map((function(t){return t.to_container=a,t}));var c=new oa({changes:this.duplicates});r.app.commander.execute(c)}o.forEach((function(t){t.parent&&t.parent.calculateBounds&&t.parent.calculateBounds()})),this.last_pos=null,this.changes=null,this.duplicates=null,yu(r,o,!0)}}}}},"(root)":{"(self)":{keydown:function(t,e){var n=e.origin,r=e.deliverer,o={},i=t.shiftKey?n.rootModel.MPP:1;switch(t.which){case 37:o.x=-i,o.y=0;break;case 38:o.x=0,o.y=-i;break;case 39:o.x=i,o.y=0;break;case 40:o.x=0,o.y=i;break;default:return}var a=r.selected;Ki.around(r.app.commander,(function(){a.forEach((function(t){!t.stuck&&t.move(o)}))}))}}}});var ku=[];"undefined"!=typeof window&&window.addEventListener("resize",(function(){ku.forEach((function(t){t.resize()}))}));var Au=function(t){!function(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&&mu(t,e)}(i,t);var e,n,r,o=bu(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),n=o.call(this,Object.assign({type:"root",scale:{x:1,y:1}},t||{}),e),t=t||{},n.fitMode=t.model&&t.model.fitMode,n._app=e,n.target_element=t.target_element,n.rebuildContentModel(n.model.model),ku.push(xu(n)),n}return e=i,(n=[{key:"dispose",value:function(){this._app&&this._app.dispose(),gu(_u(i.prototype),"dispose",this).call(this),this._disposeAllResources(),this.target_element=null,delete this._refresh_mapping_debouncer,cr(this);var t=ku.indexOf(this);t>=0&&ku.splice(t,1)}},{key:"isRoot",value:function(){return!0}},{key:"app",get:function(){return this._app}},{key:"target_element",get:function(){return this._target_element},set:function(t){this._ua_event_handler&&(this._ua_event_handler.dispose(),delete this._ua_event_handler),t&&(t.style.position="absolute",t.style.cursor="default",t.style.overflow="hidden",this._ua_event_handler=new fu(this,t)),this.forEach((function(e){return e.target=t})),this._target_element=t}},{key:"variable",value:function(t,e){var n=this.findById(t);if(!n){var r=this.findTemplateFor(t);if(!r)return;n=ia(Object.assign(b.a(r.hierarchy),{id:t,templatePrefix:""}),this.app),this.model_layer.addComponent(n)}if(void 0===e)return n.data;n.data=e,n.touch()}},{key:"buildVariables",value:function(t){var e=this;!t||t instanceof Array||(t=Object.keys(t).map((function(e){var n=t[e];return n.key=e,n}))),t&&t.forEach((function(t,n){var r=e.indexMap[t.key];if(r)r.set({data:t.value,mappings:t.mappings&&t.mappings.slice(),dataType:t.dataType});else{var o=ia({type:"variable",id:t.key,left:-120,top:0+20*n,strokeStyle:"black",width:100,height:20,dataType:t.type,data:t.value,mappings:t.mappings&&t.mappings.slice()},e.app);e.model_layer.addComponent(o)}}))}},{key:"unitScale",get:function(){switch(this.model_layer&&this.model_layer.get("unit")){case"mm":case"cm":case"in":return this.app.PPM/10;case"px":default:return 1}}},{key:"addTemplate",value:function(t,e){var n=this.templateMap[t];n&&pe("Template replaced (duplicated)",t,e,n),this.templateMap[t]=e,delete this.templatePrefixes}},{key:"removeTemplate",value:function(t,e){var n=this.templateMap[t];n!==e?ye("Removing template failed (different)",t,e,n):delete this.templateMap[t],delete this.templatePrefixes}},{key:"findTemplateFor",value:function(t){this.templatePrefixes||(this.templatePrefixes=Object.keys(this.templateMap).sort().reverse());var e=this.templatePrefixes.find((function(e){return t.startsWith(e)}));if(e)return this.templateMap[e]}},{key:"addIndex",value:function(t,e){var n=this.indexMap[t];n&&pe("Index replaced (duplicated)",t,e,n),this.indexMap[t]=e}},{key:"removeIndex",value:function(t,e){var n=this.indexMap[t];n!==e?ye("Removing index failed (different)",t,e,n):delete this.indexMap[t]}},{key:"findById",value:function(t){return this.indexMap[t]}},{key:"findOrCreate",value:function(t){var e=this.indexMap[t];if(!e){var n=this.findTemplateFor(t);n&&(e=ia(Object.assign(b.a(n.hierarchy),{id:t,templatePrefix:""}),this.app),this.model_layer.addComponent(e))}return e}},{key:"resize",value:function(){this.components.forEach((function(t){t.resize&&t.resize()})),this.invalidate()}},{key:"_disposeAllResources",value:function(){var t=this;this.selected=[],this._focused=null,this._ready=!1,this.eventEngine&&(this.assist_handlers&&this.assist_handlers.forEach((function(e){t.eventEngine.remove(e)})),this.eventEngine.dispose(),delete this.eventEngine),this.assist_layers&&this.assist_layers.forEach((function(e){e.dispose(),t.removeComponent(e)})),delete this.assist_layers,this.model_layer&&this.model_layer.dispose(),this.model_layer&&this.removeComponent(this.model_layer),delete this.model_layer,this.indexMap={},this.templateMap={}}},{key:"rebuildContentModel",value:function(t){var e=this;this._disposeAllResources(),this.eventEngine=new Ka(this),(t=t||{}).type="model-layer";var n=t.variables;delete t.variables,this.model_layer=ia(t,this.app),this.addComponent(this.model_layer),this.model_layer.target=this.target_element,n&&this.buildVariables(n),this.assist_layers=(this.model.layers||[]).map((function(t){var n=ia(t,e.app);return e.addComponent(n),n.target=e.target_element,n})),this.assist_handlers=(this.model.handlers||[]).map((function(t){var n={};return e.eventEngine.add(n,hu.get(t)),n})),this._ready=!0,this.traverse((function(t){return t.ready()}))}},{key:"root",get:function(){return this}},{key:"isReady",get:function(){return this._ready}},{key:"rootModel",get:function(){return this.model_layer}},{key:"stuck",get:function(){return!0}},{key:"data",get:function(){return Object.values(this.indexMap).reduce((function(t,e){return t[e.model.id]=e.data,t}),{})},set:function(t){for(var e in t){var n=this.findOrCreate(e);n&&(n.data=t[e])}}},{key:"selected",get:function(){return(this._selected||[]).filter((function(t){return t.parent}))},set:function(t){var e=this._selected;this._selected=t,this.trigger("selected",t,e)}},{key:"focused",get:function(){return this._focused},set:function(t){this._focused!==t&&(this._focused=t,this.invalidate())}},{key:"style",get:function(){return this._style},set:function(t){this._style=t,this._compiled_style=t}},{key:"hasTextProperty",get:function(){return!1}},{key:"render",value:function(){this.components.forEach((function(t){return t.draw()}))}},{key:"contains",value:function(t,e){return!0}},{key:"capturePath",value:function(t,e){return this.model_layer.capturePath(t,e)}},{key:"invalidate",value:function(){this.components.forEach((function(t){return t.invalidate()}))}},{key:"eventMap",get:function(){return{"(root)":{"(descendant)":{added:this.onadded,removed:this.onremoved,change:this.onchanged}}}}},{key:"refreshMappings",value:function(){if(!this._refresh_mapping_debouncer){if(this.disposed)return;this._refresh_mapping_debouncer=x.a((function t(e){e.executeMappings(),e.components&&e.components.forEach((function(e){return t(e)}))}),1e3)}this._refresh_mapping_debouncer(this.model_layer)}},{key:"_addTraverse",value:function(t){var e=this;t.components&&t.components.forEach((function(t){return e._addTraverse(t)}));var n=t.model,r=n.id,o=n.templatePrefix;r&&this.addIndex(r,t),o&&this.addTemplate(o,t);var i=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"object"!=P(e)&&(e={});for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.forEach((function(n){var r=function(r){"object"!=P(n[r])?e[r]=n[r]:n[r].length>0?e[r]=n[r].map((function(e){return"object"!=P(n[r])?e:t({},e)})):e[r]=t(e[r],n[r])};for(var o in n)r(o)})),e}({},t.eventMap,t.model.eventMap);this.eventEngine.add(t,i)}},{key:"_removeTraverse",value:function(t){var e=this;t.components&&t.components.forEach((function(t){return e._removeTraverse(t)}));var n=t.model,r=n.id,o=n.templatePrefix;r&&this.removeIndex(r,t),o&&this.removeTemplate(o,t),this.eventEngine.remove(t)}},{key:"onadded",value:function(t,e){this._addTraverse(e),this.refreshMappings(),this.invalidate()}},{key:"onremoved",value:function(t,e){this._removeTraverse(e),this.invalidate()}},{key:"onchanged",value:function(t,e,n){e.templatePrefix&&this.removeTemplate(e.templatePrefix,n.origin),t.templatePrefix&&this.addTemplate(t.templatePrefix,n.origin),e.id&&this.removeIndex(e.id,n.origin),t.id&&this.addIndex(t.id,n.origin),e.id==t.id&&e.class==t.class||this.refreshMappings()}}])&&vu(e.prototype,n),r&&vu(e,r),i}(Yr);Object.assign(Au.prototype,{fit:function(t){var e=this.model_layer.model,n=e.width,r=e.height,o=e.fitMode,i=this.target_element,a=this.model_layer;if(this.fitMode=t||this.fitMode||o||"ratio",n&&r&&i&&i.offsetWidth&&i.offsetHeight){switch(this.fitMode){case"center":!function(t,e,n){var r=t.unitScale,o=e.model,i=o.width,a=o.height;e.set("scale",{x:r,y:r}),e.set("translate",{x:Math.max((n.offsetWidth-i*r)/2,0),y:Math.max((n.offsetHeight-a*r)/2,0)})}(this,a,i);break;case"both":!function(t,e,n){var r=e.model,o=r.width,i=r.height,a=n.offsetWidth,u=n.offsetHeight;e.set("scale",{x:a/o,y:u/i}),e.set("translate",{x:0,y:0})}(0,a,i);break;case"width":!function(t,e,n){var r=n.offsetWidth/e.get("width");e.set("scale",{x:r,y:r}),e.set("translate",{x:0,y:0})}(0,a,i);break;case"height":!function(t,e,n){var r=n.offsetHeight/e.get("height");e.set("scale",{x:r,y:r}),e.set("translate",{x:0,y:0})}(0,a,i);break;case"ratio":!function(t,e,n){var r=e.model,o=r.width,i=r.height,a=n.offsetWidth,u=n.offsetHeight,c=a/o,s=u/i,f=Math.min(c,s);e.set("scale",{x:f,y:f}),e.set("translate",{x:(a-o*f)/2,y:(u-i*f)/2})}(0,a,i);break;case"none":default:!function(t,e,n){var r=t.unitScale;e.set("scale",{x:r,y:r}),e.set("translate",{x:0,y:0})}(this,a)}this.resize()}}}),mn.memoize(Au.prototype,"unitScale",!1);var Su=13.3,Ou=function(t){return void 0!==t&&(Su=t),Su};function Eu(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)}}var Pu=Math.PI/12,ju=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._mode=e,this.screen=Ou(),this._baseUrl="undefined"!=typeof window?window.location.origin:null,this._refProvider=n,this.isEditMode&&(this._rotateStep=Pu,this._rotateStepForced=!1)}var e,n,r;return e=t,(n=[{key:"dispose",value:function(){}},{key:"_calcScreen",value:function(){var t={width:screen.width,height:screen.height};this._PPI=function(t,e,n,r){t>0||(t=1),e>0||(e=1),r||(r="d");var o=("d"==r?Math.sqrt(t*t+e*e):"w"==r?t:e)/n;return o>0?Math.round(o):0}(t.width,t.height,this.screen),this._PPM=this._PPI/25.4}},{key:"refProvider",get:function(){return this._refProvider}},{key:"commander",get:function(){return this._commander},set:function(t){this._commander=t}},{key:"screen",get:function(){return this._screen},set:function(t){this._screen=t,this._calcScreen()}},{key:"DPPX",get:function(){return ne}},{key:"PPI",get:function(){return this._PPI}},{key:"PPM",get:function(){return this._PPM}},{key:"mode",get:function(){return this._mode},set:function(t){var e=this._mode;e!==t&&(this._mode=t,this.trigger("mode",t,e))}},{key:"isViewMode",get:function(){return this._mode==Zt}},{key:"isEditMode",get:function(){return this._mode==$t}},{key:"baseUrl",get:function(){return this._baseUrl},set:function(t){t&&this._baseUrl!=t&&(this._baseUrl=t)}},{key:"url",value:function(t){try{return(t.includes("$base_url")?new URL(t.replace("$base_url",this.baseUrl),this.baseUrl):new URL(t,location.origin)).href}catch(e){ye(e,t)}}},{key:"rotateStep",get:function(){return this._rotateStep},set:function(t){this._rotateStep=Number(t)||Pu}},{key:"rotateStepForced",get:function(){return this._rotateStepForced},set:function(t){this._rotateStepForced=!!t}}])&&Eu(e.prototype,n),r&&Eu(e,r),t}();ot(ju.prototype,rt.withEvent);var Mu=["left","right","center","top","middle","bottom"];function Ru(t){if(-1!=Mu.indexOf(t)){var e=this.selected.filter((function(t){return!t.stuck}));if(!(e.length<=1)){var n=this.app.commander;Ki.around(n,(function(){!function(t,e){for(var n=JSON.parse(JSON.stringify(e[0].bounds)),r=n.left+n.width,o=n.top+n.height,i=0;i<e.length;i++){var a=e[i].bounds;n.left=a.left>n.left?n.left:a.left,n.top=a.top>n.top?n.top:a.top,r=a.left+a.width>r?a.left+a.width:r,o=a.top+a.height>o?a.top+a.height:o}switch(n.width=r-n.left,n.height=o-n.top,t){case"left":for(var u=0;u<e.length;u++){var c=e[u].bounds;e[u].bounds={left:n.left,top:c.top,width:c.width,height:c.height}}break;case"center":for(var s=0;s<e.length;s++){var f=e[s].bounds;e[s].bounds={left:n.left+n.width/2-f.width/2,top:f.top,width:f.width,height:f.height}}break;case"right":for(var l=0;l<e.length;l++){var h=e[l].bounds;e[l].bounds={left:r-h.width,top:h.top,width:h.width,height:h.height}}break;case"top":for(var p=0;p<e.length;p++){var y=e[p].bounds;e[p].bounds={left:y.left,top:n.top,width:y.width,height:y.height}}break;case"middle":for(var d=0;d<e.length;d++){var v=e[d].bounds;e[d].bounds={left:v.left,top:n.top+n.height/2-v.height/2,width:v.width,height:v.height}}break;case"bottom":for(var g=0;g<e.length;g++){var m=e[g].bounds;e[g].bounds={left:m.left,top:o-m.height,width:m.width,height:m.height}}break;default:;}}(t,e)}))}}}var Tu=["VERTICAL","HORIZONTAL"];function Iu(t){if(-1!=Tu.indexOf(t)){var e=this.selected;if(!(e.length<=1)){var n=this.app.commander;Ki.around(n,(function(){!function(t,e){var n=e.filter((function(t){return!t.stuck})).slice(0);n.sort((function(e,n){var r=e.center,o=n.center;return"VERTICAL"===t?r.y-o.y:r.x-o.x}));for(var r=n.reduce((function(e,n){return e+("VERTICAL"===t?n.bounds.height:n.bounds.width)}),0),o=n[0].bounds,i=n[n.length-1].bounds,a=(("VERTICAL"===t?i.top+i.height-o.top:i.left+i.width-o.left)-r)/(n.length-1),u="VERTICAL"===t?o.top+o.height:o.left+o.width,c=1;c<n.length-1;c++){var s=n[c],f=s.bounds;u+=a,"VERTICAL"===t?(f.top=u,u+=f.height):(f.left=u,u+=f.width),s.bounds=f}}(t,e)}))}}}function Cu(t,e,n){this.app.commander.execute(new oa({changes:[{component:t,to_container:e,to_index:n}]}))}function zu(t){var e=this.selected.filter((function(t){return!t.stuck}));if(!(0==e.length||e[0].isRootModel()||e.length>1&&("forward"==t||"backward"==t))){var n,r=e[0].parent;if("forward"==t){var o=r.indexOf(e[0]);n=[{component:e[0],from_container:r,to_container:r,from_index:o,to_index:o+1}]}else if("backward"==t){var i=r.indexOf(e[0]);n=[{component:e[0],from_container:r,to_container:r,from_index:i,to_index:i-1}]}else n=e.filter((function(t){return t.parent===r})).sort((function(e,n){var o=r.indexOf(e)<r.indexOf(n);return"front"==t?o:!o})).map((function(e,n){r.indexOf(e);return{component:e,to_container:r,to_index:"front"==t?r.components.length-n-1:n}}));var a=new oa({changes:n});this.app.commander.execute(a)}}function Bu(t,e,n){t instanceof Array||(t=[t]),n||(n=this.model_layer);var r=[];this.selected=t.map((function(t){try{return ia(t,n.app)}catch(t){return console.warn(t),!1}})).filter((function(t){return!!t})).map((function(t){var o=e.left,i=e.top,a=e.width,u=e.height,c=e.x,s=e.y,f=e.cx,l=e.cy;return isNaN(o)||isNaN(i)||isNaN(a)||isNaN(u)||(t.bounds={left:o,top:i,width:a,height:u}),isNaN(c)||isNaN(s)||t.move({x:c,y:s}),isNaN(f)||isNaN(l)||(t.center={x:f,y:l}),r.push({component:t,to_container:n}),t})),this.app.commander.execute(new oa({changes:r}))}function Lu(){var t=[];if(this.selected=this.selected.filter((function(t){return!t.isRootModel()})).map((function(e){var n=Ga(e);return n.move({x:20,y:20}),t.push({component:n,to_container:e.parent}),n})),0!=t.length){var e=new oa({changes:t});this.app.commander.execute(e)}}function Fu(){var t=this.selected;this.selected=[];for(var e=null,n=t.filter((function(t){return!t.isRootModel()&&(t.parent.focusible||t.parent.isGroup())})).map((function(t){return e||(e=t.parent),{component:t,to_container:null}})),r=function(){var t=[];if(e.components.filter((function(t){return!n.find((function(e){return e.component===t}))})).forEach((function(e){return t.push(e)})),t.length>1)return"break";var r=e.parent;t.forEach((function(t){return n.push({component:t,to_container:r})})),n.push({component:e,to_container:null}),e=r};e&&e.isGroup();){if("break"===r())break}n.length>0&&this.app.commander.execute(new oa({changes:n})),e&&e.calculateBounds&&e.calculateBounds()}function Nu(t,e,n){switch(t){case"execute":case"redo":case"undo":case"command-reset":this.app.commander.on(t,e,n);break;case"selected":this.on(t,e,n);break;case"mode":this.app.on(t,e,n);break;default:this.on(t,e,n)}}function Du(t,e,n){switch(t){case"execute":case"redo":case"undo":case"command-reset":this.app.commander.once(t,e,n);break;case"selected":this.once(t,e,n);break;case"mode":this.app.once(t,e,n);break;default:this.once(t,e,n)}}function Uu(t,e,n){switch(t){case"execute":case"redo":case"undo":case"command-reset":this.app?this.app.commander.off(t,e,n):this.off(t,e,n);break;case"selected":this.off(t,e,n);break;case"mode":this.app.off(t,e,n);break;default:this.off(t,e,n)}}function Yu(t){var e=this.target_element,n=t||this.fitMode,r=this;function o(t){r.fit(n),document.fullscreen||document.mozFullScreen||document.webkitIsFullScreen||document.msFullscreenElement||["fullscreenchange","mozfullscreenchange","webkitfullscreenchange","MSFullscreenChange"].forEach((function(t){return document.removeEventListener(t,o)}))}["fullscreenchange","mozfullscreenchange","webkitfullscreenchange","MSFullscreenChange"].forEach((function(t){return document.addEventListener(t,o)})),e.requestFullScreen?e.requestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()}var Gu=0;function Wu(){var t=this.selected.filter((function(t){return!t.isRootModel()})).map((function(t){return t.hierarchy}));if(0!=t.length)return Gu=0,JSON.stringify(t,null,2)}function Hu(){Gu=0;var t=Wu.call(this);return Fu.call(this),t}function Vu(t){if(t)try{JSON.parse(t);Gu++,Bu.call(this,JSON.parse(t),{x:15*Gu,y:15*Gu})}catch(e){pe(e,t)}}var Xu=function(){return{escape:function(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:e,mimeType:function(t){var n=e(t).toLowerCase();return(r="application/font-woff",{woff:r,woff2:r,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[n]||"";var r},dataAsUrl:function(t,e){return"data:"+e+";base64,"+t},isDataUrl:function(t){return-1!==t.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):function(t){return new Promise((function(e){for(var n=window.atob(t.toDataURL().split(",")[1]),r=n.length,o=new Uint8Array(r),i=0;i<r;i++)o[i]=n.charCodeAt(i);e(new Blob([o],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var o=n.createElement("a");return n.body.appendChild(o),r.href=e,o.href=t,o.href},getAndEncode:function(t){ec.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());return new Promise((function(e){var n,r=new XMLHttpRequest;if(r.onreadystatechange=function(){if(4!==r.readyState)return;if(200!==r.status)return void(n?e(n):i("cannot fetch resource: "+t+", status: "+r.status));var o=new FileReader;o.onloadend=function(){var t=o.result.split(/,/)[1];e(t)},o.readAsDataURL(r.response)},r.ontimeout=function(){n?e(n):i("timeout of 30000ms occured while fetching resource: "+t)},r.responseType="blob",r.timeout=3e4,r.open("GET",t,!0),r.send(),ec.impl.options.imagePlaceholder){var o=ec.impl.options.imagePlaceholder.split(/,/);o&&o[1]&&(n=o[1])}function i(t){console.error(t),e("")}}))},uid:(t=0,function(){return"u"+("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)+t++}),delay:function(t){return function(e){return new Promise((function(n){setTimeout((function(){n(e)}),t)}))}},asArray:function(t){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e},escapeXhtml:function(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){e(r)},r.onerror=n,r.src=t}))},width:function(t){var e=n(t,"border-left-width"),r=n(t,"border-right-width");return t.scrollWidth+e+r},height:function(t){var e=n(t,"border-top-width"),r=n(t,"border-bottom-width");return t.scrollHeight+e+r}};var t;function e(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function n(t,e){var n=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(n.replace("px",""))}}(),qu=function(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(t,o,i){return function(){return!e(t)}()?Promise.resolve(t):Promise.resolve(t).then(n).then((function(e){var n=Promise.resolve(t);return e.forEach((function(t){n=n.then((function(e){return r(e,t,o,i)}))})),n}))},shouldProcess:e,impl:{readUrls:n,inline:r}};function e(e){return-1!==e.search(t)}function n(e){for(var n,r=[];null!==(n=t.exec(e));)r.push(n[1]);return r.filter((function(t){return!Xu.isDataUrl(t)}))}function r(t,e,n,r){return Promise.resolve(e).then((function(t){return n?Xu.resolveUrl(t,n):t})).then(r||Xu.getAndEncode).then((function(t){return Xu.dataAsUrl(t,Xu.mimeType(e))})).then((function(n){return t.replace(function(t){return new RegExp("(url\\(['\"]?)("+Xu.escape(t)+")(['\"]?\\))","g")}(e),"$1"+n+"$3")}))}}(),Ku=function(){return{resolveAll:function(){return t(document).then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))},impl:{readAll:t}};function t(){return Promise.resolve(Xu.asArray(document.styleSheets)).then((function(t){var e=[];return t.forEach((function(t){try{Xu.asArray(t.cssRules||[]).forEach(e.push.bind(e))}catch(e){console.log("Error while reading CSS rules from "+t.href,e.toString())}})),e})).then((function(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return qu.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return qu.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}(),Qu=function(){return{inlineAll:function e(n){return n instanceof Element?function(t){var e=t.style.getPropertyValue("background");return e?qu.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}(n).then((function(){return n instanceof HTMLImageElement?t(n).inline():Promise.all(Xu.asArray(n.childNodes).map((function(t){return e(t)})))})):Promise.resolve(n)},impl:{newImage:t}};function t(t){return{inline:function(e){return Xu.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||Xu.getAndEncode).then((function(e){return Xu.dataAsUrl(e,Xu.mimeType(t.src))})).then((function(e){return new Promise((function(n,r){t.onload=n,t.onerror=r,t.src=e}))}))}}}}(),Ju={imagePlaceholder:void 0,cacheBust:!1};function Zu(t,e){return function(t){void 0===t.imagePlaceholder?ec.impl.options.imagePlaceholder=Ju.imagePlaceholder:ec.impl.options.imagePlaceholder=t.imagePlaceholder;void 0===t.cacheBust?ec.impl.options.cacheBust=Ju.cacheBust:ec.impl.options.cacheBust=t.cacheBust}(e=e||{}),Promise.resolve(t).then((function(t){return function t(e,n,r){return r||!n||n(e)?Promise.resolve(e).then((function(t){if(t instanceof HTMLCanvasElement)try{return Xu.makeImage(t.toDataURL())}catch(t){ye(t)}return t.cloneNode(!1)})).then((function(t){return o(e,t,n)})).then((function(t){return function(t,e){return e instanceof Element?Promise.resolve().then(n).then(r).then(o).then(i).then((function(){return e})):e;function n(){var n,r;n=window.getComputedStyle(t),r=e.style,n.cssText?r.cssText=n.cssText:function(t,e){Xu.asArray(t).forEach((function(n){e.setProperty(n,t.getPropertyValue(n),t.getPropertyPriority(n))}))}(n,r)}function r(){[":before",":after"].forEach((function(n){!function(n){var r=window.getComputedStyle(t,n),o=r.getPropertyValue("content");if(""===o||"none"===o)return;var i=Xu.uid();e.className=e.className+" "+i;var a=document.createElement("style");a.appendChild(function(t,e,n){var r="."+t+":"+e,o=n.cssText?function(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}(n):function(t){return Xu.asArray(t).map((function(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")})).join("; ")+";"}(n);return document.createTextNode(r+"{"+o+"}")}(i,n,r)),e.appendChild(a)}(n)}))}function o(){t instanceof HTMLTextAreaElement&&(e.innerHTML=t.value),t instanceof HTMLInputElement&&e.setAttribute("value",t.value)}function i(){e instanceof SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof SVGRectElement&&["width","height"].forEach((function(t){var n=e.getAttribute(t);n&&e.style.setProperty(t,n)})))}}(e,t)})):Promise.resolve();function o(e,n,r){var o=e.childNodes;return 0===o.length?Promise.resolve(n):i(n,Xu.asArray(o),r).then((function(){return n}));function i(e,n,r){var o=Promise.resolve();return n.forEach((function(n){o=o.then((function(){return t(n,r)})).then((function(t){t&&e.appendChild(t)}))})),o}}}(t,e.filter,!0)})).then(tc).then((function(t){var n=e,r=n.bgcolor,o=n.width,i=n.height,a=n.style,u=n.sx,c=void 0===u?1:u,s=n.sy,f=void 0===s?1:s,l=t.style;r&&(l.backgroundColor=r);o&&(l.width=o+"px");i&&(l.height=i+"px");l["margin-left"]="0px",l["margin-top"]="0px",["-webkit-","-moz-","-ms-","-o-",""].forEach((function(t){l[t+"transform"]="rotate(0rad) translate(0px, 0px) scale(".concat(c,", ").concat(f,") perspective(1px)")})),a&&Object.keys(a).forEach((function(t){l[t]=a[t]}));return t})).then((function(n){return function(t,e,n){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(Xu.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+n+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}(n,e.width||Xu.width(t),e.height||Xu.height(t))}))}function $u(t,e){return Zu(t,e).then(Xu.makeImage).then(Xu.delay(100)).then((function(n){var r=function(t){var n=document.createElement("canvas");e.width,e.height;if(n.width=e.width||Xu.width(t),n.height=e.height||Xu.height(t),e.bgcolor){var r=n.getContext("2d");r.fillStyle=e.bgcolor,r.fillRect(0,0,n.width,n.height)}return n}(t);return r.getContext("2d").drawImage(n,0,0),r}))}function tc(t){return Qu.inlineAll(t).then((function(){return t}))}var ec={toSvg:Zu,toPng:function(t,e){return $u(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return $u(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return $u(t,e||{}).then(Xu.canvasToBlob)},toPixelData:function(t,e){return $u(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,Xu.width(t),Xu.height(t)).data}))},impl:{fontFaces:Ku,images:Qu,util:Xu,inliner:qu,options:{}}},nc=ec;function rc(t,e,n,r){var o=this.model_layer,i=o._overlay;return new Promise((function(a,u){if(o){var c=o.get("width"),s=o.get("height");n=n||c,r=r||s;var f=o.get("translate"),l=o.get("scale"),h=Math.min(n/c,r/s);n=c*h,r=s*h,o.set("translate",{x:0,y:0}),o.set("scale",{x:h/ne,y:h/ne});var p=mn.createCanvas(n,r),y=p.getContext("2d");if(o.draw(y),o.set("translate",f),o.set("scale",l),!i)return a(p.toDataURL(t,e)),void(p=null);nc.toPng(i,{sx:h,sy:h,width:n,height:r}).then((function(o){var i=new Image;i.onload=function(){y.drawImage(i,0,0,n,r),a(p.toDataURL(t,e)),p=null},i.src=o}),(function(n){pe(n),a(p.toDataURL(t,e)),p=null}))}else u("No target model")}))}function oc(){var t=this.selected.filter((function(t){return!!t.parent&&!t.stuck}));if(!(t.length<2)){var e=t[0].parent,n=[],r=t.sort((function(t,n){return e.components.indexOf(t)-e.components.indexOf(n)}));r.forEach((function(t){n.push(t.bounds)}));var o=mn.union(n),i=t[0].transcoordP2S(o.left,o.top),a=ia({type:"group",left:(i=t[0].transcoordS2T(i.x,i.y)).x,top:i.y,width:o.width,height:o.height}),u=[{component:a,to_container:e}];r.forEach((function(t){u.push({component:t,to_container:a})})),this.app.commander.execute(new oa({changes:u})),this.selected=[a]}}function ic(){if(0!==this.selected.length){var t=[],e=[];this.selected.forEach((function(n){if(n.isGroup()){var r=n.parent;n.components.forEach((function(n){t.push(n),e.push({component:n,to_container:r})})),e.push({component:n,to_container:null})}})),this.app.commander.execute(new oa({changes:e})),this.selected=t}}function ac(){var t=this.selected;if(0!=t.length){var e=t.map((function(t){return t.bounds})),n=mn.union(e),r=n.left+n.width/2;t.map((function(t){t.symmetryX(r)}))}}function uc(){var t=this.selected;if(0!=t.length){var e=t.map((function(t){return t.bounds})),n=mn.union(e),r=n.top+n.height/2;t.map((function(t){t.symmetryY(r)}))}}function cc(){Ki.around(this.app.commander,ac,this)}function sc(){Ki.around(this.app.commander,uc,this)}function fc(t,e,n){var r=this.findAll(t,n);return r.forEach((function(t){t.set(e)})),r}function lc(t){Ki.around(this.app.commander,t)}function hc(){return Object.values(this.indexMap).map((function(t){var e=t.model;return{key:e.id,value:e.data}})).sort((function(t,e){return t.key>e.key?1:-1}))}function pc(){return Object.values(this.indexMap).filter((function(t){return"variable"===t.get("type")})).map((function(t){var e=t.model,n=e.id,r=e.data;e.dataType;return{key:n,value:r}})).sort((function(t,e){return t.key>e.key?1:-1}))}function yc(t){var e=Object.values(this.indexMap).filter((function(t){return"variable"===t.get("type")})).reduce((function(t,e){return t[e.get("id")]=e,t}),{}),n=[];t.forEach((function(t){var r=e[t.key];r?(r.set("data",t.value),delete e[t.key]):n.push({type:"variable",id:t.key,left:0,top:0,width:100,height:20,data:t.value})})),Bu.call(this,n,{x:-100,y:0}),this.selected=Object.values(e),Fu.call(this)}function dc(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)}}var vc=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!(e=Number(e))||e<=0?(pe("TimeCapsule maxsize should be greater than 0.",e),this.maxsize=10):this.maxsize=e,this.reset(),n&&this.snapshot(n)}var e,n,r;return e=t,(n=[{key:"dispose",value:function(){this.reset()}},{key:"snapshot",value:function(t){this.q.splice(this.pos+1,this.q.length-this.pos+1,t),this.q.length>this.maxsize&&this.q.splice(0,this.q.length-this.maxsize),this.pos=this.q.length-1}},{key:"forward",value:function(){if(this.snapshot_taker&&this.snapshot_taker.take(),this.forwardable)return this.q[++this.pos];ye("Not forwardable.")}},{key:"backward",value:function(){if(this.snapshot_taker&&this.snapshot_taker.take(),this.backwardable)return this.q[--this.pos];ye("Not backwardable.")}},{key:"current",get:function(){if(-1!==this.pos)return this.q[this.pos];ye("Non state has been recorded.")}},{key:"length",get:function(){return this.q.length}},{key:"forwardable",get:function(){return this.pos<this.q.length-1}},{key:"backwardable",get:function(){return this.pos>0}},{key:"snapshot_taker",get:function(){return this._snapshot_taker},set:function(t){this._snapshot_taker=t}},{key:"reset",value:function(){this.q=[],this.pos=-1}}])&&dc(e.prototype,n),r&&dc(e,r),t}();function gc(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)}}var mc=x()((function(t){t.brake||t.take()}),1e3,{leading:!0,trailing:!1});function bc(t){!t.brake&&t.dirty&&mc(t)}var wc=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.brake=!1,this.dirty=!1,this.state_holder=e,this.timecapsule=n,this.timecapsule.snapshot_taker=this}var e,n,r;return e=t,(n=[{key:"dispose",value:function(){delete this.state_holder,delete this.timecapsule}},{key:"touch",value:function(){this.dirty=!0,bc(this)}},{key:"take",value:function(t){(this.dirty||t)&&(this.timecapsule.snapshot(this.state_holder.state),this.dirty=!1)}},{key:"brake",get:function(){return this._brake},set:function(t){this._brake=!!t,bc(this)}}])&&gc(e.prototype,n),r&&gc(e,r),t}();function xc(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 _c(t,e){var n=e.model_layer.get("scale"),r=e.model_layer.get("translate");if(t){var o=JSON.parse(t);o.scale=n,o.translate=r,e.rebuildContentModel(o)}}var kc=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.container=e,this.timecapsule=new vc(20);var n=this;this.snapshot_taker=new wc({get state(){var t=n.container.model_layer.hierarchy;return JSON.stringify(t)}},this.timecapsule),this.snapshot_taker.take(!0)}var e,n,r;return e=t,(n=[{key:"dispose",value:function(){this.reset(),this.timecapsule&&this.timecapsule.dispose(),this.snapshot_taker&&this.snapshot_taker.dispose(),delete this.container,delete this.timecapsule,delete this.snapshot_taker}},{key:"execute",value:function(t,e){!1!==e&&t&&t.execute(),this.snapshot_taker.touch(),this.trigger("execute",t,!0,!1)}},{key:"undo",value:function(){this.timecapsule.backwardable&&(_c(this.timecapsule.backward(),this.container),this.trigger("undo",this.undoable(),this.redoable()))}},{key:"redo",value:function(){this.timecapsule.forwardable&&(_c(this.timecapsule.forward(),this.container),this.trigger("redo",this.undoable(),this.redoable()))}},{key:"undoable",value:function(){return this.timecapsule.backwardable}},{key:"redoable",value:function(){return this.timecapsule.forwardable}},{key:"reset",value:function(){this.timecapsule&&this.timecapsule.reset(),this.trigger("command-reset")}}])&&xc(e.prototype,n),r&&xc(e,r),t}();function Ac(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)}}ot(kc.prototype,rt.withEvent);var Sc=new WeakSet,Oc=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._container=e,this.app=e.app,this._commander=new kc(this._container),this.app.commander=this._commander,Sc.add(this)}var e,n,r;return e=t,r=[{key:"residents",get:function(){return Sc}}],(n=[{key:"add",value:function(){return Bu.apply(this._container,arguments)}},{key:"duplicate",value:function(){return Lu.apply(this._container,arguments)}},{key:"remove",value:function(){return Fu.apply(this._container,arguments)}},{key:"animate",value:function(){return be.apply(this,arguments)}},{key:"fullscreen",value:function(){return Yu.apply(this._container,arguments)}},{key:"variable",value:function(t,e){return this._container.variable.apply(this._container,arguments)}},{key:"target",get:function(){return this._container.target_element},set:function(t){var e;if("string"==typeof t){if(!(e=document.getElementById(t)))throw"target element '".concat(t,"' is not exist");if(e.firstChild)throw"target element '".concat(t,"' already has children")}else e=t;e&&e.style&&(e.style.cursor="default"),this._container.target_element=e,this._container.invalidate()}},{key:"scale",get:function(){return this.root.get("scale")},set:function(t){this.root.set("scale",t)}},{key:"translate",get:function(){return this.root.get("translate")},set:function(t){this.root.set("translate",t)}},{key:"unit",get:function(){return this.root.get("unit")||"px"}},{key:"PPM",get:function(){return this.app.PPM}},{key:"PPI",get:function(){return this.app.PPI}},{key:"DPPX",get:function(){return this.app.DPPX}},{key:"unitScale",get:function(){return this._container.unitScale}},{key:"screen",get:function(){return this.app.screen},set:function(t){this.app.screen=t,this._container.resize()}},{key:"resize",value:function(){this._container.resize()}},{key:"dispose",value:function(){this._commander&&this._commander.dispose(),this._container&&this._container.dispose()}},{key:"selected",get:function(){return this._container.selected.slice()},set:function(t){this._container.selected=t}},{key:"select",value:function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return this._container.selected=(e=this.root).findAll.apply(e,[t].concat(r)),this.selected}},{key:"commander",get:function(){return this._commander}},{key:"undo",value:function(){this.commander.undo()}},{key:"redo",value:function(){this.commander.redo()}},{key:"cut",value:function(){return Hu.apply(this._container,arguments)}},{key:"copy",value:function(){return Wu.apply(this._container,arguments)}},{key:"paste",value:function(){return Vu.apply(this._container,arguments)}},{key:"undoableChange",value:function(){return lc.apply(this._container,arguments)}},{key:"change",value:function(){return fc.apply(this.root,arguments)}},{key:"model",get:function(){return this.root.hierarchy},set:function(t){this._container.rebuildContentModel(t)}},{key:"root",get:function(){return this._container.model_layer}},{key:"findAll",value:function(){return this.root.findAll.apply(this.root,arguments)}},{key:"findFirst",value:function(){return this.root.findFirst.apply(this.root,arguments)}},{key:"findById",value:function(){return this._container.findById.apply(this._container,arguments)}},{key:"serialize",value:function(){return this.root.trim(),this.root.serialize.apply(this.root,arguments)}},{key:"align",value:function(){return Ru.apply(this._container,arguments)}},{key:"distribute",value:function(){return Iu.apply(this._container,arguments)}},{key:"move",value:function(){return Cu.apply(this._container,arguments)}},{key:"zorder",value:function(){return zu.apply(this._container,arguments)}},{key:"symmetryX",value:function(){return cc.apply(this._container,arguments)}},{key:"symmetryY",value:function(){return sc.apply(this._container,arguments)}},{key:"on",value:function(){return Nu.apply(this._container,arguments)}},{key:"once",value:function(){return Du.apply(this._container,arguments)}},{key:"off",value:function(){return Uu.apply(this._container,arguments)}},{key:"mode",get:function(){return this.app.mode},set:function(t){void 0!==t&&(this.app.mode=t)}},{key:"toDataURL",value:function(){return rc.apply(this._container,arguments)}},{key:"group",value:function(){return oc.apply(this._container,arguments)}},{key:"ungroup",value:function(){return ic.apply(this._container,arguments)}},{key:"fit",value:function(t){var e=this;this._container.once("redraw",(function(){return e._container.fit(t)})),this._container.invalidate()}},{key:"fitMode",get:function(){return this._container.fitMode}},{key:"ids",get:function(){return hc.apply(this._container)}},{key:"data",get:function(){return this._container.data},set:function(t){this._container.data=t}},{key:"variables",get:function(){return pc.apply(this._container)},set:function(t){yc.apply(this._container,[t])}},{key:"baseUrl",get:function(){return this.app.baseUrl},set:function(t){this.app.baseUrl=t}}])&&Ac(e.prototype,n),r&&Ac(e,r),t}();function Ec(t){var e=t.target,n=t.model,r=t.style,o=t.layers,i=void 0===o?[]:o,a=t.handlers,u=void 0===a?[]:a,c=t.mode,s=void 0===c?Zt:c,f=t.refProvider,l=t.baseUrl,h=t.fitMode,p=null;if("string"==typeof e){if(!(p=document.getElementById(e)))throw"target element '".concat(e,"' is not exist");if(p.firstChild)throw"target element '".concat(e,"' is not empty")}else p=e;p&&p.style&&(p.style.position="absolute",p.style.cursor="default",p.style.overflow="hidden");var y=new ju(s,f);return y.baseUrl=l,new Oc(new Au({target_element:p,model:n,style:r,layers:i,handlers:u,fitMode:h},y))}var Pc=Math.sqrt(3);function jc(t,e,n,r,o){var i,a,u,c,s=5+o,f=n.x,l=n.y,h=r.x,p=r.y;if(Math.abs(f-h)>s&&Math.abs(l-p)>s){var y=(p-l)/(h-f),d=l-y*f;if(Math.abs(e-(y*t+d))>s)return!1}return f>h?(a=f,i=h):(a=h,i=f),l>p?(c=l,u=p):(c=p,u=l),!(a+5<t)&&(!(i-5>t)&&(!(c+5<e)&&!(u-5>e)))}function Mc(t,e,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,o=0;o<n.length-1;o++)if(jc(t,e,n[o],n[o+1],r))return!0;return!1}function Rc(t,e,n,r){if("arrow"!=t.slice(-5))return n;n.x,n.y;var o=Math.atan2(r.y-n.y,r.x-n.x),i=1.5*e;return{x:n.x+Math.cos(o)*i,y:n.y+Math.sin(o)*i}}function Tc(t,e,n){var r=n.lineWidth,o=void 0===r?2:r,i=n.strokeStyle,a=void 0===i?"#000000":i,u=n.lineCap,c=void 0!==u&&u,s=n.alpha,f=void 0===s?1:s,l=n.begin,h=void 0===l?"none":l,p=n.end,y=void 0===p?"none":p,d=n.beginSize,v=void 0===d?"size5":d,g=n.endSize,m=void 0===g?"size5":g;if(("none"!=h||"none"!=y)&&(o=Number(o)||2,t.lineCap=c,t.lineWidth=o,t.strokeStyle=a,t.fillStyle=a,t.globalAlpha*=f,"none"!=h&&Ic(t,e[0],e[1],o,h,Cc(v,o)),"none"!=y)){var b=e.length;Ic(t,e[b-1],e[b-2],o,y,Cc(m,o))}}function Ic(t,e,n,r,o,i){var a=e.x,u=e.y,c=Math.atan2(n.y-u,n.x-a);switch(t.beginPath(),t.translate(a,u),t.rotate(c),o){case"oval":t.ellipse(0,0,i.X,i.Y,0,0,2*Math.PI),t.fill();break;case"diamond":t.moveTo(-i.X,0),t.lineTo(0,-i.Y),t.lineTo(i.X,0),t.lineTo(0,i.Y),t.fill();break;case"arrow":t.moveTo(0,0),t.lineTo(Pc*i.X,-i.Y),t.lineTo(Pc*i.X,i.Y),t.fill();break;case"sharp-arrow":t.moveTo(0,0),t.lineTo(Pc*i.X,-i.Y),t.lineTo(-i.X/1.5+Pc*i.X,0),t.lineTo(Pc*i.X,i.Y),t.fill();break;case"open-arrow":t.moveTo(Pc*i.X+r,-i.Y),t.lineTo(r,0),t.lineTo(Pc*i.X+r,i.Y),t.stroke()}t.rotate(-c),t.translate(-a,-u),t.closePath()}function Cc(t,e){var n={};switch(e*=1.2,t){case"size1":n.X=e,n.Y=e;break;case"size2":n.X=1.5*e,n.Y=e;break;case"size3":n.X=2*e,n.Y=e;break;case"size4":n.X=e,n.Y=1.5*e;break;case"size5":n.X=1.5*e,n.Y=1.5*e;break;case"size6":n.X=2*e,n.Y=1.5*e;break;case"size7":n.X=e,n.Y=2*e;break;case"size8":n.X=1.5*e,n.Y=2*e;break;case"size9":n.X=2*e,n.Y=2*e;break;default:n.X=1.5*e,n.Y=1.5*e}return n}function zc(t){return(zc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Bc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Lc(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 Fc(t,e){return(Fc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Nc(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=Uc(t);if(e){var o=Uc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Dc(this,n)}}function Dc(t,e){return!e||"object"!==zc(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Uc(t){return(Uc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Yc=function(t){!function(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&&Fc(t,e)}(i,t);var e,n,r,o=Nc(i);function i(){return Bc(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"isLine",value:function(){return!0}},{key:"drawPath",get:function(){return this.path}},{key:"render",value:function(t){var e=this.model,n=e.begin,r=void 0===n?"none":n,o=e.end,i=void 0===o?"none":o,a=e.lineWidth,u=this.drawPath;Tc(t,u,this.model),t.beginPath();var c=Rc(r,a,u[0],u[1]),s=Rc(i,a,u[u.length-1],u[u.length-2]);t.moveTo(c.x,c.y);for(var f=1;f<u.length-1;f++)t.lineTo(u[f].x,u[f].y);t.lineTo(s.x,s.y),this.drawStroke(t)}},{key:"contains",value:function(t,e){var n=this.model.lineWidth;return Mc(t,e,this.drawPath,n)}},{key:"resizable",get:function(){return!1}},{key:"mutable",get:function(){return!0}},{key:"rotatable",get:function(){return!1}},{key:"path",get:function(){var t=this.model;return[{x:t.x1,y:t.y1},{x:t.x2,y:t.y2}]},set:function(t){var e=t[0],n=t[1];this.set({x1:e.x,y1:e.y,x2:n.x,y2:n.y})}}])&&Lc(e.prototype,n),r&&Lc(e,r),i}(mn);function Gc(t){return(Gc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Hc(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 Vc(t,e){return(Vc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Xc(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=Kc(t);if(e){var o=Kc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return qc(this,n)}}function qc(t,e){return!e||"object"!==Gc(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Kc(t){return(Kc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Yc.getTipNeckPos=Rc,Yc.containedInPath=Mc,Yc.drawEndTips=Tc,mn.memoize(Yc.prototype,"path",!1),mn.register("line",Yc);var Qc=function(t){!function(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&&Vc(t,e)}(i,t);var e,n,r,o=Xc(i);function i(){return Wc(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"is3dish",value:function(){return!0}},{key:"render",value:function(t){var e=this.model,n=e.cx,r=e.cy,o=e.rx,i=e.ry,a=e.startAngle,u=e.endAngle,c=e.anticlockwise;t.beginPath(),t.ellipse(n,r,Math.abs(o),Math.abs(i),0,a||0,u||2*Math.PI,c)}},{key:"path",get:function(){var t=this.model,e=t.cx,n=t.cy,r=t.rx,o=t.ry;return[{x:e-r,y:n-o},{x:e+r,y:n-o},{x:e+r,y:n+o},{x:e-r,y:n+o}]},set:function(t){var e=t[0],n=t[2];this.set({cx:e.x+(n.x-e.x)/2,cy:e.y+(n.y-e.y)/2,rx:(n.x-e.x)/2,ry:(n.y-e.y)/2})}},{key:"contains",value:function(t,e){var n=this.model,r=n.cx,o=n.cy,i=(t-r)/(2*n.rx-.5),a=(e-o)/(2*n.ry-.5);return i*i+a*a<.25}},{key:"outline",value:function(t){return function(t,e){var n=t.model,r=n.cx,o=n.cy,i=n.rx,a=n.ry,u=2*Math.PI*e,c=r+i*Math.cos(u),s=o+a*Math.sin(u);return t.transcoordS2T(c,s)}(this,t)}}])&&Hc(e.prototype,n),r&&Hc(e,r),i}(En);function Jc(t){return(Jc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $c(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 ts(t,e){return(ts=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function es(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=rs(t);if(e){var o=rs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ns(this,n)}}function ns(t,e){return!e||"object"!==Jc(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function rs(t){return(rs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.memoize(Qc.prototype,"path",!1),mn.register("ellipse",Qc);var os={ondragstart:function(t,e,n){n.mutatePath(null,(function(n){n.splice(e+1,0,t)}))},ondragmove:function(t,e,n){n.mutatePath(null,(function(n){n[e+1]=t}))},ondragend:function(t,e,n){}},is=function(t){!function(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&&ts(t,e)}(i,t);var e,n,r,o=es(i);function i(){return Zc(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"is3dish",value:function(){return!0}},{key:"render",value:function(t){var e=this.model.path,n=void 0===e?[]:e;if(!(n.length<=1)){t.beginPath(),t.moveTo(n[0].x,n[0].y);for(var r=1;r<n.length;r++)t.lineTo(n[r].x,n[r].y);t.closePath()}}},{key:"mutable",get:function(){return!0}},{key:"pathExtendable",get:function(){return!0}},{key:"path",get:function(){return this.model.path},set:function(t){this.set("path",t)}},{key:"contains",value:function(t,e){var n=this.model.path,r=!1;return n.forEach((function(o,i){var a=(i+n.length+1)%n.length,u=o.x,c=o.y,s=n[a].x,f=n[a].y;c>e!=f>e&&t<(s-u)*(e-c)/(f-c)+u&&(r=!r)})),r}},{key:"controls",get:function(){var t=this.path;return t.map((function(e,n){var r=t[n+1>=t.length?0:n+1];return{x:(e.x+r.x)/2,y:(e.y+r.y)/2,handler:os}}))}}])&&$c(e.prototype,n),r&&$c(e,r),i}(En);function as(t){return(as="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function us(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cs(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 ss(t,e){return(ss=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function fs(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=hs(t);if(e){var o=hs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ls(this,n)}}function ls(t,e){return!e||"object"!==as(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function hs(t){return(hs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.memoize(is.prototype,"controls",!1),mn.register("polygon",is);var ps={ondragstart:function(t,e,n){n.mutatePath(null,(function(n){n.splice(e,0,t)}))},ondragmove:function(t,e,n){n.mutatePath(null,(function(n){n[e]=t}))},ondragend:function(t,e,n){}},ys=function(t){!function(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&&ss(t,e)}(i,t);var e,n,r,o=fs(i);function i(){return us(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"pathExtendable",get:function(){return!0}},{key:"path",get:function(){return this.model.path},set:function(t){this.set("path",t)}},{key:"controls",get:function(){for(var t=this.path,e=[],n=0;n<t.length-1;n++){var r=t[n],o=t[n+1];0==n&&e.push({x:r.x,y:r.y,handler:ps}),e.push({x:(r.x+o.x)/2,y:(r.y+o.y)/2,handler:ps}),n==t.length-2&&e.push({x:o.x,y:o.y,handler:ps})}return e}}])&&cs(e.prototype,n),r&&cs(e,r),i}(Yc);function ds(t){return(ds="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gs(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 ms(t,e,n){return(ms="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_s(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function bs(t,e){return(bs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ws(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=_s(t);if(e){var o=_s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return xs(this,n)}}function xs(t,e){return!e||"object"!==ds(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function _s(t){return(_s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.memoize(ys.prototype,"controls",!1),mn.register("polyline",ys);var ks={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"image-selector",label:"image-src",name:"src",property:{displayField:"id",displayFullUrl:!0,baseUrlAlias:"$base_url",defaultStorage:"scene-image",storageFilters:{type:Array,value:[{name:"category",value:"image"}]},useUpload:!0}},{type:"select",label:"cross-origin",name:"crossOrigin",property:{options:["","anonymous","use-credentials"]}}],"value-property":"src",help:"scene/component/image-view"},As=function(t){!function(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&&bs(t,e)}(i,t);var e,n,r,o=ws(i);function i(){return vs(this,i),o.apply(this,arguments)}return e=i,r=[{key:"noimage",get:function(){return i.NOIMAGE||(i.NOIMAGE=new Image,i.NOIMAGE.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABIBAMAAAD7Se1QAAAAIVBMVEUAAABHcEwBAQEREREBAQEEBAQGBgYLCwsDAwMDAwMICAi6HF9tAAAAC3RSTlNNAEAERiMYCS41Eac10lYAAAEgSURBVHhe7dY9asQwEAXgh7DNertNiJy48pIitY3SB7bYdk0ukL1BDDmA9gZecoH4pmFQ3MQayUMguPBrNPD4wD9TCMvJmt3M/AtYwXOlXiWgqADVCUBD46MAnGhMBaCiUQmAm8VA/Eh/eWl9Fn5WcxD+OLuRrUYJDKLluwH2InACUgkoACSdADxQc50Bytadb9RkM0CT13TcvlCT1HFg8UTHvasuUVACCa3El6u2UdD8LFTlKhUFFgA+d3dj10aABkUN72N3jAADCrJq7PIIsPidcxBoTHIIAjMFmyCwmGYIAA1P9gFgfCANAOsDSccCDW+uLDB+kLGg94OkZoAGkwsDDAe2DOg5oPxAg03rBR88OHpBz4N8UVeHFSwma74BTW6Ge4rIRa4AAAAASUVORK5CYII="),i.NOIMAGE}}],(n=[{key:"dispose",value:function(){ms(_s(i.prototype),"dispose",this).call(this),this._offcanvas=null,this._image=null}},{key:"render",value:function(t){var e=this.state,n=e.left,r=e.top,o=e.width,a=e.height,u=e.isGray,c=void 0!==u&&u,s=e.alpha,f=void 0===s?1:s,l=e.src;if(this.prepareIf(!this._image&&l),t.beginPath(),t.globalAlpha*=f,this._image&&this._image.complete)if(c&&this._offcanvas)t.drawImage(this._offcanvas,n,r,o,a);else try{t.drawImage(this._image,n,r,o,a)}catch(e){t.drawImage(i.noimage,n,r,o,a)}else!this.app.isViewMode&&t.drawImage(i.noimage,n,r,o,a)}},{key:"nature",get:function(){return ks}},{key:"hasTextProperty",get:function(){return!1}},{key:"ready",value:function(){this.prepareIf(!this._image&&this.state.src)}},{key:"prepare",value:function(t,e){var n=this,r=this.state,o=r.src,i=r.crossOrigin;if(o){this._image=new Image;try{i&&(this._image.crossOrigin=i),this._image.src=this.app.url(o)||""}catch(t){return void e(t)}this._image.onload=function(){if(n.get("isGray")){var e=n._image.width,r=n._image.height;n._offcanvas=mn.createCanvas(e,r);var o=n._offcanvas.getContext("2d");o.drawImage(n._image,0,0);var i=function(t,e,n){try{var r=t.getImageData(0,0,e,n)}catch(t){return pe("Get Image Data Error: "+t.message),null}for(var o=r.data,i=0;i<e*n*4;i+=4){var a=o[i],u=o[i+1],c=o[i+2],s=parseInt((a+u+c)/3);r.data[i]=s,r.data[i+1]=s,r.data[i+2]=s}return r}(o,e,r);o.putImageData(i,0,0)}t(n)},this._image.onerror=function(t){n._image&&!n._image.currentSrc&&(n._image=null),e(t)}}else t(this)}},{key:"src",get:function(){return this.get("src")},set:function(t){this.set("src",t)}},{key:"onchange",value:function(t,e){(t.hasOwnProperty("src")||t.hasOwnProperty("isGray"))&&(this._offcanvas=null,this._image=null,this.prepareIf(t.src))}},{key:"ondropfile",value:function(t,e){for(var n=0;n<t.length;n++)if(t[n].type.startsWith("image/"))return void(this.src=e[n])}}])&&gs(e.prototype,n),r&&gs(e,r),i}(zn(En));function Ss(t){return(Ss="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Os(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Es(t,e){return(Es=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ps(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=Ms(t);if(e){var o=Ms(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return js(this,n)}}function js(t,e){return!e||"object"!==Ss(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Ms(t){return(Ms=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("image-view",As);var Rs=function(t){!function(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&&Es(t,e)}(n,t);var e=Ps(n);function n(){return Os(this,n),e.apply(this,arguments)}return n}(ri(zn(mn))),Ts=n(238),Is=n.n(Ts);function Cs(t){return(Cs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zs(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function Bs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ls(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 Fs(t,e,n){return(Fs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ys(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Ns(t,e){return(Ns=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ds(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=Ys(t);if(e){var o=Ys(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Us(this,n)}}function Us(t,e){return!e||"object"!==Cs(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Ys(t){return(Ys=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Gs={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"string",label:"src",name:"src"},{type:"checkbox",label:"play",name:"play"}],"value-property":"src",help:"scene/component/gif-view"},Ws=function(t){!function(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&&Ns(t,e)}(u,t);var e,n,r,o,i,a=Ds(u);function u(){return Bs(this,u),a.apply(this,arguments)}return e=u,(n=[{key:"oncreate_element",value:(o=regeneratorRuntime.mark((function t(e){var n,r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.state,r=n.src,o=n.play,this.onchangesrc(r),this.onchangeplay(o);case 3:case"end":return t.stop()}}),t,this)})),i=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){zs(i,n,r,a,u,"next",t)}function u(t){zs(i,n,r,a,u,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})},{key:"buildImg",value:function(){var t=this.element;t.innerHTML="";var e=document.createElement("img");return e.style.width="100%",e.style.height="100%",t.appendChild(e),e}},{key:"onchange",value:function(t,e){Fs(Ys(u.prototype),"onchange",this).call(this,t,e),"src"in t&&this.onchangesrc(t.src),"play"in t&&this.onchangeplay(t.play)}},{key:"setElementProperties",value:function(t){}},{key:"onchangeplay",value:function(t){var e=this._superGif;e&&!e.get_loading()&&(t?e.play():e.pause())}},{key:"onchangesrc",value:function(t){var e=this,n=this.buildImg();t||(t="data:image/gif;base64,R0lGODlhYABIAPcAAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4ODg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB0dHR4eHh8fHyAgICEhISIiIiMjIyQkJCUlJSYmJicnJygoKCkpKSoqKisrKywsLC0tLS4uLi8vLzAwMDExMTIyMjMzMzQ0NDU1NTY2Njc3Nzg4ODk5OTo6Ojs7Ozw8PD09PT4+Pj8/P0BAQEFBQUJCQkNDQ0REREVFRUZGRkdHR0hISElJSUpKSktLS0xMTE1NTU5OTk9PT1BQUFFRUVJSUlNTU1RUVFVVVVZWVldXV1hYWFlZWVpaWltbW1xcXF1dXV5eXl9fX2BgYGFhYWJiYmNjY2RkZGVlZWZmZmdnZ2hoaGlpaWpqamtra2xsbG1tbW5ubm9vb3BwcHFxcXJycnNzc3R0dHV1dXZ2dnd3d3h4eHl5eXp6ent7e3x8fH19fX5+fn9/f4CAgIGBgYKCgoODg4SEhIWFhYaGhoeHh4iIiImJiYqKio+Pj5iYmKCgoKampqurq66urrCwsLGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrOzs7S0tLa2tre3t7m5ubu7u7+/v8DAwMHBwcPDw8XFxcfHx8vLy8/Pz9LS0tXV1dfX193d3eTk5Onp6fj4+Pz8/P7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v///////////////////////////////////////////////////////////////////////////////yH5BAkAAPUAIf47R2VuZXJhdGVkIGJ5IGpzZ2lmIChodHRwczovL2dpdGh1Yi5jb20vYW50aW1hdHRlcjE1L2pzZ2lmLykALAAAAABgAEgAAAj+AGcJHEiwoMGDCBMqXMiwocOHECNKnEixosWLGDNq3Mixo8ePIEOKHEmypMmR9VKqXMmypcuXMGPKnJkSIs2bOHPqZGlzp8+fQOv1DEq0KMyhRpMmRaq0KVCmTqPmhCq1qkyqLrFRSyYwGTVsVo1iZXmNa8Fk18ISHasSm1mDycCq/ck2JTWF1ObSfTjz7cFken3WFbow8M7BDA3rHOwXruKpfGXeTZg3qDVrUge7RRg3KLZjx+Q2HVyvLNy0QaMJjBaVdD2tZr2K/mmNIObRkR+n9AsYt0Pddg1WXppb8bWDx1CLLW74GcJnSl3TtDY8Zu2Et4tKl7n52eyWnxXvhl7+26jqrspbnlfIWjtz2gWPZV95neH8veU9NxZYfbfD3kFt99J6Bnmn0mQO9XfYezrVxxlmx0GUXIAM4hSeffsxBN1TFd5E4Ef3QZbfTg6CNJ5gHXJ3TEntLThiTh+KFCJNAqZU4kgAitjQTheepOBMNcZI0oQ6JpbTjSZtiNN2PZ400IxHpdiSc07G911M0iFZZYtAStnWilUeBGVLrlEZpmM0elmPlmfO8iOZXl4DZpsGEYmll2bSWWCXLwJXVY1+urhjoGEBSuiSah6K36CKtpZoo4s9CimielZq6aWYZqrpppx26umnoIZ6UkAAOw=="),n.setAttribute("rel:animated_src",t),n.setAttribute("rel:auto_play",0),this._superGif=new Is.a({gif:n,progressbar_height:2}),this._superGif.load((function(){e._superGif.move_to(0),e.play&&e._superGif.play()}))}},{key:"ondropfile",value:function(t,e){for(var n=0;n<t.length;n++)if(/\.gif$/.test(t[n].name))return void(this.src=e[n])}},{key:"src",get:function(){return this.getState("src")},set:function(t){this.set("src",t)}},{key:"play",get:function(){return this.getState("play")},set:function(t){this.setState("play",t)}},{key:"nature",get:function(){return Gs}},{key:"tagName",get:function(){return"div"}}])&&Ls(e.prototype,n),r&&Ls(e,r),u}(Rs);function Hs(t){return(Hs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Vs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xs(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 qs(t,e,n){return(qs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Zs(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Ks(t,e){return(Ks=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Qs(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=Zs(t);if(e){var o=Zs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Js(this,n)}}function Js(t,e){return!e||"object"!==Hs(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Zs(t){return(Zs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("gif-view",Ws);var $s={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"string",label:"src",name:"src"},{type:"checkbox",label:"started",name:"started"},{type:"checkbox",label:"loop",name:"loop"}],"value-property":"src",help:"scene/component/audio"},tf=function(t){!function(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&&Ks(t,e)}(i,t);var e,n,r,o=Qs(i);function i(){return Vs(this,i),o.apply(this,arguments)}return e=i,r=[{key:"image",get:function(){return i.IMAGE||(i.IMAGE=new Image,i.IMAGE.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAAAP1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACzJYIvAAAAFHRSTlMA8BAwgNBgQKB/wCBwUJDg37CvXyUlBK8AABFYSURBVHja7NsBkqIwFIThTiAQgyBq3/+sm6p1tnamZkaTMhJJf1f4S/JeEIiIiIiIiIiIiIiIiEhD7Hg4BH84TpAKjJ4f3NFCtjVd+InXz2RTs+FXlxGylYHfcVfIJmb+YFWSLUyGVJKKBJJKUo+Rd6w63l/qzLuCkryO5fe0l2xk5mMWbe+v0fNBRqf7S3je6CipQ2ACr+dWcYEpzBFS1plpguatsnomMgdIQSOTuQ5SjmE6/UgK8szgdJIUM/FG41YlFmYJ2kkKsY5ZzAwBurHDk3WGeRY0bvYrGa1+rqNI22f7dS32ZnUK1GMr0eSK3mEc9dhKMxp+ZTo8kT2emOXS5LQ1kCxbJBocSd2k5PaIjMVzjWcdJPk9ooBnmzx1t5XbIxqBKpJ4NGTgzwKiGpK4do72gb+ZUMIYtCPm9WCPMsYTE5k2hq2ZvzujlCE1iRmwf3dvmRyKsT0T7b9I7HEPCpqCiqT2IIqaT1pI0noQZdlFC8l/PbYPAnRORT56VBEE6FXkb49agmByKhJ71BME6FsvEntUFQTdqekisUdlQWCXhovEHtUFAWbTapHYo8YgmFybO3vsUWcQYGmxSOxRbRAMprkisUfFQVKmrX18sxt7VB0ENjT1xir2qDxIwkFi3v89e+xRfxAMzfzzIfZ4hyAYDR9zwVuLPd4jCDrTwoLYGb5LEFi3/+E3rweR6urX20c/Fvls2Pvwm9mDSGIPhv8YPyGf3/eo9Ye7O8B2FIShAAooakEttex/rbODad5/yTHIAjqn505IQPv+Xz06dz+4VXORHEZcgAcB8updM8F6e25jBzwIkE07l+x8amMnPDp6nsNJ+BoZ7Q6F8egqAda9VEuRNlZjBzwYkMskdXR73okd8GBAJiKYjBcZKKqG9OiKDbgdfxJ5VhsBPDiQZhaouD3p4hfw4EAmwxisz3MSHwAPEmQ1TB1N+SmXWoAHC7JbZsWl/IxLLcCDBplNo3lrfMLsmwAPGmShAxX5/1vOEzjEz3iyfQ/hI36W4TctsUesOAifPdrQg8M++KYl95iCBkjI1r8634betBAPHZDTPFAmD3zLiHgogVTziMsahz0eIh5aIGHGRSJ2mFtHPR4iHhQIP2UvWGMf8wk74qEIEib7rLjPiBfxiAcCwp8V+Nae3uMdRhAPDIR/J5f/Q2DTcC+hIB7qIGEq3Ti9bx+sryMeAAgS70OK8G2kBD8L8QBAoLWU3g3vUVIc6D0txAMAsY+4jBWowXHO64gHBGKfYJ2T5qY1BxcL98BB+PQ+XiS9xxh9EQ8ChA6C5UXWIUoE9MBB8LVHQoS7ib8/dRn3sAcJ6bQRSdH96RDxIEH4QEX+AHF4LxHEAwUh12xyr1V8lwjiQYDYF8kuf1jluUQQDwrEvkhW8Wc6LhHUgwfhi4QPlHm7LRHawx4kpE191Dq8lgjhAYDQa1cftYrPEiE8OJDb40uqyzdQCA8WhAzL4G/PT4c3WrgHD2IfllGl53V37zsgHg5ApPNvVvq4Fn4spx4oiH1W3CwtEV+PDhEPJyBSkVX4aa7emkM83ICEKWpGM7wdvYCCeDgCEYpcwhLxczhEPFyBCEUWnRL5T6X59SBASBF+9l28TL5F7uEORCZyCUvEx+S7yT0cgoRVb9JaXLR1qUdfgksQ0fTbgmhFB20d8HAKEha14+F8f1sHPNyCiL6EqK+n20/rgIdjkFC0Ho1s6Gndvcc9ICkr/ey8/rHO6vp9KawL8DAFOV6l9Fyub7IbflsCag1qRfVsXWvxHjxIejU+BHZV6uvHD1XiEb++Bw8i+dNd+Wv0eCQmhcPhRPwUUt2DB5G1sfa1aeyzAuyJj9x2HjyIdKzIKw5SI14ieFtvo3kIQERj3lVhkUOnRD7AnjV5369QkAOJZeCH+Jh41xOLs73dQwAifY6dpxCCbjTDzLf1Bm1Y93tAIDOWXcLPvrHyr2hVoEAceEAgDQzB4jetk0/c2OXRHB48EJCpa4dgpYh2ETxtrshz7zx4ICCzfuTSDn8p/EOS9OTjwgMB+cABP3yWYuOPIofs33LigYCULlpZNXJppVU30Vf14kGAUCLijf1D71lN9FW9eFiA9KgZ8FPpPUsSnufGA+8hvAg2Kpz0nrX//qp+PIgpC3i6xJRITOye9fn1VT15ICCrVlQG5rywo0H8x965bVkNwmCYQ2kR6Gmb939WXV65dFnI/tPdjPBfO7XMN4EkTUJtqZp4sCJ1+8jwkhMu0KpMxFXFA8hlVfQSMxGH5mDK1VKV8QCyvTVtUiYyo7V358VStfGoAEFMhGYhEwloxZy9WKo2Hjwg5iSOvFDXeUYd33+PuVfHgwnEBWLocDJp+IIa2fyvperjwQRiXCKGosyXqoA+YfsIELuYu4HAt+msMknfDK4jfQJIzOZ2IPAQWJtFOhQKivR2IDZ6Awis7V0iLxqBI7uEZo19dakTogLSwKvf8yk8Jq6CGK0GKvWlatG7b7kkUU/Lo1gdXWn7/4E0j0qeJDpqN/ABqQcgJgdqURb4chjQktIugDS6wFFiz3JgaJj7AGJmholAe9YKhoZLJ0Ca6smjwJ4VwVN96gVIE5GM71kHaGKxGyAtRDaB2NBhLVmpHyANRKzDO28W7FS3HQFpaIWa8TrfCXQwegJSL5k+8M9UJ+pm9QTEnCIZrR0MDQeQ9ua0iCcYQaBTV0CqNXQW/yiyYG7W1heQanPaCkciBXuH1BkQJzHcDQxmpgGkPatl4WkbCXO/bW9AqlNg4H0PPMi6A1IxkQmOZ8D0ousNSMVEEuyreTAQ6Q7IRJeCX2YZQHhv6SrBOmpkM+YUzN0BqSRQCupmTeCP9wdkhiOREwtEzgGEsWcF9BhK9R8fQDiN7A8DiR0CKXQlj/q9IM8OgXjIzcKBlAHkD6FulgNzJwPIHwpo8mQAkX3LiPq9dKUMAQk9AqmcqmjuBAJCPQIpA4guIAsKJA0gnwNy3A4kDyBIHCEPxAwgf8gPILqA5AFEF5CxZX0lIHYc6rqADLf380BmFMgxgIzUyf8MJKLTRelKHgKy9wgkjfS7LiA0gKgC8vQn3HUA4RQ5LKPIAQciWbqIEg0YkLNDIHYUyqkCsmKN5vg3+W0AYTRATaPY+uu1IwS6UMGAlO6AFPjSCQMStaNh53cdcPG7Hx1Uupo+rx+Bltn1BuTAj5BptEV/bHAAwbnJMICwRmtUDOSEA8s4Rmtw3nITGD6TwUNoG0Ca7xi2YKSPj2eKXQFxQWKA2QbGMWEMMGseOb7C7T47uJS1JyAzVbTjqZdU3zbHzMXWS+qp4Fgn8Ahy/QCRGqQcwU1vGnN7fylboWn8Bzg//hyjxltvdcl45bwFfYKzFyBy11UU9BnjuoqfWizVlQXulpzBTNbaB5Aid+VRrkBFB630AMS9BC8FK2ggE7u/FGy1kvfcB9TKQufX5uUXNWl3EjvWCi4k/u9A3Ddq1CpTIQGe6VN1qd8ArcvDQNw3S41Kn6qQmOq5e7pRr+8fAYLiIJtFrrvYRMYL0q06vj8EZLXUriJzRY8H1xEagOCK7gkghRg6RQYO0I6aWPwIEAru80AiMWSdzAeuDXUKyr+WqpAID8hMHC1Ct8F4mUsQ6W8pJMICki0JHCBczAFdBl38G3VE6ErQhhWlih4LWrCSLpaqjggHiGe9mVjRY0YPoelyqcqIcIDEe97rqJFFH7FcLlUZEQ6Qg5plvZiBFNhtri1VFREGEC/Eg4nZoU5vqi1VFREGkIXDQ8xAIhzoT/WlKiLCAFIYPOQMxOPdjfWlKiLCADJRm3YGj+pDE2xktmmpaogwgMz8d8GrumZ4xzpbvinqISJ+hiTWm7wEqoJdI9JEV9JChAEkS3xCZzKecLcgN6YwlRBhAGmweTsblg6qKMM7Vmh321UQ4QAp1VfwhqVJIh+Wm03W0qV0EOEAybXtivkCmWrKeH2EZ/xBaSBCV2L9Re+LYSqJJIxDu1ew07U0EGEBcTtmHty4JuPtQhvLh1BAhK7Uvvq0GK484QZST0GvvFDqeSJ1IA0r2mfDljvqBoJ//rVsq7yZCA6kXgVkJ2f4ijIGMjOfMVsCBBORB2Jy+sM6ijNvaBUqmw/cStZ8EiKciHwp6Rp++88qmxXQeTUxDiJWJ9wSISvBicgXW+dypn1PqWTznlwgwdZdfiLHr5OELEAEASKvJFRE5JCPKbh8OxHdQKJU0crEzRXrJ/IEkFms6tGyrUw9kQeALFRXvK2iSzsRAAi6BLxM+60xdsqJAEBuXMAMxDLVp+gmAgC57/UT4qvVj3TVRCAgSAYL91aXtyNLzUQAIFhAiP8m0/NHOp+ILiBtPFKrs6bgSOcT0QTEB8nO3QR1yKslggKRf+m11UB0HOl8IlqAeCvauXuo8HnfIqIDyCw6G8XMcGiplMingMzCnbuHFp/3LSLPA4nUpqm5YkWNzwsQeQxIDsKjH5wVSU5qJPIJIIt4jjpqNBAekQeBfJOeHWS81FQoo4/I7UDcS3wUh0liTzLqiEgDqddx4ZHDrNZAACIAEMw88HPYWb0GAhABgEDmgf9Vb5oNBCByOxD3uqWYbCHVBgIQuRlIsbfwMEG5gQBE7gSyHMDsOayrxJvHBRC5B0hOxJH1nK4SlUE6QOR+IG6ju3iYQEqDdIDIzUDyZu/jMRHpS/OiRG4FkiPRfTw8kbrvIAJEACAIDpyHC1/GQHhEbgKSXwTyqIeEur6kixEBgABHOTr7YSX1MSFAhA0E307wUU76Y0KACAsI/tvCRzkF+iIuL0AEAYLbR2QOfvhKJ/obRESBxNt5rPSFXN4f7dyNdqMgEIbhAXWwJErT/e7/Wreb5HTT07QVgWSAeW5g7b4n8qOSUCRPEId4HP93SXp5dDNGRJFcQTxihSH+NW1Bb1cXKpIryJAwnG/zhl8ZcSP6jiKZghwRaaWLnP/AkcSKKJIniEcUs8QfjFLdEmRvkSxB4lfn0QN6DY+lshQpHiT96Dlr6r5hxRUpHST9ZEY71X7DOmOZQVZLsd5Q8wzrPxYYJDiKNqOBG1ZCkZKzrNXu6lHvkjChSFqQsdTPg45ApXtYaUXKr9TNuPcvqO2pVMkitFXAL2a79/qr3HQvVSTXUtofCl79RDXh5CDpw3pwu6+9kRlvtiI5VtPhmHLltT4EKVQkfb8pcOHrXqk6nBAksUjgpKtuYsskaxGKYT0+84uYgziE4YQgMdx0m8PRfis2MbL33PMXoVjD6PEunI4HSjDjStiJP08vQk9hZzQ7oH/geoLYCUBDW4rf4FqCDFt7THUO6B+4jiDn2XNTW7zf4hqCMND4BOsGyw+yAmh0x+QeFh7EeqD5Ce8nLDrI8NpbDyIWHIQNruo4GyAPlhrEzuixBxHLDDJMnfYgYolBricHNfjIdgMWF+Qyu+pkgX4HCwuymL57ELGkIHZG7z2IWE6Q5VV7vGMhQewbtMcZiwhyHj26ne9+xs8PcvDQHnFFqCD7Au0RW4TK+fOKqw4eoOcqYqgU53HR3/5uShFPCfKey9hFDyJO/vAi7RDZnp7X5igyUH72xSDW1E2Pn4tMRCQgR8vLwbgii4gcmLvqQcSPGtIPX3M08wn6I4qYQ94cM/Yw9Xxhmw+X/59wHrtMlX1AmIkzdyaaAnLg1Nnw8WGYSk40X/BOh4+El6LMSBnN2Cd0tPq4w/LJXGrMbCX06PZ2dcM65yzlNertShSHf3SzRAyPM332IcSAHUKPi8EHmXU0l8Uglmni0yipDoi16s+jJKejhywLooz68yiMEcHr2qM4h81CJ++VPJfTu5UwBpv4Pp9DJSi6MJx0bvUwiw4ewgT8zNR0LHUL+OccOpY/3ElzyGKD5pBlMJpDlsOkMythRoNbXh95PJsdA67MrMtAEYbjeDqNo+7oKqWUUkoppZRSSimllFJKFfMXp4vmSjB8n6sAAAAASUVORK5CYII="),i.IMAGE}}],(n=[{key:"dispose",value:function(){qs(Zs(i.prototype),"dispose",this).call(this),this.started=!1,delete this._audio}},{key:"ready",value:function(){var t=this;qs(Zs(i.prototype),"ready",this).call(this),this._audio=new Audio,this._audio.addEventListener("canplay",(function(){t.started&&t._audio.play()}));var e=this.state,n=e.src,r=void 0===n?"":n,o=e.loop,a=void 0!==o&&o,u=e.started,c=void 0!==u&&u;this.onchangeSrc(r),this.onchangeLoop(a),this.onchangeStarted(c)}},{key:"render",value:function(t){var e=this.model,n=e.left,r=e.top,o=e.width,a=e.height;e.src,t.beginPath(),this.drawImage(t,i.image,n,r,o,a)}},{key:"nature",get:function(){return $s}},{key:"hasTextProperty",get:function(){return!1}},{key:"src",get:function(){return this.get("src")},set:function(t){this.set("src",t)}},{key:"started",get:function(){return!!this.get("started")},set:function(t){this.set("started",t)}},{key:"start",value:function(){this._audio&&(this._audio.classList.add("active"),this._audio.play())}},{key:"pause",value:function(){this._audio&&(this._audio.classList.remove("active"),this._audio.pause())}},{key:"onchangeSrc",value:function(t){try{"data"!==String(t).substring(0,4)?this._audio.crossOrigin="use-credentials":this._audio.crossOrigin=null,this._audio.src="string"==typeof t?this.app.url(t):t}catch(t){return void console.error(t)}}},{key:"onchangeStarted",value:function(t){var e=this._audio;t?4==e.readyState&&e.play():e.pause()}},{key:"onchangeLoop",value:function(t){this._audio.loop=t}},{key:"onchange",value:function(t,e){"src"in t&&this.onchangeSrc(t.src),"started"in t&&this.onchangeStarted(t.started),"loop"in t&&this.onchangeLoop(t.loop)}},{key:"ondblclick",value:function(t){this.started=!this.started}},{key:"ondropfile",value:function(t,e){for(var n=0;n<t.length;n++)if(t[n].type.startsWith("audio/"))return void(this.src=e[n])}}])&&Xs(e.prototype,n),r&&Xs(e,r),i}(zn(En));function ef(t){return(ef="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function nf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rf(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 of(t,e){return(of=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function af(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=cf(t);if(e){var o=cf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return uf(this,n)}}function uf(t,e){return!e||"object"!==ef(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function cf(t){return(cf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("audio",tf);var sf=function(t){!function(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&&of(t,e)}(i,t);var e,n,r,o=af(i);function i(){return nf(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"is3dish",value:function(){return!0}}])&&rf(e.prototype,n),r&&rf(e,r),i}(zn(mn));function ff(t){return(ff="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function lf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hf(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 pf(t,e,n){return(pf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=gf(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function yf(t,e){return(yf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function df(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=gf(t);if(e){var o=gf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vf(this,n)}}function vf(t,e){return!e||"object"!==ff(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function gf(t){return(gf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("text",sf);var mf={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"id-input",label:"ref",name:"ref"},{type:"select",label:"fit",name:"fit",property:{options:["both","ratio"]}}],"value-property":"ref",help:"scene/component/local-ref"},bf=function(t){!function(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&&yf(t,e)}(i,t);var e,n,r,o=df(i);function i(){return lf(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"ref",get:function(){var t=this.getState("ref");return t&&"string"==typeof t?this.root.findById(t):null},set:function(t){this.setState("ref",t)}},{key:"refScale",get:function(){var t=this.ref.bounds,e=this.bounds,n=e.width/t.width,r=e.height/t.height;switch(this.model.fit){case"both":return{x:n,y:r};case"ratio":default:return{x:Math.min(n,r),y:Math.min(n,r)}}}},{key:"draw",value:function(t){this._drawing||(this._drawing=!0,pf(gf(i.prototype),"draw",this).call(this,t),this._drawing=!1)}},{key:"prerender",value:function(t){if(pf(gf(i.prototype),"prerender",this).call(this,t),this.ref){var e=this.ref.center,n=this.center,r=this.refScale;t.translate(n.x,n.y),t.scale(r.x,r.y),t.translate(-e.x,-e.y)}}},{key:"postrender",value:function(t){if(this.ref)return this.ref.postrender(t);pf(gf(i.prototype),"postrender",this).call(this,t)}},{key:"render",value:function(t){if(this.ref)return this.ref.render(t);this.model.round;var e=this.bounds,n=e.left,r=e.top,o=e.width,i=e.height;t.beginPath(),t.rect(n,r,o,i)}},{key:"nature",get:function(){return mf}},{key:"hasTextProperty",get:function(){return!1}}])&&hf(e.prototype,n),r&&hf(e,r),i}(zn(En));function wf(t){return(wf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function xf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _f(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 kf(t,e){return(kf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Af(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=Of(t);if(e){var o=Of(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Sf(this,n)}}function Sf(t,e){return!e||"object"!==wf(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Of(t){return(Of=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.memoize(bf.prototype,"ref",!1),mn.memoize(bf.prototype,"refScale",!1),mn.register("local-ref",bf);var Ef=function(t){!function(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&&kf(t,e)}(i,t);var e,n,r,o=Af(i);function i(){return xf(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(t){}},{key:"layout",get:function(){return Qn.get(this.get("layout"))||Zn}}])&&_f(e.prototype,n),r&&_f(e,r),i}(ri(Yr));function Pf(t){return(Pf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function jf(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function Mf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rf(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 Tf(t,e,n){return(Tf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Bf(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function If(t,e){return(If=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Cf(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=Bf(t);if(e){var o=Bf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zf(this,n)}}function zf(t,e){return!e||"object"!==Pf(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Bf(t){return(Bf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Lf={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"board-selector",label:"scene-number",name:"ref",placeholder:"SCENE-1"},{type:"select",label:"fit",name:"fit",property:{options:["both","ratio"]}},{type:"select",label:"mode",name:"mode",property:{options:["view","interaction"]}}],"value-property":"ref",help:"scene/component/global-ref"},Ff=function(t){!function(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&&If(t,e)}(u,t);var e,n,r,o,i,a=Cf(u);function u(){return Mf(this,u),a.apply(this,arguments)}return e=u,(n=[{key:"dispose",value:function(){this._releaseRef(),Tf(Bf(u.prototype),"dispose",this).call(this)}},{key:"nature",get:function(){return Lf}},{key:"hasTextProperty",get:function(){return!1}},{key:"tagName",get:function(){return"div"}},{key:"setElementProperties",value:function(t){var e=this.state.mode,n=void 0===e?"view":e;t.style.pointerEvents="view"==n?"none":"inherit"}},{key:"ready",value:function(){Tf(Bf(u.prototype),"ready",this).call(this),this.fetchRef()}},{key:"reposition",value:function(){if(this.element){Tf(Bf(u.prototype),"reposition",this).call(this);var t=this._element_bounds,e=this.element,n=e.offsetWidth,r=e.offsetHeight;if(this._element_bounds={offsetWidth:n,offsetHeight:r},(!t||t.offsetWidth!=n||t.offsetHeight!=r)&&this.ref&&this.root.target_element){var o=this.state.fit,i=void 0===o?"ratio":o;this.ref.fit(i)}}}},{key:"fetchRef",value:(o=regeneratorRuntime.mark((function t(){var e,n,r,o,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._releaseRef(),e=this.state,n=e.ref,r=e.fit,o=void 0===r?"ratio":r,n){t.next=4;break}return t.abrupt("return");case 4:if(!(i=this.app.refProvider)||!n){t.next=18;break}return t.prev=6,t.next=9,i.get(n,!0);case 9:this.__ref=t.sent,this.__ref.target=this.element,this.__ref.fit(o),this.__ref.data=this.data,t.next=18;break;case 15:t.prev=15,t.t0=t.catch(6),pe(t.t0);case 18:case"end":return t.stop()}}),t,this,[[6,15]])})),i=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){jf(i,n,r,a,u,"next",t)}function u(t){jf(i,n,r,a,u,"throw",t)}a(void 0)}))},function(){return i.apply(this,arguments)})},{key:"ref",get:function(){return this.__ref},set:function(t){this.setState("ref",t)}},{key:"_releaseRef",value:function(){this.__ref&&this.__ref.release&&this.__ref.release(),delete this.__ref}},{key:"onchange",value:function(t,e,n){var r=this;Tf(Bf(u.prototype),"onchange",this).call(this,t,e,n),"ref"in t&&this.fetchRef(),"fit"in t&&this.ref&&requestAnimationFrame((function(){var t=r.state.fit;r.ref.fit(t)})),"data"in t&&this.ref&&requestAnimationFrame((function(){r.ref.data=t.data}))}}])&&Rf(e.prototype,n),r&&Rf(e,r),u}(Ef);function Nf(t){return(Nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Df(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Uf(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 Yf(t,e,n){return(Yf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Vf(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Gf(t,e){return(Gf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Wf(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=Vf(t);if(e){var o=Vf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Hf(this,n)}}function Hf(t,e){return!e||"object"!==Nf(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Vf(t){return(Vf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("global-ref",Ff);var Xf={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"board-selector",label:"board",name:"board"},{type:"checkbox",label:"modal",name:"modal"},{type:"checkbox",label:"closable",name:"closable"},{type:"checkbox",label:"show",name:"show"},{type:"select",label:"location",name:"location",property:{options:["center","left-top","right-top","left-bottom","right-bottom","auto"]}},{type:"data",label:"value",name:"value"}],help:"scene/component/popup"},qf=function(t){!function(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&&Gf(t,e)}(i,t);var e,n,r,o=Wf(i);function i(){return Df(this,i),o.apply(this,arguments)}return e=i,r=[{key:"image",get:function(){return i._image||(i._image=new Image,i._image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAABGCAMAAABG8BK2AAADJmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNy4xLWMwMDAgNzkuZGFiYWNiYiwgMjAyMS8wNC8xNC0wMDozOTo0NCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIzLjAgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RkM4QzQxNUMzMzBEMTFFQ0JEMzZDMDUwQUI4MEI3QTAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RkM4QzQxNUQzMzBEMTFFQ0JEMzZDMDUwQUI4MEI3QTAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpENjlENTQ3RjMzMDkxMUVDQkQzNkMwNTBBQjgwQjdBMCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpENjlENTQ4MDMzMDkxMUVDQkQzNkMwNTBBQjgwQjdBMCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsiUYSQAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAA51BMVEVHcEwzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzOguTm2AAAATHRSTlMARhB73r9B7YLrsqdE+0cq9Avzeg31eQx4aQ+Ks6aUd5DsYKixEX1w8vyT2VjoZ3YezY/cCEDvl+QTvRwJ0ifwK/5T/aw6+IuFuCImAcS6MQAAAeJJREFUWMPt2FlX2zAQhuHJYmOSFhIggbC0QNn3rS1dKXSH9///Hi58CJLxKIpEWi6YO8c5z4lG/nxGEXmu/1OVLGnhrFaSVQYg1SZetTTvUibqeFZ9QlfmvRWoV1VmCaCRzroXPpsuAjTV7gLUfPahBqD1OQMW/fazAWTKvQRI/ZgUSJR7U8CM/dHZ+/2VcatWdvdEZAaYUhiAwkerJXt0rnzXwdRKmHfDM0fHD5kxjTFyVLzVfvvirn7+cDJWjhy7c7XlYuwc6Urvu2tRhRypyhwAf1sKY+TIxfQA+H39q5wxc+RgVrcBduTmZTlj5khnDgH4IzKpMGaOVCbvyyvRGTNHGtPrKypjXirM5jb910I4k69oQeKY+77EMAcALEsck/+W6f71tyCma/ZFROTrJVwMy7wmf3bv6/MX+Dgkkysblvxps/dhOKZb6IvrTakzXXuPApnpYneDGOeKvJlaSXcDmA7AicQyW84VeTOnY+NdiWcG1uiZksFEHdyAlsJEjEkmkwGNsKHNZCJGSKtVTYC1tO022mnjwUBrMdXg8dreuOBhv7D/62/8lGZ1wLxXyZKOm+iUHIQintyny0TkaATHjYgcjeAoFpEje9R/nGPqIx2aw3NU9odCQI6e6x/VLY32cKQXVBnkAAAAAElFTkSuQmCC"),i._image}}],(n=[{key:"ready",value:function(){Yf(Vf(i.prototype),"ready",this).call(this),this.show&&this.onchangeShow(!0)}},{key:"render",value:function(t){var e=this.bounds,n=e.left,r=e.top,o=e.width,a=e.height;t.beginPath(),this.drawImage(t,i.image,n,r,o,a)}},{key:"onchange",value:function(t,e){"value"in t?this.show?this.onchangeShow(!0):this.show=!0:"show"in t&&this.onchangeShow(this.show)}},{key:"onchangeShow",value:function(t){!this.app.isEditMode&&this.getState("board")&&(t?sr(this,this.board,{location:this.getState("location"),modal:this.getState("modal"),closable:this.getState("closable")||!1,data:this.value}):cr(this))}},{key:"board",get:function(){return this.getState("board")},set:function(t){this.set("board",t)}},{key:"show",get:function(){return this.getState("show")},set:function(t){this.setState("show",t)}},{key:"started",get:function(){return this.getState("show")},set:function(t){this.setState("show",t)}},{key:"value",get:function(){return this.getState("value")},set:function(t){this.setState("value",t)}},{key:"hasTextProperty",get:function(){return!1}},{key:"nature",get:function(){return Xf}}])&&Uf(e.prototype,n),r&&Uf(e,r),i}(zn(En));function Kf(t){return(Kf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Qf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jf(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 Zf(t,e){return(Zf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $f(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=el(t);if(e){var o=el(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tl(this,n)}}function tl(t,e){return!e||"object"!==Kf(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function el(t){return(el=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("popup",qf);var nl=function(t){!function(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&&Zf(t,e)}(i,t);var e,n,r,o=$f(i);function i(){return Qf(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(t){var e=this.model.path,n=void 0===e?[]:e;if(!(n.length<=1)){t.beginPath(),t.moveTo(n[0].x,n[0].y);for(var r=1;r<n.length;r++)t.lineTo(n[r].x,n[r].y);t.closePath(),this.drawStroke(t)}}},{key:"path",get:function(){return this.model.path},set:function(t){this.set("path",t)}},{key:"contains",value:function(t,e){var n=this.model.path,r=!1;return n.forEach((function(o,i){var a=(i+n.length+1)%n.length,u=o.x,c=o.y,s=n[a].x,f=n[a].y;c>e!=f>e&&t<(s-u)*(e-c)/(f-c)+u&&(r=!r)})),r}}])&&Jf(e.prototype,n),r&&Jf(e,r),i}(mn);function rl(t){return(rl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ol(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function il(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 al(t,e){return(al=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ul(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=sl(t);if(e){var o=sl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return cl(this,n)}}function cl(t,e){return!e||"object"!==rl(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function sl(t){return(sl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("path",nl);var fl=function(t){!function(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&&al(t,e)}(i,t);var e,n,r,o=ul(i);function i(){return ol(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(t){var e=this.model,n=e.x1,r=e.y1,o=e.x2,i=e.y2,a=e.x3,u=e.y3;t.beginPath(),t.moveTo(n,r),t.lineTo(o,i),t.lineTo(a,u),t.closePath()}},{key:"contains",value:function(t,e){for(var n=this.model,r=[n.x1,n.y1,n.x2,n.y2,n.x3,n.y3],o=!1,i=0;i<r.length;i+=2){var a=(i+2)%r.length,u=r[i],c=r[i+1],s=r[a+1];c>e!=s>e&&t<(r[a]-u)*(e-c)/(s-c)+u&&(o=!o)}return o}},{key:"mutable",get:function(){return!0}},{key:"path",get:function(){var t=this.model;return[{x:t.x1,y:t.y1},{x:t.x2,y:t.y2},{x:t.x3,y:t.y3}]},set:function(t){this.set({x1:t[0].x,y1:t[0].y,x2:t[1].x,y2:t[1].y,x3:t[2].x,y3:t[2].y})}}])&&il(e.prototype,n),r&&il(e,r),i}(En);function ll(t){return(ll="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pl(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 yl(t,e){return(yl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function dl(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=gl(t);if(e){var o=gl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vl(this,n)}}function vl(t,e){return!e||"object"!==ll(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function gl(t){return(gl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.memoize(fl.prototype,"path",!1),mn.register("triangle",fl);var ml={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"number",label:"ratio",name:"ratio",property:"ratio"}],help:"scene/component/donut"},bl={ondragmove:function(t,e,n){n.controls;var r=n.model,o=r.cx,i=r.rx;i=Math.abs(i);var a=(n.transcoordP2S(t.x,t.y).x-o)/i*100;a=a>=100||a<=-100?100:Math.abs(a),n.set({ratio:a})}},wl=function(t){!function(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&&yl(t,e)}(i,t);var e,n,r,o=dl(i);function i(){return hl(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"is3dish",value:function(){return!1}},{key:"render",value:function(t){var e=this.model,n=e.ratio,r=void 0===n?50:n,o=e.cx,i=e.cy,a=e.rx,u=e.ry,c=e.startAngle,s=e.endAngle,f=e.anticlockwise;a=Math.abs(a),u=Math.abs(u),t.beginPath(),t.ellipse(o,i,a,u,0,c||0,s||2*Math.PI,f),t.moveTo(o+a/100*r,i),t.ellipse(o,i,a/100*r,u/100*r,0,c||0,s||2*Math.PI,!0)}},{key:"contains",value:function(t,e){var n=this.model,r=n.cx,o=n.cy,i=n.rx,a=n.ry,u=n.ratio,c=(t-r)/(2*(i=Math.abs(i))-.5),s=(e-o)/(2*(a=Math.abs(a))-.5),f=(t-r)/(i/100*u*2-.5),l=(e-o)/(a/100*u*2-.5),h=!1;return c*c+s*s<.25&&f*f+l*l>.25&&(h=!h),h}},{key:"controls",get:function(){var t=this.model,e=t.cx,n=t.cy,r=t.rx,o=t.ratio;return[{x:e+(r=Math.abs(r))/100*o,y:n,handler:bl}]}},{key:"nature",get:function(){return ml}}])&&pl(e.prototype,n),r&&pl(e,r),i}(Qc);function xl(t){return(xl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kl(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 Al(t,e){return(Al=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Sl(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=El(t);if(e){var o=El(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ol(this,n)}}function Ol(t,e){return!e||"object"!==xl(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function El(t){return(El=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.memoize(wl.prototype,"controls",!1),mn.register("donut",wl);var Pl={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"number",label:"ratio",name:"ratio",property:"ratio"},{type:"number",label:"wing",name:"wing",property:"wing"}],help:"scene/component/star"},jl={ondragmove:function(t,e,n){n.controls;var r=n.model,o=r.cy,i=r.ry,a=(n.transcoordP2S(t.x,t.y).y-o)/i*100+100;a>=100?a=100:a<=0&&(a=0),n.set({ratio:a})}},Ml=function(t){!function(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&&Al(t,e)}(i,t);var e,n,r,o=Sl(i);function i(){return _l(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"is3dish",value:function(){return!1}},{key:"render",value:function(t){var e=this.model,n=e.ratio,r=void 0===n?30:n,o=e.wing,i=void 0===o?5:o,a=e.cx,u=e.cy,c=e.rx,s=e.ry;if(e.startAngle,e.endAngle,e.anticlockwise,!(i<3)){var f=1.5707963267948966,l=2*Math.PI/i,h=c-r/100*c,p=s-r/100*s;t.save(),t.beginPath(),t.translate(a,u),t.moveTo(c*Math.cos(-f),s*Math.sin(-f)),t.lineTo((c-h)*(Math.cos(l-f)+Math.cos(0-f))/2,(s-p)*(Math.sin(l-f)+Math.sin(0-f))/2);for(var y=1;y<i;y++)t.lineTo(c*Math.cos(l*y-f),s*Math.sin(l*y-f)),t.lineTo((c-h)*(Math.cos(l*(y+1)-f)+Math.cos(l*y-f))/2,(s-p)*(Math.sin(l*(y+1)-f)+Math.sin(l*y-f))/2);t.closePath(),t.restore()}}},{key:"controls",get:function(){var t=this.model,e=t.cx,n=t.cy,r=t.ry;return[{x:e,y:n-r+r*(t.ratio/100),handler:jl}]}},{key:"nature",get:function(){return Pl}}])&&kl(e.prototype,n),r&&kl(e,r),i}(Qc);function Rl(t){return(Rl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Tl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Il(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 Cl(t,e){return(Cl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function zl(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=Ll(t);if(e){var o=Ll(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Bl(this,n)}}function Bl(t,e){return!e||"object"!==Rl(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Ll(t){return(Ll=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.memoize(Ml.prototype,"controls",!1),mn.register("star",Ml);var Fl={mutable:!1,resizable:!0,rotatable:!1,properties:[]},Nl=function(t){!function(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&&Cl(t,e)}(i,t);var e,n,r,o=zl(i);function i(){return Tl(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(t){var e=this.bounds,n=e.left,r=e.top,o=e.width,i=e.height;t.beginPath(),t.rect(n,r,o,i)}},{key:"text",get:function(){return this.get("id")},set:function(t){}},{key:"rotatable",get:function(){return!1}},{key:"nature",get:function(){return Fl}}])&&Il(e.prototype,n),r&&Il(e,r),i}(zn(En));function Dl(t){return(Dl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ul(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yl(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 Gl(t,e,n){return(Gl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Xl(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function Wl(t,e){return(Wl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Hl(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=Xl(t);if(e){var o=Xl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Vl(this,n)}}function Vl(t,e){return!e||"object"!==Dl(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Xl(t){return(Xl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("variable",Nl);var ql=function(t){return function(t){!function(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&&Wl(t,e)}(i,t);var e,n,r,o=Hl(i);function i(){return Ul(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"animOnValueChange",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;if(t!=this._lastValue){if(n)var o=t-(Number(r)||0);else o=t-(this._lastValue||0);this._lastValue=t,this._anim_alpha=-o,this.animate({step:function(t){e._anim_alpha=o*(t-1),e.invalidate()},duration:1e3,delta:"circ",options:{x:1},ease:"out"}).start()}}},{key:"dispose",value:function(){Gl(Xl(i.prototype),"dispose",this).call(this),delete this._value_substitutor}},{key:"onchange",value:function(t,e){t.hasOwnProperty("value")&&delete this._value_substitutor}},{key:"animAlpha",get:function(){return this._anim_alpha||0}},{key:"animValue",get:function(){return(this._lastValue||0)+(this._anim_alpha||0)}},{key:"defaultValueSubstitutor",value:function(){return this.getState("value")}},{key:"valueSubstitutor",get:function(){return this._value_substitutor||(this._value_substitutor=Te(this.getState("value"),this)||this.defaultValueSubstitutor),this._value_substitutor}},{key:"value",get:function(){return Number(this.valueSubstitutor())||0},set:function(t){delete this._value_substitutor,this.setState("value",Number(M(t)))}}])&&Yl(e.prototype,n),r&&Yl(e,r),i}(t)};function Kl(t){return(Kl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ql(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jl(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 Zl(t,e){return(Zl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $l(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=eh(t);if(e){var o=eh(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return th(this,n)}}function th(t,e){return!e||"object"!==Kl(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function eh(t){return(eh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var nh=function(t){return function(t){!function(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&&Zl(t,e)}(i,t);var e,n,r,o=$l(i);function i(){return Ql(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"_convertDataFormat",value:function(t,e){var n;switch(e){case"json":n=JSON.parse(t);break;default:n=t}return n}},{key:"isDataSource",value:function(){return!0}}])&&Jl(e.prototype,n),r&&Jl(e,r),i}(t)};function rh(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function oh(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)}}var ih=new WeakSet,ah=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.counters={},this.references={},this.creator=e,this.disposer=n,ih.add(this)}var e,n,r;return e=t,n=[{key:"dispose",value:function(){if(this.disposer)for(var t in this.references)this.disposer.call(null,t,this.references[t]);delete this.references,delete this.counters}},{key:"ids",get:function(){return Object.keys(this.references)}},{key:"add",value:function(t,e){var n=this,r=new Promise((function(r,o){var i=n.references[t];if(i)i===e?o(Error("Reference ID and target duplicate")):e?o(Error("Reference ID duplicate")):r(i);else{function a(e){e=ot(e,(function(){var t=this;this.release=function(){return n.release(t)}})),n.references[t]=e,n.counters[t]=1,r(e)}if(e)a(e);else{if(!n.creator)return void o(Error("Reference id("+t+") is not allowed. Reference creator should be defined."));n.creator.call(null,t,(function(t){a(t)}),(function(t){o(t)}))}}}));return this.references[t]||(this.references[t]=r),r}},{key:"get",value:function(){var t,e=(t=regeneratorRuntime.mark((function t(e,n){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=this.references[e])){t.next=13;break}if(r instanceof Promise){t.next=7;break}if(e in this.counters){t.next=5;break}throw new Error("No Reference Count");case 5:return this.counters[e]++,t.abrupt("return",r);case 7:if(!n){t.next=13;break}return t.next=10,r;case 10:return r=t.sent,this.counters[e]++,t.abrupt("return",r);case 13:if(!n){t.next=17;break}return t.next=16,this.add(e);case 16:return t.abrupt("return",t.sent);case 17:throw new Error("No References for "+e);case 18:case"end":return t.stop()}}),t,this)})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){rh(i,r,o,a,u,"next",t)}function u(t){rh(i,r,o,a,u,"throw",t)}a(void 0)}))});return function(t,n){return e.apply(this,arguments)}}()},{key:"_id",value:function(t){for(var e in this.references)if(this.references[e]===t)return e;return-1}},{key:"release",value:function(t){var e=this._id(t),n=this.references[e];n?(this.counters[e]--,0==this.counters[e]&&(this.disposer&&this.disposer.call(null,e,n),delete this.references[e],delete this.counters[e],de("RELEASED",e))):pe("No Referenced ID")}}],r=[{key:"residents",get:function(){return ih}}],n&&oh(e.prototype,n),r&&oh(e,r),t}();function uh(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)}}var ch={},sh={},fh=[];function lh(t){var e="SCRIPT"==t.target.tagName?ch:sh,n=t.target.src||t.target.href;e[n]=!0,fh.forEach((function(t,r){var o=t.resolve,i=t.scripts,a=t.styles;if(e==ch){var u=i.indexOf(n);u>-1&&u<i.length-1&&ph(i[u+1])}for(var c=0;c<i.length;c++)if(!ch[i[c]])return;if(a)for(var s=0;s<a.length;s++)if(!sh[a[s]])return;o(),fh[r]=null})),fh=fh.filter((function(t){return t}))}function hh(t){var e=t.target.src,n="SCRIPT"==t.target.tagName?ch:sh;fh.forEach((function(r,o){var i=r.reject,a=r.scripts,u=r.styles,c=!1;if(n===ch){for(var s=0;s<a.length;s++)if(a[s]==e){c=!0;break}}else if(u)for(var f=0;f<u.length;f++)if(u[f]==e){c=!0;break}c&&(i(t),fh[o]=null)})),fh=fh.filter((function(t){return t})),delete n[e],document.head.removeChild(t.target)}function ph(t){ch[t]=!1;var e=document.createElement("script");e.onload=lh,e.onerror=hh,e.type="text/javascript",e.src=t,document.head.appendChild(e)}var yh=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r;return e=t,r=[{key:"load",value:function(t,e){return"string"==typeof t&&(t=[t]),"string"==typeof e&&(e=[e]),new Promise((function(n,r){if((!t||t instanceof Array)&&(!e||e instanceof Array)){var o,i=!0;if(e&&e.forEach((function(t){sh.hasOwnProperty(t)||function(t){sh[t]=!1;var e=document.createElement("link");e.onload=lh,e.onerror=hh,e.type="text/css",e.rel="stylesheet",e.media="screen,print",e.href=t,document.head.appendChild(e)}(t),sh[t]||(i=!1)})),t&&t.length>0&&t.forEach((function(t){ch.hasOwnProperty(t)?ch[t]||(i=!1):o=o||t})),o)ph(o);else if(i)return void n();fh.push({resolve:n,reject:r,scripts:t,styles:e})}else r("invalid sources for load")}))}}],(n=null)&&uh(e.prototype,n),r&&uh(e,r),t}(),dh="0.0.0",vh=0,gh=performance.now(),mh=0;function bh(){return vh}requestAnimationFrame((function t(){requestAnimationFrame(t),mh++;var e=performance.now(),n=e-gh;n<1e3||(vh=Math.round(1e3*mh/n),gh=e,mh=0)}));var wh=u;function xh(){}}])}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.scene=e():t.scene=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.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 o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));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=592)}([function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(1),i=n(21).f,a=n(27),u=n(16),c=n(126),s=n(127),f=n(76);t.exports=function(t,e){var n,l,h,p,d,y=t.target,v=t.global,g=t.stat;if(n=v?o:g?o[y]||c(y,{}):(o[y]||{}).prototype)for(l in e){if(p=e[l],h=t.noTargetGet?(d=i(n,l))&&d.value:n[l],!f(v?l:y+(g?".":"#")+l,t.forced)&&void 0!==h){if(r(p)==r(h))continue;s(p,h)}(t.sham||h&&h.sham)&&a(p,"sham",!0),u(n,l,p,t)}}},function(t,e,n){(function(e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==("undefined"==typeof globalThis?"undefined":n(globalThis))&&globalThis)||r("object"==("undefined"==typeof window?"undefined":n(window))&&window)||r("object"==("undefined"==typeof self?"undefined":n(self))&&self)||r("object"==(void 0===e?"undefined":n(e))&&e)||function(){return this}()||Function("return this")()}).call(this,n(166))},function(t,e){var n=Function.prototype,r=n.bind,o=n.call,i=r&&r.bind(o);t.exports=r?function(t){return t&&i(o,t)}:function(t){return t&&function(){return o.apply(t,arguments)}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(1),o=n(5),i=r.String,a=r.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not an object")}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(10);t.exports=function(t){return"object"==r(t)?null!==t:o(t)}},function(t,e,n){var r=n(1),o=n(91),i=n(14),a=n(73),u=n(124),c=n(167),s=o("wks"),f=r.Symbol,l=f&&f.for,h=c?f:f&&f.withoutSetter||a;t.exports=function(t){if(!i(s,t)||!u&&"string"!=typeof s[t]){var e="Symbol."+t;u&&i(f,t)?s[t]=f[t]:s[t]=c&&l?l(e):h(e)}return s[t]}},function(t,e,n){var r=n(3);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,n){var r=n(1),o=n(57),i=r.String;t.exports=function(t){if("Symbol"===o(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},function(t,e,n){"use strict";var r,o,i,a=n(141),u=n(7),c=n(1),s=n(10),f=n(5),l=n(14),h=n(57),p=n(72),d=n(27),y=n(16),v=n(12).f,g=n(31),m=n(33),b=n(43),w=n(6),x=n(73),_=c.Int8Array,k=_&&_.prototype,A=c.Uint8ClampedArray,S=A&&A.prototype,O=_&&m(_),E=k&&m(k),P=Object.prototype,j=c.TypeError,M=w("toStringTag"),R=x("TYPED_ARRAY_TAG"),T=x("TYPED_ARRAY_CONSTRUCTOR"),I=a&&!!b&&"Opera"!==h(c.opera),C=!1,z={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},B={BigInt64Array:8,BigUint64Array:8},L=function(t){if(!f(t))return!1;var e=h(t);return l(z,e)||l(B,e)};for(r in z)(i=(o=c[r])&&o.prototype)?d(i,T,o):I=!1;for(r in B)(i=(o=c[r])&&o.prototype)&&d(i,T,o);if((!I||!s(O)||O===Function.prototype)&&(O=function(){throw j("Incorrect invocation")},I))for(r in z)c[r]&&b(c[r],O);if((!I||!E||E===P)&&(E=O.prototype,I))for(r in z)c[r]&&b(c[r].prototype,E);if(I&&m(S)!==E&&b(S,E),u&&!l(E,M))for(r in C=!0,v(E,M,{get:function(){return f(this)?this[R]:void 0}}),z)c[r]&&d(c[r],R,r);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:I,TYPED_ARRAY_CONSTRUCTOR:T,TYPED_ARRAY_TAG:C&&R,aTypedArray:function(t){if(L(t))return t;throw j("Target is not a typed array")},aTypedArrayConstructor:function(t){if(s(t)&&(!b||g(O,t)))return t;throw j(p(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n){if(u){if(n)for(var r in z){var o=c[r];if(o&&l(o.prototype,t))try{delete o.prototype[t]}catch(t){}}E[t]&&!n||y(E,t,n?e:I&&k[t]||e)}},exportTypedArrayStaticMethod:function(t,e,n){var r,o;if(u){if(b){if(n)for(r in z)if((o=c[r])&&l(o,t))try{delete o[t]}catch(t){}if(O[t]&&!n)return;try{return y(O,t,n?e:I&&O[t]||e)}catch(t){}}for(r in z)!(o=c[r])||o[t]&&!n||y(o,t,e)}},isView:function(t){if(!f(t))return!1;var e=h(t);return"DataView"===e||l(z,e)||l(B,e)},isTypedArray:L,TypedArray:O,TypedArrayPrototype:E}},function(t,e){t.exports=function(t){return"function"==typeof t}},function(t,e){var n=Function.prototype.call;t.exports=n.bind?n.bind(n):function(){return n.apply(n,arguments)}},function(t,e,n){var r=n(1),o=n(7),i=n(169),a=n(4),u=n(49),c=r.TypeError,s=Object.defineProperty;e.f=o?s:function(t,e,n){if(a(t),e=u(e),a(n),i)try{return s(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}},function(t,e,n){var r=n(1),o=n(17),i=r.Object;t.exports=function(t){return i(o(t))}},function(t,e,n){var r=n(2),o=n(13),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},function(t,e,n){var r=n(28);t.exports=function(t){return r(t.length)}},function(t,e,n){var r=n(1),o=n(10),i=n(14),a=n(27),u=n(126),c=n(93),s=n(18),f=n(55).CONFIGURABLE,l=s.get,h=s.enforce,p=String(String).split("String");(t.exports=function(t,e,n,c){var s,l=!!c&&!!c.unsafe,d=!!c&&!!c.enumerable,y=!!c&&!!c.noTargetGet,v=c&&void 0!==c.name?c.name:e;o(n)&&("Symbol("===String(v).slice(0,7)&&(v="["+String(v).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(n,"name")||f&&n.name!==v)&&a(n,"name",v),(s=h(n)).source||(s.source=p.join("string"==typeof v?v:""))),t!==r?(l?!y&&t[e]&&(d=!0):delete t[e],d?t[e]=n:a(t,e,n)):d?t[e]=n:u(e,n)})(Function.prototype,"toString",(function(){return o(this)&&l(this).source||c(this)}))},function(t,e,n){var r=n(1).TypeError;t.exports=function(t){if(null==t)throw r("Can't call method on "+t);return t}},function(t,e,n){var r,o,i,a=n(170),u=n(1),c=n(2),s=n(5),f=n(27),l=n(14),h=n(125),p=n(94),d=n(74),y=u.TypeError,v=u.WeakMap;if(a||h.state){var g=h.state||(h.state=new v),m=c(g.get),b=c(g.has),w=c(g.set);r=function(t,e){if(b(g,t))throw new y("Object already initialized");return e.facade=t,w(g,t,e),e},o=function(t){return m(g,t)||{}},i=function(t){return b(g,t)}}else{var x=p("state");d[x]=!0,r=function(t,e){if(l(t,x))throw new y("Object already initialized");return e.facade=t,f(t,x,e),e},o=function(t){return l(t,x)?t[x]:{}},i=function(t){return l(t,x)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!s(e)||(n=o(e)).type!==t)throw y("Incompatible receiver, "+t+" required");return n}}}},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)}},function(t,e,n){var r=n(39),o=n(2),i=n(70),a=n(13),u=n(15),c=n(78),s=o([].push),f=function(t){var e=1==t,n=2==t,o=3==t,f=4==t,l=6==t,h=7==t,p=5==t||l;return function(d,y,v,g){for(var m,b,w=a(d),x=i(w),_=r(y,v),k=u(x),A=0,S=g||c,O=e?S(d,k):n||h?S(d,0):void 0;k>A;A++)if((p||A in x)&&(b=_(m=x[A],A,w),t))if(e)O[A]=b;else if(b)switch(t){case 3:return!0;case 5:return m;case 6:return A;case 2:s(O,m)}else switch(t){case 4:return!1;case 7:s(O,m)}return l?-1:o||f?f:O}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterReject:f(7)}},function(t,e,n){var r=n(7),o=n(11),i=n(90),a=n(38),u=n(23),c=n(49),s=n(14),f=n(169),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=u(t),e=c(e),f)try{return l(t,e)}catch(t){}if(s(t,e))return a(!o(i.f,t,e),t[e])}},function(t,e,n){var r=n(1),o=n(10),i=n(72),a=r.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a function")}},function(t,e,n){var r=n(70),o=n(17);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(1),o=n(10),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},function(t,e,n){var r=n(174),o=n(14),i=n(173),a=n(12).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},function(t,e,n){var r=n(2),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},function(t,e,n){var r=n(7),o=n(12),i=n(38);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(19),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(2),o=n(17),i=n(8),a=/"/g,u=r("".replace);t.exports=function(t,e,n,r){var c=i(o(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+u(i(r),a,""")+'"'),s+">"+c+"</"+e+">"}},function(t,e,n){var r=n(3);t.exports=function(t){return r((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},function(t,e,n){var r=n(2);t.exports=r({}.isPrototypeOf)},function(t,e){t.exports=!1},function(t,e,n){var r=n(1),o=n(14),i=n(10),a=n(13),u=n(94),c=n(134),s=u("IE_PROTO"),f=r.Object,l=f.prototype;t.exports=c?f.getPrototypeOf:function(t){var e=a(t);if(o(e,s))return e[s];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof f?l:null}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=Function.prototype,o=r.apply,i=r.bind,a=r.call;t.exports="object"==("undefined"==typeof Reflect?"undefined":n(Reflect))&&Reflect.apply||(i?a.bind(o):function(){return a.apply(o,arguments)})},function(t,e,n){var r,o=n(4),i=n(132),a=n(129),u=n(74),c=n(172),s=n(92),f=n(94),l=f("IE_PROTO"),h=function(){},p=function(t){return"<script>"+t+"<\/script>"},d=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;y="undefined"!=typeof document?document.domain&&r?d(r):((e=s("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):d(r);for(var n=a.length;n--;)delete y.prototype[a[n]];return y()};u[l]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(h.prototype=o(t),n=new h,h.prototype=null,n[l]=t):n=y(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(12).f,o=n(14),i=n(6)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(212),i="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,a=o||i||Function("return this")();t.exports=a},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(2),o=n(22),i=r(r.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?i(t,e):function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(24);t.exports=r("navigator","userAgent")||""},function(t,e,n){var r=n(22);t.exports=function(t,e){var n=t[e];return null==n?void 0:r(n)}},function(t,e,n){var r=n(19),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},function(t,e,n){var r=n(2),o=n(4),i=n(175);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 o(n),i(r),e?t(n,r):n.__proto__=r,n}}():void 0)},function(t,e,n){var r=n(6),o=n(35),i=n(12),a=r("unscopables"),u=Array.prototype;null==u[a]&&i.f(u,a,{configurable:!0,value:o(null)}),t.exports=function(t){u[a][t]=!0}},function(t,e,n){"use strict";var r=n(3);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(11),a=n(7),u=n(156),c=n(9),s=n(99),f=n(54),l=n(38),h=n(27),p=n(148),d=n(28),y=n(185),v=n(203),g=n(49),m=n(14),b=n(57),w=n(5),x=n(71),_=n(35),k=n(31),A=n(43),S=n(51).f,O=n(204),E=n(20).forEach,P=n(64),j=n(12),M=n(21),R=n(18),T=n(102),I=R.get,C=R.set,z=j.f,B=M.f,L=Math.round,D=o.RangeError,F=s.ArrayBuffer,N=F.prototype,U=s.DataView,Y=c.NATIVE_ARRAY_BUFFER_VIEWS,G=c.TYPED_ARRAY_CONSTRUCTOR,H=c.TYPED_ARRAY_TAG,W=c.TypedArray,V=c.TypedArrayPrototype,X=c.aTypedArrayConstructor,q=c.isTypedArray,K=function(t,e){X(t);for(var n=0,r=e.length,o=new t(r);r>n;)o[n]=e[n++];return o},Q=function(t,e){z(t,e,{get:function(){return I(this)[e]}})},J=function(t){var e;return k(N,t)||"ArrayBuffer"==(e=b(t))||"SharedArrayBuffer"==e},Z=function(t,e){return q(t)&&!x(e)&&e in t&&p(+e)&&e>=0},$=function(t,e){return e=g(e),Z(t,e)?l(2,t[e]):B(t,e)},tt=function(t,e,n){return e=g(e),!(Z(t,e)&&w(n)&&m(n,"value"))||m(n,"get")||m(n,"set")||n.configurable||m(n,"writable")&&!n.writable||m(n,"enumerable")&&!n.enumerable?z(t,e,n):(t[e]=n.value,t)};a?(Y||(M.f=$,j.f=tt,Q(V,"buffer"),Q(V,"byteOffset"),Q(V,"byteLength"),Q(V,"length")),r({target:"Object",stat:!0,forced:!Y},{getOwnPropertyDescriptor:$,defineProperty:tt}),t.exports=function(t,e,n){var a=t.match(/\d+$/)[0]/8,c=t+(n?"Clamped":"")+"Array",s="get"+t,l="set"+t,p=o[c],g=p,m=g&&g.prototype,b={},x=function(t,e){z(t,e,{get:function(){return function(t,e){var n=I(t);return n.view[s](e*a+n.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,r){var o=I(t);n&&(r=(r=L(r))<0?0:r>255?255:255&r),o.view[l](e*a+o.byteOffset,r,!0)}(this,e,t)},enumerable:!0})};Y?u&&(g=e((function(t,e,n,r){return f(t,m),T(w(e)?J(e)?void 0!==r?new p(e,v(n,a),r):void 0!==n?new p(e,v(n,a)):new p(e):q(e)?K(g,e):i(O,g,e):new p(y(e)),t,g)})),A&&A(g,W),E(S(p),(function(t){t in g||h(g,t,p[t])})),g.prototype=m):(g=e((function(t,e,n,r){f(t,m);var o,u,c,s=0,l=0;if(w(e)){if(!J(e))return q(e)?K(g,e):i(O,g,e);o=e,l=v(n,a);var h=e.byteLength;if(void 0===r){if(h%a)throw D("Wrong length");if((u=h-l)<0)throw D("Wrong length")}else if((u=d(r)*a)+l>h)throw D("Wrong length");c=u/a}else c=y(e),o=new F(u=c*a);for(C(t,{buffer:o,byteOffset:l,byteLength:u,length:c,view:new U(o)});s<c;)x(t,s++)})),A&&A(g,W),m=g.prototype=_(V)),m.constructor!==g&&h(m,"constructor",g),h(m,G,g),H&&h(m,H,c),b[c]=g,r({global:!0,forced:g!=p,sham:!Y},b),"BYTES_PER_ELEMENT"in g||h(g,"BYTES_PER_ELEMENT",a),"BYTES_PER_ELEMENT"in m||h(m,"BYTES_PER_ELEMENT",a),P(c)}):t.exports=function(){}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){var e=n(t);return null!=t&&("object"==e||"function"==e)}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return null!=t&&"object"==n(t)}},function(t,e,n){var r=n(123),o=n(71);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},function(t,e,n){var r,o,i=n(1),a=n(40),u=i.process,c=i.Deno,s=u&&u.versions||c&&c.version,f=s&&s.v8;f&&(o=(r=f.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},function(t,e,n){var r=n(171),o=n(129).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){"use strict";var r=n(49),o=n(12),i=n(38);t.exports=function(t,e,n){var a=r(e);a in t?o.f(t,a,i(0,n)):t[a]=n}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(1),i=n(39),a=n(11),u=n(4),c=n(72),s=n(135),f=n(15),l=n(31),h=n(95),p=n(81),d=n(176),y=o.TypeError,v=function(t,e){this.stopped=t,this.result=e},g=v.prototype;t.exports=function(t,e,n){var o,m,b,w,x,_,k,A=n&&n.that,S=!(!n||!n.AS_ENTRIES),O=!(!n||!n.IS_ITERATOR),E=!(!n||!n.INTERRUPTED),P=i(e,A),j=function(t){return o&&d(o,"normal",t),new v(!0,t)},M=function(t){return S?(u(t),E?P(t[0],t[1],j):P(t[0],t[1])):E?P(t,j):P(t)};if(O)o=t;else{if(!(m=p(t)))throw y(c(t)+" is not iterable");if(s(m)){for(b=0,w=f(t);w>b;b++)if((x=M(t[b]))&&l(g,x))return x;return new v(!1)}o=h(t,m)}for(_=o.next;!(k=a(_,o)).done;){try{x=M(k.value)}catch(t){d(o,"throw",t)}if("object"==r(x)&&x&&l(g,x))return x}return new v(!1)}},function(t,e,n){var r=n(1),o=n(31),i=r.TypeError;t.exports=function(t,e){if(o(e,t))return t;throw i("Incorrect invocation")}},function(t,e,n){var r=n(7),o=n(14),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,u=o(i,"name"),c=u&&"something"===function(){}.name,s=u&&(!r||r&&a(i,"name").configurable);t.exports={EXISTS:u,PROPER:c,CONFIGURABLE:s}},function(t,e,n){var r=n(26);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(1),o=n(131),i=n(10),a=n(26),u=n(6)("toStringTag"),c=r.Object,s="Arguments"==a(function(){return arguments}());t.exports=o?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),u))?n:s?a(e):"Object"==(r=a(e))&&i(e.callee)?"Arguments":r}},function(t,e,n){var r=n(2);t.exports=r([].slice)},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(0),i=n(2),a=n(74),u=n(5),c=n(14),s=n(12).f,f=n(51),l=n(133),h=n(101),p=n(73),d=n(83),y=!1,v=p("meta"),g=0,m=function(t){s(t,v,{value:{objectID:"O"+g++,weakData:{}}})},b=t.exports={enable:function(){b.enable=function(){},y=!0;var t=f.f,e=i([].splice),n={};n[v]=1,t(n).length&&(f.f=function(n){for(var r=t(n),o=0,i=r.length;o<i;o++)if(r[o]===v){e(r,o,1);break}return r},o({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(t,e){if(!u(t))return"symbol"==r(t)?t:("string"==typeof t?"S":"P")+t;if(!c(t,v)){if(!h(t))return"F";if(!e)return"E";m(t)}return t[v].objectID},getWeakData:function(t,e){if(!c(t,v)){if(!h(t))return!0;if(!e)return!1;m(t)}return t[v].weakData},onFreeze:function(t){return d&&y&&h(t)&&!c(t,v)&&m(t),t}};a[v]=!0},function(t,e,n){var r=n(507),o=n(512);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(87),o=n(508),i=n(509),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)?o(t):i(t)}},function(t,e,n){var r=n(1),o=n(42),i=n(15),a=n(52),u=r.Array,c=Math.max;t.exports=function(t,e,n){for(var r=i(t),s=o(e,r),f=o(void 0===n?r:n,r),l=u(c(f-s,0)),h=0;s<f;s++,h++)a(l,h,t[s]);return l.length=h,l}},function(t,e,n){var r=n(26),o=n(1);t.exports="process"==r(o.process)},function(t,e,n){"use strict";var r=n(24),o=n(12),i=n(6),a=n(7),u=i("species");t.exports=function(t){var e=r(t),n=o.f;a&&e&&!e[u]&&n(e,u,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(16);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},function(t,e,n){var r=n(4),o=n(142),i=n(6)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},function(t,e,n){var r=n(2),o=n(17),i=n(8),a=n(104),u=r("".replace),c="["+a+"]",s=RegExp("^"+c+c+"*"),f=RegExp(c+c+"*$"),l=function(t){return function(e){var n=i(o(e));return 1&t&&(n=u(n,s,"")),2&t&&(n=u(n,f,"")),n}};t.exports={start:l(1),end:l(2),trim:l(3)}},function(t,e,n){"use strict";var r=n(4);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}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(1),o=n(2),i=n(3),a=n(26),u=r.Object,c=o("".split);t.exports=i((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?c(t,""):u(t)}:u},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(1),i=n(24),a=n(10),u=n(31),c=n(167),s=o.Object;t.exports=c?function(t){return"symbol"==r(t)}:function(t){var e=i("Symbol");return a(e)&&u(e.prototype,s(t))}},function(t,e,n){var r=n(1).String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},function(t,e,n){var r=n(2),o=0,i=Math.random(),a=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},function(t,e){t.exports={}},function(t,e,n){var r=n(23),o=n(42),i=n(15),a=function(t){return function(e,n,a){var u,c=r(e),s=i(c),f=o(a,s);if(t&&n!=n){for(;s>f;)if((u=c[f++])!=u)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,e,n){var r=n(3),o=n(10),i=/#|\.prototype\./,a=function(t,e){var n=c[u(t)];return n==f||n!=s&&(o(e)?r(e):!!e)},u=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},s=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},function(t,e,n){var r=n(171),o=n(129);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(249);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},function(t,e,n){var r=n(2),o=n(3),i=n(10),a=n(57),u=n(24),c=n(93),s=function(){},f=[],l=u("Reflect","construct"),h=/^\s*(?:class|function)\b/,p=r(h.exec),d=!h.exec(s),y=function(t){if(!i(t))return!1;try{return l(s,f,t),!0}catch(t){return!1}};t.exports=!l||o((function(){var t;return y(y.call)||!y(Object)||!y((function(){t=!0}))||t}))?function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return d||!!p(h,c(t))}:y},function(t,e){t.exports={}},function(t,e,n){var r=n(57),o=n(41),i=n(80),a=n(6)("iterator");t.exports=function(t){if(null!=t)return o(t,a)||o(t,"@@iterator")||i[r(t)]}},function(t,e,n){var r=n(3),o=n(6),i=n(50),a=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,n){var r=n(3);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,n){var r=n(5),o=n(26),i=n(6)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){var r=n(1),o=n(11),i=n(4),a=n(10),u=n(26),c=n(108),s=r.TypeError;t.exports=function(t,e){var n=t.exec;if(a(n)){var r=o(n,t,e);return null!==r&&i(r),r}if("RegExp"===u(t))return o(c,t,e);throw s("RegExp#exec called on incompatible receiver")}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(37).Symbol;t.exports=r},function(t,e,n){var r=n(540),o=n(157),i=n(541),a=n(542),u=n(543),c=n(61),s=n(213),f=s(r),l=s(o),h=s(i),p=s(a),d=s(u),y=c;(r&&"[object DataView]"!=y(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=y(new o)||i&&"[object Promise]"!=y(i.resolve())||a&&"[object Set]"!=y(new a)||u&&"[object WeakMap]"!=y(new u))&&(y=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,r=n?s(n):"";if(r)switch(r){case f:return"[object DataView]";case l:return"[object Map]";case h:return"[object Promise]";case p:return"[object Set]";case d:return"[object WeakMap]"}return e}),t.exports=y},function(t,e,n){var r=n(227),o=n(228);t.exports=function(t,e,n,i){var a=!n;n||(n={});for(var u=-1,c=e.length;++u<c;){var s=e[u],f=i?i(n[s],t[s],s,n,t):void 0;void 0===f&&(f=t[s]),a?o(n,s,f):r(n,s,f)}return n}},function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},function(t,e,n){var r=n(32),o=n(125);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.2",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(1),o=n(5),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},function(t,e,n){var r=n(2),o=n(10),i=n(125),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},function(t,e,n){var r=n(91),o=n(73),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,n){var r=n(1),o=n(11),i=n(22),a=n(4),u=n(72),c=n(81),s=r.TypeError;t.exports=function(t,e){var n=arguments.length<2?c(t):e;if(i(n))return a(o(n,t));throw s(u(t)+" is not iterable")}},function(t,e,n){var r=n(6)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(23),o=n(44),i=n(80),a=n(18),u=n(137),c=a.set,s=a.getterFor("Array Iterator");t.exports=u(Array,"Array",(function(t,e){c(this,{type:"Array Iterator",target:r(t),index:0,kind:e})}),(function(){var t=s(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"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,n){var r=n(1),o=n(22),i=n(13),a=n(70),u=n(15),c=r.TypeError,s=function(t){return function(e,n,r,s){o(n);var f=i(e),l=a(f),h=u(f),p=t?h-1:0,d=t?-1:1;if(r<2)for(;;){if(p in l){s=l[p],p+=d;break}if(p+=d,t?p<0:h<=p)throw c("Reduce of empty array with no initial value")}for(;t?p>=0:h>p;p+=d)p in l&&(s=n(s,l[p],p,f));return s}};t.exports={left:s(!1),right:s(!0)}},function(t,e,n){"use strict";var r=n(1),o=n(2),i=n(7),a=n(141),u=n(55),c=n(27),s=n(65),f=n(3),l=n(54),h=n(19),p=n(28),d=n(185),y=n(300),v=n(33),g=n(43),m=n(51).f,b=n(12).f,w=n(136),x=n(62),_=n(36),k=n(18),A=u.PROPER,S=u.CONFIGURABLE,O=k.get,E=k.set,P=r.ArrayBuffer,j=P,M=j&&j.prototype,R=r.DataView,T=R&&R.prototype,I=Object.prototype,C=r.Array,z=r.RangeError,B=o(w),L=o([].reverse),D=y.pack,F=y.unpack,N=function(t){return[255&t]},U=function(t){return[255&t,t>>8&255]},Y=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},G=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},H=function(t){return D(t,23,4)},W=function(t){return D(t,52,8)},V=function(t,e){b(t.prototype,e,{get:function(){return O(this)[e]}})},X=function(t,e,n,r){var o=d(n),i=O(t);if(o+e>i.byteLength)throw z("Wrong index");var a=O(i.buffer).bytes,u=o+i.byteOffset,c=x(a,u,u+e);return r?c:L(c)},q=function(t,e,n,r,o,i){var a=d(n),u=O(t);if(a+e>u.byteLength)throw z("Wrong index");for(var c=O(u.buffer).bytes,s=a+u.byteOffset,f=r(+o),l=0;l<e;l++)c[s+l]=f[i?l:e-l-1]};if(a){var K=A&&"ArrayBuffer"!==P.name;if(f((function(){P(1)}))&&f((function(){new P(-1)}))&&!f((function(){return new P,new P(1.5),new P(NaN),K&&!S})))K&&S&&c(P,"name","ArrayBuffer");else{(j=function(t){return l(this,M),new P(d(t))}).prototype=M;for(var Q,J=m(P),Z=0;J.length>Z;)(Q=J[Z++])in j||c(j,Q,P[Q]);M.constructor=j}g&&v(T)!==I&&g(T,I);var $=new R(new j(2)),tt=o(T.setInt8);$.setInt8(0,2147483648),$.setInt8(1,2147483649),!$.getInt8(0)&&$.getInt8(1)||s(T,{setInt8:function(t,e){tt(this,t,e<<24>>24)},setUint8:function(t,e){tt(this,t,e<<24>>24)}},{unsafe:!0})}else M=(j=function(t){l(this,M);var e=d(t);E(this,{bytes:B(C(e),0),byteLength:e}),i||(this.byteLength=e)}).prototype,T=(R=function(t,e,n){l(this,T),l(t,M);var r=O(t).byteLength,o=h(e);if(o<0||o>r)throw z("Wrong offset");if(o+(n=void 0===n?r-o:p(n))>r)throw z("Wrong length");E(this,{buffer:t,byteLength:n,byteOffset:o}),i||(this.buffer=t,this.byteLength=n,this.byteOffset=o)}).prototype,i&&(V(j,"byteLength"),V(R,"buffer"),V(R,"byteLength"),V(R,"byteOffset")),s(T,{getInt8:function(t){return X(this,1,t)[0]<<24>>24},getUint8:function(t){return X(this,1,t)[0]},getInt16:function(t){var e=X(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=X(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return G(X(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return G(X(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return F(X(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return F(X(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){q(this,1,t,N,e)},setUint8:function(t,e){q(this,1,t,N,e)},setInt16:function(t,e){q(this,2,t,U,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){q(this,2,t,U,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){q(this,4,t,Y,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){q(this,4,t,Y,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){q(this,4,t,H,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){q(this,8,t,W,e,arguments.length>2?arguments[2]:void 0)}});_(j,"ArrayBuffer"),_(R,"DataView"),t.exports={ArrayBuffer:j,DataView:R}},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(2),a=n(76),u=n(16),c=n(59),s=n(53),f=n(54),l=n(10),h=n(5),p=n(3),d=n(96),y=n(36),v=n(102);t.exports=function(t,e,n){var g=-1!==t.indexOf("Map"),m=-1!==t.indexOf("Weak"),b=g?"set":"add",w=o[t],x=w&&w.prototype,_=w,k={},A=function(t){var e=i(x[t]);u(x,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(m&&!h(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return m&&!h(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(m&&!h(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(a(t,!l(w)||!(m||x.forEach&&!p((function(){(new w).entries().next()})))))_=n.getConstructor(e,t,g,b),c.enable();else if(a(t,!0)){var S=new _,O=S[b](m?{}:-0,1)!=S,E=p((function(){S.has(1)})),P=d((function(t){new w(t)})),j=!m&&p((function(){for(var t=new w,e=5;e--;)t[b](e,e);return!t.has(-0)}));P||((_=e((function(t,e){f(t,x);var n=v(new w,t,_);return null!=e&&s(e,n[b],{that:n,AS_ENTRIES:g}),n}))).prototype=x,x.constructor=_),(E||j)&&(A("delete"),A("has"),g&&A("get")),(j||O)&&A(b),m&&x.clear&&delete x.clear}return k[t]=_,r({global:!0,forced:_!=w},k),y(_,t),m||n.setStrong(_,t,g),_}},function(t,e,n){var r=n(3),o=n(5),i=n(26),a=n(145),u=Object.isExtensible,c=r((function(){u(1)}));t.exports=c||a?function(t){return!!o(t)&&((!a||"ArrayBuffer"!=i(t))&&(!u||u(t)))}:u},function(t,e,n){var r=n(10),o=n(5),i=n(43);t.exports=function(t,e,n){var a,u;return i&&r(a=e.constructor)&&a!==n&&o(u=a.prototype)&&u!==n.prototype&&i(t,u),t}},function(t,e){var n=Math.expm1,r=Math.exp;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:r(t)-1}:n},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,n){"use strict";var r=n(32),o=n(1),i=n(3),a=n(140);t.exports=r||!i((function(){if(!(a&&a<535)){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete o[t]}}))},function(t,e,n){"use strict";var r=n(22),o=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 o(t)}},function(t,e,n){var r=n(3),o=n(1).RegExp,i=r((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),a=i||r((function(){return!o("a","y").sticky})),u=i||r((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:u,MISSED_STICKY:a,UNSUPPORTED_Y:i}},function(t,e,n){"use strict";var r,o,i=n(11),a=n(2),u=n(8),c=n(68),s=n(107),f=n(91),l=n(35),h=n(18).get,p=n(151),d=n(199),y=f("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,g=v,m=a("".charAt),b=a("".indexOf),w=a("".replace),x=a("".slice),_=(o=/b*/g,i(v,r=/a/,"a"),i(v,o,"a"),0!==r.lastIndex||0!==o.lastIndex),k=s.BROKEN_CARET,A=void 0!==/()??/.exec("")[1];(_||A||k||p||d)&&(g=function(t){var e,n,r,o,a,s,f,p=this,d=h(p),S=u(t),O=d.raw;if(O)return O.lastIndex=p.lastIndex,e=i(g,O,S),p.lastIndex=O.lastIndex,e;var E=d.groups,P=k&&p.sticky,j=i(c,p),M=p.source,R=0,T=S;if(P&&(j=w(j,"y",""),-1===b(j,"g")&&(j+="g"),T=x(S,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==m(S,p.lastIndex-1))&&(M="(?: "+M+")",T=" "+T,R++),n=new RegExp("^(?:"+M+")",j)),A&&(n=new RegExp("^"+M+"$(?!\\s)",j)),_&&(r=p.lastIndex),o=i(v,P?n:p,T),P?o?(o.input=x(o.input,R),o[0]=x(o[0],R),o.index=p.lastIndex,p.lastIndex+=o[0].length):p.lastIndex=0:_&&o&&(p.lastIndex=p.global?o.index+o[0].length:r),A&&o&&o.length>1&&i(y,o[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o&&E)for(o.groups=s=l(null),a=0;a<E.length;a++)s[(f=E[a])[0]]=o[f[1]];return o}),t.exports=g},function(t,e,n){var r=n(2),o=n(19),i=n(8),a=n(17),u=r("".charAt),c=r("".charCodeAt),s=r("".slice),f=function(t){return function(e,n){var r,f,l=i(a(e)),h=o(n),p=l.length;return h<0||h>=p?t?"":void 0:(r=c(l,h))<55296||r>56319||h+1===p||(f=c(l,h+1))<56320||f>57343?t?u(l,h):r:t?s(l,h,h+2):f-56320+(r-55296<<10)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},function(t,e,n){"use strict";n(152);var r=n(2),o=n(16),i=n(108),a=n(3),u=n(6),c=n(27),s=u("species"),f=RegExp.prototype;t.exports=function(t,e,n,l){var h=u(t),p=!a((function(){var e={};return e[h]=function(){return 7},7!=""[t](e)})),d=p&&!a((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return e=!0,null},n[h](""),!e}));if(!p||!d||n){var y=r(/./[h]),v=e(h,""[t],(function(t,e,n,o,a){var u=r(t),c=e.exec;return c===i||c===f.exec?p&&!a?{done:!0,value:y(e,n,o)}:{done:!0,value:u(n,e,o)}:{done:!1}}));o(String.prototype,t,v[0]),o(f,h,v[1])}l&&c(f[h],"sham",!0)}},function(t,e,n){"use strict";var r=n(109).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r=n(9),o=n(66),i=r.TYPED_ARRAY_CONSTRUCTOR,a=r.aTypedArrayConstructor;t.exports=function(t){return a(o(t,t[i]))}},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){var r=n(497),o=n(498),i=n(499),a=n(500),u=n(501);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=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,t.exports=c},function(t,e,n){var r=n(86);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(60)(Object,"create");t.exports=r},function(t,e,n){var r=n(521);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(221),o=n(225),i=n(121);t.exports=function(t){return i(t)?r(t):o(t)}},function(t,e,n){(function(t){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(37),i=n(537),a="object"==r(e)&&e&&!e.nodeType&&e,u=a&&"object"==r(t)&&t&&!t.nodeType&&t,c=u&&u.exports===a?o.Buffer:void 0,s=(c?c.isBuffer:void 0)||i;t.exports=s}).call(this,n(113)(t))},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(211),o=n(224);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},function(t,e,n){var r=n(221),o=n(551),i=n(121);t.exports=function(t){return i(t)?r(t,!0):o(t)}},function(t,e,n){var r=n(1),o=n(11),i=n(5),a=n(71),u=n(41),c=n(168),s=n(6),f=r.TypeError,l=s("toPrimitive");t.exports=function(t,e){if(!i(t)||a(t))return t;var n,r=u(t,l);if(r){if(void 0===e&&(e="default"),n=o(r,t,e),!i(n)||a(n))return n;throw f("Can't convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},function(t,e,n){var r=n(50),o=n(3);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(t,e,n){var r=n(1),o=n(126),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,e,n){var r=n(1),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},function(t,e,n){var r=n(14),o=n(128),i=n(21),a=n(12);t.exports=function(t,e){for(var n=o(e),u=a.f,c=i.f,s=0;s<n.length;s++){var f=n[s];r(t,f)||u(t,f,c(e,f))}}},function(t,e,n){var r=n(24),o=n(2),i=n(51),a=n(130),u=n(4),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(u(t)),n=a.f;return n?c(e,n(t)):e}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r={};r[n(6)("toStringTag")]="z",t.exports="[object z]"===String(r)},function(t,e,n){var r=n(7),o=n(12),i=n(4),a=n(23),u=n(77);t.exports=r?Object.defineProperties:function(t,e){i(t);for(var n,r=a(e),c=u(e),s=c.length,f=0;s>f;)o.f(t,n=c[f++],r[n]);return t}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(26),i=n(23),a=n(51).f,u=n(62),c="object"==("undefined"==typeof window?"undefined":r(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return c&&"Window"==o(t)?function(t){try{return a(t)}catch(t){return u(c)}}(t):a(i(t))}},function(t,e,n){var r=n(3);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,n){var r=n(6),o=n(80),i=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},function(t,e,n){"use strict";var r=n(13),o=n(42),i=n(15);t.exports=function(t){for(var e=r(this),n=i(e),a=arguments.length,u=o(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,s=void 0===c?n:o(c,n);s>u;)e[u++]=t;return e}},function(t,e,n){"use strict";var r=n(0),o=n(11),i=n(32),a=n(55),u=n(10),c=n(138),s=n(33),f=n(43),l=n(36),h=n(27),p=n(16),d=n(6),y=n(80),v=n(181),g=a.PROPER,m=a.CONFIGURABLE,b=v.IteratorPrototype,w=v.BUGGY_SAFARI_ITERATORS,x=d("iterator"),_=function(){return this};t.exports=function(t,e,n,a,d,v,k){c(n,e,a);var A,S,O,E=function(t){if(t===d&&T)return T;if(!w&&t in M)return M[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},P=e+" Iterator",j=!1,M=t.prototype,R=M[x]||M["@@iterator"]||d&&M[d],T=!w&&R||E(d),I="Array"==e&&M.entries||R;if(I&&(A=s(I.call(new t)))!==Object.prototype&&A.next&&(i||s(A)===b||(f?f(A,b):u(A[x])||p(A,x,_)),l(A,P,!0,!0),i&&(y[P]=_)),g&&"values"==d&&R&&"values"!==R.name&&(!i&&m?h(M,"name","values"):(j=!0,T=function(){return o(R,this)})),d)if(S={values:E("values"),keys:v?T:E("keys"),entries:E("entries")},k)for(O in S)(w||j||!(O in M))&&p(M,O,S[O]);else r({target:e,proto:!0,forced:w||j},S);return i&&!k||M[x]===T||p(M,x,T,{name:d}),y[e]=T,S}},function(t,e,n){"use strict";var r=n(181).IteratorPrototype,o=n(35),i=n(38),a=n(36),u=n(80),c=function(){return this};t.exports=function(t,e,n){var s=e+" Iterator";return t.prototype=o(r,{next:i(1,n)}),a(t,s,!1,!0),u[s]=c,t}},function(t,e,n){var r=n(62),o=Math.floor,i=function(t,e){for(var n,r,o=t.length,i=1;i<o;){for(r=i,n=t[i];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==i++&&(t[r]=n)}return t},a=function(t,e,n,r){for(var o=e.length,i=n.length,a=0,u=0;a<o||u<i;)t[a+u]=a<o&&u<i?r(e[a],n[u])<=0?e[a++]:n[u++]:a<o?e[a++]:n[u++];return t};t.exports=function t(e,n){var u=e.length,c=o(u/2);return u<8?i(e,n):a(e,t(r(e,0,c),n),t(r(e,c),n),n)}},function(t,e,n){var r=n(40).match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},function(t,e){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(t,e,n){var r=n(1),o=n(79),i=n(72),a=r.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a constructor")}},function(t,e,n){var r=n(2),o=n(28),i=n(8),a=n(144),u=n(17),c=r(a),s=r("".slice),f=Math.ceil,l=function(t){return function(e,n,r){var a,l,h=i(u(e)),p=o(n),d=h.length,y=void 0===r?" ":i(r);return p<=d||""==y?h:((l=c(y,f((a=p-d)/y.length))).length>a&&(l=s(l,0,a)),t?h+l:l+h)}};t.exports={start:l(!1),end:l(!0)}},function(t,e,n){"use strict";var r=n(1),o=n(19),i=n(8),a=n(17),u=r.RangeError;t.exports=function(t){var e=i(a(this)),n="",r=o(t);if(r<0||r==1/0)throw u("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n}},function(t,e,n){var r=n(3);t.exports=r((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,n){var r=n(2);t.exports=r(1..valueOf)},function(t,e,n){var r=n(5),o=Math.floor;t.exports=Number.isInteger||function(t){return!r(t)&&isFinite(t)&&o(t)===t}},function(t,e,n){var r,o,i,a,u=n(1),c=n(34),s=n(39),f=n(10),l=n(14),h=n(3),p=n(172),d=n(58),y=n(92),v=n(195),g=n(63),m=u.setImmediate,b=u.clearImmediate,w=u.process,x=u.Dispatch,_=u.Function,k=u.MessageChannel,A=u.String,S=0,O={};try{r=u.location}catch(t){}var E=function(t){if(l(O,t)){var e=O[t];delete O[t],e()}},P=function(t){return function(){E(t)}},j=function(t){E(t.data)},M=function(t){u.postMessage(A(t),r.protocol+"//"+r.host)};m&&b||(m=function(t){var e=d(arguments,1);return O[++S]=function(){c(f(t)?t:_(t),void 0,e)},o(S),S},b=function(t){delete O[t]},g?o=function(t){w.nextTick(P(t))}:x&&x.now?o=function(t){x.now(P(t))}:k&&!v?(a=(i=new k).port2,i.port1.onmessage=j,o=s(a.postMessage,a)):u.addEventListener&&f(u.postMessage)&&!u.importScripts&&r&&"file:"!==r.protocol&&!h(M)?(o=M,u.addEventListener("message",j,!1)):o="onreadystatechange"in y("script")?function(t){p.appendChild(y("script")).onreadystatechange=function(){p.removeChild(this),E(t)}}:function(t){setTimeout(P(t),0)}),t.exports={set:m,clear:b}},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e,n){var r=n(3),o=n(1).RegExp;t.exports=r((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},function(t,e,n){"use strict";var r=n(0),o=n(108);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(t,e,n){var r=n(1),o=n(84),i=r.TypeError;t.exports=function(t){if(o(t))throw i("The method doesn't accept regular expressions");return t}},function(t,e,n){var r=n(6)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},function(t,e,n){var r=n(55).PROPER,o=n(3),i=n(104);t.exports=function(t){return o((function(){return!!i[t]()||"
"!=="
"[t]()||r&&i[t].name!==t}))}},function(t,e,n){var r=n(1),o=n(3),i=n(96),a=n(9).NATIVE_ARRAY_BUFFER_VIEWS,u=r.ArrayBuffer,c=r.Int8Array;t.exports=!a||!o((function(){c(1)}))||!o((function(){new c(-1)}))||!i((function(t){new c,new c(null),new c(1.5),new c(t)}),!0)||o((function(){return 1!==new c(new u(2),1,void 0).length}))},function(t,e,n){var r=n(60)(n(37),"Map");t.exports=r},function(t,e,n){var r=n(534),o=n(220),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,u=a?function(t){return null==t?[]:(t=Object(t),r(a(t),(function(e){return i.call(t,e)})))}:o;t.exports=u},function(t,e,n){var r=n(538),o=n(160),i=n(161),a=i&&i.isTypedArray,u=a?o(a):r;t.exports=u},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){(function(t){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(212),i="object"==r(e)&&e&&!e.nodeType&&e,a=i&&"object"==r(t)&&t&&!t.nodeType&&t,u=a&&a.exports===i&&o.process,c=function(){try{var t=a&&a.require&&a.require("util").types;return t||u&&u.binding&&u.binding("util")}catch(t){}}();t.exports=c}).call(this,n(113)(t))},function(t,e,n){var r=n(226)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(216);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},function(t,e,n){var r=n(47),o=n(586),i=n(241),a=Math.max,u=Math.min;t.exports=function(t,e,n){var c,s,f,l,h,p,d=0,y=!1,v=!1,g=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function m(e){var n=c,r=s;return c=s=void 0,d=e,l=t.apply(r,n)}function b(t){return d=t,h=setTimeout(x,e),y?m(t):l}function w(t){var n=t-p;return void 0===p||n>=e||n<0||v&&t-d>=f}function x(){var t=o();if(w(t))return _(t);h=setTimeout(x,function(t){var n=e-(t-p);return v?u(n,f-(t-d)):n}(t))}function _(t){return h=void 0,g&&c?m(t):(c=s=void 0,l)}function k(){var t=o(),n=w(t);if(c=arguments,s=this,p=t,n){if(void 0===h)return b(p);if(v)return clearTimeout(h),h=setTimeout(x,e),m(p)}return void 0===h&&(h=setTimeout(x,e)),l}return e=i(e)||0,r(n)&&(y=!!n.leading,f=(v="maxWait"in n)?a(i(n.maxWait)||0,e):f,g="trailing"in n?!!n.trailing:g),k.cancel=function(){void 0!==h&&clearTimeout(h),d=0,c=p=s=h=void 0},k.flush=function(){return void 0===h?l:_(o())},k}},function(t,e,n){var r=n(495);t.exports=function(t,e){return r(t,e)}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}t.exports=r},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(124);t.exports=o&&!Symbol.sham&&"symbol"==r(Symbol.iterator)},function(t,e,n){var r=n(1),o=n(11),i=n(10),a=n(5),u=r.TypeError;t.exports=function(t,e){var n,r;if("string"===e&&i(n=t.toString)&&!a(r=o(n,t)))return r;if(i(n=t.valueOf)&&!a(r=o(n,t)))return r;if("string"!==e&&i(n=t.toString)&&!a(r=o(n,t)))return r;throw u("Can't convert object to primitive value")}},function(t,e,n){var r=n(7),o=n(3),i=n(92);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(1),o=n(10),i=n(93),a=r.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},function(t,e,n){var r=n(2),o=n(14),i=n(23),a=n(75).indexOf,u=n(74),c=r([].push);t.exports=function(t,e){var n,r=i(t),s=0,f=[];for(n in r)!o(u,n)&&o(r,n)&&c(f,n);for(;e.length>s;)o(r,n=e[s++])&&(~a(f,n)||c(f,n));return f}},function(t,e,n){var r=n(24);t.exports=r("document","documentElement")},function(t,e,n){var r=n(6);e.f=r},function(t,e,n){var r=n(1);t.exports=r},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(1),i=n(10),a=o.String,u=o.TypeError;t.exports=function(t){if("object"==r(t)||i(t))return t;throw u("Can't set "+a(t)+" as a prototype")}},function(t,e,n){var r=n(11),o=n(4),i=n(41);t.exports=function(t,e,n){var a,u;o(t);try{if(!(a=i(t,"return"))){if("throw"===e)throw n;return n}a=r(a,t)}catch(t){u=!0,a=t}if("throw"===e)throw n;if(u)throw a;return o(a),n}},function(t,e,n){"use strict";var r=n(13),o=n(42),i=n(15),a=Math.min;t.exports=[].copyWithin||function(t,e){var n=r(this),u=i(n),c=o(t,u),s=o(e,u),f=arguments.length>2?arguments[2]:void 0,l=a((void 0===f?u:o(f,u))-s,u-c),h=1;for(s<c&&c<s+l&&(h=-1,s+=l-1,c+=l-1);l-- >0;)s in n?n[c]=n[s]:delete n[c],c+=h,s+=h;return n}},function(t,e,n){"use strict";var r=n(1),o=n(56),i=n(15),a=n(39),u=r.TypeError;t.exports=function t(e,n,r,c,s,f,l,h){for(var p,d=s,y=0,v=!!l&&a(l,h);y<c;){if(y in r){if(p=v?v(r[y],y,n):r[y],f>0&&o(p))d=t(e,n,p,i(p),d,f-1)-1;else{if(d>=9007199254740991)throw u("Exceed the acceptable array length");e[d]=p}d++}y++}return d}},function(t,e,n){"use strict";var r=n(20).forEach,o=n(45)("forEach");t.exports=o?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,n){"use strict";var r=n(1),o=n(39),i=n(11),a=n(13),u=n(281),c=n(135),s=n(79),f=n(15),l=n(52),h=n(95),p=n(81),d=r.Array;t.exports=function(t){var e=a(t),n=s(this),r=arguments.length,y=r>1?arguments[1]:void 0,v=void 0!==y;v&&(y=o(y,r>2?arguments[2]:void 0));var g,m,b,w,x,_,k=p(e),A=0;if(!k||this==d&&c(k))for(g=f(e),m=n?new this(g):d(g);g>A;A++)_=v?y(e[A],A):e[A],l(m,A,_);else for(x=(w=h(e,k)).next,m=n?new this:[];!(b=i(x,w)).done;A++)_=v?u(w,y,[b.value,A],!0):b.value,l(m,A,_);return m.length=A,m}},function(t,e,n){"use strict";var r,o,i,a=n(3),u=n(10),c=n(35),s=n(33),f=n(16),l=n(6),h=n(32),p=l("iterator"),d=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(r=o):d=!0),null==r||a((function(){var t={};return r[p].call(t)!==t}))?r={}:h&&(r=c(r)),u(r[p])||f(r,p,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},function(t,e,n){"use strict";var r=n(34),o=n(23),i=n(19),a=n(15),u=n(45),c=Math.min,s=[].lastIndexOf,f=!!s&&1/[1].lastIndexOf(1,-0)<0,l=u("lastIndexOf"),h=f||!l;t.exports=h?function(t){if(f)return r(s,this,arguments)||0;var e=o(this),n=a(e),u=n-1;for(arguments.length>1&&(u=c(u,i(arguments[1]))),u<0&&(u=n+u);u>=0;u--)if(u in e&&e[u]===t)return u||0;return-1}:s},function(t,e,n){var r=n(40).match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},function(t,e,n){var r=n(40);t.exports=/MSIE|Trident/.test(r)},function(t,e,n){var r=n(1),o=n(19),i=n(28),a=r.RangeError;t.exports=function(t){if(void 0===t)return 0;var e=o(t),n=i(e);if(e!==n)throw a("Wrong length or index");return n}},function(t,e,n){"use strict";var r=n(1),o=n(2),i=n(22),a=n(5),u=n(14),c=n(58),s=r.Function,f=o([].concat),l=o([].join),h={},p=function(t,e,n){if(!u(h,e)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";h[e]=s("C,a","return new C("+l(r,",")+")")}return h[e](t,n)};t.exports=s.bind||function(t){var e=i(this),n=e.prototype,r=c(arguments,1),o=function(){var n=f(r,c(arguments));return this instanceof o?p(e,n.length,n):e.apply(t,n)};return a(n)&&(o.prototype=n),o}},function(t,e,n){"use strict";var r=n(12).f,o=n(35),i=n(65),a=n(39),u=n(54),c=n(53),s=n(137),f=n(64),l=n(7),h=n(59).fastKey,p=n(18),d=p.set,y=p.getterFor;t.exports={getConstructor:function(t,e,n,s){var f=t((function(t,r){u(t,p),d(t,{type:e,index:o(null),first:void 0,last:void 0,size:0}),l||(t.size=0),null!=r&&c(r,t[s],{that:t,AS_ENTRIES:n})})),p=f.prototype,v=y(e),g=function(t,e,n){var r,o,i=v(t),a=m(t,e);return a?a.value=n:(i.last=a={index:o=h(e,!0),key:e,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),l?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},m=function(t,e){var n,r=v(t),o=h(e);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==e)return n};return i(p,{clear:function(){for(var t=v(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,l?t.size=0:this.size=0},delete:function(t){var e=v(this),n=m(this,t);if(n){var r=n.next,o=n.previous;delete e.index[n.index],n.removed=!0,o&&(o.next=r),r&&(r.previous=o),e.first==n&&(e.first=r),e.last==n&&(e.last=o),l?e.size--:this.size--}return!!n},forEach:function(t){for(var e,n=v(this),r=a(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!m(this,t)}}),i(p,n?{get:function(t){var e=m(this,t);return e&&e.value},set:function(t,e){return g(this,0===t?0:t,e)}}:{add:function(t){return g(this,t=0===t?0:t,t)}}),l&&r(p,"size",{get:function(){return v(this).size}}),f},setStrong:function(t,e,n){var r=e+" Iterator",o=y(e),i=y(r);s(t,e,(function(t,e){d(this,{type:r,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),f(e)}}},function(t,e){var n=Math.log;t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:n(1+t)}},function(t,e,n){var r=n(1),o=n(3),i=n(2),a=n(8),u=n(67).trim,c=n(104),s=i("".charAt),f=r.parseFloat,l=r.Symbol,h=l&&l.iterator,p=1/f(c+"-0")!=-1/0||h&&!o((function(){f(Object(h))}));t.exports=p?function(t){var e=u(a(t)),n=f(e);return 0===n&&"-"==s(e,0)?-0:n}:f},function(t,e,n){var r=n(1),o=n(3),i=n(2),a=n(8),u=n(67).trim,c=n(104),s=r.parseInt,f=r.Symbol,l=f&&f.iterator,h=/^[+-]?0x/i,p=i(h.exec),d=8!==s(c+"08")||22!==s(c+"0x16")||l&&!o((function(){s(Object(l))}));t.exports=d?function(t,e){var n=u(a(t));return s(n,e>>>0||(p(h,n)?16:10))}:s},function(t,e,n){"use strict";var r=n(7),o=n(2),i=n(11),a=n(3),u=n(77),c=n(130),s=n(90),f=n(13),l=n(70),h=Object.assign,p=Object.defineProperty,d=o([].concat);t.exports=!h||a((function(){if(r&&1!==h({b:1},h(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=h({},t)[n]||"abcdefghijklmnopqrst"!=u(h({},e)).join("")}))?function(t,e){for(var n=f(t),o=arguments.length,a=1,h=c.f,p=s.f;o>a;)for(var y,v=l(arguments[a++]),g=h?d(u(v),h(v)):u(v),m=g.length,b=0;m>b;)y=g[b++],r&&!i(p,v,y)||(n[y]=v[y]);return n}:h},function(t,e,n){var r=n(7),o=n(2),i=n(77),a=n(23),u=o(n(90).f),c=o([].push),s=function(t){return function(e){for(var n,o=a(e),s=i(o),f=s.length,l=0,h=[];f>l;)n=s[l++],r&&!u(o,n)||c(h,t?[n,o[n]]:o[n]);return h}};t.exports={entries:s(!0),values:s(!1)}},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){var r=n(1);t.exports=r.Promise},function(t,e,n){var r=n(40);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},function(t,e,n){var r,o,i,a,u,c,s,f,l=n(1),h=n(39),p=n(21).f,d=n(149).set,y=n(195),v=n(384),g=n(385),m=n(63),b=l.MutationObserver||l.WebKitMutationObserver,w=l.document,x=l.process,_=l.Promise,k=p(l,"queueMicrotask"),A=k&&k.value;A||(r=function(){var t,e;for(m&&(t=x.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},y||m||g||!b||!w?!v&&_&&_.resolve?((s=_.resolve(void 0)).constructor=_,f=h(s.then,s),a=function(){f(r)}):m?a=function(){x.nextTick(r)}:(d=h(d,l),a=function(){d(r)}):(u=!0,c=w.createTextNode(""),new b(r).observe(c,{characterData:!0}),a=function(){c.data=u=!u})),t.exports=A||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},function(t,e,n){var r=n(4),o=n(5),i=n(106);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){var r=n(14);t.exports=function(t){return void 0!==t&&(r(t,"value")||r(t,"writable"))}},function(t,e,n){var r=n(3),o=n(1).RegExp;t.exports=r((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},function(t,e,n){"use strict";var r=n(109).charAt,o=n(8),i=n(18),a=n(137),u=i.set,c=i.getterFor("String Iterator");a(String,"String",(function(t){u(this,{type:"String Iterator",string:o(t),index:0})}),(function(){var t,e=c(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){var r=n(40);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(r)},function(t,e,n){var r=n(2),o=n(13),i=Math.floor,a=r("".charAt),u=r("".replace),c=r("".slice),s=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,f=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,r,l,h){var p=n+t.length,d=r.length,y=f;return void 0!==l&&(l=o(l),y=s),u(h,y,(function(o,u){var s;switch(a(u,0)){case"$":return"$";case"&":return t;case"`":return c(e,0,n);case"'":return c(e,p);case"<":s=l[c(u,1,-1)];break;default:var f=+u;if(0===f)return o;if(f>d){var h=i(f/10);return 0===h?o:h<=d?void 0===r[h-1]?a(u,1):r[h-1]+a(u,1):o}s=r[f-1]}return void 0===s?"":s}))}},function(t,e,n){var r=n(1),o=n(446),i=r.RangeError;t.exports=function(t,e){var n=o(t);if(n%e)throw i("Wrong offset");return n}},function(t,e,n){var r=n(39),o=n(11),i=n(142),a=n(13),u=n(15),c=n(95),s=n(81),f=n(135),l=n(9).aTypedArrayConstructor;t.exports=function(t){var e,n,h,p,d,y,v=i(this),g=a(t),m=arguments.length,b=m>1?arguments[1]:void 0,w=void 0!==b,x=s(g);if(x&&!f(x))for(y=(d=c(g,x)).next,g=[];!(p=o(y,d)).done;)g.push(p.value);for(w&&m>2&&(b=r(b,arguments[2])),n=u(g),h=new(l(v))(n),e=0;n>e;e++)h[e]=w?b(g[e],e):g[e];return h}},function(t,e,n){"use strict";var r=n(2),o=n(65),i=n(59).getWeakData,a=n(4),u=n(5),c=n(54),s=n(53),f=n(20),l=n(14),h=n(18),p=h.set,d=h.getterFor,y=f.find,v=f.findIndex,g=r([].splice),m=0,b=function(t){return t.frozen||(t.frozen=new w)},w=function(){this.entries=[]},x=function(t,e){return y(t.entries,(function(t){return t[0]===e}))};w.prototype={get:function(t){var e=x(this,t);if(e)return e[1]},has:function(t){return!!x(this,t)},set:function(t,e){var n=x(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=v(this.entries,(function(e){return e[0]===t}));return~e&&g(this.entries,e,1),!!~e}},t.exports={getConstructor:function(t,e,n,r){var f=t((function(t,o){c(t,h),p(t,{type:e,id:m++,frozen:void 0}),null!=o&&s(o,t[r],{that:t,AS_ENTRIES:n})})),h=f.prototype,y=d(e),v=function(t,e,n){var r=y(t),o=i(a(e),!0);return!0===o?b(r).set(e,n):o[r.id]=n,t};return o(h,{delete:function(t){var e=y(this);if(!u(t))return!1;var n=i(t);return!0===n?b(e).delete(t):n&&l(n,e.id)&&delete n[e.id]},has:function(t){var e=y(this);if(!u(t))return!1;var n=i(t);return!0===n?b(e).has(t):n&&l(n,e.id)}}),o(h,n?{get:function(t){var e=y(this);if(u(t)){var n=i(t);return!0===n?b(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return v(this,t,e)}}:{add:function(t){return v(this,t,!0)}}),f}}},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}},function(t,e,n){var r=n(92)("span").classList,o=r&&r.constructor&&r.constructor.prototype;t.exports=o===Object.prototype?void 0:o},function(t,e,n){var r=n(3),o=n(6),i=n(32),a=o("iterator");t.exports=!r((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),i&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},function(t,e,n){"use strict";n(97);var r=n(0),o=n(1),i=n(24),a=n(11),u=n(2),c=n(208),s=n(16),f=n(65),l=n(36),h=n(138),p=n(18),d=n(54),y=n(10),v=n(14),g=n(39),m=n(57),b=n(4),w=n(5),x=n(8),_=n(35),k=n(38),A=n(95),S=n(81),O=n(6),E=n(139),P=O("iterator"),j=p.set,M=p.getterFor("URLSearchParams"),R=p.getterFor("URLSearchParamsIterator"),T=i("fetch"),I=i("Request"),C=i("Headers"),z=I&&I.prototype,B=C&&C.prototype,L=o.RegExp,D=o.TypeError,F=o.decodeURIComponent,N=o.encodeURIComponent,U=u("".charAt),Y=u([].join),G=u([].push),H=u("".replace),W=u([].shift),V=u([].splice),X=u("".split),q=u("".slice),K=/\+/g,Q=Array(4),J=function(t){return Q[t-1]||(Q[t-1]=L("((?:%[\\da-f]{2}){"+t+"})","gi"))},Z=function(t){try{return F(t)}catch(e){return t}},$=function(t){var e=H(t,K," "),n=4;try{return F(e)}catch(t){for(;n;)e=H(e,J(n--),Z);return e}},tt=/[!'()~]|%20/g,et={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},nt=function(t){return et[t]},rt=function(t){return H(N(t),tt,nt)},ot=function(t,e){if(t<e)throw D("Not enough arguments")},it=h((function(t,e){j(this,{type:"URLSearchParamsIterator",iterator:A(M(t).entries),kind:e})}),"Iterator",(function(){var t=R(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n})),at=function(t){this.entries=[],this.url=null,void 0!==t&&(w(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===U(t,0)?q(t,1):t:x(t)))};at.prototype={type:"URLSearchParams",bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,r,o,i,u,c,s=S(t);if(s)for(n=(e=A(t,s)).next;!(r=a(n,e)).done;){if(i=(o=A(b(r.value))).next,(u=a(i,o)).done||(c=a(i,o)).done||!a(i,o).done)throw D("Expected sequence with length 2");G(this.entries,{key:x(u.value),value:x(c.value)})}else for(var f in t)v(t,f)&&G(this.entries,{key:f,value:x(t[f])})},parseQuery:function(t){if(t)for(var e,n,r=X(t,"&"),o=0;o<r.length;)(e=r[o++]).length&&(n=X(e,"="),G(this.entries,{key:$(W(n)),value:$(Y(n,"="))}))},serialize:function(){for(var t,e=this.entries,n=[],r=0;r<e.length;)t=e[r++],G(n,rt(t.key)+"="+rt(t.value));return Y(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var ut=function(){d(this,ct);var t=arguments.length>0?arguments[0]:void 0;j(this,new at(t))},ct=ut.prototype;if(f(ct,{append:function(t,e){ot(arguments.length,2);var n=M(this);G(n.entries,{key:x(t),value:x(e)}),n.updateURL()},delete:function(t){ot(arguments.length,1);for(var e=M(this),n=e.entries,r=x(t),o=0;o<n.length;)n[o].key===r?V(n,o,1):o++;e.updateURL()},get:function(t){ot(arguments.length,1);for(var e=M(this).entries,n=x(t),r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){ot(arguments.length,1);for(var e=M(this).entries,n=x(t),r=[],o=0;o<e.length;o++)e[o].key===n&&G(r,e[o].value);return r},has:function(t){ot(arguments.length,1);for(var e=M(this).entries,n=x(t),r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){ot(arguments.length,1);for(var n,r=M(this),o=r.entries,i=!1,a=x(t),u=x(e),c=0;c<o.length;c++)(n=o[c]).key===a&&(i?V(o,c--,1):(i=!0,n.value=u));i||G(o,{key:a,value:u}),r.updateURL()},sort:function(){var t=M(this);E(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,n=M(this).entries,r=g(t,arguments.length>1?arguments[1]:void 0),o=0;o<n.length;)r((e=n[o++]).value,e.key,this)},keys:function(){return new it(this,"keys")},values:function(){return new it(this,"values")},entries:function(){return new it(this,"entries")}},{enumerable:!0}),s(ct,P,ct.entries,{name:"entries"}),s(ct,"toString",(function(){return M(this).serialize()}),{enumerable:!0}),l(ut,"URLSearchParams"),r({global:!0,forced:!c},{URLSearchParams:ut}),!c&&y(C)){var st=u(B.has),ft=u(B.set),lt=function(t){if(w(t)){var e,n=t.body;if("URLSearchParams"===m(n))return e=t.headers?new C(t.headers):new C,st(e,"content-type")||ft(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),_(t,{body:k(0,x(n)),headers:k(0,e)})}return t};if(y(T)&&r({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return T(t,arguments.length>1?lt(arguments[1]):{})}}),y(I)){var ht=function(t){return d(this,z),new I(t,arguments.length>1?lt(arguments[1]):{})};z.constructor=ht,ht.prototype=z,r({global:!0,forced:!0},{Request:ht})}}t.exports={URLSearchParams:ut,getState:M}},function(t,e,n){var r=n(114),o=n(502),i=n(503),a=n(504),u=n(505),c=n(506);function s(t){var e=this.__data__=new r(t);this.size=e.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=u,s.prototype.set=c,t.exports=s},function(t,e,n){var r=n(61),o=n(47);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){(function(e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r="object"==(void 0===e?"undefined":n(e))&&e&&e.Object===Object&&e;t.exports=r}).call(this,n(166))},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,n){var r=n(513),o=n(520),i=n(522),a=n(523),u=n(524);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=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,t.exports=c},function(t,e,n){var r=n(525),o=n(528),i=n(529);t.exports=function(t,e,n,a,u,c){var s=1&n,f=t.length,l=e.length;if(f!=l&&!(s&&l>f))return!1;var h=c.get(t),p=c.get(e);if(h&&p)return h==e&&p==t;var d=-1,y=!0,v=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++d<f;){var g=t[d],m=e[d];if(a)var b=s?a(m,g,d,e,t,c):a(g,m,d,t,e,c);if(void 0!==b){if(b)continue;y=!1;break}if(v){if(!o(e,(function(t,e){if(!i(v,e)&&(g===t||u(g,t,n,a,c)))return v.push(e)}))){y=!1;break}}else if(g!==m&&!u(g,m,n,a,c)){y=!1;break}}return c.delete(t),c.delete(e),y}},function(t,e,n){var r=n(37).Uint8Array;t.exports=r},function(t,e,n){var r=n(218),o=n(158),i=n(118);t.exports=function(t){return r(t,i,o)}},function(t,e,n){var r=n(219),o=n(69);t.exports=function(t,e,n){var i=e(t);return o(t)?i:r(i,n(t))}},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(535),o=n(222),i=n(69),a=n(119),u=n(223),c=n(159),s=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),f=!n&&o(t),l=!n&&!f&&a(t),h=!n&&!f&&!l&&c(t),p=n||f||l||h,d=p?r(t.length,String):[],y=d.length;for(var v in t)!e&&!s.call(t,v)||p&&("length"==v||l&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||u(v,y))||d.push(v);return d}},function(t,e,n){var r=n(536),o=n(48),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!u.call(t,"callee")};t.exports=c},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var o=n(t);return!!(e=null==e?9007199254740991:e)&&("number"==o||"symbol"!=o&&r.test(t))&&t>-1&&t%1==0&&t<e}},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(120),o=n(539),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){var r=n(228),o=n(86),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];i.call(t,e)&&o(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(229);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(60),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e,n){var r=n(231),o=n(546),i=n(547);t.exports=function(t,e){return i(o(t,e,r),t+"")}},function(t,e){t.exports=function(t){return t}},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){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(86),i=n(121),a=n(223),u=n(47);t.exports=function(t,e,n){if(!u(n))return!1;var c=r(e);return!!("number"==c?i(n)&&a(e,n.length):"string"==c&&e in n)&&o(n[e],t)}},function(t,e,n){var r=n(61),o=n(48),i=n(554);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Error]"==e||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!i(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},function(t,e){t.exports=/<%=([\s\S]+?)%>/g},function(t,e,n){var r=n(562);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(61),i=n(48);t.exports=function(t){return"symbol"==r(t)||i(t)&&"[object Symbol]"==o(t)}},function(t,e,n){var r=n(565);t.exports=function(t){return r(t,4)}},function(t,e,n){var r=n(219),o=n(162),i=n(158),a=n(220),u=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,i(t)),t=o(t);return e}:a;t.exports=u},function(t,e,n){var r=n(587),o=n(47),i=n(238),a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,s=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=u.test(t);return n||c.test(t)?s(t.slice(2),n?2:8):a.test(t)?NaN:+t}},function(t,e,n){var r=n(164),o=n(47);t.exports=function(t,e,n){var i=!0,a=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),r(t,e,{leading:i,maxWait:e,trailing:a})}},function(t,e,n){var r=n(589);t.exports=function(t){return r(2,t)}},function(t,e,n){var r=n(225),o=n(88),i=n(222),a=n(69),u=n(121),c=n(119),s=n(120),f=n(159),l=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(u(t)&&(a(t)||"string"==typeof t||"function"==typeof t.splice||c(t)||f(t)||i(t)))return!t.length;var e=o(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(s(t))return!r(t).length;for(var n in t)if(l.call(t,n))return!1;return!0}},function(t,e,n){var r=n(544),o=n(553),i=n(555),a=n(556),u=n(557),c=n(234),s=n(233),f=n(118),l=n(236),h=n(558),p=n(237),d=/\b__p \+= '';/g,y=/\b(__p \+=) '' \+/g,v=/(__e\(.*?\)|\b__t\)) \+\n'';/g,g=/[()=,{}\[\]\/\s]/,m=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,b=/($^)/,w=/['\n\r\u2028\u2029\\]/g,x=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var _=h.imports._.templateSettings||h;n&&s(t,e,n)&&(e=void 0),t=p(t),e=r({},e,_,a);var k,A,S=r({},e.imports,_.imports,a),O=f(S),E=i(S,O),P=0,j=e.interpolate||b,M="__p += '",R=RegExp((e.escape||b).source+"|"+j.source+"|"+(j===l?m:b).source+"|"+(e.evaluate||b).source+"|$","g"),T=x.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(R,(function(e,n,r,o,i,a){return r||(r=o),M+=t.slice(P,a).replace(w,u),n&&(k=!0,M+="' +\n__e("+n+") +\n'"),i&&(A=!0,M+="';\n"+i+";\n__p += '"),r&&(M+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),P=a+e.length,e})),M+="';\n";var I=x.call(e,"variable")&&e.variable;if(I){if(g.test(I))throw new Error("Invalid `variable` option passed into `_.template`")}else M="with (obj) {\n"+M+"\n}\n";M=(A?M.replace(d,""):M).replace(y,"$1").replace(v,"$1;"),M="function("+(I||"obj")+") {\n"+(I?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(k?", __e = _.escape":"")+(A?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+M+"return __p\n}";var C=o((function(){return Function(O,T+"return "+M).apply(void 0,E)}));if(C.source=M,c(C))throw C;return C}},function(t,e,n){var r,o,i;o=[],void 0===(i="function"==typeof(r=function(){var t=function(t){return t.reduce((function(t,e){return 2*t+e}),0)},e=function(t){for(var e=[],n=7;n>=0;n--)e.push(!!(t&1<<n));return e},n=function(t){this.data=t,this.len=this.data.length,this.pos=0,this.readByte=function(){if(this.pos>=this.data.length)throw new Error("Attempted to read past end of stream.");return t instanceof Uint8Array?t[this.pos++]:255&t.charCodeAt(this.pos++)},this.readBytes=function(t){for(var e=[],n=0;n<t;n++)e.push(this.readByte());return e},this.read=function(t){for(var e="",n=0;n<t;n++)e+=String.fromCharCode(this.readByte());return e},this.readUnsigned=function(){var t=this.readBytes(2);return(t[1]<<8)+t[0]}},r=function(n,r){r||(r={});var o=function(t){for(var e=[],r=0;r<t;r++)e.push(n.readBytes(3));return e},i=function(){var t,e;e="";do{t=n.readByte(),e+=n.read(t)}while(0!==t);return e},a=function(a){a.leftPos=n.readUnsigned(),a.topPos=n.readUnsigned(),a.width=n.readUnsigned(),a.height=n.readUnsigned();var u=e(n.readByte());a.lctFlag=u.shift(),a.interlaced=u.shift(),a.sorted=u.shift(),a.reserved=u.splice(0,2),a.lctSize=t(u.splice(0,3)),a.lctFlag&&(a.lct=o(1<<a.lctSize+1)),a.lzwMinCodeSize=n.readByte();var c=i();a.pixels=function(t,e){for(var n,r,o=0,i=function(t){for(var n=0,r=0;r<t;r++)e.charCodeAt(o>>3)&1<<(7&o)&&(n|=1<<r),o++;return n},a=[],u=1<<t,c=u+1,s=t+1,f=[],l=function(){f=[],s=t+1;for(var e=0;e<u;e++)f[e]=[e];f[u]=[],f[c]=null};;)if(r=n,(n=i(s))!==u){if(n===c)break;if(n<f.length)r!==u&&f.push(f[r].concat(f[n][0]));else{if(n!==f.length)throw new Error("Invalid LZW code.");f.push(f[r].concat(f[r][0]))}a.push.apply(a,f[n]),f.length===1<<s&&s<12&&s++}else l();return a}(a.lzwMinCodeSize,c),a.interlaced&&(a.pixels=function(t,e){for(var n=new Array(t.length),r=t.length/e,o=function(r,o){var i=t.slice(o*e,(o+1)*e);n.splice.apply(n,[r*e,e].concat(i))},i=[0,4,2,1],a=[8,8,4,2],u=0,c=0;c<4;c++)for(var s=i[c];s<r;s+=a[c])o(s,u),u++;return n}(a.pixels,a.width)),r.img&&r.img(a)},u=function o(){var u={};switch(u.sentinel=n.readByte(),String.fromCharCode(u.sentinel)){case"!":u.type="ext",function(o){switch(o.label=n.readByte(),o.label){case 249:o.extType="gce",function(o){n.readByte();var i=e(n.readByte());o.reserved=i.splice(0,3),o.disposalMethod=t(i.splice(0,3)),o.userInput=i.shift(),o.transparencyGiven=i.shift(),o.delayTime=n.readUnsigned(),o.transparencyIndex=n.readByte(),o.terminator=n.readByte(),r.gce&&r.gce(o)}(o);break;case 254:o.extType="com",function(t){t.comment=i(),r.com&&r.com(t)}(o);break;case 1:o.extType="pte",function(t){n.readByte(),t.ptHeader=n.readBytes(12),t.ptData=i(),r.pte&&r.pte(t)}(o);break;case 255:o.extType="app",function(t){switch(n.readByte(),t.identifier=n.read(8),t.authCode=n.read(3),t.identifier){case"NETSCAPE":!function(t){n.readByte(),t.unknown=n.readByte(),t.iterations=n.readUnsigned(),t.terminator=n.readByte(),r.app&&r.app.NETSCAPE&&r.app.NETSCAPE(t)}(t);break;default:!function(t){t.appData=i(),r.app&&r.app[t.identifier]&&r.app[t.identifier](t)}(t)}}(o);break;default:o.extType="unknown",function(t){t.data=i(),r.unknown&&r.unknown(t)}(o)}}(u);break;case",":u.type="img",a(u);break;case";":u.type="eof",r.eof&&r.eof(u);break;default:throw new Error("Unknown block: 0x"+u.sentinel.toString(16))}"eof"!==u.type&&requestAnimationFrame(o)};!function(){var i={};if(i.sig=n.read(3),i.ver=n.read(3),"GIF"!==i.sig)throw new Error("Not a GIF file.");i.width=n.readUnsigned(),i.height=n.readUnsigned();var a=e(n.readByte());i.gctFlag=a.shift(),i.colorRes=t(a.splice(0,3)),i.sorted=a.shift(),i.gctSize=t(a.splice(0,3)),i.bgColor=n.readByte(),i.pixelAspectRatio=n.readByte(),i.gctFlag&&(i.gct=o(1<<i.gctSize+1)),r.hdr&&r.hdr(i)}(),requestAnimationFrame(u)};return function(t){var e,o,i={vp_l:0,vp_t:0,vp_w:null,vp_h:null,c_w:null,c_h:null};for(var a in t)i[a]=t[a];i.vp_w&&i.vp_h&&(i.is_vp=!0);var u=null,c=!1,s=null,f=null,l=null,h=null,p=null,d=null,y=null,v=!0,g=!1,m=[],b=[],w=i.gif;void 0===i.auto_play&&(i.auto_play=!w.getAttribute("rel:auto_play")||"1"==w.getAttribute("rel:auto_play"));var x,_,k,A,S=i.hasOwnProperty("on_end")?i.on_end:null,O=i.hasOwnProperty("loop_delay")?i.loop_delay:0,E=i.hasOwnProperty("loop_mode")?i.loop_mode:"auto",P=!i.hasOwnProperty("draw_while_loading")||i.draw_while_loading,j=!!P&&(!i.hasOwnProperty("show_progress_bar")||i.show_progress_bar),M=i.hasOwnProperty("progressbar_height")?i.progressbar_height:25,R=i.hasOwnProperty("progressbar_background_color")?i.progressbar_background_color:"rgba(255,255,255,0.4)",T=i.hasOwnProperty("progressbar_foreground_color")?i.progressbar_foreground_color:"rgba(255,0,22,.8)",I=function(){s=null,f=null,p=l,l=null,d=null},C=function(){try{r(e,G)}catch(t){L("parse")}},z=function(t,e){x.width=t*W(),x.height=e*W(),k.style.minWidth=t*W()+"px",A.width=t,A.height=e,A.style.width=t+"px",A.style.height=e+"px",A.getContext("2d").setTransform(1,0,0,1,0,0)},B=function(t,e,n){if(n&&j){var r,o,a,u=M;i.is_vp?g?(o=(i.vp_t+i.vp_h-u)/W(),u/=W(),r=i.vp_l/W()+t/e*(i.vp_w/W()),a=x.width/W()):(o=i.vp_t+i.vp_h-u,u=u,r=i.vp_l+t/e*i.vp_w,a=x.width):(o=(x.height-u)/(g?W():1),r=t/e*x.width/(g?W():1),a=x.width/(g?W():1),u/=g?W():1),_.fillStyle=R,_.fillRect(r,o,a-r,u),_.fillStyle=T,_.fillRect(0,o,r,u)}},L=function(t){u=t,o={width:w.width,height:w.height},m=[],_.fillStyle="black",_.fillRect(0,0,i.c_w?i.c_w:o.width,i.c_h?i.c_h:o.height),_.strokeStyle="red",_.lineWidth=3,_.moveTo(0,0),_.lineTo(i.c_w?i.c_w:o.width,i.c_h?i.c_h:o.height),_.moveTo(0,i.c_h?i.c_h:o.height),_.lineTo(i.c_w?i.c_w:o.width,0),_.stroke()},D=function(){d&&(m.push({data:d.getImageData(0,0,o.width,o.height),delay:f}),b.push({x:0,y:0}))},F=function(){var t,e,n,r=-1,o=0,a=function(t){r+=t,s()},c=(t=!1,e=function(){null!==S&&S(w),o++,!1!==E||o<0?n():(t=!1,v=!1)},n=function n(){if(t=v){a(1);var o=10*m[r].delay;o||(o=100),0==(r+1+m.length)%m.length?(o+=O,setTimeout(e,o)):setTimeout(n,o)}},function(){t||requestAnimationFrame(n)}),s=function(){var t;(r=parseInt(r,10))>m.length-1&&(r=0),r<0&&(r=0),t=b[r],A.getContext("2d").putImageData(m[r].data,t.x,t.y),_.globalCompositeOperation="copy",_.drawImage(A,0,0)};return{init:function(){u||(i.c_w&&i.c_h||_.scale(W(),W()),i.auto_play?c():(r=0,s()))},step:c,play:function(){v=!0,c()},pause:function(){v=!1},playing:v,move_relative:a,current_frame:function(){return r},length:function(){return m.length},move_to:function(t){r=t,s()}}}(),N=function(t){B(e.pos,e.data.length,t)},U=function(){},Y=function(t,e){return function(n){t(n),N(e)}},G={hdr:Y((function(t){z((o=t).width,o.height)})),gce:Y((function(t){D(),I(),s=t.transparencyGiven?t.transparencyIndex:null,f=t.delayTime,l=t.disposalMethod})),com:Y(U),app:{NETSCAPE:Y(U)},img:Y((function(t){d||(d=A.getContext("2d"));var e=m.length,n=t.lctFlag?t.lct:o.gct;e>0&&(3===p?null!==h?d.putImageData(m[h].data,0,0):d.clearRect(y.leftPos,y.topPos,y.width,y.height):h=e-1,2===p&&d.clearRect(y.leftPos,y.topPos,y.width,y.height));var r=d.getImageData(t.leftPos,t.topPos,t.width,t.height);t.pixels.forEach((function(t,e){t!==s&&(r.data[4*e+0]=n[t][0],r.data[4*e+1]=n[t][1],r.data[4*e+2]=n[t][2],r.data[4*e+3]=255)})),d.putImageData(r,t.leftPos,t.topPos),g||(_.scale(W(),W()),g=!0),P&&(_.drawImage(A,0,0),P=i.auto_play),y=t}),!0),eof:function(t){D(),N(!1),i.c_w&&i.c_h||(x.width=o.width*W(),x.height=o.height*W()),F.init(),c=!1,X&&X(w)}},H=function(){var t=w.parentNode,e=document.createElement("div");(x=document.createElement("canvas")).style.width="100%",x.style.height="100%",_=x.getContext("2d"),k=document.createElement("div"),A=document.createElement("canvas"),e.width=x.width=w.width,e.height=x.height=w.height,k.style.minWidth=w.width+"px",e.className="jsgif",e.style.width="100%",e.style.height="100%",k.className="jsgif_toolbar",e.appendChild(x),e.appendChild(k),t.insertBefore(e,w),t.removeChild(w),i.c_w&&i.c_h&&z(i.c_w,i.c_h),V=!0},W=function(){return i.max_width&&o&&o.width>i.max_width?i.max_width/o.width:1},V=!1,X=!1,q=function(t){return!c&&(X=t||!1,c=!0,m=[],I(),h=null,p=null,d=null,y=null,!0)};return{play:F.play,pause:F.pause,move_relative:F.move_relative,move_to:F.move_to,get_playing:function(){return v},get_canvas:function(){return x},get_canvas_scale:function(){return W()},get_loading:function(){return c},get_auto_play:function(){return i.auto_play},get_length:function(){return F.length()},get_current_frame:function(){return F.current_frame()},load_url:function(t,r){if(q(r)){var o=new XMLHttpRequest;o.open("GET",t,!0),"overrideMimeType"in o?o.overrideMimeType("text/plain; charset=x-user-defined"):"responseType"in o?o.responseType="arraybuffer":o.setRequestHeader("Accept-Charset","x-user-defined"),o.onloadstart=function(){V||H()},o.onload=function(t){200!=this.status&&L("xhr - response"),"response"in this||(this.response=new VBArray(this.responseText).toArray().map(String.fromCharCode).join(""));var r=this.response;r.toString().indexOf("ArrayBuffer")>0&&(r=new Uint8Array(r)),e=new n(r),requestAnimationFrame(C)},o.onprogress=function(t){t.lengthComputable&&B(t.loaded,t.total,!0)},o.onerror=function(){L("xhr")},o.send()}},load:function(t){this.load_url(w.getAttribute("rel:animated_src")||w.src,t)},load_raw:function(t,r){q(r)&&(V||H(),e=new n(t),requestAnimationFrame(C))},set_frame_offset:function(t,e){b[t]?(void 0!==e.x&&(b[t].x=e.x),void 0!==e.y&&(b[t].y=e.y)):b[t]=e}}}})?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){n(248),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(282),n(283),n(284),n(97),n(285),n(286),n(287),n(288),n(289),n(290),n(291),n(292),n(293),n(294),n(295),n(296),n(297),n(298),n(299),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(310),n(311),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(338),n(339),n(340),n(341),n(342),n(343),n(345),n(346),n(347),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(365),n(366),n(367),n(368),n(369),n(370),n(371),n(372),n(373),n(374),n(375),n(376),n(377),n(378),n(380),n(381),n(382),n(383),n(388),n(389),n(390),n(391),n(392),n(393),n(394),n(395),n(396),n(397),n(398),n(399),n(400),n(401),n(402),n(403),n(404),n(405),n(406),n(152),n(407),n(408),n(409),n(410),n(411),n(412),n(413),n(414),n(415),n(416),n(200),n(417),n(418),n(419),n(420),n(421),n(422),n(423),n(424),n(425),n(426),n(427),n(428),n(429),n(430),n(431),n(432),n(433),n(434),n(435),n(436),n(437),n(438),n(439),n(440),n(441),n(442),n(443),n(444),n(445),n(447),n(448),n(449),n(450),n(451),n(452),n(453),n(454),n(455),n(456),n(457),n(458),n(459),n(462),n(463),n(464),n(465),n(466),n(467),n(468),n(469),n(470),n(471),n(472),n(473),n(474),n(475),n(476),n(477),n(478),n(479),n(480),n(481),n(482),n(483),n(484),n(485),n(486),n(487),n(488),n(489),n(490),n(491),n(493),n(209),t.exports=n(174)},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(24),a=n(34),u=n(11),c=n(2),s=n(32),f=n(7),l=n(124),h=n(3),p=n(14),d=n(56),y=n(10),v=n(5),g=n(31),m=n(71),b=n(4),w=n(13),x=n(23),_=n(49),k=n(8),A=n(38),S=n(35),O=n(77),E=n(51),P=n(133),j=n(130),M=n(21),R=n(12),T=n(90),I=n(58),C=n(16),z=n(91),B=n(94),L=n(74),D=n(73),F=n(6),N=n(173),U=n(25),Y=n(36),G=n(18),H=n(20).forEach,W=B("hidden"),V=F("toPrimitive"),X=G.set,q=G.getterFor("Symbol"),K=Object.prototype,Q=o.Symbol,J=Q&&Q.prototype,Z=o.TypeError,$=o.QObject,tt=i("JSON","stringify"),et=M.f,nt=R.f,rt=P.f,ot=T.f,it=c([].push),at=z("symbols"),ut=z("op-symbols"),ct=z("string-to-symbol-registry"),st=z("symbol-to-string-registry"),ft=z("wks"),lt=!$||!$.prototype||!$.prototype.findChild,ht=f&&h((function(){return 7!=S(nt({},"a",{get:function(){return nt(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=et(K,e);r&&delete K[e],nt(t,e,n),r&&t!==K&&nt(K,e,r)}:nt,pt=function(t,e){var n=at[t]=S(J);return X(n,{type:"Symbol",tag:t,description:e}),f||(n.description=e),n},dt=function(t,e,n){t===K&&dt(ut,e,n),b(t);var r=_(e);return b(n),p(at,r)?(n.enumerable?(p(t,W)&&t[W][r]&&(t[W][r]=!1),n=S(n,{enumerable:A(0,!1)})):(p(t,W)||nt(t,W,A(1,{})),t[W][r]=!0),ht(t,r,n)):nt(t,r,n)},yt=function(t,e){b(t);var n=x(e),r=O(n).concat(bt(n));return H(r,(function(e){f&&!u(vt,n,e)||dt(t,e,n[e])})),t},vt=function(t){var e=_(t),n=u(ot,this,e);return!(this===K&&p(at,e)&&!p(ut,e))&&(!(n||!p(this,e)||!p(at,e)||p(this,W)&&this[W][e])||n)},gt=function(t,e){var n=x(t),r=_(e);if(n!==K||!p(at,r)||p(ut,r)){var o=et(n,r);return!o||!p(at,r)||p(n,W)&&n[W][r]||(o.enumerable=!0),o}},mt=function(t){var e=rt(x(t)),n=[];return H(e,(function(t){p(at,t)||p(L,t)||it(n,t)})),n},bt=function(t){var e=t===K,n=rt(e?ut:x(t)),r=[];return H(n,(function(t){!p(at,t)||e&&!p(K,t)||it(r,at[t])})),r};(l||(C(J=(Q=function(){if(g(J,this))throw Z("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?k(arguments[0]):void 0,e=D(t),n=function t(n){this===K&&u(t,ut,n),p(this,W)&&p(this[W],e)&&(this[W][e]=!1),ht(this,e,A(1,n))};return f&<&&ht(K,e,{configurable:!0,set:n}),pt(e,t)}).prototype,"toString",(function(){return q(this).tag})),C(Q,"withoutSetter",(function(t){return pt(D(t),t)})),T.f=vt,R.f=dt,M.f=gt,E.f=P.f=mt,j.f=bt,N.f=function(t){return pt(F(t),t)},f&&(nt(J,"description",{configurable:!0,get:function(){return q(this).description}}),s||C(K,"propertyIsEnumerable",vt,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:Q}),H(O(ft),(function(t){U(t)})),r({target:"Symbol",stat:!0,forced:!l},{for:function(t){var e=k(t);if(p(ct,e))return ct[e];var n=Q(e);return ct[e]=n,st[n]=e,n},keyFor:function(t){if(!m(t))throw Z(t+" is not a symbol");if(p(st,t))return st[t]},useSetter:function(){lt=!0},useSimple:function(){lt=!1}}),r({target:"Object",stat:!0,forced:!l,sham:!f},{create:function(t,e){return void 0===e?S(t):yt(S(t),e)},defineProperty:dt,defineProperties:yt,getOwnPropertyDescriptor:gt}),r({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:mt,getOwnPropertySymbols:bt}),r({target:"Object",stat:!0,forced:h((function(){j.f(1)}))},{getOwnPropertySymbols:function(t){return j.f(w(t))}}),tt)&&r({target:"JSON",stat:!0,forced:!l||h((function(){var t=Q();return"[null]"!=tt([t])||"{}"!=tt({a:t})||"{}"!=tt(Object(t))}))},{stringify:function(t,e,n){var r=I(arguments),o=e;if((v(e)||void 0!==t)&&!m(t))return d(e)||(e=function(t,e){if(y(o)&&(e=u(o,this,t,e)),!m(e))return e}),r[1]=e,a(tt,null,r)}});if(!J[V]){var wt=J.valueOf;C(J,V,(function(t){return u(wt,this)}))}Y(Q,"Symbol"),L[W]=!0},function(t,e,n){var r=n(1),o=n(56),i=n(79),a=n(5),u=n(6)("species"),c=r.Array;t.exports=function(t){var e;return o(t)&&(e=t.constructor,(i(e)&&(e===c||o(e.prototype))||a(e)&&null===(e=e[u]))&&(e=void 0)),void 0===e?c:e}},function(t,e,n){"use strict";var r=n(0),o=n(7),i=n(1),a=n(2),u=n(14),c=n(10),s=n(31),f=n(8),l=n(12).f,h=n(127),p=i.Symbol,d=p&&p.prototype;if(o&&c(p)&&(!("description"in d)||void 0!==p().description)){var y={},v=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:f(arguments[0]),e=s(d,this)?new p(t):void 0===t?p():p(t);return""===t&&(y[e]=!0),e};h(v,p),v.prototype=d,d.constructor=v;var g="Symbol(test)"==String(p("test")),m=a(d.toString),b=a(d.valueOf),w=/^Symbol\((.*)\)[^)]+$/,x=a("".replace),_=a("".slice);l(d,"description",{configurable:!0,get:function(){var t=b(this),e=m(t);if(u(y,t))return"";var n=g?_(e,7,-1):x(e,w,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:v})}},function(t,e,n){n(25)("asyncIterator")},function(t,e,n){n(25)("hasInstance")},function(t,e,n){n(25)("isConcatSpreadable")},function(t,e,n){n(25)("iterator")},function(t,e,n){n(25)("match")},function(t,e,n){n(25)("matchAll")},function(t,e,n){n(25)("replace")},function(t,e,n){n(25)("search")},function(t,e,n){n(25)("species")},function(t,e,n){n(25)("split")},function(t,e,n){n(25)("toPrimitive")},function(t,e,n){n(25)("toStringTag")},function(t,e,n){n(25)("unscopables")},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(31),a=n(33),u=n(43),c=n(127),s=n(35),f=n(27),l=n(38),h=n(265),p=n(266),d=n(53),y=n(267),v=n(6),g=n(268),m=v("toStringTag"),b=o.Error,w=[].push,x=function(t,e){var n,r=arguments.length>2?arguments[2]:void 0,o=i(_,this);u?n=u(new b(void 0),o?a(this):_):(n=o?this:s(_),f(n,m,"Error")),f(n,"message",y(e,"")),g&&f(n,"stack",h(n.stack,1)),p(n,r);var c=[];return d(t,w,{that:c}),f(n,"errors",c),n};u?u(x,b):c(x,b);var _=x.prototype=s(b.prototype,{constructor:l(1,x),message:l(1,""),name:l(1,"AggregateError")});r({global:!0},{AggregateError:x})},function(t,e,n){var r=n(2),o=n(62),i=r("".replace),a=r("".split),u=r([].join),c=String(Error("zxcasd").stack),s=/\n\s*at [^:]*:[^\n]*/,f=s.test(c),l=/@[^\n]*\n/.test(c)&&!/zxcasd/.test(c);t.exports=function(t,e){if("string"!=typeof t)return t;if(f)for(;e--;)t=i(t,s,"");else if(l)return u(o(a(t,"\n"),e),"\n");return t}},function(t,e,n){var r=n(5),o=n(27);t.exports=function(t,e){r(e)&&"cause"in e&&o(t,"cause",e.cause)}},function(t,e,n){var r=n(8);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:r(t)}},function(t,e,n){var r=n(3),o=n(38);t.exports=!r((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",o(1,7)),7!==t.stack)}))},function(t,e,n){"use strict";var r=n(0),o=n(13),i=n(15),a=n(19),u=n(44);r({target:"Array",proto:!0},{at:function(t){var e=o(this),n=i(e),r=a(t),u=r>=0?r:n+r;return u<0||u>=n?void 0:e[u]}}),u("at")},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(3),a=n(56),u=n(5),c=n(13),s=n(15),f=n(52),l=n(78),h=n(82),p=n(6),d=n(50),y=p("isConcatSpreadable"),v=o.TypeError,g=d>=51||!i((function(){var t=[];return t[y]=!1,t.concat()[0]!==t})),m=h("concat"),b=function(t){if(!u(t))return!1;var e=t[y];return void 0!==e?!!e:a(t)};r({target:"Array",proto:!0,forced:!g||!m},{concat:function(t){var e,n,r,o,i,a=c(this),u=l(a,0),h=0;for(e=-1,r=arguments.length;e<r;e++)if(b(i=-1===e?a:arguments[e])){if(h+(o=s(i))>9007199254740991)throw v("Maximum allowed index exceeded");for(n=0;n<o;n++,h++)n in i&&f(u,h,i[n])}else{if(h>=9007199254740991)throw v("Maximum allowed index exceeded");f(u,h++,i)}return u.length=h,u}})},function(t,e,n){var r=n(0),o=n(177),i=n(44);r({target:"Array",proto:!0},{copyWithin:o}),i("copyWithin")},function(t,e,n){"use strict";var r=n(0),o=n(20).every;r({target:"Array",proto:!0,forced:!n(45)("every")},{every:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(0),o=n(136),i=n(44);r({target:"Array",proto:!0},{fill:o}),i("fill")},function(t,e,n){"use strict";var r=n(0),o=n(20).filter;r({target:"Array",proto:!0,forced:!n(82)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0),o=n(20).find,i=n(44),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("find")},function(t,e,n){"use strict";var r=n(0),o=n(20).findIndex,i=n(44),a=!0;"findIndex"in[]&&Array(1).findIndex((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("findIndex")},function(t,e,n){"use strict";var r=n(0),o=n(178),i=n(13),a=n(15),u=n(19),c=n(78);r({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=i(this),n=a(e),r=c(e,0);return r.length=o(r,e,e,n,0,void 0===t?1:u(t)),r}})},function(t,e,n){"use strict";var r=n(0),o=n(178),i=n(22),a=n(13),u=n(15),c=n(78);r({target:"Array",proto:!0},{flatMap:function(t){var e,n=a(this),r=u(n);return i(t),(e=c(n,0)).length=o(e,n,n,r,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},function(t,e,n){"use strict";var r=n(0),o=n(179);r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},function(t,e,n){var r=n(0),o=n(180);r({target:"Array",stat:!0,forced:!n(96)((function(t){Array.from(t)}))},{from:o})},function(t,e,n){var r=n(4),o=n(176);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){o(t,"throw",e)}}},function(t,e,n){"use strict";var r=n(0),o=n(75).includes,i=n(44);r({target:"Array",proto:!0},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(75).indexOf,a=n(45),u=o([].indexOf),c=!!u&&1/u([1],1,-0)<0,s=a("indexOf");r({target:"Array",proto:!0,forced:c||!s},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return c?u(this,t,e)||0:i(this,t,e)}})},function(t,e,n){n(0)({target:"Array",stat:!0},{isArray:n(56)})},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(70),a=n(23),u=n(45),c=o([].join),s=i!=Object,f=u("join",",");r({target:"Array",proto:!0,forced:s||!f},{join:function(t){return c(a(this),void 0===t?",":t)}})},function(t,e,n){var r=n(0),o=n(182);r({target:"Array",proto:!0,forced:o!==[].lastIndexOf},{lastIndexOf:o})},function(t,e,n){"use strict";var r=n(0),o=n(20).map;r({target:"Array",proto:!0,forced:!n(82)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(3),a=n(79),u=n(52),c=o.Array;r({target:"Array",stat:!0,forced:i((function(){function t(){}return!(c.of.call(t)instanceof t)}))},{of:function(){for(var t=0,e=arguments.length,n=new(a(this)?this:c)(e);e>t;)u(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(0),o=n(98).left,i=n(45),a=n(50),u=n(63);r({target:"Array",proto:!0,forced:!i("reduce")||!u&&a>79&&a<83},{reduce:function(t){var e=arguments.length;return o(this,t,e,e>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0),o=n(98).right,i=n(45),a=n(50),u=n(63);r({target:"Array",proto:!0,forced:!i("reduceRight")||!u&&a>79&&a<83},{reduceRight:function(t){return o(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(56),a=o([].reverse),u=[1,2];r({target:"Array",proto:!0,forced:String(u)===String(u.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),a(this)}})},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(56),a=n(79),u=n(5),c=n(42),s=n(15),f=n(23),l=n(52),h=n(6),p=n(82),d=n(58),y=p("slice"),v=h("species"),g=o.Array,m=Math.max;r({target:"Array",proto:!0,forced:!y},{slice:function(t,e){var n,r,o,h=f(this),p=s(h),y=c(t,p),b=c(void 0===e?p:e,p);if(i(h)&&(n=h.constructor,(a(n)&&(n===g||i(n.prototype))||u(n)&&null===(n=n[v]))&&(n=void 0),n===g||void 0===n))return d(h,y,b);for(r=new(void 0===n?g:n)(m(b-y,0)),o=0;y<b;y++,o++)y in h&&l(r,o,h[y]);return r.length=o,r}})},function(t,e,n){"use strict";var r=n(0),o=n(20).some;r({target:"Array",proto:!0,forced:!n(45)("some")},{some:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(22),a=n(13),u=n(15),c=n(8),s=n(3),f=n(139),l=n(45),h=n(183),p=n(184),d=n(50),y=n(140),v=[],g=o(v.sort),m=o(v.push),b=s((function(){v.sort(void 0)})),w=s((function(){v.sort(null)})),x=l("sort"),_=!s((function(){if(d)return d<70;if(!(h&&h>3)){if(p)return!0;if(y)return y<603;var t,e,n,r,o="";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++)v.push({k:e+r,v:n})}for(v.sort((function(t,e){return e.v-t.v})),r=0;r<v.length;r++)e=v[r].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));r({target:"Array",proto:!0,forced:b||!w||!x||!_},{sort:function(t){void 0!==t&&i(t);var e=a(this);if(_)return void 0===t?g(e):g(e,t);var n,r,o=[],s=u(e);for(r=0;r<s;r++)r in e&&m(o,e[r]);for(f(o,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}}(t)),n=o.length,r=0;r<n;)e[r]=o[r++];for(;r<s;)delete e[r++];return e}})},function(t,e,n){n(64)("Array")},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(42),a=n(19),u=n(15),c=n(13),s=n(78),f=n(52),l=n(82)("splice"),h=o.TypeError,p=Math.max,d=Math.min;r({target:"Array",proto:!0,forced:!l},{splice:function(t,e){var n,r,o,l,y,v,g=c(this),m=u(g),b=i(t,m),w=arguments.length;if(0===w?n=r=0:1===w?(n=0,r=m-b):(n=w-2,r=d(p(a(e),0),m-b)),m+n-r>9007199254740991)throw h("Maximum allowed length exceeded");for(o=s(g,r),l=0;l<r;l++)(y=b+l)in g&&f(o,l,g[y]);if(o.length=r,n<r){for(l=b;l<m-r;l++)v=l+n,(y=l+r)in g?g[v]=g[y]:delete g[v];for(l=m;l>m-r+n;l--)delete g[l-1]}else if(n>r)for(l=m-r;l>b;l--)v=l+n-1,(y=l+r-1)in g?g[v]=g[y]:delete g[v];for(l=0;l<n;l++)g[l+b]=arguments[l+2];return g.length=m-r+n,o}})},function(t,e,n){n(44)("flat")},function(t,e,n){n(44)("flatMap")},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(99),a=n(64),u=i.ArrayBuffer;r({global:!0,forced:o.ArrayBuffer!==u},{ArrayBuffer:u}),a("ArrayBuffer")},function(t,e,n){var r=n(1).Array,o=Math.abs,i=Math.pow,a=Math.floor,u=Math.log,c=Math.LN2;t.exports={pack:function(t,e,n){var s,f,l,h=r(n),p=8*n-e-1,d=(1<<p)-1,y=d>>1,v=23===e?i(2,-24)-i(2,-77):0,g=t<0||0===t&&1/t<0?1:0,m=0;for((t=o(t))!=t||t===1/0?(f=t!=t?1:0,s=d):(s=a(u(t)/c),t*(l=i(2,-s))<1&&(s--,l*=2),(t+=s+y>=1?v/l:v*i(2,1-y))*l>=2&&(s++,l/=2),s+y>=d?(f=0,s=d):s+y>=1?(f=(t*l-1)*i(2,e),s+=y):(f=t*i(2,y-1)*i(2,e),s=0));e>=8;)h[m++]=255&f,f/=256,e-=8;for(s=s<<e|f,p+=e;p>0;)h[m++]=255&s,s/=256,p-=8;return h[--m]|=128*g,h},unpack:function(t,e){var n,r=t.length,o=8*r-e-1,a=(1<<o)-1,u=a>>1,c=o-7,s=r-1,f=t[s--],l=127&f;for(f>>=7;c>0;)l=256*l+t[s--],c-=8;for(n=l&(1<<-c)-1,l>>=-c,c+=e;c>0;)n=256*n+t[s--],c-=8;if(0===l)l=1-u;else{if(l===a)return n?NaN:f?-1/0:1/0;n+=i(2,e),l-=u}return(f?-1:1)*n*i(2,l-e)}}},function(t,e,n){var r=n(0),o=n(9);r({target:"ArrayBuffer",stat:!0,forced:!o.NATIVE_ARRAY_BUFFER_VIEWS},{isView:o.isView})},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(3),a=n(99),u=n(4),c=n(42),s=n(28),f=n(66),l=a.ArrayBuffer,h=a.DataView,p=h.prototype,d=o(l.prototype.slice),y=o(p.getUint8),v=o(p.setUint8);r({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:i((function(){return!new l(2).slice(1,void 0).byteLength}))},{slice:function(t,e){if(d&&void 0===e)return d(u(this),t);for(var n=u(this).byteLength,r=c(t,n),o=c(void 0===e?n:e,n),i=new(f(this,l))(s(o-r)),a=new h(this),p=new h(i),g=0;r<o;)v(p,g++,y(a,r++));return i}})},function(t,e,n){var r=n(0),o=n(99);r({global:!0,forced:!n(141)},{DataView:o.DataView})},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(3)((function(){return 120!==new Date(16e11).getYear()})),a=o(Date.prototype.getFullYear);r({target:"Date",proto:!0,forced:i},{getYear:function(){return a(this)-1900}})},function(t,e,n){var r=n(0),o=n(1),i=n(2),a=o.Date,u=i(a.prototype.getTime);r({target:"Date",stat:!0},{now:function(){return u(new a)}})},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(19),a=Date.prototype,u=o(a.getTime),c=o(a.setFullYear);r({target:"Date",proto:!0},{setYear:function(t){u(this);var e=i(t);return c(this,0<=e&&e<=99?e+1900:e)}})},function(t,e,n){n(0)({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})},function(t,e,n){var r=n(0),o=n(309);r({target:"Date",proto:!0,forced:Date.prototype.toISOString!==o},{toISOString:o})},function(t,e,n){"use strict";var r=n(1),o=n(2),i=n(3),a=n(143).start,u=r.RangeError,c=Math.abs,s=Date.prototype,f=s.toISOString,l=o(s.getTime),h=o(s.getUTCDate),p=o(s.getUTCFullYear),d=o(s.getUTCHours),y=o(s.getUTCMilliseconds),v=o(s.getUTCMinutes),g=o(s.getUTCMonth),m=o(s.getUTCSeconds);t.exports=i((function(){return"0385-07-25T07:06:39.999Z"!=f.call(new Date(-50000000000001))}))||!i((function(){f.call(new Date(NaN))}))?function(){if(!isFinite(l(this)))throw u("Invalid time value");var t=p(this),e=y(this),n=t<0?"-":t>9999?"+":"";return n+a(c(t),n?6:4,0)+"-"+a(g(this)+1,2,0)+"-"+a(h(this),2,0)+"T"+a(d(this),2,0)+":"+a(v(this),2,0)+":"+a(m(this),2,0)+"."+a(e,3,0)+"Z"}:f},function(t,e,n){"use strict";var r=n(0),o=n(3),i=n(13),a=n(123);r({target:"Date",proto:!0,forced:o((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=i(this),n=a(e,"number");return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(14),o=n(16),i=n(312),a=n(6)("toPrimitive"),u=Date.prototype;r(u,a)||o(u,a,i)},function(t,e,n){"use strict";var r=n(1),o=n(4),i=n(168),a=r.TypeError;t.exports=function(t){if(o(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw a("Incorrect hint");return i(this,t)}},function(t,e,n){var r=n(2),o=n(16),i=Date.prototype,a=r(i.toString),u=r(i.getTime);"Invalid Date"!=String(new Date(NaN))&&o(i,"toString",(function(){var t=u(this);return t==t?a(this):"Invalid Date"}))},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(8),a=o("".charAt),u=o("".charCodeAt),c=o(/./.exec),s=o(1..toString),f=o("".toUpperCase),l=/[\w*+\-./@]/,h=function(t,e){for(var n=s(t,16);n.length<e;)n="0"+n;return n};r({global:!0},{escape:function(t){for(var e,n,r=i(t),o="",s=r.length,p=0;p<s;)e=a(r,p++),c(l,e)?o+=e:o+=(n=u(e,0))<256?"%"+h(n,2):"%u"+f(h(n,4));return o}})},function(t,e,n){n(0)({target:"Function",proto:!0},{bind:n(186)})},function(t,e,n){"use strict";var r=n(10),o=n(5),i=n(12),a=n(33),u=n(6)("hasInstance"),c=Function.prototype;u in c||i.f(c,u,{value:function(t){if(!r(this)||!o(t))return!1;var e=this.prototype;if(!o(e))return t instanceof this;for(;t=a(t);)if(e===t)return!0;return!1}})},function(t,e,n){var r=n(7),o=n(55).EXISTS,i=n(2),a=n(12).f,u=Function.prototype,c=i(u.toString),s=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,f=i(s.exec);r&&!o&&a(u,"name",{configurable:!0,get:function(){try{return f(s,c(this))[1]}catch(t){return""}}})},function(t,e,n){n(0)({global:!0},{globalThis:n(1)})},function(t,e,n){var r=n(0),o=n(1),i=n(24),a=n(34),u=n(2),c=n(3),s=o.Array,f=i("JSON","stringify"),l=u(/./.exec),h=u("".charAt),p=u("".charCodeAt),d=u("".replace),y=u(1..toString),v=/[\uD800-\uDFFF]/g,g=/^[\uD800-\uDBFF]$/,m=/^[\uDC00-\uDFFF]$/,b=function(t,e,n){var r=h(n,e-1),o=h(n,e+1);return l(g,t)&&!l(m,o)||l(m,t)&&!l(g,r)?"\\u"+y(p(t,0),16):t},w=c((function(){return'"\\udf06\\ud834"'!==f("\udf06\ud834")||'"\\udead"'!==f("\udead")}));f&&r({target:"JSON",stat:!0,forced:w},{stringify:function(t,e,n){for(var r=0,o=arguments.length,i=s(o);r<o;r++)i[r]=arguments[r];var u=a(f,null,i);return"string"==typeof u?d(u,v,b):u}})},function(t,e,n){var r=n(1);n(36)(r.JSON,"JSON",!0)},function(t,e,n){"use strict";n(100)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(187))},function(t,e,n){var r=n(0),o=n(188),i=Math.acosh,a=Math.log,u=Math.sqrt,c=Math.LN2;r({target:"Math",stat:!0,forced:!i||710!=Math.floor(i(Number.MAX_VALUE))||i(1/0)!=1/0},{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?a(t)+c:o(t-1+u(t-1)*u(t+1))}})},function(t,e,n){var r=n(0),o=Math.asinh,i=Math.log,a=Math.sqrt;r({target:"Math",stat:!0,forced:!(o&&1/o(0)>0)},{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):i(e+a(e*e+1)):e}})},function(t,e,n){var r=n(0),o=Math.atanh,i=Math.log;r({target:"Math",stat:!0,forced:!(o&&1/o(-0)<0)},{atanh:function(t){return 0==(t=+t)?t:i((1+t)/(1-t))/2}})},function(t,e,n){var r=n(0),o=n(146),i=Math.abs,a=Math.pow;r({target:"Math",stat:!0},{cbrt:function(t){return o(t=+t)*a(i(t),1/3)}})},function(t,e,n){var r=n(0),o=Math.floor,i=Math.log,a=Math.LOG2E;r({target:"Math",stat:!0},{clz32:function(t){return(t>>>=0)?31-o(i(t+.5)*a):32}})},function(t,e,n){var r=n(0),o=n(103),i=Math.cosh,a=Math.abs,u=Math.E;r({target:"Math",stat:!0,forced:!i||i(710)===1/0},{cosh:function(t){var e=o(a(t)-1)+1;return(e+1/(e*u*u))*(u/2)}})},function(t,e,n){var r=n(0),o=n(103);r({target:"Math",stat:!0,forced:o!=Math.expm1},{expm1:o})},function(t,e,n){n(0)({target:"Math",stat:!0},{fround:n(330)})},function(t,e,n){var r=n(146),o=Math.abs,i=Math.pow,a=i(2,-52),u=i(2,-23),c=i(2,127)*(2-u),s=i(2,-126);t.exports=Math.fround||function(t){var e,n,i=o(t),f=r(t);return i<s?f*(i/s/u+1/a-1/a)*s*u:(n=(e=(1+u/a)*i)-(e-i))>c||n!=n?f*(1/0):f*n}},function(t,e,n){var r=n(0),o=Math.hypot,i=Math.abs,a=Math.sqrt;r({target:"Math",stat:!0,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function(t,e){for(var n,r,o=0,u=0,c=arguments.length,s=0;u<c;)s<(n=i(arguments[u++]))?(o=o*(r=s/n)*r+1,s=n):o+=n>0?(r=n/s)*r:n;return s===1/0?1/0:s*a(o)}})},function(t,e,n){var r=n(0),o=n(3),i=Math.imul;r({target:"Math",stat:!0,forced:o((function(){return-5!=i(4294967295,5)||2!=i.length}))},{imul:function(t,e){var n=+t,r=+e,o=65535&n,i=65535&r;return 0|o*i+((65535&n>>>16)*i+o*(65535&r>>>16)<<16>>>0)}})},function(t,e,n){var r=n(0),o=Math.log,i=Math.LOG10E;r({target:"Math",stat:!0},{log10:function(t){return o(t)*i}})},function(t,e,n){n(0)({target:"Math",stat:!0},{log1p:n(188)})},function(t,e,n){var r=n(0),o=Math.log,i=Math.LN2;r({target:"Math",stat:!0},{log2:function(t){return o(t)/i}})},function(t,e,n){n(0)({target:"Math",stat:!0},{sign:n(146)})},function(t,e,n){var r=n(0),o=n(3),i=n(103),a=Math.abs,u=Math.exp,c=Math.E;r({target:"Math",stat:!0,forced:o((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(t){return a(t=+t)<1?(i(t)-i(-t))/2:(u(t-1)-u(-t-1))*(c/2)}})},function(t,e,n){var r=n(0),o=n(103),i=Math.exp;r({target:"Math",stat:!0},{tanh:function(t){var e=o(t=+t),n=o(-t);return e==1/0?1:n==1/0?-1:(e-n)/(i(t)+i(-t))}})},function(t,e,n){n(36)(Math,"Math",!0)},function(t,e,n){var r=n(0),o=Math.ceil,i=Math.floor;r({target:"Math",stat:!0},{trunc:function(t){return(t>0?i:o)(t)}})},function(t,e,n){"use strict";var r=n(7),o=n(1),i=n(2),a=n(76),u=n(16),c=n(14),s=n(102),f=n(31),l=n(71),h=n(123),p=n(3),d=n(51).f,y=n(21).f,v=n(12).f,g=n(147),m=n(67).trim,b=o.Number,w=b.prototype,x=o.TypeError,_=i("".slice),k=i("".charCodeAt),A=function(t){var e=h(t,"number");return"bigint"==typeof e?e:S(e)},S=function(t){var e,n,r,o,i,a,u,c,s=h(t,"number");if(l(s))throw x("Cannot convert a Symbol value to a number");if("string"==typeof s&&s.length>2)if(s=m(s),43===(e=k(s,0))||45===e){if(88===(n=k(s,2))||120===n)return NaN}else if(48===e){switch(k(s,1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+s}for(a=(i=_(s,2)).length,u=0;u<a;u++)if((c=k(i,u))<48||c>o)return NaN;return parseInt(i,r)}return+s};if(a("Number",!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var O,E=function(t){var e=arguments.length<1?0:b(A(t)),n=this;return f(w,n)&&p((function(){g(n)}))?s(Object(e),n,E):e},P=r?d(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),j=0;P.length>j;j++)c(b,O=P[j])&&!c(E,O)&&v(E,O,y(b,O));E.prototype=w,w.constructor=E,u(o,"Number",E)}},function(t,e,n){n(0)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(t,e,n){n(0)({target:"Number",stat:!0},{isFinite:n(344)})},function(t,e,n){var r=n(1).isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&r(t)}},function(t,e,n){n(0)({target:"Number",stat:!0},{isInteger:n(148)})},function(t,e,n){n(0)({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(0),o=n(148),i=Math.abs;r({target:"Number",stat:!0},{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},function(t,e,n){n(0)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){n(0)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(0),o=n(189);r({target:"Number",stat:!0,forced:Number.parseFloat!=o},{parseFloat:o})},function(t,e,n){var r=n(0),o=n(190);r({target:"Number",stat:!0,forced:Number.parseInt!=o},{parseInt:o})},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(2),a=n(19),u=n(147),c=n(144),s=n(3),f=o.RangeError,l=o.String,h=Math.floor,p=i(c),d=i("".slice),y=i(1..toFixed),v=function t(e,n,r){return 0===n?r:n%2==1?t(e,n-1,r*e):t(e*e,n/2,r)},g=function(t,e,n){for(var r=-1,o=n;++r<6;)o+=e*t[r],t[r]=o%1e7,o=h(o/1e7)},m=function(t,e){for(var n=6,r=0;--n>=0;)r+=t[n],t[n]=h(r/e),r=r%e*1e7},b=function(t){for(var e=6,n="";--e>=0;)if(""!==n||0===e||0!==t[e]){var r=l(t[e]);n=""===n?r:n+p("0",7-r.length)+r}return n};r({target:"Number",proto:!0,forced:s((function(){return"0.000"!==y(8e-5,3)||"1"!==y(.9,0)||"1.25"!==y(1.255,2)||"1000000000000000128"!==y(0xde0b6b3a7640080,0)}))||!s((function(){y({})}))},{toFixed:function(t){var e,n,r,o,i=u(this),c=a(t),s=[0,0,0,0,0,0],h="",y="0";if(c<0||c>20)throw f("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return l(i);if(i<0&&(h="-",i=-i),i>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(i*v(2,69,1))-69)<0?i*v(2,-e,1):i/v(2,e,1),n*=4503599627370496,(e=52-e)>0){for(g(s,0,n),r=c;r>=7;)g(s,1e7,0),r-=7;for(g(s,v(10,r,1),0),r=e-1;r>=23;)m(s,1<<23),r-=23;m(s,1<<r),g(s,1,1),m(s,2),y=b(s)}else g(s,0,n),g(s,1<<-e,0),y=b(s)+p("0",c);return y=c>0?h+((o=y.length)<=c?"0."+p("0",c-o)+y:d(y,0,o-c)+"."+d(y,o-c)):h+y}})},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(3),a=n(147),u=o(1..toPrecision);r({target:"Number",proto:!0,forced:i((function(){return"1"!==u(1,void 0)}))||!i((function(){u({})}))},{toPrecision:function(t){return void 0===t?u(a(this)):u(a(this),t)}})},function(t,e,n){var r=n(0),o=n(191);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,e,n){n(0)({target:"Object",stat:!0,sham:!n(7)},{create:n(35)})},function(t,e,n){"use strict";var r=n(0),o=n(7),i=n(105),a=n(22),u=n(13),c=n(12);o&&r({target:"Object",proto:!0,forced:i},{__defineGetter__:function(t,e){c.f(u(this),t,{get:a(e),enumerable:!0,configurable:!0})}})},function(t,e,n){var r=n(0),o=n(7);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperties:n(132)})},function(t,e,n){var r=n(0),o=n(7);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:n(12).f})},function(t,e,n){"use strict";var r=n(0),o=n(7),i=n(105),a=n(22),u=n(13),c=n(12);o&&r({target:"Object",proto:!0,forced:i},{__defineSetter__:function(t,e){c.f(u(this),t,{set:a(e),enumerable:!0,configurable:!0})}})},function(t,e,n){var r=n(0),o=n(192).entries;r({target:"Object",stat:!0},{entries:function(t){return o(t)}})},function(t,e,n){var r=n(0),o=n(83),i=n(3),a=n(5),u=n(59).onFreeze,c=Object.freeze;r({target:"Object",stat:!0,forced:i((function(){c(1)})),sham:!o},{freeze:function(t){return c&&a(t)?c(u(t)):t}})},function(t,e,n){var r=n(0),o=n(53),i=n(52);r({target:"Object",stat:!0},{fromEntries:function(t){var e={};return o(t,(function(t,n){i(e,t,n)}),{AS_ENTRIES:!0}),e}})},function(t,e,n){var r=n(0),o=n(3),i=n(23),a=n(21).f,u=n(7),c=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!u||c,sham:!u},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}})},function(t,e,n){var r=n(0),o=n(7),i=n(128),a=n(23),u=n(21),c=n(52);r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),o=u.f,s=i(r),f={},l=0;s.length>l;)void 0!==(n=o(r,e=s[l++]))&&c(f,e,n);return f}})},function(t,e,n){var r=n(0),o=n(3),i=n(133).f;r({target:"Object",stat:!0,forced:o((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:i})},function(t,e,n){var r=n(0),o=n(3),i=n(13),a=n(33),u=n(134);r({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!u},{getPrototypeOf:function(t){return a(i(t))}})},function(t,e,n){n(0)({target:"Object",stat:!0},{hasOwn:n(14)})},function(t,e,n){n(0)({target:"Object",stat:!0},{is:n(193)})},function(t,e,n){var r=n(0),o=n(101);r({target:"Object",stat:!0,forced:Object.isExtensible!==o},{isExtensible:o})},function(t,e,n){var r=n(0),o=n(3),i=n(5),a=n(26),u=n(145),c=Object.isFrozen;r({target:"Object",stat:!0,forced:o((function(){c(1)}))||u},{isFrozen:function(t){return!i(t)||(!(!u||"ArrayBuffer"!=a(t))||!!c&&c(t))}})},function(t,e,n){var r=n(0),o=n(3),i=n(5),a=n(26),u=n(145),c=Object.isSealed;r({target:"Object",stat:!0,forced:o((function(){c(1)}))||u},{isSealed:function(t){return!i(t)||(!(!u||"ArrayBuffer"!=a(t))||!!c&&c(t))}})},function(t,e,n){var r=n(0),o=n(13),i=n(77);r({target:"Object",stat:!0,forced:n(3)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},function(t,e,n){"use strict";var r=n(0),o=n(7),i=n(105),a=n(13),u=n(49),c=n(33),s=n(21).f;o&&r({target:"Object",proto:!0,forced:i},{__lookupGetter__:function(t){var e,n=a(this),r=u(t);do{if(e=s(n,r))return e.get}while(n=c(n))}})},function(t,e,n){"use strict";var r=n(0),o=n(7),i=n(105),a=n(13),u=n(49),c=n(33),s=n(21).f;o&&r({target:"Object",proto:!0,forced:i},{__lookupSetter__:function(t){var e,n=a(this),r=u(t);do{if(e=s(n,r))return e.set}while(n=c(n))}})},function(t,e,n){var r=n(0),o=n(5),i=n(59).onFreeze,a=n(83),u=n(3),c=Object.preventExtensions;r({target:"Object",stat:!0,forced:u((function(){c(1)})),sham:!a},{preventExtensions:function(t){return c&&o(t)?c(i(t)):t}})},function(t,e,n){var r=n(0),o=n(5),i=n(59).onFreeze,a=n(83),u=n(3),c=Object.seal;r({target:"Object",stat:!0,forced:u((function(){c(1)})),sham:!a},{seal:function(t){return c&&o(t)?c(i(t)):t}})},function(t,e,n){n(0)({target:"Object",stat:!0},{setPrototypeOf:n(43)})},function(t,e,n){var r=n(131),o=n(16),i=n(379);r||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e,n){"use strict";var r=n(131),o=n(57);t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,e,n){var r=n(0),o=n(192).values;r({target:"Object",stat:!0},{values:function(t){return o(t)}})},function(t,e,n){var r=n(0),o=n(189);r({global:!0,forced:parseFloat!=o},{parseFloat:o})},function(t,e,n){var r=n(0),o=n(190);r({global:!0,forced:parseInt!=o},{parseInt:o})},function(t,e,n){"use strict";var r,o,i,a,u=n(0),c=n(32),s=n(1),f=n(24),l=n(11),h=n(194),p=n(16),d=n(65),y=n(43),v=n(36),g=n(64),m=n(22),b=n(10),w=n(5),x=n(54),_=n(93),k=n(53),A=n(96),S=n(66),O=n(149).set,E=n(196),P=n(197),j=n(386),M=n(106),R=n(150),T=n(18),I=n(76),C=n(6),z=n(387),B=n(63),L=n(50),D=C("species"),F=T.get,N=T.set,U=T.getterFor("Promise"),Y=h&&h.prototype,G=h,H=Y,W=s.TypeError,V=s.document,X=s.process,q=M.f,K=q,Q=!!(V&&V.createEvent&&s.dispatchEvent),J=b(s.PromiseRejectionEvent),Z=!1,$=I("Promise",(function(){var t=_(G),e=t!==String(G);if(!e&&66===L)return!0;if(c&&!H.finally)return!0;if(L>=51&&/native code/.test(t))return!1;var n=new G((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[D]=r,!(Z=n.then((function(){}))instanceof r)||!e&&z&&!J})),tt=$||!A((function(t){G.all(t).catch((function(){}))})),et=function(t){var e;return!(!w(t)||!b(e=t.then))&&e},nt=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;E((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var a,u,c,s=n[i++],f=o?s.ok:s.fail,h=s.resolve,p=s.reject,d=s.domain;try{f?(o||(2===t.rejection&&at(t),t.rejection=1),!0===f?a=r:(d&&d.enter(),a=f(r),d&&(d.exit(),c=!0)),a===s.promise?p(W("Promise-chain cycle")):(u=et(a))?l(u,a,h,p):h(a)):p(r)}catch(t){d&&!c&&d.exit(),p(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&ot(t)}))}},rt=function(t,e,n){var r,o;Q?((r=V.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),s.dispatchEvent(r)):r={promise:e,reason:n},!J&&(o=s["on"+t])?o(r):"unhandledrejection"===t&&j("Unhandled promise rejection",n)},ot=function(t){l(O,s,(function(){var e,n=t.facade,r=t.value;if(it(t)&&(e=R((function(){B?X.emit("unhandledRejection",r,n):rt("unhandledrejection",n,r)})),t.rejection=B||it(t)?2:1,e.error))throw e.value}))},it=function(t){return 1!==t.rejection&&!t.parent},at=function(t){l(O,s,(function(){var e=t.facade;B?X.emit("rejectionHandled",e):rt("rejectionhandled",e,t.value)}))},ut=function(t,e,n){return function(r){t(e,r,n)}},ct=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,nt(t,!0))},st=function t(e,n,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===n)throw W("Promise can't be resolved itself");var o=et(n);o?E((function(){var r={done:!1};try{l(o,n,ut(t,r,e),ut(ct,r,e))}catch(t){ct(r,t,e)}})):(e.value=n,e.state=1,nt(e,!1))}catch(t){ct({done:!1},t,e)}}};if($&&(H=(G=function(t){x(this,H),m(t),l(r,this);var e=F(this);try{t(ut(st,e),ut(ct,e))}catch(t){ct(e,t)}}).prototype,(r=function(t){N(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(H,{then:function(t,e){var n=U(this),r=n.reactions,o=q(S(this,G));return o.ok=!b(t)||t,o.fail=b(e)&&e,o.domain=B?X.domain:void 0,n.parent=!0,r[r.length]=o,0!=n.state&&nt(n,!1),o.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=F(t);this.promise=t,this.resolve=ut(st,e),this.reject=ut(ct,e)},M.f=q=function(t){return t===G||t===i?new o(t):K(t)},!c&&b(h)&&Y!==Object.prototype)){a=Y.then,Z||(p(Y,"then",(function(t,e){var n=this;return new G((function(t,e){l(a,n,t,e)})).then(t,e)}),{unsafe:!0}),p(Y,"catch",H.catch,{unsafe:!0}));try{delete Y.constructor}catch(t){}y&&y(Y,H)}u({global:!0,wrap:!0,forced:$},{Promise:G}),v(G,"Promise",!1,!0),g("Promise"),i=f("Promise"),u({target:"Promise",stat:!0,forced:$},{reject:function(t){var e=q(this);return l(e.reject,void 0,t),e.promise}}),u({target:"Promise",stat:!0,forced:c||$},{resolve:function(t){return P(c&&this===i?G:this,t)}}),u({target:"Promise",stat:!0,forced:tt},{all:function(t){var e=this,n=q(e),r=n.resolve,o=n.reject,i=R((function(){var n=m(e.resolve),i=[],a=0,u=1;k(t,(function(t){var c=a++,s=!1;u++,l(n,e,t).then((function(t){s||(s=!0,i[c]=t,--u||r(i))}),o)})),--u||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=q(e),r=n.reject,o=R((function(){var o=m(e.resolve);k(t,(function(t){l(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},function(t,e,n){var r=n(40),o=n(1);t.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==o.Pebble},function(t,e,n){var r=n(40);t.exports=/web0s(?!.*chrome)/i.test(r)},function(t,e,n){var r=n(1);t.exports=function(t,e){var n=r.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports="object"==("undefined"==typeof window?"undefined":n(window))},function(t,e,n){"use strict";var r=n(0),o=n(11),i=n(22),a=n(106),u=n(150),c=n(53);r({target:"Promise",stat:!0},{allSettled:function(t){var e=this,n=a.f(e),r=n.resolve,s=n.reject,f=u((function(){var n=i(e.resolve),a=[],u=0,s=1;c(t,(function(t){var i=u++,c=!1;s++,o(n,e,t).then((function(t){c||(c=!0,a[i]={status:"fulfilled",value:t},--s||r(a))}),(function(t){c||(c=!0,a[i]={status:"rejected",reason:t},--s||r(a))}))})),--s||r(a)}));return f.error&&s(f.value),n.promise}})},function(t,e,n){"use strict";var r=n(0),o=n(22),i=n(24),a=n(11),u=n(106),c=n(150),s=n(53);r({target:"Promise",stat:!0},{any:function(t){var e=this,n=i("AggregateError"),r=u.f(e),f=r.resolve,l=r.reject,h=c((function(){var r=o(e.resolve),i=[],u=0,c=1,h=!1;s(t,(function(t){var o=u++,s=!1;c++,a(r,e,t).then((function(t){s||h||(h=!0,f(t))}),(function(t){s||h||(s=!0,i[o]=t,--c||l(new n(i,"No one promise resolved")))}))})),--c||l(new n(i,"No one promise resolved"))}));return h.error&&l(h.value),r.promise}})},function(t,e,n){"use strict";var r=n(0),o=n(32),i=n(194),a=n(3),u=n(24),c=n(10),s=n(66),f=n(197),l=n(16);if(r({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){i.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=s(this,u("Promise")),n=c(t);return this.then(n?function(n){return f(e,t()).then((function(){return n}))}:t,n?function(n){return f(e,t()).then((function(){throw n}))}:t)}}),!o&&c(i)){var h=u("Promise").prototype.finally;i.prototype.finally!==h&&l(i.prototype,"finally",h,{unsafe:!0})}},function(t,e,n){var r=n(0),o=n(34),i=n(22),a=n(4);r({target:"Reflect",stat:!0,forced:!n(3)((function(){Reflect.apply((function(){}))}))},{apply:function(t,e,n){return o(i(t),e,a(n))}})},function(t,e,n){var r=n(0),o=n(24),i=n(34),a=n(186),u=n(142),c=n(4),s=n(5),f=n(35),l=n(3),h=o("Reflect","construct"),p=Object.prototype,d=[].push,y=l((function(){function t(){}return!(h((function(){}),[],t)instanceof t)})),v=!l((function(){h((function(){}))})),g=y||v;r({target:"Reflect",stat:!0,forced:g,sham:g},{construct:function(t,e){u(t),c(e);var n=arguments.length<3?t:u(arguments[2]);if(v&&!y)return h(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 i(d,r,e),new(i(a,t,r))}var o=n.prototype,l=f(s(o)?o:p),g=i(t,l,e);return s(g)?g:l}})},function(t,e,n){var r=n(0),o=n(7),i=n(4),a=n(49),u=n(12);r({target:"Reflect",stat:!0,forced:n(3)((function(){Reflect.defineProperty(u.f({},1,{value:1}),1,{value:2})})),sham:!o},{defineProperty:function(t,e,n){i(t);var r=a(e);i(n);try{return u.f(t,r,n),!0}catch(t){return!1}}})},function(t,e,n){var r=n(0),o=n(4),i=n(21).f;r({target:"Reflect",stat:!0},{deleteProperty:function(t,e){var n=i(o(t),e);return!(n&&!n.configurable)&&delete t[e]}})},function(t,e,n){var r=n(0),o=n(11),i=n(5),a=n(4),u=n(198),c=n(21),s=n(33);r({target:"Reflect",stat:!0},{get:function t(e,n){var r,f,l=arguments.length<3?e:arguments[2];return a(e)===l?e[n]:(r=c.f(e,n))?u(r)?r.value:void 0===r.get?void 0:o(r.get,l):i(f=s(e))?t(f,n,l):void 0}})},function(t,e,n){var r=n(0),o=n(7),i=n(4),a=n(21);r({target:"Reflect",stat:!0,sham:!o},{getOwnPropertyDescriptor:function(t,e){return a.f(i(t),e)}})},function(t,e,n){var r=n(0),o=n(4),i=n(33);r({target:"Reflect",stat:!0,sham:!n(134)},{getPrototypeOf:function(t){return i(o(t))}})},function(t,e,n){n(0)({target:"Reflect",stat:!0},{has:function(t,e){return e in t}})},function(t,e,n){var r=n(0),o=n(4),i=n(101);r({target:"Reflect",stat:!0},{isExtensible:function(t){return o(t),i(t)}})},function(t,e,n){n(0)({target:"Reflect",stat:!0},{ownKeys:n(128)})},function(t,e,n){var r=n(0),o=n(24),i=n(4);r({target:"Reflect",stat:!0,sham:!n(83)},{preventExtensions:function(t){i(t);try{var e=o("Object","preventExtensions");return e&&e(t),!0}catch(t){return!1}}})},function(t,e,n){var r=n(0),o=n(11),i=n(4),a=n(5),u=n(198),c=n(3),s=n(12),f=n(21),l=n(33),h=n(38);r({target:"Reflect",stat:!0,forced:c((function(){var t=function(){},e=s.f(new t,"a",{configurable:!0});return!1!==Reflect.set(t.prototype,"a",1,e)}))},{set:function t(e,n,r){var c,p,d,y=arguments.length<4?e:arguments[3],v=f.f(i(e),n);if(!v){if(a(p=l(e)))return t(p,n,r,y);v=h(0)}if(u(v)){if(!1===v.writable||!a(y))return!1;if(c=f.f(y,n)){if(c.get||c.set||!1===c.writable)return!1;c.value=r,s.f(y,n,c)}else s.f(y,n,h(0,r))}else{if(void 0===(d=v.set))return!1;o(d,y,r)}return!0}})},function(t,e,n){var r=n(0),o=n(4),i=n(175),a=n(43);a&&r({target:"Reflect",stat:!0},{setPrototypeOf:function(t,e){o(t),i(e);try{return a(t,e),!0}catch(t){return!1}}})},function(t,e,n){var r=n(0),o=n(1),i=n(36);r({global:!0},{Reflect:{}}),i(o.Reflect,"Reflect",!0)},function(t,e,n){var r=n(7),o=n(1),i=n(2),a=n(76),u=n(102),c=n(27),s=n(12).f,f=n(51).f,l=n(31),h=n(84),p=n(8),d=n(68),y=n(107),v=n(16),g=n(3),m=n(14),b=n(18).enforce,w=n(64),x=n(6),_=n(151),k=n(199),A=x("match"),S=o.RegExp,O=S.prototype,E=o.SyntaxError,P=i(d),j=i(O.exec),M=i("".charAt),R=i("".replace),T=i("".indexOf),I=i("".slice),C=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,z=/a/g,B=/a/g,L=new S(z)!==z,D=y.MISSED_STICKY,F=y.UNSUPPORTED_Y,N=r&&(!L||D||_||k||g((function(){return B[A]=!1,S(z)!=z||S(B)==B||"/a/i"!=S(z,"i")})));if(a("RegExp",N)){for(var U=function(t,e){var n,r,o,i,a,s,f=l(O,this),d=h(t),y=void 0===e,v=[],g=t;if(!f&&d&&y&&t.constructor===U)return t;if((d||l(O,t))&&(t=t.source,y&&(e="flags"in g?g.flags:P(g))),t=void 0===t?"":p(t),e=void 0===e?"":p(e),g=t,_&&"dotAll"in z&&(r=!!e&&T(e,"s")>-1)&&(e=R(e,/s/g,"")),n=e,D&&"sticky"in z&&(o=!!e&&T(e,"y")>-1)&&F&&(e=R(e,/y/g,"")),k&&(t=(i=function(t){for(var e,n=t.length,r=0,o="",i=[],a={},u=!1,c=!1,s=0,f="";r<=n;r++){if("\\"===(e=M(t,r)))e+=M(t,++r);else if("]"===e)u=!1;else if(!u)switch(!0){case"["===e:u=!0;break;case"("===e:j(C,I(t,r+1))&&(r+=2,c=!0),o+=e,s++;continue;case">"===e&&c:if(""===f||m(a,f))throw new E("Invalid capture group name");a[f]=!0,i[i.length]=[f,s],c=!1,f="";continue}c?f+=e:o+=e}return[o,i]}(t))[0],v=i[1]),a=u(S(t,e),f?this:O,U),(r||o||v.length)&&(s=b(a),r&&(s.dotAll=!0,s.raw=U(function(t){for(var e,n=t.length,r=0,o="",i=!1;r<=n;r++)"\\"!==(e=M(t,r))?i||"."!==e?("["===e?i=!0:"]"===e&&(i=!1),o+=e):o+="[\\s\\S]":o+=e+M(t,++r);return o}(t),n)),o&&(s.sticky=!0),v.length&&(s.groups=v)),t!==g)try{c(a,"source",""===g?"(?:)":g)}catch(t){}return a},Y=function(t){t in U||s(U,t,{configurable:!0,get:function(){return S[t]},set:function(e){S[t]=e}})},G=f(S),H=0;G.length>H;)Y(G[H++]);O.constructor=U,U.prototype=O,v(o,"RegExp",U)}w("RegExp")},function(t,e,n){var r=n(1),o=n(7),i=n(151),a=n(26),u=n(12).f,c=n(18).get,s=RegExp.prototype,f=r.TypeError;o&&i&&u(s,"dotAll",{configurable:!0,get:function(){if(this!==s){if("RegExp"===a(this))return!!c(this).dotAll;throw f("Incompatible receiver, RegExp required")}}})},function(t,e,n){var r=n(7),o=n(12),i=n(68),a=n(3),u=RegExp.prototype;r&&a((function(){return"sy"!==Object.getOwnPropertyDescriptor(u,"flags").get.call({dotAll:!0,sticky:!0})}))&&o.f(u,"flags",{configurable:!0,get:i})},function(t,e,n){var r=n(1),o=n(7),i=n(107).MISSED_STICKY,a=n(26),u=n(12).f,c=n(18).get,s=RegExp.prototype,f=r.TypeError;o&&i&&u(s,"sticky",{configurable:!0,get:function(){if(this!==s){if("RegExp"===a(this))return!!c(this).sticky;throw f("Incompatible receiver, RegExp required")}}})},function(t,e,n){"use strict";n(152);var r,o,i=n(0),a=n(1),u=n(11),c=n(2),s=n(10),f=n(5),l=(r=!1,(o=/[ac]/).exec=function(){return r=!0,/./.exec.apply(this,arguments)},!0===o.test("abc")&&r),h=a.Error,p=c(/./.test);i({target:"RegExp",proto:!0,forced:!l},{test:function(t){var e=this.exec;if(!s(e))return p(this,t);var n=u(e,this,t);if(null!==n&&!f(n))throw new h("RegExp exec method returned something other than an Object or null");return!!n}})},function(t,e,n){"use strict";var r=n(2),o=n(55).PROPER,i=n(16),a=n(4),u=n(31),c=n(8),s=n(3),f=n(68),l=RegExp.prototype,h=l.toString,p=r(f),d=s((function(){return"/a/b"!=h.call({source:"a",flags:"b"})})),y=o&&"toString"!=h.name;(d||y)&&i(RegExp.prototype,"toString",(function(){var t=a(this),e=c(t.source),n=t.flags;return"/"+e+"/"+c(void 0===n&&u(l,t)&&!("flags"in l)?p(t):n)}),{unsafe:!0})},function(t,e,n){"use strict";n(100)("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(187))},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(17),a=n(19),u=n(8),c=n(3),s=o("".charAt);r({target:"String",proto:!0,forced:c((function(){return"\ud842"!=="𠮷".at(0)}))},{at:function(t){var e=u(i(this)),n=e.length,r=a(t),o=r>=0?r:n+r;return o<0||o>=n?void 0:s(e,o)}})},function(t,e,n){"use strict";var r=n(0),o=n(109).codeAt;r({target:"String",proto:!0},{codePointAt:function(t){return o(this,t)}})},function(t,e,n){"use strict";var r,o=n(0),i=n(2),a=n(21).f,u=n(28),c=n(8),s=n(153),f=n(17),l=n(154),h=n(32),p=i("".endsWith),d=i("".slice),y=Math.min,v=l("endsWith");o({target:"String",proto:!0,forced:!!(h||v||(r=a(String.prototype,"endsWith"),!r||r.writable))&&!v},{endsWith:function(t){var e=c(f(this));s(t);var n=arguments.length>1?arguments[1]:void 0,r=e.length,o=void 0===n?r:y(u(n),r),i=c(t);return p?p(e,i,o):d(e,o-i.length,o)===i}})},function(t,e,n){var r=n(0),o=n(1),i=n(2),a=n(42),u=o.RangeError,c=String.fromCharCode,s=String.fromCodePoint,f=i([].join);r({target:"String",stat:!0,forced:!!s&&1!=s.length},{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,o=0;r>o;){if(e=+arguments[o++],a(e,1114111)!==e)throw u(e+" is not a valid code point");n[o]=e<65536?c(e):c(55296+((e-=65536)>>10),e%1024+56320)}return f(n,"")}})},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(153),a=n(17),u=n(8),c=n(154),s=o("".indexOf);r({target:"String",proto:!0,forced:!c("includes")},{includes:function(t){return!!~s(u(a(this)),u(i(t)),arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(11),o=n(110),i=n(4),a=n(28),u=n(8),c=n(17),s=n(41),f=n(111),l=n(85);o("match",(function(t,e,n){return[function(e){var n=c(this),o=null==e?void 0:s(e,t);return o?r(o,e,n):new RegExp(e)[t](u(n))},function(t){var r=i(this),o=u(t),c=n(e,r,o);if(c.done)return c.value;if(!r.global)return l(r,o);var s=r.unicode;r.lastIndex=0;for(var h,p=[],d=0;null!==(h=l(r,o));){var y=u(h[0]);p[d]=y,""===y&&(r.lastIndex=f(o,a(r.lastIndex),s)),d++}return 0===d?null:p}]}))},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(11),a=n(2),u=n(138),c=n(17),s=n(28),f=n(8),l=n(4),h=n(26),p=n(31),d=n(84),y=n(68),v=n(41),g=n(16),m=n(3),b=n(6),w=n(66),x=n(111),_=n(85),k=n(18),A=n(32),S=b("matchAll"),O=k.set,E=k.getterFor("RegExp String Iterator"),P=RegExp.prototype,j=o.TypeError,M=a(y),R=a("".indexOf),T=a("".matchAll),I=!!T&&!m((function(){T("a",/./)})),C=u((function(t,e,n,r){O(this,{type:"RegExp String Iterator",regexp:t,string:e,global:n,unicode:r,done:!1})}),"RegExp String",(function(){var t=E(this);if(t.done)return{value:void 0,done:!0};var e=t.regexp,n=t.string,r=_(e,n);return null===r?{value:void 0,done:t.done=!0}:t.global?(""===f(r[0])&&(e.lastIndex=x(n,s(e.lastIndex),t.unicode)),{value:r,done:!1}):(t.done=!0,{value:r,done:!1})})),z=function(t){var e,n,r,o,i,a,u=l(this),c=f(t);return e=w(u,RegExp),void 0===(n=u.flags)&&p(P,u)&&!("flags"in P)&&(n=M(u)),r=void 0===n?"":f(n),o=new e(e===RegExp?u.source:u,r),i=!!~R(r,"g"),a=!!~R(r,"u"),o.lastIndex=s(u.lastIndex),new C(o,c,i,a)};r({target:"String",proto:!0,forced:I},{matchAll:function(t){var e,n,r,o,a=c(this);if(null!=t){if(d(t)&&(e=f(c("flags"in P?t.flags:M(t))),!~R(e,"g")))throw j("`.matchAll` does not allow non-global regexes");if(I)return T(a,t);if(void 0===(r=v(t,S))&&A&&"RegExp"==h(t)&&(r=z),r)return i(r,t,a)}else if(I)return T(a,t);return n=f(a),o=new RegExp(t,"g"),A?i(z,o,n):o[S](n)}}),A||S in P||g(P,S,z)},function(t,e,n){"use strict";var r=n(0),o=n(143).end;r({target:"String",proto:!0,forced:n(201)},{padEnd:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0),o=n(143).start;r({target:"String",proto:!0,forced:n(201)},{padStart:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(0),o=n(2),i=n(23),a=n(13),u=n(8),c=n(15),s=o([].push),f=o([].join);r({target:"String",stat:!0},{raw:function(t){for(var e=i(a(t).raw),n=c(e),r=arguments.length,o=[],l=0;n>l;){if(s(o,u(e[l++])),l===n)return f(o,"");l<r&&s(o,u(arguments[l]))}}})},function(t,e,n){n(0)({target:"String",proto:!0},{repeat:n(144)})},function(t,e,n){"use strict";var r=n(34),o=n(11),i=n(2),a=n(110),u=n(3),c=n(4),s=n(10),f=n(19),l=n(28),h=n(8),p=n(17),d=n(111),y=n(41),v=n(202),g=n(85),m=n(6)("replace"),b=Math.max,w=Math.min,x=i([].concat),_=i([].push),k=i("".indexOf),A=i("".slice),S="$0"==="a".replace(/./,"$0"),O=!!/./[m]&&""===/./[m]("a","$0");a("replace",(function(t,e,n){var i=O?"$":"$0";return[function(t,n){var r=p(this),i=null==t?void 0:y(t,m);return i?o(i,t,r,n):o(e,h(r),t,n)},function(t,o){var a=c(this),u=h(t);if("string"==typeof o&&-1===k(o,i)&&-1===k(o,"$<")){var p=n(e,a,u,o);if(p.done)return p.value}var y=s(o);y||(o=h(o));var m=a.global;if(m){var S=a.unicode;a.lastIndex=0}for(var O=[];;){var E=g(a,u);if(null===E)break;if(_(O,E),!m)break;""===h(E[0])&&(a.lastIndex=d(u,l(a.lastIndex),S))}for(var P,j="",M=0,R=0;R<O.length;R++){for(var T=h((E=O[R])[0]),I=b(w(f(E.index),u.length),0),C=[],z=1;z<E.length;z++)_(C,void 0===(P=E[z])?P:String(P));var B=E.groups;if(y){var L=x([T],C,I,u);void 0!==B&&_(L,B);var D=h(r(o,void 0,L))}else D=v(T,u,I,C,B,o);I>=M&&(j+=A(u,M,I)+D,M=I+T.length)}return j+A(u,M)}]}),!!u((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!S||O)},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(11),a=n(2),u=n(17),c=n(10),s=n(84),f=n(8),l=n(41),h=n(68),p=n(202),d=n(6),y=n(32),v=d("replace"),g=RegExp.prototype,m=o.TypeError,b=a(h),w=a("".indexOf),x=a("".replace),_=a("".slice),k=Math.max,A=function(t,e,n){return n>t.length?-1:""===e?n:w(t,e,n)};r({target:"String",proto:!0},{replaceAll:function(t,e){var n,r,o,a,h,d,S,O,E,P=u(this),j=0,M=0,R="";if(null!=t){if((n=s(t))&&(r=f(u("flags"in g?t.flags:b(t))),!~w(r,"g")))throw m("`.replaceAll` does not allow non-global regexes");if(o=l(t,v))return i(o,t,P,e);if(y&&n)return x(f(P),t,e)}for(a=f(P),h=f(t),(d=c(e))||(e=f(e)),S=h.length,O=k(1,S),j=A(a,h,0);-1!==j;)E=d?f(e(h,j,a)):p(h,a,j,[],void 0,e),R+=_(a,M,j)+E,M=j+S,j=A(a,h,j+O);return M<a.length&&(R+=_(a,M)),R}})},function(t,e,n){"use strict";var r=n(11),o=n(110),i=n(4),a=n(17),u=n(193),c=n(8),s=n(41),f=n(85);o("search",(function(t,e,n){return[function(e){var n=a(this),o=null==e?void 0:s(e,t);return o?r(o,e,n):new RegExp(e)[t](c(n))},function(t){var r=i(this),o=c(t),a=n(e,r,o);if(a.done)return a.value;var s=r.lastIndex;u(s,0)||(r.lastIndex=0);var l=f(r,o);return u(r.lastIndex,s)||(r.lastIndex=s),null===l?-1:l.index}]}))},function(t,e,n){"use strict";var r=n(34),o=n(11),i=n(2),a=n(110),u=n(84),c=n(4),s=n(17),f=n(66),l=n(111),h=n(28),p=n(8),d=n(41),y=n(62),v=n(85),g=n(108),m=n(107),b=n(3),w=m.UNSUPPORTED_Y,x=Math.min,_=[].push,k=i(/./.exec),A=i(_),S=i("".slice);a("split",(function(t,e,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var i=p(s(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===t)return[i];if(!u(t))return o(e,i,t,a);for(var c,f,l,h=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,m=new RegExp(t.source,d+"g");(c=o(g,m,i))&&!((f=m.lastIndex)>v&&(A(h,S(i,v,c.index)),c.length>1&&c.index<i.length&&r(_,h,y(c,1)),l=c[0].length,v=f,h.length>=a));)m.lastIndex===c.index&&m.lastIndex++;return v===i.length?!l&&k(m,"")||A(h,""):A(h,S(i,v)),h.length>a?y(h,0,a):h}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:o(e,this,t,n)}:e,[function(e,n){var r=s(this),a=null==e?void 0:d(e,t);return a?o(a,e,r,n):o(i,p(r),e,n)},function(t,r){var o=c(this),a=p(t),u=n(i,o,a,r,i!==e);if(u.done)return u.value;var s=f(o,RegExp),d=o.unicode,y=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(w?"g":"y"),g=new s(w?"^(?:"+o.source+")":o,y),m=void 0===r?4294967295:r>>>0;if(0===m)return[];if(0===a.length)return null===v(g,a)?[a]:[];for(var b=0,_=0,k=[];_<a.length;){g.lastIndex=w?0:_;var O,E=v(g,w?S(a,_):a);if(null===E||(O=x(h(g.lastIndex+(w?_:0)),a.length))===b)_=l(a,_,d);else{if(A(k,S(a,b,_)),k.length===m)return k;for(var P=1;P<=E.length-1;P++)if(A(k,E[P]),k.length===m)return k;_=b=O}}return A(k,S(a,b)),k}]}),!!b((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),w)},function(t,e,n){"use strict";var r,o=n(0),i=n(2),a=n(21).f,u=n(28),c=n(8),s=n(153),f=n(17),l=n(154),h=n(32),p=i("".startsWith),d=i("".slice),y=Math.min,v=l("startsWith");o({target:"String",proto:!0,forced:!!(h||v||(r=a(String.prototype,"startsWith"),!r||r.writable))&&!v},{startsWith:function(t){var e=c(f(this));s(t);var n=u(y(arguments.length>1?arguments[1]:void 0,e.length)),r=c(t);return p?p(e,r,n):d(e,n,n+r.length)===r}})},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(17),a=n(19),u=n(8),c=o("".slice),s=Math.max,f=Math.min;r({target:"String",proto:!0,forced:!"".substr||"b"!=="ab".substr(-1)},{substr:function(t,e){var n,r,o=u(i(this)),l=o.length,h=a(t);return h===1/0&&(h=0),h<0&&(h=s(l+h,0)),(n=void 0===e?l:a(e))<=0||n===1/0||h>=(r=f(h+n,l))?"":c(o,h,r)}})},function(t,e,n){"use strict";var r=n(0),o=n(67).trim;r({target:"String",proto:!0,forced:n(155)("trim")},{trim:function(){return o(this)}})},function(t,e,n){"use strict";var r=n(0),o=n(67).end,i=n(155)("trimEnd"),a=i?function(){return o(this)}:"".trimEnd;r({target:"String",proto:!0,name:"trimEnd",forced:i},{trimEnd:a,trimRight:a})},function(t,e,n){"use strict";var r=n(0),o=n(67).start,i=n(155)("trimStart"),a=i?function(){return o(this)}:"".trimStart;r({target:"String",proto:!0,name:"trimStart",forced:i},{trimStart:a,trimLeft:a})},function(t,e,n){"use strict";var r=n(0),o=n(29);r({target:"String",proto:!0,forced:n(30)("anchor")},{anchor:function(t){return o(this,"a","name",t)}})},function(t,e,n){"use strict";var r=n(0),o=n(29);r({target:"String",proto:!0,forced:n(30)("big")},{big:function(){return o(this,"big","","")}})},function(t,e,n){"use strict";var r=n(0),o=n(29);r({target:"String",proto:!0,forced:n(30)("blink")},{blink:function(){return o(this,"blink","","")}})},function(t,e,n){"use strict";var r=n(0),o=n(29);r({target:"String",proto:!0,forced:n(30)("bold")},{bold:function(){return o(this,"b","","")}})},function(t,e,n){"use strict";var r=n(0),o=n(29);r({target:"String",proto:!0,forced:n(30)("fixed")},{fixed:function(){return o(this,"tt","","")}})},function(t,e,n){"use strict";var r=n(0),o=n(29);r({target:"String",proto:!0,forced:n(30)("fontcolor")},{fontcolor:function(t){return o(this,"font","color",t)}})},function(t,e,n){"use strict";var r=n(0),o=n(29);r({target:"String",proto:!0,forced:n(30)("fontsize")},{fontsize:function(t){return o(this,"font","size",t)}})},function(t,e,n){"use strict";var r=n(0),o=n(29);r({target:"String",proto:!0,forced:n(30)("italics")},{italics:function(){return o(this,"i","","")}})},function(t,e,n){"use strict";var r=n(0),o=n(29);r({target:"String",proto:!0,forced:n(30)("link")},{link:function(t){return o(this,"a","href",t)}})},function(t,e,n){"use strict";var r=n(0),o=n(29);r({target:"String",proto:!0,forced:n(30)("small")},{small:function(){return o(this,"small","","")}})},function(t,e,n){"use strict";var r=n(0),o=n(29);r({target:"String",proto:!0,forced:n(30)("strike")},{strike:function(){return o(this,"strike","","")}})},function(t,e,n){"use strict";var r=n(0),o=n(29);r({target:"String",proto:!0,forced:n(30)("sub")},{sub:function(){return o(this,"sub","","")}})},function(t,e,n){"use strict";var r=n(0),o=n(29);r({target:"String",proto:!0,forced:n(30)("sup")},{sup:function(){return o(this,"sup","","")}})},function(t,e,n){n(46)("Float32",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){var r=n(1),o=n(19),i=r.RangeError;t.exports=function(t){var e=o(t);if(e<0)throw i("The argument can't be less than 0");return e}},function(t,e,n){n(46)("Float64",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(46)("Int8",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(46)("Int16",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(46)("Int32",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(46)("Uint8",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(46)("Uint8",(function(t){return function(e,n,r){return t(this,e,n,r)}}),!0)},function(t,e,n){n(46)("Uint16",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(46)("Uint32",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){"use strict";var r=n(9),o=n(15),i=n(19),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("at",(function(t){var e=a(this),n=o(e),r=i(t),u=r>=0?r:n+r;return u<0||u>=n?void 0:e[u]}))},function(t,e,n){"use strict";var r=n(2),o=n(9),i=r(n(177)),a=o.aTypedArray;(0,o.exportTypedArrayMethod)("copyWithin",(function(t,e){return i(a(this),t,e,arguments.length>2?arguments[2]:void 0)}))},function(t,e,n){"use strict";var r=n(9),o=n(20).every,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("every",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(9),o=n(11),i=n(136),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("fill",(function(t){var e=arguments.length;return o(i,a(this),t,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}))},function(t,e,n){"use strict";var r=n(9),o=n(20).filter,i=n(460),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("filter",(function(t){var e=o(a(this),t,arguments.length>1?arguments[1]:void 0);return i(this,e)}))},function(t,e,n){var r=n(461),o=n(112);t.exports=function(t,e){return r(o(t),e)}},function(t,e){t.exports=function(t,e){for(var n=0,r=e.length,o=new t(r);r>n;)o[n]=e[n++];return o}},function(t,e,n){"use strict";var r=n(9),o=n(20).find,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("find",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(9),o=n(20).findIndex,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("findIndex",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(9),o=n(20).forEach,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("forEach",(function(t){o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(156);(0,n(9).exportTypedArrayStaticMethod)("from",n(204),r)},function(t,e,n){"use strict";var r=n(9),o=n(75).includes,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("includes",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(9),o=n(75).indexOf,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("indexOf",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(1),o=n(2),i=n(55).PROPER,a=n(9),u=n(97),c=n(6)("iterator"),s=r.Uint8Array,f=o(u.values),l=o(u.keys),h=o(u.entries),p=a.aTypedArray,d=a.exportTypedArrayMethod,y=s&&s.prototype[c],v=!!y&&"values"===y.name,g=function(){return f(p(this))};d("entries",(function(){return h(p(this))})),d("keys",(function(){return l(p(this))})),d("values",g,i&&!v),d(c,g,i&&!v)},function(t,e,n){"use strict";var r=n(9),o=n(2),i=r.aTypedArray,a=r.exportTypedArrayMethod,u=o([].join);a("join",(function(t){return u(i(this),t)}))},function(t,e,n){"use strict";var r=n(9),o=n(34),i=n(182),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",(function(t){var e=arguments.length;return o(i,a(this),e>1?[t,arguments[1]]:[t])}))},function(t,e,n){"use strict";var r=n(9),o=n(20).map,i=n(112),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("map",(function(t){return o(a(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(i(t))(e)}))}))},function(t,e,n){"use strict";var r=n(9),o=n(156),i=r.aTypedArrayConstructor;(0,r.exportTypedArrayStaticMethod)("of",(function(){for(var t=0,e=arguments.length,n=new(i(this))(e);e>t;)n[t]=arguments[t++];return n}),o)},function(t,e,n){"use strict";var r=n(9),o=n(98).left,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduce",(function(t){var e=arguments.length;return o(i(this),t,e,e>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(9),o=n(98).right,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduceRight",(function(t){var e=arguments.length;return o(i(this),t,e,e>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(9),o=r.aTypedArray,i=r.exportTypedArrayMethod,a=Math.floor;i("reverse",(function(){for(var t,e=o(this).length,n=a(e/2),r=0;r<n;)t=this[r],this[r++]=this[--e],this[e]=t;return this}))},function(t,e,n){"use strict";var r=n(1),o=n(9),i=n(15),a=n(203),u=n(13),c=n(3),s=r.RangeError,f=o.aTypedArray;(0,o.exportTypedArrayMethod)("set",(function(t){f(this);var e=a(arguments.length>1?arguments[1]:void 0,1),n=this.length,r=u(t),o=i(r),c=0;if(o+e>n)throw s("Wrong length");for(;c<o;)this[e+c]=r[c++]}),c((function(){new Int8Array(1).set({})})))},function(t,e,n){"use strict";var r=n(9),o=n(112),i=n(3),a=n(58),u=r.aTypedArray;(0,r.exportTypedArrayMethod)("slice",(function(t,e){for(var n=a(u(this),t,e),r=o(this),i=0,c=n.length,s=new r(c);c>i;)s[i]=n[i++];return s}),i((function(){new Int8Array(1).slice()})))},function(t,e,n){"use strict";var r=n(9),o=n(20).some,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("some",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(1),o=n(2),i=n(3),a=n(22),u=n(139),c=n(9),s=n(183),f=n(184),l=n(50),h=n(140),p=r.Array,d=c.aTypedArray,y=c.exportTypedArrayMethod,v=r.Uint16Array,g=v&&o(v.prototype.sort),m=!(!g||i((function(){g(new v(2),null)}))&&i((function(){g(new v(2),{})}))),b=!!g&&!i((function(){if(l)return l<74;if(s)return s<67;if(f)return!0;if(h)return h<602;var t,e,n=new v(516),r=p(516);for(t=0;t<516;t++)e=t%4,n[t]=515-t,r[t]=t-2*e+3;for(g(n,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(n[t]!==r[t])return!0}));y("sort",(function(t){return void 0!==t&&a(t),b?g(this,t):u(d(this),function(t){return function(e,n){return void 0!==t?+t(e,n)||0:n!=n?-1:e!=e?1:0===e&&0===n?1/e>0&&1/n<0?1:-1:e>n}}(t))}),!b||m)},function(t,e,n){"use strict";var r=n(9),o=n(28),i=n(42),a=n(112),u=r.aTypedArray;(0,r.exportTypedArrayMethod)("subarray",(function(t,e){var n=u(this),r=n.length,c=i(t,r);return new(a(n))(n.buffer,n.byteOffset+c*n.BYTES_PER_ELEMENT,o((void 0===e?r:i(e,r))-c))}))},function(t,e,n){"use strict";var r=n(1),o=n(34),i=n(9),a=n(3),u=n(58),c=r.Int8Array,s=i.aTypedArray,f=i.exportTypedArrayMethod,l=[].toLocaleString,h=!!c&&a((function(){l.call(new c(1))}));f("toLocaleString",(function(){return o(l,h?u(s(this)):s(this),u(arguments))}),a((function(){return[1,2].toLocaleString()!=new c([1,2]).toLocaleString()}))||!a((function(){c.prototype.toLocaleString.call([1,2])})))},function(t,e,n){"use strict";var r=n(9).exportTypedArrayMethod,o=n(3),i=n(1),a=n(2),u=i.Uint8Array,c=u&&u.prototype||{},s=[].toString,f=a([].join);o((function(){s.call({})}))&&(s=function(){return f(this)});var l=c.toString!=s;r("toString",s,l)},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(8),a=String.fromCharCode,u=o("".charAt),c=o(/./.exec),s=o("".slice),f=/^[\da-f]{2}$/i,l=/^[\da-f]{4}$/i;r({global:!0},{unescape:function(t){for(var e,n,r=i(t),o="",h=r.length,p=0;p<h;){if("%"===(e=u(r,p++)))if("u"===u(r,p)){if(n=s(r,p+1,p+5),c(l,n)){o+=a(parseInt(n,16)),p+=5;continue}}else if(n=s(r,p,p+2),c(f,n)){o+=a(parseInt(n,16)),p+=2;continue}o+=e}return o}})},function(t,e,n){"use strict";var r,o=n(1),i=n(2),a=n(65),u=n(59),c=n(100),s=n(205),f=n(5),l=n(101),h=n(18).enforce,p=n(170),d=!o.ActiveXObject&&"ActiveXObject"in o,y=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},v=c("WeakMap",y,s);if(p&&d){r=s.getConstructor(y,"WeakMap",!0),u.enable();var g=v.prototype,m=i(g.delete),b=i(g.has),w=i(g.get),x=i(g.set);a(g,{delete:function(t){if(f(t)&&!l(t)){var e=h(this);return e.frozen||(e.frozen=new r),m(this,t)||e.frozen.delete(t)}return m(this,t)},has:function(t){if(f(t)&&!l(t)){var e=h(this);return e.frozen||(e.frozen=new r),b(this,t)||e.frozen.has(t)}return b(this,t)},get:function(t){if(f(t)&&!l(t)){var e=h(this);return e.frozen||(e.frozen=new r),b(this,t)?w(this,t):e.frozen.get(t)}return w(this,t)},set:function(t,e){if(f(t)&&!l(t)){var n=h(this);n.frozen||(n.frozen=new r),b(this,t)?x(this,t,e):n.frozen.set(t,e)}else x(this,t,e);return this}})}},function(t,e,n){"use strict";n(100)("WeakSet",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(205))},function(t,e,n){var r=n(1),o=n(206),i=n(207),a=n(179),u=n(27),c=function(t){if(t&&t.forEach!==a)try{u(t,"forEach",a)}catch(e){t.forEach=a}};for(var s in o)o[s]&&c(r[s]&&r[s].prototype);c(i)},function(t,e,n){var r=n(1),o=n(206),i=n(207),a=n(97),u=n(27),c=n(6),s=c("iterator"),f=c("toStringTag"),l=a.values,h=function(t,e){if(t){if(t[s]!==l)try{u(t,s,l)}catch(e){t[s]=l}if(t[f]||u(t,f,e),o[e])for(var n in a)if(t[n]!==a[n])try{u(t,n,a[n])}catch(e){t[n]=a[n]}}};for(var p in o)h(r[p]&&r[p].prototype,p);h(i,"DOMTokenList")},function(t,e,n){var r=n(0),o=n(1),i=n(149);r({global:!0,bind:!0,enumerable:!0,forced:!o.setImmediate||!o.clearImmediate},{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,n){var r=n(0),o=n(1),i=n(196),a=n(63),u=o.process;r({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(t){var e=a&&u.domain;i(e?e.bind(t):t)}})},function(t,e,n){var r=n(0),o=n(1),i=n(34),a=n(10),u=n(40),c=n(58),s=/MSIE .\./.test(u),f=o.Function,l=function(t){return function(e,n){var r=arguments.length>2,o=r?c(arguments,2):void 0;return t(r?function(){i(a(e)?e:f(e),this,o)}:e,n)}};r({global:!0,bind:!0,forced:s},{setTimeout:l(o.setTimeout),setInterval:l(o.setInterval)})},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n(200);var o,i=n(0),a=n(7),u=n(208),c=n(1),s=n(39),f=n(2),l=n(132),h=n(16),p=n(54),d=n(14),y=n(191),v=n(180),g=n(62),m=n(109).codeAt,b=n(492),w=n(8),x=n(36),_=n(209),k=n(18),A=k.set,S=k.getterFor("URL"),O=_.URLSearchParams,E=_.getState,P=c.URL,j=c.TypeError,M=c.parseInt,R=Math.floor,T=Math.pow,I=f("".charAt),C=f(/./.exec),z=f([].join),B=f(1..toString),L=f([].pop),D=f([].push),F=f("".replace),N=f([].shift),U=f("".split),Y=f("".slice),G=f("".toLowerCase),H=f([].unshift),W=/[a-z]/i,V=/[\d+-.a-z]/i,X=/\d/,q=/^0x/i,K=/^[0-7]+$/,Q=/^\d+$/,J=/^[\da-f]+$/i,Z=/[\0\t\n\r #%/:<>?@[\\\]^|]/,$=/[\0\t\n\r #/:<>?@[\\\]^|]/,tt=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,et=/[\t\n\r]/g,nt=function(t){var e,n,o,i;if("number"==typeof t){for(e=[],n=0;n<4;n++)H(e,t%256),t=R(t/256);return z(e,".")}if("object"==r(t)){for(e="",o=function(t){for(var e=null,n=1,r=null,o=0,i=0;i<8;i++)0!==t[i]?(o>n&&(e=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(e=r,n=o),e}(t),n=0;n<8;n++)i&&0===t[n]||(i&&(i=!1),o===n?(e+=n?":":"::",i=!0):(e+=B(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},rt={},ot=y({},rt,{" ":1,'"':1,"<":1,">":1,"`":1}),it=y({},ot,{"#":1,"?":1,"{":1,"}":1}),at=y({},it,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ut=function(t,e){var n=m(t,0);return n>32&&n<127&&!d(e,t)?t:encodeURIComponent(t)},ct={ftp:21,file:null,http:80,https:443,ws:80,wss:443},st=function(t,e){var n;return 2==t.length&&C(W,I(t,0))&&(":"==(n=I(t,1))||!e&&"|"==n)},ft=function(t){var e;return t.length>1&&st(Y(t,0,2))&&(2==t.length||"/"===(e=I(t,2))||"\\"===e||"?"===e||"#"===e)},lt=function(t){return"."===t||"%2e"===G(t)},ht={},pt={},dt={},yt={},vt={},gt={},mt={},bt={},wt={},xt={},_t={},kt={},At={},St={},Ot={},Et={},Pt={},jt={},Mt={},Rt={},Tt={},It=function t(e,n,r){var o,i,a,u=w(e);if(n){if(i=this.parse(u))throw j(i);this.searchParams=null}else{if(void 0!==r&&(o=new t(r,!0)),i=this.parse(u,null,o))throw j(i);(a=E(new O)).bindURL(this),this.searchParams=a}};It.prototype={type:"URL",parse:function(t,e,n){var r,i,a,u,c,s=this,f=e||ht,l=0,h="",p=!1,y=!1,m=!1;for(t=w(t),e||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,t=F(t,tt,"")),t=F(t,et,""),r=v(t);l<=r.length;){switch(i=r[l],f){case ht:if(!i||!C(W,i)){if(e)return"Invalid scheme";f=dt;continue}h+=G(i),f=pt;break;case pt:if(i&&(C(V,i)||"+"==i||"-"==i||"."==i))h+=G(i);else{if(":"!=i){if(e)return"Invalid scheme";h="",f=dt,l=0;continue}if(e&&(s.isSpecial()!=d(ct,h)||"file"==h&&(s.includesCredentials()||null!==s.port)||"file"==s.scheme&&!s.host))return;if(s.scheme=h,e)return void(s.isSpecial()&&ct[s.scheme]==s.port&&(s.port=null));h="","file"==s.scheme?f=St:s.isSpecial()&&n&&n.scheme==s.scheme?f=yt:s.isSpecial()?f=bt:"/"==r[l+1]?(f=vt,l++):(s.cannotBeABaseURL=!0,D(s.path,""),f=Mt)}break;case dt:if(!n||n.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(n.cannotBeABaseURL&&"#"==i){s.scheme=n.scheme,s.path=g(n.path),s.query=n.query,s.fragment="",s.cannotBeABaseURL=!0,f=Tt;break}f="file"==n.scheme?St:gt;continue;case yt:if("/"!=i||"/"!=r[l+1]){f=gt;continue}f=wt,l++;break;case vt:if("/"==i){f=xt;break}f=jt;continue;case gt:if(s.scheme=n.scheme,i==o)s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=g(n.path),s.query=n.query;else if("/"==i||"\\"==i&&s.isSpecial())f=mt;else if("?"==i)s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=g(n.path),s.query="",f=Rt;else{if("#"!=i){s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=g(n.path),s.path.length--,f=jt;continue}s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=g(n.path),s.query=n.query,s.fragment="",f=Tt}break;case mt:if(!s.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,f=jt;continue}f=xt}else f=wt;break;case bt:if(f=wt,"/"!=i||"/"!=I(h,l+1))continue;l++;break;case wt:if("/"!=i&&"\\"!=i){f=xt;continue}break;case xt:if("@"==i){p&&(h="%40"+h),p=!0,a=v(h);for(var b=0;b<a.length;b++){var x=a[b];if(":"!=x||m){var _=ut(x,at);m?s.password+=_:s.username+=_}else m=!0}h=""}else if(i==o||"/"==i||"?"==i||"#"==i||"\\"==i&&s.isSpecial()){if(p&&""==h)return"Invalid authority";l-=v(h).length+1,h="",f=_t}else h+=i;break;case _t:case kt:if(e&&"file"==s.scheme){f=Et;continue}if(":"!=i||y){if(i==o||"/"==i||"?"==i||"#"==i||"\\"==i&&s.isSpecial()){if(s.isSpecial()&&""==h)return"Invalid host";if(e&&""==h&&(s.includesCredentials()||null!==s.port))return;if(u=s.parseHost(h))return u;if(h="",f=Pt,e)return;continue}"["==i?y=!0:"]"==i&&(y=!1),h+=i}else{if(""==h)return"Invalid host";if(u=s.parseHost(h))return u;if(h="",f=At,e==kt)return}break;case At:if(!C(X,i)){if(i==o||"/"==i||"?"==i||"#"==i||"\\"==i&&s.isSpecial()||e){if(""!=h){var k=M(h,10);if(k>65535)return"Invalid port";s.port=s.isSpecial()&&k===ct[s.scheme]?null:k,h=""}if(e)return;f=Pt;continue}return"Invalid port"}h+=i;break;case St:if(s.scheme="file","/"==i||"\\"==i)f=Ot;else{if(!n||"file"!=n.scheme){f=jt;continue}if(i==o)s.host=n.host,s.path=g(n.path),s.query=n.query;else if("?"==i)s.host=n.host,s.path=g(n.path),s.query="",f=Rt;else{if("#"!=i){ft(z(g(r,l),""))||(s.host=n.host,s.path=g(n.path),s.shortenPath()),f=jt;continue}s.host=n.host,s.path=g(n.path),s.query=n.query,s.fragment="",f=Tt}}break;case Ot:if("/"==i||"\\"==i){f=Et;break}n&&"file"==n.scheme&&!ft(z(g(r,l),""))&&(st(n.path[0],!0)?D(s.path,n.path[0]):s.host=n.host),f=jt;continue;case Et:if(i==o||"/"==i||"\\"==i||"?"==i||"#"==i){if(!e&&st(h))f=jt;else if(""==h){if(s.host="",e)return;f=Pt}else{if(u=s.parseHost(h))return u;if("localhost"==s.host&&(s.host=""),e)return;h="",f=Pt}continue}h+=i;break;case Pt:if(s.isSpecial()){if(f=jt,"/"!=i&&"\\"!=i)continue}else if(e||"?"!=i)if(e||"#"!=i){if(i!=o&&(f=jt,"/"!=i))continue}else s.fragment="",f=Tt;else s.query="",f=Rt;break;case jt:if(i==o||"/"==i||"\\"==i&&s.isSpecial()||!e&&("?"==i||"#"==i)){if(".."===(c=G(c=h))||"%2e."===c||".%2e"===c||"%2e%2e"===c?(s.shortenPath(),"/"==i||"\\"==i&&s.isSpecial()||D(s.path,"")):lt(h)?"/"==i||"\\"==i&&s.isSpecial()||D(s.path,""):("file"==s.scheme&&!s.path.length&&st(h)&&(s.host&&(s.host=""),h=I(h,0)+":"),D(s.path,h)),h="","file"==s.scheme&&(i==o||"?"==i||"#"==i))for(;s.path.length>1&&""===s.path[0];)N(s.path);"?"==i?(s.query="",f=Rt):"#"==i&&(s.fragment="",f=Tt)}else h+=ut(i,it);break;case Mt:"?"==i?(s.query="",f=Rt):"#"==i?(s.fragment="",f=Tt):i!=o&&(s.path[0]+=ut(i,rt));break;case Rt:e||"#"!=i?i!=o&&("'"==i&&s.isSpecial()?s.query+="%27":s.query+="#"==i?"%23":ut(i,rt)):(s.fragment="",f=Tt);break;case Tt:i!=o&&(s.fragment+=ut(i,ot))}l++}},parseHost:function(t){var e,n,r;if("["==I(t,0)){if("]"!=I(t,t.length-1))return"Invalid host";if(!(e=function(t){var e,n,r,o,i,a,u,c=[0,0,0,0,0,0,0,0],s=0,f=null,l=0,h=function(){return I(t,l)};if(":"==h()){if(":"!=I(t,1))return;l+=2,f=++s}for(;h();){if(8==s)return;if(":"!=h()){for(e=n=0;n<4&&C(J,h());)e=16*e+M(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,s>6)return;for(r=0;h();){if(o=null,r>0){if(!("."==h()&&r<4))return;l++}if(!C(X,h()))return;for(;C(X,h());){if(i=M(h(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;l++}c[s]=256*c[s]+o,2!=++r&&4!=r||s++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;c[s++]=e}else{if(null!==f)return;l++,f=++s}}if(null!==f)for(a=s-f,s=7;0!=s&&a>0;)u=c[s],c[s--]=c[f+a-1],c[f+--a]=u;else if(8!=s)return;return c}(Y(t,1,-1))))return"Invalid host";this.host=e}else if(this.isSpecial()){if(t=b(t),C(Z,t))return"Invalid host";if(null===(e=function(t){var e,n,r,o,i,a,u,c=U(t,".");if(c.length&&""==c[c.length-1]&&c.length--,(e=c.length)>4)return t;for(n=[],r=0;r<e;r++){if(""==(o=c[r]))return t;if(i=10,o.length>1&&"0"==I(o,0)&&(i=C(q,o)?16:8,o=Y(o,8==i?1:2)),""===o)a=0;else{if(!C(10==i?Q:8==i?K:J,o))return t;a=M(o,i)}D(n,a)}for(r=0;r<e;r++)if(a=n[r],r==e-1){if(a>=T(256,5-e))return null}else if(a>255)return null;for(u=L(n),r=0;r<n.length;r++)u+=n[r]*T(256,3-r);return u}(t)))return"Invalid host";this.host=e}else{if(C($,t))return"Invalid host";for(e="",n=v(t),r=0;r<n.length;r++)e+=ut(n[r],rt);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return d(ct,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"==this.scheme&&1==e&&st(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,n=t.username,r=t.password,o=t.host,i=t.port,a=t.path,u=t.query,c=t.fragment,s=e+":";return null!==o?(s+="//",t.includesCredentials()&&(s+=n+(r?":"+r:"")+"@"),s+=nt(o),null!==i&&(s+=":"+i)):"file"==e&&(s+="//"),s+=t.cannotBeABaseURL?a[0]:a.length?"/"+z(a,"/"):"",null!==u&&(s+="?"+u),null!==c&&(s+="#"+c),s},setHref:function(t){var e=this.parse(t);if(e)throw j(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"==t)try{return new Ct(t.path[0]).origin}catch(t){return"null"}return"file"!=t&&this.isSpecial()?t+"://"+nt(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(w(t)+":",ht)},getUsername:function(){return this.username},setUsername:function(t){var e=v(w(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<e.length;n++)this.username+=ut(e[n],at)}},getPassword:function(){return this.password},setPassword:function(t){var e=v(w(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<e.length;n++)this.password+=ut(e[n],at)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?nt(t):nt(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,_t)},getHostname:function(){var t=this.host;return null===t?"":nt(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,kt)},getPort:function(){var t=this.port;return null===t?"":w(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""==(t=w(t))?this.port=null:this.parse(t,At))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+z(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,Pt))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){""==(t=w(t))?this.query=null:("?"==I(t,0)&&(t=Y(t,1)),this.query="",this.parse(t,Rt)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){""!=(t=w(t))?("#"==I(t,0)&&(t=Y(t,1)),this.fragment="",this.parse(t,Tt)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Ct=function(t){var e=p(this,zt),n=arguments.length>1?arguments[1]:void 0,r=A(e,new It(t,!1,n));a||(e.href=r.serialize(),e.origin=r.getOrigin(),e.protocol=r.getProtocol(),e.username=r.getUsername(),e.password=r.getPassword(),e.host=r.getHost(),e.hostname=r.getHostname(),e.port=r.getPort(),e.pathname=r.getPathname(),e.search=r.getSearch(),e.searchParams=r.getSearchParams(),e.hash=r.getHash())},zt=Ct.prototype,Bt=function(t,e){return{get:function(){return S(this)[t]()},set:e&&function(t){return S(this)[e](t)},configurable:!0,enumerable:!0}};if(a&&l(zt,{href:Bt("serialize","setHref"),origin:Bt("getOrigin"),protocol:Bt("getProtocol","setProtocol"),username:Bt("getUsername","setUsername"),password:Bt("getPassword","setPassword"),host:Bt("getHost","setHost"),hostname:Bt("getHostname","setHostname"),port:Bt("getPort","setPort"),pathname:Bt("getPathname","setPathname"),search:Bt("getSearch","setSearch"),searchParams:Bt("getSearchParams"),hash:Bt("getHash","setHash")}),h(zt,"toJSON",(function(){return S(this).serialize()}),{enumerable:!0}),h(zt,"toString",(function(){return S(this).serialize()}),{enumerable:!0}),P){var Lt=P.createObjectURL,Dt=P.revokeObjectURL;Lt&&h(Ct,"createObjectURL",s(Lt,P)),Dt&&h(Ct,"revokeObjectURL",s(Dt,P))}x(Ct,"URL"),i({global:!0,forced:!u,sham:!a},{URL:Ct})},function(t,e,n){"use strict";var r=n(1),o=n(2),i=/[^\0-\u007E]/,a=/[.\u3002\uFF0E\uFF61]/g,u="Overflow: input needs wider integers to process",c=r.RangeError,s=o(a.exec),f=Math.floor,l=String.fromCharCode,h=o("".charCodeAt),p=o([].join),d=o([].push),y=o("".replace),v=o("".split),g=o("".toLowerCase),m=function(t){return t+22+75*(t<26)},b=function(t,e,n){var r=0;for(t=n?f(t/700):t>>1,t+=f(t/e);t>455;)t=f(t/35),r+=36;return f(r+36*t/(t+38))},w=function(t){var e,n,r=[],o=(t=function(t){for(var e=[],n=0,r=t.length;n<r;){var o=h(t,n++);if(o>=55296&&o<=56319&&n<r){var i=h(t,n++);56320==(64512&i)?d(e,((1023&o)<<10)+(1023&i)+65536):(d(e,o),n--)}else d(e,o)}return e}(t)).length,i=128,a=0,s=72;for(e=0;e<t.length;e++)(n=t[e])<128&&d(r,l(n));var y=r.length,v=y;for(y&&d(r,"-");v<o;){var g=2147483647;for(e=0;e<t.length;e++)(n=t[e])>=i&&n<g&&(g=n);var w=v+1;if(g-i>f((2147483647-a)/w))throw c(u);for(a+=(g-i)*w,i=g,e=0;e<t.length;e++){if((n=t[e])<i&&++a>2147483647)throw c(u);if(n==i){for(var x=a,_=36;;){var k=_<=s?1:_>=s+26?26:_-s;if(x<k)break;var A=x-k,S=36-k;d(r,l(m(k+A%S))),x=f(A/S),_+=36}d(r,l(m(x))),s=b(a,w,v==y),a=0,v++}}a++,i++}return p(r,"")};t.exports=function(t){var e,n,r=[],o=v(y(g(t),a,"."),".");for(e=0;e<o.length;e++)n=o[e],d(r,s(i,n)?"xn--"+w(n):n);return p(r,".")}},function(t,e,n){"use strict";var r=n(0),o=n(11);r({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return o(URL.prototype.toString,this)}})},function(t,e,n){(function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n=function(t){"use strict";var n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.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 s(t,e,n,r){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),a=new A(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=x(a,n);if(u){if(u===l)continue;return u}}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=f(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),i}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function h(){}function p(){}function d(){}var y={};c(y,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(S([])));g&&g!==n&&r.call(g,i)&&(y=g);var m=d.prototype=h.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,n){var o;this._invoke=function(i,a){function u(){return new n((function(o,u){!function o(i,a,u,c){var s=f(t[i],t,a);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"===e(h)&&r.call(h,"__await")?n.resolve(h.__await).then((function(t){o("next",t,u,c)}),(function(t){o("throw",t,u,c)})):n.resolve(h).then((function(t){l.value=t,u(l)}),(function(t){return o("throw",t,u,c)}))}c(s.arg)}(i,a,o,u)}))}return o=o?o.then(u,u):u()}}function x(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,x(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=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function _(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 k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=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 o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=d,c(m,"constructor",d),c(d,"constructor",p),p.displayName=c(d,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(w.prototype),c(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),c(m,u,"Generator"),c(m,i,(function(){return this})),c(m,"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=S,A.prototype={constructor:A,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(k),!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 o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.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),k(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 o=r.arg;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}("object"===e(t)?t.exports:{});try{regeneratorRuntime=n}catch(t){"object"===("undefined"==typeof globalThis?"undefined":e(globalThis))?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}).call(this,n(113)(t))},function(t,e,n){var r=n(496),o=n(48);t.exports=function t(e,n,i,a,u){return e===n||(null==e||null==n||!o(e)&&!o(n)?e!=e&&n!=n:r(e,n,i,a,t,u))}},function(t,e,n){var r=n(210),o=n(215),i=n(530),a=n(533),u=n(88),c=n(69),s=n(119),f=n(159),l="[object Object]",h=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,p,d,y){var v=c(t),g=c(e),m=v?"[object Array]":u(t),b=g?"[object Array]":u(e),w=(m="[object Arguments]"==m?l:m)==l,x=(b="[object Arguments]"==b?l:b)==l,_=m==b;if(_&&s(t)){if(!s(e))return!1;v=!0,w=!1}if(_&&!w)return y||(y=new r),v||f(t)?o(t,e,n,p,d,y):i(t,e,m,n,p,d,y);if(!(1&n)){var k=w&&h.call(t,"__wrapped__"),A=x&&h.call(e,"__wrapped__");if(k||A){var S=k?t.value():t,O=A?e.value():e;return y||(y=new r),d(S,O,n,p,y)}}return!!_&&(y||(y=new r),a(t,e,n,p,d,y))}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(115),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():o.call(e,n,1),--this.size,!0)}},function(t,e,n){var r=n(115);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(115);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(115);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},function(t,e,n){var r=n(114);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(114),o=n(157),i=n(214);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(211),o=n(510),i=n(47),a=n(213),u=/^\[object .+?Constructor\]$/,c=Function.prototype,s=Object.prototype,f=c.toString,l=s.hasOwnProperty,h=RegExp("^"+f.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?h:u).test(a(t))}},function(t,e,n){var r=n(87),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[u]=n:delete t[u]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r,o=n(511),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},function(t,e,n){var r=n(37)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(514),o=n(114),i=n(157);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(t,e,n){var r=n(515),o=n(516),i=n(517),a=n(518),u=n(519);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=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,t.exports=c},function(t,e,n){var r=n(116);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},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(116),o=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 o.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(116),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:o.call(e,t)}},function(t,e,n){var r=n(116);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(117);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){var e=n(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(117);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(117);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(117);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},function(t,e,n){var r=n(214),o=n(526),i=n(527);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,t.exports=a},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(87),o=n(216),i=n(86),a=n(215),u=n(531),c=n(532),s=r?r.prototype:void 0,f=s?s.valueOf:void 0;t.exports=function(t,e,n,r,s,l,h){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!l(new o(t),new o(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var p=u;case"[object Set]":var d=1&r;if(p||(p=c),t.size!=e.size&&!d)return!1;var y=h.get(t);if(y)return y==e;r|=2,h.set(t,e);var v=a(p(t),p(e),r,s,l,h);return h.delete(t),v;case"[object Symbol]":if(f)return f.call(t)==f.call(e)}return!1}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},function(t,e,n){var r=n(217),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,i,a,u){var c=1&n,s=r(t),f=s.length;if(f!=r(e).length&&!c)return!1;for(var l=f;l--;){var h=s[l];if(!(c?h in e:o.call(e,h)))return!1}var p=u.get(t),d=u.get(e);if(p&&d)return p==e&&d==t;var y=!0;u.set(t,e),u.set(e,t);for(var v=c;++l<f;){var g=t[h=s[l]],m=e[h];if(i)var b=c?i(m,g,h,e,t,u):i(g,m,h,t,e,u);if(!(void 0===b?g===m||a(g,m,n,i,u):b)){y=!1;break}v||(v="constructor"==h)}if(y&&!v){var w=t.constructor,x=e.constructor;w==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(y=!1)}return u.delete(t),u.delete(e),y}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(61),o=n(48);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(61),o=n(224),i=n(48),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!a[r(t)]}},function(t,e,n){var r=n(226)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(60)(n(37),"DataView");t.exports=r},function(t,e,n){var r=n(60)(n(37),"Promise");t.exports=r},function(t,e,n){var r=n(60)(n(37),"Set");t.exports=r},function(t,e,n){var r=n(60)(n(37),"WeakMap");t.exports=r},function(t,e,n){var r=n(89),o=n(545),i=n(122),a=o((function(t,e,n,o){r(e,i(e),t,o)}));t.exports=a},function(t,e,n){var r=n(230),o=n(233);t.exports=function(t){return r((function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,u=i>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,u&&o(n[0],n[1],u)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var c=n[r];c&&t(e,c,r,a)}return e}))}},function(t,e,n){var r=n(232),o=Math.max;t.exports=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,a=-1,u=o(i.length-e,0),c=Array(u);++a<u;)c[a]=i[e+a];a=-1;for(var s=Array(e+1);++a<e;)s[a]=i[a];return s[e]=n(c),r(t,this,s)}}},function(t,e,n){var r=n(548),o=n(550)(r);t.exports=o},function(t,e,n){var r=n(549),o=n(229),i=n(231),a=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:i;t.exports=a},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){var n=Date.now;t.exports=function(t){var e=0,r=0;return function(){var o=n(),i=16-(o-r);if(r=o,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(47),o=n(120),i=n(552),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=o(t),n=[];for(var u in t)("constructor"!=u||!e&&a.call(t,u))&&n.push(u);return n}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){var r=n(232),o=n(230),i=n(234),a=o((function(t,e){try{return r(t,void 0,e)}catch(t){return i(t)?t:new Error(t)}}));t.exports=a},function(t,e,n){var r=n(61),o=n(162),i=n(48),a=Function.prototype,u=Object.prototype,c=a.toString,s=u.hasOwnProperty,f=c.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=r(t))return!1;var e=o(t);if(null===e)return!0;var n=s.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==f}},function(t,e,n){var r=n(235);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},function(t,e,n){var r=n(86),o=Object.prototype,i=o.hasOwnProperty;t.exports=function(t,e,n,a){return void 0===t||r(t,o[n])&&!i.call(a,n)?e:t}},function(t,e){var n={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};t.exports=function(t){return"\\"+n[t]}},function(t,e,n){var r=n(559),o={escape:n(563),evaluate:n(564),interpolate:n(236),variable:"",imports:{_:{escape:r}}};t.exports=o},function(t,e,n){var r=n(560),o=n(237),i=/[&<>"']/g,a=RegExp(i.source);t.exports=function(t){return(t=o(t))&&a.test(t)?t.replace(i,r):t}},function(t,e,n){var r=n(561)({"&":"&","<":"<",">":">",'"':""","'":"'"});t.exports=r},function(t,e){t.exports=function(t){return function(e){return null==t?void 0:t[e]}}},function(t,e,n){var r=n(87),o=n(235),i=n(69),a=n(238),u=r?r.prototype:void 0,c=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(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=/<%-([\s\S]+?)%>/g},function(t,e){t.exports=/<%([\s\S]+?)%>/g},function(t,e,n){var r=n(210),o=n(566),i=n(227),a=n(567),u=n(568),c=n(569),s=n(570),f=n(571),l=n(572),h=n(217),p=n(573),d=n(88),y=n(574),v=n(575),g=n(580),m=n(69),b=n(119),w=n(582),x=n(47),_=n(584),k=n(118),A=n(122),S={};S["[object Arguments]"]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S["[object Object]"]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S["[object Function]"]=S["[object WeakMap]"]=!1,t.exports=function t(e,n,O,E,P,j){var M,R=1&n,T=2&n,I=4&n;if(O&&(M=P?O(e,E,P,j):O(e)),void 0!==M)return M;if(!x(e))return e;var C=m(e);if(C){if(M=y(e),!R)return s(e,M)}else{var z=d(e),B="[object Function]"==z||"[object GeneratorFunction]"==z;if(b(e))return c(e,R);if("[object Object]"==z||"[object Arguments]"==z||B&&!P){if(M=T||B?{}:g(e),!R)return T?l(e,u(M,e)):f(e,a(M,e))}else{if(!S[z])return P?e:{};M=v(e,z,R)}}j||(j=new r);var L=j.get(e);if(L)return L;j.set(e,M),_(e)?e.forEach((function(r){M.add(t(r,n,O,r,e,j))})):w(e)&&e.forEach((function(r,o){M.set(o,t(r,n,O,o,e,j))}));var D=C?void 0:(I?T?p:h:T?A:k)(e);return o(D||e,(function(r,o){D&&(r=e[o=r]),i(M,o,t(r,n,O,o,e,j))})),M}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e,n){var r=n(89),o=n(118);t.exports=function(t,e){return t&&r(e,o(e),t)}},function(t,e,n){var r=n(89),o=n(122);t.exports=function(t,e){return t&&r(e,o(e),t)}},function(t,e,n){(function(t){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(37),i="object"==r(e)&&e&&!e.nodeType&&e,a=i&&"object"==r(t)&&t&&!t.nodeType&&t,u=a&&a.exports===i?o.Buffer:void 0,c=u?u.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=c?c(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(113)(t))},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},function(t,e,n){var r=n(89),o=n(158);t.exports=function(t,e){return r(t,o(t),e)}},function(t,e,n){var r=n(89),o=n(240);t.exports=function(t,e){return r(t,o(t),e)}},function(t,e,n){var r=n(218),o=n(240),i=n(122);t.exports=function(t){return r(t,i,o)}},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&n.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},function(t,e,n){var r=n(163),o=n(576),i=n(577),a=n(578),u=n(579);t.exports=function(t,e,n){var c=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return o(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return u(t,n);case"[object Map]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return i(t);case"[object Set]":return new c;case"[object Symbol]":return a(t)}}},function(t,e,n){var r=n(163);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},function(t,e){var n=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,n){var r=n(87),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;t.exports=function(t){return i?Object(i.call(t)):{}}},function(t,e,n){var r=n(163);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){var r=n(581),o=n(162),i=n(120);t.exports=function(t){return"function"!=typeof t.constructor||i(t)?{}:r(o(t))}},function(t,e,n){var r=n(47),o=Object.create,i=function(){function t(){}return function(e){if(!r(e))return{};if(o)return o(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=i},function(t,e,n){var r=n(583),o=n(160),i=n(161),a=i&&i.isMap,u=a?o(a):r;t.exports=u},function(t,e,n){var r=n(88),o=n(48);t.exports=function(t){return o(t)&&"[object Map]"==r(t)}},function(t,e,n){var r=n(585),o=n(160),i=n(161),a=i&&i.isSet,u=a?o(a):r;t.exports=u},function(t,e,n){var r=n(88),o=n(48);t.exports=function(t){return o(t)&&"[object Set]"==r(t)}},function(t,e,n){var r=n(37);t.exports=function(){return r.Date.now()}},function(t,e,n){var r=n(588),o=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(o,""):t}},function(t,e){var n=/\s/;t.exports=function(t){for(var e=t.length;e--&&n.test(t.charAt(e)););return e}},function(t,e,n){var r=n(590);t.exports=function(t,e){var n;if("function"!=typeof e)throw new TypeError("Expected a function");return t=r(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}},function(t,e,n){var r=n(591);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},function(t,e,n){var r=n(241);t.exports=function(t){return t?(t=r(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},function(t,e,n){"use strict";n.r(e),n.d(e,"polyfill",(function(){return c})),n.d(e,"create",(function(){return Bc})),n.d(e,"Model",(function(){return Bh})),n.d(e,"Layer",(function(){return eo})),n.d(e,"EventMap",(function(){return wu})),n.d(e,"NOTHING",(function(){return Jt})),n.d(e,"MODE_VIEW",(function(){return Zt})),n.d(e,"MODE_EDIT",(function(){return $t})),n.d(e,"MODE_SHIFT",(function(){return te})),n.d(e,"MAX_UNDO_SIZE",(function(){return ee})),n.d(e,"DPPX",(function(){return ne})),n.d(e,"GESTURES",(function(){return re})),n.d(e,"KEYEVENTS",(function(){return oe})),n.d(e,"DEFAULT",(function(){return ie})),n.d(e,"Component",(function(){return mn})),n.d(e,"ContainerAbstract",(function(){return Vr})),n.d(e,"Container",(function(){return _i})),n.d(e,"RootContainer",(function(){return Iu})),n.d(e,"Shape",(function(){return Pn})),n.d(e,"Line",(function(){return Jc})),n.d(e,"Ellipse",(function(){return is})),n.d(e,"Rect",(function(){return Io})),n.d(e,"Polygon",(function(){return ds})),n.d(e,"Polyline",(function(){return ks})),n.d(e,"Ruler",(function(){return _o})),n.d(e,"ImageView",(function(){return Cs})),n.d(e,"GifView",(function(){return ef})),n.d(e,"AudioPlayer",(function(){return pf})),n.d(e,"Text",(function(){return xf})),n.d(e,"Group",(function(){return zi})),n.d(e,"LocalRef",(function(){return Tf})),n.d(e,"GlobalRef",(function(){return Zf})),n.d(e,"InfoWindow",(function(){return qn})),n.d(e,"Popup",(function(){return sl})),n.d(e,"HTMLOverlayElement",(function(){return Us})),n.d(e,"HTMLOverlayContainer",(function(){return Nf})),n.d(e,"Path",(function(){return gl})),n.d(e,"Triangle",(function(){return Sl})),n.d(e,"Donut",(function(){return zl})),n.d(e,"Star",(function(){return Wl})),n.d(e,"Variable",(function(){return th})),n.d(e,"RectPath",(function(){return Bn})),n.d(e,"ValueHolder",(function(){return fh})),n.d(e,"DataSource",(function(){return mh})),n.d(e,"MoveHandle",(function(){return Br})),n.d(e,"Layout",(function(){return Zn})),n.d(e,"AbsoluteLayout",(function(){return dr})),n.d(e,"CardLayout",(function(){return gr})),n.d(e,"LinearHorizontalLayout",(function(){return wr})),n.d(e,"LinearVerticalLayout",(function(){return kr})),n.d(e,"TableLayout",(function(){return Sr})),n.d(e,"HTMLAbsoluteLayout",(function(){return tr})),n.d(e,"ReferenceMap",(function(){return _h})),n.d(e,"ScriptLoader",(function(){return Mh})),n.d(e,"error",(function(){return pe})),n.d(e,"warn",(function(){return de})),n.d(e,"debug",(function(){return ye})),n.d(e,"Scene",(function(){return zc})),n.d(e,"version",(function(){return Rh})),n.d(e,"FPS",(function(){return zh})),n.d(e,"license",(function(){return Lh}));var r={};n.r(r),n.d(r,"insertAt",(function(){return R})),n.d(r,"append",(function(){return T})),n.d(r,"prepend",(function(){return I})),n.d(r,"remove",(function(){return C})),n.d(r,"getAt",(function(){return z})),n.d(r,"forEach",(function(){return B})),n.d(r,"indexOf",(function(){return L})),n.d(r,"size",(function(){return D})),n.d(r,"clear",(function(){return F})),n.d(r,"moveForward",(function(){return N})),n.d(r,"moveBackward",(function(){return U})),n.d(r,"moveToHead",(function(){return Y})),n.d(r,"moveToTail",(function(){return G}));var o={};n.r(o),n.d(o,"push",(function(){return H})),n.d(o,"pop",(function(){return W}));var i={};n.r(i),n.d(i,"intercept",(function(){return ve})),n.d(i,"reset",(function(){return ge})),n.d(i,"clear",(function(){return me}));var a={};n.r(a),n.d(a,"hide",(function(){return fr})),n.d(a,"show",(function(){return lr}));var u={};n.r(u),n.d(u,"compile",(function(){return pa})),n.d(u,"duplicate",(function(){return Ja})),n.d(u,"select",(function(){return g})),n.d(u,"match",(function(){return y}));n(247),n(494);var c="done";"function"!=typeof Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var o in r)r.hasOwnProperty(o)&&(e[o]=r[o])}return e}),"function"!=typeof Object.values&&(Object.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e}),"function"!=typeof Object.keys&&(Object.values=function(t){var e=[];for(var n in t)e.push(n);return e}),"undefined"!=typeof CanvasRenderingContext2D&&null==CanvasRenderingContext2D.prototype.ellipse&&(CanvasRenderingContext2D.prototype.ellipse=function(t,e,n,r,o,i,a,u){this.save(),this.translate(t,e),this.rotate(o),this.translate(-n,-r),this.scale(n,r),this.arc(1,1,1,i,a,u),this.restore()}),function(){for(var t=0,e=["ms","moz","webkit","o"],n=0;n<e.length&&!window.requestAnimationFrame;++n)window.requestAnimationFrame=window[e[n]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[n]+"CancelAnimationFrame"]||window[e[n]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(console.warn("requestAnimationFrame not supported"),window.requestAnimationFrame=function(e,n){var r=performance.now(),o=Math.max(0,33-(r-t)),i=window.setTimeout((function(){e(r+o)}),o);return t=r+o,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}(),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t});var s=n(165),f=n.n(s),l=n(245),h=n.n(l);function p(t,e,n,r){var o=e.get("class");return!!o&&(o.split(" ")||[]).indexOf(t.substr(1))>=0}function d(t,e,n,r){return t==e.get("type")}function y(t,e,n,r){if("(all)"==t)return!0;switch(t.charAt(0)){case"#":return function(t,e,n,r){return t.substr(1)==e.get("id")}(t,e);case".":return p(t,e);case"(":return function(t,e,n,r){switch(t){case"(all)":return!0;case"(self)":return r===e;case"(root)":return!r.parent&&r===e;case"(descendant)":return r!==e;case"(child)":return r===e.parent;default:return!1}}(t,e,0,r);default:return d(t,e)}}function v(t,e,n,r){switch(t){case"(all)":return!0;case"(parent)":return n&&n.parent===e;case"(child)":case"(children)":return n&&n===e.parent;case"(sibling)":case"(siblings)":return n&&n.parent===e.parent&&n!==e;default:return!1}}function g(t,e,n){if("(root)"==t)return[e];if("(self)"==t)return n?[n]:[];var r;switch(t.charAt(0)){case"#":var o=e.root.findById(t.substr(1));return o?[o]:[];case".":r=p;break;case"(":r=v;break;default:r=d}return function t(e,n,r,o,i,a){return e(n,r,o,i)&&a.push(r),r.components&&r.components.forEach((function(r){t(e,n,r,o,i,a)})),a}(r,t,e,n,e,[])}var m=n(239),b=n.n(m),w=n(164),x=n.n(w),_=n(242),k=n.n(_),A=n(243),S=n.n(A),O=n(244),E=n.n(O);function P(t){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var j=0;function M(t){for(;t&&"object"===P(t);){var e=t;for(var n in t){t=t[n];break}if(t===e){t=void 0;break}}return t}function R(t,e){return this.__collection__?(-1==(t=this.__collection__.indexOf(e))&&this.__collection__.splice(t,0,e),this):this}function T(t){return this.__collection__||(this.__collection__=[]),-1==this.__collection__.indexOf(t)&&this.__collection__.push(t),this}function I(t){return this.__collection__||(this.__collection__=[]),-1==this.__collection__.indexOf(t)&&this.__collection__.unshift(t),this}function C(t){if(!this.__collection__)return this;var e=this.__collection__.indexOf(t);return e>=0&&this.__collection__.splice(e,1),this}function z(t){if(this.__collection__)return this.__collection__[t]}function B(t,e){this.__collection__&&this.__collection__.forEach(t,e)}function L(t){if(this.__collection__)return this.__collection__.indexOf(t)}function D(){return this.__collection__?this.__collection__.length:0}function F(){this.__collection__=[]}function N(t){var e=this.indexOf(t);-1!=e&&0!=e&&(this.__collection__[e]=this.__collection__[e-1],this.__collection__[e-1]=t)}function U(t){var e=this.indexOf(t);-1!=e&&e!=this.size()-1&&(this.__collection__[e]=this.__collection__[e+1],this.__collection__[e+1]=t)}function Y(t){var e=this.indexOf(t);if(-1!=e&&0!=e){var n=this.__collection__.splice(0,e),r=this.__collection__.splice(1);this.__collection__=this.__collection__.concat(n,r)}}function G(t){var e=this.indexOf(t);if(-1!=e&&e!=this.size()-1){var n=this.__collection__.splice(0,e),r=this.__collection__.splice(1);this.__collection__=n.concat(r,this.__collection__)}}function H(t){throw new Error("Not Implemented Yet")}function W(t){throw new Error("Not Implemented Yet")}function V(){}function X(t){return(X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}V.prototype=r;var q=/\s+/;function K(t,e,n,r){if(!n)return!0;if("object"==X(n)){for(var o in n){var i=n[o];t[e].apply(t,[o,i])}return!1}return!q.test(n)||(n.split(q).forEach((function(n){return t[e].apply(t,[n].concat(r))})),!1)}var Q=["on","off","once","delegate_on","delegate_off","trigger","listenTo"],J={withEvent:function(){var t=this;Q.forEach((function(e){return t[e]=J[e]}))},on:function(t,e,n){return K(this,"on",t,[e,n])&&e?(this._listeners||(this._listeners={}),(this._listeners[t]||(this._listeners[t]=[])).push({callback:e,context:n,ctx:n||this}),this):this},once:function(t,e,n){if(!K(this,"once",t,[e,n])||!e)return this;var r=this,o=S.a((function(){r.off(t,o),e.apply(r,arguments)}));o._callback=e,this.on(t,o,n)},off:function(t,e,n){if(!this._listeners||!K(this,"off",t,[e,n]))return this;if(!t&&!e&&!n)return this._listeners=void 0,this;var r;r=t?[t]:Object.keys(this._listeners);for(var o=0;o<r.length;o++){var i=r[o],a=this._listeners[i];if(a){var u=[];if(this._listeners[i]=u,e||n)for(var c=0;c<a.length;c++){var s=a[c];(e&&e!==s.callback&&e!==s.callback._callback||n&&n!==s.context)&&u.push(s)}u.length||delete this._listeners[i]}}return this},delegate_on:function(t){return this._delegators||(this._delegators=new V),this._delegators.append(t),this},delegate_off:function(t){return this._delegators?(this._delegators.remove(t),this):this},delegate:function(){if(this._delegators&&this._delegators.size()>0&&$(this._delegators,arguments),!this._listeners)return this;var t=arguments.length-1,e=arguments[t];arguments[t]={origin:e.origin,name:e.name,deliverer:this};var n=this._listeners[e.name],r=this._listeners["(all)"];return n&&Z(n,arguments),r&&Z(r,arguments),this},trigger:function(t){var e=[].slice.call(arguments,1);if(e.push({origin:this,name:t,deliverer:this}),this._delegators&&this._delegators.size()>0&&$(this._delegators,e),!this._listeners)return this;if(!K(this,"trigger",t,e))return this;var n=this._listeners[t],r=this._listeners["(all)"];return n&&Z(n,e),r&&Z(r,e),this},stopListening:function(t,e,n){var r=this._listeningTo;if(!r)return this;var o=!e&&!n;for(var i in n||"object"!=X(e)||(n=this),t&&((r={})[t._listenId]=t),r){var a=r[i];a.off(e,n,this),(o||E.a(a._events))&&delete this._listeningTo[i]}return this}};function Z(t,e){t.forEach((function(t){return t.callback.apply(t.ctx,e)}))}function $(t,e){t.forEach((function(t){return J.delegate.apply(t,e)}))}var tt={listenTo:"on",listenToOnce:"once"};for(var et in tt){var nt=tt[et];J[et]=function(t,e,n){this._listeningTo||(this._listeningTo={});var r=this._listeningTo;return t._listenId||(t._listenId="".concat("l"||"").concat(++j)),r[t._listenId]=t,n||"object"!=X(e)||(n=this),t[nt](e,n,this),this}}var rt=J;function ot(t,e){if(e instanceof Array)e.forEach((function(e){return ot(t,e)}));else{if(t.mixedIn=t.hasOwnProperty("mixedIn")?t.mixedIn:[],t.mixingIn=t.hasOwnProperty("mixingIn")?t.mixingIn:[],t.mixedIn.indexOf(e)>=0)return t;if(t.mixingIn.indexOf(e)>=0)throw new Error("found cyclic dependencies between ".concat(t.mixingIn));t.mixingIn.push(e),e.call(t),t.mixingIn.pop(),t.mixedIn.push(e)}return t}var it={linear:function(t){return t},quad:function(t){return Math.pow(t,2)},circ:function(t){return 1-Math.sin(Math.acos(t))},back:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{x:1.5};return Math.pow(t,2)*((e.x+1)*t-e.x)},bounce:function(t){for(var e=0,n=1;;e+=n,n/=2)if(t>=(7-4*e)/11)return-Math.pow((11-6*e-11*t)/4,2)+Math.pow(n,2)},elastic:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{x:1.5};return Math.pow(2,10*(t-1))*Math.cos(20*Math.PI*e.x/3*t)}};function at(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)}}var ut=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.client=e,this.config=n,this._started=!1;var r=this.config,o=r.delta,i=void 0===o?"linear":o,a=r.options,u=r.ease;"string"==typeof i&&(i=it[i]),this.delta="out"==u?function(t,e){return function(n){return 1-t(1-n,e)}}(i,a):"inout"==u?function(t,e){return function(n){return n<.5?t(2*n,e)/2:(2-t(2*(1-n),e))/2}}(i,a):i,this.init()}var e,n,r;return e=t,(n=[{key:"dispose",value:function(){this.stop(),delete this.client}},{key:"init",value:function(){}},{key:"start",value:function(){var t=this;if(!this._started){var e=this.config,n=e.duration,r=void 0===n?2e3:n,o=e.delay,i=void 0===o?0:o,a=e.repeat,u=void 0!==a&&a;this._started=!0;var c=0,s=r+i;this._raf=requestAnimationFrame((function e(){if(t._started){0==c&&(c=performance.now(),t.client.touch());var n=performance.now()-c,o=Math.max(n%s-i,0)/r;t.step(t.delta(o)),t.client&&t.client.invalidate(),!(n>=s)||u&&t._started||(t.step(1),t.stop(),c=0),t._started&&(t._raf=requestAnimationFrame(e))}}))}}},{key:"stop",value:function(){this._raf&&cancelAnimationFrame(this._raf),this._raf=null,this._started=!1}},{key:"started",get:function(){return this._started},set:function(t){this.started!=!!t&&(t?this.start():this.stop())}}])&&at(e.prototype,n),r&&at(e,r),t}();function ct(t){return(ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function st(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ft(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 lt(t,e){return(lt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ht(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=dt(t);if(e){var o=dt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return pt(this,n)}}function pt(t,e){if(e&&("object"===ct(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 dt(t){return(dt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function yt(t){return(yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gt(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 mt(t,e){return(mt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function bt(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=xt(t);if(e){var o=xt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wt(this,n)}}function wt(t,e){if(e&&("object"===yt(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 xt(t){return(xt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _t(t){return(_t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function kt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function At(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 St(t,e){return(St=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ot(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=Pt(t);if(e){var o=Pt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Et(this,n)}}function Et(t,e){if(e&&("object"===_t(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 Pt(t){return(Pt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function jt(t){return(jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Mt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rt(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 Tt(t,e){return(Tt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function It(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=zt(t);if(e){var o=zt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ct(this,n)}}function Ct(t,e){if(e&&("object"===jt(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 zt(t){return(zt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Bt(t){return(Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Lt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dt(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 Ft(t,e){return(Ft=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Nt(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=Yt(t);if(e){var o=Yt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ut(this,n)}}function Ut(t,e){if(e&&("object"===Bt(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 Yt(t){return(Yt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Gt(t){return(Gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ht(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wt(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 Vt(t,e){return(Vt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Xt(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=Kt(t);if(e){var o=Kt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return qt(this,n)}}function qt(t,e){if(e&&("object"===Gt(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 Kt(t){return(Kt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Qt={rotation:function(t){!function(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&<(t,e)}(i,t);var e,n,r,o=ht(i);function i(){return st(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"step",value:function(t){var e=this.config.theta,n=void 0===e?6.28:e;this.client.delta("theta",t*n)}}])&&ft(e.prototype,n),r&&ft(e,r),i}(ut),vibration:function(t){!function(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&&mt(t,e)}(i,t);var e,n,r,o=bt(i);function i(){return vt(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"step",value:function(t){var e=this.config.theta,n=void 0===e?.2617993877991494:e,r=4*n,o=t*r;t<1/4?o*=-1:t<3/4?o-=2*n:o=r-o,this.client.delta("theta",o)}}])&>(e.prototype,n),r&>(e,r),i}(ut),heartbeat:function(t){!function(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&&St(t,e)}(i,t);var e,n,r,o=Ot(i);function i(){return kt(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"step",value:function(t){var e,n=this.config.scale,r=2*((void 0===n?1.3:n)-1);e=t<.5?1+r*t:1+(1-t)*r,this.client.delta("sx",e),this.client.delta("sy",e)}}])&&At(e.prototype,n),r&&At(e,r),i}(ut),moving:function(t){!function(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&&Tt(t,e)}(i,t);var e,n,r,o=It(i);function i(){return Mt(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"step",value:function(t){var e=this.config,n=e.x,r=void 0===n?0:n,o=e.y,i=void 0===o?0:o;this.client.delta("tx",t*r),this.client.delta("ty",t*i)}}])&&Rt(e.prototype,n),r&&Rt(e,r),i}(ut),outline:function(t){!function(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&&Ft(t,e)}(i,t);var e,n,r,o=Nt(i);function i(){return Lt(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"step",value:function(t){var e=this.config.rideOn,n=this.client;if(e&&n&&n.root){var r=n.center,o=n.root.findById(e);if(o){var i=o.outline(t);r=n.transcoordS2T(r.x,r.y),o&&(n.delta("tx",i.x-r.x),n.delta("ty",i.y-r.y))}}}}])&&Dt(e.prototype,n),r&&Dt(e,r),i}(ut),fade:function(t){!function(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&&Vt(t,e)}(i,t);var e,n,r,o=Xt(i);function i(){return Ht(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"step",value:function(t){var e,n=this.config,r=n.startAlpha,o=void 0===r?1:r,i=n.endAlpha,a=void 0===i?0:i,u=Math.max(Math.min(o,a,1),0),c=2*(Math.min(Math.max(o,a,1),1)-u);e=t<.5?c*t:(1-t)*c,this.client.delta("fade",e)}}])&&Wt(e.prototype,n),r&&Wt(e,r),i}(ut)};var Jt={},Zt=0,$t=1,te=2,ee=30,ne="undefined"==typeof window?1:window.devicePixelRatio||(window.matchMedia&&window.matchMedia("(min-resolution: 2dppx), (-webkit-min-device-pixel-ratio: 1.5),(-moz-min-device-pixel-ratio: 1.5),(min-device-pixel-ratio: 1.5)").matches?2:1)||1,re=["mousemove","mouseup","mousedown","mouseout","wheel","click","touchstart","touchmove","touchend","dblclick"],oe=["keydown","keyup"],ie={ALPHA:1,FONT_SIZE:15,FONT_FAMILY:"serif",FONT_COLOR:"black",TEXT_ALIGN:"center",TEXT_BASELINE:"middle",TEXT_WRAP:!1,BOLD:!1,ITALIC:!1,STROKE_STYLE:"#999",LINE_DASH:"solid"},ae={x:1,y:1};function ue(t,e,n){var r=e.left,o=void 0===r?0:r,i=e.top,a=void 0===i?0:i,u=e.blurSize,c=void 0===u?0:u,s=e.color,f=void 0===s?"transparent":s,l=n.rootModel.get("scale")||ae;t.shadowOffsetX=o*l.x*ne,t.shadowOffsetY=a*l.y*ne,t.shadowBlur=c*l.x*ne,t.shadowColor=f}var ce={gradation:function(t,e,n){n.type;var r=n.subType,o=n.from,i=n.to,a=n.colors;switch(r){case"linear":var u=e.createLinearGradient(o.x,o.y,i.x,i.y);break;case"radial":u=e.createRadialGradient(o.x,o.y,o.r,i.x,i.y,i.r);break;default:u=e.createLinearGradient(o.x,o.y,i.x,i.y)}a&&(a.forEach((function(t){u.addColorStop(t.endPoint,t.color)})),e.fillStyle=u,e.fill())},shadow:ue};"undefined"==typeof window||window;var se,fe="[ERROR]",le="[WARN]",he="[DEBUG]",pe=function(){for(var t,e=[],n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];r.forEach((function(t){return t&&t.stack&&e.push(t.stack)})),(t=console).error.apply(t,[fe].concat(r,[e.join(" ")]))},de=function(){for(var t,e=[],n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];r.forEach((function(t){return t&&t.stack&&e.push(t.stack)})),(t=console).warn.apply(t,[le].concat(r,[e.join(" ")]))},ye=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=console).log.apply(t,[he].concat(n))};function ve(t,e,n){var r=t.__lookupGetter__(e);r?n?t.__defineGetter__(e,(function(){return void 0===this.__cache__[e]&&(this.__cache__[e]=r.call(this)),b.a(this.__cache__[e])})):t.__defineGetter__(e,(function(){return void 0===this.__cache__[e]&&(this.__cache__[e]=r.call(this)),this.__cache__[e]})):pe("".concat(e," is not defined in ").concat(t.constructor.name))}function ge(t){t.__cache__={}}function me(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];0==n.length?t.__cache__={}:n.forEach((function(e){return delete t.__cache__[e]}))}function be(t){var e=t.duration,n=void 0===e?1e3:e,r=(t.delay,t.step),o=t.delta,i=t.ease,a=t.options,u=t.repeat,c=void 0!==u&&u;"string"==typeof o&&(o=it[o]),"out"==i?o=function(t,e){return function(n){return 1-t(1-n,e)}}(o,a):"inout"==i&&(o=function(t,e){return function(n){return n<.5?t(2*n,e)/2:(2-t(2*(1-n),e))/2}}(o,a));var s=!1;return{start:function(){var t=this;if(s)return this;s=!0;var e=0;return requestAnimationFrame((function i(){if(s){0==e&&(e=performance.now());var u=(performance.now()-e)/n,f=c?u%1:Math.min(u,1);r(o(f,a)),!(u>=1)||c&&s||(t.stop(),e=0),s&&requestAnimationFrame(i)}})),this},stop:function(){return s=!1,this}}}function we(t){return(we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function xe(t,e,n,r,o){var i=r.alpha,a=void 0===i?1:i,u=o.fillStyle;if(t.globalAlpha*=a,u)if("string"==typeof u)t.fillStyle=u,t.fill();else if("object"==we(u))if("gradient"==u.type){t.translate(n.x,n.y);var c,s=e.width,f=e.height;if("linear"==u.gradientType){var l=3.141592653589793,h=u.rotation;if(h>=.436332&&h<=1.13446||h>=2.00713&&h<=2.70526||h>=3.57792&&h<=4.27606||h>=5.14872&&h<=5.84685){var p=Math.sqrt(Math.pow((s-4)/2,2)+Math.pow((f-4)/2,2));p-=p-(s+f)/3,c=t.createLinearGradient(p*Math.cos(h+l),p*Math.sin(h+l),p*Math.cos(h),p*Math.sin(h))}else c=t.createLinearGradient((s-4)/2*Math.cos(h+l),(f-4)/2*Math.sin(h+l),(s-4)/2*Math.cos(h),(f-4)/2*Math.sin(h))}else if("radial"==u.gradientType){var d=.95*Math.sqrt(Math.pow((s-4)/2,2)+Math.pow((f-4)/2,2));switch(u.center){case"center":c=t.createRadialGradient(0,0,0,0,0,d);break;case"left-top":c=t.createRadialGradient(-s/2,-f/2,0,-s/2,-f/2,2*d);break;case"right-top":c=t.createRadialGradient(s/2,-f/2,0,s/2,-f/2,2*d);break;case"left-bottom":c=t.createRadialGradient(-s/2,f/2,0,-s/2,f/2,2*d);break;case"right-bottom":c=t.createRadialGradient(s/2,f/2,0,s/2,f/2,2*d);break;default:c=t.createRadialGradient(0,0,0,0,0,d)}}u.colorStops.forEach((function(t){if(t.position>=0&&t.position<=1)try{c.addColorStop(t.position,t.color)}catch(e){de("Invalid Color for colorstop : ",t.color),c.addColorStop(t.position,"#fff")}})),t.fillStyle=c,t.fill(),t.translate(-n.x,-n.y)}else if("pattern"==u.type&&u.image){o.prepareFillIf(!o._pattern_image_origin);var y=o._pattern_image;if(!y)return;var v=0,g=0,m=0,b=0,w=e.left,x=e.top;if(!u.fitPattern){switch(v=u.offsetX,g=u.offsetY,u.align){case"center":m=e.width/2-(u.width?u.width/2:0),b=e.height/2+(u.height?u.height/2:0);break;case"left-top":break;case"left-bottom":b=u.height?e.height%u.height:e.height;break;case"right-top":m=u.width?e.width%u.width:e.width;break;case"right-bottom":m=u.width?e.width%u.width:e.width,b=u.height?e.height%u.height:e.height;break;case"left":b=e.height/2+(u.height?u.height/2:0);break;case"right":m=u.width?e.width%u.width:e.width,b=e.height/2+(u.height?u.height/2:0);break;case"top":m=e.width/2-(u.width?u.width/2:0);break;case"bottom":m=e.width/2-(u.width?u.width/2:0),b=u.height?e.height%u.height:e.height}w+=v+m,x+=g+b}t.translate(w,x),u.fitPattern?Math.abs((y.width-e.width)*(y.height-e.height))>1?(delete o._pattern_image,delete o._pattern_image_origin):t.fillStyle=t.createPattern(y,"no-repeat"):t.fillStyle=t.createPattern(y,"repeat"),t.fill(),t.translate(-w,-x)}}function _e(t,e,n){var r=e.strokeStyle,o=e.lineDash,i=e.lineWidth,a=e.lineCap,u=e.lineJoin,c=e.alpha;if(r&&0!=i){if(a&&(t.lineCap=a),o){var s="round"==a;switch(o){case"solid":o=[0,0];break;case"round-dot":o=s?[0,2*i]:[i,i];break;case"square-dot":o=s?[i,2*i]:[2*i,i];break;case"dash":o=s?[3*i,2.5*i]:[4*i,1.5*i];break;case"dash-dot":o=s?[3*i,3*i,0,3*i]:[4*i,2*i,i,2*i];break;case"long-dash":o=s?[5*i,4*i]:[6*i,3*i];break;case"long-dash-dot":o=s?[5*i,3*i,0,3*i]:[6*i,2*i,i,2*i];break;case"long-dash-dot-dot":o=s?[5*i,2*i,0,2*i,0,2*i]:[6*i,i,i,i,i,i]}t.setLineDash(o)}t.globalAlpha*=c,t.strokeStyle=r,t.lineWidth=i,t.lineJoin=u,t.stroke()}}function ke(t,e,n){if(e.length<2)return e;for(var r=2;r<e.length;r++){var o=e.substring(0,r);if(!(t.measureText(o).width<n))break}return e.substring(0,r-1)}function Ae(t,e,n,r){var o=String(e).split("\n");return r?[].concat.apply([],o.map((function(e){return function(t,e,n){var r,o,i=e.split(" "),a=[],u=[];for(r=0,o=1;o<=i.length;o++)if(u=i.slice(r,o),t.measureText(u.join(" ")).width>n){if(o-r==1){var c=ke(t,u[0],n);a.push([c]),i.splice(r,1,c,u[0].substring(c.length))}else{for(;""==i[o-1];)o++;a.push(i.slice(r,--o))}r=o}return o-r>1&&a.push(u),0==a.length&&a.push([""]),a}(t,e,n)}))):o.map((function(t){return t.split(" ")}))}function Se(t,e,n,r,o){if(!r)return[];t.save(),t.font=n;var i=Ae(t,r,e,!!o);return t.restore(),i}function Oe(t){var e=t.fontFamily,n=void 0===e?ie.FONT_FAMILY:e,r=t.bold,o=void 0===r?ie.BOLD:r,i=t.italic,a=void 0===i?ie.ITALIC:i,u=t.fontSize,c=void 0===u?ie.FONT_SIZE:u,s=[];return o&&s.push("bold"),a&&s.push("italic"),s.push(c+"px"),s.push(n),s.join(" ")}function Ee(t,e,n,r){var o=r.alpha,i=void 0===o?ie.FONT_COLOR:o,a=r.fontColor,u=void 0===a?ie.FONT_COLOR:a,c=r.textAlign,s=void 0===c?ie.TEXT_ALIGN:c,f=r.textBaseline,l=void 0===f?ie.TEXT_BASELINE:f,h=r.fontSize,p=void 0===h?ie.FONT_SIZE:h,d=r.lineHeight,y=void 0===d?1.2*p:d;t.save(),t.beginPath();var v=e.left,g=e.top,m=e.width,b=e.height;t.font=Oe(r);var w,x,_=n.length*y;switch(l){case"top":w=g,t.textBaseline="top";break;case"bottom":w=g+b-_+y,t.textBaseline="bottom";break;case"middle":default:w=g+b/2-_/2+y/2,t.textBaseline="middle"}switch(s){case"left":x=v,t.textAlign="left";break;case"right":x=v+m,t.textAlign="right";break;case"justify":x=v,t.textAlign="left";break;case"center":default:x=v+m/2,t.textAlign="center"}t.globalAlpha*=i,t.fillStyle=u,"justify"!=s?n.forEach((function(e,n){t.fillText(e.join(" "),x,w+n*y)})):n.forEach((function(e,n){var r=w+n*y;if(1==e.length)t.fillText(e[0],x,r);else{var o=e.map((function(e){return t.measureText(e).width})),i=o.reduce((function(t,e){return t+e}),0),a=(m-i)/(e.length-1),u=x;e.forEach((function(e,n){t.fillText(e,u,r),u+=o[n]+a}))}})),t.restore()}function Pe(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{x:1,y:1};return t-=n.x,e-=n.y,{x:(t*Math.cos(-r)-e*Math.sin(-r)+n.x)/o.x,y:(t*Math.sin(-r)+e*Math.cos(-r)+n.y)/o.y}}function je(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{x:1,y:1};return t-=n.x,e-=n.y,{x:(t*Math.cos(r)-e*Math.sin(r)+n.x)*o.x,y:(t*Math.sin(r)+e*Math.cos(r)+n.y)*o.y}}se="undefined"==typeof document?function(t,e){return new Canvas(t,e)}:function(t,e){var n=document.createElement("canvas");return n.width=t,n.height=e,n};var Me=function(t){return t};function Re(t){var e=t.indexOf("||"),n="",r="";-1!=e&&(n=t,r=t.substring(e+2,t.length-1).trim(),t=t.replace(t.substring(e,t.length-1),"").trim());var o=t.substr(2,t.length-3).trim().replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".").filter((function(t){return!!t.trim()})),i=o.slice(1);return{defaultValue:r,match:t,originText:n||t,target:o[0],accessor:i.length>0?function(t){return i.reduce((function(t,e){return t?t[e]:void 0}),t)}:Me}}function Te(t,e,n){if(t){var r=n||M,o=String(t),i=(o.match(/#{[^}]*}/gi)||[]).map((function(t){return Re(t)})),a=(o.match(/\${[^}]*}/gi)||[]).map((function(t){return Re(t)}));if(0!=i.length||0!=a.length)return function(){var t=o;return i.forEach((function(n){var o=r(n.accessor(e.getState(n.target)));t=t.replace(n.originText,void 0===o?n.defaultValue||"":o)})),a.forEach((function(n){var o=e.root.findById(n.target),i=r(n.accessor(o&&o.data));t=t.replace(n.originText,void 0===i?n.defaultValue||"":i)})),t}}}function Ie(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)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Ce(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ce(t,e)}(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 Ce(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 ze(t){var e=M(t);return null==e?"":String(e)}function Be(t){return Number(M(t))}function Le(t){return t}function De(t){return ze(t)}function Fe(t){return Be(t)}function Ne(t){if(this.param)return t=ze(t),this.param.hasOwnProperty(t)?this.param[t]:this.param.default}function Ue(t){var e=this.param;if(e){for(var n in e){var r=Ie(n.split("~"),2),o=r[0],i=r[1],a=!!o,u=!!i;if(o=parseFloat(o),i=parseFloat(i),t=Be(t),a&&!u&&t>=o)return e[n];if(!a&&u&&t<o)return e[n];if(t>=o&&t<i)return e[n]}return e.default}}function Ye(t){return Be(t)*Math.PI/180}function Ge(){}function He(t,e,n,r,o){switch(n){case"value":return"text"===o||"string"===o?De.bind(t):"number"===o?Fe.bind(t):Le.bind(e);case"map":return Ne.bind(t);case"range":return Ue.bind(t);case"radian":return Ye.bind(t);case"eval":return function(t){try{return new Function("value","targets",t)}catch(t){return pe(t),Ge}}(r).bind(e);default:return Le.bind(e)}}var We=function(t){return t};function Ve(t){if(!t)return We;var e=String(t).trim().replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".").filter((function(t){return!!t.trim()}));return e.length>0?function(t){return e.reduce((function(t,e){return t?t[e]:void 0}),t)}:We}function Xe(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)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return qe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qe(t,e)}(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 qe(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 Ke(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)}}var Qe=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.owner=n,this.model=e}var e,n,r;return e=t,(n=[{key:"dispose",value:function(){delete this._model,delete this.owner,delete this.evaluator,delete this.accessor}},{key:"model",get:function(){return this._model},set:function(t){var e=t.target,n=t.property,r=t.rule,o=t.param,i=t.accessor;this._model=t,this.evaluator=He(this,this.owner,r,o,function(t){switch(t){case"ref":case"fillStyle":case"strokeStyle":return"string";default:return}}(n)),this.accessor=Ve(i);var a=e.match(/\[(.*?)\]/);if(a){var u=Xe(a[1].split(":"),2),c=u[0],s=u[1];this.propAccessor=Ve(c),this.partAccessor=Ve(s)}}},{key:"target",get:function(){return this.model.target}},{key:"property",get:function(){return this.model.property}},{key:"param",get:function(){return this.model.param}}])&&Ke(e.prototype,n),r&&Ke(e,r),t}();function Je(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(e||void 0!==this.data)&&this.mappings&&this.mappings.forEach((function(e){try{var n=e.target,r=e.property,o=e.accessor,i=e.propAccessor,a=e.partAccessor,u=o(t.data);if("(root)"==(n=n.trim())||"(key)"==n){if(null==u)return;var c=Object.keys(u||{}).map((function(e){return t.root.findOrCreate(e)})).filter((function(t){return!!t}));c.length>0&&c.forEach((function(t){return t[r]=e.evaluator(u[t.get("id")],[t])}))}else if(n.startsWith("[")){if(null==u)return;if(u instanceof Array)u.forEach((function(n){var o=i(n);if(o){var u=t.root.findOrCreate(o);u&&(u[r]=e.evaluator(a(n),[u]))}}));else{if(!(u instanceof Object))throw String("mapping data should be an object to target property-id.("+u+")");var s=i(u);if(s){var f=t.root.findOrCreate(s);f&&(f[r]=e.evaluator(a(u),[f]))}}}else{var l=t.root.findAll(n,t);if(l.length>0){var h=e.evaluator(u,l);l.forEach((function(t){return t[r]=h}))}}}catch(n){pe(n,t,e)}}))}function Ze(t){var e=t.element,n=t.fillStyle,r=e.style;if(n)if("string"==typeof n)r.backgroundColor=n;else switch(n.type){case"pattern":r.backgroundImage="url("+n.image+")",r.backgroundColor="transparent",n.fitPattern?r.backgroundSize="100% 100%":n.width||n.height?r.backgroundSize="".concat(n.width?n.width+"px":"auto"," ").concat(n.height?n.height+"px":"auto"):r.backgroundSize="contain";break;case"gradient":r.background=function(t,e){var n=e.colorStops,r=e.gradientType;if(n instanceof Array&&n.length>0)switch(r){case"radial":var o=e.center||"center";return"radial-gradient(farthest-corner at "+function(t,e){var n=t.bounds,r=n.width,o=n.height;switch(e){case"center":return[r/2,o/2];case"left-top":return[0,0];case"right-top":return[r,0];case"left-bottom":return[0,o];default:return[r,o]}}(t,o).map((function(t){return t+"px"})).join(" ")+","+n.map((function(t){return"".concat(t.color," ").concat(100*t.position,"%")})).join(",")+")";case"linear":return"linear-gradient("+(180*(e.rotation||0)/3.141592653589793+90+"deg")+", "+n.map((function(t){return"".concat(t.color," ").concat(100*t.position,"%")})).join(",")+")"}return""}(t,n)}else r.background="transparent"}var $e={x:1,y:1},tn={boxSizing:"border-box",margin:"0px",position:"absolute",outline:"none"};function en(t){var e=t.state,n=e.id,r=e.scale,o=void 0===r?$e:r,i=(e.translate,e.bold),a=e.italic,u=e.fontFamily,c=void 0===u?"":u,s=e.textAlign,f=e.textBaseline,l=e.paddingTop,h=void 0===l?0:l,p=e.paddingBottom,d=void 0===p?0:p,y=e.paddingLeft,v=void 0===y?0:y,g=e.paddingRight,m=void 0===g?0:g,b=e.fontSize,w=void 0===b?ie.FONT_SIZE:b,x=e.lineWidth,_=void 0===x?0:x,k=e.lineDash,A=t.state.class,S=(t.text,t.strokeStyle),O=(t.fillStyle,t.rotation),E=void 0===O?0:O,P=t.fontColor,j=t.hidden,M=t.bounds,R=M.left,T=M.top,I=M.width,C=M.height,z=t.element;z.hidden=j,n&&(z.id=n),A&&(z.className=A),Object.assign(z.style,tn,{fontFamily:c,fontSize:w+"px",left:R+"px",top:T+"px",width:I+"px",height:C+"px",paddingTop:h+"px",paddingRight:m+"px",paddingBottom:d+"px",paddingLeft:v+"px",border:_+"px",borderColor:S,borderStyle:_>0?k||ie.LINE_DASH:"",color:P,fontWeight:i?"bold":"",fontStyle:a?"italic":"",textAlign:"end"==s?"right":"start"==s?"left":s,verticalAlign:f}),Ze(t),function(t){if(t.isShadowable()&&t.state.shadow){var e=t.element,n=t.state.shadow,r=n.left,o=void 0===r?0:r,i=n.top,a=void 0===i?0:i,u=n.blurSize,c=void 0===u?0:u,s=n.color,f=void 0===s?"transparent":s;e.style.boxShadow="".concat(o,"px ").concat(a,"px ").concat(c,"px ").concat(f)}}(t);var B=t.delta(),L=(o&&o.x||1)*B.sx,D=(o&&o.y||1)*B.sy,F=(E||0)+B.theta,N=B.tx||0,U=B.ty||0;["-webkit-","-moz-","-ms-","-o-",""].forEach((function(t){z.style[t+"transform"]="rotate(".concat(F,"rad) translate(").concat(N,"px, ").concat(U,"px) scale(").concat(L,", ").concat(D,") perspective(1px)")}))}function nn(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)}}var rn,on=[];function an(){rn=null;var t=performance.now(),e=(on=on.filter((function(t){return un(t)}))).reduce((function(e,n){var r=t-n.updatedAt;return r>=n.retention?e.kills.push(n):e.next=0==e.next?n.retention-r:Math.min(e.next,n.retention-r),e}),{next:0,kills:[]});e.kills.forEach((function(t){var e=on.indexOf(t);-1!=e?(on.splice(e,1),t.removeSelf(!0)):pe("Should not be here. Maybe reentrance problem.")})),e.next>0&&(rn=setTimeout(cn,Math.max(e.next,500)))}function un(t){return!t.disposed&&t.retention>0&&!t.isTemplate()&&t.app&&t.app.isViewMode}var cn=k()((function(){requestAnimationFrame(an)}),500),sn=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r;return e=t,(n=[{key:"add",value:function(t){un(t)&&-1==on.indexOf(t)&&(on.push(t),t.touch()),this.touch()}},{key:"remove",value:function(t){var e=on.indexOf(t);e>0&&on.splice(e,1),this.touch()}},{key:"touch",value:function(){null!==rn&&(clearTimeout(rn),rn=null),cn()}},{key:"length",get:function(){return on.length}}])&&nn(e.prototype,n),r&&nn(e,r),t}());function fn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ln(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)}}var hn={},pn={mutable:!1,resizable:!0,rotatable:!0,properties:[],"value-property":"text",sample:{xx:0}},dn=[],yn={theta:0,tx:0,ty:0,sx:1,sy:1,fade:0},vn=new WeakMap,gn=0,mn=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._app=n,this._model=e||{},this._state={},this._delta=b.a(yn),n&&this.animation&&(this.animation.started=!0),this.clearCache(),sn.add(this),vn.set(this,gn++)}var e,n,r;return e=t,r=[{key:"nature",get:function(){return pn}},{key:"buildSample",value:function(t,e){var n=this.register(t);if(n){var r=n.nature.sample||{};return Object.assign({type:t},r,e)}console.error("Class not registered.",t)}},{key:"register",value:function(t,e){if(!e)return hn[t];hn[t]=e}},{key:"residents",get:function(){return vn}}],(n=[{key:"created",value:function(){}},{key:"added",value:function(t){}},{key:"removed",value:function(t){}},{key:"ready",value:function(){}},{key:"touch",value:function(){this.updatedAt=performance.now()}},{key:"clearCache",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];me.apply(i,[this].concat(e))}},{key:"removeSelf",value:function(t){t?this.dispose():this.parent&&this.parent.removeComponent(this)}},{key:"dispose",value:function(){this._animation&&(this._animation.dispose(),delete this._animation),this.disposeMappings(),this.parent&&this.parent.removeComponent(this),delete this._text_substitutor,delete this._value_substitutor,this._disposed=!0,this.retention&&sn.touch(),this.clearCache(),delete this._app}},{key:"nature",get:function(){return this.constructor.nature}},{key:"disposed",get:function(){return!!this._disposed}},{key:"isLayer",value:function(){return!1}},{key:"isGroup",value:function(){return!1}},{key:"isContainer",value:function(){return!1}},{key:"isLine",value:function(){return!1}},{key:"isRoot",value:function(){return!1}},{key:"isRootModel",value:function(){return!1}},{key:"is3dish",value:function(){return!1}},{key:"isTemplate",value:function(){return!!this.get("templatePrefix")}},{key:"isHTMLElement",value:function(){return!1}},{key:"retention",get:function(){return Number(this.get("retention"))||0}},{key:"hasTextProperty",get:function(){return!0}},{key:"app",get:function(){return!this._app&&this.parent&&(this._app=this.parent.app),this._app}},{key:"model",get:function(){return this._model}},{key:"state",get:function(){return Object.assign({},this._model,this._state)}},{key:"hierarchy",get:function(){var t=b.a(this._model);return this.volatile.forEach((function(e){delete t[e]})),t}},{key:"volatile",get:function(){return dn}},{key:"textHidden",get:function(){return!!this._textHidden},set:function(t){this._textHidden=!!t,this.invalidate()}},{key:"get",value:function(t){return this._model[t]}},{key:"set",value:function(t,e){if("string"==typeof t)return this.set(fn({},t,e));var n={},r={},o=!1,i=(t=b.a(t),this);return Object.getOwnPropertyNames(t).forEach((function(e){var a=i._model[e],u=t[e];f()(a,u)||(r[e]=a,n[e]=u,i._model[e]=u,delete i._state[e],o=!0)})),o&&(this.clearCache(),n.hasOwnProperty("text")&&delete this._text_substitutor,n.hasOwnProperty("retention")&&sn.add(this),n.hasOwnProperty("fillStyle")&&this.onchangeFill(n,r),n.hasOwnProperty("mappings")&&this.onchangeMappings(n,r),n.hasOwnProperty("data")&&this.onchangeData(n,r),this.onchange&&this.onchange(n,r),this.trigger("change",n,r)),this}},{key:"getState",value:function(t){return this._state.hasOwnProperty(t)?this._state[t]:this.get(t)}},{key:"setState",value:function(t,e){if("string"==typeof t)return this.setState(fn({},t,e));var n={},r={},o=!1,i=(t=b.a(t),this),a=this.getState("sensitive");return Object.getOwnPropertyNames(t).forEach((function(e){var u=i.getState(e),c=t[e];!a&&f()(u,c)||(r[e]=u,n[e]=c,i._state[e]=c,o=!0)})),o&&(this.clearCache(),n.hasOwnProperty("text")&&delete this._text_substitutor,n.hasOwnProperty("fillStyle")&&this.onchangeFill(n,r),n.hasOwnProperty("data")&&this.onchangeData(n,r),this.onchange&&this.onchange(n,r),this.trigger("change",n,r)),this}},{key:"root",get:function(){return this.isRoot()?this:this.parent&&this.parent.root}},{key:"rootModel",get:function(){return this.isRootModel()?this:this.parent&&this.parent.rootModel}},{key:"parent",get:function(){return this._parent},set:function(t){this._parent=t}},{key:"isDescendible",value:function(t){return!0}},{key:"getContext",value:function(){return this._parent.getContext()}},{key:"center",get:function(){var t=this.bounds;return{x:t.left+t.width/2,y:t.top+t.height/2}},set:function(t){if(t&&!isNaN(t.x)&&!isNaN(t.y)){var e=this.center;if(Math.round(100*t.x)/100!=Math.round(100*e.x)/100||Math.round(100*t.y)/100!=Math.round(100*e.y)/100){var n=t.x-e.x,r=t.y-e.y;this.path=this.path.map((function(t){return{x:t.x+n,y:t.y+r}}))}}}},{key:"location",get:function(){return this.center},set:function(t){this.center=t}},{key:"dimension",get:function(){return this.get("dimension")},set:function(t){this.set("dimension",t)}},{key:"bounds",get:function(){var t,e,n,r,o=this.path;t=e=o[0].x,n=r=o[0].y;for(var i=1;i<o.length;i++){var a=o[i];a.x<t?t=a.x:a.x>e&&(e=a.x),a.y<n?n=a.y:a.y>r&&(r=a.y)}return{left:t,top:n,width:e-t,height:r-n}},set:function(t){var e=this.bounds;if(Math.round(100*t.width)/100!=Math.round(100*e.width)/100||Math.round(100*t.height)/100!=Math.round(100*e.height)/100||Math.round(100*t.left)/100!=Math.round(100*e.left)/100||Math.round(100*t.top)/100!=Math.round(100*e.top)/100){var n=0==e.width?1:t.width/e.width,r=0==e.height?1:t.height/e.height;this.path=this.path.map((function(o){return{x:t.left+(o.x-e.left)*n,y:t.top+(o.y-e.top)*r}}))}}},{key:"path",get:function(){return pe("이 컴포넌트에 get path 가 구현되어있지 않음.",this),[]},set:function(t){pe("이 컴포넌트에 get path 가 구현되어있지 않음.",this)}},{key:"outline",value:function(t){return function(t,e){var n=t.path.slice();if(n&&n.length){var r=1,o=[];if(t.isLine()||n.push(n[0]),e<=0)return t.transcoordS2T(n[0].x,n[0].y);if(e>=1)return t.transcoordS2T(n[n.length-1].x,n[n.length-1].y);for(;n[r];){var i=n[r-1],a=n[r],u=a.x-i.x,c=a.y-i.y;o.push(Math.sqrt(u*u+c*c)),r++}var s=o.reduce((function(t,e){return t+e}),0);r=0;var f=0;do{f+=o[r++]}while(f/s<e);e=(e-(f-=o[--r])/s)*(s/o[r]);var l=n[r%n.length],h=n[(r+1)%n.length],p=l.x+Math.round((h.x-l.x)*e),d=l.y+Math.round((h.y-l.y)*e);return t.transcoordS2T(p,d)}pe("path should not be empty")}(this,t||0)}},{key:"anchors",get:function(){return[]}},{key:"strokeStyle",get:function(){return this.get("strokeStyle")},set:function(t){this.set("strokeStyle",t)}},{key:"fillStyle",get:function(){return this.getState("fillStyle")},set:function(t){this.setState("fillStyle",t)}},{key:"fontColor",get:function(){return this.get("fontColor")},set:function(t){this.set("fontColor",String(M(t)))}},{key:"rotation",get:function(){return this.getState("rotation")},set:function(t){this.setState("rotation",Number(M(t)))}},{key:"contains",value:function(t,e){return!1}},{key:"mutable",get:function(){return pn.mutable}},{key:"resizable",get:function(){return pn.resizable&&!this.stuck}},{key:"adjustResize",value:function(t,e,n){if(n){var r=this.bounds,o=r.height/r.width,i=t.width-r.width,a=t.height-r.height;i*o>a?a=i*o:i=a/o;var u=t.left-r.left,c=t.top-r.top;return 0!=u&&0!=c?(c=-a,u=-i):0!=u?u=-i:0!=c&&(c=-a),{left:r.left+u,top:r.top+c,width:r.width+i,height:r.height+a}}return t}},{key:"rotatable",get:function(){return pn.rotatable&&!this.stuck}},{key:"adjustRotation",value:function(t,e){if(e||this.app.rotateStepForced){var n=this.app.rotateStep;return Math.floor((t+n/2)/n)*n}return t}},{key:"capturable",get:function(){return!1!==this.get("capturable")&&(this.app.isEditMode||!this.hidden)}},{key:"stuck",get:function(){return!!(this.parent&&this.parent.layout.isStuck(this)||this.get("locked"))}},{key:"findFirst",value: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];if(t.apply(void 0,[this].concat(n)))return this}},{key:"findAll",value: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];return"string"==typeof t?g(t,this,n[0]||this):"function"==typeof t&&t.apply(void 0,[this].concat(n))?[this]:void 0}},{key:"capture",value:function(t,e){if(!this.capturable)return!1;var n=this.transcoordP2S(t,e);return this.contains(n.x,n.y)?this:void 0}},{key:"prepare",value:function(t,e){t(this)}},{key:"prepareIf",value:function(t){var e=this;t&&this.prepare&&this.prepare((function(t){e.invalidate()}),(function(t){pe(t)}))}},{key:"tag",get:function(){return this.get("id")?"#".concat(this.get("id")):""}},{key:"hidden",get:function(){return this.getState("hidden")||this.getState("ndns")&&void 0===this.data||this.isTemplate()},set:function(t){this.setState("hidden",t)}},{key:"draw",value:function(t){t.save(),this.__proto__.hasOwnProperty("_pre_draw")?this._pre_draw(t):this.prerender(t),this.__proto__.hasOwnProperty("_draw")?this._draw(t):this.render(t),this.__proto__.hasOwnProperty("_post_draw")?this._post_draw(t):this.postrender(t),t.restore()}},{key:"delta",value:function(t,e){if(void 0===e)return t?this._delta[t]:this._delta;this._delta[t]=e}},{key:"prerender",value:function(t){var e=this.rotatePoint,n=this.model,r=n.scale,o=n.rotation,i=n.shadow,a=n.alpha,u=(r&&r.x||1)*this._delta.sx,c=(r&&r.y||1)*this._delta.sy,s=(o||0)+this._delta.theta,f=this._delta,l=f.tx,h=void 0===l?0:l,p=f.ty,d=void 0===p?0:p,y=(a||1)-this._delta.fade;(h||d)&&t.translate(h,d),(1!=u||1!=c||s)&&(t.translate(e.x,e.y),1==u&&1==c||t.scale(u,c),s&&t.rotate(s),t.translate(-e.x,-e.y)),y&&(t.globalAlpha=y),i&&ue(t,i,this),this.app.isEditMode&&this.hidden&&(t.globalAlpha*=.5)}},{key:"render",value:function(t){}},{key:"postrender",value:function(t){this.drawText(t)}},{key:"drawText",value:function(t){!this.textHidden&&this.text&&this.hasTextProperty&&Ee(t,this.textBounds,this.textLines(t),this.model)}},{key:"drawStroke",value:function(t){_e(t,this.model)}},{key:"drawFill",value:function(t){this.fillStyle&&"transparent"!=this.fillStyle&&(xe(t,this.bounds,this.center,this.model,this),function(t){t.shadowColor="transparent"}(t))}},{key:"animate",value:function(t){return this._animate&&this._animate.stop(),this._animate=be(t),this._animate}},{key:"move",value:function(t){var e=t.x,n=t.y,r=this.path,o=e,i=n;this.path=r.map((function(t){return{x:t.x+o,y:t.y+i}}))}},{key:"symmetryX",value:function(t){"number"!=typeof t&&(t=this.center.x);var e=this.model.rotation,n=this.fillStyle;if(this.set("rotation",2*Math.PI-e),n&&"gradient"===n.type&&"linear"===n.gradientType){var r=b.a(n);r.rotation=(Math.PI-parseFloat(n.rotation||0))%(2*Math.PI),this.set("fillStyle",r)}this.path=this.path.map((function(e){return{x:2*t-e.x,y:e.y}}))}},{key:"symmetryY",value:function(t){this.symmetryX(),this.set("rotation",(Math.PI+this.model.rotation)%(2*Math.PI)),t&&this.move({x:0,y:2*(t-this.center.y)})}},{key:"animation",get:function(){if(this.app.isViewMode&&!this.isTemplate()){if(!this._animation){var t=this.model.animation;t&&t.oncreate&&(this._animation=(e=this,n=t.oncreate,(r=Qt[n.type])?new r(e,n):null))}var e,n,r;return this._animation}}},{key:"effect",value:function(t,e){return function(t,e,n){var r=ce[n.type];r&&r(t,e,n)}(this,t,e)}},{key:"started",set:function(t){this.animation&&(this.animation.started=t)}},{key:"invalidate",value:function(){this.parent&&this.parent.invalidate()}},{key:"font",get:function(){return Oe(this.model)}},{key:"lineHeight",get:function(){var t=this.get("lineHeight");return t||1.2*this.fontSize}},{key:"defaultTextSubstitutor",value:function(){var t=this.getState("text");return null==t?"":String(t)}},{key:"textSubstitutor",get:function(){return this._text_substitutor||(this._text_substitutor=Te(this.getState("text"),this)||this.defaultTextSubstitutor),this._text_substitutor}},{key:"text",get:function(){var t=this.get("textFormat");return t?function(t,e){if(!t||isNaN(+e))return e;var n,r,o,i,a,u,c,s,f,l=t.length,h=t.search(/[0-9\-\+#]/),p=h>0?t.substring(0,h):"",d=t.split("").reverse().join(""),y=d.search(/[0-9\-\+#]/),v=l-y,g=t.substring(v,v+1),m=v+("."===g||","===g?1:0),b=y>0?t.substring(m,l):"";if(n=(e="-"===(t=t.substring(h,m)).charAt(0)?-e:+e)<0?e=-e:0,o=(r=t.match(/[^\d\-\+#]/g))&&r[1]&&r[0]||",",t=t.split("."),e=+(e=e.toFixed(t[1]&&t[1].length))+"",a=t[1]&&t[1].lastIndexOf("0"),(!(c=e.split("."))[1]||c[1]&&c[1].length<=a)&&(e=(+e).toFixed(a+1)),s=t[0].split(o),t[0]=s.join(""),(i=t[0]&&t[0].indexOf("0"))>-1)for(;c[0].length<t[0].length-i;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((e=e.split("."))[0]=c[0],u=s[1]&&s[s.length-1].length){for(d="",v=(f=e[0]).length%u,l=f.length,m=0;m<l;m++)d+=f.charAt(m),!((m-v+1)%u)&&m<l-u&&(d+=o);e[0]=d}return e[1]=t[1]&&e[1]?"."+e[1]:"","0"!==(r=e.join(""))&&""!==r||(n=!1),p+("+"==t[0].substring(0,1)?n?"-":"+":n?"-":"")+r+b}(t,this.textSubstitutor()):this.textSubstitutor()},set:function(t){delete this._text_substitutor;var e=M(t);this.setState("text",null==e?"":String(e))}},{key:"textLines",value:function(t){return Se(t||this.getContext(),this.textBounds.width,this.font,this.text,this.get("textWrap"))}},{key:"textBounds",get:function(){var t=this.model,e=t.paddingTop,n=void 0===e?0:e,r=t.paddingLeft,o=void 0===r?0:r,i=t.paddingRight,a=void 0===i?0:i,u=t.paddingBottom,c=void 0===u?0:u,s=this.bounds,f=s.left,l=s.top,h=s.width,p=s.height;return{left:f+o,top:l+n,width:Math.max(h-o-a,0),height:Math.max(p-n-c,0)}}},{key:"rotatePoint",get:function(){return this.center}},{key:"trim",value:function(){delete this._model[""],"chartjs"!==this._model.type&&delete this._model.chart}},{key:"value",get:function(){var t=this.nature["value-property"]||"text";return"value"==t?this.getState("value"):this[t]},set:function(t){var e=this.nature["value-property"]||"text";"value"==e?this.setState("value",t):this[e]=t}},{key:"data",get:function(){return this.getState("data")},set:function(t){this.setState("data",t),this.touch()}},{key:"mappings",get:function(){return!this._mappings&&this.parent&&this.buildMappings(),this._mappings}},{key:"serialize",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return JSON.stringify.apply(JSON,[this.hierarchy].concat(e))}},{key:"controls",get:function(){}}])&&ln(e.prototype,n),r&&ln(e,r),t}();function bn(t){return(bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function wn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xn(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 _n(){return(_n="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=kn(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function kn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=En(t)););return t}function An(t,e){return(An=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Sn(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=En(t);if(e){var o=En(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return On(this,n)}}function On(t,e){if(e&&("object"===bn(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 En(t){return(En=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.union=function(t){var e,n,r,o;return t.forEach((function(t){void 0===e?(e=t.left,n=t.top,r=t.left+t.width,o=t.top+t.height):(e=Math.min(t.left,e),n=Math.min(t.top,n),r=Math.max(t.left+t.width,r),o=Math.max(t.top+t.height,o))})),{left:e,top:n,width:r-e,height:o-n}},mn.transcoordR=Pe,mn.transcoordRR=je,mn.createCanvas=se,mn.memoize=ve,mn.mixin=ot,mn.drawText=Ee,mn.font=Oe,mn.textLines=Se,mn.drawStroke=_e,mn.drawFill=xe,mn.reposition=en,mn.RetentionManager=sn,mn.template=h.a,mn.buildSubstitutor=Te,Object.assign(mn.prototype,{drawEffect:function(t){var e=this;this._model.effects&&this._model.effects.forEach((function(n){e.effect(t,n)}))},prepareFill:function(t,e){var n=this.fillStyle;if(n&&"pattern"==n.type&&n.image){if("string"!=typeof n.image)return this._pattern_image_origin=this._pattern_image=n.image,void t(this);this._pattern_image=null,this._pattern_image_origin=new Image;var r=this;this._pattern_image_origin.onload=function(){if(!n.fitPattern&&!n.width&&!n.height)return r._pattern_image=r._pattern_image_origin,void t(this);var e=n.width||this.width,o=n.height||this.height;n.fitPattern&&(e=r.bounds.width,o=r.bounds.height);var i=se(e,o);i.getContext("2d").drawImage(this,0,0,this.width,this.height,0,0,e,o),r._pattern_image=i,t(this)},this._pattern_image_origin.onerror=function(t){e(t)};try{"data"!==String(n.image).substring(0,4)?this._pattern_image_origin.crossOrigin="use-credentials":this._pattern_image_origin.crossOrigin=null,this._pattern_image_origin.src=this.app.url(n.image)}catch(t){e(t)}}else t(this)},prepareFillIf:function(t){var e=this;t&&this.prepareFill((function(t){e.invalidate()}),(function(t){pe(t)}))},onchangeFill:function(t,e){var n=this.fillStyle;n&&"pattern"!==n.type?this._pattern_image&&(this._pattern_image=null,this._pattern_image_origin=null):(null==n?void 0:n.image)&&this.prepareFillIf(n.image)},drawImage:function(t,e,n,r,o,i){var a=this;e.complete?t.drawImage(e,n,r,o,i):e.addEventListener("load",(function(){a.invalidate()}))},mutateBounds:function(t,e){var n=this.bounds,r=this.rotatePoint,o=this.get("rotation"),i=this.get("scale");if(t){var a=t.call(e,n);a&&(n=a)}var u=n,c=u.left,s=u.top,f=[{x:c,y:s},{x:c+u.width,y:s+u.height}],l=(f=f.map((function(t){return je(t.x,t.y,r,o,i)})))[0],h=f[1];r={x:(l.x+h.x)/2,y:(l.y+h.y)/2},l=(f=f.map((function(t){return Pe(t.x,t.y,r,o,i)})))[0],h=f[1],this.bounds={left:l.x,top:l.y,width:h.x-l.x,height:h.y-l.y}},mutatePath:function(t,e,n){var r=this,o=this.path,i=this.rotatePoint;this.get("rotation"),this.get("scale"),t&&(o=t.call(n,o));var a=o.map((function(t){return r.transcoordS2P(t.x,t.y)}));e&&(o=e.call(n,a))&&(a=o);var u,c,s,f,l={x:0,y:0};u=c=(o=a.map((function(t){return r.transcoordP2S(t.x,t.y,l)})))[0].x,s=f=o[0].y;for(var h=1;h<o.length;h++){var p=o[h];p.x<u?u=p.x:p.x>c&&(c=p.x),p.y<s?s=p.y:p.y>f&&(f=p.y)}i={x:(u+c)/2,y:(s+f)/2},i=this.transcoordS2P(i.x,i.y,l),this.path=a.map((function(t){return r.transcoordP2S(t.x,t.y,i)}))},access:function(t){if(t){var e=String(t),n=(e.match(/#{(\S*)}/)||[]).map((function(t){return Re(t)}))[0];if(n)return n.accessor(this.getState(n.target));var r=(e.match(/\${[^}]*}/)||[]).map((function(t){return Re(t)}))[0];if(r){var o=this.root.findById(r.target);return r.accessor(this.getState(o))}return t}},substitute:function(t,e){var n=this;if(t){var r=String(t),o=e||M,i=(r.match(/#{(\S*)}/gi)||[]).map((function(t){return Re(t)})),a=(r.match(/\${[^}]*}/gi)||[]).map((function(t){return Re(t)}));if(0==i.length&&0==a.length)return r;var u=r;return i.forEach((function(t){var e=o(t.accessor(n.getState(t.target)));u=u.replace(t.match,void 0===e?"":e)})),a.forEach((function(t){var e=n.root.findById(t.target),r=o(t.accessor(e&&e.data));u=u.replace(t.match,void 0===r?"":r)})),u}},onchangeMappings:function(t,e){this.disposeMappings(),Je.call(this)},onchangeData:function(t,e){Je.call(this,[!0])},buildMappings:function(){var t=this;if(this._model.mappings)return!this._model.mappings instanceof Array?(pe("Mappings model is invalid (should be a Array) ..",this._model.mappings),void(this._mappings=[])):void(this._mappings=(this._model.mappings||[]).map((function(e){return new Qe(e,t)})));this._mappings=[]},executeMappings:Je,disposeMappings:function(){this._mappings&&this._mappings.forEach((function(t){return t.dispose()})),delete this._mappings},ondropfile:function(t,e){for(var n=0;n<t.length;n++)if(t[n].type.startsWith("image/"))return void this.set("fillStyle",{type:"pattern",image:e[n],fitPattern:!0})},transcoordS2P:function(t,e,n){if(!this.parent)return{x:t,y:e};var r=this.model,o=r.rotation,i=void 0===o?0:o,a=r.scale,u=void 0===a?{x:1,y:1}:a;if(this.isLayer()){var c=this.model.translate,s=je(t,e,void 0,i,u);return c&&(s.x+=c.x,s.y+=c.y),s}var f=je(t,e,n=n||this.rotatePoint,i,u);return{x:f.x-(n.x-n.x/u.x),y:f.y-(n.y-n.y/u.y)}},transcoordP2S:function(t,e,n){if(!this.parent)return{x:t,y:e};var r=this.model,o=r.rotation,i=void 0===o?0:o,a=r.scale,u=void 0===a?{x:1,y:1}:a;if(this.isLayer()){var c=this.model.translate,s=Pe(t,e,c,i,u);return c&&(s.x-=c.x/(u?u.x:1),s.y-=c.y/(u?u.y:1)),s}var f=Pe(t,e,n=n||this.rotatePoint,i,u);return{x:f.x+(n.x-n.x/u.x),y:f.y+(n.y-n.y/u.y)}},transcoordS2T:function(t,e,n){n=n||this.rootModel;for(var r=[],o=this.parent;o&&o!==n;o=o.parent)r.push(o);var i=this.transcoordS2P(t,e);return r.forEach((function(t){var e=t.model.scale,n=t.bounds;if(e){var r=t.rotatePoint;i.x+=(r.x-n.left)*e.x,i.y+=(r.y-n.top)*e.y}else i.x+=n.left,i.y+=n.top;i=t.transcoordS2P(i.x,i.y)})),i},transcoordT2S:function(t,e,n){n=n||this.rootModel;for(var r=[],o=this.parent;o&&o!==n;o=o.parent)r.splice(0,0,o);var i={x:t,y:e};return r.forEach((function(t){var e=t.model.scale;i=t.transcoordP2S(i.x,i.y);var n=t.bounds;if(e){var r=t.rotatePoint;i.x-=(r.x-n.left)/e.x,i.y-=(r.y-n.top)/e.y}else i.x-=n.left,i.y-=n.top})),this.transcoordP2S(i.x,i.y)},transcoordS2TR:function(t,e,n){n=n||this.rootModel;var r=this.transcoordS2T(t,e,n);return je(r.x,r.y,void 0,n.get("rotation")||0)},transcoordS2O:function(t,e,n){var r=this.rootModel,o=this.transcoordS2T(t,e,r);return n.transcoordT2S(o.x,o.y,r)},transcoordC2S:function(t,e,n){if(!n)for(n=this;n&&!n.isLayer();)n=n.parent;var r=n.model,o=r.translate,i=r.scale,a=Pe(t,e,o,r.rotation,i);return o&&(a.x-=o.x/(i?i.x:1),a.y-=o.y/(i?i.y:1)),n===this?a:this.transcoordT2S(a.x,a.y,n)},transcoordS2C:function(t,e,n){if(!n)for(n=this;n&&!n.isLayer();)n=n.parent;if(n!==this)var r=this.transcoordS2T(t,e,n);else r={x:t,y:e};var o=n.model,i=o.translate,a=o.rotation,u=o.scale;return r=je(r.x,r.y,void 0,a,u),i&&(r.x+=i.x,r.y+=i.y),r},_pre_draw:mn.prototype.prerender,_draw:mn.prototype.render,_post_draw:mn.prototype.postrender}),["rotatePoint","font","lineHeight","retention"].forEach((function(t){return mn.memoize(mn.prototype,t,!1)})),["bounds","center","textBounds"].forEach((function(t){return mn.memoize(mn.prototype,t,!0)})),mn.mixin(mn.prototype,rt.withEvent);var Pn=function(t){!function(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&&An(t,e)}(i,t);var e,n,r,o=Sn(i);function i(){return wn(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"rotationX",get:function(){return this.getState("rotationX")},set:function(t){this.setState("rotationX",t)}},{key:"rotationY",get:function(){return this.getState("rotationY")},set:function(t){this.setState("rotationY",t)}},{key:"rotationZ",get:function(){return this.getState("rotation")},set:function(t){this.setState("rotation",t)}},{key:"zPos",get:function(){return this.getState("zPos")},set:function(t){this.setState("zPos",t)}},{key:"depth",get:function(){return this.getState("depth")},set:function(t){this.setState("depth",t)}},{key:"postrender",value:function(t){this.drawFill(t),this.drawStroke(t),_n(En(i.prototype),"postrender",this).call(this,t)}}])&&xn(e.prototype,n),r&&xn(e,r),i}(mn);function jn(t){return(jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Mn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rn(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 Tn(t,e){return(Tn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function In(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=zn(t);if(e){var o=zn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Cn(this,n)}}function Cn(t,e){if(e&&("object"===jn(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 zn(t){return(zn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Bn=function(t){var e=function(t){!function(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&&Tn(t,e)}(i,t);var e,n,r,o=In(i);function i(){return Mn(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"contains",value:function(t,e){var n=this.model,r=n.left,o=n.top,i=n.width,a=n.height,u=n.lineWidth,c=(void 0===u?0:u)/2;return t<Math.max(r+i,r)+c&&t>Math.min(r+i,r)-c&&e<Math.max(o+a,o)+c&&e>Math.min(o+a,o)-c}},{key:"path",get:function(){var t=this.model,e=t.left,n=void 0===e?0:e,r=t.top,o=void 0===r?0:r,i=t.width,a=void 0===i?0:i,u=t.height,c=void 0===u?0:u;return[{x:n,y:o},{x:n+a,y:o},{x:n+a,y:o+c},{x:n,y:o+c}]},set:function(t){var e=t[0],n=t[2],r=this.model;r.width,r.height,this.set({left:e.x,top:e.y,width:n.x-e.x,height:n.y-e.y})}}])&&Rn(e.prototype,n),r&&Rn(e,r),i}(t);return ve(e.prototype,"path",!1),e};function Ln(t){return(Ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Dn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fn(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 Nn(){return(Nn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Un(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Un(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Wn(t)););return t}function Yn(t,e){return(Yn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Gn(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=Wn(t);if(e){var o=Wn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Hn(this,n)}}function Hn(t,e){if(e&&("object"===Ln(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 Wn(t){return(Wn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Vn={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"textarea",label:"front-side-template",name:"frontSideTemplate",property:{language:"html"}},{type:"textarea",label:"back-side-template",name:"backSideTemplate",property:{language:"html"}},{type:"textarea",label:"style",name:"style",property:{language:"css"}}],help:"scene/component/info-window"};function Xn(t,e){var n=t.split(/\s+/),r=n.indexOf(e);return-1!=r?n.splice(r,1):n.splice(-1,0,e),n.join(" ")}var qn=function(t){!function(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&&Yn(t,e)}(i,t);var e,n,r,o=Gn(i);function i(){return Dn(this,i),o.apply(this,arguments)}return e=i,r=[{key:"image",get:function(){return i._image||(i._image=new Image,i._image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAY1BMVEVHcEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADIAbxiAAAAIHRSTlMA+gPshCwwWFzYCeLRm7QRG6rLeDZI9JOJJDtjb1HAf1sAT80AAAQQSURBVHhe7MCBAAAAAMKw/KkzOMG2BAAAAKeu3lUohIEggO7jQi5qHqpgwML5/6+0F0y02z31FlvMMLKt86QMQ1ined2Evih1hFFjLfRWjgzDOGZ6JSiM00B9EuHALtQxJLiQBmqSBCeSUEuEGzs1BDjSaHxWOKK5Eyz/4SoMV/hp4+vtcPkdwZD/udwevNg7t1xXYRiKmkB7C+ENlPLq8fxHeX+RGjWQ1D45ldcIulBIvCvYJGBEadyTzxAcfY57NBjpLScOO/bzugcTHe7IMwiSLMcdHZhocMcMgTLjjgZM7F1bCJZ2v27ARGzYDwIk2Z+JYGJ/iiwQLMv+JAEThjkmRG64Q0Q+gIiIiIiIiIiIyFy0KRFt0bOJZAWSUigmkQaJaXhENiRnYBEpkZySRSRGcmIWEaQnYhHRSI5mESmQnIJFZIqQmGhiEYEbEnPjGlEGjYTogW/WUkOXENENSqZfEXmDiIiIiIiIiIiIiIiIiIiImq5ETIpRpBpjJCMeKy6Ri0ZS9MQjkmkkJs1YRDokp2MRyZGclkUkQnIiEQltaX3Lzb6yiGTpl2y/avqSAxGgelCOKI+Kc2isL0TUSsZ4EREREREREREREREREREREfnIQzXrNWSRTeNxnlOwIgueIr6AAyE+CpiqMEUK71IDO4E+LluEKYKnKcMUifEsTZgiJZ5lDVNkwJPcqzBFoPF/HplfxL/w6b4EPGv1h18Weya1TL8iIiIeiIiIiIiIiEjkPefxV+5YA9PPHylB+u5aqgZ39H+jKOxrqtu+pkzvr9YbzoZ6w2OFkzcrA3yE4WZlSSyFk54VoA/wR43+FaD+r9w32QdWvgvjp2ty2xq8qHPHmtyPFxfrK3hw1ejERlAlfR/Ame2OTow05d4rOLLSlHtDVhI0uRO01JeZ405op6zgNNXT+bIRfpIgn+AkU4pOxBscohojdCHu4RRzjC5EYwVHqRONDkSnEvK/CB3QSU32IRW3ZPnj9iEVoGCNTLVrh8ia1x+6wq8xvB5mz8pxu7oPwIn9lcR0AiuX1+1KX+BXqdvXzWsAC0NsGjzZsS/2Bd6yRA5RgIHkXNhSD3whASZ8rrB9mItuEAizac0fDlHxDMEwpQfD1tW4y3Hjfy5s9nOHH3uwWA+EqEJBWCjoTL/S5toBB/7hu6zer74NgqSP39zJU+qQX3ix763mHTqvIVRUVprCljlElRkEjBqNYevH8veBJ2xhiyhE8YctmhDFH7ZoQhR/2KIJUfxhiyRE8YctmhDFH7ZoQhR/2OIJUfxhC9Ppf/t1jgJACERRsHGyYRZB0Ujvf0xD8w6kP7y6RZmgf/oTFTtbbzJVxZWo2Nlqw6TVy5GowNl6ssm7v50obamfSxQAAAAAAAsKLM15fb3vpQAAAABJRU5ErkJggg=="),i._image}},{key:"toggle",value:function(t,e,n,r){if(e){var o=t.root.findById(e);o?o._findInfoWindowByComponent(t)?i.hide(t,e):i.show(t,e,n,r):console.warn("InfoWindow Not Found.",e)}else console.warn("InfoWindow not defined.")}},{key:"hide",value:function(t,e){if(e){var n=t.root.findById(e);n?n._removeInfoWindow(t):console.warn("InfoWindow Not Found.",e)}}},{key:"show",value:function(t,e,n,r){if(e){var o=t.root.findById(e);if(o){if(!o._findInfoWindowByComponent(t)){var a=o.model,u=a.frontSideTemplate,c=void 0===u?"":u,s=a.backSideTemplate,f=[c,void 0===s?"":s].filter((function(t){return String(t).trim()}));if(0!=(f=f.map((function(t){return mn.template(function(t,e,n){return(e||n?['<div class="info-window-btns">',e?'<button class="closable">X</button>':"",n?'<button class="flipable">⇌</button>':"","</div>"]:[]).concat(['<div class="info-window-content">',t,"</div>"]).join("")}(t,!n,2==f.length))}))).length){var l='\n.flip {\n backface-visibility: hidden;\n -moz-backface-visibility: hidden;\n -ms-backface-visibility: hidden;\n -o-backface-visibility: hidden;\n -webkit-backface-visibility: hidden;\n border-radius: 7px;\n height: auto;\n font: normal 14px helvetica, arial, san serif;\n position: absolute;\n opacity:.9;\n transform-origin: 50% 50% 0px;\n -moz-transform-origin: 50% 50% 0px;\n -ms-transform-origin: 50% 50% 0px;\n -o-transform-origin: 50% 50% 0px;\n -webkit-transform-origin: 50% 50% 0px;\n transition: all 2s;\n -moz-transition: all 2s;\n -ms-transition: all 2s;\n -o-transition: all 2s;\n -webkit-transition: all 2s;\n min-width: 100px;min-height:50px;\n background-color:#3e424e;\n box-shadow: 2px 3px 2px 0px rgba(0,0,0,0.15);\n}\n\n#side-1 {\n transform: rotateY( 0deg );\n -moz-transform: rotateY( 0deg );\n -ms-transform: rotateY( 0deg );\n -o-transform: rotateY( 0deg );\n -webkit-transform: rotateY( 0deg );\n}\n.flip:after{\n content:"";\n display:block;\n position: absolute;\n opacity:.9;\n width: 0;\n height: 0;\n}\n.flip.arrow-top:after{\n left:45%;\n top:-17px;\n border-left:10px solid transparent;\n border-bottom:18px solid #323b44;\n border-right:10px solid transparent;\n}\n.flip.arrow-right:after{\n left:100%;\n top:48%;\n border-top:10px solid transparent;\n border-left:18px solid #323b44;\n border-bottom:10px solid transparent;\n}\n.flip.arrow-bottom:after{\n left:45%;\n top:100%;\n border-left:10px solid transparent;\n border-top:18px solid #323b44;\n border-right:10px solid transparent;\n}\n.flip.arrow-left:after{\n right:100%;\n top:48%;\n border-top:10px solid transparent;\n border-right:18px solid #323b44;\n border-bottom:10px solid transparent;\n}\n\n#side-2 {\n transform: rotateY( 180deg );\n -moz-transform: rotateY( 180deg );\n -ms-transform: rotateY( 180deg );\n -o-transform: rotateY( 180deg );\n -webkit-transform: rotateY( 180deg );\n}\n\n.flip-side-1 {\n transform: rotateY( 0deg ) !important;\n -moz-transform: rotateY( 0deg ) !important;\n -ms-transform: rotateY( 0deg ) !important;\n -o-transform: rotateY( 0deg ) !important;\n -webkit-transform: rotateY( 0deg ) !important;\n}\n\n.flip-side-2 {\n transform: rotateY( 180deg ) !important;\n -moz-transform: rotateY( 180deg ) !important;\n -ms-transform: rotateY( 180deg ) !important;\n -o-transform: rotateY( 180deg ) !important;\n -webkit-transform: rotateY( 180deg ) !important;\n}\n\n.info-window-btns{\n position:absolute;\n top:-18px;\n right:5px;\n overflow:hidden;\n}\n.info-window-content{\n padding:10px;\n color:#efefef;\n font-size:13px;\n line-height:1.4;\n}\n.info-window-btns button{\n width:40px;height:40px;\n float:right;\n border:0;\n border-radius:50%;\n background-color:#2a7da1;\n margin-right:3px;\n text-align:center;\n cursor:pointer;\n font-size:35px;\n color:#fff;\n line-height:0;\n}\n.info-window-btns button:hover{\n background-color:#60bb23;\n}\n'+o.get("style"),h=t.bounds,p=h.left,d=h.top,y=r?t.rootModel.transcoordC2S(r.x,r.y):t.transcoordS2T(p,d);p=y.x,d=y.y;var v=document.createElement("span");v.style.position="absolute";var g=document.createElement("style");if(g.type="text/css",g.styleSheet?g.styleSheet.cssText=l:g.appendChild(document.createTextNode(l)),v.appendChild(g),f[0]){var m=document.createElement("div");m.id="side-1",m.className="flip",m.style.display="inline-block",m.innerHTML=f[0](t)}if(f[1]){var b=document.createElement("div");b.id="side-2",b.className="flip",b.style.display="inline-block",b.innerHTML=f[1](t)}re.forEach((function(t){v.addEventListener(t,(function(t){t.stopPropagation()}))})),oe.forEach((function(t){v.addEventListener(t,(function(t){t.stopPropagation()}))}));var w=t.root.model_layer.overlay;if(m&&v.appendChild(m),b&&v.appendChild(b),w.appendChild(v),o._addInfoWindow(t,v,g),m){var x=m.querySelector(".info-window-btns > .flipable");x&&x.addEventListener("click",(function(t){t.preventDefault(),b.className=Xn(b.className,"flip-side-1"),m.className=Xn(m.className,"flip-side-2")}),!1);var _=m.querySelector(".info-window-btns > .closable");_&&_.addEventListener("click",(function(n){n.preventDefault(),i.hide(t,e)}),!1)}if(b){var k=b.querySelector(".info-window-btns > .flipable");k&&k.addEventListener("click",(function(t){t.preventDefault(),b.className=Xn(b.className,"flip-side-1"),m.className=Xn(m.className,"flip-side-2")}),!1);var A=b.querySelector(".info-window-btns > .closable");A&&A.addEventListener("click",(function(n){n.preventDefault(),i.hide(t,e)}),!1)}var S=m.offsetWidth,O=m.offsetHeight,E=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,t.rootModel.target.getBoundingClientRect()),P=[];m&&P.push(m),b&&P.push(b);var j={x:p,y:d},M=t.transcoordS2C(j.x,j.y);if(M.x+S/2+E.left<E.right&&M.x-S/2>E.left){if(O+20<M.y)return v.style.marginLeft=j.x-S/2+"px",v.style.marginTop=j.y-O-20+"px",void P.forEach((function(t){return t.className+=" arrow-bottom"}));if(M=t.transcoordS2C(j.x,j.y+O+20),E.bottom>M.y+E.top)return v.style.marginLeft=j.x-S/2+"px",v.style.marginTop=j.y+20+"px",void P.forEach((function(t){return t.className+=" arrow-top"}))}if((M=t.transcoordS2C(j.x,j.y)).x-(S+20)>E.left)return v.style.marginLeft=j.x-S-20+"px",v.style.marginTop=j.y-O/2+"px",void P.forEach((function(t){return t.className+=" arrow-right"}));v.style.marginLeft=j.x+20+"px",v.style.marginTop=j.y-O/2+"px",P.forEach((function(t){return t.className+=" arrow-left"}))}}}else console.warn("InfoWindow Not Found.",e)}else console.warn("InfoWindow not defined.")}}],(n=[{key:"dispose",value:function(){var t=this;this.infoWindows.map((function(t){return t.component})).forEach((function(e){return t._removeInfoWindow(e)})),Nn(Wn(i.prototype),"dispose",this).call(this)}},{key:"infoWindows",get:function(){return this._windows||(this._windows=[]),this._windows}},{key:"_findInfoWindowByComponent",value:function(t){return this.infoWindows.find((function(e){return e.component===t}))}},{key:"_addInfoWindow",value:function(t,e,n){this._findInfoWindowByComponent(t)||this._windows.push({component:t,window:e,styleElement:n})}},{key:"_removeInfoWindow",value:function(t){var e=this._findInfoWindowByComponent(t);if(e){var n=e.window;n&&n.parentNode.removeChild(n);var r=this.infoWindows.lastIndexOf(e);this.infoWindows.splice(r,1)}}},{key:"render",value:function(t){var e=this.bounds,n=e.left,r=e.top,o=e.width,a=e.height;t.beginPath(),this.drawImage(t,i.image,n,r,o,a)}},{key:"hasTextProperty",get:function(){return!1}},{key:"nature",get:function(){return Vn}}])&&Fn(e.prototype,n),r&&Fn(e,r),i}(Bn(Pn));function Kn(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 Qn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}mn.register("info-window",qn);var Jn={};var Zn={list:function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Kn(Object(n),!0).forEach((function(e){Qn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},Jn)},register:function(t,e){Jn[t]=e},unregister:function(t){delete Jn[t]},get:function(t){if(t){var e=Jn[t];return e||pe("Layout Not Found - ",t),e}}},$n={reflow:function(t,e){this.drawables(t).filter((function(t){return t.isHTMLElement()})).forEach((function(t){return t.reposition()}))},capturables:function(t){return t.components},drawables:function(t){return t.app&&!t.app.isViewMode?t.components:t.components.filter((function(t){return!t.hidden}))},isStuck:function(t){return!1},ABSOLUTE:!0};Zn.register("html-absolute",$n);var tr=$n;function er(t){t.hasOwnProperty("_backupStrokeStyle")||(t._backupStrokeStyle=t.model.strokeStyle,t.set("strokeStyle","#f26522"),t.hasOwnProperty("_backupLineWidth")||(t._backupLineWidth=t.model.lineWidth,t.set("lineWidth",t.model.lineWidth+5)))}function nr(t){t.hasOwnProperty("_backupStrokeStyle")&&(t.set("strokeStyle",t._backupStrokeStyle),delete t._backupStrokeStyle,t.hasOwnProperty("_backupLineWidth")&&(t.set("lineWidth",t._backupLineWidth),delete t._backupLineWidth))}function rr(t){return function(t){if(Array.isArray(t))return or(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return or(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return or(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function or(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}var ir='\n<div class="popup-content">\n</div>\n<button class="closable-1945">X</button>\n',ar="\nbutton.closable-1945 {\n width: 20px;\n height: 20px;\n right: 0px;\n top: 0px;\n padding: 0;\n margin: 0;\n border: 0px;\n text-align: center;\n cursor: pointer;\n font-size: 12px;\n color: black;\n position: absolute;\n background-color: transparent;\n}\n\nbutton.closable-1945:hover {\n background-color:#60bb23;\n}\n",ur=new WeakMap;function cr(t,e,n){var r=t.root;if(r!==t){sr(t);var o=ur.get(r)||[];o=[].concat(rr(o),[[t,{div:e,scene:n}]]),ur.set(r,o)}}function sr(t){var e=t.root,n=ur.get(e);if(n)if(e!==t){var r=n.findIndex((function(e){return e[0]===t}));if(-1!==r){var o=n[r][1],i=o.div.parentNode;i&&i.removeChild(o.div);var a=o.scene;a.target=null,a.release(),n.splice(r,1)}}else{for(var u in n)sr(u[0]);ur.delete(e)}}function fr(t){sr(t)}function lr(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.data,o=n.location,i=void 0===o?"center":o,a=n.modal,u=void 0!==a&&a,c=n.closable,s=void 0===c||c,f=t.app.refProvider;f&&f.get(e,!0).then((function(e){var n,o=document.createElement("div"),a=o.style;if(u){var c=t.rootModel.bounds,f=c.width,l=c.height;a.position="fixed",a.zIndex=1,a.left=0,a.top=0,a.width=f+"px",a.height=l+"px",a.overflow="auto",a.backgroundColor="rgba(0,0,0,0.3)"}else a.position="absolute",a.display="inline-block";o.innerHTML=!u&&s?ir:'\n<div class="popup-content">\n</div>\n';var h=o.querySelector(".popup-content"),p=e.root.model;f=p.width,l=p.height;h.style.width=f+"px",h.style.height=l+"px";var d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=ar:d.appendChild(document.createTextNode(ar)),o.appendChild(d);var y=o.querySelector(".popup-content");re.forEach((function(t){y.addEventListener(t,(function(t){t.stopPropagation()}))})),oe.forEach((function(t){y.addEventListener(t,(function(t){t.stopPropagation()}))})),o.addEventListener("click",(function(e){s&&fr(t)})),re.forEach((function(t){o.addEventListener(t,(function(t){t.stopPropagation()}))})),oe.forEach((function(t){o.addEventListener(t,(function(t){t.stopPropagation()}))})),t.root.model_layer.overlay.appendChild(o),cr(t,o,e),null===(n=o.querySelector(".closable-1945"))||void 0===n||n.addEventListener("click",(function(e){e.preventDefault(),fr(t)}),!1),o.addEventListener("close-scene",(function(e){e.preventDefault(),fr(t),t.data=e.detail}),!1),e.target=h,e.data=r||t.data,e.fit("both");var v=hr(t.rootModel,e.root,t.center,i);u?(h.style.left=v.x+"px",h.style.top=v.y+"px",h.style.width=f+"px",h.style.height=l+"px"):(o.style.left=v.x+"px",o.style.top=v.y+"px",o.style.width=f+"px",o.style.height=l+"px")}),(function(t){console.error("cannot fetch board: "+e,t)}))}function hr(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"center",o=t.bounds,i=e.bounds,a=Math.max(o.width/4-i.width/2,20),u=Math.min(3*o.width/4+i.width/2,o.width-20)-i.width,c=Math.max(o.height/4-i.height/2,20),s=Math.min(3*o.height/4+i.height/2,o.height-20)-i.height;switch(r){case"auto":return{x:n.x<o.width/2?u:a,y:n.y<o.height/2?s:c};case"left-top":return{x:a,y:c};case"right-top":return{x:u,y:c};case"left-bottom":return{x:a,y:s};case"right-bottom":return{x:u,y:s};case"center":default:return{x:(o.width-i.width)/2,y:(o.height-i.height)/2}}}var pr={reflow:function(t,e){},capturables:function(t){return t.components},drawables:function(t){return t.app.isViewMode?t.components.filter((function(t){return!t.hidden})):t.components},isStuck:function(t){return!1},ABSOLUTE:!0};Zn.register("absolute",pr);var dr=pr;function yr(t){var e=t.components.filter((function(t){return!t.hidden})),n=t.get("layoutConfig")||{},r=e[n&&n.activeIndex||0];return r&&[r]||[]}var vr={reflow:function(t){var e=t.bounds,n=t.get("layoutConfig")||{},r={left:0,top:0,width:e.width,height:e.height};t.forEach((function(t,e){var o=e!=n.activeIndex;t.bounds=r,t.set("rotation",0),t.element&&(t.element.style.display=o?"none":"block")}))},capturables:function(t){return yr(t)},drawables:function(t){return yr(t)},isStuck:function(t){return!0}};Zn.register("card",vr);var gr=vr;function mr(t){var e=t.get("layoutConfig");return e&&e.weight||1}var br={reflow:function(t){var e=this.drawables(t),n=t.get("padding")||{},r=e.reduce((function(t,e){return t+mr(e)}),0),o=t.bounds,i=r>0?(o.width-((n.left||0)+(n.right||0)))/r:o.width,a=o.height-((n.top||0)+(n.bottom||0)),u=0;e.forEach((function(t){var e=mr(t),r=t.get("margin")||{};t.bounds={left:i*u+(n.left||0)+(r.left||0),top:0+(n.top||0)+(r.top||0),width:e*i-((r.left||0)+(r.right||0)),height:a-((r.top||0)+(r.bottom||0))},t.set("rotation",0),u+=e}))},capturables:function(t){return t.components},drawables:function(t){return t.app.isViewMode?t.components.filter((function(t){return!t.hidden})):t.components},isStuck:function(t){return!0}};Zn.register("linear-horizontal",br);var wr=br;function xr(t){var e=t.get("layoutConfig");return e&&e.weight||1}var _r={reflow:function(t){var e=this.drawables(t),n=t.get("padding")||{},r=e.reduce((function(t,e){return t+xr(e)}),0),o=t.bounds,i=r>0?(o.height-((n.top||0)+(n.bottom||0)))/r:o.height,a=o.width-((n.left||0)+(n.right||0)),u=0;e.forEach((function(t){var e=xr(t),r=t.get("margin")||{};t.bounds={left:0+(n.left||0)+(r.left||0),top:i*u+(n.top||0)+(r.top||0),width:a-((r.left||0)+(r.right||0)),height:e*i-((r.top||0)+(r.bottom||0))},t.set("rotation",0),u+=e}))},capturables:function(t){return t.components},drawables:function(t){return t.app.isViewMode?t.components.filter((function(t){return!t.hidden})):t.components},isStuck:function(t){return!0}};Zn.register("linear-vertical",_r);var kr=_r,Ar={reflow:function(t){var e=t.get("layoutConfig"),n=e&&e.columns||t.get("columns"),r=e&&e.rows||t.get("rows"),o=e&&e.widths||t.get("widths"),i=e&&e.heights||t.get("heights"),a=o?o.filter((function(t,e){return e<n})).reduce((function(t,e){return t+e}),0):n,u=i?i.filter((function(t,e){return e<r})).reduce((function(t,e){return t+e}),0):r,c=t.textBounds,s=t.get("paddingLeft")||0,f=t.get("paddingTop")||0,l=c.width/a,h=c.height/u,p=0,d=0;t.components.forEach((function(t,e){for(var r=o?o[e%n]:1,a=i?i[Math.floor(e/n)]:1,u=t.colspan||1,c=0;--u>0;)c+=o?o[(e+u)%n]:1;for(var y=t.rowspan||1,v=0;--y>0;)v+=i?i[Math.floor(e/n)+y]:1;t.bounds={left:s+p,top:f+d,width:l*(r+c),height:h*(a+v)},t.set("rotation",0),e%n==n-1?(p=0,d+=a*h):p+=r*l}))},capturables:function(t){return t.components.filter((function(t){return!t.merged}))},drawables:function(t){return t.components.filter((function(t){return!t.merged&&!t.hidden}))},isStuck:function(t){return!0},keyNavigate:function(t,e,n){var r=t.get("layoutConfig"),o=r&&r.columns||t.get("columns"),i=r&&r.rows||t.get("rows"),a=t.getRowColumn(e),u=a.row,c=a.column;switch(n.code){case"ArrowUp":if(u>0)return t.getAt((u-1)*o+c);break;case"ArrowDown":if(u<i-1)return t.getAt((u+1)*o+c);break;case"ArrowRight":if(c<o-1)return t.getAt(u*o+c+1);break;case"ArrowLeft":if(c>0)return t.getAt(u*o+c-1);break;default:return e}},joinType:!0};Zn.register("table",Ar);var Sr=Ar;function Or(t){return(Or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Er(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pr(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 jr(){return(jr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Mr(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Mr(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Cr(t)););return t}function Rr(t,e){return(Rr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Tr(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=Cr(t);if(e){var o=Cr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ir(this,n)}}function Ir(t,e){if(e&&("object"===Or(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 Cr(t){return(Cr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var zr=new Image;zr.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAclBMVEVHcEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC0BbqFAAAAJXRSTlMAgAP3VSI6/g9fBk5FavJsMrariSjzPnO1enRRL5SMhmOOWB9keFTE0wAAANxJREFUOMutk9kWgyAMRLFuiLjUtdp9yf//YglVsQXz1HniMPcEMgHGvpX2O0Ypi+EgCL+IAShC+wB7QfubRDT7AFcnUPoLMLiP4PyJbsb55i05AgnR5iaQDsICgtH0cotBWoAP1c7kC6kFxEseCfZfB6gEgbNeBrira2QmH1uVYCXlA3is8UmgUCPIyQJKEmu8QtQJN0e9DPXVpzG2G216c1CqRmcBOdxXk07sWUSPv07zo0amCNQycv+NzmR6cRcwmfbuI7p2nZ/z4be0P83Foz6vIkhfZXr82XgDlZsspIq4peUAAAAASUVORK5CYII=";var Br=function(t){return function(t){!function(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&&Rr(t,e)}(i,t);var e,n,r,o=Tr(i);function i(){return Er(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"postrender",value:function(t){jr(Cr(i.prototype),"postrender",this).call(this,t),this.app.isEditMode&&this._focused&&this.showMoveHandle&&this._draw_move_handle(t)}},{key:"_draw_move_handle",value:function(t){var e=this.bounds,n=e.left,r=e.top,o=e.width;t.save(),t.beginPath(),t.rect(n+o,r,25,25),t.fillStyle="rgba(".concat(235,", ").concat(235,", ").concat(235,", 1)"),t.strokeStyle="#333",t.fill(),t.stroke(),t.drawImage(zr,n+o+3.75,r+3.75,17.5,17.5),t.closePath(),t.restore()}},{key:"contains",value:function(t,e){var n=jr(Cr(i.prototype),"contains",this).call(this,t,e);if(this.app.isViewMode)return n;var r=this.bounds,o=r.left,a=r.top,u=r.width,c=(r.height,o+u);return this.showMoveHandle&&(n=n||t<Math.max(c+25,c)&&t>Math.min(c+25,c)&&e<Math.max(a+25,a)&&e>Math.min(a+25,a)),this._focused=!!n,this.invalidate(),n}}])&&Pr(e.prototype,n),r&&Pr(e,r),i}(t)};function Lr(t){return(Lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Dr(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 Fr(){return(Fr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Nr(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Nr(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Hr(t)););return t}function Ur(t,e){return(Ur=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Yr(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=Hr(t);if(e){var o=Hr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Gr(this,n)}}function Gr(t,e){if(e&&("object"===Lr(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 Hr(t){return(Hr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Wr=[],Vr=function(t){!function(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&&Ur(t,e)}(i,t);var e,n,r,o=Yr(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e))._components=[],n}return e=i,(n=[{key:"showMoveHandle",get:function(){return!0}},{key:"dispose",value:function(){this.components.slice().forEach((function(t){return t.dispose()})),Fr(Hr(i.prototype),"dispose",this).call(this)}},{key:"isContainer",value:function(){return!0}},{key:"containable",value:function(t){return t.isDescendible(this)&&"variable"!==t.get("type")}},{key:"hasTextProperty",get:function(){return!1}},{key:"components",get:function(){return this._components}},{key:"focusible",get:function(){return!0}},{key:"layout",get:function(){return Zn.get(this.get("layout"))||dr}},{key:"reflow",value:function(){this.layout.reflow(this),this.components&&this.components.forEach((function(t){t.isContainer()&&t.reflow()}))}},{key:"hierarchy",get:function(){var t=Fr(Hr(i.prototype),"hierarchy",this);return this.components&&(t.components=this.components.map((function(t){return t.hierarchy}))),t}},{key:"addComponent",value:function(t){var e=t.parent;if(e){if(this===e)return;e.removeComponent(t)}var n=this._components.push(t)-1;t.parent=this,t.added(this),this.trigger("add",this,t,n),t.delegate_on(this),t.trigger("added",this,t,n),this.root&&this.root.isReady&&t.ready()}},{key:"removeComponent",value:function(t){var e=this._components.indexOf(t);-1!=e&&(this._components.splice(e,1),t.parent=null,t.removed(this),this.trigger("remove",this,t),t.trigger("removed",this,t),t.delegate_off(this))}},{key:"insertComponentAt",value:function(t,e){var n=t.parent;n&&n.removeComponent(t);var r=this._components.splice(0,e);this._components=r.concat(t,this._components),e=this._components.indexOf(t),t.parent=this,t.added(this),this.trigger("add",this,t,e),t.delegate_on(this),t.trigger("added",this,t,e)}},{key:"add",value:function(t){var e=this;return t instanceof Array?(t.forEach((function(t){-1==e._components.indexOf(t)&&e.addComponent(t)})),this):this.add.call(this,[t])}},{key:"remove",value:function(t){var e=this;return t instanceof Array?this._components?(t.forEach((function(t){e.removeComponent(t)})),this):this:this.remove.call(this,[t])}},{key:"getAt",value:function(t){if(this._components)return this._components[t]}},{key:"forEach",value:function(t,e){this._components&&this._components.forEach(t,e)}},{key:"traverse",value:function(t,e){t.call(e,this),this._components&&this._components.forEach((function(n){n.isContainer()?n.traverse(t,e):t.call(e,n)}))}},{key:"indexOf",value:function(t){return(this._components||Wr).indexOf(t)}},{key:"size",value:function(){return(this._components||Wr).length}},{key:"moveChildAt",value:function(t,e){var n=this.indexOf(e);if(-1!=n){var r=this._components.splice(0,n),o=this._components.splice(1);this._components=r.concat(o),t=Math.max(0,t),t=Math.min(t,this._components.length),r=this._components.splice(0,t),this._components=r.concat(e,this._components)}}},{key:"moveChildForward",value:function(t){var e=this.indexOf(t);-1!=e&&e!=this.size()-1&&(this._components[e]=this._components[e+1],this._components[e+1]=t)}},{key:"moveChildBackward",value:function(t){var e=this.indexOf(t);-1!=e&&0!=e&&(this._components[e]=this._components[e-1],this._components[e-1]=t)}},{key:"moveChildToFront",value:function(t){var e=this.indexOf(t);if(-1!=e&&e!=this.size()-1){var n=this._components.splice(0,e),r=this._components.splice(1);this._components=n.concat(r,this._components)}}},{key:"moveChildToBack",value:function(t){var e=this.indexOf(t);if(-1!=e&&0!=e){var n=this._components.splice(0,e),r=this._components.splice(0);this._components=this._components.concat(n,r)}}},{key:"symmetryX",value:function(t){Fr(Hr(i.prototype),"symmetryX",this).call(this,t),this.components.map((function(t){t.symmetryX(0)}))}},{key:"findAll",value: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];if("string"==typeof t)return g(t,this,n[0]||this);if("function"==typeof t){for(var o=[],i=this.components.length-1;i>=0;i--){var a,u=(a=this.components[i]).findAll.apply(a,[t].concat(n));u&&(o=o.concat(u))}return t.apply(void 0,[this].concat(n))&&o.push(this),o}}},{key:"findFirst",value: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];if("string"==typeof t)return g(t,this,n[0])[0];if("function"==typeof t){for(var o=this.components.length-1;o>=0;o--){var i,a=(i=this.components[o]).findFirst.apply(i,[t].concat(n));if(null!=a)return a}return t.apply(void 0,[this].concat(n))?this:null}}},{key:"findById",value:function(t){return this.root.findById(t)}},{key:"contains",value:function(t,e){var n=Fr(Hr(i.prototype),"contains",this).call(this,t,e);if(!n){var r=this.model,o=r.left,a=r.top,u=r.width,c=r.height,s=r.lineWidth,f=void 0===s?0:s,l=this.stuck?0:10+f/2;n=t<Math.max(o+u,o)+l&&t>Math.min(o+u,o)-l&&e<Math.max(a+c,a)+l&&e>Math.min(a+c,a)-l}return n}},{key:"capture",value:function(t,e){var n=this.transcoordP2S(t,e);if(!this.contains(n.x,n.y))return!1;var r=this.bounds;n.x-=r.left,n.y-=r.top;for(var o=this.layout.capturables(this),i=o.length-1;i>=0;i--){var a=o[i].capture(n.x,n.y);if(a)return a}return this.capturable&&this}},{key:"capturePath",value:function(t,e){if(e){if(e.indexOf(this)>-1)return!1;for(var n=0;n<e.length;n++)if(!this.containable(e[n]))return!1}for(var r=[],o=this.bounds,i=o.left,a=o.top,u=o.width,c=o.height,s=0;s<t.length;s++){var f=this.transcoordP2S(t[s].x,t[s].y);if(f.x<i||f.x>i+u||f.y<a||f.y>a+c)return!1;f.x-=i,f.y-=a,r.push(f)}for(var l=this.layout.capturables(this),h=l.length-1;h>=0;h--){var p=l[h];if(p.isContainer()){var d=p.capturePath(r,e);if(d)return d}}return this.focusible&&this}},{key:"render",value:function(t){var e=this.bounds,n=e.left,r=void 0===n?0:n,o=e.top,i=void 0===o?0:o,a=e.width,u=e.height;t.beginPath(),t.rect(r,i,a,u),this.drawFill(t),this.drawStroke(t)}},{key:"postrender",value:function(t){Fr(Hr(i.prototype),"postrender",this).call(this,t);var e=this.model,n=e.top,r=e.left;e.scale,t.translate(r,n),this.layout.drawables(this).forEach((function(e){e.draw(t)})),t.translate(-r,-n),this.drawText(t)}},{key:"trim",value:function(){this.components.forEach((function(t){t.trim()})),Fr(Hr(i.prototype),"trim",this).call(this)}}])&&Dr(e.prototype,n),r&&Dr(e,r),i}(Br(Bn(mn)));function Xr(t){return(Xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qr(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 Kr(){return(Kr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Qr(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Qr(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=to(t)););return t}function Jr(t,e){return(Jr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Zr(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=to(t);if(e){var o=to(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $r(this,n)}}function $r(t,e){if(e&&("object"===Xr(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 to(t){return(to=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}["layout"].forEach((function(t){return mn.memoize(Vr.prototype,t,!1)}));var eo=function(t){!function(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&&Jr(t,e)}(i,t);var e,n,r,o=Zr(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),n=o.call(this,t,e),t.translate=t.translate||{x:0,y:0},n._draw_reserved=!1,n.__draw__=function(){n._draw_reserved=!1,n.trigger("redraw"),n.reflow(),n.draw()},n.throttle_render=function(){n._draw_reserved||requestAnimationFrame(n.__draw__),n._draw_reserved=!0},n}return e=i,(n=[{key:"fitSize",value:function(t,e,n,r){if(this.target){if(e){var o=getComputedStyle(this.target);n=n||(o?parseFloat(o.getPropertyValue("width")):this.target.offsetWidth),r=r||(o?parseFloat(o.getPropertyValue("height")):this.target.offsetHeight)}else n=this.model.width,r=this.model.height;"CANVAS"==t.tagName&&(t.setAttribute("width",n*ne),t.setAttribute("height",r*ne)),t.style.width=n+"px",t.style.height=r+"px"}}},{key:"resize",value:function(){var t=this.root.fitMode||this.model.fitMode||"ratio";this.fitSize(this.element,"none"!==t)}},{key:"isLayer",value:function(){return!0}},{key:"createElement",value:function(){var t=mn.createCanvas(1,1);return t.style.position="absolute",t}},{key:"target",get:function(){return this._target},set:function(t){this._target&&this.element&&this._target.removeChild(this.element),this._target=t,t&&(this.element||(this.element=this.createElement()),this.resize(),t.appendChild(this.element))}},{key:"canvas",get:function(){return this.element}},{key:"dispose",value:function(){Kr(to(i.prototype),"dispose",this).call(this),this.target=null,this.element=null}},{key:"selected",get:function(){return this.root.selected},set:function(t){this.root.selected=t}},{key:"focused",get:function(){return this.root.focused},set:function(t){this.root.focused=t}},{key:"getContext",value:function(){return this._context2D||(this._context2D=this.canvas&&this.canvas.getContext("2d")),this._context2D}},{key:"draw",value:function(t){this.canvas&&(t=t||this.getContext())&&Kr(to(i.prototype),"draw",this).call(this,t)}},{key:"prerender",value:function(t){var e=this.model,n=e.translate,r=e.scale,o=void 0===r?{x:1,y:1}:r,i=e.rotation;t.clearRect(0,0,t.canvas.width,t.canvas.height),n&&t.translate(n.x*ne,n.y*ne),t.scale(o.x*ne,o.y*ne),i&&t.rotate(i)}},{key:"rotatePoint",get:function(){return{x:0,y:0}}},{key:"contains",value:function(t,e){return!1}},{key:"invalidate",value:function(){this.throttle_render()}},{key:"move",value:function(t){var e=this.get("translate")||{x:0,y:0};this.set({translate:{x:e.x+t.x,y:e.y+t.y}})}}])&&qr(e.prototype,n),r&&qr(e,r),i}(Vr);function no(t){return(no="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ro(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 oo(){return(oo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=io(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function io(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=so(t)););return t}function ao(t,e){return(ao=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function uo(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=so(t);if(e){var o=so(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return co(this,n)}}function co(t,e){if(e&&("object"===no(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 so(t){return(so=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var fo={x:1,y:1},lo={x:0,y:0},ho=function(t){!function(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&&ao(t,e)}(i,t);var e,n,r,o=uo(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,t,e)}return e=i,(n=[{key:"dispose",value:function(){oo(so(i.prototype),"dispose",this).call(this),delete this._canvas,delete this._overlay}},{key:"contains",value:function(t,e){return!0}},{key:"isRootModel",value:function(){return!0}},{key:"stuck",get:function(){return!0}},{key:"layout",get:function(){return tr}},{key:"overlay",get:function(){if(!this._overlay){var t=document.createElement("div");t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="initial",t.style["user-select"]="none",t.style["transform-origin"]="top left",this.element&&this.element.appendChild(t),this._overlay=t,this._repositionOverlay()}return this._overlay}},{key:"createElement",value:function(){var t=document.createElement("div");return t.style.position="absolute",t.style["user-select"]="none",t.style.overflow="hidden",this._canvas=mn.createCanvas(1,1),this._canvas.style.position="absolute",t.appendChild(this._canvas),this._overlay&&t.appendChild(this._overlay),t}},{key:"resize",value:function(){if(this.target){var t,e,n=this.model,r=n.width,o=n.height,i=n.fitMode;this.root.fitMode?i=this.root.fitMode:i||(i="ratio");try{var a=getComputedStyle(this.target)}catch(t){return void console.error(t,this.target)}switch(i){case"both":case"ratio":t=a?parseFloat(a.getPropertyValue("width")):this.target.offsetWidth,e=a?parseFloat(a.getPropertyValue("height")):this.target.offsetHeight;break;case"width":e=o*(t=a?parseFloat(a.getPropertyValue("width")):this.target.offsetWidth)/r;break;case"height":t=r*(e=a?parseFloat(a.getPropertyValue("height")):this.target.offsetHeight)/o;break;default:t=r,e=o}switch(this.fitSize(this.canvas,"none"!==i,t,e),i){case"ratio":case"both":break;case"width":this.element.style.overflowX="hidden",this.element.style.overflowY="auto";break;case"height":this.element.style.overflowX="auto",this.element.style.overflowY="hidden";break;default:this.element.style.overflowX="auto",this.element.style.overflowY="auto"}this.fitSize(this.element,!0)}}},{key:"canvas",get:function(){return this._canvas}},{key:"MPP",get:function(){var t=this.model,e=t.scale,n=void 0===e?{x:1,y:1}:e;switch(t.unit){case"mm":case"cm":return 1/this.app.PPM/n.x;case"in":return 1/this.app.PPI/n.x;case"px":default:return 1/n.x}}},{key:"capturePath",value:function(t,e){for(var n=this.layout.capturables(this),r=n.length-1;r>=0;r--){var o=n[r];if(o.isContainer()){var i=o.capturePath(t,e);if(i)return i}}return!1}},{key:"eventMap",get:function(){return{"(self)":{"(all)":{change:this._onchanged_all,mouseenter:this._onmouseenter_all,mouseleave:this._onmouseleave_all,click:this._onclick,mousedown:this._onmousedownup,mouseup:this._onmousedownup,touchstart:this._onmousedownup,touchend:this._onmousedownup}}}}},{key:"_repositionOverlay",value:function(){var t=this._overlay;if(t){var e=this.model,n=e.translate,r=void 0===n?lo:n,o=e.scale,i=void 0===o?fo:o,a=e.rotation,u=void 0===a?0:a,c=this.bounds,s=c.left,f=c.top;c.width,c.height,t.style.left=s+"px",t.style.top=f+"px";var l="rotate(".concat(u,"rad) scale(").concat(i.x,", ").concat(i.y,") perspective(1px)");t.style["margin-left"]=r.x+"px",t.style["margin-top"]=r.y+"px",["-webkit-","-moz-","-ms-","-o-",""].forEach((function(e){t.style[e+"transform"]=l}))}}},{key:"onchange",value:function(t){var e=this._model;delete e.id,delete e.text,delete e.class,this._repositionOverlay()}},{key:"_onchanged_all",value:function(t,e,n){this.invalidate()}},{key:"_onmouseenter_all",value:function(t,e){if(t.stopPropagation(),this.app&&!this.app.isEditMode&&e){var n=e.origin;if(!(n instanceof i)&&n.model.event&&n.model.event.hover&&!n.hidden){var r=n.model.event.hover;r&&this._doEventAction(r,n,!0,!0,t)}}}},{key:"_onmouseleave_all",value:function(t,e){if(t.stopPropagation(),this.app&&!this.app.isEditMode&&e){var n=e.origin,r=n.model.event&&n.model.event.hover;r&&this._doEventAction(r,n,!1,!0,t)}}},{key:"_onclick",value:function(t,e){if(t.stopPropagation(),!this.app.isEditMode&&e){var n=e.origin,r=n.model.event&&n.model.event.tap;r&&this._doEventAction(r,n,!0,!1,t)}}},{key:"_onmousedownup",value:function(t,e){if(t.stopPropagation(),!this.app.isEditMode&&e){var n=e.origin,r=n.model.event&&n.model.event.tap;r&&r.pressed&&this._doMouseDownUpEventAction_1_1(r,n,"mousedown"==t.type||"touchstart"==t.type,t)}}},{key:"_doEventAction",value:function(t,e,n,r,o){t.action?this._doEventAction_1_1(t,e,n,o):this._doEventAction_1_0(t,e,n,r,o)}},{key:"_doEventAction_1_0",value:function(t,e,n,r,o){var i=t.infoWindow,a=t.emphasize,u=t.target,c=t.value;if(a&&(n?er(e):r&&nr(e)),i&&!e.hidden&&(n?qn.show(e,i,!1,{x:o.offsetX,y:o.offsetY}):r&&qn.hide(e,i)),u)if(/^\$/.test(u)){if(!("value"in t))return;n?(r&&(e._lastValue=this.root.variable(u.substring(1))),this.root.variable(u.substring(1),e.access(c))):(this.root.variable(u,e._lastValue),delete e._lastValue)}else"popup"==u?lr(e,c):"modal-popup"==u?lr(e,c,{modal:!0}):"close-scene"==u?(this.overlay.dispatchEvent(new CustomEvent("close-scene",{bubbles:!0,composed:!0,detail:e.data})),this.trigger("close-scene",this)):"infoWindow"==u||"info-window"==u?"click"==o.type&&qn.show(e,c,r,{x:o.offsetX,y:o.offsetY}):"toggle-info-window"==u?qn.toggle(e,c,!1,{x:o.offsetX,y:o.offsetY}):this.trigger(u,e.access(c),e)}},{key:"_doMouseDownUpEventAction_1_1",value:function(t,e,n,r){var o=t.pressed;void 0!==o&&o&&(n?function(t){if(!t.hasOwnProperty("_backupShadow")){var e=t.get("shadow");t._backupShadow=e;var n=e||{},r=n.left,o=void 0===r?0:r,i=n.top,a=void 0===i?0:i;t.delta("tx",o),t.delta("ty",a),t.set("shadow",{})}}(e):function(t){t.hasOwnProperty("_backupShadow")&&(t.delta("tx",0),t.delta("ty",0),t.set("shadow",t._backupShadow),delete t._backupShadow)}(e))}},{key:"_doEventAction_1_1",value:function(t,e,n,r){var o=t.action,i=t.target,a=t.value,u=t.emphasize,c=void 0!==u&&u,s=t.restore,f=void 0!==s&&s;if(t.pressed,i&&(i=e.access(i)),a&&(a=e.access(a)),c&&(n?er(e):f&&nr(e)),o)switch(o){case"data-toggle":if(!i)return;(n||f)&&this.root.findAll(i,e).forEach((function(t){t.data=!t.data}));break;case"data-tristate":if(!i)return;(n||f)&&this.root.findAll(i,e).forEach((function(t){var e=Math.round(Math.max(Number(t.data)||0,0));t.data=(e+(n?1:2))%3}));break;case"data-set":if(!i)return;if(n){var l=a;this.root.findAll(i,e).forEach((function(t){t.data=l}))}break;case"value-set":if(!i)return;n&&(l=a,this.root.findAll(i,e).forEach((function(t){t.value=l})));break;case"infoWindow":case"info-window":if(!i)return;"click"==r.type||n?qn.show(e,i,f,{x:r.offsetX,y:r.offsetY}):f&&qn.hide(e,i);break;case"toggle-info-window":if(!i)return;qn.toggle(e,i,!1,{x:r.offsetX,y:r.offsetY});break;case"popup":if(!i)return;lr(e,i);break;case"modal-popup":if(!i)return;lr(e,i,{modal:!0});break;case"close-scene":this.overlay.dispatchEvent(new CustomEvent("close-scene",{bubbles:!0,composed:!0,detail:e.data}));break;default:this.trigger(o,i,a,e)}}}])&&ro(e.prototype,n),r&&ro(e,r),i}(eo);function po(t){return(po="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vo(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 go(t,e){return(go=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function mo(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=wo(t);if(e){var o=wo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return bo(this,n)}}function bo(t,e){if(e&&("object"===po(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 wo(t){return(wo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}ho.Popup=a,mn.register("model-layer",ho);var xo=[1,2,10,20,50,50,50,50,50,50],_o=function(t){!function(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&&go(t,e)}(i,t);var e,n,r,o=mo(i);function i(){return yo(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(t){var e=this.model,n=e.lineWidth,r=void 0===n?1:n,o=e.fillStyle,i=void 0===o?"lightgray":o,a=e.font,u=void 0===a?"15px Arial":a,c=e.left,s=e.top,f=(e.rotation,e.origin),l=(e.margin,e.width),h=e.height,p=e.side,d=void 0===p?"bottom":p,y=e.strokeStyle,v=void 0===y?"#000000":y,g=e.scale,m=void 0===g?1:g;t.translate(c,s),t.beginPath();var b=Math.round(r/2);t.rect(-b,-b,l+2*b,h+2*b),t.clip(),t.beginPath(),t.rect(0,0,l,h),i&&(t.fillStyle=i,t.fill()),t.lineWidth=r,t.strokeStyle=v,t.stroke(),t.beginPath(),t.font=u;var w="bottom"!==d,x=w?0:h,_=4*h/5,k=2*h/3,A=1*h/2,S=3*h/5;w&&(_=h-_,k=h-k,A=h-A,S=h-1.5*h/5);var O=m*this.app.PPM/this.root.unitScale,E=Math.ceil(f/O),P=this.app.PPM/O,j=P<=1.1?1:xo[Math.round(P)]||100;1!=j&&(E+=(j-E%j)%j);var M=Math.ceil(E*O),R=f+l;for(t.fillStyle=v;M<R;){if(E%10==0){t.moveTo(M-f,A),t.lineTo(M-f,x);var T=(E/10).toString(),I=t.measureText(T);t.fillText(T,M-f-I.width-6,S)}else E%5==0?(t.moveTo(M-f,k),t.lineTo(M-f,x)):(t.moveTo(M-f,_),t.lineTo(M-f,x));E+=j,M=Math.ceil(E*O)}}}])&&vo(e.prototype,n),r&&vo(e,r),i}(Bn(Pn));function ko(t){return(ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ao(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function So(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 Oo(t,e){return(Oo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Eo(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=jo(t);if(e){var o=jo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Po(this,n)}}function Po(t,e){if(e&&("object"===ko(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 jo(t){return(jo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("ruler",_o);var Mo={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"number",label:"round",name:"round",property:"round"}],help:"scene/component/rect"},Ro={ondragmove:function(t,e,n){var r=n.model,o=r.left,i=(r.top,r.width),a=r.height,u=(n.transcoordP2S(t.x,t.y).x-o)/(i/2)*100;u=To(u,i,a),n.set({round:u})}};function To(t,e,n){var r=e>n?n/e*100:100;return t>=r?t=r:t<=0&&(t=0),t}var Io=function(t){!function(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&&Oo(t,e)}(i,t);var e,n,r,o=Eo(i);function i(){return Ao(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"is3dish",value:function(){return!0}},{key:"render",value:function(t){var e=this.model.round,n=void 0===e?0:e,r=this.bounds,o=r.left,i=r.top,a=r.width,u=r.height;t.translate(o,i),t.beginPath();var c=(n=To(n,a,u))/100*(a/2);t.moveTo(c,0),t.arcTo(a,0,a,u,c),t.arcTo(a,u,0,u,c),t.arcTo(0,u,0,0,c),t.arcTo(0,0,a,0,c),t.translate(-o,-i)}},{key:"controls",get:function(){var t=this.model,e=t.left,n=t.top,r=t.width,o=t.round,i=t.height;return[{x:e+r/2*((o=null==o?0:To(o,r,i))/100),y:n,handler:Ro}]}},{key:"nature",get:function(){return Mo}}])&&So(e.prototype,n),r&&So(e,r),i}(Bn(Pn));function Co(t){return(Co="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zo(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 Bo(){return(Bo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Lo(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Lo(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Uo(t)););return t}function Do(t,e){return(Do=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Fo(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=Uo(t);if(e){var o=Uo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return No(this,n)}}function No(t,e){if(e&&("object"===Co(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 Uo(t){return(Uo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("rect",Io);var Yo=90*Math.PI/180;function Go(t,e,n){return{left:-t.x,top:-t.y,width:20,height:20}}function Ho(t,e,n,r){return{left:20-t.x,top:0-t.y,origin:20-t.x,width:e-20,height:20}}function Wo(t,e,n,r){var o={x:0-t.x+10,y:20-t.y+(n-20)/2},i=mn.transcoordRR(0-t.x,20-t.y,o,Yo);return{left:i.x-(n-20),top:i.y,origin:20-t.y,width:n-20,height:20}}function Vo(t){var e=t.get("translate");return{left:-e.x,top:-e.y,width:t.canvas.width/ne,height:t.canvas.height/ne}}var Xo=function(t){!function(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&&Do(t,e)}(i,t);var e,n,r,o=Fo(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e)).appScale={x:1,y:1},"disabled"!==t.ruler&&(n.hruler=new _o({left:20,top:0,origin:20,margin:0,height:20,unit:"m",rotation:0,font:"9px Verdana",fillStyle:"#f4f4f4",strokeStyle:"#999",capturable:!1}),n.vruler=new _o({left:0,top:0,origin:20,margin:0,height:20,unit:"m",rotation:Yo,font:"9px Verdana",side:"top",fillStyle:"#f4f4f4",strokeStyle:"#999",capturable:!1}),n.origin_rect=new Io({left:-20,top:-20,width:20,height:20,fillStyle:"#f4f4f4",strokeStyle:"#999",lineWidth:1}),n.addComponent(n.hruler),n.addComponent(n.vruler),n.addComponent(n.origin_rect)),n.invalidate(),n}return e=i,(n=[{key:"capturable",get:function(){return!1}},{key:"ready",value:function(){if(this.hruler){var t=this.rootModel,e=Object.assign({},t.get("translate"));e.x<20&&(e.x+=20),e.y<20&&(e.y+=20);var n=t.get("scale")||{x:1,y:1};this.appScale=n,this.hruler.set("scale",n.x),this.vruler.set("scale",n.y),t.set("translate",e),this.set("translate",e),this.screen_coord=Vo(this);var r=this.screen_coord,o=r.width,i=r.height;this.hruler.set(Ho(e,o,0,this.hruler)),this.vruler.set(Wo(e,0,i,this.vruler)),this.origin_rect.set(Go(e))}else this.screen_coord=Vo(this)}},{key:"resize",value:function(){Bo(Uo(i.prototype),"resize",this).call(this),this.screen_coord=Vo(this);var t=this.screen_coord,e=t.width,n=t.height;this.hruler&&(this.hruler.set(Ho(this.model.translate,e,0,this.hruler)),this.vruler.set(Wo(this.model.translate,0,n,this.vruler)),this.origin_rect.set(Go(this.model.translate)))}},{key:"render",value:function(t){if(this.guide){t.save();var e=this.guide,n=e.x,r=e.y,o=this.screen_coord,i=o.top,a=o.left,u=o.width,c=o.height;t.beginPath(),t.moveTo(n,i),t.lineTo(n,i+c),t.moveTo(a,r),t.lineTo(a+u,r),t.lineWidth=1,t.strokeStyle="tomato",t.setLineDash([2,3]),t.font="10px tahoma",t.fillStyle="#333";var s=this.transcoordS2C(n,r,this.rootModel);t.textBaseline=s.y>200?"bottom":"top",t.textAlign=s.x>200?"right":"left";var f=s.y>200?-5:5,l=s.x>200?-5:5,h=Math.round(n/this.appScale.x),p=Math.round(r/this.appScale.y);t.fillText(" ".concat(h,", ").concat(p," "),n+l,r+f),t.stroke(),t.restore()}}},{key:"guide",get:function(){return this._guide},set:function(t){this._guide=t,this.invalidate()}},{key:"contains",value:function(t,e){return!0}},{key:"eventMap",get:function(){return{"(root)":{"(descendant)":{mousemove:this.onmousemove_child,mouseout:this.onmouseout_child,dragmove:this.onmousemove_child},"model-layer":{change:this.onchange_root_model}},"(self)":{"(descendant)":{mousedown:this.onmousedown_origin}}}}},{key:"onmousedown_origin",value:function(t,e){this.rootModel.set("translate",{x:20,y:20})}},{key:"onchange_root_model",value:function(t,e,n){if(t.scale&&(this.appScale=t.scale,this.hruler&&(this.hruler.set("scale",t.scale.x),this.vruler.set("scale",t.scale.y))),t.translate&&this.set({translate:{x:t.translate.x,y:t.translate.y}}),t.scale||t.translate){if(this.screen_coord=Vo(this),this.hruler){var r=this.model.translate,o=this.screen_coord,i=o.width,a=o.height;this.hruler.set(Ho(r,i,0,this.hruler)),this.vruler.set(Wo(r,0,a,this.vruler)),this.origin_rect.set(Go(r))}this._guide=null}this.invalidate()}},{key:"onmouseout_child",value:function(t){this._guide=null,this.invalidate()}},{key:"onmousemove_child",value:function(t,e){t.target&&"CANVAS"!==t.target.tagName?this.guide=null:this.guide=this.transcoordC2S(t.offsetX,t.offsetY)}}])&&zo(e.prototype,n),r&&zo(e,r),i}(eo);function qo(t){return(qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ko(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qo(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 Jo(t,e){return(Jo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Zo(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=ti(t);if(e){var o=ti(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $o(this,n)}}function $o(t,e){if(e&&("object"===qo(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 ti(t){return(ti=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("guide-layer",Xo);var ei=function(t){!function(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&&Jo(t,e)}(i,t);var e,n,r,o=Zo(i);function i(){return Ko(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"ready",value:function(){var t=this.rootModel.get("translate");this.set("translate",t)}},{key:"render",value:function(t){}},{key:"contains",value:function(t,e){return!(this.app.mode!=te)}},{key:"eventMap",get:function(){return{"(root)":{"(self)":{keydown:this.onkeydown,keyup:this.onkeyup}}}}},{key:"onkeydown",value:function(t){32==t.keyCode&&void 0===this.before_mode&&(this.before_mode=this.app.mode,this.app.mode=te)}},{key:"onkeyup",value:function(t){32==t.keyCode&&(null!=this.before_mode&&(this.app.mode=this.before_mode),delete this.before_mode)}},{key:"ondragstart",value:function(t){this.last_position=this.transcoordC2S(t.offsetX,t.offsetY)}},{key:"ondragmove",value:function(t){var e=this.transcoordC2S(t.offsetX,t.offsetY),n=e.x,r=e.y;this.rootModel.move({x:n-this.last_position.x,y:r-this.last_position.y}),this.last_position=this.transcoordC2S(t.offsetX,t.offsetY)}}])&&Qo(e.prototype,n),r&&Qo(e,r),i}(eo);function ni(t){return(ni="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ri(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function oi(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 ii(){return(ii="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=ai(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function ai(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=fi(t)););return t}function ui(t,e){return(ui=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ci(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=fi(t);if(e){var o=fi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return si(this,n)}}function si(t,e){if(e&&("object"===ni(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 fi(t){return(fi=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("shift-layer",ei);var li=function(t){return function(t){!function(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&&ui(t,e)}(i,t);var e,n,r,o=ci(i);function i(){return ri(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"isHTMLElement",value:function(){return!0}},{key:"isShadowable",value:function(){return!0}},{key:"element",get:function(){return this._element},set:function(t){this._element=t}},{key:"tagName",get:function(){return this.get("type")}},{key:"setElementProperties",value:function(t){throw new Error("Not Implemented Yet")}},{key:"createElement",value:function(){var t=this;this.element=document.createElement(this.tagName),this.element&&(this.parent.isHTMLElement()?this.parent.element.appendChild(this.element):this.root.model_layer.overlay.appendChild(this.element),re.forEach((function(e){t.element.addEventListener(e,t.userInputEventHandler.bind(t))})),oe.forEach((function(e){t.element.addEventListener(e,t.userInputEventHandler.bind(t))})),this.oncreate_element&&this.oncreate_element(this.element))}},{key:"userInputEventHandler",value:function(t){t.stopPropagation()}},{key:"reposition",value:function(){this.element&&en(this)}},{key:"disposeElement",value:function(){var t=this.element;t&&t.parentElement&&t.parentElement.removeChild(t),delete this.element}},{key:"ready",value:function(){!this.element&&this.createElement(),this.parent.isHTMLElement()?this.parent.element.appendChild(this.element):this.root.model_layer.overlay.appendChild(this.element),this.setElementProperties(this.element),this.reposition()}},{key:"dispose",value:function(){this.disposeElement(this),ii(fi(i.prototype),"dispose",this).call(this)}},{key:"hasTextProperty",get:function(){return!0}},{key:"textHidden",get:function(){return!0}},{key:"onchange",value:function(t,e){this.element&&this.setElementProperties(this.element),this.reposition()}},{key:"isDescendible",value:function(t){return t.isHTMLElement()}}])&&oi(e.prototype,n),r&&oi(e,r),i}(t)};function hi(t){return(hi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function di(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 yi(t,e){return(yi=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function vi(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=mi(t);if(e){var o=mi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return gi(this,n)}}function gi(t,e){if(e&&("object"===hi(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 mi(t){return(mi=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var bi={x:1,y:1},wi={boxSizing:"border-box",margin:"0px",position:"absolute",outline:"none"},xi={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"layout",label:"layout",name:"layoutOption"}],help:"scene/component/container"},_i=function(t){!function(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&&yi(t,e)}(i,t);var e,n,r,o=vi(i);function i(){return pi(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"tagName",get:function(){return"div"}},{key:"nature",get:function(){return xi}},{key:"setElementProperties",value:function(t){}},{key:"layout",get:function(){return Zn.get(this.get("layout"))||tr}},{key:"reposition",value:function(){if(this.element){var t=this.state,e=t.id,n=t.class,r=t.scale,o=void 0===r?bi:r,i=this.rotation,a=void 0===i?0:i,u=this.hidden,c=this.bounds,s=c.left,f=c.top,l=c.width,h=c.height,p=l/2,d=h/2,y=this.element;y.hidden=u,e&&(y.id=e),n&&(y.className=n),Object.assign(y.style,wi,{left:s+"px",top:f+"px",width:"0px",height:"0px",backgroundColor:"transparent"});var v=this.delta(),g=(o&&o.x||1)*v.sx,m=(o&&o.y||1)*v.sy,b=(a||0)+v.theta,w=v.tx||0,x=v.ty||0;["-webkit-","-moz-","-ms-","-o-",""].forEach((function(t){y.style[t+"transform"]="translate(".concat(w+p,"px, ").concat(x+d,"px) rotate(").concat(b,"rad) translate(").concat(-p,"px, ").concat(-d,"px) scale(").concat(g,", ").concat(m,") perspective(1px)")}))}}}])&&di(e.prototype,n),r&&di(e,r),i}(li(Vr));function ki(t){return(ki="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ai(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Si(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 Oi(t,e,n,r){return(Oi="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,n,r){var o,i=ji(t,e);if(i){if((o=Object.getOwnPropertyDescriptor(i,e)).set)return o.set.call(r,n),!0;if(!o.writable)return!1}if(o=Object.getOwnPropertyDescriptor(r,e)){if(!o.writable)return!1;o.value=n,Object.defineProperty(r,e,o)}else Ei(r,e,n);return!0})(t,e,n,r)}function Ei(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pi(){return(Pi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=ji(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function ji(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ii(t)););return t}function Mi(t,e){return(Mi=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ri(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=Ii(t);if(e){var o=Ii(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ti(this,n)}}function Ti(t,e){if(e&&("object"===ki(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 Ii(t){return(Ii=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("container",_i);var Ci=["left","top","width","height","rotation","animation"],zi=function(t){!function(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&&Mi(t,e)}(i,t);var e,n,r,o=Ri(i);function i(){return Ai(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"isGroup",value:function(){return!0}},{key:"get",value:function(t){return this._model[t]}},{key:"set",value:function(t,e){if("string"==typeof t)return this.set(Ei({},t,e));var n=Ci.reduce((function(e,n){return t.hasOwnProperty(n)&&(e[n]=t[n]),e}),{});return Pi(Ii(i.prototype),"set",this).call(this,n)}},{key:"capture",value:function(t,e){var n=Pi(Ii(i.prototype),"capture",this).call(this,t,e);if(n!==this)return n}},{key:"bounds",get:function(){return Pi(Ii(i.prototype),"bounds",this)},set:function(t){if(this.__MUTATING__)!function(t,e,n,r,o){if(!Oi(t,e,n,r||t)&&o)throw new Error("failed to set property")}(Ii(i.prototype),"bounds",t,this,!0);else{var e=this.bounds,n=t.width/e.width,r=t.height/e.height;this.path=this.path.map((function(o){return{x:t.left+(o.x-e.left)*n,y:t.top+(o.y-e.top)*r}})),this.components&&this.components.forEach((function(t){if(t.mutable)t.mutatePath(null,(function(t){return t.map((function(t){return{x:t.x*n,y:t.y*r}}))}));else{var e=t.bounds,o=t.center,i={x:o.x*(1-n),y:o.y*(1-r)},a=e.width*(1-n),u=e.height*(1-r),c=-(i.x-a/2),s=-(i.y-u/2);t.bounds={left:e.left+c,top:e.top+s,width:e.width*n,height:e.height*r}}}))}}},{key:"focusible",get:function(){return!1}},{key:"hasTextProperty",get:function(){return!1}},{key:"calculateBounds",value:function(){this.clearCache(),this.__MUTATING__=!0,this.mutateBounds((function(t){var e=mn.union(this.components.map((function(t){return t.bounds})));return this.components.forEach((function(t){var n=t.bounds;t.bounds={left:n.left-e.left,top:n.top-e.top,width:n.width,height:n.height}})),{left:t.left+e.left,top:t.top+e.top,width:e.width,height:e.height}}),this),this.__MUTATING__=!1,this.parent.isGroup()&&this.parent.calculateBounds()}},{key:"render",value:function(t){}},{key:"postrender",value:function(t){var e=this.model,n=e.top,r=e.left;e.scale,t.translate(r,n),this.layout.drawables(this).forEach((function(e){e.draw(t)})),t.translate(-r,-n)}}])&&Si(e.prototype,n),r&&Si(e,r),i}(_i);function Bi(t){return(Bi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Li(t){return function(t){if(Array.isArray(t))return Di(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Di(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Di(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Di(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 Fi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ni(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 Ui(t,e){return(Ui=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Yi(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=Hi(t);if(e){var o=Hi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Gi(this,n)}}function Gi(t,e){if(e&&("object"===Bi(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 Hi(t){return(Hi=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Wi(t,e,n,r){var o=t.selected,i=r?o.slice(0):[];r&&i.length>0?e=i[0].parent:e.isContainer()||(e=e.parent);var a=e.layout.capturables(e),u=!!e.layout.joinType;if(r&&n.selected.forEach((function(t){i.splice(i.indexOf(t),1)})),n.selected=[],a.forEach((function(t){t.capturable&&function(t,e,n){var r,o,i,a,u=e.sx,c=e.sy,s=e.ex,f=e.ey;if(u>s?(r=s,o=u):(r=u,o=s),c>f?(i=f,a=c):(i=c,a=f),n){var l=t.bounds,h=t.transcoordS2TR(l.left,l.top),p=t.transcoordS2TR(l.left+l.width,l.top+l.height),d=h.x,y=p.x,v=h.y,g=p.y,m=Math.min(r,d,o,y),b=Math.max(r,d,o,y),w=Math.min(i,v,a,g),x=Math.max(i,v,a,g);return!(b-m>Math.abs(o-r)+Math.abs(y-d))&&!(x-w>Math.abs(a-i)+Math.abs(g-v))}var _=t.path;if(!_)return pe("컴포넌트에 get path가 잘못 구현되어있음.",t),!1;for(var k=0;k<_.length;k++){var A=t.transcoordS2TR(_[k].x,_[k].y);if(r>A.x||o<A.x||i>A.y||a<A.y)return!1}return!0}(t,n,u)&&-1==i.indexOf(t)&&n.selected.push(t)})),i=i.concat(n.selected),o.length!==i.length)t.selected=i;else for(var c=0;c<i.length;c++)if(o[c]!=i[c]){t.selected=i;break}}function Vi(t,e,n,r,o){o||Wi(t,e,n,r)}mn.register("group",zi);var Xi=function(t){!function(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&&Ui(t,e)}(i,t);var e,n,r,o=Yi(i);function i(){return Fi(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"ready",value:function(){var t=this.rootModel,e=t.get("translate"),n=t.get("scale");this.set("translate",e),this.set("scale",n)}},{key:"contains",value:function(t,e){return!1}},{key:"render",value:function(t){var e=this.selbox;if(e){var n=e.sx,r=e.sy,o=e.ex,i=e.ey,a=this.get("scale")||{x:1,y:1};t.beginPath(),t.rect(n,r,o-n,i-r),t.setLineDash([2/a.x,4/a.y]),t.lineWidth=1/a.x,t.strokeStyle="black",t.stroke()}}},{key:"eventMap",get:function(){return{"(root)":{"(self)":{keydown:this.onkeydown}},"model-layer":{"(self)":{change:this.onchange_root_model},"(all)":{dragstart:this.ondragstart_selbox,dragmove:this.ondragmove_selbox,dragend:this.ondragend_selbox,mousedown:this.onmousedown_comp,mouseup:this.onmouseup_comp}}}}},{key:"onkeydown",value:function(t,e){e.origin;var n=e.deliverer,r=n.selected;if(1!=r.length)return!1;var o=r[0],i=o.parent;if(!i||i===n)return!1;if("Tab"==t.code){if("Tab"!=t.code)return!1;var a=i.layout.capturables(i),u=a.indexOf(o);if(-1==u){if(!i.indexOf(o))return de("Container not contains [",o,"] as a component"),!1;u=0}var c=a.length;t.shiftKey?u--:u++,o=a[(u+c)%c]}else{if(!i.layout.keyNavigate)return!1;o=i.layout.keyNavigate(i,o,t)||o}n.selected=[o],t.preventDefault()}},{key:"onchange_root_model",value:function(t,e,n){t.translate&&this.set("translate",t.translate),t.scale&&this.set("scale",t.scale)}},{key:"_pendingDecision",value:function(t){this.downpoint={x:t.offsetX,y:t.offsetY}}},{key:"_selectGroupItem",value:function(t,e){for(var n=this.selected.indexOf(t),r=t.parent;r.parent.isGroup();)r=r.parent;var o=[],i=!1,a=!1;if(this.selected.forEach((function(t){var e=t.parent;if(t!==r){for(;e.parent&&e.parent.isGroup();)e=e.parent;e===r&&(o.push(t),i=!0)}else a=!0})),i)if(e.shiftKey){if(-1!=n)return void this._pendingDecision(e);o.push(t)}else{if(-1!=n)return void this._pendingDecision(e);o=[t]}else{if(a)return void this._pendingDecision(e);if(e.shiftKey)if(this.selected.length>0){if(-1!=this.selected.indexOf(r)||this.selected[0].parent!==r.parent)return;o=[].concat(Li(this.selected),[r])}else o=[r];else o=[r]}this.selected=o}},{key:"onmousedown_comp",value:function(t,e){var n=e.origin;if(this.downpoint=null,t.shiftKey){if(n.parent.isGroup())return void this._selectGroupItem(n,t);if(-1!=this.selected.indexOf(n))return void this._pendingDecision(t);var r=this.selected.filter((function(t){return!t.isRootModel()&&!!t.parent})),o=r.length>0&&r[0].parent;if(o&&o!==n.parent)return void(n.parent.isGroup()&&this._pendingDecision(t));r.push(n),this.selected=r}else{if(n.parent.isGroup())return void this._selectGroupItem(n,t);if(-1!=this.selected.indexOf(n))return;this.selected=[n]}}},{key:"onmouseup_comp",value:function(t,e){if(this.downpoint&&this.downpoint.x===t.offsetX&&this.downpoint.y===t.offsetY){var n=e.origin,r=this.selected.indexOf(n);if(-1==r&&n.parent.isGroup()&&(r=this.selected.indexOf(n.parent)),-1!==r&&t.shiftKey){var o=this.selected.slice();return r>-1&&o.splice(r,1),void(this.selected=o)}n.parent.isGroup()&&(this.selected=[n])}}},{key:"ondragstart_selbox",value:function(t,e){if(e.origin.stuck){var n=this.transcoordC2S(t.offsetX,t.offsetY),r=n.x,o=n.y;this.selbox={sx:r,sy:o,selected:[]}}}},{key:"ondragmove_selbox",value:function(t,e){var n=e.origin;if(n.stuck){var r=this.transcoordC2S(t.offsetX,t.offsetY),o=r.x,i=r.y;e.deliverer,this.selbox&&(this.selbox.ex=o,this.selbox.ey=i,Vi(this,n,this.selbox,t.shiftKey),this.invalidate())}}},{key:"ondragend_selbox",value:function(t,e){e.origin.stuck&&(this.last_pos=null,this.selbox=null,Vi(this,null,null,!1,!0),this.invalidate())}}])&&Ni(e.prototype,n),r&&Ni(e,r),i}(eo);function qi(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)}}mn.register("selection-layer",Xi);var Ki=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.params=Object.assign({},e)}var e,n,r;return e=t,(n=[{key:"excute",value:function(){}}])&&qi(e.prototype,n),r&&qi(e,r),t}();function Qi(t){return(Qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ji(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Zi(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 $i(t,e){return($i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ta(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=na(t);if(e){var o=na(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ea(this,n)}}function ea(t,e){if(e&&("object"===Qi(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 na(t){return(na=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ra=function(t){!function(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&&$i(t,e)}(i,t);var e,n,r,o=ta(i);function i(){return Ji(this,i),o.apply(this,arguments)}return e=i,r=[{key:"before",value:function(t){return t.map((function(t){return{component:t}}))}},{key:"after",value:function(t,e){e.execute(null,!1)}},{key:"around",value:function(t,e,n){e.call(n),t.execute(null,!1)}}],(n=[{key:"execute",value:function(){this.params.changes.forEach((function(t){return t.component.set(t.after)}))}}])&&Zi(e.prototype,n),r&&Zi(e,r),i}(Ki);function oa(t){return(oa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ia(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function aa(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 ua(t,e){return(ua=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ca(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=fa(t);if(e){var o=fa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return sa(this,n)}}function sa(t,e){if(e&&("object"===oa(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 fa(t){return(fa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function la(t){for(var e=0;t&&!t.isRootModel();)e+=t.get("rotation")||0,t=t.parent;return e%(2*Math.PI)}var ha=function(t){!function(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&&ua(t,e)}(i,t);var e,n,r,o=ca(i);function i(){return ia(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"execute",value:function(){this.params.changes.forEach((function(t){var e=t.component,n=t.to_container,r=t.to_index,o=t.to_left,i=t.to_top,a=(t.hint,function(t){if(t.isRootModel())return t.bounds;var e=t.bounds,n=t.rotatePoint,r=n;return{left:(r=t.transcoordS2T(r.x,r.y)).x-(n.x-e.left),top:r.y-(n.y-e.top),width:e.width,height:e.height}}(e)),u=la(e);if(e.removeSelf(!n),e.bounds=a,e.set("rotation",u),n){e.set("rotation",function(t,e){return((t.get("rotation")||0)-la(e))%(2*Math.PI)}(e,n));var c=function(t,e){if(e.isRootModel())return t.bounds;var n=t.bounds,r=t.rotatePoint,o=e.transcoordT2S(r.x,r.y),i=e.bounds;return{left:o.x-(r.x-n.left)-i.left,top:o.y-(r.y-n.top)-i.top,width:n.width,height:n.height}}(e,n);t.to_left=void 0!==o?o:c.left,t.to_top=void 0!==i?i:c.top,e.bounds={left:t.to_left,top:t.to_top,width:c.width,height:c.height},void 0===r?n.addComponent(e):n.insertComponentAt(e,r)}}))}}])&&aa(e.prototype,n),r&&aa(e,r),i}(Ki);function pa(t,e){var n=mn.register(t.type);if(!n)return de("Class not found",t.type),null;var r=new n(t,e);return t.components&&r.isContainer()&&(t.components.forEach((function(t){var n=pa(t,e);n&&r.addComponent(n)})),delete t.components),r.created(),r}function da(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)}}var ya=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.layer=e}var e,n,r;return e=t,(n=[{key:"draw",value:function(t,e,n){var r=e.bounds;0!=r.width&&0!=r.height&&(t.beginPath(),t.rect(r.left,r.top,r.width,r.height),t.clip(),t.beginPath(),t.strokeStyle="#f26522",t.lineWidth=4,t.shadowBlur=10,t.shadowColor="black",t.shadowOffsetX=0,t.shadowOffsetY=0,t.rect(r.left,r.top,r.width,r.height),t.stroke(),t.closePath())}}])&&da(e.prototype,n),r&&da(e,r),t}();function va(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)}}var ga=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.layer=e}var e,n,r;return e=t,(n=[{key:"draw",value:function(t,e,n){var r=e.bounds;t.beginPath(),t.rect(r.left,r.top,r.width,r.height),t.setLineDash([3/n.x,4/n.y]),t.lineWidth=1/n.x,t.strokeStyle="black",t.stroke(),t.setLineDash([]),t.closePath()}}])&&va(e.prototype,n),r&&va(e,r),t}();function ma(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)}}var ba=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.layer=e}var e,n,r;return e=t,(n=[{key:"reset",value:function(){this.active=null}},{key:"selected",get:function(){return this.layer.selected}},{key:"contains",value:function(t,e,n,r){var o=this,i=n.controls;return!!i&&(i.every((function(i,a){return Math.abs(t-i.x)<=4/r.x&&Math.abs(e-i.y)<=4/r.y&&(o.active={component:n,index:a,handler:i.handler}),!o.active})),!!this.active)}},{key:"draw",value:function(t,e,n){var r=e.controls;r&&r.forEach((function(e,r){t.beginPath(),t.lineWidth=1/n.x,t.ellipse(e.x,e.y,4/n.x,4/n.y,0,0,2*Math.PI,!0),t.fillStyle="#ff5d72",t.fill(),t.strokeStyle="#fff",t.stroke()}))}},{key:"onevent",value:function(t,e){var n=this.active,r=n.handler,o=n.component,i=n.index,a=o.transcoordC2S(e.offsetX,e.offsetY);a=o.transcoordS2P(a.x,a.y),r&&"function"==typeof r[t]&&r[t](a,i,o)}},{key:"onmousedown",value:function(t){this.onevent("onmousedown",t)}},{key:"ondragstart",value:function(t){var e=this.active;e.changes=ra.before([e.component]),this.onevent("ondragstart",t)}},{key:"ondragmove",value:function(t){this.onevent("ondragmove",t)}},{key:"ondragend",value:function(t){this.onevent("ondragend",t);var e=this.active,n=e.component,r=e.changes;ra.after(r,n.app.commander),n.parent&&n.parent.calculateBounds&&n.parent.calculateBounds()}}])&&ma(e.prototype,n),r&&ma(e,r),t}();function wa(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 xa(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}var _a=15*Math.PI/180,ka=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.layer=e}var e,n,r;return e=t,(n=[{key:"reset",value:function(){this.active=null}},{key:"selected",get:function(){return this.layer.selected}},{key:"contains",value:function(t,e,n,r){var o=this;return!!n.mutable&&(n.path.every((function(i,a){return Math.abs(t-i.x)<=4/r.x&&Math.abs(e-i.y)<=4/r.y&&(o.active={component:n,index:a}),!o.active})),!!this.active)}},{key:"draw",value:function(t,e,n){if(e.mutable&&!e.stuck){var r=e.path,o=this.active;r.forEach((function(r,i){t.beginPath(),t.ellipse(r.x,r.y,4/n.x,4/n.y,0,0,2*Math.PI,!0),t.lineWidth=1/n.x,t.strokeStyle="#656565",t.fillStyle="#fff",o&&o.component===e&&o.index===i&&(t.strokeStyle="#fa7703",o.toFill&&(t.fillStyle="#ffb80c")),t.fill(),t.stroke()}))}}},{key:"ondblclick",value:function(t){var e=this.active.component;if(e.pathExtendable){var n=e.path.slice();n.length<4||(n.splice(this.active.index,1),e.path=n)}}},{key:"onmousedown",value:function(t){this.active.toFill=!0}},{key:"ondragstart",value:function(t){var e=this.active;e.changes=ra.before([e.component])}},{key:"ondragmove",value:function(t){var e,n,r=this.active,o=r.component,i=r.index,a=o.transcoordC2S(t.offsetX,t.offsetY);if(a=o.transcoordS2P(a.x,a.y),t.shiftKey){var u=o.path.length,c=o.isLine()&&0==i?o.path[1]:o.path[(i-1+u)%u];c=o.transcoordS2P(c.x,c.y);var s,f=0;u>2&&(o.isLine()?0==i?s=o.path[2]:1!=i&&(s=o.path[i-2]):s=o.path[(i-2+u)%u],s&&(f=xa(s=o.transcoordS2P(s.x,s.y),c)));var l=Math.round((xa(c,a)-f)/_a)*_a+f;a=function(t,e,n){return{x:Math.cos(e)*n+t.x,y:Math.sin(e)*n+t.y}}(c,l,(e=c,n=a,Math.sqrt((n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y))))}o.mutatePath(null,(function(t){t[i]=a}))}},{key:"ondragend",value:function(t){var e=this.active,n=e.component,r=e.changes;ra.after(r,n.app.commander),n.parent&&n.parent.calculateBounds&&n.parent.calculateBounds()}}])&&wa(e.prototype,n),r&&wa(e,r),t}();function Aa(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 Sa(t,e,n){var r,o,i=t.bounds,a=i.left,u=i.top,c=i.width,s=i.height;switch(e){case 0:r=a,o=u;break;case 1:r=a+c/2,o=u;break;case 2:r=a+c,o=u;break;case 3:r=a+c,o=u+s/2;break;case 4:r=a+c,o=u+s;break;case 5:r=a+c/2,o=u+s;break;case 6:r=a,o=u+s;break;case 7:r=a,o=u+s/2}var f=r,l=o,h=t.transcoordT2S(n.x,n.y);return{dx:h.x-f,dy:h.y-l}}function Oa(t,e,n,r,o,i){var a=t.bounds,u=a.left,c=a.top,s=a.width,f=a.height,l={left:u,top:c,width:s,height:f};switch(e){case 0:u+=r,c+=o,s-=r,f-=o;break;case 1:c+=o,f-=o;break;case 2:c+=o,s+=r,f-=o;break;case 3:s+=r;break;case 4:s+=r,f+=o;break;case 5:f+=o;break;case 6:u+=r,s-=r,f+=o;break;case 7:u+=r,s-=r}if(t.mutateBounds((function(e){return Math.abs(s)<=.001&&(s=.001),Math.abs(f)<=.001&&(f=.001),t.adjustResize({left:u,top:c,width:s,height:f},l,n)}),this),t.isContainer()&&t.layout.ABSOLUTE&&!t.isGroup()){var h=l.left-u,p=l.top-c;i?t.components.forEach((function(t){t.delta("tx",0),t.delta("ty",0),t.move({x:h,y:p})})):t.components.forEach((function(t){t.delta("tx",h),t.delta("ty",p)}))}else{var d=i&&t.parent;d&&d.isGroup()&&d.calculateBounds()}}function Ea(t){var e=t.left,n=t.top,r=t.width,o=t.height,i=e+r/2,a=n+o/2,u=e+r,c=n+o;return[{x:e,y:n},{x:i,y:n},{x:u,y:n},{x:u,y:a},{x:u,y:c},{x:i,y:c},{x:e,y:c},{x:e,y:a}]}var Pa=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.layer=e}var e,n,r;return e=t,(n=[{key:"reset",value:function(){this.active=null}},{key:"selected",get:function(){return this.layer.selected}},{key:"contains",value:function(t,e,n,r){var o=this;return!!n.resizable&&(Ea(n.bounds).every((function(i,a){return Math.abs(t-i.x)<=4/r.x&&Math.abs(e-i.y)<=4/r.y&&(o.active={component:n,index:a}),!o.active})),!!this.active)}},{key:"draw",value:function(t,e,n){if(!e.isLine()){var r=e.bounds;if(t.beginPath(),t.rect(r.left,r.top,r.width,r.height),t.setLineDash([3/n.x,4/n.y]),t.lineWidth=1/n.x,t.strokeStyle="black",t.stroke(),t.setLineDash([]),e.resizable){var o=this.active;Ea(r).forEach((function(r,i){t.beginPath(),t.rect(r.x-4/n.x,r.y-4/n.y,8/n.x,8/n.y),t.setLineDash([0,0]),t.strokeStyle="#656565",t.stroke(),t.fillStyle="#fff",o&&o.component===e&&o.index===i&&(t.strokeStyle="#fa7703",o.focus&&(t.fillStyle="#ffb80c")),t.fill(),t.stroke()}))}}}},{key:"onmousedown",value:function(t){this.active.focus=!0}},{key:"ondragstart",value:function(t){var e=this.active.component;this.active.bounds=e.bounds,this.active.boundsList=this.layer.selected.filter((function(t){return t.resizable})).map((function(t){return t.bounds}))}},{key:"ondragmove",value:function(t){var e=this.active,n=e.component,r=e.index,o=e.boundsList,i=e.bounds,a=this.layer.transcoordC2S(t.offsetX,t.offsetY);n.bounds=i;var u=Sa(n,r,a);this.layer.selected.filter((function(t){return t.resizable})).forEach((function(e,n){e.bounds=o[n],Oa(e,r,t.shiftKey,u.dx,u.dy,!1)}))}},{key:"ondragend",value:function(t){var e=this.active,n=e.component,r=e.index,o=e.boundsList,i=e.bounds,a=this.layer.transcoordC2S(t.offsetX,t.offsetY);n.bounds=i;var u=Sa(n,r,a);this.layer.selected.filter((function(t){return t.resizable})).forEach((function(e,n){e.bounds=o[n],Oa(e,r,t.shiftKey,u.dx,u.dy,!0)})),this.active.component.app.commander.execute(null,!1)}}])&&Aa(e.prototype,n),r&&Aa(e,r),t}();function ja(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)}}var Ma=2*Math.PI,Ra=Math.PI/2;function Ta(t,e){var n=t.bounds;return{x:n.left+n.width/2,y:n.top-20/e.y}}var Ia=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.layer=e}var e,n,r;return e=t,(n=[{key:"reset",value:function(){this.active=null}},{key:"selected",get:function(){return this.layer.selected}},{key:"contains",value:function(t,e,n,r){if(!n.rotatable)return!1;var o=Ta(n,r);return Math.abs(t-o.x)<=4/r.x&&Math.abs(e-o.y)<=4/r.y&&(this.active={component:n},!0)}},{key:"draw",value:function(t,e,n){if(e.rotatable){t.beginPath();var r=Ta(e,n);t.lineWidth=1.5/n.x,t.moveTo(r.x,r.y+20/n.y),t.lineTo(r.x,r.y),t.strokeStyle="#656565",t.stroke(),t.beginPath(),t.ellipse(r.x,r.y,4/n.x,4/n.y,0,0,Ma,!0),t.stroke(),t.fillStyle="#fff",t.fill();var o=this.active;o&&o.component===e&&(t.strokeStyle="#fa7703",t.stroke(),o.toFill&&(t.fillStyle="#ffb80c",t.fill()))}}},{key:"onmousedown",value:function(t){this.active.toFill=!0}},{key:"ondragstart",value:function(t){var e=this.active;e.component,e.start_rotation=e.component.get("rotation"),e.rotations=this.layer.selected.filter((function(t){return t.rotatable})).map((function(t){return t.get("rotation")}))}},{key:"ondragmove",value:function(t){var e=this.active.component,n=e.transcoordC2S(t.offsetX,t.offsetY);n=e.transcoordS2P(n.x,n.y);var r=e.rotatePoint,o=e.get("rotation")||0,i=Math.atan((r.y-n.y)/(r.x-n.x)),a=(i=r.x>=n.x?i-Ra:Ra+i)-o;this.layer.selected.filter((function(t){return t.rotatable})).forEach((function(e,n){var r=((e.get("rotation")||0)+a)%Ma;e.set("rotation",e.adjustRotation(r,t.shiftKey))}))}},{key:"ondragend",value:function(t){var e=this.active,n=e.component;e.rotations,n.app.commander.execute(null,!1)}}])&&ja(e.prototype,n),r&&ja(e,r),t}();function Ca(t){return(Ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function za(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 Ba(t,e){return(Ba=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function La(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=Na(t);if(e){var o=Na(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Da(this,n)}}function Da(t,e){if(e&&("object"===Ca(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Fa(t)}function Fa(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Na(t){return(Na=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ua=function(t){!function(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&&Ba(t,e)}(i,t);var e,n,r,o=La(i);function i(t,e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),n=o.call(this,t,e);var r=new ka(Fa(n)),a=new ba(Fa(n)),u=new Pa(Fa(n)),c=new Ia(Fa(n));return n._modelers=[r,a,u,c],n._control_mode_modelers=[a,r,u,c],n.focusOutline=new ya(Fa(n)),n.groupOutline=new ga(Fa(n)),n._reversed_modelers=n._modelers.slice().reverse(),n._control_mode_reverse_modelers=n._control_mode_modelers.slice().reverse(),n}return e=i,(n=[{key:"modelers",get:function(){return this._control_mode?this._control_mode_modelers:this._modelers}},{key:"reversedModelers",get:function(){return this._control_mode?this._control_mode_reverse_modelers:this._reversed_modelers}},{key:"ready",value:function(){var t=this.rootModel,e=t.get("translate"),n=t.get("scale");this.set("translate",e),this.set("scale",n)}},{key:"contains",value:function(t,e){if(this._state_dragging)return!0;this.modelers.forEach((function(t){return t.reset()}));for(var n=this.selected.filter((function(t){return!!t.parent})),r=this.get("scale")||{x:1,y:1},o=0;o<n.length;o++)for(var i=n[o],a=i.transcoordT2S(t,e),u=0;u<this.modelers.length;u++){var c=this.modelers[u];if(c.contains(a.x,a.y,i,r))return this.currentModeler=c,!0}return!1}},{key:"_componentDrawer",value:function(t,e,n,r){var o=[],i=e.parent;if(e.isRootModel())return t.save(),r(t,e,n),void t.restore();for(;i&&!i.isRootModel();)o.push(i),i=i.parent;t.save(),o.reverse().forEach((function(e){var n=e.rotatePoint;t.translate(n.x,n.y);var r=e.get("scale");r&&t.scale(r.x,r.y),t.rotate(e.get("rotation")),t.translate(-n.x,-n.y);var o=e.bounds;t.translate(o.left,o.top)}));var a=e.rotatePoint;t.translate(a.x,a.y);var u=e.get("scale");u&&t.scale(u.x,u.y),t.rotate(e.get("rotation")),t.translate(-a.x,-a.y),r(t,e,n),t.restore()}},{key:"prerender",value:function(t){var e=this.model,n=e.translate,r=e.scale,o=void 0===r?{x:1,y:1}:r,i=e.rotation;t.save(),t.beginPath(),t.clearRect(0,0,t.canvas.width,t.canvas.height),t.rect(0,0,t.canvas.width,t.canvas.height),t.fillStyle="black",t.globalAlpha=.5,t.fill(),t.restore(),n&&t.translate(n.x*ne,n.y*ne),t.scale(o.x*ne,o.y*ne),i&&t.rotate(i),t.clearRect(0,0,this.rootModel.get("width"),this.rootModel.get("height"))}},{key:"render",value:function(t){var e=this;t.beginPath();var n=this.get("scale")||{x:1,y:1},r=this.selected.filter((function(t){return!!t.parent}));if(this.focused&&this._componentDrawer(t,this.focused,n,(function(t,n,r){e.focusOutline.draw(t,n,r)})),r.length>0&&r[0].parent.isGroup()){for(var o=r[0].parent;o.parent.isGroup();)o=o.parent;this._componentDrawer(t,o,n,(function(t,n,r){e.groupOutline.draw(t,n,r)}))}r.forEach((function(r){e._componentDrawer(t,r,n,(function(t,n,r){e.reversedModelers.forEach((function(e){return e.draw(t,n,r)}))}))}))}},{key:"eventMap",get:function(){return{"model-layer":{"(all)":{change:this.onchange_model,wheel:this.onwheel_scale,drop:this.ondrop}},"(root)":{"(self)":{selected:this.onselected,keydown:this.onkeydown,keyup:this.onkeyup}}}}},{key:"onkeydown",value:function(t){"Alt"==t.key&&(this._control_mode=!0,this.invalidate())}},{key:"onkeyup",value:function(t){"Alt"==t.key&&(this._control_mode=!1,this.invalidate())}},{key:"onselected",value:function(t,e){this.invalidate()}},{key:"onchange_model",value:function(t,e,n){n.origin===n.deliverer&&(t.translate&&this.set("translate",t.translate),void 0!==t.rotation&&this.set("rotation",t.rotation),t.scale&&this.set("scale",t.scale)),this.invalidate()}},{key:"ondblclick",value:function(t){"function"==typeof this.currentModeler.ondblclick&&this.currentModeler.ondblclick(t),this.invalidate()}},{key:"onmousedown",value:function(t){this.currentModeler.onmousedown(t),this.invalidate()}},{key:"onmouseup",value:function(t){"function"==typeof this.currentModeler.onmouseup&&this.currentModeler.onmouseup(t),this.invalidate()}},{key:"onmouseenter",value:function(t,e){this.invalidate()}},{key:"onmouseleave",value:function(t,e){this.invalidate()}},{key:"ondragstart",value:function(t){this.currentModeler.ondragstart(t),this._state_dragging=!0}},{key:"ondragmove",value:function(t){this.currentModeler.ondragmove(t),this.invalidate()}},{key:"ondragend",value:function(t){this._state_dragging=!1,this.currentModeler.ondragend(t),this.invalidate()}},{key:"ondrop",value:function(t,e){var n=this,r=e.origin,o=t.dataTransfer.files;if(!(o.length<1)){var i=this.rootModel.transcoordC2S(t.offsetX,t.offsetY),a=this.rootModel;Promise.all(Array.from(o).map((function(t){return new Promise((function(e,n){var r=new FileReader;r.addEventListener("loadend",(function(t){e(r.result)})),["error","abort"].forEach((function(t){return r.addEventListener(t,(function(t){n(t)}))})),r.readAsDataURL(t)}))}))).then((function(e){if(t.altKey)return ra.around(n.app.commander,(function(){r.ondropfile(o,e)})),void(n.selected=[r]);var u=[],c=e.map((function(t,e){var n,r=o[e].type,c=o[e].name;return r.startsWith("image/")?(n=pa({type:r.startsWith("image/gif")?"gif-view":"image-view",top:0,left:0,width:200,height:200,src:t},a.app),u.push(new Promise((function(e,r){var o=new Image;o.src=t,o.onload=function(){n.set({width:o.width,height:o.height}),e()},o.onerror=function(t){r(t)}})))):r.startsWith("audio/")?n=pa({type:"audio",top:0,left:0,width:100,height:100,src:t},a.app):r.startsWith("vnd.ms-excel/")||/\.xlsx?$/.test(c)?n=pa({type:"excel",top:0,left:0,width:100,height:100,src:t},a.app):console.log("droped file",o[e]),n&&(n.center=i,i.x+=50,i.y+=50),n})).filter((function(t){return t})).map((function(t){return{component:t,to_container:a}}));c.length>0&&Promise.all(u).then((function(){n.app.commander.execute(new ha({changes:c})),n.selected=c.map((function(t){return t.component}))}),(function(t){console.error(t)}))}),(function(t){console.error(t)}))}}},{key:"onwheel_scale",value:function(t,e){if(0!=t.deltaY||0!=t.deltaX){var n=e.deliverer;if(t.shiftKey){if(-1!=navigator.userAgent.indexOf("Win"))var r=t.deltaY<0?1:-1;else r=t.deltaX<0?1:-1;ra.around(this.app.commander,(function(){n.selected.forEach((function(t){var e=t.get("fontSize")||ie.FONT_SIZE;e<1&&(e=1),e+=r,t.set("fontSize",e)}))}))}else{r=t.deltaY<0?1:-1;var o=n.get("scale")||{x:1,y:1},i=n.get("translate"),a=t.offsetX,u=t.offsetY,c=n.transcoordC2S(a,u),s=.1*r,f={x:o.x+s,y:o.y+s};if(r<0&&o.x<.2||r>0&&o.x>10)return;n.set("scale",f);var l=n.transcoordC2S(a,u);n.set("translate",{x:i.x+(l.x-c.x)*f.x,y:i.y+(l.y-c.y)*f.y})}}}}])&&za(e.prototype,n),r&&za(e,r),i}(eo);function Ya(t){return(Ya="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ga(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 Ha(t,e){return(Ha=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Wa(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=Xa(t);if(e){var o=Xa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Va(this,n)}}function Va(t,e){if(e&&("object"===Ya(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 Xa(t){return(Xa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("modeling-layer",Ua);var qa=225*Math.PI/180,Ka=135*Math.PI/180,Qa=function(t){!function(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&&Ha(t,e)}(i,t);var e,n,r,o=Wa(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,t,e))._anim_alpha=1,n}return e=i,(n=[{key:"_drawArrow",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,o=n.x-e.x,i=n.y-e.y,a=Math.atan2(i,o),u=n.x+r*Math.cos(a+qa),c=n.y+r*Math.sin(a+qa),s=n.x+r*Math.cos(a+Ka),f=n.y+r*Math.sin(a+Ka);t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(n.x,n.y),t.moveTo(n.x,n.y),t.lineTo(u,c),t.moveTo(n.x,n.y),t.lineTo(s,f),t.stroke()}},{key:"animOnTargetChange",value:function(t){var e=this;t!==this._lastTargets&&(this._lastTargets=t,this._anim_alpha=1,this.animate({step:function(t){e._anim_alpha=1-t*t,e.invalidate()},duration:5e3,delta:"linear",options:{x:1},ease:"out"}).start())}},{key:"render",value:function(t){var e=this,n=this.targets&&this.targets.filter((function(t){return t.rootModel}));if(!n||0==n.length)return this._animate&&this._animate.stop(),void delete this._animate;var r=!1;n.forEach((function(n){var o=n.tag;if(t.globalAlpha*=e._anim_alpha,o){var i=o,a=n.bounds,u=a.left,c=a.top,s=n.transcoordS2C(u,c,n.rootModel),f=s.x,l=s.y;f=Math.max(f,0),l=Math.max(l-18,0),t.font="12px Arial";var h=t.measureText(i);t.fillStyle="#FF0000",t.fillRect(f,l,h.width+6,16),t.fillStyle="white",t.fillText(i,f+3,l+13),r=!0}t.lineWidth=2,t.strokeStyle="orange",n.mappings&&n.mappings.forEach((function(o){var i=e.root.findAll(o.target,n);i&&i.forEach((function(r){var o=n.center,i=r.center;o=n.transcoordS2C(o.x,o.y,n.rootModel),i=r.transcoordS2C(i.x,i.y,r.rootModel),e._drawArrow(t,o,i)})),r=!0}))})),r&&this.animOnTargetChange(this.targets)}},{key:"targets",get:function(){return this._targets},set:function(t){this._targets=t&&t.filter((function(t){return!t.isLayer()})),this.invalidate()}},{key:"_ontag",value:function(t){this.targets&&-1!==this.targets.lastIndexOf(t)||(this.targets=(this.targets||[]).concat(t))}},{key:"_offtag",value:function(t){if(this.targets){var e=this.targets.slice();e.splice(this.targets.lastIndexOf(t),1),this.targets=e}}},{key:"_resettag",value:function(){this.targets=[]}},{key:"ontagreset",value:function(t,e){this._resettag()}},{key:"ontag",value:function(t,e){this._ontag(e.origin)}},{key:"offtag",value:function(t,e){this._offtag(e.origin)}},{key:"onmouseenter",value:function(t,e){this._resettag(),this._ontag(e.origin)}},{key:"onmouseleave",value:function(t,e){this._resettag()}},{key:"eventMap",get:function(){return{"model-layer":{"(descendant)":{tag:this.ontag,tagreset:this.ontagreset,mouseenter:this.onmouseenter,mouseleave:this.onmouseleave}}}}}])&&Ga(e.prototype,n),r&&Ga(e,r),i}(eo);function Ja(t){var e=b()(t.hierarchy);return void 0!==e.id&&delete e.id,pa(e,t.app)}function Za(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,r,o){for(var i in n){var a=n[i];if(y(i,r.origin,0,t))for(var u in a){var c=a[u];u==r.name&&(r.listener=e,c.apply(e,o))}}}function tu(){var t=arguments,e=t[t.length-1],n=this.event_pump;n.listeners.forEach((function(r){$a(n.deliverer,r.listener,r.cloned_handlers,e,t)}))}mn.register("tag-layer",Qa);var eu=function(){function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),void 0===e.on)throw new Error("Deliverer should be a event handlable object.");this.deliverer=e,this.listeners=[]}var e,n,r;return e=t,(n=[{key:"start",value:function(){this.deliverer.on("(all)",tu,{event_pump:this})}},{key:"stop",value:function(){this.deliverer.off("(all)",tu)}},{key:"on",value:function(t,e){var n=Object.assign({},e);Object.keys(n).forEach((function(e){if(0==e.indexOf("?")){var r=n[e],o=e.substr(1),i=t.get(o);delete n[e],i?n[i]=r:de("EventPump#on","variable #{selector} is not evaluated on listener")}})),this.listeners.push({listener:t,handlers:e,cloned_handlers:n})}},{key:"off",value:function(t,e){for(var n=0;n<this.listeners.length;n++){var r=this.listeners[n];r.listener!==t||e&&r.handlers!==e||this.listeners.splice(n,1)}}},{key:"clear",value:function(){this.listeners=[]}},{key:"dispose",value:function(){this.stop(),this.clear()}}])&&Za(e.prototype,n),r&&Za(e,r),t}();function nu(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)}}var ru=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.eventMaps=[],this.root=e,e.eventMap&&this.add(e,e.eventMap)}var e,n,r;return e=t,(n=[{key:"root",get:function(){return this._root},set:function(t){this._root=t}},{key:"stop",value:function(){this.eventMaps.forEach((function(t){return t.eventPump.stop()}))}},{key:"add",value:function(t,e){var n=this;if(this.root){var r=function(r){var o=e[r];if("(self)"===r&&void 0===t.on)throw new Error("(self) selector not available when deliverer is not a event handlable object.");g(r,n.root,t).forEach((function(r){var i=new eu(r);i.on(t,o),i.start(),n.eventMaps.push({eventPump:i,listener:t,handlerMap:e,deliverer:r})}))};for(var o in e)r(o)}}},{key:"remove",value:function(t,e){for(var n=this.eventMaps.slice(0),r=0;r<n.length;r++){var o=n[r];o.listener!==t||e&&o.handlerMap!==e||(this.eventMaps.splice(r,1),o.eventPump.dispose())}}},{key:"clear",value:function(){this.eventMaps.slice(0).forEach((function(t){return t.eventPump.dispose()})),this.eventMaps=[]}},{key:"dispose",value:function(){this.stop(),this.clear()}}])&&nu(e.prototype,n),r&&nu(e,r),t}();function ou(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function iu(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 au(t,e,n){return e&&iu(t.prototype,e),n&&iu(t,n),t}var uu=0,cu=1,su=2,fu=0,lu=1,hu=2,pu={},du=0;var yu=function(){function t(e){ou(this,t),this._type=e.type,this._ctrlKey=e.ctrlKey,this._altKey=e.altKey,this._shiftKey=e.shiftKey,this._metaKey=e.metaKey;var n=function(t){if(t.touches){var e=t.touches[0];if(!e)return pu;var n=e.target.getBoundingClientRect();return pu={x:t.offsetX||e.clientX-(n.x||n.left),y:t.offsetY||e.clientY-(n.y||n.top)}}return{x:t.offsetX,y:t.offsetY}}(e);if(this._offsetX=n.x,this._offsetY=n.y,"wheel"==e.type)this.deltaX=e.deltaX,this.deltaY=e.deltaY,this.deltaZ=e.deltaZ;else if("drop"==e.type)this.dataTransfer=e.dataTransfer;else if(e.type.match(/^touch/)&&(this._scale=e.scale,this._touches=e.touches,this._changedTouches=e.changedTouches,null==this._scale)){var r=function(t){var e,n,r=0,o=0,i=0;if(1===t.touches.length)return i;Array.from(t.touches).forEach((function(t){e=null!=e?Math.min(t.screenX,e):t.screenX,r=Math.max(t.screenX,r),n=null!=n?Math.min(t.screenY,n):t.screenY,o=Math.max(t.screenY,o)}));var a=r-e||0,u=o-n||0;return i=Math.sqrt(Math.pow(a,2)+Math.pow(u,2))||0}(e);du>0&&(this._scale=r/du),du=r}}return au(t,[{key:"type",get:function(){return this._type},set:function(t){this._type=t}},{key:"offsetX",get:function(){return this._offsetX}},{key:"offsetY",get:function(){return this._offsetY}},{key:"altKey",get:function(){return this._altKey}},{key:"ctrlKey",get:function(){return this._ctrlKey}},{key:"shiftKey",get:function(){return this._shiftKey}},{key:"metaKey",get:function(){return this._metaKey}},{key:"touches",get:function(){return this._touches}},{key:"changedTouches",get:function(){return this._changedTouches}},{key:"scale",get:function(){return this._scale}},{key:"stopPropagation",value:function(){this._stop_=!0}},{key:"isPropagationStopped",value:function(){return this._stop_}}]),t}();function vu(t,e){return t.capture(e.offsetX,e.offsetY)}function gu(t,e,n){if(t&&t.app&&(!t.app.isViewMode||!t.hidden)){(n=new yu(n)).type=e;var r="on"+e;t[r]&&t[r](n),n.isPropagationStopped()||t.trigger(e,n)}}var mu=function(){function t(e,n){var r=this;ou(this,t),this.container=e,this.html_element=n,this.status=uu,this.last_target=null,this.gesture_handlers=re.map((function(t){return r.gestureHandlerBuilder(t)})),this.keyevent_handlers=oe.map((function(t){return r.keyeventHandlerBuilder(t)})),re.forEach((function(t,e){return n.addEventListener(t,r.gesture_handlers[e])})),oe.forEach((function(t,e){return n.addEventListener(t,r.keyevent_handlers[e])})),n.ondragover=this.gestureHandlerBuilder("dragover"),n.ondrop=this.gestureHandlerBuilder("drop"),n.tabIndex=1}return au(t,[{key:"dispose",value:function(){var t=this;this.last_enter_target&&gu(this.last_enter_target,"mouseleave",new CustomEvent("mouseleave")),re.forEach((function(e,n){return t.html_element.removeEventListener(e,t.gesture_handlers[n])})),oe.forEach((function(e,n){return t.html_element.removeEventListener(e,t.keyevent_handlers[n])})),delete this.gesture_handlers,delete this.keyevent_handlers,delete this.last_target}},{key:"gestureHandlerBuilder",value:function(t){var e=this["on".concat(t)].bind(this);return function(t){return e(new yu(t))&&t.preventDefault(),!1}}},{key:"keyeventHandlerBuilder",value:function(t){return this["on".concat(t)].bind(this)}},{key:"ondragover",value:function(t){return gu(vu(this.container,t),t.type,t),!1}},{key:"ondrop",value:function(t){return gu(vu(this.container,t),t.type,t),!1}},{key:"onclick",value:function(t){return gu(vu(this.container,t),t.type,t),this.last_target=null,!1}},{key:"ondblclick",value:function(t){return gu(vu(this.container,t),t.type,t),this.last_target=null,!1}},{key:"onkeydown",value:function(t){return this.container.trigger(t.type,t),!1}},{key:"onkeyup",value:function(t){return this.container.trigger(t.type,t),!1}},{key:"onmousemove",value:function(t){switch(this.status){case cu:var e=t.offsetX-this.__dragstart_e.offsetX,n=t.offsetY-this.__dragstart_e.offsetY;if(e*e+n*n<16)break;this.status=su,gu(this.last_target,"dragstart",this.__dragstart_e),this.__dragmove_e=t,gu(this.last_target,"dragmove",t);break;case su:this.__dragmove_e=t,gu(this.last_target,"dragmove",t);break;default:var r=vu(this.container,t);this.last_enter_target!==r&&(this.last_enter_target&&gu(this.last_enter_target,"mouseleave",t),r&&gu(r,"mouseenter",t),this.last_enter_target=r),gu(r,t.type,t),this.last_target=r}return!1}},{key:"onmousedown",value:function(t){switch(this.status){case su:gu(this.last_target,"dragend",t),this.last_target=null,this.status=uu;break;default:var e=vu(this.container,t);this.last_target=e,this.status=cu,this.__dragstart_e=t,gu(e,t.type,t)}return!1}},{key:"onmouseup",value:function(t){switch(this.status){case su:gu(this.last_target,"dragend",t);break;default:gu(vu(this.container,t),t.type,t)}return this.last_target=null,this.status=uu,!1}},{key:"onmouseout",value:function(t){var e=vu(this.container,t);switch(this.status){case su:gu(this.last_target,"dragend",t);break;default:if(this.last_target&&this.last_target===e)return;this.last_enter_target&&(gu(this.last_enter_target,"mouseleave",t),delete this.last_enter_target)}return this.last_target=null,this.status=uu,!1}},{key:"ontouchstart",value:function(t){var e=this,n=vu(this.container,t);return this.last_target=n,this.status=lu,this.touchPoints||(this.touchPoints=[]),this.touchPoints.push(t.changedTouches[0]),this.holdTimer=setTimeout((function(){e.status=fu,gu(e.last_target,"hold",t),delete e.holdTimer}),500),gu(n,t.type,t),!1}},{key:"ontouchmove",value:function(t){var e=this;if(!t.touches||!t.changedTouches)return gu(this.last_target,"dragstart",t),gu(this.last_target,"dragmove",t),!1;var n=vu(this.container,t);switch(this.status){case lu:Array.from(t.changedTouches).forEach((function(t){var n=e.touchPoints.find((function(e){return e.identifier===t.identifier}));if(n){var r=n.clientX-t.clientX,o=n.clientY-t.clientY;return Math.sqrt(Math.pow(r,2)+Math.pow(o,2))>=16?(e.status=hu,void(e.holdTimer&&(clearTimeout(e.holdTimer),delete e.holdTimer))):void 0}}));break;case hu:if(this.holdTimer&&(clearTimeout(this.holdTimer),delete this.holdTimer),2===t.changedTouches.length&&null!=t.scale&&1!==t.scale&&(t.scale<.9||t.scale>1.1))return gu(this.last_target,"pinch",t),!1;gu(this.last_target,"pan",t),n=this.last_target;break;default:this.last_enter_target!==n&&(this.last_enter_target&&gu(this.last_enter_target,"mouseleave",t),n&&gu(n,"mouseenter",t),this.last_enter_target=n),this.last_target=n}return gu(n,"touchmove",t),!1}},{key:"ontouchend",value:function(t){var e=vu(this.container,t);switch(this.status){case hu:e=this.last_target;break;case lu:var n=performance.now(),r=n-this.touchedAt;this.holdTimer&&(clearTimeout(this.holdTimer),delete this.holdTimer,gu(e,r<500?"doubletap":"tap",t),this.touchedAt=n)}gu(e,"touchend",t);var o=this.touchPoints.findIndex((function(e){return e.identifier===t.changedTouches[0].identifier}));return this.touchPoints.splice(o,1),this.last_target=null,this.status=fu,!1}},{key:"onwheel",value:function(t){return gu(vu(this.container,t),t.type,t),!1}}]),t}(),bu={};var wu={register:function(t,e){bu[t]=e},unregister:function(t){delete bu[t]},get:function(t){return bu[t]}};function xu(t){if(t.hasTextProperty&&!t.textHidden){var e=t.model,n=e.text,r=void 0===n?"":n,o=e.rotation,i=e.bold,a=void 0===i?ie.BOLD:i,u=e.italic,c=void 0===u?ie.ITALIC:u,s=e.textWrap,f=void 0===s?ie.TEXT_WRAP:s,l=e.fontFamily,h=void 0===l?ie.FONT_FAMILY:l,p=e.fontColor,d=void 0===p?ie.FONT_COLOR:p,y=e.textAlign,v=void 0===y?ie.TEXT_ALIGN:y,g=e.textBaseline,m=void 0===g?ie.TEXT_BASELINE:g,b=e.paddingTop,w=void 0===b?0:b,x=e.paddingBottom,_=void 0===x?0:x,k=e.paddingLeft,A=void 0===k?0:k,S=e.paddingRight,O=void 0===S?0:S,E=e.fontSize,P=void 0===E?ie.FONT_SIZE:E,j=e.lineHeight,M=void 0===j?1.2*P:j,R=t.bounds,T=R.left,I=R.top,C=R.width,z=R.height;t.textHidden=!0;var B=document.createElement("textarea");re.forEach((function(t){B.addEventListener(t,(function(t){t.stopPropagation()}),!0)}));var L=t.transcoordS2C(T,I),D=function(t){for(var e=0,n=1,r=t;r;){e+=r.get("rotation")||0;var o=r.get("scale")||{x:1,y:1},i=o.x,a=o.y;n*=Math.max(i,a)||1,r=r.parent}return{rotation:e,scale:n}}(t),F=D.rotation,N=D.scale,U=C-A-O,Y=U,G=z-w-_;switch(B.style.position="absolute",B.style.width=Y+"px",B.style.height=G+"px",B.style.paddingLeft=Math.max(A,0)+"px",B.style.paddingRight=O+"px",B.style.paddingTop=Math.max(w,0)+"px",B.style.paddingBottom=_+"px",B.value=r,B.style.fontFamily=h,B.style.fontSize=P+"px",B.style.lineHeight=M+"px",B.style.overflow="hidden",B.style.resize="none",B.style.outline="none",B.style.border=0,B.style.backgroundColor="transparent",B.style.display="inline-block",B.style.color=d,a&&(B.style.fontWeight="bold"),c&&(B.style.fontStyle="italic"),v){case"right":case"end":B.style.textAlign="right";break;case"justify":B.style.textAlign="justify";break;case"left":case"start":B.style.textAlign="left";break;case"center":default:B.style.textAlign="center"}var H=[a,c,P+"px",h].filter((function(t){return!!t})).join(" ");K(r);var W=t.root.target_element;W.appendChild(B),B.select();var V,X=!1;B.addEventListener("keydown",(function(t){t.stopPropagation(),"Escape"!=t.code&&(t.shiftKey||"Enter"!=t.code&&"NumpadEnter"!=t.code)?setTimeout((function(){K(B.value)})):(X=V.skipUpdate="Escape"==t.code,document.createEvent?B.dispatchEvent(V):B.fireEvent(V.eventType,V))})),document.createEvent?(V=document.createEvent("HTMLEvents")).initEvent("blur",!0,!1):(V=document.createEventObject()).eventType="blur";var q=t.root.selected;B.addEventListener("blur",(function e(n){t.root.selected=q,t.textHidden=!1,B.removeEventListener("blur",e,!1),B.parentElement&&B.parentElement.removeChild(B),W.focus(),n.skipUpdate||X||t.app.commander.execute(new ra({changes:[{component:t,before:{text:r},after:{text:B.value}}]}))}),!1)}function K(e){var n={left:0,top:0},r=M*function(t,e,n,r){var o,i=t.getContext();return i.save(),i.font=n,o=Ae(i,e,r,t.get("textWrap")).length,i.restore(),o}(t,e,H,U);switch(B.style.height=r+"px",m){case"top":case"hanging":break;case"bottom":case"alphabetic":n.top=G-r;break;case"middle":default:n.top=G/2-r/2}if(!f){var o=function(t,e,n,r){var o=e.split("\n"),i=r,a=t.getContext();return a.save(),a.font=n,o.forEach((function(t){var e=a.measureText(t).width;e>i&&(i=e)})),a.restore(),i}(t,e,H,U);switch(B.style.width=o+"px",v){case"right":case"end":n.left=U-o;break;case"left":case"start":break;case"center":case"justify":default:n.left=(U-o)/2}}B.style.marginLeft=n.left+"px",B.style.marginTop=n.top+"px";var i="translate(".concat(L.x,"px, ").concat(L.y,"px) scale(").concat(N,") rotate(").concat(F,"rad) perspective(1px)");["-webkit-","-moz-","-ms-","-o-",""].forEach((function(t){B.style[t+"transform"]=i,B.style[t+"transform-origin"]="".concat(-n.left,"px ").concat(-n.top,"px")}))}}wu.register("text-editor",{"(root)":{"(self)":{keydown:function(t,e){e.origin;var n=e.deliverer.selected;return!(1!==n.length||!n[0].hasTextProperty)&&(("Enter"==t.code||"NumpadEnter"==t.code)&&(xu(n[0]),t.preventDefault(),!0))}}},"model-layer":{"(descendant)":{dblclick:function(t,e){xu(e.origin)}}}});var _u=x()((function(t,e,n){if(n)t.focused=null;else{var r=[];e[0].parent.isGroup()?t.focused=e[0].parent:(e.forEach((function(t){t.path.forEach((function(e){r.push(t.transcoordS2T(e.x,e.y))}))})),t.focused=t.capturePath(r,e))}}),300);function ku(t){return(ku="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Au(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 Su(){return(Su="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Ou(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Ou(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ru(t)););return t}function Eu(t,e){return(Eu=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Pu(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=Ru(t);if(e){var o=Ru(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ju(this,n)}}function ju(t,e){if(e&&("object"===ku(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Mu(t)}function Mu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ru(t){return(Ru=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}wu.register("move-handler",{"model-layer":{"(descendant)":{dragstart:function(t,e){var n=e.origin,r=e.deliverer;if(!n.stuck){var o=r.selected,i=r.selected.filter((function(t){return!t.stuck}));if(o.length!==i.length&&(o=r.selected=i),0!=o.length){var a=o[0].transcoordC2S(t.offsetX,t.offsetY);a=o[0].transcoordS2P(a.x,a.y),this.last_pos=a,this.direction=0,r.focused=o[0].parent,t.altKey?(r.selected=o.map((function(t){var e=Ja(t);return t.parent.addComponent(e),e})),this.duplicates=r.selected.map((function(t){return{component:t}}))):this.changes=ra.before(o)}}},dragmove:function(t,e){var n=e.origin,r=e.deliverer;if(!n.stuck){var o=r.selected;if(0!=o.length){var i=o[0].transcoordC2S(t.offsetX,t.offsetY),a=i.x,u=i.y,c=o[0].transcoordS2P(a,u);t.shiftKey?2==this.direction&&(this.direction=0):this.direction=2;var s=c.x-this.last_pos.x,f=c.y-this.last_pos.y;if(0==this.direction){if(s*s+f*f<25)return;Math.abs(s)>Math.abs(f)?this.direction=3:this.direction=4}3==this.direction?f=0:4==this.direction&&(s=0),o.forEach((function(t){t.move({x:s,y:f})})),this.last_pos=c,_u(r,o)}}},dragend:function(t,e){var n=e.origin,r=e.deliverer;if(!n.stuck){var o=r.selected;if(0!=o.length){var i=n.parent,a=r.focused||e.deliverer;if(this.changes&&!a.isGroup())if(a&&a!==i){var u=this.changes.map((function(t){var e=t.component;t.before;return{component:e,to_container:a}}));r.app.commander.execute(new ha({changes:u}))}else ra.after(this.changes,r.app.commander);else if(this.duplicates){this.duplicates=this.duplicates.map((function(t){return t.to_container=a,t}));var c=new ha({changes:this.duplicates});r.app.commander.execute(c)}o.forEach((function(t){t.parent&&t.parent.calculateBounds&&t.parent.calculateBounds()})),this.last_pos=null,this.changes=null,this.duplicates=null,_u(r,o,!0)}}}}},"(root)":{"(self)":{keydown:function(t,e){var n=e.origin,r=e.deliverer,o={},i=t.shiftKey?n.rootModel.MPP:1;switch(t.which){case 37:o.x=-i,o.y=0;break;case 38:o.x=0,o.y=-i;break;case 39:o.x=i,o.y=0;break;case 40:o.x=0,o.y=i;break;default:return}var a=r.selected;ra.around(r.app.commander,(function(){a.forEach((function(t){!t.stuck&&t.move(o)}))}))}}}});var Tu=[];"undefined"!=typeof window&&window.addEventListener("resize",(function(){Tu.forEach((function(t){t.resize()}))}));var Iu=function(t){!function(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&&Eu(t,e)}(i,t);var e,n,r,o=Pu(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),n=o.call(this,Object.assign({type:"root",scale:{x:1,y:1}},t||{}),e),t=t||{},n.fitMode=t.model&&t.model.fitMode,n._app=e,n.target_element=t.target_element,n.rebuildContentModel(n.model.model),Tu.push(Mu(n)),n}return e=i,(n=[{key:"dispose",value:function(){this._app&&this._app.dispose(),Su(Ru(i.prototype),"dispose",this).call(this),this._disposeAllResources(),this.target_element=null,delete this._refresh_mapping_debouncer,fr(this);var t=Tu.indexOf(this);t>=0&&Tu.splice(t,1)}},{key:"isRoot",value:function(){return!0}},{key:"app",get:function(){return this._app}},{key:"target_element",get:function(){return this._target_element},set:function(t){this._ua_event_handler&&(this._ua_event_handler.dispose(),delete this._ua_event_handler),t&&(t.style.position="absolute",t.style.cursor="default",t.style.overflow="hidden",this._ua_event_handler=new mu(this,t)),this.forEach((function(e){return e.target=t})),this._target_element=t}},{key:"variable",value:function(t,e){var n=this.findById(t);if(!n){var r=this.findTemplateFor(t);if(!r)return;n=pa(Object.assign(b.a(r.hierarchy),{id:t,templatePrefix:""}),this.app),this.model_layer.addComponent(n)}if(void 0===e)return n.data;n.data=e,n.touch()}},{key:"buildVariables",value:function(t){var e=this;!t||t instanceof Array||(t=Object.keys(t).map((function(e){var n=t[e];return n.key=e,n}))),t&&t.forEach((function(t,n){var r=e.indexMap[t.key];if(r)r.set({data:t.value,mappings:t.mappings&&t.mappings.slice(),dataType:t.dataType});else{var o=pa({type:"variable",id:t.key,left:-120,top:0+20*n,strokeStyle:"black",width:100,height:20,dataType:t.type,data:t.value,mappings:t.mappings&&t.mappings.slice()},e.app);e.model_layer.addComponent(o)}}))}},{key:"unitScale",get:function(){switch(this.model_layer&&this.model_layer.get("unit")){case"mm":case"cm":case"in":return this.app.PPM/10;case"px":default:return 1}}},{key:"addTemplate",value:function(t,e){var n=this.templateMap[t];n&&pe("Template replaced (duplicated)",t,e,n),this.templateMap[t]=e,delete this.templatePrefixes}},{key:"removeTemplate",value:function(t,e){var n=this.templateMap[t];n!==e?de("Removing template failed (different)",t,e,n):delete this.templateMap[t],delete this.templatePrefixes}},{key:"findTemplateFor",value:function(t){this.templatePrefixes||(this.templatePrefixes=Object.keys(this.templateMap).sort().reverse());var e=this.templatePrefixes.find((function(e){return t.startsWith(e)}));if(e)return this.templateMap[e]}},{key:"addIndex",value:function(t,e){var n=this.indexMap[t];n&&pe("Index replaced (duplicated)",t,e,n),this.indexMap[t]=e}},{key:"removeIndex",value:function(t,e){var n=this.indexMap[t];n!==e?de("Removing index failed (different)",t,e,n):delete this.indexMap[t]}},{key:"findById",value:function(t){return this.indexMap[t]}},{key:"findOrCreate",value:function(t){var e=this.indexMap[t];if(!e){var n=this.findTemplateFor(t);n&&(e=pa(Object.assign(b.a(n.hierarchy),{id:t,templatePrefix:""}),this.app),this.model_layer.addComponent(e))}return e}},{key:"resize",value:function(){this.components.forEach((function(t){t.resize&&t.resize()})),this.invalidate()}},{key:"_disposeAllResources",value:function(){var t=this;this.selected=[],this._focused=null,this._ready=!1,this.eventEngine&&(this.assist_handlers&&this.assist_handlers.forEach((function(e){t.eventEngine.remove(e)})),this.eventEngine.dispose(),delete this.eventEngine),this.assist_layers&&this.assist_layers.forEach((function(e){e.dispose(),t.removeComponent(e)})),delete this.assist_layers,this.model_layer&&this.model_layer.dispose(),this.model_layer&&this.removeComponent(this.model_layer),delete this.model_layer,this.indexMap={},this.templateMap={}}},{key:"rebuildContentModel",value:function(t){var e=this;this._disposeAllResources(),this.eventEngine=new ru(this),(t=t||{}).type="model-layer";var n=t.variables;delete t.variables,this.model_layer=pa(t,this.app),this.addComponent(this.model_layer),this.model_layer.target=this.target_element,n&&this.buildVariables(n),this.assist_layers=(this.model.layers||[]).map((function(t){var n=pa(t,e.app);return e.addComponent(n),n.target=e.target_element,n})),this.assist_handlers=(this.model.handlers||[]).map((function(t){var n={};return e.eventEngine.add(n,wu.get(t)),n})),this._ready=!0,this.traverse((function(t){return t.ready()}))}},{key:"root",get:function(){return this}},{key:"isReady",get:function(){return this._ready}},{key:"rootModel",get:function(){return this.model_layer}},{key:"stuck",get:function(){return!0}},{key:"data",get:function(){return Object.values(this.indexMap).reduce((function(t,e){return t[e.model.id]=e.data,t}),{})},set:function(t){for(var e in t){var n=this.findOrCreate(e);n&&(n.data=t[e])}}},{key:"selected",get:function(){return(this._selected||[]).filter((function(t){return t.parent}))},set:function(t){var e=this._selected;this._selected=t,this.trigger("selected",t,e)}},{key:"focused",get:function(){return this._focused},set:function(t){this._focused!==t&&(this._focused=t,this.invalidate())}},{key:"style",get:function(){return this._style},set:function(t){this._style=t,this._compiled_style=t}},{key:"hasTextProperty",get:function(){return!1}},{key:"render",value:function(){this.components.forEach((function(t){return t.draw()}))}},{key:"contains",value:function(t,e){return!0}},{key:"capturePath",value:function(t,e){return this.model_layer.capturePath(t,e)}},{key:"invalidate",value:function(){this.components.forEach((function(t){return t.invalidate()}))}},{key:"eventMap",get:function(){return{"(root)":{"(descendant)":{added:this.onadded,removed:this.onremoved,change:this.onchanged}}}}},{key:"refreshMappings",value:function(){if(!this._refresh_mapping_debouncer){if(this.disposed)return;this._refresh_mapping_debouncer=x.a((function t(e){e.executeMappings(),e.components&&e.components.forEach((function(e){return t(e)}))}),1e3)}this._refresh_mapping_debouncer(this.model_layer)}},{key:"_addTraverse",value:function(t){var e=this;t.components&&t.components.forEach((function(t){return e._addTraverse(t)}));var n=t.model,r=n.id,o=n.templatePrefix;r&&this.addIndex(r,t),o&&this.addTemplate(o,t);var i=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"object"!=P(e)&&(e={});for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.forEach((function(n){var r=function(r){"object"!=P(n[r])?e[r]=n[r]:n[r].length>0?e[r]=n[r].map((function(e){return"object"!=P(n[r])?e:t({},e)})):e[r]=t(e[r],n[r])};for(var o in n)r(o)})),e}({},t.eventMap,t.model.eventMap);this.eventEngine.add(t,i)}},{key:"_removeTraverse",value:function(t){var e=this;t.components&&t.components.forEach((function(t){return e._removeTraverse(t)}));var n=t.model,r=n.id,o=n.templatePrefix;r&&this.removeIndex(r,t),o&&this.removeTemplate(o,t),this.eventEngine.remove(t)}},{key:"onadded",value:function(t,e){this._addTraverse(e),this.refreshMappings(),this.invalidate()}},{key:"onremoved",value:function(t,e){this._removeTraverse(e),this.invalidate()}},{key:"onchanged",value:function(t,e,n){e.templatePrefix&&this.removeTemplate(e.templatePrefix,n.origin),t.templatePrefix&&this.addTemplate(t.templatePrefix,n.origin),e.id&&this.removeIndex(e.id,n.origin),t.id&&this.addIndex(t.id,n.origin),e.id==t.id&&e.class==t.class||this.refreshMappings()}}])&&Au(e.prototype,n),r&&Au(e,r),i}(Vr);Object.assign(Iu.prototype,{fit:function(t){var e=this.model_layer.model,n=e.width,r=e.height,o=e.fitMode,i=this.target_element,a=this.model_layer;if(this.fitMode=t||this.fitMode||o||"ratio",n&&r&&i&&i.offsetWidth&&i.offsetHeight){switch(this.fitMode){case"center":!function(t,e,n){var r=t.unitScale,o=e.model,i=o.width,a=o.height;e.set("scale",{x:r,y:r}),e.set("translate",{x:Math.max((n.offsetWidth-i*r)/2,0),y:Math.max((n.offsetHeight-a*r)/2,0)})}(this,a,i);break;case"both":!function(t,e,n){var r=e.model,o=r.width,i=r.height,a=n.offsetWidth,u=n.offsetHeight;e.set("scale",{x:a/o,y:u/i}),e.set("translate",{x:0,y:0})}(0,a,i);break;case"width":!function(t,e,n){var r=n.offsetWidth/e.get("width");e.set("scale",{x:r,y:r}),e.set("translate",{x:0,y:0})}(0,a,i);break;case"height":!function(t,e,n){var r=n.offsetHeight/e.get("height");e.set("scale",{x:r,y:r}),e.set("translate",{x:0,y:0})}(0,a,i);break;case"ratio":!function(t,e,n){var r=e.model,o=r.width,i=r.height,a=n.offsetWidth,u=n.offsetHeight,c=a/o,s=u/i,f=Math.min(c,s);e.set("scale",{x:f,y:f}),e.set("translate",{x:(a-o*f)/2,y:(u-i*f)/2})}(0,a,i);break;case"none":default:!function(t,e,n){var r=t.unitScale;e.set("scale",{x:r,y:r}),e.set("translate",{x:0,y:0})}(this,a)}this.resize()}}}),mn.memoize(Iu.prototype,"unitScale",!1);var Cu=13.3,zu=function(t){return void 0!==t&&(Cu=t),Cu};function Bu(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)}}var Lu=Math.PI/12,Du=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._mode=e,this.screen=zu(),this._baseUrl="undefined"!=typeof window?window.location.origin:null,this._refProvider=n,this.isEditMode&&(this._rotateStep=Lu,this._rotateStepForced=!1)}var e,n,r;return e=t,(n=[{key:"dispose",value:function(){}},{key:"_calcScreen",value:function(){var t={width:screen.width,height:screen.height};this._PPI=function(t,e,n,r){t>0||(t=1),e>0||(e=1),r||(r="d");var o=("d"==r?Math.sqrt(t*t+e*e):"w"==r?t:e)/n;return o>0?Math.round(o):0}(t.width,t.height,this.screen),this._PPM=this._PPI/25.4}},{key:"refProvider",get:function(){return this._refProvider}},{key:"commander",get:function(){return this._commander},set:function(t){this._commander=t}},{key:"screen",get:function(){return this._screen},set:function(t){this._screen=t,this._calcScreen()}},{key:"DPPX",get:function(){return ne}},{key:"PPI",get:function(){return this._PPI}},{key:"PPM",get:function(){return this._PPM}},{key:"mode",get:function(){return this._mode},set:function(t){var e=this._mode;e!==t&&(this._mode=t,this.trigger("mode",t,e))}},{key:"isViewMode",get:function(){return this._mode==Zt}},{key:"isEditMode",get:function(){return this._mode==$t}},{key:"baseUrl",get:function(){return this._baseUrl},set:function(t){t&&this._baseUrl!=t&&(this._baseUrl=t)}},{key:"url",value:function(t){try{return(t.includes("$base_url")?new URL(t.replace("$base_url",this.baseUrl),this.baseUrl):new URL(t,location.origin)).href}catch(e){de(e,t)}}},{key:"rotateStep",get:function(){return this._rotateStep},set:function(t){this._rotateStep=Number(t)||Lu}},{key:"rotateStepForced",get:function(){return this._rotateStepForced},set:function(t){this._rotateStepForced=!!t}}])&&Bu(e.prototype,n),r&&Bu(e,r),t}();ot(Du.prototype,rt.withEvent);var Fu=["left","right","center","top","middle","bottom"];function Nu(t){if(-1!=Fu.indexOf(t)){var e=this.selected.filter((function(t){return!t.stuck}));if(!(e.length<=1)){var n=this.app.commander;ra.around(n,(function(){!function(t,e){for(var n=JSON.parse(JSON.stringify(e[0].bounds)),r=n.left+n.width,o=n.top+n.height,i=0;i<e.length;i++){var a=e[i].bounds;n.left=a.left>n.left?n.left:a.left,n.top=a.top>n.top?n.top:a.top,r=a.left+a.width>r?a.left+a.width:r,o=a.top+a.height>o?a.top+a.height:o}switch(n.width=r-n.left,n.height=o-n.top,t){case"left":for(var u=0;u<e.length;u++){var c=e[u].bounds;e[u].bounds={left:n.left,top:c.top,width:c.width,height:c.height}}break;case"center":for(var s=0;s<e.length;s++){var f=e[s].bounds;e[s].bounds={left:n.left+n.width/2-f.width/2,top:f.top,width:f.width,height:f.height}}break;case"right":for(var l=0;l<e.length;l++){var h=e[l].bounds;e[l].bounds={left:r-h.width,top:h.top,width:h.width,height:h.height}}break;case"top":for(var p=0;p<e.length;p++){var d=e[p].bounds;e[p].bounds={left:d.left,top:n.top,width:d.width,height:d.height}}break;case"middle":for(var y=0;y<e.length;y++){var v=e[y].bounds;e[y].bounds={left:v.left,top:n.top+n.height/2-v.height/2,width:v.width,height:v.height}}break;case"bottom":for(var g=0;g<e.length;g++){var m=e[g].bounds;e[g].bounds={left:m.left,top:o-m.height,width:m.width,height:m.height}}break;default:;}}(t,e)}))}}}var Uu=["VERTICAL","HORIZONTAL"];function Yu(t){if(-1!=Uu.indexOf(t)){var e=this.selected;if(!(e.length<=1)){var n=this.app.commander;ra.around(n,(function(){!function(t,e){var n=e.filter((function(t){return!t.stuck})).slice(0);n.sort((function(e,n){var r=e.center,o=n.center;return"VERTICAL"===t?r.y-o.y:r.x-o.x}));for(var r=n.reduce((function(e,n){return e+("VERTICAL"===t?n.bounds.height:n.bounds.width)}),0),o=n[0].bounds,i=n[n.length-1].bounds,a=(("VERTICAL"===t?i.top+i.height-o.top:i.left+i.width-o.left)-r)/(n.length-1),u="VERTICAL"===t?o.top+o.height:o.left+o.width,c=1;c<n.length-1;c++){var s=n[c],f=s.bounds;u+=a,"VERTICAL"===t?(f.top=u,u+=f.height):(f.left=u,u+=f.width),s.bounds=f}}(t,e)}))}}}function Gu(t,e,n){this.app.commander.execute(new ha({changes:[{component:t,to_container:e,to_index:n}]}))}function Hu(t){var e=this.selected.filter((function(t){return!t.stuck}));if(!(0==e.length||e[0].isRootModel()||e.length>1&&("forward"==t||"backward"==t))){var n,r=e[0].parent;if("forward"==t){var o=r.indexOf(e[0]);n=[{component:e[0],from_container:r,to_container:r,from_index:o,to_index:o+1}]}else if("backward"==t){var i=r.indexOf(e[0]);n=[{component:e[0],from_container:r,to_container:r,from_index:i,to_index:i-1}]}else n=e.filter((function(t){return t.parent===r})).sort((function(e,n){var o=r.indexOf(e)<r.indexOf(n);return"front"==t?o:!o})).map((function(e,n){r.indexOf(e);return{component:e,to_container:r,to_index:"front"==t?r.components.length-n-1:n}}));var a=new ha({changes:n});this.app.commander.execute(a)}}function Wu(t,e,n){t instanceof Array||(t=[t]),n||(n=this.model_layer);var r=[];this.selected=t.map((function(t){try{return pa(t,n.app)}catch(t){return console.warn(t),!1}})).filter((function(t){return!!t})).map((function(t){var o=e.left,i=e.top,a=e.width,u=e.height,c=e.x,s=e.y,f=e.cx,l=e.cy;return isNaN(o)||isNaN(i)||isNaN(a)||isNaN(u)||(t.bounds={left:o,top:i,width:a,height:u}),isNaN(c)||isNaN(s)||t.move({x:c,y:s}),isNaN(f)||isNaN(l)||(t.center={x:f,y:l}),r.push({component:t,to_container:n}),t})),this.app.commander.execute(new ha({changes:r}))}function Vu(){var t=[];if(this.selected=this.selected.filter((function(t){return!t.isRootModel()})).map((function(e){var n=Ja(e);return n.move({x:20,y:20}),t.push({component:n,to_container:e.parent}),n})),0!=t.length){var e=new ha({changes:t});this.app.commander.execute(e)}}function Xu(){var t=this.selected;this.selected=[];for(var e=null,n=t.filter((function(t){return!t.isRootModel()&&(t.parent.focusible||t.parent.isGroup())})).map((function(t){return e||(e=t.parent),{component:t,to_container:null}})),r=function(){var t=[];if(e.components.filter((function(t){return!n.find((function(e){return e.component===t}))})).forEach((function(e){return t.push(e)})),t.length>1)return"break";var r=e.parent;t.forEach((function(t){return n.push({component:t,to_container:r})})),n.push({component:e,to_container:null}),e=r};e&&e.isGroup();){if("break"===r())break}n.length>0&&this.app.commander.execute(new ha({changes:n})),e&&e.calculateBounds&&e.calculateBounds()}function qu(t,e,n){switch(t){case"execute":case"redo":case"undo":case"command-reset":this.app.commander.on(t,e,n);break;case"selected":this.on(t,e,n);break;case"mode":this.app.on(t,e,n);break;default:this.on(t,e,n)}}function Ku(t,e,n){switch(t){case"execute":case"redo":case"undo":case"command-reset":this.app.commander.once(t,e,n);break;case"selected":this.once(t,e,n);break;case"mode":this.app.once(t,e,n);break;default:this.once(t,e,n)}}function Qu(t,e,n){switch(t){case"execute":case"redo":case"undo":case"command-reset":this.app?this.app.commander.off(t,e,n):this.off(t,e,n);break;case"selected":this.off(t,e,n);break;case"mode":this.app.off(t,e,n);break;default:this.off(t,e,n)}}function Ju(t){var e=this.target_element,n=t||this.fitMode,r=this;function o(t){r.fit(n),document.fullscreen||document.mozFullScreen||document.webkitIsFullScreen||document.msFullscreenElement||["fullscreenchange","mozfullscreenchange","webkitfullscreenchange","MSFullscreenChange"].forEach((function(t){return document.removeEventListener(t,o)}))}["fullscreenchange","mozfullscreenchange","webkitfullscreenchange","MSFullscreenChange"].forEach((function(t){return document.addEventListener(t,o)})),e.requestFullScreen?e.requestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()}var Zu=0;function $u(){var t=this.selected.filter((function(t){return!t.isRootModel()})).map((function(t){return t.hierarchy}));if(0!=t.length)return Zu=0,JSON.stringify(t,null,2)}function tc(){Zu=0;var t=$u.call(this);return Xu.call(this),t}function ec(t){if(t)try{JSON.parse(t);Zu++,Wu.call(this,JSON.parse(t),{x:15*Zu,y:15*Zu})}catch(e){pe(e,t)}}var nc=function(){return{escape:function(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:e,mimeType:function(t){var n=e(t).toLowerCase();return(r="application/font-woff",{woff:r,woff2:r,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[n]||"";var r},dataAsUrl:function(t,e){return"data:"+e+";base64,"+t},isDataUrl:function(t){return-1!==t.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):function(t){return new Promise((function(e){for(var n=window.atob(t.toDataURL().split(",")[1]),r=n.length,o=new Uint8Array(r),i=0;i<r;i++)o[i]=n.charCodeAt(i);e(new Blob([o],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var o=n.createElement("a");return n.body.appendChild(o),r.href=e,o.href=t,o.href},getAndEncode:function(t){fc.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());return new Promise((function(e){var n,r=new XMLHttpRequest;if(r.onreadystatechange=function(){if(4!==r.readyState)return;if(200!==r.status)return void(n?e(n):i("cannot fetch resource: "+t+", status: "+r.status));var o=new FileReader;o.onloadend=function(){var t=o.result.split(/,/)[1];e(t)},o.readAsDataURL(r.response)},r.ontimeout=function(){n?e(n):i("timeout of 30000ms occured while fetching resource: "+t)},r.responseType="blob",r.timeout=3e4,r.open("GET",t,!0),r.send(),fc.impl.options.imagePlaceholder){var o=fc.impl.options.imagePlaceholder.split(/,/);o&&o[1]&&(n=o[1])}function i(t){console.error(t),e("")}}))},uid:(t=0,function(){return"u"+("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)+t++}),delay:function(t){return function(e){return new Promise((function(n){setTimeout((function(){n(e)}),t)}))}},asArray:function(t){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e},escapeXhtml:function(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){e(r)},r.onerror=n,r.src=t}))},width:function(t){var e=n(t,"border-left-width"),r=n(t,"border-right-width");return t.scrollWidth+e+r},height:function(t){var e=n(t,"border-top-width"),r=n(t,"border-bottom-width");return t.scrollHeight+e+r}};var t;function e(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function n(t,e){var n=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(n.replace("px",""))}}(),rc=function(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(t,o,i){return function(){return!e(t)}()?Promise.resolve(t):Promise.resolve(t).then(n).then((function(e){var n=Promise.resolve(t);return e.forEach((function(t){n=n.then((function(e){return r(e,t,o,i)}))})),n}))},shouldProcess:e,impl:{readUrls:n,inline:r}};function e(e){return-1!==e.search(t)}function n(e){for(var n,r=[];null!==(n=t.exec(e));)r.push(n[1]);return r.filter((function(t){return!nc.isDataUrl(t)}))}function r(t,e,n,r){return Promise.resolve(e).then((function(t){return n?nc.resolveUrl(t,n):t})).then(r||nc.getAndEncode).then((function(t){return nc.dataAsUrl(t,nc.mimeType(e))})).then((function(n){return t.replace(function(t){return new RegExp("(url\\(['\"]?)("+nc.escape(t)+")(['\"]?\\))","g")}(e),"$1"+n+"$3")}))}}(),oc=function(){return{resolveAll:function(){return t(document).then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))},impl:{readAll:t}};function t(){return Promise.resolve(nc.asArray(document.styleSheets)).then((function(t){var e=[];return t.forEach((function(t){try{nc.asArray(t.cssRules||[]).forEach(e.push.bind(e))}catch(e){console.log("Error while reading CSS rules from "+t.href,e.toString())}})),e})).then((function(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return rc.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return rc.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}(),ic=function(){return{inlineAll:function e(n){return n instanceof Element?function(t){var e=t.style.getPropertyValue("background");return e?rc.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}(n).then((function(){return n instanceof HTMLImageElement?t(n).inline():Promise.all(nc.asArray(n.childNodes).map((function(t){return e(t)})))})):Promise.resolve(n)},impl:{newImage:t}};function t(t){return{inline:function(e){return nc.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||nc.getAndEncode).then((function(e){return nc.dataAsUrl(e,nc.mimeType(t.src))})).then((function(e){return new Promise((function(n,r){t.onload=n,t.onerror=r,t.src=e}))}))}}}}(),ac={imagePlaceholder:void 0,cacheBust:!1};function uc(t,e){return function(t){void 0===t.imagePlaceholder?fc.impl.options.imagePlaceholder=ac.imagePlaceholder:fc.impl.options.imagePlaceholder=t.imagePlaceholder;void 0===t.cacheBust?fc.impl.options.cacheBust=ac.cacheBust:fc.impl.options.cacheBust=t.cacheBust}(e=e||{}),Promise.resolve(t).then((function(t){return function t(e,n,r){return r||!n||n(e)?Promise.resolve(e).then((function(t){if(t instanceof HTMLCanvasElement)try{return nc.makeImage(t.toDataURL())}catch(t){de(t)}return t.cloneNode(!1)})).then((function(t){return o(e,t,n)})).then((function(t){return function(t,e){return e instanceof Element?Promise.resolve().then(n).then(r).then(o).then(i).then((function(){return e})):e;function n(){var n,r;n=window.getComputedStyle(t),r=e.style,n.cssText?r.cssText=n.cssText:function(t,e){nc.asArray(t).forEach((function(n){e.setProperty(n,t.getPropertyValue(n),t.getPropertyPriority(n))}))}(n,r)}function r(){[":before",":after"].forEach((function(n){!function(n){var r=window.getComputedStyle(t,n),o=r.getPropertyValue("content");if(""===o||"none"===o)return;var i=nc.uid();e.className=e.className+" "+i;var a=document.createElement("style");a.appendChild(function(t,e,n){var r="."+t+":"+e,o=n.cssText?function(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}(n):function(t){return nc.asArray(t).map((function(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")})).join("; ")+";"}(n);return document.createTextNode(r+"{"+o+"}")}(i,n,r)),e.appendChild(a)}(n)}))}function o(){t instanceof HTMLTextAreaElement&&(e.innerHTML=t.value),t instanceof HTMLInputElement&&e.setAttribute("value",t.value)}function i(){e instanceof SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof SVGRectElement&&["width","height"].forEach((function(t){var n=e.getAttribute(t);n&&e.style.setProperty(t,n)})))}}(e,t)})):Promise.resolve();function o(e,n,r){var o=e.childNodes;return 0===o.length?Promise.resolve(n):i(n,nc.asArray(o),r).then((function(){return n}));function i(e,n,r){var o=Promise.resolve();return n.forEach((function(n){o=o.then((function(){return t(n,r)})).then((function(t){t&&e.appendChild(t)}))})),o}}}(t,e.filter,!0)})).then(sc).then((function(t){var n=e,r=n.bgcolor,o=n.width,i=n.height,a=n.style,u=n.sx,c=void 0===u?1:u,s=n.sy,f=void 0===s?1:s,l=t.style;r&&(l.backgroundColor=r);o&&(l.width=o+"px");i&&(l.height=i+"px");l["margin-left"]="0px",l["margin-top"]="0px",["-webkit-","-moz-","-ms-","-o-",""].forEach((function(t){l[t+"transform"]="rotate(0rad) translate(0px, 0px) scale(".concat(c,", ").concat(f,") perspective(1px)")})),a&&Object.keys(a).forEach((function(t){l[t]=a[t]}));return t})).then((function(n){return function(t,e,n){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(nc.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+n+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}(n,e.width||nc.width(t),e.height||nc.height(t))}))}function cc(t,e){return uc(t,e).then(nc.makeImage).then(nc.delay(100)).then((function(n){var r=function(t){var n=document.createElement("canvas");e.width,e.height;if(n.width=e.width||nc.width(t),n.height=e.height||nc.height(t),e.bgcolor){var r=n.getContext("2d");r.fillStyle=e.bgcolor,r.fillRect(0,0,n.width,n.height)}return n}(t);return r.getContext("2d").drawImage(n,0,0),r}))}function sc(t){return ic.inlineAll(t).then((function(){return t}))}var fc={toSvg:uc,toPng:function(t,e){return cc(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return cc(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return cc(t,e||{}).then(nc.canvasToBlob)},toPixelData:function(t,e){return cc(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,nc.width(t),nc.height(t)).data}))},impl:{fontFaces:oc,images:ic,util:nc,inliner:rc,options:{}}},lc=fc;function hc(t,e,n,r){var o=this.model_layer,i=o._overlay;return new Promise((function(a,u){if(o){var c=o.get("width"),s=o.get("height");n=n||c,r=r||s;var f=o.get("translate"),l=o.get("scale"),h=Math.min(n/c,r/s);n=c*h,r=s*h,o.set("translate",{x:0,y:0}),o.set("scale",{x:h/ne,y:h/ne});var p=mn.createCanvas(n,r),d=p.getContext("2d");if(o.draw(d),o.set("translate",f),o.set("scale",l),!i)return a(p.toDataURL(t,e)),void(p=null);lc.toPng(i,{sx:h,sy:h,width:n,height:r}).then((function(o){var i=new Image;i.onload=function(){d.drawImage(i,0,0,n,r),a(p.toDataURL(t,e)),p=null},i.src=o}),(function(n){pe(n),a(p.toDataURL(t,e)),p=null}))}else u("No target model")}))}function pc(){var t=this.selected.filter((function(t){return!!t.parent&&!t.stuck}));if(!(t.length<2)){var e=t[0].parent,n=[],r=t.sort((function(t,n){return e.components.indexOf(t)-e.components.indexOf(n)}));r.forEach((function(t){n.push(t.bounds)}));var o=mn.union(n),i=t[0].transcoordP2S(o.left,o.top),a=pa({type:"group",left:(i=t[0].transcoordS2T(i.x,i.y)).x,top:i.y,width:o.width,height:o.height}),u=[{component:a,to_container:e}];r.forEach((function(t){u.push({component:t,to_container:a})})),this.app.commander.execute(new ha({changes:u})),this.selected=[a]}}function dc(){if(0!==this.selected.length){var t=[],e=[];this.selected.forEach((function(n){if(n.isGroup()){var r=n.parent;n.components.forEach((function(n){t.push(n),e.push({component:n,to_container:r})})),e.push({component:n,to_container:null})}})),this.app.commander.execute(new ha({changes:e})),this.selected=t}}function yc(){var t=this.selected;if(0!=t.length){var e=t.map((function(t){return t.bounds})),n=mn.union(e),r=n.left+n.width/2;t.map((function(t){t.symmetryX(r)}))}}function vc(){var t=this.selected;if(0!=t.length){var e=t.map((function(t){return t.bounds})),n=mn.union(e),r=n.top+n.height/2;t.map((function(t){t.symmetryY(r)}))}}function gc(){ra.around(this.app.commander,yc,this)}function mc(){ra.around(this.app.commander,vc,this)}function bc(t,e,n){var r=this.findAll(t,n);return r.forEach((function(t){t.set(e)})),r}function wc(t){ra.around(this.app.commander,t)}function xc(){return Object.values(this.indexMap).map((function(t){var e=t.model;return{key:e.id,value:e.data}})).sort((function(t,e){return t.key>e.key?1:-1}))}function _c(){return Object.values(this.indexMap).filter((function(t){return"variable"===t.get("type")})).map((function(t){var e=t.model,n=e.id,r=e.data;e.dataType;return{key:n,value:r}})).sort((function(t,e){return t.key>e.key?1:-1}))}function kc(t){var e=Object.values(this.indexMap).filter((function(t){return"variable"===t.get("type")})).reduce((function(t,e){return t[e.get("id")]=e,t}),{}),n=[];t.forEach((function(t){var r=e[t.key];r?(r.set("data",t.value),delete e[t.key]):n.push({type:"variable",id:t.key,left:0,top:0,width:100,height:20,data:t.value})})),Wu.call(this,n,{x:-100,y:0}),this.selected=Object.values(e),Xu.call(this)}function Ac(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)}}var Sc=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!(e=Number(e))||e<=0?(pe("TimeCapsule maxsize should be greater than 0.",e),this.maxsize=10):this.maxsize=e,this.reset(),n&&this.snapshot(n)}var e,n,r;return e=t,(n=[{key:"dispose",value:function(){this.reset()}},{key:"snapshot",value:function(t){this.q.splice(this.pos+1,this.q.length-this.pos+1,t),this.q.length>this.maxsize&&this.q.splice(0,this.q.length-this.maxsize),this.pos=this.q.length-1}},{key:"forward",value:function(){if(this.snapshot_taker&&this.snapshot_taker.take(),this.forwardable)return this.q[++this.pos];de("Not forwardable.")}},{key:"backward",value:function(){if(this.snapshot_taker&&this.snapshot_taker.take(),this.backwardable)return this.q[--this.pos];de("Not backwardable.")}},{key:"current",get:function(){if(-1!==this.pos)return this.q[this.pos];de("Non state has been recorded.")}},{key:"length",get:function(){return this.q.length}},{key:"forwardable",get:function(){return this.pos<this.q.length-1}},{key:"backwardable",get:function(){return this.pos>0}},{key:"snapshot_taker",get:function(){return this._snapshot_taker},set:function(t){this._snapshot_taker=t}},{key:"reset",value:function(){this.q=[],this.pos=-1}}])&&Ac(e.prototype,n),r&&Ac(e,r),t}();function Oc(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)}}var Ec=x()((function(t){t.brake||t.take()}),1e3,{leading:!0,trailing:!1});function Pc(t){!t.brake&&t.dirty&&Ec(t)}var jc=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.brake=!1,this.dirty=!1,this.state_holder=e,this.timecapsule=n,this.timecapsule.snapshot_taker=this}var e,n,r;return e=t,(n=[{key:"dispose",value:function(){delete this.state_holder,delete this.timecapsule}},{key:"touch",value:function(){this.dirty=!0,Pc(this)}},{key:"take",value:function(t){(this.dirty||t)&&(this.timecapsule.snapshot(this.state_holder.state),this.dirty=!1)}},{key:"brake",get:function(){return this._brake},set:function(t){this._brake=!!t,Pc(this)}}])&&Oc(e.prototype,n),r&&Oc(e,r),t}();function Mc(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 Rc(t,e){var n=e.model_layer.get("scale"),r=e.model_layer.get("translate");if(t){var o=JSON.parse(t);o.scale=n,o.translate=r,e.rebuildContentModel(o)}}var Tc=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.container=e,this.timecapsule=new Sc(20);var n=this;this.snapshot_taker=new jc({get state(){var t=n.container.model_layer.hierarchy;return JSON.stringify(t)}},this.timecapsule),this.snapshot_taker.take(!0)}var e,n,r;return e=t,(n=[{key:"dispose",value:function(){this.reset(),this.timecapsule&&this.timecapsule.dispose(),this.snapshot_taker&&this.snapshot_taker.dispose(),delete this.container,delete this.timecapsule,delete this.snapshot_taker}},{key:"execute",value:function(t,e){!1!==e&&t&&t.execute(),this.snapshot_taker.touch(),this.trigger("execute",t,!0,!1)}},{key:"undo",value:function(){this.timecapsule.backwardable&&(Rc(this.timecapsule.backward(),this.container),this.trigger("undo",this.undoable(),this.redoable()))}},{key:"redo",value:function(){this.timecapsule.forwardable&&(Rc(this.timecapsule.forward(),this.container),this.trigger("redo",this.undoable(),this.redoable()))}},{key:"undoable",value:function(){return this.timecapsule.backwardable}},{key:"redoable",value:function(){return this.timecapsule.forwardable}},{key:"reset",value:function(){this.timecapsule&&this.timecapsule.reset(),this.trigger("command-reset")}}])&&Mc(e.prototype,n),r&&Mc(e,r),t}();function Ic(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)}}ot(Tc.prototype,rt.withEvent);var Cc=new WeakSet,zc=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._container=e,this.app=e.app,this._commander=new Tc(this._container),this.app.commander=this._commander,Cc.add(this)}var e,n,r;return e=t,r=[{key:"residents",get:function(){return Cc}}],(n=[{key:"add",value:function(){return Wu.apply(this._container,arguments)}},{key:"duplicate",value:function(){return Vu.apply(this._container,arguments)}},{key:"remove",value:function(){return Xu.apply(this._container,arguments)}},{key:"animate",value:function(){return be.apply(this,arguments)}},{key:"fullscreen",value:function(){return Ju.apply(this._container,arguments)}},{key:"variable",value:function(t,e){return this._container.variable.apply(this._container,arguments)}},{key:"target",get:function(){return this._container.target_element},set:function(t){var e;if("string"==typeof t){if(!(e=document.getElementById(t)))throw"target element '".concat(t,"' is not exist");if(e.firstChild)throw"target element '".concat(t,"' already has children")}else e=t;e&&e.style&&(e.style.cursor="default"),this._container.target_element=e,this._container.invalidate()}},{key:"scale",get:function(){return this.root.get("scale")},set:function(t){this.root.set("scale",t)}},{key:"translate",get:function(){return this.root.get("translate")},set:function(t){this.root.set("translate",t)}},{key:"unit",get:function(){return this.root.get("unit")||"px"}},{key:"PPM",get:function(){return this.app.PPM}},{key:"PPI",get:function(){return this.app.PPI}},{key:"DPPX",get:function(){return this.app.DPPX}},{key:"unitScale",get:function(){return this._container.unitScale}},{key:"screen",get:function(){return this.app.screen},set:function(t){this.app.screen=t,this._container.resize()}},{key:"resize",value:function(){this._container.resize()}},{key:"dispose",value:function(){this._commander&&this._commander.dispose(),this._container&&this._container.dispose()}},{key:"selected",get:function(){return this._container.selected.slice()},set:function(t){this._container.selected=t}},{key:"select",value:function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return this._container.selected=(e=this.root).findAll.apply(e,[t].concat(r)),this.selected}},{key:"commander",get:function(){return this._commander}},{key:"undo",value:function(){this.commander.undo()}},{key:"redo",value:function(){this.commander.redo()}},{key:"cut",value:function(){return tc.apply(this._container,arguments)}},{key:"copy",value:function(){return $u.apply(this._container,arguments)}},{key:"paste",value:function(){return ec.apply(this._container,arguments)}},{key:"undoableChange",value:function(){return wc.apply(this._container,arguments)}},{key:"change",value:function(){return bc.apply(this.root,arguments)}},{key:"model",get:function(){return this.root.hierarchy},set:function(t){this._container.rebuildContentModel(t)}},{key:"root",get:function(){return this._container.model_layer}},{key:"findAll",value:function(){return this.root.findAll.apply(this.root,arguments)}},{key:"findFirst",value:function(){return this.root.findFirst.apply(this.root,arguments)}},{key:"findById",value:function(){return this._container.findById.apply(this._container,arguments)}},{key:"serialize",value:function(){return this.root.trim(),this.root.serialize.apply(this.root,arguments)}},{key:"align",value:function(){return Nu.apply(this._container,arguments)}},{key:"distribute",value:function(){return Yu.apply(this._container,arguments)}},{key:"move",value:function(){return Gu.apply(this._container,arguments)}},{key:"zorder",value:function(){return Hu.apply(this._container,arguments)}},{key:"symmetryX",value:function(){return gc.apply(this._container,arguments)}},{key:"symmetryY",value:function(){return mc.apply(this._container,arguments)}},{key:"on",value:function(){return qu.apply(this._container,arguments)}},{key:"once",value:function(){return Ku.apply(this._container,arguments)}},{key:"off",value:function(){return Qu.apply(this._container,arguments)}},{key:"mode",get:function(){return this.app.mode},set:function(t){void 0!==t&&(this.app.mode=t)}},{key:"toDataURL",value:function(){return hc.apply(this._container,arguments)}},{key:"group",value:function(){return pc.apply(this._container,arguments)}},{key:"ungroup",value:function(){return dc.apply(this._container,arguments)}},{key:"fit",value:function(t){var e=this;this._container.once("redraw",(function(){return e._container.fit(t)})),this._container.invalidate()}},{key:"fitMode",get:function(){return this._container.fitMode}},{key:"ids",get:function(){return xc.apply(this._container)}},{key:"data",get:function(){return this._container.data},set:function(t){this._container.data=t}},{key:"variables",get:function(){return _c.apply(this._container)},set:function(t){kc.apply(this._container,[t])}},{key:"baseUrl",get:function(){return this.app.baseUrl},set:function(t){this.app.baseUrl=t}}])&&Ic(e.prototype,n),r&&Ic(e,r),t}();function Bc(t){var e=t.target,n=t.model,r=t.style,o=t.layers,i=void 0===o?[]:o,a=t.handlers,u=void 0===a?[]:a,c=t.mode,s=void 0===c?Zt:c,f=t.refProvider,l=t.baseUrl,h=t.fitMode,p=null;if("string"==typeof e){if(!(p=document.getElementById(e)))throw"target element '".concat(e,"' is not exist");if(p.firstChild)throw"target element '".concat(e,"' is not empty")}else p=e;p&&p.style&&(p.style.position="absolute",p.style.cursor="default",p.style.overflow="hidden");var d=new Du(s,f);return d.baseUrl=l,new zc(new Iu({target_element:p,model:n,style:r,layers:i,handlers:u,fitMode:h},d))}var Lc=Math.sqrt(3);function Dc(t,e,n,r,o){var i,a,u,c,s=5+o,f=n.x,l=n.y,h=r.x,p=r.y;if(Math.abs(f-h)>s&&Math.abs(l-p)>s){var d=(p-l)/(h-f),y=l-d*f;if(Math.abs(e-(d*t+y))>s)return!1}return f>h?(a=f,i=h):(a=h,i=f),l>p?(c=l,u=p):(c=p,u=l),!(a+5<t)&&(!(i-5>t)&&(!(c+5<e)&&!(u-5>e)))}function Fc(t,e,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,o=0;o<n.length-1;o++)if(Dc(t,e,n[o],n[o+1],r))return!0;return!1}function Nc(t,e,n,r){if("arrow"!=t.slice(-5))return n;n.x,n.y;var o=Math.atan2(r.y-n.y,r.x-n.x),i=1.5*e;return{x:n.x+Math.cos(o)*i,y:n.y+Math.sin(o)*i}}function Uc(t,e,n){var r=n.lineWidth,o=void 0===r?2:r,i=n.strokeStyle,a=void 0===i?"#000000":i,u=n.lineCap,c=void 0!==u&&u,s=n.alpha,f=void 0===s?1:s,l=n.begin,h=void 0===l?"none":l,p=n.end,d=void 0===p?"none":p,y=n.beginSize,v=void 0===y?"size5":y,g=n.endSize,m=void 0===g?"size5":g;if(("none"!=h||"none"!=d)&&(o=Number(o)||2,t.lineCap=c,t.lineWidth=o,t.strokeStyle=a,t.fillStyle=a,t.globalAlpha*=f,"none"!=h&&Yc(t,e[0],e[1],o,h,Gc(v,o)),"none"!=d)){var b=e.length;Yc(t,e[b-1],e[b-2],o,d,Gc(m,o))}}function Yc(t,e,n,r,o,i){var a=e.x,u=e.y,c=Math.atan2(n.y-u,n.x-a);switch(t.beginPath(),t.translate(a,u),t.rotate(c),o){case"oval":t.ellipse(0,0,i.X,i.Y,0,0,2*Math.PI),t.fill();break;case"diamond":t.moveTo(-i.X,0),t.lineTo(0,-i.Y),t.lineTo(i.X,0),t.lineTo(0,i.Y),t.fill();break;case"arrow":t.moveTo(0,0),t.lineTo(Lc*i.X,-i.Y),t.lineTo(Lc*i.X,i.Y),t.fill();break;case"sharp-arrow":t.moveTo(0,0),t.lineTo(Lc*i.X,-i.Y),t.lineTo(-i.X/1.5+Lc*i.X,0),t.lineTo(Lc*i.X,i.Y),t.fill();break;case"open-arrow":t.moveTo(Lc*i.X+r,-i.Y),t.lineTo(r,0),t.lineTo(Lc*i.X+r,i.Y),t.stroke()}t.rotate(-c),t.translate(-a,-u),t.closePath()}function Gc(t,e){var n={};switch(e*=1.2,t){case"size1":n.X=e,n.Y=e;break;case"size2":n.X=1.5*e,n.Y=e;break;case"size3":n.X=2*e,n.Y=e;break;case"size4":n.X=e,n.Y=1.5*e;break;case"size5":n.X=1.5*e,n.Y=1.5*e;break;case"size6":n.X=2*e,n.Y=1.5*e;break;case"size7":n.X=e,n.Y=2*e;break;case"size8":n.X=1.5*e,n.Y=2*e;break;case"size9":n.X=2*e,n.Y=2*e;break;default:n.X=1.5*e,n.Y=1.5*e}return n}function Hc(t){return(Hc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vc(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 Xc(t,e){return(Xc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function qc(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=Qc(t);if(e){var o=Qc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Kc(this,n)}}function Kc(t,e){if(e&&("object"===Hc(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 Qc(t){return(Qc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Jc=function(t){!function(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&&Xc(t,e)}(i,t);var e,n,r,o=qc(i);function i(){return Wc(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"isLine",value:function(){return!0}},{key:"drawPath",get:function(){return this.path}},{key:"render",value:function(t){var e=this.model,n=e.begin,r=void 0===n?"none":n,o=e.end,i=void 0===o?"none":o,a=e.lineWidth,u=this.drawPath;Uc(t,u,this.model),t.beginPath();var c=Nc(r,a,u[0],u[1]),s=Nc(i,a,u[u.length-1],u[u.length-2]);t.moveTo(c.x,c.y);for(var f=1;f<u.length-1;f++)t.lineTo(u[f].x,u[f].y);t.lineTo(s.x,s.y),this.drawStroke(t)}},{key:"contains",value:function(t,e){var n=this.model.lineWidth;return Fc(t,e,this.drawPath,n)}},{key:"resizable",get:function(){return!1}},{key:"mutable",get:function(){return!0}},{key:"rotatable",get:function(){return!1}},{key:"path",get:function(){var t=this.model;return[{x:t.x1,y:t.y1},{x:t.x2,y:t.y2}]},set:function(t){var e=t[0],n=t[1];this.set({x1:e.x,y1:e.y,x2:n.x,y2:n.y})}}])&&Vc(e.prototype,n),r&&Vc(e,r),i}(mn);function Zc(t){return(Zc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ts(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 es(t,e){return(es=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ns(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=os(t);if(e){var o=os(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return rs(this,n)}}function rs(t,e){if(e&&("object"===Zc(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 os(t){return(os=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Jc.getTipNeckPos=Nc,Jc.containedInPath=Fc,Jc.drawEndTips=Uc,mn.memoize(Jc.prototype,"path",!1),mn.register("line",Jc);var is=function(t){!function(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&&es(t,e)}(i,t);var e,n,r,o=ns(i);function i(){return $c(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"is3dish",value:function(){return!0}},{key:"render",value:function(t){var e=this.model,n=e.cx,r=e.cy,o=e.rx,i=e.ry,a=e.startAngle,u=e.endAngle,c=e.anticlockwise;t.beginPath(),t.ellipse(n,r,Math.abs(o),Math.abs(i),0,a||0,u||2*Math.PI,c)}},{key:"path",get:function(){var t=this.model,e=t.cx,n=t.cy,r=t.rx,o=t.ry;return[{x:e-r,y:n-o},{x:e+r,y:n-o},{x:e+r,y:n+o},{x:e-r,y:n+o}]},set:function(t){var e=t[0],n=t[2];this.set({cx:e.x+(n.x-e.x)/2,cy:e.y+(n.y-e.y)/2,rx:(n.x-e.x)/2,ry:(n.y-e.y)/2})}},{key:"contains",value:function(t,e){var n=this.model,r=n.cx,o=n.cy,i=(t-r)/(2*n.rx-.5),a=(e-o)/(2*n.ry-.5);return i*i+a*a<.25}},{key:"outline",value:function(t){return function(t,e){var n=t.model,r=n.cx,o=n.cy,i=n.rx,a=n.ry,u=2*Math.PI*e,c=r+i*Math.cos(u),s=o+a*Math.sin(u);return t.transcoordS2T(c,s)}(this,t)}}])&&ts(e.prototype,n),r&&ts(e,r),i}(Pn);function as(t){return(as="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function us(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cs(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 ss(t,e){return(ss=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function fs(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=hs(t);if(e){var o=hs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ls(this,n)}}function ls(t,e){if(e&&("object"===as(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 hs(t){return(hs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.memoize(is.prototype,"path",!1),mn.register("ellipse",is);var ps={ondragstart:function(t,e,n){n.mutatePath(null,(function(n){n.splice(e+1,0,t)}))},ondragmove:function(t,e,n){n.mutatePath(null,(function(n){n[e+1]=t}))},ondragend:function(t,e,n){}},ds=function(t){!function(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&&ss(t,e)}(i,t);var e,n,r,o=fs(i);function i(){return us(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"is3dish",value:function(){return!0}},{key:"render",value:function(t){var e=this.model.path,n=void 0===e?[]:e;if(!(n.length<=1)){t.beginPath(),t.moveTo(n[0].x,n[0].y);for(var r=1;r<n.length;r++)t.lineTo(n[r].x,n[r].y);t.closePath()}}},{key:"mutable",get:function(){return!0}},{key:"pathExtendable",get:function(){return!0}},{key:"path",get:function(){return this.model.path},set:function(t){this.set("path",t)}},{key:"contains",value:function(t,e){var n=this.model.path,r=!1;return n.forEach((function(o,i){var a=(i+n.length+1)%n.length,u=o.x,c=o.y,s=n[a].x,f=n[a].y;c>e!=f>e&&t<(s-u)*(e-c)/(f-c)+u&&(r=!r)})),r}},{key:"controls",get:function(){var t=this.path;return t.map((function(e,n){var r=t[n+1>=t.length?0:n+1];return{x:(e.x+r.x)/2,y:(e.y+r.y)/2,handler:ps}}))}}])&&cs(e.prototype,n),r&&cs(e,r),i}(Pn);function ys(t){return(ys="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gs(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 ms(t,e){return(ms=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function bs(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=xs(t);if(e){var o=xs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ws(this,n)}}function ws(t,e){if(e&&("object"===ys(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 xs(t){return(xs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.memoize(ds.prototype,"controls",!1),mn.register("polygon",ds);var _s={ondragstart:function(t,e,n){n.mutatePath(null,(function(n){n.splice(e,0,t)}))},ondragmove:function(t,e,n){n.mutatePath(null,(function(n){n[e]=t}))},ondragend:function(t,e,n){}},ks=function(t){!function(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&&ms(t,e)}(i,t);var e,n,r,o=bs(i);function i(){return vs(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"pathExtendable",get:function(){return!0}},{key:"path",get:function(){return this.model.path},set:function(t){this.set("path",t)}},{key:"controls",get:function(){for(var t=this.path,e=[],n=0;n<t.length-1;n++){var r=t[n],o=t[n+1];0==n&&e.push({x:r.x,y:r.y,handler:_s}),e.push({x:(r.x+o.x)/2,y:(r.y+o.y)/2,handler:_s}),n==t.length-2&&e.push({x:o.x,y:o.y,handler:_s})}return e}}])&&gs(e.prototype,n),r&&gs(e,r),i}(Jc);function As(t){return(As="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ss(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Os(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 Es(){return(Es="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Ps(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Ps(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ts(t)););return t}function js(t,e){return(js=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ms(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=Ts(t);if(e){var o=Ts(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Rs(this,n)}}function Rs(t,e){if(e&&("object"===As(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 Ts(t){return(Ts=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.memoize(ks.prototype,"controls",!1),mn.register("polyline",ks);var Is={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"image-selector",label:"image-src",name:"src",property:{displayField:"id",displayFullUrl:!0,baseUrlAlias:"$base_url",defaultStorage:"scene-image",storageFilters:{type:Array,value:[{name:"category",value:"image"}]},useUpload:!0}},{type:"select",label:"cross-origin",name:"crossOrigin",property:{options:["","anonymous","use-credentials"]}}],"value-property":"src",help:"scene/component/image-view"},Cs=function(t){!function(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&&js(t,e)}(i,t);var e,n,r,o=Ms(i);function i(){return Ss(this,i),o.apply(this,arguments)}return e=i,r=[{key:"noimage",get:function(){return i.NOIMAGE||(i.NOIMAGE=new Image,i.NOIMAGE.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABIBAMAAAD7Se1QAAAAIVBMVEUAAABHcEwBAQEREREBAQEEBAQGBgYLCwsDAwMDAwMICAi6HF9tAAAAC3RSTlNNAEAERiMYCS41Eac10lYAAAEgSURBVHhe7dY9asQwEAXgh7DNertNiJy48pIitY3SB7bYdk0ukL1BDDmA9gZecoH4pmFQ3MQayUMguPBrNPD4wD9TCMvJmt3M/AtYwXOlXiWgqADVCUBD46MAnGhMBaCiUQmAm8VA/Eh/eWl9Fn5WcxD+OLuRrUYJDKLluwH2InACUgkoACSdADxQc50Bytadb9RkM0CT13TcvlCT1HFg8UTHvasuUVACCa3El6u2UdD8LFTlKhUFFgA+d3dj10aABkUN72N3jAADCrJq7PIIsPidcxBoTHIIAjMFmyCwmGYIAA1P9gFgfCANAOsDSccCDW+uLDB+kLGg94OkZoAGkwsDDAe2DOg5oPxAg03rBR88OHpBz4N8UVeHFSwma74BTW6Ge4rIRa4AAAAASUVORK5CYII="),i.NOIMAGE}}],(n=[{key:"dispose",value:function(){Es(Ts(i.prototype),"dispose",this).call(this),this._offcanvas=null,this._image=null}},{key:"render",value:function(t){var e=this.state,n=e.left,r=e.top,o=e.width,a=e.height,u=e.isGray,c=void 0!==u&&u,s=e.alpha,f=void 0===s?1:s,l=e.src;if(this.prepareIf(!this._image&&l),t.beginPath(),t.globalAlpha*=f,this._image&&this._image.complete)if(c&&this._offcanvas)t.drawImage(this._offcanvas,n,r,o,a);else try{t.drawImage(this._image,n,r,o,a)}catch(e){t.drawImage(i.noimage,n,r,o,a)}else!this.app.isViewMode&&t.drawImage(i.noimage,n,r,o,a)}},{key:"nature",get:function(){return Is}},{key:"hasTextProperty",get:function(){return!1}},{key:"ready",value:function(){this.prepareIf(!this._image&&this.state.src)}},{key:"prepare",value:function(t,e){var n=this,r=this.state,o=r.src,i=r.crossOrigin;if(o){this._image=new Image;try{i&&(this._image.crossOrigin=i),this._image.src=this.app.url(o)||""}catch(t){return void e(t)}this._image.onload=function(){if(n.get("isGray")){var e=n._image.width,r=n._image.height;n._offcanvas=mn.createCanvas(e,r);var o=n._offcanvas.getContext("2d");o.drawImage(n._image,0,0);var i=function(t,e,n){try{var r=t.getImageData(0,0,e,n)}catch(t){return pe("Get Image Data Error: "+t.message),null}for(var o=r.data,i=0;i<e*n*4;i+=4){var a=o[i],u=o[i+1],c=o[i+2],s=parseInt((a+u+c)/3);r.data[i]=s,r.data[i+1]=s,r.data[i+2]=s}return r}(o,e,r);o.putImageData(i,0,0)}t(n)},this._image.onerror=function(t){n._image&&!n._image.currentSrc&&(n._image=null),e(t)}}else t(this)}},{key:"src",get:function(){return this.get("src")},set:function(t){this.set("src",t)}},{key:"onchange",value:function(t,e){(t.hasOwnProperty("src")||t.hasOwnProperty("isGray"))&&(this._offcanvas=null,this._image=null,this.prepareIf(t.src))}},{key:"ondropfile",value:function(t,e){for(var n=0;n<t.length;n++)if(t[n].type.startsWith("image/"))return void(this.src=e[n])}}])&&Os(e.prototype,n),r&&Os(e,r),i}(Bn(Pn));function zs(t){return(zs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Bs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ls(t,e){return(Ls=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ds(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=Ns(t);if(e){var o=Ns(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Fs(this,n)}}function Fs(t,e){if(e&&("object"===zs(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 Ns(t){return(Ns=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("image-view",Cs);var Us=function(t){!function(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&&Ls(t,e)}(n,t);var e=Ds(n);function n(){return Bs(this,n),e.apply(this,arguments)}return n}(li(Bn(mn))),Ys=n(246),Gs=n.n(Ys);function Hs(t){return(Hs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ws(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function Vs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xs(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 qs(){return(qs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Ks(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Ks(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=$s(t)););return t}function Qs(t,e){return(Qs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Js(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=$s(t);if(e){var o=$s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Zs(this,n)}}function Zs(t,e){if(e&&("object"===Hs(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 $s(t){return($s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var tf={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"string",label:"src",name:"src"},{type:"checkbox",label:"play",name:"play"}],"value-property":"src",help:"scene/component/gif-view"},ef=function(t){!function(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&&Qs(t,e)}(u,t);var e,n,r,o,i,a=Js(u);function u(){return Vs(this,u),a.apply(this,arguments)}return e=u,(n=[{key:"oncreate_element",value:(o=regeneratorRuntime.mark((function t(e){var n,r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.state,r=n.src,o=n.play,this.onchangesrc(r),this.onchangeplay(o);case 3:case"end":return t.stop()}}),t,this)})),i=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){Ws(i,n,r,a,u,"next",t)}function u(t){Ws(i,n,r,a,u,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})},{key:"buildImg",value:function(){var t=this.element;t.innerHTML="";var e=document.createElement("img");return e.style.width="100%",e.style.height="100%",t.appendChild(e),e}},{key:"onchange",value:function(t,e){qs($s(u.prototype),"onchange",this).call(this,t,e),"src"in t&&this.onchangesrc(t.src),"play"in t&&this.onchangeplay(t.play)}},{key:"setElementProperties",value:function(t){}},{key:"onchangeplay",value:function(t){var e=this._superGif;e&&!e.get_loading()&&(t?e.play():e.pause())}},{key:"onchangesrc",value:function(t){var e=this,n=this.buildImg();t||(t="data:image/gif;base64,R0lGODlhYABIAPcAAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4ODg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB0dHR4eHh8fHyAgICEhISIiIiMjIyQkJCUlJSYmJicnJygoKCkpKSoqKisrKywsLC0tLS4uLi8vLzAwMDExMTIyMjMzMzQ0NDU1NTY2Njc3Nzg4ODk5OTo6Ojs7Ozw8PD09PT4+Pj8/P0BAQEFBQUJCQkNDQ0REREVFRUZGRkdHR0hISElJSUpKSktLS0xMTE1NTU5OTk9PT1BQUFFRUVJSUlNTU1RUVFVVVVZWVldXV1hYWFlZWVpaWltbW1xcXF1dXV5eXl9fX2BgYGFhYWJiYmNjY2RkZGVlZWZmZmdnZ2hoaGlpaWpqamtra2xsbG1tbW5ubm9vb3BwcHFxcXJycnNzc3R0dHV1dXZ2dnd3d3h4eHl5eXp6ent7e3x8fH19fX5+fn9/f4CAgIGBgYKCgoODg4SEhIWFhYaGhoeHh4iIiImJiYqKio+Pj5iYmKCgoKampqurq66urrCwsLGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrOzs7S0tLa2tre3t7m5ubu7u7+/v8DAwMHBwcPDw8XFxcfHx8vLy8/Pz9LS0tXV1dfX193d3eTk5Onp6fj4+Pz8/P7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v///////////////////////////////////////////////////////////////////////////////yH5BAkAAPUAIf47R2VuZXJhdGVkIGJ5IGpzZ2lmIChodHRwczovL2dpdGh1Yi5jb20vYW50aW1hdHRlcjE1L2pzZ2lmLykALAAAAABgAEgAAAj+AGcJHEiwoMGDCBMqXMiwocOHECNKnEixosWLGDNq3Mixo8ePIEOKHEmypMmR9VKqXMmypcuXMGPKnJkSIs2bOHPqZGlzp8+fQOv1DEq0KMyhRpMmRaq0KVCmTqPmhCq1qkyqLrFRSyYwGTVsVo1iZXmNa8Fk18ISHasSm1mDycCq/ck2JTWF1ObSfTjz7cFken3WFbow8M7BDA3rHOwXruKpfGXeTZg3qDVrUge7RRg3KLZjx+Q2HVyvLNy0QaMJjBaVdD2tZr2K/mmNIObRkR+n9AsYt0Pddg1WXppb8bWDx1CLLW74GcJnSl3TtDY8Zu2Et4tKl7n52eyWnxXvhl7+26jqrspbnlfIWjtz2gWPZV95neH8veU9NxZYfbfD3kFt99J6Bnmn0mQO9XfYezrVxxlmx0GUXIAM4hSeffsxBN1TFd5E4Ef3QZbfTg6CNJ5gHXJ3TEntLThiTh+KFCJNAqZU4kgAitjQTheepOBMNcZI0oQ6JpbTjSZtiNN2PZ400IxHpdiSc07G911M0iFZZYtAStnWilUeBGVLrlEZpmM0elmPlmfO8iOZXl4DZpsGEYmll2bSWWCXLwJXVY1+urhjoGEBSuiSah6K36CKtpZoo4s9CimielZq6aWYZqrpppx26umnoIZ6UkAAOw=="),n.setAttribute("rel:animated_src",t),n.setAttribute("rel:auto_play",0),this._superGif=new Gs.a({gif:n,progressbar_height:2}),this._superGif.load((function(){e._superGif.move_to(0),e.play&&e._superGif.play()}))}},{key:"ondropfile",value:function(t,e){for(var n=0;n<t.length;n++)if(/\.gif$/.test(t[n].name))return void(this.src=e[n])}},{key:"src",get:function(){return this.getState("src")},set:function(t){this.set("src",t)}},{key:"play",get:function(){return this.getState("play")},set:function(t){this.setState("play",t)}},{key:"nature",get:function(){return tf}},{key:"tagName",get:function(){return"div"}}])&&Xs(e.prototype,n),r&&Xs(e,r),u}(Us);function nf(t){return(nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function of(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 af(){return(af="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=uf(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function uf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=lf(t)););return t}function cf(t,e){return(cf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function sf(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=lf(t);if(e){var o=lf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ff(this,n)}}function ff(t,e){if(e&&("object"===nf(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 lf(t){return(lf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("gif-view",ef);var hf={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"string",label:"src",name:"src"},{type:"checkbox",label:"started",name:"started"},{type:"checkbox",label:"loop",name:"loop"}],"value-property":"src",help:"scene/component/audio"},pf=function(t){!function(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&&cf(t,e)}(i,t);var e,n,r,o=sf(i);function i(){return rf(this,i),o.apply(this,arguments)}return e=i,r=[{key:"image",get:function(){return i.IMAGE||(i.IMAGE=new Image,i.IMAGE.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAAAP1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACzJYIvAAAAFHRSTlMA8BAwgNBgQKB/wCBwUJDg37CvXyUlBK8AABFYSURBVHja7NsBkqIwFIThTiAQgyBq3/+sm6p1tnamZkaTMhJJf1f4S/JeEIiIiIiIiIiIiIiIiEhD7Hg4BH84TpAKjJ4f3NFCtjVd+InXz2RTs+FXlxGylYHfcVfIJmb+YFWSLUyGVJKKBJJKUo+Rd6w63l/qzLuCkryO5fe0l2xk5mMWbe+v0fNBRqf7S3je6CipQ2ACr+dWcYEpzBFS1plpguatsnomMgdIQSOTuQ5SjmE6/UgK8szgdJIUM/FG41YlFmYJ2kkKsY5ZzAwBurHDk3WGeRY0bvYrGa1+rqNI22f7dS32ZnUK1GMr0eSK3mEc9dhKMxp+ZTo8kT2emOXS5LQ1kCxbJBocSd2k5PaIjMVzjWcdJPk9ooBnmzx1t5XbIxqBKpJ4NGTgzwKiGpK4do72gb+ZUMIYtCPm9WCPMsYTE5k2hq2ZvzujlCE1iRmwf3dvmRyKsT0T7b9I7HEPCpqCiqT2IIqaT1pI0noQZdlFC8l/PbYPAnRORT56VBEE6FXkb49agmByKhJ71BME6FsvEntUFQTdqekisUdlQWCXhovEHtUFAWbTapHYo8YgmFybO3vsUWcQYGmxSOxRbRAMprkisUfFQVKmrX18sxt7VB0ENjT1xir2qDxIwkFi3v89e+xRfxAMzfzzIfZ4hyAYDR9zwVuLPd4jCDrTwoLYGb5LEFi3/+E3rweR6urX20c/Fvls2Pvwm9mDSGIPhv8YPyGf3/eo9Ye7O8B2FIShAAooakEttex/rbODad5/yTHIAjqn505IQPv+Xz06dz+4VXORHEZcgAcB8updM8F6e25jBzwIkE07l+x8amMnPDp6nsNJ+BoZ7Q6F8egqAda9VEuRNlZjBzwYkMskdXR73okd8GBAJiKYjBcZKKqG9OiKDbgdfxJ5VhsBPDiQZhaouD3p4hfw4EAmwxisz3MSHwAPEmQ1TB1N+SmXWoAHC7JbZsWl/IxLLcCDBplNo3lrfMLsmwAPGmShAxX5/1vOEzjEz3iyfQ/hI36W4TctsUesOAifPdrQg8M++KYl95iCBkjI1r8634betBAPHZDTPFAmD3zLiHgogVTziMsahz0eIh5aIGHGRSJ2mFtHPR4iHhQIP2UvWGMf8wk74qEIEib7rLjPiBfxiAcCwp8V+Nae3uMdRhAPDIR/J5f/Q2DTcC+hIB7qIGEq3Ti9bx+sryMeAAgS70OK8G2kBD8L8QBAoLWU3g3vUVIc6D0txAMAsY+4jBWowXHO64gHBGKfYJ2T5qY1BxcL98BB+PQ+XiS9xxh9EQ8ChA6C5UXWIUoE9MBB8LVHQoS7ib8/dRn3sAcJ6bQRSdH96RDxIEH4QEX+AHF4LxHEAwUh12xyr1V8lwjiQYDYF8kuf1jluUQQDwrEvkhW8Wc6LhHUgwfhi4QPlHm7LRHawx4kpE191Dq8lgjhAYDQa1cftYrPEiE8OJDb40uqyzdQCA8WhAzL4G/PT4c3WrgHD2IfllGl53V37zsgHg5ApPNvVvq4Fn4spx4oiH1W3CwtEV+PDhEPJyBSkVX4aa7emkM83ICEKWpGM7wdvYCCeDgCEYpcwhLxczhEPFyBCEUWnRL5T6X59SBASBF+9l28TL5F7uEORCZyCUvEx+S7yT0cgoRVb9JaXLR1qUdfgksQ0fTbgmhFB20d8HAKEha14+F8f1sHPNyCiL6EqK+n20/rgIdjkFC0Ho1s6Gndvcc9ICkr/ey8/rHO6vp9KawL8DAFOV6l9Fyub7IbflsCag1qRfVsXWvxHjxIejU+BHZV6uvHD1XiEb++Bw8i+dNd+Wv0eCQmhcPhRPwUUt2DB5G1sfa1aeyzAuyJj9x2HjyIdKzIKw5SI14ieFtvo3kIQERj3lVhkUOnRD7AnjV5369QkAOJZeCH+Jh41xOLs73dQwAifY6dpxCCbjTDzLf1Bm1Y93tAIDOWXcLPvrHyr2hVoEAceEAgDQzB4jetk0/c2OXRHB48EJCpa4dgpYh2ETxtrshz7zx4ICCzfuTSDn8p/EOS9OTjwgMB+cABP3yWYuOPIofs33LigYCULlpZNXJppVU30Vf14kGAUCLijf1D71lN9FW9eFiA9KgZ8FPpPUsSnufGA+8hvAg2Kpz0nrX//qp+PIgpC3i6xJRITOye9fn1VT15ICCrVlQG5rywo0H8x965bVkNwmCYQ2kR6Gmb939WXV65dFnI/tPdjPBfO7XMN4EkTUJtqZp4sCJ1+8jwkhMu0KpMxFXFA8hlVfQSMxGH5mDK1VKV8QCyvTVtUiYyo7V358VStfGoAEFMhGYhEwloxZy9WKo2Hjwg5iSOvFDXeUYd33+PuVfHgwnEBWLocDJp+IIa2fyvperjwQRiXCKGosyXqoA+YfsIELuYu4HAt+msMknfDK4jfQJIzOZ2IPAQWJtFOhQKivR2IDZ6Awis7V0iLxqBI7uEZo19dakTogLSwKvf8yk8Jq6CGK0GKvWlatG7b7kkUU/Lo1gdXWn7/4E0j0qeJDpqN/ABqQcgJgdqURb4chjQktIugDS6wFFiz3JgaJj7AGJmholAe9YKhoZLJ0Ca6smjwJ4VwVN96gVIE5GM71kHaGKxGyAtRDaB2NBhLVmpHyANRKzDO28W7FS3HQFpaIWa8TrfCXQwegJSL5k+8M9UJ+pm9QTEnCIZrR0MDQeQ9ua0iCcYQaBTV0CqNXQW/yiyYG7W1heQanPaCkciBXuH1BkQJzHcDQxmpgGkPatl4WkbCXO/bW9AqlNg4H0PPMi6A1IxkQmOZ8D0ousNSMVEEuyreTAQ6Q7IRJeCX2YZQHhv6SrBOmpkM+YUzN0BqSRQCupmTeCP9wdkhiOREwtEzgGEsWcF9BhK9R8fQDiN7A8DiR0CKXQlj/q9IM8OgXjIzcKBlAHkD6FulgNzJwPIHwpo8mQAkX3LiPq9dKUMAQk9AqmcqmjuBAJCPQIpA4guIAsKJA0gnwNy3A4kDyBIHCEPxAwgf8gPILqA5AFEF5CxZX0lIHYc6rqADLf380BmFMgxgIzUyf8MJKLTRelKHgKy9wgkjfS7LiA0gKgC8vQn3HUA4RQ5LKPIAQciWbqIEg0YkLNDIHYUyqkCsmKN5vg3+W0AYTRATaPY+uu1IwS6UMGAlO6AFPjSCQMStaNh53cdcPG7Hx1Uupo+rx+Bltn1BuTAj5BptEV/bHAAwbnJMICwRmtUDOSEA8s4Rmtw3nITGD6TwUNoG0Ca7xi2YKSPj2eKXQFxQWKA2QbGMWEMMGseOb7C7T47uJS1JyAzVbTjqZdU3zbHzMXWS+qp4Fgn8Ahy/QCRGqQcwU1vGnN7fylboWn8Bzg//hyjxltvdcl45bwFfYKzFyBy11UU9BnjuoqfWizVlQXulpzBTNbaB5Aid+VRrkBFB630AMS9BC8FK2ggE7u/FGy1kvfcB9TKQufX5uUXNWl3EjvWCi4k/u9A3Ddq1CpTIQGe6VN1qd8ArcvDQNw3S41Kn6qQmOq5e7pRr+8fAYLiIJtFrrvYRMYL0q06vj8EZLXUriJzRY8H1xEagOCK7gkghRg6RQYO0I6aWPwIEAru80AiMWSdzAeuDXUKyr+WqpAID8hMHC1Ct8F4mUsQ6W8pJMICki0JHCBczAFdBl38G3VE6ErQhhWlih4LWrCSLpaqjggHiGe9mVjRY0YPoelyqcqIcIDEe97rqJFFH7FcLlUZEQ6Qg5plvZiBFNhtri1VFREGEC/Eg4nZoU5vqi1VFREGkIXDQ8xAIhzoT/WlKiLCAFIYPOQMxOPdjfWlKiLCADJRm3YGj+pDE2xktmmpaogwgMz8d8GrumZ4xzpbvinqISJ+hiTWm7wEqoJdI9JEV9JChAEkS3xCZzKecLcgN6YwlRBhAGmweTsblg6qKMM7Vmh321UQ4QAp1VfwhqVJIh+Wm03W0qV0EOEAybXtivkCmWrKeH2EZ/xBaSBCV2L9Re+LYSqJJIxDu1ew07U0EGEBcTtmHty4JuPtQhvLh1BAhK7Uvvq0GK484QZST0GvvFDqeSJ1IA0r2mfDljvqBoJ//rVsq7yZCA6kXgVkJ2f4ijIGMjOfMVsCBBORB2Jy+sM6ijNvaBUqmw/cStZ8EiKciHwp6Rp++88qmxXQeTUxDiJWJ9wSISvBicgXW+dypn1PqWTznlwgwdZdfiLHr5OELEAEASKvJFRE5JCPKbh8OxHdQKJU0crEzRXrJ/IEkFms6tGyrUw9kQeALFRXvK2iSzsRAAi6BLxM+60xdsqJAEBuXMAMxDLVp+gmAgC57/UT4qvVj3TVRCAgSAYL91aXtyNLzUQAIFhAiP8m0/NHOp+ILiBtPFKrs6bgSOcT0QTEB8nO3QR1yKslggKRf+m11UB0HOl8IlqAeCvauXuo8HnfIqIDyCw6G8XMcGiplMingMzCnbuHFp/3LSLPA4nUpqm5YkWNzwsQeQxIDsKjH5wVSU5qJPIJIIt4jjpqNBAekQeBfJOeHWS81FQoo4/I7UDcS3wUh0liTzLqiEgDqddx4ZHDrNZAACIAEMw88HPYWb0GAhABgEDmgf9Vb5oNBCByOxD3uqWYbCHVBgIQuRlIsbfwMEG5gQBE7gSyHMDsOayrxJvHBRC5B0hOxJH1nK4SlUE6QOR+IG6ju3iYQEqDdIDIzUDyZu/jMRHpS/OiRG4FkiPRfTw8kbrvIAJEACAIDpyHC1/GQHhEbgKSXwTyqIeEur6kixEBgABHOTr7YSX1MSFAhA0E307wUU76Y0KACAsI/tvCRzkF+iIuL0AEAYLbR2QOfvhKJ/obRESBxNt5rPSFXN4f7dyNdqMgEIbhAXWwJErT/e7/Wreb5HTT07QVgWSAeW5g7b4n8qOSUCRPEId4HP93SXp5dDNGRJFcQTxihSH+NW1Bb1cXKpIryJAwnG/zhl8ZcSP6jiKZghwRaaWLnP/AkcSKKJIniEcUs8QfjFLdEmRvkSxB4lfn0QN6DY+lshQpHiT96Dlr6r5hxRUpHST9ZEY71X7DOmOZQVZLsd5Q8wzrPxYYJDiKNqOBG1ZCkZKzrNXu6lHvkjChSFqQsdTPg45ApXtYaUXKr9TNuPcvqO2pVMkitFXAL2a79/qr3HQvVSTXUtofCl79RDXh5CDpw3pwu6+9kRlvtiI5VtPhmHLltT4EKVQkfb8pcOHrXqk6nBAksUjgpKtuYsskaxGKYT0+84uYgziE4YQgMdx0m8PRfis2MbL33PMXoVjD6PEunI4HSjDjStiJP08vQk9hZzQ7oH/geoLYCUBDW4rf4FqCDFt7THUO6B+4jiDn2XNTW7zf4hqCMND4BOsGyw+yAmh0x+QeFh7EeqD5Ce8nLDrI8NpbDyIWHIQNruo4GyAPlhrEzuixBxHLDDJMnfYgYolBricHNfjIdgMWF+Qyu+pkgX4HCwuymL57ELGkIHZG7z2IWE6Q5VV7vGMhQewbtMcZiwhyHj26ne9+xs8PcvDQHnFFqCD7Au0RW4TK+fOKqw4eoOcqYqgU53HR3/5uShFPCfKey9hFDyJO/vAi7RDZnp7X5igyUH72xSDW1E2Pn4tMRCQgR8vLwbgii4gcmLvqQcSPGtIPX3M08wn6I4qYQ94cM/Yw9Xxhmw+X/59wHrtMlX1AmIkzdyaaAnLg1Nnw8WGYSk40X/BOh4+El6LMSBnN2Cd0tPq4w/LJXGrMbCX06PZ2dcM65yzlNertShSHf3SzRAyPM332IcSAHUKPi8EHmXU0l8Uglmni0yipDoi16s+jJKejhywLooz68yiMEcHr2qM4h81CJ++VPJfTu5UwBpv4Pp9DJSi6MJx0bvUwiw4ewgT8zNR0LHUL+OccOpY/3ElzyGKD5pBlMJpDlsOkMythRoNbXh95PJsdA67MrMtAEYbjeDqNo+7oKqWUUkoppZRSSimllFJKFfMXp4vmSjB8n6sAAAAASUVORK5CYII="),i.IMAGE}}],(n=[{key:"dispose",value:function(){af(lf(i.prototype),"dispose",this).call(this),this.started=!1,delete this._audio}},{key:"ready",value:function(){var t=this;af(lf(i.prototype),"ready",this).call(this),this._audio=new Audio,this._audio.addEventListener("canplay",(function(){t.started&&t._audio.play()}));var e=this.state,n=e.src,r=void 0===n?"":n,o=e.loop,a=void 0!==o&&o,u=e.started,c=void 0!==u&&u;this.onchangeSrc(r),this.onchangeLoop(a),this.onchangeStarted(c)}},{key:"render",value:function(t){var e=this.model,n=e.left,r=e.top,o=e.width,a=e.height;e.src,t.beginPath(),this.drawImage(t,i.image,n,r,o,a)}},{key:"nature",get:function(){return hf}},{key:"hasTextProperty",get:function(){return!1}},{key:"src",get:function(){return this.get("src")},set:function(t){this.set("src",t)}},{key:"started",get:function(){return!!this.get("started")},set:function(t){this.set("started",t)}},{key:"start",value:function(){this._audio&&(this._audio.classList.add("active"),this._audio.play())}},{key:"pause",value:function(){this._audio&&(this._audio.classList.remove("active"),this._audio.pause())}},{key:"onchangeSrc",value:function(t){try{"data"!==String(t).substring(0,4)?this._audio.crossOrigin="use-credentials":this._audio.crossOrigin=null,this._audio.src="string"==typeof t?this.app.url(t):t}catch(t){return void console.error(t)}}},{key:"onchangeStarted",value:function(t){var e=this._audio;t?4==e.readyState&&e.play():e.pause()}},{key:"onchangeLoop",value:function(t){this._audio.loop=t}},{key:"onchange",value:function(t,e){"src"in t&&this.onchangeSrc(t.src),"started"in t&&this.onchangeStarted(t.started),"loop"in t&&this.onchangeLoop(t.loop)}},{key:"ondblclick",value:function(t){this.started=!this.started}},{key:"ondropfile",value:function(t,e){for(var n=0;n<t.length;n++)if(t[n].type.startsWith("audio/"))return void(this.src=e[n])}}])&&of(e.prototype,n),r&&of(e,r),i}(Bn(Pn));function df(t){return(df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vf(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 gf(t,e){return(gf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function mf(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=wf(t);if(e){var o=wf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return bf(this,n)}}function bf(t,e){if(e&&("object"===df(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 wf(t){return(wf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("audio",pf);var xf=function(t){!function(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&&gf(t,e)}(i,t);var e,n,r,o=mf(i);function i(){return yf(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"is3dish",value:function(){return!0}}])&&vf(e.prototype,n),r&&vf(e,r),i}(Bn(mn));function _f(t){return(_f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function kf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Af(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 Sf(){return(Sf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Of(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Of(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Mf(t)););return t}function Ef(t,e){return(Ef=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Pf(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=Mf(t);if(e){var o=Mf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return jf(this,n)}}function jf(t,e){if(e&&("object"===_f(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 Mf(t){return(Mf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("text",xf);var Rf={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"id-input",label:"ref",name:"ref"},{type:"select",label:"fit",name:"fit",property:{options:["both","ratio"]}}],"value-property":"ref",help:"scene/component/local-ref"},Tf=function(t){!function(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&&Ef(t,e)}(i,t);var e,n,r,o=Pf(i);function i(){return kf(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"ref",get:function(){var t=this.getState("ref");return t&&"string"==typeof t?this.root.findById(t):null},set:function(t){this.setState("ref",t)}},{key:"refScale",get:function(){var t=this.ref.bounds,e=this.bounds,n=e.width/t.width,r=e.height/t.height;switch(this.model.fit){case"both":return{x:n,y:r};case"ratio":default:return{x:Math.min(n,r),y:Math.min(n,r)}}}},{key:"draw",value:function(t){this._drawing||(this._drawing=!0,Sf(Mf(i.prototype),"draw",this).call(this,t),this._drawing=!1)}},{key:"prerender",value:function(t){if(Sf(Mf(i.prototype),"prerender",this).call(this,t),this.ref){var e=this.ref.center,n=this.center,r=this.refScale;t.translate(n.x,n.y),t.scale(r.x,r.y),t.translate(-e.x,-e.y)}}},{key:"postrender",value:function(t){if(this.ref)return this.ref.postrender(t);Sf(Mf(i.prototype),"postrender",this).call(this,t)}},{key:"render",value:function(t){if(this.ref)return this.ref.render(t);this.model.round;var e=this.bounds,n=e.left,r=e.top,o=e.width,i=e.height;t.beginPath(),t.rect(n,r,o,i)}},{key:"nature",get:function(){return Rf}},{key:"hasTextProperty",get:function(){return!1}}])&&Af(e.prototype,n),r&&Af(e,r),i}(Bn(Pn));function If(t){return(If="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Cf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zf(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 Bf(t,e){return(Bf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Lf(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=Ff(t);if(e){var o=Ff(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Df(this,n)}}function Df(t,e){if(e&&("object"===If(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 Ff(t){return(Ff=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.memoize(Tf.prototype,"ref",!1),mn.memoize(Tf.prototype,"refScale",!1),mn.register("local-ref",Tf);var Nf=function(t){!function(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&&Bf(t,e)}(i,t);var e,n,r,o=Lf(i);function i(){return Cf(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(t){}},{key:"layout",get:function(){return Zn.get(this.get("layout"))||tr}}])&&zf(e.prototype,n),r&&zf(e,r),i}(li(Vr));function Uf(t){return(Uf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Yf(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function Gf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Hf(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 Wf(){return(Wf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Vf(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Vf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Qf(t)););return t}function Xf(t,e){return(Xf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function qf(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=Qf(t);if(e){var o=Qf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Kf(this,n)}}function Kf(t,e){if(e&&("object"===Uf(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 Qf(t){return(Qf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Jf={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"board-selector",label:"scene-number",name:"ref",placeholder:"SCENE-1"},{type:"select",label:"fit",name:"fit",property:{options:["both","ratio"]}},{type:"select",label:"mode",name:"mode",property:{options:["view","interaction"]}}],"value-property":"ref",help:"scene/component/global-ref"},Zf=function(t){!function(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&&Xf(t,e)}(u,t);var e,n,r,o,i,a=qf(u);function u(){return Gf(this,u),a.apply(this,arguments)}return e=u,(n=[{key:"dispose",value:function(){this._releaseRef(),Wf(Qf(u.prototype),"dispose",this).call(this)}},{key:"nature",get:function(){return Jf}},{key:"hasTextProperty",get:function(){return!1}},{key:"tagName",get:function(){return"div"}},{key:"setElementProperties",value:function(t){var e=this.state.mode,n=void 0===e?"view":e;t.style.pointerEvents="view"==n?"none":"inherit"}},{key:"ready",value:function(){Wf(Qf(u.prototype),"ready",this).call(this),this.fetchRef()}},{key:"reposition",value:function(){if(this.element){Wf(Qf(u.prototype),"reposition",this).call(this);var t=this._element_bounds,e=this.element,n=e.offsetWidth,r=e.offsetHeight;if(this._element_bounds={offsetWidth:n,offsetHeight:r},(!t||t.offsetWidth!=n||t.offsetHeight!=r)&&this.ref&&this.root.target_element){var o=this.state.fit,i=void 0===o?"ratio":o;this.ref.fit(i)}}}},{key:"fetchRef",value:(o=regeneratorRuntime.mark((function t(){var e,n,r,o,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._releaseRef(),e=this.state,n=e.ref,r=e.fit,o=void 0===r?"ratio":r,n){t.next=4;break}return t.abrupt("return");case 4:if(!(i=this.app.refProvider)||!n){t.next=18;break}return t.prev=6,t.next=9,i.get(n,!0);case 9:this.__ref=t.sent,this.__ref.target=this.element,this.__ref.fit(o),this.__ref.data=this.data,t.next=18;break;case 15:t.prev=15,t.t0=t.catch(6),pe(t.t0);case 18:case"end":return t.stop()}}),t,this,[[6,15]])})),i=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){Yf(i,n,r,a,u,"next",t)}function u(t){Yf(i,n,r,a,u,"throw",t)}a(void 0)}))},function(){return i.apply(this,arguments)})},{key:"ref",get:function(){return this.__ref},set:function(t){this.setState("ref",t)}},{key:"_releaseRef",value:function(){this.__ref&&this.__ref.release&&this.__ref.release(),delete this.__ref}},{key:"onchange",value:function(t,e,n){var r=this;Wf(Qf(u.prototype),"onchange",this).call(this,t,e,n),"ref"in t&&this.fetchRef(),"fit"in t&&this.ref&&requestAnimationFrame((function(){var t=r.state.fit;r.ref.fit(t)})),"data"in t&&this.ref&&requestAnimationFrame((function(){r.ref.data=t.data}))}}])&&Hf(e.prototype,n),r&&Hf(e,r),u}(Nf);function $f(t){return($f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function el(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 nl(){return(nl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=rl(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function rl(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ul(t)););return t}function ol(t,e){return(ol=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function il(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=ul(t);if(e){var o=ul(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return al(this,n)}}function al(t,e){if(e&&("object"===$f(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 ul(t){return(ul=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("global-ref",Zf);var cl={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"board-selector",label:"board",name:"board"},{type:"checkbox",label:"modal",name:"modal"},{type:"checkbox",label:"closable",name:"closable"},{type:"checkbox",label:"show",name:"show"},{type:"select",label:"location",name:"location",property:{options:["center","left-top","right-top","left-bottom","right-bottom","auto"]}},{type:"data",label:"value",name:"value"}],help:"scene/component/popup"},sl=function(t){!function(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&&ol(t,e)}(i,t);var e,n,r,o=il(i);function i(){return tl(this,i),o.apply(this,arguments)}return e=i,r=[{key:"image",get:function(){return i._image||(i._image=new Image,i._image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAABGCAMAAABG8BK2AAADJmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNy4xLWMwMDAgNzkuZGFiYWNiYiwgMjAyMS8wNC8xNC0wMDozOTo0NCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIzLjAgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RkM4QzQxNUMzMzBEMTFFQ0JEMzZDMDUwQUI4MEI3QTAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RkM4QzQxNUQzMzBEMTFFQ0JEMzZDMDUwQUI4MEI3QTAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpENjlENTQ3RjMzMDkxMUVDQkQzNkMwNTBBQjgwQjdBMCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpENjlENTQ4MDMzMDkxMUVDQkQzNkMwNTBBQjgwQjdBMCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsiUYSQAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAA51BMVEVHcEwzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzOguTm2AAAATHRSTlMARhB73r9B7YLrsqdE+0cq9Avzeg31eQx4aQ+Ks6aUd5DsYKixEX1w8vyT2VjoZ3YezY/cCEDvl+QTvRwJ0ifwK/5T/aw6+IuFuCImAcS6MQAAAeJJREFUWMPt2FlX2zAQhuHJYmOSFhIggbC0QNn3rS1dKXSH9///Hi58CJLxKIpEWi6YO8c5z4lG/nxGEXmu/1OVLGnhrFaSVQYg1SZetTTvUibqeFZ9QlfmvRWoV1VmCaCRzroXPpsuAjTV7gLUfPahBqD1OQMW/fazAWTKvQRI/ZgUSJR7U8CM/dHZ+/2VcatWdvdEZAaYUhiAwkerJXt0rnzXwdRKmHfDM0fHD5kxjTFyVLzVfvvirn7+cDJWjhy7c7XlYuwc6Urvu2tRhRypyhwAf1sKY+TIxfQA+H39q5wxc+RgVrcBduTmZTlj5khnDgH4IzKpMGaOVCbvyyvRGTNHGtPrKypjXirM5jb910I4k69oQeKY+77EMAcALEsck/+W6f71tyCma/ZFROTrJVwMy7wmf3bv6/MX+Dgkkysblvxps/dhOKZb6IvrTakzXXuPApnpYneDGOeKvJlaSXcDmA7AicQyW84VeTOnY+NdiWcG1uiZksFEHdyAlsJEjEkmkwGNsKHNZCJGSKtVTYC1tO022mnjwUBrMdXg8dreuOBhv7D/62/8lGZ1wLxXyZKOm+iUHIQintyny0TkaATHjYgcjeAoFpEje9R/nGPqIx2aw3NU9odCQI6e6x/VLY32cKQXVBnkAAAAAElFTkSuQmCC"),i._image}}],(n=[{key:"ready",value:function(){nl(ul(i.prototype),"ready",this).call(this),this.show&&this.onchangeShow(!0)}},{key:"render",value:function(t){var e=this.bounds,n=e.left,r=e.top,o=e.width,a=e.height;t.beginPath(),this.drawImage(t,i.image,n,r,o,a)}},{key:"onchange",value:function(t,e){"value"in t?this.show?this.onchangeShow(!0):this.show=!0:"show"in t&&this.onchangeShow(this.show)}},{key:"onchangeShow",value:function(t){!this.app.isEditMode&&this.getState("board")&&(t?lr(this,this.board,{location:this.getState("location"),modal:this.getState("modal"),closable:this.getState("closable")||!1,data:this.value}):fr(this))}},{key:"board",get:function(){return this.getState("board")},set:function(t){this.set("board",t)}},{key:"show",get:function(){return this.getState("show")},set:function(t){this.setState("show",t)}},{key:"started",get:function(){return this.getState("show")},set:function(t){this.setState("show",t)}},{key:"value",get:function(){return this.getState("value")},set:function(t){this.setState("value",t)}},{key:"hasTextProperty",get:function(){return!1}},{key:"nature",get:function(){return cl}}])&&el(e.prototype,n),r&&el(e,r),i}(Bn(Pn));function fl(t){return(fl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ll(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hl(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 pl(t,e){return(pl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function dl(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=vl(t);if(e){var o=vl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return yl(this,n)}}function yl(t,e){if(e&&("object"===fl(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 vl(t){return(vl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("popup",sl);var gl=function(t){!function(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&&pl(t,e)}(i,t);var e,n,r,o=dl(i);function i(){return ll(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(t){var e=this.model.path,n=void 0===e?[]:e;if(!(n.length<=1)){t.beginPath(),t.moveTo(n[0].x,n[0].y);for(var r=1;r<n.length;r++)t.lineTo(n[r].x,n[r].y);t.closePath(),this.drawStroke(t)}}},{key:"path",get:function(){return this.model.path},set:function(t){this.set("path",t)}},{key:"contains",value:function(t,e){var n=this.model.path,r=!1;return n.forEach((function(o,i){var a=(i+n.length+1)%n.length,u=o.x,c=o.y,s=n[a].x,f=n[a].y;c>e!=f>e&&t<(s-u)*(e-c)/(f-c)+u&&(r=!r)})),r}}])&&hl(e.prototype,n),r&&hl(e,r),i}(mn);function ml(t){return(ml="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function bl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wl(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 xl(t,e){return(xl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _l(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=Al(t);if(e){var o=Al(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return kl(this,n)}}function kl(t,e){if(e&&("object"===ml(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 Al(t){return(Al=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("path",gl);var Sl=function(t){!function(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&&xl(t,e)}(i,t);var e,n,r,o=_l(i);function i(){return bl(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(t){var e=this.model,n=e.x1,r=e.y1,o=e.x2,i=e.y2,a=e.x3,u=e.y3;t.beginPath(),t.moveTo(n,r),t.lineTo(o,i),t.lineTo(a,u),t.closePath()}},{key:"contains",value:function(t,e){for(var n=this.model,r=[n.x1,n.y1,n.x2,n.y2,n.x3,n.y3],o=!1,i=0;i<r.length;i+=2){var a=(i+2)%r.length,u=r[i],c=r[i+1],s=r[a+1];c>e!=s>e&&t<(r[a]-u)*(e-c)/(s-c)+u&&(o=!o)}return o}},{key:"mutable",get:function(){return!0}},{key:"path",get:function(){var t=this.model;return[{x:t.x1,y:t.y1},{x:t.x2,y:t.y2},{x:t.x3,y:t.y3}]},set:function(t){this.set({x1:t[0].x,y1:t[0].y,x2:t[1].x,y2:t[1].y,x3:t[2].x,y3:t[2].y})}}])&&wl(e.prototype,n),r&&wl(e,r),i}(Pn);function Ol(t){return(Ol="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function El(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pl(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 jl(t,e){return(jl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ml(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=Tl(t);if(e){var o=Tl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Rl(this,n)}}function Rl(t,e){if(e&&("object"===Ol(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 Tl(t){return(Tl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.memoize(Sl.prototype,"path",!1),mn.register("triangle",Sl);var Il={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"number",label:"ratio",name:"ratio",property:"ratio"}],help:"scene/component/donut"},Cl={ondragmove:function(t,e,n){n.controls;var r=n.model,o=r.cx,i=r.rx;i=Math.abs(i);var a=(n.transcoordP2S(t.x,t.y).x-o)/i*100;a=a>=100||a<=-100?100:Math.abs(a),n.set({ratio:a})}},zl=function(t){!function(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&&jl(t,e)}(i,t);var e,n,r,o=Ml(i);function i(){return El(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"is3dish",value:function(){return!1}},{key:"render",value:function(t){var e=this.model,n=e.ratio,r=void 0===n?50:n,o=e.cx,i=e.cy,a=e.rx,u=e.ry,c=e.startAngle,s=e.endAngle,f=e.anticlockwise;a=Math.abs(a),u=Math.abs(u),t.beginPath(),t.ellipse(o,i,a,u,0,c||0,s||2*Math.PI,f),t.moveTo(o+a/100*r,i),t.ellipse(o,i,a/100*r,u/100*r,0,c||0,s||2*Math.PI,!0)}},{key:"contains",value:function(t,e){var n=this.model,r=n.cx,o=n.cy,i=n.rx,a=n.ry,u=n.ratio,c=(t-r)/(2*(i=Math.abs(i))-.5),s=(e-o)/(2*(a=Math.abs(a))-.5),f=(t-r)/(i/100*u*2-.5),l=(e-o)/(a/100*u*2-.5),h=!1;return c*c+s*s<.25&&f*f+l*l>.25&&(h=!h),h}},{key:"controls",get:function(){var t=this.model,e=t.cx,n=t.cy,r=t.rx,o=t.ratio;return[{x:e+(r=Math.abs(r))/100*o,y:n,handler:Cl}]}},{key:"nature",get:function(){return Il}}])&&Pl(e.prototype,n),r&&Pl(e,r),i}(is);function Bl(t){return(Bl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ll(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dl(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 Fl(t,e){return(Fl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Nl(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=Yl(t);if(e){var o=Yl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ul(this,n)}}function Ul(t,e){if(e&&("object"===Bl(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 Yl(t){return(Yl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.memoize(zl.prototype,"controls",!1),mn.register("donut",zl);var Gl={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"number",label:"ratio",name:"ratio",property:"ratio"},{type:"number",label:"wing",name:"wing",property:"wing"}],help:"scene/component/star"},Hl={ondragmove:function(t,e,n){n.controls;var r=n.model,o=r.cy,i=r.ry,a=(n.transcoordP2S(t.x,t.y).y-o)/i*100+100;a>=100?a=100:a<=0&&(a=0),n.set({ratio:a})}},Wl=function(t){!function(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&&Fl(t,e)}(i,t);var e,n,r,o=Nl(i);function i(){return Ll(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"is3dish",value:function(){return!1}},{key:"render",value:function(t){var e=this.model,n=e.ratio,r=void 0===n?30:n,o=e.wing,i=void 0===o?5:o,a=e.cx,u=e.cy,c=e.rx,s=e.ry;if(e.startAngle,e.endAngle,e.anticlockwise,!(i<3)){var f=1.5707963267948966,l=2*Math.PI/i,h=c-r/100*c,p=s-r/100*s;t.save(),t.beginPath(),t.translate(a,u),t.moveTo(c*Math.cos(-f),s*Math.sin(-f)),t.lineTo((c-h)*(Math.cos(l-f)+Math.cos(0-f))/2,(s-p)*(Math.sin(l-f)+Math.sin(0-f))/2);for(var d=1;d<i;d++)t.lineTo(c*Math.cos(l*d-f),s*Math.sin(l*d-f)),t.lineTo((c-h)*(Math.cos(l*(d+1)-f)+Math.cos(l*d-f))/2,(s-p)*(Math.sin(l*(d+1)-f)+Math.sin(l*d-f))/2);t.closePath(),t.restore()}}},{key:"controls",get:function(){var t=this.model,e=t.cx,n=t.cy,r=t.ry;return[{x:e,y:n-r+r*(t.ratio/100),handler:Hl}]}},{key:"nature",get:function(){return Gl}}])&&Dl(e.prototype,n),r&&Dl(e,r),i}(is);function Vl(t){return(Vl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Xl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ql(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 Kl(t,e){return(Kl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ql(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=Zl(t);if(e){var o=Zl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Jl(this,n)}}function Jl(t,e){if(e&&("object"===Vl(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 Zl(t){return(Zl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.memoize(Wl.prototype,"controls",!1),mn.register("star",Wl);var $l={mutable:!1,resizable:!0,rotatable:!1,properties:[]},th=function(t){!function(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&&Kl(t,e)}(i,t);var e,n,r,o=Ql(i);function i(){return Xl(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(t){var e=this.bounds,n=e.left,r=e.top,o=e.width,i=e.height;t.beginPath(),t.rect(n,r,o,i)}},{key:"text",get:function(){return this.get("id")},set:function(t){}},{key:"rotatable",get:function(){return!1}},{key:"nature",get:function(){return $l}}])&&ql(e.prototype,n),r&&ql(e,r),i}(Bn(Pn));function eh(t){return(eh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function nh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rh(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 oh(){return(oh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=ih(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function ih(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=sh(t)););return t}function ah(t,e){return(ah=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function uh(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=sh(t);if(e){var o=sh(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ch(this,n)}}function ch(t,e){if(e&&("object"===eh(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 sh(t){return(sh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mn.register("variable",th);var fh=function(t){return function(t){!function(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&&ah(t,e)}(i,t);var e,n,r,o=uh(i);function i(){return nh(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"animOnValueChange",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;if(t!=this._lastValue){if(n)var o=t-(Number(r)||0);else o=t-(this._lastValue||0);this._lastValue=t,this._anim_alpha=-o,this.animate({step:function(t){e._anim_alpha=o*(t-1),e.invalidate()},duration:1e3,delta:"circ",options:{x:1},ease:"out"}).start()}}},{key:"dispose",value:function(){oh(sh(i.prototype),"dispose",this).call(this),delete this._value_substitutor}},{key:"onchange",value:function(t,e){t.hasOwnProperty("value")&&delete this._value_substitutor}},{key:"animAlpha",get:function(){return this._anim_alpha||0}},{key:"animValue",get:function(){return(this._lastValue||0)+(this._anim_alpha||0)}},{key:"defaultValueSubstitutor",value:function(){return this.getState("value")}},{key:"valueSubstitutor",get:function(){return this._value_substitutor||(this._value_substitutor=Te(this.getState("value"),this)||this.defaultValueSubstitutor),this._value_substitutor}},{key:"value",get:function(){return Number(this.valueSubstitutor())||0},set:function(t){delete this._value_substitutor,this.setState("value",Number(M(t)))}}])&&rh(e.prototype,n),r&&rh(e,r),i}(t)};function lh(t){return(lh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ph(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 dh(t,e){return(dh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function yh(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=gh(t);if(e){var o=gh(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vh(this,n)}}function vh(t,e){if(e&&("object"===lh(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 gh(t){return(gh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var mh=function(t){return function(t){!function(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&&dh(t,e)}(i,t);var e,n,r,o=yh(i);function i(){return hh(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"_convertDataFormat",value:function(t,e){var n;switch(e){case"json":n=JSON.parse(t);break;default:n=t}return n}},{key:"isDataSource",value:function(){return!0}}])&&ph(e.prototype,n),r&&ph(e,r),i}(t)};function bh(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function wh(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)}}var xh=new WeakSet,_h=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.counters={},this.references={},this.creator=e,this.disposer=n,xh.add(this)}var e,n,r;return e=t,n=[{key:"dispose",value:function(){if(this.disposer)for(var t in this.references)this.disposer.call(null,t,this.references[t]);delete this.references,delete this.counters}},{key:"ids",get:function(){return Object.keys(this.references)}},{key:"add",value:function(t,e){var n=this,r=new Promise((function(r,o){var i=n.references[t];if(i)i===e?o(Error("Reference ID and target duplicate")):e?o(Error("Reference ID duplicate")):r(i);else{function a(e){e=ot(e,(function(){var t=this;this.release=function(){return n.release(t)}})),n.references[t]=e,n.counters[t]=1,r(e)}if(e)a(e);else{if(!n.creator)return void o(Error("Reference id("+t+") is not allowed. Reference creator should be defined."));n.creator.call(null,t,(function(t){a(t)}),(function(t){o(t)}))}}}));return this.references[t]||(this.references[t]=r),r}},{key:"get",value:function(){var t,e=(t=regeneratorRuntime.mark((function t(e,n){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=this.references[e])){t.next=13;break}if(r instanceof Promise){t.next=7;break}if(e in this.counters){t.next=5;break}throw new Error("No Reference Count");case 5:return this.counters[e]++,t.abrupt("return",r);case 7:if(!n){t.next=13;break}return t.next=10,r;case 10:return r=t.sent,this.counters[e]++,t.abrupt("return",r);case 13:if(!n){t.next=17;break}return t.next=16,this.add(e);case 16:return t.abrupt("return",t.sent);case 17:throw new Error("No References for "+e);case 18:case"end":return t.stop()}}),t,this)})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){bh(i,r,o,a,u,"next",t)}function u(t){bh(i,r,o,a,u,"throw",t)}a(void 0)}))});return function(t,n){return e.apply(this,arguments)}}()},{key:"_id",value:function(t){for(var e in this.references)if(this.references[e]===t)return e;return-1}},{key:"release",value:function(t){var e=this._id(t),n=this.references[e];n?(this.counters[e]--,0==this.counters[e]&&(this.disposer&&this.disposer.call(null,e,n),delete this.references[e],delete this.counters[e],ye("RELEASED",e))):pe("No Referenced ID")}}],r=[{key:"residents",get:function(){return xh}}],n&&wh(e.prototype,n),r&&wh(e,r),t}();function kh(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)}}var Ah={},Sh={},Oh=[];function Eh(t){var e="SCRIPT"==t.target.tagName?Ah:Sh,n=t.target.src||t.target.href;e[n]=!0,Oh.forEach((function(t,r){var o=t.resolve,i=t.scripts,a=t.styles;if(e==Ah){var u=i.indexOf(n);u>-1&&u<i.length-1&&jh(i[u+1])}for(var c=0;c<i.length;c++)if(!Ah[i[c]])return;if(a)for(var s=0;s<a.length;s++)if(!Sh[a[s]])return;o(),Oh[r]=null})),Oh=Oh.filter((function(t){return t}))}function Ph(t){var e=t.target.src,n="SCRIPT"==t.target.tagName?Ah:Sh;Oh.forEach((function(r,o){var i=r.reject,a=r.scripts,u=r.styles,c=!1;if(n===Ah){for(var s=0;s<a.length;s++)if(a[s]==e){c=!0;break}}else if(u)for(var f=0;f<u.length;f++)if(u[f]==e){c=!0;break}c&&(i(t),Oh[o]=null)})),Oh=Oh.filter((function(t){return t})),delete n[e],document.head.removeChild(t.target)}function jh(t){Ah[t]=!1;var e=document.createElement("script");e.onload=Eh,e.onerror=Ph,e.type="text/javascript",e.src=t,document.head.appendChild(e)}var Mh=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r;return e=t,r=[{key:"load",value:function(t,e){return"string"==typeof t&&(t=[t]),"string"==typeof e&&(e=[e]),new Promise((function(n,r){if((!t||t instanceof Array)&&(!e||e instanceof Array)){var o,i=!0;if(e&&e.forEach((function(t){Sh.hasOwnProperty(t)||function(t){Sh[t]=!1;var e=document.createElement("link");e.onload=Eh,e.onerror=Ph,e.type="text/css",e.rel="stylesheet",e.media="screen,print",e.href=t,document.head.appendChild(e)}(t),Sh[t]||(i=!1)})),t&&t.length>0&&t.forEach((function(t){Ah.hasOwnProperty(t)?Ah[t]||(i=!1):o=o||t})),o)jh(o);else if(i)return void n();Oh.push({resolve:n,reject:r,scripts:t,styles:e})}else r("invalid sources for load")}))}}],(n=null)&&kh(e.prototype,n),r&&kh(e,r),t}(),Rh="0.0.0",Th=0,Ih=performance.now(),Ch=0;function zh(){return Th}requestAnimationFrame((function t(){requestAnimationFrame(t),Ch++;var e=performance.now(),n=e-Ih;n<1e3||(Th=Math.round(1e3*Ch/n),Ih=e,Ch=0)}));var Bh=u;function Lh(){}}])}));
|