@hatiolab/things-scene 3.0.0-beta.6 → 3.0.0-beta.9
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/assets/images/spinner.png +0 -0
- package/db.sqlite +0 -0
- package/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +3 -8
- package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +24 -9
- package/logs/application-2021-11-18-10.log +4 -0
- package/logs/connections-2021-11-08-12.log +0 -0
- package/logs/connections-2021-11-08-14.log +32 -0
- package/logs/connections-2021-11-11-16.log +64 -0
- package/logs/connections-2021-11-15-16.log +32 -0
- package/logs/connections-2021-11-16-09.log +32 -0
- package/logs/connections-2021-11-18-10.log +32 -0
- package/package.json +30 -26
- package/things-scene-ie.js +1 -1
- package/things-scene-min.js +1 -1
- package/things-scene.d.ts +38 -5
- package/things-scene.mjs +1 -1
- package/logs/application-2021-12-17-00.log +0 -12
- package/logs/application-2021-12-17-01.log +0 -8
- package/logs/connections-2021-12-11-15.log +0 -32
- package/logs/connections-2021-12-17-00.log +0 -96
- package/logs/connections-2021-12-17-01.log +0 -64
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=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,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,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),y=n(27),d=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,S=c.Uint8ClampedArray,A=S&&S.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,B={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},z={BigInt64Array:8,BigUint64Array:8},L=function(t){if(!f(t))return!1;var e=h(t);return l(B,e)||l(z,e)};for(r in B)(i=(o=c[r])&&o.prototype)?y(i,T,o):I=!1;for(r in z)(i=(o=c[r])&&o.prototype)&&y(i,T,o);if((!I||!s(O)||O===Function.prototype)&&(O=function(){throw j("Incorrect invocation")},I))for(r in B)c[r]&&b(c[r],O);if((!I||!E||E===P)&&(E=O.prototype,I))for(r in B)c[r]&&b(c[r].prototype,E);if(I&&m(A)!==E&&b(A,E),u&&!l(E,M))for(r in C=!0,v(E,M,{get:function(){return f(this)?this[R]:void 0}}),B)c[r]&&y(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 B){var o=c[r];if(o&&l(o.prototype,t))try{delete o.prototype[t]}catch(t){}}E[t]&&!n||d(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 B)if((o=c[r])&&l(o,t))try{delete o[t]}catch(t){}if(O[t]&&!n)return;try{return d(O,t,n?e:I&&O[t]||e)}catch(t){}}for(r in B)!(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(B,e)||l(z,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,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,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),y=n(74),d=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 d("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");y[x]=!0,r=function(t,e){if(l(t,x))throw new d("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 d("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(y,d,v,g){for(var m,b,w=a(y),x=i(w),_=r(d,v),k=u(x),S=0,A=g||c,O=e?A(y,k):n||h?A(y,0):void 0;k>S;S++)if((p||S in x)&&(b=_(m=x[S],S,w),t))if(e)O[S]=b;else if(b)switch(t){case 3:return!0;case 5:return m;case 6:return S;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>"},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(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(213),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),y=n(28),d=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),S=n(43),A=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,B=j.f,z=M.f,L=Math.round,D=o.RangeError,F=s.ArrayBuffer,N=F.prototype,U=s.DataView,Y=c.NATIVE_ARRAY_BUFFER_VIEWS,H=c.TYPED_ARRAY_CONSTRUCTOR,G=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){B(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]):z(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?B(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){B(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(d(e)),t,g)})),S&&S(g,W),E(A(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=y(r)*a)+l>h)throw D("Wrong length");c=u/a}else c=d(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++)})),S&&S(g,W),m=g.prototype=_(V)),m.constructor!==g&&h(m,"constructor",g),h(m,H,g),G&&h(m,G,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),y=n(176),d=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,S=n&&n.that,A=!(!n||!n.AS_ENTRIES),O=!(!n||!n.IS_ITERATOR),E=!(!n||!n.INTERRUPTED),P=i(e,S),j=function(t){return o&&y(o,"normal",t),new v(!0,t)},M=function(t){return A?(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 d(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){y(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),y=n(83),d=!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(){},d=!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 y&&d&&h(t)&&!c(t,v)&&m(t),t}};a[v]=!0},function(t,e,n){var r=n(506),o=n(511);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(507),i=n(508),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),y=!h.exec(s),d=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 d(d.call)||!d(Object)||!d((function(){t=!0}))||t}))?function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return y||!!p(h,c(t))}:d},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(216),o=n(217);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){var r=n(540),o=n(157),i=n(541),a=n(542),u=n(543),c=n(61),s=n(214),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){"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,y=t?-1:1;if(r<2)for(;;){if(p in l){s=l[p],p+=y;break}if(p+=y,t?p<0:h<=p)throw c("Reduce of empty array with no initial value")}for(;t?p>=0:h>p;p+=y)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),y=n(185),d=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),S=u.PROPER,A=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,B=r.RangeError,z=o(w),L=o([].reverse),D=d.pack,F=d.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]},H=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},G=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=y(n),i=O(t);if(o+e>i.byteLength)throw B("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=y(n),u=O(t);if(a+e>u.byteLength)throw B("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=S&&"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&&!A})))K&&A&&c(P,"name","ArrayBuffer");else{(j=function(t){return l(this,M),new P(y(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=y(t);E(this,{bytes:z(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 B("Wrong offset");if(o+(n=void 0===n?r-o:p(n))>r)throw B("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 H(X(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return H(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,G,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),y=n(96),d=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={},S=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 A=new _,O=A[b](m?{}:-0,1)!=A,E=p((function(){A.has(1)})),P=y((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)&&(S("delete"),S("has"),g&&S("get")),(j||O)&&S(b),m&&x.clear&&delete x.clear}return k[t]=_,r({global:!0,forced:_!=w},k),d(_,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),y=n(199),d=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,S=void 0!==/()??/.exec("")[1];(_||S||k||p||y)&&(g=function(t){var e,n,r,o,a,s,f,p=this,y=h(p),A=u(t),O=y.raw;if(O)return O.lastIndex=p.lastIndex,e=i(g,O,A),p.lastIndex=O.lastIndex,e;var E=y.groups,P=k&&p.sticky,j=i(c,p),M=p.source,R=0,T=A;if(P&&(j=w(j,"y",""),-1===b(j,"g")&&(j+="g"),T=x(A,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==m(A,p.lastIndex-1))&&(M="(?: "+M+")",T=" "+T,R++),n=new RegExp("^(?:"+M+")",j)),S&&(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),S&&o&&o.length>1&&i(d,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)})),y=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||!y||n){var d=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:d(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(496),o=n(497),i=n(498),a=n(499),u=n(500);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(520);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(219),o=n(223),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(528),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(212),o=n(222);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},function(t,e,n){var r=n(219),o=n(532),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),y=n(6),d=n(80),v=n(181),g=a.PROPER,m=a.CONFIGURABLE,b=v.IteratorPrototype,w=v.BUGGY_SAFARI_ITERATORS,x=y("iterator"),_=function(){return this};t.exports=function(t,e,n,a,y,v,k){c(n,e,a);var S,A,O,E=function(t){if(t===y&&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"]||y&&M[y],T=!w&&R||E(y),I="Array"==e&&M.entries||R;if(I&&(S=s(I.call(new t)))!==Object.prototype&&S.next&&(i||s(S)===b||(f?f(S,b):u(S[x])||p(S,x,_)),l(S,P,!0,!0),i&&(d[P]=_)),g&&"values"==y&&R&&"values"!==R.name&&(!i&&m?h(M,"name","values"):(j=!0,T=function(){return o(R,this)})),y)if(A={values:E("values"),keys:v?T:E("keys"),entries:E("entries")},k)for(O in A)(w||j||!(O in M))&&p(M,O,A[O]);else r({target:e,proto:!0,forced:w||j},A);return i&&!k||M[x]===T||p(M,x,T,{name:y}),d[e]=T,A}},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),y=h.length,d=void 0===r?" ":i(r);return p<=y||""==d?h:((l=c(d,f((a=p-y)/d.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),y=n(58),d=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,S=u.String,A=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(S(t),r.protocol+"//"+r.host)};m&&b||(m=function(t){var e=y(arguments,1);return O[++A]=function(){c(f(t)?t:_(t),void 0,e)},o(A),A},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 d("script")?function(t){p.appendChild(d("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(529),o=n(159),i=n(160),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(213),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(537),o=n(225),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(224)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(230);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(556),i=n(231),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(562);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,y=s,d=0,v=!!l&&a(l,h);d<c;){if(d in r){if(p=v?v(r[d],d,n):r[d],f>0&&o(p))y=t(e,n,p,i(p),y,f-1)-1;else{if(y>=9007199254740991)throw u("Exceed the acceptable array length");e[y]=p}y++}d++}return y}},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),y=r.Array;t.exports=function(t){var e=a(t),n=s(this),r=arguments.length,d=r>1?arguments[1]:void 0,v=void 0!==d;v&&(d=o(d,r>2?arguments[2]:void 0));var g,m,b,w,x,_,k=p(e),S=0;if(!k||this==y&&c(k))for(g=f(e),m=n?new this(g):y(g);g>S;S++)_=v?d(e[S],S):e[S],l(m,S,_);else for(x=(w=h(e,k)).next,m=n?new this:[];!(b=i(x,w)).done;S++)_=v?u(w,d,[b.value,S],!0):b.value,l(m,S,_);return m.length=S,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"),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(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),y=p.set,d=p.getterFor;t.exports={getConstructor:function(t,e,n,s){var f=t((function(t,r){u(t,p),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=f.prototype,v=d(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=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(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),y=8!==s(c+"08")||22!==s(c+"0x16")||l&&!o((function(){s(Object(l))}));t.exports=y?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,y=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 d,v=l(arguments[a++]),g=h?y(u(v),h(v)):u(v),m=g.length,b=0;m>b;)d=g[b++],r&&!i(p,v,d)||(n[d]=v[d]);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,y=n(149).set,d=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"),S=k&&k.value;S||(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()},d||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)}:(y=h(y,l),a=function(){y(r)}):(u=!0,c=w.createTextNode(""),new b(r).observe(c,{characterData:!0}),a=function(){c.data=u=!u})),t.exports=S||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,y=r.length,d=f;return void 0!==l&&(l=o(l),d=s),u(h,d,(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>y){var h=i(f/10);return 0===h?o:h<=y?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,y,d,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(d=(y=c(g,x)).next,g=[];!(p=o(d,y)).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,y=h.getterFor,d=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 d(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,d=y(e),v=function(t,e,n){var r=d(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=d(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=d(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=d(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),y=n(54),d=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),S=n(95),A=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"),B=I&&I.prototype,z=C&&C.prototype,L=o.RegExp,D=o.TypeError,F=o.decodeURIComponent,N=o.encodeURIComponent,U=u("".charAt),Y=u([].join),H=u([].push),G=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=G(t,K," "),n=4;try{return F(e)}catch(t){for(;n;)e=G(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 G(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:S(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=A(t);if(s)for(n=(e=S(t,s)).next;!(r=a(n,e)).done;){if(i=(o=S(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");H(this.entries,{key:x(u.value),value:x(c.value)})}else for(var f in t)v(t,f)&&H(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,"="),H(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++],H(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(){y(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);H(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&&H(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||H(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&&d(C)){var st=u(z.has),ft=u(z.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(d(T)&&r({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return T(t,arguments.length>1?lt(arguments[1]):{})}}),d(I)){var ht=function(t){return y(this,B),new I(t,arguments.length>1?lt(arguments[1]):{})};B.constructor=ht,ht.prototype=B,r({global:!0,forced:!0},{Request:ht})}}t.exports={URLSearchParams:ut,getState:M}},function(t,e,n){var r=n(495);t.exports=function(t){return r(t,4)}},function(t,e,n){var r=n(114),o=n(501),i=n(502),a=n(503),u=n(504),c=n(505);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(512),o=n(519),i=n(521),a=n(522),u=n(523);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(217),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(218);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(526),o=n(220),i=n(69),a=n(119),u=n(221),c=n(158),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(527),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(530),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){t.exports=function(){return[]}},function(t,e,n){var r=n(227),o=n(162),i=n(161),a=n(225),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){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,n){var r=n(229),o=n(161),i=n(118);t.exports=function(t){return r(t,i,o)}},function(t,e,n){var r=n(227),o=n(69);t.exports=function(t,e,n){var i=e(t);return o(t)?i:r(i,n(t))}},function(t,e,n){var r=n(37).Uint8Array;t.exports=r},function(t,e,n){var r=n(557),o=n(47),i=n(232),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){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(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(559);t.exports=function(t){return r(2,t)}},function(t,e,n){var r=n(223),o=n(89),i=n(220),a=n(69),u=n(121),c=n(119),s=n(120),f=n(158),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(564),o=n(567),i=n(568);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(238),o=n(575),i=n(576);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(221),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(581);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(589);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(573),o=n(580),i=n(582),a=n(583),u=n(584),c=n(241),s=n(240),f=n(118),l=n(243),h=n(585),p=n(244),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,S,A=r({},e.imports,_.imports,a),O=f(A),E=i(A,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&&(S=!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=(S?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":"")+(S?", __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,S,A=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,H)}catch(t){L("parse")}},B=function(t,e){x.width=t*W(),x.height=e*W(),k.style.minWidth=t*W()+"px",S.width=t,S.height=e,S.style.width=t+"px",S.style.height=e+"px",S.getContext("2d").setTransform(1,0,0,1,0,0)},z=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(){y&&(m.push({data:y.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!==A&&A(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],S.getContext("2d").putImageData(m[r].data,t.x,t.y),_.globalCompositeOperation="copy",_.drawImage(S,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){z(e.pos,e.data.length,t)},U=function(){},Y=function(t,e){return function(n){t(n),N(e)}},H={hdr:Y((function(t){B((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){y||(y=S.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(W(),W()),g=!0),P&&(_.drawImage(S,0,0),P=i.auto_play),d=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)}},G=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"),S=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&&B(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,y=null,d=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||G()},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&&z(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||G(),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),y=n(56),d=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),S=n(38),A=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),B=n(91),z=n(94),L=n(74),D=n(73),F=n(6),N=n(173),U=n(25),Y=n(36),H=n(18),G=n(20).forEach,W=z("hidden"),V=F("toPrimitive"),X=H.set,q=H.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=B("symbols"),ut=B("op-symbols"),ct=B("string-to-symbol-registry"),st=B("symbol-to-string-registry"),ft=B("wks"),lt=!$||!$.prototype||!$.prototype.findChild,ht=f&&h((function(){return 7!=A(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]=A(J);return X(n,{type:"Symbol",tag:t,description:e}),f||(n.description=e),n},yt=function(t,e,n){t===K&&yt(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=A(n,{enumerable:S(0,!1)})):(p(t,W)||nt(t,W,S(1,{})),t[W][r]=!0),ht(t,r,n)):nt(t,r,n)},dt=function(t,e){b(t);var n=x(e),r=O(n).concat(bt(n));return G(r,(function(e){f&&!u(vt,n,e)||yt(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 G(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 G(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,S(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=yt,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}),G(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?A(t):dt(A(t),e)},defineProperty:yt,defineProperties:dt,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 y(e)||(e=function(t,e){if(d(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,y=p&&p.prototype;if(o&&c(p)&&(!("description"in y)||void 0!==p().description)){var d={},v=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:f(arguments[0]),e=s(y,this)?new p(t):void 0===t?p():p(t);return""===t&&(d[e]=!0),e};h(v,p),v.prototype=y,y.constructor=v;var g="Symbol(test)"==String(p("test")),m=a(y.toString),b=a(y.valueOf),w=/^Symbol\((.*)\)[^)]+$/,x=a("".replace),_=a("".slice);l(y,"description",{configurable:!0,get:function(){var t=b(this),e=m(t);if(u(d,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),y=n(53),d=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",d(e,"")),g&&f(n,"stack",h(n.stack,1)),p(n,r);var c=[];return y(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),y=n(50),d=p("isConcatSpreadable"),v=o.TypeError,g=y>=51||!i((function(){var t=[];return t[d]=!1,t.concat()[0]!==t})),m=h("concat"),b=function(t){if(!u(t))return!1;var e=t[d];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),y=n(58),d=p("slice"),v=h("species"),g=o.Array,m=Math.max;r({target:"Array",proto:!0,forced:!d},{slice:function(t,e){var n,r,o,h=f(this),p=s(h),d=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 y(h,d,b);for(r=new(void 0===n?g:n)(m(b-d,0)),o=0;d<b;d++,o++)d in h&&l(r,o,h[d]);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),y=n(50),d=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(y)return y<70;if(!(h&&h>3)){if(p)return!0;if(d)return d<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,y=Math.min;r({target:"Array",proto:!0,forced:!l},{splice:function(t,e){var n,r,o,l,d,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=y(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++)(d=b+l)in g&&f(o,l,g[d]);if(o.length=r,n<r){for(l=b;l<m-r;l++)v=l+n,(d=l+r)in g?g[v]=g[d]: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,(d=l+r-1)in g?g[v]=g[d]: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,y=(1<<p)-1,d=y>>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=y):(s=a(u(t)/c),t*(l=i(2,-s))<1&&(s--,l*=2),(t+=s+d>=1?v/l:v*i(2,1-d))*l>=2&&(s++,l/=2),s+d>=y?(f=0,s=y):s+d>=1?(f=(t*l-1)*i(2,e),s+=d):(f=t*i(2,d-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,y=o(l.prototype.slice),d=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(y&&void 0===e)return y(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++,d(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),y=o(s.getUTCHours),d=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=d(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(y(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),y=u("".replace),d=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"+d(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?y(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),y=n(51).f,d=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),S=function(t){var e=h(t,"number");return"bigint"==typeof e?e:A(e)},A=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(S(t)),n=this;return f(w,n)&&p((function(){g(n)}))?s(Object(e),n,E):e},P=r?y(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,d(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),y=i("".slice),d=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"!==d(8e-5,3)||"1"!==d(.9,0)||"1.25"!==d(1.255,2)||"1000000000000000128"!==d(0xde0b6b3a7640080,0)}))||!s((function(){d({})}))},{toFixed:function(t){var e,n,r,o,i=u(this),c=a(t),s=[0,0,0,0,0,0],h="",d="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),d=b(s)}else g(s,0,n),g(s,1<<-e,0),d=b(s)+p("0",c);return d=c>0?h+((o=d.length)<=c?"0."+p("0",c-o)+d:y(d,0,o-c)+"."+y(d,o-c)):h+d}})},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),y=n(65),d=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),S=n(96),A=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),B=n(387),z=n(63),L=n(50),D=C("species"),F=T.get,N=T.set,U=T.getterFor("Promise"),Y=h&&h.prototype,H=h,G=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=_(H),e=t!==String(H);if(!e&&66===L)return!0;if(c&&!G.finally)return!0;if(L>=51&&/native code/.test(t))return!1;var n=new H((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[D]=r,!(Z=n.then((function(){}))instanceof r)||!e&&B&&!J})),tt=$||!S((function(t){H.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,y=s.domain;try{f?(o||(2===t.rejection&&at(t),t.rejection=1),!0===f?a=r:(y&&y.enter(),a=f(r),y&&(y.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){y&&!c&&y.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(){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){l(O,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 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($&&(G=(H=function(t){x(this,G),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=y(G,{then:function(t,e){var n=U(this),r=n.reactions,o=q(A(this,H));return o.ok=!b(t)||t,o.fail=b(e)&&e,o.domain=z?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===H||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 H((function(t,e){l(a,n,t,e)})).then(t,e)}),{unsafe:!0}),p(Y,"catch",G.catch,{unsafe:!0}));try{delete Y.constructor}catch(t){}d&&d(Y,G)}u({global:!0,wrap:!0,forced:$},{Promise:H}),v(H,"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?H: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,y=[].push,d=l((function(){function t(){}return!(h((function(){}),[],t)instanceof t)})),v=!l((function(){h((function(){}))})),g=d||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&&!d)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(y,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,y,d=arguments.length<4?e:arguments[3],v=f.f(i(e),n);if(!v){if(a(p=l(e)))return t(p,n,r,d);v=h(0)}if(u(v)){if(!1===v.writable||!a(d))return!1;if(c=f.f(d,n)){if(c.get||c.set||!1===c.writable)return!1;c.value=r,s.f(d,n,c)}else s.f(d,n,h(0,r))}else{if(void 0===(y=v.set))return!1;o(y,d,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),y=n(68),d=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),S=x("match"),A=o.RegExp,O=A.prototype,E=o.SyntaxError,P=i(y),j=i(O.exec),M=i("".charAt),R=i("".replace),T=i("".indexOf),I=i("".slice),C=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,B=/a/g,z=/a/g,L=new A(B)!==B,D=d.MISSED_STICKY,F=d.UNSUPPORTED_Y,N=r&&(!L||D||_||k||g((function(){return z[S]=!1,A(B)!=B||A(z)==z||"/a/i"!=A(B,"i")})));if(a("RegExp",N)){for(var U=function(t,e){var n,r,o,i,a,s,f=l(O,this),y=h(t),d=void 0===e,v=[],g=t;if(!f&&y&&d&&t.constructor===U)return t;if((y||l(O,t))&&(t=t.source,d&&(e="flags"in g?g.flags:P(g))),t=void 0===t?"":p(t),e=void 0===e?"":p(e),g=t,_&&"dotAll"in B&&(r=!!e&&T(e,"s")>-1)&&(e=R(e,/s/g,"")),n=e,D&&"sticky"in B&&(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(A(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 A[t]},set:function(e){A[t]=e}})},H=f(A),G=0;H.length>G;)Y(H[G++]);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),y=s((function(){return"/a/b"!=h.call({source:"a",flags:"b"})})),d=o&&"toString"!=h.name;(y||d)&&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),y=i("".slice),d=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:d(u(n),r),i=c(t);return p?p(e,i,o):y(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=[],y=0;null!==(h=l(r,o));){var d=u(h[0]);p[y]=d,""===d&&(r.lastIndex=f(o,a(r.lastIndex),s)),y++}return 0===y?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),y=n(84),d=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),S=n(32),A=b("matchAll"),O=k.set,E=k.getterFor("RegExp String Iterator"),P=RegExp.prototype,j=o.TypeError,M=a(d),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})})),B=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(y(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,A))&&S&&"RegExp"==h(t)&&(r=B),r)return i(r,t,a)}else if(I)return T(a,t);return n=f(a),o=new RegExp(t,"g"),S?i(B,o,n):o[A](n)}}),S||A in P||g(P,A,B)},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),y=n(111),d=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),S=i("".slice),A="$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:d(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 d=s(o);d||(o=h(o));var m=a.global;if(m){var A=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=y(u,l(a.lastIndex),A))}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=[],B=1;B<E.length;B++)_(C,void 0===(P=E[B])?P:String(P));var z=E.groups;if(d){var L=x([T],C,I,u);void 0!==z&&_(L,z);var D=h(r(o,void 0,L))}else D=v(T,u,I,C,z,o);I>=M&&(j+=S(u,M,I)+D,M=I+T.length)}return j+S(u,M)}]}),!!u((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!A||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),y=n(6),d=n(32),v=y("replace"),g=RegExp.prototype,m=o.TypeError,b=a(h),w=a("".indexOf),x=a("".replace),_=a("".slice),k=Math.max,S=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,y,A,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(d&&n)return x(f(P),t,e)}for(a=f(P),h=f(t),(y=c(e))||(e=f(e)),A=h.length,O=k(1,A),j=S(a,h,0);-1!==j;)E=y?f(e(h,j,a)):p(h,a,j,[],void 0,e),R+=_(a,M,j)+E,M=j+A,j=S(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),y=n(41),d=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),S=i(_),A=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=[],y=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,m=new RegExp(t.source,y+"g");(c=o(g,m,i))&&!((f=m.lastIndex)>v&&(S(h,A(i,v,c.index)),c.length>1&&c.index<i.length&&r(_,h,d(c,1)),l=c[0].length,v=f,h.length>=a));)m.lastIndex===c.index&&m.lastIndex++;return v===i.length?!l&&k(m,"")||S(h,""):S(h,A(i,v)),h.length>a?d(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:y(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),y=o.unicode,d=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(w?"g":"y"),g=new s(w?"^(?:"+o.source+")":o,d),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?A(a,_):a);if(null===E||(O=x(h(g.lastIndex+(w?_:0)),a.length))===b)_=l(a,_,y);else{if(S(k,A(a,b,_)),k.length===m)return k;for(var P=1;P<=E.length-1;P++)if(S(k,E[P]),k.length===m)return k;_=b=O}}return S(k,A(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),y=i("".slice),d=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(d(arguments.length>1?arguments[1]:void 0,e.length)),r=c(t);return p?p(e,r,n):y(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,y=a.exportTypedArrayMethod,d=s&&s.prototype[c],v=!!d&&"values"===d.name,g=function(){return f(p(this))};y("entries",(function(){return h(p(this))})),y("keys",(function(){return l(p(this))})),y("values",g,i&&!v),y(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,y=c.aTypedArray,d=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}));d("sort",(function(t){return void 0!==t&&a(t),b?g(this,t):u(y(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),y=!o.ActiveXObject&&"ActiveXObject"in o,d=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},v=c("WeakMap",d,s);if(p&&y){r=s.getConstructor(d,"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),y=n(14),d=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),S=k.set,A=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),B=f([].join),z=f(1..toString),L=f([].pop),D=f([].push),F=f("".replace),N=f([].shift),U=f("".split),Y=f("".slice),H=f("".toLowerCase),G=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++)G(e,t%256),t=R(t/256);return B(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+=z(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},rt={},ot=d({},rt,{" ":1,'"':1,"<":1,">":1,"`":1}),it=d({},ot,{"#":1,"?":1,"{":1,"}":1}),at=d({},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&&!y(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"===H(t)},ht={},pt={},yt={},dt={},vt={},gt={},mt={},bt={},wt={},xt={},_t={},kt={},St={},At={},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,d=!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=yt;continue}h+=H(i),f=pt;break;case pt:if(i&&(C(V,i)||"+"==i||"-"==i||"."==i))h+=H(i);else{if(":"!=i){if(e)return"Invalid scheme";h="",f=yt,l=0;continue}if(e&&(s.isSpecial()!=y(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=At:s.isSpecial()&&n&&n.scheme==s.scheme?f=dt:s.isSpecial()?f=bt:"/"==r[l+1]?(f=vt,l++):(s.cannotBeABaseURL=!0,D(s.path,""),f=Mt)}break;case yt: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?At:gt;continue;case dt: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||d){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?d=!0:"]"==i&&(d=!1),h+=i}else{if(""==h)return"Invalid host";if(u=s.parseHost(h))return u;if(h="",f=St,e==kt)return}break;case St: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 At: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(B(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(B(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=H(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 y(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?"/"+B(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,St))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+B(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,Bt),n=arguments.length>1?arguments[1]:void 0,r=S(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())},Bt=Ct.prototype,zt=function(t,e){return{get:function(){return A(this)[t]()},set:e&&function(t){return A(this)[e](t)},configurable:!0,enumerable:!0}};if(a&&l(Bt,{href:zt("serialize","setHref"),origin:zt("getOrigin"),protocol:zt("getProtocol","setProtocol"),username:zt("getUsername","setUsername"),password:zt("getPassword","setPassword"),host:zt("getHost","setHost"),hostname:zt("getHostname","setHostname"),port:zt("getPort","setPort"),pathname:zt("getPathname","setPathname"),search:zt("getSearch","setSearch"),searchParams:zt("getSearchParams"),hash:zt("getHash","setHash")}),h(Bt,"toJSON",(function(){return A(this).serialize()}),{enumerable:!0}),h(Bt,"toString",(function(){return A(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),y=o([].push),d=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)?y(e,((1023&o)<<10)+(1023&i)+65536):(y(e,o),n--)}else y(e,o)}return e}(t)).length,i=128,a=0,s=72;for(e=0;e<t.length;e++)(n=t[e])<128&&y(r,l(n));var d=r.length,v=d;for(d&&y(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 S=x-k,A=36-k;y(r,l(m(k+S%A))),x=f(S/A),_+=36}y(r,l(m(x))),s=b(a,w,v==d),a=0,v++}}a++,i++}return p(r,"")};t.exports=function(t){var e,n,r=[],o=v(d(g(t),a,"."),".");for(e=0;e<o.length;e++)n=o[e],y(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 S(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={};c(d,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(A([])));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 S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function A(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=y,c(m,"constructor",y),c(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),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=A,S.prototype={constructor:S,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:A(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(211),o=n(524),i=n(216),a=n(525),u=n(531),c=n(534),s=n(535),f=n(536),l=n(538),h=n(228),p=n(539),y=n(89),d=n(544),v=n(545),g=n(550),m=n(69),b=n(119),w=n(552),x=n(47),_=n(554),k=n(118),S=n(122),A={};A["[object Arguments]"]=A["[object Array]"]=A["[object ArrayBuffer]"]=A["[object DataView]"]=A["[object Boolean]"]=A["[object Date]"]=A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Map]"]=A["[object Number]"]=A["[object Object]"]=A["[object RegExp]"]=A["[object Set]"]=A["[object String]"]=A["[object Symbol]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A["[object Error]"]=A["[object Function]"]=A["[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 B=y(e),z="[object Function]"==B||"[object GeneratorFunction]"==B;if(b(e))return c(e,R);if("[object Object]"==B||"[object Arguments]"==B||z&&!P){if(M=T||z?{}:g(e),!R)return T?l(e,u(M,e)):f(e,a(M,e))}else{if(!A[B])return P?e:{};M=v(e,B,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?S: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(){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(215);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(212),o=n(509),i=n(47),a=n(214),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(510),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(513),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(514),o=n(515),i=n(516),a=n(517),u=n(518);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){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(88),o=n(118);t.exports=function(t,e){return t&&r(e,o(e),t)}},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(222),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(224)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(88),o=n(122);t.exports=function(t,e){return t&&r(e,o(e),t)}},function(t,e,n){var r=n(47),o=n(120),i=n(533),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){(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(88),o=n(161);t.exports=function(t,e){return r(t,o(t),e)}},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,n){var r=n(88),o=n(226);t.exports=function(t,e){return r(t,o(t),e)}},function(t,e,n){var r=n(229),o=n(226),i=n(122);t.exports=function(t){return r(t,i,o)}},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){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(546),i=n(547),a=n(548),u=n(549);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(551),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(553),o=n(159),i=n(160),a=i&&i.isMap,u=a?o(a):r;t.exports=u},function(t,e,n){var r=n(89),o=n(48);t.exports=function(t){return o(t)&&"[object Map]"==r(t)}},function(t,e,n){var r=n(555),o=n(159),i=n(160),a=i&&i.isSet,u=a?o(a):r;t.exports=u},function(t,e,n){var r=n(89),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(558),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(560);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(561);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(231);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){var r=n(563),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(211),o=n(236),i=n(569),a=n(572),u=n(89),c=n(69),s=n(119),f=n(158),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__"),S=x&&h.call(e,"__wrapped__");if(k||S){var A=k?t.value():t,O=S?e.value():e;return d||(d=new r),y(A,O,n,p,d)}}return!!_&&(d||(d=new r),a(t,e,n,p,y,d))}},function(t,e,n){var r=n(215),o=n(565),i=n(566);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(230),i=n(86),a=n(236),u=n(570),c=n(571),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(228),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,n){var r=n(88),o=n(574),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(237),o=n(240);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(239),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(577),o=n(579)(r);t.exports=o},function(t,e,n){var r=n(578),o=n(218),i=n(238),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(239),o=n(237),i=n(241),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(242);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(586),o={escape:n(590),evaluate:n(591),interpolate:n(243),variable:"",imports:{_:{escape:r}}};t.exports=o},function(t,e,n){var r=n(587),o=n(244),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(588)({"&":"&","<":"<",">":">",'"':""","'":"'"});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(242),i=n(69),a=n(232),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){"use strict";n.r(e),n.d(e,"polyfill",(function(){return c})),n.d(e,"create",(function(){return Fc})),n.d(e,"Model",(function(){return Gp})),n.d(e,"Layer",(function(){return no})),n.d(e,"EventMap",(function(){return ku})),n.d(e,"NOTHING",(function(){return l})),n.d(e,"MODE_VIEW",(function(){return h})),n.d(e,"MODE_EDIT",(function(){return p})),n.d(e,"MODE_SHIFT",(function(){return y})),n.d(e,"SCENE_MODE",(function(){return d})),n.d(e,"MAX_UNDO_SIZE",(function(){return v})),n.d(e,"DPPX",(function(){return g})),n.d(e,"GESTURES",(function(){return m})),n.d(e,"KEYEVENTS",(function(){return b})),n.d(e,"DEFAULT",(function(){return w})),n.d(e,"Component",(function(){return Rn})),n.d(e,"ContainerAbstract",(function(){return Xr})),n.d(e,"Container",(function(){return ki})),n.d(e,"RootContainer",(function(){return zu})),n.d(e,"Shape",(function(){return Xn})),n.d(e,"Line",(function(){return ss})),n.d(e,"Ellipse",(function(){return ms})),n.d(e,"Rect",(function(){return Co})),n.d(e,"Polygon",(function(){return Es})),n.d(e,"Polyline",(function(){return Us})),n.d(e,"Ruler",(function(){return ko})),n.d(e,"ImageView",(function(){return Zs})),n.d(e,"GifView",(function(){return wf})),n.d(e,"AudioPlayer",(function(){return Rf})),n.d(e,"Text",(function(){return Ff})),n.d(e,"Group",(function(){return zi})),n.d(e,"LocalRef",(function(){return Qf})),n.d(e,"GlobalRef",(function(){return vl})),n.d(e,"InfoWindow",(function(){return pr})),n.d(e,"Popup",(function(){return El})),n.d(e,"HTMLOverlayElement",(function(){return af})),n.d(e,"HTMLOverlayContainer",(function(){return ol})),n.d(e,"Path",(function(){return Bl})),n.d(e,"Triangle",(function(){return Hl})),n.d(e,"Donut",(function(){return $l})),n.d(e,"Star",(function(){return sh})),n.d(e,"Variable",(function(){return mh})),n.d(e,"RectPath",(function(){return er})),n.d(e,"ValueHolder",(function(){return Ph})),n.d(e,"DataSource",(function(){return zh})),n.d(e,"MoveHandle",(function(){return Lr})),n.d(e,"Layout",(function(){return Bn})),n.d(e,"AbsoluteLayout",(function(){return dr})),n.d(e,"CardLayout",(function(){return mr})),n.d(e,"LinearHorizontalLayout",(function(){return xr})),n.d(e,"LinearVerticalLayout",(function(){return Sr})),n.d(e,"TableLayout",(function(){return Or})),n.d(e,"HTMLAbsoluteLayout",(function(){return Ln})),n.d(e,"Straight",(function(){return np})),n.d(e,"RightAngleStraight",(function(){return fp})),n.d(e,"Curve",(function(){return mp})),n.d(e,"ArrowStraight",(function(){return Op})),n.d(e,"ReferenceMap",(function(){return Mp})),n.d(e,"ScriptLoader",(function(){return Dp})),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 Dc})),n.d(e,"version",(function(){return Fp})),n.d(e,"FPS",(function(){return Hp})),n.d(e,"license",(function(){return Wp}));var r={};n.r(r),n.d(r,"hide",(function(){return P})),n.d(r,"show",(function(){return j}));var o={};n.r(o),n.d(o,"insertAt",(function(){return zt})),n.d(o,"append",(function(){return Lt})),n.d(o,"prepend",(function(){return Dt})),n.d(o,"remove",(function(){return Ft})),n.d(o,"getAt",(function(){return Nt})),n.d(o,"forEach",(function(){return Ut})),n.d(o,"indexOf",(function(){return Yt})),n.d(o,"size",(function(){return Ht})),n.d(o,"clear",(function(){return Gt})),n.d(o,"moveForward",(function(){return Wt})),n.d(o,"moveBackward",(function(){return Vt})),n.d(o,"moveToHead",(function(){return Xt})),n.d(o,"moveToTail",(function(){return qt}));var i={};n.r(i),n.d(i,"push",(function(){return Kt})),n.d(i,"pop",(function(){return Qt}));var a={};n.r(a),n.d(a,"intercept",(function(){return ve})),n.d(a,"reset",(function(){return ge})),n.d(a,"clear",(function(){return me}));var u={};n.r(u),n.d(u,"compile",(function(){return wa})),n.d(u,"duplicate",(function(){return xa})),n.d(u,"select",(function(){return ke})),n.d(u,"match",(function(){return xe}));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});function s(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 f(t){t.hasOwnProperty("_backupStrokeStyle")&&(t.set("strokeStyle",t._backupStrokeStyle),delete t._backupStrokeStyle,t.hasOwnProperty("_backupLineWidth")&&(t.set("lineWidth",t._backupLineWidth),delete t._backupLineWidth))}var l={},h=0,p=1,y=2,d={VIEW:0,EDIT:1},v=30,g="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,m=["mousemove","mouseup","mousedown","mouseout","wheel","click","touchstart","touchmove","touchend","dblclick"],b=["keydown","keyup"],w={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"};function x(t){return function(t){if(Array.isArray(t))return _(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 _(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 _(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 _(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 k='\n<div class="popup-content">\n</div>\n<button class="closable-1945">X</button>\n',S="\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",A=new WeakMap;function O(t,e,n){var r=t.root;if(r!==t){E(t);var o=A.get(r)||[];o=[].concat(x(o),[[t,{div:e,scene:n}]]),A.set(r,o)}}function E(t){var e=t.root,n=A.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)E(u[0]);A.delete(e)}}function P(t){E(t)}function j(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?k:'\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=S:y.appendChild(document.createTextNode(S)),o.appendChild(y);var d=o.querySelector(".popup-content");m.forEach((function(t){d.addEventListener(t,(function(t){t.stopPropagation()}))})),b.forEach((function(t){d.addEventListener(t,(function(t){t.stopPropagation()}))})),o.addEventListener("click",(function(e){s&&P(t)})),m.forEach((function(t){o.addEventListener(t,(function(t){t.stopPropagation()}))})),b.forEach((function(t){o.addEventListener(t,(function(t){t.stopPropagation()}))})),t.root.model_layer.overlay.appendChild(o),O(t,o,e),null===(n=o.querySelector(".closable-1945"))||void 0===n||n.addEventListener("click",(function(e){e.preventDefault(),P(t)}),!1),o.addEventListener("close-scene",(function(e){e.preventDefault(),P(t),t.data=e.detail}),!1),e.target=h,e.data=r||t.data,e.fit("both");var v=M(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 M(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 R={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 T(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var I=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=R[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())}}])&&T(e.prototype,n),r&&T(e,r),t}();function C(t){return(C="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 B(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function z(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 L(t,e){return(L=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function D(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=N(t);if(e){var o=N(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return F(this,n)}}function F(t,e){if(e&&("object"===C(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 N(t){return(N=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function U(t){return(U="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 Y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function H(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 G(t,e){return(G=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function W(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=X(t);if(e){var o=X(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return V(this,n)}}function V(t,e){if(e&&("object"===U(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 X(t){return(X=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function q(t){return(q="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 K(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Q(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 J(t,e){return(J=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Z(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=tt(t);if(e){var o=tt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $(this,n)}}function $(t,e){if(e&&("object"===q(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 tt(t){return(tt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function et(t){return(et="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 nt(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 ot(t,e){return(ot=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=ut(t);if(e){var o=ut(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return at(this,n)}}function at(t,e){if(e&&("object"===et(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 ut(t){return(ut=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(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){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 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){if(e&&("object"===dt(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)}var _t={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&&L(t,e)}(i,t);var e,n,r,o=D(i);function i(){return B(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)}}])&&z(e.prototype,n),r&&z(e,r),i}(I),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&&G(t,e)}(i,t);var e,n,r,o=W(i);function i(){return Y(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)}}])&&H(e.prototype,n),r&&H(e,r),i}(I),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&&J(t,e)}(i,t);var e,n,r,o=Z(i);function i(){return K(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)}}])&&Q(e.prototype,n),r&&Q(e,r),i}(I),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&&ot(t,e)}(i,t);var e,n,r,o=it(i);function i(){return nt(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}(I),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&<(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.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}(I),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&&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,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)}}])&>(e.prototype,n),r&>(e,r),i}(I)};var kt=n(210),St=n.n(kt),At=n(164),Ot=n.n(At),Et=n(233),Pt=n.n(Et),jt=n(234),Mt=n.n(jt),Rt=n(235),Tt=n.n(Rt);function It(t){return(It="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 Ct=0;function Bt(t){for(;t&&"object"===It(t);){var e=t;for(var n in t){t=t[n];break}if(t===e){t=void 0;break}}return t}function zt(t,e){return this.__collection__?(-1==(t=this.__collection__.indexOf(e))&&this.__collection__.splice(t,0,e),this):this}function Lt(t){return this.__collection__||(this.__collection__=[]),-1==this.__collection__.indexOf(t)&&this.__collection__.push(t),this}function Dt(t){return this.__collection__||(this.__collection__=[]),-1==this.__collection__.indexOf(t)&&this.__collection__.unshift(t),this}function Ft(t){if(!this.__collection__)return this;var e=this.__collection__.indexOf(t);return e>=0&&this.__collection__.splice(e,1),this}function Nt(t){if(this.__collection__)return this.__collection__[t]}function Ut(t,e){this.__collection__&&this.__collection__.forEach(t,e)}function Yt(t){if(this.__collection__)return this.__collection__.indexOf(t)}function Ht(){return this.__collection__?this.__collection__.length:0}function Gt(){this.__collection__=[]}function Wt(t){var e=this.indexOf(t);-1!=e&&0!=e&&(this.__collection__[e]=this.__collection__[e-1],this.__collection__[e-1]=t)}function Vt(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 Xt(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 qt(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 Kt(t){throw new Error("Not Implemented Yet")}function Qt(t){throw new Error("Not Implemented Yet")}function Jt(){}function Zt(t){return(Zt="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)}Jt.prototype=o;var $t=/\s+/;function te(t,e,n,r){if(!n)return!0;if("object"==Zt(n)){for(var o in n){var i=n[o];t[e].apply(t,[o,i])}return!1}return!$t.test(n)||(n.split($t).forEach((function(n){return t[e].apply(t,[n].concat(r))})),!1)}var ee=["on","off","once","delegate_on","delegate_off","trigger","listenTo"],ne={withEvent:function(){var t=this;ee.forEach((function(e){return t[e]=ne[e]}))},on:function(t,e,n){return te(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(!te(this,"once",t,[e,n])||!e)return this;var r=this,o=Mt.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||!te(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 Jt),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&&oe(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&&re(n,arguments),r&&re(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&&oe(this._delegators,e),!this._listeners)return this;if(!te(this,"trigger",t,e))return this;var n=this._listeners[t],r=this._listeners["(all)"];return n&&re(n,e),r&&re(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"!=Zt(e)||(n=this),t&&((r={})[t._listenId]=t),r){var a=r[i];a.off(e,n,this),(o||Tt.a(a._events))&&delete this._listeningTo[i]}return this}};function re(t,e){t.forEach((function(t){return t.callback.apply(t.ctx,e)}))}function oe(t,e){t.forEach((function(t){return ne.delegate.apply(t,e)}))}var ie={listenTo:"on",listenToOnce:"once"};for(var ae in ie){var ue=ie[ae];ne[ae]=function(t,e,n){this._listeningTo||(this._listeningTo={});var r=this._listeningTo;return t._listenId||(t._listenId="".concat("l"||"").concat(++Ct)),r[t._listenId]=t,n||"object"!=Zt(e)||(n=this),t[ue](e,n,this),this}}var ce=ne;function se(t,e){if(e instanceof Array)e.forEach((function(e){return se(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}"undefined"==typeof window||window;var 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)),St.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,e,n,r){var o=e.get("class");return!!o&&(o.split(" ")||[]).indexOf(t.substr(1))>=0}function we(t,e,n,r){return t==e.get("type")}function xe(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 be(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 we(t,e)}}function _e(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 ke(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=be;break;case"(":r=_e;break;default:r=we}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 Se=function(t){return t};function Ae(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)}:Se}}function Oe(t,e,n){if(t){var r=n||Bt,o=String(t),i=(o.match(/#{[^}]*}/gi)||[]).map((function(t){return Ae(t)})),a=(o.match(/\${[^}]*}/gi)||[]).map((function(t){return Ae(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 Ee(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 Pe(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 Pe(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 Pe(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 je(t){var e=Bt(t);return null==e?"":String(e)}function Me(t){return Number(Bt(t))}function Re(t){return t}function Te(t){return je(t)}function Ie(t){return Me(t)}function Ce(t){if(this.param)return t=je(t),this.param.hasOwnProperty(t)?this.param[t]:this.param.default}function Be(t){var e=this.param;if(e){for(var n in e){var r=Ee(n.split("~"),2),o=r[0],i=r[1],a=!!o,u=!!i;if(o=parseFloat(o),i=parseFloat(i),t=Me(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 ze(t){return Me(t)*Math.PI/180}function Le(){}function De(t,e,n,r,o){switch(n){case"value":return"text"===o||"string"===o?Te.bind(t):"number"===o?Ie.bind(t):Re.bind(e);case"map":return Ce.bind(t);case"range":return Be.bind(t);case"radian":return ze.bind(t);case"eval":return function(t){try{return new Function("value","targets",t)}catch(t){return pe(t),Le}}(r).bind(e);default:return Re.bind(e)}}var Fe=function(t){return t};function Ne(t){if(!t)return Fe;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)}:Fe}function Ue(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 Ye(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 Ye(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 Ye(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 He(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 Ge,We=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=De(this,this.owner,r,o,function(t){switch(t){case"ref":case"fillStyle":case"strokeStyle":return"string";default:return}}(n)),this.accessor=Ne(i);var a=e.match(/\[(.*?)\]/);if(a){var u=Ue(a[1].split(":"),2),c=u[0],s=u[1];this.propAccessor=Ne(c),this.partAccessor=Ne(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}}])&&He(e.prototype,n),r&&He(e,r),t}();function Ve(){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 Xe(t){return(Xe="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 qe(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"==Xe(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 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 Qe(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 Je(t,e,n,r,o){if(!r)return[];t.save(),t.font=n;var i=Qe(t,r,e,!!o);return t.restore(),i}function Ze(t){var e=t.fontFamily,n=void 0===e?w.FONT_FAMILY:e,r=t.bold,o=void 0===r?w.BOLD:r,i=t.italic,a=void 0===i?w.ITALIC:i,u=t.fontSize,c=void 0===u?w.FONT_SIZE:u,s=[];return o&&s.push("bold"),a&&s.push("italic"),s.push(c+"px"),s.push(n),s.join(" ")}function $e(t,e,n,r){var o=r.alpha,i=void 0===o?w.FONT_COLOR:o,a=r.fontColor,u=void 0===a?w.FONT_COLOR:a,c=r.textAlign,s=void 0===c?w.TEXT_ALIGN:c,f=r.textBaseline,l=void 0===f?w.TEXT_BASELINE:f,h=r.fontSize,p=void 0===h?w.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=Ze(r);var x,_,k=n.length*d;switch(l){case"top":x=g,t.textBaseline="top";break;case"bottom":x=g+b-k+d,t.textBaseline="bottom";break;case"middle":default:x=g+b/2-k/2+d/2,t.textBaseline="middle"}switch(s){case"left":_=v,t.textAlign="left";break;case"right":_=v+m,t.textAlign="right";break;case"justify":_=v,t.textAlign="left";break;case"center":default:_=v+m/2,t.textAlign="center"}t.globalAlpha*=i,t.fillStyle=u,"justify"!=s?n.forEach((function(e,n){t.fillText(e.join(" "),_,x+n*d)})):n.forEach((function(e,n){var r=x+n*d;if(1==e.length)t.fillText(e[0],_,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=_;e.forEach((function(e,n){t.fillText(e,u,r),u+=o[n]+a}))}})),t.restore()}Ge="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 tn={x:1,y:1};function en(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")||tn;t.shadowOffsetX=o*l.x*g,t.shadowOffsetY=a*l.y*g,t.shadowBlur=c*l.x*g,t.shadowColor=f}function nn(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 rn(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 on(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 an,un=[];function cn(){an=null;var t=performance.now(),e=(un=un.filter((function(t){return sn(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=un.indexOf(t);-1!=e?(un.splice(e,1),t.removeSelf(!0)):pe("Should not be here. Maybe reentrance problem.")})),e.next>0&&(an=setTimeout(fn,Math.max(e.next,500)))}function sn(t){return!t.disposed&&t.retention>0&&!t.isTemplate()&&t.app&&t.app.isViewMode}var fn=Pt()((function(){requestAnimationFrame(cn)}),500),ln=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){sn(t)&&-1==un.indexOf(t)&&(un.push(t),t.touch()),this.touch()}},{key:"remove",value:function(t){var e=un.indexOf(t);e>0&&un.splice(e,1),this.touch()}},{key:"touch",value:function(){null!==an&&(clearTimeout(an),an=null),fn()}},{key:"length",get:function(){return un.length}}])&&on(e.prototype,n),r&&on(e,r),t}());function hn(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=R[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 pn(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()}}var yn={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:en};var dn=n(165),vn=n.n(dn);function gn(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 mn={x:1,y:1},bn={boxSizing:"border-box",margin:"0px",position:"absolute",outline:"none"};function wn(t){var e=t.state,n=e.id,r=e.scale,o=void 0===r?mn: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,x=void 0===b?w.FONT_SIZE:b,_=e.lineWidth,k=void 0===_?0:_,S=e.lineDash,A=t.state.class,O=(t.text,t.strokeStyle),E=(t.fillStyle,t.rotation),P=void 0===E?0:E,j=t.fontColor,M=t.hidden,R=t.bounds,T=R.left,I=R.top,C=R.width,B=R.height,z=t.element;z.hidden=M,n&&(z.id=n),A&&(z.className=A),Object.assign(z.style,bn,{fontFamily:c,fontSize:x+"px",left:T+"px",top:I+"px",width:C+"px",height:B+"px",paddingTop:h+"px",paddingRight:m+"px",paddingBottom:y+"px",paddingLeft:v+"px",border:k+"px",borderColor:O,borderStyle:k>0?S||w.LINE_DASH:"",color:j,fontWeight:i?"bold":"",fontStyle:a?"italic":"",textAlign:"end"==s?"right":"start"==s?"left":s,verticalAlign:f}),gn(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 L=t.delta(),D=(o&&o.x||1)*L.sx,F=(o&&o.y||1)*L.sy,N=(P||0)+L.theta,U=L.tx||0,Y=L.ty||0;["-webkit-","-moz-","-ms-","-o-",""].forEach((function(t){z.style[t+"transform"]="rotate(".concat(N,"rad) translate(").concat(U,"px, ").concat(Y,"px) scale(").concat(D,", ").concat(F,") perspective(1px)")}))}var xn=n(245),_n=n.n(xn);function kn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Sn(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 An={},On={mutable:!1,resizable:!0,rotatable:!0,properties:[],"value-property":"text"},En=[],Pn={theta:0,tx:0,ty:0,sx:1,sy:1,fade:0},jn=new WeakMap,Mn=0,Rn=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=St.a(Pn),n&&this.animation&&(this.animation.started=!0),this.clearCache(),ln.add(this),jn.set(this,Mn++)}var e,n,r;return e=t,r=[{key:"nature",get:function(){return On}},{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 An[t];An[t]=e}},{key:"residents",get:function(){return jn}}],(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(a,[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&&ln.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=St.a(this._model);return this.volatile.forEach((function(e){delete t[e]})),t}},{key:"volatile",get:function(){return En}},{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(kn({},t,e));var n={},r={},o=!1,i=(t=St.a(t),this);return Object.getOwnPropertyNames(t).forEach((function(e){var a=i._model[e],u=t[e];vn()(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")&&ln.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(kn({},t,e));var n={},r={},o=!1,i=(t=St.a(t),this),a=this.getState("sensitive");return Object.getOwnPropertyNames(t).forEach((function(e){var u=i.getState(e),c=t[e];!a&&vn()(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:"anchors",get:function(){return this.nature.anchors||[]}},{key:"findAnchor",value:function(t){return this.anchors.find((function(e){return e.name===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:"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(Bt(t)))}},{key:"rotation",get:function(){return this.getState("rotation")},set:function(t){this.setState("rotation",Number(Bt(t)))}},{key:"contains",value:function(t,e){return!1}},{key:"mutable",get:function(){return this.nature.mutable}},{key:"resizable",get:function(){return this.nature.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 this.nature.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?ke(t,this,n[0]||this):"function"==typeof t&&t.apply(void 0,[this].concat(n))?[this]:void 0}},{key:"capture",value:function(t,e,n){if(!this.capturable||null!=n&&n(this))return!1;var r=this.transcoordP2S(t,e);return this.contains(r.x,r.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&&en(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&&$e(t,this.textBounds,this.textLines(t),this.model)}},{key:"drawStroke",value:function(t){pn(t,this.model)}},{key:"drawFill",value:function(t){this.fillStyle&&"transparent"!=this.fillStyle&&(qe(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=hn(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=St.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=_t[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=yn[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 Ze(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=Oe(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=Bt(t);this.setState("text",null==e?"":String(e))}},{key:"textLines",value:function(t){return Je(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(){}}])&&Sn(e.prototype,n),r&&Sn(e,r),t}();function Tn(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 In(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Rn.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}},Rn.transcoordR=nn,Rn.transcoordRR=rn,Rn.createCanvas=Ge,Rn.memoize=ve,Rn.mixin=se,Rn.drawText=$e,Rn.font=Ze,Rn.textLines=Je,Rn.drawStroke=pn,Rn.drawFill=qe,Rn.reposition=wn,Rn.RetentionManager=ln,Rn.template=_n.a,Rn.buildSubstitutor=Oe,Object.assign(Rn.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=Ge(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 rn(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 nn(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 Ae(t)}))[0];if(n)return n.accessor(this.getState(n.target));var r=(e.match(/\${[^}]*}/)||[]).map((function(t){return Ae(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||Bt,i=(r.match(/#{(\S*)}/gi)||[]).map((function(t){return Ae(t)})),a=(r.match(/\${[^}]*}/gi)||[]).map((function(t){return Ae(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(),Ve.call(this)},onchangeData:function(t,e){Ve.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 We(e,t)})));this._mappings=[]},executeMappings:Ve,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=rn(t,e,void 0,i+this._delta.theta,u);return c&&(s.x+=c.x,s.y+=c.y),s}var f=rn(t,e,n=n||this.rotatePoint,i+this._delta.theta,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=nn(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=nn(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 rn(r.x,r.y,void 0,(n.get("rotation")||0)+n._delta.theta)},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=nn(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=rn(r.x,r.y,void 0,a+n._delta.theta,u),i&&(r.x+=i.x,r.y+=i.y),r},_pre_draw:Rn.prototype.prerender,_draw:Rn.prototype.render,_post_draw:Rn.prototype.postrender}),["rotatePoint","font","lineHeight","retention"].forEach((function(t){return Rn.memoize(Rn.prototype,t,!1)})),["bounds","center","textBounds"].forEach((function(t){return Rn.memoize(Rn.prototype,t,!0)})),Rn.mixin(Rn.prototype,ce.withEvent);var Cn={};var Bn={list:function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Tn(Object(n),!0).forEach((function(e){In(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Tn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},Cn)},register:function(t,e){Cn[t]=e},unregister:function(t){delete Cn[t]},get:function(t){if(t){var e=Cn[t];return e||pe("Layout Not Found - ",t),e}}},zn={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};Bn.register("html-absolute",zn);var Ln=zn;function Dn(t){return(Dn="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 Fn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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)}}function Un(){return(Un="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Yn(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 Yn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Vn(t)););return t}function Hn(t,e){return(Hn=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=Vn(t);if(e){var o=Vn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Wn(this,n)}}function Wn(t,e){if(e&&("object"===Dn(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 Vn(t){return(Vn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Xn=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&&Hn(t,e)}(i,t);var e,n,r,o=Gn(i);function i(){return Fn(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),Un(Vn(i.prototype),"postrender",this).call(this,t)}}])&&Nn(e.prototype,n),r&&Nn(e,r),i}(Rn);function qn(t){return(qn="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 Kn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qn(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 Jn(t,e){return(Jn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Zn(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=tr(t);if(e){var o=tr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $n(this,n)}}function $n(t,e){if(e&&("object"===qn(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 tr(t){return(tr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var er=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&&Jn(t,e)}(i,t);var e,n,r,o=Zn(i);function i(){return Kn(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})}},{key:"anchors",get:function(){return t=this.bounds,e=t.left,n=t.top,r=t.width,o=t.height,[{type:"inout",name:"TOP",position:{x:i=e+r/2,y:n}},{type:"inout",name:"RIGHT",position:{x:e+r,y:a=n+o/2}},{type:"inout",name:"BOTTOM",position:{x:i,y:n+o}},{type:"inout",name:"LEFT",position:{x:e,y:a}}];var t,e,n,r,o,i,a}}])&&Qn(e.prototype,n),r&&Qn(e,r),i}(t);return ve(e.prototype,"path",!1),e};function nr(t){return(nr="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 rr(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 ir(){return(ir="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=ar(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 ar(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=fr(t)););return t}function ur(t,e){return(ur=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function cr(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=fr(t);if(e){var o=fr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return sr(this,n)}}function sr(t,e){if(e&&("object"===nr(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 fr(t){return(fr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var lr={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 hr(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 pr=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=cr(i);function i(){return rr(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 Rn.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 w=document.createElement("div");w.id="side-1",w.className="flip",w.style.display="inline-block",w.innerHTML=f[0](t)}if(f[1]){var x=document.createElement("div");x.id="side-2",x.className="flip",x.style.display="inline-block",x.innerHTML=f[1](t)}m.forEach((function(t){v.addEventListener(t,(function(t){t.stopPropagation()}))})),b.forEach((function(t){v.addEventListener(t,(function(t){t.stopPropagation()}))}));var _=t.root.model_layer.overlay;if(w&&v.appendChild(w),x&&v.appendChild(x),_.appendChild(v),o._addInfoWindow(t,v,g),w){var k=w.querySelector(".info-window-btns > .flipable");k&&k.addEventListener("click",(function(t){t.preventDefault(),x.className=hr(x.className,"flip-side-1"),w.className=hr(w.className,"flip-side-2")}),!1);var S=w.querySelector(".info-window-btns > .closable");S&&S.addEventListener("click",(function(n){n.preventDefault(),i.hide(t,e)}),!1)}if(x){var A=x.querySelector(".info-window-btns > .flipable");A&&A.addEventListener("click",(function(t){t.preventDefault(),x.className=hr(x.className,"flip-side-1"),w.className=hr(w.className,"flip-side-2")}),!1);var O=x.querySelector(".info-window-btns > .closable");O&&O.addEventListener("click",(function(n){n.preventDefault(),i.hide(t,e)}),!1)}var E=w.offsetWidth,P=w.offsetHeight,j=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,t.rootModel.target.getBoundingClientRect()),M=[];w&&M.push(w),x&&M.push(x);var R={x:p,y:y},T=t.transcoordS2C(R.x,R.y);if(T.x+E/2+j.left<j.right&&T.x-E/2>j.left){if(P+20<T.y)return v.style.marginLeft=R.x-E/2+"px",v.style.marginTop=R.y-P-20+"px",void M.forEach((function(t){return t.className+=" arrow-bottom"}));if(T=t.transcoordS2C(R.x,R.y+P+20),j.bottom>T.y+j.top)return v.style.marginLeft=R.x-E/2+"px",v.style.marginTop=R.y+20+"px",void M.forEach((function(t){return t.className+=" arrow-top"}))}if((T=t.transcoordS2C(R.x,R.y)).x-(E+20)>j.left)return v.style.marginLeft=R.x-E-20+"px",v.style.marginTop=R.y-P/2+"px",void M.forEach((function(t){return t.className+=" arrow-right"}));v.style.marginLeft=R.x+20+"px",v.style.marginTop=R.y-P/2+"px",M.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)})),ir(fr(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 lr}}])&&or(e.prototype,n),r&&or(e,r),i}(er(Xn));Rn.register("info-window",pr);var yr={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};Bn.register("absolute",yr);var dr=yr;function vr(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 gr={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 vr(t)},drawables:function(t){return vr(t)},isStuck:function(t){return!0}};Bn.register("card",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.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=br(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}};Bn.register("linear-horizontal",wr);var xr=wr;function _r(t){var e=t.get("layoutConfig");return e&&e.weight||1}var kr={reflow:function(t){var e=this.drawables(t),n=t.get("padding")||{},r=e.reduce((function(t,e){return t+_r(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=_r(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}};Bn.register("linear-vertical",kr);var Sr=kr,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,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};Bn.register("table",Ar);var Or=Ar;function Er(t){return(Er="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 Pr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jr(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 Mr(){return(Mr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Rr(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 Rr(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Br(t)););return t}function Tr(t,e){return(Tr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ir(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=Br(t);if(e){var o=Br(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Cr(this,n)}}function Cr(t,e){if(e&&("object"===Er(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 Br(t){return(Br=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 Lr=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&&Tr(t,e)}(i,t);var e,n,r,o=Ir(i);function i(){return Pr(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"postrender",value:function(t){Mr(Br(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.fill(),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=Mr(Br(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}}])&&jr(e.prototype,n),r&&jr(e,r),i}(t)};function Dr(t){return(Dr="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 Fr(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 Nr(){return(Nr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Ur(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 Ur(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Wr(t)););return t}function Yr(t,e){return(Yr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Hr(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=Wr(t);if(e){var o=Wr(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"===Dr(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 Wr(t){return(Wr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Vr=[],Xr=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&&Yr(t,e)}(i,t);var e,n,r,o=Hr(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:"showOverflow",get:function(){return!1}},{key:"dispose",value:function(){this.components.slice().forEach((function(t){return t.dispose()})),Nr(Wr(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 Bn.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=Nr(Wr(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||Vr).indexOf(t)}},{key:"size",value:function(){return(this._components||Vr).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){Nr(Wr(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 ke(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 ke(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=Nr(Wr(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,n){var r=this.transcoordP2S(t,e);if(!this.contains(r.x,r.y))return!1;var o=this.bounds;r.x-=o.left,r.y-=o.top;for(var i=this.layout.capturables(this),a=i.length-1;a>=0;a--){var u=i[a].capture(r.x,r.y,n);if(u)return u}return this.capturable&&!(null!=n&&n(this))&&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),t.closePath(),this.drawFill(t),this.drawStroke(t)}},{key:"postrender",value:function(t){Nr(Wr(i.prototype),"postrender",this).call(this,t);var e=this.bounds,n=e.left,r=void 0===n?0:n,o=e.top,a=void 0===o?0:o,u=e.width,c=e.height;this.showOverflow||(t.beginPath(),t.rect(r,a,u,c),t.clip(),t.closePath());var s=this.model;a=s.top,r=s.left,s.scale,t.translate(r,a),this.layout.drawables(this).forEach((function(e){e.draw(t)})),t.translate(-r,-a),this.drawText(t)}},{key:"trim",value:function(){this.components.forEach((function(t){t.trim()})),Nr(Wr(i.prototype),"trim",this).call(this)}}])&&Fr(e.prototype,n),r&&Fr(e,r),i}(Lr(er(Rn)));function qr(t){return(qr="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 Kr(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 Qr(){return(Qr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Jr(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 Jr(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=eo(t)););return t}function Zr(t,e){return(Zr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $r(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=eo(t);if(e){var o=eo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return to(this,n)}}function to(t,e){if(e&&("object"===qr(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 eo(t){return(eo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}["layout"].forEach((function(t){return Rn.memoize(Xr.prototype,t,!1)}));var no=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&&Zr(t,e)}(i,t);var e,n,r,o=$r(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*g),t.setAttribute("height",r*g)),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:"showOverflow",get:function(){return this.app.isEditMode}},{key:"createElement",value:function(){var t=Rn.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(){Qr(eo(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:"hovered",get:function(){return this.root.hovered},set:function(t){this.root.hovered=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())&&Qr(eo(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*g,n.y*g),t.scale(o.x*g,o.y*g),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}})}}])&&Kr(e.prototype,n),r&&Kr(e,r),i}(Xr);function ro(t){return(ro="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 oo(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 io(){return(io="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=ao(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 ao(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=fo(t)););return t}function uo(t,e){return(uo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function co(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=fo(t);if(e){var o=fo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return so(this,n)}}function so(t,e){if(e&&("object"===ro(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 fo(t){return(fo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var lo={x:1,y:1},ho={x:0,y:0},po=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&&uo(t,e)}(i,t);var e,n,r,o=co(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(){io(fo(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 Ln}},{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=Rn.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?ho:n,o=e.scale,i=void 0===o?lo: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(),e){var n=e.origin;if(this.hovered=n,this.app&&!this.app.isEditMode&&!(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(),e){var n=e.origin;if(this.hovered=null,this.app&&!this.app.isEditMode){var 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?s(e):r&&f(e)),i&&!e.hidden&&(n?pr.show(e,i,!1,{x:o.offsetX,y:o.offsetY}):r&&pr.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?j(e,c):"modal-popup"==u?j(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&&pr.show(e,c,r,{x:o.offsetX,y:o.offsetY}):"toggle-info-window"==u?pr.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,l=t.restore,h=void 0!==l&&l;if(t.pressed,i&&(i=e.access(i)),a&&(a=e.access(a)),c&&(n?s(e):h&&f(e)),o)switch(o){case"data-toggle":if(!i)return;(n||h)&&this.root.findAll(i,e).forEach((function(t){t.data=!t.data}));break;case"data-tristate":if(!i)return;(n||h)&&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 p=a;this.root.findAll(i,e).forEach((function(t){t.data=p}))}break;case"value-set":if(!i)return;n&&(p=a,this.root.findAll(i,e).forEach((function(t){t.value=p})));break;case"infoWindow":case"info-window":if(!i)return;"click"==r.type||n?pr.show(e,i,h,{x:r.offsetX,y:r.offsetY}):h&&pr.hide(e,i);break;case"toggle-info-window":if(!i)return;pr.toggle(e,i,!1,{x:r.offsetX,y:r.offsetY});break;case"popup":if(!i)return;j(e,i);break;case"modal-popup":if(!i)return;j(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)}}}])&&oo(e.prototype,n),r&&oo(e,r),i}(no);function yo(t){return(yo="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 vo(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 mo(t,e){return(mo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function bo(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 wo(this,n)}}function wo(t,e){if(e&&("object"===yo(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 xo(t){return(xo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}po.Popup=r,Rn.register("model-layer",po);var _o=[1,2,10,20,50,50,50,50,50,50],ko=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&&mo(t,e)}(i,t);var e,n,r,o=bo(i);function i(){return vo(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,S=1*h/2,A=3*h/5;w&&(_=h-_,k=h-k,S=h-S,A=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:_o[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,S),t.lineTo(M-f,x);var T=(E/10).toString(),I=t.measureText(T);t.fillText(T,M-f-I.width-6,A)}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)}}}])&&go(e.prototype,n),r&&go(e,r),i}(er(Xn));function So(t){return(So="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 Oo(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 Eo(t,e){return(Eo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Po(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=Mo(t);if(e){var o=Mo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return jo(this,n)}}function jo(t,e){if(e&&("object"===So(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 Mo(t){return(Mo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.register("ruler",ko);var Ro={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"number",label:"round",name:"round",property:"round"}],help:"scene/component/rect"},To={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=Io(u,i,a),n.set({round:u})}};function Io(t,e,n){var r=e>n?n/e*100:100;return t>=r?t=r:t<=0&&(t=0),t}var Co=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&&Eo(t,e)}(i,t);var e,n,r,o=Po(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=Io(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:Io(o,r,i))/100),y:n,handler:To}]}},{key:"nature",get:function(){return Ro}}])&&Oo(e.prototype,n),r&&Oo(e,r),i}(er(Xn));function Bo(t){return(Bo="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 Lo(){return(Lo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Do(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 Do(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Yo(t)););return t}function Fo(t,e){return(Fo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function No(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=Yo(t);if(e){var o=Yo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Uo(this,n)}}function Uo(t,e){if(e&&("object"===Bo(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 Yo(t){return(Yo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.register("rect",Co);var Ho=90*Math.PI/180;function Go(t,e,n){return{left:-t.x,top:-t.y,width:20,height:20}}function Wo(t,e,n,r){return{left:20-t.x,top:0-t.y,origin:20-t.x,width:e-20,height:20}}function Vo(t,e,n,r){var o={x:0-t.x+10,y:20-t.y+(n-20)/2},i=Rn.transcoordRR(0-t.x,20-t.y,o,Ho);return{left:i.x-(n-20),top:i.y,origin:20-t.y,width:n-20,height:20}}function Xo(t){var e=t.get("translate");return{left:-e.x,top:-e.y,width:t.canvas.width/g,height:t.canvas.height/g}}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&&Fo(t,e)}(i,t);var e,n,r,o=No(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 ko({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 ko({left:0,top:0,origin:20,margin:0,height:20,unit:"m",rotation:Ho,font:"9px Verdana",side:"top",fillStyle:"#f4f4f4",strokeStyle:"#999",capturable:!1}),n.origin_rect=new Co({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=Xo(this);var r=this.screen_coord,o=r.width,i=r.height;this.hruler.set(Wo(e,o,0,this.hruler)),this.vruler.set(Vo(e,0,i,this.vruler)),this.origin_rect.set(Go(e))}else this.screen_coord=Xo(this)}},{key:"resize",value:function(){Lo(Yo(i.prototype),"resize",this).call(this),this.screen_coord=Xo(this);var t=this.screen_coord,e=t.width,n=t.height;this.hruler&&(this.hruler.set(Wo(this.model.translate,e,0,this.hruler)),this.vruler.set(Vo(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=Xo(this),this.hruler){var r=this.model.translate,o=this.screen_coord,i=o.width,a=o.height;this.hruler.set(Wo(r,i,0,this.hruler)),this.vruler.set(Vo(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}(no);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){return(Zo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $o(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=ei(t);if(e){var o=ei(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"===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 ei(t){return(ei=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.register("guide-layer",qo);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&&Zo(t,e)}(i,t);var e,n,r,o=$o(i);function i(){return Qo(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!=y)}},{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=y)}},{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)}}])&&Jo(e.prototype,n),r&&Jo(e,r),i}(no);function ri(t){return(ri="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 oi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ii(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 ai(){return(ai="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=ui(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 ui(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=li(t)););return t}function ci(t,e){return(ci=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function si(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=li(t);if(e){var o=li(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return fi(this,n)}}function fi(t,e){if(e&&("object"===ri(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 li(t){return(li=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.register("shift-layer",ni);var hi=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&&ci(t,e)}(i,t);var e,n,r,o=si(i);function i(){return oi(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),m.forEach((function(e){t.element.addEventListener(e,t.userInputEventHandler.bind(t))})),b.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&&wn(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),ai(li(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()}}])&&ii(e.prototype,n),r&&ii(e,r),i}(t)};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 yi(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 vi(t,e){return(vi=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function gi(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 mi(this,n)}}function mi(t,e){if(e&&("object"===pi(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 bi(t){return(bi=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var wi={x:1,y:1},xi={boxSizing:"border-box",margin:"0px",position:"absolute",outline:"none"},_i={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"layout",label:"layout",name:"layoutOption"}],help:"scene/component/container"},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&&vi(t,e)}(i,t);var e,n,r,o=gi(i);function i(){return yi(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"tagName",get:function(){return"div"}},{key:"nature",get:function(){return _i}},{key:"setElementProperties",value:function(t){}},{key:"layout",get:function(){return Bn.get(this.get("layout"))||Ln}},{key:"reposition",value:function(){if(this.element){var t=this.state,e=t.id,n=t.class,r=t.scale,o=void 0===r?wi: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,xi,{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)")}))}}}])&&di(e.prototype,n),r&&di(e,r),i}(hi(Xr));function Si(t){return(Si="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 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 Ei(t,e,n,r){return(Ei="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,n,r){var o,i=Mi(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 Pi(r,e,n);return!0})(t,e,n,r)}function Pi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ji(){return(ji="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Mi(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 Mi(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ci(t)););return t}function Ri(t,e){return(Ri=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=Ci(t);if(e){var o=Ci(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ii(this,n)}}function Ii(t,e){if(e&&("object"===Si(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 Ci(t){return(Ci=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.register("container",ki);var Bi=["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&&Ri(t,e)}(i,t);var e,n,r,o=Ti(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(Pi({},t,e));var n=Bi.reduce((function(e,n){return t.hasOwnProperty(n)&&(e[n]=t[n]),e}),{});return ji(Ci(i.prototype),"set",this).call(this,n)}},{key:"capture",value:function(t,e,n){var r=ji(Ci(i.prototype),"capture",this).call(this,t,e,n);if(r!==this)return r}},{key:"bounds",get:function(){return ji(Ci(i.prototype),"bounds",this)},set:function(t){if(this.__MUTATING__)!function(t,e,n,r,o){if(!Ei(t,e,n,r||t)&&o)throw new Error("failed to set property")}(Ci(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=Rn.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)}}])&&Oi(e.prototype,n),r&&Oi(e,r),i}(ki);function Li(t){return(Li="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 Di(t){return function(t){if(Array.isArray(t))return Fi(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 Fi(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 Fi(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 Fi(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 Ni(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ui(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 Hi(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=Wi(t);if(e){var o=Wi(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"===Li(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 Wi(t){return(Wi=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Vi(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 S=t.transcoordS2TR(_[k].x,_[k].y);if(r>S.x||o<S.x||i>S.y||a<S.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 Xi(t,e,n,r,o){o||Vi(t,e,n,r)}Rn.register("group",zi);var qi=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=Hi(i);function i(){return Ni(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(Di(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,Xi(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,Xi(this,null,null,!1,!0),this.invalidate())}}])&&Ui(e.prototype,n),r&&Ui(e,r),i}(no);function Ki(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)}}Rn.register("selection-layer",qi);var Qi=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,o=r.left,i=r.top,a=r.width,u=r.height;0!=a&&0!=u&&(t.beginPath(),t.rect(o,i,a,u),t.clip(),t.beginPath(),t.strokeStyle="#f26522",t.lineWidth=4,t.shadowBlur=10,t.shadowColor="black",t.shadowOffsetX=0,t.shadowOffsetY=0,t.rect(o,i,a,u),t.stroke(),t.closePath())}}])&&Ki(e.prototype,n),r&&Ki(e,r),t}();function Ji(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 Zi=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()}}])&&Ji(e.prototype,n),r&&Ji(e,r),t}();function $i(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 ta=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(){}}])&&$i(e.prototype,n),r&&$i(e,r),t}();function ea(t){return(ea="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 na(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ra(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 oa(t,e){return(oa=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ia(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=ua(t);if(e){var o=ua(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return aa(this,n)}}function aa(t,e){if(e&&("object"===ea(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 ua(t){return(ua=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ca=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&&oa(t,e)}(i,t);var e,n,r,o=ia(i);function i(){return na(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)}))}}])&&ra(e.prototype,n),r&&ra(e,r),i}(ta);function sa(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 fa=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=ca.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;ca.after(r,n.app.commander),n.parent&&n.parent.calculateBounds&&n.parent.calculateBounds()}}])&&sa(e.prototype,n),r&&sa(e,r),t}();function la(t){return(la="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 ha(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pa(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 ya(t,e){return(ya=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function da(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=ga(t);if(e){var o=ga(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"===la(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 ga(t){return(ga=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ma(t){for(var e=0;t&&!t.isRootModel();)e+=t.get("rotation")||0,t=t.parent;return e%(2*Math.PI)}var ba=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&&ya(t,e)}(i,t);var e,n,r,o=da(i);function i(){return ha(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=ma(e);if(e.removeSelf(!n),e.bounds=a,e.set("rotation",u),n){e.set("rotation",function(t,e){return((t.get("rotation")||0)-ma(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)}}))}}])&&pa(e.prototype,n),r&&pa(e,r),i}(ta);function wa(t,e){var n=Rn.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=wa(t,e);n&&r.addComponent(n)})),delete t.components),r.created(),r}function xa(t){var e=St()(t.hierarchy);return void 0!==e.id&&delete e.id,wa(e,t.app)}function _a(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 ka(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}var Sa=15*Math.PI/180,Aa=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,this.created=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:"startLinkProcess",value:function(t,e,n){try{var r=wa(e,t.app);t.rootModel.addComponent(r),this.layer.selected=[r],this.active={component:r,index:1},this.ondragstart(n)}catch(t){console.warn(n)}}},{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;this.created||(e.changes=ca.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=ka(s=o.transcoordS2P(s.x,s.y),c)));var l=Math.round((ka(c,a)-f)/Sa)*Sa+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))))}0!==i&&i!==o.path.length-1||(this.layer.hoveredDest=o.rootModel.capture(t.offsetX,t.offsetY,(function(t){return t===o||t.isLine()})),0==i?o.from={position:a}:o.to={position:a}),o.mutatePath(null,(function(t){t[i]=a}))}},{key:"ondragend",value:function(t){var e=this.active,n=e.component,r=e.index,o=e.changes;if(0===r||r===n.path.length-1){var i=t.offsetX,a=t.offsetY,u=n.rootModel.capture(i,a,(function(t){return t===n||t.isLine()})),c=u.transcoordC2S(i,a),s=c.x,f=c.y,l=this.layer.get("scale")||{x:1,y:1},h=(u.anchors||[]).find((function(t){return t&&Math.abs(s-t.position.x)<=4/l.x&&Math.abs(f-t.position.y)<=4/l.y}));h&&(0==r?n.from={component:u.get("id"),anchor:h.name}:n.to={component:u.get("id"),anchor:h.name})}if(this.created){var p=new ba({changes:[{component:this.created,to_container:this.created.parent}]});created.app.commander.execute(p)}else ca.after(o,n.app.commander);this.layer.hoveredDest=null,n.parent&&n.parent.calculateBounds&&n.parent.calculateBounds()}}])&&_a(e.prototype,n),r&&_a(e,r),t}();function Oa(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 Ea=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:"contains",value:function(t,e,n,r){var o=this;return(n.anchors||[]).every((function(i){return i&&Math.abs(t-i.position.x)<=4/r.x&&Math.abs(e-i.position.y)<=4/r.y&&(o.active={component:n,anchor:i.name}),!o.active})),!!this.active}},{key:"draw",value:function(t,e,n){if(e.get("id")&&!e.isLine()){var r=this.active;(e.anchors||[]).forEach((function(o){var i=o.name,a=(o.type,o.position);a&&(t.beginPath(),t.ellipse(a.x,a.y,4/n.x,4/n.y,0,0,2*Math.PI),t.setLineDash([0,0]),t.strokeStyle="#656565",t.stroke(),t.fillStyle="#fff",r&&r.component===e&&r.anchor===i&&(t.strokeStyle="#fa7703",r.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,n=e.component,r=e.anchor,o=this.layer.transcoordC2S(t.offsetX,t.offsetY);this.layer.startLinkProcess(n,{type:"line",from:{component:n.get("id"),anchor:r,position:o},to:{position:o},lineWidth:2,strokeStyle:"black",begin:"oval",beginSize:"size9",end:"arrow",endSize:"size9"},t)}}])&&Oa(e.prototype,n),r&&Oa(e,r),t}();function Pa(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 ja(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 Ra(t,e){var n=t.left,r=t.top,o=t.width,i=t.height,a=n+o/2,u=r+i/2,c=n+o,s=r+i,f=o*e.x>50,l=i*e.y>50;return[{x:n,y:r},f?{x:a,y:r}:null,{x:c,y:r},l?{x:c,y:u}:null,{x:c,y:s},f?{x:a,y:s}:null,{x:n,y:s},l?{x:n,y:u}:null]}var Ta=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&&(Ra(n.bounds,r).every((function(i,a){return i&&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,o=r.left,i=r.top,a=r.width,u=r.height;if(t.beginPath(),t.rect(o,i,a,u),t.setLineDash([3/n.x,4/n.y]),t.lineWidth=1/n.x,t.strokeStyle="black",t.stroke(),t.setLineDash([]),e.resizable){var c=this.active;Ra(e.bounds,n).forEach((function(r,o){r&&(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",c&&c.component===e&&c.index===o&&(t.strokeStyle="#fa7703",c.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=ja(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=ja(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)}}])&&Pa(e.prototype,n),r&&Pa(e,r),t}();function Ia(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 Ca=2*Math.PI,Ba=Math.PI/2;function za(t,e){var n=t.bounds;return{x:n.left+n.width/2,y:n.top-20/e.y}}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){if(!n.rotatable)return!1;var o=za(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=za(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,Ca,!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-Ba:Ba+i)-o;this.layer.selected.filter((function(t){return t.rotatable})).forEach((function(e,n){var r=((e.get("rotation")||0)+a)%Ca;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)}}])&&Ia(e.prototype,n),r&&Ia(e,r),t}();function Da(t){return(Da="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 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)}}function Na(t,e){return(Na=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ua(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=Ga(t);if(e){var o=Ga(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ya(this,n)}}function Ya(t,e){if(e&&("object"===Da(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ha(t)}function Ha(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ga(t){return(Ga=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Wa=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&&Na(t,e)}(i,t);var e,n,r,o=Ua(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)).pathHandler=new Aa(Ha(n));var r=n.pathHandler,a=new fa(Ha(n)),u=new Ta(Ha(n)),c=new La(Ha(n));return n._modelers=[r,a,u,c],n._control_mode_modelers=[a,r,u,c],n.focusOutline=new Qi(Ha(n)),n.groupOutline=new Zi(Ha(n)),n.anchorHandler=new Ea(Ha(n)),n._reversed_modelers=n._modelers.slice().reverse(),n._control_mode_reverse_modelers=n._control_mode_modelers.slice().reverse(),n.hovered=null,n.hoveredDest=null,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}if(this.hovered){this.anchorHandler.reset();var s=this.hovered.transcoordT2S(t,e);if(this.anchorHandler.contains(s.x,s.y,this.hovered,r))return this.currentModeler=this.anchorHandler,!0}var f=this.rootModel.hovered;return f&&this.hovered!==f&&!f.isLine()&&(this.hovered=f),!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*g,n.y*g),t.scale(o.x*g,o.y*g),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)}))}))})),this.hovered&&this._componentDrawer(t,this.hovered,n,(function(t,n,r){e.anchorHandler.draw(t,n,r)})),this.hoveredDest&&this._componentDrawer(t,this.hoveredDest,n,(function(t,n,r){e.anchorHandler.draw(t,n,r)}))}},{key:"hovered",get:function(){return this._hovered},set:function(t){this._hovered=t,this.invalidate()}},{key:"hoveredDest",get:function(){return this._hoveredDest},set:function(t){this._hoveredDest=t,this.invalidate()}},{key:"startLinkProcess",value:function(t,e,n){this.currentModeler=this.pathHandler,this.pathHandler.startLinkProcess(t,e,n),this.hovered=null}},{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 ca.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=wa({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=wa({type:"audio",top:0,left:0,width:100,height:100,src:t},a.app):r.startsWith("vnd.ms-excel/")||/\.xlsx?$/.test(c)?n=wa({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 ba({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;ca.around(this.app.commander,(function(){n.selected.forEach((function(t){var e=t.get("fontSize")||w.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})}}}}])&&Fa(e.prototype,n),r&&Fa(e,r),i}(no);function Va(t){return(Va="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 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)}}function qa(t,e){return(qa=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ka(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=Ja(t);if(e){var o=Ja(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Qa(this,n)}}function Qa(t,e){if(e&&("object"===Va(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 Ja(t){return(Ja=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.register("modeling-layer",Wa);var Za=225*Math.PI/180,$a=135*Math.PI/180,tu=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&&qa(t,e)}(i,t);var e,n,r,o=Ka(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+Za),c=n.y+r*Math.sin(a+Za),s=n.x+r*Math.cos(a+$a),f=n.y+r*Math.sin(a+$a);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}}}}}])&&Xa(e.prototype,n),r&&Xa(e,r),i}(no);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)}}function nu(t,e,n,r,o){for(var i in n){var a=n[i];if(xe(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 ru(){var t=arguments,e=t[t.length-1],n=this.event_pump;n.listeners.forEach((function(r){nu(n.deliverer,r.listener,r.cloned_handlers,e,t)}))}Rn.register("tag-layer",tu);var ou=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)",ru,{event_pump:this})}},{key:"stop",value:function(){this.deliverer.off("(all)",ru)}},{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()}}])&&eu(e.prototype,n),r&&eu(e,r),t}();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)}}var au=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.");ke(r,n.root,t).forEach((function(r){var i=new ou(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()}}])&&iu(e.prototype,n),r&&iu(e,r),t}();function uu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cu(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(t,e,n){return e&&cu(t.prototype,e),n&&cu(t,n),t}var fu=0,lu=1,hu=2,pu=0,yu=1,du=2,vu={},gu=0;var mu=function(){function t(e){uu(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 vu;var n=e.target.getBoundingClientRect();return vu={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);gu>0&&(this._scale=r/gu),gu=r}}return su(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 bu(t,e){return t.capture(e.offsetX,e.offsetY)}function wu(t,e,n){if(t&&t.app&&(!t.app.isViewMode||!t.hidden)){(n=new mu(n)).type=e;var r="on"+e;t[r]&&t[r](n),n.isPropagationStopped()||t.trigger(e,n)}}var xu=function(){function t(e,n){var r=this;uu(this,t),this.container=e,this.html_element=n,this.status=fu,this.last_target=null,this.gesture_handlers=m.map((function(t){return r.gestureHandlerBuilder(t)})),this.keyevent_handlers=b.map((function(t){return r.keyeventHandlerBuilder(t)})),m.forEach((function(t,e){return n.addEventListener(t,r.gesture_handlers[e])})),b.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 su(t,[{key:"dispose",value:function(){var t=this;this.last_enter_target&&wu(this.last_enter_target,"mouseleave",new CustomEvent("mouseleave")),m.forEach((function(e,n){return t.html_element.removeEventListener(e,t.gesture_handlers[n])})),b.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 mu(t))&&t.preventDefault(),!1}}},{key:"keyeventHandlerBuilder",value:function(t){return this["on".concat(t)].bind(this)}},{key:"ondragover",value:function(t){return wu(bu(this.container,t),t.type,t),!1}},{key:"ondrop",value:function(t){return wu(bu(this.container,t),t.type,t),!1}},{key:"onclick",value:function(t){return wu(bu(this.container,t),t.type,t),this.last_target=null,!1}},{key:"ondblclick",value:function(t){return wu(bu(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 lu:var e=t.offsetX-this.__dragstart_e.offsetX,n=t.offsetY-this.__dragstart_e.offsetY;if(e*e+n*n<16)break;this.status=hu,wu(this.last_target,"dragstart",this.__dragstart_e),this.__dragmove_e=t,wu(this.last_target,"dragmove",t);break;case hu:this.__dragmove_e=t,wu(this.last_target,"dragmove",t);break;default:var r=bu(this.container,t);this.last_enter_target!==r&&(this.last_enter_target&&wu(this.last_enter_target,"mouseleave",t),r&&wu(r,"mouseenter",t),this.last_enter_target=r),wu(r,t.type,t),this.last_target=r}return!1}},{key:"onmousedown",value:function(t){switch(this.status){case hu:wu(this.last_target,"dragend",t),this.last_target=null,this.status=fu;break;default:var e=bu(this.container,t);this.last_target=e,this.status=lu,this.__dragstart_e=t,wu(e,t.type,t)}return!1}},{key:"onmouseup",value:function(t){switch(this.status){case hu:wu(this.last_target,"dragend",t);break;default:wu(bu(this.container,t),t.type,t)}return this.last_target=null,this.status=fu,!1}},{key:"onmouseout",value:function(t){var e=bu(this.container,t);switch(this.status){case hu:wu(this.last_target,"dragend",t);break;default:if(this.last_target&&this.last_target===e)return;this.last_enter_target&&(wu(this.last_enter_target,"mouseleave",t),delete this.last_enter_target)}return this.last_target=null,this.status=fu,!1}},{key:"ontouchstart",value:function(t){var e=this,n=bu(this.container,t);return this.last_target=n,this.status=yu,this.touchPoints||(this.touchPoints=[]),this.touchPoints.push(t.changedTouches[0]),this.holdTimer=setTimeout((function(){e.status=pu,wu(e.last_target,"hold",t),delete e.holdTimer}),500),wu(n,t.type,t),!1}},{key:"ontouchmove",value:function(t){var e=this;if(!t.touches||!t.changedTouches)return wu(this.last_target,"dragstart",t),wu(this.last_target,"dragmove",t),!1;var n=bu(this.container,t);switch(this.status){case yu: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=du,void(e.holdTimer&&(clearTimeout(e.holdTimer),delete e.holdTimer))):void 0}}));break;case du: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 wu(this.last_target,"pinch",t),!1;wu(this.last_target,"pan",t),n=this.last_target;break;default:this.last_enter_target!==n&&(this.last_enter_target&&wu(this.last_enter_target,"mouseleave",t),n&&wu(n,"mouseenter",t),this.last_enter_target=n),this.last_target=n}return wu(n,"touchmove",t),!1}},{key:"ontouchend",value:function(t){var e=bu(this.container,t);switch(this.status){case du:e=this.last_target;break;case yu:var n=performance.now(),r=n-this.touchedAt;this.holdTimer&&(clearTimeout(this.holdTimer),delete this.holdTimer,wu(e,r<500?"doubletap":"tap",t),this.touchedAt=n)}wu(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=pu,!1}},{key:"onwheel",value:function(t){return wu(bu(this.container,t),t.type,t),!1}}]),t}(),_u={};var ku={register:function(t,e){_u[t]=e},unregister:function(t){delete _u[t]},get:function(t){return _u[t]}};function Su(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?w.BOLD:i,u=e.italic,c=void 0===u?w.ITALIC:u,s=e.textWrap,f=void 0===s?w.TEXT_WRAP:s,l=e.fontFamily,h=void 0===l?w.FONT_FAMILY:l,p=e.fontColor,y=void 0===p?w.FONT_COLOR:p,d=e.textAlign,v=void 0===d?w.TEXT_ALIGN:d,g=e.textBaseline,b=void 0===g?w.TEXT_BASELINE:g,x=e.paddingTop,_=void 0===x?0:x,k=e.paddingBottom,S=void 0===k?0:k,A=e.paddingLeft,O=void 0===A?0:A,E=e.paddingRight,P=void 0===E?0:E,j=e.fontSize,M=void 0===j?w.FONT_SIZE:j,R=e.lineHeight,T=void 0===R?1.2*M:R,I=t.bounds,C=I.left,B=I.top,z=I.width,L=I.height;t.textHidden=!0;var D=document.createElement("textarea");m.forEach((function(t){D.addEventListener(t,(function(t){t.stopPropagation()}),!0)}));var F=t.transcoordS2C(C,B),N=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),U=N.rotation,Y=N.scale,H=z-O-P,G=H,W=L-_-S;switch(D.style.position="absolute",D.style.width=G+"px",D.style.height=W+"px",D.style.paddingLeft=Math.max(O,0)+"px",D.style.paddingRight=P+"px",D.style.paddingTop=Math.max(_,0)+"px",D.style.paddingBottom=S+"px",D.value=r,D.style.fontFamily=h,D.style.fontSize=M+"px",D.style.lineHeight=T+"px",D.style.overflow="hidden",D.style.resize="none",D.style.outline="none",D.style.border=0,D.style.backgroundColor="transparent",D.style.display="inline-block",D.style.color=y,a&&(D.style.fontWeight="bold"),c&&(D.style.fontStyle="italic"),v){case"right":case"end":D.style.textAlign="right";break;case"justify":D.style.textAlign="justify";break;case"left":case"start":D.style.textAlign="left";break;case"center":default:D.style.textAlign="center"}var V=[a,c,M+"px",h].filter((function(t){return!!t})).join(" ");J(r);var X=t.root.target_element;X.appendChild(D),D.select();var q,K=!1;D.addEventListener("keydown",(function(t){t.stopPropagation(),"Escape"!=t.code&&(t.shiftKey||"Enter"!=t.code&&"NumpadEnter"!=t.code)?setTimeout((function(){J(D.value)})):(K=q.skipUpdate="Escape"==t.code,document.createEvent?D.dispatchEvent(q):D.fireEvent(q.eventType,q))})),document.createEvent?(q=document.createEvent("HTMLEvents")).initEvent("blur",!0,!1):(q=document.createEventObject()).eventType="blur";var Q=t.root.selected;D.addEventListener("blur",(function e(n){t.root.selected=Q,t.textHidden=!1,D.removeEventListener("blur",e,!1),D.parentElement&&D.parentElement.removeChild(D),X.focus(),n.skipUpdate||K||t.app.commander.execute(new ca({changes:[{component:t,before:{text:r},after:{text:D.value}}]}))}),!1)}function J(e){var n={left:0,top:0},r=T*function(t,e,n,r){var o,i=t.getContext();return i.save(),i.font=n,o=Qe(i,e,r,t.get("textWrap")).length,i.restore(),o}(t,e,V,H);switch(D.style.height=r+"px",b){case"top":case"hanging":break;case"bottom":case"alphabetic":n.top=W-r;break;case"middle":default:n.top=W/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,V,H);switch(D.style.width=o+"px",v){case"right":case"end":n.left=H-o;break;case"left":case"start":break;case"center":case"justify":default:n.left=(H-o)/2}}D.style.marginLeft=n.left+"px",D.style.marginTop=n.top+"px";var i="translate(".concat(F.x,"px, ").concat(F.y,"px) scale(").concat(Y,") rotate(").concat(U,"rad) perspective(1px)");["-webkit-","-moz-","-ms-","-o-",""].forEach((function(t){D.style[t+"transform"]=i,D.style[t+"transform-origin"]="".concat(-n.left,"px ").concat(-n.top,"px")}))}}ku.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)&&(Su(n[0]),t.preventDefault(),!0))}}},"model-layer":{"(descendant)":{dblclick:function(t,e){Su(e.origin)}}}});var Au=Ot()((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 Ou(t){return(Ou="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 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)}}function Pu(){return(Pu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=ju(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 ju(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Cu(t)););return t}function Mu(t,e){return(Mu=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ru(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=Cu(t);if(e){var o=Cu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Tu(this,n)}}function Tu(t,e){if(e&&("object"===Ou(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Iu(t)}function Iu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Cu(t){return(Cu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}ku.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=xa(t);return t.parent.addComponent(e),e})),this.duplicates=r.selected.map((function(t){return{component:t}}))):this.changes=ca.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,Au(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 ba({changes:u}))}else ca.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 ba({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,Au(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;ca.around(r.app.commander,(function(){a.forEach((function(t){!t.stuck&&t.move(o)}))}))}}}});var Bu=[];"undefined"!=typeof window&&window.addEventListener("resize",(function(){Bu.forEach((function(t){t.resize()}))}));var zu=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=Ru(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),Bu.push(Iu(n)),n}return e=i,(n=[{key:"dispose",value:function(){this._app&&this._app.dispose(),Pu(Cu(i.prototype),"dispose",this).call(this),this._disposeAllResources(),this.target_element=null,delete this._refresh_mapping_debouncer,P(this);var t=Bu.indexOf(this);t>=0&&Bu.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 xu(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=wa(Object.assign(St.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=wa({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=wa(Object.assign(St.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 au(this),(t=t||{}).type="model-layer";var n=t.variables;delete t.variables,this.model_layer=wa(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=wa(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,ku.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=Ot.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"!=It(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"!=It(n[r])?e[r]=n[r]:n[r].length>0?e[r]=n[r].map((function(e){return"object"!=It(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()}}])&&Eu(e.prototype,n),r&&Eu(e,r),i}(Xr);Object.assign(zu.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()}}}),Rn.memoize(zu.prototype,"unitScale",!1);var Lu=13.3,Du=function(t){return void 0!==t&&(Lu=t),Lu};function Fu(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 Nu=Math.PI/12,Uu=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=Du(),this._baseUrl="undefined"!=typeof window?window.location.origin:null,this._refProvider=n,this.isEditMode&&(this._rotateStep=Nu,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 g}},{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==h}},{key:"isEditMode",get:function(){return this._mode==p}},{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)||Nu}},{key:"rotateStepForced",get:function(){return this._rotateStepForced},set:function(t){this._rotateStepForced=!!t}}])&&Fu(e.prototype,n),r&&Fu(e,r),t}();se(Uu.prototype,ce.withEvent);var Yu=["left","right","center","top","middle","bottom"];function Hu(t){if(-1!=Yu.indexOf(t)){var e=this.selected.filter((function(t){return!t.stuck}));if(!(e.length<=1)){var n=this.app.commander;ca.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 Gu=["VERTICAL","HORIZONTAL"];function Wu(t){if(-1!=Gu.indexOf(t)){var e=this.selected;if(!(e.length<=1)){var n=this.app.commander;ca.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 Vu(t,e,n){this.app.commander.execute(new ba({changes:[{component:t,to_container:e,to_index:n}]}))}function Xu(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 ba({changes:n});this.app.commander.execute(a)}}function qu(t,e,n){t instanceof Array||(t=[t]),n||(n=this.model_layer);var r=[];this.selected=t.map((function(t){try{return wa(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 ba({changes:r}))}function Ku(){var t=[];if(this.selected=this.selected.filter((function(t){return!t.isRootModel()})).map((function(e){var n=xa(e);return n.move({x:20,y:20}),t.push({component:n,to_container:e.parent}),n})),0!=t.length){var e=new ba({changes:t});this.app.commander.execute(e)}}function Qu(){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 ba({changes:n})),e&&e.calculateBounds&&e.calculateBounds()}function Ju(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 Zu(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 $u(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 tc(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 ec=0;function nc(){var t=this.selected.filter((function(t){return!t.isRootModel()})).map((function(t){return t.hierarchy}));if(0!=t.length)return ec=0,JSON.stringify(t,null,2)}function rc(){ec=0;var t=nc.call(this);return Qu.call(this),t}function oc(t){if(t)try{JSON.parse(t);ec++,qu.call(this,JSON.parse(t),{x:15*ec,y:15*ec})}catch(e){pe(e,t)}}var ic=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){pc.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(),pc.impl.options.imagePlaceholder){var o=pc.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",""))}}(),ac=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!ic.isDataUrl(t)}))}function r(t,e,n,r){return Promise.resolve(e).then((function(t){return n?ic.resolveUrl(t,n):t})).then(r||ic.getAndEncode).then((function(t){return ic.dataAsUrl(t,ic.mimeType(e))})).then((function(n){return t.replace(function(t){return new RegExp("(url\\(['\"]?)("+ic.escape(t)+")(['\"]?\\))","g")}(e),"$1"+n+"$3")}))}}(),uc=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(ic.asArray(document.styleSheets)).then((function(t){var e=[];return t.forEach((function(t){try{ic.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 ac.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return ac.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}(),cc=function(){return{inlineAll:function e(n){return n instanceof Element?function(t){var e=t.style.getPropertyValue("background");return e?ac.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(ic.asArray(n.childNodes).map((function(t){return e(t)})))})):Promise.resolve(n)},impl:{newImage:t}};function t(t){return{inline:function(e){return ic.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||ic.getAndEncode).then((function(e){return ic.dataAsUrl(e,ic.mimeType(t.src))})).then((function(e){return new Promise((function(n,r){t.onload=n,t.onerror=r,t.src=e}))}))}}}}(),sc={imagePlaceholder:void 0,cacheBust:!1};function fc(t,e){return function(t){void 0===t.imagePlaceholder?pc.impl.options.imagePlaceholder=sc.imagePlaceholder:pc.impl.options.imagePlaceholder=t.imagePlaceholder;void 0===t.cacheBust?pc.impl.options.cacheBust=sc.cacheBust:pc.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 ic.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){ic.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=ic.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 ic.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,ic.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(hc).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(ic.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||ic.width(t),e.height||ic.height(t))}))}function lc(t,e){return fc(t,e).then(ic.makeImage).then(ic.delay(100)).then((function(n){var r=function(t){var n=document.createElement("canvas");e.width,e.height;if(n.width=e.width||ic.width(t),n.height=e.height||ic.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 hc(t){return cc.inlineAll(t).then((function(){return t}))}var pc={toSvg:fc,toPng:function(t,e){return lc(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return lc(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return lc(t,e||{}).then(ic.canvasToBlob)},toPixelData:function(t,e){return lc(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,ic.width(t),ic.height(t)).data}))},impl:{fontFaces:uc,images:cc,util:ic,inliner:ac,options:{}}},yc=pc;function dc(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/g,y:h/g});var p=Rn.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);yc.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 vc(){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=Rn.union(n),i=t[0].transcoordP2S(o.left,o.top),a=wa({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 ba({changes:u})),this.selected=[a]}}function gc(){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 ba({changes:e})),this.selected=t}}function mc(){var t=this.selected;if(0!=t.length){var e=t.map((function(t){return t.bounds})),n=Rn.union(e),r=n.left+n.width/2;t.map((function(t){t.symmetryX(r)}))}}function bc(){var t=this.selected;if(0!=t.length){var e=t.map((function(t){return t.bounds})),n=Rn.union(e),r=n.top+n.height/2;t.map((function(t){t.symmetryY(r)}))}}function wc(){ca.around(this.app.commander,mc,this)}function xc(){ca.around(this.app.commander,bc,this)}function _c(t,e,n){var r=this.findAll(t,n);return r.forEach((function(t){t.set(e)})),r}function kc(t){ca.around(this.app.commander,t)}function Sc(){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 Ac(){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 Oc(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})})),qu.call(this,n,{x:-100,y:0}),this.selected=Object.values(e),Qu.call(this)}function Ec(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 Pc=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}}])&&Ec(e.prototype,n),r&&Ec(e,r),t}();function jc(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=Ot()((function(t){t.brake||t.take()}),1e3,{leading:!0,trailing:!1});function Rc(t){!t.brake&&t.dirty&&Mc(t)}var Tc=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,Rc(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,Rc(this)}}])&&jc(e.prototype,n),r&&jc(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)}}function Cc(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 Bc=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 Pc(20);var n=this;this.snapshot_taker=new Tc({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&&(Cc(this.timecapsule.backward(),this.container),this.trigger("undo",this.undoable(),this.redoable()))}},{key:"redo",value:function(){this.timecapsule.forwardable&&(Cc(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")}}])&&Ic(e.prototype,n),r&&Ic(e,r),t}();function zc(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)}}se(Bc.prototype,ce.withEvent);var Lc=new WeakSet,Dc=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 Bc(this._container),this.app.commander=this._commander,Lc.add(this)}var e,n,r;return e=t,r=[{key:"residents",get:function(){return Lc}}],(n=[{key:"add",value:function(){return qu.apply(this._container,arguments)}},{key:"duplicate",value:function(){return Ku.apply(this._container,arguments)}},{key:"remove",value:function(){return Qu.apply(this._container,arguments)}},{key:"animate",value:function(){return hn.apply(this,arguments)}},{key:"fullscreen",value:function(){return tc.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 rc.apply(this._container,arguments)}},{key:"copy",value:function(){return nc.apply(this._container,arguments)}},{key:"paste",value:function(){return oc.apply(this._container,arguments)}},{key:"undoableChange",value:function(){return kc.apply(this._container,arguments)}},{key:"change",value:function(){return _c.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 Hu.apply(this._container,arguments)}},{key:"distribute",value:function(){return Wu.apply(this._container,arguments)}},{key:"move",value:function(){return Vu.apply(this._container,arguments)}},{key:"zorder",value:function(){return Xu.apply(this._container,arguments)}},{key:"symmetryX",value:function(){return wc.apply(this._container,arguments)}},{key:"symmetryY",value:function(){return xc.apply(this._container,arguments)}},{key:"on",value:function(){return Ju.apply(this._container,arguments)}},{key:"once",value:function(){return Zu.apply(this._container,arguments)}},{key:"off",value:function(){return $u.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 dc.apply(this._container,arguments)}},{key:"group",value:function(){return vc.apply(this._container,arguments)}},{key:"ungroup",value:function(){return gc.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 Sc.apply(this._container)}},{key:"data",get:function(){return this._container.data},set:function(t){this._container.data=t}},{key:"variables",get:function(){return Ac.apply(this._container)},set:function(t){Oc.apply(this._container,[t])}},{key:"baseUrl",get:function(){return this.app.baseUrl},set:function(t){this.app.baseUrl=t}}])&&zc(e.prototype,n),r&&zc(e,r),t}();function Fc(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?h:c,f=t.refProvider,l=t.baseUrl,p=t.fitMode,y=null;if("string"==typeof e){if(!(y=document.getElementById(e)))throw"target element '".concat(e,"' is not exist");if(y.firstChild)throw"target element '".concat(e,"' is not empty")}else y=e;y&&y.style&&(y.style.position="absolute",y.style.cursor="default",y.style.overflow="hidden");var d=new Uu(s,f);return d.baseUrl=l,new Dc(new zu({target_element:y,model:n,style:r,layers:i,handlers:u,fitMode:p},d))}var Nc=Math.sqrt(3);function Uc(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 Yc(t,e,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,o=0;o<n.length-1;o++)if(Uc(t,e,n[o],n[o+1],r))return!0;return!1}function Hc(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 Gc(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&&Wc(t,e[0],e[1],o,h,Vc(v,o)),"none"!=y)){var b=e.length;Wc(t,e[b-1],e[b-2],o,y,Vc(m,o))}}function Wc(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(Nc*i.X,-i.Y),t.lineTo(Nc*i.X,i.Y),t.fill();break;case"sharp-arrow":t.moveTo(0,0),t.lineTo(Nc*i.X,-i.Y),t.lineTo(-i.X/1.5+Nc*i.X,0),t.lineTo(Nc*i.X,i.Y),t.fill();break;case"open-arrow":t.moveTo(Nc*i.X+r,-i.Y),t.lineTo(r,0),t.lineTo(Nc*i.X+r,i.Y),t.stroke()}t.rotate(-c),t.translate(-a,-u),t.closePath()}function Vc(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 Xc(t){return(Xc="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 qc(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 Kc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?qc(Object(n),!0).forEach((function(e){Qc(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qc(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Qc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Jc(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 Zc(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 Zc(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 Zc(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 $c(){return($c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=ts(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 ts(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=os(t)););return t}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"===Xc(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)}function is(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function as(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 us(t,e,n){return e&&as(t.prototype,e),n&&as(t,n),t}var cs=function(){function t(e){var n=e.component,r=e.anchor,o=e.position;is(this,t),this.component=n,this.anchor=r,this._position=o}return us(t,[{key:"position",get:function(){var t,e=this,n=((null===(t=this.component)||void 0===t?void 0:t.anchors)||[]).find((function(t){return t.name===e.anchor}));if(n){var r=n.position;return this.component.transcoordS2T(r.x,r.y)}return this._position},set:function(t){var e=t.x,n=t.y;this._position(e,n)}}]),t}(),ss=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=ns(n);function n(){return is(this,n),e.apply(this,arguments)}return us(n,[{key:"isLine",value:function(){return!0}},{key:"fromAnchor",get:function(){if(this.parent&&!this._fromAnchor){var t=this.get("from")||{},e=t.component,n=t.anchor,r=t.position;this._fromAnchor=new cs({component:e&&this.root.findById(e),anchor:n,position:r})}return this._fromAnchor}},{key:"from",get:function(){return this.get("from")},set:function(t){delete this._fromAnchor,this.set("from",t)}},{key:"toAnchor",get:function(){if(this.parent&&!this._toAnchor){var t=this.get("to")||{},e=t.component,n=t.anchor,r=t.position;this._toAnchor=new cs({component:e&&this.root.findById(e),anchor:n,position:r})}return this._toAnchor}},{key:"to",get:function(){return this.get("to")},set:function(t){delete this._toAnchor,this.set("to",t)}},{key:"move",value:function(t){var e,r,o=t.x,i=t.y;this.from={position:(null===(e=this.get("from"))||void 0===e?void 0:e.position)||{x:0,y:0}},this.to={position:(null===(r=this.get("to"))||void 0===r?void 0:r.position)||{x:0,y:0}},$c(os(n.prototype),"move",this).call(this,{x:o,y:i})}},{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;Gc(t,u,this.model),t.beginPath();var c=Hc(r,a,u[0],u[1]),s=Hc(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 Yc(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,e,n=this.state,r=n.from,o=n.to,i=this.model,a=i.x1,u=i.y1,c=i.x2,s=i.y2;return[(null===(t=this.fromAnchor)||void 0===t?void 0:t.position)||(null==r?void 0:r.position)||{x:a,y:u},(null===(e=this.toAnchor)||void 0===e?void 0:e.position)||(null==o?void 0:o.position)||{x:c,y:s}]},set:function(t){var e=Jc(t,2),n=e[0],r=e[1],o=this.state,i=o.from,a=o.to;delete this._fromAnchor,delete this._toAnchor,this.set({from:Kc(Kc({},i),{},{position:n}),to:Kc(Kc({},a),{},{position:r})})}}]),n}(Rn);function fs(t){return(fs="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 ls(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hs(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 ps(t,e){return(ps=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ys(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=vs(t);if(e){var o=vs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ds(this,n)}}function ds(t,e){if(e&&("object"===fs(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 vs(t){return(vs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}ss.getTipNeckPos=Hc,ss.containedInPath=Yc,ss.drawEndTips=Gc,Rn.register("line",ss);var gs={mutable:!1,resizable:!0,rotatable:!0,properties:[],"value-property":"text"},ms=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&&ps(t,e)}(i,t);var e,n,r,o=ys(i);function i(){return ls(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)}},{key:"anchors",get:function(){return t=this.bounds,e=t.left,n=t.top,r=t.width,o=t.height,[{type:"inout",name:"TOP",position:{x:i=e+r/2,y:n}},{type:"inout",name:"RIGHT",position:{x:e+r,y:a=n+o/2}},{type:"inout",name:"BOTTOM",position:{x:i,y:n+o}},{type:"inout",name:"LEFT",position:{x:e,y:a}}];var t,e,n,r,o,i,a}},{key:"nature",get:function(){return gs}}])&&hs(e.prototype,n),r&&hs(e,r),i}(Xn);function bs(t){return(bs="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){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 _s(t,e){return(_s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ks(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=As(t);if(e){var o=As(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ss(this,n)}}function Ss(t,e){if(e&&("object"===bs(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 As(t){return(As=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.memoize(ms.prototype,"path",!1),Rn.register("ellipse",ms);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){}},Es=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&&_s(t,e)}(i,t);var e,n,r,o=ks(i);function i(){return ws(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}}))}}])&&xs(e.prototype,n),r&&xs(e,r),i}(Xn);function Ps(t){return(Ps="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 js(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 Ms(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?js(Object(n),!0).forEach((function(e){Rs(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):js(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Rs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ts(t){return function(t){if(Array.isArray(t))return Is(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 Is(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 Is(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 Is(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 Cs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bs(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 zs(t,e){return(zs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ls(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=Fs(t);if(e){var o=Fs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ds(this,n)}}function Ds(t,e){if(e&&("object"===Ps(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 Fs(t){return(Fs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.memoize(Es.prototype,"controls",!1),Rn.register("polygon",Es);var Ns={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){}},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&&zs(t,e)}(i,t);var e,n,r,o=Ls(i);function i(){return Cs(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"pathExtendable",get:function(){return!0}},{key:"path",get:function(){var t,e,n=this.state,r=n.from,o=n.to,i=this.state.path;return[(null===(t=this.fromAnchor)||void 0===t?void 0:t.position)||(null==r?void 0:r.position)||i[0]].concat(Ts(i.slice(1,-1)),[(null===(e=this.toAnchor)||void 0===e?void 0:e.position)||(null==o?void 0:o.position)||i[i.length-1]])},set:function(t){var e=this.state,n=e.from,r=e.to;delete this._fromAnchor,delete this._toAnchor,this.set({from:Ms(Ms({},n),{},{position:t[0]}),to:Ms(Ms({},r),{},{position:t[t.length-1]}),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:Ns}),e.push({x:(r.x+o.x)/2,y:(r.y+o.y)/2,handler:Ns}),n==t.length-2&&e.push({x:o.x,y:o.y,handler:Ns})}return e}}])&&Bs(e.prototype,n),r&&Bs(e,r),i}(ss);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 Hs(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 Ws(){return(Ws="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Vs(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 Vs(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Qs(t)););return t}function Xs(t,e){return(Xs=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=Qs(t);if(e){var o=Qs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ks(this,n)}}function Ks(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 Qs(t){return(Qs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.register("polyline",Us);var Js={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"},Zs=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&&Xs(t,e)}(i,t);var e,n,r,o=qs(i);function i(){return Hs(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(){Ws(Qs(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 Js}},{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=Rn.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}(er(Xn));function $s(t){return($s="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 tf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ef(t,e){return(ef=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function nf(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 rf(this,n)}}function rf(t,e){if(e&&("object"===$s(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 of(t){return(of=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.register("image-view",Zs);var af=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)}(n,t);var e=nf(n);function n(){return tf(this,n),e.apply(this,arguments)}return n}(hi(er(Rn))),uf=n(246),cf=n.n(uf);function sf(t){return(sf="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 ff(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 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(){return(pf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=yf(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 yf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=mf(t)););return t}function df(t,e){return(df=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function vf(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 gf(this,n)}}function gf(t,e){if(e&&("object"===sf(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)}var bf={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"},wf=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&&df(t,e)}(u,t);var e,n,r,o,i,a=vf(u);function u(){return lf(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){ff(i,n,r,a,u,"next",t)}function u(t){ff(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){pf(mf(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 cf.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 bf}},{key:"tagName",get:function(){return"div"}}])&&hf(e.prototype,n),r&&hf(e,r),u}(af);function xf(t){return(xf="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 _f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kf(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=Af(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 Af(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=jf(t)););return t}function Of(t,e){return(Of=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ef(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=jf(t);if(e){var o=jf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Pf(this,n)}}function Pf(t,e){if(e&&("object"===xf(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 jf(t){return(jf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.register("gif-view",wf);var Mf={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"},Rf=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=Ef(i);function i(){return _f(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(){Sf(jf(i.prototype),"dispose",this).call(this),this.started=!1,delete this._audio}},{key:"ready",value:function(){var t=this;Sf(jf(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 Mf}},{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])}}])&&kf(e.prototype,n),r&&kf(e,r),i}(er(Xn));function Tf(t){return(Tf="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 If(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Cf(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 zf(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=Df(t);if(e){var o=Df(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Lf(this,n)}}function Lf(t,e){if(e&&("object"===Tf(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 Df(t){return(Df=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.register("audio",Rf);var 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&&Bf(t,e)}(i,t);var e,n,r,o=zf(i);function i(){return If(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"is3dish",value:function(){return!0}}])&&Cf(e.prototype,n),r&&Cf(e,r),i}(er(Rn));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 Uf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yf(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 Hf(){return(Hf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Gf(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 Gf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=qf(t)););return t}function Wf(t,e){return(Wf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Vf(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 Xf(this,n)}}function Xf(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 qf(t){return(qf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.register("text",Ff);var Kf={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"},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&&Wf(t,e)}(i,t);var e,n,r,o=Vf(i);function i(){return Uf(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,Hf(qf(i.prototype),"draw",this).call(this,t),this._drawing=!1)}},{key:"prerender",value:function(t){if(Hf(qf(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);Hf(qf(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 Kf}},{key:"hasTextProperty",get:function(){return!1}}])&&Yf(e.prototype,n),r&&Yf(e,r),i}(er(Xn));function Jf(t){return(Jf="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 Zf(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 tl(t,e){return(tl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function el(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=rl(t);if(e){var o=rl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return nl(this,n)}}function nl(t,e){if(e&&("object"===Jf(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 rl(t){return(rl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.memoize(Qf.prototype,"ref",!1),Rn.memoize(Qf.prototype,"refScale",!1),Rn.register("local-ref",Qf);var ol=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&&tl(t,e)}(i,t);var e,n,r,o=el(i);function i(){return Zf(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(t){}},{key:"layout",get:function(){return Bn.get(this.get("layout"))||Ln}}])&&$f(e.prototype,n),r&&$f(e,r),i}(hi(Xr));function il(t){return(il="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 al(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 ul(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cl(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 sl(){return(sl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=fl(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 fl(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=yl(t)););return t}function ll(t,e){return(ll=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=yl(t);if(e){var o=yl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return pl(this,n)}}function pl(t,e){if(e&&("object"===il(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)}var dl={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"},vl=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&&ll(t,e)}(u,t);var e,n,r,o,i,a=hl(u);function u(){return ul(this,u),a.apply(this,arguments)}return e=u,(n=[{key:"dispose",value:function(){this._releaseRef(),sl(yl(u.prototype),"dispose",this).call(this)}},{key:"nature",get:function(){return dl}},{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(){sl(yl(u.prototype),"ready",this).call(this),this.fetchRef()}},{key:"reposition",value:function(){if(this.element){sl(yl(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){al(i,n,r,a,u,"next",t)}function u(t){al(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;sl(yl(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}))}}])&&cl(e.prototype,n),r&&cl(e,r),u}(ol);function gl(t){return(gl="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 ml(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bl(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 wl(){return(wl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=xl(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 xl(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Al(t)););return t}function _l(t,e){return(_l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function kl(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 Sl(this,n)}}function Sl(t,e){if(e&&("object"===gl(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)}Rn.register("global-ref",vl);var Ol={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"},El=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&&_l(t,e)}(i,t);var e,n,r,o=kl(i);function i(){return ml(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(){wl(Al(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?j(this,this.board,{location:this.getState("location"),modal:this.getState("modal"),closable:this.getState("closable")||!1,data:this.value}):P(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 Ol}}])&&bl(e.prototype,n),r&&bl(e,r),i}(er(Xn));function Pl(t){return(Pl="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 jl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ml(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 Rl(t,e){return(Rl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Tl(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=Cl(t);if(e){var o=Cl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Il(this,n)}}function Il(t,e){if(e&&("object"===Pl(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 Cl(t){return(Cl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.register("popup",El);var Bl=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&&Rl(t,e)}(i,t);var e,n,r,o=Tl(i);function i(){return jl(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}}])&&Ml(e.prototype,n),r&&Ml(e,r),i}(Rn);function zl(t){return(zl="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"===zl(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)}Rn.register("path",Bl);var Hl=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:"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})}}])&&Dl(e.prototype,n),r&&Dl(e,r),i}(Xn);function Gl(t){return(Gl="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 Wl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vl(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 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=Ql(t);if(e){var o=Ql(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"===Gl(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 Ql(t){return(Ql=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.memoize(Hl.prototype,"path",!1),Rn.register("triangle",Hl);var Jl={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"number",label:"ratio",name:"ratio",property:"ratio"}],help:"scene/component/donut"},Zl={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})}},$l=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=ql(i);function i(){return Wl(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:Zl}]}},{key:"nature",get:function(){return Jl}}])&&Vl(e.prototype,n),r&&Vl(e,r),i}(ms);function th(t){return(th="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 eh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nh(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 rh(t,e){return(rh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function oh(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=ah(t);if(e){var o=ah(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ih(this,n)}}function ih(t,e){if(e&&("object"===th(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 ah(t){return(ah=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.memoize($l.prototype,"controls",!1),Rn.register("donut",$l);var uh={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"},ch={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})}},sh=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&&rh(t,e)}(i,t);var e,n,r,o=oh(i);function i(){return eh(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:ch}]}},{key:"nature",get:function(){return uh}}])&&nh(e.prototype,n),r&&nh(e,r),i}(ms);function fh(t){return(fh="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 lh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hh(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 ph(t,e){return(ph=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=vh(t);if(e){var o=vh(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return dh(this,n)}}function dh(t,e){if(e&&("object"===fh(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 vh(t){return(vh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.memoize(sh.prototype,"controls",!1),Rn.register("star",sh);var gh={mutable:!1,resizable:!0,rotatable:!1,properties:[]},mh=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&&ph(t,e)}(i,t);var e,n,r,o=yh(i);function i(){return lh(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 gh}}])&&hh(e.prototype,n),r&&hh(e,r),i}(er(Xn));function bh(t){return(bh="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 wh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xh(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 _h(){return(_h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=kh(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 kh(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Eh(t)););return t}function Sh(t,e){return(Sh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ah(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 Oh(this,n)}}function Oh(t,e){if(e&&("object"===bh(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 Eh(t){return(Eh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.register("variable",mh);var Ph=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&&Sh(t,e)}(i,t);var e,n,r,o=Ah(i);function i(){return wh(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(){_h(Eh(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=Oe(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(Bt(t)))}}])&&xh(e.prototype,n),r&&xh(e,r),i}(t)};function jh(t){return(jh="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 Mh(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 Th(t,e){return(Th=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ih(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=Bh(t);if(e){var o=Bh(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"===jh(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 Bh(t){return(Bh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var zh=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&&Th(t,e)}(i,t);var e,n,r,o=Ih(i);function i(){return Mh(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}}])&&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 Dh(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 Fh(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Dh(Object(n),!0).forEach((function(e){Nh(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Dh(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Nh(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Uh(t,e){return(Uh=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 Hh(this,n)}}function Hh(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)}function Wh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vh(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 Xh(t,e,n){return e&&Vh(t.prototype,e),n&&Vh(t,n),t}var qh=function(){function t(e){var n=e.component,r=e.anchor,o=e.position;Wh(this,t),this.component=n,this.anchor=r,this._position=o}return Xh(t,[{key:"position",get:function(){var t,e=this,n=((null===(t=this.component)||void 0===t?void 0:t.anchors)||[]).find((function(t){return t.name===e.anchor}));if(n){var r=n.position;return this.component.transcoordS2T(r.x,r.y)}return this._position},set:function(t){var e=t.x,n=t.y;this._position={x:e,y:n}}}]),t}(),Kh=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&&Uh(t,e)}(n,t);var e=Yh(n);function n(t,r){return Wh(this,n),e.call(this,t,r)}return Xh(n,[{key:"isLine",value:function(){return!0}},{key:"fromAnchor",get:function(){if(this.parent&&!this._fromAnchor){var t=this.get("from")||{},e=t.component,n=t.anchor,r=t.position;this._fromAnchor=new qh({component:e&&this.root.findById(e),anchor:n,position:r})}return this._fromAnchor}},{key:"from",get:function(){return this.get("from")},set:function(t){delete this._fromAnchor,this.set("from",t)}},{key:"toAnchor",get:function(){if(this.parent&&!this._toAnchor){var t=this.get("to")||{},e=t.component,n=t.anchor,r=t.position;this._toAnchor=new qh({component:e&&this.root.findById(e),anchor:n,position:r})}return this._toAnchor}},{key:"to",get:function(){return this.get("to")},set:function(t){delete this._toAnchor,this.set("to",t)}},{key:"drawPath",get:function(){return this.path}},{key:"render",value:function(t){var e=this.model,n=(e.fillStyle,e.lineWidth),r=void 0===n?5:n,o=e.strokeStyle,i=void 0===o?"#000000":o;t.beginPath();var a=this.fromAnchor.position,u=this.toAnchor.position;t.moveTo(a.x,a.y),t.lineTo(u.x,u.y),t.lineWidth=r,t.strokeStyle=i,t.stroke()}},{key:"contains",value:function(t,e){var n=this.model.lineWidth,r=void 0===n?5:n;return Yc(t,e,this.drawPath,r)}},{key:"resizable",get:function(){return!1}},{key:"mutable",get:function(){return!0}},{key:"rotatable",get:function(){return!1}},{key:"path",get:function(){var t;return this.fromAnchor?[null===(t=this.fromAnchor)||void 0===t?void 0:t.position,this.toAnchor.position]:[{x:0,y:0}]},set:function(t){var e=Fh(Fh({},this.from),{},{position:t[0]}),n=Fh(Fh({},this.to),{},{position:t[1]});this.set({from:e,to:n})}}]),n}(Rn);function Qh(t){return(Qh="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 Jh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Zh(t,e){return(Zh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $h(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=ep(t);if(e){var o=ep(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tp(this,n)}}function tp(t,e){if(e&&("object"===Qh(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 ep(t){return(ep=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var np=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&&Zh(t,e)}(n,t);var e=$h(n);function n(){return Jh(this,n),e.apply(this,arguments)}return n}(Kh);function rp(t){return(rp="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 op(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ip(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 ap(t,e){return(ap=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function up(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=sp(t);if(e){var o=sp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return cp(this,n)}}function cp(t,e){if(e&&("object"===rp(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 sp(t){return(sp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.register("straight",np);var fp=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&&ap(t,e)}(i,t);var e,n,r,o=up(i);function i(){return op(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(t){var e=this.model,n=(e.fillStyle,e.lineWidth),r=void 0===n?5:n,o=e.strokeStyle,i=void 0===o?"#000000":o,a=(e.rotation,e.anchor),u=e.lineDash,c=void 0===u?[0,0]:u,s=e.lineCap,f=e.lineJoin,l=e.subType;this.center,t.beginPath();var h=this.fromAnchor.center,p=this.toAnchor.center;switch(a||((a={}).x=Math.min(h.x,p.x)+Math.abs((h.x-p.x)/2),a.y=Math.min(h.y,p.y)+Math.abs((h.y-p.y)/2)),l){case"v":case"vertical":default:var y={},d={};y.x=h.x,y.y=a.y,d.x=p.x,d.y=a.y;var v=[h,y,d,p];t.moveTo(v[0].x,v[0].y);for(var g=0;g<v.length&&g!==v.length-1;g++)t.lineTo(v[g+1].x,v[g+1].y);break;case"h":case"horizontal":var m={},b={};m.x=a.x,m.y=h.y,b.x=a.x,b.y=p.y,v=[h,m,b,p],t.moveTo(v[0].x,v[0].y);for(var w=0;w<v.length&&w!==v.length-1;w++)t.lineTo(v[w+1].x,v[w+1].y)}t.setLineDash(c),t.lineCap=s,t.lineJoin=f,t.lineWidth=r,t.strokeStyle=i,t.stroke()}}])&&ip(e.prototype,n),r&&ip(e,r),i}(Kh);function lp(t){return(lp="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 hp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pp(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 yp(t,e){return(yp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function dp(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=gp(t);if(e){var o=gp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vp(this,n)}}function vp(t,e){if(e&&("object"===lp(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 gp(t){return(gp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.register("right_angle_straight",fp);var mp=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&&yp(t,e)}(i,t);var e,n,r,o=dp(i);function i(){return hp(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(t){var e=this.model,n=e.cX,r=e.cY,o=e.lineCap,i=e.lineWidth,a=void 0===i?5:i,u=e.strokeStyle,c=void 0===u?"#000000":u,s=this.fromAnchor.center,f=this.toAnchor.center;t.beginPath(),t.moveTo(s.x,s.y),t.quadraticCurveTo(n,r,f.x,f.y),t.lineCap=o,t.lineWidth=a,t.strokeStyle=c,t.stroke()}}])&&pp(e.prototype,n),r&&pp(e,r),i}(Kh);function bp(t){return(bp="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 wp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xp(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 _p(t,e){return(_p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function kp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ap(t);if(e){var o=Ap(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Sp(this,n)}}function Sp(t,e){if(e&&("object"===bp(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 Ap(t){return(Ap=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Rn.register("curve",mp);var Op=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&&_p(t,e)}(i,t);var e,n,r,o=kp(i);function i(){return wp(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(t){var e=this.model,n=e.fillStyle,r=void 0===n?"black":n,o=e.lineWidth,i=void 0===o?5:o,a=e.strokeStyle,u=void 0===a?"#000000":a,c=e.lineCap,s=void 0===c?"round":c,f=e.arrowWidth,l=void 0===f?20:f,h=e.rotation,p=this.center;t.translate(p.x,p.y),t.rotate(h),t.translate(-p.x,-p.y),t.beginPath();var y=this.fromAnchor.center,d=this.toAnchor.center;t.moveTo(y.x,y.y),t.lineTo(d.x,d.y),t.lineCap=s,t.lineWidth=i,t.strokeStyle=u,t.stroke(),t.save(),t.translate(d.x,d.y);var v=(y.x-d.x)/(y.y-d.y);v=Math.atan(v),d.y-y.y>=0?t.rotate(-v):t.rotate(Math.PI-v),t.lineTo(-l,2*-l),t.lineTo(l,2*-l),t.lineTo(0,0),t.fillStyle=r,t.fill(),t.restore(),t.closePath()}}])&&xp(e.prototype,n),r&&xp(e,r),i}(Kh);function Ep(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 Pp(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)}}Rn.register("arrow_straight",Op);var jp=new WeakSet,Mp=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,jp.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=se(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){Ep(i,r,o,a,u,"next",t)}function u(t){Ep(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 jp}}],n&&Pp(e.prototype,n),r&&Pp(e,r),t}();function Rp(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 Tp={},Ip={},Cp=[];function Bp(t){var e="SCRIPT"==t.target.tagName?Tp:Ip,n=t.target.src||t.target.href;e[n]=!0,Cp.forEach((function(t,r){var o=t.resolve,i=t.scripts,a=t.styles;if(e==Tp){var u=i.indexOf(n);u>-1&&u<i.length-1&&Lp(i[u+1])}for(var c=0;c<i.length;c++)if(!Tp[i[c]])return;if(a)for(var s=0;s<a.length;s++)if(!Ip[a[s]])return;o(),Cp[r]=null})),Cp=Cp.filter((function(t){return t}))}function zp(t){var e=t.target.src,n="SCRIPT"==t.target.tagName?Tp:Ip;Cp.forEach((function(r,o){var i=r.reject,a=r.scripts,u=r.styles,c=!1;if(n===Tp){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),Cp[o]=null)})),Cp=Cp.filter((function(t){return t})),delete n[e],document.head.removeChild(t.target)}function Lp(t){Tp[t]=!1;var e=document.createElement("script");e.onload=Bp,e.onerror=zp,e.type="text/javascript",e.src=t,document.head.appendChild(e)}var Dp=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){Ip.hasOwnProperty(t)||function(t){Ip[t]=!1;var e=document.createElement("link");e.onload=Bp,e.onerror=zp,e.type="text/css",e.rel="stylesheet",e.media="screen,print",e.href=t,document.head.appendChild(e)}(t),Ip[t]||(i=!1)})),t&&t.length>0&&t.forEach((function(t){Tp.hasOwnProperty(t)?Tp[t]||(i=!1):o=o||t})),o)Lp(o);else if(i)return void n();Cp.push({resolve:n,reject:r,scripts:t,styles:e})}else r("invalid sources for load")}))}}],(n=null)&&Rp(e.prototype,n),r&&Rp(e,r),t}(),Fp="0.0.0",Np=0,Up=performance.now(),Yp=0;function Hp(){return Np}requestAnimationFrame((function t(){requestAnimationFrame(t),Yp++;var e=performance.now(),n=e-Up;n<1e3||(Np=Math.round(1e3*Yp/n),Up=e,Yp=0)}));var Gp=u;function Wp(){}}])}));
|
|
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()}(self,(()=>(()=>{var t={88965:(t,e,r)=>{var n=r(54516),o=r(34230),i=r(2854),a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a function")}},52750:(t,e,r)=>{var n=r(54516),o=r(53924),i=r(2854),a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a constructor")}},19814:(t,e,r)=>{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},n(t)}var o=r(54516),i=r(34230),a=o.String,c=o.TypeError;t.exports=function(t){if("object"==n(t)||i(t))return t;throw c("Can't set "+a(t)+" as a prototype")}},86278:(t,e,r)=>{var n=r(41398),o=r(64714),i=r(26337),a=n("unscopables"),c=Array.prototype;null==c[a]&&i.f(c,a,{configurable:!0,value:o(null)}),t.exports=function(t){c[a][t]=!0}},68279:(t,e,r)=>{"use strict";var n=r(32088).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},89214:(t,e,r)=>{var n=r(54516),o=r(34973),i=n.TypeError;t.exports=function(t,e){if(o(e,t))return t;throw i("Incorrect invocation")}},96302:(t,e,r)=>{var n=r(54516),o=r(3196),i=n.String,a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not an object")}},34991:t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},47698:(t,e,r)=>{var n=r(13894);t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},19548:(t,e,r)=>{"use strict";var n,o,i,a=r(34991),c=r(44244),u=r(54516),s=r(34230),f=r(3196),l=r(37058),h=r(98619),p=r(2854),y=r(81831),d=r(68875),v=r(26337).f,g=r(34973),b=r(40175),m=r(14776),w=r(41398),x=r(67025),_=u.Int8Array,k=_&&_.prototype,O=u.Uint8ClampedArray,S=O&&O.prototype,A=_&&b(_),E=k&&b(k),P=Object.prototype,j=u.TypeError,R=w("toStringTag"),M=x("TYPED_ARRAY_TAG"),T=x("TYPED_ARRAY_CONSTRUCTOR"),I=a&&!!m&&"Opera"!==h(u.opera),C=!1,B={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},D={BigInt64Array:8,BigUint64Array:8},z=function(t){if(!f(t))return!1;var e=h(t);return l(B,e)||l(D,e)};for(n in B)(i=(o=u[n])&&o.prototype)?y(i,T,o):I=!1;for(n in D)(i=(o=u[n])&&o.prototype)&&y(i,T,o);if((!I||!s(A)||A===Function.prototype)&&(A=function(){throw j("Incorrect invocation")},I))for(n in B)u[n]&&m(u[n],A);if((!I||!E||E===P)&&(E=A.prototype,I))for(n in B)u[n]&&m(u[n].prototype,E);if(I&&b(S)!==E&&m(S,E),c&&!l(E,R))for(n in C=!0,v(E,R,{get:function(){return f(this)?this[M]:void 0}}),B)u[n]&&y(u[n],M,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:I,TYPED_ARRAY_CONSTRUCTOR:T,TYPED_ARRAY_TAG:C&&M,aTypedArray:function(t){if(z(t))return t;throw j("Target is not a typed array")},aTypedArrayConstructor:function(t){if(s(t)&&(!m||g(A,t)))return t;throw j(p(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,r,n){if(c){if(r)for(var o in B){var i=u[o];if(i&&l(i.prototype,t))try{delete i.prototype[t]}catch(r){try{i.prototype[t]=e}catch(t){}}}E[t]&&!r||d(E,t,r?e:I&&k[t]||e,n)}},exportTypedArrayStaticMethod:function(t,e,r){var n,o;if(c){if(m){if(r)for(n in B)if((o=u[n])&&l(o,t))try{delete o[t]}catch(t){}if(A[t]&&!r)return;try{return d(A,t,r?e:I&&A[t]||e)}catch(t){}}for(n in B)!(o=u[n])||o[t]&&!r||d(o,t,e)}},isView:function(t){if(!f(t))return!1;var e=h(t);return"DataView"===e||l(B,e)||l(D,e)},isTypedArray:z,TypedArray:A,TypedArrayPrototype:E}},25254:(t,e,r)=>{"use strict";var n=r(54516),o=r(76277),i=r(44244),a=r(34991),c=r(33385),u=r(81831),s=r(83572),f=r(13894),l=r(89214),h=r(35206),p=r(6674),y=r(88821),d=r(53652),v=r(40175),g=r(14776),b=r(51019).f,m=r(26337).f,w=r(47774),x=r(68020),_=r(81018),k=r(43023),O=c.PROPER,S=c.CONFIGURABLE,A=k.get,E=k.set,P="ArrayBuffer",j="Wrong index",R=n.ArrayBuffer,M=R,T=M&&M.prototype,I=n.DataView,C=I&&I.prototype,B=Object.prototype,D=n.Array,z=n.RangeError,L=o(w),N=o([].reverse),F=d.pack,U=d.unpack,H=function(t){return[255&t]},G=function(t){return[255&t,t>>8&255]},Y=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},W=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},V=function(t){return F(t,23,4)},X=function(t){return F(t,52,8)},q=function(t,e){m(t.prototype,e,{get:function(){return A(this)[e]}})},K=function(t,e,r,n){var o=y(r),i=A(t);if(o+e>i.byteLength)throw z(j);var a=A(i.buffer).bytes,c=o+i.byteOffset,u=x(a,c,c+e);return n?u:N(u)},Q=function(t,e,r,n,o,i){var a=y(r),c=A(t);if(a+e>c.byteLength)throw z(j);for(var u=A(c.buffer).bytes,s=a+c.byteOffset,f=n(+o),l=0;l<e;l++)u[s+l]=f[i?l:e-l-1]};if(a){var J=O&&R.name!==P;if(f((function(){R(1)}))&&f((function(){new R(-1)}))&&!f((function(){return new R,new R(1.5),new R(NaN),J&&!S})))J&&S&&u(R,"name",P);else{(M=function(t){return l(this,T),new R(y(t))}).prototype=T;for(var Z,$=b(R),tt=0;$.length>tt;)(Z=$[tt++])in M||u(M,Z,R[Z]);T.constructor=M}g&&v(C)!==B&&g(C,B);var et=new I(new M(2)),rt=o(C.setInt8);et.setInt8(0,2147483648),et.setInt8(1,2147483649),!et.getInt8(0)&&et.getInt8(1)||s(C,{setInt8:function(t,e){rt(this,t,e<<24>>24)},setUint8:function(t,e){rt(this,t,e<<24>>24)}},{unsafe:!0})}else T=(M=function(t){l(this,T);var e=y(t);E(this,{bytes:L(D(e),0),byteLength:e}),i||(this.byteLength=e)}).prototype,C=(I=function(t,e,r){l(this,C),l(t,T);var n=A(t).byteLength,o=h(e);if(o<0||o>n)throw z("Wrong offset");if(o+(r=void 0===r?n-o:p(r))>n)throw z("Wrong length");E(this,{buffer:t,byteLength:r,byteOffset:o}),i||(this.buffer=t,this.byteLength=r,this.byteOffset=o)}).prototype,i&&(q(M,"byteLength"),q(I,"buffer"),q(I,"byteLength"),q(I,"byteOffset")),s(C,{getInt8:function(t){return K(this,1,t)[0]<<24>>24},getUint8:function(t){return K(this,1,t)[0]},getInt16:function(t){var e=K(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=K(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return W(K(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return W(K(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return U(K(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return U(K(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){Q(this,1,t,H,e)},setUint8:function(t,e){Q(this,1,t,H,e)},setInt16:function(t,e){Q(this,2,t,G,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){Q(this,2,t,G,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,V,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){Q(this,8,t,X,e,arguments.length>2?arguments[2]:void 0)}});_(M,P),_(I,"DataView"),t.exports={ArrayBuffer:M,DataView:I}},92316:(t,e,r)=>{"use strict";var n=r(87706),o=r(59625),i=r(43716),a=Math.min;t.exports=[].copyWithin||function(t,e){var r=n(this),c=i(r),u=o(t,c),s=o(e,c),f=arguments.length>2?arguments[2]:void 0,l=a((void 0===f?c:o(f,c))-s,c-u),h=1;for(s<u&&u<s+l&&(h=-1,s+=l-1,u+=l-1);l-- >0;)s in r?r[u]=r[s]:delete r[u],u+=h,s+=h;return r}},47774:(t,e,r)=>{"use strict";var n=r(87706),o=r(59625),i=r(43716);t.exports=function(t){for(var e=n(this),r=i(e),a=arguments.length,c=o(a>1?arguments[1]:void 0,r),u=a>2?arguments[2]:void 0,s=void 0===u?r:o(u,r);s>c;)e[c++]=t;return e}},39682:(t,e,r)=>{"use strict";var n=r(87265).forEach,o=r(39904)("forEach");t.exports=o?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},35040:(t,e,r)=>{var n=r(43716);t.exports=function(t,e){for(var r=0,o=n(e),i=new t(o);o>r;)i[r]=e[r++];return i}},11956:(t,e,r)=>{"use strict";var n=r(54516),o=r(29910),i=r(83264),a=r(87706),c=r(59306),u=r(201),s=r(53924),f=r(43716),l=r(80955),h=r(29946),p=r(1228),y=n.Array;t.exports=function(t){var e=a(t),r=s(this),n=arguments.length,d=n>1?arguments[1]:void 0,v=void 0!==d;v&&(d=o(d,n>2?arguments[2]:void 0));var g,b,m,w,x,_,k=p(e),O=0;if(!k||this==y&&u(k))for(g=f(e),b=r?new this(g):y(g);g>O;O++)_=v?d(e[O],O):e[O],l(b,O,_);else for(x=(w=h(e,k)).next,b=r?new this:[];!(m=i(x,w)).done;O++)_=v?c(w,d,[m.value,O],!0):m.value,l(b,O,_);return b.length=O,b}},60452:(t,e,r)=>{var n=r(54721),o=r(59625),i=r(43716),a=function(t){return function(e,r,a){var c,u=n(e),s=i(u),f=o(a,s);if(t&&r!=r){for(;s>f;)if((c=u[f++])!=c)return!0}else for(;s>f;f++)if((t||f in u)&&u[f]===r)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},87265:(t,e,r)=>{var n=r(29910),o=r(76277),i=r(94015),a=r(87706),c=r(43716),u=r(29400),s=o([].push),f=function(t){var e=1==t,r=2==t,o=3==t,f=4==t,l=6==t,h=7==t,p=5==t||l;return function(y,d,v,g){for(var b,m,w=a(y),x=i(w),_=n(d,v),k=c(x),O=0,S=g||u,A=e?S(y,k):r||h?S(y,0):void 0;k>O;O++)if((p||O in x)&&(m=_(b=x[O],O,w),t))if(e)A[O]=m;else if(m)switch(t){case 3:return!0;case 5:return b;case 6:return O;case 2:s(A,b)}else switch(t){case 4:return!1;case 7:s(A,b)}return l?-1:o||f?f:A}};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)}},85773:(t,e,r)=>{"use strict";var n=r(2090),o=r(54721),i=r(35206),a=r(43716),c=r(39904),u=Math.min,s=[].lastIndexOf,f=!!s&&1/[1].lastIndexOf(1,-0)<0,l=c("lastIndexOf"),h=f||!l;t.exports=h?function(t){if(f)return n(s,this,arguments)||0;var e=o(this),r=a(e),c=r-1;for(arguments.length>1&&(c=u(c,i(arguments[1]))),c<0&&(c=r+c);c>=0;c--)if(c in e&&e[c]===t)return c||0;return-1}:s},1309:(t,e,r)=>{var n=r(13894),o=r(41398),i=r(49229),a=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},39904:(t,e,r)=>{"use strict";var n=r(13894);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){return 1},1)}))}},73333:(t,e,r)=>{var n=r(54516),o=r(88965),i=r(87706),a=r(94015),c=r(43716),u=n.TypeError,s=function(t){return function(e,r,n,s){o(r);var f=i(e),l=a(f),h=c(f),p=t?h-1:0,y=t?-1:1;if(n<2)for(;;){if(p in l){s=l[p],p+=y;break}if(p+=y,t?p<0:h<=p)throw u("Reduce of empty array with no initial value")}for(;t?p>=0:h>p;p+=y)p in l&&(s=r(s,l[p],p,f));return s}};t.exports={left:s(!1),right:s(!0)}},68020:(t,e,r)=>{var n=r(54516),o=r(59625),i=r(43716),a=r(80955),c=n.Array,u=Math.max;t.exports=function(t,e,r){for(var n=i(t),s=o(e,n),f=o(void 0===r?n:r,n),l=c(u(f-s,0)),h=0;s<f;s++,h++)a(l,h,t[s]);return l.length=h,l}},52999:(t,e,r)=>{var n=r(76277);t.exports=n([].slice)},53347:(t,e,r)=>{var n=r(68020),o=Math.floor;t.exports=function t(e,r){var i=e.length,a=o(i/2);return i<8?function(t,e){for(var r,n,o=t.length,i=1;i<o;){for(n=i,r=t[i];n&&e(t[n-1],r)>0;)t[n]=t[--n];n!==i++&&(t[n]=r)}return t}(e,r):function(t,e,r,n){for(var o=e.length,i=r.length,a=0,c=0;a<o||c<i;)t[a+c]=a<o&&c<i?n(e[a],r[c])<=0?e[a++]:r[c++]:a<o?e[a++]:r[c++];return t}(e,t(n(e,0,a),r),t(n(e,a),r),r)}},88913:(t,e,r)=>{var n=r(54516),o=r(85588),i=r(53924),a=r(3196),c=r(41398)("species"),u=n.Array;t.exports=function(t){var e;return o(t)&&(e=t.constructor,(i(e)&&(e===u||o(e.prototype))||a(e)&&null===(e=e[c]))&&(e=void 0)),void 0===e?u:e}},29400:(t,e,r)=>{var n=r(88913);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},19649:t=>{for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r={},n=0;n<66;n++)r[e.charAt(n)]=n;t.exports={itoc:e,ctoi:r}},59306:(t,e,r)=>{var n=r(96302),o=r(77073);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(e){o(t,"throw",e)}}},36548:(t,e,r)=>{var n=r(41398)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}},31030:(t,e,r)=>{var n=r(76277),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},98619:(t,e,r)=>{var n=r(54516),o=r(47775),i=r(34230),a=r(31030),c=r(41398)("toStringTag"),u=n.Object,s="Arguments"==a(function(){return arguments}());t.exports=o?a:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=u(t),c))?r:s?a(e):"Object"==(n=a(e))&&i(e.callee)?"Arguments":n}},30530:(t,e,r)=>{var n=r(76277),o=Error,i=n("".replace),a=String(o("zxcasd").stack),c=/\n\s*at [^:]*:[^\n]*/,u=c.test(a);t.exports=function(t,e){if(u&&"string"==typeof t&&!o.prepareStackTrace)for(;e--;)t=i(t,c,"");return t}},78704:(t,e,r)=>{"use strict";var n=r(26337).f,o=r(64714),i=r(83572),a=r(29910),c=r(89214),u=r(29429),s=r(96837),f=r(3348),l=r(44244),h=r(8420).fastKey,p=r(43023),y=p.set,d=p.getterFor;t.exports={getConstructor:function(t,e,r,s){var f=t((function(t,n){c(t,p),y(t,{type:e,index:o(null),first:void 0,last:void 0,size:0}),l||(t.size=0),null!=n&&u(n,t[s],{that:t,AS_ENTRIES:r})})),p=f.prototype,v=d(e),g=function(t,e,r){var n,o,i=v(t),a=b(t,e);return a?a.value=r:(i.last=a={index:o=h(e,!0),key:e,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=a),n&&(n.next=a),l?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},b=function(t,e){var r,n=v(t),o=h(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==e)return r};return i(p,{clear:function(){for(var t=v(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,l?t.size=0:this.size=0},delete:function(t){var e=this,r=v(e),n=b(e,t);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first==n&&(r.first=o),r.last==n&&(r.last=i),l?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=v(this),n=a(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),i(p,r?{get:function(t){var e=b(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&&n(p,"size",{get:function(){return v(this).size}}),f},setStrong:function(t,e,r){var n=e+" Iterator",o=d(e),i=d(n);s(t,e,(function(t,e){y(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==e?{value:r.key,done:!1}:"values"==e?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),f(e)}}},66263:(t,e,r)=>{"use strict";var n=r(76277),o=r(83572),i=r(8420).getWeakData,a=r(96302),c=r(3196),u=r(89214),s=r(29429),f=r(87265),l=r(37058),h=r(43023),p=h.set,y=h.getterFor,d=f.find,v=f.findIndex,g=n([].splice),b=0,m=function(t){return t.frozen||(t.frozen=new w)},w=function(){this.entries=[]},x=function(t,e){return d(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 r=x(this,t);r?r[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,r,n){var f=t((function(t,o){u(t,h),p(t,{type:e,id:b++,frozen:void 0}),null!=o&&s(o,t[n],{that:t,AS_ENTRIES:r})})),h=f.prototype,d=y(e),v=function(t,e,r){var n=d(t),o=i(a(e),!0);return!0===o?m(n).set(e,r):o[n.id]=r,t};return o(h,{delete:function(t){var e=d(this);if(!c(t))return!1;var r=i(t);return!0===r?m(e).delete(t):r&&l(r,e.id)&&delete r[e.id]},has:function(t){var e=d(this);if(!c(t))return!1;var r=i(t);return!0===r?m(e).has(t):r&&l(r,e.id)}}),o(h,r?{get:function(t){var e=d(this);if(c(t)){var r=i(t);return!0===r?m(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return v(this,t,e)}}:{add:function(t){return v(this,t,!0)}}),f}}},48756:(t,e,r)=>{"use strict";var n=r(57330),o=r(54516),i=r(76277),a=r(82615),c=r(68875),u=r(8420),s=r(29429),f=r(89214),l=r(34230),h=r(3196),p=r(13894),y=r(36548),d=r(81018),v=r(2993);t.exports=function(t,e,r){var g=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),m=g?"set":"add",w=o[t],x=w&&w.prototype,_=w,k={},O=function(t){var e=i(x[t]);c(x,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(b&&!h(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return b&&!h(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(b&&!h(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(a(t,!l(w)||!(b||x.forEach&&!p((function(){(new w).entries().next()})))))_=r.getConstructor(e,t,g,m),u.enable();else if(a(t,!0)){var S=new _,A=S[m](b?{}:-0,1)!=S,E=p((function(){S.has(1)})),P=y((function(t){new w(t)})),j=!b&&p((function(){for(var t=new w,e=5;e--;)t[m](e,e);return!t.has(-0)}));P||((_=e((function(t,e){f(t,x);var r=v(new w,t,_);return null!=e&&s(e,r[m],{that:r,AS_ENTRIES:g}),r}))).prototype=x,x.constructor=_),(E||j)&&(O("delete"),O("has"),g&&O("get")),(j||A)&&O(m),b&&x.clear&&delete x.clear}return k[t]=_,n({global:!0,forced:_!=w},k),d(_,t),b||r.setStrong(_,t,g),_}},79129:(t,e,r)=>{var n=r(37058),o=r(16660),i=r(77872),a=r(26337);t.exports=function(t,e,r){for(var c=o(e),u=a.f,s=i.f,f=0;f<c.length;f++){var l=c[f];n(t,l)||r&&n(r,l)||u(t,l,s(e,l))}}},86018:(t,e,r)=>{var n=r(41398)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(t){}}return!1}},66336:(t,e,r)=>{var n=r(13894);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},38439:(t,e,r)=>{var n=r(76277),o=r(72191),i=r(18971),a=/"/g,c=n("".replace);t.exports=function(t,e,r,n){var u=i(o(t)),s="<"+e;return""!==r&&(s+=" "+r+'="'+c(i(n),a,""")+'"'),s+">"+u+"</"+e+">"}},48539:(t,e,r)=>{"use strict";var n=r(32213).IteratorPrototype,o=r(64714),i=r(30654),a=r(81018),c=r(53415),u=function(){return this};t.exports=function(t,e,r,s){var f=e+" Iterator";return t.prototype=o(n,{next:i(+!s,r)}),a(t,f,!1,!0),c[f]=u,t}},81831:(t,e,r)=>{var n=r(44244),o=r(26337),i=r(30654);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},30654:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},80955:(t,e,r)=>{"use strict";var n=r(14748),o=r(26337),i=r(30654);t.exports=function(t,e,r){var a=n(e);a in t?o.f(t,a,i(0,r)):t[a]=r}},85833:(t,e,r)=>{"use strict";var n=r(54516),o=r(76277),i=r(13894),a=r(86424).start,c=n.RangeError,u=Math.abs,s=Date.prototype,f=s.toISOString,l=o(s.getTime),h=o(s.getUTCDate),p=o(s.getUTCFullYear),y=o(s.getUTCHours),d=o(s.getUTCMilliseconds),v=o(s.getUTCMinutes),g=o(s.getUTCMonth),b=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 c("Invalid time value");var t=this,e=p(t),r=d(t),n=e<0?"-":e>9999?"+":"";return n+a(u(e),n?6:4,0)+"-"+a(g(t)+1,2,0)+"-"+a(h(t),2,0)+"T"+a(y(t),2,0)+":"+a(v(t),2,0)+":"+a(b(t),2,0)+"."+a(r,3,0)+"Z"}:f},72473:(t,e,r)=>{"use strict";var n=r(54516),o=r(96302),i=r(8661),a=n.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)}},96837:(t,e,r)=>{"use strict";var n=r(57330),o=r(83264),i=r(43310),a=r(33385),c=r(34230),u=r(48539),s=r(40175),f=r(14776),l=r(81018),h=r(81831),p=r(68875),y=r(41398),d=r(53415),v=r(32213),g=a.PROPER,b=a.CONFIGURABLE,m=v.IteratorPrototype,w=v.BUGGY_SAFARI_ITERATORS,x=y("iterator"),_="keys",k="values",O="entries",S=function(){return this};t.exports=function(t,e,r,a,y,v,A){u(r,e,a);var E,P,j,R=function(t){if(t===y&&B)return B;if(!w&&t in I)return I[t];switch(t){case _:case k:case O:return function(){return new r(this,t)}}return function(){return new r(this)}},M=e+" Iterator",T=!1,I=t.prototype,C=I[x]||I["@@iterator"]||y&&I[y],B=!w&&C||R(y),D="Array"==e&&I.entries||C;if(D&&(E=s(D.call(new t)))!==Object.prototype&&E.next&&(i||s(E)===m||(f?f(E,m):c(E[x])||p(E,x,S)),l(E,M,!0,!0),i&&(d[M]=S)),g&&y==k&&C&&C.name!==k&&(!i&&b?h(I,"name",k):(T=!0,B=function(){return o(C,this)})),y)if(P={values:R(k),keys:v?B:R(_),entries:R(O)},A)for(j in P)(w||T||!(j in I))&&p(I,j,P[j]);else n({target:e,proto:!0,forced:w||T},P);return i&&!A||I[x]===B||p(I,x,B,{name:y}),d[e]=B,P}},16296:(t,e,r)=>{var n=r(1612),o=r(37058),i=r(30400),a=r(26337).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},44244:(t,e,r)=>{var n=r(13894);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},23791:(t,e,r)=>{var n=r(54516),o=r(3196),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},43115:t=>{t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},63464:t=>{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}},17666:(t,e,r)=>{var n=r(23791)("span").classList,o=n&&n.constructor&&n.constructor.prototype;t.exports=o===Object.prototype?void 0:o},50419:(t,e,r)=>{var n=r(83309).match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]},41822: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},e(t)}t.exports="object"==("undefined"==typeof window?"undefined":e(window))&&"object"!=("undefined"==typeof Deno?"undefined":e(Deno))},72693:(t,e,r)=>{var n=r(83309);t.exports=/MSIE|Trident/.test(n)},47181:(t,e,r)=>{var n=r(83309),o=r(54516);t.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==o.Pebble},31681:(t,e,r)=>{var n=r(83309);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},63241:(t,e,r)=>{var n=r(31030),o=r(54516);t.exports="process"==n(o.process)},82223:(t,e,r)=>{var n=r(83309);t.exports=/web0s(?!.*chrome)/i.test(n)},83309:(t,e,r)=>{var n=r(12546);t.exports=n("navigator","userAgent")||""},49229:(t,e,r)=>{var n,o,i=r(54516),a=r(83309),c=i.process,u=i.Deno,s=c&&c.versions||u&&u.version,f=s&&s.v8;f&&(o=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},90602:(t,e,r)=>{var n=r(83309).match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},62507:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},81842:(t,e,r)=>{var n=r(13894),o=r(30654);t.exports=!n((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",o(1,7)),7!==t.stack)}))},34019:(t,e,r)=>{"use strict";var n=r(44244),o=r(13894),i=r(96302),a=r(64714),c=r(91245),u=Error.prototype.toString,s=o((function(){if(n){var t=a(Object.defineProperty({},"name",{get:function(){return this===t}}));if("true"!==u.call(t))return!0}return"2: 1"!==u.call({message:1,name:2})||"Error"!==u.call({})}));t.exports=s?function(){var t=i(this),e=c(t.name,"Error"),r=c(t.message);return e?r?e+": "+r:e:r}:u},57330:(t,e,r)=>{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},n(t)}var o=r(54516),i=r(77872).f,a=r(81831),c=r(68875),u=r(48870),s=r(79129),f=r(82615);t.exports=function(t,e){var r,l,h,p,y,d=t.target,v=t.global,g=t.stat;if(r=v?o:g?o[d]||u(d,{}):(o[d]||{}).prototype)for(l in e){if(p=e[l],h=t.noTargetGet?(y=i(r,l))&&y.value:r[l],!f(v?l:d+(g?".":"#")+l,t.forced)&&void 0!==h){if(n(p)==n(h))continue;s(p,h)}(t.sham||h&&h.sham)&&a(p,"sham",!0),c(r,l,p,t)}}},13894:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},22804:(t,e,r)=>{"use strict";r(75567);var n=r(76277),o=r(68875),i=r(56021),a=r(13894),c=r(41398),u=r(81831),s=c("species"),f=RegExp.prototype;t.exports=function(t,e,r,l){var h=c(t),p=!a((function(){var e={};return e[h]=function(){return 7},7!=""[t](e)})),y=p&&!a((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[s]=function(){return r},r.flags="",r[h]=/./[h]),r.exec=function(){return e=!0,null},r[h](""),!e}));if(!p||!y||r){var d=n(/./[h]),v=e(h,""[t],(function(t,e,r,o,a){var c=n(t),u=e.exec;return u===i||u===f.exec?p&&!a?{done:!0,value:d(e,r,o)}:{done:!0,value:c(r,e,o)}:{done:!1}}));o(String.prototype,t,v[0]),o(f,h,v[1])}l&&u(f[h],"sham",!0)}},25790:(t,e,r)=>{"use strict";var n=r(54516),o=r(85588),i=r(43716),a=r(29910),c=n.TypeError;t.exports=function t(e,r,n,u,s,f,l,h){for(var p,y=s,d=0,v=!!l&&a(l,h);d<u;){if(d in n){if(p=v?v(n[d],d,r):n[d],f>0&&o(p))y=t(e,r,p,i(p),y,f-1)-1;else{if(y>=9007199254740991)throw c("Exceed the acceptable array length");e[y]=p}y++}d++}return y}},46151:(t,e,r)=>{var n=r(13894);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},2090:(t,e,r)=>{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},n(t)}var o=r(4424),i=Function.prototype,a=i.apply,c=i.call;t.exports="object"==("undefined"==typeof Reflect?"undefined":n(Reflect))&&Reflect.apply||(o?c.bind(a):function(){return c.apply(a,arguments)})},29910:(t,e,r)=>{var n=r(76277),o=r(88965),i=r(4424),a=n(n.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?a(t,e):function(){return t.apply(e,arguments)}}},4424:(t,e,r)=>{var n=r(13894);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},80944:(t,e,r)=>{"use strict";var n=r(54516),o=r(76277),i=r(88965),a=r(3196),c=r(37058),u=r(52999),s=r(4424),f=n.Function,l=o([].concat),h=o([].join),p={},y=function(t,e,r){if(!c(p,e)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";p[e]=f("C,a","return new C("+h(n,",")+")")}return p[e](t,r)};t.exports=s?f.bind:function(t){var e=i(this),r=e.prototype,n=u(arguments,1),o=function(){var r=l(n,u(arguments));return this instanceof o?y(e,r.length,r):e.apply(t,r)};return a(r)&&(o.prototype=r),o}},83264:(t,e,r)=>{var n=r(4424),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},33385:(t,e,r)=>{var n=r(44244),o=r(37058),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,c=o(i,"name"),u=c&&"something"===function(){}.name,s=c&&(!n||n&&a(i,"name").configurable);t.exports={EXISTS:c,PROPER:u,CONFIGURABLE:s}},76277:(t,e,r)=>{var n=r(4424),o=Function.prototype,i=o.bind,a=o.call,c=n&&i.bind(a,a);t.exports=n?function(t){return t&&c(t)}:function(t){return t&&function(){return a.apply(t,arguments)}}},12546:(t,e,r)=>{var n=r(54516),o=r(34230),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t]):n[t]&&n[t][e]}},1228:(t,e,r)=>{var n=r(98619),o=r(16040),i=r(53415),a=r(41398)("iterator");t.exports=function(t){if(null!=t)return o(t,a)||o(t,"@@iterator")||i[n(t)]}},29946:(t,e,r)=>{var n=r(54516),o=r(83264),i=r(88965),a=r(96302),c=r(2854),u=r(1228),s=n.TypeError;t.exports=function(t,e){var r=arguments.length<2?u(t):e;if(i(r))return a(o(r,t));throw s(c(t)+" is not iterable")}},16040:(t,e,r)=>{var n=r(88965);t.exports=function(t,e){var r=t[e];return null==r?void 0:n(r)}},42012:(t,e,r)=>{var n=r(76277),o=r(87706),i=Math.floor,a=n("".charAt),c=n("".replace),u=n("".slice),s=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,f=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,n,l,h){var p=r+t.length,y=n.length,d=f;return void 0!==l&&(l=o(l),d=s),c(h,d,(function(o,c){var s;switch(a(c,0)){case"$":return"$";case"&":return t;case"`":return u(e,0,r);case"'":return u(e,p);case"<":s=l[u(c,1,-1)];break;default:var f=+c;if(0===f)return o;if(f>y){var h=i(f/10);return 0===h?o:h<=y?void 0===n[h-1]?a(c,1):n[h-1]+a(c,1):o}s=n[f-1]}return void 0===s?"":s}))}},54516:(t,e,r)=>{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},n(t)}var o=function(t){return t&&t.Math==Math&&t};t.exports=o("object"==("undefined"==typeof globalThis?"undefined":n(globalThis))&&globalThis)||o("object"==("undefined"==typeof window?"undefined":n(window))&&window)||o("object"==("undefined"==typeof self?"undefined":n(self))&&self)||o("object"==(void 0===r.g?"undefined":n(r.g))&&r.g)||function(){return this}()||Function("return this")()},37058:(t,e,r)=>{var n=r(76277),o=r(87706),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},42570:t=>{t.exports={}},45471:(t,e,r)=>{var n=r(54516);t.exports=function(t,e){var r=n.console;r&&r.error&&(1==arguments.length?r.error(t):r.error(t,e))}},58970:(t,e,r)=>{var n=r(12546);t.exports=n("document","documentElement")},77320:(t,e,r)=>{var n=r(44244),o=r(13894),i=r(23791);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},53652:(t,e,r)=>{var n=r(54516).Array,o=Math.abs,i=Math.pow,a=Math.floor,c=Math.log,u=Math.LN2;t.exports={pack:function(t,e,r){var s,f,l,h=n(r),p=8*r-e-1,y=(1<<p)-1,d=y>>1,v=23===e?i(2,-24)-i(2,-77):0,g=t<0||0===t&&1/t<0?1:0,b=0;for((t=o(t))!=t||t===1/0?(f=t!=t?1:0,s=y):(s=a(c(t)/u),t*(l=i(2,-s))<1&&(s--,l*=2),(t+=s+d>=1?v/l:v*i(2,1-d))*l>=2&&(s++,l/=2),s+d>=y?(f=0,s=y):s+d>=1?(f=(t*l-1)*i(2,e),s+=d):(f=t*i(2,d-1)*i(2,e),s=0));e>=8;)h[b++]=255&f,f/=256,e-=8;for(s=s<<e|f,p+=e;p>0;)h[b++]=255&s,s/=256,p-=8;return h[--b]|=128*g,h},unpack:function(t,e){var r,n=t.length,o=8*n-e-1,a=(1<<o)-1,c=a>>1,u=o-7,s=n-1,f=t[s--],l=127&f;for(f>>=7;u>0;)l=256*l+t[s--],u-=8;for(r=l&(1<<-u)-1,l>>=-u,u+=e;u>0;)r=256*r+t[s--],u-=8;if(0===l)l=1-c;else{if(l===a)return r?NaN:f?-1/0:1/0;r+=i(2,e),l-=c}return(f?-1:1)*r*i(2,l-e)}}},94015:(t,e,r)=>{var n=r(54516),o=r(76277),i=r(13894),a=r(31030),c=n.Object,u=o("".split);t.exports=i((function(){return!c("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?u(t,""):c(t)}:c},2993:(t,e,r)=>{var n=r(34230),o=r(3196),i=r(14776);t.exports=function(t,e,r){var a,c;return i&&n(a=e.constructor)&&a!==r&&o(c=a.prototype)&&c!==r.prototype&&i(t,c),t}},91683:(t,e,r)=>{var n=r(76277),o=r(34230),i=r(64111),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},89804:(t,e,r)=>{var n=r(3196),o=r(81831);t.exports=function(t,e){n(e)&&"cause"in e&&o(t,"cause",e.cause)}},8420:(t,e,r)=>{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},n(t)}var o=r(57330),i=r(76277),a=r(42570),c=r(3196),u=r(37058),s=r(26337).f,f=r(51019),l=r(53990),h=r(54284),p=r(67025),y=r(46151),d=!1,v=p("meta"),g=0,b=function(t){s(t,v,{value:{objectID:"O"+g++,weakData:{}}})},m=t.exports={enable:function(){m.enable=function(){},d=!0;var t=f.f,e=i([].splice),r={};r[v]=1,t(r).length&&(f.f=function(r){for(var n=t(r),o=0,i=n.length;o<i;o++)if(n[o]===v){e(n,o,1);break}return n},o({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(t,e){if(!c(t))return"symbol"==n(t)?t:("string"==typeof t?"S":"P")+t;if(!u(t,v)){if(!h(t))return"F";if(!e)return"E";b(t)}return t[v].objectID},getWeakData:function(t,e){if(!u(t,v)){if(!h(t))return!0;if(!e)return!1;b(t)}return t[v].weakData},onFreeze:function(t){return y&&d&&h(t)&&!u(t,v)&&b(t),t}};a[v]=!0},43023:(t,e,r)=>{var n,o,i,a=r(50174),c=r(54516),u=r(76277),s=r(3196),f=r(81831),l=r(37058),h=r(64111),p=r(96894),y=r(42570),d="Object already initialized",v=c.TypeError,g=c.WeakMap;if(a||h.state){var b=h.state||(h.state=new g),m=u(b.get),w=u(b.has),x=u(b.set);n=function(t,e){if(w(b,t))throw new v(d);return e.facade=t,x(b,t,e),e},o=function(t){return m(b,t)||{}},i=function(t){return w(b,t)}}else{var _=p("state");y[_]=!0,n=function(t,e){if(l(t,_))throw new v(d);return e.facade=t,f(t,_,e),e},o=function(t){return l(t,_)?t[_]:{}},i=function(t){return l(t,_)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!s(e)||(r=o(e)).type!==t)throw v("Incompatible receiver, "+t+" required");return r}}}},201:(t,e,r)=>{var n=r(41398),o=r(53415),i=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},85588:(t,e,r)=>{var n=r(31030);t.exports=Array.isArray||function(t){return"Array"==n(t)}},34230:t=>{t.exports=function(t){return"function"==typeof t}},53924:(t,e,r)=>{var n=r(76277),o=r(13894),i=r(34230),a=r(98619),c=r(12546),u=r(91683),s=function(){},f=[],l=c("Reflect","construct"),h=/^\s*(?:class|function)\b/,p=n(h.exec),y=!h.exec(s),d=function(t){if(!i(t))return!1;try{return l(s,f,t),!0}catch(t){return!1}},v=function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return y||!!p(h,u(t))}catch(t){return!0}};v.sham=!0,t.exports=!l||o((function(){var t;return d(d.call)||!d(Object)||!d((function(){t=!0}))||t}))?v:d},32674:(t,e,r)=>{var n=r(37058);t.exports=function(t){return void 0!==t&&(n(t,"value")||n(t,"writable"))}},82615:(t,e,r)=>{var n=r(13894),o=r(34230),i=/#|\.prototype\./,a=function(t,e){var r=u[c(t)];return r==f||r!=s&&(o(e)?n(e):!!e)},c=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},u=a.data={},s=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},18057:(t,e,r)=>{var n=r(3196),o=Math.floor;t.exports=Number.isInteger||function(t){return!n(t)&&isFinite(t)&&o(t)===t}},3196:(t,e,r)=>{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},n(t)}var o=r(34230);t.exports=function(t){return"object"==n(t)?null!==t:o(t)}},43310:t=>{t.exports=!1},15076:(t,e,r)=>{var n=r(3196),o=r(31030),i=r(41398)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},45961:(t,e,r)=>{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},n(t)}var o=r(54516),i=r(12546),a=r(34230),c=r(34973),u=r(88477),s=o.Object;t.exports=u?function(t){return"symbol"==n(t)}:function(t){var e=i("Symbol");return a(e)&&c(e.prototype,s(t))}},29429:(t,e,r)=>{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},n(t)}var o=r(54516),i=r(29910),a=r(83264),c=r(96302),u=r(2854),s=r(201),f=r(43716),l=r(34973),h=r(29946),p=r(1228),y=r(77073),d=o.TypeError,v=function(t,e){this.stopped=t,this.result=e},g=v.prototype;t.exports=function(t,e,r){var o,b,m,w,x,_,k,O=r&&r.that,S=!(!r||!r.AS_ENTRIES),A=!(!r||!r.IS_ITERATOR),E=!(!r||!r.INTERRUPTED),P=i(e,O),j=function(t){return o&&y(o,"normal",t),new v(!0,t)},R=function(t){return S?(c(t),E?P(t[0],t[1],j):P(t[0],t[1])):E?P(t,j):P(t)};if(A)o=t;else{if(!(b=p(t)))throw d(u(t)+" is not iterable");if(s(b)){for(m=0,w=f(t);w>m;m++)if((x=R(t[m]))&&l(g,x))return x;return new v(!1)}o=h(t,b)}for(_=o.next;!(k=a(_,o)).done;){try{x=R(k.value)}catch(t){y(o,"throw",t)}if("object"==n(x)&&x&&l(g,x))return x}return new v(!1)}},77073:(t,e,r)=>{var n=r(83264),o=r(96302),i=r(16040);t.exports=function(t,e,r){var a,c;o(t);try{if(!(a=i(t,"return"))){if("throw"===e)throw r;return r}a=n(a,t)}catch(t){c=!0,a=t}if("throw"===e)throw r;if(c)throw a;return o(a),r}},32213:(t,e,r)=>{"use strict";var n,o,i,a=r(13894),c=r(34230),u=r(64714),s=r(40175),f=r(68875),l=r(41398),h=r(43310),p=l("iterator"),y=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(n=o):y=!0),null==n||a((function(){var t={};return n[p].call(t)!==t}))?n={}:h&&(n=u(n)),c(n[p])||f(n,p,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:y}},53415:t=>{t.exports={}},43716:(t,e,r)=>{var n=r(6674);t.exports=function(t){return n(t.length)}},45446:t=>{var e=Math.expm1,r=Math.exp;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!=e(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:r(t)-1}:e},49281:(t,e,r)=>{var n=r(54059),o=Math.abs,i=Math.pow,a=i(2,-52),c=i(2,-23),u=i(2,127)*(2-c),s=i(2,-126);t.exports=Math.fround||function(t){var e,r,i=o(t),f=n(t);return i<s?f*(i/s/c+1/a-1/a)*s*c:(r=(e=(1+c/a)*i)-(e-i))>u||r!=r?f*(1/0):f*r}},36200:t=>{var e=Math.log,r=Math.LOG10E;t.exports=Math.log10||function(t){return e(t)*r}},43611:t=>{var e=Math.log;t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:e(1+t)}},54059:t=>{t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},54653:(t,e,r)=>{var n,o,i,a,c,u,s,f,l=r(54516),h=r(29910),p=r(77872).f,y=r(33394).set,d=r(31681),v=r(47181),g=r(82223),b=r(63241),m=l.MutationObserver||l.WebKitMutationObserver,w=l.document,x=l.process,_=l.Promise,k=p(l,"queueMicrotask"),O=k&&k.value;O||(n=function(){var t,e;for(b&&(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()},d||b||g||!m||!w?!v&&_&&_.resolve?((s=_.resolve(void 0)).constructor=_,f=h(s.then,s),a=function(){f(n)}):b?a=function(){x.nextTick(n)}:(y=h(y,l),a=function(){y(n)}):(c=!0,u=w.createTextNode(""),new m(n).observe(u,{characterData:!0}),a=function(){u.data=c=!c})),t.exports=O||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},36609:(t,e,r)=>{var n=r(97449);t.exports=n&&!!Symbol.for&&!!Symbol.keyFor},97449:(t,e,r)=>{var n=r(49229),o=r(13894);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},33018:(t,e,r)=>{var n=r(13894),o=r(41398),i=r(43310),a=o("iterator");t.exports=!n((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+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"!==r||"x"!==new URL("http://x",void 0).host}))},50174:(t,e,r)=>{var n=r(54516),o=r(34230),i=r(91683),a=n.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},82487:(t,e,r)=>{"use strict";var n=r(88965),o=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new o(t)}},91245:(t,e,r)=>{var n=r(18971);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:n(t)}},50134:(t,e,r)=>{var n=r(54516),o=r(15076),i=n.TypeError;t.exports=function(t){if(o(t))throw i("The method doesn't accept regular expressions");return t}},23034:(t,e,r)=>{var n=r(54516).isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&n(t)}},29818:(t,e,r)=>{var n=r(54516),o=r(13894),i=r(76277),a=r(18971),c=r(23688).trim,u=r(79577),s=i("".charAt),f=n.parseFloat,l=n.Symbol,h=l&&l.iterator,p=1/f(u+"-0")!=-1/0||h&&!o((function(){f(Object(h))}));t.exports=p?function(t){var e=c(a(t)),r=f(e);return 0===r&&"-"==s(e,0)?-0:r}:f},20361:(t,e,r)=>{var n=r(54516),o=r(13894),i=r(76277),a=r(18971),c=r(23688).trim,u=r(79577),s=n.parseInt,f=n.Symbol,l=f&&f.iterator,h=/^[+-]?0x/i,p=i(h.exec),y=8!==s(u+"08")||22!==s(u+"0x16")||l&&!o((function(){s(Object(l))}));t.exports=y?function(t,e){var r=c(a(t));return s(r,e>>>0||(p(h,r)?16:10))}:s},70168:(t,e,r)=>{"use strict";var n=r(44244),o=r(76277),i=r(83264),a=r(13894),c=r(68201),u=r(78586),s=r(12028),f=r(87706),l=r(94015),h=Object.assign,p=Object.defineProperty,y=o([].concat);t.exports=!h||a((function(){if(n&&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={},r=Symbol(),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach((function(t){e[t]=t})),7!=h({},t)[r]||c(h({},e)).join("")!=o}))?function(t,e){for(var r=f(t),o=arguments.length,a=1,h=u.f,p=s.f;o>a;)for(var d,v=l(arguments[a++]),g=h?y(c(v),h(v)):c(v),b=g.length,m=0;b>m;)d=g[m++],n&&!i(p,v,d)||(r[d]=v[d]);return r}:h},64714:(t,e,r)=>{var n,o=r(96302),i=r(68068),a=r(62507),c=r(42570),u=r(58970),s=r(23791),f=r(96894)("IE_PROTO"),l=function(){},h=function(t){return"<script>"+t+"<\/script>"},p=function(t){t.write(h("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e;y="undefined"!=typeof document?document.domain&&n?p(n):((e=s("iframe")).style.display="none",u.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F):p(n);for(var r=a.length;r--;)delete y.prototype[a[r]];return y()};c[f]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(l.prototype=o(t),r=new l,l.prototype=null,r[f]=t):r=y(),void 0===e?r:i.f(r,e)}},68068:(t,e,r)=>{var n=r(44244),o=r(29128),i=r(26337),a=r(96302),c=r(54721),u=r(68201);e.f=n&&!o?Object.defineProperties:function(t,e){a(t);for(var r,n=c(e),o=u(e),s=o.length,f=0;s>f;)i.f(t,r=o[f++],n[r]);return t}},26337:(t,e,r)=>{var n=r(54516),o=r(44244),i=r(77320),a=r(29128),c=r(96302),u=r(14748),s=n.TypeError,f=Object.defineProperty,l=Object.getOwnPropertyDescriptor;e.f=o?a?function(t,e,r){if(c(t),e=u(e),c(r),"function"==typeof t&&"prototype"===e&&"value"in r&&"writable"in r&&!r.writable){var n=l(t,e);n&&n.writable&&(t[e]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return f(t,e,r)}:f:function(t,e,r){if(c(t),e=u(e),c(r),i)try{return f(t,e,r)}catch(t){}if("get"in r||"set"in r)throw s("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},77872:(t,e,r)=>{var n=r(44244),o=r(83264),i=r(12028),a=r(30654),c=r(54721),u=r(14748),s=r(37058),f=r(77320),l=Object.getOwnPropertyDescriptor;e.f=n?l:function(t,e){if(t=c(t),e=u(e),f)try{return l(t,e)}catch(t){}if(s(t,e))return a(!o(i.f,t,e),t[e])}},53990:(t,e,r)=>{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},n(t)}var o=r(31030),i=r(54721),a=r(51019).f,c=r(68020),u="object"==("undefined"==typeof window?"undefined":n(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"Window"==o(t)?function(t){try{return a(t)}catch(t){return c(u)}}(t):a(i(t))}},51019:(t,e,r)=>{var n=r(26406),o=r(62507).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},78586:(t,e)=>{e.f=Object.getOwnPropertySymbols},40175:(t,e,r)=>{var n=r(54516),o=r(37058),i=r(34230),a=r(87706),c=r(96894),u=r(66336),s=c("IE_PROTO"),f=n.Object,l=f.prototype;t.exports=u?f.getPrototypeOf:function(t){var e=a(t);if(o(e,s))return e[s];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof f?l:null}},54284:(t,e,r)=>{var n=r(13894),o=r(3196),i=r(31030),a=r(47698),c=Object.isExtensible,u=n((function(){c(1)}));t.exports=u||a?function(t){return!!o(t)&&(!a||"ArrayBuffer"!=i(t))&&(!c||c(t))}:c},34973:(t,e,r)=>{var n=r(76277);t.exports=n({}.isPrototypeOf)},26406:(t,e,r)=>{var n=r(76277),o=r(37058),i=r(54721),a=r(60452).indexOf,c=r(42570),u=n([].push);t.exports=function(t,e){var r,n=i(t),s=0,f=[];for(r in n)!o(c,r)&&o(n,r)&&u(f,r);for(;e.length>s;)o(n,r=e[s++])&&(~a(f,r)||u(f,r));return f}},68201:(t,e,r)=>{var n=r(26406),o=r(62507);t.exports=Object.keys||function(t){return n(t,o)}},12028:(t,e)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);e.f=o?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},54046:(t,e,r)=>{"use strict";var n=r(43310),o=r(54516),i=r(13894),a=r(90602);t.exports=n||!i((function(){if(!(a&&a<535)){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete o[t]}}))},14776:(t,e,r)=>{var n=r(76277),o=r(96302),i=r(19814);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return o(r),i(n),e?t(r,n):r.__proto__=n,r}}():void 0)},19602:(t,e,r)=>{var n=r(44244),o=r(76277),i=r(68201),a=r(54721),c=o(r(12028).f),u=o([].push),s=function(t){return function(e){for(var r,o=a(e),s=i(o),f=s.length,l=0,h=[];f>l;)r=s[l++],n&&!c(o,r)||u(h,t?[r,o[r]]:o[r]);return h}};t.exports={entries:s(!0),values:s(!1)}},5719:(t,e,r)=>{"use strict";var n=r(47775),o=r(98619);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},8661:(t,e,r)=>{var n=r(54516),o=r(83264),i=r(34230),a=r(3196),c=n.TypeError;t.exports=function(t,e){var r,n;if("string"===e&&i(r=t.toString)&&!a(n=o(r,t)))return n;if(i(r=t.valueOf)&&!a(n=o(r,t)))return n;if("string"!==e&&i(r=t.toString)&&!a(n=o(r,t)))return n;throw c("Can't convert object to primitive value")}},16660:(t,e,r)=>{var n=r(12546),o=r(76277),i=r(51019),a=r(78586),c=r(96302),u=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=i.f(c(t)),r=a.f;return r?u(e,r(t)):e}},1612:(t,e,r)=>{var n=r(54516);t.exports=n},93798:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},86177:(t,e,r)=>{var n=r(54516),o=r(32522),i=r(34230),a=r(82615),c=r(91683),u=r(41398),s=r(41822),f=r(43310),l=r(49229),h=o&&o.prototype,p=u("species"),y=!1,d=i(n.PromiseRejectionEvent),v=a("Promise",(function(){var t=c(o),e=t!==String(o);if(!e&&66===l)return!0;if(f&&(!h.catch||!h.finally))return!0;if(l>=51&&/native code/.test(t))return!1;var r=new o((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};return(r.constructor={})[p]=n,!(y=r.then((function(){}))instanceof n)||!e&&s&&!d}));t.exports={CONSTRUCTOR:v,REJECTION_EVENT:d,SUBCLASSING:y}},32522:(t,e,r)=>{var n=r(54516);t.exports=n.Promise},37494:(t,e,r)=>{var n=r(96302),o=r(3196),i=r(82487);t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var r=i.f(t);return(0,r.resolve)(e),r.promise}},48006:(t,e,r)=>{var n=r(32522),o=r(36548),i=r(86177).CONSTRUCTOR;t.exports=i||!o((function(t){n.all(t).then(void 0,(function(){}))}))},60492:(t,e,r)=>{var n=r(26337).f;t.exports=function(t,e,r){r in t||n(t,r,{configurable:!0,get:function(){return e[r]},set:function(t){e[r]=t}})}},7822:t=>{var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}},t.exports=e},83572:(t,e,r)=>{var n=r(68875);t.exports=function(t,e,r){for(var o in e)n(t,o,e[o],r);return t}},68875:(t,e,r)=>{var n=r(54516),o=r(34230),i=r(37058),a=r(81831),c=r(48870),u=r(91683),s=r(43023),f=r(33385).CONFIGURABLE,l=s.get,h=s.enforce,p=String(String).split("String");(t.exports=function(t,e,r,u){var s,l=!!u&&!!u.unsafe,y=!!u&&!!u.enumerable,d=!!u&&!!u.noTargetGet,v=u&&void 0!==u.name?u.name:e;o(r)&&("Symbol("===String(v).slice(0,7)&&(v="["+String(v).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(r,"name")||f&&r.name!==v)&&a(r,"name",v),(s=h(r)).source||(s.source=p.join("string"==typeof v?v:""))),t!==n?(l?!d&&t[e]&&(y=!0):delete t[e],y?t[e]=r:a(t,e,r)):y?t[e]=r:c(e,r)})(Function.prototype,"toString",(function(){return o(this)&&l(this).source||u(this)}))},10510:(t,e,r)=>{var n=r(54516),o=r(83264),i=r(96302),a=r(34230),c=r(31030),u=r(56021),s=n.TypeError;t.exports=function(t,e){var r=t.exec;if(a(r)){var n=o(r,t,e);return null!==n&&i(n),n}if("RegExp"===c(t))return o(u,t,e);throw s("RegExp#exec called on incompatible receiver")}},56021:(t,e,r)=>{"use strict";var n,o,i=r(83264),a=r(76277),c=r(18971),u=r(53941),s=r(25645),f=r(38365),l=r(64714),h=r(43023).get,p=r(51415),y=r(56002),d=f("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,g=v,b=a("".charAt),m=a("".indexOf),w=a("".replace),x=a("".slice),_=(o=/b*/g,i(v,n=/a/,"a"),i(v,o,"a"),0!==n.lastIndex||0!==o.lastIndex),k=s.BROKEN_CARET,O=void 0!==/()??/.exec("")[1];(_||O||k||p||y)&&(g=function(t){var e,r,n,o,a,s,f,p=this,y=h(p),S=c(t),A=y.raw;if(A)return A.lastIndex=p.lastIndex,e=i(g,A,S),p.lastIndex=A.lastIndex,e;var E=y.groups,P=k&&p.sticky,j=i(u,p),R=p.source,M=0,T=S;if(P&&(j=w(j,"y",""),-1===m(j,"g")&&(j+="g"),T=x(S,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==b(S,p.lastIndex-1))&&(R="(?: "+R+")",T=" "+T,M++),r=new RegExp("^(?:"+R+")",j)),O&&(r=new RegExp("^"+R+"$(?!\\s)",j)),_&&(n=p.lastIndex),o=i(v,P?r:p,T),P?o?(o.input=x(o.input,M),o[0]=x(o[0],M),o.index=p.lastIndex,p.lastIndex+=o[0].length):p.lastIndex=0:_&&o&&(p.lastIndex=p.global?o.index+o[0].length:n),O&&o&&o.length>1&&i(d,o[0],r,(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},53941:(t,e,r)=>{"use strict";var n=r(96302);t.exports=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),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}},16503:(t,e,r)=>{var n=r(83264),o=r(37058),i=r(34973),a=r(53941),c=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in c||o(t,"flags")||!i(c,t)?e:n(a,t)}},25645:(t,e,r)=>{var n=r(13894),o=r(54516).RegExp,i=n((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),a=i||n((function(){return!o("a","y").sticky})),c=i||n((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:c,MISSED_STICKY:a,UNSUPPORTED_Y:i}},51415:(t,e,r)=>{var n=r(13894),o=r(54516).RegExp;t.exports=n((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},56002:(t,e,r)=>{var n=r(13894),o=r(54516).RegExp;t.exports=n((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},72191:(t,e,r)=>{var n=r(54516).TypeError;t.exports=function(t){if(null==t)throw n("Can't call method on "+t);return t}},79094:t=>{t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},74710:(t,e,r)=>{var n=r(54516),o=r(2090),i=r(34230),a=r(83309),c=r(52999),u=r(10645),s=/MSIE .\./.test(a),f=n.Function,l=function(t){return s?function(e,r){var n=u(arguments.length,1)>2,a=i(e)?e:f(e),s=n?c(arguments,2):void 0;return t(n?function(){o(a,this,s)}:a,r)}:t};t.exports={setTimeout:l(n.setTimeout),setInterval:l(n.setInterval)}},48870:(t,e,r)=>{var n=r(54516),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},3348:(t,e,r)=>{"use strict";var n=r(12546),o=r(26337),i=r(41398),a=r(44244),c=i("species");t.exports=function(t){var e=n(t),r=o.f;a&&e&&!e[c]&&r(e,c,{configurable:!0,get:function(){return this}})}},81018:(t,e,r)=>{var n=r(26337).f,o=r(37058),i=r(41398)("toStringTag");t.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!o(t,i)&&n(t,i,{configurable:!0,value:e})}},96894:(t,e,r)=>{var n=r(38365),o=r(67025),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},64111:(t,e,r)=>{var n=r(54516),o=r(48870),i="__core-js_shared__",a=n[i]||o(i,{});t.exports=a},38365:(t,e,r)=>{var n=r(43310),o=r(64111);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.22.2",mode:n?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.2/LICENSE",source:"https://github.com/zloirock/core-js"})},72976:(t,e,r)=>{var n=r(96302),o=r(52750),i=r(41398)("species");t.exports=function(t,e){var r,a=n(t).constructor;return void 0===a||null==(r=n(a)[i])?e:o(r)}},21839:(t,e,r)=>{var n=r(13894);t.exports=function(t){return n((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},32088:(t,e,r)=>{var n=r(76277),o=r(35206),i=r(18971),a=r(72191),c=n("".charAt),u=n("".charCodeAt),s=n("".slice),f=function(t){return function(e,r){var n,f,l=i(a(e)),h=o(r),p=l.length;return h<0||h>=p?t?"":void 0:(n=u(l,h))<55296||n>56319||h+1===p||(f=u(l,h+1))<56320||f>57343?t?c(l,h):n:t?s(l,h,h+2):f-56320+(n-55296<<10)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},92980:(t,e,r)=>{var n=r(83309);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(n)},86424:(t,e,r)=>{var n=r(76277),o=r(6674),i=r(18971),a=r(23295),c=r(72191),u=n(a),s=n("".slice),f=Math.ceil,l=function(t){return function(e,r,n){var a,l,h=i(c(e)),p=o(r),y=h.length,d=void 0===n?" ":i(n);return p<=y||""==d?h:((l=u(d,f((a=p-y)/d.length))).length>a&&(l=s(l,0,a)),t?h+l:l+h)}};t.exports={start:l(!1),end:l(!0)}},34858:(t,e,r)=>{"use strict";var n=r(54516),o=r(76277),i=2147483647,a=/[^\0-\u007E]/,c=/[.\u3002\uFF0E\uFF61]/g,u="Overflow: input needs wider integers to process",s=n.RangeError,f=o(c.exec),l=Math.floor,h=String.fromCharCode,p=o("".charCodeAt),y=o([].join),d=o([].push),v=o("".replace),g=o("".split),b=o("".toLowerCase),m=function(t){return t+22+75*(t<26)},w=function(t,e,r){var n=0;for(t=r?l(t/700):t>>1,t+=l(t/e);t>455;)t=l(t/35),n+=36;return l(n+36*t/(t+38))},x=function(t){var e=[];t=function(t){for(var e=[],r=0,n=t.length;r<n;){var o=p(t,r++);if(o>=55296&&o<=56319&&r<n){var i=p(t,r++);56320==(64512&i)?d(e,((1023&o)<<10)+(1023&i)+65536):(d(e,o),r--)}else d(e,o)}return e}(t);var r,n,o=t.length,a=128,c=0,f=72;for(r=0;r<t.length;r++)(n=t[r])<128&&d(e,h(n));var v=e.length,g=v;for(v&&d(e,"-");g<o;){var b=i;for(r=0;r<t.length;r++)(n=t[r])>=a&&n<b&&(b=n);var x=g+1;if(b-a>l((i-c)/x))throw s(u);for(c+=(b-a)*x,a=b,r=0;r<t.length;r++){if((n=t[r])<a&&++c>i)throw s(u);if(n==a){for(var _=c,k=36;;){var O=k<=f?1:k>=f+26?26:k-f;if(_<O)break;var S=_-O,A=36-O;d(e,h(m(O+S%A))),_=l(S/A),k+=36}d(e,h(m(_))),f=w(c,x,g==v),c=0,g++}}c++,a++}return y(e,"")};t.exports=function(t){var e,r,n=[],o=g(v(b(t),c,"."),".");for(e=0;e<o.length;e++)r=o[e],d(n,f(a,r)?"xn--"+x(r):r);return y(n,".")}},23295:(t,e,r)=>{"use strict";var n=r(54516),o=r(35206),i=r(18971),a=r(72191),c=n.RangeError;t.exports=function(t){var e=i(a(this)),r="",n=o(t);if(n<0||n==1/0)throw c("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(e+=e))1&n&&(r+=e);return r}},21791:(t,e,r)=>{"use strict";var n=r(23688).end,o=r(55833);t.exports=o("trimEnd")?function(){return n(this)}:"".trimEnd},55833:(t,e,r)=>{var n=r(33385).PROPER,o=r(13894),i=r(79577);t.exports=function(t){return o((function(){return!!i[t]()||"
"!=="
"[t]()||n&&i[t].name!==t}))}},65315:(t,e,r)=>{"use strict";var n=r(23688).start,o=r(55833);t.exports=o("trimStart")?function(){return n(this)}:"".trimStart},23688:(t,e,r)=>{var n=r(76277),o=r(72191),i=r(18971),a=r(79577),c=n("".replace),u="["+a+"]",s=RegExp("^"+u+u+"*"),f=RegExp(u+u+"*$"),l=function(t){return function(e){var r=i(o(e));return 1&t&&(r=c(r,s,"")),2&t&&(r=c(r,f,"")),r}};t.exports={start:l(1),end:l(2),trim:l(3)}},52231:(t,e,r)=>{var n=r(83264),o=r(12546),i=r(41398),a=r(68875);t.exports=function(){var t=o("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,c=i("toPrimitive");e&&!e[c]&&a(e,c,(function(t){return n(r,this)}))}},33394:(t,e,r)=>{var n,o,i,a,c=r(54516),u=r(2090),s=r(29910),f=r(34230),l=r(37058),h=r(13894),p=r(58970),y=r(52999),d=r(23791),v=r(10645),g=r(31681),b=r(63241),m=c.setImmediate,w=c.clearImmediate,x=c.process,_=c.Dispatch,k=c.Function,O=c.MessageChannel,S=c.String,A=0,E={};try{n=c.location}catch(t){}var P=function(t){if(l(E,t)){var e=E[t];delete E[t],e()}},j=function(t){return function(){P(t)}},R=function(t){P(t.data)},M=function(t){c.postMessage(S(t),n.protocol+"//"+n.host)};m&&w||(m=function(t){v(arguments.length,1);var e=f(t)?t:k(t),r=y(arguments,1);return E[++A]=function(){u(e,void 0,r)},o(A),A},w=function(t){delete E[t]},b?o=function(t){x.nextTick(j(t))}:_&&_.now?o=function(t){_.now(j(t))}:O&&!g?(a=(i=new O).port2,i.port1.onmessage=R,o=s(a.postMessage,a)):c.addEventListener&&f(c.postMessage)&&!c.importScripts&&n&&"file:"!==n.protocol&&!h(M)?(o=M,c.addEventListener("message",R,!1)):o="onreadystatechange"in d("script")?function(t){p.appendChild(d("script")).onreadystatechange=function(){p.removeChild(this),P(t)}}:function(t){setTimeout(j(t),0)}),t.exports={set:m,clear:w}},71047:(t,e,r)=>{var n=r(76277);t.exports=n(1..valueOf)},59625:(t,e,r)=>{var n=r(35206),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},88821:(t,e,r)=>{var n=r(54516),o=r(35206),i=r(6674),a=n.RangeError;t.exports=function(t){if(void 0===t)return 0;var e=o(t),r=i(e);if(e!==r)throw a("Wrong length or index");return r}},54721:(t,e,r)=>{var n=r(94015),o=r(72191);t.exports=function(t){return n(o(t))}},35206:t=>{var e=Math.ceil,r=Math.floor;t.exports=function(t){var n=+t;return n!=n||0===n?0:(n>0?r:e)(n)}},6674:(t,e,r)=>{var n=r(35206),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},87706:(t,e,r)=>{var n=r(54516),o=r(72191),i=n.Object;t.exports=function(t){return i(o(t))}},4408:(t,e,r)=>{var n=r(54516),o=r(43458),i=n.RangeError;t.exports=function(t,e){var r=o(t);if(r%e)throw i("Wrong offset");return r}},43458:(t,e,r)=>{var n=r(54516),o=r(35206),i=n.RangeError;t.exports=function(t){var e=o(t);if(e<0)throw i("The argument can't be less than 0");return e}},69155:(t,e,r)=>{var n=r(54516),o=r(83264),i=r(3196),a=r(45961),c=r(16040),u=r(8661),s=r(41398),f=n.TypeError,l=s("toPrimitive");t.exports=function(t,e){if(!i(t)||a(t))return t;var r,n=c(t,l);if(n){if(void 0===e&&(e="default"),r=o(n,t,e),!i(r)||a(r))return r;throw f("Can't convert object to primitive value")}return void 0===e&&(e="number"),u(t,e)}},14748:(t,e,r)=>{var n=r(69155),o=r(45961);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},47775:(t,e,r)=>{var n={};n[r(41398)("toStringTag")]="z",t.exports="[object z]"===String(n)},18971:(t,e,r)=>{var n=r(54516),o=r(98619),i=n.String;t.exports=function(t){if("Symbol"===o(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},24128:(t,e,r)=>{var n=r(63241);t.exports=function(t){try{if(n)return Function('return require("'+t+'")')()}catch(t){}}},2854:(t,e,r)=>{var n=r(54516).String;t.exports=function(t){try{return n(t)}catch(t){return"Object"}}},63842:(t,e,r)=>{"use strict";var n=r(57330),o=r(54516),i=r(83264),a=r(44244),c=r(93890),u=r(19548),s=r(25254),f=r(89214),l=r(30654),h=r(81831),p=r(18057),y=r(6674),d=r(88821),v=r(4408),g=r(14748),b=r(37058),m=r(98619),w=r(3196),x=r(45961),_=r(64714),k=r(34973),O=r(14776),S=r(51019).f,A=r(25599),E=r(87265).forEach,P=r(3348),j=r(26337),R=r(77872),M=r(43023),T=r(2993),I=M.get,C=M.set,B=j.f,D=R.f,z=Math.round,L=o.RangeError,N=s.ArrayBuffer,F=N.prototype,U=s.DataView,H=u.NATIVE_ARRAY_BUFFER_VIEWS,G=u.TYPED_ARRAY_CONSTRUCTOR,Y=u.TYPED_ARRAY_TAG,W=u.TypedArray,V=u.TypedArrayPrototype,X=u.aTypedArrayConstructor,q=u.isTypedArray,K="BYTES_PER_ELEMENT",Q="Wrong length",J=function(t,e){X(t);for(var r=0,n=e.length,o=new t(n);n>r;)o[r]=e[r++];return o},Z=function(t,e){B(t,e,{get:function(){return I(this)[e]}})},$=function(t){var e;return k(F,t)||"ArrayBuffer"==(e=m(t))||"SharedArrayBuffer"==e},tt=function(t,e){return q(t)&&!x(e)&&e in t&&p(+e)&&e>=0},et=function(t,e){return e=g(e),tt(t,e)?l(2,t[e]):D(t,e)},rt=function(t,e,r){return e=g(e),!(tt(t,e)&&w(r)&&b(r,"value"))||b(r,"get")||b(r,"set")||r.configurable||b(r,"writable")&&!r.writable||b(r,"enumerable")&&!r.enumerable?B(t,e,r):(t[e]=r.value,t)};a?(H||(R.f=et,j.f=rt,Z(V,"buffer"),Z(V,"byteOffset"),Z(V,"byteLength"),Z(V,"length")),n({target:"Object",stat:!0,forced:!H},{getOwnPropertyDescriptor:et,defineProperty:rt}),t.exports=function(t,e,r){var a=t.match(/\d+$/)[0]/8,u=t+(r?"Clamped":"")+"Array",s="get"+t,l="set"+t,p=o[u],g=p,b=g&&g.prototype,m={},x=function(t,e){B(t,e,{get:function(){return function(t,e){var r=I(t);return r.view[s](e*a+r.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,n){var o=I(t);r&&(n=(n=z(n))<0?0:n>255?255:255&n),o.view[l](e*a+o.byteOffset,n,!0)}(this,e,t)},enumerable:!0})};H?c&&(g=e((function(t,e,r,n){return f(t,b),T(w(e)?$(e)?void 0!==n?new p(e,v(r,a),n):void 0!==r?new p(e,v(r,a)):new p(e):q(e)?J(g,e):i(A,g,e):new p(d(e)),t,g)})),O&&O(g,W),E(S(p),(function(t){t in g||h(g,t,p[t])})),g.prototype=b):(g=e((function(t,e,r,n){f(t,b);var o,c,u,s=0,l=0;if(w(e)){if(!$(e))return q(e)?J(g,e):i(A,g,e);o=e,l=v(r,a);var h=e.byteLength;if(void 0===n){if(h%a)throw L(Q);if((c=h-l)<0)throw L(Q)}else if((c=y(n)*a)+l>h)throw L(Q);u=c/a}else u=d(e),o=new N(c=u*a);for(C(t,{buffer:o,byteOffset:l,byteLength:c,length:u,view:new U(o)});s<u;)x(t,s++)})),O&&O(g,W),b=g.prototype=_(V)),b.constructor!==g&&h(b,"constructor",g),h(b,G,g),Y&&h(b,Y,u),m[u]=g,n({global:!0,forced:g!=p,sham:!H},m),K in g||h(g,K,a),K in b||h(b,K,a),P(u)}):t.exports=function(){}},93890:(t,e,r)=>{var n=r(54516),o=r(13894),i=r(36548),a=r(19548).NATIVE_ARRAY_BUFFER_VIEWS,c=n.ArrayBuffer,u=n.Int8Array;t.exports=!a||!o((function(){u(1)}))||!o((function(){new u(-1)}))||!i((function(t){new u,new u(null),new u(1.5),new u(t)}),!0)||o((function(){return 1!==new u(new c(2),1,void 0).length}))},35967:(t,e,r)=>{var n=r(35040),o=r(62718);t.exports=function(t,e){return n(o(t),e)}},25599:(t,e,r)=>{var n=r(29910),o=r(83264),i=r(52750),a=r(87706),c=r(43716),u=r(29946),s=r(1228),f=r(201),l=r(19548).aTypedArrayConstructor;t.exports=function(t){var e,r,h,p,y,d,v=i(this),g=a(t),b=arguments.length,m=b>1?arguments[1]:void 0,w=void 0!==m,x=s(g);if(x&&!f(x))for(d=(y=u(g,x)).next,g=[];!(p=o(d,y)).done;)g.push(p.value);for(w&&b>2&&(m=n(m,arguments[2])),r=c(g),h=new(l(v))(r),e=0;r>e;e++)h[e]=w?m(g[e],e):g[e];return h}},62718:(t,e,r)=>{var n=r(19548),o=r(72976),i=n.TYPED_ARRAY_CONSTRUCTOR,a=n.aTypedArrayConstructor;t.exports=function(t){return a(o(t,t[i]))}},67025:(t,e,r)=>{var n=r(76277),o=0,i=Math.random(),a=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},88477:(t,e,r)=>{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},n(t)}var o=r(97449);t.exports=o&&!Symbol.sham&&"symbol"==n(Symbol.iterator)},29128:(t,e,r)=>{var n=r(44244),o=r(13894);t.exports=n&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},10645:(t,e,r)=>{var n=r(54516).TypeError;t.exports=function(t,e){if(t<e)throw n("Not enough arguments");return t}},30400:(t,e,r)=>{var n=r(41398);e.f=n},41398:(t,e,r)=>{var n=r(54516),o=r(38365),i=r(37058),a=r(67025),c=r(97449),u=r(88477),s=o("wks"),f=n.Symbol,l=f&&f.for,h=u?f:f&&f.withoutSetter||a;t.exports=function(t){if(!i(s,t)||!c&&"string"!=typeof s[t]){var e="Symbol."+t;c&&i(f,t)?s[t]=f[t]:s[t]=u&&l?l(e):h(e)}return s[t]}},79577:t=>{t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},75294:(t,e,r)=>{"use strict";var n=r(12546),o=r(37058),i=r(81831),a=r(34973),c=r(14776),u=r(79129),s=r(60492),f=r(2993),l=r(91245),h=r(89804),p=r(30530),y=r(81842),d=r(44244),v=r(43310);t.exports=function(t,e,r,g){var b="stackTraceLimit",m=g?2:1,w=t.split("."),x=w[w.length-1],_=n.apply(null,w);if(_){var k=_.prototype;if(!v&&o(k,"cause")&&delete k.cause,!r)return _;var O=n("Error"),S=e((function(t,e){var r=l(g?e:t,void 0),n=g?new _(t):new _;return void 0!==r&&i(n,"message",r),y&&i(n,"stack",p(n.stack,2)),this&&a(k,this)&&f(n,this,S),arguments.length>m&&h(n,arguments[m]),n}));if(S.prototype=k,"Error"!==x?c?c(S,O):u(S,O,{name:!0}):d&&b in _&&(s(S,_,b),s(S,_,"prepareStackTrace")),u(S,_),!v)try{k.name!==x&&i(k,"name",x),k.constructor=S}catch(t){}return S}}},95027:(t,e,r)=>{var n=r(57330),o=r(12546),i=r(2090),a=r(13894),c=r(75294),u="AggregateError",s=o(u),f=!a((function(){return 1!==s([1]).errors[0]}))&&a((function(){return 7!==s([1],u,{cause:7}).cause}));n({global:!0,forced:f},{AggregateError:c(u,(function(t){return function(e,r){return i(t,this,arguments)}}),f,!0)})},33426:(t,e,r)=>{"use strict";var n=r(57330),o=r(54516),i=r(34973),a=r(40175),c=r(14776),u=r(79129),s=r(64714),f=r(81831),l=r(30654),h=r(30530),p=r(89804),y=r(29429),d=r(91245),v=r(41398),g=r(81842),b=v("toStringTag"),m=o.Error,w=[].push,x=function(t,e){var r,n=arguments.length>2?arguments[2]:void 0,o=i(_,this);c?r=c(new m,o?a(this):_):(r=o?this:s(_),f(r,b,"Error")),void 0!==e&&f(r,"message",d(e)),g&&f(r,"stack",h(r.stack,1)),p(r,n);var u=[];return y(t,w,{that:u}),f(r,"errors",u),r};c?c(x,m):u(x,m,{name:!0});var _=x.prototype=s(m.prototype,{constructor:l(1,x),message:l(1,""),name:l(1,"AggregateError")});n({global:!0},{AggregateError:x})},52309:(t,e,r)=>{r(33426)},47185:(t,e,r)=>{"use strict";var n=r(57330),o=r(54516),i=r(25254),a=r(3348),c=i.ArrayBuffer;n({global:!0,forced:o.ArrayBuffer!==c},{ArrayBuffer:c}),a("ArrayBuffer")},6765:(t,e,r)=>{var n=r(57330),o=r(19548);n({target:"ArrayBuffer",stat:!0,forced:!o.NATIVE_ARRAY_BUFFER_VIEWS},{isView:o.isView})},86927:(t,e,r)=>{"use strict";var n=r(57330),o=r(76277),i=r(13894),a=r(25254),c=r(96302),u=r(59625),s=r(6674),f=r(72976),l=a.ArrayBuffer,h=a.DataView,p=h.prototype,y=o(l.prototype.slice),d=o(p.getUint8),v=o(p.setUint8);n({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:i((function(){return!new l(2).slice(1,void 0).byteLength}))},{slice:function(t,e){if(y&&void 0===e)return y(c(this),t);for(var r=c(this).byteLength,n=u(t,r),o=u(void 0===e?r:e,r),i=new(f(this,l))(s(o-n)),a=new h(this),p=new h(i),g=0;n<o;)v(p,g++,d(a,n++));return i}})},78667:(t,e,r)=>{"use strict";var n=r(57330),o=r(87706),i=r(43716),a=r(35206),c=r(86278);n({target:"Array",proto:!0},{at:function(t){var e=o(this),r=i(e),n=a(t),c=n>=0?n:r+n;return c<0||c>=r?void 0:e[c]}}),c("at")},55549:(t,e,r)=>{"use strict";var n=r(57330),o=r(54516),i=r(13894),a=r(85588),c=r(3196),u=r(87706),s=r(43716),f=r(80955),l=r(29400),h=r(1309),p=r(41398),y=r(49229),d=p("isConcatSpreadable"),v=9007199254740991,g="Maximum allowed index exceeded",b=o.TypeError,m=y>=51||!i((function(){var t=[];return t[d]=!1,t.concat()[0]!==t})),w=h("concat"),x=function(t){if(!c(t))return!1;var e=t[d];return void 0!==e?!!e:a(t)};n({target:"Array",proto:!0,forced:!m||!w},{concat:function(t){var e,r,n,o,i,a=u(this),c=l(a,0),h=0;for(e=-1,n=arguments.length;e<n;e++)if(x(i=-1===e?a:arguments[e])){if(h+(o=s(i))>v)throw b(g);for(r=0;r<o;r++,h++)r in i&&f(c,h,i[r])}else{if(h>=v)throw b(g);f(c,h++,i)}return c.length=h,c}})},12042:(t,e,r)=>{var n=r(57330),o=r(92316),i=r(86278);n({target:"Array",proto:!0},{copyWithin:o}),i("copyWithin")},70079:(t,e,r)=>{"use strict";var n=r(57330),o=r(87265).every;n({target:"Array",proto:!0,forced:!r(39904)("every")},{every:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},69979:(t,e,r)=>{var n=r(57330),o=r(47774),i=r(86278);n({target:"Array",proto:!0},{fill:o}),i("fill")},91910:(t,e,r)=>{"use strict";var n=r(57330),o=r(87265).filter;n({target:"Array",proto:!0,forced:!r(1309)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},52947:(t,e,r)=>{"use strict";var n=r(57330),o=r(87265).findIndex,i=r(86278),a="findIndex",c=!0;a in[]&&Array(1).findIndex((function(){c=!1})),n({target:"Array",proto:!0,forced:c},{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i(a)},42426:(t,e,r)=>{"use strict";var n=r(57330),o=r(87265).find,i=r(86278),a="find",c=!0;a in[]&&Array(1).find((function(){c=!1})),n({target:"Array",proto:!0,forced:c},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i(a)},67352:(t,e,r)=>{"use strict";var n=r(57330),o=r(25790),i=r(88965),a=r(87706),c=r(43716),u=r(29400);n({target:"Array",proto:!0},{flatMap:function(t){var e,r=a(this),n=c(r);return i(t),(e=u(r,0)).length=o(e,r,r,n,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},17620:(t,e,r)=>{"use strict";var n=r(57330),o=r(25790),i=r(87706),a=r(43716),c=r(35206),u=r(29400);n({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=i(this),r=a(e),n=u(e,0);return n.length=o(n,e,e,r,0,void 0===t?1:c(t)),n}})},4293:(t,e,r)=>{"use strict";var n=r(57330),o=r(39682);n({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},30281:(t,e,r)=>{var n=r(57330),o=r(11956);n({target:"Array",stat:!0,forced:!r(36548)((function(t){Array.from(t)}))},{from:o})},23949:(t,e,r)=>{"use strict";var n=r(57330),o=r(60452).includes,i=r(86278);n({target:"Array",proto:!0},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},35963:(t,e,r)=>{"use strict";var n=r(57330),o=r(76277),i=r(60452).indexOf,a=r(39904),c=o([].indexOf),u=!!c&&1/c([1],1,-0)<0,s=a("indexOf");n({target:"Array",proto:!0,forced:u||!s},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return u?c(this,t,e)||0:i(this,t,e)}})},8851:(t,e,r)=>{r(57330)({target:"Array",stat:!0},{isArray:r(85588)})},24133:(t,e,r)=>{"use strict";var n=r(54721),o=r(86278),i=r(53415),a=r(43023),c=r(26337).f,u=r(96837),s=r(43310),f=r(44244),l="Array Iterator",h=a.set,p=a.getterFor(l);t.exports=u(Array,"Array",(function(t,e){h(this,{type:l,target:n(t),index:0,kind:e})}),(function(){var t=p(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");var y=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!s&&f&&"values"!==y.name)try{c(y,"name",{value:"values"})}catch(t){}},33448:(t,e,r)=>{"use strict";var n=r(57330),o=r(76277),i=r(94015),a=r(54721),c=r(39904),u=o([].join),s=i!=Object,f=c("join",",");n({target:"Array",proto:!0,forced:s||!f},{join:function(t){return u(a(this),void 0===t?",":t)}})},7311:(t,e,r)=>{var n=r(57330),o=r(85773);n({target:"Array",proto:!0,forced:o!==[].lastIndexOf},{lastIndexOf:o})},16798:(t,e,r)=>{"use strict";var n=r(57330),o=r(87265).map;n({target:"Array",proto:!0,forced:!r(1309)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},21145:(t,e,r)=>{"use strict";var n=r(57330),o=r(54516),i=r(13894),a=r(53924),c=r(80955),u=o.Array;n({target:"Array",stat:!0,forced:i((function(){function t(){}return!(u.of.call(t)instanceof t)}))},{of:function(){for(var t=0,e=arguments.length,r=new(a(this)?this:u)(e);e>t;)c(r,t,arguments[t++]);return r.length=e,r}})},15618:(t,e,r)=>{"use strict";var n=r(57330),o=r(73333).right,i=r(39904),a=r(49229),c=r(63241);n({target:"Array",proto:!0,forced:!i("reduceRight")||!c&&a>79&&a<83},{reduceRight:function(t){return o(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},9253:(t,e,r)=>{"use strict";var n=r(57330),o=r(73333).left,i=r(39904),a=r(49229),c=r(63241);n({target:"Array",proto:!0,forced:!i("reduce")||!c&&a>79&&a<83},{reduce:function(t){var e=arguments.length;return o(this,t,e,e>1?arguments[1]:void 0)}})},81364:(t,e,r)=>{"use strict";var n=r(57330),o=r(76277),i=r(85588),a=o([].reverse),c=[1,2];n({target:"Array",proto:!0,forced:String(c)===String(c.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),a(this)}})},55635:(t,e,r)=>{"use strict";var n=r(57330),o=r(54516),i=r(85588),a=r(53924),c=r(3196),u=r(59625),s=r(43716),f=r(54721),l=r(80955),h=r(41398),p=r(1309),y=r(52999),d=p("slice"),v=h("species"),g=o.Array,b=Math.max;n({target:"Array",proto:!0,forced:!d},{slice:function(t,e){var r,n,o,h=f(this),p=s(h),d=u(t,p),m=u(void 0===e?p:e,p);if(i(h)&&(r=h.constructor,(a(r)&&(r===g||i(r.prototype))||c(r)&&null===(r=r[v]))&&(r=void 0),r===g||void 0===r))return y(h,d,m);for(n=new(void 0===r?g:r)(b(m-d,0)),o=0;d<m;d++,o++)d in h&&l(n,o,h[d]);return n.length=o,n}})},92550:(t,e,r)=>{"use strict";var n=r(57330),o=r(87265).some;n({target:"Array",proto:!0,forced:!r(39904)("some")},{some:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},16087:(t,e,r)=>{"use strict";var n=r(57330),o=r(76277),i=r(88965),a=r(87706),c=r(43716),u=r(18971),s=r(13894),f=r(53347),l=r(39904),h=r(50419),p=r(72693),y=r(49229),d=r(90602),v=[],g=o(v.sort),b=o(v.push),m=s((function(){v.sort(void 0)})),w=s((function(){v.sort(null)})),x=l("sort"),_=!s((function(){if(y)return y<70;if(!(h&&h>3)){if(p)return!0;if(d)return d<603;var t,e,r,n,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)v.push({k:e+n,v:r})}for(v.sort((function(t,e){return e.v-t.v})),n=0;n<v.length;n++)e=v[n].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));n({target:"Array",proto:!0,forced:m||!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 r,n,o=[],s=c(e);for(n=0;n<s;n++)n in e&&b(o,e[n]);for(f(o,function(t){return function(e,r){return void 0===r?-1:void 0===e?1:void 0!==t?+t(e,r)||0:u(e)>u(r)?1:-1}}(t)),r=o.length,n=0;n<r;)e[n]=o[n++];for(;n<s;)delete e[n++];return e}})},26568:(t,e,r)=>{r(3348)("Array")},14747:(t,e,r)=>{"use strict";var n=r(57330),o=r(54516),i=r(59625),a=r(35206),c=r(43716),u=r(87706),s=r(29400),f=r(80955),l=r(1309)("splice"),h=o.TypeError,p=Math.max,y=Math.min,d=9007199254740991,v="Maximum allowed length exceeded";n({target:"Array",proto:!0,forced:!l},{splice:function(t,e){var r,n,o,l,g,b,m=u(this),w=c(m),x=i(t,w),_=arguments.length;if(0===_?r=n=0:1===_?(r=0,n=w-x):(r=_-2,n=y(p(a(e),0),w-x)),w+r-n>d)throw h(v);for(o=s(m,n),l=0;l<n;l++)(g=x+l)in m&&f(o,l,m[g]);if(o.length=n,r<n){for(l=x;l<w-n;l++)b=l+r,(g=l+n)in m?m[b]=m[g]:delete m[b];for(l=w;l>w-n+r;l--)delete m[l-1]}else if(r>n)for(l=w-n;l>x;l--)b=l+r-1,(g=l+n-1)in m?m[b]=m[g]:delete m[b];for(l=0;l<r;l++)m[l+x]=arguments[l+2];return m.length=w-n+r,o}})},16021:(t,e,r)=>{r(86278)("flatMap")},5162:(t,e,r)=>{r(86278)("flat")},25525:(t,e,r)=>{var n=r(57330),o=r(25254);n({global:!0,forced:!r(34991)},{DataView:o.DataView})},43542:(t,e,r)=>{r(25525)},20623:(t,e,r)=>{"use strict";var n=r(57330),o=r(76277),i=r(13894)((function(){return 120!==new Date(16e11).getYear()})),a=o(Date.prototype.getFullYear);n({target:"Date",proto:!0,forced:i},{getYear:function(){return a(this)-1900}})},22074:(t,e,r)=>{var n=r(57330),o=r(54516),i=r(76277),a=o.Date,c=i(a.prototype.getTime);n({target:"Date",stat:!0},{now:function(){return c(new a)}})},44837:(t,e,r)=>{"use strict";var n=r(57330),o=r(76277),i=r(35206),a=Date.prototype,c=o(a.getTime),u=o(a.setFullYear);n({target:"Date",proto:!0},{setYear:function(t){c(this);var e=i(t);return u(this,0<=e&&e<=99?e+1900:e)}})},36688:(t,e,r)=>{r(57330)({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})},45938:(t,e,r)=>{var n=r(57330),o=r(85833);n({target:"Date",proto:!0,forced:Date.prototype.toISOString!==o},{toISOString:o})},75640:(t,e,r)=>{"use strict";var n=r(57330),o=r(13894),i=r(87706),a=r(69155);n({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),r=a(e,"number");return"number"!=typeof r||isFinite(r)?e.toISOString():null}})},98665:(t,e,r)=>{var n=r(37058),o=r(68875),i=r(72473),a=r(41398)("toPrimitive"),c=Date.prototype;n(c,a)||o(c,a,i)},72003:(t,e,r)=>{var n=r(76277),o=r(68875),i=Date.prototype,a="Invalid Date",c=n(i.toString),u=n(i.getTime);String(new Date(NaN))!=a&&o(i,"toString",(function(){var t=u(this);return t==t?c(this):a}))},19337:(t,e,r)=>{var n=r(57330),o=r(54516),i=r(2090),a=r(75294),c=o.WebAssembly,u=7!==Error("e",{cause:7}).cause,s=function(t,e){var r={};r[t]=a(t,e,u),n({global:!0,forced:u},r)},f=function(t,e){if(c&&c[t]){var r={};r[t]=a("WebAssembly."+t,e,u),n({target:"WebAssembly",stat:!0,forced:u},r)}};s("Error",(function(t){return function(e){return i(t,this,arguments)}})),s("EvalError",(function(t){return function(e){return i(t,this,arguments)}})),s("RangeError",(function(t){return function(e){return i(t,this,arguments)}})),s("ReferenceError",(function(t){return function(e){return i(t,this,arguments)}})),s("SyntaxError",(function(t){return function(e){return i(t,this,arguments)}})),s("TypeError",(function(t){return function(e){return i(t,this,arguments)}})),s("URIError",(function(t){return function(e){return i(t,this,arguments)}})),f("CompileError",(function(t){return function(e){return i(t,this,arguments)}})),f("LinkError",(function(t){return function(e){return i(t,this,arguments)}})),f("RuntimeError",(function(t){return function(e){return i(t,this,arguments)}}))},141:(t,e,r)=>{var n=r(68875),o=r(34019),i=Error.prototype;i.toString!==o&&n(i,"toString",o)},15034:(t,e,r)=>{"use strict";var n=r(57330),o=r(76277),i=r(18971),a=o("".charAt),c=o("".charCodeAt),u=o(/./.exec),s=o(1..toString),f=o("".toUpperCase),l=/[\w*+\-./@]/,h=function(t,e){for(var r=s(t,16);r.length<e;)r="0"+r;return r};n({global:!0},{escape:function(t){for(var e,r,n=i(t),o="",s=n.length,p=0;p<s;)e=a(n,p++),u(l,e)?o+=e:o+=(r=c(e,0))<256?"%"+h(r,2):"%u"+f(h(r,4));return o}})},47125:(t,e,r)=>{var n=r(57330),o=r(80944);n({target:"Function",proto:!0,forced:Function.bind!==o},{bind:o})},75004:(t,e,r)=>{"use strict";var n=r(34230),o=r(3196),i=r(26337),a=r(40175),c=r(41398)("hasInstance"),u=Function.prototype;c in u||i.f(u,c,{value:function(t){if(!n(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}})},68825:(t,e,r)=>{var n=r(44244),o=r(33385).EXISTS,i=r(76277),a=r(26337).f,c=Function.prototype,u=i(c.toString),s=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,f=i(s.exec);n&&!o&&a(c,"name",{configurable:!0,get:function(){try{return f(s,u(this))[1]}catch(t){return""}}})},78026:(t,e,r)=>{r(57330)({global:!0},{globalThis:r(54516)})},83761:(t,e,r)=>{var n=r(57330),o=r(12546),i=r(2090),a=r(83264),c=r(76277),u=r(13894),s=r(85588),f=r(34230),l=r(3196),h=r(45961),p=r(52999),y=r(97449),d=o("JSON","stringify"),v=c(/./.exec),g=c("".charAt),b=c("".charCodeAt),m=c("".replace),w=c(1..toString),x=/[\uD800-\uDFFF]/g,_=/^[\uD800-\uDBFF]$/,k=/^[\uDC00-\uDFFF]$/,O=!y||u((function(){var t=o("Symbol")();return"[null]"!=d([t])||"{}"!=d({a:t})||"{}"!=d(Object(t))})),S=u((function(){return'"\\udf06\\ud834"'!==d("\udf06\ud834")||'"\\udead"'!==d("\udead")})),A=function(t,e){var r=p(arguments),n=e;if((l(e)||void 0!==t)&&!h(t))return s(e)||(e=function(t,e){if(f(n)&&(e=a(n,this,t,e)),!h(e))return e}),r[1]=e,i(d,null,r)},E=function(t,e,r){var n=g(r,e-1),o=g(r,e+1);return v(_,t)&&!v(k,o)||v(k,t)&&!v(_,n)?"\\u"+w(b(t,0),16):t};d&&n({target:"JSON",stat:!0,forced:O||S},{stringify:function(t,e,r){var n=p(arguments),o=i(O?A:d,null,n);return S&&"string"==typeof o?m(o,x,E):o}})},5582:(t,e,r)=>{var n=r(54516);r(81018)(n.JSON,"JSON",!0)},69890:(t,e,r)=>{"use strict";r(48756)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(78704))},48499:(t,e,r)=>{r(69890)},80989:(t,e,r)=>{var n=r(57330),o=r(43611),i=Math.acosh,a=Math.log,c=Math.sqrt,u=Math.LN2;n({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)+u:o(t-1+c(t-1)*c(t+1))}})},53733:(t,e,r)=>{var n=r(57330),o=Math.asinh,i=Math.log,a=Math.sqrt;n({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}})},68747:(t,e,r)=>{var n=r(57330),o=Math.atanh,i=Math.log;n({target:"Math",stat:!0,forced:!(o&&1/o(-0)<0)},{atanh:function(t){return 0==(t=+t)?t:i((1+t)/(1-t))/2}})},92098:(t,e,r)=>{var n=r(57330),o=r(54059),i=Math.abs,a=Math.pow;n({target:"Math",stat:!0},{cbrt:function(t){return o(t=+t)*a(i(t),1/3)}})},73694:(t,e,r)=>{var n=r(57330),o=Math.floor,i=Math.log,a=Math.LOG2E;n({target:"Math",stat:!0},{clz32:function(t){return(t>>>=0)?31-o(i(t+.5)*a):32}})},15975:(t,e,r)=>{var n=r(57330),o=r(45446),i=Math.cosh,a=Math.abs,c=Math.E;n({target:"Math",stat:!0,forced:!i||i(710)===1/0},{cosh:function(t){var e=o(a(t)-1)+1;return(e+1/(e*c*c))*(c/2)}})},43797:(t,e,r)=>{var n=r(57330),o=r(45446);n({target:"Math",stat:!0,forced:o!=Math.expm1},{expm1:o})},39286:(t,e,r)=>{r(57330)({target:"Math",stat:!0},{fround:r(49281)})},56791:(t,e,r)=>{var n=r(57330),o=Math.hypot,i=Math.abs,a=Math.sqrt;n({target:"Math",stat:!0,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function(t,e){for(var r,n,o=0,c=0,u=arguments.length,s=0;c<u;)s<(r=i(arguments[c++]))?(o=o*(n=s/r)*n+1,s=r):o+=r>0?(n=r/s)*n:r;return s===1/0?1/0:s*a(o)}})},73992:(t,e,r)=>{var n=r(57330),o=r(13894),i=Math.imul;n({target:"Math",stat:!0,forced:o((function(){return-5!=i(4294967295,5)||2!=i.length}))},{imul:function(t,e){var r=65535,n=+t,o=+e,i=r&n,a=r&o;return 0|i*a+((r&n>>>16)*a+i*(r&o>>>16)<<16>>>0)}})},28161:(t,e,r)=>{r(57330)({target:"Math",stat:!0},{log10:r(36200)})},30368:(t,e,r)=>{r(57330)({target:"Math",stat:!0},{log1p:r(43611)})},63358:(t,e,r)=>{var n=r(57330),o=Math.log,i=Math.LN2;n({target:"Math",stat:!0},{log2:function(t){return o(t)/i}})},80900:(t,e,r)=>{r(57330)({target:"Math",stat:!0},{sign:r(54059)})},85765:(t,e,r)=>{var n=r(57330),o=r(13894),i=r(45446),a=Math.abs,c=Math.exp,u=Math.E;n({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:(c(t-1)-c(-t-1))*(u/2)}})},39680:(t,e,r)=>{var n=r(57330),o=r(45446),i=Math.exp;n({target:"Math",stat:!0},{tanh:function(t){var e=o(t=+t),r=o(-t);return e==1/0?1:r==1/0?-1:(e-r)/(i(t)+i(-t))}})},4141:(t,e,r)=>{r(81018)(Math,"Math",!0)},60765:(t,e,r)=>{var n=r(57330),o=Math.ceil,i=Math.floor;n({target:"Math",stat:!0},{trunc:function(t){return(t>0?i:o)(t)}})},66586:(t,e,r)=>{"use strict";var n=r(44244),o=r(54516),i=r(76277),a=r(82615),c=r(68875),u=r(37058),s=r(2993),f=r(34973),l=r(45961),h=r(69155),p=r(13894),y=r(51019).f,d=r(77872).f,v=r(26337).f,g=r(71047),b=r(23688).trim,m="Number",w=o.Number,x=w.prototype,_=o.TypeError,k=i("".slice),O=i("".charCodeAt),S=function(t){var e=h(t,"number");return"bigint"==typeof e?e:A(e)},A=function(t){var e,r,n,o,i,a,c,u,s=h(t,"number");if(l(s))throw _("Cannot convert a Symbol value to a number");if("string"==typeof s&&s.length>2)if(s=b(s),43===(e=O(s,0))||45===e){if(88===(r=O(s,2))||120===r)return NaN}else if(48===e){switch(O(s,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+s}for(a=(i=k(s,2)).length,c=0;c<a;c++)if((u=O(i,c))<48||u>o)return NaN;return parseInt(i,n)}return+s};if(a(m,!w(" 0o1")||!w("0b1")||w("+0x1"))){for(var E,P=function(t){var e=arguments.length<1?0:w(S(t)),r=this;return f(x,r)&&p((function(){g(r)}))?s(Object(e),r,P):e},j=n?y(w):"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(","),R=0;j.length>R;R++)u(w,E=j[R])&&!u(P,E)&&v(P,E,d(w,E));P.prototype=x,x.constructor=P,c(o,m,P)}},5225:(t,e,r)=>{r(57330)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},52497:(t,e,r)=>{r(57330)({target:"Number",stat:!0},{isFinite:r(23034)})},28582:(t,e,r)=>{r(57330)({target:"Number",stat:!0},{isInteger:r(18057)})},53470:(t,e,r)=>{r(57330)({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},42675:(t,e,r)=>{var n=r(57330),o=r(18057),i=Math.abs;n({target:"Number",stat:!0},{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},31035:(t,e,r)=>{r(57330)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},39192:(t,e,r)=>{r(57330)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},68760:(t,e,r)=>{var n=r(57330),o=r(29818);n({target:"Number",stat:!0,forced:Number.parseFloat!=o},{parseFloat:o})},92833:(t,e,r)=>{var n=r(57330),o=r(20361);n({target:"Number",stat:!0,forced:Number.parseInt!=o},{parseInt:o})},11936:(t,e,r)=>{"use strict";var n=r(57330),o=r(54516),i=r(76277),a=r(35206),c=r(71047),u=r(23295),s=r(36200),f=r(13894),l=o.RangeError,h=o.String,p=o.isFinite,y=Math.abs,d=Math.floor,v=Math.pow,g=Math.round,b=i(1..toExponential),m=i(u),w=i("".slice),x="-6.9000e-11"===b(-69e-12,4)&&"1.25e+0"===b(1.255,2)&&"1.235e+4"===b(12345,3)&&"3e+1"===b(25,0),_=f((function(){b(1,1/0)}))&&f((function(){b(1,-1/0)})),k=!f((function(){b(1/0,1/0)}))&&!f((function(){b(NaN,1/0)}));n({target:"Number",proto:!0,forced:!x||!_||!k},{toExponential:function(t){var e=c(this);if(void 0===t)return b(e);var r=a(t);if(!p(e))return h(e);if(r<0||r>20)throw l("Incorrect fraction digits");if(x)return b(e,r);var n="",o="",i=0,u="",f="";if(e<0&&(n="-",e=-e),0===e)i=0,o=m("0",r+1);else{var _=s(e);i=d(_);var k=0,O=v(10,i-r);2*e>=(2*(k=g(e/O))+1)*O&&(k+=1),k>=v(10,r+1)&&(k/=10,i+=1),o=h(k)}return 0!==r&&(o=w(o,0,1)+"."+w(o,1)),0===i?(u="+",f="0"):(u=i>0?"+":"-",f=h(y(i))),n+(o+"e")+u+f}})},51246:(t,e,r)=>{"use strict";var n=r(57330),o=r(54516),i=r(76277),a=r(35206),c=r(71047),u=r(23295),s=r(13894),f=o.RangeError,l=o.String,h=Math.floor,p=i(u),y=i("".slice),d=i(1..toFixed),v=function t(e,r,n){return 0===r?n:r%2==1?t(e,r-1,n*e):t(e*e,r/2,n)},g=function(t,e,r){for(var n=-1,o=r;++n<6;)o+=e*t[n],t[n]=o%1e7,o=h(o/1e7)},b=function(t,e){for(var r=6,n=0;--r>=0;)n+=t[r],t[r]=h(n/e),n=n%e*1e7},m=function(t){for(var e=6,r="";--e>=0;)if(""!==r||0===e||0!==t[e]){var n=l(t[e]);r=""===r?n:r+p("0",7-n.length)+n}return r};n({target:"Number",proto:!0,forced:s((function(){return"0.000"!==d(8e-5,3)||"1"!==d(.9,0)||"1.25"!==d(1.255,2)||"1000000000000000128"!==d(0xde0b6b3a7640080,0)}))||!s((function(){d({})}))},{toFixed:function(t){var e,r,n,o,i=c(this),u=a(t),s=[0,0,0,0,0,0],h="",d="0";if(u<0||u>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(r=(e=function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e}(i*v(2,69,1))-69)<0?i*v(2,-e,1):i/v(2,e,1),r*=4503599627370496,(e=52-e)>0){for(g(s,0,r),n=u;n>=7;)g(s,1e7,0),n-=7;for(g(s,v(10,n,1),0),n=e-1;n>=23;)b(s,1<<23),n-=23;b(s,1<<n),g(s,1,1),b(s,2),d=m(s)}else g(s,0,r),g(s,1<<-e,0),d=m(s)+p("0",u);return u>0?h+((o=d.length)<=u?"0."+p("0",u-o)+d:y(d,0,o-u)+"."+y(d,o-u)):h+d}})},38778:(t,e,r)=>{"use strict";var n=r(57330),o=r(76277),i=r(13894),a=r(71047),c=o(1..toPrecision);n({target:"Number",proto:!0,forced:i((function(){return"1"!==c(1,void 0)}))||!i((function(){c({})}))},{toPrecision:function(t){return void 0===t?c(a(this)):c(a(this),t)}})},41450:(t,e,r)=>{var n=r(57330),o=r(70168);n({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},90742:(t,e,r)=>{r(57330)({target:"Object",stat:!0,sham:!r(44244)},{create:r(64714)})},63621:(t,e,r)=>{"use strict";var n=r(57330),o=r(44244),i=r(54046),a=r(88965),c=r(87706),u=r(26337);o&&n({target:"Object",proto:!0,forced:i},{__defineGetter__:function(t,e){u.f(c(this),t,{get:a(e),enumerable:!0,configurable:!0})}})},21741:(t,e,r)=>{var n=r(57330),o=r(44244),i=r(68068).f;n({target:"Object",stat:!0,forced:Object.defineProperties!==i,sham:!o},{defineProperties:i})},52746:(t,e,r)=>{var n=r(57330),o=r(44244),i=r(26337).f;n({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!o},{defineProperty:i})},51834:(t,e,r)=>{"use strict";var n=r(57330),o=r(44244),i=r(54046),a=r(88965),c=r(87706),u=r(26337);o&&n({target:"Object",proto:!0,forced:i},{__defineSetter__:function(t,e){u.f(c(this),t,{set:a(e),enumerable:!0,configurable:!0})}})},71243:(t,e,r)=>{var n=r(57330),o=r(19602).entries;n({target:"Object",stat:!0},{entries:function(t){return o(t)}})},82802:(t,e,r)=>{var n=r(57330),o=r(46151),i=r(13894),a=r(3196),c=r(8420).onFreeze,u=Object.freeze;n({target:"Object",stat:!0,forced:i((function(){u(1)})),sham:!o},{freeze:function(t){return u&&a(t)?u(c(t)):t}})},71881:(t,e,r)=>{var n=r(57330),o=r(29429),i=r(80955);n({target:"Object",stat:!0},{fromEntries:function(t){var e={};return o(t,(function(t,r){i(e,t,r)}),{AS_ENTRIES:!0}),e}})},16146:(t,e,r)=>{var n=r(57330),o=r(13894),i=r(54721),a=r(77872).f,c=r(44244),u=o((function(){a(1)}));n({target:"Object",stat:!0,forced:!c||u,sham:!c},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}})},89960:(t,e,r)=>{var n=r(57330),o=r(44244),i=r(16660),a=r(54721),c=r(77872),u=r(80955);n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,r,n=a(t),o=c.f,s=i(n),f={},l=0;s.length>l;)void 0!==(r=o(n,e=s[l++]))&&u(f,e,r);return f}})},13694:(t,e,r)=>{var n=r(57330),o=r(13894),i=r(53990).f;n({target:"Object",stat:!0,forced:o((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:i})},40520:(t,e,r)=>{var n=r(57330),o=r(97449),i=r(13894),a=r(78586),c=r(87706);n({target:"Object",stat:!0,forced:!o||i((function(){a.f(1)}))},{getOwnPropertySymbols:function(t){var e=a.f;return e?e(c(t)):[]}})},46748:(t,e,r)=>{var n=r(57330),o=r(13894),i=r(87706),a=r(40175),c=r(66336);n({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!c},{getPrototypeOf:function(t){return a(i(t))}})},9389:(t,e,r)=>{r(57330)({target:"Object",stat:!0},{hasOwn:r(37058)})},93406:(t,e,r)=>{var n=r(57330),o=r(54284);n({target:"Object",stat:!0,forced:Object.isExtensible!==o},{isExtensible:o})},44292:(t,e,r)=>{var n=r(57330),o=r(13894),i=r(3196),a=r(31030),c=r(47698),u=Object.isFrozen;n({target:"Object",stat:!0,forced:o((function(){u(1)}))||c},{isFrozen:function(t){return!i(t)||!(!c||"ArrayBuffer"!=a(t))||!!u&&u(t)}})},57285:(t,e,r)=>{var n=r(57330),o=r(13894),i=r(3196),a=r(31030),c=r(47698),u=Object.isSealed;n({target:"Object",stat:!0,forced:o((function(){u(1)}))||c},{isSealed:function(t){return!i(t)||!(!c||"ArrayBuffer"!=a(t))||!!u&&u(t)}})},94482:(t,e,r)=>{r(57330)({target:"Object",stat:!0},{is:r(79094)})},23484:(t,e,r)=>{var n=r(57330),o=r(87706),i=r(68201);n({target:"Object",stat:!0,forced:r(13894)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},35643:(t,e,r)=>{"use strict";var n=r(57330),o=r(44244),i=r(54046),a=r(87706),c=r(14748),u=r(40175),s=r(77872).f;o&&n({target:"Object",proto:!0,forced:i},{__lookupGetter__:function(t){var e,r=a(this),n=c(t);do{if(e=s(r,n))return e.get}while(r=u(r))}})},13148:(t,e,r)=>{"use strict";var n=r(57330),o=r(44244),i=r(54046),a=r(87706),c=r(14748),u=r(40175),s=r(77872).f;o&&n({target:"Object",proto:!0,forced:i},{__lookupSetter__:function(t){var e,r=a(this),n=c(t);do{if(e=s(r,n))return e.set}while(r=u(r))}})},93219:(t,e,r)=>{var n=r(57330),o=r(3196),i=r(8420).onFreeze,a=r(46151),c=r(13894),u=Object.preventExtensions;n({target:"Object",stat:!0,forced:c((function(){u(1)})),sham:!a},{preventExtensions:function(t){return u&&o(t)?u(i(t)):t}})},31079:(t,e,r)=>{var n=r(57330),o=r(3196),i=r(8420).onFreeze,a=r(46151),c=r(13894),u=Object.seal;n({target:"Object",stat:!0,forced:c((function(){u(1)})),sham:!a},{seal:function(t){return u&&o(t)?u(i(t)):t}})},30419:(t,e,r)=>{r(57330)({target:"Object",stat:!0},{setPrototypeOf:r(14776)})},69376:(t,e,r)=>{var n=r(47775),o=r(68875),i=r(5719);n||o(Object.prototype,"toString",i,{unsafe:!0})},86242:(t,e,r)=>{var n=r(57330),o=r(19602).values;n({target:"Object",stat:!0},{values:function(t){return o(t)}})},43161:(t,e,r)=>{var n=r(57330),o=r(29818);n({global:!0,forced:parseFloat!=o},{parseFloat:o})},84125:(t,e,r)=>{var n=r(57330),o=r(20361);n({global:!0,forced:parseInt!=o},{parseInt:o})},79200:(t,e,r)=>{"use strict";var n=r(57330),o=r(83264),i=r(88965),a=r(82487),c=r(93798),u=r(29429);n({target:"Promise",stat:!0},{allSettled:function(t){var e=this,r=a.f(e),n=r.resolve,s=r.reject,f=c((function(){var r=i(e.resolve),a=[],c=0,s=1;u(t,(function(t){var i=c++,u=!1;s++,o(r,e,t).then((function(t){u||(u=!0,a[i]={status:"fulfilled",value:t},--s||n(a))}),(function(t){u||(u=!0,a[i]={status:"rejected",reason:t},--s||n(a))}))})),--s||n(a)}));return f.error&&s(f.value),r.promise}})},89396:(t,e,r)=>{"use strict";var n=r(57330),o=r(83264),i=r(88965),a=r(82487),c=r(93798),u=r(29429);n({target:"Promise",stat:!0,forced:r(48006)},{all:function(t){var e=this,r=a.f(e),n=r.resolve,s=r.reject,f=c((function(){var r=i(e.resolve),a=[],c=0,f=1;u(t,(function(t){var i=c++,u=!1;f++,o(r,e,t).then((function(t){u||(u=!0,a[i]=t,--f||n(a))}),s)})),--f||n(a)}));return f.error&&s(f.value),r.promise}})},52440:(t,e,r)=>{"use strict";var n=r(57330),o=r(83264),i=r(88965),a=r(12546),c=r(82487),u=r(93798),s=r(29429),f="No one promise resolved";n({target:"Promise",stat:!0},{any:function(t){var e=this,r=a("AggregateError"),n=c.f(e),l=n.resolve,h=n.reject,p=u((function(){var n=i(e.resolve),a=[],c=0,u=1,p=!1;s(t,(function(t){var i=c++,s=!1;u++,o(n,e,t).then((function(t){s||p||(p=!0,l(t))}),(function(t){s||p||(s=!0,a[i]=t,--u||h(new r(a,f)))}))})),--u||h(new r(a,f))}));return p.error&&h(p.value),n.promise}})},71938:(t,e,r)=>{"use strict";var n=r(57330),o=r(43310),i=r(86177).CONSTRUCTOR,a=r(32522),c=r(12546),u=r(34230),s=r(68875),f=a&&a.prototype;if(n({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(t){return this.then(void 0,t)}}),!o&&u(a)){var l=c("Promise").prototype.catch;f.catch!==l&&s(f,"catch",l,{unsafe:!0})}},30993:(t,e,r)=>{"use strict";var n,o,i,a=r(57330),c=r(43310),u=r(63241),s=r(54516),f=r(83264),l=r(68875),h=r(83572),p=r(14776),y=r(81018),d=r(3348),v=r(88965),g=r(34230),b=r(3196),m=r(89214),w=r(72976),x=r(33394).set,_=r(54653),k=r(45471),O=r(93798),S=r(7822),A=r(43023),E=r(32522),P=r(86177),j=r(82487),R="Promise",M=P.CONSTRUCTOR,T=P.REJECTION_EVENT,I=P.SUBCLASSING,C=A.getterFor(R),B=A.set,D=E&&E.prototype,z=E,L=D,N=s.TypeError,F=s.document,U=s.process,H=j.f,G=H,Y=!!(F&&F.createEvent&&s.dispatchEvent),W="unhandledrejection",V=function(t){var e;return!(!b(t)||!g(e=t.then))&&e},X=function(t,e){var r,n,o,i=e.value,a=1==e.state,c=a?t.ok:t.fail,u=t.resolve,s=t.reject,l=t.domain;try{c?(a||(2===e.rejection&&Z(e),e.rejection=1),!0===c?r=i:(l&&l.enter(),r=c(i),l&&(l.exit(),o=!0)),r===t.promise?s(N("Promise-chain cycle")):(n=V(r))?f(n,r,u,s):u(r)):s(i)}catch(t){l&&!o&&l.exit(),s(t)}},q=function(t,e){t.notified||(t.notified=!0,_((function(){for(var r,n=t.reactions;r=n.get();)X(r,t);t.notified=!1,e&&!t.rejection&&Q(t)})))},K=function(t,e,r){var n,o;Y?((n=F.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),s.dispatchEvent(n)):n={promise:e,reason:r},!T&&(o=s["on"+t])?o(n):t===W&&k("Unhandled promise rejection",r)},Q=function(t){f(x,s,(function(){var e,r=t.facade,n=t.value;if(J(t)&&(e=O((function(){u?U.emit("unhandledRejection",n,r):K(W,r,n)})),t.rejection=u||J(t)?2:1,e.error))throw e.value}))},J=function(t){return 1!==t.rejection&&!t.parent},Z=function(t){f(x,s,(function(){var e=t.facade;u?U.emit("rejectionHandled",e):K("rejectionhandled",e,t.value)}))},$=function(t,e,r){return function(n){t(e,n,r)}},tt=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,q(t,!0))},et=function t(e,r,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===r)throw N("Promise can't be resolved itself");var o=V(r);o?_((function(){var n={done:!1};try{f(o,r,$(t,n,e),$(tt,n,e))}catch(t){tt(n,t,e)}})):(e.value=r,e.state=1,q(e,!1))}catch(t){tt({done:!1},t,e)}}};if(M&&(L=(z=function(t){m(this,L),v(t),f(n,this);var e=C(this);try{t($(et,e),$(tt,e))}catch(t){tt(e,t)}}).prototype,(n=function(t){B(this,{type:R,done:!1,notified:!1,parent:!1,reactions:new S,rejection:!1,state:0,value:void 0})}).prototype=h(L,{then:function(t,e){var r=C(this),n=H(w(this,z));return r.parent=!0,n.ok=!g(t)||t,n.fail=g(e)&&e,n.domain=u?U.domain:void 0,0==r.state?r.reactions.add(n):_((function(){X(n,r)})),n.promise}}),o=function(){var t=new n,e=C(t);this.promise=t,this.resolve=$(et,e),this.reject=$(tt,e)},j.f=H=function(t){return t===z||void 0===t?new o(t):G(t)},!c&&g(E)&&D!==Object.prototype)){i=D.then,I||l(D,"then",(function(t,e){var r=this;return new z((function(t,e){f(i,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete D.constructor}catch(t){}p&&p(D,L)}a({global:!0,wrap:!0,forced:M},{Promise:z}),y(z,R,!1,!0),d(R)},6804:(t,e,r)=>{"use strict";var n=r(57330),o=r(43310),i=r(32522),a=r(13894),c=r(12546),u=r(34230),s=r(72976),f=r(37494),l=r(68875),h=i&&i.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){h.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=s(this,c("Promise")),r=u(t);return this.then(r?function(r){return f(e,t()).then((function(){return r}))}:t,r?function(r){return f(e,t()).then((function(){throw r}))}:t)}}),!o&&u(i)){var p=c("Promise").prototype.finally;h.finally!==p&&l(h,"finally",p,{unsafe:!0})}},26037:(t,e,r)=>{r(30993),r(89396),r(71938),r(84237),r(70794),r(49173)},84237:(t,e,r)=>{"use strict";var n=r(57330),o=r(83264),i=r(88965),a=r(82487),c=r(93798),u=r(29429);n({target:"Promise",stat:!0,forced:r(48006)},{race:function(t){var e=this,r=a.f(e),n=r.reject,s=c((function(){var a=i(e.resolve);u(t,(function(t){o(a,e,t).then(r.resolve,n)}))}));return s.error&&n(s.value),r.promise}})},70794:(t,e,r)=>{"use strict";var n=r(57330),o=r(83264),i=r(82487);n({target:"Promise",stat:!0,forced:r(86177).CONSTRUCTOR},{reject:function(t){var e=i.f(this);return o(e.reject,void 0,t),e.promise}})},49173:(t,e,r)=>{"use strict";var n=r(57330),o=r(12546),i=r(43310),a=r(32522),c=r(86177).CONSTRUCTOR,u=r(37494),s=o("Promise"),f=i&&!c;n({target:"Promise",stat:!0,forced:i||c},{resolve:function(t){return u(f&&this===s?a:this,t)}})},97800:(t,e,r)=>{var n=r(57330),o=r(2090),i=r(88965),a=r(96302);n({target:"Reflect",stat:!0,forced:!r(13894)((function(){Reflect.apply((function(){}))}))},{apply:function(t,e,r){return o(i(t),e,a(r))}})},96620:(t,e,r)=>{var n=r(57330),o=r(12546),i=r(2090),a=r(80944),c=r(52750),u=r(96302),s=r(3196),f=r(64714),l=r(13894),h=o("Reflect","construct"),p=Object.prototype,y=[].push,d=l((function(){function t(){}return!(h((function(){}),[],t)instanceof t)})),v=!l((function(){h((function(){}))})),g=d||v;n({target:"Reflect",stat:!0,forced:g,sham:g},{construct:function(t,e){c(t),u(e);var r=arguments.length<3?t:c(arguments[2]);if(v&&!d)return h(t,e,r);if(t==r){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 n=[null];return i(y,n,e),new(i(a,t,n))}var o=r.prototype,l=f(s(o)?o:p),g=i(t,l,e);return s(g)?g:l}})},78964:(t,e,r)=>{var n=r(57330),o=r(44244),i=r(96302),a=r(14748),c=r(26337);n({target:"Reflect",stat:!0,forced:r(13894)((function(){Reflect.defineProperty(c.f({},1,{value:1}),1,{value:2})})),sham:!o},{defineProperty:function(t,e,r){i(t);var n=a(e);i(r);try{return c.f(t,n,r),!0}catch(t){return!1}}})},26204:(t,e,r)=>{var n=r(57330),o=r(96302),i=r(77872).f;n({target:"Reflect",stat:!0},{deleteProperty:function(t,e){var r=i(o(t),e);return!(r&&!r.configurable)&&delete t[e]}})},1615:(t,e,r)=>{var n=r(57330),o=r(44244),i=r(96302),a=r(77872);n({target:"Reflect",stat:!0,sham:!o},{getOwnPropertyDescriptor:function(t,e){return a.f(i(t),e)}})},48590:(t,e,r)=>{var n=r(57330),o=r(96302),i=r(40175);n({target:"Reflect",stat:!0,sham:!r(66336)},{getPrototypeOf:function(t){return i(o(t))}})},88011:(t,e,r)=>{var n=r(57330),o=r(83264),i=r(3196),a=r(96302),c=r(32674),u=r(77872),s=r(40175);n({target:"Reflect",stat:!0},{get:function t(e,r){var n,f,l=arguments.length<3?e:arguments[2];return a(e)===l?e[r]:(n=u.f(e,r))?c(n)?n.value:void 0===n.get?void 0:o(n.get,l):i(f=s(e))?t(f,r,l):void 0}})},79036:(t,e,r)=>{r(57330)({target:"Reflect",stat:!0},{has:function(t,e){return e in t}})},76583:(t,e,r)=>{var n=r(57330),o=r(96302),i=r(54284);n({target:"Reflect",stat:!0},{isExtensible:function(t){return o(t),i(t)}})},82590:(t,e,r)=>{r(57330)({target:"Reflect",stat:!0},{ownKeys:r(16660)})},7158:(t,e,r)=>{var n=r(57330),o=r(12546),i=r(96302);n({target:"Reflect",stat:!0,sham:!r(46151)},{preventExtensions:function(t){i(t);try{var e=o("Object","preventExtensions");return e&&e(t),!0}catch(t){return!1}}})},53023:(t,e,r)=>{var n=r(57330),o=r(96302),i=r(19814),a=r(14776);a&&n({target:"Reflect",stat:!0},{setPrototypeOf:function(t,e){o(t),i(e);try{return a(t,e),!0}catch(t){return!1}}})},99498:(t,e,r)=>{var n=r(57330),o=r(83264),i=r(96302),a=r(3196),c=r(32674),u=r(13894),s=r(26337),f=r(77872),l=r(40175),h=r(30654);n({target:"Reflect",stat:!0,forced:u((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,r,n){var u,p,y,d=arguments.length<4?e:arguments[3],v=f.f(i(e),r);if(!v){if(a(p=l(e)))return t(p,r,n,d);v=h(0)}if(c(v)){if(!1===v.writable||!a(d))return!1;if(u=f.f(d,r)){if(u.get||u.set||!1===u.writable)return!1;u.value=n,s.f(d,r,u)}else s.f(d,r,h(0,n))}else{if(void 0===(y=v.set))return!1;o(y,d,n)}return!0}})},7212:(t,e,r)=>{var n=r(57330),o=r(54516),i=r(81018);n({global:!0},{Reflect:{}}),i(o.Reflect,"Reflect",!0)},60971:(t,e,r)=>{var n=r(44244),o=r(54516),i=r(76277),a=r(82615),c=r(2993),u=r(81831),s=r(51019).f,f=r(34973),l=r(15076),h=r(18971),p=r(16503),y=r(25645),d=r(60492),v=r(68875),g=r(13894),b=r(37058),m=r(43023).enforce,w=r(3348),x=r(41398),_=r(51415),k=r(56002),O=x("match"),S=o.RegExp,A=S.prototype,E=o.SyntaxError,P=i(A.exec),j=i("".charAt),R=i("".replace),M=i("".indexOf),T=i("".slice),I=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,C=/a/g,B=/a/g,D=new S(C)!==C,z=y.MISSED_STICKY,L=y.UNSUPPORTED_Y;if(a("RegExp",n&&(!D||z||_||k||g((function(){return B[O]=!1,S(C)!=C||S(B)==B||"/a/i"!=S(C,"i")}))))){for(var N=function(t,e){var r,n,o,i,a,s,y=f(A,this),d=l(t),v=void 0===e,g=[],w=t;if(!y&&d&&v&&t.constructor===N)return t;if((d||f(A,t))&&(t=t.source,v&&(e=p(w))),t=void 0===t?"":h(t),e=void 0===e?"":h(e),w=t,_&&"dotAll"in C&&(n=!!e&&M(e,"s")>-1)&&(e=R(e,/s/g,"")),r=e,z&&"sticky"in C&&(o=!!e&&M(e,"y")>-1)&&L&&(e=R(e,/y/g,"")),k&&(i=function(t){for(var e,r=t.length,n=0,o="",i=[],a={},c=!1,u=!1,s=0,f="";n<=r;n++){if("\\"===(e=j(t,n)))e+=j(t,++n);else if("]"===e)c=!1;else if(!c)switch(!0){case"["===e:c=!0;break;case"("===e:P(I,T(t,n+1))&&(n+=2,u=!0),o+=e,s++;continue;case">"===e&&u:if(""===f||b(a,f))throw new E("Invalid capture group name");a[f]=!0,i[i.length]=[f,s],u=!1,f="";continue}u?f+=e:o+=e}return[o,i]}(t),t=i[0],g=i[1]),a=c(S(t,e),y?this:A,N),(n||o||g.length)&&(s=m(a),n&&(s.dotAll=!0,s.raw=N(function(t){for(var e,r=t.length,n=0,o="",i=!1;n<=r;n++)"\\"!==(e=j(t,n))?i||"."!==e?("["===e?i=!0:"]"===e&&(i=!1),o+=e):o+="[\\s\\S]":o+=e+j(t,++n);return o}(t),r)),o&&(s.sticky=!0),g.length&&(s.groups=g)),t!==w)try{u(a,"source",""===w?"(?:)":w)}catch(t){}return a},F=s(S),U=0;F.length>U;)d(N,S,F[U++]);A.constructor=N,N.prototype=A,v(o,"RegExp",N)}w("RegExp")},18045:(t,e,r)=>{var n=r(54516),o=r(44244),i=r(51415),a=r(31030),c=r(26337).f,u=r(43023).get,s=RegExp.prototype,f=n.TypeError;o&&i&&c(s,"dotAll",{configurable:!0,get:function(){if(this!==s){if("RegExp"===a(this))return!!u(this).dotAll;throw f("Incompatible receiver, RegExp required")}}})},75567:(t,e,r)=>{"use strict";var n=r(57330),o=r(56021);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},62349:(t,e,r)=>{var n=r(44244),o=r(26337),i=r(53941),a=r(13894),c=RegExp.prototype;n&&a((function(){return"sy"!==Object.getOwnPropertyDescriptor(c,"flags").get.call({dotAll:!0,sticky:!0})}))&&o.f(c,"flags",{configurable:!0,get:i})},87803:(t,e,r)=>{var n=r(54516),o=r(44244),i=r(25645).MISSED_STICKY,a=r(31030),c=r(26337).f,u=r(43023).get,s=RegExp.prototype,f=n.TypeError;o&&i&&c(s,"sticky",{configurable:!0,get:function(){if(this!==s){if("RegExp"===a(this))return!!u(this).sticky;throw f("Incompatible receiver, RegExp required")}}})},43:(t,e,r)=>{"use strict";r(75567);var n,o,i=r(57330),a=r(54516),c=r(83264),u=r(76277),s=r(34230),f=r(3196),l=(n=!1,(o=/[ac]/).exec=function(){return n=!0,/./.exec.apply(this,arguments)},!0===o.test("abc")&&n),h=a.Error,p=u(/./.test);i({target:"RegExp",proto:!0,forced:!l},{test:function(t){var e=this.exec;if(!s(e))return p(this,t);var r=c(e,this,t);if(null!==r&&!f(r))throw new h("RegExp exec method returned something other than an Object or null");return!!r}})},33043:(t,e,r)=>{"use strict";var n=r(33385).PROPER,o=r(68875),i=r(96302),a=r(18971),c=r(13894),u=r(16503),s="toString",f=RegExp.prototype.toString,l=c((function(){return"/a/b"!=f.call({source:"a",flags:"b"})})),h=n&&f.name!=s;(l||h)&&o(RegExp.prototype,s,(function(){var t=i(this);return"/"+a(t.source)+"/"+a(u(t))}),{unsafe:!0})},20489:(t,e,r)=>{"use strict";r(48756)("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(78704))},23252:(t,e,r)=>{r(20489)},4319:(t,e,r)=>{"use strict";var n=r(57330),o=r(38439);n({target:"String",proto:!0,forced:r(21839)("anchor")},{anchor:function(t){return o(this,"a","name",t)}})},16528:(t,e,r)=>{"use strict";var n=r(57330),o=r(76277),i=r(72191),a=r(35206),c=r(18971),u=r(13894),s=o("".charAt);n({target:"String",proto:!0,forced:u((function(){return"\ud842"!=="𠮷".at(-2)}))},{at:function(t){var e=c(i(this)),r=e.length,n=a(t),o=n>=0?n:r+n;return o<0||o>=r?void 0:s(e,o)}})},39535:(t,e,r)=>{"use strict";var n=r(57330),o=r(38439);n({target:"String",proto:!0,forced:r(21839)("big")},{big:function(){return o(this,"big","","")}})},65667:(t,e,r)=>{"use strict";var n=r(57330),o=r(38439);n({target:"String",proto:!0,forced:r(21839)("blink")},{blink:function(){return o(this,"blink","","")}})},67484:(t,e,r)=>{"use strict";var n=r(57330),o=r(38439);n({target:"String",proto:!0,forced:r(21839)("bold")},{bold:function(){return o(this,"b","","")}})},52821:(t,e,r)=>{"use strict";var n=r(57330),o=r(32088).codeAt;n({target:"String",proto:!0},{codePointAt:function(t){return o(this,t)}})},78158:(t,e,r)=>{"use strict";var n,o=r(57330),i=r(76277),a=r(77872).f,c=r(6674),u=r(18971),s=r(50134),f=r(72191),l=r(86018),h=r(43310),p=i("".endsWith),y=i("".slice),d=Math.min,v=l("endsWith");o({target:"String",proto:!0,forced:!(!h&&!v&&(n=a(String.prototype,"endsWith"),n&&!n.writable)||v)},{endsWith:function(t){var e=u(f(this));s(t);var r=arguments.length>1?arguments[1]:void 0,n=e.length,o=void 0===r?n:d(c(r),n),i=u(t);return p?p(e,i,o):y(e,o-i.length,o)===i}})},52936:(t,e,r)=>{"use strict";var n=r(57330),o=r(38439);n({target:"String",proto:!0,forced:r(21839)("fixed")},{fixed:function(){return o(this,"tt","","")}})},13684:(t,e,r)=>{"use strict";var n=r(57330),o=r(38439);n({target:"String",proto:!0,forced:r(21839)("fontcolor")},{fontcolor:function(t){return o(this,"font","color",t)}})},4614:(t,e,r)=>{"use strict";var n=r(57330),o=r(38439);n({target:"String",proto:!0,forced:r(21839)("fontsize")},{fontsize:function(t){return o(this,"font","size",t)}})},52512:(t,e,r)=>{var n=r(57330),o=r(54516),i=r(76277),a=r(59625),c=o.RangeError,u=String.fromCharCode,s=String.fromCodePoint,f=i([].join);n({target:"String",stat:!0,forced:!!s&&1!=s.length},{fromCodePoint:function(t){for(var e,r=[],n=arguments.length,o=0;n>o;){if(e=+arguments[o++],a(e,1114111)!==e)throw c(e+" is not a valid code point");r[o]=e<65536?u(e):u(55296+((e-=65536)>>10),e%1024+56320)}return f(r,"")}})},32752:(t,e,r)=>{"use strict";var n=r(57330),o=r(76277),i=r(50134),a=r(72191),c=r(18971),u=r(86018),s=o("".indexOf);n({target:"String",proto:!0,forced:!u("includes")},{includes:function(t){return!!~s(c(a(this)),c(i(t)),arguments.length>1?arguments[1]:void 0)}})},77494:(t,e,r)=>{"use strict";var n=r(57330),o=r(38439);n({target:"String",proto:!0,forced:r(21839)("italics")},{italics:function(){return o(this,"i","","")}})},62302:(t,e,r)=>{"use strict";var n=r(32088).charAt,o=r(18971),i=r(43023),a=r(96837),c="String Iterator",u=i.set,s=i.getterFor(c);a(String,"String",(function(t){u(this,{type:c,string:o(t),index:0})}),(function(){var t,e=s(this),r=e.string,o=e.index;return o>=r.length?{value:void 0,done:!0}:(t=n(r,o),e.index+=t.length,{value:t,done:!1})}))},40536:(t,e,r)=>{"use strict";var n=r(57330),o=r(38439);n({target:"String",proto:!0,forced:r(21839)("link")},{link:function(t){return o(this,"a","href",t)}})},74202:(t,e,r)=>{"use strict";var n=r(57330),o=r(54516),i=r(83264),a=r(76277),c=r(48539),u=r(72191),s=r(6674),f=r(18971),l=r(96302),h=r(31030),p=r(15076),y=r(16503),d=r(16040),v=r(68875),g=r(13894),b=r(41398),m=r(72976),w=r(68279),x=r(10510),_=r(43023),k=r(43310),O=b("matchAll"),S="RegExp String Iterator",A=_.set,E=_.getterFor(S),P=RegExp.prototype,j=o.TypeError,R=a("".indexOf),M=a("".matchAll),T=!!M&&!g((function(){M("a",/./)})),I=c((function(t,e,r,n){A(this,{type:S,regexp:t,string:e,global:r,unicode:n,done:!1})}),"RegExp String",(function(){var t=E(this);if(t.done)return{value:void 0,done:!0};var e=t.regexp,r=t.string,n=x(e,r);return null===n?{value:void 0,done:t.done=!0}:t.global?(""===f(n[0])&&(e.lastIndex=w(r,s(e.lastIndex),t.unicode)),{value:n,done:!1}):(t.done=!0,{value:n,done:!1})})),C=function(t){var e,r,n,o=l(this),i=f(t),a=m(o,RegExp),c=f(y(o));return e=new a(a===RegExp?o.source:o,c),r=!!~R(c,"g"),n=!!~R(c,"u"),e.lastIndex=s(o.lastIndex),new I(e,i,r,n)};n({target:"String",proto:!0,forced:T},{matchAll:function(t){var e,r,n,o,a=u(this);if(null!=t){if(p(t)&&(e=f(u(y(t))),!~R(e,"g")))throw j("`.matchAll` does not allow non-global regexes");if(T)return M(a,t);if(void 0===(n=d(t,O))&&k&&"RegExp"==h(t)&&(n=C),n)return i(n,t,a)}else if(T)return M(a,t);return r=f(a),o=new RegExp(t,"g"),k?i(C,o,r):o[O](r)}}),k||O in P||v(P,O,C)},92781:(t,e,r)=>{"use strict";var n=r(83264),o=r(22804),i=r(96302),a=r(6674),c=r(18971),u=r(72191),s=r(16040),f=r(68279),l=r(10510);o("match",(function(t,e,r){return[function(e){var r=u(this),o=null==e?void 0:s(e,t);return o?n(o,e,r):new RegExp(e)[t](c(r))},function(t){var n=i(this),o=c(t),u=r(e,n,o);if(u.done)return u.value;if(!n.global)return l(n,o);var s=n.unicode;n.lastIndex=0;for(var h,p=[],y=0;null!==(h=l(n,o));){var d=c(h[0]);p[y]=d,""===d&&(n.lastIndex=f(o,a(n.lastIndex),s)),y++}return 0===y?null:p}]}))},49615:(t,e,r)=>{"use strict";var n=r(57330),o=r(86424).end;n({target:"String",proto:!0,forced:r(92980)},{padEnd:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},94209:(t,e,r)=>{"use strict";var n=r(57330),o=r(86424).start;n({target:"String",proto:!0,forced:r(92980)},{padStart:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},84031:(t,e,r)=>{var n=r(57330),o=r(76277),i=r(54721),a=r(87706),c=r(18971),u=r(43716),s=o([].push),f=o([].join);n({target:"String",stat:!0},{raw:function(t){for(var e=i(a(t).raw),r=u(e),n=arguments.length,o=[],l=0;r>l;){if(s(o,c(e[l++])),l===r)return f(o,"");l<n&&s(o,c(arguments[l]))}}})},33259:(t,e,r)=>{r(57330)({target:"String",proto:!0},{repeat:r(23295)})},22152:(t,e,r)=>{"use strict";var n=r(57330),o=r(54516),i=r(83264),a=r(76277),c=r(72191),u=r(34230),s=r(15076),f=r(18971),l=r(16040),h=r(16503),p=r(42012),y=r(41398),d=r(43310),v=y("replace"),g=o.TypeError,b=a("".indexOf),m=a("".replace),w=a("".slice),x=Math.max,_=function(t,e,r){return r>t.length?-1:""===e?r:b(t,e,r)};n({target:"String",proto:!0},{replaceAll:function(t,e){var r,n,o,a,y,k,O,S,A,E=c(this),P=0,j=0,R="";if(null!=t){if((r=s(t))&&(n=f(c(h(t))),!~b(n,"g")))throw g("`.replaceAll` does not allow non-global regexes");if(o=l(t,v))return i(o,t,E,e);if(d&&r)return m(f(E),t,e)}for(a=f(E),y=f(t),(k=u(e))||(e=f(e)),O=y.length,S=x(1,O),P=_(a,y,0);-1!==P;)A=k?f(e(y,P,a)):p(y,a,P,[],void 0,e),R+=w(a,j,P)+A,j=P+O,P=_(a,y,P+S);return j<a.length&&(R+=w(a,j)),R}})},68011:(t,e,r)=>{"use strict";var n=r(2090),o=r(83264),i=r(76277),a=r(22804),c=r(13894),u=r(96302),s=r(34230),f=r(35206),l=r(6674),h=r(18971),p=r(72191),y=r(68279),d=r(16040),v=r(42012),g=r(10510),b=r(41398)("replace"),m=Math.max,w=Math.min,x=i([].concat),_=i([].push),k=i("".indexOf),O=i("".slice),S="$0"==="a".replace(/./,"$0"),A=!!/./[b]&&""===/./[b]("a","$0");a("replace",(function(t,e,r){var i=A?"$":"$0";return[function(t,r){var n=p(this),i=null==t?void 0:d(t,b);return i?o(i,t,n,r):o(e,h(n),t,r)},function(t,o){var a=u(this),c=h(t);if("string"==typeof o&&-1===k(o,i)&&-1===k(o,"$<")){var p=r(e,a,c,o);if(p.done)return p.value}var d=s(o);d||(o=h(o));var b=a.global;if(b){var S=a.unicode;a.lastIndex=0}for(var A=[];;){var E=g(a,c);if(null===E)break;if(_(A,E),!b)break;""===h(E[0])&&(a.lastIndex=y(c,l(a.lastIndex),S))}for(var P,j="",R=0,M=0;M<A.length;M++){for(var T=h((E=A[M])[0]),I=m(w(f(E.index),c.length),0),C=[],B=1;B<E.length;B++)_(C,void 0===(P=E[B])?P:String(P));var D=E.groups;if(d){var z=x([T],C,I,c);void 0!==D&&_(z,D);var L=h(n(o,void 0,z))}else L=v(T,c,I,C,D,o);I>=R&&(j+=O(c,R,I)+L,R=I+T.length)}return j+O(c,R)}]}),!!c((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!S||A)},47015:(t,e,r)=>{"use strict";var n=r(83264),o=r(22804),i=r(96302),a=r(72191),c=r(79094),u=r(18971),s=r(16040),f=r(10510);o("search",(function(t,e,r){return[function(e){var r=a(this),o=null==e?void 0:s(e,t);return o?n(o,e,r):new RegExp(e)[t](u(r))},function(t){var n=i(this),o=u(t),a=r(e,n,o);if(a.done)return a.value;var s=n.lastIndex;c(s,0)||(n.lastIndex=0);var l=f(n,o);return c(n.lastIndex,s)||(n.lastIndex=s),null===l?-1:l.index}]}))},60762:(t,e,r)=>{"use strict";var n=r(57330),o=r(38439);n({target:"String",proto:!0,forced:r(21839)("small")},{small:function(){return o(this,"small","","")}})},45238:(t,e,r)=>{"use strict";var n=r(2090),o=r(83264),i=r(76277),a=r(22804),c=r(15076),u=r(96302),s=r(72191),f=r(72976),l=r(68279),h=r(6674),p=r(18971),y=r(16040),d=r(68020),v=r(10510),g=r(56021),b=r(25645),m=r(13894),w=b.UNSUPPORTED_Y,x=4294967295,_=Math.min,k=[].push,O=i(/./.exec),S=i(k),A=i("".slice);a("split",(function(t,e,r){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,r){var i=p(s(this)),a=void 0===r?x:r>>>0;if(0===a)return[];if(void 0===t)return[i];if(!c(t))return o(e,i,t,a);for(var u,f,l,h=[],y=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,b=new RegExp(t.source,y+"g");(u=o(g,b,i))&&!((f=b.lastIndex)>v&&(S(h,A(i,v,u.index)),u.length>1&&u.index<i.length&&n(k,h,d(u,1)),l=u[0].length,v=f,h.length>=a));)b.lastIndex===u.index&&b.lastIndex++;return v===i.length?!l&&O(b,"")||S(h,""):S(h,A(i,v)),h.length>a?d(h,0,a):h}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:o(e,this,t,r)}:e,[function(e,r){var n=s(this),a=null==e?void 0:y(e,t);return a?o(a,e,n,r):o(i,p(n),e,r)},function(t,n){var o=u(this),a=p(t),c=r(i,o,a,n,i!==e);if(c.done)return c.value;var s=f(o,RegExp),y=o.unicode,d=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(w?"g":"y"),g=new s(w?"^(?:"+o.source+")":o,d),b=void 0===n?x:n>>>0;if(0===b)return[];if(0===a.length)return null===v(g,a)?[a]:[];for(var m=0,k=0,O=[];k<a.length;){g.lastIndex=w?0:k;var E,P=v(g,w?A(a,k):a);if(null===P||(E=_(h(g.lastIndex+(w?k:0)),a.length))===m)k=l(a,k,y);else{if(S(O,A(a,m,k)),O.length===b)return O;for(var j=1;j<=P.length-1;j++)if(S(O,P[j]),O.length===b)return O;k=m=E}}return S(O,A(a,m)),O}]}),!!m((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),w)},39463:(t,e,r)=>{"use strict";var n,o=r(57330),i=r(76277),a=r(77872).f,c=r(6674),u=r(18971),s=r(50134),f=r(72191),l=r(86018),h=r(43310),p=i("".startsWith),y=i("".slice),d=Math.min,v=l("startsWith");o({target:"String",proto:!0,forced:!(!h&&!v&&(n=a(String.prototype,"startsWith"),n&&!n.writable)||v)},{startsWith:function(t){var e=u(f(this));s(t);var r=c(d(arguments.length>1?arguments[1]:void 0,e.length)),n=u(t);return p?p(e,n,r):y(e,r,r+n.length)===n}})},4659:(t,e,r)=>{"use strict";var n=r(57330),o=r(38439);n({target:"String",proto:!0,forced:r(21839)("strike")},{strike:function(){return o(this,"strike","","")}})},5604:(t,e,r)=>{"use strict";var n=r(57330),o=r(38439);n({target:"String",proto:!0,forced:r(21839)("sub")},{sub:function(){return o(this,"sub","","")}})},56267:(t,e,r)=>{"use strict";var n=r(57330),o=r(76277),i=r(72191),a=r(35206),c=r(18971),u=o("".slice),s=Math.max,f=Math.min;n({target:"String",proto:!0,forced:!"".substr||"b"!=="ab".substr(-1)},{substr:function(t,e){var r,n,o=c(i(this)),l=o.length,h=a(t);return h===1/0&&(h=0),h<0&&(h=s(l+h,0)),(r=void 0===e?l:a(e))<=0||r===1/0||h>=(n=f(h+r,l))?"":u(o,h,n)}})},46073:(t,e,r)=>{"use strict";var n=r(57330),o=r(38439);n({target:"String",proto:!0,forced:r(21839)("sup")},{sup:function(){return o(this,"sup","","")}})},49324:(t,e,r)=>{r(14529);var n=r(57330),o=r(21791);n({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==o},{trimEnd:o})},57962:(t,e,r)=>{var n=r(57330),o=r(65315);n({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==o},{trimLeft:o})},14529:(t,e,r)=>{var n=r(57330),o=r(21791);n({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==o},{trimRight:o})},27153:(t,e,r)=>{r(57962);var n=r(57330),o=r(65315);n({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==o},{trimStart:o})},73866:(t,e,r)=>{"use strict";var n=r(57330),o=r(23688).trim;n({target:"String",proto:!0,forced:r(55833)("trim")},{trim:function(){return o(this)}})},58055:(t,e,r)=>{r(16296)("asyncIterator")},19539:(t,e,r)=>{"use strict";var n=r(57330),o=r(54516),i=r(83264),a=r(76277),c=r(43310),u=r(44244),s=r(97449),f=r(13894),l=r(37058),h=r(34973),p=r(96302),y=r(54721),d=r(14748),v=r(18971),g=r(30654),b=r(64714),m=r(68201),w=r(51019),x=r(53990),_=r(78586),k=r(77872),O=r(26337),S=r(68068),A=r(12028),E=r(68875),P=r(38365),j=r(96894),R=r(42570),M=r(67025),T=r(41398),I=r(30400),C=r(16296),B=r(52231),D=r(81018),z=r(43023),L=r(87265).forEach,N=j("hidden"),F="Symbol",U=z.set,H=z.getterFor(F),G=Object.prototype,Y=o.Symbol,W=Y&&Y.prototype,V=o.TypeError,X=o.QObject,q=k.f,K=O.f,Q=x.f,J=A.f,Z=a([].push),$=P("symbols"),tt=P("op-symbols"),et=P("wks"),rt=!X||!X.prototype||!X.prototype.findChild,nt=u&&f((function(){return 7!=b(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=q(G,e);n&&delete G[e],K(t,e,r),n&&t!==G&&K(G,e,n)}:K,ot=function(t,e){var r=$[t]=b(W);return U(r,{type:F,tag:t,description:e}),u||(r.description=e),r},it=function(t,e,r){t===G&&it(tt,e,r),p(t);var n=d(e);return p(r),l($,n)?(r.enumerable?(l(t,N)&&t[N][n]&&(t[N][n]=!1),r=b(r,{enumerable:g(0,!1)})):(l(t,N)||K(t,N,g(1,{})),t[N][n]=!0),nt(t,n,r)):K(t,n,r)},at=function(t,e){p(t);var r=y(e),n=m(r).concat(ft(r));return L(n,(function(e){u&&!i(ct,r,e)||it(t,e,r[e])})),t},ct=function(t){var e=d(t),r=i(J,this,e);return!(this===G&&l($,e)&&!l(tt,e))&&(!(r||!l(this,e)||!l($,e)||l(this,N)&&this[N][e])||r)},ut=function(t,e){var r=y(t),n=d(e);if(r!==G||!l($,n)||l(tt,n)){var o=q(r,n);return!o||!l($,n)||l(r,N)&&r[N][n]||(o.enumerable=!0),o}},st=function(t){var e=Q(y(t)),r=[];return L(e,(function(t){l($,t)||l(R,t)||Z(r,t)})),r},ft=function(t){var e=t===G,r=Q(e?tt:y(t)),n=[];return L(r,(function(t){!l($,t)||e&&!l(G,t)||Z(n,$[t])})),n};s||(E(W=(Y=function(){if(h(W,this))throw V("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?v(arguments[0]):void 0,e=M(t),r=function t(r){this===G&&i(t,tt,r),l(this,N)&&l(this[N],e)&&(this[N][e]=!1),nt(this,e,g(1,r))};return u&&rt&&nt(G,e,{configurable:!0,set:r}),ot(e,t)}).prototype,"toString",(function(){return H(this).tag})),E(Y,"withoutSetter",(function(t){return ot(M(t),t)})),A.f=ct,O.f=it,S.f=at,k.f=ut,w.f=x.f=st,_.f=ft,I.f=function(t){return ot(T(t),t)},u&&(K(W,"description",{configurable:!0,get:function(){return H(this).description}}),c||E(G,"propertyIsEnumerable",ct,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!s,sham:!s},{Symbol:Y}),L(m(et),(function(t){C(t)})),n({target:F,stat:!0,forced:!s},{useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),n({target:"Object",stat:!0,forced:!s,sham:!u},{create:function(t,e){return void 0===e?b(t):at(b(t),e)},defineProperty:it,defineProperties:at,getOwnPropertyDescriptor:ut}),n({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:st}),B(),D(Y,F),R[N]=!0},4613:(t,e,r)=>{"use strict";var n=r(57330),o=r(44244),i=r(54516),a=r(76277),c=r(37058),u=r(34230),s=r(34973),f=r(18971),l=r(26337).f,h=r(79129),p=i.Symbol,y=p&&p.prototype;if(o&&u(p)&&(!("description"in y)||void 0!==p().description)){var d={},v=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:f(arguments[0]),e=s(y,this)?new p(t):void 0===t?p():p(t);return""===t&&(d[e]=!0),e};h(v,p),v.prototype=y,y.constructor=v;var g="Symbol(test)"==String(p("test")),b=a(y.toString),m=a(y.valueOf),w=/^Symbol\((.*)\)[^)]+$/,x=a("".replace),_=a("".slice);l(y,"description",{configurable:!0,get:function(){var t=m(this),e=b(t);if(c(d,t))return"";var r=g?_(e,7,-1):x(e,w,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:v})}},14659:(t,e,r)=>{var n=r(57330),o=r(12546),i=r(37058),a=r(18971),c=r(38365),u=r(36609),s=c("string-to-symbol-registry"),f=c("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{for:function(t){var e=a(t);if(i(s,e))return s[e];var r=o("Symbol")(e);return s[e]=r,f[r]=e,r}})},86393:(t,e,r)=>{r(16296)("hasInstance")},79040:(t,e,r)=>{r(16296)("isConcatSpreadable")},79145:(t,e,r)=>{r(16296)("iterator")},47180:(t,e,r)=>{r(19539),r(14659),r(11911),r(83761),r(40520)},11911:(t,e,r)=>{var n=r(57330),o=r(37058),i=r(45961),a=r(2854),c=r(38365),u=r(36609),s=c("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{keyFor:function(t){if(!i(t))throw TypeError(a(t)+" is not a symbol");if(o(s,t))return s[t]}})},64145:(t,e,r)=>{r(16296)("matchAll")},16517:(t,e,r)=>{r(16296)("match")},34659:(t,e,r)=>{r(16296)("replace")},95582:(t,e,r)=>{r(16296)("search")},47661:(t,e,r)=>{r(16296)("species")},63745:(t,e,r)=>{r(16296)("split")},85270:(t,e,r)=>{var n=r(16296),o=r(52231);n("toPrimitive"),o()},86481:(t,e,r)=>{var n=r(12546),o=r(16296),i=r(81018);o("toStringTag"),i(n("Symbol"),"Symbol")},26606:(t,e,r)=>{r(16296)("unscopables")},19540:(t,e,r)=>{"use strict";var n=r(19548),o=r(43716),i=r(35206),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("at",(function(t){var e=a(this),r=o(e),n=i(t),c=n>=0?n:r+n;return c<0||c>=r?void 0:e[c]}))},65049:(t,e,r)=>{"use strict";var n=r(76277),o=r(19548),i=n(r(92316)),a=o.aTypedArray;(0,o.exportTypedArrayMethod)("copyWithin",(function(t,e){return i(a(this),t,e,arguments.length>2?arguments[2]:void 0)}))},75608:(t,e,r)=>{"use strict";var n=r(19548),o=r(87265).every,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},30452:(t,e,r)=>{"use strict";var n=r(19548),o=r(83264),i=r(47774),a=n.aTypedArray;(0,n.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)}))},29628:(t,e,r)=>{"use strict";var n=r(19548),o=r(87265).filter,i=r(35967),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",(function(t){var e=o(a(this),t,arguments.length>1?arguments[1]:void 0);return i(this,e)}))},10901:(t,e,r)=>{"use strict";var n=r(19548),o=r(87265).findIndex,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},71790:(t,e,r)=>{"use strict";var n=r(19548),o=r(87265).find,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},95477:(t,e,r)=>{r(63842)("Float32",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},38039:(t,e,r)=>{r(63842)("Float64",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},73526:(t,e,r)=>{"use strict";var n=r(19548),o=r(87265).forEach,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",(function(t){o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},97913:(t,e,r)=>{"use strict";var n=r(93890);(0,r(19548).exportTypedArrayStaticMethod)("from",r(25599),n)},24319:(t,e,r)=>{"use strict";var n=r(19548),o=r(60452).includes,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},27807:(t,e,r)=>{"use strict";var n=r(19548),o=r(60452).indexOf,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},39134:(t,e,r)=>{r(63842)("Int16",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},51257:(t,e,r)=>{r(63842)("Int32",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},88586:(t,e,r)=>{r(63842)("Int8",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},57207:(t,e,r)=>{"use strict";var n=r(54516),o=r(13894),i=r(76277),a=r(19548),c=r(24133),u=r(41398)("iterator"),s=n.Uint8Array,f=i(c.values),l=i(c.keys),h=i(c.entries),p=a.aTypedArray,y=a.exportTypedArrayMethod,d=s&&s.prototype,v=!o((function(){d[u].call([1])})),g=!!d&&d.values&&d[u]===d.values&&"values"===d.values.name,b=function(){return f(p(this))};y("entries",(function(){return h(p(this))}),v),y("keys",(function(){return l(p(this))}),v),y("values",b,v||!g,{name:"values"}),y(u,b,v||!g,{name:"values"})},97371:(t,e,r)=>{"use strict";var n=r(19548),o=r(76277),i=n.aTypedArray,a=n.exportTypedArrayMethod,c=o([].join);a("join",(function(t){return c(i(this),t)}))},91897:(t,e,r)=>{"use strict";var n=r(19548),o=r(2090),i=r(85773),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",(function(t){var e=arguments.length;return o(i,a(this),e>1?[t,arguments[1]]:[t])}))},43418:(t,e,r)=>{"use strict";var n=r(19548),o=r(87265).map,i=r(62718),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("map",(function(t){return o(a(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(i(t))(e)}))}))},68709:(t,e,r)=>{"use strict";var n=r(19548),o=r(93890),i=n.aTypedArrayConstructor;(0,n.exportTypedArrayStaticMethod)("of",(function(){for(var t=0,e=arguments.length,r=new(i(this))(e);e>t;)r[t]=arguments[t++];return r}),o)},62476:(t,e,r)=>{"use strict";var n=r(19548),o=r(73333).right,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",(function(t){var e=arguments.length;return o(i(this),t,e,e>1?arguments[1]:void 0)}))},46255:(t,e,r)=>{"use strict";var n=r(19548),o=r(73333).left,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",(function(t){var e=arguments.length;return o(i(this),t,e,e>1?arguments[1]:void 0)}))},42205:(t,e,r)=>{"use strict";var n=r(19548),o=n.aTypedArray,i=n.exportTypedArrayMethod,a=Math.floor;i("reverse",(function(){for(var t,e=this,r=o(e).length,n=a(r/2),i=0;i<n;)t=e[i],e[i++]=e[--r],e[r]=t;return e}))},43334:(t,e,r)=>{"use strict";var n=r(54516),o=r(83264),i=r(19548),a=r(43716),c=r(4408),u=r(87706),s=r(13894),f=n.RangeError,l=n.Int8Array,h=l&&l.prototype,p=h&&h.set,y=i.aTypedArray,d=i.exportTypedArrayMethod,v=!s((function(){var t=new Uint8ClampedArray(2);return o(p,t,{length:1,0:3},1),3!==t[1]})),g=v&&i.NATIVE_ARRAY_BUFFER_VIEWS&&s((function(){var t=new l(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));d("set",(function(t){y(this);var e=c(arguments.length>1?arguments[1]:void 0,1),r=u(t);if(v)return o(p,this,r,e);var n=this.length,i=a(r),s=0;if(i+e>n)throw f("Wrong length");for(;s<i;)this[e+s]=r[s++]}),!v||g)},75337:(t,e,r)=>{"use strict";var n=r(19548),o=r(62718),i=r(13894),a=r(52999),c=n.aTypedArray;(0,n.exportTypedArrayMethod)("slice",(function(t,e){for(var r=a(c(this),t,e),n=o(this),i=0,u=r.length,s=new n(u);u>i;)s[i]=r[i++];return s}),i((function(){new Int8Array(1).slice()})))},97598:(t,e,r)=>{"use strict";var n=r(19548),o=r(87265).some,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",(function(t){return o(i(this),t,arguments.length>1?arguments[1]:void 0)}))},45433:(t,e,r)=>{"use strict";var n=r(54516),o=r(76277),i=r(13894),a=r(88965),c=r(53347),u=r(19548),s=r(50419),f=r(72693),l=r(49229),h=r(90602),p=u.aTypedArray,y=u.exportTypedArrayMethod,d=n.Uint16Array,v=d&&o(d.prototype.sort),g=!(!v||i((function(){v(new d(2),null)}))&&i((function(){v(new d(2),{})}))),b=!!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,r=new d(516),n=Array(516);for(t=0;t<516;t++)e=t%4,r[t]=515-t,n[t]=t-2*e+3;for(v(r,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(r[t]!==n[t])return!0}));y("sort",(function(t){return void 0!==t&&a(t),b?v(this,t):c(p(this),function(t){return function(e,r){return void 0!==t?+t(e,r)||0:r!=r?-1:e!=e?1:0===e&&0===r?1/e>0&&1/r<0?1:-1:e>r}}(t))}),!b||g)},64188:(t,e,r)=>{"use strict";var n=r(19548),o=r(6674),i=r(59625),a=r(62718),c=n.aTypedArray;(0,n.exportTypedArrayMethod)("subarray",(function(t,e){var r=c(this),n=r.length,u=i(t,n);return new(a(r))(r.buffer,r.byteOffset+u*r.BYTES_PER_ELEMENT,o((void 0===e?n:i(e,n))-u))}))},84880:(t,e,r)=>{"use strict";var n=r(54516),o=r(2090),i=r(19548),a=r(13894),c=r(52999),u=n.Int8Array,s=i.aTypedArray,f=i.exportTypedArrayMethod,l=[].toLocaleString,h=!!u&&a((function(){l.call(new u(1))}));f("toLocaleString",(function(){return o(l,h?c(s(this)):s(this),c(arguments))}),a((function(){return[1,2].toLocaleString()!=new u([1,2]).toLocaleString()}))||!a((function(){u.prototype.toLocaleString.call([1,2])})))},38769:(t,e,r)=>{"use strict";var n=r(19548).exportTypedArrayMethod,o=r(13894),i=r(54516),a=r(76277),c=i.Uint8Array,u=c&&c.prototype||{},s=[].toString,f=a([].join);o((function(){s.call({})}))&&(s=function(){return f(this)});var l=u.toString!=s;n("toString",s,l)},19972:(t,e,r)=>{r(63842)("Uint16",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},98902:(t,e,r)=>{r(63842)("Uint32",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},170:(t,e,r)=>{r(63842)("Uint8",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},68266:(t,e,r)=>{r(63842)("Uint8",(function(t){return function(e,r,n){return t(this,e,r,n)}}),!0)},50748:(t,e,r)=>{"use strict";var n=r(57330),o=r(76277),i=r(18971),a=String.fromCharCode,c=o("".charAt),u=o(/./.exec),s=o("".slice),f=/^[\da-f]{2}$/i,l=/^[\da-f]{4}$/i;n({global:!0},{unescape:function(t){for(var e,r,n=i(t),o="",h=n.length,p=0;p<h;){if("%"===(e=c(n,p++)))if("u"===c(n,p)){if(r=s(n,p+1,p+5),u(l,r)){o+=a(parseInt(r,16)),p+=5;continue}}else if(r=s(n,p,p+2),u(f,r)){o+=a(parseInt(r,16)),p+=2;continue}o+=e}return o}})},5531:(t,e,r)=>{"use strict";var n,o=r(54516),i=r(76277),a=r(83572),c=r(8420),u=r(48756),s=r(66263),f=r(3196),l=r(54284),h=r(43023).enforce,p=r(50174),y=!o.ActiveXObject&&"ActiveXObject"in o,d=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},v=u("WeakMap",d,s);if(p&&y){n=s.getConstructor(d,"WeakMap",!0),c.enable();var g=v.prototype,b=i(g.delete),m=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 n),b(this,t)||e.frozen.delete(t)}return b(this,t)},has:function(t){if(f(t)&&!l(t)){var e=h(this);return e.frozen||(e.frozen=new n),m(this,t)||e.frozen.has(t)}return m(this,t)},get:function(t){if(f(t)&&!l(t)){var e=h(this);return e.frozen||(e.frozen=new n),m(this,t)?w(this,t):e.frozen.get(t)}return w(this,t)},set:function(t,e){if(f(t)&&!l(t)){var r=h(this);r.frozen||(r.frozen=new n),m(this,t)?x(this,t,e):r.frozen.set(t,e)}else x(this,t,e);return this}})}},74287:(t,e,r)=>{r(5531)},40273:(t,e,r)=>{"use strict";r(48756)("WeakSet",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(66263))},40476:(t,e,r)=>{r(40273)},50315:(t,e,r)=>{var n=r(57330),o=r(12546),i=r(76277),a=r(13894),c=r(18971),u=r(37058),s=r(10645),f=r(19649).ctoi,l=/[^\d+/a-z]/i,h=/[\t\n\f\r ]+/g,p=/[=]+$/,y=o("atob"),d=String.fromCharCode,v=i("".charAt),g=i("".replace),b=i(l.exec),m=a((function(){return""!==y(" ")})),w=!a((function(){y("a")})),x=!m&&!w&&!a((function(){y()})),_=!m&&!w&&1!==y.length;n({global:!0,enumerable:!0,forced:m||w||x||_},{atob:function(t){if(s(arguments.length,1),x||_)return y(t);var e,r,n=g(c(t),h,""),i="",a=0,m=0;if(n.length%4==0&&(n=g(n,p,"")),n.length%4==1||b(l,n))throw new(o("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(;e=v(n,a++);)u(f,e)&&(r=m%4?64*r+f[e]:f[e],m++%4&&(i+=d(255&r>>(-2*m&6))));return i}})},72168:(t,e,r)=>{var n=r(57330),o=r(12546),i=r(76277),a=r(13894),c=r(18971),u=r(10645),s=r(19649).itoc,f=o("btoa"),l=i("".charAt),h=i("".charCodeAt),p=!!f&&!a((function(){f()})),y=!!f&&a((function(){return"bnVsbA=="!==f(null)})),d=!!f&&1!==f.length;n({global:!0,enumerable:!0,forced:p||y||d},{btoa:function(t){if(u(arguments.length,1),p||y||d)return f(c(t));for(var e,r,n=c(t),i="",a=0,v=s;l(n,a)||(v="=",a%1);){if((r=h(n,a+=3/4))>255)throw new(o("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");i+=l(v,63&(e=e<<8|r)>>8-a%1*8)}return i}})},93248:(t,e,r)=>{var n=r(57330),o=r(54516),i=r(33394).clear;n({global:!0,bind:!0,enumerable:!0,forced:o.clearImmediate!==i},{clearImmediate:i})},63923:(t,e,r)=>{var n=r(54516),o=r(63464),i=r(17666),a=r(39682),c=r(81831),u=function(t){if(t&&t.forEach!==a)try{c(t,"forEach",a)}catch(e){t.forEach=a}};for(var s in o)o[s]&&u(n[s]&&n[s].prototype);u(i)},95240:(t,e,r)=>{var n=r(54516),o=r(63464),i=r(17666),a=r(24133),c=r(81831),u=r(41398),s=u("iterator"),f=u("toStringTag"),l=a.values,h=function(t,e){if(t){if(t[s]!==l)try{c(t,s,l)}catch(e){t[s]=l}if(t[f]||c(t,f,e),o[e])for(var r in a)if(t[r]!==a[r])try{c(t,r,a[r])}catch(e){t[r]=a[r]}}};for(var p in o)h(n[p]&&n[p].prototype,p);h(i,"DOMTokenList")},6721:(t,e,r)=>{"use strict";var n=r(57330),o=r(24128),i=r(12546),a=r(13894),c=r(64714),u=r(30654),s=r(26337).f,f=r(68068).f,l=r(68875),h=r(37058),p=r(89214),y=r(96302),d=r(34019),v=r(91245),g=r(43115),b=r(30530),m=r(43023),w=r(44244),x=r(43310),_="DOMException",k=i("Error"),O=i(_)||function(){try{(new(i("MessageChannel")||o("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(t){if("DATA_CLONE_ERR"==t.name&&25==t.code)return t.constructor}}(),S=O&&O.prototype,A=k.prototype,E=m.set,P=m.getterFor(_),j="stack"in k(_),R=function(t){return h(g,t)&&g[t].m?g[t].c:0},M=function(){p(this,T);var t=arguments.length,e=v(t<1?void 0:arguments[0]),r=v(t<2?void 0:arguments[1],"Error"),n=R(r);if(E(this,{type:_,name:r,message:e,code:n}),w||(this.name=r,this.message=e,this.code=n),j){var o=k(e);o.name=_,s(this,"stack",u(1,b(o.stack,1)))}},T=M.prototype=c(A),I=function(t){return{enumerable:!0,configurable:!0,get:t}},C=function(t){return I((function(){return P(this)[t]}))};w&&f(T,{name:C("name"),message:C("message"),code:C("code")}),s(T,"constructor",u(1,M));var B=a((function(){return!(new O instanceof k)})),D=B||a((function(){return A.toString!==d||"2: 1"!==String(new O(1,2))})),z=B||a((function(){return 25!==new O(1,"DataCloneError").code})),L=B||25!==O.DATA_CLONE_ERR||25!==S.DATA_CLONE_ERR,N=x?D||z||L:B;n({global:!0,forced:N},{DOMException:N?M:O});var F=i(_),U=F.prototype;for(var H in D&&(x||O===F)&&l(U,"toString",d),z&&w&&O===F&&s(U,"code",I((function(){return R(y(this).name)}))),g)if(h(g,H)){var G=g[H],Y=G.s,W=u(6,G.c);h(F,Y)||s(F,Y,W),h(U,Y)||s(U,Y,W)}},58700:(t,e,r)=>{"use strict";var n=r(57330),o=r(12546),i=r(30654),a=r(26337).f,c=r(37058),u=r(89214),s=r(2993),f=r(91245),l=r(43115),h=r(30530),p=r(43310),y="DOMException",d=o("Error"),v=o(y),g=function(){u(this,b);var t=arguments.length,e=f(t<1?void 0:arguments[0]),r=f(t<2?void 0:arguments[1],"Error"),n=new v(e,r),o=d(e);return o.name=y,a(n,"stack",i(1,h(o.stack,1))),s(n,this,g),n},b=g.prototype=v.prototype,m="stack"in d(y),w="stack"in new v(1,2),x=m&&!w;n({global:!0,forced:p||x},{DOMException:x?g:v});var _=o(y),k=_.prototype;if(k.constructor!==_)for(var O in p||a(k,"constructor",i(1,_)),l)if(c(l,O)){var S=l[O],A=S.s;c(_,A)||a(_,A,i(6,S.c))}},79073:(t,e,r)=>{var n=r(12546),o="DOMException";r(81018)(n(o),o)},10012:(t,e,r)=>{r(93248),r(25404)},27457:(t,e,r)=>{var n=r(57330),o=r(54516),i=r(54653),a=r(88965),c=r(10645),u=r(63241),s=o.process;n({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(t){c(arguments.length,1),a(t);var e=u&&s.domain;i(e?e.bind(t):t)}})},25404:(t,e,r)=>{var n=r(57330),o=r(54516),i=r(33394).set;n({global:!0,bind:!0,enumerable:!0,forced:o.setImmediate!==i},{setImmediate:i})},91300:(t,e,r)=>{var n=r(57330),o=r(54516),i=r(74710).setInterval;n({global:!0,bind:!0,forced:o.setInterval!==i},{setInterval:i})},96538:(t,e,r)=>{var n=r(57330),o=r(54516),i=r(74710).setTimeout;n({global:!0,bind:!0,forced:o.setTimeout!==i},{setTimeout:i})},38634:(t,e,r)=>{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},n(t)}var o,i=r(43310),a=r(57330),c=r(54516),u=r(12546),s=r(76277),f=r(13894),l=r(67025),h=r(34230),p=r(53924),y=r(3196),d=r(45961),v=r(29429),g=r(96302),b=r(98619),m=r(37058),w=r(80955),x=r(81831),_=r(43716),k=r(10645),O=r(16503),S=r(81842),A=c.Object,E=c.Date,P=c.Error,j=c.EvalError,R=c.RangeError,M=c.ReferenceError,T=c.SyntaxError,I=c.TypeError,C=c.URIError,B=c.PerformanceMark,D=c.WebAssembly,z=D&&D.CompileError||P,L=D&&D.LinkError||P,N=D&&D.RuntimeError||P,F=u("DOMException"),U=u("Set"),H=u("Map"),G=H.prototype,Y=s(G.has),W=s(G.get),V=s(G.set),X=s(U.prototype.add),q=u("Object","keys"),K=s([].push),Q=s((!0).valueOf),J=s(1..valueOf),Z=s("".valueOf),$=s(E.prototype.getTime),tt=l("structuredClone"),et="DataCloneError",rt="Transferring",nt=function(t){return!f((function(){var e=new c.Set([7]),r=t(e),o=t(A(7));return r==e||!r.has(7)||"object"!=n(o)||7!=o}))&&t},ot=c.structuredClone,it=i||(o=ot,!(!f((function(){var t=o(new c.AggregateError([1],tt,{cause:3}));return"AggregateError"!=t.name||1!=t.errors[0]||t.message!=tt||3!=t.cause}))&&o)),at=!ot&&nt((function(t){return new B(tt,{detail:t}).detail})),ct=nt(ot)||at,ut=function(t){throw new F("Uncloneable type: "+t,et)},st=function(t,e){throw new F((e||"Cloning")+" of "+t+" cannot be properly polyfilled in this engine",et)},ft=function t(e,r){if(d(e)&&ut("Symbol"),!y(e))return e;if(r){if(Y(r,e))return W(r,e)}else r=new H;var n,o,i,a,s,f,l,v,g,k,B=b(e),D=!1;switch(B){case"Array":i=[],D=!0;break;case"Object":i={},D=!0;break;case"Map":i=new H,D=!0;break;case"Set":i=new U,D=!0;break;case"RegExp":i=new RegExp(e.source,O(e));break;case"Error":switch(o=e.name){case"AggregateError":i=u("AggregateError")([]);break;case"EvalError":i=j();break;case"RangeError":i=R();break;case"ReferenceError":i=M();break;case"SyntaxError":i=T();break;case"TypeError":i=I();break;case"URIError":i=C();break;case"CompileError":i=z();break;case"LinkError":i=L();break;case"RuntimeError":i=N();break;default:i=P()}D=!0;break;case"DOMException":i=new F(e.message,e.name),D=!0;break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":n=c[B],y(n)||st(B),i=new n(t(e.buffer,r),e.byteOffset,"DataView"===B?e.byteLength:e.length);break;case"DOMQuad":try{i=new DOMQuad(t(e.p1,r),t(e.p2,r),t(e.p3,r),t(e.p4,r))}catch(t){ct?i=ct(e):st(B)}break;case"FileList":if(n=c.DataTransfer,p(n)){for(a=new n,s=0,f=_(e);s<f;s++)a.items.add(t(e[s],r));i=a.files}else ct?i=ct(e):st(B);break;case"ImageData":try{i=new ImageData(t(e.data,r),e.width,e.height,{colorSpace:e.colorSpace})}catch(t){ct?i=ct(e):st(B)}break;default:if(ct)i=ct(e);else switch(B){case"BigInt":i=A(e.valueOf());break;case"Boolean":i=A(Q(e));break;case"Number":i=A(J(e));break;case"String":i=A(Z(e));break;case"Date":i=new E($(e));break;case"ArrayBuffer":(n=c.DataView)||"function"==typeof e.slice||st(B);try{if("function"==typeof e.slice)i=e.slice(0);else for(f=e.byteLength,i=new ArrayBuffer(f),g=new n(e),k=new n(i),s=0;s<f;s++)k.setUint8(s,g.getUint8(s))}catch(t){throw new F("ArrayBuffer is detached",et)}break;case"SharedArrayBuffer":i=e;break;case"Blob":try{i=e.slice(0,e.size,e.type)}catch(t){st(B)}break;case"DOMPoint":case"DOMPointReadOnly":n=c[B];try{i=n.fromPoint?n.fromPoint(e):new n(e.x,e.y,e.z,e.w)}catch(t){st(B)}break;case"DOMRect":case"DOMRectReadOnly":n=c[B];try{i=n.fromRect?n.fromRect(e):new n(e.x,e.y,e.width,e.height)}catch(t){st(B)}break;case"DOMMatrix":case"DOMMatrixReadOnly":n=c[B];try{i=n.fromMatrix?n.fromMatrix(e):new n(e)}catch(t){st(B)}break;case"AudioData":case"VideoFrame":h(e.clone)||st(B);try{i=e.clone()}catch(t){ut(B)}break;case"File":try{i=new File([e],e.name,e)}catch(t){st(B)}break;case"CryptoKey":case"GPUCompilationMessage":case"GPUCompilationInfo":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":st(B);default:ut(B)}}if(V(r,e,i),D)switch(B){case"Array":case"Object":for(l=q(e),s=0,f=_(l);s<f;s++)v=l[s],w(i,v,t(e[v],r));break;case"Map":e.forEach((function(e,n){V(i,t(n,r),t(e,r))}));break;case"Set":e.forEach((function(e){X(i,t(e,r))}));break;case"Error":x(i,"message",t(e.message,r)),m(e,"cause")&&x(i,"cause",t(e.cause,r)),"AggregateError"==o&&(i.errors=t(e.errors,r));case"DOMException":S&&x(i,"stack",t(e.stack,r))}return i},lt=ot&&!f((function(){var t=new ArrayBuffer(8),e=ot(t,{transfer:[t]});return 0!=t.byteLength||8!=e.byteLength})),ht=function(t,e){if(!y(t))throw I("Transfer option cannot be converted to a sequence");var r=[];v(t,(function(t){K(r,g(t))}));var n,o,i,a,u,s,f=0,l=_(r);if(lt)for(a=ot(r,{transfer:r});f<l;)V(e,r[f],a[f++]);else for(;f<l;){if(n=r[f++],Y(e,n))throw new F("Duplicate transferable",et);switch(o=b(n)){case"ImageBitmap":i=c.OffscreenCanvas,p(i)||st(o,rt);try{(s=new i(n.width,n.height)).getContext("bitmaprenderer").transferFromImageBitmap(n),u=s.transferToImageBitmap()}catch(t){}break;case"AudioData":case"VideoFrame":h(n.clone)&&h(n.close)||st(o,rt);try{u=n.clone(),n.close()}catch(t){}break;case"ArrayBuffer":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":st(o,rt)}if(void 0===u)throw new F("This object cannot be transferred: "+o,et);V(e,n,u)}};a({global:!0,enumerable:!0,sham:!lt,forced:it},{structuredClone:function(t){var e,r=k(arguments.length,1)>1&&null!=arguments[1]?g(arguments[1]):void 0,n=r?r.transfer:void 0;return void 0!==n&&(e=new H,ht(n,e)),ft(t,e)}})},76878:(t,e,r)=>{r(91300),r(96538)},90774:(t,e,r)=>{"use strict";r(24133);var n=r(57330),o=r(54516),i=r(83264),a=r(76277),c=r(44244),u=r(33018),s=r(68875),f=r(83572),l=r(81018),h=r(48539),p=r(43023),y=r(89214),d=r(34230),v=r(37058),g=r(29910),b=r(98619),m=r(96302),w=r(3196),x=r(18971),_=r(64714),k=r(30654),O=r(29946),S=r(1228),A=r(10645),E=r(41398),P=r(53347),j=E("iterator"),R="URLSearchParams",M="URLSearchParamsIterator",T=p.set,I=p.getterFor(R),C=p.getterFor(M),B=Object.getOwnPropertyDescriptor,D=function(t){if(!c)return o[t];var e=B(o,t);return e&&e.value},z=D("fetch"),L=D("Request"),N=D("Headers"),F=L&&L.prototype,U=N&&N.prototype,H=o.RegExp,G=o.TypeError,Y=o.decodeURIComponent,W=o.encodeURIComponent,V=a("".charAt),X=a([].join),q=a([].push),K=a("".replace),Q=a([].shift),J=a([].splice),Z=a("".split),$=a("".slice),tt=/\+/g,et=Array(4),rt=function(t){return et[t-1]||(et[t-1]=H("((?:%[\\da-f]{2}){"+t+"})","gi"))},nt=function(t){try{return Y(t)}catch(e){return t}},ot=function(t){var e=K(t,tt," "),r=4;try{return Y(e)}catch(t){for(;r;)e=K(e,rt(r--),nt);return e}},it=/[!'()~]|%20/g,at={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ct=function(t){return at[t]},ut=function(t){return K(W(t),it,ct)},st=h((function(t,e){T(this,{type:M,iterator:O(I(t).entries),kind:e})}),"Iterator",(function(){var t=C(this),e=t.kind,r=t.iterator.next(),n=r.value;return r.done||(r.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),r}),!0),ft=function(t){this.entries=[],this.url=null,void 0!==t&&(w(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===V(t,0)?$(t,1):t:x(t)))};ft.prototype={type:R,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,o,a,c,u,s=S(t);if(s)for(r=(e=O(t,s)).next;!(n=i(r,e)).done;){if(a=(o=O(m(n.value))).next,(c=i(a,o)).done||(u=i(a,o)).done||!i(a,o).done)throw G("Expected sequence with length 2");q(this.entries,{key:x(c.value),value:x(u.value)})}else for(var f in t)v(t,f)&&q(this.entries,{key:f,value:x(t[f])})},parseQuery:function(t){if(t)for(var e,r,n=Z(t,"&"),o=0;o<n.length;)(e=n[o++]).length&&(r=Z(e,"="),q(this.entries,{key:ot(Q(r)),value:ot(X(r,"="))}))},serialize:function(){for(var t,e=this.entries,r=[],n=0;n<e.length;)t=e[n++],q(r,ut(t.key)+"="+ut(t.value));return X(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var lt=function(){y(this,ht);var t=arguments.length>0?arguments[0]:void 0;T(this,new ft(t))},ht=lt.prototype;if(f(ht,{append:function(t,e){A(arguments.length,2);var r=I(this);q(r.entries,{key:x(t),value:x(e)}),r.updateURL()},delete:function(t){A(arguments.length,1);for(var e=I(this),r=e.entries,n=x(t),o=0;o<r.length;)r[o].key===n?J(r,o,1):o++;e.updateURL()},get:function(t){A(arguments.length,1);for(var e=I(this).entries,r=x(t),n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function(t){A(arguments.length,1);for(var e=I(this).entries,r=x(t),n=[],o=0;o<e.length;o++)e[o].key===r&&q(n,e[o].value);return n},has:function(t){A(arguments.length,1);for(var e=I(this).entries,r=x(t),n=0;n<e.length;)if(e[n++].key===r)return!0;return!1},set:function(t,e){A(arguments.length,1);for(var r,n=I(this),o=n.entries,i=!1,a=x(t),c=x(e),u=0;u<o.length;u++)(r=o[u]).key===a&&(i?J(o,u--,1):(i=!0,r.value=c));i||q(o,{key:a,value:c}),n.updateURL()},sort:function(){var t=I(this);P(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,r=I(this).entries,n=g(t,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((e=r[o++]).value,e.key,this)},keys:function(){return new st(this,"keys")},values:function(){return new st(this,"values")},entries:function(){return new st(this,"entries")}},{enumerable:!0}),s(ht,j,ht.entries,{name:"entries"}),s(ht,"toString",(function(){return I(this).serialize()}),{enumerable:!0}),l(lt,R),n({global:!0,forced:!u},{URLSearchParams:lt}),!u&&d(N)){var pt=a(U.has),yt=a(U.set),dt=function(t){if(w(t)){var e,r=t.body;if(b(r)===R)return e=t.headers?new N(t.headers):new N,pt(e,"content-type")||yt(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),_(t,{body:k(0,x(r)),headers:k(0,e)})}return t};if(d(z)&&n({global:!0,enumerable:!0,noTargetGet:!0,forced:!0},{fetch:function(t){return z(t,arguments.length>1?dt(arguments[1]):{})}}),d(L)){var vt=function(t){return y(this,F),new L(t,arguments.length>1?dt(arguments[1]):{})};F.constructor=vt,vt.prototype=F,n({global:!0,forced:!0,noTargetGet:!0},{Request:vt})}}t.exports={URLSearchParams:lt,getState:I}},2848:(t,e,r)=>{r(90774)},91871:(t,e,r)=>{"use strict";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},n(t)}r(62302);var o,i=r(57330),a=r(44244),c=r(33018),u=r(54516),s=r(29910),f=r(76277),l=r(68068).f,h=r(68875),p=r(89214),y=r(37058),d=r(70168),v=r(11956),g=r(68020),b=r(32088).codeAt,m=r(34858),w=r(18971),x=r(81018),_=r(10645),k=r(90774),O=r(43023),S=O.set,A=O.getterFor("URL"),E=k.URLSearchParams,P=k.getState,j=u.URL,R=u.TypeError,M=u.parseInt,T=Math.floor,I=Math.pow,C=f("".charAt),B=f(/./.exec),D=f([].join),z=f(1..toString),L=f([].pop),N=f([].push),F=f("".replace),U=f([].shift),H=f("".split),G=f("".slice),Y=f("".toLowerCase),W=f([].unshift),V="Invalid scheme",X="Invalid host",q="Invalid port",K=/[a-z]/i,Q=/[\d+-.a-z]/i,J=/\d/,Z=/^0x/i,$=/^[0-7]+$/,tt=/^\d+$/,et=/^[\da-f]+$/i,rt=/[\0\t\n\r #%/:<>?@[\\\]^|]/,nt=/[\0\t\n\r #/:<>?@[\\\]^|]/,ot=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,it=/[\t\n\r]/g,at=function(t){var e,r,o,i;if("number"==typeof t){for(e=[],r=0;r<4;r++)W(e,t%256),t=T(t/256);return D(e,".")}if("object"==n(t)){for(e="",o=function(t){for(var e=null,r=1,n=null,o=0,i=0;i<8;i++)0!==t[i]?(o>r&&(e=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(e=n,r=o),e}(t),r=0;r<8;r++)i&&0===t[r]||(i&&(i=!1),o===r?(e+=r?":":"::",i=!0):(e+=z(t[r],16),r<7&&(e+=":")));return"["+e+"]"}return t},ct={},ut=d({},ct,{" ":1,'"':1,"<":1,">":1,"`":1}),st=d({},ut,{"#":1,"?":1,"{":1,"}":1}),ft=d({},st,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),lt=function(t,e){var r=b(t,0);return r>32&&r<127&&!y(e,t)?t:encodeURIComponent(t)},ht={ftp:21,file:null,http:80,https:443,ws:80,wss:443},pt=function(t,e){var r;return 2==t.length&&B(K,C(t,0))&&(":"==(r=C(t,1))||!e&&"|"==r)},yt=function(t){var e;return t.length>1&&pt(G(t,0,2))&&(2==t.length||"/"===(e=C(t,2))||"\\"===e||"?"===e||"#"===e)},dt=function(t){return"."===t||"%2e"===Y(t)},vt={},gt={},bt={},mt={},wt={},xt={},_t={},kt={},Ot={},St={},At={},Et={},Pt={},jt={},Rt={},Mt={},Tt={},It={},Ct={},Bt={},Dt={},zt=function t(e,r,n){var o,i,a,c=w(e);if(r){if(i=this.parse(c))throw R(i);this.searchParams=null}else{if(void 0!==n&&(o=new t(n,!0)),i=this.parse(c,null,o))throw R(i);(a=P(new E)).bindURL(this),this.searchParams=a}};zt.prototype={type:"URL",parse:function(t,e,r){var n,i,a,c,u,s=this,f=e||vt,l=0,h="",p=!1,d=!1,b=!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,ot,"")),t=F(t,it,""),n=v(t);l<=n.length;){switch(i=n[l],f){case vt:if(!i||!B(K,i)){if(e)return V;f=bt;continue}h+=Y(i),f=gt;break;case gt:if(i&&(B(Q,i)||"+"==i||"-"==i||"."==i))h+=Y(i);else{if(":"!=i){if(e)return V;h="",f=bt,l=0;continue}if(e&&(s.isSpecial()!=y(ht,h)||"file"==h&&(s.includesCredentials()||null!==s.port)||"file"==s.scheme&&!s.host))return;if(s.scheme=h,e)return void(s.isSpecial()&&ht[s.scheme]==s.port&&(s.port=null));h="","file"==s.scheme?f=jt:s.isSpecial()&&r&&r.scheme==s.scheme?f=mt:s.isSpecial()?f=kt:"/"==n[l+1]?(f=wt,l++):(s.cannotBeABaseURL=!0,N(s.path,""),f=Ct)}break;case bt:if(!r||r.cannotBeABaseURL&&"#"!=i)return V;if(r.cannotBeABaseURL&&"#"==i){s.scheme=r.scheme,s.path=g(r.path),s.query=r.query,s.fragment="",s.cannotBeABaseURL=!0,f=Dt;break}f="file"==r.scheme?jt:xt;continue;case mt:if("/"!=i||"/"!=n[l+1]){f=xt;continue}f=Ot,l++;break;case wt:if("/"==i){f=St;break}f=It;continue;case xt:if(s.scheme=r.scheme,i==o)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=g(r.path),s.query=r.query;else if("/"==i||"\\"==i&&s.isSpecial())f=_t;else if("?"==i)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=g(r.path),s.query="",f=Bt;else{if("#"!=i){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=g(r.path),s.path.length--,f=It;continue}s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=g(r.path),s.query=r.query,s.fragment="",f=Dt}break;case _t:if(!s.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,f=It;continue}f=St}else f=Ot;break;case kt:if(f=Ot,"/"!=i||"/"!=C(h,l+1))continue;l++;break;case Ot:if("/"!=i&&"\\"!=i){f=St;continue}break;case St:if("@"==i){p&&(h="%40"+h),p=!0,a=v(h);for(var m=0;m<a.length;m++){var x=a[m];if(":"!=x||b){var _=lt(x,ft);b?s.password+=_:s.username+=_}else b=!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=At}else h+=i;break;case At:case Et:if(e&&"file"==s.scheme){f=Mt;continue}if(":"!=i||d){if(i==o||"/"==i||"?"==i||"#"==i||"\\"==i&&s.isSpecial()){if(s.isSpecial()&&""==h)return X;if(e&&""==h&&(s.includesCredentials()||null!==s.port))return;if(c=s.parseHost(h))return c;if(h="",f=Tt,e)return;continue}"["==i?d=!0:"]"==i&&(d=!1),h+=i}else{if(""==h)return X;if(c=s.parseHost(h))return c;if(h="",f=Pt,e==Et)return}break;case Pt:if(!B(J,i)){if(i==o||"/"==i||"?"==i||"#"==i||"\\"==i&&s.isSpecial()||e){if(""!=h){var k=M(h,10);if(k>65535)return q;s.port=s.isSpecial()&&k===ht[s.scheme]?null:k,h=""}if(e)return;f=Tt;continue}return q}h+=i;break;case jt:if(s.scheme="file","/"==i||"\\"==i)f=Rt;else{if(!r||"file"!=r.scheme){f=It;continue}if(i==o)s.host=r.host,s.path=g(r.path),s.query=r.query;else if("?"==i)s.host=r.host,s.path=g(r.path),s.query="",f=Bt;else{if("#"!=i){yt(D(g(n,l),""))||(s.host=r.host,s.path=g(r.path),s.shortenPath()),f=It;continue}s.host=r.host,s.path=g(r.path),s.query=r.query,s.fragment="",f=Dt}}break;case Rt:if("/"==i||"\\"==i){f=Mt;break}r&&"file"==r.scheme&&!yt(D(g(n,l),""))&&(pt(r.path[0],!0)?N(s.path,r.path[0]):s.host=r.host),f=It;continue;case Mt:if(i==o||"/"==i||"\\"==i||"?"==i||"#"==i){if(!e&&pt(h))f=It;else if(""==h){if(s.host="",e)return;f=Tt}else{if(c=s.parseHost(h))return c;if("localhost"==s.host&&(s.host=""),e)return;h="",f=Tt}continue}h+=i;break;case Tt:if(s.isSpecial()){if(f=It,"/"!=i&&"\\"!=i)continue}else if(e||"?"!=i)if(e||"#"!=i){if(i!=o&&(f=It,"/"!=i))continue}else s.fragment="",f=Dt;else s.query="",f=Bt;break;case It:if(i==o||"/"==i||"\\"==i&&s.isSpecial()||!e&&("?"==i||"#"==i)){if(".."===(u=Y(u=h))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(s.shortenPath(),"/"==i||"\\"==i&&s.isSpecial()||N(s.path,"")):dt(h)?"/"==i||"\\"==i&&s.isSpecial()||N(s.path,""):("file"==s.scheme&&!s.path.length&&pt(h)&&(s.host&&(s.host=""),h=C(h,0)+":"),N(s.path,h)),h="","file"==s.scheme&&(i==o||"?"==i||"#"==i))for(;s.path.length>1&&""===s.path[0];)U(s.path);"?"==i?(s.query="",f=Bt):"#"==i&&(s.fragment="",f=Dt)}else h+=lt(i,st);break;case Ct:"?"==i?(s.query="",f=Bt):"#"==i?(s.fragment="",f=Dt):i!=o&&(s.path[0]+=lt(i,ct));break;case Bt:e||"#"!=i?i!=o&&("'"==i&&s.isSpecial()?s.query+="%27":s.query+="#"==i?"%23":lt(i,ct)):(s.fragment="",f=Dt);break;case Dt:i!=o&&(s.fragment+=lt(i,ut))}l++}},parseHost:function(t){var e,r,n;if("["==C(t,0)){if("]"!=C(t,t.length-1))return X;if(e=function(t){var e,r,n,o,i,a,c,u=[0,0,0,0,0,0,0,0],s=0,f=null,l=0,h=function(){return C(t,l)};if(":"==h()){if(":"!=C(t,1))return;l+=2,f=++s}for(;h();){if(8==s)return;if(":"!=h()){for(e=r=0;r<4&&B(et,h());)e=16*e+M(h(),16),l++,r++;if("."==h()){if(0==r)return;if(l-=r,s>6)return;for(n=0;h();){if(o=null,n>0){if(!("."==h()&&n<4))return;l++}if(!B(J,h()))return;for(;B(J,h());){if(i=M(h(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;l++}u[s]=256*u[s]+o,2!=++n&&4!=n||s++}if(4!=n)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;u[s++]=e}else{if(null!==f)return;l++,f=++s}}if(null!==f)for(a=s-f,s=7;0!=s&&a>0;)c=u[s],u[s--]=u[f+a-1],u[f+--a]=c;else if(8!=s)return;return u}(G(t,1,-1)),!e)return X;this.host=e}else if(this.isSpecial()){if(t=m(t),B(rt,t))return X;if(e=function(t){var e,r,n,o,i,a,c,u=H(t,".");if(u.length&&""==u[u.length-1]&&u.length--,(e=u.length)>4)return t;for(r=[],n=0;n<e;n++){if(""==(o=u[n]))return t;if(i=10,o.length>1&&"0"==C(o,0)&&(i=B(Z,o)?16:8,o=G(o,8==i?1:2)),""===o)a=0;else{if(!B(10==i?tt:8==i?$:et,o))return t;a=M(o,i)}N(r,a)}for(n=0;n<e;n++)if(a=r[n],n==e-1){if(a>=I(256,5-e))return null}else if(a>255)return null;for(c=L(r),n=0;n<r.length;n++)c+=r[n]*I(256,3-n);return c}(t),null===e)return X;this.host=e}else{if(B(nt,t))return X;for(e="",r=v(t),n=0;n<r.length;n++)e+=lt(r[n],ct);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return y(ht,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"==this.scheme&&1==e&&pt(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,r=t.username,n=t.password,o=t.host,i=t.port,a=t.path,c=t.query,u=t.fragment,s=e+":";return null!==o?(s+="//",t.includesCredentials()&&(s+=r+(n?":"+n:"")+"@"),s+=at(o),null!==i&&(s+=":"+i)):"file"==e&&(s+="//"),s+=t.cannotBeABaseURL?a[0]:a.length?"/"+D(a,"/"):"",null!==c&&(s+="?"+c),null!==u&&(s+="#"+u),s},setHref:function(t){var e=this.parse(t);if(e)throw R(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"==t)try{return new Lt(t.path[0]).origin}catch(t){return"null"}return"file"!=t&&this.isSpecial()?t+"://"+at(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(w(t)+":",vt)},getUsername:function(){return this.username},setUsername:function(t){var e=v(w(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<e.length;r++)this.username+=lt(e[r],ft)}},getPassword:function(){return this.password},setPassword:function(t){var e=v(w(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<e.length;r++)this.password+=lt(e[r],ft)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?at(t):at(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,At)},getHostname:function(){var t=this.host;return null===t?"":at(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,Et)},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,Pt))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+D(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,Tt))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){""==(t=w(t))?this.query=null:("?"==C(t,0)&&(t=G(t,1)),this.query="",this.parse(t,Bt)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){""!=(t=w(t))?("#"==C(t,0)&&(t=G(t,1)),this.fragment="",this.parse(t,Dt)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Lt=function(t){var e=p(this,Nt),r=_(arguments.length,1)>1?arguments[1]:void 0,n=S(e,new zt(t,!1,r));a||(e.href=n.serialize(),e.origin=n.getOrigin(),e.protocol=n.getProtocol(),e.username=n.getUsername(),e.password=n.getPassword(),e.host=n.getHost(),e.hostname=n.getHostname(),e.port=n.getPort(),e.pathname=n.getPathname(),e.search=n.getSearch(),e.searchParams=n.getSearchParams(),e.hash=n.getHash())},Nt=Lt.prototype,Ft=function(t,e){return{get:function(){return A(this)[t]()},set:e&&function(t){return A(this)[e](t)},configurable:!0,enumerable:!0}};if(a&&l(Nt,{href:Ft("serialize","setHref"),origin:Ft("getOrigin"),protocol:Ft("getProtocol","setProtocol"),username:Ft("getUsername","setUsername"),password:Ft("getPassword","setPassword"),host:Ft("getHost","setHost"),hostname:Ft("getHostname","setHostname"),port:Ft("getPort","setPort"),pathname:Ft("getPathname","setPathname"),search:Ft("getSearch","setSearch"),searchParams:Ft("getSearchParams"),hash:Ft("getHash","setHash")}),h(Nt,"toJSON",(function(){return A(this).serialize()}),{enumerable:!0}),h(Nt,"toString",(function(){return A(this).serialize()}),{enumerable:!0}),j){var Ut=j.createObjectURL,Ht=j.revokeObjectURL;Ut&&h(Lt,"createObjectURL",s(Ut,j)),Ht&&h(Lt,"revokeObjectURL",s(Ht,j))}x(Lt,"URL"),i({global:!0,forced:!c,sham:!a},{URL:Lt})},23405:(t,e,r)=>{r(91871)},76048:(t,e,r)=>{"use strict";var n=r(57330),o=r(83264);n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return o(URL.prototype.toString,this)}})},46280:(t,e,r)=>{r(47180),r(4613),r(58055),r(86393),r(79040),r(79145),r(16517),r(64145),r(34659),r(95582),r(47661),r(63745),r(85270),r(86481),r(26606),r(19337),r(141),r(52309),r(95027),r(78667),r(55549),r(12042),r(70079),r(69979),r(91910),r(42426),r(52947),r(17620),r(67352),r(4293),r(30281),r(23949),r(35963),r(8851),r(24133),r(33448),r(7311),r(16798),r(21145),r(9253),r(15618),r(81364),r(55635),r(92550),r(16087),r(26568),r(14747),r(5162),r(16021),r(47185),r(6765),r(86927),r(43542),r(20623),r(22074),r(44837),r(36688),r(45938),r(75640),r(98665),r(72003),r(15034),r(47125),r(75004),r(68825),r(78026),r(83761),r(5582),r(48499),r(80989),r(53733),r(68747),r(92098),r(73694),r(15975),r(43797),r(39286),r(56791),r(73992),r(28161),r(30368),r(63358),r(80900),r(85765),r(39680),r(4141),r(60765),r(66586),r(5225),r(52497),r(28582),r(53470),r(42675),r(31035),r(39192),r(68760),r(92833),r(11936),r(51246),r(38778),r(41450),r(90742),r(63621),r(21741),r(52746),r(51834),r(71243),r(82802),r(71881),r(16146),r(89960),r(13694),r(46748),r(9389),r(94482),r(93406),r(44292),r(57285),r(23484),r(35643),r(13148),r(93219),r(31079),r(30419),r(69376),r(86242),r(43161),r(84125),r(26037),r(79200),r(52440),r(6804),r(97800),r(96620),r(78964),r(26204),r(88011),r(1615),r(48590),r(79036),r(76583),r(82590),r(7158),r(99498),r(53023),r(7212),r(60971),r(18045),r(75567),r(62349),r(87803),r(43),r(33043),r(23252),r(16528),r(52821),r(78158),r(52512),r(32752),r(62302),r(92781),r(74202),r(49615),r(94209),r(84031),r(33259),r(68011),r(22152),r(47015),r(45238),r(39463),r(56267),r(73866),r(49324),r(27153),r(4319),r(39535),r(65667),r(67484),r(52936),r(13684),r(4614),r(77494),r(40536),r(60762),r(4659),r(5604),r(46073),r(95477),r(38039),r(88586),r(39134),r(51257),r(170),r(68266),r(19972),r(98902),r(19540),r(65049),r(75608),r(30452),r(29628),r(71790),r(10901),r(73526),r(97913),r(24319),r(27807),r(57207),r(97371),r(91897),r(43418),r(68709),r(46255),r(62476),r(42205),r(43334),r(75337),r(97598),r(45433),r(64188),r(84880),r(38769),r(50748),r(74287),r(40476),r(50315),r(72168),r(63923),r(95240),r(6721),r(58700),r(79073),r(10012),r(27457),r(38634),r(76878),r(23405),r(76048),r(2848),r(1612)},23513:(t,e,r)=>{var n=r(60800)(r(85170),"DataView");t.exports=n},78972:(t,e,r)=>{var n=r(78285),o=r(75267),i=r(70525),a=r(71720),c=r(75533);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=c,t.exports=u},81160:(t,e,r)=>{var n=r(12392),o=r(49749),i=r(75345),a=r(5840),c=r(84775);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=c,t.exports=u},56990:(t,e,r)=>{var n=r(60800)(r(85170),"Map");t.exports=n},93916:(t,e,r)=>{var n=r(18432),o=r(10481),i=r(24771),a=r(20531),c=r(44592);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=c,t.exports=u},94885:(t,e,r)=>{var n=r(60800)(r(85170),"Promise");t.exports=n},25101:(t,e,r)=>{var n=r(60800)(r(85170),"Set");t.exports=n},7483:(t,e,r)=>{var n=r(93916),o=r(6303),i=r(49140);function a(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n;++e<r;)this.add(t[e])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,t.exports=a},36266:(t,e,r)=>{var n=r(81160),o=r(89107),i=r(36090),a=r(38689),c=r(56249),u=r(58719);function s(t){var e=this.__data__=new n(t);this.size=e.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=c,s.prototype.set=u,t.exports=s},80567:(t,e,r)=>{var n=r(85170).Symbol;t.exports=n},94130:(t,e,r)=>{var n=r(85170).Uint8Array;t.exports=n},40683:(t,e,r)=>{var n=r(60800)(r(85170),"WeakMap");t.exports=n},41655:t=>{t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},87375:t=>{t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}},22998:t=>{t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i}},36439:(t,e,r)=>{var n=r(42190),o=r(40600),i=r(80991),a=r(37568),c=r(95872),u=r(89113),s=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=i(t),f=!r&&o(t),l=!r&&!f&&a(t),h=!r&&!f&&!l&&u(t),p=r||f||l||h,y=p?n(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)||c(v,d))||y.push(v);return y}},47311:t=>{t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}},72004:t=>{t.exports=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}},54895:t=>{t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}},9254:(t,e,r)=>{var n=r(50151),o=r(49197),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var a=t[e];i.call(t,e)&&o(a,r)&&(void 0!==r||e in t)||n(t,e,r)}},23103:(t,e,r)=>{var n=r(49197);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},23256:(t,e,r)=>{var n=r(94273),o=r(7661);t.exports=function(t,e){return t&&n(e,o(e),t)}},26972:(t,e,r)=>{var n=r(94273),o=r(67075);t.exports=function(t,e){return t&&n(e,o(e),t)}},50151:(t,e,r)=>{var n=r(38838);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},81102:(t,e,r)=>{var n=r(36266),o=r(87375),i=r(9254),a=r(23256),c=r(26972),u=r(7773),s=r(95640),f=r(68672),l=r(16746),h=r(88069),p=r(21778),y=r(5014),d=r(85554),v=r(66008),g=r(96917),b=r(80991),m=r(37568),w=r(96825),x=r(90966),_=r(52001),k=r(7661),O=r(67075),S="[object Arguments]",A="[object Function]",E="[object Object]",P={};P[S]=P["[object Array]"]=P["[object ArrayBuffer]"]=P["[object DataView]"]=P["[object Boolean]"]=P["[object Date]"]=P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Map]"]=P["[object Number]"]=P[E]=P["[object RegExp]"]=P["[object Set]"]=P["[object String]"]=P["[object Symbol]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P["[object Error]"]=P[A]=P["[object WeakMap]"]=!1,t.exports=function t(e,r,j,R,M,T){var I,C=1&r,B=2&r,D=4&r;if(j&&(I=M?j(e,R,M,T):j(e)),void 0!==I)return I;if(!x(e))return e;var z=b(e);if(z){if(I=d(e),!C)return s(e,I)}else{var L=y(e),N=L==A||"[object GeneratorFunction]"==L;if(m(e))return u(e,C);if(L==E||L==S||N&&!M){if(I=B||N?{}:g(e),!C)return B?l(e,c(I,e)):f(e,a(I,e))}else{if(!P[L])return M?e:{};I=v(e,L,C)}}T||(T=new n);var F=T.get(e);if(F)return F;T.set(e,I),_(e)?e.forEach((function(n){I.add(t(n,r,j,n,e,T))})):w(e)&&e.forEach((function(n,o){I.set(o,t(n,r,j,o,e,T))}));var U=z?void 0:(D?B?p:h:B?O:k)(e);return o(U||e,(function(n,o){U&&(n=e[o=n]),i(I,o,t(n,r,j,o,e,T))})),I}},78378:(t,e,r)=>{var n=r(90966),o=Object.create,i=function(){function t(){}return function(e){if(!n(e))return{};if(o)return o(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=i},768:(t,e,r)=>{var n=r(72004),o=r(80991);t.exports=function(t,e,r){var i=e(t);return o(t)?i:n(i,r(t))}},50916:(t,e,r)=>{var n=r(80567),o=r(9522),i=r(97056),a=n?n.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)}},46819:(t,e,r)=>{var n=r(50916),o=r(61662);t.exports=function(t){return o(t)&&"[object Arguments]"==n(t)}},53462:(t,e,r)=>{var n=r(26811),o=r(61662);t.exports=function t(e,r,i,a,c){return e===r||(null==e||null==r||!o(e)&&!o(r)?e!=e&&r!=r:n(e,r,i,a,t,c))}},26811:(t,e,r)=>{var n=r(36266),o=r(85643),i=r(75219),a=r(18504),c=r(5014),u=r(80991),s=r(37568),f=r(89113),l="[object Arguments]",h="[object Array]",p="[object Object]",y=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,d,v,g){var b=u(t),m=u(e),w=b?h:c(t),x=m?h:c(e),_=(w=w==l?p:w)==p,k=(x=x==l?p:x)==p,O=w==x;if(O&&s(t)){if(!s(e))return!1;b=!0,_=!1}if(O&&!_)return g||(g=new n),b||f(t)?o(t,e,r,d,v,g):i(t,e,w,r,d,v,g);if(!(1&r)){var S=_&&y.call(t,"__wrapped__"),A=k&&y.call(e,"__wrapped__");if(S||A){var E=S?t.value():t,P=A?e.value():e;return g||(g=new n),v(E,P,r,d,g)}}return!!O&&(g||(g=new n),a(t,e,r,d,v,g))}},63027:(t,e,r)=>{var n=r(5014),o=r(61662);t.exports=function(t){return o(t)&&"[object Map]"==n(t)}},91922:(t,e,r)=>{var n=r(13401),o=r(83596),i=r(90966),a=r(20530),c=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,f=u.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))&&(n(t)?h:c).test(a(t))}},64479:(t,e,r)=>{var n=r(5014),o=r(61662);t.exports=function(t){return o(t)&&"[object Set]"==n(t)}},69127:(t,e,r)=>{var n=r(50916),o=r(28806),i=r(61662),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[n(t)]}},30261:(t,e,r)=>{var n=r(12009),o=r(2502),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return o(t);var e=[];for(var r in Object(t))i.call(t,r)&&"constructor"!=r&&e.push(r);return e}},83586:(t,e,r)=>{var n=r(90966),o=r(12009),i=r(27902),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return i(t);var e=o(t),r=[];for(var c in t)("constructor"!=c||!e&&a.call(t,c))&&r.push(c);return r}},46780:t=>{t.exports=function(t){return function(e){return null==t?void 0:t[e]}}},37551:(t,e,r)=>{var n=r(77865),o=r(51729),i=r(88214);t.exports=function(t,e){return i(o(t,e,n),t+"")}},60511:(t,e,r)=>{var n=r(57848),o=r(38838),i=r(77865),a=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:i;t.exports=a},42190:t=>{t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},36929:(t,e,r)=>{var n=r(80567),o=r(47311),i=r(80991),a=r(75032),c=n?n.prototype:void 0,u=c?c.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 u?u.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}},73988:(t,e,r)=>{var n=r(83315),o=/^\s+/;t.exports=function(t){return t?t.slice(0,n(t)+1).replace(o,""):t}},98146:t=>{t.exports=function(t){return function(e){return t(e)}}},39775:(t,e,r)=>{var n=r(47311);t.exports=function(t,e){return n(e,(function(e){return t[e]}))}},48668:t=>{t.exports=function(t,e){return t.has(e)}},11243:(t,e,r)=>{var n=r(94130);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},7773:(t,e,r)=>{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},n(t)}t=r.nmd(t);var o=r(85170),i="object"==n(e)&&e&&!e.nodeType&&e,a=i&&"object"==n(t)&&t&&!t.nodeType&&t,c=a&&a.exports===i?o.Buffer:void 0,u=c?c.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=u?u(r):new t.constructor(r);return t.copy(n),n}},5455:(t,e,r)=>{var n=r(11243);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}},21315:t=>{var e=/\w*$/;t.exports=function(t){var r=new t.constructor(t.source,e.exec(t));return r.lastIndex=t.lastIndex,r}},73188:(t,e,r)=>{var n=r(80567),o=n?n.prototype:void 0,i=o?o.valueOf:void 0;t.exports=function(t){return i?Object(i.call(t)):{}}},72972:(t,e,r)=>{var n=r(11243);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},95640:t=>{t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},94273:(t,e,r)=>{var n=r(9254),o=r(50151);t.exports=function(t,e,r,i){var a=!r;r||(r={});for(var c=-1,u=e.length;++c<u;){var s=e[c],f=i?i(r[s],t[s],s,r,t):void 0;void 0===f&&(f=t[s]),a?o(r,s,f):n(r,s,f)}return r}},68672:(t,e,r)=>{var n=r(94273),o=r(26982);t.exports=function(t,e){return n(t,o(t),e)}},16746:(t,e,r)=>{var n=r(94273),o=r(60005);t.exports=function(t,e){return n(t,o(t),e)}},27869:(t,e,r)=>{var n=r(85170)["__core-js_shared__"];t.exports=n},64349:(t,e,r)=>{var n=r(37551),o=r(90654);t.exports=function(t){return n((function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,c=i>2?r[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,c&&o(r[0],r[1],c)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var u=r[n];u&&t(e,u,n,a)}return e}))}},55695:(t,e,r)=>{var n=r(49197),o=Object.prototype,i=o.hasOwnProperty;t.exports=function(t,e,r,a){return void 0===t||n(t,o[r])&&!i.call(a,r)?e:t}},38838:(t,e,r)=>{var n=r(60800),o=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},85643:(t,e,r)=>{var n=r(7483),o=r(54895),i=r(48668);t.exports=function(t,e,r,a,c,u){var s=1&r,f=t.length,l=e.length;if(f!=l&&!(s&&l>f))return!1;var h=u.get(t),p=u.get(e);if(h&&p)return h==e&&p==t;var y=-1,d=!0,v=2&r?new n:void 0;for(u.set(t,e),u.set(e,t);++y<f;){var g=t[y],b=e[y];if(a)var m=s?a(b,g,y,e,t,u):a(g,b,y,t,e,u);if(void 0!==m){if(m)continue;d=!1;break}if(v){if(!o(e,(function(t,e){if(!i(v,e)&&(g===t||c(g,t,r,a,u)))return v.push(e)}))){d=!1;break}}else if(g!==b&&!c(g,b,r,a,u)){d=!1;break}}return u.delete(t),u.delete(e),d}},75219:(t,e,r)=>{var n=r(80567),o=r(94130),i=r(49197),a=r(85643),c=r(83095),u=r(95611),s=n?n.prototype:void 0,f=s?s.valueOf:void 0;t.exports=function(t,e,r,n,s,l,h){switch(r){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=c;case"[object Set]":var y=1&n;if(p||(p=u),t.size!=e.size&&!y)return!1;var d=h.get(t);if(d)return d==e;n|=2,h.set(t,e);var v=a(p(t),p(e),n,s,l,h);return h.delete(t),v;case"[object Symbol]":if(f)return f.call(t)==f.call(e)}return!1}},18504:(t,e,r)=>{var n=r(88069),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,i,a,c){var u=1&r,s=n(t),f=s.length;if(f!=n(e).length&&!u)return!1;for(var l=f;l--;){var h=s[l];if(!(u?h in e:o.call(e,h)))return!1}var p=c.get(t),y=c.get(e);if(p&&y)return p==e&&y==t;var d=!0;c.set(t,e),c.set(e,t);for(var v=u;++l<f;){var g=t[h=s[l]],b=e[h];if(i)var m=u?i(b,g,h,e,t,c):i(g,b,h,t,e,c);if(!(void 0===m?g===b||a(g,b,r,i,c):m)){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 c.delete(t),c.delete(e),d}},33846:(t,e,r)=>{var n=r(46780)({"&":"&","<":"<",">":">",'"':""","'":"'"});t.exports=n},27413:t=>{var e={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};t.exports=function(t){return"\\"+e[t]}},68908:(t,e,r)=>{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},n(t)}var o="object"==(void 0===r.g?"undefined":n(r.g))&&r.g&&r.g.Object===Object&&r.g;t.exports=o},88069:(t,e,r)=>{var n=r(768),o=r(26982),i=r(7661);t.exports=function(t){return n(t,i,o)}},21778:(t,e,r)=>{var n=r(768),o=r(60005),i=r(67075);t.exports=function(t){return n(t,i,o)}},20666:(t,e,r)=>{var n=r(78369);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},60800:(t,e,r)=>{var n=r(91922),o=r(81606);t.exports=function(t,e){var r=o(t,e);return n(r)?r:void 0}},20039:(t,e,r)=>{var n=r(88964)(Object.getPrototypeOf,Object);t.exports=n},9522:(t,e,r)=>{var n=r(80567),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,c=n?n.toStringTag:void 0;t.exports=function(t){var e=i.call(t,c),r=t[c];try{t[c]=void 0;var n=!0}catch(t){}var o=a.call(t);return n&&(e?t[c]=r:delete t[c]),o}},26982:(t,e,r)=>{var n=r(22998),o=r(98222),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,c=a?function(t){return null==t?[]:(t=Object(t),n(a(t),(function(e){return i.call(t,e)})))}:o;t.exports=c},60005:(t,e,r)=>{var n=r(72004),o=r(20039),i=r(26982),a=r(98222),c=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)n(e,i(t)),t=o(t);return e}:a;t.exports=c},5014:(t,e,r)=>{var n=r(23513),o=r(56990),i=r(94885),a=r(25101),c=r(40683),u=r(50916),s=r(20530),f="[object Map]",l="[object Promise]",h="[object Set]",p="[object WeakMap]",y="[object DataView]",d=s(n),v=s(o),g=s(i),b=s(a),m=s(c),w=u;(n&&w(new n(new ArrayBuffer(1)))!=y||o&&w(new o)!=f||i&&w(i.resolve())!=l||a&&w(new a)!=h||c&&w(new c)!=p)&&(w=function(t){var e=u(t),r="[object Object]"==e?t.constructor:void 0,n=r?s(r):"";if(n)switch(n){case d:return y;case v:return f;case g:return l;case b:return h;case m:return p}return e}),t.exports=w},81606:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},78285:(t,e,r)=>{var n=r(49434);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},75267:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},70525:(t,e,r)=>{var n=r(49434),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(e,t)?e[t]:void 0}},71720:(t,e,r)=>{var n=r(49434),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:o.call(e,t)}},75533:(t,e,r)=>{var n=r(49434);t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},85554:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t){var r=t.length,n=new t.constructor(r);return r&&"string"==typeof t[0]&&e.call(t,"index")&&(n.index=t.index,n.input=t.input),n}},66008:(t,e,r)=>{var n=r(11243),o=r(5455),i=r(21315),a=r(73188),c=r(72972);t.exports=function(t,e,r){var u=t.constructor;switch(e){case"[object ArrayBuffer]":return n(t);case"[object Boolean]":case"[object Date]":return new u(+t);case"[object DataView]":return o(t,r);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 c(t,r);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(t);case"[object RegExp]":return i(t);case"[object Symbol]":return a(t)}}},96917:(t,e,r)=>{var n=r(78378),o=r(20039),i=r(12009);t.exports=function(t){return"function"!=typeof t.constructor||i(t)?{}:n(o(t))}},95872: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},e(t)}var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var o=e(t);return!!(n=null==n?9007199254740991:n)&&("number"==o||"symbol"!=o&&r.test(t))&&t>-1&&t%1==0&&t<n}},90654:(t,e,r)=>{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},n(t)}var o=r(49197),i=r(57214),a=r(95872),c=r(90966);t.exports=function(t,e,r){if(!c(r))return!1;var u=n(e);return!!("number"==u?i(r)&&a(e,r.length):"string"==u&&e in r)&&o(r[e],t)}},78369: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},e(t)}t.exports=function(t){var r=e(t);return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t}},83596:(t,e,r)=>{var n,o=r(27869),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!i&&i in t}},12009:t=>{var e=Object.prototype;t.exports=function(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||e)}},12392:t=>{t.exports=function(){this.__data__=[],this.size=0}},49749:(t,e,r)=>{var n=r(23103),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0||(r==e.length-1?e.pop():o.call(e,r,1),--this.size,0))}},75345:(t,e,r)=>{var n=r(23103);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},5840:(t,e,r)=>{var n=r(23103);t.exports=function(t){return n(this.__data__,t)>-1}},84775:(t,e,r)=>{var n=r(23103);t.exports=function(t,e){var r=this.__data__,o=n(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}},18432:(t,e,r)=>{var n=r(78972),o=r(81160),i=r(56990);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},10481:(t,e,r)=>{var n=r(20666);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},24771:(t,e,r)=>{var n=r(20666);t.exports=function(t){return n(this,t).get(t)}},20531:(t,e,r)=>{var n=r(20666);t.exports=function(t){return n(this,t).has(t)}},44592:(t,e,r)=>{var n=r(20666);t.exports=function(t,e){var r=n(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}},83095:t=>{t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}},49434:(t,e,r)=>{var n=r(60800)(Object,"create");t.exports=n},2502:(t,e,r)=>{var n=r(88964)(Object.keys,Object);t.exports=n},27902:t=>{t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},9155:(t,e,r)=>{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},n(t)}t=r.nmd(t);var o=r(68908),i="object"==n(e)&&e&&!e.nodeType&&e,a=i&&"object"==n(t)&&t&&!t.nodeType&&t,c=a&&a.exports===i&&o.process,u=function(){try{return a&&a.require&&a.require("util").types||c&&c.binding&&c.binding("util")}catch(t){}}();t.exports=u},97056:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},88964:t=>{t.exports=function(t,e){return function(r){return t(e(r))}}},51729:(t,e,r)=>{var n=r(41655),o=Math.max;t.exports=function(t,e,r){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,a=-1,c=o(i.length-e,0),u=Array(c);++a<c;)u[a]=i[e+a];a=-1;for(var s=Array(e+1);++a<e;)s[a]=i[a];return s[e]=r(u),n(t,this,s)}}},27162:t=>{t.exports=/<%-([\s\S]+?)%>/g},87213:t=>{t.exports=/<%([\s\S]+?)%>/g},57232:t=>{t.exports=/<%=([\s\S]+?)%>/g},85170:(t,e,r)=>{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},n(t)}var o=r(68908),i="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,a=o||i||Function("return this")();t.exports=a},6303:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},49140:t=>{t.exports=function(t){return this.__data__.has(t)}},95611:t=>{t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}},88214:(t,e,r)=>{var n=r(60511),o=r(16007)(n);t.exports=o},16007:t=>{var e=Date.now;t.exports=function(t){var r=0,n=0;return function(){var o=e(),i=16-(o-n);if(n=o,i>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}},89107:(t,e,r)=>{var n=r(81160);t.exports=function(){this.__data__=new n,this.size=0}},36090:t=>{t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},38689:t=>{t.exports=function(t){return this.__data__.get(t)}},56249:t=>{t.exports=function(t){return this.__data__.has(t)}},58719:(t,e,r)=>{var n=r(81160),o=r(56990),i=r(93916);t.exports=function(t,e){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!o||a.length<199)return a.push([t,e]),this.size=++r.size,this;r=this.__data__=new i(a)}return r.set(t,e),this.size=r.size,this}},20530:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},83315:t=>{var e=/\s/;t.exports=function(t){for(var r=t.length;r--&&e.test(t.charAt(r)););return r}},75239:(t,e,r)=>{var n=r(94273),o=r(64349),i=r(67075),a=o((function(t,e,r,o){n(e,i(e),t,o)}));t.exports=a},94891:(t,e,r)=>{var n=r(41655),o=r(37551),i=r(473),a=o((function(t,e){try{return n(t,void 0,e)}catch(t){return i(t)?t:new Error(t)}}));t.exports=a},80442:(t,e,r)=>{var n=r(90114);t.exports=function(t,e){var r;if("function"!=typeof e)throw new TypeError("Expected a function");return t=n(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=void 0),r}}},72357:(t,e,r)=>{var n=r(81102);t.exports=function(t){return n(t,4)}},57848:t=>{t.exports=function(t){return function(){return t}}},62632:(t,e,r)=>{var n=r(90966),o=r(44225),i=r(54873),a=Math.max,c=Math.min;t.exports=function(t,e,r){var u,s,f,l,h,p,y=0,d=!1,v=!1,g=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function b(e){var r=u,n=s;return u=s=void 0,y=e,l=t.apply(n,r)}function m(t){return y=t,h=setTimeout(x,e),d?b(t):l}function w(t){var r=t-p;return void 0===p||r>=e||r<0||v&&t-y>=f}function x(){var t=o();if(w(t))return _(t);h=setTimeout(x,function(t){var r=e-(t-p);return v?c(r,f-(t-y)):r}(t))}function _(t){return h=void 0,g&&u?b(t):(u=s=void 0,l)}function k(){var t=o(),r=w(t);if(u=arguments,s=this,p=t,r){if(void 0===h)return m(p);if(v)return clearTimeout(h),h=setTimeout(x,e),b(p)}return void 0===h&&(h=setTimeout(x,e)),l}return e=i(e)||0,n(r)&&(d=!!r.leading,f=(v="maxWait"in r)?a(i(r.maxWait)||0,e):f,g="trailing"in r?!!r.trailing:g),k.cancel=function(){void 0!==h&&clearTimeout(h),y=0,u=p=s=h=void 0},k.flush=function(){return void 0===h?l:_(o())},k}},49197:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},92721:(t,e,r)=>{var n=r(33846),o=r(51177),i=/[&<>"']/g,a=RegExp(i.source);t.exports=function(t){return(t=o(t))&&a.test(t)?t.replace(i,n):t}},77865:t=>{t.exports=function(t){return t}},40600:(t,e,r)=>{var n=r(46819),o=r(61662),i=Object.prototype,a=i.hasOwnProperty,c=i.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(t){return o(t)&&a.call(t,"callee")&&!c.call(t,"callee")};t.exports=u},80991:t=>{var e=Array.isArray;t.exports=e},57214:(t,e,r)=>{var n=r(13401),o=r(28806);t.exports=function(t){return null!=t&&o(t.length)&&!n(t)}},37568:(t,e,r)=>{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},n(t)}t=r.nmd(t);var o=r(85170),i=r(9533),a="object"==n(e)&&e&&!e.nodeType&&e,c=a&&"object"==n(t)&&t&&!t.nodeType&&t,u=c&&c.exports===a?o.Buffer:void 0,s=(u?u.isBuffer:void 0)||i;t.exports=s},97186:(t,e,r)=>{var n=r(30261),o=r(5014),i=r(40600),a=r(80991),c=r(57214),u=r(37568),s=r(12009),f=r(89113),l=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(c(t)&&(a(t)||"string"==typeof t||"function"==typeof t.splice||u(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!n(t).length;for(var r in t)if(l.call(t,r))return!1;return!0}},27542:(t,e,r)=>{var n=r(53462);t.exports=function(t,e){return n(t,e)}},473:(t,e,r)=>{var n=r(50916),o=r(61662),i=r(20268);t.exports=function(t){if(!o(t))return!1;var e=n(t);return"[object Error]"==e||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!i(t)}},13401:(t,e,r)=>{var n=r(50916),o=r(90966);t.exports=function(t){if(!o(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},28806:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},96825:(t,e,r)=>{var n=r(63027),o=r(98146),i=r(9155),a=i&&i.isMap,c=a?o(a):n;t.exports=c},90966: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},e(t)}t.exports=function(t){var r=e(t);return null!=t&&("object"==r||"function"==r)}},61662: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},e(t)}t.exports=function(t){return null!=t&&"object"==e(t)}},20268:(t,e,r)=>{var n=r(50916),o=r(20039),i=r(61662),a=Function.prototype,c=Object.prototype,u=a.toString,s=c.hasOwnProperty,f=u.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=n(t))return!1;var e=o(t);if(null===e)return!0;var r=s.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&u.call(r)==f}},52001:(t,e,r)=>{var n=r(64479),o=r(98146),i=r(9155),a=i&&i.isSet,c=a?o(a):n;t.exports=c},75032:(t,e,r)=>{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},n(t)}var o=r(50916),i=r(61662);t.exports=function(t){return"symbol"==n(t)||i(t)&&"[object Symbol]"==o(t)}},89113:(t,e,r)=>{var n=r(69127),o=r(98146),i=r(9155),a=i&&i.isTypedArray,c=a?o(a):n;t.exports=c},7661:(t,e,r)=>{var n=r(36439),o=r(30261),i=r(57214);t.exports=function(t){return i(t)?n(t):o(t)}},67075:(t,e,r)=>{var n=r(36439),o=r(83586),i=r(57214);t.exports=function(t){return i(t)?n(t,!0):o(t)}},44225:(t,e,r)=>{var n=r(85170);t.exports=function(){return n.Date.now()}},72297:(t,e,r)=>{var n=r(80442);t.exports=function(t){return n(2,t)}},98222:t=>{t.exports=function(){return[]}},9533:t=>{t.exports=function(){return!1}},59501:(t,e,r)=>{var n=r(75239),o=r(94891),i=r(39775),a=r(55695),c=r(27413),u=r(473),s=r(90654),f=r(7661),l=r(57232),h=r(80370),p=r(51177),y=/\b__p \+= '';/g,d=/\b(__p \+=) '' \+/g,v=/(__e\(.*?\)|\b__t\)) \+\n'';/g,g=/[()=,{}\[\]\/\s]/,b=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,m=/($^)/,w=/['\n\r\u2028\u2029\\]/g,x=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var _=h.imports._.templateSettings||h;r&&s(t,e,r)&&(e=void 0),t=p(t),e=n({},e,_,a);var k,O,S=n({},e.imports,_.imports,a),A=f(S),E=i(S,A),P=0,j=e.interpolate||m,R="__p += '",M=RegExp((e.escape||m).source+"|"+j.source+"|"+(j===l?b:m).source+"|"+(e.evaluate||m).source+"|$","g"),T=x.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(M,(function(e,r,n,o,i,a){return n||(n=o),R+=t.slice(P,a).replace(w,c),r&&(k=!0,R+="' +\n__e("+r+") +\n'"),i&&(O=!0,R+="';\n"+i+";\n__p += '"),n&&(R+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),P=a+e.length,e})),R+="';\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 R="with (obj) {\n"+R+"\n}\n";R=(O?R.replace(y,""):R).replace(d,"$1").replace(v,"$1;"),R="function("+(I||"obj")+") {\n"+(I?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(k?", __e = _.escape":"")+(O?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+R+"return __p\n}";var C=o((function(){return Function(A,T+"return "+R).apply(void 0,E)}));if(C.source=R,u(C))throw C;return C}},80370:(t,e,r)=>{var n=r(92721),o={escape:r(27162),evaluate:r(87213),interpolate:r(57232),variable:"",imports:{_:{escape:n}}};t.exports=o},56778:(t,e,r)=>{var n=r(62632),o=r(90966);t.exports=function(t,e,r){var i=!0,a=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return o(r)&&(i="leading"in r?!!r.leading:i,a="trailing"in r?!!r.trailing:a),n(t,e,{leading:i,maxWait:e,trailing:a})}},47655:(t,e,r)=>{var n=r(54873);t.exports=function(t){return t?Infinity===(t=n(t))||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},90114:(t,e,r)=>{var n=r(47655);t.exports=function(t){var e=n(t),r=e%1;return e==e?r?e-r:e:0}},54873:(t,e,r)=>{var n=r(73988),o=r(90966),i=r(75032),a=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,u=/^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=n(t);var r=c.test(t);return r||u.test(t)?s(t.slice(2),r?2:8):a.test(t)?NaN:+t}},51177:(t,e,r)=>{var n=r(36929);t.exports=function(t){return null==t?"":n(t)}},87751:(t,e,r)=>{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},n(t)}var o=function(t){"use strict";var e,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n=h;return function(o,i){if(n===y)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return M()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=A(a,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=y;var u=l(t,e,r);if("normal"===u.type){if(n=r.done?d:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function g(){}function b(){}function m(){}var w={};s(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(R([])));_&&_!==r&&o.call(_,a)&&(w=_);var k=m.prototype=g.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(i,a,c,u){var s=l(t[i],t,a);if("throw"!==s.type){var f=s.arg,h=f.value;return h&&"object"===n(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(h).then((function(t){f.value=t,c(f)}),(function(t){return r("throw",t,c,u)}))}u(s.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}}function A(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function E(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 P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function R(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n<t.length;)if(o.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}return{next:M}}function M(){return{value:e,done:!0}}return b.prototype=m,s(k,"constructor",m),s(m,"constructor",b),b.displayName=s(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},t.awrap=function(t){return{__await:t}},O(S.prototype),s(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new S(f(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(k),s(k,u,"Generator"),s(k,a,(function(){return this})),s(k,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=R,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),s=o.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;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,v):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),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:R(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}("object"===n(t=r.nmd(t))?t.exports:{});try{regeneratorRuntime=o}catch(t){"object"===("undefined"==typeof globalThis?"undefined":n(globalThis))?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},61894:function(t,e){var r,n;void 0===(n="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=[],r=7;r>=0;r--)e.push(!!(t&1<<r));return e},r=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=[],r=0;r<t;r++)e.push(this.readByte());return e},this.read=function(t){for(var e="",r=0;r<t;r++)e+=String.fromCharCode(this.readByte());return e},this.readUnsigned=function(){var t=this.readBytes(2);return(t[1]<<8)+t[0]}},n=function(r,n){n||(n={});var o=function(t){for(var e=[],n=0;n<t;n++)e.push(r.readBytes(3));return e},i=function(){var t,e;e="";do{t=r.readByte(),e+=r.read(t)}while(0!==t);return e},a=function(a){a.leftPos=r.readUnsigned(),a.topPos=r.readUnsigned(),a.width=r.readUnsigned(),a.height=r.readUnsigned();var c=e(r.readByte());a.lctFlag=c.shift(),a.interlaced=c.shift(),a.sorted=c.shift(),a.reserved=c.splice(0,2),a.lctSize=t(c.splice(0,3)),a.lctFlag&&(a.lct=o(1<<a.lctSize+1)),a.lzwMinCodeSize=r.readByte();var u=i();a.pixels=function(t,e){for(var r,n,o=0,i=function(t){for(var r=0,n=0;n<t;n++)e.charCodeAt(o>>3)&1<<(7&o)&&(r|=1<<n),o++;return r},a=[],c=1<<t,u=c+1,s=t+1,f=[],l=function(){f=[],s=t+1;for(var e=0;e<c;e++)f[e]=[e];f[c]=[],f[u]=null};;)if(n=r,(r=i(s))!==c){if(r===u)break;if(r<f.length)n!==c&&f.push(f[n].concat(f[r][0]));else{if(r!==f.length)throw new Error("Invalid LZW code.");f.push(f[n].concat(f[n][0]))}a.push.apply(a,f[r]),f.length===1<<s&&s<12&&s++}else l();return a}(a.lzwMinCodeSize,u),a.interlaced&&(a.pixels=function(t,e){for(var r=new Array(t.length),n=t.length/e,o=function(n,o){var i=t.slice(o*e,(o+1)*e);r.splice.apply(r,[n*e,e].concat(i))},i=[0,4,2,1],a=[8,8,4,2],c=0,u=0;u<4;u++)for(var s=i[u];s<n;s+=a[u])o(s,c),c++;return r}(a.pixels,a.width)),n.img&&n.img(a)};(function(){var i={};if(i.sig=r.read(3),i.ver=r.read(3),"GIF"!==i.sig)throw new Error("Not a GIF file.");i.width=r.readUnsigned(),i.height=r.readUnsigned();var a=e(r.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=r.readByte(),i.pixelAspectRatio=r.readByte(),i.gctFlag&&(i.gct=o(1<<i.gctSize+1)),n.hdr&&n.hdr(i)})(),requestAnimationFrame((function o(){var c={};switch(c.sentinel=r.readByte(),String.fromCharCode(c.sentinel)){case"!":c.type="ext",function(o){switch(o.label=r.readByte(),o.label){case 249:o.extType="gce",function(o){r.readByte();var i=e(r.readByte());o.reserved=i.splice(0,3),o.disposalMethod=t(i.splice(0,3)),o.userInput=i.shift(),o.transparencyGiven=i.shift(),o.delayTime=r.readUnsigned(),o.transparencyIndex=r.readByte(),o.terminator=r.readByte(),n.gce&&n.gce(o)}(o);break;case 254:o.extType="com",function(t){t.comment=i(),n.com&&n.com(t)}(o);break;case 1:o.extType="pte",function(t){r.readByte(),t.ptHeader=r.readBytes(12),t.ptData=i(),n.pte&&n.pte(t)}(o);break;case 255:o.extType="app",function(t){r.readByte(),t.identifier=r.read(8),t.authCode=r.read(3),"NETSCAPE"===t.identifier?function(t){r.readByte(),t.unknown=r.readByte(),t.iterations=r.readUnsigned(),t.terminator=r.readByte(),n.app&&n.app.NETSCAPE&&n.app.NETSCAPE(t)}(t):function(t){t.appData=i(),n.app&&n.app[t.identifier]&&n.app[t.identifier](t)}(t)}(o);break;default:o.extType="unknown",function(t){t.data=i(),n.unknown&&n.unknown(t)}(o)}}(c);break;case",":c.type="img",a(c);break;case";":c.type="eof",n.eof&&n.eof(c);break;default:throw new Error("Unknown block: 0x"+c.sentinel.toString(16))}"eof"!==c.type&&requestAnimationFrame(o)}))};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 c=null,u=!1,s=null,f=null,l=null,h=null,p=null,y=null,d=null,v=!0,g=!1,b=[],m=[],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,O,S=i.hasOwnProperty("on_end")?i.on_end:null,A=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),R=i.hasOwnProperty("progressbar_height")?i.progressbar_height:25,M=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{n(e,G)}catch(t){z("parse")}},B=function(t,e){x.width=t*W(),x.height=e*W(),k.style.minWidth=t*W()+"px",O.width=t,O.height=e,O.style.width=t+"px",O.style.height=e+"px",O.getContext("2d").setTransform(1,0,0,1,0,0)},D=function(t,e,r){if(r&&j){var n,o,a,c=R;i.is_vp?g?(o=(i.vp_t+i.vp_h-c)/W(),c/=W(),n=i.vp_l/W()+t/e*(i.vp_w/W()),a=x.width/W()):(o=i.vp_t+i.vp_h-c,c=c,n=i.vp_l+t/e*i.vp_w,a=x.width):(o=(x.height-c)/(g?W():1),n=t/e*x.width/(g?W():1),a=x.width/(g?W():1),c/=g?W():1),_.fillStyle=M,_.fillRect(n,o,a-n,c),_.fillStyle=T,_.fillRect(0,o,n,c)}},z=function(t){c=t,o={width:w.width,height:w.height},b=[],_.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()},L=function(){y&&(b.push({data:y.getImageData(0,0,o.width,o.height),delay:f}),m.push({x:0,y:0}))},N=function(){var t,e,r,n=-1,o=0,a=function(t){n+=t,s()},u=(t=!1,e=function(){null!==S&&S(w),o++,!1!==E||o<0?r():(t=!1,v=!1)},r=function r(){if(t=v){a(1);var o=10*b[n].delay;o||(o=100),0==(n+1+b.length)%b.length?(o+=A,setTimeout(e,o)):setTimeout(r,o)}},function(){t||requestAnimationFrame(r)}),s=function(){var t;(n=parseInt(n,10))>b.length-1&&(n=0),n<0&&(n=0),t=m[n],O.getContext("2d").putImageData(b[n].data,t.x,t.y),_.globalCompositeOperation="copy",_.drawImage(O,0,0)};return{init:function(){c||(i.c_w&&i.c_h||_.scale(W(),W()),i.auto_play?u():(n=0,s()))},step:u,play:function(){v=!0,u()},pause:function(){v=!1},playing:v,move_relative:a,current_frame:function(){return n},length:function(){return b.length},move_to:function(t){n=t,s()}}}(),F=function(t){D(e.pos,e.data.length,t)},U=function(){},H=function(t,e){return function(r){t(r),F(e)}},G={hdr:H((function(t){B((o=t).width,o.height)})),gce:H((function(t){L(),I(),s=t.transparencyGiven?t.transparencyIndex:null,f=t.delayTime,l=t.disposalMethod})),com:H(U),app:{NETSCAPE:H(U)},img:H((function(t){y||(y=O.getContext("2d"));var e=b.length,r=t.lctFlag?t.lct:o.gct;e>0&&(3===p?null!==h?y.putImageData(b[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 n=y.getImageData(t.leftPos,t.topPos,t.width,t.height);t.pixels.forEach((function(t,e){t!==s&&(n.data[4*e+0]=r[t][0],n.data[4*e+1]=r[t][1],n.data[4*e+2]=r[t][2],n.data[4*e+3]=255)})),y.putImageData(n,t.leftPos,t.topPos),g||(_.scale(W(),W()),g=!0),P&&(_.drawImage(O,0,0),P=i.auto_play),d=t}),!0),eof:function(t){L(),F(!1),i.c_w&&i.c_h||(x.width=o.width*W(),x.height=o.height*W()),N.init(),u=!1,X&&X(w)}},Y=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"),O=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&&B(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!u&&(X=t||!1,u=!0,b=[],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 W()},get_loading:function(){return u},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,n){if(q(n)){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||Y()},o.onload=function(t){200!=this.status&&z("xhr - response"),"response"in this||(this.response=new VBArray(this.responseText).toArray().map(String.fromCharCode).join(""));var n=this.response;n.toString().indexOf("ArrayBuffer")>0&&(n=new Uint8Array(n)),e=new r(n),requestAnimationFrame(C)},o.onprogress=function(t){t.lengthComputable&&D(t.loaded,t.total,!0)},o.onerror=function(){z("xhr")},o.send()}},load:function(t){this.load_url(w.getAttribute("rel:animated_src")||w.src,t)},load_raw:function(t,n){q(n)&&(V||Y(),e=new r(t),requestAnimationFrame(C))},set_frame_offset:function(t,e){m[t]?(void 0!==e.x&&(m[t].x=e.x),void 0!==e.y&&(m[t].y=e.y)):m[t]=e}}}})?r.apply(e,[]):r)||(t.exports=n)}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var n={};return(()=>{"use strict";r.r(n),r.d(n,{AbsoluteLayout:()=>vn,ArrowStraight:()=>Bh,AudioPlayer:()=>lf,CardLayout:()=>mn,Component:()=>Ir,Container:()=>mi,ContainerAbstract:()=>Vn,Curve:()=>Ph,DEFAULT:()=>g,DPPX:()=>y,DataSource:()=>Ql,Donut:()=>Sl,Ellipse:()=>is,EventMap:()=>fc,FPS:()=>Zh,GESTURES:()=>d,GifView:()=>tf,GlobalRef:()=>Vf,Group:()=>Mi,HTMLAbsoluteLayout:()=>Nr,HTMLOverlayContainer:()=>Bf,HTMLOverlayElement:()=>Us,ImageView:()=>Bs,InfoWindow:()=>yn,KEYEVENTS:()=>v,Layer:()=>to,Layout:()=>zr,Line:()=>Ju,LinearHorizontalLayout:()=>_n,LinearVerticalLayout:()=>Sn,LocalRef:()=>Pf,MAX_UNDO_SIZE:()=>p,MODE_EDIT:()=>f,MODE_SHIFT:()=>l,MODE_VIEW:()=>s,Model:()=>$h,MoveHandle:()=>zn,NOTHING:()=>u,Path:()=>sl,Polygon:()=>ps,Polyline:()=>Ss,Popup:()=>rl,Rect:()=>jo,RectPath:()=>en,ReferenceMap:()=>Nh,RightAngleStraight:()=>xh,RootContainer:()=>Oc,Ruler:()=>mo,SCENE_MODE:()=>h,Scene:()=>Pu,ScriptLoader:()=>Xh,Shape:()=>qr,Star:()=>Cl,Straight:()=>yh,TableLayout:()=>En,Text:()=>bf,Triangle:()=>vl,ValueHolder:()=>Gl,create:()=>ju,debug:()=>we,error:()=>be,license:()=>tp,polyfill:()=>c,version:()=>qh,warn:()=>me});var t={};r.r(t),r.d(t,{hide:()=>T,show:()=>I});var e={};r.r(e),r.d(e,{append:()=>Ht,clear:()=>Kt,forEach:()=>Vt,getAt:()=>Wt,indexOf:()=>Xt,insertAt:()=>Ut,moveBackward:()=>Jt,moveForward:()=>Qt,moveToHead:()=>Zt,moveToTail:()=>$t,prepend:()=>Gt,remove:()=>Yt,size:()=>qt});var o={};r.r(o),r.d(o,{pop:()=>ee,push:()=>te});var i={};r.r(i),r.d(i,{clear:()=>ke,intercept:()=>xe,reset:()=>_e});var a={};r.r(a),r.d(a,{compile:()=>oa,duplicate:()=>la,match:()=>Ae,select:()=>je}),r(46280),r(87751);const 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),r=1;r<arguments.length;r++){var n=arguments[r];if(null!=n)for(var o in n)n.hasOwnProperty(o)&&(e[o]=n[o])}return e}),"function"!=typeof Object.values&&(Object.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e}),"function"!=typeof Object.keys&&(Object.values=function(t){var e=[];for(var r in t)e.push(r);return e}),"undefined"!=typeof CanvasRenderingContext2D&&null==CanvasRenderingContext2D.prototype.ellipse&&(CanvasRenderingContext2D.prototype.ellipse=function(t,e,r,n,o,i,a,c){this.save(),this.translate(t,e),this.rotate(o),this.translate(-r,-n),this.scale(r,n),this.arc(1,1,1,i,a,c),this.restore()}),function(){for(var t=0,e=["ms","moz","webkit","o"],r=0;r<e.length&&!window.requestAnimationFrame;++r)window.requestAnimationFrame=window[e[r]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[r]+"CancelAnimationFrame"]||window[e[r]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(console.warn("requestAnimationFrame not supported"),window.requestAnimationFrame=function(e,r){var n=performance.now(),o=Math.max(0,33-(n-t)),i=window.setTimeout((function(){e(n+o)}),o);return t=n+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 u={},s=0,f=1,l=2,h={VIEW:0,EDIT:1,SHIFT:2},p=30,y="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,d=["mousemove","mouseup","mousedown","mouseout","wheel","click","touchstart","touchmove","touchend","dblclick"],v=["keydown","keyup"],g={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"};function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var m="center",w="left-top",x="right-top",_="left-bottom",k="right-bottom",O="auto",S='\n<div class="popup-content">\n</div>\n<button class="closable-1945">X</button>\n',A='\n<div class="popup-content">\n</div>\n',E="\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",P=20,j=new WeakMap;function R(t,e,r){var n,o=t.root;if(o!==t){M(t);var i=j.get(o)||[];i=[].concat(function(t){if(Array.isArray(t))return b(t)}(n=i)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return b(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(t,e):void 0}}(n)||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.")}(),[[t,{div:e,scene:r}]]),j.set(o,i)}}function M(t){var e=t.root,r=j.get(e);if(r)if(e!==t){var n=r.findIndex((function(e){return e[0]===t}));if(-1!==n){var o=r[n][1],i=o.div.parentNode;i&&i.removeChild(o.div);var a=o.scene;a.target=null,a.release(),r.splice(n,1)}}else{for(var c in r)M(c[0]);j.delete(e)}}function T(t){M(t)}function I(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.data,o=r.location,i=void 0===o?m:o,a=r.modal,c=void 0!==a&&a,u=r.closable,s=void 0===u||u,f=t.app.refProvider;f&&f.get(e,!0).then((function(e){var r,o=document.createElement("div"),a=o.style;if(c){var u=t.rootModel.bounds,f=u.width,l=u.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=!c&&s?S:A;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=E:y.appendChild(document.createTextNode(E)),o.appendChild(y);var g=o.querySelector(".popup-content");d.forEach((function(t){g.addEventListener(t,(function(t){t.stopPropagation()}))})),v.forEach((function(t){g.addEventListener(t,(function(t){t.stopPropagation()}))})),o.addEventListener("click",(function(e){s&&T(t)})),d.forEach((function(t){o.addEventListener(t,(function(t){t.stopPropagation()}))})),v.forEach((function(t){o.addEventListener(t,(function(t){t.stopPropagation()}))})),t.root.model_layer.overlay.appendChild(o),R(t,o,e),null===(r=o.querySelector(".closable-1945"))||void 0===r||r.addEventListener("click",(function(e){e.preventDefault(),T(t)}),!1),o.addEventListener("close-scene",(function(e){e.preventDefault(),T(t),t.data=e.detail}),!1),e.target=h,e.data=n||t.data,e.fit("both");var b=C(t.rootModel,e.root,t.center,i);c?(h.style.left=b.x+"px",h.style.top=b.y+"px",h.style.width=f+"px",h.style.height=l+"px"):(o.style.left=b.x+"px",o.style.top=b.y+"px",o.style.width=f+"px",o.style.height=l+"px")}),(function(t){console.error("cannot fetch board: "+e,t)}))}function C(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:m,o=t.bounds,i=e.bounds,a=Math.max(o.width/4-i.width/2,P),c=Math.min(3*o.width/4+i.width/2,o.width-P)-i.width,u=Math.max(o.height/4-i.height/2,P),s=Math.min(3*o.height/4+i.height/2,o.height-P)-i.height;switch(n){case O:return{x:r.x<o.width/2?c:a,y:r.y<o.height/2?s:u};case w:return{x:a,y:u};case x:return{x:c,y:u};case _:return{x:a,y:s};case k:return{x:c,y:s};default:return{x:(o.width-i.width)/2,y:(o.height-i.height)/2}}}const B={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,r=1;;e+=r,r/=2)if(t>=(7-4*e)/11)return-Math.pow((11-6*e-11*t)/4,2)+Math.pow(r,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 D(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var z=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.client=e,this.config=r,this._started=!1;var n=this.config,o=n.delta,i=void 0===o?"linear":o,a=n.options,c=n.ease;"string"==typeof i&&(i=B[i]),this.delta="out"==c?function(t,e){return function(r){return 1-t(1-r,e)}}(i,a):"inout"==c?function(t,e){return function(r){return r<.5?t(2*r,e)/2:(2-t(2*(1-r),e))/2}}(i,a):i,this.init()}var e,r;return e=t,(r=[{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,r=e.duration,n=void 0===r?2e3:r,o=e.delay,i=void 0===o?0:o,a=e.repeat,c=void 0!==a&&a;this._started=!0;var u=0,s=n+i;this._raf=requestAnimationFrame((function e(){if(t._started){0==u&&(u=performance.now(),t.client.touch());var r=performance.now()-u,o=Math.max(r%s-i,0)/n;t.step(t.delta(o)),t.client&&t.client.invalidate(),!(r>=s)||c&&t._started||(t.step(1),t.stop(),u=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())}}])&&D(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function L(t){return L="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},L(t)}function N(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function U(t,e){return U=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},U(t,e)}function H(t,e){if(e&&("object"===L(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 G(t){return G=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},G(t)}var Y=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&U(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=G(n);if(o){var r=G(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return N(this,a),i.apply(this,arguments)}return e=a,r=[{key:"step",value:function(t){var e=this.config.theta,r=void 0===e?6.28:e;this.client.delta("theta",t*r)}}],r&&F(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(z);function W(t){return W="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},W(t)}function V(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function X(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function q(t,e){return q=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},q(t,e)}function K(t,e){if(e&&("object"===W(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 Q(t){return Q=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Q(t)}var J=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&q(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=Q(n);if(o){var r=Q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return K(this,t)});function a(){return V(this,a),i.apply(this,arguments)}return e=a,r=[{key:"step",value:function(t){var e=this.config.theta,r=void 0===e?.2617993877991494:e,n=4*r,o=t*n;t<1/4?o*=-1:t<3/4?o-=2*r:o=n-o,this.client.delta("theta",o)}}],r&&X(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(z);function Z(t){return Z="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},Z(t)}function $(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function et(t,e){return et=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},et(t,e)}function rt(t,e){if(e&&("object"===Z(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 nt(t){return nt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},nt(t)}var ot=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&et(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=nt(n);if(o){var r=nt(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return rt(this,t)});function a(){return $(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"step",value:function(t){var e,r=this.config.scale,n=2*((void 0===r?1.3:r)-1);e=t<.5?1+n*t:1+(1-t)*n,this.client.delta("sx",e),this.client.delta("sy",e)}}])&&tt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(z);function it(t){return it="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},it(t)}function at(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ct(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ut(t,e){return ut=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ut(t,e)}function st(t,e){if(e&&("object"===it(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 ft(t){return ft=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ft(t)}var lt=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ut(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=ft(n);if(o){var r=ft(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return st(this,t)});function a(){return at(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"step",value:function(t){var e=this.config,r=e.x,n=void 0===r?0:r,o=e.y,i=void 0===o?0:o;this.client.delta("tx",t*n),this.client.delta("ty",t*i)}}])&&ct(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(z);function ht(t){return ht="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},ht(t)}function pt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function dt(t,e){return dt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},dt(t,e)}function vt(t,e){if(e&&("object"===ht(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 gt(t){return gt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},gt(t)}var bt=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dt(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=gt(n);if(o){var r=gt(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return vt(this,t)});function a(){return pt(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"step",value:function(t){var e=this.config.rideOn,r=this.client;if(e&&r&&r.root){var n=r.center,o=r.root.findById(e);if(o){var i=o.outline(t);n=r.transcoordS2T(n.x,n.y),o&&(r.delta("tx",i.x-n.x),r.delta("ty",i.y-n.y))}}}}])&&yt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(z);function mt(t){return mt="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},mt(t)}function wt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _t(t,e){return _t=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},_t(t,e)}function kt(t,e){if(e&&("object"===mt(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 Ot(t){return Ot=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ot(t)}var St=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_t(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=Ot(n);if(o){var r=Ot(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return kt(this,t)});function a(){return wt(this,a),i.apply(this,arguments)}return e=a,r=[{key:"step",value:function(t){var e,r=this.config,n=r.startAlpha,o=void 0===n?1:n,i=r.endAlpha,a=void 0===i?0:i,c=Math.max(Math.min(o,a,1),0),u=2*(Math.min(Math.max(o,a,1),1)-c);e=t<.5?u*t:(1-t)*u,this.client.delta("fade",e)}}],r&&xt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(z),At={rotation:Y,vibration:J,heartbeat:ot,moving:lt,outline:bt,fade:St},Et=r(72357),Pt=r.n(Et),jt=r(62632),Rt=r.n(jt),Mt=r(56778),Tt=r.n(Mt),It=r(72297),Ct=r.n(It),Bt=r(97186),Dt=r.n(Bt);function zt(t){return zt="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},zt(t)}var Lt=0;function Nt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"object"!=zt(t)&&(t={});for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return r.forEach((function(e){var r=function(r){"object"!=zt(e[r])?t[r]=e[r]:e[r].length>0?t[r]=e[r].map((function(t){return"object"!=zt(e[r])?t:Nt({},t)})):t[r]=Nt(t[r],e[r])};for(var n in e)r(n)})),t}function Ft(t){for(;t&&"object"===zt(t);){var e=t;for(var r in t){t=t[r];break}if(t===e){t=void 0;break}}return t}function Ut(t,e){return this.__collection__?(-1==(t=this.__collection__.indexOf(e))&&this.__collection__.splice(t,0,e),this):this}function Ht(t){return this.__collection__||(this.__collection__=[]),-1==this.__collection__.indexOf(t)&&this.__collection__.push(t),this}function Gt(t){return this.__collection__||(this.__collection__=[]),-1==this.__collection__.indexOf(t)&&this.__collection__.unshift(t),this}function Yt(t){if(!this.__collection__)return this;var e=this.__collection__.indexOf(t);return e>=0&&this.__collection__.splice(e,1),this}function Wt(t){if(this.__collection__)return this.__collection__[t]}function Vt(t,e){this.__collection__&&this.__collection__.forEach(t,e)}function Xt(t){if(this.__collection__)return this.__collection__.indexOf(t)}function qt(){return this.__collection__?this.__collection__.length:0}function Kt(){this.__collection__=[]}function Qt(t){var e=this.indexOf(t);-1!=e&&0!=e&&(this.__collection__[e]=this.__collection__[e-1],this.__collection__[e-1]=t)}function Jt(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 Zt(t){var e=this.indexOf(t);if(-1!=e&&0!=e){var r=this.__collection__.splice(0,e),n=this.__collection__.splice(1);this.__collection__=this.__collection__.concat(r,n)}}function $t(t){var e=this.indexOf(t);if(-1!=e&&e!=this.size()-1){var r=this.__collection__.splice(0,e),n=this.__collection__.splice(1);this.__collection__=r.concat(n,this.__collection__)}}function te(t){throw new Error("Not Implemented Yet")}function ee(t){throw new Error("Not Implemented Yet")}function re(){}function ne(t){return ne="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},ne(t)}re.prototype=e;var oe=/\s+/;function ie(t,e,r,n){if(!r)return!0;if("object"==ne(r)){for(var o in r){var i=r[o];t[e].apply(t,[o,i])}return!1}return!oe.test(r)||(r.split(oe).forEach((function(r){return t[e].apply(t,[r].concat(n))})),!1)}var ae=["on","off","once","delegate_on","delegate_off","trigger","listenTo"],ce={withEvent:function(){var t=this;ae.forEach((function(e){return t[e]=ce[e]}))},on:function(t,e,r){return ie(this,"on",t,[e,r])&&e?(this._listeners||(this._listeners={}),(this._listeners[t]||(this._listeners[t]=[])).push({callback:e,context:r,ctx:r||this}),this):this},once:function(t,e,r){if(!ie(this,"once",t,[e,r])||!e)return this;var n=this,o=Ct()((function(){n.off(t,o),e.apply(n,arguments)}));o._callback=e,this.on(t,o,r)},off:function(t,e,r){if(!this._listeners||!ie(this,"off",t,[e,r]))return this;if(!t&&!e&&!r)return this._listeners=void 0,this;var n;n=t?[t]:Object.keys(this._listeners);for(var o=0;o<n.length;o++){var i=n[o],a=this._listeners[i];if(a){var c=[];if(this._listeners[i]=c,e||r)for(var u=0;u<a.length;u++){var s=a[u];(e&&e!==s.callback&&e!==s.callback._callback||r&&r!==s.context)&&c.push(s)}c.length||delete this._listeners[i]}}return this},delegate_on:function(t){return this._delegators||(this._delegators=new re),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&&se(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 r=this._listeners[e.name],n=this._listeners["(all)"];return r&&ue(r,arguments),n&&ue(n,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&&se(this._delegators,e),!this._listeners)return this;if(!ie(this,"trigger",t,e))return this;var r=this._listeners[t],n=this._listeners["(all)"];return r&&ue(r,e),n&&ue(n,e),this},stopListening:function(t,e,r){var n=this._listeningTo;if(!n)return this;var o=!e&&!r;for(var i in r||"object"!=ne(e)||(r=this),t&&((n={})[t._listenId]=t),n){var a=n[i];a.off(e,r,this),(o||Dt()(a._events))&&delete this._listeningTo[i]}return this}};function ue(t,e){t.forEach((function(t){return t.callback.apply(t.ctx,e)}))}function se(t,e){t.forEach((function(t){return ce.delegate.apply(t,e)}))}var fe={listenTo:"on",listenToOnce:"once"};for(var le in fe){var he=fe[le];ce[le]=function(t,e,r){this._listeningTo||(this._listeningTo={});var n=this._listeningTo;return t._listenId||(t._listenId="".concat("l").concat(++Lt)),n[t._listenId]=t,r||"object"!=ne(e)||(r=this),t[he](e,r,this),this}}const pe=ce;function ye(t,e){if(e instanceof Array)e.forEach((function(e){return ye(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}"undefined"==typeof window||window;var de="[ERROR]",ve="[WARN]",ge="[DEBUG]",be=function(){for(var t,e=[],r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];n.forEach((function(t){return t&&t.stack&&e.push(t.stack)})),(t=console).error.apply(t,[de].concat(n,[e.join(" ")]))},me=function(){for(var t,e=[],r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];n.forEach((function(t){return t&&t.stack&&e.push(t.stack)})),(t=console).warn.apply(t,[ve].concat(n,[e.join(" ")]))},we=function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=console).log.apply(t,[ge].concat(r))};function xe(t,e,r){var n=t.__lookupGetter__(e);n?r?t.__defineGetter__(e,(function(){return void 0===this.__cache__[e]&&(this.__cache__[e]=n.call(this)),Pt()(this.__cache__[e])})):t.__defineGetter__(e,(function(){return void 0===this.__cache__[e]&&(this.__cache__[e]=n.call(this)),this.__cache__[e]})):be("".concat(e," is not defined in ").concat(t.constructor.name))}function _e(t){t.__cache__={}}function ke(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];0==r.length?t.__cache__={}:r.forEach((function(e){return delete t.__cache__[e]}))}function Oe(t,e,r,n){var o=e.get("class");return!!o&&(o.split(" ")||[]).indexOf(t.substr(1))>=0}function Se(t,e,r,n){return t==e.get("type")}function Ae(t,e,r,n){if("(all)"==t)return!0;switch(t.charAt(0)){case"#":return function(t,e,r,n){return t.substr(1)==e.get("id")}(t,e);case".":return Oe(t,e);case"(":return function(t,e,r,n){switch(t){case"(all)":return!0;case"(self)":return n===e;case"(root)":return!n.parent&&n===e;case"(descendant)":return n!==e;case"(child)":return n===e.parent;default:return!1}}(t,e,0,n);default:return Se(t,e)}}function Ee(t,e,r,n,o,i){return t(e,r,n,o)&&i.push(r),r.components&&r.components.forEach((function(r){Ee(t,e,r,n,o,i)})),i}function Pe(t,e,r,n){switch(t){case"(all)":return!0;case"(parent)":return r&&r.parent===e;case"(child)":case"(children)":return r&&r===e.parent;case"(sibling)":case"(siblings)":return r&&r.parent===e.parent&&r!==e;default:return!1}}function je(t,e,r){if("(root)"==t)return[e];if("(self)"==t)return r?[r]:[];var n;switch(t.charAt(0)){case"#":var o=e.root.findById(t.substr(1));return o?[o]:[];case".":n=Oe;break;case"(":n=Pe;break;default:n=Se}return Ee(n,t,e,r,e,[])}var Re=function(t){return t};function Me(t){var e=t.indexOf("||"),r="",n="";-1!=e&&(r=t,n=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:n,match:t,originText:r||t,target:o[0],accessor:i.length>0?function(t){return i.reduce((function(t,e){return t?t[e]:void 0}),t)}:Re}}function Te(t,e,r){if(t){var n=r||Ft,o=String(t),i=(o.match(/#{[^}]*}/gi)||[]).map((function(t){return Me(t)})),a=(o.match(/\${[^}]*}/gi)||[]).map((function(t){return Me(t)}));if(0!=i.length||0!=a.length)return function(){var t=o;return i.forEach((function(r){var o=n(r.accessor(e.getState(r.target)));t=t.replace(r.originText,void 0===o?r.defaultValue||"":o)})),a.forEach((function(r){var o=e.root.findById(r.target),i=n(r.accessor(o&&o.data));t=t.replace(r.originText,void 0===i?r.defaultValue||"":i)})),t}}}function Ie(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ce(t){var e=Ft(t);return null==e?"":String(e)}function Be(t){return Number(Ft(t))}function De(t){return t}function ze(t){return Ce(t)}function Le(t){return Be(t)}function Ne(t){if(this.param)return t=Ce(t),this.param.hasOwnProperty(t)?this.param[t]:this.param.default}function Fe(t){var e,r,n=this.param;if(n){for(var o in n){var i=(e=o.split("~"),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}}(e,r)||function(t,e){if(t){if("string"==typeof t)return Ie(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ie(t,e):void 0}}(e,r)||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.")}()),a=i[0],c=i[1],u=!!a,s=!!c;if(a=parseFloat(a),c=parseFloat(c),t=Be(t),u&&!s&&t>=a)return n[o];if(!u&&s&&t<a)return n[o];if(t>=a&&t<c)return n[o]}return n.default}}function Ue(t){return Be(t)*Math.PI/180}function He(){}function Ge(t,e,r,n,o){switch(r){case"value":return"text"===o||"string"===o?ze.bind(t):"number"===o?Le.bind(t):De.bind(e);case"map":return Ne.bind(t);case"range":return Fe.bind(t);case"radian":return Ue.bind(t);case"eval":return function(t){try{return new Function("value","targets",t)}catch(t){return be(t),He}}(n).bind(e);default:return De.bind(e)}}var Ye=function(t){return t};function We(t){if(!t)return Ye;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)}:Ye}function Ve(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Xe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var qe,Ke=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.owner=r,this.model=e}var e,r;return e=t,(r=[{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,r=t.property,n=t.rule,o=t.param,i=t.accessor;this._model=t,this.evaluator=Ge(this,this.owner,n,o,function(t){switch(t){case"ref":case"fillStyle":case"strokeStyle":return"string";default:return}}(r)),this.accessor=We(i);var a,c,u=e.match(/\[(.*?)\]/);if(u){var s=(a=u[1].split(":"),c=2,function(t){if(Array.isArray(t))return t}(a)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}}(a,c)||function(t,e){if(t){if("string"==typeof t)return Ve(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ve(t,e):void 0}}(a,c)||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.")}()),f=s[0],l=s[1];this.propAccessor=We(f),this.partAccessor=We(l)}}},{key:"target",get:function(){return this.model.target}},{key:"property",get:function(){return this.model.property}},{key:"param",get:function(){return this.model.param}}])&&Xe(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Qe(){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 r=e.target,n=e.property,o=e.accessor,i=e.propAccessor,a=e.partAccessor,c=o(t.data);if("(root)"==(r=r.trim())||"(key)"==r){if(null==c)return;var u=Object.keys(c||{}).map((function(e){return t.root.findOrCreate(e)})).filter((function(t){return!!t}));u.length>0&&u.forEach((function(t){return t[n]=e.evaluator(c[t.get("id")],[t])}))}else if(r.startsWith("[")){if(null==c)return;if(c instanceof Array)c.forEach((function(r){var o=i(r);if(o){var c=t.root.findOrCreate(o);c&&(c[n]=e.evaluator(a(r),[c]))}}));else{if(!(c instanceof Object))throw String("mapping data should be an object to target property-id.("+c+")");var s=i(c);if(s){var f=t.root.findOrCreate(s);f&&(f[n]=e.evaluator(a(c),[f]))}}}else{var l=t.root.findAll(r,t);if(l.length>0){var h=e.evaluator(c,l);l.forEach((function(t){return t[n]=h}))}}}catch(r){be(r,t,e)}}))}function Je(t){return Je="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},Je(t)}function Ze(t,e,r,n,o){var i=n.alpha,a=void 0===i?1:i,c=o.fillStyle;if(t.globalAlpha*=a,c)if("string"==typeof c)t.fillStyle=c,t.fill();else if("object"==Je(c))if("gradient"==c.type){t.translate(r.x,r.y);var u,s=e.width,f=e.height;if("linear"==c.gradientType){var l=3.141592653589793,h=c.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,u=t.createLinearGradient(p*Math.cos(h+l),p*Math.sin(h+l),p*Math.cos(h),p*Math.sin(h))}else u=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"==c.gradientType){var y=.95*Math.sqrt(Math.pow((s-4)/2,2)+Math.pow((f-4)/2,2));switch(c.center){case"center":default:u=t.createRadialGradient(0,0,0,0,0,y);break;case"left-top":u=t.createRadialGradient(-s/2,-f/2,0,-s/2,-f/2,2*y);break;case"right-top":u=t.createRadialGradient(s/2,-f/2,0,s/2,-f/2,2*y);break;case"left-bottom":u=t.createRadialGradient(-s/2,f/2,0,-s/2,f/2,2*y);break;case"right-bottom":u=t.createRadialGradient(s/2,f/2,0,s/2,f/2,2*y)}}c.colorStops.forEach((function(t){if(t.position>=0&&t.position<=1)try{u.addColorStop(t.position,t.color)}catch(e){me("Invalid Color for colorstop : ",t.color),u.addColorStop(t.position,"#fff")}})),t.fillStyle=u,t.fill(),t.translate(-r.x,-r.y)}else if("pattern"==c.type&&c.image){o.prepareFillIf(!o._pattern_image_origin);var d=o._pattern_image;if(!d)return;var v=0,g=0,b=0,m=0,w=e.left,x=e.top;if(!c.fitPattern){switch(v=c.offsetX,g=c.offsetY,c.align){case"center":b=e.width/2-(c.width?c.width/2:0),m=e.height/2+(c.height?c.height/2:0);break;case"left-top":break;case"left-bottom":m=c.height?e.height%c.height:e.height;break;case"right-top":b=c.width?e.width%c.width:e.width;break;case"right-bottom":b=c.width?e.width%c.width:e.width,m=c.height?e.height%c.height:e.height;break;case"left":m=e.height/2+(c.height?c.height/2:0);break;case"right":b=c.width?e.width%c.width:e.width,m=e.height/2+(c.height?c.height/2:0);break;case"top":b=e.width/2-(c.width?c.width/2:0);break;case"bottom":b=e.width/2-(c.width?c.width/2:0),m=c.height?e.height%c.height:e.height}w+=v+b,x+=g+m}t.translate(w,x),c.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,r){if(e.length<2)return e;for(var n=2;n<e.length;n++){var o=e.substring(0,n);if(!(t.measureText(o).width<r))break}return e.substring(0,n-1)}function tr(t,e,r,n){var o=String(e).split("\n");return n?[].concat.apply([],o.map((function(e){return function(t,e,r){var n,o,i=e.split(" "),a=[],c=[];for(n=0,o=1;o<=i.length;o++)if(c=i.slice(n,o),t.measureText(c.join(" ")).width>r){if(o-n==1){var u=$e(t,c[0],r);a.push([u]),i.splice(n,1,u,c[0].substring(u.length))}else{for(;""==i[o-1];)o++;a.push(i.slice(n,--o))}n=o}return o-n>1&&a.push(c),0==a.length&&a.push([""]),a}(t,e,r)}))):o.map((function(t){return t.split(" ")}))}function er(t,e,r,n,o){if(!n)return[];t.save(),t.font=r;var i=tr(t,n,e,!!o);return t.restore(),i}function rr(t){var e=t.fontFamily,r=void 0===e?g.FONT_FAMILY:e,n=t.bold,o=void 0===n?g.BOLD:n,i=t.italic,a=void 0===i?g.ITALIC:i,c=t.fontSize,u=void 0===c?g.FONT_SIZE:c,s=[];return o&&s.push("bold"),a&&s.push("italic"),s.push(u+"px"),s.push(r),s.join(" ")}function nr(t,e,r,n){var o=n.alpha,i=void 0===o?g.FONT_COLOR:o,a=n.fontColor,c=void 0===a?g.FONT_COLOR:a,u=n.textAlign,s=void 0===u?g.TEXT_ALIGN:u,f=n.textBaseline,l=void 0===f?g.TEXT_BASELINE:f,h=n.fontSize,p=void 0===h?g.FONT_SIZE:h,y=n.lineHeight,d=void 0===y?1.2*p:y;t.save(),t.beginPath();var v=e.left,b=e.top,m=e.width,w=e.height;t.font=rr(n);var x,_,k=r.length*d;switch(l){case"top":x=b,t.textBaseline="top";break;case"bottom":x=b+w-k+d,t.textBaseline="bottom";break;default:x=b+w/2-k/2+d/2,t.textBaseline="middle"}switch(s){case"left":case"justify":_=v,t.textAlign="left";break;case"right":_=v+m,t.textAlign="right";break;default:_=v+m/2,t.textAlign="center"}t.globalAlpha*=i,t.fillStyle=c,"justify"!=s?r.forEach((function(e,r){t.fillText(e.join(" "),_,x+r*d)})):r.forEach((function(e,r){var n=x+r*d;if(1==e.length)t.fillText(e[0],_,n);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),c=_;e.forEach((function(e,r){t.fillText(e,c,n),c+=o[r]+a}))}})),t.restore()}qe="undefined"==typeof document?function(t,e){return new Canvas(t,e)}:function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,r};var or={x:1,y:1};function ir(t,e,r){var n=e.left,o=void 0===n?0:n,i=e.top,a=void 0===i?0:i,c=e.blurSize,u=void 0===c?0:c,s=e.color,f=void 0===s?"transparent":s,l=r.rootModel.get("scale")||or;t.shadowOffsetX=o*l.x*y,t.shadowOffsetY=a*l.y*y,t.shadowBlur=u*l.x*y,t.shadowColor=f}function ar(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0},n=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-=r.x,e-=r.y,{x:(t*Math.cos(-n)-e*Math.sin(-n)+r.x)/o.x,y:(t*Math.sin(-n)+e*Math.cos(-n)+r.y)/o.y}}function cr(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0},n=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-=r.x,e-=r.y,{x:(t*Math.cos(n)-e*Math.sin(n)+r.x)*o.x,y:(t*Math.sin(n)+e*Math.cos(n)+r.y)*o.y}}function ur(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var sr,fr=[];function lr(){sr=null;var t=performance.now(),e=(fr=fr.filter((function(t){return hr(t)}))).reduce((function(e,r){var n=t-r.updatedAt;return n>=r.retention?e.kills.push(r):e.next=0==e.next?r.retention-n:Math.min(e.next,r.retention-n),e}),{next:0,kills:[]});e.kills.forEach((function(t){var e=fr.indexOf(t);-1!=e?(fr.splice(e,1),t.removeSelf(!0)):be("Should not be here. Maybe reentrance problem.")})),e.next>0&&(sr=setTimeout(pr,Math.max(e.next,500)))}function hr(t){return!t.disposed&&t.retention>0&&!t.isTemplate()&&t.app&&t.app.isViewMode}var pr=Tt()((function(){requestAnimationFrame(lr)}),500);const yr=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,r;return e=t,(r=[{key:"add",value:function(t){hr(t)&&-1==fr.indexOf(t)&&(fr.push(t),t.touch()),this.touch()}},{key:"remove",value:function(t){var e=fr.indexOf(t);e>0&&fr.splice(e,1),this.touch()}},{key:"touch",value:function(){null!==sr&&(clearTimeout(sr),sr=null),pr()}},{key:"length",get:function(){return fr.length}}])&&ur(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());function dr(t){var e=t.duration,r=void 0===e?1e3:e,n=(t.delay,t.step),o=t.delta,i=t.ease,a=t.options,c=t.repeat,u=void 0!==c&&c;"string"==typeof o&&(o=B[o]),"out"==i?o=function(t,e){return function(r){return 1-t(1-r,e)}}(o,a):"inout"==i&&(o=function(t,e){return function(r){return r<.5?t(2*r,e)/2:(2-t(2*(1-r),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 c=(performance.now()-e)/r,f=u?c%1:Math.min(c,1);n(o(f,a)),!(c>=1)||u&&s||(t.stop(),e=0),s&&requestAnimationFrame(i)}})),this},stop:function(){return s=!1,this}}}function vr(t,e,r){var n=e.strokeStyle,o=e.lineDash,i=e.lineWidth,a=e.lineCap,c=e.lineJoin,u=e.alpha;if(n&&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*=u,t.strokeStyle=n,t.lineWidth=i,t.lineJoin=c,t.stroke()}}var gr={gradation:function(t,e,r){r.type;var n=r.subType,o=r.from,i=r.to,a=r.colors;switch(n){case"linear":var c=e.createLinearGradient(o.x,o.y,i.x,i.y);break;case"radial":c=e.createRadialGradient(o.x,o.y,o.r,i.x,i.y,i.r);break;default:c=e.createLinearGradient(o.x,o.y,i.x,i.y)}a&&(a.forEach((function(t){c.addColorStop(t.endPoint,t.color)})),e.fillStyle=c,e.fill())},shadow:ir},br=r(27542),mr=r.n(br);var wr={x:1,y:1},xr={boxSizing:"border-box",margin:"0px",position:"absolute",outline:"none"};function _r(t){var e=t.state,r=e.id,n=e.scale,o=void 0===n?wr:n,i=(e.translate,e.bold),a=e.italic,c=e.fontFamily,u=void 0===c?"":c,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,b=e.paddingRight,m=void 0===b?0:b,w=e.fontSize,x=void 0===w?g.FONT_SIZE:w,_=e.lineWidth,k=void 0===_?0:_,O=e.lineDash,S=t.state.class,A=(t.text,t.strokeStyle),E=(t.fillStyle,t.rotation),P=void 0===E?0:E,j=t.fontColor,R=t.hidden,M=t.bounds,T=M.left,I=M.top,C=M.width,B=M.height,D=t.element;D.hidden=R,r&&(D.id=r),S&&(D.className=S),Object.assign(D.style,xr,{fontFamily:u,fontSize:x+"px",left:T+"px",top:I+"px",width:C+"px",height:B+"px",paddingTop:h+"px",paddingRight:m+"px",paddingBottom:y+"px",paddingLeft:v+"px",border:k+"px",borderColor:A,borderStyle:k>0?O||g.LINE_DASH:"",color:j,fontWeight:i?"bold":"",fontStyle:a?"italic":"",textAlign:"end"==s?"right":"start"==s?"left":s,verticalAlign:f}),function(t){var e=t.element,r=t.fillStyle,n=e.style;if(r)if("string"==typeof r)n.backgroundColor=r;else switch(r.type){case"pattern":n.backgroundImage="url("+r.image+")",n.backgroundColor="transparent",r.fitPattern?n.backgroundSize="100% 100%":r.width||r.height?n.backgroundSize="".concat(r.width?r.width+"px":"auto"," ").concat(r.height?r.height+"px":"auto"):n.backgroundSize="contain";break;case"gradient":n.background=function(t,e){var r=e.colorStops,n=e.gradientType;if(r instanceof Array&&r.length>0)switch(n){case"radial":return"radial-gradient(farthest-corner at "+function(t,e){var r=t.bounds,n=r.width,o=r.height;switch(e){case"center":return[n/2,o/2];case"left-top":return[0,0];case"right-top":return[n,0];case"left-bottom":return[0,o];default:return[n,o]}}(t,e.center||"center").map((function(t){return t+"px"})).join(" ")+","+r.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, "+r.map((function(t){return"".concat(t.color," ").concat(100*t.position,"%")})).join(",")+")"}return""}(t,r)}else n.background="transparent"}(t),function(t){if(t.isShadowable()&&t.state.shadow){var e=t.element,r=t.state.shadow,n=r.left,o=void 0===n?0:n,i=r.top,a=void 0===i?0:i,c=r.blurSize,u=void 0===c?0:c,s=r.color,f=void 0===s?"transparent":s;e.style.boxShadow="".concat(o,"px ").concat(a,"px ").concat(u,"px ").concat(f)}}(t);var z=t.delta(),L=(o&&o.x||1)*z.sx,N=(o&&o.y||1)*z.sy,F=(P||0)+z.theta,U=z.tx||0,H=z.ty||0;["-webkit-","-moz-","-ms-","-o-",""].forEach((function(t){D.style[t+"transform"]="rotate(".concat(F,"rad) translate(").concat(U,"px, ").concat(H,"px) scale(").concat(L,", ").concat(N,") perspective(1px)")}))}var kr=r(59501),Or=r.n(kr);function Sr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ar(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Er={},Pr={mutable:!1,resizable:!0,rotatable:!0,properties:[],"value-property":"text"},jr=[],Rr={theta:0,tx:0,ty:0,sx:1,sy:1,fade:0},Mr=new WeakMap,Tr=0,Ir=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._app=r,this._model=e||{},this._state={},this._delta=Pt()(Rr),r&&this.animation&&(this.animation.started=!0),this.clearCache(),yr.add(this),Mr.set(this,Tr++)}var e,r,n;return e=t,r=[{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),r=0;r<t;r++)e[r]=arguments[r];ke.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&&yr.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:"replaceRefs",value:function(t){}},{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=Pt()(this._model);return this.volatile.forEach((function(e){delete t[e]})),t}},{key:"volatile",get:function(){return jr}},{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(Sr({},t,e));var r={},n={},o=!1,i=(t=Pt()(t),this);return Object.getOwnPropertyNames(t).forEach((function(e){var a=i._model[e],c=t[e];mr()(a,c)||(n[e]=a,r[e]=c,i._model[e]=c,delete i._state[e],o=!0)})),o&&(this.clearCache(),r.hasOwnProperty("text")&&delete this._text_substitutor,r.hasOwnProperty("retention")&&yr.add(this),r.hasOwnProperty("fillStyle")&&this.onchangeFill(r,n),r.hasOwnProperty("mappings")&&this.onchangeMappings(r,n),r.hasOwnProperty("data")&&this.onchangeData(r,n),this.onchange&&this.onchange(r,n),this.trigger("change",r,n)),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(Sr({},t,e));var r={},n={},o=!1,i=(t=Pt()(t),this),a=this.getState("sensitive");return Object.getOwnPropertyNames(t).forEach((function(e){var c=i.getState(e),u=t[e];!a&&mr()(c,u)||(n[e]=c,r[e]=u,i._state[e]=u,o=!0)})),o&&(this.clearCache(),r.hasOwnProperty("text")&&delete this._text_substitutor,r.hasOwnProperty("fillStyle")&&this.onchangeFill(r,n),r.hasOwnProperty("data")&&this.onchangeData(r,n),this.onchange&&this.onchange(r,n),this.trigger("change",r,n)),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:"anchors",get:function(){return this.nature.anchors||[]}},{key:"findAnchor",value:function(t){return this.anchors.find((function(e){return e.name===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 r=t.x-e.x,n=t.y-e.y;this.path=this.path.map((function(t){return{x:t.x+r,y:t.y+n}}))}}}},{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,r,n,o=this.path;t=e=o[0].x,r=n=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<r?r=a.y:a.y>n&&(n=a.y)}return{left:t,top:r,width:e-t,height:n-r}},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 r=0==e.width?1:t.width/e.width,n=0==e.height?1:t.height/e.height;this.path=this.path.map((function(o){return{x:t.left+(o.x-e.left)*r,y:t.top+(o.y-e.top)*n}}))}}},{key:"path",get:function(){return be("이 컴포넌트에 get path 가 구현되어있지 않음.",this),[]},set:function(t){be("이 컴포넌트에 get path 가 구현되어있지 않음.",this)}},{key:"outline",value:function(t){return function(t,e){var r=t.path.slice();if(r&&r.length){var n=1,o=[];if(t.isLine()||r.push(r[0]),e<=0)return t.transcoordS2T(r[0].x,r[0].y);if(e>=1)return t.transcoordS2T(r[r.length-1].x,r[r.length-1].y);for(;r[n];){var i=r[n-1],a=r[n],c=a.x-i.x,u=a.y-i.y;o.push(Math.sqrt(c*c+u*u)),n++}var s=o.reduce((function(t,e){return t+e}),0);n=0;var f=0;do{f+=o[n++]}while(f/s<e);e=(e-(f-=o[--n])/s)*(s/o[n]);var l=r[n%r.length],h=r[(n+1)%r.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)}be("path should not be empty")}(this,t||0)}},{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(Ft(t)))}},{key:"rotation",get:function(){return this.getState("rotation")},set:function(t){this.setState("rotation",Number(Ft(t)))}},{key:"contains",value:function(t,e){return!1}},{key:"mutable",get:function(){return this.nature.mutable}},{key:"resizable",get:function(){return this.nature.resizable&&!this.stuck}},{key:"adjustResize",value:function(t,e,r){if(r){var n=this.bounds,o=n.height/n.width,i=t.width-n.width,a=t.height-n.height;i*o>a?a=i*o:i=a/o;var c=t.left-n.left,u=t.top-n.top;return 0!=c&&0!=u?(u=-a,c=-i):0!=c?c=-i:0!=u&&(u=-a),{left:n.left+c,top:n.top+u,width:n.width+i,height:n.height+a}}return t}},{key:"rotatable",get:function(){return this.nature.rotatable&&!this.stuck}},{key:"adjustRotation",value:function(t,e){if(e||this.app.rotateStepForced){var r=this.app.rotateStep;return Math.floor((t+r/2)/r)*r}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,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(t.apply(void 0,[this].concat(r)))return this}},{key:"findAll",value:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return"string"==typeof t?je(t,this,r[0]||this):"function"==typeof t&&t.apply(void 0,[this].concat(r))?[this]:void 0}},{key:"capture",value:function(t,e,r){if(!this.capturable||null!=r&&r(this))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){be(t)}))}},{key:"decotag",get:function(){var t=this.state,e=t.id,r=t.tag;return(e?"#".concat(e):"")+(r?"@".concat(r):"")}},{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,r=this.model,n=r.scale,o=r.rotation,i=r.shadow,a=r.alpha,c=(n&&n.x||1)*this._delta.sx,u=(n&&n.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!=c||1!=u||s)&&(t.translate(e.x,e.y),1==c&&1==u||t.scale(c,u),s&&t.rotate(s),t.translate(-e.x,-e.y)),d&&(t.globalAlpha=d),i&&ir(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&&nr(t,this.textBounds,this.textLines(t),this.model)}},{key:"drawStroke",value:function(t){vr(t,this.model)}},{key:"drawFill",value:function(t){this.fillStyle&&"transparent"!=this.fillStyle&&(Ze(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=dr(t),this._animate}},{key:"move",value:function(t){var e=t.x,r=t.y,n=this.path,o=e,i=r;this.path=n.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,r=this.fillStyle;if(this.set("rotation",2*Math.PI-e),r&&"gradient"===r.type&&"linear"===r.gradientType){var n=Pt()(r);n.rotation=(Math.PI-parseFloat(r.rotation||0))%(2*Math.PI),this.set("fillStyle",n)}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)},!1)}},{key:"animation",get:function(){if(this.app.isViewMode&&!this.isTemplate()){if(!this._animation){var t=this.model.animation;t&&t.oncreate&&(this._animation=(this,e=t.oncreate,(r=At[e.type])?new r(this,e):null))}var e,r;return this._animation}}},{key:"effect",value:function(t,e){return function(t,e,r){var n=gr[r.type];n&&n(t,e,r)}(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 rr(this.model)}},{key:"lineHeight",get:function(){return this.get("lineHeight")||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 r,n,o,i,a,c,u,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),b=v+("."===g||","===g?1:0),m=d>0?t.substring(b,l):"";if(r=(e="-"===(t=t.substring(h,b)).charAt(0)?-e:+e)<0?e=-e:0,o=(n=t.match(/[^\d\-\+#]/g))&&n[1]&&n[0]||",",t=t.split("."),e=+(e=e.toFixed(t[1]&&t[1].length))+"",a=t[1]&&t[1].lastIndexOf("0"),(!(u=e.split("."))[1]||u[1]&&u[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(;u[0].length<t[0].length-i;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((e=e.split("."))[0]=u[0],c=s[1]&&s[s.length-1].length){for(y="",v=(f=e[0]).length%c,l=f.length,b=0;b<l;b++)y+=f.charAt(b),!((b-v+1)%c)&&b<l-c&&(y+=o);e[0]=y}return e[1]=t[1]&&e[1]?"."+e[1]:"","0"!==(n=e.join(""))&&""!==n||(r=!1),p+("+"==t[0].substring(0,1)?r?"-":"+":r?"-":"")+n+m}(t,this.textSubstitutor()):this.textSubstitutor()},set:function(t){delete this._text_substitutor;var e=Ft(t);this.setState("text",null==e?"":String(e))}},{key:"textLines",value:function(t){return er(t||this.getContext(),this.textBounds.width,this.font,this.text,this.get("textWrap"))}},{key:"textBounds",get:function(){var t=this.model,e=t.paddingTop,r=void 0===e?0:e,n=t.paddingLeft,o=void 0===n?0:n,i=t.paddingRight,a=void 0===i?0:i,c=t.paddingBottom,u=void 0===c?0:c,s=this.bounds,f=s.left,l=s.top,h=s.width,p=s.height;return{left:f+o,top:l+r,width:Math.max(h-o-a,0),height:Math.max(p-r-u,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),r=0;r<t;r++)e[r]=arguments[r];return JSON.stringify.apply(JSON,[this.hierarchy].concat(e))}},{key:"controls",get:function(){}}],n=[{key:"nature",get:function(){return Pr}},{key:"buildSample",value:function(t,e){var r=this.register(t);if(r){var n=r.nature.sample||{};return Object.assign({type:t},n,e)}console.error("Class not registered.",t)}},{key:"register",value:function(t,e){if(!e)return Er[t];Er[t]=e}},{key:"residents",get:function(){return Mr}}],r&&Ar(e.prototype,r),n&&Ar(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Cr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Br(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Ir.union=function(t){var e,r,n,o;return t.forEach((function(t){void 0===e?(e=t.left,r=t.top,n=t.left+t.width,o=t.top+t.height):(e=Math.min(t.left,e),r=Math.min(t.top,r),n=Math.max(t.left+t.width,n),o=Math.max(t.top+t.height,o))})),{left:e,top:r,width:n-e,height:o-r}},Ir.transcoordR=ar,Ir.transcoordRR=cr,Ir.createCanvas=qe,Ir.memoize=xe,Ir.mixin=ye,Ir.drawText=nr,Ir.font=rr,Ir.textLines=er,Ir.drawStroke=vr,Ir.drawFill=Ze,Ir.reposition=_r,Ir.RetentionManager=yr,Ir.template=Or(),Ir.buildSubstitutor=Te,Object.assign(Ir.prototype,{drawEffect:function(t){var e=this;this._model.effects&&this._model.effects.forEach((function(r){e.effect(t,r)}))},prepareFill:function(t,e){var r=this.fillStyle;if(r&&"pattern"==r.type&&r.image){if("string"!=typeof r.image)return this._pattern_image_origin=this._pattern_image=r.image,void t(this);this._pattern_image=null,this._pattern_image_origin=new Image;var n=this;this._pattern_image_origin.onload=function(){if(!r.fitPattern&&!r.width&&!r.height)return n._pattern_image=n._pattern_image_origin,void t(this);var e=r.width||this.width,o=r.height||this.height;r.fitPattern&&(e=n.bounds.width,o=n.bounds.height);var i=qe(e,o);i.getContext("2d").drawImage(this,0,0,this.width,this.height,0,0,e,o),n._pattern_image=i,t(this)},this._pattern_image_origin.onerror=function(t){e(t)};try{"data"!==String(r.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(r.image)}catch(t){e(t)}}else t(this)},prepareFillIf:function(t){var e=this;t&&this.prepareFill((function(t){e.invalidate()}),(function(t){be(t)}))},onchangeFill:function(t,e){var r=this.fillStyle;r&&"pattern"!==r.type?this._pattern_image&&(this._pattern_image=null,this._pattern_image_origin=null):(null==r?void 0:r.image)&&this.prepareFillIf(r.image)},drawImage:function(t,e,r,n,o,i){var a=this;e.complete?t.drawImage(e,r,n,o,i):e.addEventListener("load",(function(){a.invalidate()}))},mutateBounds:function(t,e){var r=this.bounds,n=this.rotatePoint,o=this.get("rotation"),i=this.get("scale");if(t){var a=t.call(e,r);a&&(r=a)}var c=r,u=c.left,s=c.top,f=[{x:u,y:s},{x:u+c.width,y:s+c.height}],l=(f=f.map((function(t){return cr(t.x,t.y,n,o,i)})))[0],h=f[1];n={x:(l.x+h.x)/2,y:(l.y+h.y)/2},l=(f=f.map((function(t){return ar(t.x,t.y,n,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,r){var n=this,o=this.path,i=this.rotatePoint;this.get("rotation"),this.get("scale"),t&&(o=t.call(r,o));var a=o.map((function(t){return n.transcoordS2P(t.x,t.y)}));e&&(o=e.call(r,a))&&(a=o);var c,u,s,f,l={x:0,y:0};o=a.map((function(t){return n.transcoordP2S(t.x,t.y,l)})),c=u=o[0].x,s=f=o[0].y;for(var h=1;h<o.length;h++){var p=o[h];p.x<c?c=p.x:p.x>u&&(u=p.x),p.y<s?s=p.y:p.y>f&&(f=p.y)}i={x:(c+u)/2,y:(s+f)/2},i=this.transcoordS2P(i.x,i.y,l),this.path=a.map((function(t){return n.transcoordP2S(t.x,t.y,i)}))},access:function(t){if(t){var e=String(t),r=(e.match(/#{(\S*)}/)||[]).map((function(t){return Me(t)}))[0];if(r)return r.accessor(this.getState(r.target));var n=(e.match(/\${[^}]*}/)||[]).map((function(t){return Me(t)}))[0];if(n){var o=this.root.findById(n.target);return n.accessor(this.getState(o))}return t}},substitute:function(t,e){var r=this;if(t){var n=String(t),o=e||Ft,i=(n.match(/#{(\S*)}/gi)||[]).map((function(t){return Me(t)})),a=(n.match(/\${[^}]*}/gi)||[]).map((function(t){return Me(t)}));if(0==i.length&&0==a.length)return n;var c=n;return i.forEach((function(t){var e=o(t.accessor(r.getState(t.target)));c=c.replace(t.match,void 0===e?"":e)})),a.forEach((function(t){var e=r.root.findById(t.target),n=o(t.accessor(e&&e.data));c=c.replace(t.match,void 0===n?"":n)})),c}},onchangeMappings:function(t,e){this.disposeMappings(),Qe.call(this)},onchangeData:function(t,e){Qe.call(this,[!0])},buildMappings:function(){var t=this;if(this._model.mappings)return!this._model.mappings instanceof Array?(be("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 Ke(e,t)})));this._mappings=[]},executeMappings:Qe,disposeMappings:function(){this._mappings&&this._mappings.forEach((function(t){return t.dispose()})),delete this._mappings},ondropfile:function(t,e){for(var r=0;r<t.length;r++)if(t[r].type.startsWith("image/"))return void this.set("fillStyle",{type:"pattern",image:e[r],fitPattern:!0})},transcoordS2P:function(t,e,r){if(!this.parent)return{x:t,y:e};var n=this.model,o=n.rotation,i=void 0===o?0:o,a=n.scale,c=void 0===a?{x:1,y:1}:a;if(this.isLayer()){var u=this.model.translate,s=cr(t,e,void 0,i+this._delta.theta,c);return u&&(s.x+=u.x,s.y+=u.y),s}var f=cr(t,e,r=r||this.rotatePoint,i+this._delta.theta,c);return{x:f.x-(r.x-r.x/c.x),y:f.y-(r.y-r.y/c.y)}},transcoordP2S:function(t,e,r){if(!this.parent)return{x:t,y:e};var n=this.model,o=n.rotation,i=void 0===o?0:o,a=n.scale,c=void 0===a?{x:1,y:1}:a;if(this.isLayer()){var u=this.model.translate,s=ar(t,e,u,i,c);return u&&(s.x-=u.x/(c?c.x:1),s.y-=u.y/(c?c.y:1)),s}var f=ar(t,e,r=r||this.rotatePoint,i,c);return{x:f.x+(r.x-r.x/c.x),y:f.y+(r.y-r.y/c.y)}},transcoordS2T:function(t,e,r){r=r||this.rootModel;for(var n=[],o=this.parent;o&&o!==r;o=o.parent)n.push(o);var i=this.transcoordS2P(t,e);return n.forEach((function(t){var e=t.model.scale,r=t.bounds;if(e){var n=t.rotatePoint;i.x+=(n.x-r.left)*e.x,i.y+=(n.y-r.top)*e.y}else i.x+=r.left,i.y+=r.top;i=t.transcoordS2P(i.x,i.y)})),i},transcoordT2S:function(t,e,r){r=r||this.rootModel;for(var n=[],o=this.parent;o&&o!==r;o=o.parent)n.splice(0,0,o);var i={x:t,y:e};return n.forEach((function(t){var e=t.model.scale;i=t.transcoordP2S(i.x,i.y);var r=t.bounds;if(e){var n=t.rotatePoint;i.x-=(n.x-r.left)/e.x,i.y-=(n.y-r.top)/e.y}else i.x-=r.left,i.y-=r.top})),this.transcoordP2S(i.x,i.y)},transcoordS2TR:function(t,e,r){r=r||this.rootModel;var n=this.transcoordS2T(t,e,r);return cr(n.x,n.y,void 0,(r.get("rotation")||0)+r._delta.theta)},transcoordS2O:function(t,e,r){var n=this.rootModel,o=this.transcoordS2T(t,e,n);return r.transcoordT2S(o.x,o.y,n)},transcoordC2S:function(t,e,r){if(!r)for(r=this;r&&!r.isLayer();)r=r.parent;var n=r.model,o=n.translate,i=void 0===o?{x:0,y:0}:o,a=n.scale,c=void 0===a?{x:1,y:1}:a,u=n.rotation,s=ar(t,e,i,void 0===u?0:u,c);return i&&(s.x-=i.x/(c?c.x:1),s.y-=i.y/(c?c.y:1)),r===this?s:this.transcoordT2S(s.x,s.y,r)},transcoordS2C:function(t,e,r){if(!r)for(r=this;r&&!r.isLayer();)r=r.parent;if(r!==this)var n=this.transcoordS2T(t,e,r);else n={x:t,y:e};var o=r.model,i=o.translate,a=void 0===i?{x:0,y:0}:i,c=o.rotation,u=void 0===c?0:c,s=o.scale,f=void 0===s?{x:1,y:1}:s;return n=cr(n.x,n.y,void 0,u+r._delta.theta,f),a&&(n.x+=a.x,n.y+=a.y),n},_pre_draw:Ir.prototype.prerender,_draw:Ir.prototype.render,_post_draw:Ir.prototype.postrender}),["rotatePoint","font","lineHeight","retention"].forEach((function(t){return Ir.memoize(Ir.prototype,t,!1)})),["bounds","center","textBounds"].forEach((function(t){return Ir.memoize(Ir.prototype,t,!0)})),Ir.mixin(Ir.prototype,pe.withEvent);var Dr={};const zr={list:function(){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Cr(Object(r),!0).forEach((function(e){Br(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Cr(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},Dr)},register:function(t,e){Dr[t]=e},unregister:function(t){delete Dr[t]},get:function(t){if(t){var e=Dr[t];return e||be("Layout Not Found - ",t),e}}};var Lr={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};zr.register("html-absolute",Lr);const Nr=Lr;function Fr(t){return Fr="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},Fr(t)}function Ur(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Hr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Gr(){return Gr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Yr(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Gr.apply(this,arguments)}function Yr(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Xr(t)););return t}function Wr(t,e){return Wr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Wr(t,e)}function Vr(t,e){if(e&&("object"===Fr(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 Xr(t){return Xr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Xr(t)}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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wr(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=Xr(n);if(o){var r=Xr(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Vr(this,t)});function a(){return Ur(this,a),i.apply(this,arguments)}return e=a,(r=[{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),Gr(Xr(a.prototype),"postrender",this).call(this,t)}}])&&Hr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(Ir);function Kr(t){return Kr="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},Kr(t)}function Qr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Zr(t,e){return Zr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Zr(t,e)}function $r(t,e){if(e&&("object"===Kr(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 tn(t){return tn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},tn(t)}const en=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zr(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=tn(n);if(o){var r=tn(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return $r(this,t)});function a(){return Qr(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"contains",value:function(t,e){var r=this.model,n=r.left,o=r.top,i=r.width,a=r.height,c=r.lineWidth,u=(void 0===c?0:c)/2;return t<Math.max(n+i,n)+u&&t>Math.min(n+i,n)-u&&e<Math.max(o+a,o)+u&&e>Math.min(o+a,o)-u}},{key:"path",get:function(){var t=this.model,e=t.left,r=void 0===e?0:e,n=t.top,o=void 0===n?0:n,i=t.width,a=void 0===i?0:i,c=t.height,u=void 0===c?0:c;return[{x:r,y:o},{x:r+a,y:o},{x:r+a,y:o+u},{x:r,y:o+u}]},set:function(t){var e=t[0],r=t[2],n=this.model;n.width,n.height,this.set({left:e.x,top:e.y,width:r.x-e.x,height:r.y-e.y})}},{key:"anchors",get:function(){return function(t){var e=t.bounds,r=e.left,n=e.top,o=e.width,i=e.height,a=r+o/2,c=n+i/2;return[{type:"inout",name:"TOP",position:{x:a,y:n}},{type:"inout",name:"RIGHT",position:{x:r+o,y:c}},{type:"inout",name:"BOTTOM",position:{x:a,y:n+i}},{type:"inout",name:"LEFT",position:{x:r,y:c}}]}(this)}}])&&Jr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(t);return xe(e.prototype,"path",!1),e};function rn(t){return rn="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},rn(t)}function nn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function on(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function an(){return an="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=cn(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},an.apply(this,arguments)}function cn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=fn(t)););return t}function un(t,e){return un=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},un(t,e)}function sn(t,e){if(e&&("object"===rn(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 fn(t){return fn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},fn(t)}var ln={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"},hn=20;function pn(t,e){var r=t.split(/\s+/),n=r.indexOf(e);return-1!=n?r.splice(n,1):r.splice(-1,0,e),r.join(" ")}var yn=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&un(t,e)}(c,t);var e,r,n,o,i,a=(o=c,i=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}}(),function(){var t,e=fn(o);if(i){var r=fn(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return sn(this,t)});function c(){return nn(this,c),a.apply(this,arguments)}return e=c,n=[{key:"image",get:function(){return c._image||(c._image=new Image,c._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=="),c._image}},{key:"toggle",value:function(t,e,r,n){if(e){var o=t.root.findById(e);o?o._findInfoWindowByComponent(t)?c.hide(t,e):c.show(t,e,r,n):console.warn("InfoWindow Not Found.",e)}else console.warn("InfoWindow not defined.")}},{key:"hide",value:function(t,e){if(e){var r=t.root.findById(e);r?r._removeInfoWindow(t):console.warn("InfoWindow Not Found.",e)}}},{key:"show",value:function(t,e,r,n){if(e){var o=t.root.findById(e);if(o){if(!o._findInfoWindowByComponent(t)){var i=o.model,a=i.frontSideTemplate,u=void 0===a?"":a,s=i.backSideTemplate,f=[u,void 0===s?"":s].filter((function(t){return String(t).trim()}));if(f=f.map((function(t){return Ir.template(function(t,e,r){return(e||r?['<div class="info-window-btns">',e?'<button class="closable">X</button>':"",r?'<button class="flipable">⇌</button>':"","</div>"]:[]).concat(['<div class="info-window-content">',t,"</div>"]).join("")}(t,!r,2==f.length))})),0!=f.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,g=n?t.rootModel.transcoordC2S(n.x,n.y):t.transcoordS2T(p,y);p=g.x,y=g.y;var b=document.createElement("span");b.style.position="absolute";var m=document.createElement("style");if(m.type="text/css",m.styleSheet?m.styleSheet.cssText=l:m.appendChild(document.createTextNode(l)),b.appendChild(m),f[0]){var w=document.createElement("div");w.id="side-1",w.className="flip",w.style.display="inline-block",w.innerHTML=f[0](t)}if(f[1]){var x=document.createElement("div");x.id="side-2",x.className="flip",x.style.display="inline-block",x.innerHTML=f[1](t)}d.forEach((function(t){b.addEventListener(t,(function(t){t.stopPropagation()}))})),v.forEach((function(t){b.addEventListener(t,(function(t){t.stopPropagation()}))}));var _=t.root.model_layer.overlay;if(w&&b.appendChild(w),x&&b.appendChild(x),_.appendChild(b),o._addInfoWindow(t,b,m),w){var k=w.querySelector(".info-window-btns > .flipable");k&&k.addEventListener("click",(function(t){t.preventDefault(),x.className=pn(x.className,"flip-side-1"),w.className=pn(w.className,"flip-side-2")}),!1);var O=w.querySelector(".info-window-btns > .closable");O&&O.addEventListener("click",(function(r){r.preventDefault(),c.hide(t,e)}),!1)}if(x){var S=x.querySelector(".info-window-btns > .flipable");S&&S.addEventListener("click",(function(t){t.preventDefault(),x.className=pn(x.className,"flip-side-1"),w.className=pn(w.className,"flip-side-2")}),!1);var A=x.querySelector(".info-window-btns > .closable");A&&A.addEventListener("click",(function(r){r.preventDefault(),c.hide(t,e)}),!1)}var E=w.offsetWidth,P=w.offsetHeight,j=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,t.rootModel.target.getBoundingClientRect()),R=[];w&&R.push(w),x&&R.push(x);var M={x:p,y},T=t.transcoordS2C(M.x,M.y);if(T.x+E/2+j.left<j.right&&T.x-E/2>j.left){if(P+hn<T.y)return b.style.marginLeft=M.x-E/2+"px",b.style.marginTop=M.y-P-hn+"px",void R.forEach((function(t){return t.className+=" arrow-bottom"}));if(T=t.transcoordS2C(M.x,M.y+P+hn),j.bottom>T.y+j.top)return b.style.marginLeft=M.x-E/2+"px",b.style.marginTop=M.y+hn+"px",void R.forEach((function(t){return t.className+=" arrow-top"}))}if((T=t.transcoordS2C(M.x,M.y)).x-(E+hn)>j.left)return b.style.marginLeft=M.x-E-hn+"px",b.style.marginTop=M.y-P/2+"px",void R.forEach((function(t){return t.className+=" arrow-right"}));b.style.marginLeft=M.x+hn+"px",b.style.marginTop=M.y-P/2+"px",R.forEach((function(t){return t.className+=" arrow-left"}))}}}else console.warn("InfoWindow Not Found.",e)}else console.warn("InfoWindow not defined.")}}],(r=[{key:"dispose",value:function(){var t=this;this.infoWindows.map((function(t){return t.component})).forEach((function(e){return t._removeInfoWindow(e)})),an(fn(c.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,r){this._findInfoWindowByComponent(t)||this._windows.push({component:t,window:e,styleElement:r})}},{key:"_removeInfoWindow",value:function(t){var e=this._findInfoWindowByComponent(t);if(e){var r=e.window;r&&r.parentNode.removeChild(r);var n=this.infoWindows.lastIndexOf(e);this.infoWindows.splice(n,1)}}},{key:"render",value:function(t){var e=this.bounds,r=e.left,n=e.top,o=e.width,i=e.height;t.beginPath(),this.drawImage(t,c.image,r,n,o,i)}},{key:"hasTextProperty",get:function(){return!1}},{key:"nature",get:function(){return ln}}])&&on(e.prototype,r),n&&on(e,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(en(qr));Ir.register("info-window",yn);var dn={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};zr.register("absolute",dn);const vn=dn;function gn(t){var e=t.components.filter((function(t){return!t.hidden})),r=t.get("layoutConfig")||{},n=e[r&&r.activeIndex||0];return n&&[n]||[]}var bn={reflow:function(t){var e=t.bounds,r=t.get("layoutConfig")||{},n={left:0,top:0,width:e.width,height:e.height};t.forEach((function(t,e){var o=e!=r.activeIndex;t.bounds=n,t.set("rotation",0),t.element&&(t.element.style.display=o?"none":"block")}))},capturables:function(t){return gn(t)},drawables:function(t){return gn(t)},isStuck:function(t){return!0}};zr.register("card",bn);const mn=bn;function wn(t){var e=t.get("layoutConfig");return e&&e.weight||1}var xn={reflow:function(t){var e=this.drawables(t),r=t.get("padding")||{},n=e.reduce((function(t,e){return t+wn(e)}),0),o=t.bounds,i=n>0?(o.width-((r.left||0)+(r.right||0)))/n:o.width,a=o.height-((r.top||0)+(r.bottom||0)),c=0;e.forEach((function(t){var e=wn(t),n=t.get("margin")||{};t.bounds={left:i*c+(r.left||0)+(n.left||0),top:0+(r.top||0)+(n.top||0),width:e*i-((n.left||0)+(n.right||0)),height:a-((n.top||0)+(n.bottom||0))},t.set("rotation",0),c+=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}};zr.register("linear-horizontal",xn);const _n=xn;function kn(t){var e=t.get("layoutConfig");return e&&e.weight||1}var On={reflow:function(t){var e=this.drawables(t),r=t.get("padding")||{},n=e.reduce((function(t,e){return t+kn(e)}),0),o=t.bounds,i=n>0?(o.height-((r.top||0)+(r.bottom||0)))/n:o.height,a=o.width-((r.left||0)+(r.right||0)),c=0;e.forEach((function(t){var e=kn(t),n=t.get("margin")||{};t.bounds={left:0+(r.left||0)+(n.left||0),top:i*c+(r.top||0)+(n.top||0),width:a-((n.left||0)+(n.right||0)),height:e*i-((n.top||0)+(n.bottom||0))},t.set("rotation",0),c+=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}};zr.register("linear-vertical",On);const Sn=On;var An={reflow:function(t){var e=t.get("layoutConfig"),r=e&&e.columns||t.get("columns"),n=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<r})).reduce((function(t,e){return t+e}),0):r,c=i?i.filter((function(t,e){return e<n})).reduce((function(t,e){return t+e}),0):n,u=t.textBounds,s=t.get("paddingLeft")||0,f=t.get("paddingTop")||0,l=u.width/a,h=u.height/c,p=0,y=0;t.components.forEach((function(t,e){for(var n=o?o[e%r]:1,a=i?i[Math.floor(e/r)]:1,c=t.colspan||1,u=0;--c>0;)u+=o?o[(e+c)%r]:1;for(var d=t.rowspan||1,v=0;--d>0;)v+=i?i[Math.floor(e/r)+d]:1;t.bounds={left:s+p,top:f+y,width:l*(n+u),height:h*(a+v)},t.set("rotation",0),e%r==r-1?(p=0,y+=a*h):p+=n*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,r){var n=t.get("layoutConfig"),o=n&&n.columns||t.get("columns"),i=n&&n.rows||t.get("rows"),a=t.getRowColumn(e),c=a.row,u=a.column;switch(r.code){case"ArrowUp":if(c>0)return t.getAt((c-1)*o+u);break;case"ArrowDown":if(c<i-1)return t.getAt((c+1)*o+u);break;case"ArrowRight":if(u<o-1)return t.getAt(c*o+u+1);break;case"ArrowLeft":if(u>0)return t.getAt(c*o+u-1);break;default:return e}},joinType:!0};zr.register("table",An);const En=An;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},Pn(t)}function jn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Mn(){return Mn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Tn(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Mn.apply(this,arguments)}function Tn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Bn(t)););return t}function In(t,e){return In=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},In(t,e)}function Cn(t,e){if(e&&("object"===Pn(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 Bn(t){return Bn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Bn(t)}var Dn=new Image;Dn.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAclBMVEVHcEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC0BbqFAAAAJXRSTlMAgAP3VSI6/g9fBk5FavJsMrariSjzPnO1enRRL5SMhmOOWB9keFTE0wAAANxJREFUOMutk9kWgyAMRLFuiLjUtdp9yf//YglVsQXz1HniMPcEMgHGvpX2O0Ypi+EgCL+IAShC+wB7QfubRDT7AFcnUPoLMLiP4PyJbsb55i05AgnR5iaQDsICgtH0cotBWoAP1c7kC6kFxEseCfZfB6gEgbNeBrira2QmH1uVYCXlA3is8UmgUCPIyQJKEmu8QtQJN0e9DPXVpzG2G216c1CqRmcBOdxXk07sWUSPv07zo0amCNQycv+NzmR6cRcwmfbuI7p2nZ/z4be0P83Foz6vIkhfZXr82XgDlZsspIq4peUAAAAASUVORK5CYII=";const 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&In(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=Bn(n);if(o){var r=Bn(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Cn(this,t)});function a(){return jn(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"postrender",value:function(t){Mn(Bn(a.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,r=e.left,n=e.top,o=e.width;t.save(),t.beginPath(),t.rect(r+o,n,25,25),t.fillStyle="rgba(".concat(235,", ").concat(235,", ").concat(235,", 1)"),t.fill(),t.drawImage(Dn,r+o+3.75,n+3.75,17.5,17.5),t.closePath(),t.restore()}},{key:"contains",value:function(t,e){var r=Mn(Bn(a.prototype),"contains",this).call(this,t,e);if(this.app.isViewMode)return r;var n=this.bounds,o=n.left,i=n.top,c=n.width,u=(n.height,o+c);return this.showMoveHandle&&(r=r||t<Math.max(u+25,u)&&t>Math.min(u+25,u)&&e<Math.max(i+25,i)&&e>Math.min(i+25,i)),this._focused=!!r,this.invalidate(),r}}])&&Rn(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(t);return 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},Ln(t)}function Nn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Fn(){return Fn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Un(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Fn.apply(this,arguments)}function Un(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Yn(t)););return t}function Hn(t,e){return Hn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Hn(t,e)}function Gn(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 Yn(t){return Yn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Yn(t)}var Wn=[],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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Hn(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=Yn(n);if(o){var r=Yn(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Gn(this,t)});function a(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(r=i.call(this,t,e))._components=[],r}return e=a,r=[{key:"replaceRefs",value:function(t){this.components.forEach((function(e){return e.replaceRefs(t)}))}},{key:"showMoveHandle",get:function(){return!0}},{key:"showOverflow",get:function(){return!1}},{key:"dispose",value:function(){this.components.slice().forEach((function(t){return t.dispose()})),Fn(Yn(a.prototype),"dispose",this).call(this)}},{key:"isContainer",value:function(){return!0}},{key:"containable",value:function(t){return t.isDescendible(this)}},{key:"hasTextProperty",get:function(){return!1}},{key:"components",get:function(){return this._components}},{key:"focusible",get:function(){return!0}},{key:"layout",get:function(){return zr.get(this.get("layout"))||vn}},{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=Fn(Yn(a.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 r=this._components.push(t)-1;t.parent=this,t.added(this),this.trigger("add",this,t,r),t.delegate_on(this),t.trigger("added",this,t,r),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 r=t.parent;r&&r.removeComponent(t);var n=this._components.splice(0,e);this._components=n.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(r){r.isContainer()?r.traverse(t,e):t.call(e,r)}))}},{key:"indexOf",value:function(t){return(this._components||Wn).indexOf(t)}},{key:"size",value:function(){return(this._components||Wn).length}},{key:"moveChildAt",value:function(t,e){var r=this.indexOf(e);if(-1!=r){var n=this._components.splice(0,r),o=this._components.splice(1);this._components=n.concat(o),t=Math.max(0,t),t=Math.min(t,this._components.length),n=this._components.splice(0,t),this._components=n.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 r=this._components.splice(0,e),n=this._components.splice(1);this._components=r.concat(n,this._components)}}},{key:"moveChildToBack",value:function(t){var e=this.indexOf(t);if(-1!=e&&0!=e){var r=this._components.splice(0,e),n=this._components.splice(0);this._components=this._components.concat(r,n)}}},{key:"symmetryX",value:function(t){Fn(Yn(a.prototype),"symmetryX",this).call(this,t),this.components.map((function(t){t.symmetryX(0)}))}},{key:"findAll",value:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if("string"==typeof t)return je(t,this,r[0]||this);if("function"==typeof t){for(var o=[],i=this.components.length-1;i>=0;i--){var a,c=(a=this.components[i]).findAll.apply(a,[t].concat(r));c&&(o=o.concat(c))}return t.apply(void 0,[this].concat(r))&&o.push(this),o}}},{key:"findFirst",value:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if("string"==typeof t)return je(t,this,r[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(r));if(null!=a)return a}return t.apply(void 0,[this].concat(r))?this:null}}},{key:"findById",value:function(t){return this.root.findById(t)}},{key:"findByRef",value:function(t){return this.root.findByRef(t)}},{key:"contains",value:function(t,e){var r=Fn(Yn(a.prototype),"contains",this).call(this,t,e);if(!r){var n=this.model,o=n.left,i=n.top,c=n.width,u=n.height,s=n.lineWidth,f=void 0===s?0:s,l=this.stuck?0:10+f/2;r=t<Math.max(o+c,o)+l&&t>Math.min(o+c,o)-l&&e<Math.max(i+u,i)+l&&e>Math.min(i+u,i)-l}return r}},{key:"capture",value:function(t,e,r){var n=this.transcoordP2S(t,e);if(!this.contains(n.x,n.y))return!1;var o=this.bounds;n.x-=o.left,n.y-=o.top;for(var i=this.layout.capturables(this),a=i.length-1;a>=0;a--){var c=i[a].capture(n.x,n.y,r);if(c)return c}return this.capturable&&!(null!=r&&r(this))&&this}},{key:"capturePath",value:function(t,e){if(e){if(e.indexOf(this)>-1)return!1;for(var r=0;r<e.length;r++)if(!this.containable(e[r]))return!1}for(var n=[],o=this.bounds,i=o.left,a=o.top,c=o.width,u=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+c||f.y<a||f.y>a+u)return!1;f.x-=i,f.y-=a,n.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(n,e);if(y)return y}}return this.focusible&&this}},{key:"render",value:function(t){var e=this.bounds,r=e.left,n=void 0===r?0:r,o=e.top,i=void 0===o?0:o,a=e.width,c=e.height;t.beginPath(),t.rect(n,i,a,c),t.closePath(),this.drawFill(t),this.drawStroke(t)}},{key:"postrender",value:function(t){Fn(Yn(a.prototype),"postrender",this).call(this,t);var e=this.bounds,r=e.left,n=void 0===r?0:r,o=e.top,i=void 0===o?0:o,c=e.width,u=e.height;this.showOverflow||(t.beginPath(),t.rect(n,i,c,u),t.clip(),t.closePath());var s=this.model;i=s.top,n=s.left,s.scale,t.translate(n,i),this.layout.drawables(this).forEach((function(e){e.draw(t)})),t.translate(-n,-i),this.drawText(t)}},{key:"trim",value:function(){this.components.forEach((function(t){t.trim()})),Fn(Yn(a.prototype),"trim",this).call(this)}}],r&&Nn(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(zn(en(Ir)));function Xn(t){return Xn="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},Xn(t)}function qn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Kn(){return Kn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Qn(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Kn.apply(this,arguments)}function Qn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=$n(t)););return t}function Jn(t,e){return Jn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Jn(t,e)}function Zn(t,e){if(e&&("object"===Xn(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 $n(t){return $n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$n(t)}["layout"].forEach((function(t){return Ir.memoize(Vn.prototype,t,!1)}));var to=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jn(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=$n(n);if(o){var r=$n(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Zn(this,t)});function a(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),r=i.call(this,t,e),t.translate=t.translate||{x:0,y:0},r._draw_reserved=!1,r.__draw__=function(){r._draw_reserved=!1,r.trigger("redraw"),r.reflow(),r.draw()},r.throttle_render=function(){r._draw_reserved||requestAnimationFrame(r.__draw__),r._draw_reserved=!0},r}return e=a,(r=[{key:"fitSize",value:function(t,e,r,n){if(this.target){if(e){var o=getComputedStyle(this.target);r=r||(o?parseFloat(o.getPropertyValue("width")):this.target.offsetWidth),n=n||(o?parseFloat(o.getPropertyValue("height")):this.target.offsetHeight)}else r=this.model.width,n=this.model.height;"CANVAS"==t.tagName&&(t.setAttribute("width",r*y),t.setAttribute("height",n*y)),t.style.width=r+"px",t.style.height=n+"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:"showOverflow",get:function(){return this.app.isEditMode}},{key:"createElement",value:function(){var t=Ir.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(){Kn($n(a.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())&&Kn($n(a.prototype),"draw",this).call(this,t)}},{key:"prerender",value:function(t){var e=this.model,r=e.translate,n=e.scale,o=void 0===n?{x:1,y:1}:n,i=e.rotation;t.clearRect(0,0,t.canvas.width,t.canvas.height),r&&t.translate(r.x*y,r.y*y),t.scale(o.x*y,o.y*y),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}})}}])&&qn(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(Vn);function eo(t){return eo="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},eo(t)}function ro(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function no(){return no="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=oo(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},no.apply(this,arguments)}function oo(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=co(t)););return t}function io(t,e){return io=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},io(t,e)}function ao(t,e){if(e&&("object"===eo(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 co(t){return co=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},co(t)}var uo={x:1,y:1},so={x:0,y:0},fo=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&io(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=co(n);if(o){var r=co(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return ao(this,t)});function a(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,t,e)}return e=a,r=[{key:"dispose",value:function(){no(co(a.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 Nr}},{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=Ir.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,r=this.model,n=r.width,o=r.height,i=r.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)/n;break;case"height":t=n*(e=a?parseFloat(a.getPropertyValue("height")):this.target.offsetHeight)/o;break;default:t=n,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,r=void 0===e?{x:1,y:1}:e;switch(t.unit){case"mm":case"cm":return 1/this.app.PPM/r.x;case"in":return 1/this.app.PPI/r.x;default:return 1/r.x}}},{key:"capturePath",value:function(t,e){for(var r=this.layout.capturables(this),n=r.length-1;n>=0;n--){var o=r[n];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,r=e.translate,n=void 0===r?so:r,o=e.scale,i=void 0===o?uo:o,a=e.rotation,c=void 0===a?0:a,u=this.bounds,s=u.left,f=u.top;u.width,u.height,t.style.left=s+"px",t.style.top=f+"px";var l="rotate(".concat(c,"rad) scale(").concat(i.x,", ").concat(i.y,") perspective(1px)");t.style["margin-left"]=n.x+"px",t.style["margin-top"]=n.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,r){this.invalidate()}},{key:"_onmouseenter_all",value:function(t,e){if(t.stopPropagation(),this.app&&!this.app.isEditMode&&e){var r=e.origin;if(!(r instanceof a)&&r.model.event&&r.model.event.hover&&!r.hidden){var n=r.model.event.hover;n&&this._doEventAction(n,r,!0,t)}}}},{key:"_onmouseleave_all",value:function(t,e){if(t.stopPropagation(),e){var r=e.origin;if(this.app&&!this.app.isEditMode){var n=r.model.event&&r.model.event.hover;n&&this._doEventAction(n,r,!1,t)}}}},{key:"_onclick",value:function(t,e){if(t.stopPropagation(),!this.app.isEditMode&&e){var r=e.origin,n=r.model.event&&r.model.event.tap;n&&this._doEventAction(n,r,!0,t)}}},{key:"_onmousedownup",value:function(t,e){if(t.stopPropagation(),!this.app.isEditMode&&e){var r=e.origin,n=r.model.event&&r.model.event.tap;n&&n.pressed&&this._doMouseDownUpEventAction(n,r,"mousedown"==t.type||"touchstart"==t.type,t)}}},{key:"_doMouseDownUpEventAction",value:function(t,e,r,n){var o=t.pressed;void 0!==o&&o&&(r?function(t){if(!t.hasOwnProperty("_backupShadow")){var e=t.get("shadow");t._backupShadow=e;var r=e||{},n=r.left,o=void 0===n?0:n,i=r.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",value:function(t,e,r,n){var o=t.action,i=t.target,a=t.value,c=t.emphasize,u=void 0!==c&&c,s=t.restore,f=void 0!==s&&s;if(t.pressed,i&&(i=e.access(i)),a&&(a=e.access(a)),u&&(r?function(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)))}(e):f&&function(t){t.hasOwnProperty("_backupStrokeStyle")&&(t.set("strokeStyle",t._backupStrokeStyle),delete t._backupStrokeStyle,t.hasOwnProperty("_backupLineWidth")&&(t.set("lineWidth",t._backupLineWidth),delete t._backupLineWidth))}(e)),o)switch(o){case"data-toggle":if(!i)return;(r||f)&&this.root.findAll(i,e).forEach((function(t){t.data=!t.data}));break;case"data-tristate":if(!i)return;(r||f)&&this.root.findAll(i,e).forEach((function(t){var e=Math.round(Math.max(Number(t.data)||0,0));t.data=(e+(r?1:2))%3}));break;case"data-set":if(!i)return;if(r){var l=a;this.root.findAll(i,e).forEach((function(t){t.data=l}))}break;case"value-set":if(!i)return;r&&(l=a,this.root.findAll(i,e).forEach((function(t){t.value=l})));break;case"infoWindow":case"info-window":if(!i)return;"click"==n.type||r?yn.show(e,i,f,{x:n.offsetX,y:n.offsetY}):f&&yn.hide(e,i);break;case"toggle-info-window":if(!i)return;yn.toggle(e,i,!1,{x:n.offsetX,y:n.offsetY});break;case"popup":if(!i)return;I(e,i);break;case"modal-popup":if(!i)return;I(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)}}}],r&&ro(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(to);function lo(t){return lo="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},lo(t)}function ho(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function po(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function yo(t,e){return yo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},yo(t,e)}function vo(t,e){if(e&&("object"===lo(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 go(t){return go=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},go(t)}fo.Popup=t,Ir.register("model-layer",fo);var bo=[1,2,10,20,50,50,50,50,50,50],mo=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yo(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=go(n);if(o){var r=go(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return vo(this,t)});function a(){return ho(this,a),i.apply(this,arguments)}return e=a,r=[{key:"render",value:function(t){var e=this.model,r=e.lineWidth,n=void 0===r?1:r,o=e.fillStyle,i=void 0===o?"lightgray":o,a=e.font,c=void 0===a?"15px Arial":a,u=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,b=void 0===g?1:g;t.translate(u,s),t.beginPath();var m=Math.round(n/2);t.rect(-m,-m,l+2*m,h+2*m),t.clip(),t.beginPath(),t.rect(0,0,l,h),i&&(t.fillStyle=i,t.fill()),t.lineWidth=n,t.strokeStyle=v,t.stroke(),t.beginPath(),t.font=c;var w="bottom"!==y,x=w?0:h,_=4*h/5,k=2*h/3,O=1*h/2,S=3*h/5;w&&(_=h-_,k=h-k,O=h-O,S=h-1.5*h/5);var A=b*this.app.PPM/this.root.unitScale,E=Math.ceil(f/A),P=this.app.PPM/A,j=P<=1.1?1:bo[Math.round(P)]||100;1!=j&&(E+=(j-E%j)%j);var R=Math.ceil(E*A),M=f+l;for(t.fillStyle=v;R<M;){if(E%10==0){t.moveTo(R-f,O),t.lineTo(R-f,x);var T=(E/10).toString(),I=t.measureText(T);t.fillText(T,R-f-I.width-6,S)}else E%5==0?(t.moveTo(R-f,k),t.lineTo(R-f,x)):(t.moveTo(R-f,_),t.lineTo(R-f,x));E+=j,R=Math.ceil(E*A)}}}],r&&po(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(en(qr));function wo(t){return wo="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},wo(t)}function xo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ko(t,e){return ko=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ko(t,e)}function Oo(t,e){if(e&&("object"===wo(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)},So(t)}Ir.register("ruler",mo);var Ao={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"number",label:"round",name:"round",property:"round"}],help:"scene/component/rect"},Eo={ondragmove:function(t,e,r){var n=r.model,o=n.left,i=(n.top,n.width),a=n.height,c=(r.transcoordP2S(t.x,t.y).x-o)/(i/2)*100;c=Po(c,i,a),r.set({round:c})}};function Po(t,e,r){var n=e>r?r/e*100:100;return t>=n?t=n:t<=0&&(t=0),t}var jo=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ko(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=So(n);if(o){var r=So(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Oo(this,t)});function a(){return xo(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"is3dish",value:function(){return!0}},{key:"render",value:function(t){var e=this.model.round,r=void 0===e?0:e,n=this.bounds,o=n.left,i=n.top,a=n.width,c=n.height;t.translate(o,i),t.beginPath();var u=(r=Po(r,a,c))/100*(a/2);t.moveTo(u,0),t.arcTo(a,0,a,c,u),t.arcTo(a,c,0,c,u),t.arcTo(0,c,0,0,u),t.arcTo(0,0,a,0,u),t.translate(-o,-i)}},{key:"controls",get:function(){var t=this.model,e=t.left,r=t.top,n=t.width,o=t.round,i=t.height;return[{x:e+n/2*((o=null==o?0:Po(o,n,i))/100),y:r,handler:Eo}]}},{key:"nature",get:function(){return Ao}}])&&_o(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(en(qr));function Ro(t){return Ro="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},Ro(t)}function Mo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function To(){return To="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Io(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},To.apply(this,arguments)}function Io(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Do(t)););return t}function Co(t,e){return Co=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Co(t,e)}function Bo(t,e){if(e&&("object"===Ro(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 Do(t){return Do=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Do(t)}Ir.register("rect",jo);var zo=20,Lo=20,No=90*Math.PI/180,Fo="9px Verdana",Uo="#f4f4f4",Ho="#999";function Go(t,e,r){return{left:-t.x,top:-t.y,width:zo,height:20}}function Yo(t,e,r,n){return{left:zo-t.x,top:0-t.y,origin:20-t.x,width:e-zo,height:20}}function Wo(t,e,r,n){var o={x:0-t.x+10,y:-t.y+Lo+(r-Lo)/2},i=Ir.transcoordRR(0-t.x,-t.y+Lo,o,No);return{left:i.x-(r-Lo),top:i.y,origin:20-t.y,width:r-Lo,height:20}}function Vo(t){var e=t.get("translate");return{left:-e.x,top:-e.y,width:t.canvas.width/y,height:t.canvas.height/y}}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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Co(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=Do(n);if(o){var r=Do(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Bo(this,t)});function a(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(r=i.call(this,t,e)).appScale={x:1,y:1},"disabled"!==t.ruler&&(r.hruler=new mo({left:zo,top:0,origin:20,margin:0,height:20,unit:"m",rotation:0,font:Fo,fillStyle:Uo,strokeStyle:Ho,capturable:!1}),r.vruler=new mo({left:0,top:0,origin:20,margin:0,height:20,unit:"m",rotation:No,font:Fo,side:"top",fillStyle:Uo,strokeStyle:Ho,capturable:!1}),r.origin_rect=new jo({left:-20,top:-20,width:20,height:20,fillStyle:Uo,strokeStyle:Ho,lineWidth:1}),r.addComponent(r.hruler),r.addComponent(r.vruler),r.addComponent(r.origin_rect)),r.invalidate(),r}return e=a,(r=[{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<zo&&(e.x+=zo),e.y<Lo&&(e.y+=Lo);var r=t.get("scale")||{x:1,y:1};this.appScale=r,this.hruler.set("scale",r.x),this.vruler.set("scale",r.y),t.set("translate",e),this.set("translate",e),this.screen_coord=Vo(this);var n=this.screen_coord,o=n.width,i=n.height;this.hruler.set(Yo(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(){To(Do(a.prototype),"resize",this).call(this),this.screen_coord=Vo(this);var t=this.screen_coord,e=t.width,r=t.height;this.hruler&&(this.hruler.set(Yo(this.model.translate,e,0,this.hruler)),this.vruler.set(Wo(this.model.translate,0,r,this.vruler)),this.origin_rect.set(Go(this.model.translate)))}},{key:"render",value:function(t){if(this.guide){t.save();var e=this.guide,r=e.x,n=e.y,o=this.screen_coord,i=o.top,a=o.left,c=o.width,u=o.height;t.beginPath(),t.moveTo(r,i),t.lineTo(r,i+u),t.moveTo(a,n),t.lineTo(a+c,n),t.lineWidth=1,t.strokeStyle="tomato",t.setLineDash([2,3]),t.font="10px tahoma",t.fillStyle="#333";var s=this.transcoordS2C(r,n,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(r/this.appScale.x),p=Math.round(n/this.appScale.y);t.fillText(" ".concat(h,", ").concat(p," "),r+l,n+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,r){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 n=this.model.translate,o=this.screen_coord,i=o.width,a=o.height;this.hruler.set(Yo(n,i,0,this.hruler)),this.vruler.set(Wo(n,0,a,this.vruler)),this.origin_rect.set(Go(n))}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)}}])&&Mo(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(to);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},qo(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 r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Jo(t,e){return Jo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Jo(t,e)}function Zo(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 $o(t){return $o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$o(t)}Ir.register("guide-layer",Xo);var ti=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jo(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=$o(n);if(o){var r=$o(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Zo(this,t)});function a(){return Ko(this,a),i.apply(this,arguments)}return e=a,(r=[{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!=l)}},{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=l)}},{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),r=e.x,n=e.y;this.rootModel.move({x:r-this.last_position.x,y:n-this.last_position.y},!1),this.last_position=this.transcoordC2S(t.offsetX,t.offsetY)}}])&&Qo(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(to);function ei(t){return ei="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},ei(t)}function ri(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ni(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function oi(){return oi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=ii(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},oi.apply(this,arguments)}function ii(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ui(t)););return t}function ai(t,e){return ai=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ai(t,e)}function ci(t,e){if(e&&("object"===ei(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 ui(t){return ui=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ui(t)}Ir.register("shift-layer",ti);const si=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ai(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=ui(n);if(o){var r=ui(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return ci(this,t)});function a(){return ri(this,a),i.apply(this,arguments)}return e=a,(r=[{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),d.forEach((function(e){t.element.addEventListener(e,t.userInputEventHandler.bind(t))})),v.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&&_r(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),oi(ui(a.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()}}])&&ni(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(t);return e};function fi(t){return fi="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},fi(t)}function li(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function pi(t,e){return pi=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},pi(t,e)}function yi(t,e){if(e&&("object"===fi(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 di(t){return di=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},di(t)}var vi={x:1,y:1},gi={boxSizing:"border-box",margin:"0px",position:"absolute",outline:"none"},bi={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"layout",label:"layout",name:"layoutOption"}],help:"scene/component/container"},mi=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pi(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=di(n);if(o){var r=di(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return yi(this,t)});function a(){return li(this,a),i.apply(this,arguments)}return e=a,r=[{key:"tagName",get:function(){return"div"}},{key:"nature",get:function(){return bi}},{key:"setElementProperties",value:function(t){}},{key:"layout",get:function(){return zr.get(this.get("layout"))||Nr}},{key:"reposition",value:function(){if(this.element){var t=this,e=t.state,r=e.id,n=e.class,o=e.scale,i=void 0===o?vi:o,a=t.rotation,c=void 0===a?0:a,u=t.hidden,s=t.bounds,f=s.left,l=s.top,h=s.width,p=s.height,y=h/2,d=p/2,v=t.element;v.hidden=u,r&&(v.id=r),n&&(v.className=n),Object.assign(v.style,gi,{left:f+"px",top:l+"px",width:"0px",height:"0px",backgroundColor:"transparent"});var g=t.delta(),b=(i&&i.x||1)*g.sx,m=(i&&i.y||1)*g.sy,w=(c||0)+g.theta,x=g.tx||0,_=g.ty||0;["-webkit-","-moz-","-ms-","-o-",""].forEach((function(t){v.style[t+"transform"]="translate(".concat(x+y,"px, ").concat(_+d,"px) rotate(").concat(w,"rad) translate(").concat(-y,"px, ").concat(-d,"px) scale(").concat(b,", ").concat(m,") perspective(1px)")}))}}}],r&&hi(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(si(Vn));function wi(t){return wi="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},wi(t)}function xi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ki(t,e,r,n){return ki="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,r,n){var o,i=Ai(t,e);if(i){if((o=Object.getOwnPropertyDescriptor(i,e)).set)return o.set.call(n,r),!0;if(!o.writable)return!1}if(o=Object.getOwnPropertyDescriptor(n,e)){if(!o.writable)return!1;o.value=r,Object.defineProperty(n,e,o)}else Oi(n,e,r);return!0},ki(t,e,r,n)}function Oi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Si(){return Si="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Ai(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Si.apply(this,arguments)}function Ai(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ji(t)););return t}function Ei(t,e){return Ei=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ei(t,e)}function Pi(t,e){if(e&&("object"===wi(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 ji(t){return ji=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ji(t)}Ir.register("container",mi);var Ri=["left","top","width","height","rotation","animation"],Mi=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ei(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=ji(n);if(o){var r=ji(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Pi(this,t)});function a(){return xi(this,a),i.apply(this,arguments)}return e=a,r=[{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(Oi({},t,e));var r=Ri.reduce((function(e,r){return t.hasOwnProperty(r)&&(e[r]=t[r]),e}),{});return Si(ji(a.prototype),"set",this).call(this,r)}},{key:"capture",value:function(t,e,r){var n=Si(ji(a.prototype),"capture",this).call(this,t,e,r);if(n!==this)return n}},{key:"bounds",get:function(){return Si(ji(a.prototype),"bounds",this)},set:function(t){if(this.__MUTATING__)!function(t,e,r,n,o){if(!ki(t,e,r,n||t)&&o)throw new Error("failed to set property")}(ji(a.prototype),"bounds",t,this,!0);else{var e=this.bounds,r=t.width/e.width,n=t.height/e.height;this.path=this.path.map((function(o){return{x:t.left+(o.x-e.left)*r,y:t.top+(o.y-e.top)*n}})),this.components&&this.components.forEach((function(t){if(t.mutable)t.mutatePath(null,(function(t){return t.map((function(t){return{x:t.x*r,y:t.y*n}}))}));else{var e=t.bounds,o=t.center,i={x:o.x*(1-r),y:o.y*(1-n)},a=e.width*(1-r),c=e.height*(1-n),u=-(i.x-a/2),s=-(i.y-c/2);t.bounds={left:e.left+u,top:e.top+s,width:e.width*r,height:e.height*n}}}))}}},{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=Ir.union(this.components.map((function(t){return t.bounds})));return this.components.forEach((function(t){var r=t.bounds;t.bounds={left:r.left-e.left,top:r.top-e.top,width:r.width,height:r.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,r=e.top,n=e.left;e.scale,t.translate(n,r),this.layout.drawables(this).forEach((function(e){e.draw(t)})),t.translate(-n,-r)}}],r&&_i(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(mi);function Ti(t){return Ti="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},Ti(t)}function Ii(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ci(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Di(t,e){return Di=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Di(t,e)}function zi(t,e){if(e&&("object"===Ti(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 Li(t){return Li=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Li(t)}function Ni(t,e,r,n,o){o||function(t,e,r,n){var o=t.selected,i=n?o.slice(0):[];n&&i.length>0?e=i[0].parent:e.isContainer()||(e=e.parent);var a=e.layout.capturables(e),c=!!e.layout.joinType;if(n&&r.selected.forEach((function(t){i.splice(i.indexOf(t),1)})),r.selected=[],a.forEach((function(t){t.capturable&&function(t,e,r){var n,o,i,a,c=e.sx,u=e.sy,s=e.ex,f=e.ey;if(c>s?(n=s,o=c):(n=c,o=s),u>f?(i=f,a=u):(i=u,a=f),r){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,b=Math.min(n,y,o,d),m=Math.max(n,y,o,d),w=Math.min(i,v,a,g),x=Math.max(i,v,a,g);return!(m-b>Math.abs(o-n)+Math.abs(d-y)||x-w>Math.abs(a-i)+Math.abs(g-v))}var _=t.path;if(!_)return be("컴포넌트에 get path가 잘못 구현되어있음.",t),!1;for(var k=0;k<_.length;k++){var O=t.transcoordS2TR(_[k].x,_[k].y);if(n>O.x||o<O.x||i>O.y||a<O.y)return!1}return!0}(t,r,c)&&-1==i.indexOf(t)&&r.selected.push(t)})),i=i.concat(r.selected),o.length!==i.length)t.selected=i;else for(var u=0;u<i.length;u++)if(o[u]!=i[u]){t.selected=i;break}}(t,e,r,n)}Ir.register("group",Mi);var Fi=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Di(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=Li(n);if(o){var r=Li(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return zi(this,t)});function a(){return Ci(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"ready",value:function(){var t=this.rootModel,e=t.get("translate"),r=t.get("scale");this.set("translate",e),this.set("scale",r)}},{key:"contains",value:function(t,e){return!1}},{key:"render",value:function(t){var e=this.selbox;if(e){var r=e.sx,n=e.sy,o=e.ex,i=e.ey,a=this.get("scale")||{x:1,y:1};t.beginPath(),t.rect(r,n,o-r,i-n),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 r=e.deliverer,n=r.selected;if(1!=n.length)return!1;var o=n[0],i=o.parent;if(!i||i===r)return!1;if("Tab"==t.code){if("Tab"!=t.code)return!1;var a=i.layout.capturables(i),c=a.indexOf(o);if(-1==c){if(!i.indexOf(o))return me("Container not contains [",o,"] as a component"),!1;c=0}var u=a.length;t.shiftKey?c--:c++,o=a[(c+u)%u]}else{if(!i.layout.keyNavigate)return!1;o=i.layout.keyNavigate(i,o,t)||o}r.selected=[o],t.preventDefault()}},{key:"onchange_root_model",value:function(t,e,r){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 r=this.selected.indexOf(t),n=t.parent;n.parent.isGroup();)n=n.parent;var o,i=[],a=!1,c=!1;if(this.selected.forEach((function(t){var e=t.parent;if(t!==n){for(;e.parent&&e.parent.isGroup();)e=e.parent;e===n&&(i.push(t),a=!0)}else c=!0})),a)if(e.shiftKey){if(-1!=r)return void this._pendingDecision(e);i.push(t)}else{if(-1!=r)return void this._pendingDecision(e);i=[t]}else{if(c)return void this._pendingDecision(e);if(e.shiftKey)if(this.selected.length>0){if(-1!=this.selected.indexOf(n)||this.selected[0].parent!==n.parent)return;i=[].concat(function(t){if(Array.isArray(t))return Ii(t)}(o=this.selected)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(o)||function(t,e){if(t){if("string"==typeof t)return Ii(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ii(t,e):void 0}}(o)||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.")}(),[n])}else i=[n];else i=[n]}this.selected=i}},{key:"onmousedown_comp",value:function(t,e){var r=e.origin;if(this.downpoint=null,t.shiftKey){if(r.parent.isGroup())return void this._selectGroupItem(r,t);if(-1!=this.selected.indexOf(r))return void this._pendingDecision(t);var n=this.selected.filter((function(t){return!t.isRootModel()&&!!t.parent})),o=n.length>0&&n[0].parent;if(o&&o!==r.parent)return void(r.parent.isGroup()&&this._pendingDecision(t));n.push(r),this.selected=n}else{if(r.parent.isGroup())return void this._selectGroupItem(r,t);if(-1!=this.selected.indexOf(r))return;this.selected=[r]}}},{key:"onmouseup_comp",value:function(t,e){if(this.downpoint&&this.downpoint.x===t.offsetX&&this.downpoint.y===t.offsetY){var r=e.origin,n=this.selected.indexOf(r);if(-1==n&&r.parent.isGroup()&&(n=this.selected.indexOf(r.parent)),-1!==n&&t.shiftKey){var o=this.selected.slice();return n>-1&&o.splice(n,1),void(this.selected=o)}r.parent.isGroup()&&(this.selected=[r])}}},{key:"ondragstart_selbox",value:function(t,e){if(e.origin.stuck){var r=this.transcoordC2S(t.offsetX,t.offsetY),n=r.x,o=r.y;this.selbox={sx:n,sy:o,selected:[]}}}},{key:"ondragmove_selbox",value:function(t,e){var r=e.origin;if(r.stuck){var n=this.transcoordC2S(t.offsetX,t.offsetY),o=n.x,i=n.y;e.deliverer,this.selbox&&(this.selbox.ex=o,this.selbox.ey=i,Ni(this,r,this.selbox,t.shiftKey),this.invalidate())}}},{key:"ondragend_selbox",value:function(t,e){e.origin.stuck&&(this.last_pos=null,this.selbox=null,Ni(this,null,null,!1,!0),this.invalidate())}}])&&Bi(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(to);function Ui(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Ir.register("selection-layer",Fi);var Hi=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,r;return e=t,(r=[{key:"excute",value:function(){}}])&&Ui(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Gi(t){return Gi="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},Gi(t)}function Yi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Vi(t,e){return Vi=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Vi(t,e)}function Xi(t,e){if(e&&("object"===Gi(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 qi(t){return qi=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},qi(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vi(t,e)}(c,t);var e,r,n,o,i,a=(o=c,i=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}}(),function(){var t,e=qi(o);if(i){var r=qi(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Xi(this,t)});function c(){return Yi(this,c),a.apply(this,arguments)}return e=c,n=[{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,r){e.call(r),t.execute(null,!1)}}],(r=[{key:"execute",value:function(){this.params.changes.forEach((function(t){return t.component.set(t.after)}))}}])&&Wi(e.prototype,r),n&&Wi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(Hi);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},Qi(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 r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function $i(t,e){return $i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},$i(t,e)}function ta(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 ea(t){return ea=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ea(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 na=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$i(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=ea(n);if(o){var r=ea(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return ta(this,t)});function a(){return Ji(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"execute",value:function(){this.params.changes.forEach((function(t){var e=t.component,r=t.to_container,n=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,r=t.rotatePoint,n=r;return{left:(n=t.transcoordS2T(n.x,n.y)).x-(r.x-e.left),top:n.y-(r.y-e.top),width:e.width,height:e.height}}(e)),c=ra(e);if(e.removeSelf(!r),e.bounds=a,e.set("rotation",c),r){e.set("rotation",function(t,e){return((t.get("rotation")||0)-ra(e))%(2*Math.PI)}(e,r));var u=function(t,e){if(e.isRootModel())return t.bounds;var r=t.bounds,n=t.rotatePoint,o=e.transcoordT2S(n.x,n.y),i=e.bounds;return{left:o.x-(n.x-r.left)-i.left,top:o.y-(n.y-r.top)-i.top,width:r.width,height:r.height}}(e,r);t.to_left=void 0!==o?o:u.left,t.to_top=void 0!==i?i:u.top,e.bounds={left:t.to_left,top:t.to_top,width:u.width,height:u.height},void 0===n?r.addComponent(e):r.insertComponentAt(e,n)}}))}}])&&Zi(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(Hi);function oa(t,e,r){var n=Ir.register(t.type);if(!n)return me("Class not found",t.type),null;r&&(t.ref=r(t.ref));var o=new n(t,e);return t.components&&o.isContainer()&&(t.components.forEach((function(t){var n=oa(t,e,r);n&&o.addComponent(n)})),delete t.components),o.created(),o}function ia(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var aa=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,r;return e=t,(r=[{key:"draw",value:function(t,e,r){var n=e.bounds,o=n.left,i=n.top,a=n.width,c=n.height;0!=a&&0!=c&&(t.beginPath(),t.rect(o,i,a,c),t.clip(),t.beginPath(),t.strokeStyle="#f26522",t.lineWidth=4,t.shadowBlur=10,t.shadowColor="black",t.shadowOffsetX=0,t.shadowOffsetY=0,t.rect(o,i,a,c),t.stroke(),t.closePath())}}])&&ia(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ca(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}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,r;return e=t,(r=[{key:"draw",value:function(t,e,r){var n=e.bounds;t.beginPath(),t.rect(n.left,n.top,n.width,n.height),t.setLineDash([3/r.x,4/r.y]),t.lineWidth=1/r.x,t.strokeStyle="black",t.stroke(),t.setLineDash([]),t.closePath()}}])&&ca(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function sa(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var fa=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,r;return e=t,r=[{key:"reset",value:function(){this.active=null}},{key:"selected",get:function(){return this.layer.selected}},{key:"contains",value:function(t,e,r,n){var o=this,i=r.controls;return!!i&&(i.every((function(i,a){return Math.abs(t-i.x)<=4/n.x&&Math.abs(e-i.y)<=4/n.y&&(o.active={component:r,index:a,handler:i.handler}),!o.active})),!!this.active)}},{key:"draw",value:function(t,e,r){var n=e.controls;n&&n.forEach((function(e,n){t.beginPath(),t.lineWidth=1/r.x,t.ellipse(e.x,e.y,4/r.x,4/r.y,0,0,2*Math.PI,!0),t.fillStyle="#ff5d72",t.fill(),t.strokeStyle="#fff",t.stroke()}))}},{key:"onevent",value:function(t,e){var r=this.active,n=r.handler,o=r.component,i=r.index,a=o.transcoordC2S(e.offsetX,e.offsetY);a=o.transcoordS2P(a.x,a.y),n&&"function"==typeof n[t]&&n[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,r=e.component,n=e.changes;Ki.after(n,r.app.commander),r.parent&&r.parent.calculateBounds&&r.parent.calculateBounds()}}],r&&sa(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function la(t,e){var r=Pt()(t.hierarchy);return delete r.id,oa(r,t.app,e)}function ha(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}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,r;return e=t,r=[{key:"reset",value:function(){this.active=null,this.created=null}},{key:"selected",get:function(){return this.layer.selected}},{key:"contains",value:function(t,e,r,n){var o=this;return!!r.mutable&&(r.path.every((function(i,a){return Math.abs(t-i.x)<=4/n.x&&Math.abs(e-i.y)<=4/n.y&&(o.active={component:r,index:a}),!o.active})),!!this.active)}},{key:"startLinkProcess",value:function(t,e,r){try{var n=oa(e,t.app);t.rootModel.addComponent(n),this.layer.selected=[n],this.active={component:n,index:1},this.ondragstart(r)}catch(t){console.warn(r)}}},{key:"draw",value:function(t,e,r){if(e.mutable&&!e.stuck){var n=e.path,o=this.active;n.forEach((function(n,i){t.beginPath(),t.ellipse(n.x,n.y,4/r.x,4/r.y,0,0,2*Math.PI,!0),t.lineWidth=1/r.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 r=e.path.slice();r.length<4||(r.splice(this.active.index,1),e.path=r)}}},{key:"onmousedown",value:function(t){this.active.toFill=!0}},{key:"ondragstart",value:function(t){var e=this.active;this.created||(e.changes=Ki.before([e.component])),0!==index&&index!==component.path.length-1||this.layer.setLinkProcess(0===index?"from":"to")}},{key:"ondragmove",value:function(t){var e,r,n=this.active,o=n.component,i=n.index,a=t.offsetX,c=t.offsetY,u=o.transcoordC2S(a,c);if(u=o.transcoordS2P(u.x,u.y),t.shiftKey){var s=o.path.length,f=o.isLine()&&0==i?o.path[1]:o.path[(i-1+s)%s];f=o.transcoordS2P(f.x,f.y);var l,h=0;s>2&&(o.isLine()?0==i?l=o.path[2]:1!=i&&(l=o.path[i-2]):l=o.path[(i-2+s)%s],l&&(h=pa(l=o.transcoordS2P(l.x,l.y),f)));var p=Math.round((pa(f,u)-h)/ya)*ya+h;u=function(t,e,r){return{x:Math.cos(e)*r+t.x,y:Math.sin(e)*r+t.y}}(f,p,(e=f,r=u,Math.sqrt((r.x-e.x)*(r.x-e.x)+(r.y-e.y)*(r.y-e.y))))}if(0===i||i===o.path.length-1){var y=this.layer.anchorTarget=o.rootModel.capture(a,c,(function(t){return t===o||t.isLine()})),d=y.transcoordC2S(a,c),v=d.x,g=d.y,b=this.layer.get("scale")||{x:1,y:1},m=(y.anchors||[]).find((function(t){return t&&Math.abs(v-t.position.x)<=8/b.x&&Math.abs(g-t.position.y)<=8/b.y}));m?0==i?o.from={component:y.get("ref"),anchor:m.name,position:u}:o.to={component:y.get("ref"),anchor:m.name,position:u}:0==i?o.from={position:u}:o.to={position:u}}o.mutatePath(null,(function(t){t[i]=u}))}},{key:"ondragend",value:function(t){var e=this.active,r=e.component,n=e.index,o=e.changes;if(0===n||n===r.path.length-1){var i=t.offsetX,a=t.offsetY,c=r.rootModel.capture(i,a,(function(t){return t===r||t.isLine()})),u=c.transcoordC2S(i,a),s=u.x,f=u.y,l=this.layer.get("scale")||{x:1,y:1},h=(c.anchors||[]).find((function(t){return t&&Math.abs(s-t.position.x)<=8/l.x&&Math.abs(f-t.position.y)<=8/l.y}));h&&(0==n?r.from={component:c.get("ref"),anchor:h.name}:r.to={component:c.get("ref"),anchor:h.name}),this.layer.endLinkProcess()}if(this.created){var p=new na({changes:[{component:this.created,to_container:this.created.parent}]});created.app.commander.execute(p)}else Ki.after(o,r.app.commander);r.parent&&r.parent.calculateBounds&&r.parent.calculateBounds()}}],r&&ha(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function va(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}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,r;return e=t,r=[{key:"reset",value:function(){this.active=null}},{key:"contains",value:function(t,e,r,n){var o,i,a=this,c=(null===(o=this.active)||void 0===o?void 0:o.component)===r&&(null===(i=this.active)||void 0===i?void 0:i.anchor);this.active=null;var u=this.layer._linking_mode;return(r.anchors||[]).filter((function(t){return"to"!==u||"inout"===t.type||"in"===t.type})).every((function(o){var i=c===o.name?2:1;return o&&o.position&&Math.abs(t-o.position.x)<=4*i/n.x&&Math.abs(e-o.position.y)<=4*i/n.y&&(a.active={component:r,anchor:o.name}),!a.active})),!!this.active}},{key:"draw",value:function(t,e,r){var n,o;if(e.get("ref")&&!e.isLine()){var i=this.active,a=(null===(n=this.active)||void 0===n?void 0:n.component)===e&&(null===(o=this.active)||void 0===o?void 0:o.anchor),c=this.layer._linking_mode;(e.anchors||[]).filter((function(t){return"to"!==c||"inout"===t.type||"in"===t.type})).forEach((function(n){var o=n.name,c=(n.type,n.position),u=a===o?2:1;c&&(t.beginPath(),t.ellipse(c.x,c.y,4*u/r.x,4*u/r.y,0,0,2*Math.PI),t.setLineDash([0,0]),t.strokeStyle="#656565",t.stroke(),t.fillStyle="#fff",i&&i.component===e&&i.anchor===o&&(t.strokeStyle="#fa7703",i.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,r=e.component,n=e.anchor,o=this.layer.transcoordC2S(t.offsetX,t.offsetY);this.layer.startLinkProcess(r,{type:"polyline",from:{component:r.get("ref"),anchor:n,position:o},to:{position:o},path:[],lineWidth:1,strokeStyle:"black",begin:"oval",beginSize:"size9",end:"arrow",endSize:"size9"},t)}},{key:"ondragmove",value:function(t){}},{key:"ondragend",value:function(t){}}],r&&va(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ba(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ma(t,e,r){var n,o,i=t.bounds,a=i.left,c=i.top,u=i.width,s=i.height;switch(e){case 0:n=a,o=c;break;case 1:n=a+u/2,o=c;break;case 2:n=a+u,o=c;break;case 3:n=a+u,o=c+s/2;break;case 4:n=a+u,o=c+s;break;case 5:n=a+u/2,o=c+s;break;case 6:n=a,o=c+s;break;case 7:n=a,o=c+s/2}var f=n,l=o,h=t.transcoordT2S(r.x,r.y);return{dx:h.x-f,dy:h.y-l}}function wa(t,e,r,n,o,i){var a=t.bounds,c=a.left,u=a.top,s=a.width,f=a.height,l={left:c,top:u,width:s,height:f};switch(e){case 0:c+=n,u+=o,s-=n,f-=o;break;case 1:u+=o,f-=o;break;case 2:u+=o,s+=n,f-=o;break;case 3:s+=n;break;case 4:s+=n,f+=o;break;case 5:f+=o;break;case 6:c+=n,s-=n,f+=o;break;case 7:c+=n,s-=n}if(t.mutateBounds((function(e){return Math.abs(s)<=.001&&(s=.001),Math.abs(f)<=.001&&(f=.001),t.adjustResize({left:c,top:u,width:s,height:f},l,r)}),this),t.isContainer()&&t.layout.ABSOLUTE&&!t.isGroup()){var h=l.left-c,p=l.top-u;i?t.components.forEach((function(t){t.delta("tx",0),t.delta("ty",0),t.move({x:h,y:p},!1)})):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 xa(t,e){var r=t.left,n=t.top,o=t.width,i=t.height,a=r+o/2,c=n+i/2,u=r+o,s=n+i,f=o*e.x>50,l=i*e.y>50;return[{x:r,y:n},f?{x:a,y:n}:null,{x:u,y:n},l?{x:u,y:c}:null,{x:u,y:s},f?{x:a,y:s}:null,{x:r,y:s},l?{x:r,y:c}:null]}var _a=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,r;return e=t,(r=[{key:"reset",value:function(){this.active=null}},{key:"selected",get:function(){return this.layer.selected}},{key:"contains",value:function(t,e,r,n){var o=this;return!!r.resizable&&(xa(r.bounds,n).every((function(i,a){return i&&Math.abs(t-i.x)<=4/n.x&&Math.abs(e-i.y)<=4/n.y&&(o.active={component:r,index:a}),!o.active})),!!this.active)}},{key:"draw",value:function(t,e,r){if(!e.isLine()){var n=e.bounds,o=n.left,i=n.top,a=n.width,c=n.height;if(t.beginPath(),t.rect(o,i,a,c),t.setLineDash([3/r.x,4/r.y]),t.lineWidth=1/r.x,t.strokeStyle="black",t.stroke(),t.setLineDash([]),e.resizable){var u=this.active;xa(e.bounds,r).forEach((function(n,o){n&&(t.beginPath(),t.rect(n.x-4/r.x,n.y-4/r.y,8/r.x,8/r.y),t.setLineDash([0,0]),t.strokeStyle="#656565",t.stroke(),t.fillStyle="#fff",u&&u.component===e&&u.index===o&&(t.strokeStyle="#fa7703",u.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,r=e.component,n=e.index,o=e.boundsList,i=e.bounds,a=this.layer.transcoordC2S(t.offsetX,t.offsetY);r.bounds=i;var c=ma(r,n,a);this.layer.selected.filter((function(t){return t.resizable})).forEach((function(e,r){e.bounds=o[r],wa(e,n,t.shiftKey,c.dx,c.dy,!1)}))}},{key:"ondragend",value:function(t){var e=this.active,r=e.component,n=e.index,o=e.boundsList,i=e.bounds,a=this.layer.transcoordC2S(t.offsetX,t.offsetY);r.bounds=i;var c=ma(r,n,a);this.layer.selected.filter((function(t){return t.resizable})).forEach((function(e,r){e.bounds=o[r],wa(e,n,t.shiftKey,c.dx,c.dy,!0)})),this.active.component.app.commander.execute(null,!1)}}])&&ba(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ka(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Oa=2*Math.PI,Sa=Math.PI/2;function Aa(t,e){var r=t.bounds;return{x:r.left+r.width/2,y:r.top-20/e.y}}var Ea=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,r;return e=t,(r=[{key:"reset",value:function(){this.active=null}},{key:"selected",get:function(){return this.layer.selected}},{key:"contains",value:function(t,e,r,n){if(!r.rotatable)return!1;var o=Aa(r,n);return Math.abs(t-o.x)<=4/n.x&&Math.abs(e-o.y)<=4/n.y&&(this.active={component:r},!0)}},{key:"draw",value:function(t,e,r){if(e.rotatable){t.beginPath();var n=Aa(e,r);t.lineWidth=1.5/r.x,t.moveTo(n.x,n.y+20/r.y),t.lineTo(n.x,n.y),t.strokeStyle="#656565",t.stroke(),t.beginPath(),t.ellipse(n.x,n.y,4/r.x,4/r.y,0,0,Oa,!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,r=e.transcoordC2S(t.offsetX,t.offsetY);r=e.transcoordS2P(r.x,r.y);var n=e.rotatePoint,o=e.get("rotation")||0,i=Math.atan((n.y-r.y)/(n.x-r.x)),a=(i=n.x>=r.x?i-Sa:Sa+i)-o;this.layer.selected.filter((function(t){return t.rotatable})).forEach((function(e,r){var n=((e.get("rotation")||0)+a)%Oa;e.set("rotation",e.adjustRotation(n,t.shiftKey))}))}},{key:"ondragend",value:function(t){var e=this.active,r=e.component;e.rotations,r.app.commander.execute(null,!1)}}])&&ka(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Pa(t){return Pa="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},Pa(t)}function ja(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ra(t,e){return Ra=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ra(t,e)}function Ma(t,e){if(e&&("object"===Pa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ta(t)}function Ta(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ia(t){return Ia=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ia(t)}var Ca=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ra(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=Ia(n);if(o){var r=Ia(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Ma(this,t)});function a(t,e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(r=i.call(this,t,e)).pathHandler=new da(Ta(r));var n=r.pathHandler,o=new fa(Ta(r)),c=new _a(Ta(r)),u=new Ea(Ta(r));return r._modelers=[n,o,c,u],r._control_mode_modelers=[o,n,c,u],r.focusOutline=new aa(Ta(r)),r.groupOutline=new ua(Ta(r)),r.anchorHandler=new ga(Ta(r)),r._reversed_modelers=r._modelers.slice().reverse(),r._control_mode_reverse_modelers=r._control_mode_modelers.slice().reverse(),r.hovered=null,r.hoveredDest=null,r}return e=a,r=[{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"),r=t.get("scale");this.set("translate",e),this.set("scale",r)}},{key:"contains",value:function(t,e){var r=this.selected.filter((function(t){return!!t.parent})),n=this.get("scale")||{x:1,y:1};if(this._state_dragging){if(this._linking_mode){var o=this.anchorTarget.transcoordT2S(t,e);if(this.anchorHandler.contains(o.x,o.y,this.anchorTarget,n))return!0}return!0}this.modelers.forEach((function(t){return t.reset()})),r=this.selected.filter((function(t){return!!t.parent}));for(var i=0;i<r.length;i++)for(var a=r[i],c=a.transcoordT2S(t,e),u=0;u<this.modelers.length;u++){var s=this.modelers[u];if(s.contains(c.x,c.y,a,n))return this.currentModeler=s,!0}if(this.anchorTarget){var f=this.anchorTarget.transcoordT2S(t,e);if(this.anchorHandler.contains(f.x,f.y,this.anchorTarget,n))return this.currentModeler=this.anchorHandler,!0}else this.anchorHandler.reset();return this.currentModeler=null,!1}},{key:"_componentDrawer",value:function(t,e,r,n){var o=[],i=e.parent;if(e.isRootModel())return t.save(),n(t,e,r),void t.restore();for(;i&&!i.isRootModel();)o.push(i),i=i.parent;t.save(),o.reverse().forEach((function(e){var r=e.rotatePoint;t.translate(r.x,r.y);var n=e.get("scale");n&&t.scale(n.x,n.y),t.rotate(e.get("rotation")),t.translate(-r.x,-r.y);var o=e.bounds;t.translate(o.left,o.top)}));var a=e.rotatePoint;t.translate(a.x,a.y);var c=e.get("scale");c&&t.scale(c.x,c.y),t.rotate(e.get("rotation")),t.translate(-a.x,-a.y),n(t,e,r),t.restore()}},{key:"prerender",value:function(t){var e=this.model,r=e.translate,n=e.scale,o=void 0===n?{x:1,y:1}:n,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(),r&&t.translate(r.x*y,r.y*y),t.scale(o.x*y,o.y*y),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 r=this.get("scale")||{x:1,y:1},n=this.selected.filter((function(t){return!!t.parent}));if(this.focused&&this._componentDrawer(t,this.focused,r,(function(t,r,n){e.focusOutline.draw(t,r,n)})),n.length>0&&n[0].parent.isGroup()){for(var o=n[0].parent;o.parent.isGroup();)o=o.parent;this._componentDrawer(t,o,r,(function(t,r,n){e.groupOutline.draw(t,r,n)}))}n.forEach((function(n){e._componentDrawer(t,n,r,(function(t,r,n){e.reversedModelers.forEach((function(e){return e.draw(t,r,n)}))}))})),this.anchorTarget&&this._componentDrawer(t,this.anchorTarget,r,(function(t,r,n){e.anchorHandler.draw(t,r,n)}))}},{key:"anchorTarget",get:function(){var t;return this.currentModeler===this.anchorHandler||this.currentModeler===this.pathHandler||null!==(t=this.hovered)&&void 0!==t&&t.isLine()||(this._anchorTarget=this.hovered),this._anchorTarget},set:function(t){this._anchorTarget=t}},{key:"hovered",get:function(){return this._hovered},set:function(t){this._hovered=t,this.invalidate()}},{key:"startLinkProcess",value:function(t,e,r){this.currentModeler=this.pathHandler,this.pathHandler.startLinkProcess(t,e,r),this.setLinkMode("from")}},{key:"setLinkMode",value:function(t){this._linking_mode=t}},{key:"endLinkProcess",value:function(){this._linking_mode=!1}},{key:"eventMap",get:function(){return{"model-layer":{"(all)":{change:this.onchange_model,wheel:this.onwheel_scale,drop:this.ondrop},"(descendant)":{mouseenter:this.onmouseenter,mouseleave:this.onmouseleave}},"(root)":{"(self)":{selected:this.onselected,keydown:this.onkeydown,keyup:this.onkeyup}}}}},{key:"onmouseenter",value:function(t,e){this.hovered=null==e?void 0:e.origin}},{key:"onmouseleave",value:function(t,e){this.hovered=null}},{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,r){r.origin===r.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:"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 r=this,n=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,r){var n=new FileReader;n.addEventListener("loadend",(function(t){e(n.result)})),["error","abort"].forEach((function(t){return n.addEventListener(t,(function(t){r(t)}))})),n.readAsDataURL(t)}))}))).then((function(e){if(t.altKey)return Ki.around(r.app.commander,(function(){n.ondropfile(o,e)})),void(r.selected=[n]);var c=[],u=e.map((function(t,e){var r,n=o[e].type,u=o[e].name;return n.startsWith("image/")?(r=oa({type:n.startsWith("image/gif")?"gif-view":"image-view",top:0,left:0,width:200,height:200,src:t},a.app),c.push(new Promise((function(e,n){var o=new Image;o.src=t,o.onload=function(){r.set({width:o.width,height:o.height}),e()},o.onerror=function(t){n(t)}})))):n.startsWith("audio/")?r=oa({type:"audio",top:0,left:0,width:100,height:100,src:t},a.app):n.startsWith("vnd.ms-excel/")||/\.xlsx?$/.test(u)?r=oa({type:"excel",top:0,left:0,width:100,height:100,src:t},a.app):console.log("droped file",o[e]),r&&(r.center=i,i.x+=50,i.y+=50),r})).filter((function(t){return t})).map((function(t){return{component:t,to_container:a}}));u.length>0&&Promise.all(c).then((function(){r.app.commander.execute(new na({changes:u})),r.selected=u.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 r=e.deliverer;if(t.shiftKey){if(-1!=navigator.userAgent.indexOf("Win"))var n=t.deltaY<0?1:-1;else n=t.deltaX<0?1:-1;Ki.around(this.app.commander,(function(){r.selected.forEach((function(t){var e=t.get("fontSize")||g.FONT_SIZE;e<1&&(e=1),e+=n,t.set("fontSize",e)}))}))}else{n=t.deltaY<0?1:-1;var o=r.get("scale")||{x:1,y:1},i=r.get("translate"),a=t.offsetX,c=t.offsetY,u=r.transcoordC2S(a,c),s=.1*n,f={x:o.x+s,y:o.y+s};if(n<0&&o.x<.2||n>0&&o.x>10)return;r.set("scale",f);var l=r.transcoordC2S(a,c);r.set("translate",{x:i.x+(l.x-u.x)*f.x,y:i.y+(l.y-u.y)*f.y})}}}}],r&&ja(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(to);function Ba(t){return Ba="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},Ba(t)}function Da(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function za(t,e){return za=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},za(t,e)}function La(t,e){if(e&&("object"===Ba(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)},Na(t)}Ir.register("modeling-layer",Ca);var Fa=210*Math.PI/180,Ua=150*Math.PI/180,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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&za(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=Na(n);if(o){var r=Na(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return La(this,t)});function a(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(r=i.call(this,t,e))._anim_alpha=1,r}return e=a,r=[{key:"_drawArrow",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,o=r.x-e.x,i=r.y-e.y,a=Math.atan2(i,o),c=r.x+n*Math.cos(a+Fa),u=r.y+n*Math.sin(a+Fa),s=r.x+n*Math.cos(a+Ua),f=r.y+n*Math.sin(a+Ua);t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(r.x,r.y),t.moveTo(r.x,r.y),t.lineTo(c,u),t.moveTo(r.x,r.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,r=this.targets&&this.targets.filter((function(t){return t.rootModel}));if(!r||0==r.length)return this._animate&&this._animate.stop(),void delete this._animate;var n=!1;r.forEach((function(r){var o=r.decotag;if(t.globalAlpha*=e._anim_alpha,o){var i=o,a=r.bounds,c=a.left,u=a.top,s=r.transcoordS2C(c,u,r.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),n=!0}t.lineWidth=2,t.strokeStyle="orange",r.mappings&&r.mappings.forEach((function(o){var i=e.root.findAll(o.target,r);i&&i.forEach((function(n){var o=r.center,i=n.center;o=r.transcoordS2C(o.x,o.y,r.rootModel),i=n.transcoordS2C(i.x,i.y,n.rootModel),e._drawArrow(t,o,i)})),n=!0}))})),n&&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:"onmouseenter",value:function(t,e){this._decotagreset(),this._ondecotag(e.origin)}},{key:"onmouseleave",value:function(t,e){this._decotagreset()}},{key:"eventMap",get:function(){return{"model-layer":{"(descendant)":{tag:this.ondecotag,tagreset:this.ondecotagreset,mouseenter:this.onmouseenter,mouseleave:this.onmouseleave}}}}},{key:"ondecotagreset",value:function(t,e){this._decotagreset()}},{key:"ondecotag",value:function(t,e){this._ondecotag(e.origin)}},{key:"offdecotag",value:function(t,e){this._offdecotag(e.origin)}},{key:"_ondecotag",value:function(t){this.targets&&-1!==this.targets.lastIndexOf(t)||(this.targets=(this.targets||[]).concat(t))}},{key:"_offdecotag",value:function(t){if(this.targets){var e=this.targets.slice();e.splice(this.targets.lastIndexOf(t),1),this.targets=e}}},{key:"_decotagreset",value:function(){this.targets=[]}}],r&&Da(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(to);Ir.register("decotag-layer",Ha),Ir.register("tag-layer",Ha);var Ga=13.3;function Ya(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Wa="$base_url",Va=Math.PI/12,Xa=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._mode=e,this.screen=function(t){return void 0!==t&&(Ga=t),Ga}(),this._baseUrl="undefined"!=typeof window?window.location.origin:null,this._refProvider=r,this.isEditMode&&(this._rotateStep=Va,this._rotateStepForced=!1)}var e,r;return e=t,(r=[{key:"dispose",value:function(){this._dataSubscriptionProvider&&this._dataSubscriptionProvider.dispose()}},{key:"_calcScreen",value:function(){var t={width:screen.width,height:screen.height};this._PPI=function(t,e,r,n){t>0||(t=1),e>0||(e=1),n||(n="d");var o=("d"==n?Math.sqrt(t*t+e*e):"w"==n?t:e)/r;return o>0?Math.round(o):0}(t.width,t.height,this.screen),this._PPM=this._PPI/25.4}},{key:"subscribe",value:function(t,e){var r;return null===(r=this._dataSubscriptionProvider)||void 0===r?void 0:r.subscribe(t,e)}},{key:"refProvider",get:function(){return this._refProvider}},{key:"dataSubscriptionProvider",get:function(){return this._dataSubscriptionProvider},set:function(t){this._dataSubscriptionProvider=t}},{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 y}},{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==s}},{key:"isEditMode",get:function(){return this._mode==f}},{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(Wa)?new URL(t.replace(Wa,this.baseUrl),this.baseUrl):new URL(t,location.origin)).href}catch(e){me(e,t)}}},{key:"rotateStep",get:function(){return this._rotateStep},set:function(t){this._rotateStep=Number(t)||Va}},{key:"rotateStepForced",get:function(){return this._rotateStepForced},set:function(t){this._rotateStepForced=!!t}}])&&Ya(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function qa(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ka(t,e,r,n,o){for(var i in r){var a=r[i];if(Ae(i,n.origin,0,t))for(var c in a){var u=a[c];c==n.name&&(n.listener=e,u.apply(e,o))}}}function Qa(){var t=arguments,e=t[t.length-1],r=this.event_pump;r.listeners.forEach((function(n){Ka(r.deliverer,n.listener,n.cloned_handlers,e,t)}))}ye(Xa.prototype,pe.withEvent);var Ja=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,r;return e=t,r=[{key:"start",value:function(){this.deliverer.on("(all)",Qa,{event_pump:this})}},{key:"stop",value:function(){this.deliverer.off("(all)",Qa)}},{key:"on",value:function(t,e){var r=Object.assign({},e);Object.keys(r).forEach((function(e){if(0==e.indexOf("?")){var n=r[e],o=e.substr(1),i=t.get(o);delete r[e],i?r[i]=n:me("EventPump#on","variable #{selector} is not evaluated on listener")}})),this.listeners.push({listener:t,handlers:e,cloned_handlers:r})}},{key:"off",value:function(t,e){for(var r=0;r<this.listeners.length;r++){var n=this.listeners[r];n.listener!==t||e&&n.handlers!==e||this.listeners.splice(r,1)}}},{key:"clear",value:function(){this.listeners=[]}},{key:"dispose",value:function(){this.stop(),this.clear()}}],r&&qa(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Za(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var $a=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,r;return e=t,r=[{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 r=this;if(this.root){var n=function(n){var o=e[n];if("(self)"===n&&void 0===t.on)throw new Error("(self) selector not available when deliverer is not a event handlable object.");je(n,r.root,t).forEach((function(n){var i=new Ja(n);i.on(t,o),i.start(),r.eventMaps.push({eventPump:i,listener:t,handlerMap:e,deliverer:n})}))};for(var o in e)n(o)}}},{key:"remove",value:function(t,e){for(var r=this.eventMaps.slice(0),n=0;n<r.length;n++){var o=r[n];o.listener!==t||e&&o.handlerMap!==e||(this.eventMaps.splice(n,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()}}],r&&Za(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function tc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ec(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function rc(t,e,r){return e&&ec(t.prototype,e),r&&ec(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var nc={},oc=0,ic=function(){function t(e){tc(this,t),this._type=e.type,this._ctrlKey=e.ctrlKey,this._altKey=e.altKey,this._shiftKey=e.shiftKey,this._metaKey=e.metaKey;var r=function(t){if(t.touches){var e=t.touches[0];if(!e)return nc;var r=e.target.getBoundingClientRect();return nc={x:t.offsetX||e.clientX-(r.x||r.left),y:t.offsetY||e.clientY-(r.y||r.top)}}return{x:t.offsetX,y:t.offsetY}}(e);if(this._offsetX=r.x,this._offsetY=r.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 n=function(t){var e,r,n=0,o=0;if(1===t.touches.length)return 0;Array.from(t.touches).forEach((function(t){e=null!=e?Math.min(t.screenX,e):t.screenX,n=Math.max(t.screenX,n),r=null!=r?Math.min(t.screenY,r):t.screenY,o=Math.max(t.screenY,o)}));var i=n-e||0,a=o-r||0;return Math.sqrt(Math.pow(i,2)+Math.pow(a,2))||0}(e);oc>0&&(this._scale=n/oc),oc=n}}return rc(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 ac(t,e){return t.capture(e.offsetX,e.offsetY)}function cc(t,e,r){if(t&&t.app&&(!t.app.isViewMode||!t.hidden)){(r=new ic(r)).type=e;var n="on"+e;t[n]&&t[n](r),r.isPropagationStopped()||t.trigger(e,r)}}var uc=function(){function t(e,r){var n=this;tc(this,t),this.container=e,this.html_element=r,this.status=0,this.last_target=null,this.gesture_handlers=d.map((function(t){return n.gestureHandlerBuilder(t)})),this.keyevent_handlers=v.map((function(t){return n.keyeventHandlerBuilder(t)})),d.forEach((function(t,e){return r.addEventListener(t,n.gesture_handlers[e])})),v.forEach((function(t,e){return r.addEventListener(t,n.keyevent_handlers[e])})),r.ondragover=this.gestureHandlerBuilder("dragover"),r.ondrop=this.gestureHandlerBuilder("drop"),r.tabIndex=1}return rc(t,[{key:"dispose",value:function(){var t=this;this.last_enter_target&&cc(this.last_enter_target,"mouseleave",new CustomEvent("mouseleave")),d.forEach((function(e,r){return t.html_element.removeEventListener(e,t.gesture_handlers[r])})),v.forEach((function(e,r){return t.html_element.removeEventListener(e,t.keyevent_handlers[r])})),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 ic(t))&&t.preventDefault(),!1}}},{key:"keyeventHandlerBuilder",value:function(t){return this["on".concat(t)].bind(this)}},{key:"ondragover",value:function(t){return cc(ac(this.container,t),t.type,t),!1}},{key:"ondrop",value:function(t){return cc(ac(this.container,t),t.type,t),!1}},{key:"onclick",value:function(t){return cc(ac(this.container,t),t.type,t),this.last_target=null,!1}},{key:"ondblclick",value:function(t){return cc(ac(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 1:var e=t.offsetX-this.__dragstart_e.offsetX,r=t.offsetY-this.__dragstart_e.offsetY;if(e*e+r*r<16)break;this.status=2,cc(this.last_target,"dragstart",this.__dragstart_e),this.__dragmove_e=t,cc(this.last_target,"dragmove",t);break;case 2:this.__dragmove_e=t,cc(this.last_target,"dragmove",t);break;default:var n=ac(this.container,t);this.last_enter_target!==n&&(this.last_enter_target&&cc(this.last_enter_target,"mouseleave",t),n&&cc(n,"mouseenter",t),this.last_enter_target=n),cc(n,t.type,t),this.last_target=n}return!1}},{key:"onmousedown",value:function(t){if(2===this.status)cc(this.last_target,"dragend",t),this.last_target=null,this.status=0;else{var e=ac(this.container,t);this.last_target=e,this.status=1,this.__dragstart_e=t,cc(e,t.type,t)}return!1}},{key:"onmouseup",value:function(t){return 2===this.status?cc(this.last_target,"dragend",t):cc(ac(this.container,t),t.type,t),this.last_target=null,this.status=0,!1}},{key:"onmouseout",value:function(t){var e=ac(this.container,t);if(2===this.status)cc(this.last_target,"dragend",t);else{if(this.last_target&&this.last_target===e)return;this.last_enter_target&&(cc(this.last_enter_target,"mouseleave",t),delete this.last_enter_target)}return this.last_target=null,this.status=0,!1}},{key:"ontouchstart",value:function(t){var e=this,r=ac(this.container,t);return this.last_target=r,this.status=1,this.touchPoints||(this.touchPoints=[]),this.touchPoints.push(t.changedTouches[0]),this.holdTimer=setTimeout((function(){e.status=0,cc(e.last_target,"hold",t),delete e.holdTimer}),500),cc(r,t.type,t),!1}},{key:"ontouchmove",value:function(t){var e=this;if(!t.touches||!t.changedTouches)return cc(this.last_target,"dragstart",t),cc(this.last_target,"dragmove",t),!1;var r=ac(this.container,t);switch(this.status){case 1:Array.from(t.changedTouches).forEach((function(t){var r=e.touchPoints.find((function(e){return e.identifier===t.identifier}));if(r){var n=r.clientX-t.clientX,o=r.clientY-t.clientY;return Math.sqrt(Math.pow(n,2)+Math.pow(o,2))>=16?(e.status=2,void(e.holdTimer&&(clearTimeout(e.holdTimer),delete e.holdTimer))):void 0}}));break;case 2: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 cc(this.last_target,"pinch",t),!1;cc(this.last_target,"pan",t),r=this.last_target;break;default:this.last_enter_target!==r&&(this.last_enter_target&&cc(this.last_enter_target,"mouseleave",t),r&&cc(r,"mouseenter",t),this.last_enter_target=r),this.last_target=r}return cc(r,"touchmove",t),!1}},{key:"ontouchend",value:function(t){var e=ac(this.container,t);switch(this.status){case 2:e=this.last_target;break;case 1:var r=performance.now(),n=r-this.touchedAt;this.holdTimer&&(clearTimeout(this.holdTimer),delete this.holdTimer,cc(e,n<500?"doubletap":"tap",t),this.touchedAt=r)}cc(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=0,!1}},{key:"onwheel",value:function(t){return cc(ac(this.container,t),t.type,t),!1}}]),t}(),sc={};const fc={register:function(t,e){sc[t]=e},unregister:function(t){delete sc[t]},get:function(t){return sc[t]}};function lc(t){if(t.hasTextProperty&&!t.textHidden){var e=t.model,r=e.text,n=void 0===r?"":r,o=(e.rotation,e.bold),i=void 0===o?g.BOLD:o,a=e.italic,c=void 0===a?g.ITALIC:a,u=e.textWrap,s=void 0===u?g.TEXT_WRAP:u,f=e.fontFamily,l=void 0===f?g.FONT_FAMILY:f,h=e.fontColor,p=void 0===h?g.FONT_COLOR:h,y=e.textAlign,v=void 0===y?g.TEXT_ALIGN:y,b=e.textBaseline,m=void 0===b?g.TEXT_BASELINE:b,w=e.paddingTop,x=void 0===w?0:w,_=e.paddingBottom,k=void 0===_?0:_,O=e.paddingLeft,S=void 0===O?0:O,A=e.paddingRight,E=void 0===A?0:A,P=e.fontSize,j=void 0===P?g.FONT_SIZE:P,R=e.lineHeight,M=void 0===R?1.2*j:R,T=t.bounds,I=T.left,C=T.top,B=T.width,D=T.height;t.textHidden=!0;var z=document.createElement("textarea");d.forEach((function(t){z.addEventListener(t,(function(t){t.stopPropagation()}),!0)}));var L=t.transcoordS2C(I,C),N=function(t){for(var e=0,r=1,n=t;n;){e+=n.get("rotation")||0;var o=n.get("scale")||{x:1,y:1},i=o.x,a=o.y;r*=Math.max(i,a)||1,n=n.parent}return{rotation:e,scale:r}}(t),F=N.rotation,U=N.scale,H=B-S-E,G=H,Y=D-x-k;switch(z.style.position="absolute",z.style.width=G+"px",z.style.height=Y+"px",z.style.paddingLeft=Math.max(S,0)+"px",z.style.paddingRight=E+"px",z.style.paddingTop=Math.max(x,0)+"px",z.style.paddingBottom=k+"px",z.value=n,z.style.fontFamily=l,z.style.fontSize=j+"px",z.style.lineHeight=M+"px",z.style.overflow="hidden",z.style.resize="none",z.style.outline="none",z.style.border=0,z.style.backgroundColor="transparent",z.style.display="inline-block",z.style.color=p,i&&(z.style.fontWeight="bold"),c&&(z.style.fontStyle="italic"),v){case"right":case"end":z.style.textAlign="right";break;case"justify":z.style.textAlign="justify";break;case"left":case"start":z.style.textAlign="left";break;default:z.style.textAlign="center"}var W=[i,c,j+"px",l].filter((function(t){return!!t})).join(" ");Q(n);var V=t.root.target_element;V.appendChild(z),z.select();var X,q=!1;z.addEventListener("keydown",(function(t){t.stopPropagation(),"Escape"!=t.code&&(t.shiftKey||"Enter"!=t.code&&"NumpadEnter"!=t.code)?setTimeout((function(){Q(z.value)})):(q=X.skipUpdate="Escape"==t.code,document.createEvent?z.dispatchEvent(X):z.fireEvent(X.eventType,X))})),document.createEvent?(X=document.createEvent("HTMLEvents")).initEvent("blur",!0,!1):(X=document.createEventObject()).eventType="blur";var K=t.root.selected;z.addEventListener("blur",(function e(r){t.root.selected=K,t.textHidden=!1,z.removeEventListener("blur",e,!1),z.parentElement&&z.parentElement.removeChild(z),V.focus(),r.skipUpdate||q||t.app.commander.execute(new Ki({changes:[{component:t,before:{text:n},after:{text:z.value}}]}))}),!1)}function Q(e){var r={left:0,top:0},n=M*function(t,e,r,n){var o,i=t.getContext();return i.save(),i.font=r,o=tr(i,e,n,t.get("textWrap")).length,i.restore(),o}(t,e,W,H);switch(z.style.height=n+"px",m){case"top":case"hanging":break;case"bottom":case"alphabetic":r.top=Y-n;break;default:r.top=Y/2-n/2}if(!s){var o=function(t,e,r,n){var o=e.split("\n"),i=n,a=t.getContext();return a.save(),a.font=r,o.forEach((function(t){var e=a.measureText(t).width;e>i&&(i=e)})),a.restore(),i}(t,e,W,H);switch(z.style.width=o+"px",v){case"right":case"end":r.left=H-o;break;case"left":case"start":break;default:r.left=(H-o)/2}}z.style.marginLeft=r.left+"px",z.style.marginTop=r.top+"px";var i="translate(".concat(L.x,"px, ").concat(L.y,"px) scale(").concat(U,") rotate(").concat(F,"rad) perspective(1px)");["-webkit-","-moz-","-ms-","-o-",""].forEach((function(t){z.style[t+"transform"]=i,z.style[t+"transform-origin"]="".concat(-r.left,"px ").concat(-r.top,"px")}))}}fc.register("text-editor",{"(root)":{"(self)":{keydown:function(t,e){e.origin;var r=e.deliverer.selected;return!(1!==r.length||!r[0].hasTextProperty||"Enter"!=t.code&&"NumpadEnter"!=t.code||(lc(r[0]),t.preventDefault(),0))}}},"model-layer":{"(descendant)":{dblclick:function(t,e){lc(e.origin)}}}});var hc=Rt()((function(t,e,r){if(r)t.focused=null;else{var n=[];e[0].parent.isGroup()?t.focused=e[0].parent:(e.forEach((function(t){t.path.forEach((function(e){n.push(t.transcoordS2T(e.x,e.y))}))})),t.focused=t.capturePath(n,e))}}),300);function pc(t){return pc="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},pc(t)}function yc(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function dc(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){yc(i,n,o,a,c,"next",t)}function c(t){yc(i,n,o,a,c,"throw",t)}a(void 0)}))}}function vc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function gc(){return gc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=bc(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},gc.apply(this,arguments)}function bc(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_c(t)););return t}function mc(t,e){return mc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},mc(t,e)}function wc(t,e){if(e&&("object"===pc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return xc(t)}function xc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _c(t){return _c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_c(t)}fc.register("move-handler",{"model-layer":{"(descendant)":{dragstart:function(t,e){var r=e.origin,n=e.deliverer;if(!r.stuck){var o=n.selected,i=n.selected.filter((function(t){return!t.stuck}));if(o.length!==i.length&&(o=n.selected=i),0!=o.length){var a=o[0].transcoordC2S(t.offsetX,t.offsetY);if(a=o[0].transcoordS2P(a.x,a.y),this.last_pos=a,this.direction=0,n.focused=o[0].parent,t.altKey){var c=[],u=new Map;n.selected.filter((function(t){return!t.isRootModel()})).map((function(t){var e=la(t,(function(t){var e=n.root.getNewRef();return void 0!==t&&u.set(t,e),e}));return c.push({component:e,to_container:t.parent}),e})).map((function(t){return t.replaceRefs(u),t})),c.forEach((function(t){var e=t.component;t.to_container.addComponent(e)})),this.duplicates=n.selected.map((function(t){return{component:t}}))}else this.changes=Ki.before(o)}}},dragmove:function(t,e){var r=e.origin,n=e.deliverer;if(!r.stuck){var o=n.selected;if(0!=o.length){var i=o[0].transcoordC2S(t.offsetX,t.offsetY),a=i.x,c=i.y,u=o[0].transcoordS2P(a,c);t.shiftKey?2==this.direction&&(this.direction=0):this.direction=2;var s=u.x-this.last_pos.x,f=u.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},1===o.length)})),this.last_pos=u,hc(n,o)}}},dragend:function(t,e){var r=e.origin,n=e.deliverer;if(!r.stuck){var o=n.selected;if(0!=o.length){var i=r.parent,a=n.focused||e.deliverer;if(this.changes&&!a.isGroup())if(a&&a!==i){var c=this.changes.map((function(t){var e=t.component;return t.before,{component:e,to_container:a}}));n.app.commander.execute(new na({changes:c}))}else Ki.after(this.changes,n.app.commander);else if(this.duplicates){this.duplicates=this.duplicates.map((function(t){return t.to_container=a,t}));var u=new na({changes:this.duplicates});n.app.commander.execute(u)}o.forEach((function(t){t.parent&&t.parent.calculateBounds&&t.parent.calculateBounds()})),this.last_pos=null,this.changes=null,this.duplicates=null,hc(n,o,!0)}}}}},"(root)":{"(self)":{keydown:function(t,e){var r=e.origin,n=e.deliverer,o={},i=t.shiftKey?r.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=n.selected;Ki.around(n.app.commander,(function(){a.forEach((function(t){!t.stuck&&t.move(o,!1)}))}))}}}});var kc=[];"undefined"!=typeof window&&window.addEventListener("resize",(function(){kc.forEach((function(t){t.resize()}))}));var Oc=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mc(t,e)}(u,t);var e,r,n,o,i,a,c=(i=u,a=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}}(),function(){var t,e=_c(i);if(a){var r=_c(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return wc(this,t)});function u(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(r=c.call(this,Object.assign({type:"root",scale:{x:1,y:1}},t||{}),e))._maxRef=0,t=t||{},r.fitMode=t.model&&t.model.fitMode,r._app=e,r.target_element=t.target_element,r.rebuildContentModel(r.model.model),kc.push(xc(r)),r}return e=u,r=[{key:"dispose",value:function(){this._app&&this._app.dispose(),gc(_c(u.prototype),"dispose",this).call(this),this._disposeAllResources(),this.target_element=null,delete this._refresh_mapping_debouncer,T(this);var t=kc.indexOf(this);t>=0&&kc.splice(t,1),this.refIndexMap.clear(),this._maxRef=0}},{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 uc(this,t)),this.forEach((function(e){return e.target=t})),this._target_element=t}},{key:"unitScale",get:function(){switch(this.model_layer&&this.model_layer.get("unit")){case"mm":case"cm":case"in":return this.app.PPM/10;default:return 1}}},{key:"addTemplate",value:function(t,e){var r=this.templateMap[t];r&&be("Template replaced (duplicated)",t,e,r),this.templateMap[t]=e,delete this.templatePrefixes}},{key:"removeTemplate",value:function(t,e){var r=this.templateMap[t];r!==e?me("Removing template failed (different)",t,e,r):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 r=this.indexMap[t];r&&be("Index replaced (duplicated)",t,e,r),this.indexMap[t]=e}},{key:"removeIndex",value:function(t,e){var r=this.indexMap[t];r!==e?me("Removing index failed (different)",t,e,r):delete this.indexMap[t]}},{key:"addRefIndex",value:function(t,e){void 0===t&&(t=this.getNewRef(),e.set("ref",t)),this._maxRef=Math.max(t,this._maxRef);var r=this.refIndexMap.get(t);r&&be("Ref Index replaced (has not to be)",t,e,r),this.refIndexMap.set(t,e)}},{key:"removeRefIndex",value:function(t,e){var r=this.refIndexMap.get(t);r!==e?be("Ref Removing index failed (has not to be)",t,e,r):this.refIndexMap.delete(t)}},{key:"getNewRef",value:function(){return this._maxRef=(this._maxRef||0)+1,this._maxRef}},{key:"subscribe",value:(o=dc(regeneratorRuntime.mark((function t(e,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(this._app.isViewMode&&e&&this._app)){t.next=4;break}return t.next=3,this._app.subscribe(e,r);case 3:r._subscription=t.sent;case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return o.apply(this,arguments)})},{key:"unsubscribe",value:(n=dc(regeneratorRuntime.mark((function t(e,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r._subscription){t.next=4;break}return t.next=3,r._subscription.unsubscribe();case 3:delete r._subscription;case 4:case"end":return t.stop()}}),t)}))),function(t,e){return n.apply(this,arguments)})},{key:"findById",value:function(t){return this.indexMap[t]}},{key:"findByRef",value:function(t){return this.refIndexMap.get(t)}},{key:"findOrCreate",value:function(t){var e=this.indexMap[t];if(!e){var r=this.findTemplateFor(t);r&&(e=oa(Object.assign(Pt()(r.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.refIndexMap=new Map,this.templateMap={}}},{key:"rebuildContentModel",value:function(t){var e=this;this._disposeAllResources(),this.eventEngine=new $a(this),(t=t||{}).type="model-layer",this.model_layer=oa(t,this.app),this.addComponent(this.model_layer),this.model_layer.target=this.target_element,this.assist_layers=(this.model.layers||[]).map((function(t){var r=oa(t,e.app);return e.addComponent(r),r.target=e.target_element,r})),this.assist_handlers=(this.model.handlers||[]).map((function(t){var r={};return e.eventEngine.add(r,fc.get(t)),r})),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 r=this.findOrCreate(e);r&&(r.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=Rt()((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 r=t.model,n=r.id,o=r.ref,i=r.tag,a=r.templatePrefix;this.addRefIndex(o,t),n&&this.addIndex(n,t),i&&this.subscribe(i,t),a&&this.addTemplate(a,t);var c=Nt({},t.eventMap,t.model.eventMap);this.eventEngine.add(t,c)}},{key:"_removeTraverse",value:function(t){var e=this;t.components&&t.components.forEach((function(t){return e._removeTraverse(t)}));var r=t.model,n=r.id,o=r.ref,i=r.tag,a=r.templatePrefix;this.removeRefIndex(o,t),n&&this.removeIndex(n,t),i&&this.unsubscribe(i,t),a&&this.removeTemplate(a,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,r){e.templatePrefix&&this.removeTemplate(e.templatePrefix,r.origin),t.templatePrefix&&this.addTemplate(t.templatePrefix,r.origin),e.id&&this.removeIndex(e.id,r.origin),t.id&&this.addIndex(t.id,r.origin),e.tag&&this.unsubscribe(e.tag,r.origin),t.tag&&this.subscribe(t.tag,r.origin),e.id==t.id&&e.class==t.class||this.refreshMappings()}}],r&&vc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),u}(Vn);Object.assign(Oc.prototype,{fit:function(t){var e=this.model_layer.model,r=e.width,n=e.height,o=e.fitMode,i=this.target_element,a=this.model_layer;if(this.fitMode=t||this.fitMode||o||"ratio",r&&n&&i&&i.offsetWidth&&i.offsetHeight){switch(this.fitMode){case"center":!function(t,e,r){var n=t.unitScale,o=e.model,i=o.width,a=o.height;e.set("scale",{x:n,y:n}),e.set("translate",{x:Math.max((r.offsetWidth-i*n)/2,0),y:Math.max((r.offsetHeight-a*n)/2,0)})}(this,a,i);break;case"both":!function(t,e,r){var n=e.model,o=n.width,i=n.height,a=r.offsetWidth,c=r.offsetHeight;e.set("scale",{x:a/o,y:c/i}),e.set("translate",{x:0,y:0})}(0,a,i);break;case"width":!function(t,e,r){var n=r.offsetWidth/e.get("width");e.set("scale",{x:n,y:n}),e.set("translate",{x:0,y:0})}(0,a,i);break;case"height":!function(t,e,r){var n=r.offsetHeight/e.get("height");e.set("scale",{x:n,y:n}),e.set("translate",{x:0,y:0})}(0,a,i);break;case"ratio":!function(t,e,r){var n=e.model,o=n.width,i=n.height,a=r.offsetWidth,c=r.offsetHeight,u=a/o,s=c/i,f=Math.min(u,s);e.set("scale",{x:f,y:f}),e.set("translate",{x:(a-o*f)/2,y:(c-i*f)/2})}(0,a,i);break;default:!function(t,e,r){var n=t.unitScale;e.set("scale",{x:n,y:n}),e.set("translate",{x:0,y:0})}(this,a)}this.resize()}}}),Ir.memoize(Oc.prototype,"unitScale",!1);var Sc="left",Ac="right",Ec="center",Pc="bottom",jc="middle",Rc=[Sc,Ac,Ec,"top",jc,Pc];function Mc(t){if(-1!=Rc.indexOf(t)){var e=this.selected.filter((function(t){return!t.stuck}));if(!(e.length<=1)){var r=this.app.commander;Ki.around(r,(function(){!function(t,e){for(var r=JSON.parse(JSON.stringify(e[0].bounds)),n=r.left+r.width,o=r.top+r.height,i=0;i<e.length;i++){var a=e[i].bounds;r.left=a.left>r.left?r.left:a.left,r.top=a.top>r.top?r.top:a.top,n=a.left+a.width>n?a.left+a.width:n,o=a.top+a.height>o?a.top+a.height:o}switch(r.width=n-r.left,r.height=o-r.top,t){case Sc:for(var c=0;c<e.length;c++){var u=e[c].bounds;e[c].bounds={left:r.left,top:u.top,width:u.width,height:u.height}}break;case Ec:for(var s=0;s<e.length;s++){var f=e[s].bounds;e[s].bounds={left:r.left+r.width/2-f.width/2,top:f.top,width:f.width,height:f.height}}break;case Ac:for(var l=0;l<e.length;l++){var h=e[l].bounds;e[l].bounds={left:n-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:r.top,width:y.width,height:y.height}}break;case jc:for(var d=0;d<e.length;d++){var v=e[d].bounds;e[d].bounds={left:v.left,top:r.top+r.height/2-v.height/2,width:v.width,height:v.height}}break;case Pc:for(var g=0;g<e.length;g++){var b=e[g].bounds;e[g].bounds={left:b.left,top:o-b.height,width:b.width,height:b.height}}}}(t,e)}))}}}var Tc="VERTICAL",Ic=[Tc,"HORIZONTAL"];function Cc(t){if(-1!=Ic.indexOf(t)){var e=this.selected;if(!(e.length<=1)){var r=this.app.commander;Ki.around(r,(function(){!function(t,e){var r=e.filter((function(t){return!t.stuck})).slice(0);r.sort((function(e,r){var n=e.center,o=r.center;return t===Tc?n.y-o.y:n.x-o.x}));for(var n=r.reduce((function(e,r){return e+(t===Tc?r.bounds.height:r.bounds.width)}),0),o=r[0].bounds,i=r[r.length-1].bounds,a=((t===Tc?i.top+i.height-o.top:i.left+i.width-o.left)-n)/(r.length-1),c=t===Tc?o.top+o.height:o.left+o.width,u=1;u<r.length-1;u++){var s=r[u],f=s.bounds;c+=a,t===Tc?(f.top=c,c+=f.height):(f.left=c,c+=f.width),s.bounds=f}}(t,e)}))}}}function Bc(t,e,r){this.app.commander.execute(new na({changes:[{component:t,to_container:e,to_index:r}]}))}function Dc(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 r,n=e[0].parent;if("forward"==t){var o=n.indexOf(e[0]);r=[{component:e[0],from_container:n,to_container:n,from_index:o,to_index:o+1}]}else if("backward"==t){var i=n.indexOf(e[0]);r=[{component:e[0],from_container:n,to_container:n,from_index:i,to_index:i-1}]}else r=e.filter((function(t){return t.parent===n})).sort((function(e,r){var o=n.indexOf(e)<n.indexOf(r);return"front"==t?o:!o})).map((function(e,r){return n.indexOf(e),{component:e,to_container:n,to_index:"front"==t?n.components.length-r-1:r}}));var a=new na({changes:r});this.app.commander.execute(a)}}function zc(t,e,r){var n=this;t instanceof Array||(t=[t]),r||(r=this.model_layer);var o=[],i=new Map;this.selected=t.map((function(t){try{return delete t.id,oa(t,r.app,(function(t){var e=n.getNewRef();return void 0!==t&&i.set(t,e),e}))}catch(t){return console.warn(t),!1}})).filter((function(t){return!!t})).map((function(t){var n=e.left,a=e.top,c=e.width,u=e.height,s=e.x,f=e.y,l=e.cx,h=e.cy;return t.replaceRefs(i),isNaN(n)||isNaN(a)||isNaN(c)||isNaN(u)||(t.bounds={left:n,top:a,width:c,height:u}),isNaN(s)||isNaN(f)||t.move({x:s,y:f},!1),isNaN(l)||isNaN(h)||(t.center={x:l,y:h}),o.push({component:t,to_container:r}),t})),this.app.commander.execute(new na({changes:o}))}function Lc(){var t=this,e=[],r=new Map;if(this.selected=this.selected.filter((function(t){return!t.isRootModel()})).map((function(n){var o=la(n,(function(e){var n=t.getNewRef();return void 0!==e&&r.set(e,n),n}));return o.move({x:20,y:20},!1),e.push({component:o,to_container:n.parent}),o})).map((function(t){return t.replaceRefs(r),t})),0!=e.length){var n=new na({changes:e});this.app.commander.execute(n)}}function Nc(){var t=this.selected;this.selected=[];for(var e=null,r=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}})),n=function(){var t=[];if(e.components.filter((function(t){return!r.find((function(e){return e.component===t}))})).forEach((function(e){return t.push(e)})),t.length>1)return"break";var n=e.parent;t.forEach((function(t){return r.push({component:t,to_container:n})})),r.push({component:e,to_container:null}),e=n};e&&e.isGroup()&&"break"!==n(););r.length>0&&this.app.commander.execute(new na({changes:r})),e&&e.calculateBounds&&e.calculateBounds()}function Fc(t,e,r){switch(t){case"execute":case"redo":case"undo":case"command-reset":this.app.commander.on(t,e,r);break;case"selected":default:this.on(t,e,r);break;case"mode":this.app.on(t,e,r)}}function Uc(t,e,r){switch(t){case"execute":case"redo":case"undo":case"command-reset":this.app.commander.once(t,e,r);break;case"selected":default:this.once(t,e,r);break;case"mode":this.app.once(t,e,r)}}function Hc(t,e,r){switch(t){case"execute":case"redo":case"undo":case"command-reset":this.app?this.app.commander.off(t,e,r):this.off(t,e,r);break;case"selected":default:this.off(t,e,r);break;case"mode":this.app.off(t,e,r)}}function Gc(t){var e=this.target_element,r=t||this.fitMode,n=this;function o(t){n.fit(r),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 Yc=0;function Wc(){var t=this.selected.filter((function(t){return!t.isRootModel()})).map((function(t){return t.hierarchy}));if(0!=t.length)return Yc=0,JSON.stringify(t,null,2)}function Vc(){Yc=0;var t=Wc.call(this);return Nc.call(this),t}function Xc(t){if(t)try{JSON.parse(t),Yc++,zc.call(this,JSON.parse(t),{x:15*Yc,y:15*Yc})}catch(e){be(e,t)}}var qc=function(){return{escape:function(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:t,mimeType:function(e){var r,n;return(r="application/font-woff",n="image/jpeg",{woff:r,woff2:r,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:n,jpeg:n,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[t(e).toLowerCase()]||""},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 r=window.atob(t.toDataURL().split(",")[1]),n=r.length,o=new Uint8Array(n),i=0;i<n;i++)o[i]=r.charCodeAt(i);e(new Blob([o],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var r=document.implementation.createHTMLDocument(),n=r.createElement("base");r.head.appendChild(n);var o=r.createElement("a");return r.body.appendChild(o),n.href=e,o.href=t,o.href},getAndEncode:function(t){return ou.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime()),new Promise((function(e){var r,n=new XMLHttpRequest;if(n.onreadystatechange=function(){if(4===n.readyState)if(200===n.status){var o=new FileReader;o.onloadend=function(){var t=o.result.split(/,/)[1];e(t)},o.readAsDataURL(n.response)}else r?e(r):i("cannot fetch resource: "+t+", status: "+n.status)},n.ontimeout=function(){r?e(r):i("timeout of 30000ms occured while fetching resource: "+t)},n.responseType="blob",n.timeout=3e4,n.open("GET",t,!0),n.send(),ou.impl.options.imagePlaceholder){var o=ou.impl.options.imagePlaceholder.split(/,/);o&&o[1]&&(r=o[1])}function i(t){console.error(t),e("")}}))},uid:function(){var t=0;return 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(r){setTimeout((function(){r(e)}),t)}))}},asArray:function(t){for(var e=[],r=t.length,n=0;n<r;n++)e.push(t[n]);return e},escapeXhtml:function(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(t){return new Promise((function(e,r){var n=new Image;n.onload=function(){e(n)},n.onerror=r,n.src=t}))},width:function(t){var r=e(t,"border-left-width"),n=e(t,"border-right-width");return t.scrollWidth+r+n},height:function(t){var r=e(t,"border-top-width"),n=e(t,"border-bottom-width");return t.scrollHeight+r+n}};function t(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function e(t,e){var r=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(r.replace("px",""))}}(),Kc=function(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(t,o,i){return e(t)?Promise.resolve(t).then(r).then((function(e){var r=Promise.resolve(t);return e.forEach((function(t){r=r.then((function(e){return n(e,t,o,i)}))})),r})):Promise.resolve(t)},shouldProcess:e,impl:{readUrls:r,inline:n}};function e(e){return-1!==e.search(t)}function r(e){for(var r,n=[];null!==(r=t.exec(e));)n.push(r[1]);return n.filter((function(t){return!qc.isDataUrl(t)}))}function n(t,e,r,n){return Promise.resolve(e).then((function(t){return r?qc.resolveUrl(t,r):t})).then(n||qc.getAndEncode).then((function(t){return qc.dataAsUrl(t,qc.mimeType(e))})).then((function(r){return t.replace(function(t){return new RegExp("(url\\(['\"]?)("+qc.escape(t)+")(['\"]?\\))","g")}(e),"$1"+r+"$3")}))}}(),Qc=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(qc.asArray(document.styleSheets)).then((function(t){var e=[];return t.forEach((function(t){try{qc.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 Kc.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return Kc.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}(),Jc=function(){return{inlineAll:function e(r){return r instanceof Element?function(t){var e=t.style.getPropertyValue("background");return e?Kc.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}(r).then((function(){return r instanceof HTMLImageElement?t(r).inline():Promise.all(qc.asArray(r.childNodes).map((function(t){return e(t)})))})):Promise.resolve(r)},impl:{newImage:t}};function t(t){return{inline:function(e){return qc.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||qc.getAndEncode).then((function(e){return qc.dataAsUrl(e,qc.mimeType(t.src))})).then((function(e){return new Promise((function(r,n){t.onload=r,t.onerror=n,t.src=e}))}))}}}}(),Zc=void 0,$c=!1;function tu(t,e){return function(t){void 0===t.imagePlaceholder?ou.impl.options.imagePlaceholder=Zc:ou.impl.options.imagePlaceholder=t.imagePlaceholder,void 0===t.cacheBust?ou.impl.options.cacheBust=$c:ou.impl.options.cacheBust=t.cacheBust}(e=e||{}),Promise.resolve(t).then((function(t){return ru(t,e.filter,!0)})).then(nu).then((function(t){var r=e,n=r.bgcolor,o=r.width,i=r.height,a=r.style,c=r.sx,u=void 0===c?1:c,s=r.sy,f=void 0===s?1:s,l=t.style;return n&&(l.backgroundColor=n),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(u,", ").concat(f,") perspective(1px)")})),a&&Object.keys(a).forEach((function(t){l[t]=a[t]})),t})).then((function(r){return function(t,e,r){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(qc.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="'+r+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}(r,e.width||qc.width(t),e.height||qc.height(t))}))}function eu(t,e){return tu(t,e).then(qc.makeImage).then(qc.delay(100)).then((function(r){var n=function(t){var r=document.createElement("canvas");if(e.width,e.height,r.width=e.width||qc.width(t),r.height=e.height||qc.height(t),e.bgcolor){var n=r.getContext("2d");n.fillStyle=e.bgcolor,n.fillRect(0,0,r.width,r.height)}return r}(t);return n.getContext("2d").drawImage(r,0,0),n}))}function ru(t,e,r){return r||!e||e(t)?Promise.resolve(t).then((function(t){if(t instanceof HTMLCanvasElement)try{return qc.makeImage(t.toDataURL())}catch(t){me(t)}return t.cloneNode(!1)})).then((function(r){return function(t,e,r){var n=t.childNodes;return 0===n.length?Promise.resolve(e):function(t,e,r){var n=Promise.resolve();return e.forEach((function(e){n=n.then((function(){return ru(e,r)})).then((function(e){e&&t.appendChild(e)}))})),n}(e,qc.asArray(n),r).then((function(){return e}))}(t,r,e)})).then((function(e){return function(t,e){return e instanceof Element?Promise.resolve().then((function(){r=window.getComputedStyle(t),n=e.style,r.cssText?n.cssText=r.cssText:function(t,e){qc.asArray(t).forEach((function(r){e.setProperty(r,t.getPropertyValue(r),t.getPropertyPriority(r))}))}(r,n);var r,n})).then((function(){[":before",":after"].forEach((function(r){!function(r){var n=window.getComputedStyle(t,r),o=n.getPropertyValue("content");if(""!==o&&"none"!==o){var i=qc.uid();e.className=e.className+" "+i;var a=document.createElement("style");a.appendChild(function(t,e,r){var n="."+t+":"+e,o=r.cssText?i(r):a(r);return document.createTextNode(n+"{"+o+"}");function i(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function a(t){return qc.asArray(t).map(e).join("; ")+";";function e(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")}}}(i,r,n)),e.appendChild(a)}}(r)}))})).then((function(){t instanceof HTMLTextAreaElement&&(e.innerHTML=t.value),t instanceof HTMLInputElement&&e.setAttribute("value",t.value)})).then((function(){e instanceof SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof SVGRectElement&&["width","height"].forEach((function(t){var r=e.getAttribute(t);r&&e.style.setProperty(t,r)})))})).then((function(){return e})):e}(t,e)})):Promise.resolve()}function nu(t){return Jc.inlineAll(t).then((function(){return t}))}var ou={toSvg:tu,toPng:function(t,e){return eu(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return eu(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return eu(t,e||{}).then(qc.canvasToBlob)},toPixelData:function(t,e){return eu(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,qc.width(t),qc.height(t)).data}))},impl:{fontFaces:Qc,images:Jc,util:qc,inliner:Kc,options:{}}};const iu=ou;function au(t,e,r,n){var o=this.model_layer,i=o._overlay;return new Promise((function(a,c){if(o){var u=o.get("width"),s=o.get("height");r=r||u,n=n||s;var f=o.get("translate"),l=o.get("scale"),h=Math.min(r/u,n/s);r=u*h,n=s*h,o.set("translate",{x:0,y:0}),o.set("scale",{x:h/y,y:h/y});var p=Ir.createCanvas(r,n),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);iu.toPng(i,{sx:h,sy:h,width:r,height:n}).then((function(o){var i=new Image;i.onload=function(){d.drawImage(i,0,0,r,n),a(p.toDataURL(t,e)),p=null},i.src=o}),(function(r){be(r),a(p.toDataURL(t,e)),p=null}))}else c("No target model")}))}function cu(){var t=this.selected.filter((function(t){return!!t.parent&&!t.stuck}));if(!(t.length<2)){var e=t[0].parent,r=[],n=t.sort((function(t,r){return e.components.indexOf(t)-e.components.indexOf(r)}));n.forEach((function(t){r.push(t.bounds)}));var o=Ir.union(r),i=t[0].transcoordP2S(o.left,o.top),a=oa({type:"group",left:(i=t[0].transcoordS2T(i.x,i.y)).x,top:i.y,width:o.width,height:o.height}),c=[{component:a,to_container:e}];n.forEach((function(t){c.push({component:t,to_container:a})})),this.app.commander.execute(new na({changes:c})),this.selected=[a]}}function uu(){if(0!==this.selected.length){var t=[],e=[];this.selected.forEach((function(r){if(r.isGroup()){var n=r.parent;r.components.forEach((function(r){t.push(r),e.push({component:r,to_container:n})})),e.push({component:r,to_container:null})}})),this.app.commander.execute(new na({changes:e})),this.selected=t}}function su(){var t=this.selected;if(0!=t.length){var e=t.map((function(t){return t.bounds})),r=Ir.union(e),n=r.left+r.width/2;t.map((function(t){t.symmetryX(n)}))}}function fu(){var t=this.selected;if(0!=t.length){var e=t.map((function(t){return t.bounds})),r=Ir.union(e),n=r.top+r.height/2;t.map((function(t){t.symmetryY(n)}))}}function lu(){Ki.around(this.app.commander,su,this)}function hu(){Ki.around(this.app.commander,fu,this)}function pu(t,e,r){var n=this.findAll(t,r);return n.forEach((function(t){t.set(e)})),n}function yu(t){Ki.around(this.app.commander,t)}function du(){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 vu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var gu=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!(e=Number(e))||e<=0?(be("TimeCapsule maxsize should be greater than 0.",e),this.maxsize=10):this.maxsize=e,this.reset(),r&&this.snapshot(r)}var e,r;return e=t,(r=[{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];me("Not forwardable.")}},{key:"backward",value:function(){if(this.snapshot_taker&&this.snapshot_taker.take(),this.backwardable)return this.q[--this.pos];me("Not backwardable.")}},{key:"current",get:function(){if(-1!==this.pos)return this.q[this.pos];me("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}}])&&vu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function bu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var mu=Rt()((function(t){t.brake||t.take()}),1e3,{leading:!0,trailing:!1});function wu(t){!t.brake&&t.dirty&&mu(t)}var xu=function(){function t(e,r){!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=r,this.timecapsule.snapshot_taker=this}var e,r;return e=t,(r=[{key:"dispose",value:function(){delete this.state_holder,delete this.timecapsule}},{key:"touch",value:function(){this.dirty=!0,wu(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,wu(this)}}])&&bu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function _u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ku(t,e){var r=e.model_layer.get("scale"),n=e.model_layer.get("translate");if(t){var o=JSON.parse(t);o.scale=r,o.translate=n,e.rebuildContentModel(o)}}var Ou=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 gu(20);var r=this;this.snapshot_taker=new xu({get state(){var t=r.container.model_layer.hierarchy;return JSON.stringify(t)}},this.timecapsule),this.snapshot_taker.take(!0)}var e,r;return e=t,(r=[{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&&(ku(this.timecapsule.backward(),this.container),this.trigger("undo",this.undoable(),this.redoable()))}},{key:"redo",value:function(){this.timecapsule.forwardable&&(ku(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")}}])&&_u(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Su(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}ye(Ou.prototype,pe.withEvent);var Au=new WeakSet,Eu=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 Ou(this._container),this.app.commander=this._commander,Au.add(this)}var e,r,n;return e=t,r=[{key:"add",value:function(){return zc.apply(this._container,arguments)}},{key:"duplicate",value:function(){return Lc.apply(this._container,arguments)}},{key:"remove",value:function(){return Nc.apply(this._container,arguments)}},{key:"animate",value:function(){return dr.apply(this,arguments)}},{key:"fullscreen",value:function(){return Gc.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,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return this._container.selected=(e=this.root).findAll.apply(e,[t].concat(n)),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 Vc.apply(this._container,arguments)}},{key:"copy",value:function(){return Wc.apply(this._container,arguments)}},{key:"paste",value:function(){return Xc.apply(this._container,arguments)}},{key:"undoableChange",value:function(){return yu.apply(this._container,arguments)}},{key:"change",value:function(){return pu.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 Mc.apply(this._container,arguments)}},{key:"distribute",value:function(){return Cc.apply(this._container,arguments)}},{key:"move",value:function(){return Bc.apply(this._container,arguments)}},{key:"zorder",value:function(){return Dc.apply(this._container,arguments)}},{key:"symmetryX",value:function(){return lu.apply(this._container,arguments)}},{key:"symmetryY",value:function(){return hu.apply(this._container,arguments)}},{key:"on",value:function(){return Fc.apply(this._container,arguments)}},{key:"once",value:function(){return Uc.apply(this._container,arguments)}},{key:"off",value:function(){return Hc.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 au.apply(this._container,arguments)}},{key:"group",value:function(){return cu.apply(this._container,arguments)}},{key:"ungroup",value:function(){return uu.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 du.apply(this._container)}},{key:"data",get:function(){return this._container.data},set:function(t){this._container.data=t}},{key:"baseUrl",get:function(){return this.app.baseUrl},set:function(t){this.app.baseUrl=t}}],n=[{key:"residents",get:function(){return Au}}],r&&Su(e.prototype,r),n&&Su(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Pu=Eu;function ju(t){var e=t.target,r=t.model,n=t.style,o=t.layers,i=void 0===o?[]:o,a=t.handlers,c=void 0===a?[]:a,u=t.mode,f=void 0===u?s:u,l=t.refProvider,h=t.dataSubscriptionProvider,p=t.baseUrl,y=t.fitMode,d=null;if("string"==typeof e){if(!(d=document.getElementById(e)))throw"target element '".concat(e,"' is not exist");if(d.firstChild)throw"target element '".concat(e,"' is not empty")}else d=e;d&&d.style&&(d.style.position="absolute",d.style.cursor="default",d.style.overflow="hidden");var v=new Xa(f,l);return v.baseUrl=p,v.dataSubscriptionProvider=h,new Pu(new Oc({target_element:d,model:r,style:n,layers:i,handlers:c,fitMode:y},v))}var Ru=Math.sqrt(3);function Mu(t,e,r,n,o){var i,a,c,u,s=5+o,f=r.x,l=r.y,h=n.x,p=n.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?(u=l,c=p):(u=p,c=l),!(a+5<t||i-5>t||u+5<e||c-5>e)}function Tu(t,e,r){for(var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,o=0;o<r.length-1;o++)if(Mu(t,e,r[o],r[o+1],n))return!0;return!1}function Iu(t,e,r,n){if("arrow"!=t.slice(-5))return r;r.x,r.y;var o=Math.atan2(n.y-r.y,n.x-r.x),i=1.5*e;return{x:r.x+Math.cos(o)*i,y:r.y+Math.sin(o)*i}}function Cu(t,e,r){var n=r.lineWidth,o=void 0===n?2:n,i=r.strokeStyle,a=void 0===i?"#000000":i,c=r.lineCap,u=void 0!==c&&c,s=r.alpha,f=void 0===s?1:s,l=r.begin,h=void 0===l?"none":l,p=r.end,y=void 0===p?"none":p,d=r.beginSize,v=void 0===d?"size5":d,g=r.endSize,b=void 0===g?"size5":g;if(("none"!=h||"none"!=y)&&(o=Number(o)||2,t.lineCap=u,t.lineWidth=o,t.strokeStyle=a,t.fillStyle=a,t.globalAlpha*=f,"none"!=h&&Bu(t,e[0],e[1],o,h,Du(v,o)),"none"!=y)){var m=e.length;Bu(t,e[m-1],e[m-2],o,y,Du(b,o))}}function Bu(t,e,r,n,o,i){var a=e.x,c=e.y,u=Math.atan2(r.y-c,r.x-a);switch(t.beginPath(),t.translate(a,c),t.rotate(u),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(Ru*i.X,-i.Y),t.lineTo(Ru*i.X,i.Y),t.fill();break;case"sharp-arrow":t.moveTo(0,0),t.lineTo(Ru*i.X,-i.Y),t.lineTo(-i.X/1.5+Ru*i.X,0),t.lineTo(Ru*i.X,i.Y),t.fill();break;case"open-arrow":t.moveTo(Ru*i.X+n,-i.Y),t.lineTo(n,0),t.lineTo(Ru*i.X+n,i.Y),t.stroke()}t.rotate(-u),t.translate(-a,-c),t.closePath()}function Du(t,e){var r={};switch(e*=1.2,t){case"size1":r.X=e,r.Y=e;break;case"size2":r.X=1.5*e,r.Y=e;break;case"size3":r.X=2*e,r.Y=e;break;case"size4":r.X=e,r.Y=1.5*e;break;case"size5":default:r.X=1.5*e,r.Y=1.5*e;break;case"size6":r.X=2*e,r.Y=1.5*e;break;case"size7":r.X=e,r.Y=2*e;break;case"size8":r.X=1.5*e,r.Y=2*e;break;case"size9":r.X=2*e,r.Y=2*e}return r}function zu(t){return zu="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},zu(t)}function Lu(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Nu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Fu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Nu(Object(r),!0).forEach((function(e){Uu(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nu(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Uu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Hu(){return Hu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Gu(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Hu.apply(this,arguments)}function Gu(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Vu(t)););return t}function Yu(t,e){return Yu=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Yu(t,e)}function Wu(t,e){if(e&&("object"===zu(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 Vu(t){return Vu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Vu(t)}function Xu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ku(t,e,r){return e&&qu(t.prototype,e),r&&qu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var Qu=function(){function t(e){var r=e.component,n=e.anchor,o=e.position;Xu(this,t),this.component=r,this.anchor=n,this._position=o}return Ku(t,[{key:"position",get:function(){var t,e=this,r=((null===(t=this.component)||void 0===t?void 0:t.anchors)||[]).find((function(t){return t.name===e.anchor}));if(r){var n=r.position;return this.component.transcoordS2T(n.x,n.y)}return this._position},set:function(t){var e=t.x,r=t.y;this._position={x:e,y:r}}}]),t}(),Ju=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yu(t,e)}(o,t);var e,r,n=(e=o,r=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}}(),function(){var t,n=Vu(e);if(r){var o=Vu(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return Wu(this,t)});function o(){return Xu(this,o),n.apply(this,arguments)}return Ku(o,[{key:"isLine",value:function(){return!0}},{key:"replaceRefs",value:function(t){var e=this;["from","to"].forEach((function(r){var n=e.get(r);if(null!=n&&n.component){var o=t.get(n.component)||n.component;e.set(r,Fu(Fu({},n),{},{component:o}))}}))}},{key:"fromAnchor",get:function(){if(this.parent&&!this._fromAnchor){var t=this.getState("from")||{},e=t.component,r=t.anchor,n=t.position;if(!e)return;var o=this.root.findByRef(e);if(!o)return;this._fromAnchor=new Qu({component:o,anchor:r,position:n})}return this._fromAnchor}},{key:"from",get:function(){return this.getState("from")},set:function(t){delete this._fromAnchor,this.set("from",t)}},{key:"toAnchor",get:function(){if(this.parent&&!this._toAnchor){var t=this.getState("to")||{},e=t.component,r=t.anchor,n=t.position;if(!e)return;var o=this.root.findByRef(e);if(!o)return;this._toAnchor=new Qu({component:o,anchor:r,position:n})}return this._toAnchor}},{key:"to",get:function(){return this.getState("to")},set:function(t){delete this._toAnchor,this.set("to",t)}},{key:"move",value:function(t,e){var r,n,i,a,c=t.x,u=t.y;e&&(this.from={position:(null===(r=this._fromAnchor)||void 0===r?void 0:r.position)||(null===(n=this.getState("from"))||void 0===n?void 0:n.position)||{x:0,y:0}},this.to={position:(null===(i=this._toAnchor)||void 0===i?void 0:i.position)||(null===(a=this.getState("to"))||void 0===a?void 0:a.position)||{x:0,y:0}}),Hu(Vu(o.prototype),"move",this).call(this,{x:c,y:u},e)}},{key:"drawPath",get:function(){return this.path}},{key:"render",value:function(t){var e=this.model,r=e.begin,n=void 0===r?"none":r,o=e.end,i=void 0===o?"none":o,a=e.lineWidth,c=this.drawPath;Cu(t,c,this.model),t.beginPath();var u=Iu(n,a,c[0],c[1]),s=Iu(i,a,c[c.length-1],c[c.length-2]);t.moveTo(u.x,u.y);for(var f=1;f<c.length-1;f++)t.lineTo(c[f].x,c[f].y);t.lineTo(s.x,s.y),this.drawStroke(t)}},{key:"contains",value:function(t,e){var r=this.model.lineWidth;return Tu(t,e,this.drawPath,r)}},{key:"resizable",get:function(){return!1}},{key:"mutable",get:function(){return!0}},{key:"rotatable",get:function(){return!1}},{key:"path",get:function(){var t,e,r=this.state,n=r.from,o=r.to,i=this.model,a=i.x1,c=i.y1,u=i.x2,s=i.y2;return[(null===(t=this.fromAnchor)||void 0===t?void 0:t.position)||(null==n?void 0:n.position)||{x:a,y:c},(null===(e=this.toAnchor)||void 0===e?void 0:e.position)||(null==o?void 0:o.position)||{x:u,y:s}]},set:function(t){var e,r,n=(r=2,function(t){if(Array.isArray(t))return t}(e=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}}(e,r)||function(t,e){if(t){if("string"==typeof t)return Lu(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Lu(t,e):void 0}}(e,r)||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.")}()),o=n[0],i=n[1],a=this.state,c=a.from,u=a.to;delete this._fromAnchor,delete this._toAnchor,this.set({from:Fu(Fu({},c),{},{position:o}),to:Fu(Fu({},u),{},{position:i})})}}]),o}(Ir);function Zu(t){return Zu="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},Zu(t)}function $u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ts(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function es(t,e){return es=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},es(t,e)}function rs(t,e){if(e&&("object"===Zu(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)},ns(t)}Ju.getTipNeckPos=Iu,Ju.containedInPath=Tu,Ju.drawEndTips=Cu,Ir.register("line",Ju);var os={mutable:!1,resizable:!0,rotatable:!0,properties:[],"value-property":"text"},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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&es(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=ns(n);if(o){var r=ns(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return rs(this,t)});function a(){return $u(this,a),i.apply(this,arguments)}return e=a,r=[{key:"is3dish",value:function(){return!0}},{key:"render",value:function(t){var e=this.model,r=e.cx,n=e.cy,o=e.rx,i=e.ry,a=e.startAngle,c=e.endAngle,u=e.anticlockwise;t.beginPath(),t.ellipse(r,n,Math.abs(o),Math.abs(i),0,a||0,c||2*Math.PI,u)}},{key:"path",get:function(){var t=this.model,e=t.cx,r=t.cy,n=t.rx,o=t.ry;return[{x:e-n,y:r-o},{x:e+n,y:r-o},{x:e+n,y:r+o},{x:e-n,y:r+o}]},set:function(t){var e=t[0],r=t[2];this.set({cx:e.x+(r.x-e.x)/2,cy:e.y+(r.y-e.y)/2,rx:(r.x-e.x)/2,ry:(r.y-e.y)/2})}},{key:"contains",value:function(t,e){var r=this.model,n=r.cx,o=r.cy,i=(t-n)/(2*r.rx-.5),a=(e-o)/(2*r.ry-.5);return i*i+a*a<.25}},{key:"outline",value:function(t){return function(t,e){var r=t.model,n=r.cx,o=r.cy,i=r.rx,a=r.ry,c=2*Math.PI*e,u=n+i*Math.cos(c),s=o+a*Math.sin(c);return t.transcoordS2T(u,s)}(this,t)}},{key:"anchors",get:function(){return function(t){var e=t.bounds,r=e.left,n=e.top,o=e.width,i=e.height,a=r+o/2,c=n+i/2;return[{type:"inout",name:"TOP",position:{x:a,y:n}},{type:"inout",name:"RIGHT",position:{x:r+o,y:c}},{type:"inout",name:"BOTTOM",position:{x:a,y:n+i}},{type:"inout",name:"LEFT",position:{x:r,y:c}}]}(this)}},{key:"nature",get:function(){return os}}],r&&ts(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(qr);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},as(t)}function cs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function us(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ss(t,e){return ss=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ss(t,e)}function fs(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 ls(t){return ls=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ls(t)}Ir.memoize(is.prototype,"path",!1),Ir.register("ellipse",is);var hs={ondragstart:function(t,e,r){r.mutatePath(null,(function(r){r.splice(e+1,0,t)}))},ondragmove:function(t,e,r){r.mutatePath(null,(function(r){r[e+1]=t}))},ondragend:function(t,e,r){}},ps=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ss(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=ls(n);if(o){var r=ls(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return fs(this,t)});function a(){return cs(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"is3dish",value:function(){return!0}},{key:"render",value:function(t){var e=this.model.path,r=void 0===e?[]:e;if(!(r.length<=1)){t.beginPath(),t.moveTo(r[0].x,r[0].y);for(var n=1;n<r.length;n++)t.lineTo(r[n].x,r[n].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 r=this.model.path,n=!1;return r.forEach((function(o,i){var a=(i+r.length+1)%r.length,c=o.x,u=o.y,s=r[a].x,f=r[a].y;u>e!=f>e&&t<(s-c)*(e-u)/(f-u)+c&&(n=!n)})),n}},{key:"controls",get:function(){var t=this.path;return t.map((function(e,r){var n=t[r+1>=t.length?0:r+1];return{x:(e.x+n.x)/2,y:(e.y+n.y)/2,handler:hs}}))}}])&&us(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(qr);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},ys(t)}function ds(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function vs(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ds(Object(r),!0).forEach((function(e){gs(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ds(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function gs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function bs(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ms(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ws(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function xs(t,e){return xs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},xs(t,e)}function _s(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 ks(t){return ks=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ks(t)}Ir.memoize(ps.prototype,"controls",!1),Ir.register("polygon",ps);var Os={ondragstart:function(t,e,r){r.mutatePath(null,(function(r){r.splice(e,0,t)}))},ondragmove:function(t,e,r){r.mutatePath(null,(function(r){r[e]=t}))},ondragend:function(t,e,r){}},Ss=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xs(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=ks(n);if(o){var r=ks(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return _s(this,t)});function a(){return ms(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"pathExtendable",get:function(){return!0}},{key:"path",get:function(){var t,e,r,n=this.state,o=n.from,i=n.to,a=this.state.path;return[(null===(t=this.fromAnchor)||void 0===t?void 0:t.position)||(null==o?void 0:o.position)||a[0]].concat(function(t){if(Array.isArray(t))return bs(t)}(r=a.slice(1,-1))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||function(t,e){if(t){if("string"==typeof t)return bs(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bs(t,e):void 0}}(r)||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.")}(),[(null===(e=this.toAnchor)||void 0===e?void 0:e.position)||(null==i?void 0:i.position)||a[a.length-1]])},set:function(t){var e=this.state,r=e.from,n=e.to;delete this._fromAnchor,delete this._toAnchor,this.set({from:vs(vs({},r),{},{position:t[0]}),to:vs(vs({},n),{},{position:t[t.length-1]}),path:t})}},{key:"controls",get:function(){for(var t=this.path,e=[],r=0;r<t.length-1;r++){var n=t[r],o=t[r+1];0==r&&e.push({x:n.x,y:n.y,handler:Os}),e.push({x:(n.x+o.x)/2,y:(n.y+o.y)/2,handler:Os}),r==t.length-2&&e.push({x:o.x,y:o.y,handler:Os})}return e}}])&&ws(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(Ju);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},As(t)}function Es(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ps(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function js(){return js="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Rs(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},js.apply(this,arguments)}function Rs(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Is(t)););return t}function Ms(t,e){return Ms=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ms(t,e)}function Ts(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 Is(t){return Is=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Is(t)}Ir.register("polyline",Ss);var Cs={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"},Bs=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ms(t,e)}(c,t);var e,r,n,o,i,a=(o=c,i=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}}(),function(){var t,e=Is(o);if(i){var r=Is(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Ts(this,t)});function c(){return Es(this,c),a.apply(this,arguments)}return e=c,n=[{key:"noimage",get:function(){return c.NOIMAGE||(c.NOIMAGE=new Image,c.NOIMAGE.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABIBAMAAAD7Se1QAAAAIVBMVEUAAABHcEwBAQEREREBAQEEBAQGBgYLCwsDAwMDAwMICAi6HF9tAAAAC3RSTlNNAEAERiMYCS41Eac10lYAAAEgSURBVHhe7dY9asQwEAXgh7DNertNiJy48pIitY3SB7bYdk0ukL1BDDmA9gZecoH4pmFQ3MQayUMguPBrNPD4wD9TCMvJmt3M/AtYwXOlXiWgqADVCUBD46MAnGhMBaCiUQmAm8VA/Eh/eWl9Fn5WcxD+OLuRrUYJDKLluwH2InACUgkoACSdADxQc50Bytadb9RkM0CT13TcvlCT1HFg8UTHvasuUVACCa3El6u2UdD8LFTlKhUFFgA+d3dj10aABkUN72N3jAADCrJq7PIIsPidcxBoTHIIAjMFmyCwmGYIAA1P9gFgfCANAOsDSccCDW+uLDB+kLGg94OkZoAGkwsDDAe2DOg5oPxAg03rBR88OHpBz4N8UVeHFSwma74BTW6Ge4rIRa4AAAAASUVORK5CYII="),c.NOIMAGE}}],(r=[{key:"dispose",value:function(){js(Is(c.prototype),"dispose",this).call(this),this._offcanvas=null,this._image=null}},{key:"render",value:function(t){var e=this.state,r=e.left,n=e.top,o=e.width,i=e.height,a=e.isGray,u=void 0!==a&&a,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(u&&this._offcanvas)t.drawImage(this._offcanvas,r,n,o,i);else try{t.drawImage(this._image,r,n,o,i)}catch(e){t.drawImage(c.noimage,r,n,o,i)}else!this.app.isViewMode&&t.drawImage(c.noimage,r,n,o,i)}},{key:"nature",get:function(){return Cs}},{key:"hasTextProperty",get:function(){return!1}},{key:"ready",value:function(){this.prepareIf(!this._image&&this.state.src)}},{key:"prepare",value:function(t,e){var r=this,n=this.state,o=n.src,i=n.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(r.get("isGray")){var e=r._image.width,n=r._image.height;r._offcanvas=Ir.createCanvas(e,n);var o=r._offcanvas.getContext("2d");o.drawImage(r._image,0,0);var i=function(t,e,r){try{var n=t.getImageData(0,0,e,r)}catch(t){return be("Get Image Data Error: "+t.message),null}for(var o=n.data,i=0;i<e*r*4;i+=4){var a=o[i],c=o[i+1],u=o[i+2],s=parseInt((a+c+u)/3);n.data[i]=s,n.data[i+1]=s,n.data[i+2]=s}return n}(o,e,n);o.putImageData(i,0,0)}t(r)},this._image.onerror=function(t){r._image&&!r._image.currentSrc&&(r._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 r=0;r<t.length;r++)if(t[r].type.startsWith("image/"))return void(this.src=e[r])}}])&&Ps(e.prototype,r),n&&Ps(e,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(en(qr));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},Ds(t)}function zs(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},Ls(t,e)}function Ns(t,e){if(e&&("object"===Ds(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 Fs(t){return Fs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Fs(t)}Ir.register("image-view",Bs);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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ls(t,e)}(i,t);var e,r,n,o=(r=i,n=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}}(),function(){var t,e=Fs(r);if(n){var o=Fs(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return Ns(this,t)});function i(){return zs(this,i),o.apply(this,arguments)}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(si(en(Ir))),Hs=r(61894),Gs=r.n(Hs);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},Ys(t)}function Ws(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,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 r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function qs(){return qs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Ks(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},qs.apply(this,arguments)}function Ks(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Zs(t)););return t}function Qs(t,e){return Qs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Qs(t,e)}function Js(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 Zs(t){return Zs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Zs(t)}var $s={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"},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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qs(t,e)}(u,t);var e,r,n,o,i,a,c=(i=u,a=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}}(),function(){var t,e=Zs(i);if(a){var r=Zs(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Js(this,t)});function u(){return Vs(this,u),c.apply(this,arguments)}return e=u,r=[{key:"oncreate_element",value:(n=regeneratorRuntime.mark((function t(e){var r,n,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=this.state,n=r.src,o=r.play,this.onchangesrc(n),this.onchangeplay(o);case 3:case"end":return t.stop()}}),t,this)})),o=function(){var t=this,e=arguments;return new Promise((function(r,o){var i=n.apply(t,e);function a(t){Ws(i,r,o,a,c,"next",t)}function c(t){Ws(i,r,o,a,c,"throw",t)}a(void 0)}))},function(t){return o.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(Zs(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,r=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=="),r.setAttribute("rel:animated_src",t),r.setAttribute("rel:auto_play",0),this._superGif=new(Gs())({gif:r,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 r=0;r<t.length;r++)if(/\.gif$/.test(t[r].name))return void(this.src=e[r])}},{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 $s}},{key:"tagName",get:function(){return"div"}}],r&&Xs(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),u}(Us);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},ef(t)}function rf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function of(){return of="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=af(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},of.apply(this,arguments)}function af(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=sf(t)););return t}function cf(t,e){return cf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},cf(t,e)}function uf(t,e){if(e&&("object"===ef(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 sf(t){return sf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},sf(t)}Ir.register("gif-view",tf);var ff={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"},lf=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cf(t,e)}(c,t);var e,r,n,o,i,a=(o=c,i=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}}(),function(){var t,e=sf(o);if(i){var r=sf(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return uf(this,t)});function c(){return rf(this,c),a.apply(this,arguments)}return e=c,n=[{key:"image",get:function(){return c.IMAGE||(c.IMAGE=new Image,c.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="),c.IMAGE}}],(r=[{key:"dispose",value:function(){of(sf(c.prototype),"dispose",this).call(this),this.started=!1,delete this._audio}},{key:"ready",value:function(){var t=this;of(sf(c.prototype),"ready",this).call(this),this._audio=new Audio,this._audio.addEventListener("canplay",(function(){t.started&&t._audio.play()}));var e=this.state,r=e.src,n=void 0===r?"":r,o=e.loop,i=void 0!==o&&o,a=e.started,u=void 0!==a&&a;this.onchangeSrc(n),this.onchangeLoop(i),this.onchangeStarted(u)}},{key:"render",value:function(t){var e=this.model,r=e.left,n=e.top,o=e.width,i=e.height;e.src,t.beginPath(),this.drawImage(t,c.image,r,n,o,i)}},{key:"nature",get:function(){return ff}},{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 r=0;r<t.length;r++)if(t[r].type.startsWith("audio/"))return void(this.src=e[r])}}])&&nf(e.prototype,r),n&&nf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(en(qr));function hf(t){return hf="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},hf(t)}function pf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function df(t,e){return df=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},df(t,e)}function vf(t,e){if(e&&("object"===hf(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 gf(t){return gf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},gf(t)}Ir.register("audio",lf);var 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&df(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=gf(n);if(o){var r=gf(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return vf(this,t)});function a(){return pf(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"is3dish",value:function(){return!0}}])&&yf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(en(Ir));function mf(t){return mf="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},mf(t)}function wf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _f(){return _f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=kf(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},_f.apply(this,arguments)}function kf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Af(t)););return t}function Of(t,e){return Of=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Of(t,e)}function Sf(t,e){if(e&&("object"===mf(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 Af(t){return Af=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Af(t)}Ir.register("text",bf);var Ef={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"},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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Of(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=Af(n);if(o){var r=Af(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Sf(this,t)});function a(){return wf(this,a),i.apply(this,arguments)}return e=a,(r=[{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,r=e.width/t.width,n=e.height/t.height;return"both"===this.model.fit?{x:r,y:n}:{x:Math.min(r,n),y:Math.min(r,n)}}},{key:"draw",value:function(t){this._drawing||(this._drawing=!0,_f(Af(a.prototype),"draw",this).call(this,t),this._drawing=!1)}},{key:"prerender",value:function(t){if(_f(Af(a.prototype),"prerender",this).call(this,t),this.ref){var e=this.ref.center,r=this.center,n=this.refScale;t.translate(r.x,r.y),t.scale(n.x,n.y),t.translate(-e.x,-e.y)}}},{key:"postrender",value:function(t){if(this.ref)return this.ref.postrender(t);_f(Af(a.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,r=e.left,n=e.top,o=e.width,i=e.height;t.beginPath(),t.rect(r,n,o,i)}},{key:"nature",get:function(){return Ef}},{key:"hasTextProperty",get:function(){return!1}}])&&xf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(en(qr));function jf(t){return jf="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},jf(t)}function Rf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Tf(t,e){return Tf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Tf(t,e)}function If(t,e){if(e&&("object"===jf(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 Cf(t){return Cf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Cf(t)}Ir.memoize(Pf.prototype,"ref",!1),Ir.memoize(Pf.prototype,"refScale",!1),Ir.register("local-ref",Pf);var 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tf(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=Cf(n);if(o){var r=Cf(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return If(this,t)});function a(){return Rf(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"render",value:function(t){}},{key:"layout",get:function(){return zr.get(this.get("layout"))||Nr}}])&&Mf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(si(Vn));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},Df(t)}function zf(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function Lf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ff(){return Ff="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Uf(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ff.apply(this,arguments)}function Uf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Yf(t)););return t}function Hf(t,e){return Hf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Hf(t,e)}function Gf(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 Yf(t){return Yf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Yf(t)}var Wf={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"},Vf=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Hf(t,e)}(u,t);var e,r,n,o,i,a,c=(i=u,a=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}}(),function(){var t,e=Yf(i);if(a){var r=Yf(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Gf(this,t)});function u(){return Lf(this,u),c.apply(this,arguments)}return e=u,r=[{key:"dispose",value:function(){this._releaseRef(),Ff(Yf(u.prototype),"dispose",this).call(this)}},{key:"nature",get:function(){return Wf}},{key:"hasTextProperty",get:function(){return!1}},{key:"tagName",get:function(){return"div"}},{key:"setElementProperties",value:function(t){var e=this.state.mode,r=void 0===e?"view":e;t.style.pointerEvents="view"==r?"none":"inherit"}},{key:"ready",value:function(){Ff(Yf(u.prototype),"ready",this).call(this),this.fetchRef()}},{key:"reposition",value:function(){if(this.element){Ff(Yf(u.prototype),"reposition",this).call(this);var t=this._element_bounds,e=this.element,r=e.offsetWidth,n=e.offsetHeight;if(this._element_bounds={offsetWidth:r,offsetHeight:n},(!t||t.offsetWidth!=r||t.offsetHeight!=n)&&this.ref&&this.root.target_element){var o=this.state.fit,i=void 0===o?"ratio":o;this.ref.fit(i)}}}},{key:"fetchRef",value:(n=regeneratorRuntime.mark((function t(){var e,r,n,o,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._releaseRef(),e=this.state,r=e.ref,n=e.fit,o=void 0===n?"ratio":n,r){t.next=4;break}return t.abrupt("return");case 4:if(!(i=this.app.refProvider)||!r){t.next=18;break}return t.prev=6,t.next=9,i.get(r,!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),be(t.t0);case 18:case"end":return t.stop()}}),t,this,[[6,15]])})),o=function(){var t=this,e=arguments;return new Promise((function(r,o){var i=n.apply(t,e);function a(t){zf(i,r,o,a,c,"next",t)}function c(t){zf(i,r,o,a,c,"throw",t)}a(void 0)}))},function(){return o.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,r){var n=this;Ff(Yf(u.prototype),"onchange",this).call(this,t,e,r),"ref"in t&&this.fetchRef(),"fit"in t&&this.ref&&requestAnimationFrame((function(){var t=n.state.fit;n.ref.fit(t)})),"data"in t&&this.ref&&requestAnimationFrame((function(){n.ref.data=t.data}))}}],r&&Nf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),u}(Bf);function Xf(t){return Xf="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},Xf(t)}function qf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Qf(){return Qf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Jf(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Qf.apply(this,arguments)}function Jf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=tl(t)););return t}function Zf(t,e){return Zf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Zf(t,e)}function $f(t,e){if(e&&("object"===Xf(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)},tl(t)}Ir.register("global-ref",Vf);var el={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"},rl=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zf(t,e)}(c,t);var e,r,n,o,i,a=(o=c,i=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}}(),function(){var t,e=tl(o);if(i){var r=tl(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return $f(this,t)});function c(){return qf(this,c),a.apply(this,arguments)}return e=c,r=[{key:"ready",value:function(){Qf(tl(c.prototype),"ready",this).call(this),this.show&&this.onchangeShow(!0)}},{key:"render",value:function(t){var e=this.bounds,r=e.left,n=e.top,o=e.width,i=e.height;t.beginPath(),this.drawImage(t,c.image,r,n,o,i)}},{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?I(this,this.board,{location:this.getState("location"),modal:this.getState("modal"),closable:this.getState("closable")||!1,data:this.value}):T(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 el}}],n=[{key:"image",get:function(){return c._image||(c._image=new Image,c._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"),c._image}}],r&&Kf(e.prototype,r),n&&Kf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(en(qr));function nl(t){return nl="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},nl(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 r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function al(t,e){return al=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},al(t,e)}function cl(t,e){if(e&&("object"===nl(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)},ul(t)}Ir.register("popup",rl);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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&al(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=ul(n);if(o){var r=ul(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return cl(this,t)});function a(){return ol(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"render",value:function(t){var e=this.model.path,r=void 0===e?[]:e;if(!(r.length<=1)){t.beginPath(),t.moveTo(r[0].x,r[0].y);for(var n=1;n<r.length;n++)t.lineTo(r[n].x,r[n].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 r=this.model.path,n=!1;return r.forEach((function(o,i){var a=(i+r.length+1)%r.length,c=o.x,u=o.y,s=r[a].x,f=r[a].y;u>e!=f>e&&t<(s-c)*(e-u)/(f-u)+c&&(n=!n)})),n}}])&&il(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(Ir);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},fl(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 r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function pl(t,e){return pl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},pl(t,e)}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 dl(t){return dl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},dl(t)}Ir.register("path",sl);var vl=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pl(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=dl(n);if(o){var r=dl(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return yl(this,t)});function a(){return ll(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"render",value:function(t){var e=this.model,r=e.x1,n=e.y1,o=e.x2,i=e.y2,a=e.x3,c=e.y3;t.beginPath(),t.moveTo(r,n),t.lineTo(o,i),t.lineTo(a,c),t.closePath()}},{key:"contains",value:function(t,e){for(var r=this.model,n=[r.x1,r.y1,r.x2,r.y2,r.x3,r.y3],o=!1,i=0;i<n.length;i+=2){var a=(i+2)%n.length,c=n[i],u=n[i+1],s=n[a+1];u>e!=s>e&&t<(n[a]-c)*(e-u)/(s-u)+c&&(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})}}])&&hl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(qr);function gl(t){return gl="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},gl(t)}function bl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ml(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function wl(t,e){return wl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},wl(t,e)}function xl(t,e){if(e&&("object"===gl(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 _l(t){return _l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_l(t)}Ir.memoize(vl.prototype,"path",!1),Ir.register("triangle",vl);var kl={mutable:!1,resizable:!0,rotatable:!0,properties:[{type:"number",label:"ratio",name:"ratio",property:"ratio"}],help:"scene/component/donut"},Ol={ondragmove:function(t,e,r){r.controls;var n=r.model,o=n.cx,i=n.rx;i=Math.abs(i);var a=(r.transcoordP2S(t.x,t.y).x-o)/i*100;a=a>=100||a<=-100?100:Math.abs(a),r.set({ratio:a})}},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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wl(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=_l(n);if(o){var r=_l(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return xl(this,t)});function a(){return bl(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"is3dish",value:function(){return!1}},{key:"render",value:function(t){var e=this.model,r=e.ratio,n=void 0===r?50:r,o=e.cx,i=e.cy,a=e.rx,c=e.ry,u=e.startAngle,s=e.endAngle,f=e.anticlockwise;a=Math.abs(a),c=Math.abs(c),t.beginPath(),t.ellipse(o,i,a,c,0,u||0,s||2*Math.PI,f),t.moveTo(o+a/100*n,i),t.ellipse(o,i,a/100*n,c/100*n,0,u||0,s||2*Math.PI,!0)}},{key:"contains",value:function(t,e){var r=this.model,n=r.cx,o=r.cy,i=r.rx,a=r.ry,c=r.ratio,u=(t-n)/(2*(i=Math.abs(i))-.5),s=(e-o)/(2*(a=Math.abs(a))-.5),f=(t-n)/(i/100*c*2-.5),l=(e-o)/(a/100*c*2-.5),h=!1;return u*u+s*s<.25&&f*f+l*l>.25&&(h=!h),h}},{key:"controls",get:function(){var t=this.model,e=t.cx,r=t.cy,n=t.rx,o=t.ratio;return[{x:e+(n=Math.abs(n))/100*o,y:r,handler:Ol}]}},{key:"nature",get:function(){return kl}}])&&ml(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(is);function Al(t){return Al="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},Al(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 r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function jl(t,e){return jl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},jl(t,e)}function Rl(t,e){if(e&&("object"===Al(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 Ml(t){return Ml=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ml(t)}Ir.memoize(Sl.prototype,"controls",!1),Ir.register("donut",Sl);var Tl={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"},Il={ondragmove:function(t,e,r){r.controls;var n=r.model,o=n.cy,i=n.ry,a=(r.transcoordP2S(t.x,t.y).y-o)/i*100+100;a>=100?a=100:a<=0&&(a=0),r.set({ratio:a})}},Cl=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jl(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=Ml(n);if(o){var r=Ml(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Rl(this,t)});function a(){return El(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"is3dish",value:function(){return!1}},{key:"render",value:function(t){var e=this.model,r=e.ratio,n=void 0===r?30:r,o=e.wing,i=void 0===o?5:o,a=e.cx,c=e.cy,u=e.rx,s=e.ry;if(e.startAngle,e.endAngle,e.anticlockwise,!(i<3)){var f=1.5707963267948966,l=2*Math.PI/i,h=u-n/100*u,p=s-n/100*s;t.save(),t.beginPath(),t.translate(a,c),t.moveTo(u*Math.cos(-f),s*Math.sin(-f)),t.lineTo((u-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(u*Math.cos(l*y-f),s*Math.sin(l*y-f)),t.lineTo((u-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,r=t.cy,n=t.ry;return[{x:e,y:r-n+n*(t.ratio/100),handler:Il}]}},{key:"nature",get:function(){return Tl}}])&&Pl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(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},Bl(t)}function Dl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ll(){return Ll="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Nl(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ll.apply(this,arguments)}function Nl(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Hl(t)););return t}function Fl(t,e){return Fl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Fl(t,e)}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 Hl(t){return Hl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Hl(t)}Ir.memoize(Cl.prototype,"controls",!1),Ir.register("star",Cl);const Gl=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fl(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=Hl(n);if(o){var r=Hl(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Ul(this,t)});function a(){return Dl(this,a),i.apply(this,arguments)}return e=a,r=[{key:"animOnValueChange",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;if(t!=this._lastValue){if(r)var o=t-(Number(n)||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(){Ll(Hl(a.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(Ft(t)))}}],r&&zl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(t);return e};function Yl(t){return Yl="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},Yl(t)}function Wl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Xl(t,e){return Xl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Xl(t,e)}function ql(t,e){if(e&&("object"===Yl(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 Kl(t){return Kl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Kl(t)}const Ql=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xl(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=Kl(n);if(o){var r=Kl(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return ql(this,t)});function a(){return Wl(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"_convertDataFormat",value:function(t,e){return"json"===e?JSON.parse(t):t}},{key:"isDataSource",value:function(){return!0}}])&&Vl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(t);return e};function Jl(t){return Jl="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},Jl(t)}function Zl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function $l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Zl(Object(r),!0).forEach((function(e){th(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zl(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function th(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function eh(t,e){return eh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},eh(t,e)}function rh(t,e){if(e&&("object"===Jl(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 nh(t){return nh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},nh(t)}function oh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ih(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ah(t,e,r){return e&&ih(t.prototype,e),r&&ih(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var ch=function(){function t(e){var r=e.component,n=e.anchor,o=e.position;oh(this,t),this.component=r,this.anchor=n,this._position=o}return ah(t,[{key:"position",get:function(){var t,e=this,r=((null===(t=this.component)||void 0===t?void 0:t.anchors)||[]).find((function(t){return t.name===e.anchor}));if(r){var n=r.position;return this.component.transcoordS2T(n.x,n.y)}return this._position},set:function(t){var e=t.x,r=t.y;this._position={x:e,y:r}}}]),t}(),uh=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&eh(t,e)}(o,t);var e,r,n=(e=o,r=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}}(),function(){var t,n=nh(e);if(r){var o=nh(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return rh(this,t)});function o(t,e){return oh(this,o),n.call(this,t,e)}return ah(o,[{key:"isLine",value:function(){return!0}},{key:"fromAnchor",get:function(){if(this.parent&&!this._fromAnchor){var t=this.get("from")||{},e=t.component,r=t.anchor,n=t.position;this._fromAnchor=new ch({component:e&&this.root.findByRef(e),anchor:r,position:n})}return this._fromAnchor}},{key:"from",get:function(){return this.get("from")},set:function(t){delete this._fromAnchor,this.set("from",t)}},{key:"toAnchor",get:function(){if(this.parent&&!this._toAnchor){var t=this.get("to")||{},e=t.component,r=t.anchor,n=t.position;this._toAnchor=new ch({component:e&&this.root.findByRef(e),anchor:r,position:n})}return this._toAnchor}},{key:"to",get:function(){return this.get("to")},set:function(t){delete this._toAnchor,this.set("to",t)}},{key:"drawPath",get:function(){return this.path}},{key:"render",value:function(t){var e=this.model,r=(e.fillStyle,e.lineWidth),n=void 0===r?5:r,o=e.strokeStyle,i=void 0===o?"#000000":o;t.beginPath();var a=this.fromAnchor.position,c=this.toAnchor.position;t.moveTo(a.x,a.y),t.lineTo(c.x,c.y),t.lineWidth=n,t.strokeStyle=i,t.stroke()}},{key:"contains",value:function(t,e){var r=this.model.lineWidth,n=void 0===r?5:r;return Tu(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;return this.fromAnchor?[null===(t=this.fromAnchor)||void 0===t?void 0:t.position,this.toAnchor.position]:[{x:0,y:0}]},set:function(t){var e=$l($l({},this.from),{},{position:t[0]}),r=$l($l({},this.to),{},{position:t[1]});this.set({from:e,to:r})}}]),o}(Ir);function sh(t){return sh="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},sh(t)}function fh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lh(t,e){return lh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},lh(t,e)}function hh(t,e){if(e&&("object"===sh(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 ph(t){return ph=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ph(t)}var yh=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lh(t,e)}(i,t);var e,r,n,o=(r=i,n=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}}(),function(){var t,e=ph(r);if(n){var o=ph(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return hh(this,t)});function i(){return fh(this,i),o.apply(this,arguments)}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(uh);function dh(t){return dh="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},dh(t)}function vh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function bh(t,e){return bh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},bh(t,e)}function mh(t,e){if(e&&("object"===dh(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 wh(t){return wh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},wh(t)}Ir.register("straight",yh);var xh=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bh(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=wh(n);if(o){var r=wh(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return mh(this,t)});function a(){return vh(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"render",value:function(t){var e=this.model,r=(e.fillStyle,e.lineWidth),n=void 0===r?5:r,o=e.strokeStyle,i=void 0===o?"#000000":o,a=(e.rotation,e.anchor),c=e.lineDash,u=void 0===c?[0,0]:c,s=e.lineCap,f=e.lineJoin,l=e.subType;this.center,t.beginPath();var h=this.fromAnchor.center,p=this.toAnchor.center;switch(a||((a={}).x=Math.min(h.x,p.x)+Math.abs((h.x-p.x)/2),a.y=Math.min(h.y,p.y)+Math.abs((h.y-p.y)/2)),l){case"v":case"vertical":default:var y={},d={};y.x=h.x,y.y=a.y,d.x=p.x,d.y=a.y;var v=[h,y,d,p];t.moveTo(v[0].x,v[0].y);for(var g=0;g<v.length&&g!==v.length-1;g++)t.lineTo(v[g+1].x,v[g+1].y);break;case"h":case"horizontal":var b={},m={};b.x=a.x,b.y=h.y,m.x=a.x,m.y=p.y,v=[h,b,m,p],t.moveTo(v[0].x,v[0].y);for(var w=0;w<v.length&&w!==v.length-1;w++)t.lineTo(v[w+1].x,v[w+1].y)}t.setLineDash(u),t.lineCap=s,t.lineJoin=f,t.lineWidth=n,t.strokeStyle=i,t.stroke()}}])&&gh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(uh);function _h(t){return _h="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},_h(t)}function kh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Oh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Sh(t,e){return Sh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Sh(t,e)}function Ah(t,e){if(e&&("object"===_h(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 Eh(t){return Eh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Eh(t)}Ir.register("right_angle_straight",xh);var Ph=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Sh(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=Eh(n);if(o){var r=Eh(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Ah(this,t)});function a(){return kh(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"render",value:function(t){var e=this.model,r=e.cX,n=e.cY,o=e.lineCap,i=e.lineWidth,a=void 0===i?5:i,c=e.strokeStyle,u=void 0===c?"#000000":c,s=this.fromAnchor.center,f=this.toAnchor.center;t.beginPath(),t.moveTo(s.x,s.y),t.quadraticCurveTo(r,n,f.x,f.y),t.lineCap=o,t.lineWidth=a,t.strokeStyle=u,t.stroke()}}])&&Oh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(uh);function jh(t){return jh="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},jh(t)}function Rh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Th(t,e){return Th=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Th(t,e)}function Ih(t,e){if(e&&("object"===jh(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 Ch(t){return Ch=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ch(t)}Ir.register("curve",Ph);var Bh=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Th(t,e)}(a,t);var e,r,n,o,i=(n=a,o=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}}(),function(){var t,e=Ch(n);if(o){var r=Ch(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Ih(this,t)});function a(){return Rh(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"render",value:function(t){var e=this.model,r=e.fillStyle,n=void 0===r?"black":r,o=e.lineWidth,i=void 0===o?5:o,a=e.strokeStyle,c=void 0===a?"#000000":a,u=e.lineCap,s=void 0===u?"round":u,f=e.arrowWidth,l=void 0===f?20:f,h=e.rotation,p=this.center;t.translate(p.x,p.y),t.rotate(h),t.translate(-p.x,-p.y),t.beginPath();var y=this.fromAnchor.center,d=this.toAnchor.center;t.moveTo(y.x,y.y),t.lineTo(d.x,d.y),t.lineCap=s,t.lineWidth=i,t.strokeStyle=c,t.stroke(),t.save(),t.translate(d.x,d.y);var v=(y.x-d.x)/(y.y-d.y);v=Math.atan(v),d.y-y.y>=0?t.rotate(-v):t.rotate(Math.PI-v),t.lineTo(-l,2*-l),t.lineTo(l,2*-l),t.lineTo(0,0),t.fillStyle=n,t.fill(),t.restore(),t.closePath()}}])&&Mh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(uh);function Dh(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function zh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Ir.register("arrow_straight",Bh);var Lh=new WeakSet,Nh=function(){function t(e,r){!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=r,Lh.add(this)}var e,r,n;return e=t,r=[{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 r=this,n=new Promise((function(n,o){var i=r.references[t];if(i)i===e?o(Error("Reference ID and target duplicate")):e?o(Error("Reference ID duplicate")):n(i);else{function i(e){e=ye(e,(function(){var t=this;this.release=function(){return r.release(t)}})),r.references[t]=e,r.counters[t]=1,n(e)}if(e)i(e);else{if(!r.creator)return void o(Error("Reference id("+t+") is not allowed. Reference creator should be defined."));r.creator.call(null,t,(function(t){i(t)}),(function(t){o(t)}))}}}));return this.references[t]||(this.references[t]=n),n}},{key:"get",value:function(){var t,e=(t=regeneratorRuntime.mark((function t(e,r){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n=this.references[e])){t.next=13;break}if(n 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",n);case 7:if(!r){t.next=13;break}return t.next=10,n;case 10:return n=t.sent,this.counters[e]++,t.abrupt("return",n);case 13:if(!r){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,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Dh(i,n,o,a,c,"next",t)}function c(t){Dh(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t,r){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),r=this.references[e];r?(this.counters[e]--,0==this.counters[e]&&(this.disposer&&this.disposer.call(null,e,r),delete this.references[e],delete this.counters[e],we("RELEASED",e))):be("No Referenced ID")}}],n=[{key:"residents",get:function(){return Lh}}],r&&zh(e.prototype,r),n&&zh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Fh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Uh={},Hh={},Gh=[];function Yh(t){var e="SCRIPT"==t.target.tagName?Uh:Hh,r=t.target.src||t.target.href;e[r]=!0,Gh.forEach((function(t,n){var o=t.resolve,i=t.scripts,a=t.styles;if(e==Uh){var c=i.indexOf(r);c>-1&&c<i.length-1&&Vh(i[c+1])}for(var u=0;u<i.length;u++)if(!Uh[i[u]])return;if(a)for(var s=0;s<a.length;s++)if(!Hh[a[s]])return;o(),Gh[n]=null})),Gh=Gh.filter((function(t){return t}))}function Wh(t){var e=t.target.src,r="SCRIPT"==t.target.tagName?Uh:Hh;Gh.forEach((function(n,o){var i=n.reject,a=n.scripts,c=n.styles,u=!1;if(r===Uh){for(var s=0;s<a.length;s++)if(a[s]==e){u=!0;break}}else if(c)for(var f=0;f<c.length;f++)if(c[f]==e){u=!0;break}u&&(i(t),Gh[o]=null)})),Gh=Gh.filter((function(t){return t})),delete r[e],document.head.removeChild(t.target)}function Vh(t){Uh[t]=!1;var e=document.createElement("script");e.onload=Yh,e.onerror=Wh,e.type="text/javascript",e.src=t,document.head.appendChild(e)}var Xh=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,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(r,n){if((!t||t instanceof Array)&&(!e||e instanceof Array)){var o,i=!0;if(e&&e.forEach((function(t){Hh.hasOwnProperty(t)||function(t){Hh[t]=!1;var e=document.createElement("link");e.onload=Yh,e.onerror=Wh,e.type="text/css",e.rel="stylesheet",e.media="screen,print",e.href=t,document.head.appendChild(e)}(t),Hh[t]||(i=!1)})),t&&t.length>0&&t.forEach((function(t){Uh.hasOwnProperty(t)?Uh[t]||(i=!1):o=o||t})),o)Vh(o);else if(i)return void r();Gh.push({resolve:r,reject:n,scripts:t,styles:e})}else n("invalid sources for load")}))}}],null&&Fh(e.prototype,null),r&&Fh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const qh="0.0.0";var Kh=0,Qh=performance.now(),Jh=0;function Zh(){return Kh}requestAnimationFrame((function t(){requestAnimationFrame(t),Jh++;var e=performance.now(),r=e-Qh;r<1e3||(Kh=Math.round(1e3*Jh/r),Qh=e,Jh=0)}));var $h=a;function tp(){}})(),n})()));
|