@netless/slide 0.5.2 → 0.5.5
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/README.md +8 -0
- package/lib/FrozenTaskManager.js +3 -3
- package/lib/Slide.d.ts +17 -2
- package/lib/Slide.js +4 -4
- package/package.json +2 -2
package/lib/Slide.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},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=64)}([function(t,e,n){
|
|
1
|
+
module.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},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=64)}([function(t,e,n){(function(t,i){var r;
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Lodash <https://lodash.com/>
|
|
@@ -6,7 +6,7 @@ module.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;va
|
|
|
6
6
|
* Released under MIT license <https://lodash.com/license>
|
|
7
7
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
8
8
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
9
|
-
*/(function(){var o="Expected a function",s="__lodash_placeholder__",a=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],l="[object Arguments]",u="[object Array]",h="[object Boolean]",c="[object Date]",d="[object Error]",p="[object Function]",f="[object GeneratorFunction]",m="[object Map]",g="[object Number]",v="[object Object]",_="[object RegExp]",y="[object Set]",x="[object String]",b="[object Symbol]",T="[object WeakMap]",w="[object ArrayBuffer]",S="[object DataView]",E="[object Float32Array]",M="[object Float64Array]",A="[object Int8Array]",R="[object Int16Array]",P="[object Int32Array]",C="[object Uint8Array]",I="[object Uint16Array]",O="[object Uint32Array]",L=/\b__p \+= '';/g,N=/\b(__p \+=) '' \+/g,D=/(__e\(.*?\)|\b__t\)) \+\n'';/g,F=/&(?:amp|lt|gt|quot|#39);/g,B=/[&<>"']/g,U=RegExp(F.source),k=RegExp(B.source),G=/<%-([\s\S]+?)%>/g,H=/<%([\s\S]+?)%>/g,z=/<%=([\s\S]+?)%>/g,j=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V=/^\w*$/,W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,X=/[\\^$.*+?()[\]{}|]/g,q=RegExp(X.source),Y=/^\s+/,Z=/\s/,J=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,K=/\{\n\/\* \[wrapped with (.+)\] \*/,$=/,? & /,Q=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tt=/[()=,{}\[\]\/\s]/,et=/\\(\\)?/g,nt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,it=/\w*$/,rt=/^[-+]0x[0-9a-f]+$/i,ot=/^0b[01]+$/i,st=/^\[object .+?Constructor\]$/,at=/^0o[0-7]+$/i,lt=/^(?:0|[1-9]\d*)$/,ut=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ht=/($^)/,ct=/['\n\r\u2028\u2029\\]/g,dt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",pt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ft="[\\ud800-\\udfff]",mt="["+pt+"]",gt="["+dt+"]",vt="\\d+",_t="[\\u2700-\\u27bf]",yt="[a-z\\xdf-\\xf6\\xf8-\\xff]",xt="[^\\ud800-\\udfff"+pt+vt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",bt="\\ud83c[\\udffb-\\udfff]",Tt="[^\\ud800-\\udfff]",wt="(?:\\ud83c[\\udde6-\\uddff]){2}",St="[\\ud800-\\udbff][\\udc00-\\udfff]",Et="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Mt="(?:"+yt+"|"+xt+")",At="(?:"+Et+"|"+xt+")",Rt="(?:"+gt+"|"+bt+")"+"?",Pt="[\\ufe0e\\ufe0f]?"+Rt+("(?:\\u200d(?:"+[Tt,wt,St].join("|")+")[\\ufe0e\\ufe0f]?"+Rt+")*"),Ct="(?:"+[_t,wt,St].join("|")+")"+Pt,It="(?:"+[Tt+gt+"?",gt,wt,St,ft].join("|")+")",Ot=RegExp("['’]","g"),Lt=RegExp(gt,"g"),Nt=RegExp(bt+"(?="+bt+")|"+It+Pt,"g"),Dt=RegExp([Et+"?"+yt+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[mt,Et,"$"].join("|")+")",At+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[mt,Et+Mt,"$"].join("|")+")",Et+"?"+Mt+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Et+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vt,Ct].join("|"),"g"),Ft=RegExp("[\\u200d\\ud800-\\udfff"+dt+"\\ufe0e\\ufe0f]"),Bt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ut=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],kt=-1,Gt={};Gt[E]=Gt[M]=Gt[A]=Gt[R]=Gt[P]=Gt[C]=Gt["[object Uint8ClampedArray]"]=Gt[I]=Gt[O]=!0,Gt[l]=Gt[u]=Gt[w]=Gt[h]=Gt[S]=Gt[c]=Gt[d]=Gt[p]=Gt[m]=Gt[g]=Gt[v]=Gt[_]=Gt[y]=Gt[x]=Gt[T]=!1;var Ht={};Ht[l]=Ht[u]=Ht[w]=Ht[S]=Ht[h]=Ht[c]=Ht[E]=Ht[M]=Ht[A]=Ht[R]=Ht[P]=Ht[m]=Ht[g]=Ht[v]=Ht[_]=Ht[y]=Ht[x]=Ht[b]=Ht[C]=Ht["[object Uint8ClampedArray]"]=Ht[I]=Ht[O]=!0,Ht[d]=Ht[p]=Ht[T]=!1;var zt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},jt=parseFloat,Vt=parseInt,Wt="object"==typeof t&&t&&t.Object===Object&&t,Xt="object"==typeof self&&self&&self.Object===Object&&self,qt=Wt||Xt||Function("return this")(),Yt=e&&!e.nodeType&&e,Zt=Yt&&"object"==typeof i&&i&&!i.nodeType&&i,Jt=Zt&&Zt.exports===Yt,Kt=Jt&&Wt.process,$t=function(){try{var t=Zt&&Zt.require&&Zt.require("util").types;return t||Kt&&Kt.binding&&Kt.binding("util")}catch(t){}}(),Qt=$t&&$t.isArrayBuffer,te=$t&&$t.isDate,ee=$t&&$t.isMap,ne=$t&&$t.isRegExp,ie=$t&&$t.isSet,re=$t&&$t.isTypedArray;function oe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function se(t,e,n,i){for(var r=-1,o=null==t?0:t.length;++r<o;){var s=t[r];e(i,s,n(s),t)}return i}function ae(t,e){for(var n=-1,i=null==t?0:t.length;++n<i&&!1!==e(t[n],n,t););return t}function le(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function ue(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(!e(t[n],n,t))return!1;return!0}function he(t,e){for(var n=-1,i=null==t?0:t.length,r=0,o=[];++n<i;){var s=t[n];e(s,n,t)&&(o[r++]=s)}return o}function ce(t,e){return!!(null==t?0:t.length)&&be(t,e,0)>-1}function de(t,e,n){for(var i=-1,r=null==t?0:t.length;++i<r;)if(n(e,t[i]))return!0;return!1}function pe(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r}function fe(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}function me(t,e,n,i){var r=-1,o=null==t?0:t.length;for(i&&o&&(n=t[++r]);++r<o;)n=e(n,t[r],r,t);return n}function ge(t,e,n,i){var r=null==t?0:t.length;for(i&&r&&(n=t[--r]);r--;)n=e(n,t[r],r,t);return n}function ve(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}var _e=Ee("length");function ye(t,e,n){var i;return n(t,(function(t,n,r){if(e(t,n,r))return i=n,!1})),i}function xe(t,e,n,i){for(var r=t.length,o=n+(i?1:-1);i?o--:++o<r;)if(e(t[o],o,t))return o;return-1}function be(t,e,n){return e==e?function(t,e,n){var i=n-1,r=t.length;for(;++i<r;)if(t[i]===e)return i;return-1}(t,e,n):xe(t,we,n)}function Te(t,e,n,i){for(var r=n-1,o=t.length;++r<o;)if(i(t[r],e))return r;return-1}function we(t){return t!=t}function Se(t,e){var n=null==t?0:t.length;return n?Re(t,e)/n:NaN}function Ee(t){return function(e){return null==e?void 0:e[t]}}function Me(t){return function(e){return null==t?void 0:t[e]}}function Ae(t,e,n,i,r){return r(t,(function(t,r,o){n=i?(i=!1,t):e(n,t,r,o)})),n}function Re(t,e){for(var n,i=-1,r=t.length;++i<r;){var o=e(t[i]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function Pe(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}function Ce(t){return t?t.slice(0,Ye(t)+1).replace(Y,""):t}function Ie(t){return function(e){return t(e)}}function Oe(t,e){return pe(e,(function(e){return t[e]}))}function Le(t,e){return t.has(e)}function Ne(t,e){for(var n=-1,i=t.length;++n<i&&be(e,t[n],0)>-1;);return n}function De(t,e){for(var n=t.length;n--&&be(e,t[n],0)>-1;);return n}function Fe(t,e){for(var n=t.length,i=0;n--;)t[n]===e&&++i;return i}var Be=Me({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ue=Me({"&":"&","<":"<",">":">",'"':""","'":"'"});function ke(t){return"\\"+zt[t]}function Ge(t){return Ft.test(t)}function He(t){var e=-1,n=Array(t.size);return t.forEach((function(t,i){n[++e]=[i,t]})),n}function ze(t,e){return function(n){return t(e(n))}}function je(t,e){for(var n=-1,i=t.length,r=0,o=[];++n<i;){var a=t[n];a!==e&&a!==s||(t[n]=s,o[r++]=n)}return o}function Ve(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function We(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function Xe(t){return Ge(t)?function(t){var e=Nt.lastIndex=0;for(;Nt.test(t);)++e;return e}(t):_e(t)}function qe(t){return Ge(t)?function(t){return t.match(Nt)||[]}(t):function(t){return t.split("")}(t)}function Ye(t){for(var e=t.length;e--&&Z.test(t.charAt(e)););return e}var Ze=Me({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Je=function t(e){var n,i=(e=null==e?qt:Je.defaults(qt.Object(),e,Je.pick(qt,Ut))).Array,r=e.Date,Z=e.Error,dt=e.Function,pt=e.Math,ft=e.Object,mt=e.RegExp,gt=e.String,vt=e.TypeError,_t=i.prototype,yt=dt.prototype,xt=ft.prototype,bt=e["__core-js_shared__"],Tt=yt.toString,wt=xt.hasOwnProperty,St=0,Et=(n=/[^.]+$/.exec(bt&&bt.keys&&bt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Mt=xt.toString,At=Tt.call(ft),Rt=qt._,Pt=mt("^"+Tt.call(wt).replace(X,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ct=Jt?e.Buffer:void 0,It=e.Symbol,Nt=e.Uint8Array,Ft=Ct?Ct.allocUnsafe:void 0,zt=ze(ft.getPrototypeOf,ft),Wt=ft.create,Xt=xt.propertyIsEnumerable,Yt=_t.splice,Zt=It?It.isConcatSpreadable:void 0,Kt=It?It.iterator:void 0,$t=It?It.toStringTag:void 0,_e=function(){try{var t=to(ft,"defineProperty");return t({},"",{}),t}catch(t){}}(),Me=e.clearTimeout!==qt.clearTimeout&&e.clearTimeout,Ke=r&&r.now!==qt.Date.now&&r.now,$e=e.setTimeout!==qt.setTimeout&&e.setTimeout,Qe=pt.ceil,tn=pt.floor,en=ft.getOwnPropertySymbols,nn=Ct?Ct.isBuffer:void 0,rn=e.isFinite,on=_t.join,sn=ze(ft.keys,ft),an=pt.max,ln=pt.min,un=r.now,hn=e.parseInt,cn=pt.random,dn=_t.reverse,pn=to(e,"DataView"),fn=to(e,"Map"),mn=to(e,"Promise"),gn=to(e,"Set"),vn=to(e,"WeakMap"),_n=to(ft,"create"),yn=vn&&new vn,xn={},bn=Ro(pn),Tn=Ro(fn),wn=Ro(mn),Sn=Ro(gn),En=Ro(vn),Mn=It?It.prototype:void 0,An=Mn?Mn.valueOf:void 0,Rn=Mn?Mn.toString:void 0;function Pn(t){if(Ws(t)&&!Ns(t)&&!(t instanceof Ln)){if(t instanceof On)return t;if(wt.call(t,"__wrapped__"))return Po(t)}return new On(t)}var Cn=function(){function t(){}return function(e){if(!Vs(e))return{};if(Wt)return Wt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function In(){}function On(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function Ln(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Nn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Dn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Fn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Bn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Fn;++e<n;)this.add(t[e])}function Un(t){var e=this.__data__=new Dn(t);this.size=e.size}function kn(t,e){var n=Ns(t),i=!n&&Ls(t),r=!n&&!i&&Us(t),o=!n&&!i&&!r&&Qs(t),s=n||i||r||o,a=s?Pe(t.length,gt):[],l=a.length;for(var u in t)!e&&!wt.call(t,u)||s&&("length"==u||r&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ao(u,l))||a.push(u);return a}function Gn(t){var e=t.length;return e?t[Bi(0,e-1)]:void 0}function Hn(t,e){return Eo(_r(t),Jn(e,0,t.length))}function zn(t){return Eo(_r(t))}function jn(t,e,n){(void 0!==n&&!Cs(t[e],n)||void 0===n&&!(e in t))&&Yn(t,e,n)}function Vn(t,e,n){var i=t[e];wt.call(t,e)&&Cs(i,n)&&(void 0!==n||e in t)||Yn(t,e,n)}function Wn(t,e){for(var n=t.length;n--;)if(Cs(t[n][0],e))return n;return-1}function Xn(t,e,n,i){return ei(t,(function(t,r,o){e(i,t,n(t),o)})),i}function qn(t,e){return t&&yr(e,ba(e),t)}function Yn(t,e,n){"__proto__"==e&&_e?_e(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Zn(t,e){for(var n=-1,r=e.length,o=i(r),s=null==t;++n<r;)o[n]=s?void 0:ga(t,e[n]);return o}function Jn(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}function Kn(t,e,n,i,r,o){var s,a=1&e,u=2&e,d=4&e;if(n&&(s=r?n(t,i,r,o):n(t)),void 0!==s)return s;if(!Vs(t))return t;var T=Ns(t);if(T){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&wt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!a)return _r(t,s)}else{var L=io(t),N=L==p||L==f;if(Us(t))return dr(t,a);if(L==v||L==l||N&&!r){if(s=u||N?{}:oo(t),!a)return u?function(t,e){return yr(t,no(t),e)}(t,function(t,e){return t&&yr(e,Ta(e),t)}(s,t)):function(t,e){return yr(t,eo(t),e)}(t,qn(s,t))}else{if(!Ht[L])return r?t:{};s=function(t,e,n){var i=t.constructor;switch(e){case w:return pr(t);case h:case c:return new i(+t);case S:return function(t,e){var n=e?pr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case E:case M:case A:case R:case P:case C:case"[object Uint8ClampedArray]":case I:case O:return fr(t,n);case m:return new i;case g:case x:return new i(t);case _:return function(t){var e=new t.constructor(t.source,it.exec(t));return e.lastIndex=t.lastIndex,e}(t);case y:return new i;case b:return r=t,An?ft(An.call(r)):{}}var r}(t,L,a)}}o||(o=new Un);var D=o.get(t);if(D)return D;o.set(t,s),Js(t)?t.forEach((function(i){s.add(Kn(i,e,n,i,t,o))})):Xs(t)&&t.forEach((function(i,r){s.set(r,Kn(i,e,n,r,t,o))}));var F=T?void 0:(d?u?qr:Xr:u?Ta:ba)(t);return ae(F||t,(function(i,r){F&&(i=t[r=i]),Vn(s,r,Kn(i,e,n,r,t,o))})),s}function $n(t,e,n){var i=n.length;if(null==t)return!i;for(t=ft(t);i--;){var r=n[i],o=e[r],s=t[r];if(void 0===s&&!(r in t)||!o(s))return!1}return!0}function Qn(t,e,n){if("function"!=typeof t)throw new vt(o);return bo((function(){t.apply(void 0,n)}),e)}function ti(t,e,n,i){var r=-1,o=ce,s=!0,a=t.length,l=[],u=e.length;if(!a)return l;n&&(e=pe(e,Ie(n))),i?(o=de,s=!1):e.length>=200&&(o=Le,s=!1,e=new Bn(e));t:for(;++r<a;){var h=t[r],c=null==n?h:n(h);if(h=i||0!==h?h:0,s&&c==c){for(var d=u;d--;)if(e[d]===c)continue t;l.push(h)}else o(e,c,i)||l.push(h)}return l}Pn.templateSettings={escape:G,evaluate:H,interpolate:z,variable:"",imports:{_:Pn}},Pn.prototype=In.prototype,Pn.prototype.constructor=Pn,On.prototype=Cn(In.prototype),On.prototype.constructor=On,Ln.prototype=Cn(In.prototype),Ln.prototype.constructor=Ln,Nn.prototype.clear=function(){this.__data__=_n?_n(null):{},this.size=0},Nn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Nn.prototype.get=function(t){var e=this.__data__;if(_n){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return wt.call(e,t)?e[t]:void 0},Nn.prototype.has=function(t){var e=this.__data__;return _n?void 0!==e[t]:wt.call(e,t)},Nn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=_n&&void 0===e?"__lodash_hash_undefined__":e,this},Dn.prototype.clear=function(){this.__data__=[],this.size=0},Dn.prototype.delete=function(t){var e=this.__data__,n=Wn(e,t);return!(n<0)&&(n==e.length-1?e.pop():Yt.call(e,n,1),--this.size,!0)},Dn.prototype.get=function(t){var e=this.__data__,n=Wn(e,t);return n<0?void 0:e[n][1]},Dn.prototype.has=function(t){return Wn(this.__data__,t)>-1},Dn.prototype.set=function(t,e){var n=this.__data__,i=Wn(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new Nn,map:new(fn||Dn),string:new Nn}},Fn.prototype.delete=function(t){var e=$r(this,t).delete(t);return this.size-=e?1:0,e},Fn.prototype.get=function(t){return $r(this,t).get(t)},Fn.prototype.has=function(t){return $r(this,t).has(t)},Fn.prototype.set=function(t,e){var n=$r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this},Bn.prototype.add=Bn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Bn.prototype.has=function(t){return this.__data__.has(t)},Un.prototype.clear=function(){this.__data__=new Dn,this.size=0},Un.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Un.prototype.get=function(t){return this.__data__.get(t)},Un.prototype.has=function(t){return this.__data__.has(t)},Un.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Dn){var i=n.__data__;if(!fn||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new Fn(i)}return n.set(t,e),this.size=n.size,this};var ei=Tr(ui),ni=Tr(hi,!0);function ii(t,e){var n=!0;return ei(t,(function(t,i,r){return n=!!e(t,i,r)})),n}function ri(t,e,n){for(var i=-1,r=t.length;++i<r;){var o=t[i],s=e(o);if(null!=s&&(void 0===a?s==s&&!$s(s):n(s,a)))var a=s,l=o}return l}function oi(t,e){var n=[];return ei(t,(function(t,i,r){e(t,i,r)&&n.push(t)})),n}function si(t,e,n,i,r){var o=-1,s=t.length;for(n||(n=so),r||(r=[]);++o<s;){var a=t[o];e>0&&n(a)?e>1?si(a,e-1,n,i,r):fe(r,a):i||(r[r.length]=a)}return r}var ai=wr(),li=wr(!0);function ui(t,e){return t&&ai(t,e,ba)}function hi(t,e){return t&&li(t,e,ba)}function ci(t,e){return he(e,(function(e){return Hs(t[e])}))}function di(t,e){for(var n=0,i=(e=lr(e,t)).length;null!=t&&n<i;)t=t[Ao(e[n++])];return n&&n==i?t:void 0}function pi(t,e,n){var i=e(t);return Ns(t)?i:fe(i,n(t))}function fi(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":$t&&$t in ft(t)?function(t){var e=wt.call(t,$t),n=t[$t];try{t[$t]=void 0;var i=!0}catch(t){}var r=Mt.call(t);i&&(e?t[$t]=n:delete t[$t]);return r}(t):function(t){return Mt.call(t)}(t)}function mi(t,e){return t>e}function gi(t,e){return null!=t&&wt.call(t,e)}function vi(t,e){return null!=t&&e in ft(t)}function _i(t,e,n){for(var r=n?de:ce,o=t[0].length,s=t.length,a=s,l=i(s),u=1/0,h=[];a--;){var c=t[a];a&&e&&(c=pe(c,Ie(e))),u=ln(c.length,u),l[a]=!n&&(e||o>=120&&c.length>=120)?new Bn(a&&c):void 0}c=t[0];var d=-1,p=l[0];t:for(;++d<o&&h.length<u;){var f=c[d],m=e?e(f):f;if(f=n||0!==f?f:0,!(p?Le(p,m):r(h,m,n))){for(a=s;--a;){var g=l[a];if(!(g?Le(g,m):r(t[a],m,n)))continue t}p&&p.push(m),h.push(f)}}return h}function yi(t,e,n){var i=null==(t=vo(t,e=lr(e,t)))?t:t[Ao(Go(e))];return null==i?void 0:oe(i,t,n)}function xi(t){return Ws(t)&&fi(t)==l}function bi(t,e,n,i,r){return t===e||(null==t||null==e||!Ws(t)&&!Ws(e)?t!=t&&e!=e:function(t,e,n,i,r,o){var s=Ns(t),a=Ns(e),p=s?u:io(t),f=a?u:io(e),T=(p=p==l?v:p)==v,E=(f=f==l?v:f)==v,M=p==f;if(M&&Us(t)){if(!Us(e))return!1;s=!0,T=!1}if(M&&!T)return o||(o=new Un),s||Qs(t)?Vr(t,e,n,i,r,o):function(t,e,n,i,r,o,s){switch(n){case S:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case w:return!(t.byteLength!=e.byteLength||!o(new Nt(t),new Nt(e)));case h:case c:case g:return Cs(+t,+e);case d:return t.name==e.name&&t.message==e.message;case _:case x:return t==e+"";case m:var a=He;case y:var l=1&i;if(a||(a=Ve),t.size!=e.size&&!l)return!1;var u=s.get(t);if(u)return u==e;i|=2,s.set(t,e);var p=Vr(a(t),a(e),i,r,o,s);return s.delete(t),p;case b:if(An)return An.call(t)==An.call(e)}return!1}(t,e,p,n,i,r,o);if(!(1&n)){var A=T&&wt.call(t,"__wrapped__"),R=E&&wt.call(e,"__wrapped__");if(A||R){var P=A?t.value():t,C=R?e.value():e;return o||(o=new Un),r(P,C,n,i,o)}}if(!M)return!1;return o||(o=new Un),function(t,e,n,i,r,o){var s=1&n,a=Xr(t),l=a.length,u=Xr(e).length;if(l!=u&&!s)return!1;var h=l;for(;h--;){var c=a[h];if(!(s?c in e:wt.call(e,c)))return!1}var d=o.get(t),p=o.get(e);if(d&&p)return d==e&&p==t;var f=!0;o.set(t,e),o.set(e,t);var m=s;for(;++h<l;){c=a[h];var g=t[c],v=e[c];if(i)var _=s?i(v,g,c,e,t,o):i(g,v,c,t,e,o);if(!(void 0===_?g===v||r(g,v,n,i,o):_)){f=!1;break}m||(m="constructor"==c)}if(f&&!m){var y=t.constructor,x=e.constructor;y==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof y&&y instanceof y&&"function"==typeof x&&x instanceof x||(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,i,r,o)}(t,e,n,i,bi,r))}function Ti(t,e,n,i){var r=n.length,o=r,s=!i;if(null==t)return!o;for(t=ft(t);r--;){var a=n[r];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++r<o;){var l=(a=n[r])[0],u=t[l],h=a[1];if(s&&a[2]){if(void 0===u&&!(l in t))return!1}else{var c=new Un;if(i)var d=i(u,h,l,t,e,c);if(!(void 0===d?bi(h,u,3,i,c):d))return!1}}return!0}function wi(t){return!(!Vs(t)||(e=t,Et&&Et in e))&&(Hs(t)?Pt:st).test(Ro(t));var e}function Si(t){return"function"==typeof t?t:null==t?qa:"object"==typeof t?Ns(t)?Ci(t[0],t[1]):Pi(t):nl(t)}function Ei(t){if(!po(t))return sn(t);var e=[];for(var n in ft(t))wt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Mi(t){if(!Vs(t))return function(t){var e=[];if(null!=t)for(var n in ft(t))e.push(n);return e}(t);var e=po(t),n=[];for(var i in t)("constructor"!=i||!e&&wt.call(t,i))&&n.push(i);return n}function Ai(t,e){return t<e}function Ri(t,e){var n=-1,r=Fs(t)?i(t.length):[];return ei(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function Pi(t){var e=Qr(t);return 1==e.length&&e[0][2]?mo(e[0][0],e[0][1]):function(n){return n===t||Ti(n,t,e)}}function Ci(t,e){return uo(t)&&fo(e)?mo(Ao(t),e):function(n){var i=ga(n,t);return void 0===i&&i===e?va(n,t):bi(e,i,3)}}function Ii(t,e,n,i,r){t!==e&&ai(e,(function(o,s){if(r||(r=new Un),Vs(o))!function(t,e,n,i,r,o,s){var a=yo(t,n),l=yo(e,n),u=s.get(l);if(u)return void jn(t,n,u);var h=o?o(a,l,n+"",t,e,s):void 0,c=void 0===h;if(c){var d=Ns(l),p=!d&&Us(l),f=!d&&!p&&Qs(l);h=l,d||p||f?Ns(a)?h=a:Bs(a)?h=_r(a):p?(c=!1,h=dr(l,!0)):f?(c=!1,h=fr(l,!0)):h=[]:Ys(l)||Ls(l)?(h=a,Ls(a)?h=aa(a):Vs(a)&&!Hs(a)||(h=oo(l))):c=!1}c&&(s.set(l,h),r(h,l,i,o,s),s.delete(l));jn(t,n,h)}(t,e,s,n,Ii,i,r);else{var a=i?i(yo(t,s),o,s+"",t,e,r):void 0;void 0===a&&(a=o),jn(t,s,a)}}),Ta)}function Oi(t,e){var n=t.length;if(n)return ao(e+=e<0?n:0,n)?t[e]:void 0}function Li(t,e,n){e=e.length?pe(e,(function(t){return Ns(t)?function(e){return di(e,1===t.length?t[0]:t)}:t})):[qa];var i=-1;return e=pe(e,Ie(Kr())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(Ri(t,(function(t,n,r){return{criteria:pe(e,(function(e){return e(t)})),index:++i,value:t}})),(function(t,e){return function(t,e,n){var i=-1,r=t.criteria,o=e.criteria,s=r.length,a=n.length;for(;++i<s;){var l=mr(r[i],o[i]);if(l){if(i>=a)return l;var u=n[i];return l*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)}))}function Ni(t,e,n){for(var i=-1,r=e.length,o={};++i<r;){var s=e[i],a=di(t,s);n(a,s)&&zi(o,lr(s,t),a)}return o}function Di(t,e,n,i){var r=i?Te:be,o=-1,s=e.length,a=t;for(t===e&&(e=_r(e)),n&&(a=pe(t,Ie(n)));++o<s;)for(var l=0,u=e[o],h=n?n(u):u;(l=r(a,h,l,i))>-1;)a!==t&&Yt.call(a,l,1),Yt.call(t,l,1);return t}function Fi(t,e){for(var n=t?e.length:0,i=n-1;n--;){var r=e[n];if(n==i||r!==o){var o=r;ao(r)?Yt.call(t,r,1):tr(t,r)}}return t}function Bi(t,e){return t+tn(cn()*(e-t+1))}function Ui(t,e){var n="";if(!t||e<1||e>9007199254740991)return n;do{e%2&&(n+=t),(e=tn(e/2))&&(t+=t)}while(e);return n}function ki(t,e){return To(go(t,e,qa),t+"")}function Gi(t){return Gn(Ca(t))}function Hi(t,e){var n=Ca(t);return Eo(n,Jn(e,0,n.length))}function zi(t,e,n,i){if(!Vs(t))return t;for(var r=-1,o=(e=lr(e,t)).length,s=o-1,a=t;null!=a&&++r<o;){var l=Ao(e[r]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(r!=s){var h=a[l];void 0===(u=i?i(h,l,a):void 0)&&(u=Vs(h)?h:ao(e[r+1])?[]:{})}Vn(a,l,u),a=a[l]}return t}var ji=yn?function(t,e){return yn.set(t,e),t}:qa,Vi=_e?function(t,e){return _e(t,"toString",{configurable:!0,enumerable:!1,value:Va(e),writable:!0})}:qa;function Wi(t){return Eo(Ca(t))}function Xi(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var s=i(o);++r<o;)s[r]=t[r+e];return s}function qi(t,e){var n;return ei(t,(function(t,i,r){return!(n=e(t,i,r))})),!!n}function Yi(t,e,n){var i=0,r=null==t?i:t.length;if("number"==typeof e&&e==e&&r<=2147483647){for(;i<r;){var o=i+r>>>1,s=t[o];null!==s&&!$s(s)&&(n?s<=e:s<e)?i=o+1:r=o}return r}return Zi(t,e,qa,n)}function Zi(t,e,n,i){var r=0,o=null==t?0:t.length;if(0===o)return 0;for(var s=(e=n(e))!=e,a=null===e,l=$s(e),u=void 0===e;r<o;){var h=tn((r+o)/2),c=n(t[h]),d=void 0!==c,p=null===c,f=c==c,m=$s(c);if(s)var g=i||f;else g=u?f&&(i||d):a?f&&d&&(i||!p):l?f&&d&&!p&&(i||!m):!p&&!m&&(i?c<=e:c<e);g?r=h+1:o=h}return ln(o,4294967294)}function Ji(t,e){for(var n=-1,i=t.length,r=0,o=[];++n<i;){var s=t[n],a=e?e(s):s;if(!n||!Cs(a,l)){var l=a;o[r++]=0===s?0:s}}return o}function Ki(t){return"number"==typeof t?t:$s(t)?NaN:+t}function $i(t){if("string"==typeof t)return t;if(Ns(t))return pe(t,$i)+"";if($s(t))return Rn?Rn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Qi(t,e,n){var i=-1,r=ce,o=t.length,s=!0,a=[],l=a;if(n)s=!1,r=de;else if(o>=200){var u=e?null:Ur(t);if(u)return Ve(u);s=!1,r=Le,l=new Bn}else l=e?[]:a;t:for(;++i<o;){var h=t[i],c=e?e(h):h;if(h=n||0!==h?h:0,s&&c==c){for(var d=l.length;d--;)if(l[d]===c)continue t;e&&l.push(c),a.push(h)}else r(l,c,n)||(l!==a&&l.push(c),a.push(h))}return a}function tr(t,e){return null==(t=vo(t,e=lr(e,t)))||delete t[Ao(Go(e))]}function er(t,e,n,i){return zi(t,e,n(di(t,e)),i)}function nr(t,e,n,i){for(var r=t.length,o=i?r:-1;(i?o--:++o<r)&&e(t[o],o,t););return n?Xi(t,i?0:o,i?o+1:r):Xi(t,i?o+1:0,i?r:o)}function ir(t,e){var n=t;return n instanceof Ln&&(n=n.value()),me(e,(function(t,e){return e.func.apply(e.thisArg,fe([t],e.args))}),n)}function rr(t,e,n){var r=t.length;if(r<2)return r?Qi(t[0]):[];for(var o=-1,s=i(r);++o<r;)for(var a=t[o],l=-1;++l<r;)l!=o&&(s[o]=ti(s[o]||a,t[l],e,n));return Qi(si(s,1),e,n)}function or(t,e,n){for(var i=-1,r=t.length,o=e.length,s={};++i<r;){var a=i<o?e[i]:void 0;n(s,t[i],a)}return s}function sr(t){return Bs(t)?t:[]}function ar(t){return"function"==typeof t?t:qa}function lr(t,e){return Ns(t)?t:uo(t,e)?[t]:Mo(la(t))}var ur=ki;function hr(t,e,n){var i=t.length;return n=void 0===n?i:n,!e&&n>=i?t:Xi(t,e,n)}var cr=Me||function(t){return qt.clearTimeout(t)};function dr(t,e){if(e)return t.slice();var n=t.length,i=Ft?Ft(n):new t.constructor(n);return t.copy(i),i}function pr(t){var e=new t.constructor(t.byteLength);return new Nt(e).set(new Nt(t)),e}function fr(t,e){var n=e?pr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function mr(t,e){if(t!==e){var n=void 0!==t,i=null===t,r=t==t,o=$s(t),s=void 0!==e,a=null===e,l=e==e,u=$s(e);if(!a&&!u&&!o&&t>e||o&&s&&l&&!a&&!u||i&&s&&l||!n&&l||!r)return 1;if(!i&&!o&&!u&&t<e||u&&n&&r&&!i&&!o||a&&n&&r||!s&&r||!l)return-1}return 0}function gr(t,e,n,r){for(var o=-1,s=t.length,a=n.length,l=-1,u=e.length,h=an(s-a,0),c=i(u+h),d=!r;++l<u;)c[l]=e[l];for(;++o<a;)(d||o<s)&&(c[n[o]]=t[o]);for(;h--;)c[l++]=t[o++];return c}function vr(t,e,n,r){for(var o=-1,s=t.length,a=-1,l=n.length,u=-1,h=e.length,c=an(s-l,0),d=i(c+h),p=!r;++o<c;)d[o]=t[o];for(var f=o;++u<h;)d[f+u]=e[u];for(;++a<l;)(p||o<s)&&(d[f+n[a]]=t[o++]);return d}function _r(t,e){var n=-1,r=t.length;for(e||(e=i(r));++n<r;)e[n]=t[n];return e}function yr(t,e,n,i){var r=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=i?i(n[a],t[a],a,n,t):void 0;void 0===l&&(l=t[a]),r?Yn(n,a,l):Vn(n,a,l)}return n}function xr(t,e){return function(n,i){var r=Ns(n)?se:Xn,o=e?e():{};return r(n,t,Kr(i,2),o)}}function br(t){return ki((function(e,n){var i=-1,r=n.length,o=r>1?n[r-1]:void 0,s=r>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,s&&lo(n[0],n[1],s)&&(o=r<3?void 0:o,r=1),e=ft(e);++i<r;){var a=n[i];a&&t(e,a,i,o)}return e}))}function Tr(t,e){return function(n,i){if(null==n)return n;if(!Fs(n))return t(n,i);for(var r=n.length,o=e?r:-1,s=ft(n);(e?o--:++o<r)&&!1!==i(s[o],o,s););return n}}function wr(t){return function(e,n,i){for(var r=-1,o=ft(e),s=i(e),a=s.length;a--;){var l=s[t?a:++r];if(!1===n(o[l],l,o))break}return e}}function Sr(t){return function(e){var n=Ge(e=la(e))?qe(e):void 0,i=n?n[0]:e.charAt(0),r=n?hr(n,1).join(""):e.slice(1);return i[t]()+r}}function Er(t){return function(e){return me(Ha(La(e).replace(Ot,"")),t,"")}}function Mr(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Cn(t.prototype),i=t.apply(n,e);return Vs(i)?i:n}}function Ar(t){return function(e,n,i){var r=ft(e);if(!Fs(e)){var o=Kr(n,3);e=ba(e),n=function(t){return o(r[t],t,r)}}var s=t(e,n,i);return s>-1?r[o?e[s]:s]:void 0}}function Rr(t){return Wr((function(e){var n=e.length,i=n,r=On.prototype.thru;for(t&&e.reverse();i--;){var s=e[i];if("function"!=typeof s)throw new vt(o);if(r&&!a&&"wrapper"==Zr(s))var a=new On([],!0)}for(i=a?i:n;++i<n;){var l=Zr(s=e[i]),u="wrapper"==l?Yr(s):void 0;a=u&&ho(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?a[Zr(u[0])].apply(a,u[3]):1==s.length&&ho(s)?a[l]():a.thru(s)}return function(){var t=arguments,i=t[0];if(a&&1==t.length&&Ns(i))return a.plant(i).value();for(var r=0,o=n?e[r].apply(this,t):i;++r<n;)o=e[r].call(this,o);return o}}))}function Pr(t,e,n,r,o,s,a,l,u,h){var c=128&e,d=1&e,p=2&e,f=24&e,m=512&e,g=p?void 0:Mr(t);return function v(){for(var _=arguments.length,y=i(_),x=_;x--;)y[x]=arguments[x];if(f)var b=Jr(v),T=Fe(y,b);if(r&&(y=gr(y,r,o,f)),s&&(y=vr(y,s,a,f)),_-=T,f&&_<h){var w=je(y,b);return Fr(t,e,Pr,v.placeholder,n,y,w,l,u,h-_)}var S=d?n:this,E=p?S[t]:t;return _=y.length,l?y=_o(y,l):m&&_>1&&y.reverse(),c&&u<_&&(y.length=u),this&&this!==qt&&this instanceof v&&(E=g||Mr(E)),E.apply(S,y)}}function Cr(t,e){return function(n,i){return function(t,e,n,i){return ui(t,(function(t,r,o){e(i,n(t),r,o)})),i}(n,t,e(i),{})}}function Ir(t,e){return function(n,i){var r;if(void 0===n&&void 0===i)return e;if(void 0!==n&&(r=n),void 0!==i){if(void 0===r)return i;"string"==typeof n||"string"==typeof i?(n=$i(n),i=$i(i)):(n=Ki(n),i=Ki(i)),r=t(n,i)}return r}}function Or(t){return Wr((function(e){return e=pe(e,Ie(Kr())),ki((function(n){var i=this;return t(e,(function(t){return oe(t,i,n)}))}))}))}function Lr(t,e){var n=(e=void 0===e?" ":$i(e)).length;if(n<2)return n?Ui(e,t):e;var i=Ui(e,Qe(t/Xe(e)));return Ge(e)?hr(qe(i),0,t).join(""):i.slice(0,t)}function Nr(t){return function(e,n,r){return r&&"number"!=typeof r&&lo(e,n,r)&&(n=r=void 0),e=ia(e),void 0===n?(n=e,e=0):n=ia(n),function(t,e,n,r){for(var o=-1,s=an(Qe((e-t)/(n||1)),0),a=i(s);s--;)a[r?s:++o]=t,t+=n;return a}(e,n,r=void 0===r?e<n?1:-1:ia(r),t)}}function Dr(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=sa(e),n=sa(n)),t(e,n)}}function Fr(t,e,n,i,r,o,s,a,l,u){var h=8&e;e|=h?32:64,4&(e&=~(h?64:32))||(e&=-4);var c=[t,e,r,h?o:void 0,h?s:void 0,h?void 0:o,h?void 0:s,a,l,u],d=n.apply(void 0,c);return ho(t)&&xo(d,c),d.placeholder=i,wo(d,t,e)}function Br(t){var e=pt[t];return function(t,n){if(t=sa(t),(n=null==n?0:ln(ra(n),292))&&rn(t)){var i=(la(t)+"e").split("e");return+((i=(la(e(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return e(t)}}var Ur=gn&&1/Ve(new gn([,-0]))[1]==1/0?function(t){return new gn(t)}:$a;function kr(t){return function(e){var n=io(e);return n==m?He(e):n==y?We(e):function(t,e){return pe(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Gr(t,e,n,r,a,l,u,h){var c=2&e;if(!c&&"function"!=typeof t)throw new vt(o);var d=r?r.length:0;if(d||(e&=-97,r=a=void 0),u=void 0===u?u:an(ra(u),0),h=void 0===h?h:ra(h),d-=a?a.length:0,64&e){var p=r,f=a;r=a=void 0}var m=c?void 0:Yr(t),g=[t,e,n,r,a,p,f,l,u,h];if(m&&function(t,e){var n=t[1],i=e[1],r=n|i,o=r<131,a=128==i&&8==n||128==i&&256==n&&t[7].length<=e[8]||384==i&&e[7].length<=e[8]&&8==n;if(!o&&!a)return t;1&i&&(t[2]=e[2],r|=1&n?0:4);var l=e[3];if(l){var u=t[3];t[3]=u?gr(u,l,e[4]):l,t[4]=u?je(t[3],s):e[4]}(l=e[5])&&(u=t[5],t[5]=u?vr(u,l,e[6]):l,t[6]=u?je(t[5],s):e[6]);(l=e[7])&&(t[7]=l);128&i&&(t[8]=null==t[8]?e[8]:ln(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=r}(g,m),t=g[0],e=g[1],n=g[2],r=g[3],a=g[4],!(h=g[9]=void 0===g[9]?c?0:t.length:an(g[9]-d,0))&&24&e&&(e&=-25),e&&1!=e)v=8==e||16==e?function(t,e,n){var r=Mr(t);return function o(){for(var s=arguments.length,a=i(s),l=s,u=Jr(o);l--;)a[l]=arguments[l];var h=s<3&&a[0]!==u&&a[s-1]!==u?[]:je(a,u);if((s-=h.length)<n)return Fr(t,e,Pr,o.placeholder,void 0,a,h,void 0,void 0,n-s);var c=this&&this!==qt&&this instanceof o?r:t;return oe(c,this,a)}}(t,e,h):32!=e&&33!=e||a.length?Pr.apply(void 0,g):function(t,e,n,r){var o=1&e,s=Mr(t);return function e(){for(var a=-1,l=arguments.length,u=-1,h=r.length,c=i(h+l),d=this&&this!==qt&&this instanceof e?s:t;++u<h;)c[u]=r[u];for(;l--;)c[u++]=arguments[++a];return oe(d,o?n:this,c)}}(t,e,n,r);else var v=function(t,e,n){var i=1&e,r=Mr(t);return function e(){var o=this&&this!==qt&&this instanceof e?r:t;return o.apply(i?n:this,arguments)}}(t,e,n);return wo((m?ji:xo)(v,g),t,e)}function Hr(t,e,n,i){return void 0===t||Cs(t,xt[n])&&!wt.call(i,n)?e:t}function zr(t,e,n,i,r,o){return Vs(t)&&Vs(e)&&(o.set(e,t),Ii(t,e,void 0,zr,o),o.delete(e)),t}function jr(t){return Ys(t)?void 0:t}function Vr(t,e,n,i,r,o){var s=1&n,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(t),h=o.get(e);if(u&&h)return u==e&&h==t;var c=-1,d=!0,p=2&n?new Bn:void 0;for(o.set(t,e),o.set(e,t);++c<a;){var f=t[c],m=e[c];if(i)var g=s?i(m,f,c,e,t,o):i(f,m,c,t,e,o);if(void 0!==g){if(g)continue;d=!1;break}if(p){if(!ve(e,(function(t,e){if(!Le(p,e)&&(f===t||r(f,t,n,i,o)))return p.push(e)}))){d=!1;break}}else if(f!==m&&!r(f,m,n,i,o)){d=!1;break}}return o.delete(t),o.delete(e),d}function Wr(t){return To(go(t,void 0,Do),t+"")}function Xr(t){return pi(t,ba,eo)}function qr(t){return pi(t,Ta,no)}var Yr=yn?function(t){return yn.get(t)}:$a;function Zr(t){for(var e=t.name+"",n=xn[e],i=wt.call(xn,e)?n.length:0;i--;){var r=n[i],o=r.func;if(null==o||o==t)return r.name}return e}function Jr(t){return(wt.call(Pn,"placeholder")?Pn:t).placeholder}function Kr(){var t=Pn.iteratee||Ya;return t=t===Ya?Si:t,arguments.length?t(arguments[0],arguments[1]):t}function $r(t,e){var n,i,r=t.__data__;return("string"==(i=typeof(n=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof e?"string":"hash"]:r.map}function Qr(t){for(var e=ba(t),n=e.length;n--;){var i=e[n],r=t[i];e[n]=[i,r,fo(r)]}return e}function to(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return wi(n)?n:void 0}var eo=en?function(t){return null==t?[]:(t=ft(t),he(en(t),(function(e){return Xt.call(t,e)})))}:ol,no=en?function(t){for(var e=[];t;)fe(e,eo(t)),t=zt(t);return e}:ol,io=fi;function ro(t,e,n){for(var i=-1,r=(e=lr(e,t)).length,o=!1;++i<r;){var s=Ao(e[i]);if(!(o=null!=t&&n(t,s)))break;t=t[s]}return o||++i!=r?o:!!(r=null==t?0:t.length)&&js(r)&&ao(s,r)&&(Ns(t)||Ls(t))}function oo(t){return"function"!=typeof t.constructor||po(t)?{}:Cn(zt(t))}function so(t){return Ns(t)||Ls(t)||!!(Zt&&t&&t[Zt])}function ao(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&<.test(t))&&t>-1&&t%1==0&&t<e}function lo(t,e,n){if(!Vs(n))return!1;var i=typeof e;return!!("number"==i?Fs(n)&&ao(e,n.length):"string"==i&&e in n)&&Cs(n[e],t)}function uo(t,e){if(Ns(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!$s(t))||(V.test(t)||!j.test(t)||null!=e&&t in ft(e))}function ho(t){var e=Zr(t),n=Pn[e];if("function"!=typeof n||!(e in Ln.prototype))return!1;if(t===n)return!0;var i=Yr(n);return!!i&&t===i[0]}(pn&&io(new pn(new ArrayBuffer(1)))!=S||fn&&io(new fn)!=m||mn&&"[object Promise]"!=io(mn.resolve())||gn&&io(new gn)!=y||vn&&io(new vn)!=T)&&(io=function(t){var e=fi(t),n=e==v?t.constructor:void 0,i=n?Ro(n):"";if(i)switch(i){case bn:return S;case Tn:return m;case wn:return"[object Promise]";case Sn:return y;case En:return T}return e});var co=bt?Hs:sl;function po(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||xt)}function fo(t){return t==t&&!Vs(t)}function mo(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in ft(n)))}}function go(t,e,n){return e=an(void 0===e?t.length-1:e,0),function(){for(var r=arguments,o=-1,s=an(r.length-e,0),a=i(s);++o<s;)a[o]=r[e+o];o=-1;for(var l=i(e+1);++o<e;)l[o]=r[o];return l[e]=n(a),oe(t,this,l)}}function vo(t,e){return e.length<2?t:di(t,Xi(e,0,-1))}function _o(t,e){for(var n=t.length,i=ln(e.length,n),r=_r(t);i--;){var o=e[i];t[i]=ao(o,n)?r[o]:void 0}return t}function yo(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var xo=So(ji),bo=$e||function(t,e){return qt.setTimeout(t,e)},To=So(Vi);function wo(t,e,n){var i=e+"";return To(t,function(t,e){var n=e.length;if(!n)return t;var i=n-1;return e[i]=(n>1?"& ":"")+e[i],e=e.join(n>2?", ":" "),t.replace(J,"{\n/* [wrapped with "+e+"] */\n")}(i,function(t,e){return ae(a,(function(n){var i="_."+n[0];e&n[1]&&!ce(t,i)&&t.push(i)})),t.sort()}(function(t){var e=t.match(K);return e?e[1].split($):[]}(i),n)))}function So(t){var e=0,n=0;return function(){var i=un(),r=16-(i-n);if(n=i,r>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Eo(t,e){var n=-1,i=t.length,r=i-1;for(e=void 0===e?i:e;++n<e;){var o=Bi(n,r),s=t[o];t[o]=t[n],t[n]=s}return t.length=e,t}var Mo=function(t){var e=Ss(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(W,(function(t,n,i,r){e.push(i?r.replace(et,"$1"):n||t)})),e}));function Ao(t){if("string"==typeof t||$s(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Ro(t){if(null!=t){try{return Tt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Po(t){if(t instanceof Ln)return t.clone();var e=new On(t.__wrapped__,t.__chain__);return e.__actions__=_r(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Co=ki((function(t,e){return Bs(t)?ti(t,si(e,1,Bs,!0)):[]})),Io=ki((function(t,e){var n=Go(e);return Bs(n)&&(n=void 0),Bs(t)?ti(t,si(e,1,Bs,!0),Kr(n,2)):[]})),Oo=ki((function(t,e){var n=Go(e);return Bs(n)&&(n=void 0),Bs(t)?ti(t,si(e,1,Bs,!0),void 0,n):[]}));function Lo(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=null==n?0:ra(n);return r<0&&(r=an(i+r,0)),xe(t,Kr(e,3),r)}function No(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=i-1;return void 0!==n&&(r=ra(n),r=n<0?an(i+r,0):ln(r,i-1)),xe(t,Kr(e,3),r,!0)}function Do(t){return(null==t?0:t.length)?si(t,1):[]}function Fo(t){return t&&t.length?t[0]:void 0}var Bo=ki((function(t){var e=pe(t,sr);return e.length&&e[0]===t[0]?_i(e):[]})),Uo=ki((function(t){var e=Go(t),n=pe(t,sr);return e===Go(n)?e=void 0:n.pop(),n.length&&n[0]===t[0]?_i(n,Kr(e,2)):[]})),ko=ki((function(t){var e=Go(t),n=pe(t,sr);return(e="function"==typeof e?e:void 0)&&n.pop(),n.length&&n[0]===t[0]?_i(n,void 0,e):[]}));function Go(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var Ho=ki(zo);function zo(t,e){return t&&t.length&&e&&e.length?Di(t,e):t}var jo=Wr((function(t,e){var n=null==t?0:t.length,i=Zn(t,e);return Fi(t,pe(e,(function(t){return ao(t,n)?+t:t})).sort(mr)),i}));function Vo(t){return null==t?t:dn.call(t)}var Wo=ki((function(t){return Qi(si(t,1,Bs,!0))})),Xo=ki((function(t){var e=Go(t);return Bs(e)&&(e=void 0),Qi(si(t,1,Bs,!0),Kr(e,2))})),qo=ki((function(t){var e=Go(t);return e="function"==typeof e?e:void 0,Qi(si(t,1,Bs,!0),void 0,e)}));function Yo(t){if(!t||!t.length)return[];var e=0;return t=he(t,(function(t){if(Bs(t))return e=an(t.length,e),!0})),Pe(e,(function(e){return pe(t,Ee(e))}))}function Zo(t,e){if(!t||!t.length)return[];var n=Yo(t);return null==e?n:pe(n,(function(t){return oe(e,void 0,t)}))}var Jo=ki((function(t,e){return Bs(t)?ti(t,e):[]})),Ko=ki((function(t){return rr(he(t,Bs))})),$o=ki((function(t){var e=Go(t);return Bs(e)&&(e=void 0),rr(he(t,Bs),Kr(e,2))})),Qo=ki((function(t){var e=Go(t);return e="function"==typeof e?e:void 0,rr(he(t,Bs),void 0,e)})),ts=ki(Yo);var es=ki((function(t){var e=t.length,n=e>1?t[e-1]:void 0;return n="function"==typeof n?(t.pop(),n):void 0,Zo(t,n)}));function ns(t){var e=Pn(t);return e.__chain__=!0,e}function is(t,e){return e(t)}var rs=Wr((function(t){var e=t.length,n=e?t[0]:0,i=this.__wrapped__,r=function(e){return Zn(e,t)};return!(e>1||this.__actions__.length)&&i instanceof Ln&&ao(n)?((i=i.slice(n,+n+(e?1:0))).__actions__.push({func:is,args:[r],thisArg:void 0}),new On(i,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(r)}));var os=xr((function(t,e,n){wt.call(t,n)?++t[n]:Yn(t,n,1)}));var ss=Ar(Lo),as=Ar(No);function ls(t,e){return(Ns(t)?ae:ei)(t,Kr(e,3))}function us(t,e){return(Ns(t)?le:ni)(t,Kr(e,3))}var hs=xr((function(t,e,n){wt.call(t,n)?t[n].push(e):Yn(t,n,[e])}));var cs=ki((function(t,e,n){var r=-1,o="function"==typeof e,s=Fs(t)?i(t.length):[];return ei(t,(function(t){s[++r]=o?oe(e,t,n):yi(t,e,n)})),s})),ds=xr((function(t,e,n){Yn(t,n,e)}));function ps(t,e){return(Ns(t)?pe:Ri)(t,Kr(e,3))}var fs=xr((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var ms=ki((function(t,e){if(null==t)return[];var n=e.length;return n>1&&lo(t,e[0],e[1])?e=[]:n>2&&lo(e[0],e[1],e[2])&&(e=[e[0]]),Li(t,si(e,1),[])})),gs=Ke||function(){return qt.Date.now()};function vs(t,e,n){return e=n?void 0:e,Gr(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function _s(t,e){var n;if("function"!=typeof e)throw new vt(o);return t=ra(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var ys=ki((function(t,e,n){var i=1;if(n.length){var r=je(n,Jr(ys));i|=32}return Gr(t,i,e,n,r)})),xs=ki((function(t,e,n){var i=3;if(n.length){var r=je(n,Jr(xs));i|=32}return Gr(e,i,t,n,r)}));function bs(t,e,n){var i,r,s,a,l,u,h=0,c=!1,d=!1,p=!0;if("function"!=typeof t)throw new vt(o);function f(e){var n=i,o=r;return i=r=void 0,h=e,a=t.apply(o,n)}function m(t){return h=t,l=bo(v,e),c?f(t):a}function g(t){var n=t-u;return void 0===u||n>=e||n<0||d&&t-h>=s}function v(){var t=gs();if(g(t))return _(t);l=bo(v,function(t){var n=e-(t-u);return d?ln(n,s-(t-h)):n}(t))}function _(t){return l=void 0,p&&i?f(t):(i=r=void 0,a)}function y(){var t=gs(),n=g(t);if(i=arguments,r=this,u=t,n){if(void 0===l)return m(u);if(d)return cr(l),l=bo(v,e),f(u)}return void 0===l&&(l=bo(v,e)),a}return e=sa(e)||0,Vs(n)&&(c=!!n.leading,s=(d="maxWait"in n)?an(sa(n.maxWait)||0,e):s,p="trailing"in n?!!n.trailing:p),y.cancel=function(){void 0!==l&&cr(l),h=0,i=u=r=l=void 0},y.flush=function(){return void 0===l?a:_(gs())},y}var Ts=ki((function(t,e){return Qn(t,1,e)})),ws=ki((function(t,e,n){return Qn(t,sa(e)||0,n)}));function Ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new vt(o);var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=t.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(Ss.Cache||Fn),n}function Es(t){if("function"!=typeof t)throw new vt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ss.Cache=Fn;var Ms=ur((function(t,e){var n=(e=1==e.length&&Ns(e[0])?pe(e[0],Ie(Kr())):pe(si(e,1),Ie(Kr()))).length;return ki((function(i){for(var r=-1,o=ln(i.length,n);++r<o;)i[r]=e[r].call(this,i[r]);return oe(t,this,i)}))})),As=ki((function(t,e){return Gr(t,32,void 0,e,je(e,Jr(As)))})),Rs=ki((function(t,e){return Gr(t,64,void 0,e,je(e,Jr(Rs)))})),Ps=Wr((function(t,e){return Gr(t,256,void 0,void 0,void 0,e)}));function Cs(t,e){return t===e||t!=t&&e!=e}var Is=Dr(mi),Os=Dr((function(t,e){return t>=e})),Ls=xi(function(){return arguments}())?xi:function(t){return Ws(t)&&wt.call(t,"callee")&&!Xt.call(t,"callee")},Ns=i.isArray,Ds=Qt?Ie(Qt):function(t){return Ws(t)&&fi(t)==w};function Fs(t){return null!=t&&js(t.length)&&!Hs(t)}function Bs(t){return Ws(t)&&Fs(t)}var Us=nn||sl,ks=te?Ie(te):function(t){return Ws(t)&&fi(t)==c};function Gs(t){if(!Ws(t))return!1;var e=fi(t);return e==d||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Ys(t)}function Hs(t){if(!Vs(t))return!1;var e=fi(t);return e==p||e==f||"[object AsyncFunction]"==e||"[object Proxy]"==e}function zs(t){return"number"==typeof t&&t==ra(t)}function js(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Vs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ws(t){return null!=t&&"object"==typeof t}var Xs=ee?Ie(ee):function(t){return Ws(t)&&io(t)==m};function qs(t){return"number"==typeof t||Ws(t)&&fi(t)==g}function Ys(t){if(!Ws(t)||fi(t)!=v)return!1;var e=zt(t);if(null===e)return!0;var n=wt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Tt.call(n)==At}var Zs=ne?Ie(ne):function(t){return Ws(t)&&fi(t)==_};var Js=ie?Ie(ie):function(t){return Ws(t)&&io(t)==y};function Ks(t){return"string"==typeof t||!Ns(t)&&Ws(t)&&fi(t)==x}function $s(t){return"symbol"==typeof t||Ws(t)&&fi(t)==b}var Qs=re?Ie(re):function(t){return Ws(t)&&js(t.length)&&!!Gt[fi(t)]};var ta=Dr(Ai),ea=Dr((function(t,e){return t<=e}));function na(t){if(!t)return[];if(Fs(t))return Ks(t)?qe(t):_r(t);if(Kt&&t[Kt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Kt]());var e=io(t);return(e==m?He:e==y?Ve:Ca)(t)}function ia(t){return t?(t=sa(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ra(t){var e=ia(t),n=e%1;return e==e?n?e-n:e:0}function oa(t){return t?Jn(ra(t),0,4294967295):0}function sa(t){if("number"==typeof t)return t;if($s(t))return NaN;if(Vs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Vs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ce(t);var n=ot.test(t);return n||at.test(t)?Vt(t.slice(2),n?2:8):rt.test(t)?NaN:+t}function aa(t){return yr(t,Ta(t))}function la(t){return null==t?"":$i(t)}var ua=br((function(t,e){if(po(e)||Fs(e))yr(e,ba(e),t);else for(var n in e)wt.call(e,n)&&Vn(t,n,e[n])})),ha=br((function(t,e){yr(e,Ta(e),t)})),ca=br((function(t,e,n,i){yr(e,Ta(e),t,i)})),da=br((function(t,e,n,i){yr(e,ba(e),t,i)})),pa=Wr(Zn);var fa=ki((function(t,e){t=ft(t);var n=-1,i=e.length,r=i>2?e[2]:void 0;for(r&&lo(e[0],e[1],r)&&(i=1);++n<i;)for(var o=e[n],s=Ta(o),a=-1,l=s.length;++a<l;){var u=s[a],h=t[u];(void 0===h||Cs(h,xt[u])&&!wt.call(t,u))&&(t[u]=o[u])}return t})),ma=ki((function(t){return t.push(void 0,zr),oe(Sa,void 0,t)}));function ga(t,e,n){var i=null==t?void 0:di(t,e);return void 0===i?n:i}function va(t,e){return null!=t&&ro(t,e,vi)}var _a=Cr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Mt.call(e)),t[e]=n}),Va(qa)),ya=Cr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Mt.call(e)),wt.call(t,e)?t[e].push(n):t[e]=[n]}),Kr),xa=ki(yi);function ba(t){return Fs(t)?kn(t):Ei(t)}function Ta(t){return Fs(t)?kn(t,!0):Mi(t)}var wa=br((function(t,e,n){Ii(t,e,n)})),Sa=br((function(t,e,n,i){Ii(t,e,n,i)})),Ea=Wr((function(t,e){var n={};if(null==t)return n;var i=!1;e=pe(e,(function(e){return e=lr(e,t),i||(i=e.length>1),e})),yr(t,qr(t),n),i&&(n=Kn(n,7,jr));for(var r=e.length;r--;)tr(n,e[r]);return n}));var Ma=Wr((function(t,e){return null==t?{}:function(t,e){return Ni(t,e,(function(e,n){return va(t,n)}))}(t,e)}));function Aa(t,e){if(null==t)return{};var n=pe(qr(t),(function(t){return[t]}));return e=Kr(e),Ni(t,n,(function(t,n){return e(t,n[0])}))}var Ra=kr(ba),Pa=kr(Ta);function Ca(t){return null==t?[]:Oe(t,ba(t))}var Ia=Er((function(t,e,n){return e=e.toLowerCase(),t+(n?Oa(e):e)}));function Oa(t){return Ga(la(t).toLowerCase())}function La(t){return(t=la(t))&&t.replace(ut,Be).replace(Lt,"")}var Na=Er((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Da=Er((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Fa=Sr("toLowerCase");var Ba=Er((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Ua=Er((function(t,e,n){return t+(n?" ":"")+Ga(e)}));var ka=Er((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Ga=Sr("toUpperCase");function Ha(t,e,n){return t=la(t),void 0===(e=n?void 0:e)?function(t){return Bt.test(t)}(t)?function(t){return t.match(Dt)||[]}(t):function(t){return t.match(Q)||[]}(t):t.match(e)||[]}var za=ki((function(t,e){try{return oe(t,void 0,e)}catch(t){return Gs(t)?t:new Z(t)}})),ja=Wr((function(t,e){return ae(e,(function(e){e=Ao(e),Yn(t,e,ys(t[e],t))})),t}));function Va(t){return function(){return t}}var Wa=Rr(),Xa=Rr(!0);function qa(t){return t}function Ya(t){return Si("function"==typeof t?t:Kn(t,1))}var Za=ki((function(t,e){return function(n){return yi(n,t,e)}})),Ja=ki((function(t,e){return function(n){return yi(t,n,e)}}));function Ka(t,e,n){var i=ba(e),r=ci(e,i);null!=n||Vs(e)&&(r.length||!i.length)||(n=e,e=t,t=this,r=ci(e,ba(e)));var o=!(Vs(n)&&"chain"in n&&!n.chain),s=Hs(t);return ae(r,(function(n){var i=e[n];t[n]=i,s&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),r=n.__actions__=_r(this.__actions__);return r.push({func:i,args:arguments,thisArg:t}),n.__chain__=e,n}return i.apply(t,fe([this.value()],arguments))})})),t}function $a(){}var Qa=Or(pe),tl=Or(ue),el=Or(ve);function nl(t){return uo(t)?Ee(Ao(t)):function(t){return function(e){return di(e,t)}}(t)}var il=Nr(),rl=Nr(!0);function ol(){return[]}function sl(){return!1}var al=Ir((function(t,e){return t+e}),0),ll=Br("ceil"),ul=Ir((function(t,e){return t/e}),1),hl=Br("floor");var cl,dl=Ir((function(t,e){return t*e}),1),pl=Br("round"),fl=Ir((function(t,e){return t-e}),0);return Pn.after=function(t,e){if("function"!=typeof e)throw new vt(o);return t=ra(t),function(){if(--t<1)return e.apply(this,arguments)}},Pn.ary=vs,Pn.assign=ua,Pn.assignIn=ha,Pn.assignInWith=ca,Pn.assignWith=da,Pn.at=pa,Pn.before=_s,Pn.bind=ys,Pn.bindAll=ja,Pn.bindKey=xs,Pn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ns(t)?t:[t]},Pn.chain=ns,Pn.chunk=function(t,e,n){e=(n?lo(t,e,n):void 0===e)?1:an(ra(e),0);var r=null==t?0:t.length;if(!r||e<1)return[];for(var o=0,s=0,a=i(Qe(r/e));o<r;)a[s++]=Xi(t,o,o+=e);return a},Pn.compact=function(t){for(var e=-1,n=null==t?0:t.length,i=0,r=[];++e<n;){var o=t[e];o&&(r[i++]=o)}return r},Pn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=i(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return fe(Ns(n)?_r(n):[n],si(e,1))},Pn.cond=function(t){var e=null==t?0:t.length,n=Kr();return t=e?pe(t,(function(t){if("function"!=typeof t[1])throw new vt(o);return[n(t[0]),t[1]]})):[],ki((function(n){for(var i=-1;++i<e;){var r=t[i];if(oe(r[0],this,n))return oe(r[1],this,n)}}))},Pn.conforms=function(t){return function(t){var e=ba(t);return function(n){return $n(n,t,e)}}(Kn(t,1))},Pn.constant=Va,Pn.countBy=os,Pn.create=function(t,e){var n=Cn(t);return null==e?n:qn(n,e)},Pn.curry=function t(e,n,i){var r=Gr(e,8,void 0,void 0,void 0,void 0,void 0,n=i?void 0:n);return r.placeholder=t.placeholder,r},Pn.curryRight=function t(e,n,i){var r=Gr(e,16,void 0,void 0,void 0,void 0,void 0,n=i?void 0:n);return r.placeholder=t.placeholder,r},Pn.debounce=bs,Pn.defaults=fa,Pn.defaultsDeep=ma,Pn.defer=Ts,Pn.delay=ws,Pn.difference=Co,Pn.differenceBy=Io,Pn.differenceWith=Oo,Pn.drop=function(t,e,n){var i=null==t?0:t.length;return i?Xi(t,(e=n||void 0===e?1:ra(e))<0?0:e,i):[]},Pn.dropRight=function(t,e,n){var i=null==t?0:t.length;return i?Xi(t,0,(e=i-(e=n||void 0===e?1:ra(e)))<0?0:e):[]},Pn.dropRightWhile=function(t,e){return t&&t.length?nr(t,Kr(e,3),!0,!0):[]},Pn.dropWhile=function(t,e){return t&&t.length?nr(t,Kr(e,3),!0):[]},Pn.fill=function(t,e,n,i){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&lo(t,e,n)&&(n=0,i=r),function(t,e,n,i){var r=t.length;for((n=ra(n))<0&&(n=-n>r?0:r+n),(i=void 0===i||i>r?r:ra(i))<0&&(i+=r),i=n>i?0:oa(i);n<i;)t[n++]=e;return t}(t,e,n,i)):[]},Pn.filter=function(t,e){return(Ns(t)?he:oi)(t,Kr(e,3))},Pn.flatMap=function(t,e){return si(ps(t,e),1)},Pn.flatMapDeep=function(t,e){return si(ps(t,e),1/0)},Pn.flatMapDepth=function(t,e,n){return n=void 0===n?1:ra(n),si(ps(t,e),n)},Pn.flatten=Do,Pn.flattenDeep=function(t){return(null==t?0:t.length)?si(t,1/0):[]},Pn.flattenDepth=function(t,e){return(null==t?0:t.length)?si(t,e=void 0===e?1:ra(e)):[]},Pn.flip=function(t){return Gr(t,512)},Pn.flow=Wa,Pn.flowRight=Xa,Pn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,i={};++e<n;){var r=t[e];i[r[0]]=r[1]}return i},Pn.functions=function(t){return null==t?[]:ci(t,ba(t))},Pn.functionsIn=function(t){return null==t?[]:ci(t,Ta(t))},Pn.groupBy=hs,Pn.initial=function(t){return(null==t?0:t.length)?Xi(t,0,-1):[]},Pn.intersection=Bo,Pn.intersectionBy=Uo,Pn.intersectionWith=ko,Pn.invert=_a,Pn.invertBy=ya,Pn.invokeMap=cs,Pn.iteratee=Ya,Pn.keyBy=ds,Pn.keys=ba,Pn.keysIn=Ta,Pn.map=ps,Pn.mapKeys=function(t,e){var n={};return e=Kr(e,3),ui(t,(function(t,i,r){Yn(n,e(t,i,r),t)})),n},Pn.mapValues=function(t,e){var n={};return e=Kr(e,3),ui(t,(function(t,i,r){Yn(n,i,e(t,i,r))})),n},Pn.matches=function(t){return Pi(Kn(t,1))},Pn.matchesProperty=function(t,e){return Ci(t,Kn(e,1))},Pn.memoize=Ss,Pn.merge=wa,Pn.mergeWith=Sa,Pn.method=Za,Pn.methodOf=Ja,Pn.mixin=Ka,Pn.negate=Es,Pn.nthArg=function(t){return t=ra(t),ki((function(e){return Oi(e,t)}))},Pn.omit=Ea,Pn.omitBy=function(t,e){return Aa(t,Es(Kr(e)))},Pn.once=function(t){return _s(2,t)},Pn.orderBy=function(t,e,n,i){return null==t?[]:(Ns(e)||(e=null==e?[]:[e]),Ns(n=i?void 0:n)||(n=null==n?[]:[n]),Li(t,e,n))},Pn.over=Qa,Pn.overArgs=Ms,Pn.overEvery=tl,Pn.overSome=el,Pn.partial=As,Pn.partialRight=Rs,Pn.partition=fs,Pn.pick=Ma,Pn.pickBy=Aa,Pn.property=nl,Pn.propertyOf=function(t){return function(e){return null==t?void 0:di(t,e)}},Pn.pull=Ho,Pn.pullAll=zo,Pn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Di(t,e,Kr(n,2)):t},Pn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Di(t,e,void 0,n):t},Pn.pullAt=jo,Pn.range=il,Pn.rangeRight=rl,Pn.rearg=Ps,Pn.reject=function(t,e){return(Ns(t)?he:oi)(t,Es(Kr(e,3)))},Pn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var i=-1,r=[],o=t.length;for(e=Kr(e,3);++i<o;){var s=t[i];e(s,i,t)&&(n.push(s),r.push(i))}return Fi(t,r),n},Pn.rest=function(t,e){if("function"!=typeof t)throw new vt(o);return ki(t,e=void 0===e?e:ra(e))},Pn.reverse=Vo,Pn.sampleSize=function(t,e,n){return e=(n?lo(t,e,n):void 0===e)?1:ra(e),(Ns(t)?Hn:Hi)(t,e)},Pn.set=function(t,e,n){return null==t?t:zi(t,e,n)},Pn.setWith=function(t,e,n,i){return i="function"==typeof i?i:void 0,null==t?t:zi(t,e,n,i)},Pn.shuffle=function(t){return(Ns(t)?zn:Wi)(t)},Pn.slice=function(t,e,n){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&lo(t,e,n)?(e=0,n=i):(e=null==e?0:ra(e),n=void 0===n?i:ra(n)),Xi(t,e,n)):[]},Pn.sortBy=ms,Pn.sortedUniq=function(t){return t&&t.length?Ji(t):[]},Pn.sortedUniqBy=function(t,e){return t&&t.length?Ji(t,Kr(e,2)):[]},Pn.split=function(t,e,n){return n&&"number"!=typeof n&&lo(t,e,n)&&(e=n=void 0),(n=void 0===n?4294967295:n>>>0)?(t=la(t))&&("string"==typeof e||null!=e&&!Zs(e))&&!(e=$i(e))&&Ge(t)?hr(qe(t),0,n):t.split(e,n):[]},Pn.spread=function(t,e){if("function"!=typeof t)throw new vt(o);return e=null==e?0:an(ra(e),0),ki((function(n){var i=n[e],r=hr(n,0,e);return i&&fe(r,i),oe(t,this,r)}))},Pn.tail=function(t){var e=null==t?0:t.length;return e?Xi(t,1,e):[]},Pn.take=function(t,e,n){return t&&t.length?Xi(t,0,(e=n||void 0===e?1:ra(e))<0?0:e):[]},Pn.takeRight=function(t,e,n){var i=null==t?0:t.length;return i?Xi(t,(e=i-(e=n||void 0===e?1:ra(e)))<0?0:e,i):[]},Pn.takeRightWhile=function(t,e){return t&&t.length?nr(t,Kr(e,3),!1,!0):[]},Pn.takeWhile=function(t,e){return t&&t.length?nr(t,Kr(e,3)):[]},Pn.tap=function(t,e){return e(t),t},Pn.throttle=function(t,e,n){var i=!0,r=!0;if("function"!=typeof t)throw new vt(o);return Vs(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),bs(t,e,{leading:i,maxWait:e,trailing:r})},Pn.thru=is,Pn.toArray=na,Pn.toPairs=Ra,Pn.toPairsIn=Pa,Pn.toPath=function(t){return Ns(t)?pe(t,Ao):$s(t)?[t]:_r(Mo(la(t)))},Pn.toPlainObject=aa,Pn.transform=function(t,e,n){var i=Ns(t),r=i||Us(t)||Qs(t);if(e=Kr(e,4),null==n){var o=t&&t.constructor;n=r?i?new o:[]:Vs(t)&&Hs(o)?Cn(zt(t)):{}}return(r?ae:ui)(t,(function(t,i,r){return e(n,t,i,r)})),n},Pn.unary=function(t){return vs(t,1)},Pn.union=Wo,Pn.unionBy=Xo,Pn.unionWith=qo,Pn.uniq=function(t){return t&&t.length?Qi(t):[]},Pn.uniqBy=function(t,e){return t&&t.length?Qi(t,Kr(e,2)):[]},Pn.uniqWith=function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?Qi(t,void 0,e):[]},Pn.unset=function(t,e){return null==t||tr(t,e)},Pn.unzip=Yo,Pn.unzipWith=Zo,Pn.update=function(t,e,n){return null==t?t:er(t,e,ar(n))},Pn.updateWith=function(t,e,n,i){return i="function"==typeof i?i:void 0,null==t?t:er(t,e,ar(n),i)},Pn.values=Ca,Pn.valuesIn=function(t){return null==t?[]:Oe(t,Ta(t))},Pn.without=Jo,Pn.words=Ha,Pn.wrap=function(t,e){return As(ar(e),t)},Pn.xor=Ko,Pn.xorBy=$o,Pn.xorWith=Qo,Pn.zip=ts,Pn.zipObject=function(t,e){return or(t||[],e||[],Vn)},Pn.zipObjectDeep=function(t,e){return or(t||[],e||[],zi)},Pn.zipWith=es,Pn.entries=Ra,Pn.entriesIn=Pa,Pn.extend=ha,Pn.extendWith=ca,Ka(Pn,Pn),Pn.add=al,Pn.attempt=za,Pn.camelCase=Ia,Pn.capitalize=Oa,Pn.ceil=ll,Pn.clamp=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=sa(n))==n?n:0),void 0!==e&&(e=(e=sa(e))==e?e:0),Jn(sa(t),e,n)},Pn.clone=function(t){return Kn(t,4)},Pn.cloneDeep=function(t){return Kn(t,5)},Pn.cloneDeepWith=function(t,e){return Kn(t,5,e="function"==typeof e?e:void 0)},Pn.cloneWith=function(t,e){return Kn(t,4,e="function"==typeof e?e:void 0)},Pn.conformsTo=function(t,e){return null==e||$n(t,e,ba(e))},Pn.deburr=La,Pn.defaultTo=function(t,e){return null==t||t!=t?e:t},Pn.divide=ul,Pn.endsWith=function(t,e,n){t=la(t),e=$i(e);var i=t.length,r=n=void 0===n?i:Jn(ra(n),0,i);return(n-=e.length)>=0&&t.slice(n,r)==e},Pn.eq=Cs,Pn.escape=function(t){return(t=la(t))&&k.test(t)?t.replace(B,Ue):t},Pn.escapeRegExp=function(t){return(t=la(t))&&q.test(t)?t.replace(X,"\\$&"):t},Pn.every=function(t,e,n){var i=Ns(t)?ue:ii;return n&&lo(t,e,n)&&(e=void 0),i(t,Kr(e,3))},Pn.find=ss,Pn.findIndex=Lo,Pn.findKey=function(t,e){return ye(t,Kr(e,3),ui)},Pn.findLast=as,Pn.findLastIndex=No,Pn.findLastKey=function(t,e){return ye(t,Kr(e,3),hi)},Pn.floor=hl,Pn.forEach=ls,Pn.forEachRight=us,Pn.forIn=function(t,e){return null==t?t:ai(t,Kr(e,3),Ta)},Pn.forInRight=function(t,e){return null==t?t:li(t,Kr(e,3),Ta)},Pn.forOwn=function(t,e){return t&&ui(t,Kr(e,3))},Pn.forOwnRight=function(t,e){return t&&hi(t,Kr(e,3))},Pn.get=ga,Pn.gt=Is,Pn.gte=Os,Pn.has=function(t,e){return null!=t&&ro(t,e,gi)},Pn.hasIn=va,Pn.head=Fo,Pn.identity=qa,Pn.includes=function(t,e,n,i){t=Fs(t)?t:Ca(t),n=n&&!i?ra(n):0;var r=t.length;return n<0&&(n=an(r+n,0)),Ks(t)?n<=r&&t.indexOf(e,n)>-1:!!r&&be(t,e,n)>-1},Pn.indexOf=function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=null==n?0:ra(n);return r<0&&(r=an(i+r,0)),be(t,e,r)},Pn.inRange=function(t,e,n){return e=ia(e),void 0===n?(n=e,e=0):n=ia(n),function(t,e,n){return t>=ln(e,n)&&t<an(e,n)}(t=sa(t),e,n)},Pn.invoke=xa,Pn.isArguments=Ls,Pn.isArray=Ns,Pn.isArrayBuffer=Ds,Pn.isArrayLike=Fs,Pn.isArrayLikeObject=Bs,Pn.isBoolean=function(t){return!0===t||!1===t||Ws(t)&&fi(t)==h},Pn.isBuffer=Us,Pn.isDate=ks,Pn.isElement=function(t){return Ws(t)&&1===t.nodeType&&!Ys(t)},Pn.isEmpty=function(t){if(null==t)return!0;if(Fs(t)&&(Ns(t)||"string"==typeof t||"function"==typeof t.splice||Us(t)||Qs(t)||Ls(t)))return!t.length;var e=io(t);if(e==m||e==y)return!t.size;if(po(t))return!Ei(t).length;for(var n in t)if(wt.call(t,n))return!1;return!0},Pn.isEqual=function(t,e){return bi(t,e)},Pn.isEqualWith=function(t,e,n){var i=(n="function"==typeof n?n:void 0)?n(t,e):void 0;return void 0===i?bi(t,e,void 0,n):!!i},Pn.isError=Gs,Pn.isFinite=function(t){return"number"==typeof t&&rn(t)},Pn.isFunction=Hs,Pn.isInteger=zs,Pn.isLength=js,Pn.isMap=Xs,Pn.isMatch=function(t,e){return t===e||Ti(t,e,Qr(e))},Pn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:void 0,Ti(t,e,Qr(e),n)},Pn.isNaN=function(t){return qs(t)&&t!=+t},Pn.isNative=function(t){if(co(t))throw new Z("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return wi(t)},Pn.isNil=function(t){return null==t},Pn.isNull=function(t){return null===t},Pn.isNumber=qs,Pn.isObject=Vs,Pn.isObjectLike=Ws,Pn.isPlainObject=Ys,Pn.isRegExp=Zs,Pn.isSafeInteger=function(t){return zs(t)&&t>=-9007199254740991&&t<=9007199254740991},Pn.isSet=Js,Pn.isString=Ks,Pn.isSymbol=$s,Pn.isTypedArray=Qs,Pn.isUndefined=function(t){return void 0===t},Pn.isWeakMap=function(t){return Ws(t)&&io(t)==T},Pn.isWeakSet=function(t){return Ws(t)&&"[object WeakSet]"==fi(t)},Pn.join=function(t,e){return null==t?"":on.call(t,e)},Pn.kebabCase=Na,Pn.last=Go,Pn.lastIndexOf=function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=i;return void 0!==n&&(r=(r=ra(n))<0?an(i+r,0):ln(r,i-1)),e==e?function(t,e,n){for(var i=n+1;i--;)if(t[i]===e)return i;return i}(t,e,r):xe(t,we,r,!0)},Pn.lowerCase=Da,Pn.lowerFirst=Fa,Pn.lt=ta,Pn.lte=ea,Pn.max=function(t){return t&&t.length?ri(t,qa,mi):void 0},Pn.maxBy=function(t,e){return t&&t.length?ri(t,Kr(e,2),mi):void 0},Pn.mean=function(t){return Se(t,qa)},Pn.meanBy=function(t,e){return Se(t,Kr(e,2))},Pn.min=function(t){return t&&t.length?ri(t,qa,Ai):void 0},Pn.minBy=function(t,e){return t&&t.length?ri(t,Kr(e,2),Ai):void 0},Pn.stubArray=ol,Pn.stubFalse=sl,Pn.stubObject=function(){return{}},Pn.stubString=function(){return""},Pn.stubTrue=function(){return!0},Pn.multiply=dl,Pn.nth=function(t,e){return t&&t.length?Oi(t,ra(e)):void 0},Pn.noConflict=function(){return qt._===this&&(qt._=Rt),this},Pn.noop=$a,Pn.now=gs,Pn.pad=function(t,e,n){t=la(t);var i=(e=ra(e))?Xe(t):0;if(!e||i>=e)return t;var r=(e-i)/2;return Lr(tn(r),n)+t+Lr(Qe(r),n)},Pn.padEnd=function(t,e,n){t=la(t);var i=(e=ra(e))?Xe(t):0;return e&&i<e?t+Lr(e-i,n):t},Pn.padStart=function(t,e,n){t=la(t);var i=(e=ra(e))?Xe(t):0;return e&&i<e?Lr(e-i,n)+t:t},Pn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),hn(la(t).replace(Y,""),e||0)},Pn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&lo(t,e,n)&&(e=n=void 0),void 0===n&&("boolean"==typeof e?(n=e,e=void 0):"boolean"==typeof t&&(n=t,t=void 0)),void 0===t&&void 0===e?(t=0,e=1):(t=ia(t),void 0===e?(e=t,t=0):e=ia(e)),t>e){var i=t;t=e,e=i}if(n||t%1||e%1){var r=cn();return ln(t+r*(e-t+jt("1e-"+((r+"").length-1))),e)}return Bi(t,e)},Pn.reduce=function(t,e,n){var i=Ns(t)?me:Ae,r=arguments.length<3;return i(t,Kr(e,4),n,r,ei)},Pn.reduceRight=function(t,e,n){var i=Ns(t)?ge:Ae,r=arguments.length<3;return i(t,Kr(e,4),n,r,ni)},Pn.repeat=function(t,e,n){return e=(n?lo(t,e,n):void 0===e)?1:ra(e),Ui(la(t),e)},Pn.replace=function(){var t=arguments,e=la(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Pn.result=function(t,e,n){var i=-1,r=(e=lr(e,t)).length;for(r||(r=1,t=void 0);++i<r;){var o=null==t?void 0:t[Ao(e[i])];void 0===o&&(i=r,o=n),t=Hs(o)?o.call(t):o}return t},Pn.round=pl,Pn.runInContext=t,Pn.sample=function(t){return(Ns(t)?Gn:Gi)(t)},Pn.size=function(t){if(null==t)return 0;if(Fs(t))return Ks(t)?Xe(t):t.length;var e=io(t);return e==m||e==y?t.size:Ei(t).length},Pn.snakeCase=Ba,Pn.some=function(t,e,n){var i=Ns(t)?ve:qi;return n&&lo(t,e,n)&&(e=void 0),i(t,Kr(e,3))},Pn.sortedIndex=function(t,e){return Yi(t,e)},Pn.sortedIndexBy=function(t,e,n){return Zi(t,e,Kr(n,2))},Pn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var i=Yi(t,e);if(i<n&&Cs(t[i],e))return i}return-1},Pn.sortedLastIndex=function(t,e){return Yi(t,e,!0)},Pn.sortedLastIndexBy=function(t,e,n){return Zi(t,e,Kr(n,2),!0)},Pn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=Yi(t,e,!0)-1;if(Cs(t[n],e))return n}return-1},Pn.startCase=Ua,Pn.startsWith=function(t,e,n){return t=la(t),n=null==n?0:Jn(ra(n),0,t.length),e=$i(e),t.slice(n,n+e.length)==e},Pn.subtract=fl,Pn.sum=function(t){return t&&t.length?Re(t,qa):0},Pn.sumBy=function(t,e){return t&&t.length?Re(t,Kr(e,2)):0},Pn.template=function(t,e,n){var i=Pn.templateSettings;n&&lo(t,e,n)&&(e=void 0),t=la(t),e=ca({},e,i,Hr);var r,o,s=ca({},e.imports,i.imports,Hr),a=ba(s),l=Oe(s,a),u=0,h=e.interpolate||ht,c="__p += '",d=mt((e.escape||ht).source+"|"+h.source+"|"+(h===z?nt:ht).source+"|"+(e.evaluate||ht).source+"|$","g"),p="//# sourceURL="+(wt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++kt+"]")+"\n";t.replace(d,(function(e,n,i,s,a,l){return i||(i=s),c+=t.slice(u,l).replace(ct,ke),n&&(r=!0,c+="' +\n__e("+n+") +\n'"),a&&(o=!0,c+="';\n"+a+";\n__p += '"),i&&(c+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),u=l+e.length,e})),c+="';\n";var f=wt.call(e,"variable")&&e.variable;if(f){if(tt.test(f))throw new Z("Invalid `variable` option passed into `_.template`")}else c="with (obj) {\n"+c+"\n}\n";c=(o?c.replace(L,""):c).replace(N,"$1").replace(D,"$1;"),c="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+c+"return __p\n}";var m=za((function(){return dt(a,p+"return "+c).apply(void 0,l)}));if(m.source=c,Gs(m))throw m;return m},Pn.times=function(t,e){if((t=ra(t))<1||t>9007199254740991)return[];var n=4294967295,i=ln(t,4294967295);t-=4294967295;for(var r=Pe(i,e=Kr(e));++n<t;)e(n);return r},Pn.toFinite=ia,Pn.toInteger=ra,Pn.toLength=oa,Pn.toLower=function(t){return la(t).toLowerCase()},Pn.toNumber=sa,Pn.toSafeInteger=function(t){return t?Jn(ra(t),-9007199254740991,9007199254740991):0===t?t:0},Pn.toString=la,Pn.toUpper=function(t){return la(t).toUpperCase()},Pn.trim=function(t,e,n){if((t=la(t))&&(n||void 0===e))return Ce(t);if(!t||!(e=$i(e)))return t;var i=qe(t),r=qe(e);return hr(i,Ne(i,r),De(i,r)+1).join("")},Pn.trimEnd=function(t,e,n){if((t=la(t))&&(n||void 0===e))return t.slice(0,Ye(t)+1);if(!t||!(e=$i(e)))return t;var i=qe(t);return hr(i,0,De(i,qe(e))+1).join("")},Pn.trimStart=function(t,e,n){if((t=la(t))&&(n||void 0===e))return t.replace(Y,"");if(!t||!(e=$i(e)))return t;var i=qe(t);return hr(i,Ne(i,qe(e))).join("")},Pn.truncate=function(t,e){var n=30,i="...";if(Vs(e)){var r="separator"in e?e.separator:r;n="length"in e?ra(e.length):n,i="omission"in e?$i(e.omission):i}var o=(t=la(t)).length;if(Ge(t)){var s=qe(t);o=s.length}if(n>=o)return t;var a=n-Xe(i);if(a<1)return i;var l=s?hr(s,0,a).join(""):t.slice(0,a);if(void 0===r)return l+i;if(s&&(a+=l.length-a),Zs(r)){if(t.slice(a).search(r)){var u,h=l;for(r.global||(r=mt(r.source,la(it.exec(r))+"g")),r.lastIndex=0;u=r.exec(h);)var c=u.index;l=l.slice(0,void 0===c?a:c)}}else if(t.indexOf($i(r),a)!=a){var d=l.lastIndexOf(r);d>-1&&(l=l.slice(0,d))}return l+i},Pn.unescape=function(t){return(t=la(t))&&U.test(t)?t.replace(F,Ze):t},Pn.uniqueId=function(t){var e=++St;return la(t)+e},Pn.upperCase=ka,Pn.upperFirst=Ga,Pn.each=ls,Pn.eachRight=us,Pn.first=Fo,Ka(Pn,(cl={},ui(Pn,(function(t,e){wt.call(Pn.prototype,e)||(cl[e]=t)})),cl),{chain:!1}),Pn.VERSION="4.17.21",ae(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Pn[t].placeholder=Pn})),ae(["drop","take"],(function(t,e){Ln.prototype[t]=function(n){n=void 0===n?1:an(ra(n),0);var i=this.__filtered__&&!e?new Ln(this):this.clone();return i.__filtered__?i.__takeCount__=ln(n,i.__takeCount__):i.__views__.push({size:ln(n,4294967295),type:t+(i.__dir__<0?"Right":"")}),i},Ln.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),ae(["filter","map","takeWhile"],(function(t,e){var n=e+1,i=1==n||3==n;Ln.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Kr(t,3),type:n}),e.__filtered__=e.__filtered__||i,e}})),ae(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Ln.prototype[t]=function(){return this[n](1).value()[0]}})),ae(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Ln.prototype[t]=function(){return this.__filtered__?new Ln(this):this[n](1)}})),Ln.prototype.compact=function(){return this.filter(qa)},Ln.prototype.find=function(t){return this.filter(t).head()},Ln.prototype.findLast=function(t){return this.reverse().find(t)},Ln.prototype.invokeMap=ki((function(t,e){return"function"==typeof t?new Ln(this):this.map((function(n){return yi(n,t,e)}))})),Ln.prototype.reject=function(t){return this.filter(Es(Kr(t)))},Ln.prototype.slice=function(t,e){t=ra(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Ln(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),void 0!==e&&(n=(e=ra(e))<0?n.dropRight(-e):n.take(e-t)),n)},Ln.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ln.prototype.toArray=function(){return this.take(4294967295)},ui(Ln.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),r=Pn[i?"take"+("last"==e?"Right":""):e],o=i||/^find/.test(e);r&&(Pn.prototype[e]=function(){var e=this.__wrapped__,s=i?[1]:arguments,a=e instanceof Ln,l=s[0],u=a||Ns(e),h=function(t){var e=r.apply(Pn,fe([t],s));return i&&c?e[0]:e};u&&n&&"function"==typeof l&&1!=l.length&&(a=u=!1);var c=this.__chain__,d=!!this.__actions__.length,p=o&&!c,f=a&&!d;if(!o&&u){e=f?e:new Ln(this);var m=t.apply(e,s);return m.__actions__.push({func:is,args:[h],thisArg:void 0}),new On(m,c)}return p&&f?t.apply(this,s):(m=this.thru(h),p?i?m.value()[0]:m.value():m)})})),ae(["pop","push","shift","sort","splice","unshift"],(function(t){var e=_t[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);Pn.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var r=this.value();return e.apply(Ns(r)?r:[],t)}return this[n]((function(n){return e.apply(Ns(n)?n:[],t)}))}})),ui(Ln.prototype,(function(t,e){var n=Pn[e];if(n){var i=n.name+"";wt.call(xn,i)||(xn[i]=[]),xn[i].push({name:e,func:n})}})),xn[Pr(void 0,2).name]=[{name:"wrapper",func:void 0}],Ln.prototype.clone=function(){var t=new Ln(this.__wrapped__);return t.__actions__=_r(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=_r(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=_r(this.__views__),t},Ln.prototype.reverse=function(){if(this.__filtered__){var t=new Ln(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Ln.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ns(t),i=e<0,r=n?t.length:0,o=function(t,e,n){var i=-1,r=n.length;for(;++i<r;){var o=n[i],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=ln(e,t+s);break;case"takeRight":t=an(t,e-s)}}return{start:t,end:e}}(0,r,this.__views__),s=o.start,a=o.end,l=a-s,u=i?a:s-1,h=this.__iteratees__,c=h.length,d=0,p=ln(l,this.__takeCount__);if(!n||!i&&r==l&&p==l)return ir(t,this.__actions__);var f=[];t:for(;l--&&d<p;){for(var m=-1,g=t[u+=e];++m<c;){var v=h[m],_=v.iteratee,y=v.type,x=_(g);if(2==y)g=x;else if(!x){if(1==y)continue t;break t}}f[d++]=g}return f},Pn.prototype.at=rs,Pn.prototype.chain=function(){return ns(this)},Pn.prototype.commit=function(){return new On(this.value(),this.__chain__)},Pn.prototype.next=function(){void 0===this.__values__&&(this.__values__=na(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},Pn.prototype.plant=function(t){for(var e,n=this;n instanceof In;){var i=Po(n);i.__index__=0,i.__values__=void 0,e?r.__wrapped__=i:e=i;var r=i;n=n.__wrapped__}return r.__wrapped__=t,e},Pn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Ln){var e=t;return this.__actions__.length&&(e=new Ln(this)),(e=e.reverse()).__actions__.push({func:is,args:[Vo],thisArg:void 0}),new On(e,this.__chain__)}return this.thru(Vo)},Pn.prototype.toJSON=Pn.prototype.valueOf=Pn.prototype.value=function(){return ir(this.__wrapped__,this.__actions__)},Pn.prototype.first=Pn.prototype.head,Kt&&(Pn.prototype[Kt]=function(){return this}),Pn}();qt._=Je,void 0===(r=function(){return Je}.call(e,n,e,i))||(i.exports=r)}).call(this)}).call(this,n(4),n(7)(t))},function(t,e,n){(function(e){t.exports=function t(e,n,i){function r(s,a){if(!n[s]){if(!e[s]){if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[s]={exports:{}};e[s][0].call(u.exports,(function(t){var n=e[s][1][t];return r(n||t)}),u,u.exports,t,e,n,i)}return n[s].exports}for(var o=!1,s=0;s<i.length;s++)r(i[s]);return r}({1:[function(t,n,i){(function(t){"use strict";var e,i,r=t.MutationObserver||t.WebKitMutationObserver;if(r){var o=0,s=new r(h),a=t.document.createTextNode("");s.observe(a,{characterData:!0}),e=function(){a.data=o=++o%2}}else if(t.setImmediate||void 0===t.MessageChannel)e="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){h(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(h,0)};else{var l=new t.MessageChannel;l.port1.onmessage=h,e=function(){l.port2.postMessage(0)}}var u=[];function h(){var t,e;i=!0;for(var n=u.length;n;){for(e=u,u=[],t=-1;++t<n;)e[t]();n=u.length}i=!1}n.exports=function(t){1!==u.push(t)||i||e()}}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,n){"use strict";var i=t(1);function r(){}var o={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function u(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,t!==r&&p(this,t)}function h(t,e,n){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function c(t,e,n){i((function(){var i;try{i=e(n)}catch(e){return o.reject(t,e)}i===t?o.reject(t,new TypeError("Cannot resolve promise with itself")):o.resolve(t,i)}))}function d(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function p(t,e){var n=!1;function i(e){n||(n=!0,o.reject(t,e))}function r(e){n||(n=!0,o.resolve(t,e))}var s=f((function(){e(r,i)}));"error"===s.status&&i(s.value)}function f(t,e){var n={};try{n.value=t(e),n.status="success"}catch(t){n.status="error",n.value=t}return n}e.exports=u,u.prototype.catch=function(t){return this.then(null,t)},u.prototype.then=function(t,e){if("function"!=typeof t&&this.state===a||"function"!=typeof e&&this.state===s)return this;var n=new this.constructor(r);return this.state!==l?c(n,this.state===a?t:e,this.outcome):this.queue.push(new h(n,t,e)),n},h.prototype.callFulfilled=function(t){o.resolve(this.promise,t)},h.prototype.otherCallFulfilled=function(t){c(this.promise,this.onFulfilled,t)},h.prototype.callRejected=function(t){o.reject(this.promise,t)},h.prototype.otherCallRejected=function(t){c(this.promise,this.onRejected,t)},o.resolve=function(t,e){var n=f(d,e);if("error"===n.status)return o.reject(t,n.value);var i=n.value;if(i)p(t,i);else{t.state=a,t.outcome=e;for(var r=-1,s=t.queue.length;++r<s;)t.queue[r].callFulfilled(e)}return t},o.reject=function(t,e){t.state=s,t.outcome=e;for(var n=-1,i=t.queue.length;++n<i;)t.queue[n].callRejected(e);return t},u.resolve=function(t){return t instanceof this?t:o.resolve(new this(r),t)},u.reject=function(t){var e=new this(r);return o.reject(e,t)},u.all=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var n=t.length,i=!1;if(!n)return this.resolve([]);for(var s=new Array(n),a=0,l=-1,u=new this(r);++l<n;)h(t[l],l);return u;function h(t,r){e.resolve(t).then((function(t){s[r]=t,++a!==n||i||(i=!0,o.resolve(u,s))}),(function(t){i||(i=!0,o.reject(u,t))}))}},u.race=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var n=t.length,i=!1;if(!n)return this.resolve([]);for(var s,a=-1,l=new this(r);++a<n;)s=t[a],e.resolve(s).then((function(t){i||(i=!0,o.resolve(l,t))}),(function(t){i||(i=!0,o.reject(l,t))}));return l}},{1:1}],3:[function(t,n,i){(function(e){"use strict";"function"!=typeof e.Promise&&(e.Promise=t(2))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(t,e,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(t){return}}();function o(t,e){t=t||[],e=e||{};try{return new Blob(t,e)}catch(r){if("TypeError"!==r.name)throw r;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),i=0;i<t.length;i+=1)n.append(t[i]);return n.getBlob(e.type)}}"undefined"==typeof Promise&&t(3);var s=Promise;function a(t,e){e&&t.then((function(t){e(null,t)}),(function(t){e(t)}))}function l(t,e,n){"function"==typeof e&&t.then(e),"function"==typeof n&&t.catch(n)}function u(t){return"string"!=typeof t&&(console.warn(t+" used as a key, but it is not a string."),t=String(t)),t}function h(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var c=void 0,d={},p=Object.prototype.toString;function f(t){return"boolean"==typeof c?s.resolve(c):function(t){return new s((function(e){var n=t.transaction("local-forage-detect-blob-support","readwrite"),i=o([""]);n.objectStore("local-forage-detect-blob-support").put(i,"key"),n.onabort=function(t){t.preventDefault(),t.stopPropagation(),e(!1)},n.oncomplete=function(){var t=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);e(n||!t||parseInt(t[1],10)>=43)}})).catch((function(){return!1}))}(t).then((function(t){return c=t}))}function m(t){var e=d[t.name],n={};n.promise=new s((function(t,e){n.resolve=t,n.reject=e})),e.deferredOperations.push(n),e.dbReady?e.dbReady=e.dbReady.then((function(){return n.promise})):e.dbReady=n.promise}function g(t){var e=d[t.name].deferredOperations.pop();if(e)return e.resolve(),e.promise}function v(t,e){var n=d[t.name].deferredOperations.pop();if(n)return n.reject(e),n.promise}function _(t,e){return new s((function(n,i){if(d[t.name]=d[t.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},t.db){if(!e)return n(t.db);m(t),t.db.close()}var o=[t.name];e&&o.push(t.version);var s=r.open.apply(r,o);e&&(s.onupgradeneeded=function(e){var n=s.result;try{n.createObjectStore(t.storeName),e.oldVersion<=1&&n.createObjectStore("local-forage-detect-blob-support")}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+t.name+'" has been upgraded from version '+e.oldVersion+" to version "+e.newVersion+', but the storage "'+t.storeName+'" already exists.')}}),s.onerror=function(t){t.preventDefault(),i(s.error)},s.onsuccess=function(){var e=s.result;e.onversionchange=function(t){t.target.close()},n(e),g(t)}}))}function y(t){return _(t,!1)}function x(t){return _(t,!0)}function b(t,e){if(!t.db)return!0;var n=!t.db.objectStoreNames.contains(t.storeName),i=t.version<t.db.version,r=t.version>t.db.version;if(i&&(t.version!==e&&console.warn('The database "'+t.name+"\" can't be downgraded from version "+t.db.version+" to version "+t.version+"."),t.version=t.db.version),r||n){if(n){var o=t.db.version+1;o>t.version&&(t.version=o)}return!0}return!1}function T(t){return o([function(t){for(var e=t.length,n=new ArrayBuffer(e),i=new Uint8Array(n),r=0;r<e;r++)i[r]=t.charCodeAt(r);return n}(atob(t.data))],{type:t.type})}function w(t){return t&&t.__local_forage_encoded_blob}function S(t){var e=this,n=e._initReady().then((function(){var t=d[e._dbInfo.name];if(t&&t.dbReady)return t.dbReady}));return l(n,t,t),n}function E(t,e,n,i){void 0===i&&(i=1);try{var r=t.db.transaction(t.storeName,e);n(null,r)}catch(r){if(i>0&&(!t.db||"InvalidStateError"===r.name||"NotFoundError"===r.name))return s.resolve().then((function(){if(!t.db||"NotFoundError"===r.name&&!t.db.objectStoreNames.contains(t.storeName)&&t.version<=t.db.version)return t.db&&(t.version=t.db.version+1),x(t)})).then((function(){return function(t){m(t);for(var e=d[t.name],n=e.forages,i=0;i<n.length;i++){var r=n[i];r._dbInfo.db&&(r._dbInfo.db.close(),r._dbInfo.db=null)}return t.db=null,y(t).then((function(e){return t.db=e,b(t)?x(t):e})).then((function(i){t.db=e.db=i;for(var r=0;r<n.length;r++)n[r]._dbInfo.db=i})).catch((function(e){throw v(t,e),e}))}(t).then((function(){E(t,e,n,i-1)}))})).catch(n);n(r)}}var M={_driver:"asyncStorage",_initStorage:function(t){var e=this,n={db:null};if(t)for(var i in t)n[i]=t[i];var r=d[n.name];r||(r={forages:[],db:null,dbReady:null,deferredOperations:[]},d[n.name]=r),r.forages.push(e),e._initReady||(e._initReady=e.ready,e.ready=S);var o=[];function a(){return s.resolve()}for(var l=0;l<r.forages.length;l++){var u=r.forages[l];u!==e&&o.push(u._initReady().catch(a))}var h=r.forages.slice(0);return s.all(o).then((function(){return n.db=r.db,y(n)})).then((function(t){return n.db=t,b(n,e._defaultConfig.version)?x(n):t})).then((function(t){n.db=r.db=t,e._dbInfo=n;for(var i=0;i<h.length;i++){var o=h[i];o!==e&&(o._dbInfo.db=n.db,o._dbInfo.version=n.version)}}))},_support:function(){try{if(!r||!r.open)return!1;var t="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),e="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!t||e)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(t){return!1}}(),iterate:function(t,e){var n=this,i=new s((function(e,i){n.ready().then((function(){E(n._dbInfo,"readonly",(function(r,o){if(r)return i(r);try{var s=o.objectStore(n._dbInfo.storeName).openCursor(),a=1;s.onsuccess=function(){var n=s.result;if(n){var i=n.value;w(i)&&(i=T(i));var r=t(i,n.key,a++);void 0!==r?e(r):n.continue()}else e()},s.onerror=function(){i(s.error)}}catch(t){i(t)}}))})).catch(i)}));return a(i,e),i},getItem:function(t,e){var n=this;t=u(t);var i=new s((function(e,i){n.ready().then((function(){E(n._dbInfo,"readonly",(function(r,o){if(r)return i(r);try{var s=o.objectStore(n._dbInfo.storeName).get(t);s.onsuccess=function(){var t=s.result;void 0===t&&(t=null),w(t)&&(t=T(t)),e(t)},s.onerror=function(){i(s.error)}}catch(t){i(t)}}))})).catch(i)}));return a(i,e),i},setItem:function(t,e,n){var i=this;t=u(t);var r=new s((function(n,r){var o;i.ready().then((function(){return o=i._dbInfo,"[object Blob]"===p.call(e)?f(o.db).then((function(t){return t?e:(n=e,new s((function(t,e){var i=new FileReader;i.onerror=e,i.onloadend=function(e){var i=btoa(e.target.result||"");t({__local_forage_encoded_blob:!0,data:i,type:n.type})},i.readAsBinaryString(n)})));var n})):e})).then((function(e){E(i._dbInfo,"readwrite",(function(o,s){if(o)return r(o);try{var a=s.objectStore(i._dbInfo.storeName);null===e&&(e=void 0);var l=a.put(e,t);s.oncomplete=function(){void 0===e&&(e=null),n(e)},s.onabort=s.onerror=function(){var t=l.error?l.error:l.transaction.error;r(t)}}catch(t){r(t)}}))})).catch(r)}));return a(r,n),r},removeItem:function(t,e){var n=this;t=u(t);var i=new s((function(e,i){n.ready().then((function(){E(n._dbInfo,"readwrite",(function(r,o){if(r)return i(r);try{var s=o.objectStore(n._dbInfo.storeName).delete(t);o.oncomplete=function(){e()},o.onerror=function(){i(s.error)},o.onabort=function(){var t=s.error?s.error:s.transaction.error;i(t)}}catch(t){i(t)}}))})).catch(i)}));return a(i,e),i},clear:function(t){var e=this,n=new s((function(t,n){e.ready().then((function(){E(e._dbInfo,"readwrite",(function(i,r){if(i)return n(i);try{var o=r.objectStore(e._dbInfo.storeName).clear();r.oncomplete=function(){t()},r.onabort=r.onerror=function(){var t=o.error?o.error:o.transaction.error;n(t)}}catch(t){n(t)}}))})).catch(n)}));return a(n,t),n},length:function(t){var e=this,n=new s((function(t,n){e.ready().then((function(){E(e._dbInfo,"readonly",(function(i,r){if(i)return n(i);try{var o=r.objectStore(e._dbInfo.storeName).count();o.onsuccess=function(){t(o.result)},o.onerror=function(){n(o.error)}}catch(t){n(t)}}))})).catch(n)}));return a(n,t),n},key:function(t,e){var n=this,i=new s((function(e,i){t<0?e(null):n.ready().then((function(){E(n._dbInfo,"readonly",(function(r,o){if(r)return i(r);try{var s=o.objectStore(n._dbInfo.storeName),a=!1,l=s.openKeyCursor();l.onsuccess=function(){var n=l.result;n?0===t||a?e(n.key):(a=!0,n.advance(t)):e(null)},l.onerror=function(){i(l.error)}}catch(t){i(t)}}))})).catch(i)}));return a(i,e),i},keys:function(t){var e=this,n=new s((function(t,n){e.ready().then((function(){E(e._dbInfo,"readonly",(function(i,r){if(i)return n(i);try{var o=r.objectStore(e._dbInfo.storeName).openKeyCursor(),s=[];o.onsuccess=function(){var e=o.result;e?(s.push(e.key),e.continue()):t(s)},o.onerror=function(){n(o.error)}}catch(t){n(t)}}))})).catch(n)}));return a(n,t),n},dropInstance:function(t,e){e=h.apply(this,arguments);var n=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||n.name,t.storeName=t.storeName||n.storeName);var i,o=this;if(t.name){var l=t.name===n.name&&o._dbInfo.db,u=l?s.resolve(o._dbInfo.db):y(t).then((function(e){var n=d[t.name],i=n.forages;n.db=e;for(var r=0;r<i.length;r++)i[r]._dbInfo.db=e;return e}));i=t.storeName?u.then((function(e){if(e.objectStoreNames.contains(t.storeName)){var n=e.version+1;m(t);var i=d[t.name],o=i.forages;e.close();for(var a=0;a<o.length;a++){var l=o[a];l._dbInfo.db=null,l._dbInfo.version=n}return new s((function(e,i){var o=r.open(t.name,n);o.onerror=function(t){o.result.close(),i(t)},o.onupgradeneeded=function(){o.result.deleteObjectStore(t.storeName)},o.onsuccess=function(){var t=o.result;t.close(),e(t)}})).then((function(t){i.db=t;for(var e=0;e<o.length;e++){var n=o[e];n._dbInfo.db=t,g(n._dbInfo)}})).catch((function(e){throw(v(t,e)||s.resolve()).catch((function(){})),e}))}})):u.then((function(e){m(t);var n=d[t.name],i=n.forages;e.close();for(var o=0;o<i.length;o++)i[o]._dbInfo.db=null;return new s((function(e,n){var i=r.deleteDatabase(t.name);i.onerror=function(){var t=i.result;t&&t.close(),n(i.error)},i.onblocked=function(){console.warn('dropInstance blocked for database "'+t.name+'" until all open connections are closed')},i.onsuccess=function(){var t=i.result;t&&t.close(),e(t)}})).then((function(t){n.db=t;for(var e=0;e<i.length;e++)g(i[e]._dbInfo)})).catch((function(e){throw(v(t,e)||s.resolve()).catch((function(){})),e}))}))}else i=s.reject("Invalid arguments");return a(i,e),i}},A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",R=/^~~local_forage_type~([^~]+)~/,P="__lfsc__:".length,C=P+"arbf".length,I=Object.prototype.toString;function O(t){var e,n,i,r,o,s=.75*t.length,a=t.length,l=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var u=new ArrayBuffer(s),h=new Uint8Array(u);for(e=0;e<a;e+=4)n=A.indexOf(t[e]),i=A.indexOf(t[e+1]),r=A.indexOf(t[e+2]),o=A.indexOf(t[e+3]),h[l++]=n<<2|i>>4,h[l++]=(15&i)<<4|r>>2,h[l++]=(3&r)<<6|63&o;return u}function L(t){var e,n=new Uint8Array(t),i="";for(e=0;e<n.length;e+=3)i+=A[n[e]>>2],i+=A[(3&n[e])<<4|n[e+1]>>4],i+=A[(15&n[e+1])<<2|n[e+2]>>6],i+=A[63&n[e+2]];return n.length%3==2?i=i.substring(0,i.length-1)+"=":n.length%3==1&&(i=i.substring(0,i.length-2)+"=="),i}var N={serialize:function(t,e){var n="";if(t&&(n=I.call(t)),t&&("[object ArrayBuffer]"===n||t.buffer&&"[object ArrayBuffer]"===I.call(t.buffer))){var i,r="__lfsc__:";t instanceof ArrayBuffer?(i=t,r+="arbf"):(i=t.buffer,"[object Int8Array]"===n?r+="si08":"[object Uint8Array]"===n?r+="ui08":"[object Uint8ClampedArray]"===n?r+="uic8":"[object Int16Array]"===n?r+="si16":"[object Uint16Array]"===n?r+="ur16":"[object Int32Array]"===n?r+="si32":"[object Uint32Array]"===n?r+="ui32":"[object Float32Array]"===n?r+="fl32":"[object Float64Array]"===n?r+="fl64":e(new Error("Failed to get type for BinaryArray"))),e(r+L(i))}else if("[object Blob]"===n){var o=new FileReader;o.onload=function(){var n="~~local_forage_type~"+t.type+"~"+L(this.result);e("__lfsc__:blob"+n)},o.readAsArrayBuffer(t)}else try{e(JSON.stringify(t))}catch(n){console.error("Couldn't convert value into a JSON string: ",t),e(null,n)}},deserialize:function(t){if("__lfsc__:"!==t.substring(0,P))return JSON.parse(t);var e,n=t.substring(C),i=t.substring(P,C);if("blob"===i&&R.test(n)){var r=n.match(R);e=r[1],n=n.substring(r[0].length)}var s=O(n);switch(i){case"arbf":return s;case"blob":return o([s],{type:e});case"si08":return new Int8Array(s);case"ui08":return new Uint8Array(s);case"uic8":return new Uint8ClampedArray(s);case"si16":return new Int16Array(s);case"ur16":return new Uint16Array(s);case"si32":return new Int32Array(s);case"ui32":return new Uint32Array(s);case"fl32":return new Float32Array(s);case"fl64":return new Float64Array(s);default:throw new Error("Unkown type: "+i)}},stringToBuffer:O,bufferToString:L};function D(t,e,n,i){t.executeSql("CREATE TABLE IF NOT EXISTS "+e.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,i)}function F(t,e,n,i,r,o){t.executeSql(n,i,r,(function(t,s){s.code===s.SYNTAX_ERR?t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[e.storeName],(function(t,a){a.rows.length?o(t,s):D(t,e,(function(){t.executeSql(n,i,r,o)}),o)}),o):o(t,s)}),o)}function B(t,e,n,i){var r=this;t=u(t);var o=new s((function(o,s){r.ready().then((function(){void 0===e&&(e=null);var a=e,l=r._dbInfo;l.serializer.serialize(e,(function(e,u){u?s(u):l.db.transaction((function(n){F(n,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[t,e],(function(){o(a)}),(function(t,e){s(e)}))}),(function(e){if(e.code===e.QUOTA_ERR){if(i>0)return void o(B.apply(r,[t,a,n,i-1]));s(e)}}))}))})).catch(s)}));return a(o,n),o}function U(t){return new s((function(e,n){t.transaction((function(i){i.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,i){for(var r=[],o=0;o<i.rows.length;o++)r.push(i.rows.item(o).name);e({db:t,storeNames:r})}),(function(t,e){n(e)}))}),(function(t){n(t)}))}))}var k={_driver:"webSQLStorage",_initStorage:function(t){var e=this,n={db:null};if(t)for(var i in t)n[i]="string"!=typeof t[i]?t[i].toString():t[i];var r=new s((function(t,i){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(t){return i(t)}n.db.transaction((function(r){D(r,n,(function(){e._dbInfo=n,t()}),(function(t,e){i(e)}))}),i)}));return n.serializer=N,r},_support:"function"==typeof openDatabase,iterate:function(t,e){var n=this,i=new s((function(e,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){F(n,r,"SELECT * FROM "+r.storeName,[],(function(n,i){for(var o=i.rows,s=o.length,a=0;a<s;a++){var l=o.item(a),u=l.value;if(u&&(u=r.serializer.deserialize(u)),void 0!==(u=t(u,l.key,a+1)))return void e(u)}e()}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,e),i},getItem:function(t,e){var n=this;t=u(t);var i=new s((function(e,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){F(n,r,"SELECT * FROM "+r.storeName+" WHERE key = ? LIMIT 1",[t],(function(t,n){var i=n.rows.length?n.rows.item(0).value:null;i&&(i=r.serializer.deserialize(i)),e(i)}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,e),i},setItem:function(t,e,n){return B.apply(this,[t,e,n,1])},removeItem:function(t,e){var n=this;t=u(t);var i=new s((function(e,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){F(n,r,"DELETE FROM "+r.storeName+" WHERE key = ?",[t],(function(){e()}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,e),i},clear:function(t){var e=this,n=new s((function(t,n){e.ready().then((function(){var i=e._dbInfo;i.db.transaction((function(e){F(e,i,"DELETE FROM "+i.storeName,[],(function(){t()}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,t),n},length:function(t){var e=this,n=new s((function(t,n){e.ready().then((function(){var i=e._dbInfo;i.db.transaction((function(e){F(e,i,"SELECT COUNT(key) as c FROM "+i.storeName,[],(function(e,n){var i=n.rows.item(0).c;t(i)}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,t),n},key:function(t,e){var n=this,i=new s((function(e,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){F(n,r,"SELECT key FROM "+r.storeName+" WHERE id = ? LIMIT 1",[t+1],(function(t,n){var i=n.rows.length?n.rows.item(0).key:null;e(i)}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,e),i},keys:function(t){var e=this,n=new s((function(t,n){e.ready().then((function(){var i=e._dbInfo;i.db.transaction((function(e){F(e,i,"SELECT key FROM "+i.storeName,[],(function(e,n){for(var i=[],r=0;r<n.rows.length;r++)i.push(n.rows.item(r).key);t(i)}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,t),n},dropInstance:function(t,e){e=h.apply(this,arguments);var n=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||n.name,t.storeName=t.storeName||n.storeName);var i,r=this;return a(i=t.name?new s((function(e){var i;i=t.name===n.name?r._dbInfo.db:openDatabase(t.name,"","",0),t.storeName?e({db:i,storeNames:[t.storeName]}):e(U(i))})).then((function(t){return new s((function(e,n){t.db.transaction((function(i){function r(t){return new s((function(e,n){i.executeSql("DROP TABLE IF EXISTS "+t,[],(function(){e()}),(function(t,e){n(e)}))}))}for(var o=[],a=0,l=t.storeNames.length;a<l;a++)o.push(r(t.storeNames[a]));s.all(o).then((function(){e()})).catch((function(t){n(t)}))}),(function(t){n(t)}))}))})):s.reject("Invalid arguments"),e),i}};function G(t,e){var n=t.name+"/";return t.storeName!==e.storeName&&(n+=t.storeName+"/"),n}function H(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(t){return!0}}()||localStorage.length>0}var z={_driver:"localStorageWrapper",_initStorage:function(t){var e={};if(t)for(var n in t)e[n]=t[n];return e.keyPrefix=G(t,this._defaultConfig),H()?(this._dbInfo=e,e.serializer=N,s.resolve()):s.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(t){return!1}}(),iterate:function(t,e){var n=this,i=n.ready().then((function(){for(var e=n._dbInfo,i=e.keyPrefix,r=i.length,o=localStorage.length,s=1,a=0;a<o;a++){var l=localStorage.key(a);if(0===l.indexOf(i)){var u=localStorage.getItem(l);if(u&&(u=e.serializer.deserialize(u)),void 0!==(u=t(u,l.substring(r),s++)))return u}}}));return a(i,e),i},getItem:function(t,e){var n=this;t=u(t);var i=n.ready().then((function(){var e=n._dbInfo,i=localStorage.getItem(e.keyPrefix+t);return i&&(i=e.serializer.deserialize(i)),i}));return a(i,e),i},setItem:function(t,e,n){var i=this;t=u(t);var r=i.ready().then((function(){void 0===e&&(e=null);var n=e;return new s((function(r,o){var s=i._dbInfo;s.serializer.serialize(e,(function(e,i){if(i)o(i);else try{localStorage.setItem(s.keyPrefix+t,e),r(n)}catch(t){"QuotaExceededError"!==t.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==t.name||o(t),o(t)}}))}))}));return a(r,n),r},removeItem:function(t,e){var n=this;t=u(t);var i=n.ready().then((function(){var e=n._dbInfo;localStorage.removeItem(e.keyPrefix+t)}));return a(i,e),i},clear:function(t){var e=this,n=e.ready().then((function(){for(var t=e._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var i=localStorage.key(n);0===i.indexOf(t)&&localStorage.removeItem(i)}}));return a(n,t),n},length:function(t){var e=this.keys().then((function(t){return t.length}));return a(e,t),e},key:function(t,e){var n=this,i=n.ready().then((function(){var e,i=n._dbInfo;try{e=localStorage.key(t)}catch(t){e=null}return e&&(e=e.substring(i.keyPrefix.length)),e}));return a(i,e),i},keys:function(t){var e=this,n=e.ready().then((function(){for(var t=e._dbInfo,n=localStorage.length,i=[],r=0;r<n;r++){var o=localStorage.key(r);0===o.indexOf(t.keyPrefix)&&i.push(o.substring(t.keyPrefix.length))}return i}));return a(n,t),n},dropInstance:function(t,e){if(e=h.apply(this,arguments),!(t="function"!=typeof t&&t||{}).name){var n=this.config();t.name=t.name||n.name,t.storeName=t.storeName||n.storeName}var i,r=this;return a(i=t.name?new s((function(e){t.storeName?e(G(t,r._defaultConfig)):e(t.name+"/")})).then((function(t){for(var e=localStorage.length-1;e>=0;e--){var n=localStorage.key(e);0===n.indexOf(t)&&localStorage.removeItem(n)}})):s.reject("Invalid arguments"),e),i}},j=function(t,e){for(var n,i,r=t.length,o=0;o<r;){if((n=t[o])===(i=e)||"number"==typeof n&&"number"==typeof i&&isNaN(n)&&isNaN(i))return!0;o++}return!1},V=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},W={},X={},q={INDEXEDDB:M,WEBSQL:k,LOCALSTORAGE:z},Y=[q.INDEXEDDB._driver,q.WEBSQL._driver,q.LOCALSTORAGE._driver],Z=["dropInstance"],J=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Z),K={description:"",driver:Y.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function $(t,e){t[e]=function(){var n=arguments;return t.ready().then((function(){return t[e].apply(t,n)}))}}function Q(){for(var t=1;t<arguments.length;t++){var e=arguments[t];if(e)for(var n in e)e.hasOwnProperty(n)&&(V(e[n])?arguments[0][n]=e[n].slice():arguments[0][n]=e[n])}return arguments[0]}var tt=new(function(){function t(e){for(var n in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),q)if(q.hasOwnProperty(n)){var i=q[n],r=i._driver;this[n]=r,W[r]||this.defineDriver(i)}this._defaultConfig=Q({},K),this._config=Q({},this._defaultConfig,e),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return t.prototype.config=function(t){if("object"===(void 0===t?"undefined":i(t))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var e in t){if("storeName"===e&&(t[e]=t[e].replace(/\W/g,"_")),"version"===e&&"number"!=typeof t[e])return new Error("Database version must be a number.");this._config[e]=t[e]}return!("driver"in t)||!t.driver||this.setDriver(this._config.driver)}return"string"==typeof t?this._config[t]:this._config},t.prototype.defineDriver=function(t,e,n){var i=new s((function(e,n){try{var i=t._driver,r=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!t._driver)return void n(r);for(var o=J.concat("_initStorage"),l=0,u=o.length;l<u;l++){var h=o[l];if((!j(Z,h)||t[h])&&"function"!=typeof t[h])return void n(r)}!function(){for(var e=function(t){return function(){var e=new Error("Method "+t+" is not implemented by the current driver"),n=s.reject(e);return a(n,arguments[arguments.length-1]),n}},n=0,i=Z.length;n<i;n++){var r=Z[n];t[r]||(t[r]=e(r))}}();var c=function(n){W[i]&&console.info("Redefining LocalForage driver: "+i),W[i]=t,X[i]=n,e()};"_support"in t?t._support&&"function"==typeof t._support?t._support().then(c,n):c(!!t._support):c(!0)}catch(t){n(t)}}));return l(i,e,n),i},t.prototype.driver=function(){return this._driver||null},t.prototype.getDriver=function(t,e,n){var i=W[t]?s.resolve(W[t]):s.reject(new Error("Driver not found."));return l(i,e,n),i},t.prototype.getSerializer=function(t){var e=s.resolve(N);return l(e,t),e},t.prototype.ready=function(t){var e=this,n=e._driverSet.then((function(){return null===e._ready&&(e._ready=e._initDriver()),e._ready}));return l(n,t,t),n},t.prototype.setDriver=function(t,e,n){var i=this;V(t)||(t=[t]);var r=this._getSupportedDrivers(t);function o(){i._config.driver=i.driver()}function a(t){return i._extend(t),o(),i._ready=i._initStorage(i._config),i._ready}var u=null!==this._driverSet?this._driverSet.catch((function(){return s.resolve()})):s.resolve();return this._driverSet=u.then((function(){var t=r[0];return i._dbInfo=null,i._ready=null,i.getDriver(t).then((function(t){i._driver=t._driver,o(),i._wrapLibraryMethodsWithReady(),i._initDriver=function(t){return function(){var e=0;return function n(){for(;e<t.length;){var r=t[e];return e++,i._dbInfo=null,i._ready=null,i.getDriver(r).then(a).catch(n)}o();var l=new Error("No available storage method found.");return i._driverSet=s.reject(l),i._driverSet}()}}(r)}))})).catch((function(){o();var t=new Error("No available storage method found.");return i._driverSet=s.reject(t),i._driverSet})),l(this._driverSet,e,n),this._driverSet},t.prototype.supports=function(t){return!!X[t]},t.prototype._extend=function(t){Q(this,t)},t.prototype._getSupportedDrivers=function(t){for(var e=[],n=0,i=t.length;n<i;n++){var r=t[n];this.supports(r)&&e.push(r)}return e},t.prototype._wrapLibraryMethodsWithReady=function(){for(var t=0,e=J.length;t<e;t++)$(this,J[t])},t.prototype.createInstance=function(e){return new t(e)},t}());e.exports=tt},{3:3}]},{},[4])(4)}).call(this,n(4))},function(t,e,n){var i;!function(r){"use strict";function o(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function s(t,e,n,i,r,s){return o((a=o(o(e,t),o(i,s)))<<(l=r)|a>>>32-l,n);var a,l}function a(t,e,n,i,r,o,a){return s(e&n|~e&i,t,e,r,o,a)}function l(t,e,n,i,r,o,a){return s(e&i|n&~i,t,e,r,o,a)}function u(t,e,n,i,r,o,a){return s(e^n^i,t,e,r,o,a)}function h(t,e,n,i,r,o,a){return s(n^(e|~i),t,e,r,o,a)}function c(t,e){var n,i,r,s,c;t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;var d=1732584193,p=-271733879,f=-1732584194,m=271733878;for(n=0;n<t.length;n+=16)i=d,r=p,s=f,c=m,d=a(d,p,f,m,t[n],7,-680876936),m=a(m,d,p,f,t[n+1],12,-389564586),f=a(f,m,d,p,t[n+2],17,606105819),p=a(p,f,m,d,t[n+3],22,-1044525330),d=a(d,p,f,m,t[n+4],7,-176418897),m=a(m,d,p,f,t[n+5],12,1200080426),f=a(f,m,d,p,t[n+6],17,-1473231341),p=a(p,f,m,d,t[n+7],22,-45705983),d=a(d,p,f,m,t[n+8],7,1770035416),m=a(m,d,p,f,t[n+9],12,-1958414417),f=a(f,m,d,p,t[n+10],17,-42063),p=a(p,f,m,d,t[n+11],22,-1990404162),d=a(d,p,f,m,t[n+12],7,1804603682),m=a(m,d,p,f,t[n+13],12,-40341101),f=a(f,m,d,p,t[n+14],17,-1502002290),d=l(d,p=a(p,f,m,d,t[n+15],22,1236535329),f,m,t[n+1],5,-165796510),m=l(m,d,p,f,t[n+6],9,-1069501632),f=l(f,m,d,p,t[n+11],14,643717713),p=l(p,f,m,d,t[n],20,-373897302),d=l(d,p,f,m,t[n+5],5,-701558691),m=l(m,d,p,f,t[n+10],9,38016083),f=l(f,m,d,p,t[n+15],14,-660478335),p=l(p,f,m,d,t[n+4],20,-405537848),d=l(d,p,f,m,t[n+9],5,568446438),m=l(m,d,p,f,t[n+14],9,-1019803690),f=l(f,m,d,p,t[n+3],14,-187363961),p=l(p,f,m,d,t[n+8],20,1163531501),d=l(d,p,f,m,t[n+13],5,-1444681467),m=l(m,d,p,f,t[n+2],9,-51403784),f=l(f,m,d,p,t[n+7],14,1735328473),d=u(d,p=l(p,f,m,d,t[n+12],20,-1926607734),f,m,t[n+5],4,-378558),m=u(m,d,p,f,t[n+8],11,-2022574463),f=u(f,m,d,p,t[n+11],16,1839030562),p=u(p,f,m,d,t[n+14],23,-35309556),d=u(d,p,f,m,t[n+1],4,-1530992060),m=u(m,d,p,f,t[n+4],11,1272893353),f=u(f,m,d,p,t[n+7],16,-155497632),p=u(p,f,m,d,t[n+10],23,-1094730640),d=u(d,p,f,m,t[n+13],4,681279174),m=u(m,d,p,f,t[n],11,-358537222),f=u(f,m,d,p,t[n+3],16,-722521979),p=u(p,f,m,d,t[n+6],23,76029189),d=u(d,p,f,m,t[n+9],4,-640364487),m=u(m,d,p,f,t[n+12],11,-421815835),f=u(f,m,d,p,t[n+15],16,530742520),d=h(d,p=u(p,f,m,d,t[n+2],23,-995338651),f,m,t[n],6,-198630844),m=h(m,d,p,f,t[n+7],10,1126891415),f=h(f,m,d,p,t[n+14],15,-1416354905),p=h(p,f,m,d,t[n+5],21,-57434055),d=h(d,p,f,m,t[n+12],6,1700485571),m=h(m,d,p,f,t[n+3],10,-1894986606),f=h(f,m,d,p,t[n+10],15,-1051523),p=h(p,f,m,d,t[n+1],21,-2054922799),d=h(d,p,f,m,t[n+8],6,1873313359),m=h(m,d,p,f,t[n+15],10,-30611744),f=h(f,m,d,p,t[n+6],15,-1560198380),p=h(p,f,m,d,t[n+13],21,1309151649),d=h(d,p,f,m,t[n+4],6,-145523070),m=h(m,d,p,f,t[n+11],10,-1120210379),f=h(f,m,d,p,t[n+2],15,718787259),p=h(p,f,m,d,t[n+9],21,-343485551),d=o(d,i),p=o(p,r),f=o(f,s),m=o(m,c);return[d,p,f,m]}function d(t){var e,n="",i=32*t.length;for(e=0;e<i;e+=8)n+=String.fromCharCode(t[e>>5]>>>e%32&255);return n}function p(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e<n.length;e+=1)n[e]=0;var i=8*t.length;for(e=0;e<i;e+=8)n[e>>5]|=(255&t.charCodeAt(e/8))<<e%32;return n}function f(t){var e,n,i="";for(n=0;n<t.length;n+=1)e=t.charCodeAt(n),i+="0123456789abcdef".charAt(e>>>4&15)+"0123456789abcdef".charAt(15&e);return i}function m(t){return unescape(encodeURIComponent(t))}function g(t){return function(t){return d(c(p(t),8*t.length))}(m(t))}function v(t,e){return function(t,e){var n,i,r=p(t),o=[],s=[];for(o[15]=s[15]=void 0,r.length>16&&(r=c(r,8*t.length)),n=0;n<16;n+=1)o[n]=909522486^r[n],s[n]=1549556828^r[n];return i=c(o.concat(p(e)),512+8*e.length),d(c(s.concat(i),640))}(m(t),m(e))}function _(t,e,n){return e?n?v(e,t):f(v(e,t)):n?g(t):f(g(t))}void 0===(i=function(){return _}.call(e,n,e,t))||(t.exports=i)}()},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var i=n(57),r=n(58);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=y,e.resolve=function(t,e){return y(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?y(t,!1,!0).resolveObject(e):e},e.format=function(t){r.isString(t)&&(t=y(t));return t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),h=["'"].concat(u),c=["%","/","?",";","#"].concat(h),d=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=n(59);function y(t,e,n){if(t&&r.isObject(t)&&t instanceof o)return t;var i=new o;return i.parse(t,e,n),i}o.prototype.parse=function(t,e,n){if(!r.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),a=-1!==o&&o<t.indexOf("#")?"?":"#",u=t.split(a);u[0]=u[0].replace(/\\/g,"/");var y=t=u.join(a);if(y=y.trim(),!n&&1===t.split("#").length){var x=l.exec(y);if(x)return this.path=y,this.href=y,this.pathname=x[1],x[2]?(this.search=x[2],this.query=e?_.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var b=s.exec(y);if(b){var T=(b=b[0]).toLowerCase();this.protocol=T,y=y.substr(b.length)}if(n||b||y.match(/^\/\/[^@\/]+@[^@\/]+/)){var w="//"===y.substr(0,2);!w||b&&g[b]||(y=y.substr(2),this.slashes=!0)}if(!g[b]&&(w||b&&!v[b])){for(var S,E,M=-1,A=0;A<d.length;A++){-1!==(R=y.indexOf(d[A]))&&(-1===M||R<M)&&(M=R)}-1!==(E=-1===M?y.lastIndexOf("@"):y.lastIndexOf("@",M))&&(S=y.slice(0,E),y=y.slice(E+1),this.auth=decodeURIComponent(S)),M=-1;for(A=0;A<c.length;A++){var R;-1!==(R=y.indexOf(c[A]))&&(-1===M||R<M)&&(M=R)}-1===M&&(M=y.length),this.host=y.slice(0,M),y=y.slice(M),this.parseHost(),this.hostname=this.hostname||"";var P="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!P)for(var C=this.hostname.split(/\./),I=(A=0,C.length);A<I;A++){var O=C[A];if(O&&!O.match(p)){for(var L="",N=0,D=O.length;N<D;N++)O.charCodeAt(N)>127?L+="x":L+=O[N];if(!L.match(p)){var F=C.slice(0,A),B=C.slice(A+1),U=O.match(f);U&&(F.push(U[1]),B.unshift(U[2])),B.length&&(y="/"+B.join(".")+y),this.hostname=F.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=i.toASCII(this.hostname));var k=this.port?":"+this.port:"",G=this.hostname||"";this.host=G+k,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!m[T])for(A=0,I=h.length;A<I;A++){var H=h[A];if(-1!==y.indexOf(H)){var z=encodeURIComponent(H);z===H&&(z=escape(H)),y=y.split(H).join(z)}}var j=y.indexOf("#");-1!==j&&(this.hash=y.substr(j),y=y.slice(0,j));var V=y.indexOf("?");if(-1!==V?(this.search=y.substr(V),this.query=y.substr(V+1),e&&(this.query=_.parse(this.query)),y=y.slice(0,V)):e&&(this.search="",this.query={}),y&&(this.pathname=y),v[T]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){k=this.pathname||"";var W=this.search||"";this.path=k+W}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",i=this.hash||"",o=!1,s="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&r.isObject(this.query)&&Object.keys(this.query).length&&(s=_.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||v[e])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),i&&"#"!==i.charAt(0)&&(i="#"+i),a&&"?"!==a.charAt(0)&&(a="?"+a),e+o+(n=n.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(a=a.replace("#","%23"))+i},o.prototype.resolve=function(t){return this.resolveObject(y(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(r.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var n=new o,i=Object.keys(this),s=0;s<i.length;s++){var a=i[s];n[a]=this[a]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var l=Object.keys(t),u=0;u<l.length;u++){var h=l[u];"protocol"!==h&&(n[h]=t[h])}return v[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!v[t.protocol]){for(var c=Object.keys(t),d=0;d<c.length;d++){var p=c[d];n[p]=t[p]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||g[t.protocol])n.pathname=t.pathname;else{for(var f=(t.pathname||"").split("/");f.length&&!(t.host=f.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),n.pathname=f.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var m=n.pathname||"",_=n.search||"";n.path=m+_}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var y=n.pathname&&"/"===n.pathname.charAt(0),x=t.host||t.pathname&&"/"===t.pathname.charAt(0),b=x||y||n.host&&t.pathname,T=b,w=n.pathname&&n.pathname.split("/")||[],S=(f=t.pathname&&t.pathname.split("/")||[],n.protocol&&!v[n.protocol]);if(S&&(n.hostname="",n.port=null,n.host&&(""===w[0]?w[0]=n.host:w.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===f[0]?f[0]=t.host:f.unshift(t.host)),t.host=null),b=b&&(""===f[0]||""===w[0])),x)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,w=f;else if(f.length)w||(w=[]),w.pop(),w=w.concat(f),n.search=t.search,n.query=t.query;else if(!r.isNullOrUndefined(t.search)){if(S)n.hostname=n.host=w.shift(),(P=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=P.shift(),n.host=n.hostname=P.shift());return n.search=t.search,n.query=t.query,r.isNull(n.pathname)&&r.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var E=w.slice(-1)[0],M=(n.host||t.host||w.length>1)&&("."===E||".."===E)||""===E,A=0,R=w.length;R>=0;R--)"."===(E=w[R])?w.splice(R,1):".."===E?(w.splice(R,1),A++):A&&(w.splice(R,1),A--);if(!b&&!T)for(;A--;A)w.unshift("..");!b||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),M&&"/"!==w.join("/").substr(-1)&&w.push("");var P,C=""===w[0]||w[0]&&"/"===w[0].charAt(0);S&&(n.hostname=n.host=C?"":w.length?w.shift():"",(P=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=P.shift(),n.host=n.hostname=P.shift()));return(b=b||n.host&&w.length)&&!C&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),r.isNull(n.pathname)&&r.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){"use strict";var i=n(62);t.exports=function(t,e){e=e||{};var n=new i,r=e.inPlace||!1,o=t.map((function(t){return r?t:{width:t.width,height:t.height,item:t}}));o=o.sort((function(t,e){return e.width*e.height-t.width*t.height})),n.fit(o);var s={width:o.reduce((function(t,e){return Math.max(t,e.x+e.width)}),0),height:o.reduce((function(t,e){return Math.max(t,e.y+e.height)}),0)};return r||(s.items=o),s}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";var i=Object.prototype.hasOwnProperty,r="~";function o(){}function s(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function a(t,e,n,i,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new s(n,i||t,o),l=r?r+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],a]:t._events[l].push(a):(t._events[l]=a,t._eventsCount++),t}function l(t,e){0==--t._eventsCount?t._events=new o:delete t._events[e]}function u(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(r=!1)),u.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)i.call(t,e)&&n.push(r?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},u.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=new Array(o);i<o;i++)s[i]=n[i].fn;return s},u.prototype.listenerCount=function(t){var e=r?r+t:t,n=this._events[e];return n?n.fn?1:n.length:0},u.prototype.emit=function(t,e,n,i,o,s){var a=r?r+t:t;if(!this._events[a])return!1;var l,u,h=this._events[a],c=arguments.length;if(h.fn){switch(h.once&&this.removeListener(t,h.fn,void 0,!0),c){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,e),!0;case 3:return h.fn.call(h.context,e,n),!0;case 4:return h.fn.call(h.context,e,n,i),!0;case 5:return h.fn.call(h.context,e,n,i,o),!0;case 6:return h.fn.call(h.context,e,n,i,o,s),!0}for(u=1,l=new Array(c-1);u<c;u++)l[u-1]=arguments[u];h.fn.apply(h.context,l)}else{var d,p=h.length;for(u=0;u<p;u++)switch(h[u].once&&this.removeListener(t,h[u].fn,void 0,!0),c){case 1:h[u].fn.call(h[u].context);break;case 2:h[u].fn.call(h[u].context,e);break;case 3:h[u].fn.call(h[u].context,e,n);break;case 4:h[u].fn.call(h[u].context,e,n,i);break;default:if(!l)for(d=1,l=new Array(c-1);d<c;d++)l[d-1]=arguments[d];h[u].fn.apply(h[u].context,l)}}return!0},u.prototype.on=function(t,e,n){return a(this,t,e,n,!1)},u.prototype.once=function(t,e,n){return a(this,t,e,n,!0)},u.prototype.removeListener=function(t,e,n,i){var o=r?r+t:t;if(!this._events[o])return this;if(!e)return l(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||n&&s.context!==n||l(this,o);else{for(var a=0,u=[],h=s.length;a<h;a++)(s[a].fn!==e||i&&!s[a].once||n&&s[a].context!==n)&&u.push(s[a]);u.length?this._events[o]=1===u.length?u[0]:u:l(this,o)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&l(this,e)):(this._events=new o,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,t.exports=u},function(t,e,n){"use strict";function i(t,e,n){n=n||2;var i,a,l,u,h,p,f,g=e&&e.length,v=g?e[0]*n:t.length,_=r(t,0,v,n,!0),y=[];if(!_||_.next===_.prev)return y;if(g&&(_=function(t,e,n,i){var s,a,l,u,h,p=[];for(s=0,a=e.length;s<a;s++)l=e[s]*i,u=s<a-1?e[s+1]*i:t.length,(h=r(t,l,u,i,!1))===h.next&&(h.steiner=!0),p.push(m(h));for(p.sort(c),s=0;s<p.length;s++)n=o(n=d(p[s],n),n.next);return n}(t,e,_,n)),t.length>80*n){i=l=t[0],a=u=t[1];for(var x=n;x<v;x+=n)(h=t[x])<i&&(i=h),(p=t[x+1])<a&&(a=p),h>l&&(l=h),p>u&&(u=p);f=0!==(f=Math.max(l-i,u-a))?1/f:0}return s(_,y,n,i,a,f),y}function r(t,e,n,i,r){var o,s;if(r===R(t,e,n,i)>0)for(o=e;o<n;o+=i)s=E(o,t[o],t[o+1],s);else for(o=n-i;o>=e;o-=i)s=E(o,t[o],t[o+1],s);return s&&y(s,s.next)&&(M(s),s=s.next),s}function o(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!y(i,i.next)&&0!==_(i.prev,i,i.next))i=i.next;else{if(M(i),(i=e=i.prev)===i.next)break;n=!0}}while(n||i!==e);return e}function s(t,e,n,i,r,c,d){if(t){!d&&c&&function(t,e,n,i){var r=t;do{null===r.z&&(r.z=f(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,n,i,r,o,s,a,l,u=1;do{for(n=t,t=null,o=null,s=0;n;){for(s++,i=n,a=0,e=0;e<u&&(a++,i=i.nextZ);e++);for(l=u;a>0||l>0&&i;)0!==a&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,a--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,u*=2}while(s>1)}(r)}(t,i,r,c);for(var p,m,g=t;t.prev!==t.next;)if(p=t.prev,m=t.next,c?l(t,i,r,c):a(t))e.push(p.i/n),e.push(t.i/n),e.push(m.i/n),M(t),t=m.next,g=m.next;else if((t=m)===g){d?1===d?s(t=u(o(t),e,n),e,n,i,r,c,2):2===d&&h(t,e,n,i,r,c):s(o(t),e,n,i,r,c,1);break}}}function a(t){var e=t.prev,n=t,i=t.next;if(_(e,n,i)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(g(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&_(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function l(t,e,n,i){var r=t.prev,o=t,s=t.next;if(_(r,o,s)>=0)return!1;for(var a=r.x<o.x?r.x<s.x?r.x:s.x:o.x<s.x?o.x:s.x,l=r.y<o.y?r.y<s.y?r.y:s.y:o.y<s.y?o.y:s.y,u=r.x>o.x?r.x>s.x?r.x:s.x:o.x>s.x?o.x:s.x,h=r.y>o.y?r.y>s.y?r.y:s.y:o.y>s.y?o.y:s.y,c=f(a,l,e,n,i),d=f(u,h,e,n,i),p=t.prevZ,m=t.nextZ;p&&p.z>=c&&m&&m.z<=d;){if(p!==t.prev&&p!==t.next&&g(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&_(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,m!==t.prev&&m!==t.next&&g(r.x,r.y,o.x,o.y,s.x,s.y,m.x,m.y)&&_(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&_(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;m&&m.z<=d;){if(m!==t.prev&&m!==t.next&&g(r.x,r.y,o.x,o.y,s.x,s.y,m.x,m.y)&&_(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function u(t,e,n){var i=t;do{var r=i.prev,s=i.next.next;!y(r,s)&&x(r,i,i.next,s)&&w(r,s)&&w(s,r)&&(e.push(r.i/n),e.push(i.i/n),e.push(s.i/n),M(i),M(i.next),i=t=s),i=i.next}while(i!==t);return o(i)}function h(t,e,n,i,r,a){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&v(l,u)){var h=S(l,u);return l=o(l,l.next),h=o(h,h.next),s(l,e,n,i,r,a),void s(h,e,n,i,r,a)}u=u.next}l=l.next}while(l!==t)}function c(t,e){return t.x-e.x}function d(t,e){var n=function(t,e){var n,i=e,r=t.x,o=t.y,s=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var a=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=r&&a>s){if(s=a,a===r){if(o===i.y)return i;if(o===i.next.y)return i.next}n=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!n)return null;if(r===s)return n;var l,u=n,h=n.x,c=n.y,d=1/0;i=n;do{r>=i.x&&i.x>=h&&r!==i.x&&g(o<c?r:s,o,h,c,o<c?s:r,o,i.x,i.y)&&(l=Math.abs(o-i.y)/(r-i.x),w(i,t)&&(l<d||l===d&&(i.x>n.x||i.x===n.x&&p(n,i)))&&(n=i,d=l)),i=i.next}while(i!==u);return n}(t,e);if(!n)return e;var i=S(n,t),r=o(n,n.next);return o(i,i.next),e===n?r:e}function p(t,e){return _(t.prev,t,e.prev)<0&&_(e.next,t,t.next)<0}function f(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function m(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function g(t,e,n,i,r,o,s,a){return(r-s)*(e-a)-(t-s)*(o-a)>=0&&(t-s)*(i-a)-(n-s)*(e-a)>=0&&(n-s)*(o-a)-(r-s)*(i-a)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&x(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(w(t,e)&&w(e,t)&&function(t,e){var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)&&(_(t.prev,t,e.prev)||_(t,e.prev,e))||y(t,e)&&_(t.prev,t,t.next)>0&&_(e.prev,e,e.next)>0)}function _(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,n,i){var r=T(_(t,e,n)),o=T(_(t,e,i)),s=T(_(n,i,t)),a=T(_(n,i,e));return r!==o&&s!==a||(!(0!==r||!b(t,n,e))||(!(0!==o||!b(t,i,e))||(!(0!==s||!b(n,t,i))||!(0!==a||!b(n,e,i)))))}function b(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function T(t){return t>0?1:t<0?-1:0}function w(t,e){return _(t.prev,t,t.next)<0?_(t,e,t.next)>=0&&_(t,t.prev,e)>=0:_(t,e,t.prev)<0||_(t,t.next,e)<0}function S(t,e){var n=new A(t.i,t.x,t.y),i=new A(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function E(t,e,n,i){var r=new A(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function M(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function R(t,e,n,i){for(var r=0,o=e,s=n-i;o<n;o+=i)r+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return r}t.exports=i,t.exports.default=i,i.deviation=function(t,e,n,i){var r=e&&e.length,o=r?e[0]*n:t.length,s=Math.abs(R(t,0,o,n));if(r)for(var a=0,l=e.length;a<l;a++){var u=e[a]*n,h=a<l-1?e[a+1]*n:t.length;s-=Math.abs(R(t,u,h,n))}var c=0;for(a=0;a<i.length;a+=3){var d=i[a]*n,p=i[a+1]*n,f=i[a+2]*n;c+=Math.abs((t[d]-t[f])*(t[p+1]-t[d+1])-(t[d]-t[p])*(t[f+1]-t[d+1]))}return 0===s&&0===c?0:Math.abs((c-s)/s)},i.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},i=0,r=0;r<t.length;r++){for(var o=0;o<t[r].length;o++)for(var s=0;s<e;s++)n.vertices.push(t[r][o][s]);r>0&&(i+=t[r-1].length,n.holes.push(i))}return n}},function(t,e){t.exports="varying vec2 vUv;\nvoid main() {\n\tvUv = uv;\n\tgl_Position = (projectionMatrix * modelViewMatrix) * vec4(position, 1.0);\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform float lines[26];\nvarying vec2 vUv;\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tfloat middleAlpha = 0.0;\n\tfloat endAlpha = 0.0;\n\tfloat headLength = 0.0;\n\tif (timePercent < 0.5) {\n\t\tmiddleAlpha = 1.0;\n\t\tendAlpha = 1.0 - (timePercent / 0.5);\n\t}\n\telse {\n\t\tmiddleAlpha = 1.0 - ((timePercent - 0.5) / 0.5);\n\t\tendAlpha = 0.0;\n\t}\n\tfor (int i = 0; i < 26; i++) {\n\t\tfloat halfDis = lines[i] / 2.0;\n\t\tfloat middleX = headLength + halfDis;\n\t\theadLength += lines[i];\n\t\tif (abs(vUv.x - middleX) <= halfDis) {\n\t\t\tsrcColor.a = endAlpha + (((halfDis - abs(vUv.x - middleX)) / halfDis) * (middleAlpha - endAlpha));\n\t\t\tgl_FragColor = blendSrcOver(srcColor, distColor);\n\t\t\treturn ;\n\t\t}\n\t}\n\tgl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nuniform float width;\nuniform float height;\nvarying vec2 vUv;\nvec2 transform(vec2 uv) {\n\tuv.y = (uv.y * height) / width;\n\treturn uv - vec2(0.5, (0.5 * height) / width);\n}\nvoid main() {\n\tfloat maxR;\n\tfloat ringR;\n\tfloat radiusMin;\n\tfloat radiusMax;\n\tfloat dist;\n\tvec2 uv = vec2(vUv.x, vUv.y);\n\tmaxR = length(transform(vec2(1.0, 1.0)));\n\tringR = 1.0 / 6.0;\n\tradiusMin = timePercent * maxR;\n\tradiusMax = radiusMin + ringR;\n\tdist = length(transform(uv));\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tif (dist < radiusMin) {\n\t\tsrcColor.a = 0.0;\n\t}\n\telse if ((dist >= radiusMin) && (dist <= radiusMax)) {\n\t\tsrcColor.a = (dist - radiusMin) / ringR;\n\t}\n\telse {\n\t\tsrcColor.a = 1.0;\n\t}\n\tif (timePercent >= 1.0) {\n\t\tsrcColor.a = 0.0;\n\t}\n\telse if (timePercent == 0.0) {\n\t\tsrcColor.a = 1.0;\n\t}\n\tgl_FragColor = blendSrcOver(srcColor, distColor);\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nuniform float width;\nuniform float height;\nvarying vec2 vUv;\nvec2 transform(vec2 uv) {\n\tuv.y = (uv.y * height) / width;\n\treturn uv - vec2(0.5, (0.5 * height) / width);\n}\nvec2 offset(float progress[4], float band, float amp, float radius) {\n\tvec2 tc = vUv.xy;\n\tvec2 uv = vec2(0.0, 0.0);\n\tvec2 p;\n\tfloat len;\n\tvec2 uv_offset;\n\tfloat wave_width = band * radius;\n\tfor (int i = 0; i < 4; i += 1) {\n\t\tif (progress[i] == -1.0) {\n\t\t\tcontinue;\n\t\t}\n\t\tp = tc - vec2(0.5, 0.5);\n\t\tp.x = (p.x * width) / height;\n\t\tlen = length(p);\n\t\tfloat current_progress = progress[i];\n\t\tfloat current_radius = radius * current_progress;\n\t\tfloat damp_factor = 1.0;\n\t\tif (current_progress > .5) {\n\t\t\tdamp_factor = (1.0 - current_progress) * 2.0;\n\t\t}\n\t\tfloat cut_factor = clamp((wave_width * damp_factor) - abs(current_radius - len), 0.0, 1.0);\n\t\tfloat waves_factor = (4.0 * len) / radius;\n\t\tuv_offset = (((p / len) * cos((waves_factor - (current_progress * 10.0)) * 3.14)) * amp) * cut_factor;\n\t\tuv += uv_offset;\n\t}\n\treturn uv;\n}\nvoid main() {\n\tfloat maxR;\n\tfloat ringR;\n\tfloat radiusMin;\n\tfloat radiusMax;\n\tfloat dist;\n\tfloat progress[4];\n\tvec2 uv = vUv.xy;\n\tvec2 uvOffset = vec2(0.0, 0.0);\n\tmaxR = length(transform(vec2(1.0, 1.0)));\n\tringR = 1.0 / 6.0;\n\tradiusMin = timePercent * maxR;\n\tradiusMax = radiusMin + ringR;\n\tdist = length(transform(uv));\n\tfor (int i = 0; i < 4; i++) {\n\t\tprogress[i] = timePercent + (0.1 * float(i));\n\t\tif (progress[i] < 0.0) {\n\t\t\tprogress[i] = 0.0;\n\t\t}\n\t}\n\tuvOffset = offset(progress, 0.2, 0.3, 1.0);\n\tvec4 srcColor = texture2D(texturePrev, fract(vUv + uvOffset));\n\tvec4 distColor = texture2D(textureNext, fract(vUv + uvOffset));\n\tif (dist < radiusMin) {\n\t\tsrcColor.a = 0.0;\n\t}\n\telse if ((dist >= radiusMin) && (dist <= radiusMax)) {\n\t\tsrcColor.a = (dist - radiusMin) / ringR;\n\t}\n\telse {\n\t\tsrcColor.a = 1.0;\n\t}\n\tif (timePercent >= 1.0) {\n\t\tsrcColor.a = 0.0;\n\t}\n\telse if (timePercent == 0.0) {\n\t\tsrcColor.a = 1.0;\n\t}\n\tgl_FragColor = blendSrcOver(srcColor, distColor);\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tfloat alphaStart = timePercent > 0.5 ? ((timePercent - 0.5) / 0.5) * 1.0 : 1.0;\n\tfloat alphaEnd = timePercent < 0.5 ? ((0.5 - timePercent) / 0.5) * 1.0 : 0.0;\n\tfloat rectStart = 0.5 * (1.0 - timePercent);\n\tfloat rectEnd = rectStart + 0.5;\n\tif (timePercent <= 0.33) {\n\t\talphaStart = 1.0;\n\t\talphaEnd = (1.0 - (timePercent / 0.33)) * 1.0;\n\t\trectStart = 0.5;\n\t\trectEnd = 1.0;\n\t}\n\telse if ((timePercent > 0.33) && (timePercent <= 0.66)) {\n\t\talphaStart = 1.0;\n\t\talphaEnd = 0.0;\n\t\trectEnd = 1.0 - (((timePercent - 0.33) / 0.33) * 0.5);\n\t\trectStart = rectEnd - 0.5;\n\t}\n\telse {\n\t\talphaStart = ((1.0 - timePercent) / (1.0 - 0.66)) * 1.0;\n\t\talphaEnd = 0.0;\n\t\trectStart = 0.0;\n\t\trectEnd = 0.5;\n\t}\n\tif (vUv.x >= rectEnd) {\n\t\tsrcColor.a = 0.0;\n\t}\n\telse if (vUv.x <= rectStart) {\n\t\tsrcColor.a = 1.0;\n\t}\n\telse {\n\t\tsrcColor.a = alphaStart - (((vUv.x - rectStart) / 0.5) * (alphaStart - alphaEnd));\n\t}\n\tgl_FragColor = blendSrcOver(srcColor, distColor);\n}\n"},function(t,e){t.exports="uniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform sampler2D dissolveTexture;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tvec4 dissolveColor = texture2D(dissolveTexture, vUv);\n\tif (dissolveColor.r == 0.0) {\n\t\tresult = srcColor;\n\t}\n\telse {\n\t\tresult = distColor;\n\t}\n\tgl_FragColor = result;\n}\n"},function(t,e){t.exports="uniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tif (timePercent < 0.5) {\n\t\tfloat stagePercent = timePercent / 0.5;\n\t\tresult = srcColor + (stagePercent * (1.0 - srcColor));\n\t}\n\telse {\n\t\tfloat stagePercent = (timePercent - 0.5) / 0.5;\n\t\tresult = 1.0 - (stagePercent * (1.0 - distColor));\n\t}\n\tgl_FragColor = result;\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tsrcColor.a = 1.0 - timePercent;\n\tgl_FragColor = blendSrcOver(srcColor, distColor);\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tfloat line = interpolationFloat(0.0, 1.0, 0.0, 1.0, timePercent, 3);\n\tif (vUv.y > line) {\n\t\tvec2 uv = vUv.xy;\n\t\tuv.y -= line;\n\t\tresult = texture2D(texturePrev, uv);\n\t}\n\telse {\n\t\tvec2 uv = vUv.xy;\n\t\tuv.y += (1.0 - line);\n\t\tresult = texture2D(textureNext, uv);\n\t}\n\tgl_FragColor = result;\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tvec2 rectLeft = vec2(0.25, 0.5);\n\tvec2 rectRight = vec2(0.5, 0.75);\n\tvec2 alphaLeft = vec2(1.0, 1.0);\n\tvec2 alphaRight = vec2(1.0, 1.0);\n\tif (timePercent <= 0.333) {\n\t\talphaLeft.y = 1.0 - (timePercent / 0.333);\n\t\talphaRight.x = 1.0 - (timePercent / 0.333);\n\t}\n\telse if ((timePercent <= 0.666) && (timePercent > 0.333)) {\n\t\trectLeft.x -= (((timePercent - 0.333) / 0.333) * 0.25);\n\t\trectLeft.y = rectLeft.x + 0.25;\n\t\trectRight.y += (((timePercent - 0.333) / 0.333) * 0.25);\n\t\trectRight.x = rectRight.y - 0.25;\n\t\talphaLeft.y = 0.0;\n\t\talphaRight.x = 0.0;\n\t}\n\telse {\n\t\trectLeft = vec2(0.0, 0.25);\n\t\trectRight = vec2(0.75, 1.0);\n\t\talphaLeft.y = 0.0;\n\t\talphaRight.x = 0.0;\n\t\talphaLeft.x = 1.0 - ((timePercent - 0.666) / (1.0 - 0.666));\n\t\talphaRight.y = 1.0 - ((timePercent - 0.666) / (1.0 - 0.666));\n\t}\n\tif ((vUv.x < rectLeft.x) || (vUv.x > rectRight.y)) {\n\t\tsrcColor.a = 1.0;\n\t}\n\telse if ((vUv.x > rectLeft.y) && (vUv.x < rectRight.x)) {\n\t\tsrcColor.a = 0.0;\n\t}\n\telse {\n\t\tif ((vUv.x >= rectLeft.x) && (vUv.x <= rectLeft.y)) {\n\t\t\tsrcColor.a = alphaLeft.x - (((vUv.x - rectLeft.x) / (rectLeft.y - rectLeft.x)) * (alphaLeft.x - alphaLeft.y));\n\t\t}\n\t\telse {\n\t\t\tsrcColor.a = alphaRight.y - (((rectRight.y - vUv.x) / (rectLeft.y - rectLeft.x)) * (alphaRight.y - alphaRight.x));\n\t\t}\n\t}\n\tgl_FragColor = blendSrcOver(srcColor, distColor);\n}\n"},function(t,e){t.exports="uniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 uv4 = vec4(vUv.x, vUv.y, 1.0, 1.0);\n\tfloat scale = 1.0;\n\tfloat transform = 0.0;\n\tif (timePercent < 0.5) {\n\t\tscale = 1.0 - ((timePercent / 0.5) * 0.05);\n\t\ttransform = (1.0 - scale) * 0.5;\n\t}\n\telse {\n\t\tscale = 0.95 + (((timePercent - 0.5) / 0.5) * 0.05);\n\t\ttransform = (1.0 - scale) * 0.5;\n\t}\n\tmat4 matrix = mat4(scale, 0.0, 0.0, 0.0, 0.0, scale, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, transform, transform, 0.0, 1.0);\n\tvec4 uv = matrix * uv4;\n\tvec4 srcColor = texture2D(texturePrev, uv.xy);\n\tvec4 distColor = texture2D(textureNext, uv.xy);\n\tvec4 result = timePercent < 0.5 ? srcColor : distColor;\n\tvec3 start;\n\tvec3 end;\n\tvec3 white = vec3(1.0, 1.0, 1.0);\n\tif ((timePercent < 0.25) || (timePercent > 0.75)) {\n\t\tresult *= 1.0;\n\t}\n\telse if ((timePercent >= 0.25) && (timePercent <= 0.5)) {\n\t\tif (timePercent <= 0.375) {\n\t\t\tstart = result.rgb;\n\t\t\tend = start + (((timePercent - 0.25) / 0.125) * (white - result.rgb));\n\t\t}\n\t\telse {\n\t\t\tstart = result.rgb + (((timePercent - 0.375) / 0.125) * (white - result.rgb));\n\t\t\tend = white;\n\t\t}\n\t\tresult = vec4(start - (vUv.x * (start - end)), result.a);\n\t}\n\telse if ((timePercent > 0.5) && (timePercent <= 0.75)) {\n\t\tif (timePercent < 0.625) {\n\t\t\tstart = white - (((timePercent - 0.5) / 0.125) * (white - result.rgb));\n\t\t\tend = white;\n\t\t}\n\t\telse {\n\t\t\tstart = result.rgb;\n\t\t\tend = white - (((timePercent - 0.625) / 0.125) * (white - result.rgb));\n\t\t}\n\t\tresult = vec4(start - (vUv.x * (start - end)), result.a);\n\t}\n\tgl_FragColor = result;\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tfloat line = interpolationFloat(1.0, 0.0, 0.0, 1.0, timePercent, 1);\n\tif (vUv.x > line) {\n\t\tresult = texture2D(textureNext, vUv);\n\t}\n\telse {\n\t\tvec2 uv = vUv.xy;\n\t\tuv.x = 1.0 - (line - vUv.x);\n\t\tresult = texture2D(texturePrev, uv);\n\t}\n\tgl_FragColor = result;\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tfloat line = interpolationFloat(1.0, 0.0, 0.0, 1.0, timePercent, 3);\n\tif (vUv.x > line) {\n\t\tvec2 uv = vUv.xy;\n\t\tuv.x = vUv.x - line;\n\t\tresult = texture2D(textureNext, uv);\n\t}\n\telse {\n\t\tresult = texture2D(texturePrev, vUv);\n\t}\n\tgl_FragColor = result;\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nmat3 yuv2rgb = mat3(1.0, 0.0, 1.13983, 1.0, -0.39465, -0.58060, 1.0, 2.03211, 0.0);\nmat3 rgb2yuv = mat3(0.2126, 0.7152, 0.0722, -0.09991, -0.33609, 0.43600, 0.615, -0.5586, -0.05639);\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tvec3 result;\n\tfloat resultAlpha;\n\tif (timePercent < 0.5) {\n\t\tresult = srcColor.rgb * rgb2yuv;\n\t\tresult.r += interpolationFloat(0.0, 1.0, 0.0, 0.5, timePercent, 0);\n\t\tresultAlpha = srcColor.a;\n\t}\n\telse {\n\t\tresult = distColor.rgb * rgb2yuv;\n\t\tresult.r += interpolationFloat(1.0, 0.0, 0.5, 1.0, timePercent, 0);\n\t\tresultAlpha = distColor.a;\n\t}\n\tresult *= yuv2rgb;\n\tgl_FragColor = vec4(result.rgb, resultAlpha);\n}\n"},function(t,e){t.exports="uniform float horizontalSegments;\nuniform float verticalSegments;\nuniform float timePercent;\nuniform float segmentWidth;\nuniform float segmentHeight;\nattribute vec2 segment;\nattribute float times;\nvarying vec2 vUv;\nvarying float fakePercent;\nvoid main() {\n\tvUv = uv;\n\tfloat width = segmentWidth * horizontalSegments;\n\tfloat height = segmentHeight * verticalSegments;\n\tvec4 newPosition = vec4(position, 1.0);\n\tvec2 segmentOrigin = vec2(((segment.x + 0.5) * segmentWidth) - (width * 0.5), (height * 0.5) - ((1.0 * (segment.y + 0.5)) * segmentHeight));\n\tif (timePercent > times) {\n\t\tfloat percent = (timePercent - times) / 0.7;\n\t\tif (percent > 1.0) {\n\t\t\tpercent = 1.0;\n\t\t}\n\t\tif (percent > 0.5) {\n\t\t\tpercent += 1.0;\n\t\t}\n\t\tmat4 matrix = mat4(cos((-1.0 * percent) * 3.14), 0.0, sin((-1.0 * percent) * 3.14), 0.0, 0.0, 1.0, 0.0, 0.0, -sin((-1.0 * percent) * 3.14), 0.0, cos((-1.0 * percent) * 3.14), 0.0, 0.0, 0.0, 0.0, 1.0);\n\t\tnewPosition.x -= segmentOrigin.x;\n\t\tnewPosition.y -= segmentOrigin.y;\n\t\tnewPosition = matrix * newPosition;\n\t\tnewPosition.x += segmentOrigin.x;\n\t\tnewPosition.y += segmentOrigin.y;\n\t\tif (segment.x < (horizontalSegments / 2.0)) {\n\t\t\tfakePercent = percent - (abs((horizontalSegments / 2.0) - segment.x) * (0.25 / horizontalSegments));\n\t\t}\n\t\telse {\n\t\t\tfakePercent = percent + (abs((horizontalSegments / 2.0) - segment.x) * (0.25 / horizontalSegments));\n\t\t}\n\t}\n\tif ((timePercent < 0.0001) || (timePercent > 0.9999)) {\n\t\tgl_Position = (projectionMatrix * modelViewMatrix) * vec4(position, 1.0);\n\t\treturn ;\n\t}\n\tgl_Position = (projectionMatrix * modelViewMatrix) * newPosition;\n}\n"},function(t,e){t.exports="uniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvarying float fakePercent;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tvec4 color = srcColor;\n\tif (fakePercent > 0.5) {\n\t\tcolor = distColor;\n\t}\n\tif ((fakePercent < 0.5) && (fakePercent > 0.35)) {\n\t\tcolor.a = 0.5;\n\t}\n\tgl_FragColor = color;\n}\n"},function(t,e){t.exports="#define PI 3.14159265\nuniform float horizontalSegments;\nuniform float verticalSegments;\nuniform float timePercent;\nuniform float segmentWidth;\nuniform float segmentHeight;\nuniform float duration;\nattribute vec2 segment;\nattribute float times;\nvarying vec2 vUv;\nmat4 rotateY(float angle) {\n\treturn mat4(cos(angle), 0.0, sin(angle), 0.0, 0.0, 1.0, 0.0, 0.0, -sin(angle), 0.0, cos(angle), 0.0, 0.0, 0.0, 0.0, 1.0);\n}\nvoid main() {\n\tvUv = uv;\n\tfloat width = segmentWidth * horizontalSegments;\n\tfloat height = segmentHeight * verticalSegments;\n\tmat4 matrix;\n\tfloat stagePercent;\n\tvec4 newPosition = vec4(position, 1.0);\n\tfloat selfTimePercent = (timePercent - times) / (4.0 / 5.0);\n\tif (selfTimePercent < 0.0) {\n\t\tselfTimePercent = 0.0;\n\t}\n\telse if (selfTimePercent > 1.0) {\n\t\tselfTimePercent = 1.0;\n\t}\n\tif (selfTimePercent < (2.0 / 5.0)) {\n\t\tstagePercent = selfTimePercent / (2.0 / 5.0);\n\t\tnewPosition.x -= (0.5 * width);\n\t\tmatrix = rotateY(((-1.0 * stagePercent) * PI) * 0.5);\n\t\tnewPosition = matrix * newPosition;\n\t\tnewPosition.x += (0.5 * width);\n\t}\n\telse if ((selfTimePercent >= (2.0 / 5.0)) && (selfTimePercent < (3.0 / 5.0))) {\n\t\tstagePercent = (selfTimePercent - (2.0 / 5.0)) / (1.0 / 5.0);\n\t\tnewPosition.x -= (0.5 * width);\n\t\tnewPosition = rotateY((-1.0 * PI) * 0.5) * newPosition;\n\t\tmatrix = rotateY(((-1.0 * stagePercent) * PI) * 2.0);\n\t\tnewPosition = matrix * newPosition;\n\t\tnewPosition.x += (0.5 * width);\n\t\tnewPosition.x -= (width * stagePercent);\n\t}\n\telse {\n\t\tfloat offset = (((newPosition.x + (0.5 * width)) / width) * 2.0) / 5.0;\n\t\tstagePercent = (selfTimePercent - (1.0 / 5.0)) / ((2.0 / 5.0) + offset);\n\t\tif (stagePercent > 1.0) {\n\t\t\tstagePercent = 1.0;\n\t\t}\n\t\tvec4 vvUvv = vec4(vUv.x - 0.5, vUv.y - 0.5, 0.0, 1.0);\n\t\tvvUvv = rotateY(-1.0 * PI) * vvUvv;\n\t\tvUv = vvUvv.xy + 0.5;\n\t\tnewPosition.x -= (0.5 * width);\n\t\tmatrix = rotateY((((-1.0 * stagePercent) * PI) * 0.5) - (PI * 2.5));\n\t\tnewPosition = matrix * newPosition;\n\t\tnewPosition.x += (0.5 * width);\n\t\tnewPosition.x -= width;\n\t}\n\tif ((timePercent < 0.0001) || (timePercent > 0.9999)) {\n\t\tvUv = uv;\n\t\tgl_Position = (projectionMatrix * modelViewMatrix) * vec4(position, 1.0);\n\t\treturn ;\n\t}\n\tgl_Position = (projectionMatrix * modelViewMatrix) * newPosition;\n}\n"},function(t,e){t.exports="uniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tvec4 color = srcColor;\n\tif (timePercent > 0.5) {\n\t\tcolor = distColor;\n\t}\n\tif (timePercent < 0.0001) {\n\t\tcolor = srcColor;\n\t}\n\telse if (timePercent > 0.9999) {\n\t\tcolor = distColor;\n\t}\n\tgl_FragColor = color;\n}\n"},function(t,e){t.exports="#define PI 3.14159265\nattribute float index;\nattribute float type;\nattribute float delay;\nuniform float timePercent;\nuniform float segmentWidth;\nuniform float segments;\nvarying vec2 vUv;\nvarying float vType;\nvarying float rotatePercent;\nmat4 rotateY(float angle) {\n\treturn mat4(cos(angle), 0.0, sin(angle), 0.0, 0.0, 1.0, 0.0, 0.0, -sin(angle), 0.0, cos(angle), 0.0, 0.0, 0.0, 0.0, 1.0);\n}\nvoid main() {\n\tvUv = uv;\n\tvType = type;\n\tvec4 newPosition = vec4(position, 1.0);\n\tfloat selfPercent = (timePercent - delay) / 0.7;\n\trotatePercent = selfPercent;\n\tif (selfPercent < 0.0) {\n\t\tselfPercent = 0.0;\n\t}\n\telse if (selfPercent > 1.0) {\n\t\tselfPercent = 1.0;\n\t}\n\tfloat offsetX = ((segments * segmentWidth) * 0.5) - ((index + 0.5) * segmentWidth);\n\tfloat offsetZ = segmentWidth * 0.5;\n\tnewPosition.x += offsetX;\n\tnewPosition.z += offsetZ;\n\tnewPosition.x *= (0.9 + ((abs(timePercent - 0.5) / 0.5) * 0.1));\n\tnewPosition.z *= (0.9 + ((abs(timePercent - 0.5) / 0.5) * 0.1));\n\tnewPosition = rotateY((PI * 0.5) * selfPercent) * newPosition;\n\tnewPosition.x -= offsetX;\n\tnewPosition.z -= offsetZ;\n\tgl_Position = (projectionMatrix * modelViewMatrix) * newPosition;\n}\n"},function(t,e){t.exports="uniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvarying float vType;\nvarying float rotatePercent;\nmat3 yuv2rgb = mat3(1.0, 0.0, 1.13983, 1.0, -0.39465, -0.58060, 1.0, 2.03211, 0.0);\nmat3 rgb2yuv = mat3(0.2126, 0.7152, 0.0722, -0.09991, -0.33609, 0.43600, 0.615, -0.5586, -0.05639);\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tvec3 srcYuv;\n\tvec3 distYuv;\n\tif (rotatePercent < 0.5) {\n\t\tdistYuv = distColor.rgb * rgb2yuv;\n\t\tdistYuv.r *= (1.0 - (abs(rotatePercent - 0.5) / 0.5));\n\t\tdistColor = vec4(distYuv * yuv2rgb, distColor.a);\n\t}\n\telse {\n\t\tsrcYuv = distColor.rgb * rgb2yuv;\n\t\tsrcYuv.r *= (abs(rotatePercent - 0.5) / 0.5);\n\t\tsrcColor = vec4(srcYuv * yuv2rgb, srcColor.a);\n\t}\n\tvec4 color = vType < 0.5 ? srcColor : distColor;\n\tgl_FragColor = color;\n}\n"},function(t,e){t.exports="float easeInFloat(float t, float b, float c, float d) {\n\tt = t / d;\n\treturn ((c * t) * t) + b;\n}\nfloat interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\n#define PI 3.141592653\nuniform float horizontalSegments;\nuniform float verticalSegments;\nuniform float timePercent;\nuniform float segmentWidth;\nuniform float segmentHeight;\nattribute float isLeft;\nvarying vec2 vUv;\nvarying vec4 shadow;\nvoid main() {\n\tvUv = uv;\n\tfloat scaleX;\n\tfloat transform;\n\tfloat displacement;\n\tvec4 newPosition = vec4(position, 1.0);\n\tvec4 glPosition = (projectionMatrix * modelViewMatrix) * newPosition;\n\tfloat crestCount = 24.0;\n\tfloat width = horizontalSegments * segmentWidth;\n\tfloat height = verticalSegments * segmentHeight;\n\tfloat heightFactor = (newPosition.y + (height * 0.5)) / height;\n\tfloat scaleY = interpolationFloat(1.0, 1.05, 0.0, 0.11, timePercent, 0);\n\tnewPosition.y += (height * 0.5);\n\tnewPosition.y *= scaleY;\n\tnewPosition.y -= (height * 0.5);\n\tnewPosition.y += 10.0;\n\tif ((timePercent > 0.0) && (timePercent < 0.333)) {\n\t\tfloat delay = (1.0 - heightFactor) * 0.1;\n\t\tscaleX = interpolationFloat(1.0, 0.5, 0.0 + delay, 0.333, timePercent, 1);\n\t}\n\telse if ((timePercent >= 0.333) && (timePercent < 0.5)) {\n\t\tfloat scaleTop = 0.5;\n\t\tfloat scaleBottom = interpolationFloat(0.5, 0.25, 0.333, 0.5, timePercent, 2);\n\t\tfloat incr = easeInFloat(1.0 - heightFactor, 0.0, abs(scaleBottom - scaleTop), 1.0);\n\t\tscaleX = scaleTop - incr;\n\t}\n\telse if ((timePercent >= 0.5) && (timePercent < 0.583)) {\n\t\tfloat scaleTop = 0.5;\n\t\tfloat scaleBottom = interpolationFloat(0.25, 0.5, 0.5, 0.583, timePercent, 1);\n\t\tfloat incr = easeInFloat(1.0 - heightFactor, 0.0, abs(scaleBottom - scaleTop), 1.0);\n\t\tscaleX = scaleTop - incr;\n\t}\n\telse if (timePercent >= 0.583) {\n\t\tfloat scaleTop = 0.5;\n\t\tfloat scaleBottom = interpolationFloat(0.5, 0.75, 0.583, 0.666, timePercent, 2);\n\t\tfloat incr = easeInFloat(1.0 - heightFactor, 0.0, abs(scaleBottom - scaleTop), 1.0);\n\t\tscaleX = scaleTop + incr;\n\t}\n\tif (timePercent > 0.583) {\n\t\tdisplacement = (isLeft < 0.5 ? 1.0 : -1.0) * interpolationFloat(0.0, width / 2.0, 0.583, 1.0, timePercent, 0);\n\t}\n\tfloat ampTop = interpolationFloat(0.0, 1.0, 0.0, 0.11, timePercent, 0);\n\tfloat ampBottom = interpolationFloat(0.0, 1.0, 0.11, 0.22, timePercent, 0);\n\tfloat amp = ampBottom + (heightFactor * abs(ampBottom - ampTop));\n\tfloat foo = newPosition.x * ((crestCount * PI) / width);\n\tnewPosition.z = (amp * cos(foo + (PI / 2.0))) * 20.0;\n\ttransform = (isLeft < 0.5 ? -1.0 : 1.0) * (width * 0.5);\n\tnewPosition.x += transform;\n\tnewPosition.x *= scaleX;\n\tnewPosition.x -= transform;\n\tnewPosition.x += displacement;\n\tshadow = vec4(0.0, 0.0, 0.0, 0.0);\n\tif (newPosition.z < 15.0) {\n\t\tfloat alpha = 0.3 * (1.0 - ((newPosition.z + 20.0) / 35.0));\n\t\tshadow.a = alpha * amp;\n\t}\n\tgl_Position = (projectionMatrix * modelViewMatrix) * newPosition;\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvarying vec4 shadow;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tvec4 color = blendSrcOver(shadow, srcColor);\n\tgl_FragColor = color;\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\n#define PI 3.14159265\nuniform float timePercent;\nuniform float aCoefficient;\nuniform float zCurveLimit;\nuniform float horizontalSegments;\nuniform float verticalSegments;\nuniform float segmentWidth;\nuniform float segmentHeight;\nvarying vec2 vUv;\nvoid main() {\n\tfloat halfWidth = (segmentWidth * horizontalSegments) * 0.5;\n\tfloat halfHeight = (segmentHeight * verticalSegments) * 0.5;\n\tvUv = uv;\n\tvec4 newPosition = vec4(position, 1.0);\n\tfloat curve;\n\tfloat aStart = interpolationFloat(0.00000009, aCoefficient, 0.0, 0.5, timePercent, 0);\n\tfloat aEnd = 0.0000009;\n\tfloat zStart = interpolationFloat(0.0, zCurveLimit, 0.0, 0.5, timePercent, 0);\n\tfloat zEnd = 0.0;\n\tfloat a = interpolationFloat(aStart, aEnd, 0.0, halfWidth * 2.0, newPosition.x + halfWidth, 0);\n\tfloat z = interpolationFloat(zStart, zEnd, 0.0, halfWidth * 2.0, newPosition.x + halfWidth, 0);\n\tnewPosition.z -= (((-a * newPosition.y) * newPosition.y) + z);\n\tfloat scaleYStart = interpolationFloat(1.0, 0.8, 0.0, 0.5, timePercent, 0);\n\tfloat scaleYEnd = 1.0;\n\tfloat scaleY = interpolationFloat(scaleYStart, scaleYEnd, 0.0, halfWidth * 2.0, newPosition.x + halfWidth, 0);\n\tnewPosition.y += halfHeight;\n\tnewPosition.y *= scaleY;\n\tfloat angle = interpolationFloat(0.0, -((2.0 * PI) / 3.0), 0.111, 1.0, timePercent, 1);\n\tmat4 rotateX = mat4(1.0, 0.0, 0.0, 0.0, 0.0, cos(angle), sin(angle), 0.0, 0.0, -sin(angle), cos(angle), 0.0, 0.0, 0.0, 0.0, 1.0);\n\tnewPosition = rotateX * newPosition;\n\tnewPosition.y -= halfHeight;\n\tgl_Position = (projectionMatrix * modelViewMatrix) * newPosition;\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\nvec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tfloat alpha = interpolationFloat(0.0, 0.6, 0.5, 1.0, timePercent, 0);\n\tvec4 shadow = vec4(0.0, 0.0, 0.0, alpha);\n\tgl_FragColor = blendSrcOver(shadow, srcColor);\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\n#define PI 3.14159265358\nuniform float timePercent;\nuniform float horizontalSegments;\nuniform float verticalSegments;\nuniform float segmentWidth;\nuniform float segmentHeight;\nvarying vec2 vUv;\nvarying float shadowAlpha;\nmat2 rotateOrigin(float angle) {\n\treturn mat2(cos(angle), sin(angle), -sin(angle), cos(angle));\n}\nvoid main() {\n\tfloat halfWidth = (segmentWidth * horizontalSegments) * 0.5;\n\tfloat halfHeight = (segmentHeight * verticalSegments) * 0.5;\n\tvUv = uv;\n\tvec2 shadowPosition = vec2(position.xy);\n\tfloat rotateAngle = PI * 0.27;\n\tfloat min_r = halfWidth * 0.05;\n\tshadowPosition = rotateOrigin(rotateAngle) * shadowPosition;\n\tvec4 newPosition = vec4(shadowPosition.xy, position.z, 1.0);\n\tfloat line = interpolationFloat(0.0, halfWidth * 2.8, 0.0, 1.0, timePercent, 1);\n\tfloat dis2BaseLine = halfWidth - newPosition.x;\n\tfloat dis2Line = line - dis2BaseLine;\n\tfloat L = line <= (halfWidth * 2.0) ? line : halfWidth * 2.0;\n\tfloat r = L / PI;\n\tr = r < min_r ? min_r : r;\n\tfloat angle = dis2Line / r;\n\tif (((dis2Line > 0.0) && (dis2Line < (line * 0.5))) && (r > min_r)) {\n\t\tshadowAlpha = interpolationFloat(0.0, 0.3, 0.0, line * 0.5, dis2Line, 0);\n\t}\n\telse {\n\t\tshadowAlpha = 0.0;\n\t}\n\tif (dis2BaseLine < line) {\n\t\tnewPosition.x = ((sin(angle) * r) + halfWidth) - line;\n\t\tnewPosition.z = (r - (cos(angle) * r)) * 0.5;\n\t}\n\tvec2 finalPosition = vec2(newPosition.xy);\n\tfinalPosition = rotateOrigin(-rotateAngle) * finalPosition;\n\tgl_Position = (projectionMatrix * modelViewMatrix) * vec4(finalPosition.xy, newPosition.z, 1.0);\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvarying float shadowAlpha;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tvec4 shadow = vec4(0.0, 0.0, 0.0, shadowAlpha);\n\tgl_FragColor = blendSrcOver(shadow, srcColor);\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\n#define PI 3.14159265358\nuniform float timePercent;\nuniform float horizontalSegments;\nuniform float verticalSegments;\nuniform float segmentWidth;\nuniform float segmentHeight;\nvarying vec2 vUv;\nmat4 rotateX(float angle) {\n\treturn mat4(1.0, 0.0, 0.0, 0.0, 0.0, cos(angle), sin(angle), 0.0, 0.0, -sin(angle), cos(angle), 0.0, 0.0, 0.0, 0.0, 1.0);\n}\nvoid main() {\n\tfloat halfWidth = (segmentWidth * horizontalSegments) * 0.5;\n\tfloat halfHeight = (segmentHeight * verticalSegments) * 0.5;\n\tvUv = uv;\n\tvec4 newPosition = vec4(position, 1.0);\n\tfloat delay = interpolationFloat(0.0, 0.08, 0.0, halfWidth * 2.0, halfWidth + newPosition.x, 0);\n\tfloat arc = halfHeight - newPosition.y;\n\tfloat L;\n\tif (timePercent < 0.8) {\n\t\tL = interpolationFloat(halfHeight * 4.0, halfHeight * 22.0, 0.3 + delay, 0.8, timePercent, 0);\n\t}\n\telse {\n\t\tL = interpolationFloat(halfHeight * 22.0, halfHeight * 300.0, 0.8, 1.0, timePercent, 0);\n\t}\n\tfloat r = L / (2.0 * PI);\n\tfloat angle = PI - (arc / r);\n\tfloat y = sin(angle) * r;\n\tfloat z = cos(angle) * r;\n\tnewPosition.y = halfHeight - y;\n\tnewPosition.z = (z + r) * 0.45;\n\tfloat rotateAngle = interpolationFloat(-PI * 0.5, 0.0, 0.0 + delay, 0.4, timePercent, 0);\n\tnewPosition.y -= halfHeight;\n\tnewPosition = rotateX(rotateAngle) * newPosition;\n\tnewPosition.y += halfHeight;\n\tfloat backRotate1 = interpolationFloat(0.0, PI * 0.03, 0.75, 0.9, timePercent, 0);\n\tnewPosition.y -= halfHeight;\n\tnewPosition = rotateX(backRotate1) * newPosition;\n\tnewPosition.y += halfHeight;\n\tfloat backRotate2 = interpolationFloat(0.0, -PI * 0.03, 0.8, 1.0, timePercent, 0);\n\tnewPosition.y -= halfHeight;\n\tnewPosition = rotateX(backRotate2) * newPosition;\n\tnewPosition.y += halfHeight;\n\tgl_Position = (projectionMatrix * modelViewMatrix) * newPosition;\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\nvec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tfloat alpha = interpolationFloat(0.0, 0.6, 0.5, 1.0, timePercent, 0);\n\tvec4 shadow = vec4(0.0, 0.0, 0.0, 0.0);\n\tgl_FragColor = blendSrcOver(shadow, distColor);\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nfloat interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\n#define PI 3.14159265358\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nuniform float width;\nuniform float height;\nvarying vec2 vUv;\nvec2 transform(vec2 uv) {\n\tuv.y = (uv.y * height) / width;\n\treturn uv - vec2(0.5, (0.5 * height) / width);\n}\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tfloat shadowAngle = PI / 6.0;\n\tfloat clockAngle;\n\tvec2 a;\n\tvec2 b = transform(vUv);\n\tfloat angle;\n\tif (timePercent < 0.5) {\n\t\ta = vec2(0.0, 0.5);\n\t\tclockAngle = interpolationFloat(0.0, PI, 0.0, 0.5, timePercent, 0);\n\t\tif (b.x > 0.0) {\n\t\t\tangle = acos(((a.x * b.x) + (a.y * b.y)) / (sqrt((a.x * a.x) + (a.y * a.y)) * sqrt((b.x * b.x) + (b.y * b.y))));\n\t\t\tif (angle < clockAngle) {\n\t\t\t\tif (angle > (clockAngle - shadowAngle)) {\n\t\t\t\t\tfloat shadowAlpha = interpolationFloat(1.0, 0.0, 0.0, 1.0, abs(clockAngle - angle) / shadowAngle, 0);\n\t\t\t\t\tsrcColor.a = shadowAlpha;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsrcColor.a = 0.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tsrcColor.a = 1.0;\n\t\t}\n\t}\n\telse {\n\t\ta = vec2(0.0, -0.5);\n\t\tclockAngle = interpolationFloat(0.0, PI + shadowAngle, 0.5, 1.0, timePercent, 0);\n\t\tif (b.x <= 0.0) {\n\t\t\tangle = acos(((a.x * b.x) + (a.y * b.y)) / (sqrt((a.x * a.x) + (a.y * a.y)) * sqrt((b.x * b.x) + (b.y * b.y))));\n\t\t\tif (angle < clockAngle) {\n\t\t\t\tif (angle > (clockAngle - shadowAngle)) {\n\t\t\t\t\tfloat shadowAlpha = interpolationFloat(1.0, 0.0, 0.0, 1.0, abs(clockAngle - angle) / shadowAngle, 0);\n\t\t\t\t\tsrcColor.a = shadowAlpha;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsrcColor.a = 0.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tsrcColor.a = 0.0;\n\t\t}\n\t}\n\tgl_FragColor = blendSrcOver(srcColor, distColor);\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\n#define PI 3.14159265358\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nuniform float width;\nuniform float height;\nvarying vec2 vUv;\nvoid main() {\n\tvec2 uv = vUv;\n\tbool useSrc = false;\n\tvec2 row;\n\tfloat delay = 0.02;\n\tfor (int i = 0; i < 7; i++) {\n\t\tfloat fi = float(i);\n\t\trow.r = (fi * 1.0) / 7.0;\n\t\trow.g = (float(i + 1) * 1.0) / 7.0;\n\t\tif ((vUv.y <= row.g) && (vUv.y > row.r)) {\n\t\t\tif ((i % 2) == 0) {\n\t\t\t\tfloat x = interpolationFloat(0.0, 1.0, delay * fi, (delay * fi) + 0.86, timePercent, 1);\n\t\t\t\tif (vUv.x < x) {\n\t\t\t\t\tuseSrc = false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tuv.x -= x;\n\t\t\t\t\tuseSrc = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfloat x = interpolationFloat(1.0, 0.0, delay * fi, (delay * fi) + 0.86, timePercent, 1);\n\t\t\t\tif (vUv.x < x) {\n\t\t\t\t\tuv.x = (1.0 - x) + uv.x;\n\t\t\t\t\tuseSrc = true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tuseSrc = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\tvec4 srcColor = texture2D(texturePrev, uv);\n\tvec4 distColor = texture2D(textureNext, uv);\n\tgl_FragColor = useSrc ? srcColor : distColor;\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nfloat interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\n#define PI 3.14159265358\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nuniform float width;\nuniform float height;\nvarying vec2 vUv;\nvoid main() {\n\tvec2 uvSrc = vUv;\n\tvec2 uvDist = vUv;\n\tfloat scaleSrc = interpolationFloat(1.0, 0.1, 0.0, 1.0, timePercent, 0);\n\tfloat scaleDist = interpolationFloat(2.0, 1.0, 0.0, 1.0, timePercent, 0);\n\tuvSrc -= 0.5;\n\tuvSrc *= scaleSrc;\n\tuvSrc += 0.5;\n\tuvDist -= 0.5;\n\tuvDist *= scaleDist;\n\tuvDist += 0.5;\n\tvec4 srcColor = texture2D(texturePrev, uvSrc);\n\tsrcColor.a = interpolationFloat(1.0, 0.0, 0.0, 1.0, timePercent, 0);\n\tvec4 distColor;\n\tif ((((uvDist.x > 1.0) || (uvDist.x < 0.0)) || (uvDist.y > 1.0)) || (uvDist.y < 0.0)) {\n\t\tdistColor = vec4(0.0, 0.0, 0.0, 1.0);\n\t}\n\telse {\n\t\tdistColor = texture2D(textureNext, uvDist);\n\t}\n\tgl_FragColor = blendSrcOver(srcColor, distColor);\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\n#define PI 3.14159265358\nuniform float timePercent;\nuniform float horizontalSegments;\nuniform float verticalSegments;\nuniform float segmentWidth;\nuniform float segmentHeight;\nvarying vec2 vUv;\nmat4 rotateY(float angle) {\n\treturn mat4(cos(angle), 0.0, sin(angle), 0.0, 0.0, 1.0, 0.0, 0.0, -sin(angle), 0.0, cos(angle), 0.0, 0.0, 0.0, 0.0, 1.0);\n}\nvoid main() {\n\tfloat halfWidth = (segmentWidth * horizontalSegments) * 0.5;\n\tfloat halfHeight = (segmentHeight * verticalSegments) * 0.5;\n\tvUv = uv;\n\tvec4 newPosition = vec4(position, 1.0);\n\tfloat stageOneAngle = PI / 14.0;\n\tfloat stageTwoAngle = (PI * 12.0) / 14.0;\n\tfloat stage_1 = 0.1;\n\tfloat stage_2 = 0.8;\n\tif (timePercent < 0.5) {\n\t\tnewPosition.z = interpolationFloat(0.0, -100.0, 0.0, 0.5, timePercent, 0);\n\t}\n\telse {\n\t\tnewPosition.z = interpolationFloat(-100.0, 0.0, 0.5, 1.0, timePercent, 0);\n\t}\n\tif (timePercent < stage_1) {\n\t\tfloat angle = interpolationFloat(0.0, stageOneAngle, 0.0, stage_1, timePercent, 0);\n\t\tnewPosition.x += halfWidth;\n\t\tnewPosition *= rotateY(angle);\n\t\tnewPosition.x -= halfWidth;\n\t}\n\telse if ((timePercent >= stage_1) && (timePercent < stage_2)) {\n\t\tif (timePercent > 0.5) {\n\t\t\tnewPosition *= rotateY(PI);\n\t\t}\n\t\tfloat offset = halfWidth - (sin((PI * 0.5) - stageOneAngle) * halfWidth);\n\t\tfloat angle = interpolationFloat(0.0, stageTwoAngle, stage_1, stage_2, timePercent, 0);\n\t\tnewPosition *= rotateY(angle);\n\t\tnewPosition.x += halfWidth;\n\t\tnewPosition *= rotateY(stageOneAngle);\n\t\tnewPosition.x -= halfWidth;\n\t\tnewPosition.x += interpolationFloat(0.0, 2.0 * offset, stage_1, stage_2, timePercent, 0);\n\t}\n\telse {\n\t\tfloat angle = interpolationFloat(-stageOneAngle, 0.0, stage_2, 1.0, timePercent, 0);\n\t\tnewPosition.x -= halfWidth;\n\t\tnewPosition *= rotateY(angle);\n\t\tnewPosition.x += halfWidth;\n\t}\n\tgl_Position = (projectionMatrix * modelViewMatrix) * newPosition;\n}\n"},function(t,e){t.exports="uniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tgl_FragColor = timePercent < 0.5 ? srcColor : distColor;\n}\n"},function(t,e,n){"use strict";(function(t){var i=n(44),r=n(45),o=setTimeout,s=void 0!==t?t:null;function a(t){return Boolean(t&&void 0!==t.length)}function l(){}function u(t){if(!(this instanceof u))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],m(t,this)}function h(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,u._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var i;try{i=n(t._value)}catch(t){return void d(e.promise,t)}c(e.promise,i)}else(1===t._state?c:d)(e.promise,t._value)}))):t._deferreds.push(e)}function c(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof u)return t._state=3,t._value=e,void p(t);if("function"==typeof n)return void m((i=n,r=e,function(){i.apply(r,arguments)}),t)}t._state=1,t._value=e,p(t)}catch(e){d(t,e)}var i,r}function d(t,e){t._state=2,t._value=e,p(t)}function p(t){2===t._state&&0===t._deferreds.length&&u._immediateFn((function(){t._handled||u._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)h(t,t._deferreds[e]);t._deferreds=null}function f(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function m(t,e){var n=!1;try{t((function(t){n||(n=!0,c(e,t))}),(function(t){n||(n=!0,d(e,t))}))}catch(t){if(n)return;n=!0,d(e,t)}}u.prototype.catch=function(t){return this.then(null,t)},u.prototype.then=function(t,e){var n=new this.constructor(l);return h(this,new f(t,e,n)),n},u.prototype.finally=i.a,u.all=function(t){return new u((function(e,n){if(!a(t))return n(new TypeError("Promise.all accepts an array"));var i=Array.prototype.slice.call(t);if(0===i.length)return e([]);var r=i.length;function o(t,s){try{if(s&&("object"==typeof s||"function"==typeof s)){var a=s.then;if("function"==typeof a)return void a.call(s,(function(e){o(t,e)}),n)}i[t]=s,0==--r&&e(i)}catch(t){n(t)}}for(var s=0;s<i.length;s++)o(s,i[s])}))},u.allSettled=r.a,u.resolve=function(t){return t&&"object"==typeof t&&t.constructor===u?t:new u((function(e){e(t)}))},u.reject=function(t){return new u((function(e,n){n(t)}))},u.race=function(t){return new u((function(e,n){if(!a(t))return n(new TypeError("Promise.race accepts an array"));for(var i=0,r=t.length;i<r;i++)u.resolve(t[i]).then(e,n)}))},u._immediateFn="function"==typeof s&&function(t){s(t)}||function(t){o(t,0)},u._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},e.a=u}).call(this,n(54).setImmediate)},function(t,e,n){"use strict";e.a=function(t){var e=this.constructor;return this.then((function(n){return e.resolve(t()).then((function(){return n}))}),(function(n){return e.resolve(t()).then((function(){return e.reject(n)}))}))}},function(t,e,n){"use strict";e.a=function(t){return new this((function(e,n){if(!t||void 0===t.length)return n(new TypeError(typeof t+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var i=Array.prototype.slice.call(t);if(0===i.length)return e([]);var r=i.length;function o(t,n){if(n&&("object"==typeof n||"function"==typeof n)){var s=n.then;if("function"==typeof s)return void s.call(n,(function(e){o(t,e)}),(function(n){i[t]={status:"rejected",reason:n},0==--r&&e(i)}))}i[t]={status:"fulfilled",value:n},0==--r&&e(i)}for(var s=0;s<i.length;s++)o(s,i[s])}))}},function(t,e,n){"use strict";
|
|
9
|
+
*/(function(){var o="Expected a function",s="__lodash_placeholder__",a=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],l="[object Arguments]",u="[object Array]",h="[object Boolean]",c="[object Date]",d="[object Error]",p="[object Function]",f="[object GeneratorFunction]",m="[object Map]",g="[object Number]",v="[object Object]",_="[object RegExp]",y="[object Set]",x="[object String]",b="[object Symbol]",T="[object WeakMap]",w="[object ArrayBuffer]",S="[object DataView]",E="[object Float32Array]",M="[object Float64Array]",A="[object Int8Array]",R="[object Int16Array]",P="[object Int32Array]",C="[object Uint8Array]",I="[object Uint16Array]",O="[object Uint32Array]",L=/\b__p \+= '';/g,N=/\b(__p \+=) '' \+/g,D=/(__e\(.*?\)|\b__t\)) \+\n'';/g,F=/&(?:amp|lt|gt|quot|#39);/g,B=/[&<>"']/g,U=RegExp(F.source),k=RegExp(B.source),G=/<%-([\s\S]+?)%>/g,H=/<%([\s\S]+?)%>/g,z=/<%=([\s\S]+?)%>/g,j=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V=/^\w*$/,W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,X=/[\\^$.*+?()[\]{}|]/g,q=RegExp(X.source),Y=/^\s+/,Z=/\s/,J=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,K=/\{\n\/\* \[wrapped with (.+)\] \*/,$=/,? & /,Q=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tt=/[()=,{}\[\]\/\s]/,et=/\\(\\)?/g,nt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,it=/\w*$/,rt=/^[-+]0x[0-9a-f]+$/i,ot=/^0b[01]+$/i,st=/^\[object .+?Constructor\]$/,at=/^0o[0-7]+$/i,lt=/^(?:0|[1-9]\d*)$/,ut=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ht=/($^)/,ct=/['\n\r\u2028\u2029\\]/g,dt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",pt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ft="[\\ud800-\\udfff]",mt="["+pt+"]",gt="["+dt+"]",vt="\\d+",_t="[\\u2700-\\u27bf]",yt="[a-z\\xdf-\\xf6\\xf8-\\xff]",xt="[^\\ud800-\\udfff"+pt+vt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",bt="\\ud83c[\\udffb-\\udfff]",Tt="[^\\ud800-\\udfff]",wt="(?:\\ud83c[\\udde6-\\uddff]){2}",St="[\\ud800-\\udbff][\\udc00-\\udfff]",Et="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Mt="(?:"+yt+"|"+xt+")",At="(?:"+Et+"|"+xt+")",Rt="(?:"+gt+"|"+bt+")"+"?",Pt="[\\ufe0e\\ufe0f]?"+Rt+("(?:\\u200d(?:"+[Tt,wt,St].join("|")+")[\\ufe0e\\ufe0f]?"+Rt+")*"),Ct="(?:"+[_t,wt,St].join("|")+")"+Pt,It="(?:"+[Tt+gt+"?",gt,wt,St,ft].join("|")+")",Ot=RegExp("['’]","g"),Lt=RegExp(gt,"g"),Nt=RegExp(bt+"(?="+bt+")|"+It+Pt,"g"),Dt=RegExp([Et+"?"+yt+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[mt,Et,"$"].join("|")+")",At+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[mt,Et+Mt,"$"].join("|")+")",Et+"?"+Mt+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Et+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vt,Ct].join("|"),"g"),Ft=RegExp("[\\u200d\\ud800-\\udfff"+dt+"\\ufe0e\\ufe0f]"),Bt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ut=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],kt=-1,Gt={};Gt[E]=Gt[M]=Gt[A]=Gt[R]=Gt[P]=Gt[C]=Gt["[object Uint8ClampedArray]"]=Gt[I]=Gt[O]=!0,Gt[l]=Gt[u]=Gt[w]=Gt[h]=Gt[S]=Gt[c]=Gt[d]=Gt[p]=Gt[m]=Gt[g]=Gt[v]=Gt[_]=Gt[y]=Gt[x]=Gt[T]=!1;var Ht={};Ht[l]=Ht[u]=Ht[w]=Ht[S]=Ht[h]=Ht[c]=Ht[E]=Ht[M]=Ht[A]=Ht[R]=Ht[P]=Ht[m]=Ht[g]=Ht[v]=Ht[_]=Ht[y]=Ht[x]=Ht[b]=Ht[C]=Ht["[object Uint8ClampedArray]"]=Ht[I]=Ht[O]=!0,Ht[d]=Ht[p]=Ht[T]=!1;var zt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},jt=parseFloat,Vt=parseInt,Wt="object"==typeof t&&t&&t.Object===Object&&t,Xt="object"==typeof self&&self&&self.Object===Object&&self,qt=Wt||Xt||Function("return this")(),Yt=e&&!e.nodeType&&e,Zt=Yt&&"object"==typeof i&&i&&!i.nodeType&&i,Jt=Zt&&Zt.exports===Yt,Kt=Jt&&Wt.process,$t=function(){try{var t=Zt&&Zt.require&&Zt.require("util").types;return t||Kt&&Kt.binding&&Kt.binding("util")}catch(t){}}(),Qt=$t&&$t.isArrayBuffer,te=$t&&$t.isDate,ee=$t&&$t.isMap,ne=$t&&$t.isRegExp,ie=$t&&$t.isSet,re=$t&&$t.isTypedArray;function oe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function se(t,e,n,i){for(var r=-1,o=null==t?0:t.length;++r<o;){var s=t[r];e(i,s,n(s),t)}return i}function ae(t,e){for(var n=-1,i=null==t?0:t.length;++n<i&&!1!==e(t[n],n,t););return t}function le(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function ue(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(!e(t[n],n,t))return!1;return!0}function he(t,e){for(var n=-1,i=null==t?0:t.length,r=0,o=[];++n<i;){var s=t[n];e(s,n,t)&&(o[r++]=s)}return o}function ce(t,e){return!!(null==t?0:t.length)&&be(t,e,0)>-1}function de(t,e,n){for(var i=-1,r=null==t?0:t.length;++i<r;)if(n(e,t[i]))return!0;return!1}function pe(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r}function fe(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}function me(t,e,n,i){var r=-1,o=null==t?0:t.length;for(i&&o&&(n=t[++r]);++r<o;)n=e(n,t[r],r,t);return n}function ge(t,e,n,i){var r=null==t?0:t.length;for(i&&r&&(n=t[--r]);r--;)n=e(n,t[r],r,t);return n}function ve(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}var _e=Ee("length");function ye(t,e,n){var i;return n(t,(function(t,n,r){if(e(t,n,r))return i=n,!1})),i}function xe(t,e,n,i){for(var r=t.length,o=n+(i?1:-1);i?o--:++o<r;)if(e(t[o],o,t))return o;return-1}function be(t,e,n){return e==e?function(t,e,n){var i=n-1,r=t.length;for(;++i<r;)if(t[i]===e)return i;return-1}(t,e,n):xe(t,we,n)}function Te(t,e,n,i){for(var r=n-1,o=t.length;++r<o;)if(i(t[r],e))return r;return-1}function we(t){return t!=t}function Se(t,e){var n=null==t?0:t.length;return n?Re(t,e)/n:NaN}function Ee(t){return function(e){return null==e?void 0:e[t]}}function Me(t){return function(e){return null==t?void 0:t[e]}}function Ae(t,e,n,i,r){return r(t,(function(t,r,o){n=i?(i=!1,t):e(n,t,r,o)})),n}function Re(t,e){for(var n,i=-1,r=t.length;++i<r;){var o=e(t[i]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function Pe(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}function Ce(t){return t?t.slice(0,Ye(t)+1).replace(Y,""):t}function Ie(t){return function(e){return t(e)}}function Oe(t,e){return pe(e,(function(e){return t[e]}))}function Le(t,e){return t.has(e)}function Ne(t,e){for(var n=-1,i=t.length;++n<i&&be(e,t[n],0)>-1;);return n}function De(t,e){for(var n=t.length;n--&&be(e,t[n],0)>-1;);return n}function Fe(t,e){for(var n=t.length,i=0;n--;)t[n]===e&&++i;return i}var Be=Me({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ue=Me({"&":"&","<":"<",">":">",'"':""","'":"'"});function ke(t){return"\\"+zt[t]}function Ge(t){return Ft.test(t)}function He(t){var e=-1,n=Array(t.size);return t.forEach((function(t,i){n[++e]=[i,t]})),n}function ze(t,e){return function(n){return t(e(n))}}function je(t,e){for(var n=-1,i=t.length,r=0,o=[];++n<i;){var a=t[n];a!==e&&a!==s||(t[n]=s,o[r++]=n)}return o}function Ve(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function We(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function Xe(t){return Ge(t)?function(t){var e=Nt.lastIndex=0;for(;Nt.test(t);)++e;return e}(t):_e(t)}function qe(t){return Ge(t)?function(t){return t.match(Nt)||[]}(t):function(t){return t.split("")}(t)}function Ye(t){for(var e=t.length;e--&&Z.test(t.charAt(e)););return e}var Ze=Me({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Je=function t(e){var n,i=(e=null==e?qt:Je.defaults(qt.Object(),e,Je.pick(qt,Ut))).Array,r=e.Date,Z=e.Error,dt=e.Function,pt=e.Math,ft=e.Object,mt=e.RegExp,gt=e.String,vt=e.TypeError,_t=i.prototype,yt=dt.prototype,xt=ft.prototype,bt=e["__core-js_shared__"],Tt=yt.toString,wt=xt.hasOwnProperty,St=0,Et=(n=/[^.]+$/.exec(bt&&bt.keys&&bt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Mt=xt.toString,At=Tt.call(ft),Rt=qt._,Pt=mt("^"+Tt.call(wt).replace(X,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ct=Jt?e.Buffer:void 0,It=e.Symbol,Nt=e.Uint8Array,Ft=Ct?Ct.allocUnsafe:void 0,zt=ze(ft.getPrototypeOf,ft),Wt=ft.create,Xt=xt.propertyIsEnumerable,Yt=_t.splice,Zt=It?It.isConcatSpreadable:void 0,Kt=It?It.iterator:void 0,$t=It?It.toStringTag:void 0,_e=function(){try{var t=to(ft,"defineProperty");return t({},"",{}),t}catch(t){}}(),Me=e.clearTimeout!==qt.clearTimeout&&e.clearTimeout,Ke=r&&r.now!==qt.Date.now&&r.now,$e=e.setTimeout!==qt.setTimeout&&e.setTimeout,Qe=pt.ceil,tn=pt.floor,en=ft.getOwnPropertySymbols,nn=Ct?Ct.isBuffer:void 0,rn=e.isFinite,on=_t.join,sn=ze(ft.keys,ft),an=pt.max,ln=pt.min,un=r.now,hn=e.parseInt,cn=pt.random,dn=_t.reverse,pn=to(e,"DataView"),fn=to(e,"Map"),mn=to(e,"Promise"),gn=to(e,"Set"),vn=to(e,"WeakMap"),_n=to(ft,"create"),yn=vn&&new vn,xn={},bn=Ro(pn),Tn=Ro(fn),wn=Ro(mn),Sn=Ro(gn),En=Ro(vn),Mn=It?It.prototype:void 0,An=Mn?Mn.valueOf:void 0,Rn=Mn?Mn.toString:void 0;function Pn(t){if(Ws(t)&&!Ns(t)&&!(t instanceof Ln)){if(t instanceof On)return t;if(wt.call(t,"__wrapped__"))return Po(t)}return new On(t)}var Cn=function(){function t(){}return function(e){if(!Vs(e))return{};if(Wt)return Wt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function In(){}function On(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function Ln(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Nn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Dn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Fn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Bn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Fn;++e<n;)this.add(t[e])}function Un(t){var e=this.__data__=new Dn(t);this.size=e.size}function kn(t,e){var n=Ns(t),i=!n&&Ls(t),r=!n&&!i&&Us(t),o=!n&&!i&&!r&&Qs(t),s=n||i||r||o,a=s?Pe(t.length,gt):[],l=a.length;for(var u in t)!e&&!wt.call(t,u)||s&&("length"==u||r&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ao(u,l))||a.push(u);return a}function Gn(t){var e=t.length;return e?t[Bi(0,e-1)]:void 0}function Hn(t,e){return Eo(_r(t),Jn(e,0,t.length))}function zn(t){return Eo(_r(t))}function jn(t,e,n){(void 0!==n&&!Cs(t[e],n)||void 0===n&&!(e in t))&&Yn(t,e,n)}function Vn(t,e,n){var i=t[e];wt.call(t,e)&&Cs(i,n)&&(void 0!==n||e in t)||Yn(t,e,n)}function Wn(t,e){for(var n=t.length;n--;)if(Cs(t[n][0],e))return n;return-1}function Xn(t,e,n,i){return ei(t,(function(t,r,o){e(i,t,n(t),o)})),i}function qn(t,e){return t&&yr(e,ba(e),t)}function Yn(t,e,n){"__proto__"==e&&_e?_e(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Zn(t,e){for(var n=-1,r=e.length,o=i(r),s=null==t;++n<r;)o[n]=s?void 0:ga(t,e[n]);return o}function Jn(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}function Kn(t,e,n,i,r,o){var s,a=1&e,u=2&e,d=4&e;if(n&&(s=r?n(t,i,r,o):n(t)),void 0!==s)return s;if(!Vs(t))return t;var T=Ns(t);if(T){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&wt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!a)return _r(t,s)}else{var L=io(t),N=L==p||L==f;if(Us(t))return dr(t,a);if(L==v||L==l||N&&!r){if(s=u||N?{}:oo(t),!a)return u?function(t,e){return yr(t,no(t),e)}(t,function(t,e){return t&&yr(e,Ta(e),t)}(s,t)):function(t,e){return yr(t,eo(t),e)}(t,qn(s,t))}else{if(!Ht[L])return r?t:{};s=function(t,e,n){var i=t.constructor;switch(e){case w:return pr(t);case h:case c:return new i(+t);case S:return function(t,e){var n=e?pr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case E:case M:case A:case R:case P:case C:case"[object Uint8ClampedArray]":case I:case O:return fr(t,n);case m:return new i;case g:case x:return new i(t);case _:return function(t){var e=new t.constructor(t.source,it.exec(t));return e.lastIndex=t.lastIndex,e}(t);case y:return new i;case b:return r=t,An?ft(An.call(r)):{}}var r}(t,L,a)}}o||(o=new Un);var D=o.get(t);if(D)return D;o.set(t,s),Js(t)?t.forEach((function(i){s.add(Kn(i,e,n,i,t,o))})):Xs(t)&&t.forEach((function(i,r){s.set(r,Kn(i,e,n,r,t,o))}));var F=T?void 0:(d?u?qr:Xr:u?Ta:ba)(t);return ae(F||t,(function(i,r){F&&(i=t[r=i]),Vn(s,r,Kn(i,e,n,r,t,o))})),s}function $n(t,e,n){var i=n.length;if(null==t)return!i;for(t=ft(t);i--;){var r=n[i],o=e[r],s=t[r];if(void 0===s&&!(r in t)||!o(s))return!1}return!0}function Qn(t,e,n){if("function"!=typeof t)throw new vt(o);return bo((function(){t.apply(void 0,n)}),e)}function ti(t,e,n,i){var r=-1,o=ce,s=!0,a=t.length,l=[],u=e.length;if(!a)return l;n&&(e=pe(e,Ie(n))),i?(o=de,s=!1):e.length>=200&&(o=Le,s=!1,e=new Bn(e));t:for(;++r<a;){var h=t[r],c=null==n?h:n(h);if(h=i||0!==h?h:0,s&&c==c){for(var d=u;d--;)if(e[d]===c)continue t;l.push(h)}else o(e,c,i)||l.push(h)}return l}Pn.templateSettings={escape:G,evaluate:H,interpolate:z,variable:"",imports:{_:Pn}},Pn.prototype=In.prototype,Pn.prototype.constructor=Pn,On.prototype=Cn(In.prototype),On.prototype.constructor=On,Ln.prototype=Cn(In.prototype),Ln.prototype.constructor=Ln,Nn.prototype.clear=function(){this.__data__=_n?_n(null):{},this.size=0},Nn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Nn.prototype.get=function(t){var e=this.__data__;if(_n){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return wt.call(e,t)?e[t]:void 0},Nn.prototype.has=function(t){var e=this.__data__;return _n?void 0!==e[t]:wt.call(e,t)},Nn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=_n&&void 0===e?"__lodash_hash_undefined__":e,this},Dn.prototype.clear=function(){this.__data__=[],this.size=0},Dn.prototype.delete=function(t){var e=this.__data__,n=Wn(e,t);return!(n<0)&&(n==e.length-1?e.pop():Yt.call(e,n,1),--this.size,!0)},Dn.prototype.get=function(t){var e=this.__data__,n=Wn(e,t);return n<0?void 0:e[n][1]},Dn.prototype.has=function(t){return Wn(this.__data__,t)>-1},Dn.prototype.set=function(t,e){var n=this.__data__,i=Wn(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new Nn,map:new(fn||Dn),string:new Nn}},Fn.prototype.delete=function(t){var e=$r(this,t).delete(t);return this.size-=e?1:0,e},Fn.prototype.get=function(t){return $r(this,t).get(t)},Fn.prototype.has=function(t){return $r(this,t).has(t)},Fn.prototype.set=function(t,e){var n=$r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this},Bn.prototype.add=Bn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Bn.prototype.has=function(t){return this.__data__.has(t)},Un.prototype.clear=function(){this.__data__=new Dn,this.size=0},Un.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Un.prototype.get=function(t){return this.__data__.get(t)},Un.prototype.has=function(t){return this.__data__.has(t)},Un.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Dn){var i=n.__data__;if(!fn||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new Fn(i)}return n.set(t,e),this.size=n.size,this};var ei=Tr(ui),ni=Tr(hi,!0);function ii(t,e){var n=!0;return ei(t,(function(t,i,r){return n=!!e(t,i,r)})),n}function ri(t,e,n){for(var i=-1,r=t.length;++i<r;){var o=t[i],s=e(o);if(null!=s&&(void 0===a?s==s&&!$s(s):n(s,a)))var a=s,l=o}return l}function oi(t,e){var n=[];return ei(t,(function(t,i,r){e(t,i,r)&&n.push(t)})),n}function si(t,e,n,i,r){var o=-1,s=t.length;for(n||(n=so),r||(r=[]);++o<s;){var a=t[o];e>0&&n(a)?e>1?si(a,e-1,n,i,r):fe(r,a):i||(r[r.length]=a)}return r}var ai=wr(),li=wr(!0);function ui(t,e){return t&&ai(t,e,ba)}function hi(t,e){return t&&li(t,e,ba)}function ci(t,e){return he(e,(function(e){return Hs(t[e])}))}function di(t,e){for(var n=0,i=(e=lr(e,t)).length;null!=t&&n<i;)t=t[Ao(e[n++])];return n&&n==i?t:void 0}function pi(t,e,n){var i=e(t);return Ns(t)?i:fe(i,n(t))}function fi(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":$t&&$t in ft(t)?function(t){var e=wt.call(t,$t),n=t[$t];try{t[$t]=void 0;var i=!0}catch(t){}var r=Mt.call(t);i&&(e?t[$t]=n:delete t[$t]);return r}(t):function(t){return Mt.call(t)}(t)}function mi(t,e){return t>e}function gi(t,e){return null!=t&&wt.call(t,e)}function vi(t,e){return null!=t&&e in ft(t)}function _i(t,e,n){for(var r=n?de:ce,o=t[0].length,s=t.length,a=s,l=i(s),u=1/0,h=[];a--;){var c=t[a];a&&e&&(c=pe(c,Ie(e))),u=ln(c.length,u),l[a]=!n&&(e||o>=120&&c.length>=120)?new Bn(a&&c):void 0}c=t[0];var d=-1,p=l[0];t:for(;++d<o&&h.length<u;){var f=c[d],m=e?e(f):f;if(f=n||0!==f?f:0,!(p?Le(p,m):r(h,m,n))){for(a=s;--a;){var g=l[a];if(!(g?Le(g,m):r(t[a],m,n)))continue t}p&&p.push(m),h.push(f)}}return h}function yi(t,e,n){var i=null==(t=vo(t,e=lr(e,t)))?t:t[Ao(Go(e))];return null==i?void 0:oe(i,t,n)}function xi(t){return Ws(t)&&fi(t)==l}function bi(t,e,n,i,r){return t===e||(null==t||null==e||!Ws(t)&&!Ws(e)?t!=t&&e!=e:function(t,e,n,i,r,o){var s=Ns(t),a=Ns(e),p=s?u:io(t),f=a?u:io(e),T=(p=p==l?v:p)==v,E=(f=f==l?v:f)==v,M=p==f;if(M&&Us(t)){if(!Us(e))return!1;s=!0,T=!1}if(M&&!T)return o||(o=new Un),s||Qs(t)?Vr(t,e,n,i,r,o):function(t,e,n,i,r,o,s){switch(n){case S:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case w:return!(t.byteLength!=e.byteLength||!o(new Nt(t),new Nt(e)));case h:case c:case g:return Cs(+t,+e);case d:return t.name==e.name&&t.message==e.message;case _:case x:return t==e+"";case m:var a=He;case y:var l=1&i;if(a||(a=Ve),t.size!=e.size&&!l)return!1;var u=s.get(t);if(u)return u==e;i|=2,s.set(t,e);var p=Vr(a(t),a(e),i,r,o,s);return s.delete(t),p;case b:if(An)return An.call(t)==An.call(e)}return!1}(t,e,p,n,i,r,o);if(!(1&n)){var A=T&&wt.call(t,"__wrapped__"),R=E&&wt.call(e,"__wrapped__");if(A||R){var P=A?t.value():t,C=R?e.value():e;return o||(o=new Un),r(P,C,n,i,o)}}if(!M)return!1;return o||(o=new Un),function(t,e,n,i,r,o){var s=1&n,a=Xr(t),l=a.length,u=Xr(e).length;if(l!=u&&!s)return!1;var h=l;for(;h--;){var c=a[h];if(!(s?c in e:wt.call(e,c)))return!1}var d=o.get(t),p=o.get(e);if(d&&p)return d==e&&p==t;var f=!0;o.set(t,e),o.set(e,t);var m=s;for(;++h<l;){c=a[h];var g=t[c],v=e[c];if(i)var _=s?i(v,g,c,e,t,o):i(g,v,c,t,e,o);if(!(void 0===_?g===v||r(g,v,n,i,o):_)){f=!1;break}m||(m="constructor"==c)}if(f&&!m){var y=t.constructor,x=e.constructor;y==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof y&&y instanceof y&&"function"==typeof x&&x instanceof x||(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,i,r,o)}(t,e,n,i,bi,r))}function Ti(t,e,n,i){var r=n.length,o=r,s=!i;if(null==t)return!o;for(t=ft(t);r--;){var a=n[r];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++r<o;){var l=(a=n[r])[0],u=t[l],h=a[1];if(s&&a[2]){if(void 0===u&&!(l in t))return!1}else{var c=new Un;if(i)var d=i(u,h,l,t,e,c);if(!(void 0===d?bi(h,u,3,i,c):d))return!1}}return!0}function wi(t){return!(!Vs(t)||(e=t,Et&&Et in e))&&(Hs(t)?Pt:st).test(Ro(t));var e}function Si(t){return"function"==typeof t?t:null==t?qa:"object"==typeof t?Ns(t)?Ci(t[0],t[1]):Pi(t):nl(t)}function Ei(t){if(!po(t))return sn(t);var e=[];for(var n in ft(t))wt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Mi(t){if(!Vs(t))return function(t){var e=[];if(null!=t)for(var n in ft(t))e.push(n);return e}(t);var e=po(t),n=[];for(var i in t)("constructor"!=i||!e&&wt.call(t,i))&&n.push(i);return n}function Ai(t,e){return t<e}function Ri(t,e){var n=-1,r=Fs(t)?i(t.length):[];return ei(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function Pi(t){var e=Qr(t);return 1==e.length&&e[0][2]?mo(e[0][0],e[0][1]):function(n){return n===t||Ti(n,t,e)}}function Ci(t,e){return uo(t)&&fo(e)?mo(Ao(t),e):function(n){var i=ga(n,t);return void 0===i&&i===e?va(n,t):bi(e,i,3)}}function Ii(t,e,n,i,r){t!==e&&ai(e,(function(o,s){if(r||(r=new Un),Vs(o))!function(t,e,n,i,r,o,s){var a=yo(t,n),l=yo(e,n),u=s.get(l);if(u)return void jn(t,n,u);var h=o?o(a,l,n+"",t,e,s):void 0,c=void 0===h;if(c){var d=Ns(l),p=!d&&Us(l),f=!d&&!p&&Qs(l);h=l,d||p||f?Ns(a)?h=a:Bs(a)?h=_r(a):p?(c=!1,h=dr(l,!0)):f?(c=!1,h=fr(l,!0)):h=[]:Ys(l)||Ls(l)?(h=a,Ls(a)?h=aa(a):Vs(a)&&!Hs(a)||(h=oo(l))):c=!1}c&&(s.set(l,h),r(h,l,i,o,s),s.delete(l));jn(t,n,h)}(t,e,s,n,Ii,i,r);else{var a=i?i(yo(t,s),o,s+"",t,e,r):void 0;void 0===a&&(a=o),jn(t,s,a)}}),Ta)}function Oi(t,e){var n=t.length;if(n)return ao(e+=e<0?n:0,n)?t[e]:void 0}function Li(t,e,n){e=e.length?pe(e,(function(t){return Ns(t)?function(e){return di(e,1===t.length?t[0]:t)}:t})):[qa];var i=-1;return e=pe(e,Ie(Kr())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(Ri(t,(function(t,n,r){return{criteria:pe(e,(function(e){return e(t)})),index:++i,value:t}})),(function(t,e){return function(t,e,n){var i=-1,r=t.criteria,o=e.criteria,s=r.length,a=n.length;for(;++i<s;){var l=mr(r[i],o[i]);if(l){if(i>=a)return l;var u=n[i];return l*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)}))}function Ni(t,e,n){for(var i=-1,r=e.length,o={};++i<r;){var s=e[i],a=di(t,s);n(a,s)&&zi(o,lr(s,t),a)}return o}function Di(t,e,n,i){var r=i?Te:be,o=-1,s=e.length,a=t;for(t===e&&(e=_r(e)),n&&(a=pe(t,Ie(n)));++o<s;)for(var l=0,u=e[o],h=n?n(u):u;(l=r(a,h,l,i))>-1;)a!==t&&Yt.call(a,l,1),Yt.call(t,l,1);return t}function Fi(t,e){for(var n=t?e.length:0,i=n-1;n--;){var r=e[n];if(n==i||r!==o){var o=r;ao(r)?Yt.call(t,r,1):tr(t,r)}}return t}function Bi(t,e){return t+tn(cn()*(e-t+1))}function Ui(t,e){var n="";if(!t||e<1||e>9007199254740991)return n;do{e%2&&(n+=t),(e=tn(e/2))&&(t+=t)}while(e);return n}function ki(t,e){return To(go(t,e,qa),t+"")}function Gi(t){return Gn(Ca(t))}function Hi(t,e){var n=Ca(t);return Eo(n,Jn(e,0,n.length))}function zi(t,e,n,i){if(!Vs(t))return t;for(var r=-1,o=(e=lr(e,t)).length,s=o-1,a=t;null!=a&&++r<o;){var l=Ao(e[r]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(r!=s){var h=a[l];void 0===(u=i?i(h,l,a):void 0)&&(u=Vs(h)?h:ao(e[r+1])?[]:{})}Vn(a,l,u),a=a[l]}return t}var ji=yn?function(t,e){return yn.set(t,e),t}:qa,Vi=_e?function(t,e){return _e(t,"toString",{configurable:!0,enumerable:!1,value:Va(e),writable:!0})}:qa;function Wi(t){return Eo(Ca(t))}function Xi(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var s=i(o);++r<o;)s[r]=t[r+e];return s}function qi(t,e){var n;return ei(t,(function(t,i,r){return!(n=e(t,i,r))})),!!n}function Yi(t,e,n){var i=0,r=null==t?i:t.length;if("number"==typeof e&&e==e&&r<=2147483647){for(;i<r;){var o=i+r>>>1,s=t[o];null!==s&&!$s(s)&&(n?s<=e:s<e)?i=o+1:r=o}return r}return Zi(t,e,qa,n)}function Zi(t,e,n,i){var r=0,o=null==t?0:t.length;if(0===o)return 0;for(var s=(e=n(e))!=e,a=null===e,l=$s(e),u=void 0===e;r<o;){var h=tn((r+o)/2),c=n(t[h]),d=void 0!==c,p=null===c,f=c==c,m=$s(c);if(s)var g=i||f;else g=u?f&&(i||d):a?f&&d&&(i||!p):l?f&&d&&!p&&(i||!m):!p&&!m&&(i?c<=e:c<e);g?r=h+1:o=h}return ln(o,4294967294)}function Ji(t,e){for(var n=-1,i=t.length,r=0,o=[];++n<i;){var s=t[n],a=e?e(s):s;if(!n||!Cs(a,l)){var l=a;o[r++]=0===s?0:s}}return o}function Ki(t){return"number"==typeof t?t:$s(t)?NaN:+t}function $i(t){if("string"==typeof t)return t;if(Ns(t))return pe(t,$i)+"";if($s(t))return Rn?Rn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Qi(t,e,n){var i=-1,r=ce,o=t.length,s=!0,a=[],l=a;if(n)s=!1,r=de;else if(o>=200){var u=e?null:Ur(t);if(u)return Ve(u);s=!1,r=Le,l=new Bn}else l=e?[]:a;t:for(;++i<o;){var h=t[i],c=e?e(h):h;if(h=n||0!==h?h:0,s&&c==c){for(var d=l.length;d--;)if(l[d]===c)continue t;e&&l.push(c),a.push(h)}else r(l,c,n)||(l!==a&&l.push(c),a.push(h))}return a}function tr(t,e){return null==(t=vo(t,e=lr(e,t)))||delete t[Ao(Go(e))]}function er(t,e,n,i){return zi(t,e,n(di(t,e)),i)}function nr(t,e,n,i){for(var r=t.length,o=i?r:-1;(i?o--:++o<r)&&e(t[o],o,t););return n?Xi(t,i?0:o,i?o+1:r):Xi(t,i?o+1:0,i?r:o)}function ir(t,e){var n=t;return n instanceof Ln&&(n=n.value()),me(e,(function(t,e){return e.func.apply(e.thisArg,fe([t],e.args))}),n)}function rr(t,e,n){var r=t.length;if(r<2)return r?Qi(t[0]):[];for(var o=-1,s=i(r);++o<r;)for(var a=t[o],l=-1;++l<r;)l!=o&&(s[o]=ti(s[o]||a,t[l],e,n));return Qi(si(s,1),e,n)}function or(t,e,n){for(var i=-1,r=t.length,o=e.length,s={};++i<r;){var a=i<o?e[i]:void 0;n(s,t[i],a)}return s}function sr(t){return Bs(t)?t:[]}function ar(t){return"function"==typeof t?t:qa}function lr(t,e){return Ns(t)?t:uo(t,e)?[t]:Mo(la(t))}var ur=ki;function hr(t,e,n){var i=t.length;return n=void 0===n?i:n,!e&&n>=i?t:Xi(t,e,n)}var cr=Me||function(t){return qt.clearTimeout(t)};function dr(t,e){if(e)return t.slice();var n=t.length,i=Ft?Ft(n):new t.constructor(n);return t.copy(i),i}function pr(t){var e=new t.constructor(t.byteLength);return new Nt(e).set(new Nt(t)),e}function fr(t,e){var n=e?pr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function mr(t,e){if(t!==e){var n=void 0!==t,i=null===t,r=t==t,o=$s(t),s=void 0!==e,a=null===e,l=e==e,u=$s(e);if(!a&&!u&&!o&&t>e||o&&s&&l&&!a&&!u||i&&s&&l||!n&&l||!r)return 1;if(!i&&!o&&!u&&t<e||u&&n&&r&&!i&&!o||a&&n&&r||!s&&r||!l)return-1}return 0}function gr(t,e,n,r){for(var o=-1,s=t.length,a=n.length,l=-1,u=e.length,h=an(s-a,0),c=i(u+h),d=!r;++l<u;)c[l]=e[l];for(;++o<a;)(d||o<s)&&(c[n[o]]=t[o]);for(;h--;)c[l++]=t[o++];return c}function vr(t,e,n,r){for(var o=-1,s=t.length,a=-1,l=n.length,u=-1,h=e.length,c=an(s-l,0),d=i(c+h),p=!r;++o<c;)d[o]=t[o];for(var f=o;++u<h;)d[f+u]=e[u];for(;++a<l;)(p||o<s)&&(d[f+n[a]]=t[o++]);return d}function _r(t,e){var n=-1,r=t.length;for(e||(e=i(r));++n<r;)e[n]=t[n];return e}function yr(t,e,n,i){var r=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=i?i(n[a],t[a],a,n,t):void 0;void 0===l&&(l=t[a]),r?Yn(n,a,l):Vn(n,a,l)}return n}function xr(t,e){return function(n,i){var r=Ns(n)?se:Xn,o=e?e():{};return r(n,t,Kr(i,2),o)}}function br(t){return ki((function(e,n){var i=-1,r=n.length,o=r>1?n[r-1]:void 0,s=r>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,s&&lo(n[0],n[1],s)&&(o=r<3?void 0:o,r=1),e=ft(e);++i<r;){var a=n[i];a&&t(e,a,i,o)}return e}))}function Tr(t,e){return function(n,i){if(null==n)return n;if(!Fs(n))return t(n,i);for(var r=n.length,o=e?r:-1,s=ft(n);(e?o--:++o<r)&&!1!==i(s[o],o,s););return n}}function wr(t){return function(e,n,i){for(var r=-1,o=ft(e),s=i(e),a=s.length;a--;){var l=s[t?a:++r];if(!1===n(o[l],l,o))break}return e}}function Sr(t){return function(e){var n=Ge(e=la(e))?qe(e):void 0,i=n?n[0]:e.charAt(0),r=n?hr(n,1).join(""):e.slice(1);return i[t]()+r}}function Er(t){return function(e){return me(Ha(La(e).replace(Ot,"")),t,"")}}function Mr(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Cn(t.prototype),i=t.apply(n,e);return Vs(i)?i:n}}function Ar(t){return function(e,n,i){var r=ft(e);if(!Fs(e)){var o=Kr(n,3);e=ba(e),n=function(t){return o(r[t],t,r)}}var s=t(e,n,i);return s>-1?r[o?e[s]:s]:void 0}}function Rr(t){return Wr((function(e){var n=e.length,i=n,r=On.prototype.thru;for(t&&e.reverse();i--;){var s=e[i];if("function"!=typeof s)throw new vt(o);if(r&&!a&&"wrapper"==Zr(s))var a=new On([],!0)}for(i=a?i:n;++i<n;){var l=Zr(s=e[i]),u="wrapper"==l?Yr(s):void 0;a=u&&ho(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?a[Zr(u[0])].apply(a,u[3]):1==s.length&&ho(s)?a[l]():a.thru(s)}return function(){var t=arguments,i=t[0];if(a&&1==t.length&&Ns(i))return a.plant(i).value();for(var r=0,o=n?e[r].apply(this,t):i;++r<n;)o=e[r].call(this,o);return o}}))}function Pr(t,e,n,r,o,s,a,l,u,h){var c=128&e,d=1&e,p=2&e,f=24&e,m=512&e,g=p?void 0:Mr(t);return function v(){for(var _=arguments.length,y=i(_),x=_;x--;)y[x]=arguments[x];if(f)var b=Jr(v),T=Fe(y,b);if(r&&(y=gr(y,r,o,f)),s&&(y=vr(y,s,a,f)),_-=T,f&&_<h){var w=je(y,b);return Fr(t,e,Pr,v.placeholder,n,y,w,l,u,h-_)}var S=d?n:this,E=p?S[t]:t;return _=y.length,l?y=_o(y,l):m&&_>1&&y.reverse(),c&&u<_&&(y.length=u),this&&this!==qt&&this instanceof v&&(E=g||Mr(E)),E.apply(S,y)}}function Cr(t,e){return function(n,i){return function(t,e,n,i){return ui(t,(function(t,r,o){e(i,n(t),r,o)})),i}(n,t,e(i),{})}}function Ir(t,e){return function(n,i){var r;if(void 0===n&&void 0===i)return e;if(void 0!==n&&(r=n),void 0!==i){if(void 0===r)return i;"string"==typeof n||"string"==typeof i?(n=$i(n),i=$i(i)):(n=Ki(n),i=Ki(i)),r=t(n,i)}return r}}function Or(t){return Wr((function(e){return e=pe(e,Ie(Kr())),ki((function(n){var i=this;return t(e,(function(t){return oe(t,i,n)}))}))}))}function Lr(t,e){var n=(e=void 0===e?" ":$i(e)).length;if(n<2)return n?Ui(e,t):e;var i=Ui(e,Qe(t/Xe(e)));return Ge(e)?hr(qe(i),0,t).join(""):i.slice(0,t)}function Nr(t){return function(e,n,r){return r&&"number"!=typeof r&&lo(e,n,r)&&(n=r=void 0),e=ia(e),void 0===n?(n=e,e=0):n=ia(n),function(t,e,n,r){for(var o=-1,s=an(Qe((e-t)/(n||1)),0),a=i(s);s--;)a[r?s:++o]=t,t+=n;return a}(e,n,r=void 0===r?e<n?1:-1:ia(r),t)}}function Dr(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=sa(e),n=sa(n)),t(e,n)}}function Fr(t,e,n,i,r,o,s,a,l,u){var h=8&e;e|=h?32:64,4&(e&=~(h?64:32))||(e&=-4);var c=[t,e,r,h?o:void 0,h?s:void 0,h?void 0:o,h?void 0:s,a,l,u],d=n.apply(void 0,c);return ho(t)&&xo(d,c),d.placeholder=i,wo(d,t,e)}function Br(t){var e=pt[t];return function(t,n){if(t=sa(t),(n=null==n?0:ln(ra(n),292))&&rn(t)){var i=(la(t)+"e").split("e");return+((i=(la(e(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return e(t)}}var Ur=gn&&1/Ve(new gn([,-0]))[1]==1/0?function(t){return new gn(t)}:$a;function kr(t){return function(e){var n=io(e);return n==m?He(e):n==y?We(e):function(t,e){return pe(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Gr(t,e,n,r,a,l,u,h){var c=2&e;if(!c&&"function"!=typeof t)throw new vt(o);var d=r?r.length:0;if(d||(e&=-97,r=a=void 0),u=void 0===u?u:an(ra(u),0),h=void 0===h?h:ra(h),d-=a?a.length:0,64&e){var p=r,f=a;r=a=void 0}var m=c?void 0:Yr(t),g=[t,e,n,r,a,p,f,l,u,h];if(m&&function(t,e){var n=t[1],i=e[1],r=n|i,o=r<131,a=128==i&&8==n||128==i&&256==n&&t[7].length<=e[8]||384==i&&e[7].length<=e[8]&&8==n;if(!o&&!a)return t;1&i&&(t[2]=e[2],r|=1&n?0:4);var l=e[3];if(l){var u=t[3];t[3]=u?gr(u,l,e[4]):l,t[4]=u?je(t[3],s):e[4]}(l=e[5])&&(u=t[5],t[5]=u?vr(u,l,e[6]):l,t[6]=u?je(t[5],s):e[6]);(l=e[7])&&(t[7]=l);128&i&&(t[8]=null==t[8]?e[8]:ln(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=r}(g,m),t=g[0],e=g[1],n=g[2],r=g[3],a=g[4],!(h=g[9]=void 0===g[9]?c?0:t.length:an(g[9]-d,0))&&24&e&&(e&=-25),e&&1!=e)v=8==e||16==e?function(t,e,n){var r=Mr(t);return function o(){for(var s=arguments.length,a=i(s),l=s,u=Jr(o);l--;)a[l]=arguments[l];var h=s<3&&a[0]!==u&&a[s-1]!==u?[]:je(a,u);if((s-=h.length)<n)return Fr(t,e,Pr,o.placeholder,void 0,a,h,void 0,void 0,n-s);var c=this&&this!==qt&&this instanceof o?r:t;return oe(c,this,a)}}(t,e,h):32!=e&&33!=e||a.length?Pr.apply(void 0,g):function(t,e,n,r){var o=1&e,s=Mr(t);return function e(){for(var a=-1,l=arguments.length,u=-1,h=r.length,c=i(h+l),d=this&&this!==qt&&this instanceof e?s:t;++u<h;)c[u]=r[u];for(;l--;)c[u++]=arguments[++a];return oe(d,o?n:this,c)}}(t,e,n,r);else var v=function(t,e,n){var i=1&e,r=Mr(t);return function e(){var o=this&&this!==qt&&this instanceof e?r:t;return o.apply(i?n:this,arguments)}}(t,e,n);return wo((m?ji:xo)(v,g),t,e)}function Hr(t,e,n,i){return void 0===t||Cs(t,xt[n])&&!wt.call(i,n)?e:t}function zr(t,e,n,i,r,o){return Vs(t)&&Vs(e)&&(o.set(e,t),Ii(t,e,void 0,zr,o),o.delete(e)),t}function jr(t){return Ys(t)?void 0:t}function Vr(t,e,n,i,r,o){var s=1&n,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(t),h=o.get(e);if(u&&h)return u==e&&h==t;var c=-1,d=!0,p=2&n?new Bn:void 0;for(o.set(t,e),o.set(e,t);++c<a;){var f=t[c],m=e[c];if(i)var g=s?i(m,f,c,e,t,o):i(f,m,c,t,e,o);if(void 0!==g){if(g)continue;d=!1;break}if(p){if(!ve(e,(function(t,e){if(!Le(p,e)&&(f===t||r(f,t,n,i,o)))return p.push(e)}))){d=!1;break}}else if(f!==m&&!r(f,m,n,i,o)){d=!1;break}}return o.delete(t),o.delete(e),d}function Wr(t){return To(go(t,void 0,Do),t+"")}function Xr(t){return pi(t,ba,eo)}function qr(t){return pi(t,Ta,no)}var Yr=yn?function(t){return yn.get(t)}:$a;function Zr(t){for(var e=t.name+"",n=xn[e],i=wt.call(xn,e)?n.length:0;i--;){var r=n[i],o=r.func;if(null==o||o==t)return r.name}return e}function Jr(t){return(wt.call(Pn,"placeholder")?Pn:t).placeholder}function Kr(){var t=Pn.iteratee||Ya;return t=t===Ya?Si:t,arguments.length?t(arguments[0],arguments[1]):t}function $r(t,e){var n,i,r=t.__data__;return("string"==(i=typeof(n=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof e?"string":"hash"]:r.map}function Qr(t){for(var e=ba(t),n=e.length;n--;){var i=e[n],r=t[i];e[n]=[i,r,fo(r)]}return e}function to(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return wi(n)?n:void 0}var eo=en?function(t){return null==t?[]:(t=ft(t),he(en(t),(function(e){return Xt.call(t,e)})))}:ol,no=en?function(t){for(var e=[];t;)fe(e,eo(t)),t=zt(t);return e}:ol,io=fi;function ro(t,e,n){for(var i=-1,r=(e=lr(e,t)).length,o=!1;++i<r;){var s=Ao(e[i]);if(!(o=null!=t&&n(t,s)))break;t=t[s]}return o||++i!=r?o:!!(r=null==t?0:t.length)&&js(r)&&ao(s,r)&&(Ns(t)||Ls(t))}function oo(t){return"function"!=typeof t.constructor||po(t)?{}:Cn(zt(t))}function so(t){return Ns(t)||Ls(t)||!!(Zt&&t&&t[Zt])}function ao(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&<.test(t))&&t>-1&&t%1==0&&t<e}function lo(t,e,n){if(!Vs(n))return!1;var i=typeof e;return!!("number"==i?Fs(n)&&ao(e,n.length):"string"==i&&e in n)&&Cs(n[e],t)}function uo(t,e){if(Ns(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!$s(t))||(V.test(t)||!j.test(t)||null!=e&&t in ft(e))}function ho(t){var e=Zr(t),n=Pn[e];if("function"!=typeof n||!(e in Ln.prototype))return!1;if(t===n)return!0;var i=Yr(n);return!!i&&t===i[0]}(pn&&io(new pn(new ArrayBuffer(1)))!=S||fn&&io(new fn)!=m||mn&&"[object Promise]"!=io(mn.resolve())||gn&&io(new gn)!=y||vn&&io(new vn)!=T)&&(io=function(t){var e=fi(t),n=e==v?t.constructor:void 0,i=n?Ro(n):"";if(i)switch(i){case bn:return S;case Tn:return m;case wn:return"[object Promise]";case Sn:return y;case En:return T}return e});var co=bt?Hs:sl;function po(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||xt)}function fo(t){return t==t&&!Vs(t)}function mo(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in ft(n)))}}function go(t,e,n){return e=an(void 0===e?t.length-1:e,0),function(){for(var r=arguments,o=-1,s=an(r.length-e,0),a=i(s);++o<s;)a[o]=r[e+o];o=-1;for(var l=i(e+1);++o<e;)l[o]=r[o];return l[e]=n(a),oe(t,this,l)}}function vo(t,e){return e.length<2?t:di(t,Xi(e,0,-1))}function _o(t,e){for(var n=t.length,i=ln(e.length,n),r=_r(t);i--;){var o=e[i];t[i]=ao(o,n)?r[o]:void 0}return t}function yo(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var xo=So(ji),bo=$e||function(t,e){return qt.setTimeout(t,e)},To=So(Vi);function wo(t,e,n){var i=e+"";return To(t,function(t,e){var n=e.length;if(!n)return t;var i=n-1;return e[i]=(n>1?"& ":"")+e[i],e=e.join(n>2?", ":" "),t.replace(J,"{\n/* [wrapped with "+e+"] */\n")}(i,function(t,e){return ae(a,(function(n){var i="_."+n[0];e&n[1]&&!ce(t,i)&&t.push(i)})),t.sort()}(function(t){var e=t.match(K);return e?e[1].split($):[]}(i),n)))}function So(t){var e=0,n=0;return function(){var i=un(),r=16-(i-n);if(n=i,r>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Eo(t,e){var n=-1,i=t.length,r=i-1;for(e=void 0===e?i:e;++n<e;){var o=Bi(n,r),s=t[o];t[o]=t[n],t[n]=s}return t.length=e,t}var Mo=function(t){var e=Ss(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(W,(function(t,n,i,r){e.push(i?r.replace(et,"$1"):n||t)})),e}));function Ao(t){if("string"==typeof t||$s(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Ro(t){if(null!=t){try{return Tt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Po(t){if(t instanceof Ln)return t.clone();var e=new On(t.__wrapped__,t.__chain__);return e.__actions__=_r(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Co=ki((function(t,e){return Bs(t)?ti(t,si(e,1,Bs,!0)):[]})),Io=ki((function(t,e){var n=Go(e);return Bs(n)&&(n=void 0),Bs(t)?ti(t,si(e,1,Bs,!0),Kr(n,2)):[]})),Oo=ki((function(t,e){var n=Go(e);return Bs(n)&&(n=void 0),Bs(t)?ti(t,si(e,1,Bs,!0),void 0,n):[]}));function Lo(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=null==n?0:ra(n);return r<0&&(r=an(i+r,0)),xe(t,Kr(e,3),r)}function No(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=i-1;return void 0!==n&&(r=ra(n),r=n<0?an(i+r,0):ln(r,i-1)),xe(t,Kr(e,3),r,!0)}function Do(t){return(null==t?0:t.length)?si(t,1):[]}function Fo(t){return t&&t.length?t[0]:void 0}var Bo=ki((function(t){var e=pe(t,sr);return e.length&&e[0]===t[0]?_i(e):[]})),Uo=ki((function(t){var e=Go(t),n=pe(t,sr);return e===Go(n)?e=void 0:n.pop(),n.length&&n[0]===t[0]?_i(n,Kr(e,2)):[]})),ko=ki((function(t){var e=Go(t),n=pe(t,sr);return(e="function"==typeof e?e:void 0)&&n.pop(),n.length&&n[0]===t[0]?_i(n,void 0,e):[]}));function Go(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var Ho=ki(zo);function zo(t,e){return t&&t.length&&e&&e.length?Di(t,e):t}var jo=Wr((function(t,e){var n=null==t?0:t.length,i=Zn(t,e);return Fi(t,pe(e,(function(t){return ao(t,n)?+t:t})).sort(mr)),i}));function Vo(t){return null==t?t:dn.call(t)}var Wo=ki((function(t){return Qi(si(t,1,Bs,!0))})),Xo=ki((function(t){var e=Go(t);return Bs(e)&&(e=void 0),Qi(si(t,1,Bs,!0),Kr(e,2))})),qo=ki((function(t){var e=Go(t);return e="function"==typeof e?e:void 0,Qi(si(t,1,Bs,!0),void 0,e)}));function Yo(t){if(!t||!t.length)return[];var e=0;return t=he(t,(function(t){if(Bs(t))return e=an(t.length,e),!0})),Pe(e,(function(e){return pe(t,Ee(e))}))}function Zo(t,e){if(!t||!t.length)return[];var n=Yo(t);return null==e?n:pe(n,(function(t){return oe(e,void 0,t)}))}var Jo=ki((function(t,e){return Bs(t)?ti(t,e):[]})),Ko=ki((function(t){return rr(he(t,Bs))})),$o=ki((function(t){var e=Go(t);return Bs(e)&&(e=void 0),rr(he(t,Bs),Kr(e,2))})),Qo=ki((function(t){var e=Go(t);return e="function"==typeof e?e:void 0,rr(he(t,Bs),void 0,e)})),ts=ki(Yo);var es=ki((function(t){var e=t.length,n=e>1?t[e-1]:void 0;return n="function"==typeof n?(t.pop(),n):void 0,Zo(t,n)}));function ns(t){var e=Pn(t);return e.__chain__=!0,e}function is(t,e){return e(t)}var rs=Wr((function(t){var e=t.length,n=e?t[0]:0,i=this.__wrapped__,r=function(e){return Zn(e,t)};return!(e>1||this.__actions__.length)&&i instanceof Ln&&ao(n)?((i=i.slice(n,+n+(e?1:0))).__actions__.push({func:is,args:[r],thisArg:void 0}),new On(i,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(r)}));var os=xr((function(t,e,n){wt.call(t,n)?++t[n]:Yn(t,n,1)}));var ss=Ar(Lo),as=Ar(No);function ls(t,e){return(Ns(t)?ae:ei)(t,Kr(e,3))}function us(t,e){return(Ns(t)?le:ni)(t,Kr(e,3))}var hs=xr((function(t,e,n){wt.call(t,n)?t[n].push(e):Yn(t,n,[e])}));var cs=ki((function(t,e,n){var r=-1,o="function"==typeof e,s=Fs(t)?i(t.length):[];return ei(t,(function(t){s[++r]=o?oe(e,t,n):yi(t,e,n)})),s})),ds=xr((function(t,e,n){Yn(t,n,e)}));function ps(t,e){return(Ns(t)?pe:Ri)(t,Kr(e,3))}var fs=xr((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var ms=ki((function(t,e){if(null==t)return[];var n=e.length;return n>1&&lo(t,e[0],e[1])?e=[]:n>2&&lo(e[0],e[1],e[2])&&(e=[e[0]]),Li(t,si(e,1),[])})),gs=Ke||function(){return qt.Date.now()};function vs(t,e,n){return e=n?void 0:e,Gr(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function _s(t,e){var n;if("function"!=typeof e)throw new vt(o);return t=ra(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var ys=ki((function(t,e,n){var i=1;if(n.length){var r=je(n,Jr(ys));i|=32}return Gr(t,i,e,n,r)})),xs=ki((function(t,e,n){var i=3;if(n.length){var r=je(n,Jr(xs));i|=32}return Gr(e,i,t,n,r)}));function bs(t,e,n){var i,r,s,a,l,u,h=0,c=!1,d=!1,p=!0;if("function"!=typeof t)throw new vt(o);function f(e){var n=i,o=r;return i=r=void 0,h=e,a=t.apply(o,n)}function m(t){return h=t,l=bo(v,e),c?f(t):a}function g(t){var n=t-u;return void 0===u||n>=e||n<0||d&&t-h>=s}function v(){var t=gs();if(g(t))return _(t);l=bo(v,function(t){var n=e-(t-u);return d?ln(n,s-(t-h)):n}(t))}function _(t){return l=void 0,p&&i?f(t):(i=r=void 0,a)}function y(){var t=gs(),n=g(t);if(i=arguments,r=this,u=t,n){if(void 0===l)return m(u);if(d)return cr(l),l=bo(v,e),f(u)}return void 0===l&&(l=bo(v,e)),a}return e=sa(e)||0,Vs(n)&&(c=!!n.leading,s=(d="maxWait"in n)?an(sa(n.maxWait)||0,e):s,p="trailing"in n?!!n.trailing:p),y.cancel=function(){void 0!==l&&cr(l),h=0,i=u=r=l=void 0},y.flush=function(){return void 0===l?a:_(gs())},y}var Ts=ki((function(t,e){return Qn(t,1,e)})),ws=ki((function(t,e,n){return Qn(t,sa(e)||0,n)}));function Ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new vt(o);var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=t.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(Ss.Cache||Fn),n}function Es(t){if("function"!=typeof t)throw new vt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ss.Cache=Fn;var Ms=ur((function(t,e){var n=(e=1==e.length&&Ns(e[0])?pe(e[0],Ie(Kr())):pe(si(e,1),Ie(Kr()))).length;return ki((function(i){for(var r=-1,o=ln(i.length,n);++r<o;)i[r]=e[r].call(this,i[r]);return oe(t,this,i)}))})),As=ki((function(t,e){return Gr(t,32,void 0,e,je(e,Jr(As)))})),Rs=ki((function(t,e){return Gr(t,64,void 0,e,je(e,Jr(Rs)))})),Ps=Wr((function(t,e){return Gr(t,256,void 0,void 0,void 0,e)}));function Cs(t,e){return t===e||t!=t&&e!=e}var Is=Dr(mi),Os=Dr((function(t,e){return t>=e})),Ls=xi(function(){return arguments}())?xi:function(t){return Ws(t)&&wt.call(t,"callee")&&!Xt.call(t,"callee")},Ns=i.isArray,Ds=Qt?Ie(Qt):function(t){return Ws(t)&&fi(t)==w};function Fs(t){return null!=t&&js(t.length)&&!Hs(t)}function Bs(t){return Ws(t)&&Fs(t)}var Us=nn||sl,ks=te?Ie(te):function(t){return Ws(t)&&fi(t)==c};function Gs(t){if(!Ws(t))return!1;var e=fi(t);return e==d||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Ys(t)}function Hs(t){if(!Vs(t))return!1;var e=fi(t);return e==p||e==f||"[object AsyncFunction]"==e||"[object Proxy]"==e}function zs(t){return"number"==typeof t&&t==ra(t)}function js(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Vs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ws(t){return null!=t&&"object"==typeof t}var Xs=ee?Ie(ee):function(t){return Ws(t)&&io(t)==m};function qs(t){return"number"==typeof t||Ws(t)&&fi(t)==g}function Ys(t){if(!Ws(t)||fi(t)!=v)return!1;var e=zt(t);if(null===e)return!0;var n=wt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Tt.call(n)==At}var Zs=ne?Ie(ne):function(t){return Ws(t)&&fi(t)==_};var Js=ie?Ie(ie):function(t){return Ws(t)&&io(t)==y};function Ks(t){return"string"==typeof t||!Ns(t)&&Ws(t)&&fi(t)==x}function $s(t){return"symbol"==typeof t||Ws(t)&&fi(t)==b}var Qs=re?Ie(re):function(t){return Ws(t)&&js(t.length)&&!!Gt[fi(t)]};var ta=Dr(Ai),ea=Dr((function(t,e){return t<=e}));function na(t){if(!t)return[];if(Fs(t))return Ks(t)?qe(t):_r(t);if(Kt&&t[Kt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Kt]());var e=io(t);return(e==m?He:e==y?Ve:Ca)(t)}function ia(t){return t?(t=sa(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ra(t){var e=ia(t),n=e%1;return e==e?n?e-n:e:0}function oa(t){return t?Jn(ra(t),0,4294967295):0}function sa(t){if("number"==typeof t)return t;if($s(t))return NaN;if(Vs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Vs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ce(t);var n=ot.test(t);return n||at.test(t)?Vt(t.slice(2),n?2:8):rt.test(t)?NaN:+t}function aa(t){return yr(t,Ta(t))}function la(t){return null==t?"":$i(t)}var ua=br((function(t,e){if(po(e)||Fs(e))yr(e,ba(e),t);else for(var n in e)wt.call(e,n)&&Vn(t,n,e[n])})),ha=br((function(t,e){yr(e,Ta(e),t)})),ca=br((function(t,e,n,i){yr(e,Ta(e),t,i)})),da=br((function(t,e,n,i){yr(e,ba(e),t,i)})),pa=Wr(Zn);var fa=ki((function(t,e){t=ft(t);var n=-1,i=e.length,r=i>2?e[2]:void 0;for(r&&lo(e[0],e[1],r)&&(i=1);++n<i;)for(var o=e[n],s=Ta(o),a=-1,l=s.length;++a<l;){var u=s[a],h=t[u];(void 0===h||Cs(h,xt[u])&&!wt.call(t,u))&&(t[u]=o[u])}return t})),ma=ki((function(t){return t.push(void 0,zr),oe(Sa,void 0,t)}));function ga(t,e,n){var i=null==t?void 0:di(t,e);return void 0===i?n:i}function va(t,e){return null!=t&&ro(t,e,vi)}var _a=Cr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Mt.call(e)),t[e]=n}),Va(qa)),ya=Cr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Mt.call(e)),wt.call(t,e)?t[e].push(n):t[e]=[n]}),Kr),xa=ki(yi);function ba(t){return Fs(t)?kn(t):Ei(t)}function Ta(t){return Fs(t)?kn(t,!0):Mi(t)}var wa=br((function(t,e,n){Ii(t,e,n)})),Sa=br((function(t,e,n,i){Ii(t,e,n,i)})),Ea=Wr((function(t,e){var n={};if(null==t)return n;var i=!1;e=pe(e,(function(e){return e=lr(e,t),i||(i=e.length>1),e})),yr(t,qr(t),n),i&&(n=Kn(n,7,jr));for(var r=e.length;r--;)tr(n,e[r]);return n}));var Ma=Wr((function(t,e){return null==t?{}:function(t,e){return Ni(t,e,(function(e,n){return va(t,n)}))}(t,e)}));function Aa(t,e){if(null==t)return{};var n=pe(qr(t),(function(t){return[t]}));return e=Kr(e),Ni(t,n,(function(t,n){return e(t,n[0])}))}var Ra=kr(ba),Pa=kr(Ta);function Ca(t){return null==t?[]:Oe(t,ba(t))}var Ia=Er((function(t,e,n){return e=e.toLowerCase(),t+(n?Oa(e):e)}));function Oa(t){return Ga(la(t).toLowerCase())}function La(t){return(t=la(t))&&t.replace(ut,Be).replace(Lt,"")}var Na=Er((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Da=Er((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Fa=Sr("toLowerCase");var Ba=Er((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Ua=Er((function(t,e,n){return t+(n?" ":"")+Ga(e)}));var ka=Er((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Ga=Sr("toUpperCase");function Ha(t,e,n){return t=la(t),void 0===(e=n?void 0:e)?function(t){return Bt.test(t)}(t)?function(t){return t.match(Dt)||[]}(t):function(t){return t.match(Q)||[]}(t):t.match(e)||[]}var za=ki((function(t,e){try{return oe(t,void 0,e)}catch(t){return Gs(t)?t:new Z(t)}})),ja=Wr((function(t,e){return ae(e,(function(e){e=Ao(e),Yn(t,e,ys(t[e],t))})),t}));function Va(t){return function(){return t}}var Wa=Rr(),Xa=Rr(!0);function qa(t){return t}function Ya(t){return Si("function"==typeof t?t:Kn(t,1))}var Za=ki((function(t,e){return function(n){return yi(n,t,e)}})),Ja=ki((function(t,e){return function(n){return yi(t,n,e)}}));function Ka(t,e,n){var i=ba(e),r=ci(e,i);null!=n||Vs(e)&&(r.length||!i.length)||(n=e,e=t,t=this,r=ci(e,ba(e)));var o=!(Vs(n)&&"chain"in n&&!n.chain),s=Hs(t);return ae(r,(function(n){var i=e[n];t[n]=i,s&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),r=n.__actions__=_r(this.__actions__);return r.push({func:i,args:arguments,thisArg:t}),n.__chain__=e,n}return i.apply(t,fe([this.value()],arguments))})})),t}function $a(){}var Qa=Or(pe),tl=Or(ue),el=Or(ve);function nl(t){return uo(t)?Ee(Ao(t)):function(t){return function(e){return di(e,t)}}(t)}var il=Nr(),rl=Nr(!0);function ol(){return[]}function sl(){return!1}var al=Ir((function(t,e){return t+e}),0),ll=Br("ceil"),ul=Ir((function(t,e){return t/e}),1),hl=Br("floor");var cl,dl=Ir((function(t,e){return t*e}),1),pl=Br("round"),fl=Ir((function(t,e){return t-e}),0);return Pn.after=function(t,e){if("function"!=typeof e)throw new vt(o);return t=ra(t),function(){if(--t<1)return e.apply(this,arguments)}},Pn.ary=vs,Pn.assign=ua,Pn.assignIn=ha,Pn.assignInWith=ca,Pn.assignWith=da,Pn.at=pa,Pn.before=_s,Pn.bind=ys,Pn.bindAll=ja,Pn.bindKey=xs,Pn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ns(t)?t:[t]},Pn.chain=ns,Pn.chunk=function(t,e,n){e=(n?lo(t,e,n):void 0===e)?1:an(ra(e),0);var r=null==t?0:t.length;if(!r||e<1)return[];for(var o=0,s=0,a=i(Qe(r/e));o<r;)a[s++]=Xi(t,o,o+=e);return a},Pn.compact=function(t){for(var e=-1,n=null==t?0:t.length,i=0,r=[];++e<n;){var o=t[e];o&&(r[i++]=o)}return r},Pn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=i(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return fe(Ns(n)?_r(n):[n],si(e,1))},Pn.cond=function(t){var e=null==t?0:t.length,n=Kr();return t=e?pe(t,(function(t){if("function"!=typeof t[1])throw new vt(o);return[n(t[0]),t[1]]})):[],ki((function(n){for(var i=-1;++i<e;){var r=t[i];if(oe(r[0],this,n))return oe(r[1],this,n)}}))},Pn.conforms=function(t){return function(t){var e=ba(t);return function(n){return $n(n,t,e)}}(Kn(t,1))},Pn.constant=Va,Pn.countBy=os,Pn.create=function(t,e){var n=Cn(t);return null==e?n:qn(n,e)},Pn.curry=function t(e,n,i){var r=Gr(e,8,void 0,void 0,void 0,void 0,void 0,n=i?void 0:n);return r.placeholder=t.placeholder,r},Pn.curryRight=function t(e,n,i){var r=Gr(e,16,void 0,void 0,void 0,void 0,void 0,n=i?void 0:n);return r.placeholder=t.placeholder,r},Pn.debounce=bs,Pn.defaults=fa,Pn.defaultsDeep=ma,Pn.defer=Ts,Pn.delay=ws,Pn.difference=Co,Pn.differenceBy=Io,Pn.differenceWith=Oo,Pn.drop=function(t,e,n){var i=null==t?0:t.length;return i?Xi(t,(e=n||void 0===e?1:ra(e))<0?0:e,i):[]},Pn.dropRight=function(t,e,n){var i=null==t?0:t.length;return i?Xi(t,0,(e=i-(e=n||void 0===e?1:ra(e)))<0?0:e):[]},Pn.dropRightWhile=function(t,e){return t&&t.length?nr(t,Kr(e,3),!0,!0):[]},Pn.dropWhile=function(t,e){return t&&t.length?nr(t,Kr(e,3),!0):[]},Pn.fill=function(t,e,n,i){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&lo(t,e,n)&&(n=0,i=r),function(t,e,n,i){var r=t.length;for((n=ra(n))<0&&(n=-n>r?0:r+n),(i=void 0===i||i>r?r:ra(i))<0&&(i+=r),i=n>i?0:oa(i);n<i;)t[n++]=e;return t}(t,e,n,i)):[]},Pn.filter=function(t,e){return(Ns(t)?he:oi)(t,Kr(e,3))},Pn.flatMap=function(t,e){return si(ps(t,e),1)},Pn.flatMapDeep=function(t,e){return si(ps(t,e),1/0)},Pn.flatMapDepth=function(t,e,n){return n=void 0===n?1:ra(n),si(ps(t,e),n)},Pn.flatten=Do,Pn.flattenDeep=function(t){return(null==t?0:t.length)?si(t,1/0):[]},Pn.flattenDepth=function(t,e){return(null==t?0:t.length)?si(t,e=void 0===e?1:ra(e)):[]},Pn.flip=function(t){return Gr(t,512)},Pn.flow=Wa,Pn.flowRight=Xa,Pn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,i={};++e<n;){var r=t[e];i[r[0]]=r[1]}return i},Pn.functions=function(t){return null==t?[]:ci(t,ba(t))},Pn.functionsIn=function(t){return null==t?[]:ci(t,Ta(t))},Pn.groupBy=hs,Pn.initial=function(t){return(null==t?0:t.length)?Xi(t,0,-1):[]},Pn.intersection=Bo,Pn.intersectionBy=Uo,Pn.intersectionWith=ko,Pn.invert=_a,Pn.invertBy=ya,Pn.invokeMap=cs,Pn.iteratee=Ya,Pn.keyBy=ds,Pn.keys=ba,Pn.keysIn=Ta,Pn.map=ps,Pn.mapKeys=function(t,e){var n={};return e=Kr(e,3),ui(t,(function(t,i,r){Yn(n,e(t,i,r),t)})),n},Pn.mapValues=function(t,e){var n={};return e=Kr(e,3),ui(t,(function(t,i,r){Yn(n,i,e(t,i,r))})),n},Pn.matches=function(t){return Pi(Kn(t,1))},Pn.matchesProperty=function(t,e){return Ci(t,Kn(e,1))},Pn.memoize=Ss,Pn.merge=wa,Pn.mergeWith=Sa,Pn.method=Za,Pn.methodOf=Ja,Pn.mixin=Ka,Pn.negate=Es,Pn.nthArg=function(t){return t=ra(t),ki((function(e){return Oi(e,t)}))},Pn.omit=Ea,Pn.omitBy=function(t,e){return Aa(t,Es(Kr(e)))},Pn.once=function(t){return _s(2,t)},Pn.orderBy=function(t,e,n,i){return null==t?[]:(Ns(e)||(e=null==e?[]:[e]),Ns(n=i?void 0:n)||(n=null==n?[]:[n]),Li(t,e,n))},Pn.over=Qa,Pn.overArgs=Ms,Pn.overEvery=tl,Pn.overSome=el,Pn.partial=As,Pn.partialRight=Rs,Pn.partition=fs,Pn.pick=Ma,Pn.pickBy=Aa,Pn.property=nl,Pn.propertyOf=function(t){return function(e){return null==t?void 0:di(t,e)}},Pn.pull=Ho,Pn.pullAll=zo,Pn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Di(t,e,Kr(n,2)):t},Pn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Di(t,e,void 0,n):t},Pn.pullAt=jo,Pn.range=il,Pn.rangeRight=rl,Pn.rearg=Ps,Pn.reject=function(t,e){return(Ns(t)?he:oi)(t,Es(Kr(e,3)))},Pn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var i=-1,r=[],o=t.length;for(e=Kr(e,3);++i<o;){var s=t[i];e(s,i,t)&&(n.push(s),r.push(i))}return Fi(t,r),n},Pn.rest=function(t,e){if("function"!=typeof t)throw new vt(o);return ki(t,e=void 0===e?e:ra(e))},Pn.reverse=Vo,Pn.sampleSize=function(t,e,n){return e=(n?lo(t,e,n):void 0===e)?1:ra(e),(Ns(t)?Hn:Hi)(t,e)},Pn.set=function(t,e,n){return null==t?t:zi(t,e,n)},Pn.setWith=function(t,e,n,i){return i="function"==typeof i?i:void 0,null==t?t:zi(t,e,n,i)},Pn.shuffle=function(t){return(Ns(t)?zn:Wi)(t)},Pn.slice=function(t,e,n){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&lo(t,e,n)?(e=0,n=i):(e=null==e?0:ra(e),n=void 0===n?i:ra(n)),Xi(t,e,n)):[]},Pn.sortBy=ms,Pn.sortedUniq=function(t){return t&&t.length?Ji(t):[]},Pn.sortedUniqBy=function(t,e){return t&&t.length?Ji(t,Kr(e,2)):[]},Pn.split=function(t,e,n){return n&&"number"!=typeof n&&lo(t,e,n)&&(e=n=void 0),(n=void 0===n?4294967295:n>>>0)?(t=la(t))&&("string"==typeof e||null!=e&&!Zs(e))&&!(e=$i(e))&&Ge(t)?hr(qe(t),0,n):t.split(e,n):[]},Pn.spread=function(t,e){if("function"!=typeof t)throw new vt(o);return e=null==e?0:an(ra(e),0),ki((function(n){var i=n[e],r=hr(n,0,e);return i&&fe(r,i),oe(t,this,r)}))},Pn.tail=function(t){var e=null==t?0:t.length;return e?Xi(t,1,e):[]},Pn.take=function(t,e,n){return t&&t.length?Xi(t,0,(e=n||void 0===e?1:ra(e))<0?0:e):[]},Pn.takeRight=function(t,e,n){var i=null==t?0:t.length;return i?Xi(t,(e=i-(e=n||void 0===e?1:ra(e)))<0?0:e,i):[]},Pn.takeRightWhile=function(t,e){return t&&t.length?nr(t,Kr(e,3),!1,!0):[]},Pn.takeWhile=function(t,e){return t&&t.length?nr(t,Kr(e,3)):[]},Pn.tap=function(t,e){return e(t),t},Pn.throttle=function(t,e,n){var i=!0,r=!0;if("function"!=typeof t)throw new vt(o);return Vs(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),bs(t,e,{leading:i,maxWait:e,trailing:r})},Pn.thru=is,Pn.toArray=na,Pn.toPairs=Ra,Pn.toPairsIn=Pa,Pn.toPath=function(t){return Ns(t)?pe(t,Ao):$s(t)?[t]:_r(Mo(la(t)))},Pn.toPlainObject=aa,Pn.transform=function(t,e,n){var i=Ns(t),r=i||Us(t)||Qs(t);if(e=Kr(e,4),null==n){var o=t&&t.constructor;n=r?i?new o:[]:Vs(t)&&Hs(o)?Cn(zt(t)):{}}return(r?ae:ui)(t,(function(t,i,r){return e(n,t,i,r)})),n},Pn.unary=function(t){return vs(t,1)},Pn.union=Wo,Pn.unionBy=Xo,Pn.unionWith=qo,Pn.uniq=function(t){return t&&t.length?Qi(t):[]},Pn.uniqBy=function(t,e){return t&&t.length?Qi(t,Kr(e,2)):[]},Pn.uniqWith=function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?Qi(t,void 0,e):[]},Pn.unset=function(t,e){return null==t||tr(t,e)},Pn.unzip=Yo,Pn.unzipWith=Zo,Pn.update=function(t,e,n){return null==t?t:er(t,e,ar(n))},Pn.updateWith=function(t,e,n,i){return i="function"==typeof i?i:void 0,null==t?t:er(t,e,ar(n),i)},Pn.values=Ca,Pn.valuesIn=function(t){return null==t?[]:Oe(t,Ta(t))},Pn.without=Jo,Pn.words=Ha,Pn.wrap=function(t,e){return As(ar(e),t)},Pn.xor=Ko,Pn.xorBy=$o,Pn.xorWith=Qo,Pn.zip=ts,Pn.zipObject=function(t,e){return or(t||[],e||[],Vn)},Pn.zipObjectDeep=function(t,e){return or(t||[],e||[],zi)},Pn.zipWith=es,Pn.entries=Ra,Pn.entriesIn=Pa,Pn.extend=ha,Pn.extendWith=ca,Ka(Pn,Pn),Pn.add=al,Pn.attempt=za,Pn.camelCase=Ia,Pn.capitalize=Oa,Pn.ceil=ll,Pn.clamp=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=sa(n))==n?n:0),void 0!==e&&(e=(e=sa(e))==e?e:0),Jn(sa(t),e,n)},Pn.clone=function(t){return Kn(t,4)},Pn.cloneDeep=function(t){return Kn(t,5)},Pn.cloneDeepWith=function(t,e){return Kn(t,5,e="function"==typeof e?e:void 0)},Pn.cloneWith=function(t,e){return Kn(t,4,e="function"==typeof e?e:void 0)},Pn.conformsTo=function(t,e){return null==e||$n(t,e,ba(e))},Pn.deburr=La,Pn.defaultTo=function(t,e){return null==t||t!=t?e:t},Pn.divide=ul,Pn.endsWith=function(t,e,n){t=la(t),e=$i(e);var i=t.length,r=n=void 0===n?i:Jn(ra(n),0,i);return(n-=e.length)>=0&&t.slice(n,r)==e},Pn.eq=Cs,Pn.escape=function(t){return(t=la(t))&&k.test(t)?t.replace(B,Ue):t},Pn.escapeRegExp=function(t){return(t=la(t))&&q.test(t)?t.replace(X,"\\$&"):t},Pn.every=function(t,e,n){var i=Ns(t)?ue:ii;return n&&lo(t,e,n)&&(e=void 0),i(t,Kr(e,3))},Pn.find=ss,Pn.findIndex=Lo,Pn.findKey=function(t,e){return ye(t,Kr(e,3),ui)},Pn.findLast=as,Pn.findLastIndex=No,Pn.findLastKey=function(t,e){return ye(t,Kr(e,3),hi)},Pn.floor=hl,Pn.forEach=ls,Pn.forEachRight=us,Pn.forIn=function(t,e){return null==t?t:ai(t,Kr(e,3),Ta)},Pn.forInRight=function(t,e){return null==t?t:li(t,Kr(e,3),Ta)},Pn.forOwn=function(t,e){return t&&ui(t,Kr(e,3))},Pn.forOwnRight=function(t,e){return t&&hi(t,Kr(e,3))},Pn.get=ga,Pn.gt=Is,Pn.gte=Os,Pn.has=function(t,e){return null!=t&&ro(t,e,gi)},Pn.hasIn=va,Pn.head=Fo,Pn.identity=qa,Pn.includes=function(t,e,n,i){t=Fs(t)?t:Ca(t),n=n&&!i?ra(n):0;var r=t.length;return n<0&&(n=an(r+n,0)),Ks(t)?n<=r&&t.indexOf(e,n)>-1:!!r&&be(t,e,n)>-1},Pn.indexOf=function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=null==n?0:ra(n);return r<0&&(r=an(i+r,0)),be(t,e,r)},Pn.inRange=function(t,e,n){return e=ia(e),void 0===n?(n=e,e=0):n=ia(n),function(t,e,n){return t>=ln(e,n)&&t<an(e,n)}(t=sa(t),e,n)},Pn.invoke=xa,Pn.isArguments=Ls,Pn.isArray=Ns,Pn.isArrayBuffer=Ds,Pn.isArrayLike=Fs,Pn.isArrayLikeObject=Bs,Pn.isBoolean=function(t){return!0===t||!1===t||Ws(t)&&fi(t)==h},Pn.isBuffer=Us,Pn.isDate=ks,Pn.isElement=function(t){return Ws(t)&&1===t.nodeType&&!Ys(t)},Pn.isEmpty=function(t){if(null==t)return!0;if(Fs(t)&&(Ns(t)||"string"==typeof t||"function"==typeof t.splice||Us(t)||Qs(t)||Ls(t)))return!t.length;var e=io(t);if(e==m||e==y)return!t.size;if(po(t))return!Ei(t).length;for(var n in t)if(wt.call(t,n))return!1;return!0},Pn.isEqual=function(t,e){return bi(t,e)},Pn.isEqualWith=function(t,e,n){var i=(n="function"==typeof n?n:void 0)?n(t,e):void 0;return void 0===i?bi(t,e,void 0,n):!!i},Pn.isError=Gs,Pn.isFinite=function(t){return"number"==typeof t&&rn(t)},Pn.isFunction=Hs,Pn.isInteger=zs,Pn.isLength=js,Pn.isMap=Xs,Pn.isMatch=function(t,e){return t===e||Ti(t,e,Qr(e))},Pn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:void 0,Ti(t,e,Qr(e),n)},Pn.isNaN=function(t){return qs(t)&&t!=+t},Pn.isNative=function(t){if(co(t))throw new Z("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return wi(t)},Pn.isNil=function(t){return null==t},Pn.isNull=function(t){return null===t},Pn.isNumber=qs,Pn.isObject=Vs,Pn.isObjectLike=Ws,Pn.isPlainObject=Ys,Pn.isRegExp=Zs,Pn.isSafeInteger=function(t){return zs(t)&&t>=-9007199254740991&&t<=9007199254740991},Pn.isSet=Js,Pn.isString=Ks,Pn.isSymbol=$s,Pn.isTypedArray=Qs,Pn.isUndefined=function(t){return void 0===t},Pn.isWeakMap=function(t){return Ws(t)&&io(t)==T},Pn.isWeakSet=function(t){return Ws(t)&&"[object WeakSet]"==fi(t)},Pn.join=function(t,e){return null==t?"":on.call(t,e)},Pn.kebabCase=Na,Pn.last=Go,Pn.lastIndexOf=function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=i;return void 0!==n&&(r=(r=ra(n))<0?an(i+r,0):ln(r,i-1)),e==e?function(t,e,n){for(var i=n+1;i--;)if(t[i]===e)return i;return i}(t,e,r):xe(t,we,r,!0)},Pn.lowerCase=Da,Pn.lowerFirst=Fa,Pn.lt=ta,Pn.lte=ea,Pn.max=function(t){return t&&t.length?ri(t,qa,mi):void 0},Pn.maxBy=function(t,e){return t&&t.length?ri(t,Kr(e,2),mi):void 0},Pn.mean=function(t){return Se(t,qa)},Pn.meanBy=function(t,e){return Se(t,Kr(e,2))},Pn.min=function(t){return t&&t.length?ri(t,qa,Ai):void 0},Pn.minBy=function(t,e){return t&&t.length?ri(t,Kr(e,2),Ai):void 0},Pn.stubArray=ol,Pn.stubFalse=sl,Pn.stubObject=function(){return{}},Pn.stubString=function(){return""},Pn.stubTrue=function(){return!0},Pn.multiply=dl,Pn.nth=function(t,e){return t&&t.length?Oi(t,ra(e)):void 0},Pn.noConflict=function(){return qt._===this&&(qt._=Rt),this},Pn.noop=$a,Pn.now=gs,Pn.pad=function(t,e,n){t=la(t);var i=(e=ra(e))?Xe(t):0;if(!e||i>=e)return t;var r=(e-i)/2;return Lr(tn(r),n)+t+Lr(Qe(r),n)},Pn.padEnd=function(t,e,n){t=la(t);var i=(e=ra(e))?Xe(t):0;return e&&i<e?t+Lr(e-i,n):t},Pn.padStart=function(t,e,n){t=la(t);var i=(e=ra(e))?Xe(t):0;return e&&i<e?Lr(e-i,n)+t:t},Pn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),hn(la(t).replace(Y,""),e||0)},Pn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&lo(t,e,n)&&(e=n=void 0),void 0===n&&("boolean"==typeof e?(n=e,e=void 0):"boolean"==typeof t&&(n=t,t=void 0)),void 0===t&&void 0===e?(t=0,e=1):(t=ia(t),void 0===e?(e=t,t=0):e=ia(e)),t>e){var i=t;t=e,e=i}if(n||t%1||e%1){var r=cn();return ln(t+r*(e-t+jt("1e-"+((r+"").length-1))),e)}return Bi(t,e)},Pn.reduce=function(t,e,n){var i=Ns(t)?me:Ae,r=arguments.length<3;return i(t,Kr(e,4),n,r,ei)},Pn.reduceRight=function(t,e,n){var i=Ns(t)?ge:Ae,r=arguments.length<3;return i(t,Kr(e,4),n,r,ni)},Pn.repeat=function(t,e,n){return e=(n?lo(t,e,n):void 0===e)?1:ra(e),Ui(la(t),e)},Pn.replace=function(){var t=arguments,e=la(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Pn.result=function(t,e,n){var i=-1,r=(e=lr(e,t)).length;for(r||(r=1,t=void 0);++i<r;){var o=null==t?void 0:t[Ao(e[i])];void 0===o&&(i=r,o=n),t=Hs(o)?o.call(t):o}return t},Pn.round=pl,Pn.runInContext=t,Pn.sample=function(t){return(Ns(t)?Gn:Gi)(t)},Pn.size=function(t){if(null==t)return 0;if(Fs(t))return Ks(t)?Xe(t):t.length;var e=io(t);return e==m||e==y?t.size:Ei(t).length},Pn.snakeCase=Ba,Pn.some=function(t,e,n){var i=Ns(t)?ve:qi;return n&&lo(t,e,n)&&(e=void 0),i(t,Kr(e,3))},Pn.sortedIndex=function(t,e){return Yi(t,e)},Pn.sortedIndexBy=function(t,e,n){return Zi(t,e,Kr(n,2))},Pn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var i=Yi(t,e);if(i<n&&Cs(t[i],e))return i}return-1},Pn.sortedLastIndex=function(t,e){return Yi(t,e,!0)},Pn.sortedLastIndexBy=function(t,e,n){return Zi(t,e,Kr(n,2),!0)},Pn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=Yi(t,e,!0)-1;if(Cs(t[n],e))return n}return-1},Pn.startCase=Ua,Pn.startsWith=function(t,e,n){return t=la(t),n=null==n?0:Jn(ra(n),0,t.length),e=$i(e),t.slice(n,n+e.length)==e},Pn.subtract=fl,Pn.sum=function(t){return t&&t.length?Re(t,qa):0},Pn.sumBy=function(t,e){return t&&t.length?Re(t,Kr(e,2)):0},Pn.template=function(t,e,n){var i=Pn.templateSettings;n&&lo(t,e,n)&&(e=void 0),t=la(t),e=ca({},e,i,Hr);var r,o,s=ca({},e.imports,i.imports,Hr),a=ba(s),l=Oe(s,a),u=0,h=e.interpolate||ht,c="__p += '",d=mt((e.escape||ht).source+"|"+h.source+"|"+(h===z?nt:ht).source+"|"+(e.evaluate||ht).source+"|$","g"),p="//# sourceURL="+(wt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++kt+"]")+"\n";t.replace(d,(function(e,n,i,s,a,l){return i||(i=s),c+=t.slice(u,l).replace(ct,ke),n&&(r=!0,c+="' +\n__e("+n+") +\n'"),a&&(o=!0,c+="';\n"+a+";\n__p += '"),i&&(c+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),u=l+e.length,e})),c+="';\n";var f=wt.call(e,"variable")&&e.variable;if(f){if(tt.test(f))throw new Z("Invalid `variable` option passed into `_.template`")}else c="with (obj) {\n"+c+"\n}\n";c=(o?c.replace(L,""):c).replace(N,"$1").replace(D,"$1;"),c="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+c+"return __p\n}";var m=za((function(){return dt(a,p+"return "+c).apply(void 0,l)}));if(m.source=c,Gs(m))throw m;return m},Pn.times=function(t,e){if((t=ra(t))<1||t>9007199254740991)return[];var n=4294967295,i=ln(t,4294967295);t-=4294967295;for(var r=Pe(i,e=Kr(e));++n<t;)e(n);return r},Pn.toFinite=ia,Pn.toInteger=ra,Pn.toLength=oa,Pn.toLower=function(t){return la(t).toLowerCase()},Pn.toNumber=sa,Pn.toSafeInteger=function(t){return t?Jn(ra(t),-9007199254740991,9007199254740991):0===t?t:0},Pn.toString=la,Pn.toUpper=function(t){return la(t).toUpperCase()},Pn.trim=function(t,e,n){if((t=la(t))&&(n||void 0===e))return Ce(t);if(!t||!(e=$i(e)))return t;var i=qe(t),r=qe(e);return hr(i,Ne(i,r),De(i,r)+1).join("")},Pn.trimEnd=function(t,e,n){if((t=la(t))&&(n||void 0===e))return t.slice(0,Ye(t)+1);if(!t||!(e=$i(e)))return t;var i=qe(t);return hr(i,0,De(i,qe(e))+1).join("")},Pn.trimStart=function(t,e,n){if((t=la(t))&&(n||void 0===e))return t.replace(Y,"");if(!t||!(e=$i(e)))return t;var i=qe(t);return hr(i,Ne(i,qe(e))).join("")},Pn.truncate=function(t,e){var n=30,i="...";if(Vs(e)){var r="separator"in e?e.separator:r;n="length"in e?ra(e.length):n,i="omission"in e?$i(e.omission):i}var o=(t=la(t)).length;if(Ge(t)){var s=qe(t);o=s.length}if(n>=o)return t;var a=n-Xe(i);if(a<1)return i;var l=s?hr(s,0,a).join(""):t.slice(0,a);if(void 0===r)return l+i;if(s&&(a+=l.length-a),Zs(r)){if(t.slice(a).search(r)){var u,h=l;for(r.global||(r=mt(r.source,la(it.exec(r))+"g")),r.lastIndex=0;u=r.exec(h);)var c=u.index;l=l.slice(0,void 0===c?a:c)}}else if(t.indexOf($i(r),a)!=a){var d=l.lastIndexOf(r);d>-1&&(l=l.slice(0,d))}return l+i},Pn.unescape=function(t){return(t=la(t))&&U.test(t)?t.replace(F,Ze):t},Pn.uniqueId=function(t){var e=++St;return la(t)+e},Pn.upperCase=ka,Pn.upperFirst=Ga,Pn.each=ls,Pn.eachRight=us,Pn.first=Fo,Ka(Pn,(cl={},ui(Pn,(function(t,e){wt.call(Pn.prototype,e)||(cl[e]=t)})),cl),{chain:!1}),Pn.VERSION="4.17.21",ae(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Pn[t].placeholder=Pn})),ae(["drop","take"],(function(t,e){Ln.prototype[t]=function(n){n=void 0===n?1:an(ra(n),0);var i=this.__filtered__&&!e?new Ln(this):this.clone();return i.__filtered__?i.__takeCount__=ln(n,i.__takeCount__):i.__views__.push({size:ln(n,4294967295),type:t+(i.__dir__<0?"Right":"")}),i},Ln.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),ae(["filter","map","takeWhile"],(function(t,e){var n=e+1,i=1==n||3==n;Ln.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Kr(t,3),type:n}),e.__filtered__=e.__filtered__||i,e}})),ae(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Ln.prototype[t]=function(){return this[n](1).value()[0]}})),ae(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Ln.prototype[t]=function(){return this.__filtered__?new Ln(this):this[n](1)}})),Ln.prototype.compact=function(){return this.filter(qa)},Ln.prototype.find=function(t){return this.filter(t).head()},Ln.prototype.findLast=function(t){return this.reverse().find(t)},Ln.prototype.invokeMap=ki((function(t,e){return"function"==typeof t?new Ln(this):this.map((function(n){return yi(n,t,e)}))})),Ln.prototype.reject=function(t){return this.filter(Es(Kr(t)))},Ln.prototype.slice=function(t,e){t=ra(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Ln(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),void 0!==e&&(n=(e=ra(e))<0?n.dropRight(-e):n.take(e-t)),n)},Ln.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ln.prototype.toArray=function(){return this.take(4294967295)},ui(Ln.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),r=Pn[i?"take"+("last"==e?"Right":""):e],o=i||/^find/.test(e);r&&(Pn.prototype[e]=function(){var e=this.__wrapped__,s=i?[1]:arguments,a=e instanceof Ln,l=s[0],u=a||Ns(e),h=function(t){var e=r.apply(Pn,fe([t],s));return i&&c?e[0]:e};u&&n&&"function"==typeof l&&1!=l.length&&(a=u=!1);var c=this.__chain__,d=!!this.__actions__.length,p=o&&!c,f=a&&!d;if(!o&&u){e=f?e:new Ln(this);var m=t.apply(e,s);return m.__actions__.push({func:is,args:[h],thisArg:void 0}),new On(m,c)}return p&&f?t.apply(this,s):(m=this.thru(h),p?i?m.value()[0]:m.value():m)})})),ae(["pop","push","shift","sort","splice","unshift"],(function(t){var e=_t[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);Pn.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var r=this.value();return e.apply(Ns(r)?r:[],t)}return this[n]((function(n){return e.apply(Ns(n)?n:[],t)}))}})),ui(Ln.prototype,(function(t,e){var n=Pn[e];if(n){var i=n.name+"";wt.call(xn,i)||(xn[i]=[]),xn[i].push({name:e,func:n})}})),xn[Pr(void 0,2).name]=[{name:"wrapper",func:void 0}],Ln.prototype.clone=function(){var t=new Ln(this.__wrapped__);return t.__actions__=_r(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=_r(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=_r(this.__views__),t},Ln.prototype.reverse=function(){if(this.__filtered__){var t=new Ln(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Ln.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ns(t),i=e<0,r=n?t.length:0,o=function(t,e,n){var i=-1,r=n.length;for(;++i<r;){var o=n[i],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=ln(e,t+s);break;case"takeRight":t=an(t,e-s)}}return{start:t,end:e}}(0,r,this.__views__),s=o.start,a=o.end,l=a-s,u=i?a:s-1,h=this.__iteratees__,c=h.length,d=0,p=ln(l,this.__takeCount__);if(!n||!i&&r==l&&p==l)return ir(t,this.__actions__);var f=[];t:for(;l--&&d<p;){for(var m=-1,g=t[u+=e];++m<c;){var v=h[m],_=v.iteratee,y=v.type,x=_(g);if(2==y)g=x;else if(!x){if(1==y)continue t;break t}}f[d++]=g}return f},Pn.prototype.at=rs,Pn.prototype.chain=function(){return ns(this)},Pn.prototype.commit=function(){return new On(this.value(),this.__chain__)},Pn.prototype.next=function(){void 0===this.__values__&&(this.__values__=na(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},Pn.prototype.plant=function(t){for(var e,n=this;n instanceof In;){var i=Po(n);i.__index__=0,i.__values__=void 0,e?r.__wrapped__=i:e=i;var r=i;n=n.__wrapped__}return r.__wrapped__=t,e},Pn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Ln){var e=t;return this.__actions__.length&&(e=new Ln(this)),(e=e.reverse()).__actions__.push({func:is,args:[Vo],thisArg:void 0}),new On(e,this.__chain__)}return this.thru(Vo)},Pn.prototype.toJSON=Pn.prototype.valueOf=Pn.prototype.value=function(){return ir(this.__wrapped__,this.__actions__)},Pn.prototype.first=Pn.prototype.head,Kt&&(Pn.prototype[Kt]=function(){return this}),Pn}();qt._=Je,void 0===(r=function(){return Je}.call(e,n,e,i))||(i.exports=r)}).call(this)}).call(this,n(4),n(7)(t))},function(t,e,n){"use strict";var i=Object.prototype.hasOwnProperty,r="~";function o(){}function s(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function a(t,e,n,i,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new s(n,i||t,o),l=r?r+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],a]:t._events[l].push(a):(t._events[l]=a,t._eventsCount++),t}function l(t,e){0==--t._eventsCount?t._events=new o:delete t._events[e]}function u(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(r=!1)),u.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)i.call(t,e)&&n.push(r?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},u.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=new Array(o);i<o;i++)s[i]=n[i].fn;return s},u.prototype.listenerCount=function(t){var e=r?r+t:t,n=this._events[e];return n?n.fn?1:n.length:0},u.prototype.emit=function(t,e,n,i,o,s){var a=r?r+t:t;if(!this._events[a])return!1;var l,u,h=this._events[a],c=arguments.length;if(h.fn){switch(h.once&&this.removeListener(t,h.fn,void 0,!0),c){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,e),!0;case 3:return h.fn.call(h.context,e,n),!0;case 4:return h.fn.call(h.context,e,n,i),!0;case 5:return h.fn.call(h.context,e,n,i,o),!0;case 6:return h.fn.call(h.context,e,n,i,o,s),!0}for(u=1,l=new Array(c-1);u<c;u++)l[u-1]=arguments[u];h.fn.apply(h.context,l)}else{var d,p=h.length;for(u=0;u<p;u++)switch(h[u].once&&this.removeListener(t,h[u].fn,void 0,!0),c){case 1:h[u].fn.call(h[u].context);break;case 2:h[u].fn.call(h[u].context,e);break;case 3:h[u].fn.call(h[u].context,e,n);break;case 4:h[u].fn.call(h[u].context,e,n,i);break;default:if(!l)for(d=1,l=new Array(c-1);d<c;d++)l[d-1]=arguments[d];h[u].fn.apply(h[u].context,l)}}return!0},u.prototype.on=function(t,e,n){return a(this,t,e,n,!1)},u.prototype.once=function(t,e,n){return a(this,t,e,n,!0)},u.prototype.removeListener=function(t,e,n,i){var o=r?r+t:t;if(!this._events[o])return this;if(!e)return l(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||n&&s.context!==n||l(this,o);else{for(var a=0,u=[],h=s.length;a<h;a++)(s[a].fn!==e||i&&!s[a].once||n&&s[a].context!==n)&&u.push(s[a]);u.length?this._events[o]=1===u.length?u[0]:u:l(this,o)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&l(this,e)):(this._events=new o,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,t.exports=u},function(t,e,n){(function(e){t.exports=function t(e,n,i){function r(s,a){if(!n[s]){if(!e[s]){if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[s]={exports:{}};e[s][0].call(u.exports,(function(t){var n=e[s][1][t];return r(n||t)}),u,u.exports,t,e,n,i)}return n[s].exports}for(var o=!1,s=0;s<i.length;s++)r(i[s]);return r}({1:[function(t,n,i){(function(t){"use strict";var e,i,r=t.MutationObserver||t.WebKitMutationObserver;if(r){var o=0,s=new r(h),a=t.document.createTextNode("");s.observe(a,{characterData:!0}),e=function(){a.data=o=++o%2}}else if(t.setImmediate||void 0===t.MessageChannel)e="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){h(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(h,0)};else{var l=new t.MessageChannel;l.port1.onmessage=h,e=function(){l.port2.postMessage(0)}}var u=[];function h(){var t,e;i=!0;for(var n=u.length;n;){for(e=u,u=[],t=-1;++t<n;)e[t]();n=u.length}i=!1}n.exports=function(t){1!==u.push(t)||i||e()}}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,n){"use strict";var i=t(1);function r(){}var o={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function u(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,t!==r&&p(this,t)}function h(t,e,n){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function c(t,e,n){i((function(){var i;try{i=e(n)}catch(e){return o.reject(t,e)}i===t?o.reject(t,new TypeError("Cannot resolve promise with itself")):o.resolve(t,i)}))}function d(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function p(t,e){var n=!1;function i(e){n||(n=!0,o.reject(t,e))}function r(e){n||(n=!0,o.resolve(t,e))}var s=f((function(){e(r,i)}));"error"===s.status&&i(s.value)}function f(t,e){var n={};try{n.value=t(e),n.status="success"}catch(t){n.status="error",n.value=t}return n}e.exports=u,u.prototype.catch=function(t){return this.then(null,t)},u.prototype.then=function(t,e){if("function"!=typeof t&&this.state===a||"function"!=typeof e&&this.state===s)return this;var n=new this.constructor(r);return this.state!==l?c(n,this.state===a?t:e,this.outcome):this.queue.push(new h(n,t,e)),n},h.prototype.callFulfilled=function(t){o.resolve(this.promise,t)},h.prototype.otherCallFulfilled=function(t){c(this.promise,this.onFulfilled,t)},h.prototype.callRejected=function(t){o.reject(this.promise,t)},h.prototype.otherCallRejected=function(t){c(this.promise,this.onRejected,t)},o.resolve=function(t,e){var n=f(d,e);if("error"===n.status)return o.reject(t,n.value);var i=n.value;if(i)p(t,i);else{t.state=a,t.outcome=e;for(var r=-1,s=t.queue.length;++r<s;)t.queue[r].callFulfilled(e)}return t},o.reject=function(t,e){t.state=s,t.outcome=e;for(var n=-1,i=t.queue.length;++n<i;)t.queue[n].callRejected(e);return t},u.resolve=function(t){return t instanceof this?t:o.resolve(new this(r),t)},u.reject=function(t){var e=new this(r);return o.reject(e,t)},u.all=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var n=t.length,i=!1;if(!n)return this.resolve([]);for(var s=new Array(n),a=0,l=-1,u=new this(r);++l<n;)h(t[l],l);return u;function h(t,r){e.resolve(t).then((function(t){s[r]=t,++a!==n||i||(i=!0,o.resolve(u,s))}),(function(t){i||(i=!0,o.reject(u,t))}))}},u.race=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var n=t.length,i=!1;if(!n)return this.resolve([]);for(var s,a=-1,l=new this(r);++a<n;)s=t[a],e.resolve(s).then((function(t){i||(i=!0,o.resolve(l,t))}),(function(t){i||(i=!0,o.reject(l,t))}));return l}},{1:1}],3:[function(t,n,i){(function(e){"use strict";"function"!=typeof e.Promise&&(e.Promise=t(2))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(t,e,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(t){return}}();function o(t,e){t=t||[],e=e||{};try{return new Blob(t,e)}catch(r){if("TypeError"!==r.name)throw r;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),i=0;i<t.length;i+=1)n.append(t[i]);return n.getBlob(e.type)}}"undefined"==typeof Promise&&t(3);var s=Promise;function a(t,e){e&&t.then((function(t){e(null,t)}),(function(t){e(t)}))}function l(t,e,n){"function"==typeof e&&t.then(e),"function"==typeof n&&t.catch(n)}function u(t){return"string"!=typeof t&&(console.warn(t+" used as a key, but it is not a string."),t=String(t)),t}function h(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var c=void 0,d={},p=Object.prototype.toString;function f(t){return"boolean"==typeof c?s.resolve(c):function(t){return new s((function(e){var n=t.transaction("local-forage-detect-blob-support","readwrite"),i=o([""]);n.objectStore("local-forage-detect-blob-support").put(i,"key"),n.onabort=function(t){t.preventDefault(),t.stopPropagation(),e(!1)},n.oncomplete=function(){var t=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);e(n||!t||parseInt(t[1],10)>=43)}})).catch((function(){return!1}))}(t).then((function(t){return c=t}))}function m(t){var e=d[t.name],n={};n.promise=new s((function(t,e){n.resolve=t,n.reject=e})),e.deferredOperations.push(n),e.dbReady?e.dbReady=e.dbReady.then((function(){return n.promise})):e.dbReady=n.promise}function g(t){var e=d[t.name].deferredOperations.pop();if(e)return e.resolve(),e.promise}function v(t,e){var n=d[t.name].deferredOperations.pop();if(n)return n.reject(e),n.promise}function _(t,e){return new s((function(n,i){if(d[t.name]=d[t.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},t.db){if(!e)return n(t.db);m(t),t.db.close()}var o=[t.name];e&&o.push(t.version);var s=r.open.apply(r,o);e&&(s.onupgradeneeded=function(e){var n=s.result;try{n.createObjectStore(t.storeName),e.oldVersion<=1&&n.createObjectStore("local-forage-detect-blob-support")}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+t.name+'" has been upgraded from version '+e.oldVersion+" to version "+e.newVersion+', but the storage "'+t.storeName+'" already exists.')}}),s.onerror=function(t){t.preventDefault(),i(s.error)},s.onsuccess=function(){var e=s.result;e.onversionchange=function(t){t.target.close()},n(e),g(t)}}))}function y(t){return _(t,!1)}function x(t){return _(t,!0)}function b(t,e){if(!t.db)return!0;var n=!t.db.objectStoreNames.contains(t.storeName),i=t.version<t.db.version,r=t.version>t.db.version;if(i&&(t.version!==e&&console.warn('The database "'+t.name+"\" can't be downgraded from version "+t.db.version+" to version "+t.version+"."),t.version=t.db.version),r||n){if(n){var o=t.db.version+1;o>t.version&&(t.version=o)}return!0}return!1}function T(t){return o([function(t){for(var e=t.length,n=new ArrayBuffer(e),i=new Uint8Array(n),r=0;r<e;r++)i[r]=t.charCodeAt(r);return n}(atob(t.data))],{type:t.type})}function w(t){return t&&t.__local_forage_encoded_blob}function S(t){var e=this,n=e._initReady().then((function(){var t=d[e._dbInfo.name];if(t&&t.dbReady)return t.dbReady}));return l(n,t,t),n}function E(t,e,n,i){void 0===i&&(i=1);try{var r=t.db.transaction(t.storeName,e);n(null,r)}catch(r){if(i>0&&(!t.db||"InvalidStateError"===r.name||"NotFoundError"===r.name))return s.resolve().then((function(){if(!t.db||"NotFoundError"===r.name&&!t.db.objectStoreNames.contains(t.storeName)&&t.version<=t.db.version)return t.db&&(t.version=t.db.version+1),x(t)})).then((function(){return function(t){m(t);for(var e=d[t.name],n=e.forages,i=0;i<n.length;i++){var r=n[i];r._dbInfo.db&&(r._dbInfo.db.close(),r._dbInfo.db=null)}return t.db=null,y(t).then((function(e){return t.db=e,b(t)?x(t):e})).then((function(i){t.db=e.db=i;for(var r=0;r<n.length;r++)n[r]._dbInfo.db=i})).catch((function(e){throw v(t,e),e}))}(t).then((function(){E(t,e,n,i-1)}))})).catch(n);n(r)}}var M={_driver:"asyncStorage",_initStorage:function(t){var e=this,n={db:null};if(t)for(var i in t)n[i]=t[i];var r=d[n.name];r||(r={forages:[],db:null,dbReady:null,deferredOperations:[]},d[n.name]=r),r.forages.push(e),e._initReady||(e._initReady=e.ready,e.ready=S);var o=[];function a(){return s.resolve()}for(var l=0;l<r.forages.length;l++){var u=r.forages[l];u!==e&&o.push(u._initReady().catch(a))}var h=r.forages.slice(0);return s.all(o).then((function(){return n.db=r.db,y(n)})).then((function(t){return n.db=t,b(n,e._defaultConfig.version)?x(n):t})).then((function(t){n.db=r.db=t,e._dbInfo=n;for(var i=0;i<h.length;i++){var o=h[i];o!==e&&(o._dbInfo.db=n.db,o._dbInfo.version=n.version)}}))},_support:function(){try{if(!r||!r.open)return!1;var t="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),e="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!t||e)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(t){return!1}}(),iterate:function(t,e){var n=this,i=new s((function(e,i){n.ready().then((function(){E(n._dbInfo,"readonly",(function(r,o){if(r)return i(r);try{var s=o.objectStore(n._dbInfo.storeName).openCursor(),a=1;s.onsuccess=function(){var n=s.result;if(n){var i=n.value;w(i)&&(i=T(i));var r=t(i,n.key,a++);void 0!==r?e(r):n.continue()}else e()},s.onerror=function(){i(s.error)}}catch(t){i(t)}}))})).catch(i)}));return a(i,e),i},getItem:function(t,e){var n=this;t=u(t);var i=new s((function(e,i){n.ready().then((function(){E(n._dbInfo,"readonly",(function(r,o){if(r)return i(r);try{var s=o.objectStore(n._dbInfo.storeName).get(t);s.onsuccess=function(){var t=s.result;void 0===t&&(t=null),w(t)&&(t=T(t)),e(t)},s.onerror=function(){i(s.error)}}catch(t){i(t)}}))})).catch(i)}));return a(i,e),i},setItem:function(t,e,n){var i=this;t=u(t);var r=new s((function(n,r){var o;i.ready().then((function(){return o=i._dbInfo,"[object Blob]"===p.call(e)?f(o.db).then((function(t){return t?e:(n=e,new s((function(t,e){var i=new FileReader;i.onerror=e,i.onloadend=function(e){var i=btoa(e.target.result||"");t({__local_forage_encoded_blob:!0,data:i,type:n.type})},i.readAsBinaryString(n)})));var n})):e})).then((function(e){E(i._dbInfo,"readwrite",(function(o,s){if(o)return r(o);try{var a=s.objectStore(i._dbInfo.storeName);null===e&&(e=void 0);var l=a.put(e,t);s.oncomplete=function(){void 0===e&&(e=null),n(e)},s.onabort=s.onerror=function(){var t=l.error?l.error:l.transaction.error;r(t)}}catch(t){r(t)}}))})).catch(r)}));return a(r,n),r},removeItem:function(t,e){var n=this;t=u(t);var i=new s((function(e,i){n.ready().then((function(){E(n._dbInfo,"readwrite",(function(r,o){if(r)return i(r);try{var s=o.objectStore(n._dbInfo.storeName).delete(t);o.oncomplete=function(){e()},o.onerror=function(){i(s.error)},o.onabort=function(){var t=s.error?s.error:s.transaction.error;i(t)}}catch(t){i(t)}}))})).catch(i)}));return a(i,e),i},clear:function(t){var e=this,n=new s((function(t,n){e.ready().then((function(){E(e._dbInfo,"readwrite",(function(i,r){if(i)return n(i);try{var o=r.objectStore(e._dbInfo.storeName).clear();r.oncomplete=function(){t()},r.onabort=r.onerror=function(){var t=o.error?o.error:o.transaction.error;n(t)}}catch(t){n(t)}}))})).catch(n)}));return a(n,t),n},length:function(t){var e=this,n=new s((function(t,n){e.ready().then((function(){E(e._dbInfo,"readonly",(function(i,r){if(i)return n(i);try{var o=r.objectStore(e._dbInfo.storeName).count();o.onsuccess=function(){t(o.result)},o.onerror=function(){n(o.error)}}catch(t){n(t)}}))})).catch(n)}));return a(n,t),n},key:function(t,e){var n=this,i=new s((function(e,i){t<0?e(null):n.ready().then((function(){E(n._dbInfo,"readonly",(function(r,o){if(r)return i(r);try{var s=o.objectStore(n._dbInfo.storeName),a=!1,l=s.openKeyCursor();l.onsuccess=function(){var n=l.result;n?0===t||a?e(n.key):(a=!0,n.advance(t)):e(null)},l.onerror=function(){i(l.error)}}catch(t){i(t)}}))})).catch(i)}));return a(i,e),i},keys:function(t){var e=this,n=new s((function(t,n){e.ready().then((function(){E(e._dbInfo,"readonly",(function(i,r){if(i)return n(i);try{var o=r.objectStore(e._dbInfo.storeName).openKeyCursor(),s=[];o.onsuccess=function(){var e=o.result;e?(s.push(e.key),e.continue()):t(s)},o.onerror=function(){n(o.error)}}catch(t){n(t)}}))})).catch(n)}));return a(n,t),n},dropInstance:function(t,e){e=h.apply(this,arguments);var n=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||n.name,t.storeName=t.storeName||n.storeName);var i,o=this;if(t.name){var l=t.name===n.name&&o._dbInfo.db,u=l?s.resolve(o._dbInfo.db):y(t).then((function(e){var n=d[t.name],i=n.forages;n.db=e;for(var r=0;r<i.length;r++)i[r]._dbInfo.db=e;return e}));i=t.storeName?u.then((function(e){if(e.objectStoreNames.contains(t.storeName)){var n=e.version+1;m(t);var i=d[t.name],o=i.forages;e.close();for(var a=0;a<o.length;a++){var l=o[a];l._dbInfo.db=null,l._dbInfo.version=n}return new s((function(e,i){var o=r.open(t.name,n);o.onerror=function(t){o.result.close(),i(t)},o.onupgradeneeded=function(){o.result.deleteObjectStore(t.storeName)},o.onsuccess=function(){var t=o.result;t.close(),e(t)}})).then((function(t){i.db=t;for(var e=0;e<o.length;e++){var n=o[e];n._dbInfo.db=t,g(n._dbInfo)}})).catch((function(e){throw(v(t,e)||s.resolve()).catch((function(){})),e}))}})):u.then((function(e){m(t);var n=d[t.name],i=n.forages;e.close();for(var o=0;o<i.length;o++)i[o]._dbInfo.db=null;return new s((function(e,n){var i=r.deleteDatabase(t.name);i.onerror=function(){var t=i.result;t&&t.close(),n(i.error)},i.onblocked=function(){console.warn('dropInstance blocked for database "'+t.name+'" until all open connections are closed')},i.onsuccess=function(){var t=i.result;t&&t.close(),e(t)}})).then((function(t){n.db=t;for(var e=0;e<i.length;e++)g(i[e]._dbInfo)})).catch((function(e){throw(v(t,e)||s.resolve()).catch((function(){})),e}))}))}else i=s.reject("Invalid arguments");return a(i,e),i}},A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",R=/^~~local_forage_type~([^~]+)~/,P="__lfsc__:".length,C=P+"arbf".length,I=Object.prototype.toString;function O(t){var e,n,i,r,o,s=.75*t.length,a=t.length,l=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var u=new ArrayBuffer(s),h=new Uint8Array(u);for(e=0;e<a;e+=4)n=A.indexOf(t[e]),i=A.indexOf(t[e+1]),r=A.indexOf(t[e+2]),o=A.indexOf(t[e+3]),h[l++]=n<<2|i>>4,h[l++]=(15&i)<<4|r>>2,h[l++]=(3&r)<<6|63&o;return u}function L(t){var e,n=new Uint8Array(t),i="";for(e=0;e<n.length;e+=3)i+=A[n[e]>>2],i+=A[(3&n[e])<<4|n[e+1]>>4],i+=A[(15&n[e+1])<<2|n[e+2]>>6],i+=A[63&n[e+2]];return n.length%3==2?i=i.substring(0,i.length-1)+"=":n.length%3==1&&(i=i.substring(0,i.length-2)+"=="),i}var N={serialize:function(t,e){var n="";if(t&&(n=I.call(t)),t&&("[object ArrayBuffer]"===n||t.buffer&&"[object ArrayBuffer]"===I.call(t.buffer))){var i,r="__lfsc__:";t instanceof ArrayBuffer?(i=t,r+="arbf"):(i=t.buffer,"[object Int8Array]"===n?r+="si08":"[object Uint8Array]"===n?r+="ui08":"[object Uint8ClampedArray]"===n?r+="uic8":"[object Int16Array]"===n?r+="si16":"[object Uint16Array]"===n?r+="ur16":"[object Int32Array]"===n?r+="si32":"[object Uint32Array]"===n?r+="ui32":"[object Float32Array]"===n?r+="fl32":"[object Float64Array]"===n?r+="fl64":e(new Error("Failed to get type for BinaryArray"))),e(r+L(i))}else if("[object Blob]"===n){var o=new FileReader;o.onload=function(){var n="~~local_forage_type~"+t.type+"~"+L(this.result);e("__lfsc__:blob"+n)},o.readAsArrayBuffer(t)}else try{e(JSON.stringify(t))}catch(n){console.error("Couldn't convert value into a JSON string: ",t),e(null,n)}},deserialize:function(t){if("__lfsc__:"!==t.substring(0,P))return JSON.parse(t);var e,n=t.substring(C),i=t.substring(P,C);if("blob"===i&&R.test(n)){var r=n.match(R);e=r[1],n=n.substring(r[0].length)}var s=O(n);switch(i){case"arbf":return s;case"blob":return o([s],{type:e});case"si08":return new Int8Array(s);case"ui08":return new Uint8Array(s);case"uic8":return new Uint8ClampedArray(s);case"si16":return new Int16Array(s);case"ur16":return new Uint16Array(s);case"si32":return new Int32Array(s);case"ui32":return new Uint32Array(s);case"fl32":return new Float32Array(s);case"fl64":return new Float64Array(s);default:throw new Error("Unkown type: "+i)}},stringToBuffer:O,bufferToString:L};function D(t,e,n,i){t.executeSql("CREATE TABLE IF NOT EXISTS "+e.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,i)}function F(t,e,n,i,r,o){t.executeSql(n,i,r,(function(t,s){s.code===s.SYNTAX_ERR?t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[e.storeName],(function(t,a){a.rows.length?o(t,s):D(t,e,(function(){t.executeSql(n,i,r,o)}),o)}),o):o(t,s)}),o)}function B(t,e,n,i){var r=this;t=u(t);var o=new s((function(o,s){r.ready().then((function(){void 0===e&&(e=null);var a=e,l=r._dbInfo;l.serializer.serialize(e,(function(e,u){u?s(u):l.db.transaction((function(n){F(n,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[t,e],(function(){o(a)}),(function(t,e){s(e)}))}),(function(e){if(e.code===e.QUOTA_ERR){if(i>0)return void o(B.apply(r,[t,a,n,i-1]));s(e)}}))}))})).catch(s)}));return a(o,n),o}function U(t){return new s((function(e,n){t.transaction((function(i){i.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,i){for(var r=[],o=0;o<i.rows.length;o++)r.push(i.rows.item(o).name);e({db:t,storeNames:r})}),(function(t,e){n(e)}))}),(function(t){n(t)}))}))}var k={_driver:"webSQLStorage",_initStorage:function(t){var e=this,n={db:null};if(t)for(var i in t)n[i]="string"!=typeof t[i]?t[i].toString():t[i];var r=new s((function(t,i){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(t){return i(t)}n.db.transaction((function(r){D(r,n,(function(){e._dbInfo=n,t()}),(function(t,e){i(e)}))}),i)}));return n.serializer=N,r},_support:"function"==typeof openDatabase,iterate:function(t,e){var n=this,i=new s((function(e,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){F(n,r,"SELECT * FROM "+r.storeName,[],(function(n,i){for(var o=i.rows,s=o.length,a=0;a<s;a++){var l=o.item(a),u=l.value;if(u&&(u=r.serializer.deserialize(u)),void 0!==(u=t(u,l.key,a+1)))return void e(u)}e()}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,e),i},getItem:function(t,e){var n=this;t=u(t);var i=new s((function(e,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){F(n,r,"SELECT * FROM "+r.storeName+" WHERE key = ? LIMIT 1",[t],(function(t,n){var i=n.rows.length?n.rows.item(0).value:null;i&&(i=r.serializer.deserialize(i)),e(i)}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,e),i},setItem:function(t,e,n){return B.apply(this,[t,e,n,1])},removeItem:function(t,e){var n=this;t=u(t);var i=new s((function(e,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){F(n,r,"DELETE FROM "+r.storeName+" WHERE key = ?",[t],(function(){e()}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,e),i},clear:function(t){var e=this,n=new s((function(t,n){e.ready().then((function(){var i=e._dbInfo;i.db.transaction((function(e){F(e,i,"DELETE FROM "+i.storeName,[],(function(){t()}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,t),n},length:function(t){var e=this,n=new s((function(t,n){e.ready().then((function(){var i=e._dbInfo;i.db.transaction((function(e){F(e,i,"SELECT COUNT(key) as c FROM "+i.storeName,[],(function(e,n){var i=n.rows.item(0).c;t(i)}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,t),n},key:function(t,e){var n=this,i=new s((function(e,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){F(n,r,"SELECT key FROM "+r.storeName+" WHERE id = ? LIMIT 1",[t+1],(function(t,n){var i=n.rows.length?n.rows.item(0).key:null;e(i)}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,e),i},keys:function(t){var e=this,n=new s((function(t,n){e.ready().then((function(){var i=e._dbInfo;i.db.transaction((function(e){F(e,i,"SELECT key FROM "+i.storeName,[],(function(e,n){for(var i=[],r=0;r<n.rows.length;r++)i.push(n.rows.item(r).key);t(i)}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,t),n},dropInstance:function(t,e){e=h.apply(this,arguments);var n=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||n.name,t.storeName=t.storeName||n.storeName);var i,r=this;return a(i=t.name?new s((function(e){var i;i=t.name===n.name?r._dbInfo.db:openDatabase(t.name,"","",0),t.storeName?e({db:i,storeNames:[t.storeName]}):e(U(i))})).then((function(t){return new s((function(e,n){t.db.transaction((function(i){function r(t){return new s((function(e,n){i.executeSql("DROP TABLE IF EXISTS "+t,[],(function(){e()}),(function(t,e){n(e)}))}))}for(var o=[],a=0,l=t.storeNames.length;a<l;a++)o.push(r(t.storeNames[a]));s.all(o).then((function(){e()})).catch((function(t){n(t)}))}),(function(t){n(t)}))}))})):s.reject("Invalid arguments"),e),i}};function G(t,e){var n=t.name+"/";return t.storeName!==e.storeName&&(n+=t.storeName+"/"),n}function H(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(t){return!0}}()||localStorage.length>0}var z={_driver:"localStorageWrapper",_initStorage:function(t){var e={};if(t)for(var n in t)e[n]=t[n];return e.keyPrefix=G(t,this._defaultConfig),H()?(this._dbInfo=e,e.serializer=N,s.resolve()):s.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(t){return!1}}(),iterate:function(t,e){var n=this,i=n.ready().then((function(){for(var e=n._dbInfo,i=e.keyPrefix,r=i.length,o=localStorage.length,s=1,a=0;a<o;a++){var l=localStorage.key(a);if(0===l.indexOf(i)){var u=localStorage.getItem(l);if(u&&(u=e.serializer.deserialize(u)),void 0!==(u=t(u,l.substring(r),s++)))return u}}}));return a(i,e),i},getItem:function(t,e){var n=this;t=u(t);var i=n.ready().then((function(){var e=n._dbInfo,i=localStorage.getItem(e.keyPrefix+t);return i&&(i=e.serializer.deserialize(i)),i}));return a(i,e),i},setItem:function(t,e,n){var i=this;t=u(t);var r=i.ready().then((function(){void 0===e&&(e=null);var n=e;return new s((function(r,o){var s=i._dbInfo;s.serializer.serialize(e,(function(e,i){if(i)o(i);else try{localStorage.setItem(s.keyPrefix+t,e),r(n)}catch(t){"QuotaExceededError"!==t.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==t.name||o(t),o(t)}}))}))}));return a(r,n),r},removeItem:function(t,e){var n=this;t=u(t);var i=n.ready().then((function(){var e=n._dbInfo;localStorage.removeItem(e.keyPrefix+t)}));return a(i,e),i},clear:function(t){var e=this,n=e.ready().then((function(){for(var t=e._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var i=localStorage.key(n);0===i.indexOf(t)&&localStorage.removeItem(i)}}));return a(n,t),n},length:function(t){var e=this.keys().then((function(t){return t.length}));return a(e,t),e},key:function(t,e){var n=this,i=n.ready().then((function(){var e,i=n._dbInfo;try{e=localStorage.key(t)}catch(t){e=null}return e&&(e=e.substring(i.keyPrefix.length)),e}));return a(i,e),i},keys:function(t){var e=this,n=e.ready().then((function(){for(var t=e._dbInfo,n=localStorage.length,i=[],r=0;r<n;r++){var o=localStorage.key(r);0===o.indexOf(t.keyPrefix)&&i.push(o.substring(t.keyPrefix.length))}return i}));return a(n,t),n},dropInstance:function(t,e){if(e=h.apply(this,arguments),!(t="function"!=typeof t&&t||{}).name){var n=this.config();t.name=t.name||n.name,t.storeName=t.storeName||n.storeName}var i,r=this;return a(i=t.name?new s((function(e){t.storeName?e(G(t,r._defaultConfig)):e(t.name+"/")})).then((function(t){for(var e=localStorage.length-1;e>=0;e--){var n=localStorage.key(e);0===n.indexOf(t)&&localStorage.removeItem(n)}})):s.reject("Invalid arguments"),e),i}},j=function(t,e){for(var n,i,r=t.length,o=0;o<r;){if((n=t[o])===(i=e)||"number"==typeof n&&"number"==typeof i&&isNaN(n)&&isNaN(i))return!0;o++}return!1},V=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},W={},X={},q={INDEXEDDB:M,WEBSQL:k,LOCALSTORAGE:z},Y=[q.INDEXEDDB._driver,q.WEBSQL._driver,q.LOCALSTORAGE._driver],Z=["dropInstance"],J=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Z),K={description:"",driver:Y.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function $(t,e){t[e]=function(){var n=arguments;return t.ready().then((function(){return t[e].apply(t,n)}))}}function Q(){for(var t=1;t<arguments.length;t++){var e=arguments[t];if(e)for(var n in e)e.hasOwnProperty(n)&&(V(e[n])?arguments[0][n]=e[n].slice():arguments[0][n]=e[n])}return arguments[0]}var tt=new(function(){function t(e){for(var n in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),q)if(q.hasOwnProperty(n)){var i=q[n],r=i._driver;this[n]=r,W[r]||this.defineDriver(i)}this._defaultConfig=Q({},K),this._config=Q({},this._defaultConfig,e),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return t.prototype.config=function(t){if("object"===(void 0===t?"undefined":i(t))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var e in t){if("storeName"===e&&(t[e]=t[e].replace(/\W/g,"_")),"version"===e&&"number"!=typeof t[e])return new Error("Database version must be a number.");this._config[e]=t[e]}return!("driver"in t)||!t.driver||this.setDriver(this._config.driver)}return"string"==typeof t?this._config[t]:this._config},t.prototype.defineDriver=function(t,e,n){var i=new s((function(e,n){try{var i=t._driver,r=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!t._driver)return void n(r);for(var o=J.concat("_initStorage"),l=0,u=o.length;l<u;l++){var h=o[l];if((!j(Z,h)||t[h])&&"function"!=typeof t[h])return void n(r)}!function(){for(var e=function(t){return function(){var e=new Error("Method "+t+" is not implemented by the current driver"),n=s.reject(e);return a(n,arguments[arguments.length-1]),n}},n=0,i=Z.length;n<i;n++){var r=Z[n];t[r]||(t[r]=e(r))}}();var c=function(n){W[i]&&console.info("Redefining LocalForage driver: "+i),W[i]=t,X[i]=n,e()};"_support"in t?t._support&&"function"==typeof t._support?t._support().then(c,n):c(!!t._support):c(!0)}catch(t){n(t)}}));return l(i,e,n),i},t.prototype.driver=function(){return this._driver||null},t.prototype.getDriver=function(t,e,n){var i=W[t]?s.resolve(W[t]):s.reject(new Error("Driver not found."));return l(i,e,n),i},t.prototype.getSerializer=function(t){var e=s.resolve(N);return l(e,t),e},t.prototype.ready=function(t){var e=this,n=e._driverSet.then((function(){return null===e._ready&&(e._ready=e._initDriver()),e._ready}));return l(n,t,t),n},t.prototype.setDriver=function(t,e,n){var i=this;V(t)||(t=[t]);var r=this._getSupportedDrivers(t);function o(){i._config.driver=i.driver()}function a(t){return i._extend(t),o(),i._ready=i._initStorage(i._config),i._ready}var u=null!==this._driverSet?this._driverSet.catch((function(){return s.resolve()})):s.resolve();return this._driverSet=u.then((function(){var t=r[0];return i._dbInfo=null,i._ready=null,i.getDriver(t).then((function(t){i._driver=t._driver,o(),i._wrapLibraryMethodsWithReady(),i._initDriver=function(t){return function(){var e=0;return function n(){for(;e<t.length;){var r=t[e];return e++,i._dbInfo=null,i._ready=null,i.getDriver(r).then(a).catch(n)}o();var l=new Error("No available storage method found.");return i._driverSet=s.reject(l),i._driverSet}()}}(r)}))})).catch((function(){o();var t=new Error("No available storage method found.");return i._driverSet=s.reject(t),i._driverSet})),l(this._driverSet,e,n),this._driverSet},t.prototype.supports=function(t){return!!X[t]},t.prototype._extend=function(t){Q(this,t)},t.prototype._getSupportedDrivers=function(t){for(var e=[],n=0,i=t.length;n<i;n++){var r=t[n];this.supports(r)&&e.push(r)}return e},t.prototype._wrapLibraryMethodsWithReady=function(){for(var t=0,e=J.length;t<e;t++)$(this,J[t])},t.prototype.createInstance=function(e){return new t(e)},t}());e.exports=tt},{3:3}]},{},[4])(4)}).call(this,n(4))},function(t,e,n){var i;!function(r){"use strict";function o(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function s(t,e,n,i,r,s){return o((a=o(o(e,t),o(i,s)))<<(l=r)|a>>>32-l,n);var a,l}function a(t,e,n,i,r,o,a){return s(e&n|~e&i,t,e,r,o,a)}function l(t,e,n,i,r,o,a){return s(e&i|n&~i,t,e,r,o,a)}function u(t,e,n,i,r,o,a){return s(e^n^i,t,e,r,o,a)}function h(t,e,n,i,r,o,a){return s(n^(e|~i),t,e,r,o,a)}function c(t,e){var n,i,r,s,c;t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;var d=1732584193,p=-271733879,f=-1732584194,m=271733878;for(n=0;n<t.length;n+=16)i=d,r=p,s=f,c=m,d=a(d,p,f,m,t[n],7,-680876936),m=a(m,d,p,f,t[n+1],12,-389564586),f=a(f,m,d,p,t[n+2],17,606105819),p=a(p,f,m,d,t[n+3],22,-1044525330),d=a(d,p,f,m,t[n+4],7,-176418897),m=a(m,d,p,f,t[n+5],12,1200080426),f=a(f,m,d,p,t[n+6],17,-1473231341),p=a(p,f,m,d,t[n+7],22,-45705983),d=a(d,p,f,m,t[n+8],7,1770035416),m=a(m,d,p,f,t[n+9],12,-1958414417),f=a(f,m,d,p,t[n+10],17,-42063),p=a(p,f,m,d,t[n+11],22,-1990404162),d=a(d,p,f,m,t[n+12],7,1804603682),m=a(m,d,p,f,t[n+13],12,-40341101),f=a(f,m,d,p,t[n+14],17,-1502002290),d=l(d,p=a(p,f,m,d,t[n+15],22,1236535329),f,m,t[n+1],5,-165796510),m=l(m,d,p,f,t[n+6],9,-1069501632),f=l(f,m,d,p,t[n+11],14,643717713),p=l(p,f,m,d,t[n],20,-373897302),d=l(d,p,f,m,t[n+5],5,-701558691),m=l(m,d,p,f,t[n+10],9,38016083),f=l(f,m,d,p,t[n+15],14,-660478335),p=l(p,f,m,d,t[n+4],20,-405537848),d=l(d,p,f,m,t[n+9],5,568446438),m=l(m,d,p,f,t[n+14],9,-1019803690),f=l(f,m,d,p,t[n+3],14,-187363961),p=l(p,f,m,d,t[n+8],20,1163531501),d=l(d,p,f,m,t[n+13],5,-1444681467),m=l(m,d,p,f,t[n+2],9,-51403784),f=l(f,m,d,p,t[n+7],14,1735328473),d=u(d,p=l(p,f,m,d,t[n+12],20,-1926607734),f,m,t[n+5],4,-378558),m=u(m,d,p,f,t[n+8],11,-2022574463),f=u(f,m,d,p,t[n+11],16,1839030562),p=u(p,f,m,d,t[n+14],23,-35309556),d=u(d,p,f,m,t[n+1],4,-1530992060),m=u(m,d,p,f,t[n+4],11,1272893353),f=u(f,m,d,p,t[n+7],16,-155497632),p=u(p,f,m,d,t[n+10],23,-1094730640),d=u(d,p,f,m,t[n+13],4,681279174),m=u(m,d,p,f,t[n],11,-358537222),f=u(f,m,d,p,t[n+3],16,-722521979),p=u(p,f,m,d,t[n+6],23,76029189),d=u(d,p,f,m,t[n+9],4,-640364487),m=u(m,d,p,f,t[n+12],11,-421815835),f=u(f,m,d,p,t[n+15],16,530742520),d=h(d,p=u(p,f,m,d,t[n+2],23,-995338651),f,m,t[n],6,-198630844),m=h(m,d,p,f,t[n+7],10,1126891415),f=h(f,m,d,p,t[n+14],15,-1416354905),p=h(p,f,m,d,t[n+5],21,-57434055),d=h(d,p,f,m,t[n+12],6,1700485571),m=h(m,d,p,f,t[n+3],10,-1894986606),f=h(f,m,d,p,t[n+10],15,-1051523),p=h(p,f,m,d,t[n+1],21,-2054922799),d=h(d,p,f,m,t[n+8],6,1873313359),m=h(m,d,p,f,t[n+15],10,-30611744),f=h(f,m,d,p,t[n+6],15,-1560198380),p=h(p,f,m,d,t[n+13],21,1309151649),d=h(d,p,f,m,t[n+4],6,-145523070),m=h(m,d,p,f,t[n+11],10,-1120210379),f=h(f,m,d,p,t[n+2],15,718787259),p=h(p,f,m,d,t[n+9],21,-343485551),d=o(d,i),p=o(p,r),f=o(f,s),m=o(m,c);return[d,p,f,m]}function d(t){var e,n="",i=32*t.length;for(e=0;e<i;e+=8)n+=String.fromCharCode(t[e>>5]>>>e%32&255);return n}function p(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e<n.length;e+=1)n[e]=0;var i=8*t.length;for(e=0;e<i;e+=8)n[e>>5]|=(255&t.charCodeAt(e/8))<<e%32;return n}function f(t){var e,n,i="";for(n=0;n<t.length;n+=1)e=t.charCodeAt(n),i+="0123456789abcdef".charAt(e>>>4&15)+"0123456789abcdef".charAt(15&e);return i}function m(t){return unescape(encodeURIComponent(t))}function g(t){return function(t){return d(c(p(t),8*t.length))}(m(t))}function v(t,e){return function(t,e){var n,i,r=p(t),o=[],s=[];for(o[15]=s[15]=void 0,r.length>16&&(r=c(r,8*t.length)),n=0;n<16;n+=1)o[n]=909522486^r[n],s[n]=1549556828^r[n];return i=c(o.concat(p(e)),512+8*e.length),d(c(s.concat(i),640))}(m(t),m(e))}function _(t,e,n){return e?n?v(e,t):f(v(e,t)):n?g(t):f(g(t))}void 0===(i=function(){return _}.call(e,n,e,t))||(t.exports=i)}()},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var i=n(57),r=n(58);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=y,e.resolve=function(t,e){return y(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?y(t,!1,!0).resolveObject(e):e},e.format=function(t){r.isString(t)&&(t=y(t));return t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),h=["'"].concat(u),c=["%","/","?",";","#"].concat(h),d=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=n(59);function y(t,e,n){if(t&&r.isObject(t)&&t instanceof o)return t;var i=new o;return i.parse(t,e,n),i}o.prototype.parse=function(t,e,n){if(!r.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),a=-1!==o&&o<t.indexOf("#")?"?":"#",u=t.split(a);u[0]=u[0].replace(/\\/g,"/");var y=t=u.join(a);if(y=y.trim(),!n&&1===t.split("#").length){var x=l.exec(y);if(x)return this.path=y,this.href=y,this.pathname=x[1],x[2]?(this.search=x[2],this.query=e?_.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var b=s.exec(y);if(b){var T=(b=b[0]).toLowerCase();this.protocol=T,y=y.substr(b.length)}if(n||b||y.match(/^\/\/[^@\/]+@[^@\/]+/)){var w="//"===y.substr(0,2);!w||b&&g[b]||(y=y.substr(2),this.slashes=!0)}if(!g[b]&&(w||b&&!v[b])){for(var S,E,M=-1,A=0;A<d.length;A++){-1!==(R=y.indexOf(d[A]))&&(-1===M||R<M)&&(M=R)}-1!==(E=-1===M?y.lastIndexOf("@"):y.lastIndexOf("@",M))&&(S=y.slice(0,E),y=y.slice(E+1),this.auth=decodeURIComponent(S)),M=-1;for(A=0;A<c.length;A++){var R;-1!==(R=y.indexOf(c[A]))&&(-1===M||R<M)&&(M=R)}-1===M&&(M=y.length),this.host=y.slice(0,M),y=y.slice(M),this.parseHost(),this.hostname=this.hostname||"";var P="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!P)for(var C=this.hostname.split(/\./),I=(A=0,C.length);A<I;A++){var O=C[A];if(O&&!O.match(p)){for(var L="",N=0,D=O.length;N<D;N++)O.charCodeAt(N)>127?L+="x":L+=O[N];if(!L.match(p)){var F=C.slice(0,A),B=C.slice(A+1),U=O.match(f);U&&(F.push(U[1]),B.unshift(U[2])),B.length&&(y="/"+B.join(".")+y),this.hostname=F.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=i.toASCII(this.hostname));var k=this.port?":"+this.port:"",G=this.hostname||"";this.host=G+k,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!m[T])for(A=0,I=h.length;A<I;A++){var H=h[A];if(-1!==y.indexOf(H)){var z=encodeURIComponent(H);z===H&&(z=escape(H)),y=y.split(H).join(z)}}var j=y.indexOf("#");-1!==j&&(this.hash=y.substr(j),y=y.slice(0,j));var V=y.indexOf("?");if(-1!==V?(this.search=y.substr(V),this.query=y.substr(V+1),e&&(this.query=_.parse(this.query)),y=y.slice(0,V)):e&&(this.search="",this.query={}),y&&(this.pathname=y),v[T]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){k=this.pathname||"";var W=this.search||"";this.path=k+W}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",i=this.hash||"",o=!1,s="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&r.isObject(this.query)&&Object.keys(this.query).length&&(s=_.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||v[e])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),i&&"#"!==i.charAt(0)&&(i="#"+i),a&&"?"!==a.charAt(0)&&(a="?"+a),e+o+(n=n.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(a=a.replace("#","%23"))+i},o.prototype.resolve=function(t){return this.resolveObject(y(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(r.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var n=new o,i=Object.keys(this),s=0;s<i.length;s++){var a=i[s];n[a]=this[a]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var l=Object.keys(t),u=0;u<l.length;u++){var h=l[u];"protocol"!==h&&(n[h]=t[h])}return v[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!v[t.protocol]){for(var c=Object.keys(t),d=0;d<c.length;d++){var p=c[d];n[p]=t[p]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||g[t.protocol])n.pathname=t.pathname;else{for(var f=(t.pathname||"").split("/");f.length&&!(t.host=f.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),n.pathname=f.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var m=n.pathname||"",_=n.search||"";n.path=m+_}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var y=n.pathname&&"/"===n.pathname.charAt(0),x=t.host||t.pathname&&"/"===t.pathname.charAt(0),b=x||y||n.host&&t.pathname,T=b,w=n.pathname&&n.pathname.split("/")||[],S=(f=t.pathname&&t.pathname.split("/")||[],n.protocol&&!v[n.protocol]);if(S&&(n.hostname="",n.port=null,n.host&&(""===w[0]?w[0]=n.host:w.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===f[0]?f[0]=t.host:f.unshift(t.host)),t.host=null),b=b&&(""===f[0]||""===w[0])),x)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,w=f;else if(f.length)w||(w=[]),w.pop(),w=w.concat(f),n.search=t.search,n.query=t.query;else if(!r.isNullOrUndefined(t.search)){if(S)n.hostname=n.host=w.shift(),(P=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=P.shift(),n.host=n.hostname=P.shift());return n.search=t.search,n.query=t.query,r.isNull(n.pathname)&&r.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var E=w.slice(-1)[0],M=(n.host||t.host||w.length>1)&&("."===E||".."===E)||""===E,A=0,R=w.length;R>=0;R--)"."===(E=w[R])?w.splice(R,1):".."===E?(w.splice(R,1),A++):A&&(w.splice(R,1),A--);if(!b&&!T)for(;A--;A)w.unshift("..");!b||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),M&&"/"!==w.join("/").substr(-1)&&w.push("");var P,C=""===w[0]||w[0]&&"/"===w[0].charAt(0);S&&(n.hostname=n.host=C?"":w.length?w.shift():"",(P=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=P.shift(),n.host=n.hostname=P.shift()));return(b=b||n.host&&w.length)&&!C&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),r.isNull(n.pathname)&&r.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){"use strict";var i=n(62);t.exports=function(t,e){e=e||{};var n=new i,r=e.inPlace||!1,o=t.map((function(t){return r?t:{width:t.width,height:t.height,item:t}}));o=o.sort((function(t,e){return e.width*e.height-t.width*t.height})),n.fit(o);var s={width:o.reduce((function(t,e){return Math.max(t,e.x+e.width)}),0),height:o.reduce((function(t,e){return Math.max(t,e.y+e.height)}),0)};return r||(s.items=o),s}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";var i=Object.prototype.hasOwnProperty,r="~";function o(){}function s(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function a(t,e,n,i,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new s(n,i||t,o),l=r?r+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],a]:t._events[l].push(a):(t._events[l]=a,t._eventsCount++),t}function l(t,e){0==--t._eventsCount?t._events=new o:delete t._events[e]}function u(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(r=!1)),u.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)i.call(t,e)&&n.push(r?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},u.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=new Array(o);i<o;i++)s[i]=n[i].fn;return s},u.prototype.listenerCount=function(t){var e=r?r+t:t,n=this._events[e];return n?n.fn?1:n.length:0},u.prototype.emit=function(t,e,n,i,o,s){var a=r?r+t:t;if(!this._events[a])return!1;var l,u,h=this._events[a],c=arguments.length;if(h.fn){switch(h.once&&this.removeListener(t,h.fn,void 0,!0),c){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,e),!0;case 3:return h.fn.call(h.context,e,n),!0;case 4:return h.fn.call(h.context,e,n,i),!0;case 5:return h.fn.call(h.context,e,n,i,o),!0;case 6:return h.fn.call(h.context,e,n,i,o,s),!0}for(u=1,l=new Array(c-1);u<c;u++)l[u-1]=arguments[u];h.fn.apply(h.context,l)}else{var d,p=h.length;for(u=0;u<p;u++)switch(h[u].once&&this.removeListener(t,h[u].fn,void 0,!0),c){case 1:h[u].fn.call(h[u].context);break;case 2:h[u].fn.call(h[u].context,e);break;case 3:h[u].fn.call(h[u].context,e,n);break;case 4:h[u].fn.call(h[u].context,e,n,i);break;default:if(!l)for(d=1,l=new Array(c-1);d<c;d++)l[d-1]=arguments[d];h[u].fn.apply(h[u].context,l)}}return!0},u.prototype.on=function(t,e,n){return a(this,t,e,n,!1)},u.prototype.once=function(t,e,n){return a(this,t,e,n,!0)},u.prototype.removeListener=function(t,e,n,i){var o=r?r+t:t;if(!this._events[o])return this;if(!e)return l(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||n&&s.context!==n||l(this,o);else{for(var a=0,u=[],h=s.length;a<h;a++)(s[a].fn!==e||i&&!s[a].once||n&&s[a].context!==n)&&u.push(s[a]);u.length?this._events[o]=1===u.length?u[0]:u:l(this,o)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&l(this,e)):(this._events=new o,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,t.exports=u},function(t,e,n){"use strict";function i(t,e,n){n=n||2;var i,a,l,u,h,p,f,g=e&&e.length,v=g?e[0]*n:t.length,_=r(t,0,v,n,!0),y=[];if(!_||_.next===_.prev)return y;if(g&&(_=function(t,e,n,i){var s,a,l,u,h,p=[];for(s=0,a=e.length;s<a;s++)l=e[s]*i,u=s<a-1?e[s+1]*i:t.length,(h=r(t,l,u,i,!1))===h.next&&(h.steiner=!0),p.push(m(h));for(p.sort(c),s=0;s<p.length;s++)n=o(n=d(p[s],n),n.next);return n}(t,e,_,n)),t.length>80*n){i=l=t[0],a=u=t[1];for(var x=n;x<v;x+=n)(h=t[x])<i&&(i=h),(p=t[x+1])<a&&(a=p),h>l&&(l=h),p>u&&(u=p);f=0!==(f=Math.max(l-i,u-a))?1/f:0}return s(_,y,n,i,a,f),y}function r(t,e,n,i,r){var o,s;if(r===R(t,e,n,i)>0)for(o=e;o<n;o+=i)s=E(o,t[o],t[o+1],s);else for(o=n-i;o>=e;o-=i)s=E(o,t[o],t[o+1],s);return s&&y(s,s.next)&&(M(s),s=s.next),s}function o(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!y(i,i.next)&&0!==_(i.prev,i,i.next))i=i.next;else{if(M(i),(i=e=i.prev)===i.next)break;n=!0}}while(n||i!==e);return e}function s(t,e,n,i,r,c,d){if(t){!d&&c&&function(t,e,n,i){var r=t;do{null===r.z&&(r.z=f(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,n,i,r,o,s,a,l,u=1;do{for(n=t,t=null,o=null,s=0;n;){for(s++,i=n,a=0,e=0;e<u&&(a++,i=i.nextZ);e++);for(l=u;a>0||l>0&&i;)0!==a&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,a--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,u*=2}while(s>1)}(r)}(t,i,r,c);for(var p,m,g=t;t.prev!==t.next;)if(p=t.prev,m=t.next,c?l(t,i,r,c):a(t))e.push(p.i/n),e.push(t.i/n),e.push(m.i/n),M(t),t=m.next,g=m.next;else if((t=m)===g){d?1===d?s(t=u(o(t),e,n),e,n,i,r,c,2):2===d&&h(t,e,n,i,r,c):s(o(t),e,n,i,r,c,1);break}}}function a(t){var e=t.prev,n=t,i=t.next;if(_(e,n,i)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(g(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&_(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function l(t,e,n,i){var r=t.prev,o=t,s=t.next;if(_(r,o,s)>=0)return!1;for(var a=r.x<o.x?r.x<s.x?r.x:s.x:o.x<s.x?o.x:s.x,l=r.y<o.y?r.y<s.y?r.y:s.y:o.y<s.y?o.y:s.y,u=r.x>o.x?r.x>s.x?r.x:s.x:o.x>s.x?o.x:s.x,h=r.y>o.y?r.y>s.y?r.y:s.y:o.y>s.y?o.y:s.y,c=f(a,l,e,n,i),d=f(u,h,e,n,i),p=t.prevZ,m=t.nextZ;p&&p.z>=c&&m&&m.z<=d;){if(p!==t.prev&&p!==t.next&&g(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&_(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,m!==t.prev&&m!==t.next&&g(r.x,r.y,o.x,o.y,s.x,s.y,m.x,m.y)&&_(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&_(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;m&&m.z<=d;){if(m!==t.prev&&m!==t.next&&g(r.x,r.y,o.x,o.y,s.x,s.y,m.x,m.y)&&_(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function u(t,e,n){var i=t;do{var r=i.prev,s=i.next.next;!y(r,s)&&x(r,i,i.next,s)&&w(r,s)&&w(s,r)&&(e.push(r.i/n),e.push(i.i/n),e.push(s.i/n),M(i),M(i.next),i=t=s),i=i.next}while(i!==t);return o(i)}function h(t,e,n,i,r,a){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&v(l,u)){var h=S(l,u);return l=o(l,l.next),h=o(h,h.next),s(l,e,n,i,r,a),void s(h,e,n,i,r,a)}u=u.next}l=l.next}while(l!==t)}function c(t,e){return t.x-e.x}function d(t,e){var n=function(t,e){var n,i=e,r=t.x,o=t.y,s=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var a=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=r&&a>s){if(s=a,a===r){if(o===i.y)return i;if(o===i.next.y)return i.next}n=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!n)return null;if(r===s)return n;var l,u=n,h=n.x,c=n.y,d=1/0;i=n;do{r>=i.x&&i.x>=h&&r!==i.x&&g(o<c?r:s,o,h,c,o<c?s:r,o,i.x,i.y)&&(l=Math.abs(o-i.y)/(r-i.x),w(i,t)&&(l<d||l===d&&(i.x>n.x||i.x===n.x&&p(n,i)))&&(n=i,d=l)),i=i.next}while(i!==u);return n}(t,e);if(!n)return e;var i=S(n,t),r=o(n,n.next);return o(i,i.next),e===n?r:e}function p(t,e){return _(t.prev,t,e.prev)<0&&_(e.next,t,t.next)<0}function f(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function m(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function g(t,e,n,i,r,o,s,a){return(r-s)*(e-a)-(t-s)*(o-a)>=0&&(t-s)*(i-a)-(n-s)*(e-a)>=0&&(n-s)*(o-a)-(r-s)*(i-a)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&x(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(w(t,e)&&w(e,t)&&function(t,e){var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)&&(_(t.prev,t,e.prev)||_(t,e.prev,e))||y(t,e)&&_(t.prev,t,t.next)>0&&_(e.prev,e,e.next)>0)}function _(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,n,i){var r=T(_(t,e,n)),o=T(_(t,e,i)),s=T(_(n,i,t)),a=T(_(n,i,e));return r!==o&&s!==a||(!(0!==r||!b(t,n,e))||(!(0!==o||!b(t,i,e))||(!(0!==s||!b(n,t,i))||!(0!==a||!b(n,e,i)))))}function b(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function T(t){return t>0?1:t<0?-1:0}function w(t,e){return _(t.prev,t,t.next)<0?_(t,e,t.next)>=0&&_(t,t.prev,e)>=0:_(t,e,t.prev)<0||_(t,t.next,e)<0}function S(t,e){var n=new A(t.i,t.x,t.y),i=new A(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function E(t,e,n,i){var r=new A(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function M(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function R(t,e,n,i){for(var r=0,o=e,s=n-i;o<n;o+=i)r+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return r}t.exports=i,t.exports.default=i,i.deviation=function(t,e,n,i){var r=e&&e.length,o=r?e[0]*n:t.length,s=Math.abs(R(t,0,o,n));if(r)for(var a=0,l=e.length;a<l;a++){var u=e[a]*n,h=a<l-1?e[a+1]*n:t.length;s-=Math.abs(R(t,u,h,n))}var c=0;for(a=0;a<i.length;a+=3){var d=i[a]*n,p=i[a+1]*n,f=i[a+2]*n;c+=Math.abs((t[d]-t[f])*(t[p+1]-t[d+1])-(t[d]-t[p])*(t[f+1]-t[d+1]))}return 0===s&&0===c?0:Math.abs((c-s)/s)},i.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},i=0,r=0;r<t.length;r++){for(var o=0;o<t[r].length;o++)for(var s=0;s<e;s++)n.vertices.push(t[r][o][s]);r>0&&(i+=t[r-1].length,n.holes.push(i))}return n}},function(t,e){t.exports="varying vec2 vUv;\nvoid main() {\n\tvUv = uv;\n\tgl_Position = (projectionMatrix * modelViewMatrix) * vec4(position, 1.0);\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform float lines[26];\nvarying vec2 vUv;\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tfloat middleAlpha = 0.0;\n\tfloat endAlpha = 0.0;\n\tfloat headLength = 0.0;\n\tif (timePercent < 0.5) {\n\t\tmiddleAlpha = 1.0;\n\t\tendAlpha = 1.0 - (timePercent / 0.5);\n\t}\n\telse {\n\t\tmiddleAlpha = 1.0 - ((timePercent - 0.5) / 0.5);\n\t\tendAlpha = 0.0;\n\t}\n\tfor (int i = 0; i < 26; i++) {\n\t\tfloat halfDis = lines[i] / 2.0;\n\t\tfloat middleX = headLength + halfDis;\n\t\theadLength += lines[i];\n\t\tif (abs(vUv.x - middleX) <= halfDis) {\n\t\t\tsrcColor.a = endAlpha + (((halfDis - abs(vUv.x - middleX)) / halfDis) * (middleAlpha - endAlpha));\n\t\t\tgl_FragColor = blendSrcOver(srcColor, distColor);\n\t\t\treturn ;\n\t\t}\n\t}\n\tgl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nuniform float width;\nuniform float height;\nvarying vec2 vUv;\nvec2 transform(vec2 uv) {\n\tuv.y = (uv.y * height) / width;\n\treturn uv - vec2(0.5, (0.5 * height) / width);\n}\nvoid main() {\n\tfloat maxR;\n\tfloat ringR;\n\tfloat radiusMin;\n\tfloat radiusMax;\n\tfloat dist;\n\tvec2 uv = vec2(vUv.x, vUv.y);\n\tmaxR = length(transform(vec2(1.0, 1.0)));\n\tringR = 1.0 / 6.0;\n\tradiusMin = timePercent * maxR;\n\tradiusMax = radiusMin + ringR;\n\tdist = length(transform(uv));\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tif (dist < radiusMin) {\n\t\tsrcColor.a = 0.0;\n\t}\n\telse if ((dist >= radiusMin) && (dist <= radiusMax)) {\n\t\tsrcColor.a = (dist - radiusMin) / ringR;\n\t}\n\telse {\n\t\tsrcColor.a = 1.0;\n\t}\n\tif (timePercent >= 1.0) {\n\t\tsrcColor.a = 0.0;\n\t}\n\telse if (timePercent == 0.0) {\n\t\tsrcColor.a = 1.0;\n\t}\n\tgl_FragColor = blendSrcOver(srcColor, distColor);\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nuniform float width;\nuniform float height;\nvarying vec2 vUv;\nvec2 transform(vec2 uv) {\n\tuv.y = (uv.y * height) / width;\n\treturn uv - vec2(0.5, (0.5 * height) / width);\n}\nvec2 offset(float progress[4], float band, float amp, float radius) {\n\tvec2 tc = vUv.xy;\n\tvec2 uv = vec2(0.0, 0.0);\n\tvec2 p;\n\tfloat len;\n\tvec2 uv_offset;\n\tfloat wave_width = band * radius;\n\tfor (int i = 0; i < 4; i += 1) {\n\t\tif (progress[i] == -1.0) {\n\t\t\tcontinue;\n\t\t}\n\t\tp = tc - vec2(0.5, 0.5);\n\t\tp.x = (p.x * width) / height;\n\t\tlen = length(p);\n\t\tfloat current_progress = progress[i];\n\t\tfloat current_radius = radius * current_progress;\n\t\tfloat damp_factor = 1.0;\n\t\tif (current_progress > .5) {\n\t\t\tdamp_factor = (1.0 - current_progress) * 2.0;\n\t\t}\n\t\tfloat cut_factor = clamp((wave_width * damp_factor) - abs(current_radius - len), 0.0, 1.0);\n\t\tfloat waves_factor = (4.0 * len) / radius;\n\t\tuv_offset = (((p / len) * cos((waves_factor - (current_progress * 10.0)) * 3.14)) * amp) * cut_factor;\n\t\tuv += uv_offset;\n\t}\n\treturn uv;\n}\nvoid main() {\n\tfloat maxR;\n\tfloat ringR;\n\tfloat radiusMin;\n\tfloat radiusMax;\n\tfloat dist;\n\tfloat progress[4];\n\tvec2 uv = vUv.xy;\n\tvec2 uvOffset = vec2(0.0, 0.0);\n\tmaxR = length(transform(vec2(1.0, 1.0)));\n\tringR = 1.0 / 6.0;\n\tradiusMin = timePercent * maxR;\n\tradiusMax = radiusMin + ringR;\n\tdist = length(transform(uv));\n\tfor (int i = 0; i < 4; i++) {\n\t\tprogress[i] = timePercent + (0.1 * float(i));\n\t\tif (progress[i] < 0.0) {\n\t\t\tprogress[i] = 0.0;\n\t\t}\n\t}\n\tuvOffset = offset(progress, 0.2, 0.3, 1.0);\n\tvec4 srcColor = texture2D(texturePrev, fract(vUv + uvOffset));\n\tvec4 distColor = texture2D(textureNext, fract(vUv + uvOffset));\n\tif (dist < radiusMin) {\n\t\tsrcColor.a = 0.0;\n\t}\n\telse if ((dist >= radiusMin) && (dist <= radiusMax)) {\n\t\tsrcColor.a = (dist - radiusMin) / ringR;\n\t}\n\telse {\n\t\tsrcColor.a = 1.0;\n\t}\n\tif (timePercent >= 1.0) {\n\t\tsrcColor.a = 0.0;\n\t}\n\telse if (timePercent == 0.0) {\n\t\tsrcColor.a = 1.0;\n\t}\n\tgl_FragColor = blendSrcOver(srcColor, distColor);\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tfloat alphaStart = timePercent > 0.5 ? ((timePercent - 0.5) / 0.5) * 1.0 : 1.0;\n\tfloat alphaEnd = timePercent < 0.5 ? ((0.5 - timePercent) / 0.5) * 1.0 : 0.0;\n\tfloat rectStart = 0.5 * (1.0 - timePercent);\n\tfloat rectEnd = rectStart + 0.5;\n\tif (timePercent <= 0.33) {\n\t\talphaStart = 1.0;\n\t\talphaEnd = (1.0 - (timePercent / 0.33)) * 1.0;\n\t\trectStart = 0.5;\n\t\trectEnd = 1.0;\n\t}\n\telse if ((timePercent > 0.33) && (timePercent <= 0.66)) {\n\t\talphaStart = 1.0;\n\t\talphaEnd = 0.0;\n\t\trectEnd = 1.0 - (((timePercent - 0.33) / 0.33) * 0.5);\n\t\trectStart = rectEnd - 0.5;\n\t}\n\telse {\n\t\talphaStart = ((1.0 - timePercent) / (1.0 - 0.66)) * 1.0;\n\t\talphaEnd = 0.0;\n\t\trectStart = 0.0;\n\t\trectEnd = 0.5;\n\t}\n\tif (vUv.x >= rectEnd) {\n\t\tsrcColor.a = 0.0;\n\t}\n\telse if (vUv.x <= rectStart) {\n\t\tsrcColor.a = 1.0;\n\t}\n\telse {\n\t\tsrcColor.a = alphaStart - (((vUv.x - rectStart) / 0.5) * (alphaStart - alphaEnd));\n\t}\n\tgl_FragColor = blendSrcOver(srcColor, distColor);\n}\n"},function(t,e){t.exports="uniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform sampler2D dissolveTexture;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tvec4 dissolveColor = texture2D(dissolveTexture, vUv);\n\tif (dissolveColor.r == 0.0) {\n\t\tresult = srcColor;\n\t}\n\telse {\n\t\tresult = distColor;\n\t}\n\tgl_FragColor = result;\n}\n"},function(t,e){t.exports="uniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tif (timePercent < 0.5) {\n\t\tfloat stagePercent = timePercent / 0.5;\n\t\tresult = srcColor + (stagePercent * (1.0 - srcColor));\n\t}\n\telse {\n\t\tfloat stagePercent = (timePercent - 0.5) / 0.5;\n\t\tresult = 1.0 - (stagePercent * (1.0 - distColor));\n\t}\n\tgl_FragColor = result;\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tsrcColor.a = 1.0 - timePercent;\n\tgl_FragColor = blendSrcOver(srcColor, distColor);\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tfloat line = interpolationFloat(0.0, 1.0, 0.0, 1.0, timePercent, 3);\n\tif (vUv.y > line) {\n\t\tvec2 uv = vUv.xy;\n\t\tuv.y -= line;\n\t\tresult = texture2D(texturePrev, uv);\n\t}\n\telse {\n\t\tvec2 uv = vUv.xy;\n\t\tuv.y += (1.0 - line);\n\t\tresult = texture2D(textureNext, uv);\n\t}\n\tgl_FragColor = result;\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tvec2 rectLeft = vec2(0.25, 0.5);\n\tvec2 rectRight = vec2(0.5, 0.75);\n\tvec2 alphaLeft = vec2(1.0, 1.0);\n\tvec2 alphaRight = vec2(1.0, 1.0);\n\tif (timePercent <= 0.333) {\n\t\talphaLeft.y = 1.0 - (timePercent / 0.333);\n\t\talphaRight.x = 1.0 - (timePercent / 0.333);\n\t}\n\telse if ((timePercent <= 0.666) && (timePercent > 0.333)) {\n\t\trectLeft.x -= (((timePercent - 0.333) / 0.333) * 0.25);\n\t\trectLeft.y = rectLeft.x + 0.25;\n\t\trectRight.y += (((timePercent - 0.333) / 0.333) * 0.25);\n\t\trectRight.x = rectRight.y - 0.25;\n\t\talphaLeft.y = 0.0;\n\t\talphaRight.x = 0.0;\n\t}\n\telse {\n\t\trectLeft = vec2(0.0, 0.25);\n\t\trectRight = vec2(0.75, 1.0);\n\t\talphaLeft.y = 0.0;\n\t\talphaRight.x = 0.0;\n\t\talphaLeft.x = 1.0 - ((timePercent - 0.666) / (1.0 - 0.666));\n\t\talphaRight.y = 1.0 - ((timePercent - 0.666) / (1.0 - 0.666));\n\t}\n\tif ((vUv.x < rectLeft.x) || (vUv.x > rectRight.y)) {\n\t\tsrcColor.a = 1.0;\n\t}\n\telse if ((vUv.x > rectLeft.y) && (vUv.x < rectRight.x)) {\n\t\tsrcColor.a = 0.0;\n\t}\n\telse {\n\t\tif ((vUv.x >= rectLeft.x) && (vUv.x <= rectLeft.y)) {\n\t\t\tsrcColor.a = alphaLeft.x - (((vUv.x - rectLeft.x) / (rectLeft.y - rectLeft.x)) * (alphaLeft.x - alphaLeft.y));\n\t\t}\n\t\telse {\n\t\t\tsrcColor.a = alphaRight.y - (((rectRight.y - vUv.x) / (rectLeft.y - rectLeft.x)) * (alphaRight.y - alphaRight.x));\n\t\t}\n\t}\n\tgl_FragColor = blendSrcOver(srcColor, distColor);\n}\n"},function(t,e){t.exports="uniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 uv4 = vec4(vUv.x, vUv.y, 1.0, 1.0);\n\tfloat scale = 1.0;\n\tfloat transform = 0.0;\n\tif (timePercent < 0.5) {\n\t\tscale = 1.0 - ((timePercent / 0.5) * 0.05);\n\t\ttransform = (1.0 - scale) * 0.5;\n\t}\n\telse {\n\t\tscale = 0.95 + (((timePercent - 0.5) / 0.5) * 0.05);\n\t\ttransform = (1.0 - scale) * 0.5;\n\t}\n\tmat4 matrix = mat4(scale, 0.0, 0.0, 0.0, 0.0, scale, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, transform, transform, 0.0, 1.0);\n\tvec4 uv = matrix * uv4;\n\tvec4 srcColor = texture2D(texturePrev, uv.xy);\n\tvec4 distColor = texture2D(textureNext, uv.xy);\n\tvec4 result = timePercent < 0.5 ? srcColor : distColor;\n\tvec3 start;\n\tvec3 end;\n\tvec3 white = vec3(1.0, 1.0, 1.0);\n\tif ((timePercent < 0.25) || (timePercent > 0.75)) {\n\t\tresult *= 1.0;\n\t}\n\telse if ((timePercent >= 0.25) && (timePercent <= 0.5)) {\n\t\tif (timePercent <= 0.375) {\n\t\t\tstart = result.rgb;\n\t\t\tend = start + (((timePercent - 0.25) / 0.125) * (white - result.rgb));\n\t\t}\n\t\telse {\n\t\t\tstart = result.rgb + (((timePercent - 0.375) / 0.125) * (white - result.rgb));\n\t\t\tend = white;\n\t\t}\n\t\tresult = vec4(start - (vUv.x * (start - end)), result.a);\n\t}\n\telse if ((timePercent > 0.5) && (timePercent <= 0.75)) {\n\t\tif (timePercent < 0.625) {\n\t\t\tstart = white - (((timePercent - 0.5) / 0.125) * (white - result.rgb));\n\t\t\tend = white;\n\t\t}\n\t\telse {\n\t\t\tstart = result.rgb;\n\t\t\tend = white - (((timePercent - 0.625) / 0.125) * (white - result.rgb));\n\t\t}\n\t\tresult = vec4(start - (vUv.x * (start - end)), result.a);\n\t}\n\tgl_FragColor = result;\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tfloat line = interpolationFloat(1.0, 0.0, 0.0, 1.0, timePercent, 1);\n\tif (vUv.x > line) {\n\t\tresult = texture2D(textureNext, vUv);\n\t}\n\telse {\n\t\tvec2 uv = vUv.xy;\n\t\tuv.x = 1.0 - (line - vUv.x);\n\t\tresult = texture2D(texturePrev, uv);\n\t}\n\tgl_FragColor = result;\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tfloat line = interpolationFloat(1.0, 0.0, 0.0, 1.0, timePercent, 3);\n\tif (vUv.x > line) {\n\t\tvec2 uv = vUv.xy;\n\t\tuv.x = vUv.x - line;\n\t\tresult = texture2D(textureNext, uv);\n\t}\n\telse {\n\t\tresult = texture2D(texturePrev, vUv);\n\t}\n\tgl_FragColor = result;\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nmat3 yuv2rgb = mat3(1.0, 0.0, 1.13983, 1.0, -0.39465, -0.58060, 1.0, 2.03211, 0.0);\nmat3 rgb2yuv = mat3(0.2126, 0.7152, 0.0722, -0.09991, -0.33609, 0.43600, 0.615, -0.5586, -0.05639);\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tvec3 result;\n\tfloat resultAlpha;\n\tif (timePercent < 0.5) {\n\t\tresult = srcColor.rgb * rgb2yuv;\n\t\tresult.r += interpolationFloat(0.0, 1.0, 0.0, 0.5, timePercent, 0);\n\t\tresultAlpha = srcColor.a;\n\t}\n\telse {\n\t\tresult = distColor.rgb * rgb2yuv;\n\t\tresult.r += interpolationFloat(1.0, 0.0, 0.5, 1.0, timePercent, 0);\n\t\tresultAlpha = distColor.a;\n\t}\n\tresult *= yuv2rgb;\n\tgl_FragColor = vec4(result.rgb, resultAlpha);\n}\n"},function(t,e){t.exports="uniform float horizontalSegments;\nuniform float verticalSegments;\nuniform float timePercent;\nuniform float segmentWidth;\nuniform float segmentHeight;\nattribute vec2 segment;\nattribute float times;\nvarying vec2 vUv;\nvarying float fakePercent;\nvoid main() {\n\tvUv = uv;\n\tfloat width = segmentWidth * horizontalSegments;\n\tfloat height = segmentHeight * verticalSegments;\n\tvec4 newPosition = vec4(position, 1.0);\n\tvec2 segmentOrigin = vec2(((segment.x + 0.5) * segmentWidth) - (width * 0.5), (height * 0.5) - ((1.0 * (segment.y + 0.5)) * segmentHeight));\n\tif (timePercent > times) {\n\t\tfloat percent = (timePercent - times) / 0.7;\n\t\tif (percent > 1.0) {\n\t\t\tpercent = 1.0;\n\t\t}\n\t\tif (percent > 0.5) {\n\t\t\tpercent += 1.0;\n\t\t}\n\t\tmat4 matrix = mat4(cos((-1.0 * percent) * 3.14), 0.0, sin((-1.0 * percent) * 3.14), 0.0, 0.0, 1.0, 0.0, 0.0, -sin((-1.0 * percent) * 3.14), 0.0, cos((-1.0 * percent) * 3.14), 0.0, 0.0, 0.0, 0.0, 1.0);\n\t\tnewPosition.x -= segmentOrigin.x;\n\t\tnewPosition.y -= segmentOrigin.y;\n\t\tnewPosition = matrix * newPosition;\n\t\tnewPosition.x += segmentOrigin.x;\n\t\tnewPosition.y += segmentOrigin.y;\n\t\tif (segment.x < (horizontalSegments / 2.0)) {\n\t\t\tfakePercent = percent - (abs((horizontalSegments / 2.0) - segment.x) * (0.25 / horizontalSegments));\n\t\t}\n\t\telse {\n\t\t\tfakePercent = percent + (abs((horizontalSegments / 2.0) - segment.x) * (0.25 / horizontalSegments));\n\t\t}\n\t}\n\tif ((timePercent < 0.0001) || (timePercent > 0.9999)) {\n\t\tgl_Position = (projectionMatrix * modelViewMatrix) * vec4(position, 1.0);\n\t\treturn ;\n\t}\n\tgl_Position = (projectionMatrix * modelViewMatrix) * newPosition;\n}\n"},function(t,e){t.exports="uniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvarying float fakePercent;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tvec4 color = srcColor;\n\tif (fakePercent > 0.5) {\n\t\tcolor = distColor;\n\t}\n\tif ((fakePercent < 0.5) && (fakePercent > 0.35)) {\n\t\tcolor.a = 0.5;\n\t}\n\tgl_FragColor = color;\n}\n"},function(t,e){t.exports="#define PI 3.14159265\nuniform float horizontalSegments;\nuniform float verticalSegments;\nuniform float timePercent;\nuniform float segmentWidth;\nuniform float segmentHeight;\nuniform float duration;\nattribute vec2 segment;\nattribute float times;\nvarying vec2 vUv;\nmat4 rotateY(float angle) {\n\treturn mat4(cos(angle), 0.0, sin(angle), 0.0, 0.0, 1.0, 0.0, 0.0, -sin(angle), 0.0, cos(angle), 0.0, 0.0, 0.0, 0.0, 1.0);\n}\nvoid main() {\n\tvUv = uv;\n\tfloat width = segmentWidth * horizontalSegments;\n\tfloat height = segmentHeight * verticalSegments;\n\tmat4 matrix;\n\tfloat stagePercent;\n\tvec4 newPosition = vec4(position, 1.0);\n\tfloat selfTimePercent = (timePercent - times) / (4.0 / 5.0);\n\tif (selfTimePercent < 0.0) {\n\t\tselfTimePercent = 0.0;\n\t}\n\telse if (selfTimePercent > 1.0) {\n\t\tselfTimePercent = 1.0;\n\t}\n\tif (selfTimePercent < (2.0 / 5.0)) {\n\t\tstagePercent = selfTimePercent / (2.0 / 5.0);\n\t\tnewPosition.x -= (0.5 * width);\n\t\tmatrix = rotateY(((-1.0 * stagePercent) * PI) * 0.5);\n\t\tnewPosition = matrix * newPosition;\n\t\tnewPosition.x += (0.5 * width);\n\t}\n\telse if ((selfTimePercent >= (2.0 / 5.0)) && (selfTimePercent < (3.0 / 5.0))) {\n\t\tstagePercent = (selfTimePercent - (2.0 / 5.0)) / (1.0 / 5.0);\n\t\tnewPosition.x -= (0.5 * width);\n\t\tnewPosition = rotateY((-1.0 * PI) * 0.5) * newPosition;\n\t\tmatrix = rotateY(((-1.0 * stagePercent) * PI) * 2.0);\n\t\tnewPosition = matrix * newPosition;\n\t\tnewPosition.x += (0.5 * width);\n\t\tnewPosition.x -= (width * stagePercent);\n\t}\n\telse {\n\t\tfloat offset = (((newPosition.x + (0.5 * width)) / width) * 2.0) / 5.0;\n\t\tstagePercent = (selfTimePercent - (1.0 / 5.0)) / ((2.0 / 5.0) + offset);\n\t\tif (stagePercent > 1.0) {\n\t\t\tstagePercent = 1.0;\n\t\t}\n\t\tvec4 vvUvv = vec4(vUv.x - 0.5, vUv.y - 0.5, 0.0, 1.0);\n\t\tvvUvv = rotateY(-1.0 * PI) * vvUvv;\n\t\tvUv = vvUvv.xy + 0.5;\n\t\tnewPosition.x -= (0.5 * width);\n\t\tmatrix = rotateY((((-1.0 * stagePercent) * PI) * 0.5) - (PI * 2.5));\n\t\tnewPosition = matrix * newPosition;\n\t\tnewPosition.x += (0.5 * width);\n\t\tnewPosition.x -= width;\n\t}\n\tif ((timePercent < 0.0001) || (timePercent > 0.9999)) {\n\t\tvUv = uv;\n\t\tgl_Position = (projectionMatrix * modelViewMatrix) * vec4(position, 1.0);\n\t\treturn ;\n\t}\n\tgl_Position = (projectionMatrix * modelViewMatrix) * newPosition;\n}\n"},function(t,e){t.exports="uniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tvec4 color = srcColor;\n\tif (timePercent > 0.5) {\n\t\tcolor = distColor;\n\t}\n\tif (timePercent < 0.0001) {\n\t\tcolor = srcColor;\n\t}\n\telse if (timePercent > 0.9999) {\n\t\tcolor = distColor;\n\t}\n\tgl_FragColor = color;\n}\n"},function(t,e){t.exports="#define PI 3.14159265\nattribute float index;\nattribute float type;\nattribute float delay;\nuniform float timePercent;\nuniform float segmentWidth;\nuniform float segments;\nvarying vec2 vUv;\nvarying float vType;\nvarying float rotatePercent;\nmat4 rotateY(float angle) {\n\treturn mat4(cos(angle), 0.0, sin(angle), 0.0, 0.0, 1.0, 0.0, 0.0, -sin(angle), 0.0, cos(angle), 0.0, 0.0, 0.0, 0.0, 1.0);\n}\nvoid main() {\n\tvUv = uv;\n\tvType = type;\n\tvec4 newPosition = vec4(position, 1.0);\n\tfloat selfPercent = (timePercent - delay) / 0.7;\n\trotatePercent = selfPercent;\n\tif (selfPercent < 0.0) {\n\t\tselfPercent = 0.0;\n\t}\n\telse if (selfPercent > 1.0) {\n\t\tselfPercent = 1.0;\n\t}\n\tfloat offsetX = ((segments * segmentWidth) * 0.5) - ((index + 0.5) * segmentWidth);\n\tfloat offsetZ = segmentWidth * 0.5;\n\tnewPosition.x += offsetX;\n\tnewPosition.z += offsetZ;\n\tnewPosition.x *= (0.9 + ((abs(timePercent - 0.5) / 0.5) * 0.1));\n\tnewPosition.z *= (0.9 + ((abs(timePercent - 0.5) / 0.5) * 0.1));\n\tnewPosition = rotateY((PI * 0.5) * selfPercent) * newPosition;\n\tnewPosition.x -= offsetX;\n\tnewPosition.z -= offsetZ;\n\tgl_Position = (projectionMatrix * modelViewMatrix) * newPosition;\n}\n"},function(t,e){t.exports="uniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvarying float vType;\nvarying float rotatePercent;\nmat3 yuv2rgb = mat3(1.0, 0.0, 1.13983, 1.0, -0.39465, -0.58060, 1.0, 2.03211, 0.0);\nmat3 rgb2yuv = mat3(0.2126, 0.7152, 0.0722, -0.09991, -0.33609, 0.43600, 0.615, -0.5586, -0.05639);\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tvec3 srcYuv;\n\tvec3 distYuv;\n\tif (rotatePercent < 0.5) {\n\t\tdistYuv = distColor.rgb * rgb2yuv;\n\t\tdistYuv.r *= (1.0 - (abs(rotatePercent - 0.5) / 0.5));\n\t\tdistColor = vec4(distYuv * yuv2rgb, distColor.a);\n\t}\n\telse {\n\t\tsrcYuv = distColor.rgb * rgb2yuv;\n\t\tsrcYuv.r *= (abs(rotatePercent - 0.5) / 0.5);\n\t\tsrcColor = vec4(srcYuv * yuv2rgb, srcColor.a);\n\t}\n\tvec4 color = vType < 0.5 ? srcColor : distColor;\n\tgl_FragColor = color;\n}\n"},function(t,e){t.exports="float easeInFloat(float t, float b, float c, float d) {\n\tt = t / d;\n\treturn ((c * t) * t) + b;\n}\nfloat interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\n#define PI 3.141592653\nuniform float horizontalSegments;\nuniform float verticalSegments;\nuniform float timePercent;\nuniform float segmentWidth;\nuniform float segmentHeight;\nattribute float isLeft;\nvarying vec2 vUv;\nvarying vec4 shadow;\nvoid main() {\n\tvUv = uv;\n\tfloat scaleX;\n\tfloat transform;\n\tfloat displacement;\n\tvec4 newPosition = vec4(position, 1.0);\n\tvec4 glPosition = (projectionMatrix * modelViewMatrix) * newPosition;\n\tfloat crestCount = 24.0;\n\tfloat width = horizontalSegments * segmentWidth;\n\tfloat height = verticalSegments * segmentHeight;\n\tfloat heightFactor = (newPosition.y + (height * 0.5)) / height;\n\tfloat scaleY = interpolationFloat(1.0, 1.05, 0.0, 0.11, timePercent, 0);\n\tnewPosition.y += (height * 0.5);\n\tnewPosition.y *= scaleY;\n\tnewPosition.y -= (height * 0.5);\n\tnewPosition.y += 10.0;\n\tif ((timePercent > 0.0) && (timePercent < 0.333)) {\n\t\tfloat delay = (1.0 - heightFactor) * 0.1;\n\t\tscaleX = interpolationFloat(1.0, 0.5, 0.0 + delay, 0.333, timePercent, 1);\n\t}\n\telse if ((timePercent >= 0.333) && (timePercent < 0.5)) {\n\t\tfloat scaleTop = 0.5;\n\t\tfloat scaleBottom = interpolationFloat(0.5, 0.25, 0.333, 0.5, timePercent, 2);\n\t\tfloat incr = easeInFloat(1.0 - heightFactor, 0.0, abs(scaleBottom - scaleTop), 1.0);\n\t\tscaleX = scaleTop - incr;\n\t}\n\telse if ((timePercent >= 0.5) && (timePercent < 0.583)) {\n\t\tfloat scaleTop = 0.5;\n\t\tfloat scaleBottom = interpolationFloat(0.25, 0.5, 0.5, 0.583, timePercent, 1);\n\t\tfloat incr = easeInFloat(1.0 - heightFactor, 0.0, abs(scaleBottom - scaleTop), 1.0);\n\t\tscaleX = scaleTop - incr;\n\t}\n\telse if (timePercent >= 0.583) {\n\t\tfloat scaleTop = 0.5;\n\t\tfloat scaleBottom = interpolationFloat(0.5, 0.75, 0.583, 0.666, timePercent, 2);\n\t\tfloat incr = easeInFloat(1.0 - heightFactor, 0.0, abs(scaleBottom - scaleTop), 1.0);\n\t\tscaleX = scaleTop + incr;\n\t}\n\tif (timePercent > 0.583) {\n\t\tdisplacement = (isLeft < 0.5 ? 1.0 : -1.0) * interpolationFloat(0.0, width / 2.0, 0.583, 1.0, timePercent, 0);\n\t}\n\tfloat ampTop = interpolationFloat(0.0, 1.0, 0.0, 0.11, timePercent, 0);\n\tfloat ampBottom = interpolationFloat(0.0, 1.0, 0.11, 0.22, timePercent, 0);\n\tfloat amp = ampBottom + (heightFactor * abs(ampBottom - ampTop));\n\tfloat foo = newPosition.x * ((crestCount * PI) / width);\n\tnewPosition.z = (amp * cos(foo + (PI / 2.0))) * 20.0;\n\ttransform = (isLeft < 0.5 ? -1.0 : 1.0) * (width * 0.5);\n\tnewPosition.x += transform;\n\tnewPosition.x *= scaleX;\n\tnewPosition.x -= transform;\n\tnewPosition.x += displacement;\n\tshadow = vec4(0.0, 0.0, 0.0, 0.0);\n\tif (newPosition.z < 15.0) {\n\t\tfloat alpha = 0.3 * (1.0 - ((newPosition.z + 20.0) / 35.0));\n\t\tshadow.a = alpha * amp;\n\t}\n\tgl_Position = (projectionMatrix * modelViewMatrix) * newPosition;\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvarying vec4 shadow;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tvec4 color = blendSrcOver(shadow, srcColor);\n\tgl_FragColor = color;\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\n#define PI 3.14159265\nuniform float timePercent;\nuniform float aCoefficient;\nuniform float zCurveLimit;\nuniform float horizontalSegments;\nuniform float verticalSegments;\nuniform float segmentWidth;\nuniform float segmentHeight;\nvarying vec2 vUv;\nvoid main() {\n\tfloat halfWidth = (segmentWidth * horizontalSegments) * 0.5;\n\tfloat halfHeight = (segmentHeight * verticalSegments) * 0.5;\n\tvUv = uv;\n\tvec4 newPosition = vec4(position, 1.0);\n\tfloat curve;\n\tfloat aStart = interpolationFloat(0.00000009, aCoefficient, 0.0, 0.5, timePercent, 0);\n\tfloat aEnd = 0.0000009;\n\tfloat zStart = interpolationFloat(0.0, zCurveLimit, 0.0, 0.5, timePercent, 0);\n\tfloat zEnd = 0.0;\n\tfloat a = interpolationFloat(aStart, aEnd, 0.0, halfWidth * 2.0, newPosition.x + halfWidth, 0);\n\tfloat z = interpolationFloat(zStart, zEnd, 0.0, halfWidth * 2.0, newPosition.x + halfWidth, 0);\n\tnewPosition.z -= (((-a * newPosition.y) * newPosition.y) + z);\n\tfloat scaleYStart = interpolationFloat(1.0, 0.8, 0.0, 0.5, timePercent, 0);\n\tfloat scaleYEnd = 1.0;\n\tfloat scaleY = interpolationFloat(scaleYStart, scaleYEnd, 0.0, halfWidth * 2.0, newPosition.x + halfWidth, 0);\n\tnewPosition.y += halfHeight;\n\tnewPosition.y *= scaleY;\n\tfloat angle = interpolationFloat(0.0, -((2.0 * PI) / 3.0), 0.111, 1.0, timePercent, 1);\n\tmat4 rotateX = mat4(1.0, 0.0, 0.0, 0.0, 0.0, cos(angle), sin(angle), 0.0, 0.0, -sin(angle), cos(angle), 0.0, 0.0, 0.0, 0.0, 1.0);\n\tnewPosition = rotateX * newPosition;\n\tnewPosition.y -= halfHeight;\n\tgl_Position = (projectionMatrix * modelViewMatrix) * newPosition;\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\nvec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tfloat alpha = interpolationFloat(0.0, 0.6, 0.5, 1.0, timePercent, 0);\n\tvec4 shadow = vec4(0.0, 0.0, 0.0, alpha);\n\tgl_FragColor = blendSrcOver(shadow, srcColor);\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\n#define PI 3.14159265358\nuniform float timePercent;\nuniform float horizontalSegments;\nuniform float verticalSegments;\nuniform float segmentWidth;\nuniform float segmentHeight;\nvarying vec2 vUv;\nvarying float shadowAlpha;\nmat2 rotateOrigin(float angle) {\n\treturn mat2(cos(angle), sin(angle), -sin(angle), cos(angle));\n}\nvoid main() {\n\tfloat halfWidth = (segmentWidth * horizontalSegments) * 0.5;\n\tfloat halfHeight = (segmentHeight * verticalSegments) * 0.5;\n\tvUv = uv;\n\tvec2 shadowPosition = vec2(position.xy);\n\tfloat rotateAngle = PI * 0.27;\n\tfloat min_r = halfWidth * 0.05;\n\tshadowPosition = rotateOrigin(rotateAngle) * shadowPosition;\n\tvec4 newPosition = vec4(shadowPosition.xy, position.z, 1.0);\n\tfloat line = interpolationFloat(0.0, halfWidth * 2.8, 0.0, 1.0, timePercent, 1);\n\tfloat dis2BaseLine = halfWidth - newPosition.x;\n\tfloat dis2Line = line - dis2BaseLine;\n\tfloat L = line <= (halfWidth * 2.0) ? line : halfWidth * 2.0;\n\tfloat r = L / PI;\n\tr = r < min_r ? min_r : r;\n\tfloat angle = dis2Line / r;\n\tif (((dis2Line > 0.0) && (dis2Line < (line * 0.5))) && (r > min_r)) {\n\t\tshadowAlpha = interpolationFloat(0.0, 0.3, 0.0, line * 0.5, dis2Line, 0);\n\t}\n\telse {\n\t\tshadowAlpha = 0.0;\n\t}\n\tif (dis2BaseLine < line) {\n\t\tnewPosition.x = ((sin(angle) * r) + halfWidth) - line;\n\t\tnewPosition.z = (r - (cos(angle) * r)) * 0.5;\n\t}\n\tvec2 finalPosition = vec2(newPosition.xy);\n\tfinalPosition = rotateOrigin(-rotateAngle) * finalPosition;\n\tgl_Position = (projectionMatrix * modelViewMatrix) * vec4(finalPosition.xy, newPosition.z, 1.0);\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvarying float shadowAlpha;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tvec4 shadow = vec4(0.0, 0.0, 0.0, shadowAlpha);\n\tgl_FragColor = blendSrcOver(shadow, srcColor);\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\n#define PI 3.14159265358\nuniform float timePercent;\nuniform float horizontalSegments;\nuniform float verticalSegments;\nuniform float segmentWidth;\nuniform float segmentHeight;\nvarying vec2 vUv;\nmat4 rotateX(float angle) {\n\treturn mat4(1.0, 0.0, 0.0, 0.0, 0.0, cos(angle), sin(angle), 0.0, 0.0, -sin(angle), cos(angle), 0.0, 0.0, 0.0, 0.0, 1.0);\n}\nvoid main() {\n\tfloat halfWidth = (segmentWidth * horizontalSegments) * 0.5;\n\tfloat halfHeight = (segmentHeight * verticalSegments) * 0.5;\n\tvUv = uv;\n\tvec4 newPosition = vec4(position, 1.0);\n\tfloat delay = interpolationFloat(0.0, 0.08, 0.0, halfWidth * 2.0, halfWidth + newPosition.x, 0);\n\tfloat arc = halfHeight - newPosition.y;\n\tfloat L;\n\tif (timePercent < 0.8) {\n\t\tL = interpolationFloat(halfHeight * 4.0, halfHeight * 22.0, 0.3 + delay, 0.8, timePercent, 0);\n\t}\n\telse {\n\t\tL = interpolationFloat(halfHeight * 22.0, halfHeight * 300.0, 0.8, 1.0, timePercent, 0);\n\t}\n\tfloat r = L / (2.0 * PI);\n\tfloat angle = PI - (arc / r);\n\tfloat y = sin(angle) * r;\n\tfloat z = cos(angle) * r;\n\tnewPosition.y = halfHeight - y;\n\tnewPosition.z = (z + r) * 0.45;\n\tfloat rotateAngle = interpolationFloat(-PI * 0.5, 0.0, 0.0 + delay, 0.4, timePercent, 0);\n\tnewPosition.y -= halfHeight;\n\tnewPosition = rotateX(rotateAngle) * newPosition;\n\tnewPosition.y += halfHeight;\n\tfloat backRotate1 = interpolationFloat(0.0, PI * 0.03, 0.75, 0.9, timePercent, 0);\n\tnewPosition.y -= halfHeight;\n\tnewPosition = rotateX(backRotate1) * newPosition;\n\tnewPosition.y += halfHeight;\n\tfloat backRotate2 = interpolationFloat(0.0, -PI * 0.03, 0.8, 1.0, timePercent, 0);\n\tnewPosition.y -= halfHeight;\n\tnewPosition = rotateX(backRotate2) * newPosition;\n\tnewPosition.y += halfHeight;\n\tgl_Position = (projectionMatrix * modelViewMatrix) * newPosition;\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\nvec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tfloat alpha = interpolationFloat(0.0, 0.6, 0.5, 1.0, timePercent, 0);\n\tvec4 shadow = vec4(0.0, 0.0, 0.0, 0.0);\n\tgl_FragColor = blendSrcOver(shadow, distColor);\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nfloat interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\n#define PI 3.14159265358\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nuniform float width;\nuniform float height;\nvarying vec2 vUv;\nvec2 transform(vec2 uv) {\n\tuv.y = (uv.y * height) / width;\n\treturn uv - vec2(0.5, (0.5 * height) / width);\n}\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tfloat shadowAngle = PI / 6.0;\n\tfloat clockAngle;\n\tvec2 a;\n\tvec2 b = transform(vUv);\n\tfloat angle;\n\tif (timePercent < 0.5) {\n\t\ta = vec2(0.0, 0.5);\n\t\tclockAngle = interpolationFloat(0.0, PI, 0.0, 0.5, timePercent, 0);\n\t\tif (b.x > 0.0) {\n\t\t\tangle = acos(((a.x * b.x) + (a.y * b.y)) / (sqrt((a.x * a.x) + (a.y * a.y)) * sqrt((b.x * b.x) + (b.y * b.y))));\n\t\t\tif (angle < clockAngle) {\n\t\t\t\tif (angle > (clockAngle - shadowAngle)) {\n\t\t\t\t\tfloat shadowAlpha = interpolationFloat(1.0, 0.0, 0.0, 1.0, abs(clockAngle - angle) / shadowAngle, 0);\n\t\t\t\t\tsrcColor.a = shadowAlpha;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsrcColor.a = 0.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tsrcColor.a = 1.0;\n\t\t}\n\t}\n\telse {\n\t\ta = vec2(0.0, -0.5);\n\t\tclockAngle = interpolationFloat(0.0, PI + shadowAngle, 0.5, 1.0, timePercent, 0);\n\t\tif (b.x <= 0.0) {\n\t\t\tangle = acos(((a.x * b.x) + (a.y * b.y)) / (sqrt((a.x * a.x) + (a.y * a.y)) * sqrt((b.x * b.x) + (b.y * b.y))));\n\t\t\tif (angle < clockAngle) {\n\t\t\t\tif (angle > (clockAngle - shadowAngle)) {\n\t\t\t\t\tfloat shadowAlpha = interpolationFloat(1.0, 0.0, 0.0, 1.0, abs(clockAngle - angle) / shadowAngle, 0);\n\t\t\t\t\tsrcColor.a = shadowAlpha;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsrcColor.a = 0.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tsrcColor.a = 0.0;\n\t\t}\n\t}\n\tgl_FragColor = blendSrcOver(srcColor, distColor);\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\n#define PI 3.14159265358\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nuniform float width;\nuniform float height;\nvarying vec2 vUv;\nvoid main() {\n\tvec2 uv = vUv;\n\tbool useSrc = false;\n\tvec2 row;\n\tfloat delay = 0.02;\n\tfor (int i = 0; i < 7; i++) {\n\t\tfloat fi = float(i);\n\t\trow.r = (fi * 1.0) / 7.0;\n\t\trow.g = (float(i + 1) * 1.0) / 7.0;\n\t\tif ((vUv.y <= row.g) && (vUv.y > row.r)) {\n\t\t\tif ((i % 2) == 0) {\n\t\t\t\tfloat x = interpolationFloat(0.0, 1.0, delay * fi, (delay * fi) + 0.86, timePercent, 1);\n\t\t\t\tif (vUv.x < x) {\n\t\t\t\t\tuseSrc = false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tuv.x -= x;\n\t\t\t\t\tuseSrc = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfloat x = interpolationFloat(1.0, 0.0, delay * fi, (delay * fi) + 0.86, timePercent, 1);\n\t\t\t\tif (vUv.x < x) {\n\t\t\t\t\tuv.x = (1.0 - x) + uv.x;\n\t\t\t\t\tuseSrc = true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tuseSrc = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\tvec4 srcColor = texture2D(texturePrev, uv);\n\tvec4 distColor = texture2D(textureNext, uv);\n\tgl_FragColor = useSrc ? srcColor : distColor;\n}\n"},function(t,e){t.exports="vec4 blendSrcOver(vec4 src, vec4 dist) {\n\tvec4 result = vec4(0.0, 0.0, 0.0, 0.0);\n\tsrc.r *= src.a;\n\tsrc.g *= src.a;\n\tsrc.b *= src.a;\n\tresult.a = src.a + (dist.a * (1.0 - src.a));\n\tresult.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;\n\tresult.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;\n\tresult.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;\n\treturn result;\n}\nfloat interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\n#define PI 3.14159265358\nuniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nuniform float width;\nuniform float height;\nvarying vec2 vUv;\nvoid main() {\n\tvec2 uvSrc = vUv;\n\tvec2 uvDist = vUv;\n\tfloat scaleSrc = interpolationFloat(1.0, 0.1, 0.0, 1.0, timePercent, 0);\n\tfloat scaleDist = interpolationFloat(2.0, 1.0, 0.0, 1.0, timePercent, 0);\n\tuvSrc -= 0.5;\n\tuvSrc *= scaleSrc;\n\tuvSrc += 0.5;\n\tuvDist -= 0.5;\n\tuvDist *= scaleDist;\n\tuvDist += 0.5;\n\tvec4 srcColor = texture2D(texturePrev, uvSrc);\n\tsrcColor.a = interpolationFloat(1.0, 0.0, 0.0, 1.0, timePercent, 0);\n\tvec4 distColor;\n\tif ((((uvDist.x > 1.0) || (uvDist.x < 0.0)) || (uvDist.y > 1.0)) || (uvDist.y < 0.0)) {\n\t\tdistColor = vec4(0.0, 0.0, 0.0, 1.0);\n\t}\n\telse {\n\t\tdistColor = texture2D(textureNext, uvDist);\n\t}\n\tgl_FragColor = blendSrcOver(srcColor, distColor);\n}\n"},function(t,e){t.exports="float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n\tfloat pi = 3.14159265358;\n\tfloat current;\n\tfloat duration = 1.0;\n\tif (timePercent < start) {\n\t\tcurrent = 0.0;\n\t}\n\telse if (timePercent > end) {\n\t\tcurrent = 1.0;\n\t}\n\telse {\n\t\tcurrent = (timePercent - start) / (end - start);\n\t}\n\tif (timing == 0) {\n\t\treturn ((current / duration) * (to - from)) + from;\n\t}\n\telse if (timing == 1) {\n\t\tcurrent = current / duration;\n\t\treturn (((to - from) * current) * current) + from;\n\t}\n\telse if (timing == 2) {\n\t\tcurrent = current / duration;\n\t\treturn (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n\t}\n\telse {\n\t\tcurrent /= (duration / 2.0);\n\t\tif (current < 1.0) {\n\t\t\treturn ((((to - from) / 2.0) * current) * current) + from;\n\t\t}\n\t\tcurrent--;\n\t\treturn ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n\t}\n}\n#define PI 3.14159265358\nuniform float timePercent;\nuniform float horizontalSegments;\nuniform float verticalSegments;\nuniform float segmentWidth;\nuniform float segmentHeight;\nvarying vec2 vUv;\nmat4 rotateY(float angle) {\n\treturn mat4(cos(angle), 0.0, sin(angle), 0.0, 0.0, 1.0, 0.0, 0.0, -sin(angle), 0.0, cos(angle), 0.0, 0.0, 0.0, 0.0, 1.0);\n}\nvoid main() {\n\tfloat halfWidth = (segmentWidth * horizontalSegments) * 0.5;\n\tfloat halfHeight = (segmentHeight * verticalSegments) * 0.5;\n\tvUv = uv;\n\tvec4 newPosition = vec4(position, 1.0);\n\tfloat stageOneAngle = PI / 14.0;\n\tfloat stageTwoAngle = (PI * 12.0) / 14.0;\n\tfloat stage_1 = 0.1;\n\tfloat stage_2 = 0.8;\n\tif (timePercent < 0.5) {\n\t\tnewPosition.z = interpolationFloat(0.0, -100.0, 0.0, 0.5, timePercent, 0);\n\t}\n\telse {\n\t\tnewPosition.z = interpolationFloat(-100.0, 0.0, 0.5, 1.0, timePercent, 0);\n\t}\n\tif (timePercent < stage_1) {\n\t\tfloat angle = interpolationFloat(0.0, stageOneAngle, 0.0, stage_1, timePercent, 0);\n\t\tnewPosition.x += halfWidth;\n\t\tnewPosition *= rotateY(angle);\n\t\tnewPosition.x -= halfWidth;\n\t}\n\telse if ((timePercent >= stage_1) && (timePercent < stage_2)) {\n\t\tif (timePercent > 0.5) {\n\t\t\tnewPosition *= rotateY(PI);\n\t\t}\n\t\tfloat offset = halfWidth - (sin((PI * 0.5) - stageOneAngle) * halfWidth);\n\t\tfloat angle = interpolationFloat(0.0, stageTwoAngle, stage_1, stage_2, timePercent, 0);\n\t\tnewPosition *= rotateY(angle);\n\t\tnewPosition.x += halfWidth;\n\t\tnewPosition *= rotateY(stageOneAngle);\n\t\tnewPosition.x -= halfWidth;\n\t\tnewPosition.x += interpolationFloat(0.0, 2.0 * offset, stage_1, stage_2, timePercent, 0);\n\t}\n\telse {\n\t\tfloat angle = interpolationFloat(-stageOneAngle, 0.0, stage_2, 1.0, timePercent, 0);\n\t\tnewPosition.x -= halfWidth;\n\t\tnewPosition *= rotateY(angle);\n\t\tnewPosition.x += halfWidth;\n\t}\n\tgl_Position = (projectionMatrix * modelViewMatrix) * newPosition;\n}\n"},function(t,e){t.exports="uniform sampler2D texturePrev;\nuniform sampler2D textureNext;\nuniform float timePercent;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 srcColor = texture2D(texturePrev, vUv);\n\tvec4 distColor = texture2D(textureNext, vUv);\n\tgl_FragColor = timePercent < 0.5 ? srcColor : distColor;\n}\n"},function(t,e,n){"use strict";(function(t){var i=n(44),r=n(45),o=setTimeout,s=void 0!==t?t:null;function a(t){return Boolean(t&&void 0!==t.length)}function l(){}function u(t){if(!(this instanceof u))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],m(t,this)}function h(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,u._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var i;try{i=n(t._value)}catch(t){return void d(e.promise,t)}c(e.promise,i)}else(1===t._state?c:d)(e.promise,t._value)}))):t._deferreds.push(e)}function c(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof u)return t._state=3,t._value=e,void p(t);if("function"==typeof n)return void m((i=n,r=e,function(){i.apply(r,arguments)}),t)}t._state=1,t._value=e,p(t)}catch(e){d(t,e)}var i,r}function d(t,e){t._state=2,t._value=e,p(t)}function p(t){2===t._state&&0===t._deferreds.length&&u._immediateFn((function(){t._handled||u._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)h(t,t._deferreds[e]);t._deferreds=null}function f(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function m(t,e){var n=!1;try{t((function(t){n||(n=!0,c(e,t))}),(function(t){n||(n=!0,d(e,t))}))}catch(t){if(n)return;n=!0,d(e,t)}}u.prototype.catch=function(t){return this.then(null,t)},u.prototype.then=function(t,e){var n=new this.constructor(l);return h(this,new f(t,e,n)),n},u.prototype.finally=i.a,u.all=function(t){return new u((function(e,n){if(!a(t))return n(new TypeError("Promise.all accepts an array"));var i=Array.prototype.slice.call(t);if(0===i.length)return e([]);var r=i.length;function o(t,s){try{if(s&&("object"==typeof s||"function"==typeof s)){var a=s.then;if("function"==typeof a)return void a.call(s,(function(e){o(t,e)}),n)}i[t]=s,0==--r&&e(i)}catch(t){n(t)}}for(var s=0;s<i.length;s++)o(s,i[s])}))},u.allSettled=r.a,u.resolve=function(t){return t&&"object"==typeof t&&t.constructor===u?t:new u((function(e){e(t)}))},u.reject=function(t){return new u((function(e,n){n(t)}))},u.race=function(t){return new u((function(e,n){if(!a(t))return n(new TypeError("Promise.race accepts an array"));for(var i=0,r=t.length;i<r;i++)u.resolve(t[i]).then(e,n)}))},u._immediateFn="function"==typeof s&&function(t){s(t)}||function(t){o(t,0)},u._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},e.a=u}).call(this,n(54).setImmediate)},function(t,e,n){"use strict";e.a=function(t){var e=this.constructor;return this.then((function(n){return e.resolve(t()).then((function(){return n}))}),(function(n){return e.resolve(t()).then((function(){return e.reject(n)}))}))}},function(t,e,n){"use strict";e.a=function(t){return new this((function(e,n){if(!t||void 0===t.length)return n(new TypeError(typeof t+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var i=Array.prototype.slice.call(t);if(0===i.length)return e([]);var r=i.length;function o(t,n){if(n&&("object"==typeof n||"function"==typeof n)){var s=n.then;if("function"==typeof s)return void s.call(n,(function(e){o(t,e)}),(function(n){i[t]={status:"rejected",reason:n},0==--r&&e(i)}))}i[t]={status:"fulfilled",value:n},0==--r&&e(i)}for(var s=0;s<i.length;s++)o(s,i[s])}))}},function(t,e,n){"use strict";
|
|
10
10
|
/*
|
|
11
11
|
object-assign
|
|
12
12
|
(c) Sindre Sorhus
|
|
@@ -32,7 +32,7 @@ object-assign
|
|
|
32
32
|
*
|
|
33
33
|
* MIT License
|
|
34
34
|
*/
|
|
35
|
-
function(){"use strict";var t;HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(t){if(!this.ctx||!this.ctx.listener)return this;for(var e=this._howls.length-1;e>=0;e--)this._howls[e].stereo(t);return this},HowlerGlobal.prototype.pos=function(t,e,n){return this.ctx&&this.ctx.listener?(e="number"!=typeof e?this._pos[1]:e,n="number"!=typeof n?this._pos[2]:n,"number"!=typeof t?this._pos:(this._pos=[t,e,n],void 0!==this.ctx.listener.positionX?(this.ctx.listener.positionX.setTargetAtTime(this._pos[0],Howler.ctx.currentTime,.1),this.ctx.listener.positionY.setTargetAtTime(this._pos[1],Howler.ctx.currentTime,.1),this.ctx.listener.positionZ.setTargetAtTime(this._pos[2],Howler.ctx.currentTime,.1)):this.ctx.listener.setPosition(this._pos[0],this._pos[1],this._pos[2]),this)):this},HowlerGlobal.prototype.orientation=function(t,e,n,i,r,o){if(!this.ctx||!this.ctx.listener)return this;var s=this._orientation;return e="number"!=typeof e?s[1]:e,n="number"!=typeof n?s[2]:n,i="number"!=typeof i?s[3]:i,r="number"!=typeof r?s[4]:r,o="number"!=typeof o?s[5]:o,"number"!=typeof t?s:(this._orientation=[t,e,n,i,r,o],void 0!==this.ctx.listener.forwardX?(this.ctx.listener.forwardX.setTargetAtTime(t,Howler.ctx.currentTime,.1),this.ctx.listener.forwardY.setTargetAtTime(e,Howler.ctx.currentTime,.1),this.ctx.listener.forwardZ.setTargetAtTime(n,Howler.ctx.currentTime,.1),this.ctx.listener.upX.setTargetAtTime(i,Howler.ctx.currentTime,.1),this.ctx.listener.upY.setTargetAtTime(r,Howler.ctx.currentTime,.1),this.ctx.listener.upZ.setTargetAtTime(o,Howler.ctx.currentTime,.1)):this.ctx.listener.setOrientation(t,e,n,i,r,o),this)},Howl.prototype.init=(t=Howl.prototype.init,function(e){return this._orientation=e.orientation||[1,0,0],this._stereo=e.stereo||null,this._pos=e.pos||null,this._pannerAttr={coneInnerAngle:void 0!==e.coneInnerAngle?e.coneInnerAngle:360,coneOuterAngle:void 0!==e.coneOuterAngle?e.coneOuterAngle:360,coneOuterGain:void 0!==e.coneOuterGain?e.coneOuterGain:0,distanceModel:void 0!==e.distanceModel?e.distanceModel:"inverse",maxDistance:void 0!==e.maxDistance?e.maxDistance:1e4,panningModel:void 0!==e.panningModel?e.panningModel:"HRTF",refDistance:void 0!==e.refDistance?e.refDistance:1,rolloffFactor:void 0!==e.rolloffFactor?e.rolloffFactor:1},this._onstereo=e.onstereo?[{fn:e.onstereo}]:[],this._onpos=e.onpos?[{fn:e.onpos}]:[],this._onorientation=e.onorientation?[{fn:e.onorientation}]:[],t.call(this,e)}),Howl.prototype.stereo=function(t,n){var i=this;if(!i._webAudio)return i;if("loaded"!==i._state)return i._queue.push({event:"stereo",action:function(){i.stereo(t,n)}}),i;var r=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===n){if("number"!=typeof t)return i._stereo;i._stereo=t,i._pos=[t,0,0]}for(var o=i._getSoundIds(n),s=0;s<o.length;s++){var a=i._soundById(o[s]);if(a){if("number"!=typeof t)return a._stereo;a._stereo=t,a._pos=[t,0,0],a._node&&(a._pannerAttr.panningModel="equalpower",a._panner&&a._panner.pan||e(a,r),"spatial"===r?void 0!==a._panner.positionX?(a._panner.positionX.setValueAtTime(t,Howler.ctx.currentTime),a._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),a._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):a._panner.setPosition(t,0,0):a._panner.pan.setValueAtTime(t,Howler.ctx.currentTime)),i._emit("stereo",a._id)}}return i},Howl.prototype.pos=function(t,n,i,r){var o=this;if(!o._webAudio)return o;if("loaded"!==o._state)return o._queue.push({event:"pos",action:function(){o.pos(t,n,i,r)}}),o;if(n="number"!=typeof n?0:n,i="number"!=typeof i?-.5:i,void 0===r){if("number"!=typeof t)return o._pos;o._pos=[t,n,i]}for(var s=o._getSoundIds(r),a=0;a<s.length;a++){var l=o._soundById(s[a]);if(l){if("number"!=typeof t)return l._pos;l._pos=[t,n,i],l._node&&(l._panner&&!l._panner.pan||e(l,"spatial"),void 0!==l._panner.positionX?(l._panner.positionX.setValueAtTime(t,Howler.ctx.currentTime),l._panner.positionY.setValueAtTime(n,Howler.ctx.currentTime),l._panner.positionZ.setValueAtTime(i,Howler.ctx.currentTime)):l._panner.setPosition(t,n,i)),o._emit("pos",l._id)}}return o},Howl.prototype.orientation=function(t,n,i,r){var o=this;if(!o._webAudio)return o;if("loaded"!==o._state)return o._queue.push({event:"orientation",action:function(){o.orientation(t,n,i,r)}}),o;if(n="number"!=typeof n?o._orientation[1]:n,i="number"!=typeof i?o._orientation[2]:i,void 0===r){if("number"!=typeof t)return o._orientation;o._orientation=[t,n,i]}for(var s=o._getSoundIds(r),a=0;a<s.length;a++){var l=o._soundById(s[a]);if(l){if("number"!=typeof t)return l._orientation;l._orientation=[t,n,i],l._node&&(l._panner||(l._pos||(l._pos=o._pos||[0,0,-.5]),e(l,"spatial")),void 0!==l._panner.orientationX?(l._panner.orientationX.setValueAtTime(t,Howler.ctx.currentTime),l._panner.orientationY.setValueAtTime(n,Howler.ctx.currentTime),l._panner.orientationZ.setValueAtTime(i,Howler.ctx.currentTime)):l._panner.setOrientation(t,n,i)),o._emit("orientation",l._id)}}return o},Howl.prototype.pannerAttr=function(){var t,n,i,r=this,o=arguments;if(!r._webAudio)return r;if(0===o.length)return r._pannerAttr;if(1===o.length){if("object"!=typeof o[0])return(i=r._soundById(parseInt(o[0],10)))?i._pannerAttr:r._pannerAttr;t=o[0],void 0===n&&(t.pannerAttr||(t.pannerAttr={coneInnerAngle:t.coneInnerAngle,coneOuterAngle:t.coneOuterAngle,coneOuterGain:t.coneOuterGain,distanceModel:t.distanceModel,maxDistance:t.maxDistance,refDistance:t.refDistance,rolloffFactor:t.rolloffFactor,panningModel:t.panningModel}),r._pannerAttr={coneInnerAngle:void 0!==t.pannerAttr.coneInnerAngle?t.pannerAttr.coneInnerAngle:r._coneInnerAngle,coneOuterAngle:void 0!==t.pannerAttr.coneOuterAngle?t.pannerAttr.coneOuterAngle:r._coneOuterAngle,coneOuterGain:void 0!==t.pannerAttr.coneOuterGain?t.pannerAttr.coneOuterGain:r._coneOuterGain,distanceModel:void 0!==t.pannerAttr.distanceModel?t.pannerAttr.distanceModel:r._distanceModel,maxDistance:void 0!==t.pannerAttr.maxDistance?t.pannerAttr.maxDistance:r._maxDistance,refDistance:void 0!==t.pannerAttr.refDistance?t.pannerAttr.refDistance:r._refDistance,rolloffFactor:void 0!==t.pannerAttr.rolloffFactor?t.pannerAttr.rolloffFactor:r._rolloffFactor,panningModel:void 0!==t.pannerAttr.panningModel?t.pannerAttr.panningModel:r._panningModel})}else 2===o.length&&(t=o[0],n=parseInt(o[1],10));for(var s=r._getSoundIds(n),a=0;a<s.length;a++)if(i=r._soundById(s[a])){var l=i._pannerAttr;l={coneInnerAngle:void 0!==t.coneInnerAngle?t.coneInnerAngle:l.coneInnerAngle,coneOuterAngle:void 0!==t.coneOuterAngle?t.coneOuterAngle:l.coneOuterAngle,coneOuterGain:void 0!==t.coneOuterGain?t.coneOuterGain:l.coneOuterGain,distanceModel:void 0!==t.distanceModel?t.distanceModel:l.distanceModel,maxDistance:void 0!==t.maxDistance?t.maxDistance:l.maxDistance,refDistance:void 0!==t.refDistance?t.refDistance:l.refDistance,rolloffFactor:void 0!==t.rolloffFactor?t.rolloffFactor:l.rolloffFactor,panningModel:void 0!==t.panningModel?t.panningModel:l.panningModel};var u=i._panner;u?(u.coneInnerAngle=l.coneInnerAngle,u.coneOuterAngle=l.coneOuterAngle,u.coneOuterGain=l.coneOuterGain,u.distanceModel=l.distanceModel,u.maxDistance=l.maxDistance,u.refDistance=l.refDistance,u.rolloffFactor=l.rolloffFactor,u.panningModel=l.panningModel):(i._pos||(i._pos=r._pos||[0,0,-.5]),e(i,"spatial"))}return r},Sound.prototype.init=function(t){return function(){var e=this._parent;this._orientation=e._orientation,this._stereo=e._stereo,this._pos=e._pos,this._pannerAttr=e._pannerAttr,t.call(this),this._stereo?e.stereo(this._stereo):this._pos&&e.pos(this._pos[0],this._pos[1],this._pos[2],this._id)}}(Sound.prototype.init),Sound.prototype.reset=function(t){return function(){var e=this._parent;return this._orientation=e._orientation,this._stereo=e._stereo,this._pos=e._pos,this._pannerAttr=e._pannerAttr,this._stereo?e.stereo(this._stereo):this._pos?e.pos(this._pos[0],this._pos[1],this._pos[2],this._id):this._panner&&(this._panner.disconnect(0),this._panner=void 0,e._refreshBuffer(this)),t.call(this)}}(Sound.prototype.reset);var e=function(t,e){"spatial"===(e=e||"spatial")?(t._panner=Howler.ctx.createPanner(),t._panner.coneInnerAngle=t._pannerAttr.coneInnerAngle,t._panner.coneOuterAngle=t._pannerAttr.coneOuterAngle,t._panner.coneOuterGain=t._pannerAttr.coneOuterGain,t._panner.distanceModel=t._pannerAttr.distanceModel,t._panner.maxDistance=t._pannerAttr.maxDistance,t._panner.refDistance=t._pannerAttr.refDistance,t._panner.rolloffFactor=t._pannerAttr.rolloffFactor,t._panner.panningModel=t._pannerAttr.panningModel,void 0!==t._panner.positionX?(t._panner.positionX.setValueAtTime(t._pos[0],Howler.ctx.currentTime),t._panner.positionY.setValueAtTime(t._pos[1],Howler.ctx.currentTime),t._panner.positionZ.setValueAtTime(t._pos[2],Howler.ctx.currentTime)):t._panner.setPosition(t._pos[0],t._pos[1],t._pos[2]),void 0!==t._panner.orientationX?(t._panner.orientationX.setValueAtTime(t._orientation[0],Howler.ctx.currentTime),t._panner.orientationY.setValueAtTime(t._orientation[1],Howler.ctx.currentTime),t._panner.orientationZ.setValueAtTime(t._orientation[2],Howler.ctx.currentTime)):t._panner.setOrientation(t._orientation[0],t._orientation[1],t._orientation[2])):(t._panner=Howler.ctx.createStereoPanner(),t._panner.pan.setValueAtTime(t._stereo,Howler.ctx.currentTime)),t._panner.connect(t._node),t._paused||t._parent.pause(t._id,!0).play(t._id,!0)}}()}).call(this,n(4))},function(t,e){t.exports="varying vec2 vTextureCoord;\nvarying vec2 vVertexPosition;\nvarying float vPercent;\nvarying float vDirection;\nvarying float vTransition;\nuniform sampler2D uSampler;\nvoid main() {\n\tvec4 outputColor;\n\tfloat percent = vPercent;\n\tfloat direction = vDirection;\n\tif (vTransition < 0.0) {\n\t\tpercent = 1.0 - percent;\n\t\tif ((vDirection > 1.5) && (vDirection < 2.5)) {\n\t\t\tdirection = 1.0;\n\t\t}\n\t\telse if ((vDirection > 0.5) && (vDirection < 1.5)) {\n\t\t\tdirection = 2.0;\n\t\t}\n\t\telse if ((vDirection > 2.5) && (vDirection < 3.5)) {\n\t\t\tdirection = 4.0;\n\t\t}\n\t\telse {\n\t\t\tdirection = 3.0;\n\t\t}\n\t}\n\tif ((direction > 1.5) && (direction < 2.5)) {\n\t\tif (vVertexPosition.y >= (1.0 - percent)) {\n\t\t\toutputColor = texture2D(uSampler, vTextureCoord);\n\t\t}\n\t\telse {\n\t\t\toutputColor = vec4(0.0, 0.0, 0.0, 0.0);\n\t\t}\n\t\tif ((vVertexPosition.y >= (1.0 - percent)) && (vVertexPosition.y <= ((1.0 - percent) + 0.2))) {\n\t\t\toutputColor = outputColor * ((vVertexPosition.y - (1.0 - percent)) / 0.2);\n\t\t}\n\t}\n\telse if ((direction > 0.5) && (direction < 1.5)) {\n\t\tif (vVertexPosition.y <= percent) {\n\t\t\toutputColor = texture2D(uSampler, vTextureCoord);\n\t\t}\n\t\telse {\n\t\t\toutputColor = vec4(0.0, 0.0, 0.0, 0.0);\n\t\t}\n\t\tif ((vVertexPosition.y <= percent) && (vVertexPosition.y >= (percent - 0.2))) {\n\t\t\toutputColor = outputColor * (1.0 - ((vVertexPosition.y - (percent - 0.2)) / 0.2));\n\t\t}\n\t}\n\telse if ((direction > 2.5) && (direction < 3.5)) {\n\t\tif (vVertexPosition.x <= percent) {\n\t\t\toutputColor = texture2D(uSampler, vTextureCoord);\n\t\t}\n\t\telse {\n\t\t\toutputColor = vec4(0.0, 0.0, 0.0, 0.0);\n\t\t}\n\t\tif ((vVertexPosition.x <= percent) && (vVertexPosition.x >= (percent - 0.2))) {\n\t\t\toutputColor = outputColor * (1.0 - ((vVertexPosition.x - (percent - 0.2)) / 0.2));\n\t\t}\n\t}\n\telse {\n\t\tif (vVertexPosition.x >= (1.0 - percent)) {\n\t\t\toutputColor = texture2D(uSampler, vTextureCoord);\n\t\t}\n\t\telse {\n\t\t\toutputColor = vec4(0.0, 0.0, 0.0, 0.0);\n\t\t}\n\t\tif ((vVertexPosition.x >= (1.0 - percent)) && (vVertexPosition.x <= ((1.0 - percent) + 0.2))) {\n\t\t\toutputColor = outputColor * ((vVertexPosition.x - (1.0 - percent)) / 0.2);\n\t\t}\n\t}\n\tgl_FragColor = outputColor;\n}\n"},function(t,e){t.exports="attribute vec2 aVertexPosition;\nuniform mat3 projectionMatrix;\nvarying vec2 vTextureCoord;\nvarying vec2 vVertexPosition;\nvarying float vPercent;\nvarying float vDirection;\nvarying float vTransition;\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\nuniform float percent;\nuniform float direction;\nuniform float transition;\nvec4 filterVertexPosition() {\n\tvec2 position = (aVertexPosition * max(outputFrame.zw, vec2(0.))) + outputFrame.xy;\n\treturn vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\nvec2 filterTextureCoord(vec2 aVertexPosition) {\n\treturn aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\nvoid main() {\n\tvTransition = transition;\n\tvDirection = direction;\n\tvPercent = percent;\n\tvVertexPosition = aVertexPosition;\n\tvec2 localVertexPosition = aVertexPosition;\n\tgl_Position = filterVertexPosition();\n\tvTextureCoord = filterTextureCoord(localVertexPosition);\n}\n"},function(t,e){t.exports="varying vec2 vTextureCoord;\nuniform float percent;\nuniform sampler2D uSampler;\nuniform float transition;\nvoid main() {\n\tfloat alpha = (transition * (percent - 0.5)) + 0.5;\n\tvec4 color1 = texture2D(uSampler, vTextureCoord);\n\tgl_FragColor = color1 * alpha;\n}\n"},function(t,e,n){var i;!function(r,o){"use strict";var s="model",a="name",l="type",u="vendor",h="version",c="mobile",d="tablet",p="smarttv",f=function(t){for(var e={},n=0;n<t.length;n++)e[t[n].toUpperCase()]=t[n];return e},m=function(t,e){return"string"==typeof t&&-1!==g(e).indexOf(g(t))},g=function(t){return t.toLowerCase()},v=function(t,e){if("string"==typeof t)return t=t.replace(/^\s\s*/,"").replace(/\s\s*$/,""),void 0===e?t:t.substring(0,255)},_=function(t,e){for(var n,i,r,o,s,a,l=0;l<e.length&&!s;){var u=e[l],h=e[l+1];for(n=i=0;n<u.length&&!s;)if(s=u[n++].exec(t))for(r=0;r<h.length;r++)a=s[++i],"object"==typeof(o=h[r])&&o.length>0?2===o.length?"function"==typeof o[1]?this[o[0]]=o[1].call(this,a):this[o[0]]=o[1]:3===o.length?"function"!=typeof o[1]||o[1].exec&&o[1].test?this[o[0]]=a?a.replace(o[1],o[2]):void 0:this[o[0]]=a?o[1].call(this,a,o[2]):void 0:4===o.length&&(this[o[0]]=a?o[3].call(this,a.replace(o[1],o[2])):void 0):this[o]=a||void 0;l+=2}},y=function(t,e){for(var n in e)if("object"==typeof e[n]&&e[n].length>0){for(var i=0;i<e[n].length;i++)if(m(e[n][i],t))return"?"===n?void 0:n}else if(m(e[n],t))return"?"===n?void 0:n;return t},x={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},b={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[a,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[a,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[a,h],[/opios[\/ ]+([\w\.]+)/i],[h,[a,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[h,[a,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[a,h],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[a,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[h,[a,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[h,[a,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[a,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[a,"IE"]],[/yabrowser\/([\w\.]+)/i],[h,[a,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[a,/(.+)/,"$1 Secure Browser"],h],[/\bfocus\/([\w\.]+)/i],[h,[a,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[h,[a,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[a,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[a,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[a,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[a,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[h,[a,"Firefox"]],[/\bqihu|(qi?ho?o?|360)browser/i],[[a,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[a,/(.+)/,"$1 Browser"],h],[/(comodo_dragon)\/([\w\.]+)/i],[[a,/_/g," "],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[a,h],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[a],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[a,"Facebook"],h],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[a,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[a,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[a,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[a,"Chrome WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[a,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[a,h],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[h,[a,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[h,a],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[a,[h,y,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[a,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[a,"Netscape"],h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[a,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[a,h]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",g]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[["architecture","arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[["architecture","armhf"]],[/windows (ce|mobile); ppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[["architecture",/ower/,"",g]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[["architecture",g]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[s,[u,"Samsung"],[l,d]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[s,[u,"Samsung"],[l,c]],[/\((ip(?:hone|od)[\w ]*);/i],[s,[u,"Apple"],[l,c]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[s,[u,"Apple"],[l,d]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[s,[u,"Huawei"],[l,d]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[s,[u,"Huawei"],[l,c]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[s,/_/g," "],[u,"Xiaomi"],[l,c]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[s,/_/g," "],[u,"Xiaomi"],[l,d]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[s,[u,"OPPO"],[l,c]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[s,[u,"Vivo"],[l,c]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[s,[u,"Realme"],[l,c]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[s,[u,"Motorola"],[l,c]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[s,[u,"Motorola"],[l,d]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[s,[u,"LG"],[l,d]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[s,[u,"LG"],[l,c]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[s,[u,"Lenovo"],[l,d]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[s,/_/g," "],[u,"Nokia"],[l,c]],[/(pixel c)\b/i],[s,[u,"Google"],[l,d]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[s,[u,"Google"],[l,c]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[s,[u,"Sony"],[l,c]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[s,"Xperia Tablet"],[u,"Sony"],[l,d]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[s,[u,"OnePlus"],[l,c]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[s,[u,"Amazon"],[l,d]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[s,/(.+)/g,"Fire Phone $1"],[u,"Amazon"],[l,c]],[/(playbook);[-\w\),; ]+(rim)/i],[s,u,[l,d]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[s,[u,"BlackBerry"],[l,c]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[s,[u,"ASUS"],[l,d]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[s,[u,"ASUS"],[l,c]],[/(nexus 9)/i],[s,[u,"HTC"],[l,d]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[u,[s,/_/g," "],[l,c]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[s,[u,"Acer"],[l,d]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[s,[u,"Meizu"],[l,c]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[s,[u,"Sharp"],[l,c]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[u,s,[l,c]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[u,s,[l,d]],[/(surface duo)/i],[s,[u,"Microsoft"],[l,d]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[s,[u,"Fairphone"],[l,c]],[/(u304aa)/i],[s,[u,"AT&T"],[l,c]],[/\bsie-(\w*)/i],[s,[u,"Siemens"],[l,c]],[/\b(rct\w+) b/i],[s,[u,"RCA"],[l,d]],[/\b(venue[\d ]{2,7}) b/i],[s,[u,"Dell"],[l,d]],[/\b(q(?:mv|ta)\w+) b/i],[s,[u,"Verizon"],[l,d]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[s,[u,"Barnes & Noble"],[l,d]],[/\b(tm\d{3}\w+) b/i],[s,[u,"NuVision"],[l,d]],[/\b(k88) b/i],[s,[u,"ZTE"],[l,d]],[/\b(nx\d{3}j) b/i],[s,[u,"ZTE"],[l,c]],[/\b(gen\d{3}) b.+49h/i],[s,[u,"Swiss"],[l,c]],[/\b(zur\d{3}) b/i],[s,[u,"Swiss"],[l,d]],[/\b((zeki)?tb.*\b) b/i],[s,[u,"Zeki"],[l,d]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[u,"Dragon Touch"],s,[l,d]],[/\b(ns-?\w{0,9}) b/i],[s,[u,"Insignia"],[l,d]],[/\b((nxa|next)-?\w{0,9}) b/i],[s,[u,"NextBook"],[l,d]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[u,"Voice"],s,[l,c]],[/\b(lvtel\-)?(v1[12]) b/i],[[u,"LvTel"],s,[l,c]],[/\b(ph-1) /i],[s,[u,"Essential"],[l,c]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[s,[u,"Envizen"],[l,d]],[/\b(trio[-\w\. ]+) b/i],[s,[u,"MachSpeed"],[l,d]],[/\btu_(1491) b/i],[s,[u,"Rotor"],[l,d]],[/(shield[\w ]+) b/i],[s,[u,"Nvidia"],[l,d]],[/(sprint) (\w+)/i],[u,s,[l,c]],[/(kin\.[onetw]{3})/i],[[s,/\./g," "],[u,"Microsoft"],[l,c]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[s,[u,"Zebra"],[l,d]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[s,[u,"Zebra"],[l,c]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[u,s,[l,"console"]],[/droid.+; (shield) bui/i],[s,[u,"Nvidia"],[l,"console"]],[/(playstation [345portablevi]+)/i],[s,[u,"Sony"],[l,"console"]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[s,[u,"Microsoft"],[l,"console"]],[/smart-tv.+(samsung)/i],[u,[l,p]],[/hbbtv.+maple;(\d+)/i],[[s,/^/,"SmartTV"],[u,"Samsung"],[l,p]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,"LG"],[l,p]],[/(apple) ?tv/i],[u,[s,"Apple TV"],[l,p]],[/crkey/i],[[s,"Chromecast"],[u,"Google"],[l,p]],[/droid.+aft(\w)( bui|\))/i],[s,[u,"Amazon"],[l,p]],[/\(dtv[\);].+(aquos)/i],[s,[u,"Sharp"],[l,p]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[u,v],[s,v],[l,p]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[l,p]],[/((pebble))app/i],[u,s,[l,"wearable"]],[/droid.+; (glass) \d/i],[s,[u,"Google"],[l,"wearable"]],[/droid.+; (wt63?0{2,3})\)/i],[s,[u,"Zebra"],[l,"wearable"]],[/(quest( 2)?)/i],[s,[u,"Facebook"],[l,"wearable"]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[u,[l,"embedded"]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[s,[l,c]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[s,[l,d]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[l,d]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[l,c]],[/(android[-\w\. ]{0,9});.+buil/i],[s,[u,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[a,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[a,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[a,h],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,a]],os:[[/microsoft (windows) (vista|xp)/i],[a,h],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[a,[h,y,x]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[a,"Windows"],[h,y,x]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[a,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[a,"Mac OS"],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[h,a],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[a,h],[/\(bb(10);/i],[h,[a,"BlackBerry"]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h,[a,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[a,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[a,"webOS"]],[/crkey\/([\d\.]+)/i],[h,[a,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[a,"Chromium OS"],h],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[a,h],[/(sunos) ?([\w\.\d]*)/i],[[a,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[a,h]]},T=function(t,e){if("object"==typeof t&&(e=t,t=void 0),!(this instanceof T))return new T(t,e).getResult();var n=t||(void 0!==r&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:""),i=e?function(t,e){var n={};for(var i in t)e[i]&&e[i].length%2==0?n[i]=e[i].concat(t[i]):n[i]=t[i];return n}(b,e):b;return this.getBrowser=function(){var t,e={};return e[a]=void 0,e[h]=void 0,_.call(e,n,i.browser),e.major="string"==typeof(t=e.version)?t.replace(/[^\d\.]/g,"").split(".")[0]:void 0,e},this.getCPU=function(){var t={architecture:void 0};return _.call(t,n,i.cpu),t},this.getDevice=function(){var t={vendor:void 0,model:void 0,type:void 0};return _.call(t,n,i.device),t},this.getEngine=function(){var t={name:void 0,version:void 0};return _.call(t,n,i.engine),t},this.getOS=function(){var t={name:void 0,version:void 0};return _.call(t,n,i.os),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(t){return n="string"==typeof t&&t.length>255?v(t,255):t,this},this.setUA(n),this};T.VERSION="1.0.2",T.BROWSER=f([a,h,"major"]),T.CPU=f(["architecture"]),T.DEVICE=f([s,u,l,"console",c,p,d,"wearable","embedded"]),T.ENGINE=T.OS=f([a,h]),void 0!==e?(void 0!==t&&t.exports&&(e=t.exports=T),e.UAParser=T):n(63)?void 0===(i=function(){return T}.call(e,n,e,t))||(t.exports=i):void 0!==r&&(r.UAParser=T);var w=void 0!==r&&(r.jQuery||r.Zepto);if(w&&!w.ua){var S=new T;w.ua=S.getResult(),w.ua.get=function(){return S.getUA()},w.ua.set=function(t){S.setUA(t);var e=S.getResult();for(var n in e)w.ua[n]=e[n]}}}("object"==typeof window?window:this)},function(t,e,n){(function(t){var i=void 0!==t&&t||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(55),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(4))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var i,r,o,s,a,l=1,u={},h=!1,c=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?i=function(t){e.nextTick((function(){f(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){f(t.data)},i=function(t){o.port2.postMessage(t)}):c&&"onreadystatechange"in c.createElement("script")?(r=c.documentElement,i=function(t){var e=c.createElement("script");e.onreadystatechange=function(){f(t),e.onreadystatechange=null,r.removeChild(e),e=null},r.appendChild(e)}):i=function(t){setTimeout(f,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&f(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),i=function(e){t.postMessage(s+e,"*")}),d.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var r={callback:t,args:e};return u[l]=r,i(l),l++},d.clearImmediate=p}function p(t){delete u[t]}function f(t){if(h)setTimeout(f,0,t);else{var e=u[t];if(e){h=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(void 0,n)}}(e)}finally{p(t),h=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(4),n(56))},function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var l,u=[],h=!1,c=-1;function d(){h&&l&&(h=!1,l.length?u=l.concat(u):c=-1,u.length&&p())}function p(){if(!h){var t=a(d);h=!0;for(var e=u.length;e;){for(l=u,u=[];++c<e;)l&&l[c].run();c=-1,e=u.length}l=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||h||a(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(t,e,n){(function(t,i){var r;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof i&&i;s.global!==s&&s.window!==s&&s.self;var a,l=2147483647,u=/^xn--/,h=/[^\x20-\x7E]/,c=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,f=String.fromCharCode;function m(t){throw new RangeError(d[t])}function g(t,e){for(var n=t.length,i=[];n--;)i[n]=e(t[n]);return i}function v(t,e){var n=t.split("@"),i="";return n.length>1&&(i=n[0]+"@",t=n[1]),i+g((t=t.replace(c,".")).split("."),e).join(".")}function _(t){for(var e,n,i=[],r=0,o=t.length;r<o;)(e=t.charCodeAt(r++))>=55296&&e<=56319&&r<o?56320==(64512&(n=t.charCodeAt(r++)))?i.push(((1023&e)<<10)+(1023&n)+65536):(i.push(e),r--):i.push(e);return i}function y(t){return g(t,(function(t){var e="";return t>65535&&(e+=f((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=f(t)})).join("")}function x(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function b(t,e,n){var i=0;for(t=n?p(t/700):t>>1,t+=p(t/e);t>455;i+=36)t=p(t/35);return p(i+36*t/(t+38))}function T(t){var e,n,i,r,o,s,a,u,h,c,d,f=[],g=t.length,v=0,_=128,x=72;for((n=t.lastIndexOf("-"))<0&&(n=0),i=0;i<n;++i)t.charCodeAt(i)>=128&&m("not-basic"),f.push(t.charCodeAt(i));for(r=n>0?n+1:0;r<g;){for(o=v,s=1,a=36;r>=g&&m("invalid-input"),((u=(d=t.charCodeAt(r++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||u>p((l-v)/s))&&m("overflow"),v+=u*s,!(u<(h=a<=x?1:a>=x+26?26:a-x));a+=36)s>p(l/(c=36-h))&&m("overflow"),s*=c;x=b(v-o,e=f.length+1,0==o),p(v/e)>l-_&&m("overflow"),_+=p(v/e),v%=e,f.splice(v++,0,_)}return y(f)}function w(t){var e,n,i,r,o,s,a,u,h,c,d,g,v,y,T,w=[];for(g=(t=_(t)).length,e=128,n=0,o=72,s=0;s<g;++s)(d=t[s])<128&&w.push(f(d));for(i=r=w.length,r&&w.push("-");i<g;){for(a=l,s=0;s<g;++s)(d=t[s])>=e&&d<a&&(a=d);for(a-e>p((l-n)/(v=i+1))&&m("overflow"),n+=(a-e)*v,e=a,s=0;s<g;++s)if((d=t[s])<e&&++n>l&&m("overflow"),d==e){for(u=n,h=36;!(u<(c=h<=o?1:h>=o+26?26:h-o));h+=36)T=u-c,y=36-c,w.push(f(x(c+T%y,0))),u=p(T/y);w.push(f(x(u,0))),o=b(n,v,i==r),n=0,++i}++n,++e}return w.join("")}a={version:"1.4.1",ucs2:{decode:_,encode:y},decode:T,encode:w,toASCII:function(t){return v(t,(function(t){return h.test(t)?"xn--"+w(t):t}))},toUnicode:function(t){return v(t,(function(t){return u.test(t)?T(t.slice(4).toLowerCase()):t}))}},void 0===(r=function(){return a}.call(e,n,e,t))||(t.exports=r)}()}).call(this,n(7)(t),n(4))},function(t,e,n){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,n){"use strict";e.decode=e.parse=n(60),e.encode=e.stringify=n(61)},function(t,e,n){"use strict";function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,o){e=e||"&",n=n||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var u=t.length;l>0&&u>l&&(u=l);for(var h=0;h<u;++h){var c,d,p,f,m=t[h].replace(a,"%20"),g=m.indexOf(n);g>=0?(c=m.substr(0,g),d=m.substr(g+1)):(c=m,d=""),p=decodeURIComponent(c),f=decodeURIComponent(d),i(s,p)?r(s[p])?s[p].push(f):s[p]=[s[p],f]:s[p]=f}return s};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";var i=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,a){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?o(s(t),(function(s){var a=encodeURIComponent(i(s))+n;return r(t[s])?o(t[s],(function(t){return a+encodeURIComponent(i(t))})).join(e):a+encodeURIComponent(i(t[s]))})).join(e):a?encodeURIComponent(i(a))+n+encodeURIComponent(i(t)):""};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var n=[],i=0;i<t.length;i++)n.push(e(t[i],i));return n}var s=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},function(t,e){var n=function(){};n.prototype={fit:function(t){var e,n,i,r,o=t.length,s=o>0?t[0].width:0,a=o>0?t[0].height:0;for(this.root={x:0,y:0,width:s,height:a},e=0;e<o;e++)i=t[e],(n=this.findNode(this.root,i.width,i.height))?(r=this.splitNode(n,i.width,i.height),i.x=r.x,i.y=r.y):(r=this.growNode(i.width,i.height),i.x=r.x,i.y=r.y)},findNode:function(t,e,n){return t.used?this.findNode(t.right,e,n)||this.findNode(t.down,e,n):e<=t.width&&n<=t.height?t:null},splitNode:function(t,e,n){return t.used=!0,t.down={x:t.x,y:t.y+n,width:t.width,height:t.height-n},t.right={x:t.x+e,y:t.y,width:t.width-e,height:n},t},growNode:function(t,e){var n=t<=this.root.width,i=e<=this.root.height,r=i&&this.root.height>=this.root.width+t,o=n&&this.root.width>=this.root.height+e;return r?this.growRight(t,e):o?this.growDown(t,e):i?this.growRight(t,e):n?this.growDown(t,e):null},growRight:function(t,e){var n;return this.root={used:!0,x:0,y:0,width:this.root.width+t,height:this.root.height,down:this.root,right:{x:this.root.width,y:0,width:t,height:this.root.height}},(n=this.findNode(this.root,t,e))?this.splitNode(n,t,e):null},growDown:function(t,e){var n;return this.root={used:!0,x:0,y:0,width:this.root.width,height:this.root.height+e,down:{x:0,y:this.root.height,width:this.root.width,height:e},right:this.root},(n=this.findNode(this.root,t,e))?this.splitNode(n,t,e):null}},t.exports=n},function(t,e){(function(e){t.exports=e}).call(this,{})},function(t,e,n){"use strict";n.r(e),n.d(e,"ErrorType",(function(){return VE})),n.d(e,"delay",(function(){return nI})),n.d(e,"waitUntil",(function(){return iI})),n.d(e,"SLIDE_EVENTS",(function(){return rI})),n.d(e,"Slide",(function(){return aI}));var i={};n.r(i),n.d(i,"ACESFilmicToneMapping",(function(){return lt})),n.d(i,"AddEquation",(function(){return I})),n.d(i,"AddOperation",(function(){return it})),n.d(i,"AdditiveAnimationBlendMode",(function(){return $e})),n.d(i,"AdditiveBlending",(function(){return A})),n.d(i,"AlphaFormat",(function(){return zt})),n.d(i,"AlwaysDepth",(function(){return Y})),n.d(i,"AlwaysStencilFunc",(function(){return Cn})),n.d(i,"AmbientLight",(function(){return Uc})),n.d(i,"AmbientLightProbe",(function(){return sd})),n.d(i,"AnimationClip",(function(){return oc})),n.d(i,"AnimationLoader",(function(){return pc})),n.d(i,"AnimationMixer",(function(){return Fd})),n.d(i,"AnimationObjectGroup",(function(){return Nd})),n.d(i,"AnimationUtils",(function(){return Xh})),n.d(i,"ArcCurve",(function(){return Au})),n.d(i,"ArrayCamera",(function(){return $a})),n.d(i,"ArrowHelper",(function(){return Ep})),n.d(i,"Audio",(function(){return vd})),n.d(i,"AudioAnalyser",(function(){return wd})),n.d(i,"AudioContext",(function(){return id})),n.d(i,"AudioListener",(function(){return gd})),n.d(i,"AudioLoader",(function(){return rd})),n.d(i,"AxesHelper",(function(){return Mp})),n.d(i,"AxisHelper",(function(){return Mf})),n.d(i,"BackSide",(function(){return b})),n.d(i,"BasicDepthPacking",(function(){return cn})),n.d(i,"BasicShadowMap",(function(){return g})),n.d(i,"BinaryTextureLoader",(function(){return If})),n.d(i,"Bone",(function(){return Bl})),n.d(i,"BooleanKeyframeTrack",(function(){return $h})),n.d(i,"BoundingBoxHelper",(function(){return Af})),n.d(i,"Box2",(function(){return Xd})),n.d(i,"Box3",(function(){return gi})),n.d(i,"Box3Helper",(function(){return xp})),n.d(i,"BoxBufferGeometry",(function(){return Ao})),n.d(i,"BoxGeometry",(function(){return Ao})),n.d(i,"BoxHelper",(function(){return yp})),n.d(i,"BufferAttribute",(function(){return kr})),n.d(i,"BufferGeometry",(function(){return so})),n.d(i,"BufferGeometryLoader",(function(){return Xc})),n.d(i,"ByteType",(function(){return It})),n.d(i,"Cache",(function(){return ac})),n.d(i,"Camera",(function(){return Oo})),n.d(i,"CameraHelper",(function(){return gp})),n.d(i,"CanvasRenderer",(function(){return Lf})),n.d(i,"CanvasTexture",(function(){return pu})),n.d(i,"CatmullRomCurve3",(function(){return Lu})),n.d(i,"CineonToneMapping",(function(){return at})),n.d(i,"CircleBufferGeometry",(function(){return mu})),n.d(i,"CircleGeometry",(function(){return mu})),n.d(i,"ClampToEdgeWrapping",(function(){return _t})),n.d(i,"Clock",(function(){return hd})),n.d(i,"Color",(function(){return Dr})),n.d(i,"ColorKeyframeTrack",(function(){return Qh})),n.d(i,"CompressedTexture",(function(){return du})),n.d(i,"CompressedTextureLoader",(function(){return fc})),n.d(i,"ConeBufferGeometry",(function(){return vu})),n.d(i,"ConeGeometry",(function(){return vu})),n.d(i,"CubeCamera",(function(){return No})),n.d(i,"CubeReflectionMapping",(function(){return ct})),n.d(i,"CubeRefractionMapping",(function(){return dt})),n.d(i,"CubeTexture",(function(){return Do})),n.d(i,"CubeTextureLoader",(function(){return gc})),n.d(i,"CubeUVReflectionMapping",(function(){return mt})),n.d(i,"CubeUVRefractionMapping",(function(){return gt})),n.d(i,"CubicBezierCurve",(function(){return Bu})),n.d(i,"CubicBezierCurve3",(function(){return Uu})),n.d(i,"CubicInterpolant",(function(){return Yh})),n.d(i,"CullFaceBack",(function(){return p})),n.d(i,"CullFaceFront",(function(){return f})),n.d(i,"CullFaceFrontBack",(function(){return m})),n.d(i,"CullFaceNone",(function(){return d})),n.d(i,"Curve",(function(){return Eu})),n.d(i,"CurvePath",(function(){return yc})),n.d(i,"CustomBlending",(function(){return C})),n.d(i,"CustomToneMapping",(function(){return ut})),n.d(i,"CylinderBufferGeometry",(function(){return gu})),n.d(i,"CylinderGeometry",(function(){return gu})),n.d(i,"Cylindrical",(function(){return Vd})),n.d(i,"DataTexture",(function(){return Ul})),n.d(i,"DataTexture2DArray",(function(){return hs})),n.d(i,"DataTexture3D",(function(){return cs})),n.d(i,"DataTextureLoader",(function(){return vc})),n.d(i,"DataUtils",(function(){return Pp})),n.d(i,"DecrementStencilOp",(function(){return yn})),n.d(i,"DecrementWrapStencilOp",(function(){return bn})),n.d(i,"DefaultLoadingManager",(function(){return uc})),n.d(i,"DepthFormat",(function(){return Yt})),n.d(i,"DepthStencilFormat",(function(){return Zt})),n.d(i,"DepthTexture",(function(){return fu})),n.d(i,"DirectionalLight",(function(){return Bc})),n.d(i,"DirectionalLightHelper",(function(){return pp})),n.d(i,"DiscreteInterpolant",(function(){return Jh})),n.d(i,"DodecahedronBufferGeometry",(function(){return yu})),n.d(i,"DodecahedronGeometry",(function(){return yu})),n.d(i,"DoubleSide",(function(){return T})),n.d(i,"DstAlphaFactor",(function(){return z})),n.d(i,"DstColorFactor",(function(){return V})),n.d(i,"DynamicBufferAttribute",(function(){return gf})),n.d(i,"DynamicCopyUsage",(function(){return Un})),n.d(i,"DynamicDrawUsage",(function(){return On})),n.d(i,"DynamicReadUsage",(function(){return Dn})),n.d(i,"EdgesGeometry",(function(){return Su})),n.d(i,"EdgesHelper",(function(){return Rf})),n.d(i,"EllipseCurve",(function(){return Mu})),n.d(i,"EqualDepth",(function(){return K})),n.d(i,"EqualStencilFunc",(function(){return En})),n.d(i,"EquirectangularReflectionMapping",(function(){return pt})),n.d(i,"EquirectangularRefractionMapping",(function(){return ft})),n.d(i,"Euler",(function(){return tr})),n.d(i,"EventDispatcher",(function(){return zn})),n.d(i,"ExtrudeBufferGeometry",(function(){return yh})),n.d(i,"ExtrudeGeometry",(function(){return yh})),n.d(i,"FaceColors",(function(){return of})),n.d(i,"FileLoader",(function(){return dc})),n.d(i,"FlatShading",(function(){return w})),n.d(i,"Float16BufferAttribute",(function(){return qr})),n.d(i,"Float32Attribute",(function(){return Sf})),n.d(i,"Float32BufferAttribute",(function(){return Yr})),n.d(i,"Float64Attribute",(function(){return Ef})),n.d(i,"Float64BufferAttribute",(function(){return Zr})),n.d(i,"FloatType",(function(){return Ft})),n.d(i,"Fog",(function(){return al})),n.d(i,"FogExp2",(function(){return sl})),n.d(i,"Font",(function(){return Qc})),n.d(i,"FontLoader",(function(){return ed})),n.d(i,"FrontSide",(function(){return x})),n.d(i,"Frustum",(function(){return jo})),n.d(i,"GLBufferAttribute",(function(){return kd})),n.d(i,"GLSL1",(function(){return Gn})),n.d(i,"GLSL3",(function(){return Hn})),n.d(i,"GammaEncoding",(function(){return on})),n.d(i,"GreaterDepth",(function(){return Q})),n.d(i,"GreaterEqualDepth",(function(){return $})),n.d(i,"GreaterEqualStencilFunc",(function(){return Pn})),n.d(i,"GreaterStencilFunc",(function(){return An})),n.d(i,"GridHelper",(function(){return lp})),n.d(i,"Group",(function(){return Qa})),n.d(i,"HalfFloatType",(function(){return Bt})),n.d(i,"HemisphereLight",(function(){return wc})),n.d(i,"HemisphereLightHelper",(function(){return ap})),n.d(i,"HemisphereLightProbe",(function(){return od})),n.d(i,"IcosahedronBufferGeometry",(function(){return bh})),n.d(i,"IcosahedronGeometry",(function(){return bh})),n.d(i,"ImageBitmapLoader",(function(){return Kc})),n.d(i,"ImageLoader",(function(){return mc})),n.d(i,"ImageUtils",(function(){return ri})),n.d(i,"ImmediateRenderObject",(function(){return Jd})),n.d(i,"IncrementStencilOp",(function(){return _n})),n.d(i,"IncrementWrapStencilOp",(function(){return xn})),n.d(i,"InstancedBufferAttribute",(function(){return Wc})),n.d(i,"InstancedBufferGeometry",(function(){return Vc})),n.d(i,"InstancedInterleavedBuffer",(function(){return Ud})),n.d(i,"InstancedMesh",(function(){return Xl})),n.d(i,"Int16Attribute",(function(){return xf})),n.d(i,"Int16BufferAttribute",(function(){return jr})),n.d(i,"Int32Attribute",(function(){return Tf})),n.d(i,"Int32BufferAttribute",(function(){return Wr})),n.d(i,"Int8Attribute",(function(){return vf})),n.d(i,"Int8BufferAttribute",(function(){return Gr})),n.d(i,"IntType",(function(){return Nt})),n.d(i,"InterleavedBuffer",(function(){return ul})),n.d(i,"InterleavedBufferAttribute",(function(){return cl})),n.d(i,"Interpolant",(function(){return qh})),n.d(i,"InterpolateDiscrete",(function(){return We})),n.d(i,"InterpolateLinear",(function(){return Xe})),n.d(i,"InterpolateSmooth",(function(){return qe})),n.d(i,"InvertStencilOp",(function(){return Tn})),n.d(i,"JSONLoader",(function(){return Nf})),n.d(i,"KeepStencilOp",(function(){return gn})),n.d(i,"KeyframeTrack",(function(){return Kh})),n.d(i,"LOD",(function(){return Cl})),n.d(i,"LatheBufferGeometry",(function(){return Th})),n.d(i,"LatheGeometry",(function(){return Th})),n.d(i,"Layers",(function(){return er})),n.d(i,"LensFlare",(function(){return Ff})),n.d(i,"LessDepth",(function(){return Z})),n.d(i,"LessEqualDepth",(function(){return J})),n.d(i,"LessEqualStencilFunc",(function(){return Mn})),n.d(i,"LessStencilFunc",(function(){return Sn})),n.d(i,"Light",(function(){return Tc})),n.d(i,"LightProbe",(function(){return Hc})),n.d(i,"Line",(function(){return Ql})),n.d(i,"Line3",(function(){return Zd})),n.d(i,"LineBasicMaterial",(function(){return ql})),n.d(i,"LineCurve",(function(){return ku})),n.d(i,"LineCurve3",(function(){return Gu})),n.d(i,"LineDashedMaterial",(function(){return Vh})),n.d(i,"LineLoop",(function(){return iu})),n.d(i,"LinePieces",(function(){return nf})),n.d(i,"LineSegments",(function(){return nu})),n.d(i,"LineStrip",(function(){return ef})),n.d(i,"LinearEncoding",(function(){return nn})),n.d(i,"LinearFilter",(function(){return Et})),n.d(i,"LinearInterpolant",(function(){return Zh})),n.d(i,"LinearMipMapLinearFilter",(function(){return Pt})),n.d(i,"LinearMipMapNearestFilter",(function(){return At})),n.d(i,"LinearMipmapLinearFilter",(function(){return Rt})),n.d(i,"LinearMipmapNearestFilter",(function(){return Mt})),n.d(i,"LinearToneMapping",(function(){return ot})),n.d(i,"Loader",(function(){return hc})),n.d(i,"LoaderUtils",(function(){return jc})),n.d(i,"LoadingManager",(function(){return lc})),n.d(i,"LogLuvEncoding",(function(){return an})),n.d(i,"LoopOnce",(function(){return ze})),n.d(i,"LoopPingPong",(function(){return Ve})),n.d(i,"LoopRepeat",(function(){return je})),n.d(i,"LuminanceAlphaFormat",(function(){return Xt})),n.d(i,"LuminanceFormat",(function(){return Wt})),n.d(i,"MOUSE",(function(){return h})),n.d(i,"Material",(function(){return Rr})),n.d(i,"MaterialLoader",(function(){return zc})),n.d(i,"Math",(function(){return ti})),n.d(i,"MathUtils",(function(){return ti})),n.d(i,"Matrix3",(function(){return ni})),n.d(i,"Matrix4",(function(){return Vi})),n.d(i,"MaxEquation",(function(){return D})),n.d(i,"Mesh",(function(){return Eo})),n.d(i,"MeshBasicMaterial",(function(){return Fr})),n.d(i,"MeshDepthMaterial",(function(){return Xa})),n.d(i,"MeshDistanceMaterial",(function(){return qa})),n.d(i,"MeshFaceMaterial",(function(){return af})),n.d(i,"MeshLambertMaterial",(function(){return zh})),n.d(i,"MeshMatcapMaterial",(function(){return jh})),n.d(i,"MeshNormalMaterial",(function(){return Hh})),n.d(i,"MeshPhongMaterial",(function(){return kh})),n.d(i,"MeshPhysicalMaterial",(function(){return Uh})),n.d(i,"MeshStandardMaterial",(function(){return Bh})),n.d(i,"MeshToonMaterial",(function(){return Gh})),n.d(i,"MinEquation",(function(){return N})),n.d(i,"MirroredRepeatWrapping",(function(){return yt})),n.d(i,"MixOperation",(function(){return nt})),n.d(i,"MultiMaterial",(function(){return lf})),n.d(i,"MultiplyBlending",(function(){return P})),n.d(i,"MultiplyOperation",(function(){return et})),n.d(i,"NearestFilter",(function(){return xt})),n.d(i,"NearestMipMapLinearFilter",(function(){return St})),n.d(i,"NearestMipMapNearestFilter",(function(){return Tt})),n.d(i,"NearestMipmapLinearFilter",(function(){return wt})),n.d(i,"NearestMipmapNearestFilter",(function(){return bt})),n.d(i,"NeverDepth",(function(){return q})),n.d(i,"NeverStencilFunc",(function(){return wn})),n.d(i,"NoBlending",(function(){return E})),n.d(i,"NoColors",(function(){return rf})),n.d(i,"NoToneMapping",(function(){return rt})),n.d(i,"NormalAnimationBlendMode",(function(){return Ke})),n.d(i,"NormalBlending",(function(){return M})),n.d(i,"NotEqualDepth",(function(){return tt})),n.d(i,"NotEqualStencilFunc",(function(){return Rn})),n.d(i,"NumberKeyframeTrack",(function(){return tc})),n.d(i,"Object3D",(function(){return mr})),n.d(i,"ObjectLoader",(function(){return qc})),n.d(i,"ObjectSpaceNormalMap",(function(){return fn})),n.d(i,"OctahedronBufferGeometry",(function(){return wh})),n.d(i,"OctahedronGeometry",(function(){return wh})),n.d(i,"OneFactor",(function(){return B})),n.d(i,"OneMinusDstAlphaFactor",(function(){return j})),n.d(i,"OneMinusDstColorFactor",(function(){return W})),n.d(i,"OneMinusSrcAlphaFactor",(function(){return H})),n.d(i,"OneMinusSrcColorFactor",(function(){return k})),n.d(i,"OrthographicCamera",(function(){return Dc})),n.d(i,"PCFShadowMap",(function(){return v})),n.d(i,"PCFSoftShadowMap",(function(){return _})),n.d(i,"PMREMGenerator",(function(){return Xp})),n.d(i,"ParametricBufferGeometry",(function(){return Sh})),n.d(i,"ParametricGeometry",(function(){return Sh})),n.d(i,"Particle",(function(){return hf})),n.d(i,"ParticleBasicMaterial",(function(){return pf})),n.d(i,"ParticleSystem",(function(){return cf})),n.d(i,"ParticleSystemMaterial",(function(){return ff})),n.d(i,"Path",(function(){return xc})),n.d(i,"PerspectiveCamera",(function(){return Lo})),n.d(i,"Plane",(function(){return Go})),n.d(i,"PlaneBufferGeometry",(function(){return Xo})),n.d(i,"PlaneGeometry",(function(){return Xo})),n.d(i,"PlaneHelper",(function(){return bp})),n.d(i,"PointCloud",(function(){return uf})),n.d(i,"PointCloudMaterial",(function(){return df})),n.d(i,"PointLight",(function(){return Nc})),n.d(i,"PointLightHelper",(function(){return ip})),n.d(i,"Points",(function(){return uu})),n.d(i,"PointsMaterial",(function(){return ru})),n.d(i,"PolarGridHelper",(function(){return up})),n.d(i,"PolyhedronBufferGeometry",(function(){return _u})),n.d(i,"PolyhedronGeometry",(function(){return _u})),n.d(i,"PositionalAudio",(function(){return Td})),n.d(i,"PropertyBinding",(function(){return Ld})),n.d(i,"PropertyMixer",(function(){return Sd})),n.d(i,"QuadraticBezierCurve",(function(){return Hu})),n.d(i,"QuadraticBezierCurve3",(function(){return zu})),n.d(i,"Quaternion",(function(){return di})),n.d(i,"QuaternionKeyframeTrack",(function(){return nc})),n.d(i,"QuaternionLinearInterpolant",(function(){return ec})),n.d(i,"REVISION",(function(){return u})),n.d(i,"RGBADepthPacking",(function(){return dn})),n.d(i,"RGBAFormat",(function(){return Vt})),n.d(i,"RGBAIntegerFormat",(function(){return ee})),n.d(i,"RGBA_ASTC_10x10_Format",(function(){return Se})),n.d(i,"RGBA_ASTC_10x5_Format",(function(){return be})),n.d(i,"RGBA_ASTC_10x6_Format",(function(){return Te})),n.d(i,"RGBA_ASTC_10x8_Format",(function(){return we})),n.d(i,"RGBA_ASTC_12x10_Format",(function(){return Ee})),n.d(i,"RGBA_ASTC_12x12_Format",(function(){return Me})),n.d(i,"RGBA_ASTC_4x4_Format",(function(){return pe})),n.d(i,"RGBA_ASTC_5x4_Format",(function(){return fe})),n.d(i,"RGBA_ASTC_5x5_Format",(function(){return me})),n.d(i,"RGBA_ASTC_6x5_Format",(function(){return ge})),n.d(i,"RGBA_ASTC_6x6_Format",(function(){return ve})),n.d(i,"RGBA_ASTC_8x5_Format",(function(){return _e})),n.d(i,"RGBA_ASTC_8x6_Format",(function(){return ye})),n.d(i,"RGBA_ASTC_8x8_Format",(function(){return xe})),n.d(i,"RGBA_BPTC_Format",(function(){return Ae})),n.d(i,"RGBA_ETC2_EAC_Format",(function(){return de})),n.d(i,"RGBA_PVRTC_2BPPV1_Format",(function(){return ue})),n.d(i,"RGBA_PVRTC_4BPPV1_Format",(function(){return le})),n.d(i,"RGBA_S3TC_DXT1_Format",(function(){return ie})),n.d(i,"RGBA_S3TC_DXT3_Format",(function(){return re})),n.d(i,"RGBA_S3TC_DXT5_Format",(function(){return oe})),n.d(i,"RGBDEncoding",(function(){return hn})),n.d(i,"RGBEEncoding",(function(){return sn})),n.d(i,"RGBEFormat",(function(){return qt})),n.d(i,"RGBFormat",(function(){return jt})),n.d(i,"RGBIntegerFormat",(function(){return te})),n.d(i,"RGBM16Encoding",(function(){return un})),n.d(i,"RGBM7Encoding",(function(){return ln})),n.d(i,"RGB_ETC1_Format",(function(){return he})),n.d(i,"RGB_ETC2_Format",(function(){return ce})),n.d(i,"RGB_PVRTC_2BPPV1_Format",(function(){return ae})),n.d(i,"RGB_PVRTC_4BPPV1_Format",(function(){return se})),n.d(i,"RGB_S3TC_DXT1_Format",(function(){return ne})),n.d(i,"RGFormat",(function(){return $t})),n.d(i,"RGIntegerFormat",(function(){return Qt})),n.d(i,"RawShaderMaterial",(function(){return Fh})),n.d(i,"Ray",(function(){return ji})),n.d(i,"Raycaster",(function(){return Gd})),n.d(i,"RectAreaLight",(function(){return kc})),n.d(i,"RedFormat",(function(){return Jt})),n.d(i,"RedIntegerFormat",(function(){return Kt})),n.d(i,"ReinhardToneMapping",(function(){return st})),n.d(i,"RepeatWrapping",(function(){return vt})),n.d(i,"ReplaceStencilOp",(function(){return vn})),n.d(i,"ReverseSubtractEquation",(function(){return L})),n.d(i,"RingBufferGeometry",(function(){return Eh})),n.d(i,"RingGeometry",(function(){return Eh})),n.d(i,"SRGB8_ALPHA8_ASTC_10x10_Format",(function(){return ke})),n.d(i,"SRGB8_ALPHA8_ASTC_10x5_Format",(function(){return Fe})),n.d(i,"SRGB8_ALPHA8_ASTC_10x6_Format",(function(){return Be})),n.d(i,"SRGB8_ALPHA8_ASTC_10x8_Format",(function(){return Ue})),n.d(i,"SRGB8_ALPHA8_ASTC_12x10_Format",(function(){return Ge})),n.d(i,"SRGB8_ALPHA8_ASTC_12x12_Format",(function(){return He})),n.d(i,"SRGB8_ALPHA8_ASTC_4x4_Format",(function(){return Re})),n.d(i,"SRGB8_ALPHA8_ASTC_5x4_Format",(function(){return Pe})),n.d(i,"SRGB8_ALPHA8_ASTC_5x5_Format",(function(){return Ce})),n.d(i,"SRGB8_ALPHA8_ASTC_6x5_Format",(function(){return Ie})),n.d(i,"SRGB8_ALPHA8_ASTC_6x6_Format",(function(){return Oe})),n.d(i,"SRGB8_ALPHA8_ASTC_8x5_Format",(function(){return Le})),n.d(i,"SRGB8_ALPHA8_ASTC_8x6_Format",(function(){return Ne})),n.d(i,"SRGB8_ALPHA8_ASTC_8x8_Format",(function(){return De})),n.d(i,"Scene",(function(){return ll})),n.d(i,"SceneUtils",(function(){return Df})),n.d(i,"ShaderChunk",(function(){return qo})),n.d(i,"ShaderLib",(function(){return Zo})),n.d(i,"ShaderMaterial",(function(){return Io})),n.d(i,"ShadowMaterial",(function(){return Dh})),n.d(i,"Shape",(function(){return bc})),n.d(i,"ShapeBufferGeometry",(function(){return Mh})),n.d(i,"ShapeGeometry",(function(){return Mh})),n.d(i,"ShapePath",(function(){return $c})),n.d(i,"ShapeUtils",(function(){return gh})),n.d(i,"ShortType",(function(){return Ot})),n.d(i,"Skeleton",(function(){return Hl})),n.d(i,"SkeletonHelper",(function(){return np})),n.d(i,"SkinnedMesh",(function(){return Fl})),n.d(i,"SmoothShading",(function(){return S})),n.d(i,"Sphere",(function(){return Di})),n.d(i,"SphereBufferGeometry",(function(){return Ah})),n.d(i,"SphereGeometry",(function(){return Ah})),n.d(i,"Spherical",(function(){return jd})),n.d(i,"SphericalHarmonics3",(function(){return Gc})),n.d(i,"SplineCurve",(function(){return ju})),n.d(i,"SpotLight",(function(){return Pc})),n.d(i,"SpotLightHelper",(function(){return $d})),n.d(i,"Sprite",(function(){return Ml})),n.d(i,"SpriteMaterial",(function(){return dl})),n.d(i,"SrcAlphaFactor",(function(){return G})),n.d(i,"SrcAlphaSaturateFactor",(function(){return X})),n.d(i,"SrcColorFactor",(function(){return U})),n.d(i,"StaticCopyUsage",(function(){return Bn})),n.d(i,"StaticDrawUsage",(function(){return In})),n.d(i,"StaticReadUsage",(function(){return Nn})),n.d(i,"StereoCamera",(function(){return ud})),n.d(i,"StreamCopyUsage",(function(){return kn})),n.d(i,"StreamDrawUsage",(function(){return Ln})),n.d(i,"StreamReadUsage",(function(){return Fn})),n.d(i,"StringKeyframeTrack",(function(){return ic})),n.d(i,"SubtractEquation",(function(){return O})),n.d(i,"SubtractiveBlending",(function(){return R})),n.d(i,"TOUCH",(function(){return c})),n.d(i,"TangentSpaceNormalMap",(function(){return pn})),n.d(i,"TetrahedronBufferGeometry",(function(){return Rh})),n.d(i,"TetrahedronGeometry",(function(){return Rh})),n.d(i,"TextBufferGeometry",(function(){return Ph})),n.d(i,"TextGeometry",(function(){return Ph})),n.d(i,"Texture",(function(){return si})),n.d(i,"TextureLoader",(function(){return _c})),n.d(i,"TorusBufferGeometry",(function(){return Ch})),n.d(i,"TorusGeometry",(function(){return Ch})),n.d(i,"TorusKnotBufferGeometry",(function(){return Ih})),n.d(i,"TorusKnotGeometry",(function(){return Ih})),n.d(i,"Triangle",(function(){return Mr})),n.d(i,"TriangleFanDrawMode",(function(){return en})),n.d(i,"TriangleStripDrawMode",(function(){return tn})),n.d(i,"TrianglesDrawMode",(function(){return Qe})),n.d(i,"TubeBufferGeometry",(function(){return Oh})),n.d(i,"TubeGeometry",(function(){return Oh})),n.d(i,"UVMapping",(function(){return ht})),n.d(i,"Uint16Attribute",(function(){return bf})),n.d(i,"Uint16BufferAttribute",(function(){return Vr})),n.d(i,"Uint32Attribute",(function(){return wf})),n.d(i,"Uint32BufferAttribute",(function(){return Xr})),n.d(i,"Uint8Attribute",(function(){return _f})),n.d(i,"Uint8BufferAttribute",(function(){return Hr})),n.d(i,"Uint8ClampedAttribute",(function(){return yf})),n.d(i,"Uint8ClampedBufferAttribute",(function(){return zr})),n.d(i,"Uniform",(function(){return Bd})),n.d(i,"UniformsLib",(function(){return Yo})),n.d(i,"UniformsUtils",(function(){return Co})),n.d(i,"UnsignedByteType",(function(){return Ct})),n.d(i,"UnsignedInt248Type",(function(){return Ht})),n.d(i,"UnsignedIntType",(function(){return Dt})),n.d(i,"UnsignedShort4444Type",(function(){return Ut})),n.d(i,"UnsignedShort5551Type",(function(){return kt})),n.d(i,"UnsignedShort565Type",(function(){return Gt})),n.d(i,"UnsignedShortType",(function(){return Lt})),n.d(i,"VSMShadowMap",(function(){return y})),n.d(i,"Vector2",(function(){return ei})),n.d(i,"Vector3",(function(){return pi})),n.d(i,"Vector4",(function(){return li})),n.d(i,"VectorKeyframeTrack",(function(){return rc})),n.d(i,"Vertex",(function(){return mf})),n.d(i,"VertexColors",(function(){return sf})),n.d(i,"VideoTexture",(function(){return cu})),n.d(i,"WebGL1Renderer",(function(){return ol})),n.d(i,"WebGLCubeRenderTarget",(function(){return Fo})),n.d(i,"WebGLMultipleRenderTargets",(function(){return hi})),n.d(i,"WebGLMultisampleRenderTarget",(function(){return ci})),n.d(i,"WebGLRenderTarget",(function(){return ui})),n.d(i,"WebGLRenderTargetCube",(function(){return Of})),n.d(i,"WebGLRenderer",(function(){return rl})),n.d(i,"WebGLUtils",(function(){return Ka})),n.d(i,"WireframeGeometry",(function(){return Lh})),n.d(i,"WireframeHelper",(function(){return Pf})),n.d(i,"WrapAroundEnding",(function(){return Je})),n.d(i,"XHRLoader",(function(){return Cf})),n.d(i,"ZeroCurvatureEnding",(function(){return Ye})),n.d(i,"ZeroFactor",(function(){return F})),n.d(i,"ZeroSlopeEnding",(function(){return Ze})),n.d(i,"ZeroStencilOp",(function(){return mn})),n.d(i,"sRGBEncoding",(function(){return rn}));var r={};n.r(r),n.d(r,"isMobile",(function(){return Zg})),n.d(r,"EventEmitter",(function(){return vv.a})),n.d(r,"earcut",(function(){return yv.a})),n.d(r,"BaseTextureCache",(function(){return $v})),n.d(r,"CanvasRenderTarget",(function(){return e_})),n.d(r,"DATA_URI",(function(){return r_})),n.d(r,"ProgramCache",(function(){return Jv})),n.d(r,"TextureCache",(function(){return Kv})),n.d(r,"clearTextureCache",(function(){return t_})),n.d(r,"correctBlendMode",(function(){return Lv})),n.d(r,"createIndicesForQuads",(function(){return Bv})),n.d(r,"decomposeDataUri",(function(){return o_})),n.d(r,"deprecation",(function(){return Zv})),n.d(r,"destroyTextureCache",(function(){return Qv})),n.d(r,"determineCrossOrigin",(function(){return s_})),n.d(r,"getBufferType",(function(){return Uv})),n.d(r,"getResolutionOfUrl",(function(){return a_})),n.d(r,"hex2rgb",(function(){return Rv})),n.d(r,"hex2string",(function(){return Pv})),n.d(r,"interleaveTypedArrays",(function(){return Gv})),n.d(r,"isPow2",(function(){return zv})),n.d(r,"isWebGLSupported",(function(){return Mv})),n.d(r,"log2",(function(){return jv})),n.d(r,"nextPow2",(function(){return Hv})),n.d(r,"premultiplyBlendMode",(function(){return Ov})),n.d(r,"premultiplyRgba",(function(){return Nv})),n.d(r,"premultiplyTint",(function(){return Dv})),n.d(r,"premultiplyTintToRgba",(function(){return Fv})),n.d(r,"removeItems",(function(){return Vv})),n.d(r,"rgb2hex",(function(){return Iv})),n.d(r,"sayHello",(function(){return Ev})),n.d(r,"sign",(function(){return Wv})),n.d(r,"skipHello",(function(){return Sv})),n.d(r,"string2hex",(function(){return Cv})),n.d(r,"trimCanvas",(function(){return n_})),n.d(r,"uid",(function(){return qv})),n.d(r,"url",(function(){return bv}));var o=n(2),s=n(0),a=n.n(s),l=n(1);
|
|
35
|
+
function(){"use strict";var t;HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(t){if(!this.ctx||!this.ctx.listener)return this;for(var e=this._howls.length-1;e>=0;e--)this._howls[e].stereo(t);return this},HowlerGlobal.prototype.pos=function(t,e,n){return this.ctx&&this.ctx.listener?(e="number"!=typeof e?this._pos[1]:e,n="number"!=typeof n?this._pos[2]:n,"number"!=typeof t?this._pos:(this._pos=[t,e,n],void 0!==this.ctx.listener.positionX?(this.ctx.listener.positionX.setTargetAtTime(this._pos[0],Howler.ctx.currentTime,.1),this.ctx.listener.positionY.setTargetAtTime(this._pos[1],Howler.ctx.currentTime,.1),this.ctx.listener.positionZ.setTargetAtTime(this._pos[2],Howler.ctx.currentTime,.1)):this.ctx.listener.setPosition(this._pos[0],this._pos[1],this._pos[2]),this)):this},HowlerGlobal.prototype.orientation=function(t,e,n,i,r,o){if(!this.ctx||!this.ctx.listener)return this;var s=this._orientation;return e="number"!=typeof e?s[1]:e,n="number"!=typeof n?s[2]:n,i="number"!=typeof i?s[3]:i,r="number"!=typeof r?s[4]:r,o="number"!=typeof o?s[5]:o,"number"!=typeof t?s:(this._orientation=[t,e,n,i,r,o],void 0!==this.ctx.listener.forwardX?(this.ctx.listener.forwardX.setTargetAtTime(t,Howler.ctx.currentTime,.1),this.ctx.listener.forwardY.setTargetAtTime(e,Howler.ctx.currentTime,.1),this.ctx.listener.forwardZ.setTargetAtTime(n,Howler.ctx.currentTime,.1),this.ctx.listener.upX.setTargetAtTime(i,Howler.ctx.currentTime,.1),this.ctx.listener.upY.setTargetAtTime(r,Howler.ctx.currentTime,.1),this.ctx.listener.upZ.setTargetAtTime(o,Howler.ctx.currentTime,.1)):this.ctx.listener.setOrientation(t,e,n,i,r,o),this)},Howl.prototype.init=(t=Howl.prototype.init,function(e){return this._orientation=e.orientation||[1,0,0],this._stereo=e.stereo||null,this._pos=e.pos||null,this._pannerAttr={coneInnerAngle:void 0!==e.coneInnerAngle?e.coneInnerAngle:360,coneOuterAngle:void 0!==e.coneOuterAngle?e.coneOuterAngle:360,coneOuterGain:void 0!==e.coneOuterGain?e.coneOuterGain:0,distanceModel:void 0!==e.distanceModel?e.distanceModel:"inverse",maxDistance:void 0!==e.maxDistance?e.maxDistance:1e4,panningModel:void 0!==e.panningModel?e.panningModel:"HRTF",refDistance:void 0!==e.refDistance?e.refDistance:1,rolloffFactor:void 0!==e.rolloffFactor?e.rolloffFactor:1},this._onstereo=e.onstereo?[{fn:e.onstereo}]:[],this._onpos=e.onpos?[{fn:e.onpos}]:[],this._onorientation=e.onorientation?[{fn:e.onorientation}]:[],t.call(this,e)}),Howl.prototype.stereo=function(t,n){var i=this;if(!i._webAudio)return i;if("loaded"!==i._state)return i._queue.push({event:"stereo",action:function(){i.stereo(t,n)}}),i;var r=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===n){if("number"!=typeof t)return i._stereo;i._stereo=t,i._pos=[t,0,0]}for(var o=i._getSoundIds(n),s=0;s<o.length;s++){var a=i._soundById(o[s]);if(a){if("number"!=typeof t)return a._stereo;a._stereo=t,a._pos=[t,0,0],a._node&&(a._pannerAttr.panningModel="equalpower",a._panner&&a._panner.pan||e(a,r),"spatial"===r?void 0!==a._panner.positionX?(a._panner.positionX.setValueAtTime(t,Howler.ctx.currentTime),a._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),a._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):a._panner.setPosition(t,0,0):a._panner.pan.setValueAtTime(t,Howler.ctx.currentTime)),i._emit("stereo",a._id)}}return i},Howl.prototype.pos=function(t,n,i,r){var o=this;if(!o._webAudio)return o;if("loaded"!==o._state)return o._queue.push({event:"pos",action:function(){o.pos(t,n,i,r)}}),o;if(n="number"!=typeof n?0:n,i="number"!=typeof i?-.5:i,void 0===r){if("number"!=typeof t)return o._pos;o._pos=[t,n,i]}for(var s=o._getSoundIds(r),a=0;a<s.length;a++){var l=o._soundById(s[a]);if(l){if("number"!=typeof t)return l._pos;l._pos=[t,n,i],l._node&&(l._panner&&!l._panner.pan||e(l,"spatial"),void 0!==l._panner.positionX?(l._panner.positionX.setValueAtTime(t,Howler.ctx.currentTime),l._panner.positionY.setValueAtTime(n,Howler.ctx.currentTime),l._panner.positionZ.setValueAtTime(i,Howler.ctx.currentTime)):l._panner.setPosition(t,n,i)),o._emit("pos",l._id)}}return o},Howl.prototype.orientation=function(t,n,i,r){var o=this;if(!o._webAudio)return o;if("loaded"!==o._state)return o._queue.push({event:"orientation",action:function(){o.orientation(t,n,i,r)}}),o;if(n="number"!=typeof n?o._orientation[1]:n,i="number"!=typeof i?o._orientation[2]:i,void 0===r){if("number"!=typeof t)return o._orientation;o._orientation=[t,n,i]}for(var s=o._getSoundIds(r),a=0;a<s.length;a++){var l=o._soundById(s[a]);if(l){if("number"!=typeof t)return l._orientation;l._orientation=[t,n,i],l._node&&(l._panner||(l._pos||(l._pos=o._pos||[0,0,-.5]),e(l,"spatial")),void 0!==l._panner.orientationX?(l._panner.orientationX.setValueAtTime(t,Howler.ctx.currentTime),l._panner.orientationY.setValueAtTime(n,Howler.ctx.currentTime),l._panner.orientationZ.setValueAtTime(i,Howler.ctx.currentTime)):l._panner.setOrientation(t,n,i)),o._emit("orientation",l._id)}}return o},Howl.prototype.pannerAttr=function(){var t,n,i,r=this,o=arguments;if(!r._webAudio)return r;if(0===o.length)return r._pannerAttr;if(1===o.length){if("object"!=typeof o[0])return(i=r._soundById(parseInt(o[0],10)))?i._pannerAttr:r._pannerAttr;t=o[0],void 0===n&&(t.pannerAttr||(t.pannerAttr={coneInnerAngle:t.coneInnerAngle,coneOuterAngle:t.coneOuterAngle,coneOuterGain:t.coneOuterGain,distanceModel:t.distanceModel,maxDistance:t.maxDistance,refDistance:t.refDistance,rolloffFactor:t.rolloffFactor,panningModel:t.panningModel}),r._pannerAttr={coneInnerAngle:void 0!==t.pannerAttr.coneInnerAngle?t.pannerAttr.coneInnerAngle:r._coneInnerAngle,coneOuterAngle:void 0!==t.pannerAttr.coneOuterAngle?t.pannerAttr.coneOuterAngle:r._coneOuterAngle,coneOuterGain:void 0!==t.pannerAttr.coneOuterGain?t.pannerAttr.coneOuterGain:r._coneOuterGain,distanceModel:void 0!==t.pannerAttr.distanceModel?t.pannerAttr.distanceModel:r._distanceModel,maxDistance:void 0!==t.pannerAttr.maxDistance?t.pannerAttr.maxDistance:r._maxDistance,refDistance:void 0!==t.pannerAttr.refDistance?t.pannerAttr.refDistance:r._refDistance,rolloffFactor:void 0!==t.pannerAttr.rolloffFactor?t.pannerAttr.rolloffFactor:r._rolloffFactor,panningModel:void 0!==t.pannerAttr.panningModel?t.pannerAttr.panningModel:r._panningModel})}else 2===o.length&&(t=o[0],n=parseInt(o[1],10));for(var s=r._getSoundIds(n),a=0;a<s.length;a++)if(i=r._soundById(s[a])){var l=i._pannerAttr;l={coneInnerAngle:void 0!==t.coneInnerAngle?t.coneInnerAngle:l.coneInnerAngle,coneOuterAngle:void 0!==t.coneOuterAngle?t.coneOuterAngle:l.coneOuterAngle,coneOuterGain:void 0!==t.coneOuterGain?t.coneOuterGain:l.coneOuterGain,distanceModel:void 0!==t.distanceModel?t.distanceModel:l.distanceModel,maxDistance:void 0!==t.maxDistance?t.maxDistance:l.maxDistance,refDistance:void 0!==t.refDistance?t.refDistance:l.refDistance,rolloffFactor:void 0!==t.rolloffFactor?t.rolloffFactor:l.rolloffFactor,panningModel:void 0!==t.panningModel?t.panningModel:l.panningModel};var u=i._panner;u?(u.coneInnerAngle=l.coneInnerAngle,u.coneOuterAngle=l.coneOuterAngle,u.coneOuterGain=l.coneOuterGain,u.distanceModel=l.distanceModel,u.maxDistance=l.maxDistance,u.refDistance=l.refDistance,u.rolloffFactor=l.rolloffFactor,u.panningModel=l.panningModel):(i._pos||(i._pos=r._pos||[0,0,-.5]),e(i,"spatial"))}return r},Sound.prototype.init=function(t){return function(){var e=this._parent;this._orientation=e._orientation,this._stereo=e._stereo,this._pos=e._pos,this._pannerAttr=e._pannerAttr,t.call(this),this._stereo?e.stereo(this._stereo):this._pos&&e.pos(this._pos[0],this._pos[1],this._pos[2],this._id)}}(Sound.prototype.init),Sound.prototype.reset=function(t){return function(){var e=this._parent;return this._orientation=e._orientation,this._stereo=e._stereo,this._pos=e._pos,this._pannerAttr=e._pannerAttr,this._stereo?e.stereo(this._stereo):this._pos?e.pos(this._pos[0],this._pos[1],this._pos[2],this._id):this._panner&&(this._panner.disconnect(0),this._panner=void 0,e._refreshBuffer(this)),t.call(this)}}(Sound.prototype.reset);var e=function(t,e){"spatial"===(e=e||"spatial")?(t._panner=Howler.ctx.createPanner(),t._panner.coneInnerAngle=t._pannerAttr.coneInnerAngle,t._panner.coneOuterAngle=t._pannerAttr.coneOuterAngle,t._panner.coneOuterGain=t._pannerAttr.coneOuterGain,t._panner.distanceModel=t._pannerAttr.distanceModel,t._panner.maxDistance=t._pannerAttr.maxDistance,t._panner.refDistance=t._pannerAttr.refDistance,t._panner.rolloffFactor=t._pannerAttr.rolloffFactor,t._panner.panningModel=t._pannerAttr.panningModel,void 0!==t._panner.positionX?(t._panner.positionX.setValueAtTime(t._pos[0],Howler.ctx.currentTime),t._panner.positionY.setValueAtTime(t._pos[1],Howler.ctx.currentTime),t._panner.positionZ.setValueAtTime(t._pos[2],Howler.ctx.currentTime)):t._panner.setPosition(t._pos[0],t._pos[1],t._pos[2]),void 0!==t._panner.orientationX?(t._panner.orientationX.setValueAtTime(t._orientation[0],Howler.ctx.currentTime),t._panner.orientationY.setValueAtTime(t._orientation[1],Howler.ctx.currentTime),t._panner.orientationZ.setValueAtTime(t._orientation[2],Howler.ctx.currentTime)):t._panner.setOrientation(t._orientation[0],t._orientation[1],t._orientation[2])):(t._panner=Howler.ctx.createStereoPanner(),t._panner.pan.setValueAtTime(t._stereo,Howler.ctx.currentTime)),t._panner.connect(t._node),t._paused||t._parent.pause(t._id,!0).play(t._id,!0)}}()}).call(this,n(4))},function(t,e){t.exports="varying vec2 vTextureCoord;\nvarying vec2 vVertexPosition;\nvarying float vPercent;\nvarying float vDirection;\nvarying float vTransition;\nuniform sampler2D uSampler;\nvoid main() {\n\tvec4 outputColor;\n\tfloat percent = vPercent;\n\tfloat direction = vDirection;\n\tif (vTransition < 0.0) {\n\t\tpercent = 1.0 - percent;\n\t\tif ((vDirection > 1.5) && (vDirection < 2.5)) {\n\t\t\tdirection = 1.0;\n\t\t}\n\t\telse if ((vDirection > 0.5) && (vDirection < 1.5)) {\n\t\t\tdirection = 2.0;\n\t\t}\n\t\telse if ((vDirection > 2.5) && (vDirection < 3.5)) {\n\t\t\tdirection = 4.0;\n\t\t}\n\t\telse {\n\t\t\tdirection = 3.0;\n\t\t}\n\t}\n\tif ((direction > 1.5) && (direction < 2.5)) {\n\t\tif (vVertexPosition.y >= (1.0 - percent)) {\n\t\t\toutputColor = texture2D(uSampler, vTextureCoord);\n\t\t}\n\t\telse {\n\t\t\toutputColor = vec4(0.0, 0.0, 0.0, 0.0);\n\t\t}\n\t\tif ((vVertexPosition.y >= (1.0 - percent)) && (vVertexPosition.y <= ((1.0 - percent) + 0.2))) {\n\t\t\toutputColor = outputColor * ((vVertexPosition.y - (1.0 - percent)) / 0.2);\n\t\t}\n\t}\n\telse if ((direction > 0.5) && (direction < 1.5)) {\n\t\tif (vVertexPosition.y <= percent) {\n\t\t\toutputColor = texture2D(uSampler, vTextureCoord);\n\t\t}\n\t\telse {\n\t\t\toutputColor = vec4(0.0, 0.0, 0.0, 0.0);\n\t\t}\n\t\tif ((vVertexPosition.y <= percent) && (vVertexPosition.y >= (percent - 0.2))) {\n\t\t\toutputColor = outputColor * (1.0 - ((vVertexPosition.y - (percent - 0.2)) / 0.2));\n\t\t}\n\t}\n\telse if ((direction > 2.5) && (direction < 3.5)) {\n\t\tif (vVertexPosition.x <= percent) {\n\t\t\toutputColor = texture2D(uSampler, vTextureCoord);\n\t\t}\n\t\telse {\n\t\t\toutputColor = vec4(0.0, 0.0, 0.0, 0.0);\n\t\t}\n\t\tif ((vVertexPosition.x <= percent) && (vVertexPosition.x >= (percent - 0.2))) {\n\t\t\toutputColor = outputColor * (1.0 - ((vVertexPosition.x - (percent - 0.2)) / 0.2));\n\t\t}\n\t}\n\telse {\n\t\tif (vVertexPosition.x >= (1.0 - percent)) {\n\t\t\toutputColor = texture2D(uSampler, vTextureCoord);\n\t\t}\n\t\telse {\n\t\t\toutputColor = vec4(0.0, 0.0, 0.0, 0.0);\n\t\t}\n\t\tif ((vVertexPosition.x >= (1.0 - percent)) && (vVertexPosition.x <= ((1.0 - percent) + 0.2))) {\n\t\t\toutputColor = outputColor * ((vVertexPosition.x - (1.0 - percent)) / 0.2);\n\t\t}\n\t}\n\tgl_FragColor = outputColor;\n}\n"},function(t,e){t.exports="attribute vec2 aVertexPosition;\nuniform mat3 projectionMatrix;\nvarying vec2 vTextureCoord;\nvarying vec2 vVertexPosition;\nvarying float vPercent;\nvarying float vDirection;\nvarying float vTransition;\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\nuniform float percent;\nuniform float direction;\nuniform float transition;\nvec4 filterVertexPosition() {\n\tvec2 position = (aVertexPosition * max(outputFrame.zw, vec2(0.))) + outputFrame.xy;\n\treturn vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\nvec2 filterTextureCoord(vec2 aVertexPosition) {\n\treturn aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\nvoid main() {\n\tvTransition = transition;\n\tvDirection = direction;\n\tvPercent = percent;\n\tvVertexPosition = aVertexPosition;\n\tvec2 localVertexPosition = aVertexPosition;\n\tgl_Position = filterVertexPosition();\n\tvTextureCoord = filterTextureCoord(localVertexPosition);\n}\n"},function(t,e){t.exports="varying vec2 vTextureCoord;\nuniform float percent;\nuniform sampler2D uSampler;\nuniform float transition;\nvoid main() {\n\tfloat alpha = (transition * (percent - 0.5)) + 0.5;\n\tvec4 color1 = texture2D(uSampler, vTextureCoord);\n\tgl_FragColor = color1 * alpha;\n}\n"},function(t,e,n){var i;!function(r,o){"use strict";var s="model",a="name",l="type",u="vendor",h="version",c="mobile",d="tablet",p="smarttv",f=function(t){for(var e={},n=0;n<t.length;n++)e[t[n].toUpperCase()]=t[n];return e},m=function(t,e){return"string"==typeof t&&-1!==g(e).indexOf(g(t))},g=function(t){return t.toLowerCase()},v=function(t,e){if("string"==typeof t)return t=t.replace(/^\s\s*/,"").replace(/\s\s*$/,""),void 0===e?t:t.substring(0,255)},_=function(t,e){for(var n,i,r,o,s,a,l=0;l<e.length&&!s;){var u=e[l],h=e[l+1];for(n=i=0;n<u.length&&!s;)if(s=u[n++].exec(t))for(r=0;r<h.length;r++)a=s[++i],"object"==typeof(o=h[r])&&o.length>0?2===o.length?"function"==typeof o[1]?this[o[0]]=o[1].call(this,a):this[o[0]]=o[1]:3===o.length?"function"!=typeof o[1]||o[1].exec&&o[1].test?this[o[0]]=a?a.replace(o[1],o[2]):void 0:this[o[0]]=a?o[1].call(this,a,o[2]):void 0:4===o.length&&(this[o[0]]=a?o[3].call(this,a.replace(o[1],o[2])):void 0):this[o]=a||void 0;l+=2}},y=function(t,e){for(var n in e)if("object"==typeof e[n]&&e[n].length>0){for(var i=0;i<e[n].length;i++)if(m(e[n][i],t))return"?"===n?void 0:n}else if(m(e[n],t))return"?"===n?void 0:n;return t},x={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},b={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[a,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[a,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[a,h],[/opios[\/ ]+([\w\.]+)/i],[h,[a,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[h,[a,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[a,h],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[a,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[h,[a,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[h,[a,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[a,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[a,"IE"]],[/yabrowser\/([\w\.]+)/i],[h,[a,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[a,/(.+)/,"$1 Secure Browser"],h],[/\bfocus\/([\w\.]+)/i],[h,[a,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[h,[a,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[a,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[a,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[a,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[a,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[h,[a,"Firefox"]],[/\bqihu|(qi?ho?o?|360)browser/i],[[a,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[a,/(.+)/,"$1 Browser"],h],[/(comodo_dragon)\/([\w\.]+)/i],[[a,/_/g," "],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[a,h],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[a],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[a,"Facebook"],h],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[a,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[a,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[a,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[a,"Chrome WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[a,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[a,h],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[h,[a,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[h,a],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[a,[h,y,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[a,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[a,"Netscape"],h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[a,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[a,h]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",g]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[["architecture","arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[["architecture","armhf"]],[/windows (ce|mobile); ppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[["architecture",/ower/,"",g]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[["architecture",g]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[s,[u,"Samsung"],[l,d]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[s,[u,"Samsung"],[l,c]],[/\((ip(?:hone|od)[\w ]*);/i],[s,[u,"Apple"],[l,c]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[s,[u,"Apple"],[l,d]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[s,[u,"Huawei"],[l,d]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[s,[u,"Huawei"],[l,c]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[s,/_/g," "],[u,"Xiaomi"],[l,c]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[s,/_/g," "],[u,"Xiaomi"],[l,d]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[s,[u,"OPPO"],[l,c]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[s,[u,"Vivo"],[l,c]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[s,[u,"Realme"],[l,c]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[s,[u,"Motorola"],[l,c]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[s,[u,"Motorola"],[l,d]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[s,[u,"LG"],[l,d]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[s,[u,"LG"],[l,c]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[s,[u,"Lenovo"],[l,d]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[s,/_/g," "],[u,"Nokia"],[l,c]],[/(pixel c)\b/i],[s,[u,"Google"],[l,d]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[s,[u,"Google"],[l,c]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[s,[u,"Sony"],[l,c]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[s,"Xperia Tablet"],[u,"Sony"],[l,d]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[s,[u,"OnePlus"],[l,c]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[s,[u,"Amazon"],[l,d]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[s,/(.+)/g,"Fire Phone $1"],[u,"Amazon"],[l,c]],[/(playbook);[-\w\),; ]+(rim)/i],[s,u,[l,d]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[s,[u,"BlackBerry"],[l,c]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[s,[u,"ASUS"],[l,d]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[s,[u,"ASUS"],[l,c]],[/(nexus 9)/i],[s,[u,"HTC"],[l,d]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[u,[s,/_/g," "],[l,c]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[s,[u,"Acer"],[l,d]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[s,[u,"Meizu"],[l,c]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[s,[u,"Sharp"],[l,c]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[u,s,[l,c]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[u,s,[l,d]],[/(surface duo)/i],[s,[u,"Microsoft"],[l,d]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[s,[u,"Fairphone"],[l,c]],[/(u304aa)/i],[s,[u,"AT&T"],[l,c]],[/\bsie-(\w*)/i],[s,[u,"Siemens"],[l,c]],[/\b(rct\w+) b/i],[s,[u,"RCA"],[l,d]],[/\b(venue[\d ]{2,7}) b/i],[s,[u,"Dell"],[l,d]],[/\b(q(?:mv|ta)\w+) b/i],[s,[u,"Verizon"],[l,d]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[s,[u,"Barnes & Noble"],[l,d]],[/\b(tm\d{3}\w+) b/i],[s,[u,"NuVision"],[l,d]],[/\b(k88) b/i],[s,[u,"ZTE"],[l,d]],[/\b(nx\d{3}j) b/i],[s,[u,"ZTE"],[l,c]],[/\b(gen\d{3}) b.+49h/i],[s,[u,"Swiss"],[l,c]],[/\b(zur\d{3}) b/i],[s,[u,"Swiss"],[l,d]],[/\b((zeki)?tb.*\b) b/i],[s,[u,"Zeki"],[l,d]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[u,"Dragon Touch"],s,[l,d]],[/\b(ns-?\w{0,9}) b/i],[s,[u,"Insignia"],[l,d]],[/\b((nxa|next)-?\w{0,9}) b/i],[s,[u,"NextBook"],[l,d]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[u,"Voice"],s,[l,c]],[/\b(lvtel\-)?(v1[12]) b/i],[[u,"LvTel"],s,[l,c]],[/\b(ph-1) /i],[s,[u,"Essential"],[l,c]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[s,[u,"Envizen"],[l,d]],[/\b(trio[-\w\. ]+) b/i],[s,[u,"MachSpeed"],[l,d]],[/\btu_(1491) b/i],[s,[u,"Rotor"],[l,d]],[/(shield[\w ]+) b/i],[s,[u,"Nvidia"],[l,d]],[/(sprint) (\w+)/i],[u,s,[l,c]],[/(kin\.[onetw]{3})/i],[[s,/\./g," "],[u,"Microsoft"],[l,c]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[s,[u,"Zebra"],[l,d]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[s,[u,"Zebra"],[l,c]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[u,s,[l,"console"]],[/droid.+; (shield) bui/i],[s,[u,"Nvidia"],[l,"console"]],[/(playstation [345portablevi]+)/i],[s,[u,"Sony"],[l,"console"]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[s,[u,"Microsoft"],[l,"console"]],[/smart-tv.+(samsung)/i],[u,[l,p]],[/hbbtv.+maple;(\d+)/i],[[s,/^/,"SmartTV"],[u,"Samsung"],[l,p]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,"LG"],[l,p]],[/(apple) ?tv/i],[u,[s,"Apple TV"],[l,p]],[/crkey/i],[[s,"Chromecast"],[u,"Google"],[l,p]],[/droid.+aft(\w)( bui|\))/i],[s,[u,"Amazon"],[l,p]],[/\(dtv[\);].+(aquos)/i],[s,[u,"Sharp"],[l,p]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[u,v],[s,v],[l,p]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[l,p]],[/((pebble))app/i],[u,s,[l,"wearable"]],[/droid.+; (glass) \d/i],[s,[u,"Google"],[l,"wearable"]],[/droid.+; (wt63?0{2,3})\)/i],[s,[u,"Zebra"],[l,"wearable"]],[/(quest( 2)?)/i],[s,[u,"Facebook"],[l,"wearable"]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[u,[l,"embedded"]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[s,[l,c]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[s,[l,d]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[l,d]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[l,c]],[/(android[-\w\. ]{0,9});.+buil/i],[s,[u,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[a,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[a,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[a,h],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,a]],os:[[/microsoft (windows) (vista|xp)/i],[a,h],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[a,[h,y,x]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[a,"Windows"],[h,y,x]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[a,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[a,"Mac OS"],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[h,a],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[a,h],[/\(bb(10);/i],[h,[a,"BlackBerry"]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h,[a,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[a,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[a,"webOS"]],[/crkey\/([\d\.]+)/i],[h,[a,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[a,"Chromium OS"],h],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[a,h],[/(sunos) ?([\w\.\d]*)/i],[[a,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[a,h]]},T=function(t,e){if("object"==typeof t&&(e=t,t=void 0),!(this instanceof T))return new T(t,e).getResult();var n=t||(void 0!==r&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:""),i=e?function(t,e){var n={};for(var i in t)e[i]&&e[i].length%2==0?n[i]=e[i].concat(t[i]):n[i]=t[i];return n}(b,e):b;return this.getBrowser=function(){var t,e={};return e[a]=void 0,e[h]=void 0,_.call(e,n,i.browser),e.major="string"==typeof(t=e.version)?t.replace(/[^\d\.]/g,"").split(".")[0]:void 0,e},this.getCPU=function(){var t={architecture:void 0};return _.call(t,n,i.cpu),t},this.getDevice=function(){var t={vendor:void 0,model:void 0,type:void 0};return _.call(t,n,i.device),t},this.getEngine=function(){var t={name:void 0,version:void 0};return _.call(t,n,i.engine),t},this.getOS=function(){var t={name:void 0,version:void 0};return _.call(t,n,i.os),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(t){return n="string"==typeof t&&t.length>255?v(t,255):t,this},this.setUA(n),this};T.VERSION="1.0.2",T.BROWSER=f([a,h,"major"]),T.CPU=f(["architecture"]),T.DEVICE=f([s,u,l,"console",c,p,d,"wearable","embedded"]),T.ENGINE=T.OS=f([a,h]),void 0!==e?(void 0!==t&&t.exports&&(e=t.exports=T),e.UAParser=T):n(63)?void 0===(i=function(){return T}.call(e,n,e,t))||(t.exports=i):void 0!==r&&(r.UAParser=T);var w=void 0!==r&&(r.jQuery||r.Zepto);if(w&&!w.ua){var S=new T;w.ua=S.getResult(),w.ua.get=function(){return S.getUA()},w.ua.set=function(t){S.setUA(t);var e=S.getResult();for(var n in e)w.ua[n]=e[n]}}}("object"==typeof window?window:this)},function(t,e,n){(function(t){var i=void 0!==t&&t||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(55),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(4))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var i,r,o,s,a,l=1,u={},h=!1,c=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?i=function(t){e.nextTick((function(){f(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){f(t.data)},i=function(t){o.port2.postMessage(t)}):c&&"onreadystatechange"in c.createElement("script")?(r=c.documentElement,i=function(t){var e=c.createElement("script");e.onreadystatechange=function(){f(t),e.onreadystatechange=null,r.removeChild(e),e=null},r.appendChild(e)}):i=function(t){setTimeout(f,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&f(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),i=function(e){t.postMessage(s+e,"*")}),d.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var r={callback:t,args:e};return u[l]=r,i(l),l++},d.clearImmediate=p}function p(t){delete u[t]}function f(t){if(h)setTimeout(f,0,t);else{var e=u[t];if(e){h=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(void 0,n)}}(e)}finally{p(t),h=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(4),n(56))},function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var l,u=[],h=!1,c=-1;function d(){h&&l&&(h=!1,l.length?u=l.concat(u):c=-1,u.length&&p())}function p(){if(!h){var t=a(d);h=!0;for(var e=u.length;e;){for(l=u,u=[];++c<e;)l&&l[c].run();c=-1,e=u.length}l=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||h||a(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(t,e,n){(function(t,i){var r;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof i&&i;s.global!==s&&s.window!==s&&s.self;var a,l=2147483647,u=/^xn--/,h=/[^\x20-\x7E]/,c=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,f=String.fromCharCode;function m(t){throw new RangeError(d[t])}function g(t,e){for(var n=t.length,i=[];n--;)i[n]=e(t[n]);return i}function v(t,e){var n=t.split("@"),i="";return n.length>1&&(i=n[0]+"@",t=n[1]),i+g((t=t.replace(c,".")).split("."),e).join(".")}function _(t){for(var e,n,i=[],r=0,o=t.length;r<o;)(e=t.charCodeAt(r++))>=55296&&e<=56319&&r<o?56320==(64512&(n=t.charCodeAt(r++)))?i.push(((1023&e)<<10)+(1023&n)+65536):(i.push(e),r--):i.push(e);return i}function y(t){return g(t,(function(t){var e="";return t>65535&&(e+=f((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=f(t)})).join("")}function x(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function b(t,e,n){var i=0;for(t=n?p(t/700):t>>1,t+=p(t/e);t>455;i+=36)t=p(t/35);return p(i+36*t/(t+38))}function T(t){var e,n,i,r,o,s,a,u,h,c,d,f=[],g=t.length,v=0,_=128,x=72;for((n=t.lastIndexOf("-"))<0&&(n=0),i=0;i<n;++i)t.charCodeAt(i)>=128&&m("not-basic"),f.push(t.charCodeAt(i));for(r=n>0?n+1:0;r<g;){for(o=v,s=1,a=36;r>=g&&m("invalid-input"),((u=(d=t.charCodeAt(r++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||u>p((l-v)/s))&&m("overflow"),v+=u*s,!(u<(h=a<=x?1:a>=x+26?26:a-x));a+=36)s>p(l/(c=36-h))&&m("overflow"),s*=c;x=b(v-o,e=f.length+1,0==o),p(v/e)>l-_&&m("overflow"),_+=p(v/e),v%=e,f.splice(v++,0,_)}return y(f)}function w(t){var e,n,i,r,o,s,a,u,h,c,d,g,v,y,T,w=[];for(g=(t=_(t)).length,e=128,n=0,o=72,s=0;s<g;++s)(d=t[s])<128&&w.push(f(d));for(i=r=w.length,r&&w.push("-");i<g;){for(a=l,s=0;s<g;++s)(d=t[s])>=e&&d<a&&(a=d);for(a-e>p((l-n)/(v=i+1))&&m("overflow"),n+=(a-e)*v,e=a,s=0;s<g;++s)if((d=t[s])<e&&++n>l&&m("overflow"),d==e){for(u=n,h=36;!(u<(c=h<=o?1:h>=o+26?26:h-o));h+=36)T=u-c,y=36-c,w.push(f(x(c+T%y,0))),u=p(T/y);w.push(f(x(u,0))),o=b(n,v,i==r),n=0,++i}++n,++e}return w.join("")}a={version:"1.4.1",ucs2:{decode:_,encode:y},decode:T,encode:w,toASCII:function(t){return v(t,(function(t){return h.test(t)?"xn--"+w(t):t}))},toUnicode:function(t){return v(t,(function(t){return u.test(t)?T(t.slice(4).toLowerCase()):t}))}},void 0===(r=function(){return a}.call(e,n,e,t))||(t.exports=r)}()}).call(this,n(7)(t),n(4))},function(t,e,n){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,n){"use strict";e.decode=e.parse=n(60),e.encode=e.stringify=n(61)},function(t,e,n){"use strict";function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,o){e=e||"&",n=n||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var u=t.length;l>0&&u>l&&(u=l);for(var h=0;h<u;++h){var c,d,p,f,m=t[h].replace(a,"%20"),g=m.indexOf(n);g>=0?(c=m.substr(0,g),d=m.substr(g+1)):(c=m,d=""),p=decodeURIComponent(c),f=decodeURIComponent(d),i(s,p)?r(s[p])?s[p].push(f):s[p]=[s[p],f]:s[p]=f}return s};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";var i=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,a){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?o(s(t),(function(s){var a=encodeURIComponent(i(s))+n;return r(t[s])?o(t[s],(function(t){return a+encodeURIComponent(i(t))})).join(e):a+encodeURIComponent(i(t[s]))})).join(e):a?encodeURIComponent(i(a))+n+encodeURIComponent(i(t)):""};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var n=[],i=0;i<t.length;i++)n.push(e(t[i],i));return n}var s=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},function(t,e){var n=function(){};n.prototype={fit:function(t){var e,n,i,r,o=t.length,s=o>0?t[0].width:0,a=o>0?t[0].height:0;for(this.root={x:0,y:0,width:s,height:a},e=0;e<o;e++)i=t[e],(n=this.findNode(this.root,i.width,i.height))?(r=this.splitNode(n,i.width,i.height),i.x=r.x,i.y=r.y):(r=this.growNode(i.width,i.height),i.x=r.x,i.y=r.y)},findNode:function(t,e,n){return t.used?this.findNode(t.right,e,n)||this.findNode(t.down,e,n):e<=t.width&&n<=t.height?t:null},splitNode:function(t,e,n){return t.used=!0,t.down={x:t.x,y:t.y+n,width:t.width,height:t.height-n},t.right={x:t.x+e,y:t.y,width:t.width-e,height:n},t},growNode:function(t,e){var n=t<=this.root.width,i=e<=this.root.height,r=i&&this.root.height>=this.root.width+t,o=n&&this.root.width>=this.root.height+e;return r?this.growRight(t,e):o?this.growDown(t,e):i?this.growRight(t,e):n?this.growDown(t,e):null},growRight:function(t,e){var n;return this.root={used:!0,x:0,y:0,width:this.root.width+t,height:this.root.height,down:this.root,right:{x:this.root.width,y:0,width:t,height:this.root.height}},(n=this.findNode(this.root,t,e))?this.splitNode(n,t,e):null},growDown:function(t,e){var n;return this.root={used:!0,x:0,y:0,width:this.root.width,height:this.root.height+e,down:{x:0,y:this.root.height,width:this.root.width,height:e},right:this.root},(n=this.findNode(this.root,t,e))?this.splitNode(n,t,e):null}},t.exports=n},function(t,e){(function(e){t.exports=e}).call(this,{})},function(t,e,n){"use strict";n.r(e),n.d(e,"ErrorType",(function(){return VE})),n.d(e,"delay",(function(){return nI})),n.d(e,"waitUntil",(function(){return iI})),n.d(e,"SLIDE_EVENTS",(function(){return rI})),n.d(e,"Slide",(function(){return aI}));var i={};n.r(i),n.d(i,"ACESFilmicToneMapping",(function(){return lt})),n.d(i,"AddEquation",(function(){return I})),n.d(i,"AddOperation",(function(){return it})),n.d(i,"AdditiveAnimationBlendMode",(function(){return $e})),n.d(i,"AdditiveBlending",(function(){return A})),n.d(i,"AlphaFormat",(function(){return zt})),n.d(i,"AlwaysDepth",(function(){return Y})),n.d(i,"AlwaysStencilFunc",(function(){return Cn})),n.d(i,"AmbientLight",(function(){return Uc})),n.d(i,"AmbientLightProbe",(function(){return sd})),n.d(i,"AnimationClip",(function(){return oc})),n.d(i,"AnimationLoader",(function(){return pc})),n.d(i,"AnimationMixer",(function(){return Fd})),n.d(i,"AnimationObjectGroup",(function(){return Nd})),n.d(i,"AnimationUtils",(function(){return Xh})),n.d(i,"ArcCurve",(function(){return Au})),n.d(i,"ArrayCamera",(function(){return $a})),n.d(i,"ArrowHelper",(function(){return Ep})),n.d(i,"Audio",(function(){return vd})),n.d(i,"AudioAnalyser",(function(){return wd})),n.d(i,"AudioContext",(function(){return id})),n.d(i,"AudioListener",(function(){return gd})),n.d(i,"AudioLoader",(function(){return rd})),n.d(i,"AxesHelper",(function(){return Mp})),n.d(i,"AxisHelper",(function(){return Mf})),n.d(i,"BackSide",(function(){return b})),n.d(i,"BasicDepthPacking",(function(){return cn})),n.d(i,"BasicShadowMap",(function(){return g})),n.d(i,"BinaryTextureLoader",(function(){return If})),n.d(i,"Bone",(function(){return Bl})),n.d(i,"BooleanKeyframeTrack",(function(){return $h})),n.d(i,"BoundingBoxHelper",(function(){return Af})),n.d(i,"Box2",(function(){return Xd})),n.d(i,"Box3",(function(){return gi})),n.d(i,"Box3Helper",(function(){return xp})),n.d(i,"BoxBufferGeometry",(function(){return Ao})),n.d(i,"BoxGeometry",(function(){return Ao})),n.d(i,"BoxHelper",(function(){return yp})),n.d(i,"BufferAttribute",(function(){return kr})),n.d(i,"BufferGeometry",(function(){return so})),n.d(i,"BufferGeometryLoader",(function(){return Xc})),n.d(i,"ByteType",(function(){return It})),n.d(i,"Cache",(function(){return ac})),n.d(i,"Camera",(function(){return Oo})),n.d(i,"CameraHelper",(function(){return gp})),n.d(i,"CanvasRenderer",(function(){return Lf})),n.d(i,"CanvasTexture",(function(){return pu})),n.d(i,"CatmullRomCurve3",(function(){return Lu})),n.d(i,"CineonToneMapping",(function(){return at})),n.d(i,"CircleBufferGeometry",(function(){return mu})),n.d(i,"CircleGeometry",(function(){return mu})),n.d(i,"ClampToEdgeWrapping",(function(){return _t})),n.d(i,"Clock",(function(){return hd})),n.d(i,"Color",(function(){return Dr})),n.d(i,"ColorKeyframeTrack",(function(){return Qh})),n.d(i,"CompressedTexture",(function(){return du})),n.d(i,"CompressedTextureLoader",(function(){return fc})),n.d(i,"ConeBufferGeometry",(function(){return vu})),n.d(i,"ConeGeometry",(function(){return vu})),n.d(i,"CubeCamera",(function(){return No})),n.d(i,"CubeReflectionMapping",(function(){return ct})),n.d(i,"CubeRefractionMapping",(function(){return dt})),n.d(i,"CubeTexture",(function(){return Do})),n.d(i,"CubeTextureLoader",(function(){return gc})),n.d(i,"CubeUVReflectionMapping",(function(){return mt})),n.d(i,"CubeUVRefractionMapping",(function(){return gt})),n.d(i,"CubicBezierCurve",(function(){return Bu})),n.d(i,"CubicBezierCurve3",(function(){return Uu})),n.d(i,"CubicInterpolant",(function(){return Yh})),n.d(i,"CullFaceBack",(function(){return p})),n.d(i,"CullFaceFront",(function(){return f})),n.d(i,"CullFaceFrontBack",(function(){return m})),n.d(i,"CullFaceNone",(function(){return d})),n.d(i,"Curve",(function(){return Eu})),n.d(i,"CurvePath",(function(){return yc})),n.d(i,"CustomBlending",(function(){return C})),n.d(i,"CustomToneMapping",(function(){return ut})),n.d(i,"CylinderBufferGeometry",(function(){return gu})),n.d(i,"CylinderGeometry",(function(){return gu})),n.d(i,"Cylindrical",(function(){return Vd})),n.d(i,"DataTexture",(function(){return Ul})),n.d(i,"DataTexture2DArray",(function(){return hs})),n.d(i,"DataTexture3D",(function(){return cs})),n.d(i,"DataTextureLoader",(function(){return vc})),n.d(i,"DataUtils",(function(){return Pp})),n.d(i,"DecrementStencilOp",(function(){return yn})),n.d(i,"DecrementWrapStencilOp",(function(){return bn})),n.d(i,"DefaultLoadingManager",(function(){return uc})),n.d(i,"DepthFormat",(function(){return Yt})),n.d(i,"DepthStencilFormat",(function(){return Zt})),n.d(i,"DepthTexture",(function(){return fu})),n.d(i,"DirectionalLight",(function(){return Bc})),n.d(i,"DirectionalLightHelper",(function(){return pp})),n.d(i,"DiscreteInterpolant",(function(){return Jh})),n.d(i,"DodecahedronBufferGeometry",(function(){return yu})),n.d(i,"DodecahedronGeometry",(function(){return yu})),n.d(i,"DoubleSide",(function(){return T})),n.d(i,"DstAlphaFactor",(function(){return z})),n.d(i,"DstColorFactor",(function(){return V})),n.d(i,"DynamicBufferAttribute",(function(){return gf})),n.d(i,"DynamicCopyUsage",(function(){return Un})),n.d(i,"DynamicDrawUsage",(function(){return On})),n.d(i,"DynamicReadUsage",(function(){return Dn})),n.d(i,"EdgesGeometry",(function(){return Su})),n.d(i,"EdgesHelper",(function(){return Rf})),n.d(i,"EllipseCurve",(function(){return Mu})),n.d(i,"EqualDepth",(function(){return K})),n.d(i,"EqualStencilFunc",(function(){return En})),n.d(i,"EquirectangularReflectionMapping",(function(){return pt})),n.d(i,"EquirectangularRefractionMapping",(function(){return ft})),n.d(i,"Euler",(function(){return tr})),n.d(i,"EventDispatcher",(function(){return zn})),n.d(i,"ExtrudeBufferGeometry",(function(){return yh})),n.d(i,"ExtrudeGeometry",(function(){return yh})),n.d(i,"FaceColors",(function(){return of})),n.d(i,"FileLoader",(function(){return dc})),n.d(i,"FlatShading",(function(){return w})),n.d(i,"Float16BufferAttribute",(function(){return qr})),n.d(i,"Float32Attribute",(function(){return Sf})),n.d(i,"Float32BufferAttribute",(function(){return Yr})),n.d(i,"Float64Attribute",(function(){return Ef})),n.d(i,"Float64BufferAttribute",(function(){return Zr})),n.d(i,"FloatType",(function(){return Ft})),n.d(i,"Fog",(function(){return al})),n.d(i,"FogExp2",(function(){return sl})),n.d(i,"Font",(function(){return Qc})),n.d(i,"FontLoader",(function(){return ed})),n.d(i,"FrontSide",(function(){return x})),n.d(i,"Frustum",(function(){return jo})),n.d(i,"GLBufferAttribute",(function(){return kd})),n.d(i,"GLSL1",(function(){return Gn})),n.d(i,"GLSL3",(function(){return Hn})),n.d(i,"GammaEncoding",(function(){return on})),n.d(i,"GreaterDepth",(function(){return Q})),n.d(i,"GreaterEqualDepth",(function(){return $})),n.d(i,"GreaterEqualStencilFunc",(function(){return Pn})),n.d(i,"GreaterStencilFunc",(function(){return An})),n.d(i,"GridHelper",(function(){return lp})),n.d(i,"Group",(function(){return Qa})),n.d(i,"HalfFloatType",(function(){return Bt})),n.d(i,"HemisphereLight",(function(){return wc})),n.d(i,"HemisphereLightHelper",(function(){return ap})),n.d(i,"HemisphereLightProbe",(function(){return od})),n.d(i,"IcosahedronBufferGeometry",(function(){return bh})),n.d(i,"IcosahedronGeometry",(function(){return bh})),n.d(i,"ImageBitmapLoader",(function(){return Kc})),n.d(i,"ImageLoader",(function(){return mc})),n.d(i,"ImageUtils",(function(){return ri})),n.d(i,"ImmediateRenderObject",(function(){return Jd})),n.d(i,"IncrementStencilOp",(function(){return _n})),n.d(i,"IncrementWrapStencilOp",(function(){return xn})),n.d(i,"InstancedBufferAttribute",(function(){return Wc})),n.d(i,"InstancedBufferGeometry",(function(){return Vc})),n.d(i,"InstancedInterleavedBuffer",(function(){return Ud})),n.d(i,"InstancedMesh",(function(){return Xl})),n.d(i,"Int16Attribute",(function(){return xf})),n.d(i,"Int16BufferAttribute",(function(){return jr})),n.d(i,"Int32Attribute",(function(){return Tf})),n.d(i,"Int32BufferAttribute",(function(){return Wr})),n.d(i,"Int8Attribute",(function(){return vf})),n.d(i,"Int8BufferAttribute",(function(){return Gr})),n.d(i,"IntType",(function(){return Nt})),n.d(i,"InterleavedBuffer",(function(){return ul})),n.d(i,"InterleavedBufferAttribute",(function(){return cl})),n.d(i,"Interpolant",(function(){return qh})),n.d(i,"InterpolateDiscrete",(function(){return We})),n.d(i,"InterpolateLinear",(function(){return Xe})),n.d(i,"InterpolateSmooth",(function(){return qe})),n.d(i,"InvertStencilOp",(function(){return Tn})),n.d(i,"JSONLoader",(function(){return Nf})),n.d(i,"KeepStencilOp",(function(){return gn})),n.d(i,"KeyframeTrack",(function(){return Kh})),n.d(i,"LOD",(function(){return Cl})),n.d(i,"LatheBufferGeometry",(function(){return Th})),n.d(i,"LatheGeometry",(function(){return Th})),n.d(i,"Layers",(function(){return er})),n.d(i,"LensFlare",(function(){return Ff})),n.d(i,"LessDepth",(function(){return Z})),n.d(i,"LessEqualDepth",(function(){return J})),n.d(i,"LessEqualStencilFunc",(function(){return Mn})),n.d(i,"LessStencilFunc",(function(){return Sn})),n.d(i,"Light",(function(){return Tc})),n.d(i,"LightProbe",(function(){return Hc})),n.d(i,"Line",(function(){return Ql})),n.d(i,"Line3",(function(){return Zd})),n.d(i,"LineBasicMaterial",(function(){return ql})),n.d(i,"LineCurve",(function(){return ku})),n.d(i,"LineCurve3",(function(){return Gu})),n.d(i,"LineDashedMaterial",(function(){return Vh})),n.d(i,"LineLoop",(function(){return iu})),n.d(i,"LinePieces",(function(){return nf})),n.d(i,"LineSegments",(function(){return nu})),n.d(i,"LineStrip",(function(){return ef})),n.d(i,"LinearEncoding",(function(){return nn})),n.d(i,"LinearFilter",(function(){return Et})),n.d(i,"LinearInterpolant",(function(){return Zh})),n.d(i,"LinearMipMapLinearFilter",(function(){return Pt})),n.d(i,"LinearMipMapNearestFilter",(function(){return At})),n.d(i,"LinearMipmapLinearFilter",(function(){return Rt})),n.d(i,"LinearMipmapNearestFilter",(function(){return Mt})),n.d(i,"LinearToneMapping",(function(){return ot})),n.d(i,"Loader",(function(){return hc})),n.d(i,"LoaderUtils",(function(){return jc})),n.d(i,"LoadingManager",(function(){return lc})),n.d(i,"LogLuvEncoding",(function(){return an})),n.d(i,"LoopOnce",(function(){return ze})),n.d(i,"LoopPingPong",(function(){return Ve})),n.d(i,"LoopRepeat",(function(){return je})),n.d(i,"LuminanceAlphaFormat",(function(){return Xt})),n.d(i,"LuminanceFormat",(function(){return Wt})),n.d(i,"MOUSE",(function(){return h})),n.d(i,"Material",(function(){return Rr})),n.d(i,"MaterialLoader",(function(){return zc})),n.d(i,"Math",(function(){return ti})),n.d(i,"MathUtils",(function(){return ti})),n.d(i,"Matrix3",(function(){return ni})),n.d(i,"Matrix4",(function(){return Vi})),n.d(i,"MaxEquation",(function(){return D})),n.d(i,"Mesh",(function(){return Eo})),n.d(i,"MeshBasicMaterial",(function(){return Fr})),n.d(i,"MeshDepthMaterial",(function(){return Xa})),n.d(i,"MeshDistanceMaterial",(function(){return qa})),n.d(i,"MeshFaceMaterial",(function(){return af})),n.d(i,"MeshLambertMaterial",(function(){return zh})),n.d(i,"MeshMatcapMaterial",(function(){return jh})),n.d(i,"MeshNormalMaterial",(function(){return Hh})),n.d(i,"MeshPhongMaterial",(function(){return kh})),n.d(i,"MeshPhysicalMaterial",(function(){return Uh})),n.d(i,"MeshStandardMaterial",(function(){return Bh})),n.d(i,"MeshToonMaterial",(function(){return Gh})),n.d(i,"MinEquation",(function(){return N})),n.d(i,"MirroredRepeatWrapping",(function(){return yt})),n.d(i,"MixOperation",(function(){return nt})),n.d(i,"MultiMaterial",(function(){return lf})),n.d(i,"MultiplyBlending",(function(){return P})),n.d(i,"MultiplyOperation",(function(){return et})),n.d(i,"NearestFilter",(function(){return xt})),n.d(i,"NearestMipMapLinearFilter",(function(){return St})),n.d(i,"NearestMipMapNearestFilter",(function(){return Tt})),n.d(i,"NearestMipmapLinearFilter",(function(){return wt})),n.d(i,"NearestMipmapNearestFilter",(function(){return bt})),n.d(i,"NeverDepth",(function(){return q})),n.d(i,"NeverStencilFunc",(function(){return wn})),n.d(i,"NoBlending",(function(){return E})),n.d(i,"NoColors",(function(){return rf})),n.d(i,"NoToneMapping",(function(){return rt})),n.d(i,"NormalAnimationBlendMode",(function(){return Ke})),n.d(i,"NormalBlending",(function(){return M})),n.d(i,"NotEqualDepth",(function(){return tt})),n.d(i,"NotEqualStencilFunc",(function(){return Rn})),n.d(i,"NumberKeyframeTrack",(function(){return tc})),n.d(i,"Object3D",(function(){return mr})),n.d(i,"ObjectLoader",(function(){return qc})),n.d(i,"ObjectSpaceNormalMap",(function(){return fn})),n.d(i,"OctahedronBufferGeometry",(function(){return wh})),n.d(i,"OctahedronGeometry",(function(){return wh})),n.d(i,"OneFactor",(function(){return B})),n.d(i,"OneMinusDstAlphaFactor",(function(){return j})),n.d(i,"OneMinusDstColorFactor",(function(){return W})),n.d(i,"OneMinusSrcAlphaFactor",(function(){return H})),n.d(i,"OneMinusSrcColorFactor",(function(){return k})),n.d(i,"OrthographicCamera",(function(){return Dc})),n.d(i,"PCFShadowMap",(function(){return v})),n.d(i,"PCFSoftShadowMap",(function(){return _})),n.d(i,"PMREMGenerator",(function(){return Xp})),n.d(i,"ParametricBufferGeometry",(function(){return Sh})),n.d(i,"ParametricGeometry",(function(){return Sh})),n.d(i,"Particle",(function(){return hf})),n.d(i,"ParticleBasicMaterial",(function(){return pf})),n.d(i,"ParticleSystem",(function(){return cf})),n.d(i,"ParticleSystemMaterial",(function(){return ff})),n.d(i,"Path",(function(){return xc})),n.d(i,"PerspectiveCamera",(function(){return Lo})),n.d(i,"Plane",(function(){return Go})),n.d(i,"PlaneBufferGeometry",(function(){return Xo})),n.d(i,"PlaneGeometry",(function(){return Xo})),n.d(i,"PlaneHelper",(function(){return bp})),n.d(i,"PointCloud",(function(){return uf})),n.d(i,"PointCloudMaterial",(function(){return df})),n.d(i,"PointLight",(function(){return Nc})),n.d(i,"PointLightHelper",(function(){return ip})),n.d(i,"Points",(function(){return uu})),n.d(i,"PointsMaterial",(function(){return ru})),n.d(i,"PolarGridHelper",(function(){return up})),n.d(i,"PolyhedronBufferGeometry",(function(){return _u})),n.d(i,"PolyhedronGeometry",(function(){return _u})),n.d(i,"PositionalAudio",(function(){return Td})),n.d(i,"PropertyBinding",(function(){return Ld})),n.d(i,"PropertyMixer",(function(){return Sd})),n.d(i,"QuadraticBezierCurve",(function(){return Hu})),n.d(i,"QuadraticBezierCurve3",(function(){return zu})),n.d(i,"Quaternion",(function(){return di})),n.d(i,"QuaternionKeyframeTrack",(function(){return nc})),n.d(i,"QuaternionLinearInterpolant",(function(){return ec})),n.d(i,"REVISION",(function(){return u})),n.d(i,"RGBADepthPacking",(function(){return dn})),n.d(i,"RGBAFormat",(function(){return Vt})),n.d(i,"RGBAIntegerFormat",(function(){return ee})),n.d(i,"RGBA_ASTC_10x10_Format",(function(){return Se})),n.d(i,"RGBA_ASTC_10x5_Format",(function(){return be})),n.d(i,"RGBA_ASTC_10x6_Format",(function(){return Te})),n.d(i,"RGBA_ASTC_10x8_Format",(function(){return we})),n.d(i,"RGBA_ASTC_12x10_Format",(function(){return Ee})),n.d(i,"RGBA_ASTC_12x12_Format",(function(){return Me})),n.d(i,"RGBA_ASTC_4x4_Format",(function(){return pe})),n.d(i,"RGBA_ASTC_5x4_Format",(function(){return fe})),n.d(i,"RGBA_ASTC_5x5_Format",(function(){return me})),n.d(i,"RGBA_ASTC_6x5_Format",(function(){return ge})),n.d(i,"RGBA_ASTC_6x6_Format",(function(){return ve})),n.d(i,"RGBA_ASTC_8x5_Format",(function(){return _e})),n.d(i,"RGBA_ASTC_8x6_Format",(function(){return ye})),n.d(i,"RGBA_ASTC_8x8_Format",(function(){return xe})),n.d(i,"RGBA_BPTC_Format",(function(){return Ae})),n.d(i,"RGBA_ETC2_EAC_Format",(function(){return de})),n.d(i,"RGBA_PVRTC_2BPPV1_Format",(function(){return ue})),n.d(i,"RGBA_PVRTC_4BPPV1_Format",(function(){return le})),n.d(i,"RGBA_S3TC_DXT1_Format",(function(){return ie})),n.d(i,"RGBA_S3TC_DXT3_Format",(function(){return re})),n.d(i,"RGBA_S3TC_DXT5_Format",(function(){return oe})),n.d(i,"RGBDEncoding",(function(){return hn})),n.d(i,"RGBEEncoding",(function(){return sn})),n.d(i,"RGBEFormat",(function(){return qt})),n.d(i,"RGBFormat",(function(){return jt})),n.d(i,"RGBIntegerFormat",(function(){return te})),n.d(i,"RGBM16Encoding",(function(){return un})),n.d(i,"RGBM7Encoding",(function(){return ln})),n.d(i,"RGB_ETC1_Format",(function(){return he})),n.d(i,"RGB_ETC2_Format",(function(){return ce})),n.d(i,"RGB_PVRTC_2BPPV1_Format",(function(){return ae})),n.d(i,"RGB_PVRTC_4BPPV1_Format",(function(){return se})),n.d(i,"RGB_S3TC_DXT1_Format",(function(){return ne})),n.d(i,"RGFormat",(function(){return $t})),n.d(i,"RGIntegerFormat",(function(){return Qt})),n.d(i,"RawShaderMaterial",(function(){return Fh})),n.d(i,"Ray",(function(){return ji})),n.d(i,"Raycaster",(function(){return Gd})),n.d(i,"RectAreaLight",(function(){return kc})),n.d(i,"RedFormat",(function(){return Jt})),n.d(i,"RedIntegerFormat",(function(){return Kt})),n.d(i,"ReinhardToneMapping",(function(){return st})),n.d(i,"RepeatWrapping",(function(){return vt})),n.d(i,"ReplaceStencilOp",(function(){return vn})),n.d(i,"ReverseSubtractEquation",(function(){return L})),n.d(i,"RingBufferGeometry",(function(){return Eh})),n.d(i,"RingGeometry",(function(){return Eh})),n.d(i,"SRGB8_ALPHA8_ASTC_10x10_Format",(function(){return ke})),n.d(i,"SRGB8_ALPHA8_ASTC_10x5_Format",(function(){return Fe})),n.d(i,"SRGB8_ALPHA8_ASTC_10x6_Format",(function(){return Be})),n.d(i,"SRGB8_ALPHA8_ASTC_10x8_Format",(function(){return Ue})),n.d(i,"SRGB8_ALPHA8_ASTC_12x10_Format",(function(){return Ge})),n.d(i,"SRGB8_ALPHA8_ASTC_12x12_Format",(function(){return He})),n.d(i,"SRGB8_ALPHA8_ASTC_4x4_Format",(function(){return Re})),n.d(i,"SRGB8_ALPHA8_ASTC_5x4_Format",(function(){return Pe})),n.d(i,"SRGB8_ALPHA8_ASTC_5x5_Format",(function(){return Ce})),n.d(i,"SRGB8_ALPHA8_ASTC_6x5_Format",(function(){return Ie})),n.d(i,"SRGB8_ALPHA8_ASTC_6x6_Format",(function(){return Oe})),n.d(i,"SRGB8_ALPHA8_ASTC_8x5_Format",(function(){return Le})),n.d(i,"SRGB8_ALPHA8_ASTC_8x6_Format",(function(){return Ne})),n.d(i,"SRGB8_ALPHA8_ASTC_8x8_Format",(function(){return De})),n.d(i,"Scene",(function(){return ll})),n.d(i,"SceneUtils",(function(){return Df})),n.d(i,"ShaderChunk",(function(){return qo})),n.d(i,"ShaderLib",(function(){return Zo})),n.d(i,"ShaderMaterial",(function(){return Io})),n.d(i,"ShadowMaterial",(function(){return Dh})),n.d(i,"Shape",(function(){return bc})),n.d(i,"ShapeBufferGeometry",(function(){return Mh})),n.d(i,"ShapeGeometry",(function(){return Mh})),n.d(i,"ShapePath",(function(){return $c})),n.d(i,"ShapeUtils",(function(){return gh})),n.d(i,"ShortType",(function(){return Ot})),n.d(i,"Skeleton",(function(){return Hl})),n.d(i,"SkeletonHelper",(function(){return np})),n.d(i,"SkinnedMesh",(function(){return Fl})),n.d(i,"SmoothShading",(function(){return S})),n.d(i,"Sphere",(function(){return Di})),n.d(i,"SphereBufferGeometry",(function(){return Ah})),n.d(i,"SphereGeometry",(function(){return Ah})),n.d(i,"Spherical",(function(){return jd})),n.d(i,"SphericalHarmonics3",(function(){return Gc})),n.d(i,"SplineCurve",(function(){return ju})),n.d(i,"SpotLight",(function(){return Pc})),n.d(i,"SpotLightHelper",(function(){return $d})),n.d(i,"Sprite",(function(){return Ml})),n.d(i,"SpriteMaterial",(function(){return dl})),n.d(i,"SrcAlphaFactor",(function(){return G})),n.d(i,"SrcAlphaSaturateFactor",(function(){return X})),n.d(i,"SrcColorFactor",(function(){return U})),n.d(i,"StaticCopyUsage",(function(){return Bn})),n.d(i,"StaticDrawUsage",(function(){return In})),n.d(i,"StaticReadUsage",(function(){return Nn})),n.d(i,"StereoCamera",(function(){return ud})),n.d(i,"StreamCopyUsage",(function(){return kn})),n.d(i,"StreamDrawUsage",(function(){return Ln})),n.d(i,"StreamReadUsage",(function(){return Fn})),n.d(i,"StringKeyframeTrack",(function(){return ic})),n.d(i,"SubtractEquation",(function(){return O})),n.d(i,"SubtractiveBlending",(function(){return R})),n.d(i,"TOUCH",(function(){return c})),n.d(i,"TangentSpaceNormalMap",(function(){return pn})),n.d(i,"TetrahedronBufferGeometry",(function(){return Rh})),n.d(i,"TetrahedronGeometry",(function(){return Rh})),n.d(i,"TextBufferGeometry",(function(){return Ph})),n.d(i,"TextGeometry",(function(){return Ph})),n.d(i,"Texture",(function(){return si})),n.d(i,"TextureLoader",(function(){return _c})),n.d(i,"TorusBufferGeometry",(function(){return Ch})),n.d(i,"TorusGeometry",(function(){return Ch})),n.d(i,"TorusKnotBufferGeometry",(function(){return Ih})),n.d(i,"TorusKnotGeometry",(function(){return Ih})),n.d(i,"Triangle",(function(){return Mr})),n.d(i,"TriangleFanDrawMode",(function(){return en})),n.d(i,"TriangleStripDrawMode",(function(){return tn})),n.d(i,"TrianglesDrawMode",(function(){return Qe})),n.d(i,"TubeBufferGeometry",(function(){return Oh})),n.d(i,"TubeGeometry",(function(){return Oh})),n.d(i,"UVMapping",(function(){return ht})),n.d(i,"Uint16Attribute",(function(){return bf})),n.d(i,"Uint16BufferAttribute",(function(){return Vr})),n.d(i,"Uint32Attribute",(function(){return wf})),n.d(i,"Uint32BufferAttribute",(function(){return Xr})),n.d(i,"Uint8Attribute",(function(){return _f})),n.d(i,"Uint8BufferAttribute",(function(){return Hr})),n.d(i,"Uint8ClampedAttribute",(function(){return yf})),n.d(i,"Uint8ClampedBufferAttribute",(function(){return zr})),n.d(i,"Uniform",(function(){return Bd})),n.d(i,"UniformsLib",(function(){return Yo})),n.d(i,"UniformsUtils",(function(){return Co})),n.d(i,"UnsignedByteType",(function(){return Ct})),n.d(i,"UnsignedInt248Type",(function(){return Ht})),n.d(i,"UnsignedIntType",(function(){return Dt})),n.d(i,"UnsignedShort4444Type",(function(){return Ut})),n.d(i,"UnsignedShort5551Type",(function(){return kt})),n.d(i,"UnsignedShort565Type",(function(){return Gt})),n.d(i,"UnsignedShortType",(function(){return Lt})),n.d(i,"VSMShadowMap",(function(){return y})),n.d(i,"Vector2",(function(){return ei})),n.d(i,"Vector3",(function(){return pi})),n.d(i,"Vector4",(function(){return li})),n.d(i,"VectorKeyframeTrack",(function(){return rc})),n.d(i,"Vertex",(function(){return mf})),n.d(i,"VertexColors",(function(){return sf})),n.d(i,"VideoTexture",(function(){return cu})),n.d(i,"WebGL1Renderer",(function(){return ol})),n.d(i,"WebGLCubeRenderTarget",(function(){return Fo})),n.d(i,"WebGLMultipleRenderTargets",(function(){return hi})),n.d(i,"WebGLMultisampleRenderTarget",(function(){return ci})),n.d(i,"WebGLRenderTarget",(function(){return ui})),n.d(i,"WebGLRenderTargetCube",(function(){return Of})),n.d(i,"WebGLRenderer",(function(){return rl})),n.d(i,"WebGLUtils",(function(){return Ka})),n.d(i,"WireframeGeometry",(function(){return Lh})),n.d(i,"WireframeHelper",(function(){return Pf})),n.d(i,"WrapAroundEnding",(function(){return Je})),n.d(i,"XHRLoader",(function(){return Cf})),n.d(i,"ZeroCurvatureEnding",(function(){return Ye})),n.d(i,"ZeroFactor",(function(){return F})),n.d(i,"ZeroSlopeEnding",(function(){return Ze})),n.d(i,"ZeroStencilOp",(function(){return mn})),n.d(i,"sRGBEncoding",(function(){return rn}));var r={};n.r(r),n.d(r,"isMobile",(function(){return Zg})),n.d(r,"EventEmitter",(function(){return vv.a})),n.d(r,"earcut",(function(){return yv.a})),n.d(r,"BaseTextureCache",(function(){return $v})),n.d(r,"CanvasRenderTarget",(function(){return e_})),n.d(r,"DATA_URI",(function(){return r_})),n.d(r,"ProgramCache",(function(){return Jv})),n.d(r,"TextureCache",(function(){return Kv})),n.d(r,"clearTextureCache",(function(){return t_})),n.d(r,"correctBlendMode",(function(){return Lv})),n.d(r,"createIndicesForQuads",(function(){return Bv})),n.d(r,"decomposeDataUri",(function(){return o_})),n.d(r,"deprecation",(function(){return Zv})),n.d(r,"destroyTextureCache",(function(){return Qv})),n.d(r,"determineCrossOrigin",(function(){return s_})),n.d(r,"getBufferType",(function(){return Uv})),n.d(r,"getResolutionOfUrl",(function(){return a_})),n.d(r,"hex2rgb",(function(){return Rv})),n.d(r,"hex2string",(function(){return Pv})),n.d(r,"interleaveTypedArrays",(function(){return Gv})),n.d(r,"isPow2",(function(){return zv})),n.d(r,"isWebGLSupported",(function(){return Mv})),n.d(r,"log2",(function(){return jv})),n.d(r,"nextPow2",(function(){return Hv})),n.d(r,"premultiplyBlendMode",(function(){return Ov})),n.d(r,"premultiplyRgba",(function(){return Nv})),n.d(r,"premultiplyTint",(function(){return Dv})),n.d(r,"premultiplyTintToRgba",(function(){return Fv})),n.d(r,"removeItems",(function(){return Vv})),n.d(r,"rgb2hex",(function(){return Iv})),n.d(r,"sayHello",(function(){return Ev})),n.d(r,"sign",(function(){return Wv})),n.d(r,"skipHello",(function(){return Sv})),n.d(r,"string2hex",(function(){return Cv})),n.d(r,"trimCanvas",(function(){return n_})),n.d(r,"uid",(function(){return qv})),n.d(r,"url",(function(){return bv}));var o=n(2),s=n(1),a=n.n(s),l=n(0);
|
|
36
36
|
/**
|
|
37
37
|
* @license
|
|
38
38
|
* Copyright 2010-2021 Three.js Authors
|
|
@@ -247,4 +247,4 @@ var BE=function(t,e){return(BE=Object.setPrototypeOf||{__proto__:[]}instanceof A
|
|
|
247
247
|
*
|
|
248
248
|
* pixi.js is licensed under the MIT License.
|
|
249
249
|
* http://www.opensource.org/licenses/mit-license
|
|
250
|
-
*/vb.registerPlugin("accessibility",ny),vb.registerPlugin("extract",Fb),vb.registerPlugin("interaction",py),vb.registerPlugin("particle",KT),vb.registerPlugin("prepare",iS),vb.registerPlugin("batch",Ab),vb.registerPlugin("tilingSprite",cS),$b.registerPlugin(NS),$b.registerPlugin(cT),$b.registerPlugin(PT),$b.registerPlugin(WT),$b.registerPlugin(oS),Lb.registerPlugin(oy),Lb.registerPlugin(Qb);var VE,WE={AlphaFilter:FS,BlurFilter:aE,BlurFilterPass:sE,ColorMatrixFilter:uE,DisplacementFilter:cE,FXAAFilter:pE,NoiseFilter:NE};class XE extends a.a{constructor(){super(),this.prevTime=-1,this.times=0,this.valueTotal=0,this.destroyed=!1,this.value=0,this.calcFps()}calcFps(){requestAnimationFrame(t=>{const e=t-this.prevTime;this.valueTotal+=e,this.times+=1,this.times>20&&(this.value=Math.floor(1e3*this.times/this.valueTotal),this.valueTotal=0,this.times=0,this.destroyed||this.emit("update",this.value)),this.prevTime=t,this.destroyed||this.calcFps()})}destroy(){this.destroyed=!0}}!function(t){t.ResourceError="RESOURCE_ERROR",t.RuntimeError="RUNTIME_ERROR",t.RuntimeWarn="RUNTIME_WARN",t.CanvasCrash="CANVAS_CRASH"}(VE||(VE={}));class qE extends Error{constructor(t,e){var n,i;super(e),n=this,i=new.target.prototype,Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__&&(n.__proto__=i),this.errorType=t,this.errorMsg=e}static transform(t){return t instanceof qE?t:new qE(VE.RuntimeError,t.message)}}function YE(){return function(t,e,n){const i=n.value;n.value=function(...t){try{return i.apply(this,t)}catch(t){throw new qE(VE.RuntimeWarn,t.message)}}}}var ZE=n(6),JE=n.n(ZE);function KE(t,e,n=5){return Math.abs(t-e)<=Math.pow(10,-n)}function $E(t){return Math.floor(1e6*t)/1e6}class QE{constructor(){this.point={x:0,y:0},this.slope=Math.PI/4}static fromPointSlope(t,e){const n=new QE;return n.point=t,n.slope=e,n}resolveY(t){return Math.tan(this.slope)*(t-this.point.x)+this.point.y}distanceToLinearEquation(t){return KE(this.slope,t.slope)?this.distanceToPoint(t.point):-1}distanceToPoint(t){let e=0;if(Math.tan(this.slope)*(t.x-this.point.x)+this.point.y===t.y)return 0;e=this.slope>=Math.PI/2?this.slope-Math.PI/2:Math.PI/2+this.slope;const n=QE.fromPointSlope(t,e),i=this.crossPoint(n);return i?Math.ceil(Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2))):0}crossPoint(t){if(KE(t.slope,this.slope))return null;let e=0,n=0;const i=Math.tan(t.slope),r=Math.tan(this.slope),{x:o,y:s}=this.point,{x:a,y:l}=t.point;return KE(this.slope,Math.PI/2)?(e=this.point.x,n=i*(e-a)+l):KE(t.slope,Math.PI/2)?(e=t.point.x,n=r*(e-o)+s):KE(this.slope,Math.PI)||KE(this.slope,0)?(n=this.point.y,e=(n-l)/i+a):KE(t.slope,Math.PI)||KE(t.slope,0)?(n=t.point.y,e=(n-s)/r+o):(e=(i*a-l+s-r*o)/(i-r),n=r*(e-o)+s),{x:e,y:n}}}var tM=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};function eM(){return Date.now().toString(32)+Math.random().toString(32).substring(2)}const nM="__delay_resolve_result__";function iM(t,e){return tM(this,void 0,void 0,(function*(){const n=yield Promise.race([t(),(i=e,new Promise(t=>{setTimeout(()=>{t(nM)},i)}))]);var i;return n===nM?nM:n}))}var rM=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};function oM(t,e){return rM(this,void 0,void 0,(function*(){const n=yield iM(()=>fetch(t),e);if(n===nM)throw new qE(VE.ResourceError,`"${t}" loaded timeout"`);if(!n.ok)throw new qE(VE.ResourceError,`"${t}" loaded failed with status "${n.status}"`);return n}))}class sM{constructor(t,e,n,i,r){this.timeout=15e3,this.useCache=!1,this.taskId="",this.delegate=null,this.useCache=e,this.localStorage=t,this.logger=n,this.timeout=i,this.delegate=r||null}attachTaskId(t){this.taskId=t}fetchJson(t){return rM(this,void 0,void 0,(function*(){let e;if(this.useCache&&(this.logger.info("load resource from cache. "+t,this.taskId||""),e=yield this.localStorage.getItem(t)),e)return this.logger.info("cache hit. "+t,this.taskId||""),e;{let e;if(this.delegate){this.logger.info("load resource by delegate. "+t,this.taskId||"");const n=yield iM(()=>this.delegate.loadJson(t),this.timeout);if(n===nM)throw new qE(VE.ResourceError,`"${t}" loaded timeout"`);e=JSON.parse(n)}else this.logger.info("load resource from server. "+t,this.taskId||""),e=yield(yield oM(""+t,this.timeout)).json();return this.logger.info("load end. "+t,this.taskId||""),this.useCache&&this.localStorage.setItem(t,e).catch(()=>{}),e}}))}fetchPng(t){return rM(this,void 0,void 0,(function*(){let e;if(this.useCache&&(this.logger.info("load resource from cache. "+t,this.taskId||""),e=yield this.localStorage.getItem(t)),e)return this.logger.info("cache hit. "+t,this.taskId||""),e;{let n;if(this.delegate){if(this.logger.info("load resource by delegate. "+t,this.taskId||""),n=yield iM(()=>this.delegate.loadImage(t),this.timeout),n===nM)throw new qE(VE.ResourceError,`"${t}" loaded timeout"`)}else{this.logger.info("load resource from server. "+t,this.taskId||"");const e=yield oM(t,this.timeout);n=yield e.blob()}return e=yield function(t){return new Promise((e,n)=>{const i=new FileReader;i.onload=()=>{e(i.result)},i.onerror=()=>{n(new qE(VE.ResourceError,"Failed parse blob data."))},i.readAsDataURL(t)})}(n),this.logger.info("load end. "+t,this.taskId||""),this.useCache&&this.localStorage.setItem(t,e).catch(()=>{}),e}}))}destroy(){}}var aM=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class lM{constructor(t){this.isPaused=!1,this.timestamp=0,this.callbackList=[],this.onTimeUpdate=t=>{const e=t/(mv.TARGET_FPMS||.06);if(!this.isPaused){this.timestamp+=e,this.callbackList=this.callbackList.filter(t=>t&&!t.applied);let{length:t}=this.callbackList;for(let e=0;e<t;e++){const n=this.callbackList[e];if(n&&!n.applied){if(!(n.triggerTime<=this.timestamp))break;n.running=!0,n.fn(),n.applied=!0,t=this.callbackList.length}}}},this.ticker=t,this.ticker.add(this.onTimeUpdate)}setTimeout(t,e){const n=eM(),i=this.timestamp+Math.max(e||16,16);return this.callbackList.push({fn:t,triggerTime:i,id:n,applied:!1,running:!1}),this.callbackList.sort((t,e)=>t.triggerTime-e.triggerTime),n}clearTimeout(t){const e=this.callbackList.findIndex(e=>e.id===t);e>=0&&!this.callbackList[e].running&&this.callbackList.splice(e,1)}delay(t){return new Promise(e=>{this.setTimeout(e,t)})}waitUntil(t,e){return aM(this,void 0,void 0,(function*(){const n=this.timestamp;for(;!t()&&this.timestamp-n<e;)yield this.delay(50)}))}pause(){this.isPaused=!0}resume(){this.isPaused=!1}}var uM=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class hM{constructor(t){this.gifs=Object.create(null),this.textures=Object.create(null),this.frames=Object.create(null),this.spriteSheets=[],this.loader=t}getTexture(t){return this.textures[t]||null}getFrameData(t){return this.frames[t]}getGifFrames(t){return this.gifs[t]?this.gifs[t].filter(t=>!!t):[]}loadSpriteSheetItem(t,e,n){return uM(this,void 0,void 0,(function*(){const i=yield this.loader.fetchJson(`${t}/${e}/jsonOutput/${n}.json`),r=yield this.loader.fetchPng(`${t}/${e}/jsonOutput/${n}.png`),o=document.createElement("img");o.src=r,yield new Promise((t,e)=>{o.onload=()=>t(""),o.onerror=()=>e()});const s=new wy(o),a=new rS(s,i);yield new Promise(t=>{a.parse(()=>t(""))}),this.spriteSheets.push(a),Object.keys(a.textures).forEach(t=>{const e=t.match(/^(.+)_gif_(\d+)$/);if(e&&e[1]&&e[2]){const n=e[1];this.gifs[n]||(this.gifs[n]=[]);const i=parseInt(e[2],10);this.gifs[n][i]=a.textures[t]}else this.frames[t]=i.frames[t],this.textures[t]=a.textures[t]})}))}destroy(){this.spriteSheets.forEach(t=>t.destroy(!0)),this.spriteSheets=[],this.gifs=Object.create(null),this.textures=Object.create(null),this.frames=Object.create(null)}}var cM=n(3),dM=n.n(cM);function pM(t,e,n){let i,r;const o=Math.round(t)%360;if(o%180==0)i=Math.cos(o*(Math.PI/180))*e,r=0;else if(o%90==0)i=0,r=Math.sin(o*(Math.PI/180))*n;else{const t=function(t){const e=t*Math.PI/180;return Math.tan(e)}(o);i=e*n/Math.sqrt(Math.pow(n,2)+Math.pow(e*t,2)),(o>90&&o<270||o<-90&&o>-270)&&(i=-i),r=t*i}return{x:i,y:r}}function fM(t,e,n,i,r,o){const s=t,a=e;let l,u,h,c,d;if(0===Math.round(i))l=r,u=o,d=0;else if(Math.round(i)>=360)l=r,u=o,h=r+2*t*Math.abs(Math.cos(-n/180*Math.PI)),c=o+2*e*Math.sin(-n/180*Math.PI),d=1;else{const t=-n,e=-(n+i),{x:h,y:c}=pM(t,s,a),p=r-h,f=o+c,{x:m,y:g}=pM(e,s,a);l=m+p,u=f-g,d=i>=-360&&i<-180?1:i>=-180&&i<0||i>0&&i<180?0:1}return{radiusX:s,radiusY:a,xAxisRotation:0,largeArcFlag:d,sweepFlag:i>0?1:0,endX:l,endY:u,middleX:h,middleY:c}}class mM{constructor(){this.pool=[]}getObject(t){const e=this.pool.find(t=>!t.isUsed);if(e)return e.isUsed=!0,e.obj;{const e={obj:this.createObject(),isUsed:!0,group:t};return this.pool.push(e),e.obj}}collectObject(t){const e=this.pool.find(e=>e.obj===t);e&&(e.isUsed=!1,this.resetObject(e.obj))}collectObjectByGroup(t){this.pool.filter(e=>e.group===t).forEach(t=>this.collectObject(t.obj))}}const gM=new class extends mM{createObject(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("version","1.1"),t}resetObject(t){t.removeAttribute("viewBox"),t.removeAttribute("width"),t.removeAttribute("height"),t.innerHTML=""}};const vM=new class extends mM{createObject(){return document.createElement("img")}resetObject(t){t.removeAttribute("src")}};var _M=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class yM{constructor(){this.imgElements=[],this.svgElements=[],this.idToHashMap=Object.create(null),this.textures=Object.create(null),this.graphics=[],this.hashToIdMap=Object.create(null)}render(t,e,n){return _M(this,void 0,void 0,(function*(){const{items:e,width:i,height:r}=t,o=vM.getObject(n),s=new wy(o,{width:i,height:r,resolution:1}),a=gM.getObject(n);this.imgElements.push(o),this.svgElements.push(a),a.setAttribute("viewBox",`0 0 ${i} ${r}`),a.setAttribute("width",""+i),a.setAttribute("height",""+r);const u={},h={};e.forEach(t=>{const{item:e,x:n,y:i}=t,r=n+2,o=i+2;e.pathsData.forEach(t=>{let e="";t.cmds.forEach(([n,i])=>{e+=n+" ",e+=i.map(e=>(Object(l.isNumber)(e)||(e.x=e.x+t.offset.x+r,e.y=e.y+t.offset.y+o),e)).reduce((t,e)=>(Object(l.isNumber)(e)?t+=e+" ":t+=`${e.x} ${e.y} `,t),""),e+=" "}),t.pathElement.setAttribute("d",e),a.appendChild(t.pathElement)});const c=e.width-4-2*e.padding,d=e.height-4-2*e.padding;this.textures[e.hash]={texture:new ky(s,new d_(r+2,o+2,c,d)),pivot:e.pivot},u[e.hash]={x:r+2,y:o+2,w:c,h:d,pivot:e.pivot},h[e.hash]=this.hashToIdMap[e.hash]});const c=(d='<?xml version="1.0" encoding="utf-8"?>'+a.outerHTML,"data:image/svg+xml,"+encodeURIComponent(d).replace(/'/g,"%27").replace(/"/g,"%22"));var d;o.src=c,yield new Promise((t,e)=>{o.onload=()=>t(""),o.onerror=()=>e()})}))}getGraphicsData(t){const e=this.idToHashMap[t]||"";return this.textures[e]||null}addGraphics(t,e,n,i,r,o,s,a,l,u,h){var c,d;if(!s&&!l)return t;const p=dM()(n+(null!==(d=null===(c=null==s?void 0:s.width)||void 0===c?void 0:c.toString())&&void 0!==d?d:0)+l+u+h);if(this.hashToIdMap[p]||(this.hashToIdMap[p]=[]),this.hashToIdMap[p].push(t),this.idToHashMap[t]=p,this.graphics.findIndex(t=>t.hash===p)<0){const{graphicsWidth:t,graphicsHeight:n,pathsData:a,pivot:c,padding:d}=function(t,e,n,i,r,o,s,a,l){var u;const h=[],c={x:Math.abs(r.x),y:Math.abs(r.y)};let d=0,p=0,f=0,m=0,g=0,v="none";const _=null!==(u=null==i?void 0:i.width)&&void 0!==u?u:0;return s?(d=e,p=n,g=0):(v=l||"#ff0000",g=_,f=.5*_,m=.5*_,d=e+_,p=n+_,c.x+=.5*_,c.y+=.5*_),d+=Math.abs(r.x),p+=Math.abs(r.y),f+=Math.abs(r.x),m+=Math.abs(r.y),d+=4,p+=4,f+=2,m+=2,d=Math.ceil(d),p=Math.ceil(p),t.forEach(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","path");"none"!==t.fill&&s?e.setAttribute("fill",a||"#ff0000"):e.setAttribute("fill","none"),t.hasStroke&&!s&&(e.setAttribute("stroke-linecap",(null==i?void 0:i.cap)||"butt"),e.setAttribute("stroke-linejoin",(null==i?void 0:i.join)||"miter"),e.setAttribute("stroke-width",g.toString()),e.setAttribute("stroke",v),(null==i?void 0:i.dash)&&e.setAttribute("stroke-dasharray",i.dash));const{scale:n}=t,r=t.path.trim().split(" ");let o={x:0,y:0};const l={offset:{x:f,y:m},cmds:[],pathElement:e};for(let t=0;t<r.length;t+=2){const e=r[t],i=r[t+1];if("M"===e){let[t,e]=i.split(",").map(t=>Number(t));o={x:t,y:e},t=t/9525*n.x,e=e/9525*n.y,l.cmds.push(["M",[{x:t,y:e}]])}else if("A"===e){const[t,e,r,s]=i.split(",").map(t=>Number(t)),a=r/Math.PI*180,u=s/Math.PI*180,h=fM(t,e,a,u,o.x,o.y);Math.round(u)>=360?(o={x:h.endX,y:h.endY},l.cmds.push(["A",[h.radiusX/9525*n.x,h.radiusY/9525*n.y,h.xAxisRotation,h.largeArcFlag,h.sweepFlag,{x:h.middleX/9525*n.x,y:h.middleY/9525*n.y}]]),l.cmds.push(["A",[h.radiusX/9525*n.x,h.radiusY/9525*n.y,h.xAxisRotation,h.largeArcFlag,h.sweepFlag,{x:h.endX/9525*n.x,y:h.endY/9525*n.y}]])):(o={x:h.endX,y:h.endY},l.cmds.push(["A",[h.radiusX/9525*n.x,h.radiusY/9525*n.y,h.xAxisRotation,h.largeArcFlag,h.sweepFlag,{x:h.endX/9525*n.x,y:h.endY/9525*n.y}]]))}else if("L"===e){let[t,e]=i.split(",").map(t=>Number(t));o={x:t,y:e},t=t/9525*n.x,e=e/9525*n.y,l.cmds.push(["L",[{x:t,y:e}]])}else if("QB"===e){let[t,e,r,s]=i.split(",").map(t=>Number(t));o={x:r,y:s},t=t/9525*n.x,e=e/9525*n.y,r=r/9525*n.x,s=s/9525*n.y,l.cmds.push(["Q",[{x:t,y:e},{x:r,y:s}]])}else if("CB"===e){let[t,e,r,s,a,u]=i.split(",").map(t=>Number(t));o={x:a,y:u},t=t/9525*n.x,e=e/9525*n.y,r=r/9525*n.x,s=s/9525*n.y,a=a/9525*n.x,u=u/9525*n.y,l.cmds.push(["C",[{x:t,y:e},{x:r,y:s},{x:a,y:u}]])}else"C"===e&&l.cmds.push(["Z",[]])}h.push(l)}),{graphicsWidth:d,graphicsHeight:p,pivot:c,padding:2,pathsData:h}}(e,r,o,s,i,0,l,u,h);this.graphics.push({hash:p,pathsData:a,pivot:c,width:t,height:n,padding:d})}return t}pack(){this.graphics.forEach(t=>{t.width+=4,t.height+=4});return function t(e){const n=[],i=e.filter(t=>{const e=t.width<2048&&t.height<2048;return e||n.push(t),e}).sort((t,e)=>t.width*t.height-e.width*e.height);let r=i.length+1,o=2050,s=2050;const a=[];let l=null;for(;(o>2048||s>2048)&&i.length>0;)r-=1,l=JE()(i.slice(0,r)),o=l.width,s=l.height;return l&&a.push(l),n.forEach(t=>{const e=JE()([t]);a.push(e)}),r<i.length?a.concat(t(i.slice(r))):a}(this.graphics)}destroy(){Object.keys(this.textures).forEach(t=>{var e;null===(e=this.textures[t])||void 0===e||e.texture.destroy(!0)}),this.textures=Object.create(null),this.imgElements.forEach(t=>vM.collectObject(t)),this.svgElements.forEach(t=>gM.collectObject(t)),this.graphics=[]}}class xM{constructor(){this.runningTimeNodes={}}addRunningTimeNode(t,e,n){const i=`${e}_${t}`;if(this.runningTimeNodes[i])try{this.runningTimeNodes[i].dispose(!0)}catch(t){}this.runningTimeNodes[i]=n}removeRunningTimeNode(t,e){const n=`${e}_${t}`;delete this.runningTimeNodes[n]}}class bM{constructor(t){this.eventHub=t,this.targets=Object.create(null)}getTargets(){return Object.keys(this.targets).map(t=>this.targets[t])}addTarget(t,e){this.targets[t]=e}getTargetById(t){return this.targets[t]}getTarget(t,e,n={type:"el",index:0,id:""}){var i,r;let o=this.targets[t.id];return"shape"!==t.type?o:("shape"===t.type&&t.txEl&&(o=null!==(i=null==o?void 0:o.getTextElement(t.txEl.type,t.txEl.range))&&void 0!==i?i:null),"shape"===t.type&&t.bg&&0===n.index&&(e=!1,o=null!==(r=null==o?void 0:o.getBgElement())&&void 0!==r?r:null,this.eventHub.emit("IterateTimeNodeEnd",n.id)),e&&o?o.getIterateEntry(n.type,n.index,n.id):(o||this.eventHub.emit("IterateTimeNodeEnd",n.id),o))}clearTargets(){this.targets=Object.create(null)}}class TM{constructor(t){this.target=t}get color(){return this.target.strokeColorFilter.currentColor}set color(t){this.target.strokeColorFilter.color=t}get on(){return this.target.strokeActive?"true":"false"}set on(t){this.target.strokeActive="true"===t}}class wM{constructor(t){this.target=t}applyCommand(t,e){this.target.applyCommand(t,e)}}class SM{constructor(t){this.target=t}get color(){return this.target.fillColorFilter.currentColor}set color(t){this.target.fillActive&&(this.target.fillColorFilter.color=t)}get on(){return this.target.fillActive?"true":"false"}set on(t){this.target.fillActive="true"===t}get designColor(){return this.target.fillColorFilter.designColor}}class EM{constructor(t,e){this.hardHidden=!1,this.target=t,!0===e&&(this.hardHidden=!0)}get opacity(){return this.target.alpha}set opacity(t){this.target.alpha=t}get rotation(){return this.target.rotation/Math.PI*180}set rotation(t){this.target.rotation=t/180*Math.PI}get visibility(){return this.target.visible?"visible":"hidden"}set visibility(t){this.visibility===t||this.hardHidden||(this.target.visible="visible"===t)}}class MM{constructor(t,e){this.actions=[],this.ctx=e,this.object=t,this.object.interactive=!0}reset(t){this.object.interactive=!1,this.object.removeAllListeners(),this.object=t,this.object.interactive=!0}addAction(t,e){this.actions.push([t,e]),"click"===e?(this.object.addListener("click",()=>this.handleAction(t)),this.object.cursor="pointer"):"hover"===e&&this.object.addListener("mouseover",()=>this.handleAction(t))}addProxy(t){this.proxy=t,this.hitArea=this.getOriginHitArea(),this.proxy.interactive=!0,this.actions.forEach(([t,e])=>{var n,i;"click"===e?null===(n=this.proxy)||void 0===n||n.addListener("click",e=>this.handleProxyAction(e,t)):"hover"===e&&(null===(i=this.proxy)||void 0===i||i.addListener("mouseover",e=>this.handleProxyAction(e,t)))})}handleProxyAction(t,e){var n;const i=t.data.global,r=this.object.getGlobalPosition(),o=i.x-r.x+this.object.pivot.x,s=i.y-r.y+this.object.pivot.y;(null===(n=this.hitArea)||void 0===n?void 0:n.contains(o,s))&&this.object.visible&&this.handleAction(e,!0)}getOriginHitArea(){return this.object.hitArea?this.object.hitArea:new g_(0,0,this.object.width,this.object.height)}handleAction(t,e=!1){this.proxy&&!e||(this.ctx.eventHub.emit(YR.hyperlinkTrigger,t),this.execAction(t))}execAction(t){var e;if(this.ctx.eventHub.emit(YR.userInput),"ppaction://hlinksldjump"===t.action){const n=(null!==(e=null==t?void 0:t.target)&&void 0!==e?e:"").match(/slide(\d+)\.xml/);n&&n[1]&&this.ctx.eventHub.emit(YR.requestGotoSlide,Number(n[1]))}else if("ppaction://hlinkshowjump?jump=nextslide"===t.action)this.ctx.eventHub.emit(YR.requestNextSlide);else if("ppaction://hlinkshowjump?jump=previousslide"===t.action)this.ctx.eventHub.emit(YR.requestPrevSlide);else if("ppaction://hlinkshowjump?jump=firstslide"===t.action)this.ctx.eventHub.emit(YR.requestGotoSlide,1);else if("ppaction://hlinkshowjump?jump=lastslide"===t.action)this.ctx.eventHub.emit(YR.requestGotoSlide,-1);else if("ppaction://hlinkshowjump?jump=lastslideviewed"===t.action){const t=this.ctx.lastViewedIndex;this.ctx.eventHub.emit(YR.requestGotoSlide,t)}else"ppaction://hlinkshowjump?jump=endshow"===t.action&&this.ctx.eventHub.emit(YR.requestGotoSlide,-1)}}class AM{constructor(t,e,n){var i,r,o,s,a,l;this.scaleExt={x:1,y:1},this.scaleOrigin={x:1,y:1},this.designScale={x:1,y:1},this.bound=new d_(0,0,1,1),this.pptX=0,this.pptY=0,this.presetSubType=0,this.designWidth=0,this.designHeight=0,this.designX=0,this.designY=0,this.hasPreset=!1,this.container=new ty,this.ctx=e,this.style=new EM(this.container,t.hardHidden),this.designGlobalPosition={x:n.x+(null!==(r=null===(i=t.position)||void 0===i?void 0:i.x)&&void 0!==r?r:0),y:n.y+(null!==(s=null===(o=t.position)||void 0===o?void 0:o.y)&&void 0!==s?s:0)},this.container.interactive=!0,(t.hlinkClick||t.hlinkHover)&&(this.hyperlink=new MM(this.container,this.ctx),t.hlinkHover&&(null===(a=this.hyperlink)||void 0===a||a.addAction(t.hlinkHover,"hover")),t.hlinkClick&&(null===(l=this.hyperlink)||void 0===l||l.addAction(t.hlinkClick,"click"))),this.ctx.clock.waitUntil(()=>{try{return!!this.container.width}catch(t){return!1}},3e3).then(()=>{try{this.designWidth=this.designWidth||this.container.width}catch(t){}}),this.ctx.clock.waitUntil(()=>{try{return!!this.container.height}catch(t){return!1}},3e3).then(()=>{try{this.designHeight=this.designHeight||this.container.height}catch(t){}})}updateScale(){this.container&&(this.container.scale.x=this.designScale.x*this.scaleExt.x*this.scaleOrigin.x,this.container.scale.y=this.designScale.y*this.scaleExt.y*this.scaleOrigin.y)}updateTransform(t){var e,n,i,r,o,s,a,l;this.designWidth=t.width,this.designHeight=t.height,this.designX=null!==(n=null===(e=t.position)||void 0===e?void 0:e.x)&&void 0!==n?n:0,this.designY=null!==(r=null===(i=t.position)||void 0===i?void 0:i.y)&&void 0!==r?r:0;const u=this.designWidth/2,h=this.designHeight/2;this.container.width=this.designWidth,this.container.height=this.designHeight,this.container.pivot.x=u,this.container.pivot.y=h;const c=null!==(s=null===(o=t.position)||void 0===o?void 0:o.x)&&void 0!==s?s:0,d=null!==(l=null===(a=t.position)||void 0===a?void 0:a.y)&&void 0!==l?l:0;this.container.x=c+u,this.container.y=d+h,t.scale&&(this.designScale={x:t.scale.x,y:t.scale.y},this.container.scale.x=t.scale.x,this.container.scale.y=t.scale.y),t.rotation&&(this.container.rotation=t.rotation);const p=new Aw;p.drawRect(0,0,this.designWidth,this.designHeight),this.container.addChild(p),this.json.hardHidden&&(this.container.visible=!1),this.bound.x=c,this.bound.y=d,this.bound.width=this.designWidth,this.bound.height=this.designHeight}get scale(){return this.scaleOrigin}set scale(t){this.scaleOrigin.x=t.x,this.scaleOrigin.y=t.y,this.updateScale()}get design_ppt_w(){return $E(this.designWidth/this.ctx.stageWidth)}get design_ppt_h(){return $E((this.designHeight||this.container.height)/this.ctx.stageHeight)}get design_ppt_x(){return $E(this.designX/this.ctx.stageWidth)}get design_ppt_y(){return $E(this.designY/this.ctx.stageHeight)}get ppt_w(){return this.scaleExt.x*this.scaleOrigin.x*this.designWidth/this.ctx.stageWidth}set ppt_w(t){this.designWidth&&(this.scaleExt.x=t*this.ctx.stageWidth/this.designWidth,this.updateScale())}get ppt_h(){const t=this.designHeight||this.container.height;return this.scaleExt.y*this.scaleOrigin.y*t/this.ctx.stageHeight}set ppt_h(t){this.designHeight&&(this.scaleExt.y=t*this.ctx.stageHeight/this.designHeight,this.updateScale())}get ppt_x(){return(this.container.position.x-this.container.pivot.x)/this.ctx.stageWidth}set ppt_x(t){this.pptX=t;const e=544===this.presetSubType?this.scaleExt.x:1;this.container.position.x=t*this.ctx.stageWidth+this.container.pivot.x*e}get ppt_y(){return(this.container.position.y-this.container.pivot.y)/this.ctx.stageHeight}set ppt_y(t){this.pptY=t;const e=544===this.presetSubType?this.scaleExt.y:1;this.container.position.y=t*this.ctx.stageHeight+this.container.pivot.y*e}get r(){return this.container.rotation}set r(t){this.container.rotation=t}set xshear(t){this.container.skew.x=t}get xshear(){return this.container.skew.x}set yshear(t){this.container.skew.y=t}get yshear(){return this.container.skew.y}}class RM{constructor(t){if(this._isInit=!1,this.h=0,this.s=0,this.l=0,this.a=1,t){this._isInit=!0;const e=t.match(/-?[0-9]+/g);e&&(this.h=parseInt(e[0],10),this.s=parseInt(e[1],10)/100,this.l=parseInt(e[2],10)/100)}}isInit(){return this._isInit}by(t,e){e.h=Math.max(Math.min(this.h+t.h,359),0),e.s=Math.max(Math.min(this.s+t.s,1),0),e.l=Math.max(Math.min(this.l+t.l,1),0),e.a=Math.max(Math.min(this.a+t.a,1),0)}fromHexString(t){const[e,n,i,r]=IM(t);let o=0,s=0,a=0;const l=Math.max(e,n,i),u=Math.min(e,n,i),h=l-u;a=(l+u)/2,0===h?o=0:l===e?o=(n-i)/h%6*60:l===n?o=60*((i-e)/h+2):l===i&&(o=60*((e-n)/h+4)),s=0===h?0:h/(1-Math.abs(2*a-1)),this.h=o,this.s=s,this.l=a,this.a=r}interpolationFrom(t,e,n){const i=t.h+(this.h-t.h)*e,r=t.s+(this.s-t.s)*e,o=t.l+(this.l-t.l)*e,s=t.a+(this.a-t.a)*e;n.h=Math.max(Math.min(i,359),0),n.s=Math.max(Math.min(r,1),0),n.l=Math.max(Math.min(o,1),0),n.a=Math.max(Math.min(s,1),0)}toHexString(){let t=[0,0,0,0];const{h:e,s:n,l:i}=this;if(e<360&&e>=0&&n<=1&&n>=0&&i<=1&&i>=0){let r,o,s;const a=(1-Math.abs(2*i-1))*n,l=a*(1-Math.abs(e/60%2-1)),u=i-a/2;[r,o,s]=e>=0&&e<60?[a,l,0]:e>=60&&e<120?[l,a,0]:e>=120&&e<180?[0,a,l]:e>=180&&e<240?[0,l,a]:e>=240&&e<300?[l,0,a]:[a,0,l],t=[r+u,o+u,s+u,this.a]}return OM(t)}}class PM{constructor(t){this._isInit=!1,this.r=0,this.g=0,this.b=0,this.a=0,t&&(this._isInit=!0,this.fromHexString(t))}fromHexString(t){const[e,n,i,r]=IM(t);this.r=e,this.g=n,this.b=i,this.a=r}isInit(){return this._isInit}interpolationFrom(t,e,n){n.r=t.r+(this.r-t.r)*e,n.g=t.g+(this.g-t.g)*e,n.b=t.b+(this.b-t.b)*e,n.a=t.a+(this.a-t.a)*e}by(t,e){e.r=Math.min(Math.max(this.r+t.r,0),255),e.g=Math.min(Math.max(this.g+t.g,0),255),e.b=Math.min(Math.max(this.b+t.b,0),255),e.a=Math.min(Math.max(this.a+t.a,0),1)}toHexString(){return OM([this.r,this.g,this.b,this.a])}}function CM(t){const e=t.substring(1);return[parseInt(e.substring(0,6),16),parseInt(e.substring(6,8),16)/255]}function IM(t){return 0===(t=t.replace(/^#/,"")).substring(6,8).length&&(t+="FF"),[parseInt(t.substring(0,2).padStart(8,"0"),16)/255,parseInt(t.substring(2,4).padStart(8,"0"),16)/255,parseInt(t.substring(4,6).padStart(8,"0"),16)/255,parseInt(t.substring(6,8).padStart(8,"0"),16)/255]}function OM(t){return"#"+Math.round(255*t[0]).toString(16).padStart(2,"0")+Math.round(255*t[1]).toString(16).padStart(2,"0")+Math.round(255*t[2]).toString(16).padStart(2,"0")+Math.round(255*t[3]).toString(16).padStart(2,"0")}function LM(t,e,n){const i=IM(t),r=IM(e),o=Math.round(255*(i[0]+(r[0]-i[0])*n)),s=Math.round(255*(i[1]+(r[1]-i[1])*n)),a=Math.round(255*(i[2]+(r[2]-i[2])*n)),l=Math.round(255*(i[3]+(r[3]-i[3])*n));return"#"+o.toString(16).padStart(2,"0")+s.toString(16).padStart(2,"0")+a.toString(16).padStart(2,"0")+l.toString(16).padStart(2,"0")}class NM extends Gx{constructor(){super(void 0,"\nvarying vec2 vTextureCoord;\n\nuniform vec4 color;\nuniform sampler2D uSampler;\n\nvoid main(void){\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n\n if (texColor.a > 0.0) {\n vec4 resultColor = color;\n resultColor = resultColor * texColor.a;\n gl_FragColor = resultColor;\n } else {\n gl_FragColor = texColor;\n }\n}\n",{color:new Float32Array([0,0,0,0]),active:0}),this.currentColor="#FFFFFFFF",this.designColor="#FFFFFFFF"}set color(t){this.currentColor=t;const e=IM(t);this.uniforms.color=Float32Array.from(e)}get color(){return this.currentColor}}const DM=new WE.ColorMatrixFilter;DM.matrix=[1,0,0,0,-.2,0,1,0,0,-.2,0,0,1,0,-.2,0,0,0,1,0];const FM=new WE.ColorMatrixFilter;FM.matrix=[1,0,0,0,-.1,0,1,0,0,-.1,0,0,1,0,-.1,0,0,0,1,0];const BM=new WE.ColorMatrixFilter;BM.matrix=[1,0,0,0,.2,0,1,0,0,.2,0,0,1,0,.2,0,0,0,1,0];const UM=new WE.ColorMatrixFilter;UM.matrix=[1,0,0,0,.1,0,1,0,0,.1,0,0,1,0,.1,0,0,0,1,0];const kM={darken:DM,darkenLess:FM,lightenLess:UM,lighten:BM};class GM extends AM{constructor(t,e,n){super({position:{x:t.x,y:t.y},width:t.width,height:t.height},e,n),this.fillColorFilter=new NM,this.fill=new SM(this),this.json=t,this.ctx=e,this.parentGlobalPos=n,this.global={x:n.x+t.x,y:n.y+t.y},this.updateTransform({position:{x:t.x,y:t.y},width:t.width,height:t.height})}get fillActive(){var t,e;return(null!==(e=null===(t=this.container.filters)||void 0===t?void 0:t.length)&&void 0!==e?e:-1)>0}set fillActive(t){var e,n;t?(null!==(n=null===(e=this.container.filters)||void 0===e?void 0:e.indexOf(this.fillColorFilter))&&void 0!==n?n:-1)<0&&(this.container.filters=[this.fillColorFilter]):this.container.filters=[]}get renderContainer(){return this.container}get interactiveContainer(){return this.container}clearOnSlideChange(){}initOnReuse(){}getTextElement(){return null}getBgElement(){return null}get ppt_x(){return this.global.x/this.ctx.stageWidth}set ppt_x(t){const e=t*this.ctx.stageWidth-this.global.x,n=544===this.presetSubType?this.scaleExt.x:1;this.container.position.x=this.designX+e+this.container.pivot.x*n}get ppt_y(){return this.global.y/this.ctx.stageHeight}set ppt_y(t){const e=t*this.ctx.stageHeight-this.global.y,n=544===this.presetSubType?this.scaleExt.y:1;this.container.position.y=this.designY+e+this.container.pivot.y*n}get design_ppt_x(){return $E(this.global.x/this.ctx.stageWidth)}get design_ppt_y(){return $E(this.global.y/this.ctx.stageHeight)}}class HM{constructor(t,e,n,i,r,o,s,a,l,u,h){this.ctx=t,this.type=e,this.lineWidth=n,this.width=i,this.height=r,this.fillColor=o,this.isHorz=s,this.renderContainer=new ty,this.ghcTextureId=`${a}-text-p${l}-l${u}-u${h}-underLine`}createPaths(){if("ww"===this.type)return null;{let t=`M 0,0 L ${9525*this.width},0`,[e,n]=[this.width,this.lineWidth];return this.isHorz||(t="M 0,0 L 0,"+9525*this.height,[e,n]=[this.lineWidth,this.height]),{paths:[{id:eM(),path:t,fill:"norm",hasStroke:!0,scale:{x:1,y:1},hash:dM()(t)}],width:e,height:n}}}getLineStyle(){const t={width:this.lineWidth};return"dotted"===this.type&&(t.dash=""+this.lineWidth),t}preRender(){const t=this.createPaths();if(t){const{paths:e,width:n,height:i}=t,r=e.reduce((t,e)=>t+e.hash,"");this.ctx.graphicsTexture.addGraphics(this.ghcTextureId,e,r,{x:0,y:0},n,i,this.getLineStyle(),this.ctx.objectPoolGroup,!1,null,this.fillColor)}}render(){if(this.ghcTextureId){const t=this.ctx.graphicsTexture.getGraphicsData(this.ghcTextureId);t&&(this.sprite=new Ow,this.sprite.texture=t.texture,this.sprite.pivot.x=t.pivot.x)}}destroy(){var t;null===(t=this.sprite)||void 0===t||t.destroy({texture:!0})}}const zM=134217729;function jM(t,e,n,i,r){let o,s,a,l,u=e[0],h=i[0],c=0,d=0;h>u==h>-u?(o=u,u=e[++c]):(o=h,h=i[++d]);let p=0;if(c<t&&d<n)for(h>u==h>-u?(s=u+o,a=o-(s-u),u=e[++c]):(s=h+o,a=o-(s-h),h=i[++d]),o=s,0!==a&&(r[p++]=a);c<t&&d<n;)h>u==h>-u?(s=o+u,l=s-o,a=o-(s-l)+(u-l),u=e[++c]):(s=o+h,l=s-o,a=o-(s-l)+(h-l),h=i[++d]),o=s,0!==a&&(r[p++]=a);for(;c<t;)s=o+u,l=s-o,a=o-(s-l)+(u-l),u=e[++c],o=s,0!==a&&(r[p++]=a);for(;d<n;)s=o+h,l=s-o,a=o-(s-l)+(h-l),h=i[++d],o=s,0!==a&&(r[p++]=a);return 0===o&&0!==p||(r[p++]=o),p}function VM(t,e){let n=e[0];for(let i=1;i<t;i++)n+=e[i];return n}function WM(t){return new Float64Array(t)}const XM=WM(4),qM=WM(8),YM=WM(12),ZM=WM(16),JM=WM(4);function KM(t,e,n,i,r,o){const s=(e-o)*(n-r),a=(t-r)*(i-o),l=s-a;if(0===s||0===a||s>0!=a>0)return l;const u=Math.abs(s+a);return Math.abs(l)>=33306690738754716e-32*u?l:-function(t,e,n,i,r,o,s){let a,l,u,h,c,d,p,f,m,g,v,_,y,x,b,T,w,S;const E=t-r,M=n-r,A=e-o,R=i-o;x=E*R,d=zM*E,p=d-(d-E),f=E-p,d=zM*R,m=d-(d-R),g=R-m,b=f*g-(x-p*m-f*m-p*g),T=A*M,d=zM*A,p=d-(d-A),f=A-p,d=zM*M,m=d-(d-M),g=M-m,w=f*g-(T-p*m-f*m-p*g),v=b-w,c=b-v,XM[0]=b-(v+c)+(c-w),_=x+v,c=_-x,y=x-(_-c)+(v-c),v=y-T,c=y-v,XM[1]=y-(v+c)+(c-T),S=_+v,c=S-_,XM[2]=_-(S-c)+(v-c),XM[3]=S;let P=VM(4,XM),C=22204460492503146e-32*s;if(P>=C||-P>=C)return P;if(c=t-E,a=t-(E+c)+(c-r),c=n-M,u=n-(M+c)+(c-r),c=e-A,l=e-(A+c)+(c-o),c=i-R,h=i-(R+c)+(c-o),0===a&&0===l&&0===u&&0===h)return P;if(C=11093356479670487e-47*s+33306690738754706e-32*Math.abs(P),P+=E*h+R*a-(A*u+M*l),P>=C||-P>=C)return P;x=a*R,d=zM*a,p=d-(d-a),f=a-p,d=zM*R,m=d-(d-R),g=R-m,b=f*g-(x-p*m-f*m-p*g),T=l*M,d=zM*l,p=d-(d-l),f=l-p,d=zM*M,m=d-(d-M),g=M-m,w=f*g-(T-p*m-f*m-p*g),v=b-w,c=b-v,JM[0]=b-(v+c)+(c-w),_=x+v,c=_-x,y=x-(_-c)+(v-c),v=y-T,c=y-v,JM[1]=y-(v+c)+(c-T),S=_+v,c=S-_,JM[2]=_-(S-c)+(v-c),JM[3]=S;const I=jM(4,XM,4,JM,qM);x=E*h,d=zM*E,p=d-(d-E),f=E-p,d=zM*h,m=d-(d-h),g=h-m,b=f*g-(x-p*m-f*m-p*g),T=A*u,d=zM*A,p=d-(d-A),f=A-p,d=zM*u,m=d-(d-u),g=u-m,w=f*g-(T-p*m-f*m-p*g),v=b-w,c=b-v,JM[0]=b-(v+c)+(c-w),_=x+v,c=_-x,y=x-(_-c)+(v-c),v=y-T,c=y-v,JM[1]=y-(v+c)+(c-T),S=_+v,c=S-_,JM[2]=_-(S-c)+(v-c),JM[3]=S;const O=jM(I,qM,4,JM,YM);x=a*h,d=zM*a,p=d-(d-a),f=a-p,d=zM*h,m=d-(d-h),g=h-m,b=f*g-(x-p*m-f*m-p*g),T=l*u,d=zM*l,p=d-(d-l),f=l-p,d=zM*u,m=d-(d-u),g=u-m,w=f*g-(T-p*m-f*m-p*g),v=b-w,c=b-v,JM[0]=b-(v+c)+(c-w),_=x+v,c=_-x,y=x-(_-c)+(v-c),v=y-T,c=y-v,JM[1]=y-(v+c)+(c-T),S=_+v,c=S-_,JM[2]=_-(S-c)+(v-c),JM[3]=S;const L=jM(O,YM,4,JM,ZM);return ZM[L-1]}(t,e,n,i,r,o,u)}WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(8),WM(8),WM(8),WM(4),WM(8),WM(8),WM(8),WM(12);WM(192),WM(192);WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(8),WM(8),WM(8),WM(8),WM(8),WM(8),WM(8),WM(8),WM(8),WM(4),WM(4),WM(4),WM(8),WM(16),WM(16),WM(16),WM(32),WM(32),WM(48),WM(64);WM(1152),WM(1152);WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(24),WM(24),WM(24),WM(24),WM(24),WM(24),WM(24),WM(24),WM(24),WM(24),WM(1152),WM(1152),WM(1152),WM(1152),WM(1152),WM(2304),WM(2304),WM(3456),WM(5760),WM(8),WM(8),WM(8),WM(16),WM(24),WM(48),WM(48),WM(96),WM(192),WM(384),WM(384),WM(384),WM(768);WM(96),WM(96),WM(96),WM(1152);const $M=Math.pow(2,-52),QM=new Uint32Array(512);class tA{static from(t,e=sA,n=aA){const i=t.length,r=new Float64Array(2*i);for(let o=0;o<i;o++){const i=t[o];r[2*o]=e(i),r[2*o+1]=n(i)}return new tA(r)}constructor(t){const e=t.length>>1;if(e>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const n=Math.max(2*e-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(e)),this._hullPrev=new Uint32Array(e),this._hullNext=new Uint32Array(e),this._hullTri=new Uint32Array(e),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(e),this._dists=new Float64Array(e),this.update()}update(){const{coords:t,_hullPrev:e,_hullNext:n,_hullTri:i,_hullHash:r}=this,o=t.length>>1;let s=1/0,a=1/0,l=-1/0,u=-1/0;for(let e=0;e<o;e++){const n=t[2*e],i=t[2*e+1];n<s&&(s=n),i<a&&(a=i),n>l&&(l=n),i>u&&(u=i),this._ids[e]=e}const h=(s+l)/2,c=(a+u)/2;let d,p,f,m=1/0;for(let e=0;e<o;e++){const n=eA(h,c,t[2*e],t[2*e+1]);n<m&&(d=e,m=n)}const g=t[2*d],v=t[2*d+1];m=1/0;for(let e=0;e<o;e++){if(e===d)continue;const n=eA(g,v,t[2*e],t[2*e+1]);n<m&&n>0&&(p=e,m=n)}let _=t[2*p],y=t[2*p+1],x=1/0;for(let e=0;e<o;e++){if(e===d||e===p)continue;const n=iA(g,v,_,y,t[2*e],t[2*e+1]);n<x&&(f=e,x=n)}let b=t[2*f],T=t[2*f+1];if(x===1/0){for(let e=0;e<o;e++)this._dists[e]=t[2*e]-t[0]||t[2*e+1]-t[1];rA(this._ids,this._dists,0,o-1);const e=new Uint32Array(o);let n=0;for(let t=0,i=-1/0;t<o;t++){const r=this._ids[t];this._dists[r]>i&&(e[n++]=r,i=this._dists[r])}return this.hull=e.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(KM(g,v,_,y,b,T)<0){const t=p,e=_,n=y;p=f,_=b,y=T,f=t,b=e,T=n}const w=function(t,e,n,i,r,o){const s=n-t,a=i-e,l=r-t,u=o-e,h=s*s+a*a,c=l*l+u*u,d=.5/(s*u-a*l);return{x:t+(u*h-a*c)*d,y:e+(s*c-l*h)*d}}(g,v,_,y,b,T);this._cx=w.x,this._cy=w.y;for(let e=0;e<o;e++)this._dists[e]=eA(t[2*e],t[2*e+1],w.x,w.y);rA(this._ids,this._dists,0,o-1),this._hullStart=d;let S=3;n[d]=e[f]=p,n[p]=e[d]=f,n[f]=e[p]=d,i[d]=0,i[p]=1,i[f]=2,r.fill(-1),r[this._hashKey(g,v)]=d,r[this._hashKey(_,y)]=p,r[this._hashKey(b,T)]=f,this.trianglesLen=0,this._addTriangle(d,p,f,-1,-1,-1);for(let o,s,a=0;a<this._ids.length;a++){const l=this._ids[a],u=t[2*l],h=t[2*l+1];if(a>0&&Math.abs(u-o)<=$M&&Math.abs(h-s)<=$M)continue;if(o=u,s=h,l===d||l===p||l===f)continue;let c=0;for(let t=0,e=this._hashKey(u,h);t<this._hashSize&&(c=r[(e+t)%this._hashSize],-1===c||c===n[c]);t++);c=e[c];let m,g=c;for(;m=n[g],KM(u,h,t[2*g],t[2*g+1],t[2*m],t[2*m+1])>=0;)if(g=m,g===c){g=-1;break}if(-1===g)continue;let v=this._addTriangle(g,l,n[g],-1,-1,i[g]);i[l]=this._legalize(v+2),i[g]=v,S++;let _=n[g];for(;m=n[_],KM(u,h,t[2*_],t[2*_+1],t[2*m],t[2*m+1])<0;)v=this._addTriangle(_,l,m,i[l],-1,i[_]),i[l]=this._legalize(v+2),n[_]=_,S--,_=m;if(g===c)for(;m=e[g],KM(u,h,t[2*m],t[2*m+1],t[2*g],t[2*g+1])<0;)v=this._addTriangle(m,l,g,-1,i[g],i[m]),this._legalize(v+2),i[m]=v,n[g]=g,S--,g=m;this._hullStart=e[l]=g,n[g]=e[_]=l,n[l]=_,r[this._hashKey(u,h)]=l,r[this._hashKey(t[2*g],t[2*g+1])]=g}this.hull=new Uint32Array(S);for(let t=0,e=this._hullStart;t<S;t++)this.hull[t]=e,e=n[e];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,e){return Math.floor(function(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}(t-this._cx,e-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:e,_halfedges:n,coords:i}=this;let r=0,o=0;for(;;){const s=n[t],a=t-t%3;if(o=a+(t+2)%3,-1===s){if(0===r)break;t=QM[--r];continue}const l=s-s%3,u=a+(t+1)%3,h=l+(s+2)%3,c=e[o],d=e[t],p=e[u],f=e[h];if(nA(i[2*c],i[2*c+1],i[2*d],i[2*d+1],i[2*p],i[2*p+1],i[2*f],i[2*f+1])){e[t]=f,e[s]=c;const i=n[h];if(-1===i){let e=this._hullStart;do{if(this._hullTri[e]===h){this._hullTri[e]=t;break}e=this._hullPrev[e]}while(e!==this._hullStart)}this._link(t,i),this._link(s,n[o]),this._link(o,h);const a=l+(s+1)%3;r<QM.length&&(QM[r++]=a)}else{if(0===r)break;t=QM[--r]}}return o}_link(t,e){this._halfedges[t]=e,-1!==e&&(this._halfedges[e]=t)}_addTriangle(t,e,n,i,r,o){const s=this.trianglesLen;return this._triangles[s]=t,this._triangles[s+1]=e,this._triangles[s+2]=n,this._link(s,i),this._link(s+1,r),this._link(s+2,o),this.trianglesLen+=3,s}}function eA(t,e,n,i){const r=t-n,o=e-i;return r*r+o*o}function nA(t,e,n,i,r,o,s,a){const l=t-s,u=e-a,h=n-s,c=i-a,d=r-s,p=o-a,f=h*h+c*c,m=d*d+p*p;return l*(c*m-f*p)-u*(h*m-f*d)+(l*l+u*u)*(h*p-c*d)<0}function iA(t,e,n,i,r,o){const s=n-t,a=i-e,l=r-t,u=o-e,h=s*s+a*a,c=l*l+u*u,d=.5/(s*u-a*l),p=(u*h-a*c)*d,f=(s*c-l*h)*d;return p*p+f*f}function rA(t,e,n,i){if(i-n<=20)for(let r=n+1;r<=i;r++){const i=t[r],o=e[i];let s=r-1;for(;s>=n&&e[t[s]]>o;)t[s+1]=t[s--];t[s+1]=i}else{let r=n+1,o=i;oA(t,n+i>>1,r),e[t[n]]>e[t[i]]&&oA(t,n,i),e[t[r]]>e[t[i]]&&oA(t,r,i),e[t[n]]>e[t[r]]&&oA(t,n,r);const s=t[r],a=e[s];for(;;){do{r++}while(e[t[r]]<a);do{o--}while(e[t[o]]>a);if(o<r)break;oA(t,r,o)}t[n+1]=t[o],t[o]=s,i-r+1>=o-n?(rA(t,e,r,i),rA(t,e,n,o-1)):(rA(t,e,n,o-1),rA(t,e,r,i))}}function oA(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}function sA(t){return t[0]}function aA(t){return t[1]}function lA(t,e,n){let i=null;const r=new ty;if(t.stopList.sort((t,e)=>t.pos-e.pos),!t.stopList.find(t=>0===t.pos)){const e=t.stopList[0];t.stopList.unshift({pos:0,color:e.color})}if(!t.stopList.find(t=>1===t.pos)){const e=t.stopList[t.stopList.length-1];t.stopList.push({pos:1,color:e.color})}const o=t=>{const e=[];for(let n=0,i=t.length;n<i-1;n++){const i=t[n],r=t[n+1],o=i.pos+.5*(r.pos-i.pos),s=LM(i.color,r.color,.5),a=2*n;e[a]=i,e[a+1]={color:s,pos:o},e[a+2]=r}return e};if(t.stopList=o(t.stopList),t.stopList=o(t.stopList),i=t.line?uA(t,e,n):t.path?function(t,e,n){var i,r,o;const s=[],a={x:0,y:0};if("circle"===(null===(i=t.path)||void 0===i?void 0:i.path)||"rect"===(null===(r=t.path)||void 0===r?void 0:r.path)||"shape"===(null===(o=t.path)||void 0===o?void 0:o.path)){const i=e/2,r=n/2,o=Math.sqrt(i*i+r*r);t.stopList.forEach(t=>{if(0===t.pos)s.push({point:{x:0,y:0},color:t.color});else{const e=o*t.pos,n=new xc;n.absellipse(0,0,e,e,0,2*Math.PI,!1,0),n.getPoints(50).forEach(e=>{s.push({point:{x:e.x,y:e.y},color:t.color})})}a.x=i,a.y=r})}return{points:s,position:a}}(t,e,n):uA(t,e,n),i){const t=[],o=[],{position:s,points:a}=i,l=tA.from(a,t=>t.point.x,t=>t.point.y);for(let e=0;e<l.triangles.length;e+=3)t.push(a[l.triangles[e]].point.x,a[l.triangles[e]].point.y),t.push(a[l.triangles[e+1]].point.x,a[l.triangles[e+1]].point.y),t.push(a[l.triangles[e+2]].point.x,a[l.triangles[e+2]].point.y),o.push(...IM(a[l.triangles[e]].color)),o.push(...IM(a[l.triangles[e+1]].color)),o.push(...IM(a[l.triangles[e+2]].color));const u=new Jy;u.addAttribute("aVertexPosition",t,2),u.addAttribute("aColor",o,4);const h=Ux.from("\n precision mediump float;\n attribute vec2 aVertexPosition;\n attribute vec4 aColor;\n uniform mat3 translationMatrix;\n uniform mat3 projectionMatrix;\n varying vec4 vColor;\n void main() {\n vColor = aColor;\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n }","precision mediump float; \n varying vec4 vColor;\n void main() {\n float alpha = vColor.a;\n vec4 color = vColor;\n color.a = 1.0;\n gl_FragColor = color * alpha;\n }\n "),c=new Aw;c.drawRect(0,0,e+1,n+1),r.mask=c,r.addChild(c);const d=new vS(u,h);d.position.x=s.x,d.position.y=s.y,r.addChild(d)}return r}function uA(t,e,n){const i=e/2,r=n/2,o=[{x:-i,y:r},{x:-i,y:-r},{x:i,y:r},{x:i,y:-r}],s=[QE.fromPointSlope({x:-i,y:0},Math.PI/2),QE.fromPointSlope({x:0,y:r},0),QE.fromPointSlope({x:i,y:0},Math.PI/2),QE.fromPointSlope({x:0,y:-r},0)],a=[],l=t.stopList.slice(1,t.stopList.length-1).map(o=>{var l,u,h;const c=2*Math.PI;let d=null!==(u=null===(l=t.line)||void 0===l?void 0:l.ang)&&void 0!==u?u:0;for(;d>c;)d-=c;for(;d<0;)d+=c;const p={x:0,y:0};KE(d,Math.PI/2)?(p.x=0,p.y=n/2-o.pos*n):KE(d,0)?(p.x=o.pos*e-e/2,p.y=0):(p.x=o.pos*e-e/2,p.y=n/2-o.pos*n),d>Math.PI/2&&d<=Math.PI&&(p.x*=-1),d>Math.PI&&d<=2*Math.PI&&(p.y*=-1);const f=QE.fromPointSlope(p,Math.PI/2-((null===(h=t.line)||void 0===h?void 0:h.ang)||0)),m=s.map(t=>f.crossPoint(t)).filter(t=>t&&t.x<=i&&t.x>=-i&&t.y<=r&&t.y>=-r).map(t=>({point:t,color:o.color})).sort((t,e)=>e.point.y-t.point.y);a.push(...m);let g=Math.abs(m[1].point.x-m[0].point.x)/10;for(let t=20;t--;){const e=t%2==0?1:-1,n=p.x+e*g,s=f.resolveY(n);n<=i&&n>=-i&&s<=r&&s>=-r&&a.push({point:{x:n,y:s},color:o.color}),g+=g}return f});let u=[],h=[];t:for(let e=0;e<o.length;e++){const n=o[e];for(let e=0;e<l.length-1;e++){const i=l[e],r=l[e+1],o=i.distanceToLinearEquation(r),s=i.distanceToPoint(n),u=r.distanceToPoint(n);if(s<o&&u<o){const i=t.stopList.slice(1,t.stopList.length-1)[e],r=t.stopList.slice(1,t.stopList.length-1)[e+1],l=LM(i.color,r.color,s/o);a.splice(e+1,0,{point:n,color:l});continue t}}const i=l[0],r=l[l.length-1],s=i.distanceToPoint(n),c=r.distanceToPoint(n);s<=c?u.push({point:n,dis:s}):h.push({point:n,dis:c})}u=u.sort((t,e)=>e.dis-t.dis);const c=u.map((e,n)=>{if(0===n)return{point:e.point,color:t.stopList[0].color};{const n=t.stopList[0].color,i=t.stopList[1].color;return{point:e.point,color:LM(n,i,1-(0===u[0].dis?1:e.dis/u[0].dis))}}}).sort((t,e)=>e.point.y-t.point.y);h=h.sort((t,e)=>e.dis-t.dis);const d=h.map((e,n)=>{if(0===n)return{point:e.point,color:t.stopList[t.stopList.length-1].color};{const n=t.stopList[t.stopList.length-2].color,i=t.stopList[t.stopList.length-1].color;return{point:e.point,color:LM(n,i,0===h[0].dis?0:e.dis/h[0].dis)}}}).sort((t,e)=>e.point.y-t.point.y),p=c.concat(...a).concat(d);for(let t=0;t<p.length;t++)p[t].point.x+=i,p[t].point.y=-p[t].point.y+r;return{points:p,position:{x:0,y:0}}}const hA="\nvec3 rgb2hsl(vec3 rgb) {\n float cMax = max(max(rgb.r, rgb.g), rgb.b);\n float cMin = min(min(rgb.r, rgb.g), rgb.b);\n float delta = cMax - cMin;\n \n float h = 0.0;\n if (delta == 0.0) {\n h = 0.0;\n } else if (cMax == rgb.r) {\n h = 60.0 * mod(((rgb.g - rgb.b) / delta), 6.0);\n } else if (cMax == rgb.g ) {\n h = 60.0 * ((rgb.b - rgb.r) / delta + 2.0);\n } else if (cMax == rgb.b) {\n h = 60.0 * ((rgb.r - rgb.g) / delta + 4.0);\n }\n \n float l = (cMax + cMin) / 2.0;\n \n float s = 0.0;\n if (delta == 0.0) {\n s = 0.0;\n } else {\n s = delta / (1.0 - abs(2.0 * l - 1.0));\n }\n \n return vec3(h, s, l);\n}\n",cA=[hA],dA={biLevel:"\nvec4 transform(vec4 texColor, float arg) {\n vec3 hsl = rgb2hsl(texColor.rgb);\n mat3 rgb2yuv = mat3(\n 0.2126, 0.7152, 0.0722,\n -0.09991, -0.33609, 0.43600,\n 0.615, -0.5586, -0.05639\n );\n vec3 yuv = texColor.rgb * rgb2yuv;\n if (yuv.x >= 0.49 || texColor.a < 0.9) {\n return vec4(1.0, 1.0, 1.0, 1.0) * texColor.a;\n } else {\n return vec4(0.0, 0.0, 0.0, 1.0) * texColor.a;\n }\n}\n",alphaModFix:"\nvec4 transform(vec4 texColor, float arg) {\n return texColor * arg;\n}\n"};class pA extends Gx{constructor(t,e){var n;super(void 0,(n=dA[t],`\nvarying vec2 vTextureCoord;\n\nuniform float arg;\nuniform sampler2D uSampler;\n\n${cA.map(t=>t+"\n").join("\n")}\n\n${n}\n\nvoid main(void){\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = transform(texColor, arg);\n}\n`),{arg:e})}}const fA=[hA],mA={clrChange:"\nvec4 transform(vec4 texColor, vec4 arg1, vec4 arg2) {\n float epsilon = 0.001;\n vec3 colorDiff = arg1.rgb - (texColor.rgb / max(texColor.a, 0.0000000001));\n float colorDistance = length(colorDiff);\n if (colorDistance < epsilon) {\n arg2.rgb *= arg2.a;\n return arg2;\n } else {\n return texColor;\n }\n}\n",changeBulletColor:"\nvec4 transform(vec4 texColor, vec4 arg1, vec4 arg2) {\n if (texColor.a == 0.0) {\n return texColor;\n } else {\n return arg2;\n }\n}\n"};class gA extends Gx{constructor(t,e,n){var i;super(void 0,(i=mA[t],`\nvarying vec2 vTextureCoord;\n\nuniform vec4 arg1;\nuniform vec4 arg2;\nuniform sampler2D uSampler;\n\n${fA.map(t=>t+"\n").join("\n")}\n\n${i}\n\nvoid main(void){\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = transform(texColor, arg1, arg2);\n}\n`),{arg1:Float32Array.from(e),arg2:Float32Array.from(n)})}}const vA=[hA],_A={lum:"\nvec4 transform(vec4 texColor, float arg1, float arg2) {\n if (arg1 > 0.0) {\n texColor.r += (1.0 - texColor.r) * arg1;\n texColor.g += (1.0 - texColor.g) * arg1;\n texColor.b += (1.0 - texColor.b) * arg1;\n } else if (arg1 < 0.0) {\n texColor.r -= texColor.r * arg1;\n texColor.g -= texColor.g * arg1;\n texColor.b -= texColor.b * arg1;\n }\n // todo 对比度\n texColor.rgb *= texColor.a;\n return texColor;\n}\n"};class yA extends Gx{constructor(t,e,n){var i;super(void 0,(i=_A[t],`\nvarying vec2 vTextureCoord;\n\nuniform float arg1;\nuniform float arg2;\nuniform sampler2D uSampler;\n\n${vA.map(t=>t+"\n").join("\n")}\n\n${i}\n\nvoid main(void){\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = transform(texColor, arg1, arg2);\n}\n`),{arg1:e,arg2:n})}}class xA{constructor(t,e,n,i,r){this.ctx=t,this.fillStyle=e,this.width=n,this.height=i,this.config=r,this.clonedObjects=[],this._displayObject=null}get displayObject(){return this._displayObject||(this._displayObject=this.createDisplayObject()),this._displayObject}set displayObject(t){this._displayObject&&this._displayObject.destroy({children:!0,texture:!0}),this._displayObject=t}get hasFill(){return!!this.fillStyle&&"noFill"!==this.fillStyle.fillType}createDisplayObject(){var t;if(!this.fillStyle)return null;if(this.config.useSlideBackgroundFill&&this.ctx.bgTexture){const t=new Ow;return t.texture=this.ctx.bgTexture,t}if("solidFill"===this.fillStyle.fillType||"noFill"===this.fillStyle.fillType)return null;if("gradientFill"===this.fillStyle.fillType)return lA(this.fillStyle,this.width,this.height);if("blipFill"===this.fillStyle.fillType){const{src:e,filters:n}=this.fillStyle,i=this.ctx.spriteTexture.getTexture(e),r=this.ctx.spriteTexture.getFrameData(e);if(i){const e=new Ow;if(e.texture=i,n.length>0&&this.config.useFilter&&(e.filters=function(t){const e=[];return t.forEach(t=>{if("biLevel"===t.type)e.push(new pA("biLevel",t.args[0]));else if("clrChange"===t.type||"changeBulletColor"===t.type){const n=IM(t.args[0]),i=IM(t.args[1]);e.push(new gA(t.type,n,i))}else"alphaModFix"===t.type?e.push(new pA(t.type,t.args[0])):"lum"===t.type&&e.push(new yA(t.type,t.args[0],t.args[1]))}),e}(n)),this.config.fillFloat){const{l:n,t:i,r:r,b:o}=this.config.fillFloat.fillRect,s=this.width*(1-n-r),a=this.height*(1-i-o),l=null!==(t=this.config.shapeRotation)&&void 0!==t?t:0,u=new Aw;u.drawRect(0,0,s,a),u.pivot.x=s/2,u.pivot.y=a/2,u.rotation=l;const h=u.getBounds(),c=h.width,d=h.height;e.width=c,e.height=d,e.anchor.x=.5,e.anchor.y=.5,e.rotation=-1*l,e.name="math-texture",0===l?(e.position.x=c/2+n*this.width,e.position.y=d/2+i*this.width):(e.position.x=this.width/2,e.position.y=this.height/2)}else e.width=this.width,e.height=this.height,r.rotate&&(e.position.x=this.width/2,e.position.y=this.height/2,e.anchor.x=.5,e.anchor.y=.5,e.rotation=r.rotate/180*Math.PI);return e}}else if("gifFill"===this.fillStyle.fillType){const{src:t,delays:e}=this.fillStyle,n=this.ctx.spriteTexture.getGifFrames(t).map((t,n)=>({texture:t,time:e[n]||20})),i=new jE(n,!0);i.width=this.width,i.height=this.height;const r=this.fillStyle.loop;let o=1;return i.onLoop=()=>{o+=1,r>0&&o>r&&i.gotoAndStop(i.totalFrames)},i}return null}isSolidFill(){var t;return"solidFill"===(null===(t=this.fillStyle)||void 0===t?void 0:t.fillType)}getSolidFillColor(){var t;return"solidFill"===(null===(t=this.fillStyle)||void 0===t?void 0:t.fillType)?this.fillStyle.color:"#000000"}getClonedDisplayObject(){const t=this.createDisplayObject();return this.clonedObjects.push(t),t}destroy(){var t;null===(t=this._displayObject)||void 0===t||t.destroy(),this._displayObject=null,this.clonedObjects.forEach(t=>{null==t||t.destroy()}),this.clonedObjects=[]}}var bA=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class TA extends GM{constructor(t,e,n){var i;super(t,e,n),this.textureContainer=new ty,this.underline=null,this.cacheSprite=new Ow;const{shapeId:r,paragraphIndex:o,lineIndex:s,unitIndex:a,lineHeight:l,width:u,underLine:h,fill:c,height:d,isHorz:p,lineWidth:f}=t,m="solidFill"===(null===(i=null==c?void 0:c.fill)||void 0===i?void 0:i.fillType)?c.fill.color:null;if(h){const t=p?l/16:f/16;this.underline=new HM(e,h.type,t,u,d,m,p,r,o,s,a)}this.textGraphics=this.createTextGraphics(),this.textFill=this.createTextFill(),this.strokeGraphics=this.createStrokeGraphics(),this.strokeFill=this.createStrokeFill()}createStrokeFill(){const{stroke:t,lineWidth:e,lineHeight:n}=this.json;return new xA(this.ctx,null==t?void 0:t.fill,e,n,{useFilter:!1,useSlideBackgroundFill:!1})}createStrokeGraphics(){const{stroke:t}=this.json,e=(null==t?void 0:t.key)?{fillType:"blipFill",src:t.key,filters:[]}:void 0;return new xA(this.ctx,e,(null==t?void 0:t.width)||0,(null==t?void 0:t.height)||0,{useFilter:!1,useSlideBackgroundFill:!1})}createTextFill(){const{isHorz:t,fill:e,lineWidth:n,lineHeight:i,fillLineHeight:r}=this.json;return t?new xA(this.ctx,null==e?void 0:e.fill,n,Math.max(r,i),{useFilter:!1,useSlideBackgroundFill:!1}):new xA(this.ctx,null==e?void 0:e.fill,r,i,{useFilter:!1,useSlideBackgroundFill:!1})}createTextGraphics(){var t;const{fill:e,content:n}=this.json;let i="#000000";"solidFill"===(null===(t=null==e?void 0:e.fill)||void 0===t?void 0:t.fillType)&&(i=e.fill.color);const r=(null==e?void 0:e.key)?{fillType:"blipFill",src:e.key,filters:[{type:"changeBulletColor",args:["#000000",i]}]}:void 0;return new xA(this.ctx,r,(null==e?void 0:e.width)||0,(null==e?void 0:e.height)||0,{useFilter:"◾"===n,useSlideBackgroundFill:!1})}getIterateEntry(){return null}getBgElement(){return null}updateTransform(t){var e,n,i,r;const{isHorz:o}=this.json;t.position={x:o&&null!==(n=null===(e=t.position)||void 0===e?void 0:e.x)&&void 0!==n?n:0,y:o?0:null!==(r=null===(i=t.position)||void 0===i?void 0:i.y)&&void 0!==r?r:0},t.width=o?this.json.width:this.json.lineWidth,t.height=o?this.json.lineHeight:this.json.height,super.updateTransform(t)}preRender(){var t;null===(t=this.underline)||void 0===t||t.preRender()}render(t){t.addSubMTask(()=>bA(this,void 0,void 0,(function*(){this.doRender()})),"@TextUnitImpl[doRender]")}doRender(){let t=!1;const{lineWidth:e,lineHeight:n,baseLine:i,isHorz:r,underline:o,height:s,width:a,highlightColor:l,x:u,y:h,content:c,fillLineHeight:d,fill:p}=this.json;let f=!1!==this.json.needFill;if(p&&p.fill&&"solidFill"!==p.fill.fillType&&(f=!0),l){const t=new Aw,[i,o]=CM(l);t.beginFill(i,o),t.drawRect(0,0,r?a:e,r?n:s),t.endFill(),this.textureContainer.addChild(t)}if(this.textGraphics.displayObject){const e=this.textGraphics.displayObject;if(e.scale.x=.5,e.scale.y=.5,r&&(e.position.y=h>0?h:0),f){const n=this.textFill.displayObject;if(n)n.mask=e,n.addChild(e),n.position.x=-u,e.position.x+=u,t=!0,this.textureContainer.addChild(n);else if(this.textFill.isSolidFill()){const n=new NM;n.color=this.textFill.getSolidFillColor(),e.filters=[n],t=!0,this.textureContainer.addChild(e)}}else this.textureContainer.addChild(e)}if(this.strokeGraphics.displayObject){const e=this.strokeGraphics.displayObject;if(e.scale.x=.5,e.scale.y=.5,f){const n=this.strokeFill.displayObject;if(n)n.mask=e,n.addChild(e),r?n.position.y=h>0?h:0:n.position.x=u,this.textureContainer.addChild(n);else if(this.strokeFill.isSolidFill()){r?e.position.y=h>0?h:0:e.position.x=u;const n=new NM;n.color=this.strokeFill.getSolidFillColor(),e.filters=[n],t=!0,this.textureContainer.addChild(e)}}else r?e.position.y=h>0?h:0:e.position.x=u,this.textureContainer.addChild(e)}if(this.underline&&(this.underline.render(),this.underline.sprite)){r?(this.underline.sprite.position.y=o?o-n/16:i,this.underline.sprite.position.x=0):(this.underline.sprite.position.x=0,this.underline.sprite.position.y=0);const t=this.textFill.getClonedDisplayObject();t?(t.mask=this.underline.sprite,t.addChild(this.underline.sprite),this.textureContainer.addChild(t)):this.textureContainer.addChild(this.underline.sprite)}if(t){const t=Hy.create({width:r?a:e,height:r?Math.max(d,n):s,resolution:this.ctx.renderer.resolution});this.ctx.renderer.render(this.textureContainer,{renderTexture:t}),this.cacheSprite.texture=t,r&&h<0&&(this.cacheSprite.position.y=h),this.container.addChild(this.cacheSprite)}else this.container.addChild(this.textureContainer);this.container.name=c}destroy(){this.textFill.destroy(),this.textGraphics.destroy(),this.strokeFill.destroy(),this.strokeGraphics.destroy(),this.cacheSprite.texture.destroy(!0),this.cacheSprite.destroy(),this.textureContainer.destroy(),this.container.destroy()}}var wA=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class SA extends GM{constructor(){super(...arguments),this.units=[],this.isHorz=!0}getIterateElements(){return this.units}getIterateEntry(t,e,n){return this.units[e]?this.units[e]:(this.ctx.eventHub.emit("IterateTimeNodeEnd",n),null)}preRender(){}createUnits(t,e,n,i){for(let r=0,o=this.json.textUnits.length;r<o;r++)i.addSubMTask(()=>wA(this,void 0,void 0,(function*(){const i=this.json.textUnits[r],{height:o,width:s,fillHeight:a,baseline:l,y:u,underline:h}=this.json,c=new TA(Object.assign(Object.assign({},i),{lineHeight:o,lineWidth:s,baseLine:l-u,underline:h,fillLineHeight:a||o,isHorz:this.isHorz,shapeId:t,paragraphIndex:e,lineIndex:n,unitIndex:r}),this.ctx,this.global);c.preRender(),this.units.push(c)})),"@TextLineImpl[createUnits]")}render(t){for(const e of this.units.reverse())e.render(t),t.addSubMTask(()=>wA(this,void 0,void 0,(function*(){this.container.addChild(e.container)})),"@TextLineImpl[container.addChild]")}destroy(){this.units.forEach(t=>{t.destroy()}),this.container.destroy({children:!1})}}var EA=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class MA extends GM{constructor(){super(...arguments),this.iterateElements=[],this.lines=[],this.isHorz=!0}getIterateElements(){if(this.iterateElements.length>0)return this.iterateElements;const t=this.lines.reduce((t,e)=>t=t.concat(e.getIterateElements()),[]);return this.iterateElements=t,t}getIterateEntry(t,e,n){const i=this.getIterateElements();return i[e]?i[e]:(this.ctx.eventHub.emit("IterateTimeNodeEnd",n),null)}preRender(){}createLines(t,e,n){for(let i=0,r=this.json.lines.length;i<r;i++)n.addSubMTask(()=>EA(this,void 0,void 0,(function*(){const r=this.json.lines[i],o=new SA(r,this.ctx,this.global);o.isHorz=this.isHorz,o.container.name="line-"+i,o.createUnits(t,e,i,n),this.lines.push(o)})),"@TextParagraphImpl[createLines]")}render(t){for(const e of this.lines)e.render(t),t.addSubMTask(()=>EA(this,void 0,void 0,(function*(){this.container.addChild(e.container)})),"@TextParagraphImpl[container.addChild]")}destroy(){this.lines.forEach(t=>{t.destroy()}),this.container.destroy({children:!1})}}var AA=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class RA{constructor(t,e,n,i){this.iterateElements=[],this.paragraphs=[],this.container=new ty,this.json=t,this.ctx=e,this.parentGlobalPos=i,this.iterateType=n,this.container.name="textBody",this.global={x:this.parentGlobalPos.x+t.position.x,y:this.parentGlobalPos.y+t.position.y},this.container.position.x=t.position.x,this.container.position.y=t.position.y,this.container.scale.x=t.scale.x,this.container.scale.y=t.scale.y;const r=new Aw;r.drawRect(0,0,t.width,t.height),this.container.addChild(r)}get width(){return this.json.width}get height(){return this.json.height}get x(){return this.json.position.x}get y(){return this.json.position.y}getTextElement(t,e){return"paragraph"===t?this.paragraphs[e[0]]:null}getIterateEntry(t,e){return this.iterateElements[t]?this.iterateElements[t]:(this.ctx.eventHub.emit("IterateTimeNodeEnd",e),null)}destroy(){this.paragraphs.forEach(t=>{t.destroy()})}createParagraphs(t,e){for(let n=0,i=this.json.paragraphs.length;n<i;n++)e.addSubMTask(()=>AA(this,void 0,void 0,(function*(){var i;const r=this.json.paragraphs[n],o=new MA(r,this.ctx,this.global);o.isHorz=null===(i=this.json.isHorz)||void 0===i||i,o.createLines(t,n,e),e.addSubMTask(()=>AA(this,void 0,void 0,(function*(){this.iterateElements=this.iterateElements.concat(o.getIterateElements()),o.container.name="段落-"+n,this.paragraphs.push(o)})),"@TextBodyImpl[paragraphs.push]")})),"@TextBodyImpl[createParagraphs]")}render(t){for(const e of this.paragraphs)e.render(t),t.addSubMTask(()=>AA(this,void 0,void 0,(function*(){this.container.addChild(e.container)})),"@TextBodyImpl[container.addChild]");t.addSubMTask(()=>AA(this,void 0,void 0,(function*(){const{width:t}=this.container;this.container.scale.x<0&&(this.container.x+=-1*t)})),"@TextBodyImpl[reset width]")}}var PA=n(47),CA=n.n(PA),IA=n(48),OA=n.n(IA);const LA={Reflection:class extends Gx{constructor(t){super(CA.a,OA.a,{uShapeFilterArea:new Float32Array([0,0,0,0]),uStartAlpha:t.startAlpha,uEndAlpha:t.endAlpha,uBlur:0}),this.json=t}}};class NA{constructor(t){this.scaleX=1,this.scaleY=1,this.pivot={x:0,y:0},this.paths=[],this.hash="",this.width=0,this.height=0,this.graphicsId="",this.textureId="",this.id=t.id,this.type=t.type,this.heightSize=t.heightSize,this.widthSize=t.widthSize,this.fillStyle=t.fillStyle||{fillType:"solidFill",color:"#ffffffff"},this.lineWidth=t.lineWidth||1,this.position=t.position||{x:0,y:0},this.rotate=t.rotation||1,this.path=this.getUnitPath(),this.setScaleFromLineWidth(),this.setScaleFromSize(),this.generatePaths(),this.setPivot()}setPivot(){switch(this.type){case"oval":case"diamond":this.pivot={x:this.width/2,y:this.height/2};break;case"arrow":case"stealth":case"triangle":default:this.pivot={x:this.width,y:this.height/2}}}generatePaths(){this.hash="arrow-"+dM()(this.path+this.scaleX+this.scaleY),this.paths=[{id:this.id,path:this.path,fill:"norm",hasStroke:!1,hash:this.hash,scale:{x:this.scaleX,y:this.scaleY}}]}getUnitPath(){switch(this.type){case"stealth":return"M 0,0 L 95250,47625 L 0,95250 L 28575,47625 C C";case"oval":return"M 0,47625 A 47625,47625,-3.14159265,6.2831853 C C";case"diamond":return"M 47625,0 L 95250,47625 L 47625,95250 L 0,47625 C C";case"arrow":return"M 9525,0 L 95250,47625 L 9525,95250 L 0,85725 L 68389.5,47625 L 0,9525 C C";case"triangle":return"M 0,0 L 95250,47625 L 0,95250 C C";default:return""}}setScaleFromLineWidth(){switch(this.type){case"stealth":case"oval":case"diamond":case"arrow":case"triangle":this.scaleX*=.29*this.lineWidth+.7,this.scaleY*=.29*this.lineWidth+.7;break;default:throw new Error("can't match any arrow type!")}}setScaleFromSize(){switch(this.type){case"stealth":case"oval":case"diamond":case"arrow":case"triangle":this.scaleX*=1,this.scaleY*=1;break;default:throw new Error("can't match any arrow type!")}switch(this.widthSize){case"sm":this.scaleX*=3/4;break;case"lg":this.scaleX*=1.25;break;case"med":this.scaleX*=1}switch(this.heightSize){case"sm":this.scaleY*=3/4;break;case"lg":this.scaleY*=1.25;break;case"med":this.scaleY*=1}this.width=10*this.scaleX,this.height=10*this.scaleY}}class DA{constructor(t,e,n,i,r,o,s,a,l,u,h){this.id=t,this.ctx=e,this.paths=n,this.hash=i,this.nept=r,this.width=o,this.height=s,this.lineStyle=a,this.shouldFill=l,this.bgColor=u,this.lnColor=h,this.clonedObjects=[],this._displayObject=null,this.isRectangle=!1,this.isPureRect=!1,this.isColoredPureRect=!1,this.isRectangle=this.rectangleDetect(n),this.isRectangle&&l?this.bgColor?this.isColoredPureRect=!0:this.isPureRect=!0:this.ctx.graphicsTexture.addGraphics(this.id,this.paths,this.hash,this.nept,this.width,this.height,this.lineStyle,this.ctx.objectPoolGroup,this.shouldFill,this.bgColor,this.lnColor)}get displayObject(){return this._displayObject}pointDis(t,e){return Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)}rectangleDetect(t){if(1!==t.length)return!1;const e=t[0].path.trim().split(" ");if(10!==e.length)return!1;const n=[],i=[];for(let t=0;t<e.length;t+=2){const r=e[t],o=e[t+1],[s,a]=o.split(",").map(t=>Number(t)/100);n.push(r),i.push({x:s,y:a})}if("MLLLC"!==n.join(""))return!1;for(let t=0;t<3;t++){const e=i[t],n=i[t+1];if(e.x!==n.x&&e.y!==n.y)return!1}const r=i.slice(0,4).reduce((t,e)=>t+e.x,0)/4,o=i.slice(0,4).reduce((t,e)=>t+e.y,0)/4;if(Number.isNaN(r)||Number.isNaN(o))return!1;const s={x:r,y:o};return KE(this.pointDis(s,i[0]),this.pointDis(s,i[1]))&&KE(this.pointDis(s,i[0]),this.pointDis(s,i[2]))&&KE(this.pointDis(s,i[0]),this.pointDis(s,i[3]))&&this.pointDis(s,i[0])===this.pointDis(s,i[1])}createDisplayObject(){if(this.isPureRect){const t=new Aw;return t.beginFill(0,1),t.drawRect(0,0,this.width,this.height),t}if(this.isColoredPureRect&&this.bgColor){const t=new Aw,[e,n]=CM(this.bgColor);return t.beginFill(e,n),t.drawRect(0,0,this.width,this.height),t}{const t=new Ow,e=this.ctx.graphicsTexture.getGraphicsData(this.id);return e?(t.texture=e.texture,t.pivot.x=e.pivot.x,t.pivot.y=e.pivot.y,t):null}}getClonedDisplayObject(){const t=this.createDisplayObject();return this.clonedObjects.push(t),t}render(){this._displayObject=this.createDisplayObject()}isNeedMask(t,e){let n=!1;return this._displayObject&&(n=!(this.isRectangle&&Math.abs(t-this._displayObject.width)<2&&Math.abs(e-this._displayObject.height)<2&&this.shouldFill)),n}destroy(){var t;null===(t=this._displayObject)||void 0===t||t.destroy(),this._displayObject=null,this.clonedObjects.forEach(t=>{null==t||t.destroy()}),this.clonedObjects=[]}}var FA=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};const BA={pivot:{x:0,y:0},width:0,height:0};class UA extends AM{constructor(t,e,n,i){var r;super(t,e,n),this.renderContainer=new ty,this.needCacheAsBitMap=!1,this.backgroundGraphics=null,this.filterAreaJustifies=[],this.strokeGraphics=null,this.arrowList=[],this.fillColorFilter=new NM,this.strokeColorFilter=new NM,this.id="",this.fill=new SM(this),this.stroke=new TM(this),this.updateFilterArea=()=>{const t=this.renderContainer.getBounds(!1),e=this.filterAreaJustifies.map(e=>e(t)),n=e.map(t=>t.width),i=e.map(t=>t.height),r=new d_(t.x,t.y,Math.max(...n),Math.max(...i));this.renderContainer.filterArea=r,(this.renderContainer.filters||[]).forEach(t=>{t.uniforms.uShapeFilterArea=new Float32Array(4),t.uniforms.uShapeFilterArea[0]=r.x,t.uniforms.uShapeFilterArea[1]=r.y,t.uniforms.uShapeFilterArea[2]=r.width,t.uniforms.uShapeFilterArea[3]=r.height})},this.json=t,this.json.fillStyle&&"groupFill"===this.json.fillStyle.fillType&&i&&(this.json.fillStyle=i),this.id=t.id;const{fillStyle:o,lineStyle:s}=this.json;this.container.name=t.id,this.renderContainer.name=t.id+"-render-container",this.generateArrowList(),this.backgroundFill=this.createBackgroundFill(),this.backgroundGraphics=this.createBackgroundGraphics(),this.strokeFill=this.createStrokeFill(),this.strokeGraphics=this.createStrokeGraphics(),this.ctx.timingTargets.addTarget(this.id,this),"solidFill"===(null==o?void 0:o.fillType)&&(this.fillColorFilter.currentColor=o.color,this.fillColorFilter.designColor=o.color),"solidFill"===(null===(r=null==s?void 0:s.fill)||void 0===r?void 0:r.fillType)&&(this.strokeColorFilter.currentColor=s.fill.color,this.strokeColorFilter.designColor=s.fill.color),this.updateTransform(this.json),t.textBody&&(this.text=new RA(t.textBody,this.ctx,t.textBody.iterateType,{x:this.designGlobalPosition.x,y:this.designGlobalPosition.y})),this.container.hitArea=new g_(1,1,this.json.width,this.json.height)}get interactiveContainer(){return this.renderContainer}get strokeActive(){var t,e,n,i,r,o,s;return this.strokeFill.displayObject?(null!==(n=null===(e=null===(t=this.strokeFill.displayObject)||void 0===t?void 0:t.filters)||void 0===e?void 0:e.length)&&void 0!==n?n:-1)>0:(null!==(s=null===(o=null===(r=null===(i=this.strokeGraphics)||void 0===i?void 0:i.displayObject)||void 0===r?void 0:r.filters)||void 0===o?void 0:o.length)&&void 0!==s?s:-1)>0}set strokeActive(t){var e,n,i,r,o,s;const{displayObject:a}=this.strokeFill;t?a&&(null!==(n=null===(e=a.filters)||void 0===e?void 0:e.indexOf(this.strokeColorFilter))&&void 0!==n?n:-1)<0?a.filters=[this.strokeColorFilter]:(null===(i=this.strokeGraphics)||void 0===i?void 0:i.displayObject)&&(null!==(o=null===(r=this.strokeGraphics.displayObject.filters)||void 0===r?void 0:r.indexOf(this.strokeColorFilter))&&void 0!==o?o:-1)<0&&(this.strokeGraphics.displayObject.filters=[this.strokeColorFilter]):a?a.filters=[]:(null===(s=this.strokeGraphics)||void 0===s?void 0:s.displayObject)&&(this.strokeGraphics.displayObject.filters=[])}get fillActive(){var t,e,n,i,r,o,s;return this.backgroundFill.displayObject?(null!==(n=null===(e=null===(t=this.backgroundFill.displayObject)||void 0===t?void 0:t.filters)||void 0===e?void 0:e.length)&&void 0!==n?n:-1)>0:(null!==(s=null===(o=null===(r=null===(i=this.backgroundGraphics)||void 0===i?void 0:i.displayObject)||void 0===r?void 0:r.filters)||void 0===o?void 0:o.length)&&void 0!==s?s:-1)>0}set fillActive(t){var e,n,i,r,o,s;t?this.backgroundFill.displayObject&&(null!==(n=null===(e=this.backgroundFill.displayObject.filters)||void 0===e?void 0:e.indexOf(this.fillColorFilter))&&void 0!==n?n:-1)<0?this.backgroundFill.displayObject.filters=[this.fillColorFilter]:(null===(i=this.backgroundGraphics)||void 0===i?void 0:i.displayObject)&&(null!==(o=null===(r=this.backgroundGraphics.displayObject.filters)||void 0===r?void 0:r.indexOf(this.fillColorFilter))&&void 0!==o?o:-1)<0&&(this.backgroundGraphics.displayObject.filters=[this.fillColorFilter]):this.backgroundFill.displayObject?this.backgroundFill.displayObject.filters=[]:(null===(s=this.backgroundGraphics)||void 0===s?void 0:s.displayObject)&&(this.backgroundGraphics.displayObject.filters=[])}getTextElement(t,e){var n,i;return null!==(i=null===(n=this.text)||void 0===n?void 0:n.getTextElement(t,e))&&void 0!==i?i:null}getBgElement(){return this}getIterateEntry(t,e,n){return 0===e?this:"el"===t?(this.ctx.eventHub.emit("IterateTimeNodeEnd",n),null):this.text?this.text.getIterateEntry(e-1,n)||null:(this.ctx.eventHub.emit("IterateTimeNodeEnd",n),null)}createStrokeGraphics(){var t,e,n,i;const{id:r,geometry:o,lineStyle:s}=this.json,{width:a,height:l,pivot:u}=(null==o?void 0:o.lineTransform)||BA,h=a||this.json.width,c=l||this.json.height,d="solidFill"===(null===(t=null==s?void 0:s.fill)||void 0===t?void 0:t.fillType)?s.fill.color:null;return s&&"noFill"!==(null===(e=s.fill)||void 0===e?void 0:e.fillType)?new DA(r+"-path-graphics",this.ctx,null!==(n=null==o?void 0:o.paths)&&void 0!==n?n:[],null!==(i=null==o?void 0:o.hash)&&void 0!==i?i:"",u||{x:0,y:0},h,c,s,!1,null,d):null}createStrokeFill(){const[t,e]=this.calculateFillObjectOffset(),{geometry:n,lineStyle:i,width:r,height:o}=this.json,s=(null==n?void 0:n.lineTransform)||BA,a=Object(l.isNumber)(null==i?void 0:i.width)?i.width:1;return new xA(this.ctx,null==i?void 0:i.fill,(s.width||r)+a+t,Math.max((s.height||o)+a,e),{useFilter:!1,useSlideBackgroundFill:!1})}createBackgroundGraphics(){var t;const{geometry:e,lineStyle:n,fillStyle:i,id:r}=this.json,{width:o,height:s,pivot:a}=(null==e?void 0:e.lineTransform)||BA,l=o||this.json.width,u=s||this.json.height,h="solidFill"===(null==i?void 0:i.fillType)?i.color:null;return i&&"noFill"!==i.fillType||this.json.isPicture?new DA(r+"-bg-graphics",this.ctx,null!==(t=null==e?void 0:e.paths)&&void 0!==t?t:[],(null==e?void 0:e.hash)||"",a||{x:0,y:0},l,u,n,!0,h,null):null}createBackgroundFill(){var t,e;const{fillStyle:n,width:i,height:r,lineStyle:o,geometry:s}=this.json,a=(null==s?void 0:s.fillTransform)||BA;return new xA(this.ctx,n,(a.width||i)+(null!==(t=null==o?void 0:o.width)&&void 0!==t?t:0),(a.height||r)+(null!==(e=null==o?void 0:o.width)&&void 0!==e?e:0),{useFilter:!1,useSlideBackgroundFill:this.json.useBgFill,fillFloat:this.json.fillFloat,shapeRotation:this.json.rotation})}createBackground(){var t,e,n,i,r,o,s,a;const{pivot:l,width:u,height:h}=(null===(t=this.json.geometry)||void 0===t?void 0:t.fillTransform)||BA,{displayObject:c}=this.backgroundFill;c?(this.json.useBgFill&&(null===(n=this.backgroundGraphics)||void 0===n?void 0:n.displayObject)?(this.needCacheAsBitMap=!0,c.mask=this.backgroundGraphics.displayObject,c.pivot.x=(null===(i=this.json.position)||void 0===i?void 0:i.x)||0,c.pivot.y=(null===(r=this.json.position)||void 0===r?void 0:r.y)||0,this.container.addChild(this.backgroundGraphics.displayObject)):"gifFill"===(null===(o=this.json.fillStyle)||void 0===o?void 0:o.fillType)?(c.height=h||this.designHeight,c.width=u||this.designWidth,c instanceof jE&&c.play(),(null===(s=this.backgroundGraphics)||void 0===s?void 0:s.isNeedMask(c.width,c.height))&&(c.mask=this.backgroundGraphics.displayObject,this.backgroundGraphics.displayObject&&this.container.addChild(this.backgroundGraphics.displayObject))):(null===(a=this.backgroundGraphics)||void 0===a?void 0:a.isNeedMask(c.width,c.height))&&(this.json.fillFloat||(this.needCacheAsBitMap=!0,c.mask=this.backgroundGraphics.displayObject,this.backgroundGraphics.displayObject&&this.container.addChild(this.backgroundGraphics.displayObject))),this.json.fillFloat||(c.x=l.x,c.y=l.y),this.container.addChild(c)):this.backgroundFill.hasFill&&(null===(e=this.backgroundGraphics)||void 0===e?void 0:e.displayObject)&&this.container.addChild(this.backgroundGraphics.displayObject)}createPathFill(){var t,e,n;const{displayObject:i}=this.strokeFill,r=null===(t=this.strokeGraphics)||void 0===t?void 0:t.displayObject,[o,s]=this.calculateFillObjectOffset();i?((null===(e=this.strokeGraphics)||void 0===e?void 0:e.isNeedMask(i.width,i.height))&&r&&(this.needCacheAsBitMap=!0,i.pivot.x=r.pivot.x,i.pivot.y=r.pivot.y,r.pivot.x=0,r.pivot.y=0,i.mask=r,i.addChild(r),i.position.x=-o/2,i.position.y=-s/2,r.position.x=o/2,r.position.y=s/2),this.container.addChild(i)):this.strokeFill.hasFill&&(null===(n=this.strokeGraphics)||void 0===n?void 0:n.displayObject)&&this.container.addChild(this.strokeGraphics.displayObject)}createFilledPathMask(){var t,e,n;const i=(null===(e=null===(t=this.json.geometry)||void 0===t?void 0:t.paths)||void 0===e?void 0:e.filter(t=>"none"!==t.fill&&"norm"!==t.fill))||[];for(const t of i){const e=this.ctx.graphicsTexture.getGraphicsData(t.id);if(e){const i=new Ow(e.texture);i.pivot.x=e.pivot.x,i.pivot.y=e.pivot.y;const r=this.backgroundFill.getClonedDisplayObject(),o=null===(n=this.backgroundGraphics)||void 0===n?void 0:n.getClonedDisplayObject(),s=r||o;s&&(this.backgroundFill.displayObject&&(s.pivot.x=this.backgroundFill.displayObject.pivot.x,s.pivot.y=this.backgroundFill.displayObject.pivot.y),s.mask=i,s.filters=[kM[t.fill]],this.needCacheAsBitMap=!0,this.container.addChild(s),this.container.addChild(i))}}}createArrow(){if(!this.arrowList.length)return;const t=new ty,e=this.strokeFill.getClonedDisplayObject(),[n,i]=this.calculateFillObjectOffset();this.arrowList.forEach(e=>{const n=this.ctx.graphicsTexture.getGraphicsData(e.graphicsId);if(n){const{texture:i}=n,r=new Ow(i);r.pivot.x=e.pivot.x,r.pivot.y=e.pivot.y,r.position.x=e.position.x+e.pivot.x,r.position.y=e.position.y+e.pivot.y,r.rotation=e.rotate/180*Math.PI,t.addChild(r)}}),this.arrowRenderTexture=Hy.create({width:t.width,height:t.height,resolution:1}),this.ctx.renderer.render(t,{renderTexture:this.arrowRenderTexture});const r=new Ow;r.texture=this.arrowRenderTexture,e&&(e.mask=r,e.position.x=-n/2,e.position.y=-i/2,r.position.x=-n/2,r.position.y=-i/2,this.container.addChild(e),this.container.addChild(r))}generateArrowList(){var t,e;const{lineArrowList:n,lineStyle:i,id:r}=this.json,o="solidFill"===(null===(t=null==i?void 0:i.fill)||void 0===t?void 0:t.fillType)?i.fill.color:null;null===(e=n||[])||void 0===e||e.forEach((t,e)=>{var n,s;const a=new NA(Object.assign(Object.assign({},t),{fillStyle:null==i?void 0:i.fill,lineWidth:null!==(n=null==i?void 0:i.width)&&void 0!==n?n:0}));a.graphicsId=`${r}-arrow-${e}-graphics`,a.textureId=`${r}-arrow-${e}-fill`,this.ctx.graphicsTexture.addGraphics(a.graphicsId,null!==(s=a.paths)&&void 0!==s?s:[],a.hash,{x:0,y:0},a.width,a.height,void 0,this.ctx.objectPoolGroup,!0,o,null),this.arrowList.push(a)})}calculateFillObjectOffset(){let[t,e]=[0,0];return this.arrowList.length&&(t=this.arrowList.reduce((t,e)=>Math.max(t,e.width),0),e=this.arrowList.reduce((t,e)=>Math.max(t,e.height),0)),[t,e]}preRender(t){var e,n,i;const{lineStyle:r,geometry:o}=this.json,{width:s,height:a}=(null==o?void 0:o.lineTransform)||BA,l=s||this.json.width,u=a||this.json.height,h=(null===(e=null==o?void 0:o.paths)||void 0===e?void 0:e.filter(t=>"none"!==t.fill&&"norm"!==t.fill))||[],c="solidFill"===(null===(n=null==r?void 0:r.fill)||void 0===n?void 0:n.fillType)?r.fill.color:null;t.addSubMTask(()=>FA(this,void 0,void 0,(function*(){for(const t of h)this.ctx.graphicsTexture.addGraphics(t.id,[t],t.hash,((null==o?void 0:o.lineTransform)||BA).pivot,l,u,r,this.ctx.objectPoolGroup,!0,null,c)})),"@ShapeImpl[addGraphics]"),null===(i=this.text)||void 0===i||i.createParagraphs(this.json.id,t)}subClassRender(){}setupEffect(){const{effectList:t}=this.json;if(t&&t.length>0){const e=[];return t.forEach(t=>{"reflection"===t.type&&(this.filterAreaJustifies.push(t=>(t.height*=2,t)),e.push(new LA.Reflection(t)))}),this.ctx.ticker.add(this.updateFilterArea,void 0,-20),this.renderContainer.filters=e,!0}return!1}render(t){t.addSubMTask(()=>FA(this,void 0,void 0,(function*(){var t,e;null===(t=this.strokeGraphics)||void 0===t||t.render(),null===(e=this.backgroundGraphics)||void 0===e||e.render(),this.createBackground(),this.subClassRender(),this.createFilledPathMask(),this.createPathFill(),this.createArrow()})),"@ShapeImpl[render]"),this.text&&this.text.render(t),t.addSubMTask(()=>FA(this,void 0,void 0,(function*(){var t,e,n,i,r,o;if("wd"===(null===(t=this.json.textBody)||void 0===t?void 0:t.iterateType)||"lt"===(null===(e=this.json.textBody)||void 0===e?void 0:e.iterateType))this.renderContainer.addChild(this.container),this.text&&(this.text.container.position.x=(null!==(i=null===(n=this.json.position)||void 0===n?void 0:n.x)&&void 0!==i?i:0)+this.text.x,this.text.container.position.y=(null!==(o=null===(r=this.json.position)||void 0===r?void 0:r.y)&&void 0!==o?o:0)+this.text.y,this.renderContainer.addChild(this.text.container));else{if(this.text){if(Object(l.isBoolean)(this.json.textRotateWithShape)&&!this.json.textRotateWithShape){const t=this.json.rotation||0;this.text.container.rotation=-t;const{width:e}=this.text;this.text.container.position.x=e}this.container.addChild(this.text.container)}this.renderContainer.addChild(this.container)}if(this.needCacheAsBitMap,"background"===this.json.id&&this.ctx.hasBackgroundFillShape){const t=Hy.create({width:this.json.width,height:this.json.height,resolution:Math.ceil(this.ctx.renderer.resolution)});this.ctx.renderer.render(this.renderContainer,{renderTexture:t}),this.ctx.bgTexture=t}})),"@ShapeImpl[post.render]")}clearOnSlideChange(){}initOnReuse(){}destroy(){var t,e,n,i;null===(t=this.text)||void 0===t||t.destroy(),this.fillColorFilter.destroy(),this.strokeColorFilter.destroy(),this.backgroundFill.destroy(),null===(e=this.backgroundGraphics)||void 0===e||e.destroy(),this.strokeFill.destroy(),null===(n=this.strokeGraphics)||void 0===n||n.destroy(),this.renderContainer.destroy(),null===(i=this.arrowRenderTexture)||void 0===i||i.destroy(!0),this.arrowList=[]}}var kA=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};function GA(t,e){for(const n in e)t.style[n]=e[n]}class HA{constructor(t){var e,n;this.progress=document.createElement("div"),this.totalTime=document.createElement("span"),this.playButton=document.createElement("div"),this.pauseButton=document.createElement("div"),this.currentTime=document.createElement("span"),this.mediaController=document.createElement("div"),this.currentProgress=document.createElement("div"),this.medianIsEnd=!1,this.playCallBackList=[],this.duration=0,this.start=0,this.end=0,this.changeMediaProgress=t=>{t.stopPropagation();const e=t.offsetX/this.progress.clientWidth*this.duration;this.jumpToTime(e),this.medianIsEnd=!1,this.ctx.eventHub.emit(YR.mediaSeek,{id:this.targetId,time:this.media.currentTime-this.start,isPlaying:this.media.isPlaying})},this.jumpToTime=(t=0)=>{const e=Math.floor(t)+this.start;this.media.currentTime!==e&&(this.media.currentTime=e)},this.showController=t=>{t.stopPropagation(),this.show()},this.getMediaDuration=()=>{this.duration&&!Number.isNaN(this.duration)||(this.duration=this.media.duration,this.start&&(this.duration-=this.start,this.jumpToTime()),this.end&&(this.duration-=this.end)),this.totalTime.innerText=HA.formatTime(this.duration)},this.playMedia=()=>kA(this,void 0,void 0,(function*(){this.playButton.style.display="none",this.pauseButton.style.display="block",yield this.media.play(),this.medianIsEnd&&(this.medianIsEnd=!1,this.jumpToTime()),this.playCallBackList.forEach(t=>{t()})})),this.pauseMedia=()=>kA(this,void 0,void 0,(function*(){this.playButton.style.display="block",this.pauseButton.style.display="none",yield this.media.pause()})),this.onMouseOut=t=>{t.stopPropagation(),this.mediaController.style.display="none"},this.mediaTimeUpdate=()=>kA(this,void 0,void 0,(function*(){const t=this.media.currentTime-this.start;this.duration>0&&(t>this.duration||this.media.ended)&&(yield this.pauseMedia(),this.medianIsEnd=!0),this.currentTime.innerText=HA.formatTime(t),this.currentProgress.style.flex=(t/this.duration).toString()})),this.onPauseMedia=()=>{this.playButton.style.display="block",this.pauseButton.style.display="none"},this.onPlayMedia=()=>{this.playButton.style.display="none",this.pauseButton.style.display="block",this.playCallBackList.forEach(t=>{t()})},this.playMediaFromCtrl=()=>{this.ctx.eventHub.emit(YR.mediaPlay,{id:this.targetId,time:this.media.currentTime}),this.playMedia()},this.pauseMediaFromCtrl=()=>{this.ctx.eventHub.emit(YR.mediaPause,{id:this.targetId,time:this.media.currentTime}),this.pauseMedia()},this.targetId=t.targetId,this.ctx=t.ctx,this.height=t.height,this.width=t.width,this.target=t.target,this.media=t.media,this.info=t.info,this.canvasElement=t.canvasElement,this.getMedianContainer(),this.createMediaController(),this.info.cut&&(this.start=null!==(e=this.info.cut.start)&&void 0!==e?e:0,this.end=null!==(n=this.info.cut.end)&&void 0!==n?n:0)}getMedianContainer(){var t;let e=null===(t=this.canvasElement.parentElement)||void 0===t?void 0:t.querySelector(".median-container");e||(e=document.createElement("div"),e.className="median-container",this.canvasElement.parentElement.appendChild(e)),this.container=e}static formatTime(t){let e="00:00";if(t){const n=Math.floor(t/60),i=String(n<0?0:n).padStart(2,"0"),r=Math.floor(t%60);e=`${i}:${String(r<0?0:r).padStart(2,"0")}`}return e}createButton(){const t={marginLeft:"15px",marginRight:"10px",fontSize:"0",height:"20px"};GA(this.playButton,Object.assign(Object.assign({},t),{display:"block"}));const e=document.createElement("img");GA(e,{height:"20px"}),e.src="https://convertcdn.netless.link/publicFiles/icon/play.png",this.playButton.appendChild(e),GA(this.pauseButton,Object.assign(Object.assign({},t),{display:"none"}));const n=document.createElement("img");GA(n,{height:"20px"}),n.src="https://convertcdn.netless.link/publicFiles/icon/pause.png",this.pauseButton.appendChild(n)}createTimer(){const t=document.createElement("div");GA(t,{width:"100px"}),this.currentTime.innerText="00:00";const e=document.createElement("span");return e.innerText="/",t.append(this.currentTime,e,this.totalTime),t}createProgress(){GA(this.progress,{flex:"1",position:"relative",marginRight:"10px"});const t=document.createElement("div");GA(t,{background:"#D9D9D9",position:"relative",height:"10px",display:"flex"}),this.progress.appendChild(t),GA(this.currentProgress,{background:"#4F4F4F",top:"0px",left:"0",height:"10px",flex:"0"}),t.appendChild(this.currentProgress)}bindEvent(){this.mediaController.addEventListener("mouseover",this.showController,!1),this.mediaController.addEventListener("mouseout",this.onMouseOut,!1),this.progress.addEventListener("mousedown",this.changeMediaProgress,!1),this.playButton.addEventListener("click",this.playMediaFromCtrl,!1),this.pauseButton.addEventListener("click",this.pauseMediaFromCtrl,!1),this.media.on("durationchange",this.getMediaDuration,!1),this.media.on("timeupdate",this.mediaTimeUpdate,!1),this.media.on("pause",this.onPauseMedia,!1),this.media.on("play",this.onPlayMedia,!1)}setControllerPosition(){var t;const{target:e}=this,{stageWidth:n,stageHeight:i}=this.ctx,r=e.getGlobalPosition(),o=Number(null===(t=this.container)||void 0===t?void 0:t.getAttribute("data-scale")),s=n*o,a=1/o*(300>s?s/300:1);r.y=r.y+this.height-50,r.x=Math.max(r.x,0),r.x=Math.min(r.x,n-300*a),r.y=Math.max(r.y,0),r.y=Math.min(r.y,i-50),GA(this.mediaController,{height:"50px",borderRadius:"25px",width:"300px",flexDirection:"row",alignItems:"center",position:"absolute",left:r.x+"px",top:r.y+"px",display:"none",background:"#fff",zIndex:"2",border:"1px solid #ccc",transform:`scale(${a})`,transformOrigin:"0 100%"})}createMediaController(){this.setControllerPosition(),this.createButton();const t=this.createTimer();this.createProgress(),this.mediaController.append(this.playButton,this.pauseButton,t,this.progress),this.container.appendChild(this.mediaController),this.bindEvent()}addPlayCallBack(t){this.playCallBackList.push(t)}unbindEvent(){this.mediaController.removeEventListener("mouseover",this.showController,!1),this.progress.removeEventListener("mousedown",this.changeMediaProgress,!1),this.playButton.removeEventListener("click",()=>this.playMedia(),!1),this.pauseButton.removeEventListener("click",()=>this.pauseMedia(),!1),this.media.removeListener("durationchange",this.getMediaDuration,!1),this.media.removeListener("timeupdate",this.mediaTimeUpdate,!1),this.media.removeListener("pause",this.onPauseMedia,!1),this.media.removeListener("play",this.onPlayMedia,!1)}show(){this.setControllerPosition(),this.mediaController.style.display="flex"}hide(){this.mediaController.style.display="none"}destroy(){var t;this.unbindEvent(),this.playCallBackList=[],null===(t=this.container)||void 0===t||t.removeChild(this.mediaController)}}var zA=n(49);class jA extends a.a{constructor(t,e){super(),this.lastTime=-1,this.howl=null,this.rctClient=null,this.url=t,this.runningAudio=e,ZR.RtcAudioClazz?(this.rctClient=new ZR.RtcAudioClazz(t),this.rctClient.on("load",()=>this.emit("load")),this.rctClient.on("pause",()=>this.emit("pause")),this.rctClient.on("play",()=>this.emit("play"))):(this.howl=new zA.Howl({src:[t]}),this.howl.on("load",()=>this.emit("load")),this.howl.on("pause",()=>this.emit("pause")),this.howl.on("play",()=>this.emit("play")))}startTimeChangeEmit(){this.currentTime!==this.lastTime&&(this.lastTime=this.currentTime,this.emit("timeupdate")),this.isEnded||requestAnimationFrame(()=>this.startTimeChangeEmit())}play(){var t,e,n;this.runningAudio.has(this.url)&&(null===(t=this.runningAudio.get(this.url))||void 0===t||t.stop(),this.runningAudio.delete(this.url)),this.lastTime=-1,null===(e=this.howl)||void 0===e||e.play(),null===(n=this.rctClient)||void 0===n||n.play(),this.startTimeChangeEmit(),this.runningAudio.set(this.url,this)}pause(){var t,e;null===(t=this.howl)||void 0===t||t.pause(),null===(e=this.rctClient)||void 0===e||e.pause(),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}stop(){var t;null===(t=this.howl)||void 0===t||t.stop(),this.rctClient&&(this.rctClient.pause(),this.rctClient.currentTime=0),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}destroy(){var t,e,n,i,r,o,s;null===(t=this.howl)||void 0===t||t.pause(),null===(e=this.howl)||void 0===e||e.unload(),null===(n=this.rctClient)||void 0===n||n.pause(),null===(i=this.rctClient)||void 0===i||i.destroy(),null===(r=this.rctClient)||void 0===r||r.removeAllListeners("load"),null===(o=this.rctClient)||void 0===o||o.removeAllListeners("play"),null===(s=this.rctClient)||void 0===s||s.removeAllListeners("pause"),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}get currentTime(){return this.rctClient?this.rctClient.currentTime:this.howl?this.howl.seek():-1}set currentTime(t){this.rctClient?this.rctClient.currentTime=t:this.howl&&this.howl.seek(t)}get duration(){return this.rctClient?this.rctClient.duration:this.howl?this.howl.duration():0}get isEnded(){return Math.abs(this.currentTime-this.duration)<.001}get isPaused(){return this.rctClient?this.rctClient.isPaused:!!this.howl&&this.howl.playing()}}var VA=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class WA extends a.a{constructor(t){var e,n;super(),this.type="video",this.sprite=new Ow,this.isPlaying=!1,this.id=t.id,this.start=null===(e=t.video.cut)||void 0===e?void 0:e.start,this.end=null===(n=t.video.cut)||void 0===n?void 0:n.end,this.container=t.container,this.ctx=t.ctx,this.ctx.medias[this.id]=this;let i=t.video.src;this.ctx.loaderDelegate&&(i=this.ctx.loaderDelegate.redirectMedia(i),this.ctx.logger.info(`redirect media url from ${t.video.src} to ${i} by delegate.`,t.ctx.taskId)),this.videoResource=new Iy(i,{autoLoad:!0,autoPlay:!1,updateFPS:30,crossorigin:!0});let r=t.video.src.replace(/4$/,"3");this.ctx.loaderDelegate&&(r=this.ctx.loaderDelegate.redirectMedia(r),this.ctx.logger.info(`redirect media url from ${t.video.src.replace(/4$/,"3")} to ${r} by delegate.`,t.ctx.taskId)),this.rtcAudio=new jA(r,t.ctx.runningAudio);const{video:o,width:s,height:a,target:l}=t;this.controller=new HA({targetId:t.id,ctx:t.ctx,width:s,height:a,target:l,media:this,info:o,canvasElement:t.canvasElement}),this.controller.addPlayCallBack(()=>{this.sprite.width=s,this.sprite.height=a,this.ctx.clock.setTimeout(()=>{this.sprite.visible=!0},50)});const u=new wy(null,{height:a,width:s});u.resource=this.videoResource,this.videoResource.bind(u),this.sprite=new Ow,this.sprite.visible=!1,this.sprite.texture=new ky(u),this.sprite.interactive=!0,this.container.addChild(this.sprite),this.sprite.on("mouseover",t=>{t.stopPropagation(),this.controller.show()}),this.sprite.on("mouseout",t=>{t.stopPropagation(),this.controller.hide()}),["durationchange","timeupdate","pause","play"].forEach(t=>{this.videoResource.source.addEventListener(t,()=>{"timeupdate"!==t||this.isPlaying||this.pause(),this.emit(t)})})}get currentTime(){var t,e;return null!==(e=null===(t=this.videoResource.source)||void 0===t?void 0:t.currentTime)&&void 0!==e?e:0}set currentTime(t){this.videoResource.source&&(this.videoResource.source.currentTime=t)}get paused(){var t,e;return null===(e=null===(t=this.videoResource.source)||void 0===t?void 0:t.paused)||void 0===e||e}get ended(){var t,e;return null===(e=null===(t=this.videoResource.source)||void 0===t?void 0:t.ended)||void 0===e||e}get duration(){var t,e;return null!==(e=null===(t=this.videoResource.source)||void 0===t?void 0:t.duration)&&void 0!==e?e:0}showController(){this.controller.show()}hideController(){this.controller.hide()}play(){var t;return VA(this,void 0,void 0,(function*(){this.isPlaying=!0,yield this.load(),yield this.ctx.clock.waitUntil(()=>{const t=this.videoResource.source;return!!(t&&t.videoWidth>0)},3e3);const e=this.videoResource.source;e&&e.videoWidth<=0||(ZR.RtcAudioClazz&&(this.rtcAudio.play(),this.videoResource.source.volume=0),yield null===(t=this.videoResource.source)||void 0===t?void 0:t.play())}))}load(){return this.videoResource.load()}pause(){var t;this.isPlaying=!1,ZR.RtcAudioClazz&&this.rtcAudio.pause(),null===(t=this.videoResource.source)||void 0===t||t.pause()}togglePause(){this.isPlaying?this.pause():this.play()}seek(t){this.controller.jumpToTime(t)}stop(){this.seek(0),this.pause()}destroy(){var t;this.sprite.interactive=!1,this.sprite.destroy({texture:!0,baseTexture:!0}),null===(t=this.videoResource)||void 0===t||t.destroy(),this.rtcAudio.destroy(),this.controller.destroy()}}var XA=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class qA extends a.a{constructor(t){super(),this.type="audio",this.isPlaying=!1,this.id=t.id;let e=t.audio.src;t.ctx.loaderDelegate&&(e=t.ctx.loaderDelegate.redirectMedia(e),t.ctx.logger.info(`redirect media url from ${t.audio.src} to ${e} by delegate.`,t.ctx.taskId)),this.audioPlayer=new jA(e,t.ctx.runningAudio),t.audio.cut&&(this.start=t.audio.cut.start,this.end=t.audio.cut.end),this.ctx=t.ctx,this.ctx.medias[this.id]=this;const{width:n,height:i,target:r}=t;this.controller=new HA({targetId:t.id,ctx:t.ctx,height:i,width:n,target:r,media:this,info:t.audio,canvasElement:t.canvasElement}),this.audioPlayer.on("load",()=>this.emit("durationchange")),this.audioPlayer.on("timeupdate",()=>this.emit("timeupdate")),this.audioPlayer.on("pause",()=>this.emit("pause")),this.audioPlayer.on("play",()=>this.emit("play"))}get currentTime(){return this.audioPlayer.currentTime}set currentTime(t){this.audioPlayer.currentTime=t}get paused(){return this.audioPlayer.isPaused}get ended(){return this.audioPlayer.isEnded}get duration(){return this.audioPlayer.duration}load(){return Promise.resolve()}showController(){this.controller.show()}hideController(){this.controller.hide()}play(){return XA(this,void 0,void 0,(function*(){this.isPlaying=!0,this.audioPlayer.play()}))}pause(){this.isPlaying=!1,this.audioPlayer.pause()}togglePause(){this.isPlaying?this.pause():this.play()}seek(t){this.controller.jumpToTime(t)}stop(){this.seek(0),this.pause()}destroy(){this.audioPlayer.pause(),this.controller.destroy()}}class YA extends UA{constructor(t,e,n,i){super(Object.assign(Object.assign({},t),{type:"Shape",useBgFill:!1,textRotateWithShape:!0,isPicture:!0}),e,n,i),this.isInteractiveOutside=!1,this.cmd=new wM(this),this.media=null==t?void 0:t.media,this.picFill=new xA(this.ctx,t.picFill,t.width,t.height,{useFilter:!1,useSlideBackgroundFill:!1})}applyCommand(t,e){var n,i,r,o,s;if("call"===e)if(/playFrom\(([0-9.]+)\)/.test(t)){const e=t.match(/playFrom\(([0-9.]+)\)/),i=Number(e[1]||"0");null===(n=this.mediaPlayer)||void 0===n||n.play().then(()=>{var t;null===(t=this.mediaPlayer)||void 0===t||t.seek(i)})}else"custom-pause"===t?null===(i=this.mediaPlayer)||void 0===i||i.pause():"togglePause"===t?null===(r=this.mediaPlayer)||void 0===r||r.togglePause():"stop"===t&&(null===(o=this.mediaPlayer)||void 0===o||o.pause(),null===(s=this.mediaPlayer)||void 0===s||s.seek(0))}renderPic(){var t,e,n,i,r;const{displayObject:o}=this.picFill;if(o){const s=null===(t=this.backgroundGraphics)||void 0===t?void 0:t.getClonedDisplayObject();(null===(e=this.backgroundGraphics)||void 0===e?void 0:e.isNeedMask(o.width,o.height))&&s&&(o.mask=s,this.container.addChild(s)),o.width=this.designWidth,o.height=this.designHeight,o instanceof jE&&this.ctx.slideScopeEventHub.once("slide-render",t=>{this.ctx.slideIndex===t&&o.play()}),this.container.addChild(o),"video"===(null===(n=this.media)||void 0===n?void 0:n.type)&&this.media.src?(this.mediaPlayer=new WA({id:this.json.id+"-video",ctx:this.ctx,video:this.media,height:this.designHeight,width:this.designWidth,target:o,container:this.container,canvasElement:this.ctx.view}),null===(i=this.mediaPlayer)||void 0===i||i.sprite):"audio"===(null===(r=this.media)||void 0===r?void 0:r.type)&&this.media.src&&(this.mediaPlayer=new qA({id:this.json.id+"-audio",ctx:this.ctx,audio:this.media,height:this.designHeight,width:this.designWidth,target:o,canvasElement:this.ctx.view})),this.mediaPlayer&&(this.isInteractiveOutside=this.container.interactive,this.container.interactive=!0,this.container.on("mouseover",()=>{this.mediaPlayer.showController()}),this.container.on("mouseout",()=>{this.mediaPlayer.hideController()},!1))}}preRender(t){super.preRender(t)}subClassRender(){this.renderPic()}clearOnSlideChange(){super.clearOnSlideChange(),this.mediaPlayer&&(this.container.interactive=!1,this.mediaPlayer.stop(),this.mediaPlayer.hideController())}initOnReuse(){super.initOnReuse(),this.mediaPlayer&&(this.container.interactive=!0)}destroy(){this.mediaPlayer&&(this.picFill.displayObject&&!this.isInteractiveOutside&&(this.container.interactive=!1),this.mediaPlayer.destroy(),this.mediaPlayer=void 0),this.picFill.destroy()}}var ZA=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class JA extends AM{constructor(t,e,n,i,r){super(t,e,n),this.children=[],this.cacheSprite=new Ow,this.cacheContainer=new ty,this.json=t,this.json.fillStyle&&"groupFill"===this.json.fillStyle.fillType&&i&&(this.json.fillStyle=i),this.container.name=t.id,this.cacheContainer.name=t.id+"-cache-container",this.ctx.timingTargets.addTarget(t.id,this),this.updateTransform(this.json),this.fillObject=new xA(this.ctx,t.fillStyle,t.width,t.height,{useFilter:!1,useSlideBackgroundFill:!1}),this.createChildren(r)}createChildren(t){var e,n,i,r;const o={x:null!==(n=null===(e=this.json.position)||void 0===e?void 0:e.x)&&void 0!==n?n:0,y:null!==(r=null===(i=this.json.position)||void 0===i?void 0:i.y)&&void 0!==r?r:0};for(let e=0,n=this.json.children.length;e<n;e++)t.addSubMTask(()=>ZA(this,void 0,void 0,(function*(){const n=this.json.children[e];let i=null;"Shape"===(null==n?void 0:n.type)?i=new UA(n,this.ctx,o,this.json.fillStyle):"Picture"===(null==n?void 0:n.type)?i=new YA(n,this.ctx,o,this.json.fillStyle):"Container"===(null==n?void 0:n.type)&&(i=new JA(n,this.ctx,o,this.json.fillStyle,t)),i&&this.children.push(i)})),"@ContainerImpl[child.init]")}get interactiveContainer(){return this.container}get renderContainer(){return this.container}preRender(t){for(const e of this.children)t.addSubMTask(()=>ZA(this,void 0,void 0,(function*(){e.preRender(t)})),"@ContainerImpl[child.preRender]")}getBgElement(){return null}getIterateEntry(t,e,n){return 0===e?this:(this.ctx.eventHub.emit("IterateTimeNodeEnd",n),null)}getTextElement(){return null}render(t){for(const e of this.children)e.render(t),t.addSubMTask(()=>ZA(this,void 0,void 0,(function*(){var t;e.renderContainer&&this.cacheContainer.addChild(e.renderContainer),(e.json.hlinkHover||e.json.hlinkClick)&&(null===(t=e.hyperlink)||void 0===t||t.addProxy(this.container))})),"@ContainerImpl[child.render]");t.addSubMTask(()=>ZA(this,void 0,void 0,(function*(){this.container.addChild(this.cacheContainer)})),"@ContainerImpl[child.append]")}clearOnSlideChange(){this.children.forEach(t=>t.clearOnSlideChange())}initOnReuse(){this.children.forEach(t=>t.initOnReuse())}destroy(){this.cacheSprite&&this.cacheSprite.destroy({texture:!0}),this.children.forEach(t=>t.destroy()),this.container.destroy({children:!0,texture:!0,baseTexture:!0}),this.cacheContainer.destroy({children:!0,texture:!0,baseTexture:!0})}}class KA extends a.a{constructor(t,e,n,i){super(),this.cond={},this.timeoutIds=[],this.condHandle=(t,e={})=>{if(t)if(t.delay&&t.delay>0){const n=this.ctx.clock.setTimeout(()=>{t.event&&(this.cond[t.event]=!0,this.detectTrigger(e))},t.delay);this.timeoutIds.push(n)}else this.cond[t.event]=!0,this.detectTrigger(e);else this.detectTrigger(e)},this.id=t,this.ctx=i,this.eventHubs=n,e.forEach(t=>{this.addCond(t)})}setTriggerParams(t){this.triggerParams=t}addCond(t){const e=e=>this.condHandle(t,e);t.event&&(/^shape/.test(t.event)||/^time/.test(t.event)?(this.cond[t.event]=!1,this.eventHubs.global.addListener(t.event,e)):/^runtime/.test(t.event)?(this.cond[t.event]=!1,this.eventHubs.runtime.addListener(t.event,e)):/^self/.test(t.event)?t.delay&&t.delay>0&&(this.cond[t.event]=!1,this.eventHubs.runtime.addListener(t.event,e)):this.cond[t.event]=!1)}isTrigger(){return Object.keys(this.cond).every(t=>!!this.cond[t])}isTriggerWithoutParent(){return Object.keys(this.cond).filter(t=>"self"!==t).every(t=>!!this.cond[t])}detectTrigger(t){if(Object.keys(this.cond).every(t=>!!this.cond[t])){Object.keys(this.cond).forEach(t=>{this.cond[t]=!1});const e=this.triggerParams;this.triggerParams=void 0,this.emit("active",e,t)}}reset(){Object.keys(this.cond).forEach(t=>{this.cond[t]=!1}),this.timeoutIds.forEach(t=>this.ctx.clock.clearTimeout(t))}}class $A extends a.a{constructor(t){super(),this.isTimeNodeEndSync=!1,this.interactiveListeners=[],this.runtimeNodeEventHub=new a.a,this._currentSeqIndex=0,this._currentSeqState="idle",this.isForward=!0,this.autoPlay=!1,this.handlePrev=(t=!1)=>{var e,n,i,r,o,s;this.hasPrev()||!this.isMainSeq?"idle"===this.currentSeqState?(this.decrSeqIndex(),null===(e=this.commonTimeNode.children[this.currentSeqIndex])||void 0===e||e.commonTimeNode.seekToStart(),null===(n=this.commonTimeNode.children[this.currentSeqIndex])||void 0===n||n.commonTimeNode.clearSubList(),this.currentSeqState="idle"):"running"===this.currentSeqState?(null===(i=this.commonTimeNode.children[this.currentSeqIndex])||void 0===i||i.commonTimeNode.seekToStart(),null===(r=this.commonTimeNode.children[this.currentSeqIndex])||void 0===r||r.commonTimeNode.clearSubList(),this.currentSeqState="idle"):"end"===this.currentSeqState&&(this.currentSeqIndex>=this.commonTimeNode.children.length&&(this.currentSeqIndex=this.commonTimeNode.children.length-1),null===(o=this.commonTimeNode.children[this.currentSeqIndex])||void 0===o||o.commonTimeNode.seekToStart(),null===(s=this.commonTimeNode.children[this.currentSeqIndex])||void 0===s||s.commonTimeNode.clearSubList(),this.currentSeqState="idle"):this.globalEventHub.emit("c:prev slide",t)},this.handleNext=(t=!1)=>{var e,n,i,r;this.isTimeNodeEndSync&&(this.isTimeNodeEndSync=!1,this.currentSeqState="idle",this.currentSeqIndex=0),this.hasNext()||!this.isMainSeq?"idle"===this.currentSeqState?null===(e=this.commonTimeNode.children[this.currentSeqIndex])||void 0===e||e.commonTimeNode.startTimeNodeForce():"running"===this.currentSeqState?(null===(n=this.commonTimeNode.children[this.currentSeqIndex])||void 0===n||n.commonTimeNode.seekToEnd(!1,!0),this.currentSeqState="end",this.incrSeqIndex(),null===(i=this.commonTimeNode.children[this.currentSeqIndex])||void 0===i||i.commonTimeNode.startTimeNodeForce()):"end"===this.currentSeqState&&(this.incrSeqIndex(),null===(r=this.commonTimeNode.children[this.currentSeqIndex])||void 0===r||r.commonTimeNode.startTimeNodeForce()):this.globalEventHub.emit("c:next slide",t)};const{json:e,iterateType:n,isIterate:i,isSub:r,parent:o,ctx:s,eventHub:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:c}=t;this.isMainSeq="mainSeq"===e.ctn.nodeType,this.isInteractiveSeq="interactiveSeq"===e.ctn.nodeType,this.id=e.ctn.id,this.isIterate=i,this.json=e,this.ctx=s,this.globalEventHub=l,this.commonTimeNode=new MR({json:e.ctn,isSub:r,eventHubs:{global:l,runtime:this.runtimeNodeEventHub},ctx:s,parent:o,isIterate:!1,iterateType:n,iterateIndex:u,iterateId:h,isInInteractiveSeq:c||this.isInteractiveSeq}),this.bindShapeEvent(),this.nextConds=new KA("mainSeq",e.nextCondLst,{global:l,runtime:this.runtimeNodeEventHub},this.ctx),this.prevConds=new KA("mainSeq",e.preCondLst,{global:l,runtime:this.runtimeNodeEventHub},this.ctx),this.commonTimeNode.on("timeNodeRestart",()=>{this.currentSeqIndex=0,this.currentSeqState="idle"}),this.commonTimeNode.on("childTimeNodeStart",t=>{const e=this.commonTimeNode.children.findIndex(e=>e.commonTimeNode.uuid===t.id);e>=0&&(this.currentSeqIndex=e),this.currentSeqState="running",this.isMainSeq&&this.ctx.eventHub.emit(YR.mainSeqStepStart,e)}),this.commonTimeNode.on("childTimeNodeEnd",t=>{const e=this.commonTimeNode.children.findIndex(e=>e.commonTimeNode.uuid===t.id);e>=0&&(this.currentSeqIndex=e),this.currentSeqState="end",this.autoPlay&&this.ctx.clock.setTimeout(()=>{this.handleNext()}),this.isMainSeq&&this.ctx.eventHub.emit(YR.mainSeqStepEnd,e)}),this.commonTimeNode.on("timeNodeEndSync",()=>{this.isTimeNodeEndSync=!0,this.commonTimeNode.resetForRepeat()}),this.commonTimeNode.on("timeNodeDestroy",()=>{this.interactiveListeners.forEach(([t,e])=>{t&&e&&t.interactiveContainer.removeListener("pointerdown",e)}),this.interactiveListeners=[]}),this.nextConds.on("active",(t,e)=>{this.handleNext(e)}),this.prevConds.on("active",(t,e)=>{this.handlePrev(e)})}get currentSeqIndex(){return this._currentSeqIndex}set currentSeqIndex(t){this._currentSeqIndex=t,this.isMainSeq?this.ctx.eventHub.emit(YR.mainSeqStepChange,t):this.isInteractiveSeq&&this.ctx.eventHub.emit(YR.interactiveSeqStateChange,{id:this.json.ctn.id,state:{step:t,state:this._currentSeqState}})}get currentSeqState(){return this._currentSeqState}set currentSeqState(t){this._currentSeqState=t,this.isMainSeq?this.ctx.eventHub.emit(YR.mainSeqStateChange,t):this.isInteractiveSeq&&this.ctx.eventHub.emit(YR.interactiveSeqStateChange,{id:this.json.ctn.id,state:{step:this._currentSeqIndex,state:t}})}get stepLength(){return this.commonTimeNode.children.length}get currentStep(){return this.currentSeqIndex}get currentState(){return this.currentSeqState}startAutoPlay(){this.autoPlay=!0,this.commonTimeNode.children[0].commonTimeNode.startTimeNodeForce()}incrSeqIndex(){this.currentSeqIndex+1<=this.commonTimeNode.children.length&&(this.currentSeqIndex+=1)}decrSeqIndex(){this.currentSeqIndex-1>=-1&&(this.currentSeqIndex-=1)}hasPrev(){return!(this.currentSeqIndex<=0&&"idle"===this.currentSeqState)}hasNext(){return!(this.currentSeqIndex>=this.commonTimeNode.children.length||this.currentSeqIndex===this.commonTimeNode.children.length-1&&"end"===this.currentSeqState)}bindShapeEvent(){"interactiveSeq"===this.json.ctn.nodeType&&this.json.nextCondLst.forEach(t=>{if(/^shape/.test(t.event)){const e=t.event.split(" ")[1];if(e){const t=this.ctx.timingTargets.getTargetById(e);if(t){t.interactiveContainer.interactive=!0,t.interactiveContainer.cursor="pointer";const n=()=>{this.ctx.eventHub.emit(YR.userInput);const t=`shape ${e} onClick`,{mode:n}=this.ctx;"interactive"!==n&&"sync"!==n||this.ctx.eventHub.emit(YR.interactiveSeqAction,{action:t,seqId:this.json.ctn.id}),"sync"!==n&&"local"!==n||this.globalEventHub.emit(t)};t.interactiveContainer.on("pointerdown",n),this.interactiveListeners.push([t,n])}}}})}setCurrentStep(t,e){this.isInteractiveSeq&&0===this.commonTimeNode.applyCount&&(this.commonTimeNode.applyCount=1);let n=t;this.commonTimeNode.seekToStart();const{length:i}=this.commonTimeNode.children;if(-1===n&&(n=i-1),n>=0&&n<i)for(let t=0;t<=n;t++){const i=this.commonTimeNode.children[t];t!==n?i.commonTimeNode.seekToEnd(!1,!0):"start"===e?i.commonTimeNode.seekToStart():"end"===e&&i.commonTimeNode.seekToEnd(!1,!0)}this.currentSeqIndex=n,this.currentSeqState="start"===e?"idle":"end"}}function QA(t,e,n){const i=e.split(".");i.reduce((r,o,s)=>{if(r)return s!==i.length-1?r[o]:void(r[o]=n);console.warn(`${t} not support ${e}`)},t)}function tR(t,e){if(!e)return null;return e.split(".").reduce((n,i)=>{if(n)return n[i];console.warn(`${t} not support ${e}`)},t)}class eR{constructor(t){this.timingTarget=null,this.runtimeNodeEventHub=new a.a,this.basicOnTimeNodeEnd=()=>{if(this.isConflict){const{target:t}=this.json.cBhvr,e=this.getTargetId(t);this.ctx.conflictTimeNodeManager.removeRunningTimeNode(e,this.modifyAttrKey)}},this.basicOnTimeLineStart=()=>{if(this.isConflict){const{target:t}=this.json.cBhvr;if("next"===this.activeWhenConflict){const e=this.getTargetId(t);this.ctx.conflictTimeNodeManager.addRunningTimeNode(e,this.modifyAttrKey,this.commonTimeNode)}else"prev"===this.activeWhenConflict&&this.commonTimeNode.dispose()}};const{isIterate:e,isSub:n,json:i,ctx:r,parent:o,eventHub:s,iterateType:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:c}=t;this.json=i,this.id=i.cBhvr.ctn.id,this.ctx=r,this.globalEventHub=s,this.commonTimeNode=new MR({json:i.cBhvr.ctn,isSub:n,eventHubs:{global:s,runtime:this.runtimeNodeEventHub},ctx:r,parent:o,isIterate:e,iterateType:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:c}),this.timingTarget=this.ctx.timingTargets.getTarget(i.cBhvr.target,e,{type:l,index:u,id:h}),this.commonTimeNode.on("seekToStart",()=>this.onSeekToStart()),this.commonTimeNode.on("seekToEnd",()=>this.onSeekToEnd()),this.commonTimeNode.on("timelineStart",this.basicOnTimeLineStart),this.commonTimeNode.on("timeNodeEnd",this.basicOnTimeNodeEnd)}getTargetId(t){let e=t.id;return"shape"===t.type&&t.txEl&&(e=`${e}-txEl-${t.txEl.range[0]}`),this.commonTimeNode.isIterate&&(e=`${e}-iterate-${this.commonTimeNode.iterateIndex}`),e}}class nR extends eR{constructor(t){super(t),this.isConflict=!1,this.activeWhenConflict="next",this.startVal=null,this.updateStartValue=()=>{this.timingTarget&&(this.startVal=tR(this.timingTarget,this.json.cBhvr.attrList[0]))},this.onSeekToStart=()=>{const t=this.json.cBhvr.attrList[0];null!==this.startVal&&this.timingTarget&&QA(this.timingTarget,t,this.startVal)},this.onSeekToEnd=()=>{const t=this.json.cBhvr.attrList[0],e=this.json.cBhvr.to||this.json.to;e&&this.timingTarget&&QA(this.timingTarget,t,e)},this.commonTimeNode.on("timeNodeStart",this.updateStartValue),this.commonTimeNode.on("timeNodeCreate",this.updateStartValue),this.commonTimeNode.on("timeUpdate",({duration:t,delta:e})=>{if(e/t>=1){const t=this.json.cBhvr.attrList[0];this.json.cBhvr.attrList.length>1&&console.warn("this.json.cBhvr.attrList.length > 0");const e=this.json.cBhvr.to||this.json.to;e&&this.timingTarget&&QA(this.timingTarget,t,e)}})}get modifyAttrKey(){return this.json.cBhvr.attrList[0]}}var iR=function(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s};class rR{constructor(t,e){this.math={pi:Math.PI,e:Math.E,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,ceil:Math.ceil,cos:Math.cos,cosh:Math.cosh,deg:t=>t/Math.PI*180,exp:Math.exp,floor:Math.floor,ln:Math.log,max:Math.max,min:Math.min,rad:t=>t/180*Math.PI,rand:Math.random,sin:Math.sin,sinh:Math.sinh,sqrt:Math.sqrt,tan:Math.tan,tanh:Math.tanh},this.timingTarget=e,this.val=t.val.value,this.time=t.time,t.fmla&&(this.fmla=this.parseFmla(t.fmla))}parseFmla(t){let e=t.replace(/#ppt_h/g,`(${this.timingTarget.design_ppt_h})`);return e=e.replace(/#ppt_w/g,`(${this.timingTarget.design_ppt_w})`),e=e.replace(/#ppt_x/g,`(${this.timingTarget.design_ppt_x})`),e=e.replace(/#ppt_y/g,`(${this.timingTarget.design_ppt_y})`),e=e.replace(/ppt_w/g,"vars.ppt_w"),e=e.replace(/ppt_h/g,"vars.ppt_h"),e=e.replace(/ppt_x/g,"vars.ppt_x"),e=e.replace(/ppt_y/g,"vars.ppt_y"),e=e.replace(/#/g,"vars."),["abs","acos","asin","atan","ceil","cos","cosh","deg","exp","floor","ln","max","min","rad","rand","sin","sinh","sqrt","tan","tanh","pi","e"].forEach(t=>{const n=new RegExp(`([^a-z])${t}([^a-z])`,"g");e=e.replace(n,(e,n,i)=>`${n}math.${t}${i}`)}),new Function("vars","math","$","return "+e)}}class oR extends rR{constructor(t,e,n){super(t,e),this.value=t.val.value,n&&(this.fmla=this.parseFmla(n))}resolveValue(){return this.value}interpolationFrom(t,e,n){const i=t.resolveValue(n),r=i+(this.resolveValue()-i)*e;return t.fmla?t.fmla(n,this.math,r):r}}iR([YE()],oR.prototype,"interpolationFrom",null);class sR extends rR{constructor(t,e){var n;super(t,e),this.value=null===(n=t.val)||void 0===n?void 0:n.value}interpolationFrom(t,e,n){let i=t.resolveValue(n);return e>this.time&&(i=this.resolveValue()),i}resolveValue(){return this.value||""}}iR([YE()],sR.prototype,"interpolationFrom",null);class aR extends rR{constructor(t,e){super(t,e),this.fn=this.parseFmla(this.val)}resolveValue(t){return this.fn(t,this.math,1)}interpolationFrom(t,e,n){const i=t.resolveValue(n),r=i+(this.resolveValue(n)-i)*e;return t.fmla?t.fmla(n,this.math,r):r}}iR([YE()],aR.prototype,"interpolationFrom",null);class lR extends rR{constructor(t,e){super(t,e),this.value=t.val.value}interpolationFrom(t,e){return LM(t.resolveValue(),this.value,e)}resolveValue(){return this.value}}iR([YE()],lR.prototype,"interpolationFrom",null);class uR extends eR{constructor(t){super(t),this.isConflict=!0,this.activeWhenConflict="next",this.startVal=null,this.vars={ppt_x:0,ppt_y:0,ppt_w:0,ppt_h:0},this.keyFrames=[],this.isColorAnim=!1,this.onTimeNodeStart=()=>{this.timingTarget&&(this.startVal=tR(this.timingTarget,this.json.cBhvr.attrList[0]))},this.updateVars=()=>{var t,e,n,i;(null===(t=this.timingTarget)||void 0===t?void 0:t.ppt_h)&&(this.vars.ppt_h=this.timingTarget.ppt_h),(null===(e=this.timingTarget)||void 0===e?void 0:e.ppt_w)&&(this.vars.ppt_w=this.timingTarget.ppt_w),(null===(n=this.timingTarget)||void 0===n?void 0:n.ppt_x)&&(this.vars.ppt_x=this.timingTarget.ppt_x),(null===(i=this.timingTarget)||void 0===i?void 0:i.ppt_y)&&(this.vars.ppt_y=this.timingTarget.ppt_y),this.isColorAnim},this.onTimeUpdate=({duration:t,delta:e})=>{const n=e/t,i=this.keyFrames.findIndex(t=>n<=t[0]),{attrList:r}=this.json.cBhvr;if(i<0){const t=this.keyFrames[this.keyFrames.length-1];return void(this.timingTarget&&r&&r[0]&&QA(this.timingTarget,r[0],t[1].resolveValue(this.vars)))}const o=i-1,s=this.keyFrames[i],a=this.keyFrames[o]||s,l=s[0]-a[0]==0?1:(n-a[0])/(s[0]-a[0]),u=s[1].interpolationFrom(a[1],l,this.vars);this.timingTarget&&r&&r[0]&&QA(this.timingTarget,r[0],u)},this.onSeekToStart=()=>{null!==this.startVal&&this.timingTarget&&QA(this.timingTarget,this.json.cBhvr.attrList[0],this.startVal)},this.onSeekToEnd=()=>{this.onTimeUpdate({duration:1,delta:1,isReverse:!1})},this.initKeyFrames(),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("timelineStart",this.updateVars),this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart)}get modifyAttrKey(){return this.json.cBhvr.attrList[0]}initKeyFrames(){var t;const{valueType:e}=this.json;if(this.json.tavLst.length<=0)if(this.json.to){if(this.json.from||this.startVal){const t={time:0,val:{type:"string",value:this.json.from||this.startVal.toString()},fmla:""};if("num"===e&&this.timingTarget){const e=new aR(t,this.timingTarget);this.keyFrames.push([t.time,e])}}const t={time:1,val:{type:"string",value:this.json.to},fmla:""};if("num"===e&&this.timingTarget){const e=new aR(t,this.timingTarget);this.keyFrames.push([t.time,e])}}else if(this.json.by){const n={time:0,val:{type:"string",value:this.json.cBhvr.attrList[0]},fmla:""};if("num"===e&&this.timingTarget){const t=new aR(n,this.timingTarget);this.keyFrames.push([n.time,t])}const i={time:1,val:{type:"string",value:((null===(t=n.val)||void 0===t?void 0:t.value)||"")+"+"+this.json.by},fmla:""};if("num"===e&&this.timingTarget){const t=new aR(i,this.timingTarget);this.keyFrames.push([i.time,t])}}if(this.json.tavLst.length>0)for(const t of this.json.tavLst)if(t.val&&this.timingTarget){let n=null;"string"===t.val.type?"num"===e?n=new aR(t,this.timingTarget):"str"===e&&(n=new sR(t,this.timingTarget)):"number"===t.val.type?n=new oR(t,this.timingTarget):"color"===t.val.type?(this.isColorAnim=!0,n=new lR(t,this.timingTarget)):"boolean"===t.val.type&&console.warn("not implements"),n&&this.keyFrames.push([t.time,n])}}}var hR=n(50),cR=n.n(hR),dR=n(51),pR=n.n(dR);class fR extends Gx{constructor(){super(pR.a,cR.a,{percent:0,direction:1,transition:0})}set transition(t){this.uniforms.transition=t}set percent(t){this.uniforms.percent=t}set direction(t){this.uniforms.direction=t}}var mR=n(52),gR=n.n(mR);class vR extends Gx{constructor(){super(void 0,gR.a,{percent:0,transition:1})}set transition(t){this.uniforms.transition=Math.pow(t,t)}set percent(t){this.uniforms.percent=t}}class _R extends eR{constructor(t){var e;super(t),this.filterType="",this.isConflict=!0,this.activeWhenConflict="prev",this.onTimeUpdate=({duration:t,delta:e})=>{const n=e/t;this.filter&&(this.filter.percent=this.commonTimeNode.applyTimeFilter(n)),n>=1&&this.timingTarget&&this.ctx.clock.setTimeout(()=>{this.timingTarget&&(this.timingTarget.container.filters=[])})},this.onSeekToStart=()=>{this.timingTarget&&(this.timingTarget.container.filters=[])},this.onSeekToEnd=()=>{this.timingTarget&&(this.timingTarget.container.filters=[])},this.commonTimeNode.on("timelineStart",()=>{this.filter&&this.timingTarget&&(this.timingTarget.container.filters=[this.filter])}),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate);let n=0;"out"===t.json.transition?n=-1:"in"===t.json.transition&&(n=1);const i=null===(e=t.json.filter)||void 0===e?void 0:e.match(/^([a-zA-Z]+)(\((.+)\))?/);if(i){const t=i[1],e=i[3];if("wipe"===t){const n=new fR;"up"===e?n.direction=1:"down"===e?n.direction=2:"left"===e?n.direction=3:"right"===e&&(n.direction=4),this.filter=n,this.filterType=`${t}-${e}`}else if("fade"===t){const e=new vR;this.filter=e,this.filterType=""+t}this.filter&&(this.filter.transition=n)}}get modifyAttrKey(){return this.filterType}}class yR extends eR{constructor(t){super(t),this.isConflict=!0,this.activeWhenConflict="next",this.startPos=null,this.onTimeNodeStart=()=>{var t,e;this.startPos={x:(null===(t=this.timingTarget)||void 0===t?void 0:t.ppt_x)||0,y:(null===(e=this.timingTarget)||void 0===e?void 0:e.ppt_y)||0}},this.onTimeUpdate=({duration:t,delta:e})=>{var n;const i=e/t,r=null===(n=this.path)||void 0===n?void 0:n.getPoint(i);this.timingTarget&&r&&(this.timingTarget.ppt_x=r.x+this.timingTarget.design_ppt_x,this.timingTarget.ppt_y=r.y+ +this.timingTarget.design_ppt_y)},this.onSeekToStart=()=>{this.timingTarget&&this.startPos&&(this.timingTarget.ppt_x=this.startPos.x,this.timingTarget.ppt_y=this.startPos.y)},this.onSeekToEnd=()=>{var t,e,n;const i=null!==(e=null===(t=this.commonTimeNode.json)||void 0===t?void 0:t.spd)&&void 0!==e?e:1,r=null===(n=this.path)||void 0===n?void 0:n.getPoint(i>0?1:0);this.timingTarget&&r&&(this.timingTarget.ppt_x=r.x+this.timingTarget.design_ppt_x,this.timingTarget.ppt_y=r.y+this.timingTarget.design_ppt_y)},this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.createPath()}get modifyAttrKey(){return"motion"}createPath(){var t;const e=new xc,n=null===(t=this.json.path)||void 0===t?void 0:t.match(/[MLCmlc][^MLCmlc]+/g);if(n)for(const t of n){const[n,...i]=t.trim().replace(/\s+/g," ").split(" ");if("M"===n){const[t,n]=i.map(t=>Number(t));e.moveTo(t,n)}else if("L"===n){const[t,n]=i.map(t=>Number(t));e.lineTo(t,n)}else if("C"===n){const[t,n,r,o,s,a]=i.map(t=>Number(t));e.bezierCurveTo(t,n,r,o,s,a)}else if("Z"===n)e.closePath();else if("E"===n)console.warn("not implements");else if("c"===n){const[t,n,r,o,s,a]=i.map(t=>Number(t)),l=e.currentPoint;e.bezierCurveTo(t+l.x,n+l.y,r+l.x,o+l.y,s+l.x,a+l.y)}else if("l"===n){const t=e.currentPoint,[n,r]=i.map(t=>Number(t));e.lineTo(n+t.x,r+t.y)}else if("m"===n){const t=e.currentPoint,[n,r]=i.map(t=>Number(t));e.moveTo(n+t.x,r+t.y)}}this.path=e}}class xR extends eR{constructor(t){super(t),this.isConflict=!0,this.activeWhenConflict="next",this.startVal=null,this.onTimelineStart=t=>{t.isReverse||this.updateCurrentValue()},this.onTimeUpdate=({duration:t,delta:e})=>{var n,i,r,o,s;const a=e/t,l={x:1,y:1};if(this.to){const t=null!==(n=this.from)&&void 0!==n?n:{x:null!==(r=null===(i=this.startVal)||void 0===i?void 0:i.x)&&void 0!==r?r:1,y:null!==(s=null===(o=this.startVal)||void 0===o?void 0:o.y)&&void 0!==s?s:1};l.x=t.x+(this.to.x-t.x)*a,l.y=t.y+(this.to.y-t.y)*a}else if(this.by){const t={x:this.by.x,y:this.by.y};l.x=1+(t.x-1)*a,l.y=1+(t.y-1)*a}this.timingTarget&&(this.timingTarget.scale=l)},this.onTimeNodeStart=()=>{this.timingTarget&&(this.startVal={x:this.timingTarget.scale.x,y:this.timingTarget.scale.y})},this.onSeekToStart=()=>{this.timingTarget&&this.startVal&&(this.timingTarget.scale=this.startVal)},this.onSeekToEnd=()=>{this.onTimeUpdate({duration:1,delta:1,isReverse:!1})},this.from=t.json.from,this.to=t.json.to,this.by=t.json.by,this.commonTimeNode.on("timelineStart",this.onTimelineStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart)}get modifyAttrKey(){return"scale"}updateCurrentValue(){this.timingTarget&&(this.current={x:this.timingTarget.scale.x,y:this.timingTarget.scale.y})}}class bR extends eR{constructor(t){super(t),this.isConflict=!1,this.activeWhenConflict="next",this.isTimelineStart=!1,this.startColorString=null,this.currentColorString="#FFFFFFFF",this.onTimelineStart=t=>{if(this.isTimelineStart)return;this.isTimelineStart=!0,t.isReverse||this.updateCurrentValue(),this.from.isInit()||this.from.fromHexString(this.currentColorString),this.to.isInit()||this.from.by(this.by,this.to);const[e]=this.json.cBhvr.attrList[0].split(".");QA(this.timingTarget,e+".on","true")},this.onTimeNodeEnd=()=>{if("remove"===this.json.cBhvr.ctn.fill){const[t]=this.json.cBhvr.attrList[0].split(".");QA(this.timingTarget,t+".on","false")}this.isTimelineStart=!1},this.onSeekToStart=()=>{var t;if(this.timingTarget&&(this.onTimeUpdate({duration:1,delta:0}),(null===(t=this.timingTarget.fill)||void 0===t?void 0:t.designColor.toUpperCase())===this.from.toHexString().toUpperCase())){const[t]=this.json.cBhvr.attrList[0].split(".");QA(this.timingTarget,t+".on","false")}},this.onTimeNodeStart=()=>{if(this.timingTarget){const t=tR(this.timingTarget,this.json.cBhvr.attrList[0]);t&&(this.startColorString=t)}},this.onTimeUpdate=({delta:t,duration:e})=>{const n=t/e;this.to.interpolationFrom(this.from,n,this.target),this.timingTarget&&QA(this.timingTarget,this.json.cBhvr.attrList[0],this.target.toHexString())},this.onSeekToEnd=()=>{this.isTimelineStart||this.onTimelineStart({isReverse:!1,activeCount:0,id:""}),this.onTimeUpdate({duration:1,delta:1})},"rgb"===this.json.clrSpc?(this.from=new PM(this.json.from),this.to=new PM(this.json.to),this.by=new PM(this.json.by),this.target=new PM):(this.from=new RM(this.json.from),this.to=new RM(this.json.to),this.by=new RM(this.json.by),this.target=new RM),this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.commonTimeNode.on("timelineStart",this.onTimelineStart),this.commonTimeNode.on("timeNodeEnd",this.onTimeNodeEnd),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate)}get modifyAttrKey(){return this.json.cBhvr.attrList[0]}updateCurrentValue(){if(this.timingTarget){const t=tR(this.timingTarget,this.json.cBhvr.attrList[0]);t&&(this.currentColorString=t)}}}class TR extends eR{constructor(t){super(t),this.isConflict=!1,this.activeWhenConflict="next",this.startVal=null,this.lastVal=null,this.onTimelineStart=t=>{this.lastVal=null,t.isReverse||this.updateCurrentValue()},this.onTimeUpdate=({duration:t,delta:e})=>{const n=e/t;let i=0,r=0;if(void 0!==this.from&&void 0!==this.to){i=this.from,r=this.to;const t=i+(r-i)*n;this.timingTarget&&(this.timingTarget.r=t)}else if(void 0!==this.by){this.lastVal||(this.lastVal=0);const t=this.by*n-this.lastVal;this.lastVal=this.by*n,this.timingTarget&&(this.timingTarget.r+=t)}},this.onTimeNodeStart=()=>{var t;Object(l.isNumber)(null===(t=this.timingTarget)||void 0===t?void 0:t.r)&&(this.startVal=this.timingTarget.r)},this.onSeekToStart=()=>{this.timingTarget&&null!==this.startVal&&(this.timingTarget.r=this.startVal)},this.onSeekToEnd=()=>{this.onTimeUpdate({duration:1,delta:1,isReverse:!1})},this.from=this.json.from,this.to=this.json.to,this.by=this.json.by,this.by?this.isConflict=!1:this.isConflict=!0,this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.commonTimeNode.on("timelineStart",this.onTimelineStart),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate)}get modifyAttrKey(){return"rotate"}updateCurrentValue(){var t;this.currentVal=null===(t=this.timingTarget)||void 0===t?void 0:t.r}}class wR extends eR{constructor(t){super(t),this.isConflict=!1,this.activeWhenConflict="next",this.isApplied=!1,this.onTimeUpdate=()=>{var t,e;const{cmd:n,cmdType:i}=this.json;!this.isApplied&&n&&i&&(this.isApplied=!0,null===(e=null===(t=this.timingTarget)||void 0===t?void 0:t.cmd)||void 0===e||e.applyCommand(n,i))},this.onSeekToStart=()=>{var t,e;null===(e=null===(t=this.timingTarget)||void 0===t?void 0:t.cmd)||void 0===e||e.applyCommand("custom-pause","call")},this.onSeekToEnd=()=>{},this.commonTimeNode.on("timeNodeStart",()=>{this.isApplied=!1}),this.commonTimeNode.on("timeNodeEnd",()=>{this.isApplied=!1}),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("seekToStart",this.onSeekToStart),this.commonTimeNode.on("seekToEnd",this.onSeekToEnd)}get modifyAttrKey(){var t,e,n,i;return(null!==(e=null===(t=this.json)||void 0===t?void 0:t.cmd)&&void 0!==e?e:"")+(null!==(i=null===(n=this.json)||void 0===n?void 0:n.cmdType)&&void 0!==i?i:"")}}class SR{constructor(t){this.runtimeNodeEventHub=new a.a,this.stopAudio=()=>{this.audio.stop()},this.destroy=()=>{this.stopAudio(),this.audio.destroy()};const{json:e,isIterate:n,isSub:i,eventHub:r,ctx:o,parent:s,iterateType:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:c}=t;this.json=e,this.id=e.cMediaNode.ctn.id,this.commonTimeNode=new MR({json:e.cMediaNode.ctn,isSub:i,eventHubs:{global:r,runtime:this.runtimeNodeEventHub},ctx:o,parent:s,isIterate:n,iterateType:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:c});let d=e.cMediaNode.tgtEl;o.loaderDelegate&&(d=o.loaderDelegate.redirectMedia(d),o.logger.info(`redirect media url from ${e.cMediaNode.tgtEl} to ${d} by delegate.`,o.taskId)),this.audio=new jA(d,o.runningAudio),this.commonTimeNode.on("timelineStart",()=>{this.audio.play()}),this.commonTimeNode.on("seekToStart",this.stopAudio),this.commonTimeNode.on("seekToEnd",this.stopAudio),this.commonTimeNode.on("timeNodeDestroy",this.destroy)}}var ER=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class MR extends a.a{constructor(t){var e,n;super(),this.uuid=Date.now().toString(32)+Math.random().toString(32).substring(2),this.isSub=!1,this.isShadow=!1,this.startCount=0,this.applyCount=0,this.isReverse=!1,this.isConflictDispose=!1,this.isIterateEnd=!1,this.parentTimeNode=null,this.isActive=!1,this.isDestroy=!1,this.shouldSeekOnStart=!1,this.repeatTimeoutId="",this.iterateShadows=[],this.isEndEventsEmitted=!1,this.tmFilter=[],this.timeDelta=0,this.isIterate=!1,this.iterateType="el",this.iterateIndex=0,this.children=[],this.subList=[],this.duration=0,this.isNegativeSpeed=!1,this.handleEndCond=()=>{this.isActive&&(this.isActive=!1,this.isInfiniteRepeat()?this.repeatTimeNodeEnd():this.seekToEnd(!1,!0))},this.handleActive=(t=!0)=>{if(this.isActive=!0,this.isConflictDispose=!1,this.applyCount+=1,this.json.iterate||this.emit("timeNodeStart",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}),this.startCount>0&&this.json.restart){if("never"===this.json.restart)return;"whenNotActive"!==this.json.restart&&"always"!==this.json.restart||(this.seekToStart(),this.emit("timeNodeRestart",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}),this.startTimeLine(t))}else this.startTimeLine(t)},this.updateTimeLine=t=>{const e=t/(mv.TARGET_FPMS||.06);this.timeDelta+=e,this.duration-this.timeDelta<=e&&(this.timeDelta=this.duration),this.timeDelta<this.duration?this.emit("timeUpdate",{delta:this.isReverse||this.isNegativeSpeed?this.duration-this.timeDelta:this.timeDelta,duration:this.duration,isReverse:this.isReverse}):(this.emit("timeUpdate",{delta:this.isReverse||this.isNegativeSpeed?0:this.duration,duration:this.duration,isReverse:this.isReverse}),this.onTimeLineEnd())},this.handleEnd=(t=!1)=>{(this.isTimeNodeEnd()||t)&&(this.isActive=!1,this.isSub&&this.destroy(),this.emitEndEvents())};const{isSub:i,isIterate:r,ctx:o,eventHubs:s,parent:a,json:l,iterateType:u,iterateId:h,iterateIndex:c,isInInteractiveSeq:d}=t;this.isSub=i,this.isInInteractiveSeq=d,this.isIterate=r,this.parentTimeNode=a,this.json=l,this.ctx=o,this.iterateIndex=c,this.eventHubs=s,this.iterateType=u,this.iterateId=h,this.tmFilter=null!==(n=null===(e=l.tmFilter)||void 0===e?void 0:e.split(";").map(t=>t.split(",").map(t=>parseFloat(t.trim()))))&&void 0!==n?n:[];const p=Number(this.json.dur),f=this.json.spd||1;this.isNegativeSpeed=f<0,Number.isNaN(p)||(this.duration=p/Math.abs(f)),this.uuid+="--"+this.json.id,this.setPreStyle(),l.childTnLst&&this.createChildren(l.childTnLst),this.startConds=new KA(this.json.id||"",l.stCondLst,s,this.ctx),this.endConds=new KA(this.json.id||"",l.endCondLst,s,this.ctx),l.endSync&&(this.endSync=new KA(this.json.id||"",[l.endSync],s,this.ctx),this.endSync.on("active",()=>{var t;"interactiveSeq"===this.json.nodeType&&(this.isActive=!1,this.shouldSeekOnStart=!0,this.emit("timeNodeEndSync"),null===(t=this.endSync)||void 0===t||t.reset())})),this.startConds.on("active",t=>{this.isActive||(this.shouldSeekOnStart&&(this.shouldSeekOnStart=!1,this.seekToStart()),this.handleActive(t))}),this.endConds.on("active",()=>{this.handleEndCond(),this.children.forEach(t=>t.commonTimeNode.handleEndCond())}),this.parentTimeNode&&this.parentTimeNode.on("timeNodeStart",()=>{this.applyCount=0}),this.isSub&&"nextClick"===this.json.masterRel&&this.startConds.addCond({event:"shape slide onNext"}),this.json.iterate&&!1===this.isIterate&&this.createIterateShadow()}createIterateShadow(){const t=eM();let e=!0,n=0;const i=n=>{n===t&&(e=!1,this.ctx.eventHub.removeListener("IterateTimeNodeEnd",i))};for(this.ctx.eventHub.on("IterateTimeNodeEnd",i);e;){const e=JSON.parse(JSON.stringify(this.json)),i=new MR({json:e,isSub:!1,eventHubs:this.eventHubs,ctx:this.ctx,parent:null,isIterate:!0,iterateType:e.iterate.type,iterateIndex:n,iterateId:t,isInInteractiveSeq:this.isInInteractiveSeq});this.iterateShadows[n]=i,n+=1}}isInfiniteRepeat(){return this.json.repeatCount>999999998}getReverse(){return this.isReverse}setReverse(t){this.isReverse=t}createTimeNode(t,e){let n=null;const i={json:t,isSub:e,isIterate:this.isIterate,eventHub:this.eventHubs.global,ctx:this.ctx,parent:this,iterateType:this.iterateType,iterateIndex:this.iterateIndex,iterateId:this.iterateId,isInInteractiveSeq:this.isInInteractiveSeq};return"seq"===t.type?n=new $A(i):"par"===t.type?n=new AR(i):"set"===t.type?n=new nR(i):"anim"===t.type?n=new uR(i):"animEffect"===t.type?n=new _R(i):"animMotion"===t.type?n=new yR(i):"animScale"===t.type?n=new xR(i):"animClr"===t.type?n=new bR(i):"animRot"===t.type?n=new TR(i):"cmd"===t.type?n=new wR(i):"audio"===t.type&&(n=new SR(i)),n}createSubList(t){this.subList=[],t.forEach(t=>{const e=this.createTimeNode(t,!0);e&&this.subList.push(e)})}bindCommonTimeNodeEvent(t){t.commonTimeNode.on("timeNodeStart",t=>{this.emit("childTimeNodeStart",t)}),t.commonTimeNode.on("timeNodeEnd",t=>{this.emit("childTimeNodeEnd",t),this.children.every(t=>t.commonTimeNode.isTimeNodeEndWhenDetectEndSync())&&(this.json.iterate||this.allChildrenEndHandle())})}createChildren(t){function e(t){return(e=t,function(t){var e;return!!(null===(e=t)||void 0===e?void 0:e.cBhvr)}(e)?e.cBhvr.ctn:function(t){var e,n;return!!(null===(n=null===(e=t)||void 0===e?void 0:e.cMediaNode)||void 0===n?void 0:n.ctn)}(e)?e.cMediaNode.ctn:e.ctn).presetOrder;var e}if(t&&t[0]&&e(t[0])){[...t].sort((t,n)=>{var i,r;return(null!==(i=e(t))&&void 0!==i?i:0)-(null!==(r=e(n))&&void 0!==r?r:0)}).forEach(e=>{const n=t.findIndex(t=>t===e),i=this.createTimeNode(e,!1);i&&(this.bindCommonTimeNodeEvent(i),this.children[n]=i)})}else t.forEach(t=>{const e=this.createTimeNode(t,!1);e&&(this.bindCommonTimeNodeEvent(e),this.children.push(e))})}playReverse(){this.isReverse=!0,this.startReverseTimeLine(),this.children.forEach(t=>t.commonTimeNode.playReverse())}allChildrenEndHandle(){if(!this.isDestroy){if(this.json.autoRev&&!this.isReverse)return this.isReverse=!0,void this.playReverse();this.isReverse&&(this.isReverse=!1),this.json.repeatCount&&this.json.repeatCount>this.applyCount?this.repeatTimeoutId=this.ctx.clock.setTimeout(()=>{this.seekToStart(!1),this.resetForRepeat(),this.startTimeNodeRepeat()}):(this.json.iterate&&!this.isIterate&&(this.isIterateEnd=!0),this.eventHubs.runtime.emit("runtime all end"),this.startSubList(),this.handleEnd())}}resetForRepeat(){this.isInInteractiveSeq&&this.isInfiniteRepeat()&&this.repeatTimeNodeEnd(),this.timeDelta=0,this.children.forEach(t=>t.commonTimeNode.resetForRepeat())}startSubList(){this.subList.forEach(t=>t.commonTimeNode.startTimeNode())}startReverseTimeLine(){this.isEndEventsEmitted=!1,this.timeDelta=0;const t=1e3/this.ctx.ticker.maxFPS;this.duration<=t&&this.duration>0?(this.emit("timeUpdate",{delta:this.duration,duration:this.duration,isReverse:this.isReverse}),this.ctx.eventHub.emit(YR.animateEnd),this.ctx.ticker.remove(this.updateTimeLine)):this.duration>t&&(this.ctx.eventHub.emit(YR.animateStart),this.ctx.ticker.add(this.updateTimeLine))}startTimeLine(t=!0){if(t&&(this.isEndEventsEmitted=!1,this.eventHubs.global.emit(`time ${this.json.id} begin`),this.eventHubs.global.emit(`time ${this.json.id} onBegin`),this.eventHubs.runtime.emit(`runtime ${this.json.id} begin`)),this.json.iterate)return void this.startIterate();this.timeDelta=0,this.emit("timelineStart",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse});const e=1e3/this.ctx.ticker.maxFPS;this.duration<=e&&this.duration>0?(this.timeDelta=this.isReverse?0:this.duration,this.emit("timeUpdate",{delta:this.timeDelta,duration:this.duration,isReverse:this.isReverse}),this.emit("timelineEnd",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}),this.ctx.ticker.addOnce(()=>{this.onTimeLineEnd()})):this.duration>e&&(this.ctx.eventHub.emit(YR.animateStart),this.updateTimeLine(0),this.ctx.ticker.add(this.updateTimeLine))}startIterate(){return ER(this,void 0,void 0,(function*(){if(this.json.iterate){this.isIterateEnd=!1;for(const t of this.iterateShadows){if(this.isIterateEnd)break;t.children.forEach(t=>{t.commonTimeNode.startTimeNode()}),t.applyCount+=1,yield this.ctx.clock.delay(this.json.iterate.interval)}this.onTimeLineEnd()}}))}applyTimeFilter(t){if(!this.tmFilter.every(t=>Object(l.isNumber)(t[0])&&Object(l.isNumber)(t[1])))return t;for(let e=0;e<this.tmFilter.length;e++){const n=this.tmFilter[e];if(t<n[0]){const i=this.tmFilter[e-1];return(t-i[0])/(n[0]-i[0])*(n[1]-i[1])+i[1]}}return this.tmFilter.length>0?this.tmFilter[this.tmFilter.length-1][1]:t}isNatureTimeEnd(){return this.duration>=0&&this.timeDelta>=this.duration}findTargets(){const t=[],e=n=>{n.forEach(n=>{var i,r,o;n.cBhvr&&n.cBhvr.target&&t.findIndex(t=>t.id===n.cBhvr.target.id)<0&&t.push(n.cBhvr.target),(null===(r=null===(i=null==n?void 0:n.cBhvr)||void 0===i?void 0:i.ctn)||void 0===r?void 0:r.childTnLst)&&n.cBhvr.ctn.childTnLst.length>0&&e(n.cBhvr.ctn.childTnLst),(null===(o=null==n?void 0:n.ctn)||void 0===o?void 0:o.childTnLst)&&n.ctn.childTnLst.length>0&&e(n.ctn.childTnLst)})};return e(this.json.childTnLst||[]),t}setPreStyle(){this.json.presetClass&&this.findTargets().forEach(t=>{if(this.json.iterate){let e=0,n=!0;for(;n;){const i=this.ctx.timingTargets.getTarget(t,!0,{type:this.json.iterate.type,index:e,id:""});i&&(this.setPreStyleForTarget(i),e+=1),n=!!i}}else{const e=this.ctx.timingTargets.getTarget(t,!1);e&&this.setPreStyleForTarget(e)}})}setPreStyleForTarget(t){var e,n;if(t&&this.json.presetSubtype&&(t.presetSubType=this.json.presetSubtype),t&&!t.hasPreset)if("entr"===this.json.presetClass){const i=null===(n=null===(e=this.json)||void 0===e?void 0:e.childTnLst)||void 0===n?void 0:n.filter(t=>"set"===t.type&&"visible"===t.to);(null==i?void 0:i.length)&&(t.hasPreset=!0,t.style.visibility="hidden")}else("exit"===this.json.presetClass||"path"===this.json.presetClass)&&(t.hasPreset=!0,t.style.visibility="visible")}startTimeNodeRepeat(){this.timeDelta=0,this.isActive=!0,this.applyCount+=1,this.startTimeLine(!1),this.json.iterate||this.emit("timeNodeRepeat",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse})}startTimeNodeForce(){this.json.subTnLst&&this.createSubList(this.json.subTnLst),this.timeDelta=0,this.isActive=!0,this.handleActive(!1)}startTimeNode(t=!0){if(this.isDestroy)return;this.collectStartValue(),this.timeDelta=0,this.isReverse=!1,this.json.subTnLst&&this.createSubList(this.json.subTnLst),this.startConds.setTriggerParams(t);const e=this.json.stCondLst.filter(t=>/^self/.test(t.event||""))[0];e&&this.startConds.condHandle(e);const n=this.json.endCondLst.filter(t=>/^self/.test(t.event||""))[0];n&&this.endConds.condHandle(n),this.startConds.condHandle()}onTimeLineEnd(){this.dispose(),(0===this.children.length||this.json.iterate)&&this.allChildrenEndHandle()}clearSubList(){this.subList.forEach(t=>t.commonTimeNode.destroy())}seekToStart(t=!0){if(this.isEndEventsEmitted=!1,this.isActive=!1,this.dispose(),this.timeDelta=0,this.emit("seekToStart"),this.json.iterate&&!this.isIterate)return this.isIterateEnd=!0,void this.iterateShadows.forEach(e=>e.seekToStart(t));if(t)for(let t=this.subList.length-1;t>=0;t--){const e=this.subList[t];null==e||e.commonTimeNode.seekToStart()}for(let t=this.children.length-1;t>=0;t--){const e=this.children[t];null==e||e.commonTimeNode.seekToStart()}for(let t=this.children.length-1;t>=0;t--){const e=this.children[t];null==e||e.commonTimeNode.seekToStart()}}repeatTimeNodeEnd(){this.dispose(),this.children.forEach(t=>{t.commonTimeNode.isActive=!1,t.commonTimeNode.dispose()})}dispose(t=!1){this.isConflictDispose=t,this.ctx.clock.clearTimeout(this.repeatTimeoutId),this.ctx.eventHub.emit(YR.animateEnd);try{this.ctx.ticker.remove(this.updateTimeLine)}catch(t){}this.startConds.reset(),this.endConds.reset()}seekToEnd(t,e=!1){if(this.isInfiniteRepeat())return;!this.isActive&&this.applyCount<=0&&this.collectStartValue(),this.applyCount=this.json.repeatCount,this.json.autoRev&&(this.isReverse=!0),this.timeDelta=this.duration,this.isActive=!1,this.dispose();const n=this.json.autoRev||t;if(n?this.emit("seekToStart"):this.emit("seekToEnd"),this.json.iterate&&!this.isIterate)return this.isIterateEnd=!0,void this.iterateShadows.forEach(t=>t.seekToEnd(n,e));0===this.children.length&&(this.eventHubs.runtime.emit("runtime all end"),this.handleEnd()),this.children.forEach(t=>t.commonTimeNode.seekToEnd(n,e)),e&&this.json.subTnLst&&(this.subList.length<=0&&this.createSubList(this.json.subTnLst),this.subList.forEach(t=>t.commonTimeNode.seekToEnd(!1)),this.clearSubList())}isTimeNodeEndWhenDetectEndSync(){if(this.isInInteractiveSeq&&this.isInfiniteRepeat())return!0;let t=!0;return this.children.length>0&&(t=t&&this.children.every(t=>t.commonTimeNode.isTimeNodeEndWhenDetectEndSync())),this.json.repeatCount&&(t=t&&this.applyCount>=this.json.repeatCount),this.json.autoRev&&(t=t&&!this.isReverse),t=t&&this.isNatureTimeEnd(),!!this.isConflictDispose||(!(!this.isIterateEnd||!this.json.iterate)||t)}isTimeNodeEnd(){let t=!0;return this.children.length>0&&(t=t&&this.children.every(t=>t.commonTimeNode.isTimeNodeEnd())),this.json.repeatCount&&(t=t&&this.applyCount>=this.json.repeatCount),this.json.autoRev&&(t=t&&!this.isReverse),t=t&&this.isNatureTimeEnd(),!!this.isConflictDispose||(!(!this.isIterateEnd||!this.json.iterate)||t)}emitEndEvents(){this.isEndEventsEmitted||(this.isEndEventsEmitted=!0,this.eventHubs.global.emit(`time ${this.json.id} end`),this.eventHubs.global.emit(`time ${this.json.id} onEnd`),this.eventHubs.runtime.emit(`runtime ${this.json.id} end`),this.emit("timeNodeEnd",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}))}collectStartValue(){this.emit("timeNodeCreate"),this.children.forEach(t=>t.commonTimeNode.collectStartValue())}destroy(){this.emit("timeNodeDestroy"),this.isDestroy=!0,this.dispose(),this.startConds.removeAllListeners(),this.endConds.removeAllListeners(),this.children.forEach(t=>t.commonTimeNode.destroy()),this.clearSubList()}}class AR extends a.a{constructor(t){super(),this.isRunning=!1,this.runtimeNodeEventHub=new a.a;const{json:e,iterateType:n,isIterate:i,isSub:r,parent:o,ctx:s,eventHub:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:c}=t;this.id=e.ctn.id,this.json=e,this.ctx=s,this.isIterate=i,this.globalEventHub=l,this.commonTimeNode=new MR({json:e.ctn,isSub:r,eventHubs:{global:l,runtime:this.runtimeNodeEventHub},ctx:s,parent:o,isIterate:!1,iterateType:n,iterateIndex:u,iterateId:h,isInInteractiveSeq:c}),this.commonTimeNode.on("timeNodeStart",()=>{this.commonTimeNode.children.forEach(t=>{t.commonTimeNode.setReverse(this.commonTimeNode.getReverse()),t.commonTimeNode.startTimeNode()}),this.isRunning||(this.isRunning=!0,this.globalEventHub.emit(`runtime ${this.id} begin`),this.emit("begin"))}),this.commonTimeNode.on("timeNodeRepeat",()=>{this.commonTimeNode.children.forEach(t=>{t.commonTimeNode.startTimeNode(!1)})}),this.commonTimeNode.on("timeNodeEnd",()=>{this.commonTimeNode.isTimeNodeEnd()&&this.isRunning&&(this.isRunning=!1,this.globalEventHub.emit(`runtime ${this.id} end`),this.emit("end"))})}}var RR=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class PR{constructor(t,e,n){this.json=t,this.ctx=n,this.globalEventHub=e;const i=t.timeNodeList.find(t=>"par"===t.type&&"tmRoot"===t.ctn.nodeType);i&&(this.tmRoot=new AR({json:i,isSub:!1,isIterate:!1,eventHub:e,ctx:n,parent:null,iterateType:"el",iterateIndex:0,iterateId:"",isInInteractiveSeq:!1}),this.mainSeq=this.tmRoot.commonTimeNode.children.find(t=>{var e,n,i;return"seq"===(null===(e=t.json)||void 0===e?void 0:e.type)&&"mainSeq"===(null===(i=null===(n=t.json)||void 0===n?void 0:n.ctn)||void 0===i?void 0:i.nodeType)}))}findSeq(t){var e;return null===(e=this.tmRoot)||void 0===e?void 0:e.commonTimeNode.children.find(e=>{var n,i,r;return"seq"===(null===(n=e.json)||void 0===n?void 0:n.type)&&(null===(r=null===(i=e.json)||void 0===i?void 0:i.ctn)||void 0===r?void 0:r.id)===t})}start(){var t,e;return RR(this,void 0,void 0,(function*(){this.json.autoPlayMainSeq?(yield this.ctx.clock.delay(16),null===(t=this.mainSeq)||void 0===t||t.commonTimeNode.startTimeNode()):null===(e=this.mainSeq)||void 0===e||e.commonTimeNode.startTimeNode()}))}setMainSeqApplied(){this.mainSeq&&(this.mainSeq.commonTimeNode.applyCount=1)}collectMainSeqStartValue(){var t;null===(t=this.mainSeq)||void 0===t||t.commonTimeNode.collectStartValue()}setMainSeqStep(t,e){var n;-1===t&&this.mainSeq&&(this.mainSeq.commonTimeNode.applyCount=1),null===(n=this.mainSeq)||void 0===n||n.setCurrentStep(t,e)}destroy(){var t;this.globalEventHub.removeAllListeners(),null===(t=this.tmRoot)||void 0===t||t.commonTimeNode.destroy()}hasMainSeq(){return!!this.mainSeq&&this.mainSeq.commonTimeNode.children.length>0}currentMainSeqState(){return this.mainSeq?this.mainSeq.currentState:null}currentMainSeqStep(){return this.mainSeq?this.mainSeq.currentStep:0}currentMainSeqLength(){return this.mainSeq?this.mainSeq.stepLength:0}mainSeqHasNextStep(){return!!this.mainSeq&&this.mainSeq.hasNext()}mainSeqHasPrevStep(){return!!this.mainSeq&&this.mainSeq.hasPrev()}seekInteractiveSeqToEnd(t){const e=this.findSeq(t);e&&e.commonTimeNode.seekToEnd(!1,!0)}setInteractiveSeqState(t,e,n){const i=this.findSeq(t);i&&i.setCurrentStep(e,n)}resetAllInteractiveSeq(){var t;((null===(t=this.tmRoot)||void 0===t?void 0:t.commonTimeNode.children.filter(t=>{var e,n,i;return"seq"===(null===(e=t.json)||void 0===e?void 0:e.type)&&"interactiveSeq"===(null===(i=null===(n=t.json)||void 0===n?void 0:n.ctn)||void 0===i?void 0:i.nodeType)}))||[]).forEach(t=>{t.setCurrentStep(0,"start")})}applyInteractiveAction(t){this.globalEventHub.emit(t)}}var CR=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class IR extends JA{constructor(t,e,n,i){super({id:"stage",width:t.width,height:t.height,type:"Container",children:t.children},e,n,void 0,i),this.isRendered=!1,this.isTimingStartValueCollected=!1,this.globalEventHub=new a.a,this.json=t,e.hasBackgroundFillShape=this.detectUseBackgroundFill(this.json),this.container.visible=!1,this.ctx=e;const r=new Aw;r.beginFill(16777215),r.drawRect(0,0,t.width,t.height),r.endFill(),this.container.addChild(r)}detectUseBackgroundFill(t){return!!t&&("Picture"===t.type||"Shape"===t.type?t.useBgFill:!(!t.children||!Object(l.isArray)(t.children))&&t.children.some(t=>this.detectUseBackgroundFill(t)))}initOnReuse(){super.initOnReuse(),this.globalEventHub.on("c:prev slide",t=>{this.ctx.eventHub.emit(YR.requestPrevSlide,t)}),this.globalEventHub.on("c:next slide",t=>{this.ctx.eventHub.emit(YR.requestNextSlide,t)})}get interactiveContainer(){return this.container}render(t){this.isRendered||(this.isRendered=!0,super.render(t),t.addSubMTask(()=>CR(this,void 0,void 0,(function*(){this.ctx.eventHub.emit("StageRenderEnd")})),"@StageImpl[emit.StageRenderEnd]"))}createTiming(){this.json.timing&&!this.timing&&(this.timing=new PR(this.json.timing,this.globalEventHub,this.ctx))}startTiming(){var t;return(null===(t=this.timing)||void 0===t?void 0:t.start())||Promise.resolve()}setMainSeqApplied(){var t;null===(t=this.timing)||void 0===t||t.setMainSeqApplied()}setMainSeqStep(t,e){var n;null===(n=this.timing)||void 0===n||n.setMainSeqStep(t,e)}collectMainSeqStartValue(){var t;this.isTimingStartValueCollected||(this.isTimingStartValueCollected=!0,null===(t=this.timing)||void 0===t||t.collectMainSeqStartValue())}hasTiming(){return!!this.timing}clearOnSlideChange(){this.ctx.eventHub.removeAllListeners(),this.globalEventHub.removeAllListeners(),super.clearOnSlideChange()}clearOnTransactionEnd(){var t,e;this.ctx.timingTargets.getTargets().forEach(t=>{t.hasPreset=!1}),null===(t=this.timing)||void 0===t||t.resetAllInteractiveSeq(),null===(e=this.timing)||void 0===e||e.destroy(),this.timing=void 0}destroy(){var t,e;this.isTimingStartValueCollected=!1,this.isRendered=!1,this.ctx.eventHub.removeAllListeners(),this.ctx.graphicsTexture.destroy(),null===(t=this.ctx.bgTexture)||void 0===t||t.destroy(!0),this.ctx.spriteTexture.destroy(),this.globalEventHub.removeAllListeners(),null===(e=this.timing)||void 0===e||e.destroy(),this.timing=void 0,super.destroy()}mainSeqStep(){var t,e;return null!==(e=null===(t=this.timing)||void 0===t?void 0:t.currentMainSeqStep())&&void 0!==e?e:0}mainSeqLength(){var t,e;return null!==(e=null===(t=this.timing)||void 0===t?void 0:t.currentMainSeqLength())&&void 0!==e?e:0}mainSeqHasNextStep(){var t,e;return null!==(e=null===(t=this.timing)||void 0===t?void 0:t.mainSeqHasNextStep())&&void 0!==e&&e}mainSeqHasPrevStep(){var t,e;return null!==(e=null===(t=this.timing)||void 0===t?void 0:t.mainSeqHasPrevStep())&&void 0!==e&&e}mainSeqState(){return this.timing?this.timing.currentMainSeqState():null}nextStep(t=!1){var e;this.hasTiming()&&(null===(e=this.timing)||void 0===e?void 0:e.hasMainSeq())?(this.globalEventHub.emit("shape slide onStopAudio"),this.globalEventHub.emit("shape slide onNext",t)):this.ctx.eventHub.emit(YR.requestNextSlide,t)}prevStep(t=!1){var e;this.hasTiming()&&(null===(e=this.timing)||void 0===e?void 0:e.hasMainSeq())?(this.globalEventHub.emit("shape slide onStopAudio"),this.globalEventHub.emit("shape slide onPrev",t)):this.ctx.eventHub.emit(YR.requestPrevSlide,t)}applyInteractiveAction(t){var e;null===(e=this.timing)||void 0===e||e.applyInteractiveAction(t)}seekInteractiveSeqToEnd(t){var e;null===(e=this.timing)||void 0===e||e.seekInteractiveSeqToEnd(t)}setInteractiveSeqState(t,e,n){var i;null===(i=this.timing)||void 0===i||i.setInteractiveSeqState(t,e,n)}setMediaState(t,e){return CR(this,void 0,void 0,(function*(){const n=this.ctx.medias[t];n&&(e?yield n.play():yield n.pause())}))}setMediaCurrentTime(t,e){const n=this.ctx.medias[t];n&&n.seek(e)}}class OR{constructor(t){this.ticker=t,this.tasks=[],this.couldRunning=!1,this.applyNext=()=>{const t=this.tasks[0];t&&t.applyNext()},t.add(this.applyNext)}addTask(t){this.tasks.push(t),t.once("task-finish",()=>{const e=this.tasks.indexOf(t);e>=0&&this.tasks.splice(e,1)}),t.once("task-error",()=>{const e=this.tasks.indexOf(t);e>=0&&this.tasks.splice(e,1)})}start(){this.couldRunning=!0}stop(){this.couldRunning=!1}}var LR=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};const NR=t=>new Promise(e=>setTimeout(e,t));class DR extends a.a{constructor(t,e,n){super(),this.slideIndex=t,this.taskId=e,this.logger=n,this.uuid=eM(),this.isCancel=!1,this.tasks=[]}addMTask(t,e){this.tasks.push({fn:t,state:"wait",sub:[],name:e})}addSubMTask(t,e){let n=this.tasks.findIndex(t=>"running"===t.state);n<0&&(n=0),this.tasks[n].sub.push({fn:t,state:"wait",sub:[],name:e})}cancel(){this.tasks=[],this.isCancel=!0}applyNext(){if(this.tasks.some(t=>"running"===t.state))return;if(this.tasks.some(t=>"error"===t.state))return;if(this.tasks.every(t=>"finish"===t.state))return void(this.isCancel||this.emit("task-finish"));const t=this.tasks.find(t=>"wait"===t.state);t&&(t.state="running",t.fn.apply(null).then(()=>{if(t.state="finish",t.sub.length>0){const e=this.tasks.findIndex(e=>e===t);this.tasks.splice(e+1,0,...t.sub)}}).catch(e=>{t.state="error",this.logger.error(`${e} ${e.stack}`,this.taskId),this.emit("task-error",qE.transform(e),this.slideIndex)}))}applyAll(){return LR(this,void 0,void 0,(function*(){for(;!this.tasks.every(t=>"finish"===t.state);)if(this.tasks.some(t=>"running"===t.state))yield NR(16);else{if(this.tasks.some(t=>"error"===t.state))return;{const t=this.tasks.find(t=>"wait"===t.state);if(t){t.state="running";try{if((yield iM(()=>t.fn.apply(null),6e4))===nM)throw new qE(VE.RuntimeError,`subtask ${t.name} apply timeout`);if(t.state="finish",t.sub.length>0){const e=this.tasks.findIndex(e=>e===t);this.tasks.splice(e+1,0,...t.sub)}}catch(e){let n;n=e.errorType?e:new qE(VE.RuntimeError,`subtask ${t.name} error. ${e}`),t.state="error",this.logger.error(`${e} ${e.stack}`,this.taskId),this.emit("task-error",qE.transform(n),this.slideIndex);break}}}}this.isCancel||this.emit("task-finish")}))}}var FR=n(53);const BR=new(n.n(FR).a),UR=BR.getDevice(),kR=BR.getBrowser(),GR=BR.getOS(),HR={isDesktop(){let t=!0;return"mobile"===UR.type&&(t=!1),/Samsung/.test(kR.name||"")&&(t=!1),window.__nativeTags&&window.__nativeTags.platform&&(t=!1),t},isIOS(){let t=!1;return window.__nativeTags&&window.__nativeTags.platform&&/^ios/i.test(window.__nativeTags.platform)&&(t=!0),GR.name&&/iOS/.test(GR.name)&&(t=!0),t},isAndroid(){let t=!1;return window.__nativeTags&&window.__nativeTags.platform&&/^android/i.test(window.__nativeTags.platform)&&(t=!0),GR.name&&/android/i.test(GR.name)&&(t=!0),t},isLowGpuMemory(){var t,e;const n=null!==(e=null===(t=window.__nativeTags)||void 0===t?void 0:t.platform)&&void 0!==e?e:"";if(n){const t=n.split(" ");if(t[1]){if(/^iPad/.test(t[1])){const e=t[1].match(/^iPad(\d+)/);return!(e&&e[1]&&parseInt(e[1],10)>=6)}if(/^iPhone/.test(t[1])){const e=t[1].match(/^iPhone(\d+)/);return!(e&&e[1]&&parseInt(e[1],10)>=9)}return!1}return!1}return!0}};var zR=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class jR{constructor(t,e,n,i,r,o,s,a,l,u,h){this.loader=t,this.mode=e,this.renderer=n,this.ticker=i,this.view=r,this.clock=o,this.objPoolGroup=s,this.errorChannel=a,this.localstorage=l,this.logger=u,this.loaderDelegate=h,this.currentStageIndex=0,this.cacheCount=HR.isDesktop()?2:1,this.stageStates=Object.create(null),this.stageJsons=Object.create(null),this.stageCtxs=Object.create(null),this.stageImpls=Object.create(null),this.taskId="",this.url="",this.runningAudio=new Map,this.microTaskManager=new OR(i)}setResourceData(t,e){this.taskId=t,this.url=e}createCtx(t){const{task:e}=this.stageStates[t];e.addMTask(()=>zR(this,void 0,void 0,(function*(){const e=new hM(this.loader),n=new a.a,i={taskId:this.taskId,mode:this.mode,renderer:this.renderer,graphicsTexture:new yM,stageWidth:0,stageHeight:0,ticker:this.ticker,timingTargets:new bM(n),eventHub:n,view:this.view,medias:Object.create(null),lastViewedIndex:0,conflictTimeNodeManager:new xM,clock:this.clock,spriteTexture:e,slideIndex:t,objectPoolGroup:this.objPoolGroup,hasBackgroundFillShape:!1,slideScopeEventHub:new a.a,logger:this.logger,loaderDelegate:this.loaderDelegate,runningAudio:this.runningAudio};this.stageCtxs[t]=i})),"@StagePool[createCtx]")}loadStageJson(t){const{task:e}=this.stageStates[t];e.addMTask(()=>zR(this,void 0,void 0,(function*(){const e=yield this.loader.fetchJson(`${this.url}/${this.taskId}/jsonOutput/slide-${t}.json`);this.stageJsons[t]=e,this.stageCtxs[t].stageWidth=e.width,this.stageCtxs[t].stageHeight=e.height})),"@StagePool[loadStageJson]")}loadSpriteSheets(t){const{task:e}=this.stageStates[t];e.addMTask(()=>{const n=this.stageJsons[t],{spriteTexture:i}=this.stageCtxs[t],{coloredSheets:r,sheets:o}=n,s=r||o;return s&&s.forEach(t=>{e.addSubMTask(()=>i.loadSpriteSheetItem(this.url,this.taskId,t),"@StagePool[spriteTexture.loadSpriteSheetItem]")}),Promise.resolve()},"@StagePool[loadSpriteSheets]")}createStage(t){const{task:e}=this.stageStates[t];e.addMTask(()=>{const n=this.stageJsons[t],i=this.stageCtxs[t],r=new IR(n,i,{x:0,y:0},e);return this.stageImpls[t]=r,Promise.resolve()},"@StagePool[createStage]")}preRenderStage(t){const{task:e}=this.stageStates[t];e.addMTask(()=>(this.stageImpls[t].preRender(e),Promise.resolve()),"@StagePool[preRenderStage]")}createGraphicsTexture(t){const{task:e}=this.stageStates[t];e.addMTask(()=>zR(this,void 0,void 0,(function*(){const n=this.stageCtxs[t];n.graphicsTexture.pack().forEach((t,i)=>{e.addSubMTask(()=>n.graphicsTexture.render(t,i,this.objPoolGroup),"@StagePool[graphicsTexture.render]")})})),"@StagePool[createGraphicsTexture]")}renderStage(t){const{task:e}=this.stageStates[t];e.addMTask(()=>zR(this,void 0,void 0,(function*(){const n=this.stageImpls[t],i=this.stageCtxs[t];yield n.render(e),e.addSubMTask(()=>zR(this,void 0,void 0,(function*(){var e;const r=`snapshot-${t.toString()}-start`;if(!(yield null===(e=this.localstorage)||void 0===e?void 0:e.getItem(r))&&ZR.platform.isLowGpuMemory()){n.createTiming(),n.container.visible=!0,n.collectMainSeqStartValue(),n.setMainSeqStep(0,"start");const t=Hy.create({width:n.json.width,height:n.json.height,resolution:1});i.renderer.render(n.container,{renderTexture:t});const e=i.renderer.plugins.extract.base64(t,"image/jpeg");this.localstorage.setItem(r,e,!0).catch(()=>{}),n.container.visible=!1,t.destroy(),n.timing&&(n.timing.destroy(),n.timing=void 0)}})),"@StagePool[snapshot]")})),"@StagePool[renderStage]")}destroyStageByIndex(t){"load"===this.stageStates[t].state&&this.stageStates[t].task.cancel(),delete this.stageStates[t];this.stageImpls[t].destroy(),delete this.stageImpls[t],delete this.stageCtxs[t]}destroyStage(){Object.keys(this.stageImpls).forEach(t=>{const e=parseInt(t,10);Math.abs(this.currentStageIndex-e)>this.cacheCount&&this.destroyStageByIndex(e)})}destroyAllStage(){Object.keys(this.stageImpls).forEach(t=>{const e=parseInt(t,10);this.destroyStageByIndex(e)})}preload(t,e=!1){if(this.stageImpls[t]||this.stageStates[t])return Promise.resolve();const n=new DR(t,this.taskId,this.logger);return n.on("task-error",(t,e)=>{delete this.stageStates[e],delete this.stageImpls[e],delete this.stageCtxs[e],this.errorChannel.emit("error",t,e)}),this.stageStates[t]={state:"load",task:n},this.createCtx(t),this.loadStageJson(t),this.loadSpriteSheets(t),this.createStage(t),this.preRenderStage(t),this.createGraphicsTexture(t),this.renderStage(t),this.microTaskManager.addTask(n),e?n.applyAll():new Promise(e=>{n.once("task-finish",()=>{this.stageStates[t].state="finish";Object.keys(this.stageStates).length>2*this.cacheCount+1&&this.destroyStage(),e()})})}getStageJson(t){return this.stageJsons[t]||null}getStage(t){return zR(this,void 0,void 0,(function*(){this.currentStageIndex=t;const e=this.stageStates[t];return"finish"===(null==e?void 0:e.state)&&this.stageImpls[t]?this.stageImpls[t]:"load"===(null==e?void 0:e.state)?(yield e.task.applyAll(),this.stageImpls[t]):(yield this.preload(t,!0),this.stageImpls[t])}))}destroy(){this.runningAudio.clear()}}var VR=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};o.config({storeName:"slide_local_cache"});class WR{constructor(t){this.logger=t,this.taskId="",this.isIndexDBReady=!1,this.memoryCache=new Map,o.ready(()=>{this.isIndexDBReady=!0}).catch(()=>{t.warn("local storage not ready",this.taskId)})}get couldUseIndexDBCache(){return this.isIndexDBReady&&this.taskId.length>0}attachTaskId(t){this.taskId=t}getItem(t){return VR(this,void 0,void 0,(function*(){let e=null;return this.couldUseIndexDBCache&&(e=yield iM(()=>o.getItem(`${this.taskId}/${t}`),500)),e=e===nM?null:e,e||this.memoryCache.get(t)||null}))}setItem(t,e,n=!1){return VR(this,void 0,void 0,(function*(){if(!this.couldUseIndexDBCache)return n&&this.memoryCache.set(t,e),Promise.resolve();(yield iM(()=>o.setItem(`${this.taskId}/${t}`,e).catch(()=>{n&&this.memoryCache.set(t,e)}),500))===nM&&n&&this.memoryCache.set(t,e)}))}dispose(){this.memoryCache=new Map,this.couldUseIndexDBCache&&o.keys().then(t=>{t.filter(t=>t.indexOf(this.taskId)>=0).forEach(t=>{o.removeItem(t).catch(()=>{})})})}}var XR=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};r.skipHello();const qR={randomBar:"RandomLines",circle:"Shape",ripple:"Ripples",wipe:"Erase",dissolve:"Dissolve",morph:"Smooth",fade:"FadeInOut",push:"Push",split:"Separation",reveal:"Display",pull:"Uncover",cover:"Cover",flash:"Flash",checker:"Checkerboard",blinds:"WindowShades",curtains:"Curtain",fallOver:"Fall",drape:"Suspension",wheel:"Clock",comb:"Combing",warp:"Scale",peelOff:"PeelOff",flip:"Flip"},YR={mainSeqStepChange:"mainSeqStepChange",mainSeqStateChange:"mainSeqStateChange",interactiveSeqStateChange:"interactiveSeqStateChange",interactiveSeqAction:"interactiveSeqAction",mainSeqStepStart:"mainSeqStepStart",mainSeqStepEnd:"mainSeqStepEnd",slideChange:"slideChange",renderStart:"renderStart",renderEnd:"renderEnd",hyperlinkTrigger:"hyperlinkTrigger",animateStart:"animateStart",animateEnd:"animateEnd",mediaSeek:"mediaSeek",mediaPlay:"mediaPlay",mediaPause:"mediaPause",requestNextSlide:"requestNextSlide",requestPrevSlide:"requestPrevSlide",requestGotoSlide:"requestGotoSlide",userInput:"userInput"};class ZR extends a.a{constructor(t,e={}){super(),this.errorChannel=new a.a,this.transactionPlayer=null,this.transactionSprite=new Ow,this.isForward=!0,this.drawCall=0,this.scale=1,this.prevSlideBase64=null,this.fps=new XE,this.designWidth=0,this.designHeight=0,this.currentIndex=0,this.slideCount=0,this.runtime={drawCall:0,fps:0},this.onWebGLLost=()=>{this.errorChannel.emit("error",new qE(VE.CanvasCrash,"webgl context lost."))},this.logger=t.logger,this.mode=t.mode,this.localStorage=new WR(this.logger);let n=Math.max(window.devicePixelRatio,2);HR.isDesktop()||(n=1),this.config={minFPS:Object(l.isUndefined)(e.minFPS)?30:e.minFPS,maxFPS:Object(l.isUndefined)(e.maxFPS)?40:e.maxFPS,resolution:Object(l.isUndefined)(e.resolution)?n:e.resolution,autoFPS:!Object(l.isUndefined)(e.autoFPS)&&e.autoFPS,autoResolution:!Object(l.isUndefined)(e.autoResolution)&&e.autoResolution,transactionBgColor:Object(l.isUndefined)(e.transactionBgColor)?0:e.transactionBgColor},this.loader=new sM(this.localStorage,t.useLocalCache,this.logger,t.resourceTimeout,t.loadDelegate),this.app=new Lb({antialias:!0,autoDensity:!1,backgroundColor:16777215}),this.updateConfig(this.config),this.app.view.style.zIndex="1",this.app.stage.sortableChildren=!0;const i=this.app.renderer,{drawElements:r}=i.gl;i.gl.drawElements=(...t)=>{r.call(i.gl,...t),this.drawCall+=1},this.fps.on("update",t=>{if(t<this.config.minFPS){if(this.config.autoResolution){const t=.7*this.scale,e=this.app.renderer.resolution,n=Math.max(t,e-.1);n>=t&&this.updateResolution(n)}if(this.config.autoFPS){const t=14,{minFPS:e,maxFPS:n}=this.app.ticker,i=Math.max(t,e-2),r=Math.max(t,n-2);i>=t&&r>=t&&(this.app.ticker.minFPS=i,this.app.ticker.maxFPS=r)}}else if(t>this.config.maxFPS){if(this.config.autoResolution){const t=this.scale*this.config.resolution,e=this.app.renderer.resolution,n=Math.min(t,e+.1);n<=this.config.resolution&&this.updateResolution(n)}if(this.config.autoFPS){const t=this.config.minFPS,e=this.config.maxFPS,{minFPS:n,maxFPS:i}=this.app.ticker,r=Math.min(t,n+2),o=Math.min(e,i+2);r<=t&&o<=e&&(this.app.ticker.minFPS=r,this.app.ticker.maxFPS=o)}}}),this.app.ticker.add(()=>{this.runtime.drawCall=this.drawCall,this.runtime.fps=Math.floor(this.app.ticker.minFPS),this.drawCall=0},null,ey.LOW),this.clock=new lM(this.app.ticker),this.objPoolGroup=eM(),this.stagePool=new jR(this.loader,this.mode,this.app.renderer,this.app.ticker,this.app.view,this.clock,this.objPoolGroup,this.errorChannel,this.localStorage,this.logger,t.loadDelegate),this.app.view.addEventListener("webglcontextlost",this.onWebGLLost);try{this.transactionPlayer=new og}catch(t){/Error creating WebGL context/.test(t.message)?this.errorChannel.emit("error",new qE(VE.CanvasCrash,"webgl context lost.")):this.errorChannel.emit("error",new qE(VE.RuntimeWarn,t.message))}}get view(){return this.app.renderer?this.app.view:null}get nextSlideIndex(){var t;return(null===(t=this.currentStage)||void 0===t?void 0:t.json.nextIndex)?this.currentStage.json.nextIndex:this.currentIndex+1}get prevSlideIndex(){var t;return(null===(t=this.currentStage)||void 0===t?void 0:t.json.prevIndex)?this.currentStage.json.prevIndex:this.currentIndex-1}updateConfig(t){Object(l.isUndefined)(t.minFPS)||(this.config.minFPS=t.minFPS,this.app.ticker.minFPS=t.minFPS),Object(l.isUndefined)(t.maxFPS)||(this.config.maxFPS=t.maxFPS,this.app.ticker.maxFPS=t.maxFPS),Object(l.isUndefined)(t.resolution)||(this.config.resolution=t.resolution,this.updateResolution(this.scale*this.config.resolution)),Object(l.isUndefined)(t.autoFPS)||(this.config.autoFPS=t.autoFPS),Object(l.isUndefined)(t.autoResolution)||(this.config.autoResolution=t.autoResolution),Object(l.isUndefined)(t.transactionBgColor)||(this.config.transactionBgColor=t.transactionBgColor),this.taskId&&this.logger.info("ppt player update config: "+JSON.stringify(this.config),this.taskId)}preload(t){return XR(this,void 0,void 0,(function*(){t<1||t>this.slideCount||(this.logger.info(`preload slide ${t} begin`,this.taskId),yield this.stagePool.preload(t),this.logger.info(`preload slide ${t} end`,this.taskId))}))}setResourceData(t,e){this.logger.info("ppt player init config: "+JSON.stringify(this.config),t),this.logger.info("set resource to "+e,t),this.taskId=t,this.url=e,this.stagePool.setResourceData(t,e),this.localStorage.attachTaskId(t),this.loader.attachTaskId(t)}setInteractive(t){this.app.stage.interactive=t,this.app.stage.interactiveChildren=t}translateEvent(t,e){e.forEach(e=>{t.on(e,(...t)=>{this.emit(e,...t)})})}renderSlide(t,e=!1){var n;return XR(this,void 0,void 0,(function*(){this.logger.info("render slide "+t,this.taskId),this.emit(YR.renderStart,t);const i=yield this.stagePool.getStage(t);if(!i)return;this.translateEvent(i.ctx.eventHub,[YR.mainSeqStepChange,YR.mainSeqStateChange,YR.hyperlinkTrigger,YR.interactiveSeqAction,YR.mainSeqStepStart,YR.mainSeqStepEnd,YR.animateStart,YR.animateEnd,YR.mediaPlay,YR.mediaPause,YR.mediaSeek,YR.requestGotoSlide,YR.requestNextSlide,YR.requestPrevSlide,YR.interactiveSeqStateChange,YR.userInput]),this.currentIndex=Number(t);const{width:r,height:o,slideCount:s}=i.json;this.slideCount=s,this.designWidth=r,this.designHeight=o,i.json.transition&&i.json.transition.type&&!this.prevSlideBase64&&this.currentStage&&(this.prevSlideBase64=this.getBase64(this.currentStage)),null===(n=this.currentStage)||void 0===n||n.clearOnSlideChange();const a=this.currentStage;this.currentStage=i,i.initOnReuse(),i.createTiming(),i.container.visible=!0,i.collectMainSeqStartValue(),this.isForward?i.setMainSeqStep(0,"start"):i.setMainSeqStep(-1,"end");let l=null;if(i.json.transition&&i.json.transition.type){const n=t.toString()+(this.isForward||e?"-start":"-end"),i=yield this.localStorage.getItem("snapshot-"+n);l=i||this.getBase64(this.currentStage)}i.container.visible=!1,this.app.stage.addChild(i.container);let{transition:u}=i.json;!this.isForward&&(null==a?void 0:a.json.transition)&&(u=a.json.transition),this.prevSlideBase64&&l&&u&&u.type&&a&&i&&(yield this.playTransaction(this.prevSlideBase64,l,u,a,i),this.prevSlideBase64=null),this.isForward?yield i.startTiming():i.setMainSeqApplied(),this.updateResolution(this.config.resolution*this.scale),i.container.visible=!0,a&&(a.setMainSeqStep(0,"start"),a.clearOnTransactionEnd(),this.app.stage.removeChild(a.container)),i.ctx.slideScopeEventHub.emit("slide-render",i.ctx.slideIndex),this.emit(YR.renderEnd,t),this.emit(YR.slideChange,t),this.preload(t+1).catch(e=>{this.errorChannel.emit("error",qE.transform(e),t+1)}),this.preload(t-1).catch(e=>{this.errorChannel.emit("error",qE.transform(e),t-1)})}))}getBase64(t){if(!t.container.transform)return null;const e=Hy.create({width:this.designWidth,height:this.designHeight,resolution:1});this.app.renderer.render(t.container,{renderTexture:e});const n=this.app.renderer.plugins.extract.base64(e,"image/jpeg");return e.destroy(!0),n}playTransaction(t,e,n,i,r){return XR(this,void 0,void 0,(function*(){const o=this.app.view.parentElement;if(t&&e&&o&&qR[n.type]&&this.transactionPlayer){this.transactionSprite.zIndex=999,this.transactionSprite.visible=!1,this.app.stage.addChild(this.transactionSprite);const o=this.transactionPlayer.renderer.domElement,s=ky.from(o),a=()=>s.update();return this.app.ticker.add(a),this.transactionSprite.texture=s,setTimeout(()=>{this.transactionSprite.visible=!0},100),new Promise(o=>{var s,l,u,h;null===(s=this.transactionPlayer)||void 0===s||s.play({reverse:!this.isForward,prevTextureUrl:t,nextTextureUrl:e,textureWidth:this.designWidth,textureHeight:this.designHeight,presetType:qR[n.type],stageWidth:this.designWidth,stageHeight:this.designHeight,duration:null===(u=null===(l=this.currentStage)||void 0===l?void 0:l.json.transition)||void 0===u?void 0:u.dur,delay:0,clearColor:this.config.transactionBgColor,maxFPS:Math.ceil(null!==(h=this.config.maxFPS)&&void 0!==h?h:60),onTransactionEnd:()=>{var t,e;o(),i.container.visible=!1,r.container.visible=!0,null===(t=this.app.stage)||void 0===t||t.removeChild(this.transactionSprite),null===(e=this.app.ticker)||void 0===e||e.remove(a)}})})}return Promise.resolve()}))}scaleView(t,e=!1){if(this.view&&(this.view.style.width=Math.floor(this.designWidth*t)+"px",this.view.style.height=Math.floor(this.designHeight*t)+"px"),e){this.scale=t;const e=this.scale*this.config.resolution;this.updateResolution(e)}}updateResolution(t){this.app.ticker.addOnce(()=>{let e=HR.isDesktop()?t:1;for(;e*this.designWidth>5120||e*this.designHeight>5120;)e-=.1;this.app.renderer.resolution=e,this.app.renderer.plugins.interaction.resolution=this.app.renderer.resolution,this.app.renderer.resize(this.designWidth,this.designHeight)})}nextStep(t=!1){var e;this.logger.info("ppt play trigger next step",this.taskId);try{null===(e=this.currentStage)||void 0===e||e.nextStep(t)}catch(t){this.errorChannel.emit("error",qE.transform(t),this.currentIndex)}}prevStep(t=!1){var e;this.logger.info("ppt play trigger prev step",this.taskId);try{null===(e=this.currentStage)||void 0===e||e.prevStep(t)}catch(t){this.errorChannel.emit("error",qE.transform(t),this.currentIndex)}}mainSeqLength(){var t,e;return null!==(e=null===(t=this.currentStage)||void 0===t?void 0:t.mainSeqLength())&&void 0!==e?e:0}mainSeqStep(){var t,e;return null!==(e=null===(t=this.currentStage)||void 0===t?void 0:t.mainSeqStep())&&void 0!==e?e:0}setMainSeqStep(t,e){var n;null===(n=this.currentStage)||void 0===n||n.setMainSeqStep(t,e)}mainSeqState(){var t,e;return null!==(e=null===(t=this.currentStage)||void 0===t?void 0:t.mainSeqState())&&void 0!==e?e:null}mainSeqHasNextStep(){var t,e;return null!==(e=null===(t=this.currentStage)||void 0===t?void 0:t.mainSeqHasNextStep())&&void 0!==e&&e}mainSeqHasPrevStep(){var t,e;return null!==(e=null===(t=this.currentStage)||void 0===t?void 0:t.mainSeqHasPrevStep())&&void 0!==e&&e}nextTick(t){this.app.ticker.addOnce(()=>{t()},ey.LOW)}applyInteractiveAction(t){var e;null===(e=this.currentStage)||void 0===e||e.applyInteractiveAction(t)}seekInteractiveSeqToEnd(t){var e;null===(e=this.currentStage)||void 0===e||e.seekInteractiveSeqToEnd(t)}setInteractiveSeqState(t,e,n){var i;null===(i=this.currentStage)||void 0===i||i.setInteractiveSeqState(t,e,n)}setMediaState(t,e){var n;return XR(this,void 0,void 0,(function*(){yield null===(n=this.currentStage)||void 0===n?void 0:n.setMediaState(t,e)}))}setMediaCurrentTime(t,e){var n;null===(n=this.currentStage)||void 0===n||n.setMediaCurrentTime(t,e)}pause(){this.app.ticker.stop()}resume(){this.app.ticker.start()}getSnapshot(){return this.currentStage&&this.getBase64(this.currentStage)||""}createSnapshotForNextSlide(t){return XR(this,void 0,void 0,(function*(){const e=this.nextSlideIndex,n=this.stagePool.getStageJson(e);if(n&&n.transition&&n.transition.type&&this.currentStage&&this.transactionPlayer){const e=t?`snapshot-${this.currentStage.json.index}-start`:`snapshot-${this.currentStage.json.index}-end`;if(this.currentStage.timing&&(t?this.currentStage.timing.mainSeqHasPrevStep():this.currentStage.timing.mainSeqHasNextStep()))this.prevSlideBase64=this.getBase64(this.currentStage);else{const t=yield this.localStorage.getItem(e);t?this.prevSlideBase64=t:(this.prevSlideBase64=this.getBase64(this.currentStage),this.localStorage.setItem(e,this.prevSlideBase64,!0).catch(()=>{}))}}}))}clearLocalCache(){this.localStorage.dispose()}static clearLocalCache(){o.clear()}destroy(){var t;try{this.app.view.removeEventListener("webglcontextlost",this.onWebGLLost);try{this.app.renderer.filter.texturePool.clear(!0)}catch(t){}gM.collectObjectByGroup(this.objPoolGroup),vM.collectObjectByGroup(this.objPoolGroup),null===(t=this.transactionPlayer)||void 0===t||t.destroy(),this.loader.destroy(),this.fps.destroy(),this.stagePool.destroyAllStage(),this.stagePool.destroy();try{this.app.renderer.gl.getExtension("WEBGL_lose_context").loseContext()}catch(t){}this.app.destroy(!0,{children:!0,texture:!0,baseTexture:!0})}catch(t){}}}ZR.platform=HR,ZR.RtcAudioClazz=null;var JR,KR=[],$R="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(JR||(JR={}));var QR,tP=function(t){return Object.freeze(t)},eP=function(t,e){this.inlineSize=t,this.blockSize=e,tP(this)},nP=function(){function t(t,e,n,i){return this.x=t,this.y=e,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,tP(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),iP=function(t){return t instanceof SVGElement&&"getBBox"in t},rP=function(t){if(iP(t)){var e=t.getBBox(),n=e.width,i=e.height;return!n&&!i}var r=t,o=r.offsetWidth,s=r.offsetHeight;return!(o||s||t.getClientRects().length)},oP=function(t){var e,n;if(t instanceof Element)return!0;var i=null===(n=null===(e=t)||void 0===e?void 0:e.ownerDocument)||void 0===n?void 0:n.defaultView;return!!(i&&t instanceof i.Element)},sP="undefined"!=typeof window?window:{},aP=new WeakMap,lP=/auto|scroll/,uP=/^tb|vertical/,hP=/msie|trident/i.test(sP.navigator&&sP.navigator.userAgent),cP=function(t){return parseFloat(t||"0")},dP=function(t,e,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=!1),new eP((n?e:t)||0,(n?t:e)||0)},pP=tP({devicePixelContentBoxSize:dP(),borderBoxSize:dP(),contentBoxSize:dP(),contentRect:new nP(0,0,0,0)}),fP=function(t,e){if(void 0===e&&(e=!1),aP.has(t)&&!e)return aP.get(t);if(rP(t))return aP.set(t,pP),pP;var n=getComputedStyle(t),i=iP(t)&&t.ownerSVGElement&&t.getBBox(),r=!hP&&"border-box"===n.boxSizing,o=uP.test(n.writingMode||""),s=!i&&lP.test(n.overflowY||""),a=!i&&lP.test(n.overflowX||""),l=i?0:cP(n.paddingTop),u=i?0:cP(n.paddingRight),h=i?0:cP(n.paddingBottom),c=i?0:cP(n.paddingLeft),d=i?0:cP(n.borderTopWidth),p=i?0:cP(n.borderRightWidth),f=i?0:cP(n.borderBottomWidth),m=c+u,g=l+h,v=(i?0:cP(n.borderLeftWidth))+p,_=d+f,y=a?t.offsetHeight-_-t.clientHeight:0,x=s?t.offsetWidth-v-t.clientWidth:0,b=r?m+v:0,T=r?g+_:0,w=i?i.width:cP(n.width)-b-x,S=i?i.height:cP(n.height)-T-y,E=w+m+x+v,M=S+g+y+_,A=tP({devicePixelContentBoxSize:dP(Math.round(w*devicePixelRatio),Math.round(S*devicePixelRatio),o),borderBoxSize:dP(E,M,o),contentBoxSize:dP(w,S,o),contentRect:new nP(c,l,w,S)});return aP.set(t,A),A},mP=function(t,e,n){var i=fP(t,n),r=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(e){case JR.DEVICE_PIXEL_CONTENT_BOX:return s;case JR.BORDER_BOX:return r;default:return o}},gP=function(t){var e=fP(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=tP([e.borderBoxSize]),this.contentBoxSize=tP([e.contentBoxSize]),this.devicePixelContentBoxSize=tP([e.devicePixelContentBoxSize])},vP=function(t){if(rP(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},_P=function(){var t=1/0,e=[];KR.forEach((function(n){if(0!==n.activeTargets.length){var i=[];n.activeTargets.forEach((function(e){var n=new gP(e.target),r=vP(e.target);i.push(n),e.lastReportedSize=mP(e.target,e.observedBox),r<t&&(t=r)})),e.push((function(){n.callback.call(n.observer,i,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,i=e;n<i.length;n++){(0,i[n])()}return t},yP=function(t){KR.forEach((function(e){e.activeTargets.splice(0,e.activeTargets.length),e.skippedTargets.splice(0,e.skippedTargets.length),e.observationTargets.forEach((function(n){n.isActive()&&(vP(n.target)>t?e.activeTargets.push(n):e.skippedTargets.push(n))}))}))},xP=function(){var t,e=0;for(yP(e);KR.some((function(t){return t.activeTargets.length>0}));)e=_P(),yP(e);return KR.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:$R}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=$R),window.dispatchEvent(t)),e>0},bP=[],TP=function(t){if(!QR){var e=0,n=document.createTextNode("");new MutationObserver((function(){return bP.splice(0).forEach((function(t){return t()}))})).observe(n,{characterData:!0}),QR=function(){n.textContent=""+(e?e--:e++)}}bP.push(t),QR()},wP=0,SP={attributes:!0,characterData:!0,childList:!0,subtree:!0},EP=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],MP=function(t){return void 0===t&&(t=0),Date.now()+t},AP=!1,RP=new(function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var e=this;if(void 0===t&&(t=250),!AP){AP=!0;var n,i=MP(t);n=function(){var n=!1;try{n=xP()}finally{if(AP=!1,t=i-MP(),!wP)return;n?e.run(1e3):t>0?e.run(t):e.start()}},TP((function(){requestAnimationFrame(n)}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,SP)};document.body?e():sP.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),EP.forEach((function(e){return sP.addEventListener(e,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),EP.forEach((function(e){return sP.removeEventListener(e,t.listener,!0)})),this.stopped=!0)},t}()),PP=function(t){!wP&&t>0&&RP.start(),!(wP+=t)&&RP.stop()},CP=function(){function t(t,e){this.target=t,this.observedBox=e||JR.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=mP(this.target,this.observedBox,!0);return t=this.target,iP(t)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),IP=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},OP=new WeakMap,LP=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},NP=function(){function t(){}return t.connect=function(t,e){var n=new IP(t,e);OP.set(t,n)},t.observe=function(t,e,n){var i=OP.get(t),r=0===i.observationTargets.length;LP(i.observationTargets,e)<0&&(r&&KR.push(i),i.observationTargets.push(new CP(e,n&&n.box)),PP(1),RP.schedule())},t.unobserve=function(t,e){var n=OP.get(t),i=LP(n.observationTargets,e),r=1===n.observationTargets.length;i>=0&&(r&&KR.splice(KR.indexOf(n),1),n.observationTargets.splice(i,1),PP(-1))},t.disconnect=function(t){var e=this,n=OP.get(t);n.observationTargets.slice().forEach((function(n){return e.unobserve(t,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},t}(),DP=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");NP.connect(this,t)}return t.prototype.observe=function(t,e){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!oP(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");NP.observe(this,t,e)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!oP(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");NP.unobserve(this,t)},t.prototype.disconnect=function(){NP.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}(),FP=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))},BP=function(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},UP=function(){function t(t,e,n,i,r){this.state="idle",this.index=-1,this.slideIndex=-1,this.fn=n,this.index=t,this.slideIndex=e,this.eventHub=i,this.id=r}return t.prototype.apply=function(){return FP(this,void 0,void 0,(function(){var t;return BP(this,(function(e){switch(e.label){case 0:this.eventHub.emit("task-start",this),e.label=1;case 1:return e.trys.push([1,3,,4]),this.state="start",[4,this.fn()];case 2:return e.sent(),this.state="end",this.eventHub.emit("task-end",this),[3,4];case 3:return t=e.sent(),this.eventHub.emit("task-error",{task:this,error:t}),[3,4];case 4:return[2]}}))}))},t}(),kP=function(){function t(){var t=this;this.eventHub=new a.a,this.tasks=[],this.index=0,this.eventHub.on("task-end",(function(e){var n,i=t.tasks.findIndex((function(t){return t.index===e.index})),r=i+1;r>=0&&(null===(n=t.tasks[r])||void 0===n||n.apply()),i>=0&&(t.tasks.splice(i,1),t.replaceIdleTask()),t.eventHub.emit("task-end-"+e.id)})),this.eventHub.on("task-error",(function(e){var n=e.task,i=t.tasks.findIndex((function(t){return t.index===n.index}));i>=0&&(t.tasks.splice(i,1),t.replaceIdleTask())}))}return t.prototype.replaceIdleTask=function(){for(var t,e=this,n=new Set,i=0,r=this.tasks.length;i<r;i++)"idle"===this.tasks[i].state&&"idle"===(null===(t=this.tasks[i+1])||void 0===t?void 0:t.state)&&n.add(i);Array.from(n).forEach((function(t){e.tasks.splice(t,1)}))},t.prototype.addTask=function(t,e,n){var i=new UP(this.index++,e,t,this.eventHub,n);this.tasks.push(i),this.tasks.sort((function(t,e){return t.index-e.index})),this.replaceIdleTask(),1===this.tasks.length&&i.apply()},t.prototype.hasStartTask=function(){return this.tasks.some((function(t){return"start"===t.state}))},t.prototype.destroy=function(){this.eventHub.removeAllListeners()},t}();function GP(t,e){var n=t.__state.conversionName.toString(),i=Math.round(t.r),r=Math.round(t.g),o=Math.round(t.b),s=t.a,a=Math.round(t.h),l=t.s.toFixed(1),u=t.v.toFixed(1);if(e||"THREE_CHAR_HEX"===n||"SIX_CHAR_HEX"===n){for(var h=t.hex.toString(16);h.length<6;)h="0"+h;return"#"+h}return"CSS_RGB"===n?"rgb("+i+","+r+","+o+")":"CSS_RGBA"===n?"rgba("+i+","+r+","+o+","+s+")":"HEX"===n?"0x"+t.hex.toString(16):"RGB_ARRAY"===n?"["+i+","+r+","+o+"]":"RGBA_ARRAY"===n?"["+i+","+r+","+o+","+s+"]":"RGB_OBJ"===n?"{r:"+i+",g:"+r+",b:"+o+"}":"RGBA_OBJ"===n?"{r:"+i+",g:"+r+",b:"+o+",a:"+s+"}":"HSV_OBJ"===n?"{h:"+a+",s:"+l+",v:"+u+"}":"HSVA_OBJ"===n?"{h:"+a+",s:"+l+",v:"+u+",a:"+s+"}":"unknown format"}var HP=Array.prototype.forEach,zP=Array.prototype.slice,jP={BREAK:{},extend:function(t){return this.each(zP.call(arguments,1),(function(e){(this.isObject(e)?Object.keys(e):[]).forEach(function(n){this.isUndefined(e[n])||(t[n]=e[n])}.bind(this))}),this),t},defaults:function(t){return this.each(zP.call(arguments,1),(function(e){(this.isObject(e)?Object.keys(e):[]).forEach(function(n){this.isUndefined(t[n])&&(t[n]=e[n])}.bind(this))}),this),t},compose:function(){var t=zP.call(arguments);return function(){for(var e=zP.call(arguments),n=t.length-1;n>=0;n--)e=[t[n].apply(this,e)];return e[0]}},each:function(t,e,n){if(t)if(HP&&t.forEach&&t.forEach===HP)t.forEach(e,n);else if(t.length===t.length+0){var i,r=void 0;for(r=0,i=t.length;r<i;r++)if(r in t&&e.call(n,t[r],r)===this.BREAK)return}else for(var o in t)if(e.call(n,t[o],o)===this.BREAK)return},defer:function(t){setTimeout(t,0)},debounce:function(t,e,n){var i=void 0;return function(){var r=this,o=arguments;function s(){i=null,n||t.apply(r,o)}var a=n||!i;clearTimeout(i),i=setTimeout(s,e),a&&t.apply(r,o)}},toArray:function(t){return t.toArray?t.toArray():zP.call(t)},isUndefined:function(t){return void 0===t},isNull:function(t){return null===t},isNaN:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){return isNaN(t)})),isArray:Array.isArray||function(t){return t.constructor===Array},isObject:function(t){return t===Object(t)},isNumber:function(t){return t===t+0},isString:function(t){return t===t+""},isBoolean:function(t){return!1===t||!0===t},isFunction:function(t){return t instanceof Function}},VP=[{litmus:jP.isString,conversions:{THREE_CHAR_HEX:{read:function(t){var e=t.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);return null!==e&&{space:"HEX",hex:parseInt("0x"+e[1].toString()+e[1].toString()+e[2].toString()+e[2].toString()+e[3].toString()+e[3].toString(),0)}},write:GP},SIX_CHAR_HEX:{read:function(t){var e=t.match(/^#([A-F0-9]{6})$/i);return null!==e&&{space:"HEX",hex:parseInt("0x"+e[1].toString(),0)}},write:GP},CSS_RGB:{read:function(t){var e=t.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==e&&{space:"RGB",r:parseFloat(e[1]),g:parseFloat(e[2]),b:parseFloat(e[3])}},write:GP},CSS_RGBA:{read:function(t){var e=t.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==e&&{space:"RGB",r:parseFloat(e[1]),g:parseFloat(e[2]),b:parseFloat(e[3]),a:parseFloat(e[4])}},write:GP}}},{litmus:jP.isNumber,conversions:{HEX:{read:function(t){return{space:"HEX",hex:t,conversionName:"HEX"}},write:function(t){return t.hex}}}},{litmus:jP.isArray,conversions:{RGB_ARRAY:{read:function(t){return 3===t.length&&{space:"RGB",r:t[0],g:t[1],b:t[2]}},write:function(t){return[t.r,t.g,t.b]}},RGBA_ARRAY:{read:function(t){return 4===t.length&&{space:"RGB",r:t[0],g:t[1],b:t[2],a:t[3]}},write:function(t){return[t.r,t.g,t.b,t.a]}}}},{litmus:jP.isObject,conversions:{RGBA_OBJ:{read:function(t){return!!(jP.isNumber(t.r)&&jP.isNumber(t.g)&&jP.isNumber(t.b)&&jP.isNumber(t.a))&&{space:"RGB",r:t.r,g:t.g,b:t.b,a:t.a}},write:function(t){return{r:t.r,g:t.g,b:t.b,a:t.a}}},RGB_OBJ:{read:function(t){return!!(jP.isNumber(t.r)&&jP.isNumber(t.g)&&jP.isNumber(t.b))&&{space:"RGB",r:t.r,g:t.g,b:t.b}},write:function(t){return{r:t.r,g:t.g,b:t.b}}},HSVA_OBJ:{read:function(t){return!!(jP.isNumber(t.h)&&jP.isNumber(t.s)&&jP.isNumber(t.v)&&jP.isNumber(t.a))&&{space:"HSV",h:t.h,s:t.s,v:t.v,a:t.a}},write:function(t){return{h:t.h,s:t.s,v:t.v,a:t.a}}},HSV_OBJ:{read:function(t){return!!(jP.isNumber(t.h)&&jP.isNumber(t.s)&&jP.isNumber(t.v))&&{space:"HSV",h:t.h,s:t.s,v:t.v}},write:function(t){return{h:t.h,s:t.s,v:t.v}}}}}],WP=void 0,XP=void 0,qP=function(){XP=!1;var t=arguments.length>1?jP.toArray(arguments):arguments[0];return jP.each(VP,(function(e){if(e.litmus(t))return jP.each(e.conversions,(function(e,n){if(WP=e.read(t),!1===XP&&!1!==WP)return XP=WP,WP.conversionName=n,WP.conversion=e,jP.BREAK})),jP.BREAK})),XP},YP=void 0,ZP={hsv_to_rgb:function(t,e,n){var i=Math.floor(t/60)%6,r=t/60-Math.floor(t/60),o=n*(1-e),s=n*(1-r*e),a=n*(1-(1-r)*e),l=[[n,a,o],[s,n,o],[o,n,a],[o,s,n],[a,o,n],[n,o,s]][i];return{r:255*l[0],g:255*l[1],b:255*l[2]}},rgb_to_hsv:function(t,e,n){var i=Math.min(t,e,n),r=Math.max(t,e,n),o=r-i,s=void 0;return 0===r?{h:NaN,s:0,v:0}:(s=t===r?(e-n)/o:e===r?2+(n-t)/o:4+(t-e)/o,(s/=6)<0&&(s+=1),{h:360*s,s:o/r,v:r/255})},rgb_to_hex:function(t,e,n){var i=this.hex_with_component(0,2,t);return i=this.hex_with_component(i,1,e),i=this.hex_with_component(i,0,n)},component_from_hex:function(t,e){return t>>8*e&255},hex_with_component:function(t,e,n){return n<<(YP=8*e)|t&~(255<<YP)}},JP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},KP=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},$P=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),QP=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},tC=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},eC=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},nC=function(){function t(){if(KP(this,t),this.__state=qP.apply(this,arguments),!1===this.__state)throw new Error("Failed to interpret color arguments");this.__state.a=this.__state.a||1}return $P(t,[{key:"toString",value:function(){return GP(this)}},{key:"toHexString",value:function(){return GP(this,!0)}},{key:"toOriginal",value:function(){return this.__state.conversion.write(this)}}]),t}();function iC(t,e,n){Object.defineProperty(t,e,{get:function(){return"RGB"===this.__state.space||nC.recalculateRGB(this,e,n),this.__state[e]},set:function(t){"RGB"!==this.__state.space&&(nC.recalculateRGB(this,e,n),this.__state.space="RGB"),this.__state[e]=t}})}function rC(t,e){Object.defineProperty(t,e,{get:function(){return"HSV"===this.__state.space||nC.recalculateHSV(this),this.__state[e]},set:function(t){"HSV"!==this.__state.space&&(nC.recalculateHSV(this),this.__state.space="HSV"),this.__state[e]=t}})}nC.recalculateRGB=function(t,e,n){if("HEX"===t.__state.space)t.__state[e]=ZP.component_from_hex(t.__state.hex,n);else{if("HSV"!==t.__state.space)throw new Error("Corrupted color state");jP.extend(t.__state,ZP.hsv_to_rgb(t.__state.h,t.__state.s,t.__state.v))}},nC.recalculateHSV=function(t){var e=ZP.rgb_to_hsv(t.r,t.g,t.b);jP.extend(t.__state,{s:e.s,v:e.v}),jP.isNaN(e.h)?jP.isUndefined(t.__state.h)&&(t.__state.h=0):t.__state.h=e.h},nC.COMPONENTS=["r","g","b","h","s","v","hex","a"],iC(nC.prototype,"r",2),iC(nC.prototype,"g",1),iC(nC.prototype,"b",0),rC(nC.prototype,"h"),rC(nC.prototype,"s"),rC(nC.prototype,"v"),Object.defineProperty(nC.prototype,"a",{get:function(){return this.__state.a},set:function(t){this.__state.a=t}}),Object.defineProperty(nC.prototype,"hex",{get:function(){return"HEX"!==this.__state.space&&(this.__state.hex=ZP.rgb_to_hex(this.r,this.g,this.b),this.__state.space="HEX"),this.__state.hex},set:function(t){this.__state.space="HEX",this.__state.hex=t}});var oC=function(){function t(e,n){KP(this,t),this.initialValue=e[n],this.domElement=document.createElement("div"),this.object=e,this.property=n,this.__onChange=void 0,this.__onFinishChange=void 0}return $P(t,[{key:"onChange",value:function(t){return this.__onChange=t,this}},{key:"onFinishChange",value:function(t){return this.__onFinishChange=t,this}},{key:"setValue",value:function(t){return this.object[this.property]=t,this.__onChange&&this.__onChange.call(this,t),this.updateDisplay(),this}},{key:"getValue",value:function(){return this.object[this.property]}},{key:"updateDisplay",value:function(){return this}},{key:"isModified",value:function(){return this.initialValue!==this.getValue()}}]),t}(),sC={};jP.each({HTMLEvents:["change"],MouseEvents:["click","mousemove","mousedown","mouseup","mouseover"],KeyboardEvents:["keydown"]},(function(t,e){jP.each(t,(function(t){sC[t]=e}))}));var aC=/(\d+(\.\d+)?)px/;function lC(t){if("0"===t||jP.isUndefined(t))return 0;var e=t.match(aC);return jP.isNull(e)?0:parseFloat(e[1])}var uC={makeSelectable:function(t,e){void 0!==t&&void 0!==t.style&&(t.onselectstart=e?function(){return!1}:function(){},t.style.MozUserSelect=e?"auto":"none",t.style.KhtmlUserSelect=e?"auto":"none",t.unselectable=e?"on":"off")},makeFullscreen:function(t,e,n){var i=n,r=e;jP.isUndefined(r)&&(r=!0),jP.isUndefined(i)&&(i=!0),t.style.position="absolute",r&&(t.style.left=0,t.style.right=0),i&&(t.style.top=0,t.style.bottom=0)},fakeEvent:function(t,e,n,i){var r=n||{},o=sC[e];if(!o)throw new Error("Event type "+e+" not supported.");var s=document.createEvent(o);switch(o){case"MouseEvents":var a=r.x||r.clientX||0,l=r.y||r.clientY||0;s.initMouseEvent(e,r.bubbles||!1,r.cancelable||!0,window,r.clickCount||1,0,0,a,l,!1,!1,!1,!1,0,null);break;case"KeyboardEvents":var u=s.initKeyboardEvent||s.initKeyEvent;jP.defaults(r,{cancelable:!0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,keyCode:void 0,charCode:void 0}),u(e,r.bubbles||!1,r.cancelable,window,r.ctrlKey,r.altKey,r.shiftKey,r.metaKey,r.keyCode,r.charCode);break;default:s.initEvent(e,r.bubbles||!1,r.cancelable||!0)}jP.defaults(s,i),t.dispatchEvent(s)},bind:function(t,e,n,i){var r=i||!1;return t.addEventListener?t.addEventListener(e,n,r):t.attachEvent&&t.attachEvent("on"+e,n),uC},unbind:function(t,e,n,i){var r=i||!1;return t.removeEventListener?t.removeEventListener(e,n,r):t.detachEvent&&t.detachEvent("on"+e,n),uC},addClass:function(t,e){if(void 0===t.className)t.className=e;else if(t.className!==e){var n=t.className.split(/ +/);-1===n.indexOf(e)&&(n.push(e),t.className=n.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}return uC},removeClass:function(t,e){if(e)if(t.className===e)t.removeAttribute("class");else{var n=t.className.split(/ +/),i=n.indexOf(e);-1!==i&&(n.splice(i,1),t.className=n.join(" "))}else t.className=void 0;return uC},hasClass:function(t,e){return new RegExp("(?:^|\\s+)"+e+"(?:\\s+|$)").test(t.className)||!1},getWidth:function(t){var e=getComputedStyle(t);return lC(e["border-left-width"])+lC(e["border-right-width"])+lC(e["padding-left"])+lC(e["padding-right"])+lC(e.width)},getHeight:function(t){var e=getComputedStyle(t);return lC(e["border-top-width"])+lC(e["border-bottom-width"])+lC(e["padding-top"])+lC(e["padding-bottom"])+lC(e.height)},getOffset:function(t){var e=t,n={left:0,top:0};if(e.offsetParent)do{n.left+=e.offsetLeft,n.top+=e.offsetTop,e=e.offsetParent}while(e);return n},isActive:function(t){return t===document.activeElement&&(t.type||t.href)}},hC=function(t){function e(t,n){KP(this,e);var i=eC(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n)),r=i;return i.__prev=i.getValue(),i.__checkbox=document.createElement("input"),i.__checkbox.setAttribute("type","checkbox"),uC.bind(i.__checkbox,"change",(function(){r.setValue(!r.__prev)}),!1),i.domElement.appendChild(i.__checkbox),i.updateDisplay(),i}return tC(e,t),$P(e,[{key:"setValue",value:function(t){var n=QP(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setValue",this).call(this,t);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),this.__prev=this.getValue(),n}},{key:"updateDisplay",value:function(){return!0===this.getValue()?(this.__checkbox.setAttribute("checked","checked"),this.__checkbox.checked=!0,this.__prev=!0):(this.__checkbox.checked=!1,this.__prev=!1),QP(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"updateDisplay",this).call(this)}}]),e}(oC),cC=function(t){function e(t,n,i){KP(this,e);var r=eC(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n)),o=i,s=r;if(r.__select=document.createElement("select"),jP.isArray(o)){var a={};jP.each(o,(function(t){a[t]=t})),o=a}return jP.each(o,(function(t,e){var n=document.createElement("option");n.innerHTML=e,n.setAttribute("value",t),s.__select.appendChild(n)})),r.updateDisplay(),uC.bind(r.__select,"change",(function(){var t=this.options[this.selectedIndex].value;s.setValue(t)})),r.domElement.appendChild(r.__select),r}return tC(e,t),$P(e,[{key:"setValue",value:function(t){var n=QP(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setValue",this).call(this,t);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),n}},{key:"updateDisplay",value:function(){return uC.isActive(this.__select)?this:(this.__select.value=this.getValue(),QP(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"updateDisplay",this).call(this))}}]),e}(oC),dC=function(t){function e(t,n){KP(this,e);var i=eC(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n)),r=i;function o(){r.setValue(r.__input.value)}return i.__input=document.createElement("input"),i.__input.setAttribute("type","text"),uC.bind(i.__input,"keyup",o),uC.bind(i.__input,"change",o),uC.bind(i.__input,"blur",(function(){r.__onFinishChange&&r.__onFinishChange.call(r,r.getValue())})),uC.bind(i.__input,"keydown",(function(t){13===t.keyCode&&this.blur()})),i.updateDisplay(),i.domElement.appendChild(i.__input),i}return tC(e,t),$P(e,[{key:"updateDisplay",value:function(){return uC.isActive(this.__input)||(this.__input.value=this.getValue()),QP(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"updateDisplay",this).call(this)}}]),e}(oC);function pC(t){var e=t.toString();return e.indexOf(".")>-1?e.length-e.indexOf(".")-1:0}var fC=function(t){function e(t,n,i){KP(this,e);var r=eC(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n)),o=i||{};return r.__min=o.min,r.__max=o.max,r.__step=o.step,jP.isUndefined(r.__step)?0===r.initialValue?r.__impliedStep=1:r.__impliedStep=Math.pow(10,Math.floor(Math.log(Math.abs(r.initialValue))/Math.LN10))/10:r.__impliedStep=r.__step,r.__precision=pC(r.__impliedStep),r}return tC(e,t),$P(e,[{key:"setValue",value:function(t){var n=t;return void 0!==this.__min&&n<this.__min?n=this.__min:void 0!==this.__max&&n>this.__max&&(n=this.__max),void 0!==this.__step&&n%this.__step!=0&&(n=Math.round(n/this.__step)*this.__step),QP(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setValue",this).call(this,n)}},{key:"min",value:function(t){return this.__min=t,this}},{key:"max",value:function(t){return this.__max=t,this}},{key:"step",value:function(t){return this.__step=t,this.__impliedStep=t,this.__precision=pC(t),this}}]),e}(oC);var mC=function(t){function e(t,n,i){KP(this,e);var r=eC(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,i));r.__truncationSuspended=!1;var o=r,s=void 0;function a(){o.__onFinishChange&&o.__onFinishChange.call(o,o.getValue())}function l(t){var e=s-t.clientY;o.setValue(o.getValue()+e*o.__impliedStep),s=t.clientY}function u(){uC.unbind(window,"mousemove",l),uC.unbind(window,"mouseup",u),a()}return r.__input=document.createElement("input"),r.__input.setAttribute("type","text"),uC.bind(r.__input,"change",(function(){var t=parseFloat(o.__input.value);jP.isNaN(t)||o.setValue(t)})),uC.bind(r.__input,"blur",(function(){a()})),uC.bind(r.__input,"mousedown",(function(t){uC.bind(window,"mousemove",l),uC.bind(window,"mouseup",u),s=t.clientY})),uC.bind(r.__input,"keydown",(function(t){13===t.keyCode&&(o.__truncationSuspended=!0,this.blur(),o.__truncationSuspended=!1,a())})),r.updateDisplay(),r.domElement.appendChild(r.__input),r}return tC(e,t),$P(e,[{key:"updateDisplay",value:function(){var t,n,i;return this.__input.value=this.__truncationSuspended?this.getValue():(t=this.getValue(),n=this.__precision,i=Math.pow(10,n),Math.round(t*i)/i),QP(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"updateDisplay",this).call(this)}}]),e}(fC);function gC(t,e,n,i,r){return i+(t-e)/(n-e)*(r-i)}var vC=function(t){function e(t,n,i,r,o){KP(this,e);var s=eC(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,{min:i,max:r,step:o})),a=s;function l(t){t.preventDefault();var e=a.__background.getBoundingClientRect();return a.setValue(gC(t.clientX,e.left,e.right,a.__min,a.__max)),!1}function u(){uC.unbind(window,"mousemove",l),uC.unbind(window,"mouseup",u),a.__onFinishChange&&a.__onFinishChange.call(a,a.getValue())}function h(t){var e=t.touches[0].clientX,n=a.__background.getBoundingClientRect();a.setValue(gC(e,n.left,n.right,a.__min,a.__max))}function c(){uC.unbind(window,"touchmove",h),uC.unbind(window,"touchend",c),a.__onFinishChange&&a.__onFinishChange.call(a,a.getValue())}return s.__background=document.createElement("div"),s.__foreground=document.createElement("div"),uC.bind(s.__background,"mousedown",(function(t){document.activeElement.blur(),uC.bind(window,"mousemove",l),uC.bind(window,"mouseup",u),l(t)})),uC.bind(s.__background,"touchstart",(function(t){if(1!==t.touches.length)return;uC.bind(window,"touchmove",h),uC.bind(window,"touchend",c),h(t)})),uC.addClass(s.__background,"slider"),uC.addClass(s.__foreground,"slider-fg"),s.updateDisplay(),s.__background.appendChild(s.__foreground),s.domElement.appendChild(s.__background),s}return tC(e,t),$P(e,[{key:"updateDisplay",value:function(){var t=(this.getValue()-this.__min)/(this.__max-this.__min);return this.__foreground.style.width=100*t+"%",QP(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"updateDisplay",this).call(this)}}]),e}(fC),_C=function(t){function e(t,n,i){KP(this,e);var r=eC(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n)),o=r;return r.__button=document.createElement("div"),r.__button.innerHTML=void 0===i?"Fire":i,uC.bind(r.__button,"click",(function(t){return t.preventDefault(),o.fire(),!1})),uC.addClass(r.__button,"button"),r.domElement.appendChild(r.__button),r}return tC(e,t),$P(e,[{key:"fire",value:function(){this.__onChange&&this.__onChange.call(this),this.getValue().call(this.object),this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())}}]),e}(oC),yC=function(t){function e(t,n){KP(this,e);var i=eC(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));i.__color=new nC(i.getValue()),i.__temp=new nC(0);var r=i;i.domElement=document.createElement("div"),uC.makeSelectable(i.domElement,!1),i.__selector=document.createElement("div"),i.__selector.className="selector",i.__saturation_field=document.createElement("div"),i.__saturation_field.className="saturation-field",i.__field_knob=document.createElement("div"),i.__field_knob.className="field-knob",i.__field_knob_border="2px solid ",i.__hue_knob=document.createElement("div"),i.__hue_knob.className="hue-knob",i.__hue_field=document.createElement("div"),i.__hue_field.className="hue-field",i.__input=document.createElement("input"),i.__input.type="text",i.__input_textShadow="0 1px 1px ",uC.bind(i.__input,"keydown",(function(t){13===t.keyCode&&c.call(this)})),uC.bind(i.__input,"blur",c),uC.bind(i.__selector,"mousedown",(function(){uC.addClass(this,"drag").bind(window,"mouseup",(function(){uC.removeClass(r.__selector,"drag")}))})),uC.bind(i.__selector,"touchstart",(function(){uC.addClass(this,"drag").bind(window,"touchend",(function(){uC.removeClass(r.__selector,"drag")}))}));var o,s=document.createElement("div");function a(t){p(t),uC.bind(window,"mousemove",p),uC.bind(window,"touchmove",p),uC.bind(window,"mouseup",u),uC.bind(window,"touchend",u)}function l(t){f(t),uC.bind(window,"mousemove",f),uC.bind(window,"touchmove",f),uC.bind(window,"mouseup",h),uC.bind(window,"touchend",h)}function u(){uC.unbind(window,"mousemove",p),uC.unbind(window,"touchmove",p),uC.unbind(window,"mouseup",u),uC.unbind(window,"touchend",u),d()}function h(){uC.unbind(window,"mousemove",f),uC.unbind(window,"touchmove",f),uC.unbind(window,"mouseup",h),uC.unbind(window,"touchend",h),d()}function c(){var t=qP(this.value);!1!==t?(r.__color.__state=t,r.setValue(r.__color.toOriginal())):this.value=r.__color.toString()}function d(){r.__onFinishChange&&r.__onFinishChange.call(r,r.__color.toOriginal())}function p(t){-1===t.type.indexOf("touch")&&t.preventDefault();var e=r.__saturation_field.getBoundingClientRect(),n=t.touches&&t.touches[0]||t,i=n.clientX,o=n.clientY,s=(i-e.left)/(e.right-e.left),a=1-(o-e.top)/(e.bottom-e.top);return a>1?a=1:a<0&&(a=0),s>1?s=1:s<0&&(s=0),r.__color.v=a,r.__color.s=s,r.setValue(r.__color.toOriginal()),!1}function f(t){-1===t.type.indexOf("touch")&&t.preventDefault();var e=r.__hue_field.getBoundingClientRect(),n=1-((t.touches&&t.touches[0]||t).clientY-e.top)/(e.bottom-e.top);return n>1?n=1:n<0&&(n=0),r.__color.h=360*n,r.setValue(r.__color.toOriginal()),!1}return jP.extend(i.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),jP.extend(i.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:i.__field_knob_border+(i.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),jP.extend(i.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1}),jP.extend(i.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),jP.extend(s.style,{width:"100%",height:"100%",background:"none"}),bC(s,"top","rgba(0,0,0,0)","#000"),jP.extend(i.__hue_field.style,{width:"15px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",right:"3px"}),(o=i.__hue_field).style.background="",o.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",o.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",o.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",o.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",o.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",jP.extend(i.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:i.__input_textShadow+"rgba(0,0,0,0.7)"}),uC.bind(i.__saturation_field,"mousedown",a),uC.bind(i.__saturation_field,"touchstart",a),uC.bind(i.__field_knob,"mousedown",a),uC.bind(i.__field_knob,"touchstart",a),uC.bind(i.__hue_field,"mousedown",l),uC.bind(i.__hue_field,"touchstart",l),i.__saturation_field.appendChild(s),i.__selector.appendChild(i.__field_knob),i.__selector.appendChild(i.__saturation_field),i.__selector.appendChild(i.__hue_field),i.__hue_field.appendChild(i.__hue_knob),i.domElement.appendChild(i.__input),i.domElement.appendChild(i.__selector),i.updateDisplay(),i}return tC(e,t),$P(e,[{key:"updateDisplay",value:function(){var t=qP(this.getValue());if(!1!==t){var e=!1;jP.each(nC.COMPONENTS,(function(n){if(!jP.isUndefined(t[n])&&!jP.isUndefined(this.__color.__state[n])&&t[n]!==this.__color.__state[n])return e=!0,{}}),this),e&&jP.extend(this.__color.__state,t)}jP.extend(this.__temp.__state,this.__color.__state),this.__temp.a=1;var n=this.__color.v<.5||this.__color.s>.5?255:0,i=255-n;jP.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+n+","+n+","+n+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__temp.s=1,this.__temp.v=1,bC(this.__saturation_field,"left","#fff",this.__temp.toHexString()),this.__input.value=this.__color.toString(),jP.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+n+","+n+","+n+")",textShadow:this.__input_textShadow+"rgba("+i+","+i+","+i+",.7)"})}}]),e}(oC),xC=["-moz-","-o-","-webkit-","-ms-",""];function bC(t,e,n,i){t.style.background="",jP.each(xC,(function(r){t.style.cssText+="background: "+r+"linear-gradient("+e+", "+n+" 0%, "+i+" 100%); "}))}var TC=function(t,e){var n=e||document,i=document.createElement("style");i.type="text/css",i.innerHTML=t;var r=n.getElementsByTagName("head")[0];try{r.appendChild(i)}catch(t){}},wC='<div id="dg-save" class="dg dialogue">\n\n Here\'s the new load parameter for your <code>GUI</code>\'s constructor:\n\n <textarea id="dg-new-constructor"></textarea>\n\n <div id="dg-save-locally">\n\n <input id="dg-local-storage" type="checkbox"/> Automatically save\n values to <code>localStorage</code> on exit.\n\n <div id="dg-local-explain">The values saved to <code>localStorage</code> will\n override those passed to <code>dat.GUI</code>\'s constructor. This makes it\n easier to work incrementally, but <code>localStorage</code> is fragile,\n and your friends may not see the same values you do.\n\n </div>\n\n </div>\n\n</div>',SC=function(t,e){var n=t[e];return jP.isArray(arguments[2])||jP.isObject(arguments[2])?new cC(t,e,arguments[2]):jP.isNumber(n)?jP.isNumber(arguments[2])&&jP.isNumber(arguments[3])?jP.isNumber(arguments[4])?new vC(t,e,arguments[2],arguments[3],arguments[4]):new vC(t,e,arguments[2],arguments[3]):jP.isNumber(arguments[4])?new mC(t,e,{min:arguments[2],max:arguments[3],step:arguments[4]}):new mC(t,e,{min:arguments[2],max:arguments[3]}):jP.isString(n)?new dC(t,e):jP.isFunction(n)?new _C(t,e,""):jP.isBoolean(n)?new hC(t,e):null};var EC=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,1e3/60)},MC=function(){function t(){KP(this,t),this.backgroundElement=document.createElement("div"),jP.extend(this.backgroundElement.style,{backgroundColor:"rgba(0,0,0,0.8)",top:0,left:0,display:"none",zIndex:"1000",opacity:0,WebkitTransition:"opacity 0.2s linear",transition:"opacity 0.2s linear"}),uC.makeFullscreen(this.backgroundElement),this.backgroundElement.style.position="fixed",this.domElement=document.createElement("div"),jP.extend(this.domElement.style,{position:"fixed",display:"none",zIndex:"1001",opacity:0,WebkitTransition:"-webkit-transform 0.2s ease-out, opacity 0.2s linear",transition:"transform 0.2s ease-out, opacity 0.2s linear"}),document.body.appendChild(this.backgroundElement),document.body.appendChild(this.domElement);var e=this;uC.bind(this.backgroundElement,"click",(function(){e.hide()}))}return $P(t,[{key:"show",value:function(){var t=this;this.backgroundElement.style.display="block",this.domElement.style.display="block",this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)",this.layout(),jP.defer((function(){t.backgroundElement.style.opacity=1,t.domElement.style.opacity=1,t.domElement.style.webkitTransform="scale(1)"}))}},{key:"hide",value:function(){var t=this,e=function e(){t.domElement.style.display="none",t.backgroundElement.style.display="none",uC.unbind(t.domElement,"webkitTransitionEnd",e),uC.unbind(t.domElement,"transitionend",e),uC.unbind(t.domElement,"oTransitionEnd",e)};uC.bind(this.domElement,"webkitTransitionEnd",e),uC.bind(this.domElement,"transitionend",e),uC.bind(this.domElement,"oTransitionEnd",e),this.backgroundElement.style.opacity=0,this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)"}},{key:"layout",value:function(){this.domElement.style.left=window.innerWidth/2-uC.getWidth(this.domElement)/2+"px",this.domElement.style.top=window.innerHeight/2-uC.getHeight(this.domElement)/2+"px"}}]),t}();TC(function(t){if(t&&"undefined"!=typeof window){var e=document.createElement("style");return e.setAttribute("type","text/css"),e.innerHTML=t,document.head.appendChild(e),t}}(".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}\n"));var AC=function(){try{return!!window.localStorage}catch(t){return!1}}(),RC=void 0,PC=!0,CC=void 0,IC=!1,OC=[],LC=function t(e){var n=this,i=e||{};this.domElement=document.createElement("div"),this.__ul=document.createElement("ul"),this.domElement.appendChild(this.__ul),uC.addClass(this.domElement,"dg"),this.__folders={},this.__controllers=[],this.__rememberedObjects=[],this.__rememberedObjectIndecesToControllers=[],this.__listening=[],i=jP.defaults(i,{closeOnTop:!1,autoPlace:!0,width:t.DEFAULT_WIDTH}),i=jP.defaults(i,{resizable:i.autoPlace,hideable:i.autoPlace}),jP.isUndefined(i.load)?i.load={preset:"Default"}:i.preset&&(i.load.preset=i.preset),jP.isUndefined(i.parent)&&i.hideable&&OC.push(this),i.resizable=jP.isUndefined(i.parent)&&i.resizable,i.autoPlace&&jP.isUndefined(i.scrollable)&&(i.scrollable=!0);var r,o=AC&&"true"===localStorage.getItem(kC(this,"isLocal")),s=void 0,a=void 0;if(Object.defineProperties(this,{parent:{get:function(){return i.parent}},scrollable:{get:function(){return i.scrollable}},autoPlace:{get:function(){return i.autoPlace}},closeOnTop:{get:function(){return i.closeOnTop}},preset:{get:function(){return n.parent?n.getRoot().preset:i.load.preset},set:function(t){n.parent?n.getRoot().preset=t:i.load.preset=t,function(t){for(var e=0;e<t.__preset_select.length;e++)t.__preset_select[e].value===t.preset&&(t.__preset_select.selectedIndex=e)}(this),n.revert()}},width:{get:function(){return i.width},set:function(t){i.width=t,VC(n,t)}},name:{get:function(){return i.name},set:function(t){i.name=t,a&&(a.innerHTML=i.name)}},closed:{get:function(){return i.closed},set:function(e){i.closed=e,i.closed?uC.addClass(n.__ul,t.CLASS_CLOSED):uC.removeClass(n.__ul,t.CLASS_CLOSED),this.onResize(),n.__closeButton&&(n.__closeButton.innerHTML=e?t.TEXT_OPEN:t.TEXT_CLOSED)}},load:{get:function(){return i.load}},useLocalStorage:{get:function(){return o},set:function(t){AC&&(o=t,t?uC.bind(window,"unload",s):uC.unbind(window,"unload",s),localStorage.setItem(kC(n,"isLocal"),t))}}}),jP.isUndefined(i.parent)){if(this.closed=i.closed||!1,uC.addClass(this.domElement,t.CLASS_MAIN),uC.makeSelectable(this.domElement,!1),AC&&o){n.useLocalStorage=!0;var l=localStorage.getItem(kC(this,"gui"));l&&(i.load=JSON.parse(l))}this.__closeButton=document.createElement("div"),this.__closeButton.innerHTML=t.TEXT_CLOSED,uC.addClass(this.__closeButton,t.CLASS_CLOSE_BUTTON),i.closeOnTop?(uC.addClass(this.__closeButton,t.CLASS_CLOSE_TOP),this.domElement.insertBefore(this.__closeButton,this.domElement.childNodes[0])):(uC.addClass(this.__closeButton,t.CLASS_CLOSE_BOTTOM),this.domElement.appendChild(this.__closeButton)),uC.bind(this.__closeButton,"click",(function(){n.closed=!n.closed}))}else{void 0===i.closed&&(i.closed=!0);var u=document.createTextNode(i.name);uC.addClass(u,"controller-name"),a=NC(n,u);uC.addClass(this.__ul,t.CLASS_CLOSED),uC.addClass(a,"title"),uC.bind(a,"click",(function(t){return t.preventDefault(),n.closed=!n.closed,!1})),i.closed||(this.closed=!1)}i.autoPlace&&(jP.isUndefined(i.parent)&&(PC&&(CC=document.createElement("div"),uC.addClass(CC,"dg"),uC.addClass(CC,t.CLASS_AUTO_PLACE_CONTAINER),document.body.appendChild(CC),PC=!1),CC.appendChild(this.domElement),uC.addClass(this.domElement,t.CLASS_AUTO_PLACE)),this.parent||VC(n,i.width)),this.__resizeHandler=function(){n.onResizeDebounced()},uC.bind(window,"resize",this.__resizeHandler),uC.bind(this.__ul,"webkitTransitionEnd",this.__resizeHandler),uC.bind(this.__ul,"transitionend",this.__resizeHandler),uC.bind(this.__ul,"oTransitionEnd",this.__resizeHandler),this.onResize(),i.resizable&&jC(this),s=function(){AC&&"true"===localStorage.getItem(kC(n,"isLocal"))&&localStorage.setItem(kC(n,"gui"),JSON.stringify(n.getSaveObject()))},this.saveToLocalStorageIfPossible=s,i.parent||((r=n.getRoot()).width+=1,jP.defer((function(){r.width-=1})))};function NC(t,e,n){var i=document.createElement("li");return e&&i.appendChild(e),n?t.__ul.insertBefore(i,n):t.__ul.appendChild(i),t.onResize(),i}function DC(t){uC.unbind(window,"resize",t.__resizeHandler),t.saveToLocalStorageIfPossible&&uC.unbind(window,"unload",t.saveToLocalStorageIfPossible)}function FC(t,e){var n=t.__preset_select[t.__preset_select.selectedIndex];n.innerHTML=e?n.value+"*":n.value}function BC(t,e){var n=t.getRoot(),i=n.__rememberedObjects.indexOf(e.object);if(-1!==i){var r=n.__rememberedObjectIndecesToControllers[i];if(void 0===r&&(r={},n.__rememberedObjectIndecesToControllers[i]=r),r[e.property]=e,n.load&&n.load.remembered){var o=n.load.remembered,s=void 0;if(o[t.preset])s=o[t.preset];else{if(!o.Default)return;s=o.Default}if(s[i]&&void 0!==s[i][e.property]){var a=s[i][e.property];e.initialValue=a,e.setValue(a)}}}}function UC(t,e,n,i){if(void 0===e[n])throw new Error('Object "'+e+'" has no property "'+n+'"');var r=void 0;if(i.color)r=new yC(e,n);else{var o=[e,n].concat(i.factoryArgs);r=SC.apply(t,o)}i.before instanceof oC&&(i.before=i.before.__li),BC(t,r),uC.addClass(r.domElement,"c");var s=document.createElement("span");uC.addClass(s,"property-name"),s.innerHTML=r.property;var a=document.createElement("div");a.appendChild(s),a.appendChild(r.domElement);var l=NC(t,a,i.before);return uC.addClass(l,LC.CLASS_CONTROLLER_ROW),r instanceof yC?uC.addClass(l,"color"):uC.addClass(l,JP(r.getValue())),function(t,e,n){if(n.__li=e,n.__gui=t,jP.extend(n,{options:function(e){if(arguments.length>1){var i=n.__li.nextElementSibling;return n.remove(),UC(t,n.object,n.property,{before:i,factoryArgs:[jP.toArray(arguments)]})}if(jP.isArray(e)||jP.isObject(e)){var r=n.__li.nextElementSibling;return n.remove(),UC(t,n.object,n.property,{before:r,factoryArgs:[e]})}},name:function(t){return n.__li.firstElementChild.firstElementChild.innerHTML=t,n},listen:function(){return n.__gui.listen(n),n},remove:function(){return n.__gui.remove(n),n}}),n instanceof vC){var i=new mC(n.object,n.property,{min:n.__min,max:n.__max,step:n.__step});jP.each(["updateDisplay","onChange","onFinishChange","step","min","max"],(function(t){var e=n[t],r=i[t];n[t]=i[t]=function(){var t=Array.prototype.slice.call(arguments);return r.apply(i,t),e.apply(n,t)}})),uC.addClass(e,"has-slider"),n.domElement.insertBefore(i.domElement,n.domElement.firstElementChild)}else if(n instanceof mC){var r=function(e){if(jP.isNumber(n.__min)&&jP.isNumber(n.__max)){var i=n.__li.firstElementChild.firstElementChild.innerHTML,r=n.__gui.__listening.indexOf(n)>-1;n.remove();var o=UC(t,n.object,n.property,{before:n.__li.nextElementSibling,factoryArgs:[n.__min,n.__max,n.__step]});return o.name(i),r&&o.listen(),o}return e};n.min=jP.compose(r,n.min),n.max=jP.compose(r,n.max)}else n instanceof hC?(uC.bind(e,"click",(function(){uC.fakeEvent(n.__checkbox,"click")})),uC.bind(n.__checkbox,"click",(function(t){t.stopPropagation()}))):n instanceof _C?(uC.bind(e,"click",(function(){uC.fakeEvent(n.__button,"click")})),uC.bind(e,"mouseover",(function(){uC.addClass(n.__button,"hover")})),uC.bind(e,"mouseout",(function(){uC.removeClass(n.__button,"hover")}))):n instanceof yC&&(uC.addClass(e,"color"),n.updateDisplay=jP.compose((function(t){return e.style.borderLeftColor=n.__color.toString(),t}),n.updateDisplay),n.updateDisplay());n.setValue=jP.compose((function(e){return t.getRoot().__preset_select&&n.isModified()&&FC(t.getRoot(),!0),e}),n.setValue)}(t,l,r),t.__controllers.push(r),r}function kC(t,e){return document.location.href+"."+e}function GC(t,e,n){var i=document.createElement("option");i.innerHTML=e,i.value=e,t.__preset_select.appendChild(i),n&&(t.__preset_select.selectedIndex=t.__preset_select.length-1)}function HC(t,e){e.style.display=t.useLocalStorage?"block":"none"}function zC(t){var e=t.__save_row=document.createElement("li");uC.addClass(t.domElement,"has-save"),t.__ul.insertBefore(e,t.__ul.firstChild),uC.addClass(e,"save-row");var n=document.createElement("span");n.innerHTML=" ",uC.addClass(n,"button gears");var i=document.createElement("span");i.innerHTML="Save",uC.addClass(i,"button"),uC.addClass(i,"save");var r=document.createElement("span");r.innerHTML="New",uC.addClass(r,"button"),uC.addClass(r,"save-as");var o=document.createElement("span");o.innerHTML="Revert",uC.addClass(o,"button"),uC.addClass(o,"revert");var s=t.__preset_select=document.createElement("select");if(t.load&&t.load.remembered?jP.each(t.load.remembered,(function(e,n){GC(t,n,n===t.preset)})):GC(t,"Default",!1),uC.bind(s,"change",(function(){for(var e=0;e<t.__preset_select.length;e++)t.__preset_select[e].innerHTML=t.__preset_select[e].value;t.preset=this.value})),e.appendChild(s),e.appendChild(n),e.appendChild(i),e.appendChild(r),e.appendChild(o),AC){var a=document.getElementById("dg-local-explain"),l=document.getElementById("dg-local-storage");document.getElementById("dg-save-locally").style.display="block","true"===localStorage.getItem(kC(0,"isLocal"))&&l.setAttribute("checked","checked"),HC(t,a),uC.bind(l,"change",(function(){t.useLocalStorage=!t.useLocalStorage,HC(t,a)}))}var u=document.getElementById("dg-new-constructor");uC.bind(u,"keydown",(function(t){!t.metaKey||67!==t.which&&67!==t.keyCode||RC.hide()})),uC.bind(n,"click",(function(){u.innerHTML=JSON.stringify(t.getSaveObject(),void 0,2),RC.show(),u.focus(),u.select()})),uC.bind(i,"click",(function(){t.save()})),uC.bind(r,"click",(function(){var e=prompt("Enter a new preset name.");e&&t.saveAs(e)})),uC.bind(o,"click",(function(){t.revert()}))}function jC(t){var e=void 0;function n(n){return n.preventDefault(),t.width+=e-n.clientX,t.onResize(),e=n.clientX,!1}function i(){uC.removeClass(t.__closeButton,LC.CLASS_DRAG),uC.unbind(window,"mousemove",n),uC.unbind(window,"mouseup",i)}function r(r){return r.preventDefault(),e=r.clientX,uC.addClass(t.__closeButton,LC.CLASS_DRAG),uC.bind(window,"mousemove",n),uC.bind(window,"mouseup",i),!1}t.__resize_handle=document.createElement("div"),jP.extend(t.__resize_handle.style,{width:"6px",marginLeft:"-3px",height:"200px",cursor:"ew-resize",position:"absolute"}),uC.bind(t.__resize_handle,"mousedown",r),uC.bind(t.__closeButton,"mousedown",r),t.domElement.insertBefore(t.__resize_handle,t.domElement.firstElementChild)}function VC(t,e){t.domElement.style.width=e+"px",t.__save_row&&t.autoPlace&&(t.__save_row.style.width=e+"px"),t.__closeButton&&(t.__closeButton.style.width=e+"px")}function WC(t,e){var n={};return jP.each(t.__rememberedObjects,(function(i,r){var o={},s=t.__rememberedObjectIndecesToControllers[r];jP.each(s,(function(t,n){o[n]=e?t.initialValue:t.getValue()})),n[r]=o})),n}LC.toggleHide=function(){IC=!IC,jP.each(OC,(function(t){t.domElement.style.display=IC?"none":""}))},LC.CLASS_AUTO_PLACE="a",LC.CLASS_AUTO_PLACE_CONTAINER="ac",LC.CLASS_MAIN="main",LC.CLASS_CONTROLLER_ROW="cr",LC.CLASS_TOO_TALL="taller-than-window",LC.CLASS_CLOSED="closed",LC.CLASS_CLOSE_BUTTON="close-button",LC.CLASS_CLOSE_TOP="close-top",LC.CLASS_CLOSE_BOTTOM="close-bottom",LC.CLASS_DRAG="drag",LC.DEFAULT_WIDTH=245,LC.TEXT_CLOSED="Close Controls",LC.TEXT_OPEN="Open Controls",LC._keydownHandler=function(t){"text"===document.activeElement.type||72!==t.which&&72!==t.keyCode||LC.toggleHide()},uC.bind(window,"keydown",LC._keydownHandler,!1),jP.extend(LC.prototype,{add:function(t,e){return UC(this,t,e,{factoryArgs:Array.prototype.slice.call(arguments,2)})},addColor:function(t,e){return UC(this,t,e,{color:!0})},remove:function(t){this.__ul.removeChild(t.__li),this.__controllers.splice(this.__controllers.indexOf(t),1);var e=this;jP.defer((function(){e.onResize()}))},destroy:function(){if(this.parent)throw new Error("Only the root GUI should be removed with .destroy(). For subfolders, use gui.removeFolder(folder) instead.");this.autoPlace&&CC.removeChild(this.domElement);var t=this;jP.each(this.__folders,(function(e){t.removeFolder(e)})),uC.unbind(window,"keydown",LC._keydownHandler,!1),DC(this)},addFolder:function(t){if(void 0!==this.__folders[t])throw new Error('You already have a folder in this GUI by the name "'+t+'"');var e={name:t,parent:this};e.autoPlace=this.autoPlace,this.load&&this.load.folders&&this.load.folders[t]&&(e.closed=this.load.folders[t].closed,e.load=this.load.folders[t]);var n=new LC(e);this.__folders[t]=n;var i=NC(this,n.domElement);return uC.addClass(i,"folder"),n},removeFolder:function(t){this.__ul.removeChild(t.domElement.parentElement),delete this.__folders[t.name],this.load&&this.load.folders&&this.load.folders[t.name]&&delete this.load.folders[t.name],DC(t);var e=this;jP.each(t.__folders,(function(e){t.removeFolder(e)})),jP.defer((function(){e.onResize()}))},open:function(){this.closed=!1},close:function(){this.closed=!0},hide:function(){this.domElement.style.display="none"},show:function(){this.domElement.style.display=""},onResize:function(){var t=this.getRoot();if(t.scrollable){var e=uC.getOffset(t.__ul).top,n=0;jP.each(t.__ul.childNodes,(function(e){t.autoPlace&&e===t.__save_row||(n+=uC.getHeight(e))})),window.innerHeight-e-20<n?(uC.addClass(t.domElement,LC.CLASS_TOO_TALL),t.__ul.style.height=window.innerHeight-e-20+"px"):(uC.removeClass(t.domElement,LC.CLASS_TOO_TALL),t.__ul.style.height="auto")}t.__resize_handle&&jP.defer((function(){t.__resize_handle.style.height=t.__ul.offsetHeight+"px"})),t.__closeButton&&(t.__closeButton.style.width=t.width+"px")},onResizeDebounced:jP.debounce((function(){this.onResize()}),50),remember:function(){if(jP.isUndefined(RC)&&((RC=new MC).domElement.innerHTML=wC),this.parent)throw new Error("You can only call remember on a top level GUI.");var t=this;jP.each(Array.prototype.slice.call(arguments),(function(e){0===t.__rememberedObjects.length&&zC(t),-1===t.__rememberedObjects.indexOf(e)&&t.__rememberedObjects.push(e)})),this.autoPlace&&VC(this,this.width)},getRoot:function(){for(var t=this;t.parent;)t=t.parent;return t},getSaveObject:function(){var t=this.load;return t.closed=this.closed,this.__rememberedObjects.length>0&&(t.preset=this.preset,t.remembered||(t.remembered={}),t.remembered[this.preset]=WC(this)),t.folders={},jP.each(this.__folders,(function(e,n){t.folders[n]=e.getSaveObject()})),t},save:function(){this.load.remembered||(this.load.remembered={}),this.load.remembered[this.preset]=WC(this),FC(this,!1),this.saveToLocalStorageIfPossible()},saveAs:function(t){this.load.remembered||(this.load.remembered={},this.load.remembered.Default=WC(this,!0)),this.load.remembered[t]=WC(this),this.preset=t,GC(this,t,!0),this.saveToLocalStorageIfPossible()},revert:function(t){jP.each(this.__controllers,(function(e){this.getRoot().load.remembered?BC(t||this.getRoot(),e):e.setValue(e.initialValue),e.__onFinishChange&&e.__onFinishChange.call(e,e.getValue())}),this),jP.each(this.__folders,(function(t){t.revert(t)})),t||FC(this.getRoot(),!1)},listen:function(t){var e=0===this.__listening.length;this.__listening.push(t),e&&function t(e){0!==e.length&&EC.call(window,(function(){t(e)}));jP.each(e,(function(t){t.updateDisplay()}))}(this.__listening)},updateDisplay:function(){jP.each(this.__controllers,(function(t){t.updateDisplay()})),jP.each(this.__folders,(function(t){t.updateDisplay()}))}});var XC=LC,qC=function(){function t(t){this.runTime={fps:0,resolution:""},this.target=t.target,this.data=t.params,this.player=t.player,this.gui=this.createControllerGUI(),this.createStats(),this.addEventListener()}return t.prototype.createStats=function(){var t=this;this.stateId=setInterval((function(){t.player.view&&(t.controller.runTimeFps.setValue(t.player.fps.value),t.controller.drawCall.setValue(t.player.runtime.drawCall),t.controller.runTimeResolution.setValue(t.player.view.width+"*"+t.player.view.height))}),500)},t.prototype.createControllerGUI=function(){var t,e,n,i,r,o=new XC({autoPlace:!0,closed:!0});o.domElement.style.opacity=".6",o.domElement.style.transformOrigin="100% 0",o.domElement.style.transform="scale(1)",this.target.appendChild(o.domElement),o.domElement.style.position="absolute",o.domElement.style.right="0",o.domElement.style.top="0",o.domElement.style.zIndex="2";var s=o.add({FPS:0},"FPS",0),a=o.add({drawCall:0},"drawCall",0),l=o.add({"分辨率":""},"分辨率",""),u=o.add({"额外计算":0},"额外计算",0,200),h=o.addFolder("renderOptions");return this.controller={runTimeResolution:l,runTimeFps:s,drawCall:a,moreCalculation:u,minFPS:h.add({"最低fps":null!==(t=this.data.minFPS)&&void 0!==t?t:40},"最低fps",0,60),maxFPS:h.add({"最高fps":null!==(e=this.data.maxFPS)&&void 0!==e?e:50},"最高fps",0,60),resolution:h.add({"目标分辨倍率":null!==(n=this.data.resolution)&&void 0!==n?n:window.devicePixelRatio},"目标分辨倍率",.5,6),autoResolution:h.add({"自动分辨率":null!==(i=this.data.autoResolution)&&void 0!==i&&i},"自动分辨率",!0),autoFps:h.add({"自动fps":null===(r=this.data.autoFPS)||void 0===r||r},"自动fps",!0),transactionBgColor:h.addColor({"切页背景色":this.data.transactionBgColor},"切页背景色")},this.controller.runTimeFps.disabled=!0,this.controller.runTimeResolution.disabled=!0,o},t.prototype.addEventListener=function(){var t,e=this;this.controller.autoFps.onChange((function(t){e.data.autoFPS=t,e.player.updateConfig(e.data)})),this.controller.maxFPS.onChange((function(t){e.data.maxFPS=t,e.player.updateConfig(e.data)})),this.controller.minFPS.onChange((function(t){e.data.minFPS=t,e.player.updateConfig(e.data)})),this.controller.autoResolution.onChange((function(t){e.data.autoResolution=t,e.player.updateConfig(e.data)})),this.controller.resolution.onChange((function(t){e.data.resolution=t,e.player.updateConfig(e.data)})),this.controller.transactionBgColor.onChange((function(t){e.data.transactionBgColor=t,e.player.updateConfig(e.data)})),this.controller.moreCalculation.onChange((function(n){t&&e.player.app.ticker.remove(t),n>0&&(t=function(){for(var t="";t.length<8e3*n;)t+=Math.random().toString(32).substr(2);dM()(t)},e.player.app.ticker.add(t))}))},t.prototype.destroy=function(){try{window.clearInterval(this.stateId),this.target.removeChild(this.gui.domElement),this.gui.destroy()}catch(t){}},t}(),YC=function(){function t(t){var e=this;this.tasks=[],this.isDestroy=!1,this.schedule=function(){var t=e.tasks[0];t&&!e.isDestroy?e.fn(t).then((function(){e.tasks.splice(0,1),window.requestAnimationFrame(e.schedule)})):window.requestAnimationFrame(e.schedule)},this.fn=t,this.schedule()}return t.prototype.destroy=function(){this.isDestroy=!0},t.prototype.addTask=function(t){this.tasks.push(t)},t}(),ZC=function(){function t(t){this.autoUnlock=Object.create(null),this.locks=Object.create(null),this.available=!1,this.available=t}return t.prototype.addLock=function(t,e){var n=this;this.available&&(this.locks[t]=e,this.autoUnlock[t]=window.setTimeout((function(){delete n.locks[t]}),3e3))},t.prototype.unlock=function(t,e){this.available&&e&&this.locks[t]&&this.locks[t]===e&&(window.clearTimeout(this.autoUnlock[t]),delete this.locks[t])},t.prototype.isLocked=function(t){return!!this.available&&!!this.locks[t]},t}(),JC=function(){function t(){var t=this;this.tasks=[],this.isDestroy=!1,this.schedule=function(){var e=t.tasks.shift();e&&!t.isDestroy?(e.status="running",e.fn.apply(null).then((function(){window.requestAnimationFrame(t.schedule)})).catch((function(){window.requestAnimationFrame(t.schedule)}))):window.requestAnimationFrame(t.schedule)},this.schedule()}return t.prototype.getRunningTask=function(){return this.tasks[0]&&"running"===this.tasks[0].status?this.tasks[0]:null},t.prototype.addTask=function(t,e){var n={type:t,status:"wait",fn:e},i=this.getRunningTask();i&&t===i.type||(this.tasks=this.tasks.filter((function(e){return e.type!==t})),this.tasks.push(n))},t.prototype.destroy=function(){this.isDestroy=!0},t}(),KC=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$C=function(){return($C=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},QC=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))},tI=function(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};window.__slide_local_logger__||(window.__slide_local_logger__=o.createInstance({name:"_slide_local_log_",driver:o.INDEXEDDB,version:1}));var eI=window.ResizeObserver||DP,nI=function(t){return new Promise((function(e){return setTimeout(e,t)}))};function iI(t,e){return QC(this,void 0,void 0,(function(){var n;return tI(this,(function(i){switch(i.label){case 0:n=Date.now(),i.label=1;case 1:return!t()&&Date.now()-n<e?[4,nI(50)]:[3,3];case 2:return i.sent(),[3,1];case 3:return[2]}}))}))}var rI={syncDispatch:"syncDispatch",syncReceive:"syncReceive",syncEventLag:"syncEventLag",renderStart:"renderStart",renderEnd:"renderEnd",renderError:"renderError",slideChange:"slideChange",mainSeqStepStart:"mainSeqStepStart",mainSeqStepEnd:"mainSeqStepEnd",animateStart:"animateStart",animateEnd:"animateEnd",stateChange:"stateChange"},oI={taskId:"",url:"",currentSlideIndex:-1,mainSeqStep:-1,mainSeqState:null,mediaState:Object.create(null),interactiveSeqState:Object.create(null)},sI="";try{sI="0.5.1"}catch(t){sI="dev"}var aI=function(t){function e(n){var i=t.call(this)||this;return i.iosResetCache=[],i.needClearCacheImage=!1,i.version=sI,i.__slideState=Object(l.cloneDeep)(oI),i.userInputTime=0,i.isSyncingSlideState=!1,i.frozenTaskManager=new JC,i.randomId=Math.random().toString(32).substr(2),i.resize=!1,i.isAnimating=!1,i.renderingTaskManager=new kP,i.isLoading=!1,i.interactive=!0,i.renderingIndex=0,i.frameWidth=1,i.frameHeight=1,i.frame=document.createElement("div"),i.medianController=document.createElement("div"),i.frameResizeObserver=new eI((function(){return i.frameResizeHandler()})),i.timestamp=function(){return Date.now()},i.mode="local",i.enableGlobalClick=!1,i.lastEmitedState=null,i.playerController=null,i.isInitResized=!1,i.cacheImage=document.createElement("img"),i.isTouchStart=!1,i.touchStartId=void 0,i.taskId="",i.designWidth=0,i.designHeight=0,i._slideCount=0,i._dispatchIncrId=0,i._receiveIncrId=0,i.userInputHandle=function(){i.userInputTime=Date.now()},i.handleViewClick=function(){setTimeout((function(){var t=Date.now();Math.abs(t-i.userInputTime)>500&&i.enableGlobalClick&&i.nextStep()}))},i.handleViewTouchStart=function(){window.clearTimeout(i.touchStartId),i.isTouchStart=!0,i.touchStartId=setTimeout((function(){i.isTouchStart=!1}),350)},i.handleViewTouchEnd=function(){i.isTouchStart&&(i.isTouchStart=!1,i.handleViewClick())},i.handleSlideRef=function(){console.log(i),window.__slide=i},i.receiveSyncHandler=function(t){return QC(i,void 0,void 0,(function(){var e,n,i,r,o=this;return tI(this,(function(s){switch(s.label){case 0:return Object(l.isNumber)(t.incrId)&&(t.incrId&&t.incrId-this._receiveIncrId!=1&&this.emit(rI.syncEventLag),this._receiveIncrId=t.incrId||0),this.logger.info("sync receive "+JSON.stringify(t),this.taskId),"nextStep"!==t.type?[3,1]:(this.mainSeqStep!==t.next-1&&this.mainSeqStep+1!==this.mainSeqLength&&this.player?(this.setMainSeqStep(t.next,"start"),this.player.nextTick((function(){o.doNextStep(!0)}))):this.doNextStep(!0),[3,6]);case 1:return"prevStep"!==t.type?[3,2]:(0===this.mainSeqStep&&"idle"===this.mainSeqState||this.mainSeqStep===t.next+1||this.mainSeqStep+1===this.mainSeqLength?this.doPrevStep(!0):(this.setMainSeqStep(t.next+1,"start"),null===(e=this.player)||void 0===e||e.nextTick((function(){o.doPrevStep(!0)}))),[3,6]);case 2:return"interactiveAnim"!==t.type?[3,3]:(this.player?this.player.applyInteractiveAction(t.action):this.__slideState.interactiveSeqState[t.seqId].step+=1,[3,6]);case 3:return"renderSlide"!==t.type?[3,5]:[4,this.doRenderSlide(t.index,t.isForward)];case 4:return s.sent(),[3,6];case 5:"mediaPlay"===t.type?(null===(n=this.player)||void 0===n||n.setMediaState(t.id,!0),this.__slideState.mediaState[t.id]=t.state):"mediaPause"===t.type?(null===(i=this.player)||void 0===i||i.setMediaState(t.id,!1),this.__slideState.mediaState[t.id]=t.state):"mediaSeek"===t.type&&(null===(r=this.player)||void 0===r||r.setMediaCurrentTime(t.id,t.time),this.__slideState.mediaState[t.id]=t.state),s.label=6;case 6:return[2]}}))}))},i.handlePrevSlide=function(t){return void 0===t&&(t=!1),QC(i,void 0,void 0,(function(){var e,n;return tI(this,(function(i){switch(i.label){case 0:return this.player?[4,null===(n=this.player)||void 0===n?void 0:n.createSnapshotForNextSlide(!0)]:[2];case 1:return i.sent(),(e=this.player.prevSlideIndex)>=1&&(this.config.navigatorDelegate?this.config.navigatorDelegate.gotoPage(e):t?this.doRenderSlide(e,!1):this.renderSlide(e,!1)),[2]}}))}))},i.handleNextSlide=function(t){return void 0===t&&(t=!1),QC(i,void 0,void 0,(function(){var e,n;return tI(this,(function(i){switch(i.label){case 0:return this.player?[4,null===(n=this.player)||void 0===n?void 0:n.createSnapshotForNextSlide(!1)]:[2];case 1:return i.sent(),(e=this.player.nextSlideIndex)<=this.slideCount&&(this.config.navigatorDelegate?this.config.navigatorDelegate.gotoPage(e):t?this.doRenderSlide(e,!0):this.renderSlide(e,!0)),[2]}}))}))},i.handleGotoSlide=function(t){if(t<=i.slideCount&&t>=1){var e=i.slideState.currentSlideIndex<=t;i.renderSlide(t,e)}else-1===t&&i.renderSlide(i.slideCount,!0)},n.timestamp&&(i.timestamp=n.timestamp),n.rtcAudio&&(ZR.RtcAudioClazz=n.rtcAudio),i.logger={info:function(t,r){var o,s;(null===(o=n.logger)||void 0===o?void 0:o.info)&&(e._tempLog+="INFO - "+(new Date).toISOString()+" - {"+i.randomId+"}["+r+"] "+t+"\n\n",null===(s=n.logger)||void 0===s||s.info("["+r+"] "+t))},warn:function(t,r){var o,s;(null===(o=n.logger)||void 0===o?void 0:o.warn)&&(e._tempLog+="WARN - "+(new Date).toISOString()+" - {"+i.randomId+"}["+r+"] "+t+"\n\n",null===(s=n.logger)||void 0===s||s.warn("["+r+"] "+t))},error:function(t,r){var o,s;(null===(o=n.logger)||void 0===o?void 0:o.error)&&(e._tempLog+="ERROR - "+(new Date).toISOString()+" - {"+i.randomId+"}["+r+"] "+t+"\n\n",null===(s=n.logger)||void 0===s||s.error("["+r+"] "+t))}},i.config=n,i.syncQueue=new YC(i.receiveSyncHandler),i.mode=n.mode,i.lock=new ZC("interactive"===i.mode),i.anchor=n.anchor,i.enableGlobalClick=!Object(l.isUndefined)(n.enableGlobalClick)&&n.enableGlobalClick,i.resize=n.resize||!1,i.interactive=n.interactive,i.cacheImage.style.position="absolute",i.cacheImage.style.zIndex="100",i.frame.style.cssText="width:100%;height:100%;display:flex;justify-content:center;align-items:center;visibility:hidden;position:relative;z-index:1;",i.setMedianControllerAttribute(),i.frame.appendChild(i.medianController),i.anchor.appendChild(i.frame),i.frameResizeObserver.observe(i.frame),i.on(rI.syncReceive,(function(t){i.lock.unlock(t.type,t.uuid),i.syncQueue.addTask(t)})),i.renderingTaskManager.eventHub.on("task-error",(function(t){var e=t.error,n=t.task,r=qE.transform(e);r.errorType===VE.RuntimeWarn?i.logger.warn(r.message,i.taskId):i.logger.error(r.message,i.taskId),i.isLoading=!1,i.emit(rI.renderError,{error:r,index:n.slideIndex})})),window.addEventListener("__slide_ref__",i.handleSlideRef),i.resizeView=Object(l.debounce)(i.resizeView.bind(i),50),i.player=i.initPlayer(n),(null==n?void 0:n.controller)&&i.createController(),i.player.view&&i.frame.appendChild(i.player.view),i.handleViewClick=Object(l.debounce)(i.handleViewClick,300),i.player.errorChannel.on("error",(function(t,e){var n=qE.transform(t);n.errorType===VE.RuntimeWarn?i.logger.warn(n.message,i.taskId):i.logger.error(n.message,i.taskId),i.isLoading=!1,e===i.renderingIndex&&i.emit(rI.renderError,{error:t,index:e})})),i.logger.info("new slide",""),i}return KC(e,t),e.flushLog=function(){return QC(this,void 0,void 0,(function(){return tI(this,(function(t){switch(t.label){case 0:return e._tempLog.length>0?[4,e.logStore.setItem("run_time_log_"+e._tempLogIndex,e._tempLog)]:[3,2];case 1:t.sent(),e._tempLog="",e._tempLogIndex+=1,t.label=2;case 2:return[2]}}))}))},Object.defineProperty(e.prototype,"dispatchIncrId",{get:function(){return this._dispatchIncrId++},enumerable:!1,configurable:!0}),e.prototype.initPlayer=function(t){var e,n,i,r=this,o=new ZR({mode:this.mode,useLocalCache:!!Object(l.isUndefined)(this.config.useLocalCache)||this.config.useLocalCache,logger:this.logger,resourceTimeout:Object(l.isUndefined)(this.config.resourceTimeout)?15e3:this.config.resourceTimeout,loadDelegate:this.config.loaderDelegate});return o.setInteractive(this.interactive),o.updateConfig(t.renderOptions||{}),o.on(YR.renderStart,(function(t){r.isLoading=!0,r.emit(rI.renderStart,t)})),o.on(YR.renderEnd,(function(t){r.isLoading=!1,r.player&&(r.designHeight=r.player.designHeight,r.designWidth=r.player.designWidth,r.cacheImage.style.width=r.player.designWidth+"px",r.cacheImage.style.height=r.player.designHeight+"px",r._slideCount=r.player.slideCount),r.emit(rI.renderEnd,t)})),o.on(YR.slideChange,(function(t){r.__slideState.currentSlideIndex=t,r.emit(rI.slideChange,t)})),o.on(YR.mainSeqStateChange,(function(t){r.__slideState.mainSeqState=t,r.emitStateChange()})),o.on(YR.mainSeqStepChange,(function(t){r.__slideState.mainSeqStep=t,r.emitStateChange()})),o.on(YR.interactiveSeqStateChange,(function(t){var e=t.id,n=t.state;r.__slideState.interactiveSeqState[e]=n,r.emitStateChange()})),o.on(YR.animateStart,(function(){!0!==r.isAnimating&&(r.isAnimating=!0,r.emit(rI.animateStart))})),o.on(YR.animateEnd,(function(){!1!==r.isAnimating&&(r.isAnimating=!1,r.emit(rI.animateEnd))})),o.on(YR.interactiveSeqAction,(function(t){var e=t.action,n=t.seqId;r.emitSyncDispatch({slideIndex:r.__slideState.currentSlideIndex,type:"interactiveAnim",action:e,seqId:n}),r.emitStateChange()})),o.on(YR.mainSeqStepStart,(function(t){r.emit(rI.mainSeqStepStart,t)})),o.on(YR.mainSeqStepEnd,(function(t){r.emit(rI.mainSeqStepEnd,t)})),o.on(YR.mediaPlay,(function(t){var e={type:"play",time:r.timestamp()-1e3*t.time};r.__slideState.mediaState[t.id]=e,r.emitSyncDispatch({slideIndex:r.__slideState.currentSlideIndex,type:"mediaPlay",id:t.id,state:e}),r.emitStateChange()})),o.on(YR.mediaPause,(function(t){var e={type:"pause",time:t.time};r.__slideState.mediaState[t.id]=e,r.emitSyncDispatch({slideIndex:r.__slideState.currentSlideIndex,type:"mediaPause",id:t.id,state:e}),r.emitStateChange()})),o.on(YR.mediaSeek,(function(t){var e={type:"pause",time:0};t.isPlaying?(e.type="play",r.__slideState.mediaState[t.id]?e.time=r.__slideState.mediaState[t.id].time-1e3*t.time:e.time=r.timestamp()-1e3*t.time,r.__slideState.mediaState[t.id]=e):(e.type="pause",e.time=t.time,r.__slideState.mediaState[t.id]=e),r.emitSyncDispatch({slideIndex:r.__slideState.currentSlideIndex,type:"mediaSeek",id:t.id,time:t.time,state:e}),r.emitStateChange()})),o.on(YR.requestPrevSlide,(function(t){r.handlePrevSlide(t)})),o.on(YR.requestNextSlide,(function(t){r.handleNextSlide(t)})),o.on(YR.requestGotoSlide,(function(t){r.config.navigatorDelegate?r.config.navigatorDelegate.gotoPage(t):r.handleGotoSlide(t)})),null===(e=o.view)||void 0===e||e.addEventListener("touchend",this.handleViewTouchEnd),null===(n=o.view)||void 0===n||n.addEventListener("touchstart",this.handleViewTouchStart),null===(i=o.view)||void 0===i||i.addEventListener("click",this.handleViewClick),o.on(YR.userInput,this.userInputHandle),o},e.prototype.createController=function(){this.player&&(this.playerController=new qC({player:this.player,params:this.player.config||{},target:this.frame}))},e.prototype.setMedianControllerAttribute=function(){this.medianController.className="median-container",this.medianController.style.position="absolute",this.medianController.style.left="0",this.medianController.style.top="0",this.medianController.style.zIndex="2"},e.prototype.frameResizeHandler=function(){var t=this.frame.getBoundingClientRect(),e=t.width,n=t.height;this.frameWidth=e,this.frameHeight=n,this.resizeView()},e.prototype.resizeView=function(){var t,e,n=this,i=this.width,r=this.height;if(i>0&&r>0){var o=this.frameWidth/i,s=o*r;s>this.frameHeight&&(o*=this.frameHeight/s),null===(t=this.player)||void 0===t||t.scaleView(o,this.resize),this.cacheImage.style.transform="scale("+o+")",this.medianController.style.transform="scale("+o+")",this.medianController.style.top=(this.frameHeight-r*o)/2+"px",this.medianController.setAttribute("data-scale",o.toString()),this.isInitResized||(this.isInitResized=!0,null===(e=this.player)||void 0===e||e.clock.setTimeout((function(){n.frame.style.visibility="visible"}),32))}},e.prototype.setSlideState=function(t){var e,n,i;return QC(this,void 0,void 0,(function(){var r,o=this;return tI(this,(function(s){switch(s.label){case 0:return this.isSyncingSlideState=!0,this.logger.info("stateChange receive "+JSON.stringify(t),this.taskId),t.taskId&&t.taskId!==this.__slideState.taskId&&(this.__slideState.taskId=t.taskId,null===(e=this.player)||void 0===e||e.setResourceData(t.taskId,this.__slideState.url)),t.url&&t.url!==this.__slideState.url&&(this.__slideState.url=t.url,null===(n=this.player)||void 0===n||n.setResourceData(this.__slideState.taskId,t.url)),Number.isInteger(t.currentSlideIndex)&&t.currentSlideIndex!==this.__slideState.currentSlideIndex?(this.__slideState.currentSlideIndex=t.currentSlideIndex,[4,this.doRenderSlide(t.currentSlideIndex)]):[3,2];case 1:s.sent(),s.label=2;case 2:return[4,null===(i=this.player)||void 0===i?void 0:i.clock.waitUntil((function(){var e,n;return(null===(e=o.player)||void 0===e?void 0:e.currentIndex)===t.currentSlideIndex&&(null===(n=o.player)||void 0===n?void 0:n.currentStage)}),3e3)];case 3:return s.sent(),r=!1,Number.isInteger(t.mainSeqStep)&&t.mainSeqStep!==this.__slideState.mainSeqStep&&(r=!0,this.__slideState.mainSeqStep=t.mainSeqStep),t.mainSeqState&&t.mainSeqState!==this.__slideState.mainSeqState&&(r=!0,this.__slideState.mainSeqState=t.mainSeqState),r&&this.setMainSeqStep(this.__slideState.mainSeqStep,"idle"===this.__slideState.mainSeqState?"start":"end"),t.mediaState&&(this.initMedia(t),this.__slideState.mediaState=t.mediaState),t.interactiveSeqState&&(this.initInteractiveSeq(t),this.__slideState.interactiveSeqState=t.interactiveSeqState),this.isSyncingSlideState=!1,[2]}}))}))},e.prototype.initInteractiveSeq=function(t){var e;for(var n in t.interactiveSeqState){var i=t.interactiveSeqState[n];null===(e=this.player)||void 0===e||e.setInteractiveSeqState(n,i.step,"end"===i.state?"end":"start")}},e.prototype.initMedia=function(t){var e,n,i=this,r=function(r){var s=t.mediaState[r],a=o.__slideState.mediaState[r];if(a&&s.type===a.type&&s.time===a.time)return"continue";"play"===s.type?null===(e=o.player)||void 0===e||e.setMediaState(r,!0).then((function(){var t,e=i.timestamp();null===(t=i.player)||void 0===t||t.setMediaCurrentTime(r,(e-s.time)/1e3)})):null===(n=o.player)||void 0===n||n.setMediaState(r,!1).then((function(){var t;null===(t=i.player)||void 0===t||t.setMediaCurrentTime(r,s.time)}))},o=this;for(var s in t.mediaState)r(s)},Object.defineProperty(e.prototype,"slideCount",{get:function(){return this._slideCount},enumerable:!1,configurable:!0}),e.prototype.getSizeAsync=function(){return QC(this,void 0,void 0,(function(){var t;return tI(this,(function(e){switch(e.label){case 0:if(this.width>0&&this.height>0)return[2,[this.width,this.height]];e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(this.__slideState.url+"/"+this.__slideState.taskId+"/jsonOutput/slide-1.json")];case 2:return[4,e.sent().json()];case 3:return[2,[(t=e.sent()).width,t.height]];case 4:return e.sent(),[2,[0,0]];case 5:return[2]}}))}))},e.prototype.getSlideCountAsync=function(){return QC(this,void 0,void 0,(function(){return tI(this,(function(t){switch(t.label){case 0:if(this._slideCount>0)return[2,this._slideCount];t.label=1;case 1:return t.trys.push([1,4,,5]),[4,fetch(this.__slideState.url+"/"+this.__slideState.taskId+"/jsonOutput/slide-1.json")];case 2:return[4,t.sent().json()];case 3:return[2,t.sent().slideCount];case 4:return t.sent(),[2,0];case 5:return[2]}}))}))},Object.defineProperty(e.prototype,"slideState",{get:function(){return this.__slideState.mainSeqState=this.mainSeqState,this.__slideState.mainSeqStep=this.mainSeqStep,JSON.parse(JSON.stringify(this.__slideState))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mainSeqLength",{get:function(){var t;return(null===(t=this.player)||void 0===t?void 0:t.mainSeqLength())||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mainSeqStep",{get:function(){var t;return(null===(t=this.player)||void 0===t?void 0:t.mainSeqStep())||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mainSeqState",{get:function(){var t;return(null===(t=this.player)||void 0===t?void 0:t.mainSeqState())||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderOptions",{get:function(){var t;return(null===(t=this.player)||void 0===t?void 0:t.config)||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drawCall",{get:function(){var t;return(null===(t=this.player)||void 0===t?void 0:t.runtime.drawCall)||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderFps",{get:function(){var t;return(null===(t=this.player)||void 0===t?void 0:t.runtime.fps)||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"runtimeFps",{get:function(){var t;return(null===(t=this.player)||void 0===t?void 0:t.fps.value)||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"view",{get:function(){var t;return(null===(t=this.player)||void 0===t?void 0:t.view)||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.designWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.designHeight},enumerable:!1,configurable:!0}),e.prototype.updateRenderOption=function(t){this.player&&(this.player.updateConfig(t),this.renderOptions&&(this.config.renderOptions=this.renderOptions))},e.prototype.setResource=function(t,e){var n;this.taskId=t,null===(n=this.player)||void 0===n||n.setResourceData(t,e),this.__slideState.taskId=t,this.__slideState.url=e,this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"setResource",taskId:t,url:e})},e.prototype._renderSlide=function(t){var e;return QC(this,void 0,void 0,(function(){var n=this;return tI(this,(function(i){switch(i.label){case 0:return this.renderingIndex=t,this.player&&t===this.player.currentIndex?[2]:((ZR.platform.isIOS()||ZR.platform.isAndroid())&&this.iosResetCache.indexOf(t)<0&&this.iosResetCache.push(t),[4,null===(e=this.player)||void 0===e?void 0:e.renderSlide(t)]);case 1:return i.sent(),this.__slideState.currentSlideIndex=t,this.resizeView(),this.__slideState.interactiveSeqState={},this.emitStateChange(),setTimeout((function(){var t,e;if("hidden"===(null===(e=null===(t=n.player)||void 0===t?void 0:t.view)||void 0===e?void 0:e.style.visibility)&&(n.player.view.style.visibility="visible"),"hidden"===n.frame.style.visibility&&(n.frame.style.visibility="visible"),n.needClearCacheImage)try{n.frame.removeChild(n.cacheImage)}catch(t){}}),100),[2]}}))}))},e.prototype.renderSlide=function(t,e){if(void 0===e&&(e=!0),this.player){var n=Number(t);(n!==this.player.currentIndex||this.renderingTaskManager.hasStartTask())&&(n>this.slideCount&&this.slideCount>0||this.poseRenderSlide(n,e))}},e.prototype.needCreateNewPlayer=function(){var t=ZR.platform.isLowGpuMemory()?15:30;return(ZR.platform.isIOS()||ZR.platform.isAndroid())&&this.iosResetCache.length>t},e.prototype.poseRenderSlide=function(t,e){"interactive"===this.mode?this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"renderSlide",index:t,isForward:e}):"sync"===this.mode?(this.doRenderSlide(t,e),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"renderSlide",index:t,isForward:e})):this.doRenderSlide(t,e)},e.prototype.doRenderSlide=function(t,e){var n,i,r,o=this;if(void 0===e&&(e=!0),!this.player)return Promise.resolve();if(this.needCreateNewPlayer()&&(this.iosResetCache=[],this.iosNewPlayer=this.initPlayer(this.config),this.iosNewPlayer.setResourceData(this.__slideState.taskId,this.__slideState.url)),this.iosNewPlayer){var s=this.player.getSnapshot();this.cacheImage.src=s,this.frame.appendChild(this.cacheImage),this.player.destroy(),null===(n=this.playerController)||void 0===n||n.destroy(),this.player=this.iosNewPlayer,this.iosNewPlayer=void 0,(null===(i=this.config)||void 0===i?void 0:i.controller)&&this.createController(),this.needClearCacheImage=!0,(null===(r=null==this?void 0:this.player)||void 0===r?void 0:r.view)&&(this.player.view.style.visibility="hidden",this.frame.appendChild(this.player.view))}var a=Math.random().toString(32).substr(2);return this.player.isForward=e,this.renderingTaskManager.addTask((function(){return o._renderSlide(t)}),t,a),new Promise((function(t){o.renderingTaskManager.eventHub.once("task-end-"+a,t)}))},e.prototype.nextStep=function(){!this.isLoading&&this.player&&this.interactive?this.player.mainSeqHasNextStep()?"interactive"===this.mode?this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"nextStep",next:this.player.mainSeqStep()+1}):"sync"===this.mode?(this.doNextStep(),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"nextStep",next:this.player.mainSeqStep()})):this.doNextStep():this.handleNextSlide():this.logger.info("prevent nextStep. "+this.isLoading+" "+this.player+" "+this.interactive,this.taskId)},e.prototype.doNextStep=function(t){if(void 0===t&&(t=!1),this.player){this.player.nextStep(t);var e=this.player.mainSeqStep();this.__slideState.mainSeqStep=e,this.emitStateChange()}},e.prototype.prevStep=function(){!this.isLoading&&this.player&&this.interactive?this.player.mainSeqHasPrevStep()?"interactive"===this.mode?this.emitSyncDispatch({type:"prevStep",slideIndex:this.__slideState.currentSlideIndex,next:this.player.mainSeqStep()-1}):"sync"===this.mode?(this.doPrevStep(),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"prevStep",next:this.player.mainSeqStep()})):this.doPrevStep():this.handlePrevSlide():this.logger.info("prevent nextStep. "+this.isLoading+" "+this.player+" "+this.interactive,this.taskId)},e.prototype.doPrevStep=function(t){if(void 0===t&&(t=!1),this.player){this.player.prevStep(t);var e=this.player.mainSeqStep();this.__slideState.mainSeqStep=e,this.emitStateChange()}},e.prototype.isSlideStateReady=function(t){return t.taskId.length>0&&t.url.length>0&&t.currentSlideIndex>0},e.prototype.emitStateChange=function(){if("local"!==this.mode&&!this.isSyncingSlideState){var t=this.slideState;!Object(l.isEqual)(this.lastEmitedState,t)&&this.isSlideStateReady(t)&&(this.lastEmitedState=t,this.emit(rI.stateChange,t),this.logger.info("stateChange dispatch "+JSON.stringify(this.slideState),this.taskId))}},e.prototype.emitSyncDispatch=function(t){if(!this.lock.isLocked(t.type)){var e=Math.random().toString(32).substr(2);this.lock.addLock(t.type,e);var n=$C($C({},t),{uuid:e});"sync"===this.config.mode&&(n.incrId=this.dispatchIncrId),this.emit(rI.syncDispatch,n),this.logger.info("sync dispatch "+JSON.stringify(n),this.taskId)}},e.prototype.setMainSeqStep=function(t,e){var n;null===(n=this.player)||void 0===n||n.setMainSeqStep(t,e)},e.prototype.setInteractive=function(t){var e;this.interactive=t,null===(e=this.player)||void 0===e||e.setInteractive(t)},e.prototype.pause=function(){var t;null===(t=this.player)||void 0===t||t.pause()},e.prototype.resume=function(){var t;null===(t=this.player)||void 0===t||t.resume()},e.prototype._doFrozen=function(){var t;return QC(this,void 0,void 0,(function(){var e,n,i,r=this;return tI(this,(function(o){switch(o.label){case 0:return this.view&&this.player?[4,this.player.clock.waitUntil((function(){return!r.isLoading}),6e4)]:[3,2];case 1:for(n in o.sent(),e=this.player.getSnapshot()||"",this.cacheImage.src=e,this.frame.appendChild(this.cacheImage),this.player.destroy(),null===(t=this.playerController)||void 0===t||t.destroy(),this.player=void 0,this.__slideState.mediaState)i=this.__slideState.mediaState[n],this.__slideState.mediaState[n]=$C($C({},i),{frozenTime:this.timestamp()});o.label=2;case 2:return[2]}}))}))},e.prototype.frozen=function(){var t=this;this.frozenTaskManager.addTask("frozen",(function(){return t._doFrozen()}))},e.prototype._doRelease=function(){var t,e;return QC(this,void 0,void 0,(function(){var n,i,r,o;return tI(this,(function(s){switch(s.label){case 0:if(this.player)return[2];for(i in this.player=this.initPlayer(this.config),(null===(t=this.config)||void 0===t?void 0:t.controller)&&this.createController(),this.player.view&&(this.frame.appendChild(this.player.view),this.player.view.style.visibility="hidden"),n=this.__slideState,this.__slideState=Object(l.cloneDeep)(oI),n.mediaState)"play"===(r=n.mediaState[i]).type&&(o=Math.max(null!==(e=r.frozenTime)&&void 0!==e?e:0,r.time),r.time=this.timestamp()-(o-r.time),r.frozenTime=void 0);return[4,this.setSlideState(n)];case 1:return s.sent(),[4,this.player.clock.delay(333)];case 2:s.sent(),this.player.view&&(this.player.view.style.visibility="visible");try{this.frame.removeChild(this.cacheImage)}catch(t){}return[2]}}))}))},e.prototype.release=function(){var t=this;this.frozenTaskManager.addTask("release",(function(){return t._doRelease()}))},e.prototype._doDestroy=function(){var t,e,n,i;this.playerController&&this.playerController.destroy(),this.frameResizeObserver.disconnect(),null===(t=this.player)||void 0===t||t.removeAllListeners(),null===(e=this.player)||void 0===e||e.destroy(),null===(n=this.player)||void 0===n||n.removeAllListeners(),this.logger={warn:function(){return{}},info:function(){return{}},error:function(){return{}}},this.syncQueue.destroy(),this.renderingTaskManager.destroy(),this.frozenTaskManager.destroy(),window.removeEventListener("__slide_ref__",this.handleSlideRef),this.removeAllListeners();try{(null===(i=this.player)||void 0===i?void 0:i.view)&&this.anchor.removeChild(this.player.view),this.anchor.removeChild(this.frame)}catch(t){}this.logger.info("after destroy slide","")},e.prototype.waitLoadEnd=function(){return QC(this,void 0,void 0,(function(){var t;return tI(this,(function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return this.isLoading&&t<10?[4,nI(100)]:[3,3];case 2:return e.sent(),t+=1,[3,1];case 3:return[2]}}))}))},e.prototype.destroy=function(){var t=this;this.logger.info("pre destroy slide",""),this.isLoading?this.waitLoadEnd().then((function(){t._doDestroy()})):this._doDestroy()},e.prototype.clearSlideCache=function(){var t;null===(t=this.player)||void 0===t||t.clearLocalCache()},e.prototype.hasNextStep=function(){if(!this.player)return!1;var t=this.player.currentIndex===this.slideCount,e=0===this.mainSeqLength||this.mainSeqStep>=this.mainSeqLength-1,n="end"===this.mainSeqState||"running"===this.mainSeqState||null==this.mainSeqState;return!(t&&e&&n)},e.prototype.hasPrevStep=function(){if(!this.player)return!1;var t=1===this.player.currentIndex,e=0===this.mainSeqLength||0===this.mainSeqStep,n="idle"===this.mainSeqState||null===this.mainSeqState;return!(t&&e&&n)},e.clearLocalCache=function(){ZR.clearLocalCache()},e.disposeLocalCache=function(){},e.logStore=o.createInstance({name:"__slide_local_log__",driver:o.INDEXEDDB,version:1}),e._tempLog="",e._tempLogIndex=1,e.handleLogDownload=function(){return QC(void 0,void 0,void 0,(function(){var t,n,i,r,o,s,a;return tI(this,(function(l){switch(l.label){case 0:return t="",e.logStore?[4,e.logStore.keys()]:[3,5];case 1:n=(l.sent()||[]).sort((function(t,e){return parseInt(t.replace("run_time_log_",""))-parseInt(e.replace("run_time_log_",""))})),i=0,r=n,l.label=2;case 2:return i<r.length?(o=r[i],s=t,[4,e.logStore.getItem(o)]):[3,5];case 3:t=s+(l.sent()||""),l.label=4;case 4:return i++,[3,2];case 5:return(a=document.createElement("a")).setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),a.setAttribute("download","slide_log"),a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a),window.__slideLogText=t,[2]}}))}))},e}(a.a);aI.logStore.clear(),window.addEventListener("__slide_log__",aI.handleLogDownload),window.setInterval((function(){aI.flushLog().catch((function(){}))}),1e4)}]);
|
|
250
|
+
*/vb.registerPlugin("accessibility",ny),vb.registerPlugin("extract",Fb),vb.registerPlugin("interaction",py),vb.registerPlugin("particle",KT),vb.registerPlugin("prepare",iS),vb.registerPlugin("batch",Ab),vb.registerPlugin("tilingSprite",cS),$b.registerPlugin(NS),$b.registerPlugin(cT),$b.registerPlugin(PT),$b.registerPlugin(WT),$b.registerPlugin(oS),Lb.registerPlugin(oy),Lb.registerPlugin(Qb);var VE,WE={AlphaFilter:FS,BlurFilter:aE,BlurFilterPass:sE,ColorMatrixFilter:uE,DisplacementFilter:cE,FXAAFilter:pE,NoiseFilter:NE};class XE extends a.a{constructor(){super(),this.prevTime=-1,this.times=0,this.valueTotal=0,this.destroyed=!1,this.value=0,this.calcFps()}calcFps(){requestAnimationFrame(t=>{const e=t-this.prevTime;this.valueTotal+=e,this.times+=1,this.times>20&&(this.value=Math.floor(1e3*this.times/this.valueTotal),this.valueTotal=0,this.times=0,this.destroyed||this.emit("update",this.value)),this.prevTime=t,this.destroyed||this.calcFps()})}destroy(){this.destroyed=!0}}!function(t){t.ResourceError="RESOURCE_ERROR",t.RuntimeError="RUNTIME_ERROR",t.RuntimeWarn="RUNTIME_WARN",t.CanvasCrash="CANVAS_CRASH"}(VE||(VE={}));class qE extends Error{constructor(t,e){var n,i;super(e),n=this,i=new.target.prototype,Object.setPrototypeOf?Object.setPrototypeOf(n,i):n.__proto__&&(n.__proto__=i),this.errorType=t,this.errorMsg=e}static transform(t){return t instanceof qE?t:new qE(VE.RuntimeError,t.message)}}function YE(){return function(t,e,n){const i=n.value;n.value=function(...t){try{return i.apply(this,t)}catch(t){throw new qE(VE.RuntimeWarn,t.message)}}}}var ZE=n(6),JE=n.n(ZE);function KE(t,e,n=5){return Math.abs(t-e)<=Math.pow(10,-n)}function $E(t){return Math.floor(1e6*t)/1e6}class QE{constructor(){this.point={x:0,y:0},this.slope=Math.PI/4}static fromPointSlope(t,e){const n=new QE;return n.point=t,n.slope=e,n}resolveY(t){return Math.tan(this.slope)*(t-this.point.x)+this.point.y}distanceToLinearEquation(t){return KE(this.slope,t.slope)?this.distanceToPoint(t.point):-1}distanceToPoint(t){let e=0;if(Math.tan(this.slope)*(t.x-this.point.x)+this.point.y===t.y)return 0;e=this.slope>=Math.PI/2?this.slope-Math.PI/2:Math.PI/2+this.slope;const n=QE.fromPointSlope(t,e),i=this.crossPoint(n);return i?Math.ceil(Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2))):0}crossPoint(t){if(KE(t.slope,this.slope))return null;let e=0,n=0;const i=Math.tan(t.slope),r=Math.tan(this.slope),{x:o,y:s}=this.point,{x:a,y:l}=t.point;return KE(this.slope,Math.PI/2)?(e=this.point.x,n=i*(e-a)+l):KE(t.slope,Math.PI/2)?(e=t.point.x,n=r*(e-o)+s):KE(this.slope,Math.PI)||KE(this.slope,0)?(n=this.point.y,e=(n-l)/i+a):KE(t.slope,Math.PI)||KE(t.slope,0)?(n=t.point.y,e=(n-s)/r+o):(e=(i*a-l+s-r*o)/(i-r),n=r*(e-o)+s),{x:e,y:n}}}var tM=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};function eM(){return Date.now().toString(32)+Math.random().toString(32).substring(2)}const nM="__delay_resolve_result__";function iM(t,e){return tM(this,void 0,void 0,(function*(){const n=yield Promise.race([t(),(i=e,new Promise(t=>{setTimeout(()=>{t(nM)},i)}))]);var i;return n===nM?nM:n}))}var rM=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};function oM(t,e){return rM(this,void 0,void 0,(function*(){const n=yield iM(()=>fetch(t),e);if(n===nM)throw new qE(VE.ResourceError,`"${t}" loaded timeout"`);if(!n.ok)throw new qE(VE.ResourceError,`"${t}" loaded failed with status "${n.status}"`);return n}))}class sM{constructor(t,e,n,i,r){this.timeout=15e3,this.useCache=!1,this.taskId="",this.delegate=null,this.useCache=e,this.localStorage=t,this.logger=n,this.timeout=i,this.delegate=r||null}attachTaskId(t){this.taskId=t}fetchJson(t){return rM(this,void 0,void 0,(function*(){let e;if(this.useCache&&(this.logger.info("load resource from cache. "+t,this.taskId||""),e=yield this.localStorage.getItem(t)),e)return this.logger.info("cache hit. "+t,this.taskId||""),e;{let e;if(this.delegate){this.logger.info("load resource by delegate. "+t,this.taskId||"");const n=yield iM(()=>this.delegate.loadJson(t),this.timeout);if(n===nM)throw new qE(VE.ResourceError,`"${t}" loaded timeout"`);e=JSON.parse(n)}else this.logger.info("load resource from server. "+t,this.taskId||""),e=yield(yield oM(""+t,this.timeout)).json();return this.logger.info("load end. "+t,this.taskId||""),this.useCache&&this.localStorage.setItem(t,e).catch(()=>{}),e}}))}fetchPng(t){return rM(this,void 0,void 0,(function*(){let e;if(this.useCache&&(this.logger.info("load resource from cache. "+t,this.taskId||""),e=yield this.localStorage.getItem(t)),e)return this.logger.info("cache hit. "+t,this.taskId||""),e;{let n;if(this.delegate){if(this.logger.info("load resource by delegate. "+t,this.taskId||""),n=yield iM(()=>this.delegate.loadImage(t),this.timeout),n===nM)throw new qE(VE.ResourceError,`"${t}" loaded timeout"`)}else{this.logger.info("load resource from server. "+t,this.taskId||"");const e=yield oM(t,this.timeout);n=yield e.blob()}return e=yield function(t){return new Promise((e,n)=>{const i=new FileReader;i.onload=()=>{e(i.result)},i.onerror=()=>{n(new qE(VE.ResourceError,"Failed parse blob data."))},i.readAsDataURL(t)})}(n),this.logger.info("load end. "+t,this.taskId||""),this.useCache&&this.localStorage.setItem(t,e).catch(()=>{}),e}}))}destroy(){}}var aM=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class lM{constructor(t){this.isPaused=!1,this.timestamp=0,this.callbackList=[],this.onTimeUpdate=t=>{const e=t/(mv.TARGET_FPMS||.06);if(!this.isPaused){this.timestamp+=e,this.callbackList=this.callbackList.filter(t=>t&&!t.applied);let{length:t}=this.callbackList;for(let e=0;e<t;e++){const n=this.callbackList[e];if(n&&!n.applied){if(!(n.triggerTime<=this.timestamp))break;n.running=!0,n.fn(),n.applied=!0,t=this.callbackList.length}}}},this.ticker=t,this.ticker.add(this.onTimeUpdate)}setTimeout(t,e){const n=eM(),i=this.timestamp+Math.max(e||16,16);return this.callbackList.push({fn:t,triggerTime:i,id:n,applied:!1,running:!1}),this.callbackList.sort((t,e)=>t.triggerTime-e.triggerTime),n}clearTimeout(t){const e=this.callbackList.findIndex(e=>e.id===t);e>=0&&!this.callbackList[e].running&&this.callbackList.splice(e,1)}delay(t){return new Promise(e=>{this.setTimeout(e,t)})}waitUntil(t,e){return aM(this,void 0,void 0,(function*(){const n=this.timestamp;for(;!t()&&this.timestamp-n<e;)yield this.delay(50)}))}pause(){this.isPaused=!0}resume(){this.isPaused=!1}}var uM=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class hM{constructor(t){this.gifs=Object.create(null),this.textures=Object.create(null),this.frames=Object.create(null),this.spriteSheets=[],this.loader=t}getTexture(t){return this.textures[t]||null}getFrameData(t){return this.frames[t]}getGifFrames(t){return this.gifs[t]?this.gifs[t].filter(t=>!!t):[]}loadSpriteSheetItem(t,e,n){return uM(this,void 0,void 0,(function*(){const i=yield this.loader.fetchJson(`${t}/${e}/jsonOutput/${n}.json`),r=yield this.loader.fetchPng(`${t}/${e}/jsonOutput/${n}.png`),o=document.createElement("img");o.src=r,yield new Promise((t,e)=>{o.onload=()=>t(""),o.onerror=()=>e()});const s=new wy(o),a=new rS(s,i);yield new Promise(t=>{a.parse(()=>t(""))}),this.spriteSheets.push(a),Object.keys(a.textures).forEach(t=>{const e=t.match(/^(.+)_gif_(\d+)$/);if(e&&e[1]&&e[2]){const n=e[1];this.gifs[n]||(this.gifs[n]=[]);const i=parseInt(e[2],10);this.gifs[n][i]=a.textures[t]}else this.frames[t]=i.frames[t],this.textures[t]=a.textures[t]})}))}destroy(){this.spriteSheets.forEach(t=>t.destroy(!0)),this.spriteSheets=[],this.gifs=Object.create(null),this.textures=Object.create(null),this.frames=Object.create(null)}}var cM=n(3),dM=n.n(cM);function pM(t,e,n){let i,r;const o=Math.round(t)%360;if(o%180==0)i=Math.cos(o*(Math.PI/180))*e,r=0;else if(o%90==0)i=0,r=Math.sin(o*(Math.PI/180))*n;else{const t=function(t){const e=t*Math.PI/180;return Math.tan(e)}(o);i=e*n/Math.sqrt(Math.pow(n,2)+Math.pow(e*t,2)),(o>90&&o<270||o<-90&&o>-270)&&(i=-i),r=t*i}return{x:i,y:r}}function fM(t,e,n,i,r,o){const s=t,a=e;let l,u,h,c,d;if(0===Math.round(i))l=r,u=o,d=0;else if(Math.round(i)>=360)l=r,u=o,h=r+2*t*Math.abs(Math.cos(-n/180*Math.PI)),c=o+2*e*Math.sin(-n/180*Math.PI),d=1;else{const t=-n,e=-(n+i),{x:h,y:c}=pM(t,s,a),p=r-h,f=o+c,{x:m,y:g}=pM(e,s,a);l=m+p,u=f-g,d=i>=-360&&i<-180?1:i>=-180&&i<0||i>0&&i<180?0:1}return{radiusX:s,radiusY:a,xAxisRotation:0,largeArcFlag:d,sweepFlag:i>0?1:0,endX:l,endY:u,middleX:h,middleY:c}}class mM{constructor(){this.pool=[]}getObject(t){const e=this.pool.find(t=>!t.isUsed);if(e)return e.isUsed=!0,e.obj;{const e={obj:this.createObject(),isUsed:!0,group:t};return this.pool.push(e),e.obj}}collectObject(t){const e=this.pool.find(e=>e.obj===t);e&&(e.isUsed=!1,this.resetObject(e.obj))}collectObjectByGroup(t){this.pool.filter(e=>e.group===t).forEach(t=>this.collectObject(t.obj))}}const gM=new class extends mM{createObject(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("version","1.1"),t}resetObject(t){t.removeAttribute("viewBox"),t.removeAttribute("width"),t.removeAttribute("height"),t.innerHTML=""}};const vM=new class extends mM{createObject(){return document.createElement("img")}resetObject(t){t.removeAttribute("src")}};var _M=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class yM{constructor(){this.imgElements=[],this.svgElements=[],this.idToHashMap=Object.create(null),this.textures=Object.create(null),this.graphics=[],this.hashToIdMap=Object.create(null)}render(t,e,n){return _M(this,void 0,void 0,(function*(){const{items:e,width:i,height:r}=t,o=vM.getObject(n),s=new wy(o,{width:i,height:r,resolution:1}),a=gM.getObject(n);this.imgElements.push(o),this.svgElements.push(a),a.setAttribute("viewBox",`0 0 ${i} ${r}`),a.setAttribute("width",""+i),a.setAttribute("height",""+r);const u={},h={};e.forEach(t=>{const{item:e,x:n,y:i}=t,r=n+2,o=i+2;e.pathsData.forEach(t=>{let e="";t.cmds.forEach(([n,i])=>{e+=n+" ",e+=i.map(e=>(Object(l.isNumber)(e)||(e.x=e.x+t.offset.x+r,e.y=e.y+t.offset.y+o),e)).reduce((t,e)=>(Object(l.isNumber)(e)?t+=e+" ":t+=`${e.x} ${e.y} `,t),""),e+=" "}),t.pathElement.setAttribute("d",e),a.appendChild(t.pathElement)});const c=e.width-4-2*e.padding,d=e.height-4-2*e.padding;this.textures[e.hash]={texture:new ky(s,new d_(r+2,o+2,c,d)),pivot:e.pivot},u[e.hash]={x:r+2,y:o+2,w:c,h:d,pivot:e.pivot},h[e.hash]=this.hashToIdMap[e.hash]});const c=(d='<?xml version="1.0" encoding="utf-8"?>'+a.outerHTML,"data:image/svg+xml,"+encodeURIComponent(d).replace(/'/g,"%27").replace(/"/g,"%22"));var d;o.src=c,yield new Promise((t,e)=>{o.onload=()=>t(""),o.onerror=()=>e()})}))}getGraphicsData(t){const e=this.idToHashMap[t]||"";return this.textures[e]||null}addGraphics(t,e,n,i,r,o,s,a,l,u,h){var c,d;if(!s&&!l)return t;const p=dM()(n+(null!==(d=null===(c=null==s?void 0:s.width)||void 0===c?void 0:c.toString())&&void 0!==d?d:0)+l+u+h);if(this.hashToIdMap[p]||(this.hashToIdMap[p]=[]),this.hashToIdMap[p].push(t),this.idToHashMap[t]=p,this.graphics.findIndex(t=>t.hash===p)<0){const{graphicsWidth:t,graphicsHeight:n,pathsData:a,pivot:c,padding:d}=function(t,e,n,i,r,o,s,a,l){var u;const h=[],c={x:Math.abs(r.x),y:Math.abs(r.y)};let d=0,p=0,f=0,m=0,g=0,v="none";const _=null!==(u=null==i?void 0:i.width)&&void 0!==u?u:0;return s?(d=e,p=n,g=0):(v=l||"#ff0000",g=_,f=.5*_,m=.5*_,d=e+_,p=n+_,c.x+=.5*_,c.y+=.5*_),d+=Math.abs(r.x),p+=Math.abs(r.y),f+=Math.abs(r.x),m+=Math.abs(r.y),d+=4,p+=4,f+=2,m+=2,d=Math.ceil(d),p=Math.ceil(p),t.forEach(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","path");"none"!==t.fill&&s?e.setAttribute("fill",a||"#ff0000"):e.setAttribute("fill","none"),t.hasStroke&&!s&&(e.setAttribute("stroke-linecap",(null==i?void 0:i.cap)||"butt"),e.setAttribute("stroke-linejoin",(null==i?void 0:i.join)||"miter"),e.setAttribute("stroke-width",g.toString()),e.setAttribute("stroke",v),(null==i?void 0:i.dash)&&e.setAttribute("stroke-dasharray",i.dash));const{scale:n}=t,r=t.path.trim().split(" ");let o={x:0,y:0};const l={offset:{x:f,y:m},cmds:[],pathElement:e};for(let t=0;t<r.length;t+=2){const e=r[t],i=r[t+1];if("M"===e){let[t,e]=i.split(",").map(t=>Number(t));o={x:t,y:e},t=t/9525*n.x,e=e/9525*n.y,l.cmds.push(["M",[{x:t,y:e}]])}else if("A"===e){const[t,e,r,s]=i.split(",").map(t=>Number(t)),a=r/Math.PI*180,u=s/Math.PI*180,h=fM(t,e,a,u,o.x,o.y);Math.round(u)>=360?(o={x:h.endX,y:h.endY},l.cmds.push(["A",[h.radiusX/9525*n.x,h.radiusY/9525*n.y,h.xAxisRotation,h.largeArcFlag,h.sweepFlag,{x:h.middleX/9525*n.x,y:h.middleY/9525*n.y}]]),l.cmds.push(["A",[h.radiusX/9525*n.x,h.radiusY/9525*n.y,h.xAxisRotation,h.largeArcFlag,h.sweepFlag,{x:h.endX/9525*n.x,y:h.endY/9525*n.y}]])):(o={x:h.endX,y:h.endY},l.cmds.push(["A",[h.radiusX/9525*n.x,h.radiusY/9525*n.y,h.xAxisRotation,h.largeArcFlag,h.sweepFlag,{x:h.endX/9525*n.x,y:h.endY/9525*n.y}]]))}else if("L"===e){let[t,e]=i.split(",").map(t=>Number(t));o={x:t,y:e},t=t/9525*n.x,e=e/9525*n.y,l.cmds.push(["L",[{x:t,y:e}]])}else if("QB"===e){let[t,e,r,s]=i.split(",").map(t=>Number(t));o={x:r,y:s},t=t/9525*n.x,e=e/9525*n.y,r=r/9525*n.x,s=s/9525*n.y,l.cmds.push(["Q",[{x:t,y:e},{x:r,y:s}]])}else if("CB"===e){let[t,e,r,s,a,u]=i.split(",").map(t=>Number(t));o={x:a,y:u},t=t/9525*n.x,e=e/9525*n.y,r=r/9525*n.x,s=s/9525*n.y,a=a/9525*n.x,u=u/9525*n.y,l.cmds.push(["C",[{x:t,y:e},{x:r,y:s},{x:a,y:u}]])}else"C"===e&&l.cmds.push(["Z",[]])}h.push(l)}),{graphicsWidth:d,graphicsHeight:p,pivot:c,padding:2,pathsData:h}}(e,r,o,s,i,0,l,u,h);this.graphics.push({hash:p,pathsData:a,pivot:c,width:t,height:n,padding:d})}return t}pack(){this.graphics.forEach(t=>{t.width+=4,t.height+=4});return function t(e){const n=[],i=e.filter(t=>{const e=t.width<2048&&t.height<2048;return e||n.push(t),e}).sort((t,e)=>t.width*t.height-e.width*e.height);let r=i.length+1,o=2050,s=2050;const a=[];let l=null;for(;(o>2048||s>2048)&&i.length>0;)r-=1,l=JE()(i.slice(0,r)),o=l.width,s=l.height;return l&&a.push(l),n.forEach(t=>{const e=JE()([t]);a.push(e)}),r<i.length?a.concat(t(i.slice(r))):a}(this.graphics)}destroy(){Object.keys(this.textures).forEach(t=>{var e;null===(e=this.textures[t])||void 0===e||e.texture.destroy(!0)}),this.textures=Object.create(null),this.imgElements.forEach(t=>vM.collectObject(t)),this.svgElements.forEach(t=>gM.collectObject(t)),this.graphics=[]}}class xM{constructor(){this.runningTimeNodes={}}addRunningTimeNode(t,e,n){const i=`${e}_${t}`;if(this.runningTimeNodes[i])try{this.runningTimeNodes[i].dispose(!0)}catch(t){}this.runningTimeNodes[i]=n}removeRunningTimeNode(t,e){const n=`${e}_${t}`;delete this.runningTimeNodes[n]}}class bM{constructor(t){this.eventHub=t,this.targets=Object.create(null)}getTargets(){return Object.keys(this.targets).map(t=>this.targets[t])}addTarget(t,e){this.targets[t]=e}getTargetById(t){return this.targets[t]}getTarget(t,e,n={type:"el",index:0,id:""}){var i,r;let o=this.targets[t.id];return"shape"!==t.type?o:("shape"===t.type&&t.txEl&&(o=null!==(i=null==o?void 0:o.getTextElement(t.txEl.type,t.txEl.range))&&void 0!==i?i:null),"shape"===t.type&&t.bg&&0===n.index&&(e=!1,o=null!==(r=null==o?void 0:o.getBgElement())&&void 0!==r?r:null,this.eventHub.emit("IterateTimeNodeEnd",n.id)),e&&o?o.getIterateEntry(n.type,n.index,n.id):(o||this.eventHub.emit("IterateTimeNodeEnd",n.id),o))}clearTargets(){this.targets=Object.create(null)}}class TM{constructor(t){this.target=t}get color(){return this.target.strokeColorFilter.currentColor}set color(t){this.target.strokeColorFilter.color=t}get on(){return this.target.strokeActive?"true":"false"}set on(t){this.target.strokeActive="true"===t}}class wM{constructor(t){this.target=t}applyCommand(t,e){this.target.applyCommand(t,e)}}class SM{constructor(t){this.target=t}get color(){return this.target.fillColorFilter.currentColor}set color(t){this.target.fillActive&&(this.target.fillColorFilter.color=t)}get on(){return this.target.fillActive?"true":"false"}set on(t){this.target.fillActive="true"===t}get designColor(){return this.target.fillColorFilter.designColor}}class EM{constructor(t,e){this.hardHidden=!1,this.target=t,!0===e&&(this.hardHidden=!0)}get opacity(){return this.target.alpha}set opacity(t){this.target.alpha=t}get rotation(){return this.target.rotation/Math.PI*180}set rotation(t){this.target.rotation=t/180*Math.PI}get visibility(){return this.target.visible?"visible":"hidden"}set visibility(t){this.visibility===t||this.hardHidden||(this.target.visible="visible"===t)}}class MM{constructor(t,e){this.actions=[],this.ctx=e,this.object=t,this.object.interactive=!0}reset(t){this.object.interactive=!1,this.object.removeAllListeners(),this.object=t,this.object.interactive=!0}addAction(t,e){this.actions.push([t,e]),"click"===e?(this.object.addListener("click",()=>this.handleAction(t)),this.object.cursor="pointer"):"hover"===e&&this.object.addListener("mouseover",()=>this.handleAction(t))}addProxy(t){this.proxy=t,this.hitArea=this.getOriginHitArea(),this.proxy.interactive=!0,this.actions.forEach(([t,e])=>{var n,i;"click"===e?null===(n=this.proxy)||void 0===n||n.addListener("click",e=>this.handleProxyAction(e,t)):"hover"===e&&(null===(i=this.proxy)||void 0===i||i.addListener("mouseover",e=>this.handleProxyAction(e,t)))})}handleProxyAction(t,e){var n;const i=t.data.global,r=this.object.getGlobalPosition(),o=i.x-r.x+this.object.pivot.x,s=i.y-r.y+this.object.pivot.y;(null===(n=this.hitArea)||void 0===n?void 0:n.contains(o,s))&&this.object.visible&&this.handleAction(e,!0)}getOriginHitArea(){return this.object.hitArea?this.object.hitArea:new g_(0,0,this.object.width,this.object.height)}handleAction(t,e=!1){this.proxy&&!e||(this.ctx.eventHub.emit(YR.hyperlinkTrigger,t),this.execAction(t))}execAction(t){var e;if(this.ctx.eventHub.emit(YR.userInput),"ppaction://hlinksldjump"===t.action){const n=(null!==(e=null==t?void 0:t.target)&&void 0!==e?e:"").match(/slide(\d+)\.xml/);n&&n[1]&&this.ctx.eventHub.emit(YR.requestGotoSlide,Number(n[1]))}else if("ppaction://hlinkshowjump?jump=nextslide"===t.action)this.ctx.eventHub.emit(YR.requestNextSlide);else if("ppaction://hlinkshowjump?jump=previousslide"===t.action)this.ctx.eventHub.emit(YR.requestPrevSlide);else if("ppaction://hlinkshowjump?jump=firstslide"===t.action)this.ctx.eventHub.emit(YR.requestGotoSlide,1);else if("ppaction://hlinkshowjump?jump=lastslide"===t.action)this.ctx.eventHub.emit(YR.requestGotoSlide,-1);else if("ppaction://hlinkshowjump?jump=lastslideviewed"===t.action){const t=this.ctx.lastViewedIndex;this.ctx.eventHub.emit(YR.requestGotoSlide,t)}else"ppaction://hlinkshowjump?jump=endshow"===t.action&&this.ctx.eventHub.emit(YR.requestGotoSlide,-1)}}class AM{constructor(t,e,n){var i,r,o,s,a,l;this.scaleExt={x:1,y:1},this.scaleOrigin={x:1,y:1},this.designScale={x:1,y:1},this.bound=new d_(0,0,1,1),this.pptX=0,this.pptY=0,this.presetSubType=0,this.designWidth=0,this.designHeight=0,this.designX=0,this.designY=0,this.hasPreset=!1,this.container=new ty,this.ctx=e,this.style=new EM(this.container,t.hardHidden),this.designGlobalPosition={x:n.x+(null!==(r=null===(i=t.position)||void 0===i?void 0:i.x)&&void 0!==r?r:0),y:n.y+(null!==(s=null===(o=t.position)||void 0===o?void 0:o.y)&&void 0!==s?s:0)},this.container.interactive=!0,(t.hlinkClick||t.hlinkHover)&&(this.hyperlink=new MM(this.container,this.ctx),t.hlinkHover&&(null===(a=this.hyperlink)||void 0===a||a.addAction(t.hlinkHover,"hover")),t.hlinkClick&&(null===(l=this.hyperlink)||void 0===l||l.addAction(t.hlinkClick,"click"))),this.ctx.clock.waitUntil(()=>{try{return!!this.container.width}catch(t){return!1}},3e3).then(()=>{try{this.designWidth=this.designWidth||this.container.width}catch(t){}}),this.ctx.clock.waitUntil(()=>{try{return!!this.container.height}catch(t){return!1}},3e3).then(()=>{try{this.designHeight=this.designHeight||this.container.height}catch(t){}})}updateScale(){this.container&&(this.container.scale.x=this.designScale.x*this.scaleExt.x*this.scaleOrigin.x,this.container.scale.y=this.designScale.y*this.scaleExt.y*this.scaleOrigin.y)}updateTransform(t){var e,n,i,r,o,s,a,l;this.designWidth=t.width,this.designHeight=t.height,this.designX=null!==(n=null===(e=t.position)||void 0===e?void 0:e.x)&&void 0!==n?n:0,this.designY=null!==(r=null===(i=t.position)||void 0===i?void 0:i.y)&&void 0!==r?r:0;const u=this.designWidth/2,h=this.designHeight/2;this.container.width=this.designWidth,this.container.height=this.designHeight,this.container.pivot.x=u,this.container.pivot.y=h;const c=null!==(s=null===(o=t.position)||void 0===o?void 0:o.x)&&void 0!==s?s:0,d=null!==(l=null===(a=t.position)||void 0===a?void 0:a.y)&&void 0!==l?l:0;this.container.x=c+u,this.container.y=d+h,t.scale&&(this.designScale={x:t.scale.x,y:t.scale.y},this.container.scale.x=t.scale.x,this.container.scale.y=t.scale.y),t.rotation&&(this.container.rotation=t.rotation);const p=new Aw;p.drawRect(0,0,this.designWidth,this.designHeight),this.container.addChild(p),this.json.hardHidden&&(this.container.visible=!1),this.bound.x=c,this.bound.y=d,this.bound.width=this.designWidth,this.bound.height=this.designHeight}get scale(){return this.scaleOrigin}set scale(t){this.scaleOrigin.x=t.x,this.scaleOrigin.y=t.y,this.updateScale()}get design_ppt_w(){return $E(this.designWidth/this.ctx.stageWidth)}get design_ppt_h(){return $E((this.designHeight||this.container.height)/this.ctx.stageHeight)}get design_ppt_x(){return $E(this.designX/this.ctx.stageWidth)}get design_ppt_y(){return $E(this.designY/this.ctx.stageHeight)}get ppt_w(){return this.scaleExt.x*this.scaleOrigin.x*this.designWidth/this.ctx.stageWidth}set ppt_w(t){this.designWidth&&(this.scaleExt.x=t*this.ctx.stageWidth/this.designWidth,this.updateScale())}get ppt_h(){const t=this.designHeight||this.container.height;return this.scaleExt.y*this.scaleOrigin.y*t/this.ctx.stageHeight}set ppt_h(t){this.designHeight&&(this.scaleExt.y=t*this.ctx.stageHeight/this.designHeight,this.updateScale())}get ppt_x(){return(this.container.position.x-this.container.pivot.x)/this.ctx.stageWidth}set ppt_x(t){this.pptX=t;const e=544===this.presetSubType?this.scaleExt.x:1;this.container.position.x=t*this.ctx.stageWidth+this.container.pivot.x*e}get ppt_y(){return(this.container.position.y-this.container.pivot.y)/this.ctx.stageHeight}set ppt_y(t){this.pptY=t;const e=544===this.presetSubType?this.scaleExt.y:1;this.container.position.y=t*this.ctx.stageHeight+this.container.pivot.y*e}get r(){return this.container.rotation}set r(t){this.container.rotation=t}set xshear(t){this.container.skew.x=t}get xshear(){return this.container.skew.x}set yshear(t){this.container.skew.y=t}get yshear(){return this.container.skew.y}}class RM{constructor(t){if(this._isInit=!1,this.h=0,this.s=0,this.l=0,this.a=1,t){this._isInit=!0;const e=t.match(/-?[0-9]+/g);e&&(this.h=parseInt(e[0],10),this.s=parseInt(e[1],10)/100,this.l=parseInt(e[2],10)/100)}}isInit(){return this._isInit}by(t,e){e.h=Math.max(Math.min(this.h+t.h,359),0),e.s=Math.max(Math.min(this.s+t.s,1),0),e.l=Math.max(Math.min(this.l+t.l,1),0),e.a=Math.max(Math.min(this.a+t.a,1),0)}fromHexString(t){const[e,n,i,r]=IM(t);let o=0,s=0,a=0;const l=Math.max(e,n,i),u=Math.min(e,n,i),h=l-u;a=(l+u)/2,0===h?o=0:l===e?o=(n-i)/h%6*60:l===n?o=60*((i-e)/h+2):l===i&&(o=60*((e-n)/h+4)),s=0===h?0:h/(1-Math.abs(2*a-1)),this.h=o,this.s=s,this.l=a,this.a=r}interpolationFrom(t,e,n){const i=t.h+(this.h-t.h)*e,r=t.s+(this.s-t.s)*e,o=t.l+(this.l-t.l)*e,s=t.a+(this.a-t.a)*e;n.h=Math.max(Math.min(i,359),0),n.s=Math.max(Math.min(r,1),0),n.l=Math.max(Math.min(o,1),0),n.a=Math.max(Math.min(s,1),0)}toHexString(){let t=[0,0,0,0];const{h:e,s:n,l:i}=this;if(e<360&&e>=0&&n<=1&&n>=0&&i<=1&&i>=0){let r,o,s;const a=(1-Math.abs(2*i-1))*n,l=a*(1-Math.abs(e/60%2-1)),u=i-a/2;[r,o,s]=e>=0&&e<60?[a,l,0]:e>=60&&e<120?[l,a,0]:e>=120&&e<180?[0,a,l]:e>=180&&e<240?[0,l,a]:e>=240&&e<300?[l,0,a]:[a,0,l],t=[r+u,o+u,s+u,this.a]}return OM(t)}}class PM{constructor(t){this._isInit=!1,this.r=0,this.g=0,this.b=0,this.a=0,t&&(this._isInit=!0,this.fromHexString(t))}fromHexString(t){const[e,n,i,r]=IM(t);this.r=e,this.g=n,this.b=i,this.a=r}isInit(){return this._isInit}interpolationFrom(t,e,n){n.r=t.r+(this.r-t.r)*e,n.g=t.g+(this.g-t.g)*e,n.b=t.b+(this.b-t.b)*e,n.a=t.a+(this.a-t.a)*e}by(t,e){e.r=Math.min(Math.max(this.r+t.r,0),255),e.g=Math.min(Math.max(this.g+t.g,0),255),e.b=Math.min(Math.max(this.b+t.b,0),255),e.a=Math.min(Math.max(this.a+t.a,0),1)}toHexString(){return OM([this.r,this.g,this.b,this.a])}}function CM(t){const e=t.substring(1);return[parseInt(e.substring(0,6),16),parseInt(e.substring(6,8),16)/255]}function IM(t){return 0===(t=t.replace(/^#/,"")).substring(6,8).length&&(t+="FF"),[parseInt(t.substring(0,2).padStart(8,"0"),16)/255,parseInt(t.substring(2,4).padStart(8,"0"),16)/255,parseInt(t.substring(4,6).padStart(8,"0"),16)/255,parseInt(t.substring(6,8).padStart(8,"0"),16)/255]}function OM(t){return"#"+Math.round(255*t[0]).toString(16).padStart(2,"0")+Math.round(255*t[1]).toString(16).padStart(2,"0")+Math.round(255*t[2]).toString(16).padStart(2,"0")+Math.round(255*t[3]).toString(16).padStart(2,"0")}function LM(t,e,n){const i=IM(t),r=IM(e),o=Math.round(255*(i[0]+(r[0]-i[0])*n)),s=Math.round(255*(i[1]+(r[1]-i[1])*n)),a=Math.round(255*(i[2]+(r[2]-i[2])*n)),l=Math.round(255*(i[3]+(r[3]-i[3])*n));return"#"+o.toString(16).padStart(2,"0")+s.toString(16).padStart(2,"0")+a.toString(16).padStart(2,"0")+l.toString(16).padStart(2,"0")}class NM extends Gx{constructor(){super(void 0,"\nvarying vec2 vTextureCoord;\n\nuniform vec4 color;\nuniform sampler2D uSampler;\n\nvoid main(void){\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n\n if (texColor.a > 0.0) {\n vec4 resultColor = color;\n resultColor = resultColor * texColor.a;\n gl_FragColor = resultColor;\n } else {\n gl_FragColor = texColor;\n }\n}\n",{color:new Float32Array([0,0,0,0]),active:0}),this.currentColor="#FFFFFFFF",this.designColor="#FFFFFFFF"}set color(t){this.currentColor=t;const e=IM(t);this.uniforms.color=Float32Array.from(e)}get color(){return this.currentColor}}const DM=new WE.ColorMatrixFilter;DM.matrix=[1,0,0,0,-.2,0,1,0,0,-.2,0,0,1,0,-.2,0,0,0,1,0];const FM=new WE.ColorMatrixFilter;FM.matrix=[1,0,0,0,-.1,0,1,0,0,-.1,0,0,1,0,-.1,0,0,0,1,0];const BM=new WE.ColorMatrixFilter;BM.matrix=[1,0,0,0,.2,0,1,0,0,.2,0,0,1,0,.2,0,0,0,1,0];const UM=new WE.ColorMatrixFilter;UM.matrix=[1,0,0,0,.1,0,1,0,0,.1,0,0,1,0,.1,0,0,0,1,0];const kM={darken:DM,darkenLess:FM,lightenLess:UM,lighten:BM};class GM extends AM{constructor(t,e,n){super({position:{x:t.x,y:t.y},width:t.width,height:t.height},e,n),this.fillColorFilter=new NM,this.fill=new SM(this),this.json=t,this.ctx=e,this.parentGlobalPos=n,this.global={x:n.x+t.x,y:n.y+t.y},this.updateTransform({position:{x:t.x,y:t.y},width:t.width,height:t.height})}get fillActive(){var t,e;return(null!==(e=null===(t=this.container.filters)||void 0===t?void 0:t.length)&&void 0!==e?e:-1)>0}set fillActive(t){var e,n;t?(null!==(n=null===(e=this.container.filters)||void 0===e?void 0:e.indexOf(this.fillColorFilter))&&void 0!==n?n:-1)<0&&(this.container.filters=[this.fillColorFilter]):this.container.filters=[]}get renderContainer(){return this.container}get interactiveContainer(){return this.container}clearOnSlideChange(){}initOnReuse(){}getTextElement(){return null}getBgElement(){return null}get ppt_x(){return this.global.x/this.ctx.stageWidth}set ppt_x(t){const e=t*this.ctx.stageWidth-this.global.x,n=544===this.presetSubType?this.scaleExt.x:1;this.container.position.x=this.designX+e+this.container.pivot.x*n}get ppt_y(){return this.global.y/this.ctx.stageHeight}set ppt_y(t){const e=t*this.ctx.stageHeight-this.global.y,n=544===this.presetSubType?this.scaleExt.y:1;this.container.position.y=this.designY+e+this.container.pivot.y*n}get design_ppt_x(){return $E(this.global.x/this.ctx.stageWidth)}get design_ppt_y(){return $E(this.global.y/this.ctx.stageHeight)}}class HM{constructor(t,e,n,i,r,o,s,a,l,u,h){this.ctx=t,this.type=e,this.lineWidth=n,this.width=i,this.height=r,this.fillColor=o,this.isHorz=s,this.renderContainer=new ty,this.ghcTextureId=`${a}-text-p${l}-l${u}-u${h}-underLine`}createPaths(){if("ww"===this.type)return null;{let t=`M 0,0 L ${9525*this.width},0`,[e,n]=[this.width,this.lineWidth];return this.isHorz||(t="M 0,0 L 0,"+9525*this.height,[e,n]=[this.lineWidth,this.height]),{paths:[{id:eM(),path:t,fill:"norm",hasStroke:!0,scale:{x:1,y:1},hash:dM()(t)}],width:e,height:n}}}getLineStyle(){const t={width:this.lineWidth};return"dotted"===this.type&&(t.dash=""+this.lineWidth),t}preRender(){const t=this.createPaths();if(t){const{paths:e,width:n,height:i}=t,r=e.reduce((t,e)=>t+e.hash,"");this.ctx.graphicsTexture.addGraphics(this.ghcTextureId,e,r,{x:0,y:0},n,i,this.getLineStyle(),this.ctx.objectPoolGroup,!1,null,this.fillColor)}}render(){if(this.ghcTextureId){const t=this.ctx.graphicsTexture.getGraphicsData(this.ghcTextureId);t&&(this.sprite=new Ow,this.sprite.texture=t.texture,this.sprite.pivot.x=t.pivot.x)}}destroy(){var t;null===(t=this.sprite)||void 0===t||t.destroy({texture:!0})}}const zM=134217729;function jM(t,e,n,i,r){let o,s,a,l,u=e[0],h=i[0],c=0,d=0;h>u==h>-u?(o=u,u=e[++c]):(o=h,h=i[++d]);let p=0;if(c<t&&d<n)for(h>u==h>-u?(s=u+o,a=o-(s-u),u=e[++c]):(s=h+o,a=o-(s-h),h=i[++d]),o=s,0!==a&&(r[p++]=a);c<t&&d<n;)h>u==h>-u?(s=o+u,l=s-o,a=o-(s-l)+(u-l),u=e[++c]):(s=o+h,l=s-o,a=o-(s-l)+(h-l),h=i[++d]),o=s,0!==a&&(r[p++]=a);for(;c<t;)s=o+u,l=s-o,a=o-(s-l)+(u-l),u=e[++c],o=s,0!==a&&(r[p++]=a);for(;d<n;)s=o+h,l=s-o,a=o-(s-l)+(h-l),h=i[++d],o=s,0!==a&&(r[p++]=a);return 0===o&&0!==p||(r[p++]=o),p}function VM(t,e){let n=e[0];for(let i=1;i<t;i++)n+=e[i];return n}function WM(t){return new Float64Array(t)}const XM=WM(4),qM=WM(8),YM=WM(12),ZM=WM(16),JM=WM(4);function KM(t,e,n,i,r,o){const s=(e-o)*(n-r),a=(t-r)*(i-o),l=s-a;if(0===s||0===a||s>0!=a>0)return l;const u=Math.abs(s+a);return Math.abs(l)>=33306690738754716e-32*u?l:-function(t,e,n,i,r,o,s){let a,l,u,h,c,d,p,f,m,g,v,_,y,x,b,T,w,S;const E=t-r,M=n-r,A=e-o,R=i-o;x=E*R,d=zM*E,p=d-(d-E),f=E-p,d=zM*R,m=d-(d-R),g=R-m,b=f*g-(x-p*m-f*m-p*g),T=A*M,d=zM*A,p=d-(d-A),f=A-p,d=zM*M,m=d-(d-M),g=M-m,w=f*g-(T-p*m-f*m-p*g),v=b-w,c=b-v,XM[0]=b-(v+c)+(c-w),_=x+v,c=_-x,y=x-(_-c)+(v-c),v=y-T,c=y-v,XM[1]=y-(v+c)+(c-T),S=_+v,c=S-_,XM[2]=_-(S-c)+(v-c),XM[3]=S;let P=VM(4,XM),C=22204460492503146e-32*s;if(P>=C||-P>=C)return P;if(c=t-E,a=t-(E+c)+(c-r),c=n-M,u=n-(M+c)+(c-r),c=e-A,l=e-(A+c)+(c-o),c=i-R,h=i-(R+c)+(c-o),0===a&&0===l&&0===u&&0===h)return P;if(C=11093356479670487e-47*s+33306690738754706e-32*Math.abs(P),P+=E*h+R*a-(A*u+M*l),P>=C||-P>=C)return P;x=a*R,d=zM*a,p=d-(d-a),f=a-p,d=zM*R,m=d-(d-R),g=R-m,b=f*g-(x-p*m-f*m-p*g),T=l*M,d=zM*l,p=d-(d-l),f=l-p,d=zM*M,m=d-(d-M),g=M-m,w=f*g-(T-p*m-f*m-p*g),v=b-w,c=b-v,JM[0]=b-(v+c)+(c-w),_=x+v,c=_-x,y=x-(_-c)+(v-c),v=y-T,c=y-v,JM[1]=y-(v+c)+(c-T),S=_+v,c=S-_,JM[2]=_-(S-c)+(v-c),JM[3]=S;const I=jM(4,XM,4,JM,qM);x=E*h,d=zM*E,p=d-(d-E),f=E-p,d=zM*h,m=d-(d-h),g=h-m,b=f*g-(x-p*m-f*m-p*g),T=A*u,d=zM*A,p=d-(d-A),f=A-p,d=zM*u,m=d-(d-u),g=u-m,w=f*g-(T-p*m-f*m-p*g),v=b-w,c=b-v,JM[0]=b-(v+c)+(c-w),_=x+v,c=_-x,y=x-(_-c)+(v-c),v=y-T,c=y-v,JM[1]=y-(v+c)+(c-T),S=_+v,c=S-_,JM[2]=_-(S-c)+(v-c),JM[3]=S;const O=jM(I,qM,4,JM,YM);x=a*h,d=zM*a,p=d-(d-a),f=a-p,d=zM*h,m=d-(d-h),g=h-m,b=f*g-(x-p*m-f*m-p*g),T=l*u,d=zM*l,p=d-(d-l),f=l-p,d=zM*u,m=d-(d-u),g=u-m,w=f*g-(T-p*m-f*m-p*g),v=b-w,c=b-v,JM[0]=b-(v+c)+(c-w),_=x+v,c=_-x,y=x-(_-c)+(v-c),v=y-T,c=y-v,JM[1]=y-(v+c)+(c-T),S=_+v,c=S-_,JM[2]=_-(S-c)+(v-c),JM[3]=S;const L=jM(O,YM,4,JM,ZM);return ZM[L-1]}(t,e,n,i,r,o,u)}WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(8),WM(8),WM(8),WM(4),WM(8),WM(8),WM(8),WM(12);WM(192),WM(192);WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(8),WM(8),WM(8),WM(8),WM(8),WM(8),WM(8),WM(8),WM(8),WM(4),WM(4),WM(4),WM(8),WM(16),WM(16),WM(16),WM(32),WM(32),WM(48),WM(64);WM(1152),WM(1152);WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(4),WM(24),WM(24),WM(24),WM(24),WM(24),WM(24),WM(24),WM(24),WM(24),WM(24),WM(1152),WM(1152),WM(1152),WM(1152),WM(1152),WM(2304),WM(2304),WM(3456),WM(5760),WM(8),WM(8),WM(8),WM(16),WM(24),WM(48),WM(48),WM(96),WM(192),WM(384),WM(384),WM(384),WM(768);WM(96),WM(96),WM(96),WM(1152);const $M=Math.pow(2,-52),QM=new Uint32Array(512);class tA{static from(t,e=sA,n=aA){const i=t.length,r=new Float64Array(2*i);for(let o=0;o<i;o++){const i=t[o];r[2*o]=e(i),r[2*o+1]=n(i)}return new tA(r)}constructor(t){const e=t.length>>1;if(e>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const n=Math.max(2*e-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(e)),this._hullPrev=new Uint32Array(e),this._hullNext=new Uint32Array(e),this._hullTri=new Uint32Array(e),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(e),this._dists=new Float64Array(e),this.update()}update(){const{coords:t,_hullPrev:e,_hullNext:n,_hullTri:i,_hullHash:r}=this,o=t.length>>1;let s=1/0,a=1/0,l=-1/0,u=-1/0;for(let e=0;e<o;e++){const n=t[2*e],i=t[2*e+1];n<s&&(s=n),i<a&&(a=i),n>l&&(l=n),i>u&&(u=i),this._ids[e]=e}const h=(s+l)/2,c=(a+u)/2;let d,p,f,m=1/0;for(let e=0;e<o;e++){const n=eA(h,c,t[2*e],t[2*e+1]);n<m&&(d=e,m=n)}const g=t[2*d],v=t[2*d+1];m=1/0;for(let e=0;e<o;e++){if(e===d)continue;const n=eA(g,v,t[2*e],t[2*e+1]);n<m&&n>0&&(p=e,m=n)}let _=t[2*p],y=t[2*p+1],x=1/0;for(let e=0;e<o;e++){if(e===d||e===p)continue;const n=iA(g,v,_,y,t[2*e],t[2*e+1]);n<x&&(f=e,x=n)}let b=t[2*f],T=t[2*f+1];if(x===1/0){for(let e=0;e<o;e++)this._dists[e]=t[2*e]-t[0]||t[2*e+1]-t[1];rA(this._ids,this._dists,0,o-1);const e=new Uint32Array(o);let n=0;for(let t=0,i=-1/0;t<o;t++){const r=this._ids[t];this._dists[r]>i&&(e[n++]=r,i=this._dists[r])}return this.hull=e.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(KM(g,v,_,y,b,T)<0){const t=p,e=_,n=y;p=f,_=b,y=T,f=t,b=e,T=n}const w=function(t,e,n,i,r,o){const s=n-t,a=i-e,l=r-t,u=o-e,h=s*s+a*a,c=l*l+u*u,d=.5/(s*u-a*l);return{x:t+(u*h-a*c)*d,y:e+(s*c-l*h)*d}}(g,v,_,y,b,T);this._cx=w.x,this._cy=w.y;for(let e=0;e<o;e++)this._dists[e]=eA(t[2*e],t[2*e+1],w.x,w.y);rA(this._ids,this._dists,0,o-1),this._hullStart=d;let S=3;n[d]=e[f]=p,n[p]=e[d]=f,n[f]=e[p]=d,i[d]=0,i[p]=1,i[f]=2,r.fill(-1),r[this._hashKey(g,v)]=d,r[this._hashKey(_,y)]=p,r[this._hashKey(b,T)]=f,this.trianglesLen=0,this._addTriangle(d,p,f,-1,-1,-1);for(let o,s,a=0;a<this._ids.length;a++){const l=this._ids[a],u=t[2*l],h=t[2*l+1];if(a>0&&Math.abs(u-o)<=$M&&Math.abs(h-s)<=$M)continue;if(o=u,s=h,l===d||l===p||l===f)continue;let c=0;for(let t=0,e=this._hashKey(u,h);t<this._hashSize&&(c=r[(e+t)%this._hashSize],-1===c||c===n[c]);t++);c=e[c];let m,g=c;for(;m=n[g],KM(u,h,t[2*g],t[2*g+1],t[2*m],t[2*m+1])>=0;)if(g=m,g===c){g=-1;break}if(-1===g)continue;let v=this._addTriangle(g,l,n[g],-1,-1,i[g]);i[l]=this._legalize(v+2),i[g]=v,S++;let _=n[g];for(;m=n[_],KM(u,h,t[2*_],t[2*_+1],t[2*m],t[2*m+1])<0;)v=this._addTriangle(_,l,m,i[l],-1,i[_]),i[l]=this._legalize(v+2),n[_]=_,S--,_=m;if(g===c)for(;m=e[g],KM(u,h,t[2*m],t[2*m+1],t[2*g],t[2*g+1])<0;)v=this._addTriangle(m,l,g,-1,i[g],i[m]),this._legalize(v+2),i[m]=v,n[g]=g,S--,g=m;this._hullStart=e[l]=g,n[g]=e[_]=l,n[l]=_,r[this._hashKey(u,h)]=l,r[this._hashKey(t[2*g],t[2*g+1])]=g}this.hull=new Uint32Array(S);for(let t=0,e=this._hullStart;t<S;t++)this.hull[t]=e,e=n[e];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,e){return Math.floor(function(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}(t-this._cx,e-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:e,_halfedges:n,coords:i}=this;let r=0,o=0;for(;;){const s=n[t],a=t-t%3;if(o=a+(t+2)%3,-1===s){if(0===r)break;t=QM[--r];continue}const l=s-s%3,u=a+(t+1)%3,h=l+(s+2)%3,c=e[o],d=e[t],p=e[u],f=e[h];if(nA(i[2*c],i[2*c+1],i[2*d],i[2*d+1],i[2*p],i[2*p+1],i[2*f],i[2*f+1])){e[t]=f,e[s]=c;const i=n[h];if(-1===i){let e=this._hullStart;do{if(this._hullTri[e]===h){this._hullTri[e]=t;break}e=this._hullPrev[e]}while(e!==this._hullStart)}this._link(t,i),this._link(s,n[o]),this._link(o,h);const a=l+(s+1)%3;r<QM.length&&(QM[r++]=a)}else{if(0===r)break;t=QM[--r]}}return o}_link(t,e){this._halfedges[t]=e,-1!==e&&(this._halfedges[e]=t)}_addTriangle(t,e,n,i,r,o){const s=this.trianglesLen;return this._triangles[s]=t,this._triangles[s+1]=e,this._triangles[s+2]=n,this._link(s,i),this._link(s+1,r),this._link(s+2,o),this.trianglesLen+=3,s}}function eA(t,e,n,i){const r=t-n,o=e-i;return r*r+o*o}function nA(t,e,n,i,r,o,s,a){const l=t-s,u=e-a,h=n-s,c=i-a,d=r-s,p=o-a,f=h*h+c*c,m=d*d+p*p;return l*(c*m-f*p)-u*(h*m-f*d)+(l*l+u*u)*(h*p-c*d)<0}function iA(t,e,n,i,r,o){const s=n-t,a=i-e,l=r-t,u=o-e,h=s*s+a*a,c=l*l+u*u,d=.5/(s*u-a*l),p=(u*h-a*c)*d,f=(s*c-l*h)*d;return p*p+f*f}function rA(t,e,n,i){if(i-n<=20)for(let r=n+1;r<=i;r++){const i=t[r],o=e[i];let s=r-1;for(;s>=n&&e[t[s]]>o;)t[s+1]=t[s--];t[s+1]=i}else{let r=n+1,o=i;oA(t,n+i>>1,r),e[t[n]]>e[t[i]]&&oA(t,n,i),e[t[r]]>e[t[i]]&&oA(t,r,i),e[t[n]]>e[t[r]]&&oA(t,n,r);const s=t[r],a=e[s];for(;;){do{r++}while(e[t[r]]<a);do{o--}while(e[t[o]]>a);if(o<r)break;oA(t,r,o)}t[n+1]=t[o],t[o]=s,i-r+1>=o-n?(rA(t,e,r,i),rA(t,e,n,o-1)):(rA(t,e,n,o-1),rA(t,e,r,i))}}function oA(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}function sA(t){return t[0]}function aA(t){return t[1]}function lA(t,e,n){let i=null;const r=new ty;if(t.stopList.sort((t,e)=>t.pos-e.pos),!t.stopList.find(t=>0===t.pos)){const e=t.stopList[0];t.stopList.unshift({pos:0,color:e.color})}if(!t.stopList.find(t=>1===t.pos)){const e=t.stopList[t.stopList.length-1];t.stopList.push({pos:1,color:e.color})}const o=t=>{const e=[];for(let n=0,i=t.length;n<i-1;n++){const i=t[n],r=t[n+1],o=i.pos+.5*(r.pos-i.pos),s=LM(i.color,r.color,.5),a=2*n;e[a]=i,e[a+1]={color:s,pos:o},e[a+2]=r}return e};if(t.stopList=o(t.stopList),t.stopList=o(t.stopList),i=t.line?uA(t,e,n):t.path?function(t,e,n){var i,r,o;const s=[],a={x:0,y:0};if("circle"===(null===(i=t.path)||void 0===i?void 0:i.path)||"rect"===(null===(r=t.path)||void 0===r?void 0:r.path)||"shape"===(null===(o=t.path)||void 0===o?void 0:o.path)){const i=e/2,r=n/2,o=Math.sqrt(i*i+r*r);t.stopList.forEach(t=>{if(0===t.pos)s.push({point:{x:0,y:0},color:t.color});else{const e=o*t.pos,n=new xc;n.absellipse(0,0,e,e,0,2*Math.PI,!1,0),n.getPoints(50).forEach(e=>{s.push({point:{x:e.x,y:e.y},color:t.color})})}a.x=i,a.y=r})}return{points:s,position:a}}(t,e,n):uA(t,e,n),i){const t=[],o=[],{position:s,points:a}=i,l=tA.from(a,t=>t.point.x,t=>t.point.y);for(let e=0;e<l.triangles.length;e+=3)t.push(a[l.triangles[e]].point.x,a[l.triangles[e]].point.y),t.push(a[l.triangles[e+1]].point.x,a[l.triangles[e+1]].point.y),t.push(a[l.triangles[e+2]].point.x,a[l.triangles[e+2]].point.y),o.push(...IM(a[l.triangles[e]].color)),o.push(...IM(a[l.triangles[e+1]].color)),o.push(...IM(a[l.triangles[e+2]].color));const u=new Jy;u.addAttribute("aVertexPosition",t,2),u.addAttribute("aColor",o,4);const h=Ux.from("\n precision mediump float;\n attribute vec2 aVertexPosition;\n attribute vec4 aColor;\n uniform mat3 translationMatrix;\n uniform mat3 projectionMatrix;\n varying vec4 vColor;\n void main() {\n vColor = aColor;\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n }","precision mediump float; \n varying vec4 vColor;\n void main() {\n float alpha = vColor.a;\n vec4 color = vColor;\n color.a = 1.0;\n gl_FragColor = color * alpha;\n }\n "),c=new Aw;c.drawRect(0,0,e+1,n+1),r.mask=c,r.addChild(c);const d=new vS(u,h);d.position.x=s.x,d.position.y=s.y,r.addChild(d)}return r}function uA(t,e,n){const i=e/2,r=n/2,o=[{x:-i,y:r},{x:-i,y:-r},{x:i,y:r},{x:i,y:-r}],s=[QE.fromPointSlope({x:-i,y:0},Math.PI/2),QE.fromPointSlope({x:0,y:r},0),QE.fromPointSlope({x:i,y:0},Math.PI/2),QE.fromPointSlope({x:0,y:-r},0)],a=[],l=t.stopList.slice(1,t.stopList.length-1).map(o=>{var l,u,h;const c=2*Math.PI;let d=null!==(u=null===(l=t.line)||void 0===l?void 0:l.ang)&&void 0!==u?u:0;for(;d>c;)d-=c;for(;d<0;)d+=c;const p={x:0,y:0};KE(d,Math.PI/2)?(p.x=0,p.y=n/2-o.pos*n):KE(d,0)?(p.x=o.pos*e-e/2,p.y=0):(p.x=o.pos*e-e/2,p.y=n/2-o.pos*n),d>Math.PI/2&&d<=Math.PI&&(p.x*=-1),d>Math.PI&&d<=2*Math.PI&&(p.y*=-1);const f=QE.fromPointSlope(p,Math.PI/2-((null===(h=t.line)||void 0===h?void 0:h.ang)||0)),m=s.map(t=>f.crossPoint(t)).filter(t=>t&&t.x<=i&&t.x>=-i&&t.y<=r&&t.y>=-r).map(t=>({point:t,color:o.color})).sort((t,e)=>e.point.y-t.point.y);a.push(...m);let g=Math.abs(m[1].point.x-m[0].point.x)/10;for(let t=20;t--;){const e=t%2==0?1:-1,n=p.x+e*g,s=f.resolveY(n);n<=i&&n>=-i&&s<=r&&s>=-r&&a.push({point:{x:n,y:s},color:o.color}),g+=g}return f});let u=[],h=[];t:for(let e=0;e<o.length;e++){const n=o[e];for(let e=0;e<l.length-1;e++){const i=l[e],r=l[e+1],o=i.distanceToLinearEquation(r),s=i.distanceToPoint(n),u=r.distanceToPoint(n);if(s<o&&u<o){const i=t.stopList.slice(1,t.stopList.length-1)[e],r=t.stopList.slice(1,t.stopList.length-1)[e+1],l=LM(i.color,r.color,s/o);a.splice(e+1,0,{point:n,color:l});continue t}}const i=l[0],r=l[l.length-1],s=i.distanceToPoint(n),c=r.distanceToPoint(n);s<=c?u.push({point:n,dis:s}):h.push({point:n,dis:c})}u=u.sort((t,e)=>e.dis-t.dis);const c=u.map((e,n)=>{if(0===n)return{point:e.point,color:t.stopList[0].color};{const n=t.stopList[0].color,i=t.stopList[1].color;return{point:e.point,color:LM(n,i,1-(0===u[0].dis?1:e.dis/u[0].dis))}}}).sort((t,e)=>e.point.y-t.point.y);h=h.sort((t,e)=>e.dis-t.dis);const d=h.map((e,n)=>{if(0===n)return{point:e.point,color:t.stopList[t.stopList.length-1].color};{const n=t.stopList[t.stopList.length-2].color,i=t.stopList[t.stopList.length-1].color;return{point:e.point,color:LM(n,i,0===h[0].dis?0:e.dis/h[0].dis)}}}).sort((t,e)=>e.point.y-t.point.y),p=c.concat(...a).concat(d);for(let t=0;t<p.length;t++)p[t].point.x+=i,p[t].point.y=-p[t].point.y+r;return{points:p,position:{x:0,y:0}}}const hA="\nvec3 rgb2hsl(vec3 rgb) {\n float cMax = max(max(rgb.r, rgb.g), rgb.b);\n float cMin = min(min(rgb.r, rgb.g), rgb.b);\n float delta = cMax - cMin;\n \n float h = 0.0;\n if (delta == 0.0) {\n h = 0.0;\n } else if (cMax == rgb.r) {\n h = 60.0 * mod(((rgb.g - rgb.b) / delta), 6.0);\n } else if (cMax == rgb.g ) {\n h = 60.0 * ((rgb.b - rgb.r) / delta + 2.0);\n } else if (cMax == rgb.b) {\n h = 60.0 * ((rgb.r - rgb.g) / delta + 4.0);\n }\n \n float l = (cMax + cMin) / 2.0;\n \n float s = 0.0;\n if (delta == 0.0) {\n s = 0.0;\n } else {\n s = delta / (1.0 - abs(2.0 * l - 1.0));\n }\n \n return vec3(h, s, l);\n}\n",cA=[hA],dA={biLevel:"\nvec4 transform(vec4 texColor, float arg) {\n vec3 hsl = rgb2hsl(texColor.rgb);\n mat3 rgb2yuv = mat3(\n 0.2126, 0.7152, 0.0722,\n -0.09991, -0.33609, 0.43600,\n 0.615, -0.5586, -0.05639\n );\n vec3 yuv = texColor.rgb * rgb2yuv;\n if (yuv.x >= 0.49 || texColor.a < 0.9) {\n return vec4(1.0, 1.0, 1.0, 1.0) * texColor.a;\n } else {\n return vec4(0.0, 0.0, 0.0, 1.0) * texColor.a;\n }\n}\n",alphaModFix:"\nvec4 transform(vec4 texColor, float arg) {\n return texColor * arg;\n}\n"};class pA extends Gx{constructor(t,e){var n;super(void 0,(n=dA[t],`\nvarying vec2 vTextureCoord;\n\nuniform float arg;\nuniform sampler2D uSampler;\n\n${cA.map(t=>t+"\n").join("\n")}\n\n${n}\n\nvoid main(void){\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = transform(texColor, arg);\n}\n`),{arg:e})}}const fA=[hA],mA={clrChange:"\nvec4 transform(vec4 texColor, vec4 arg1, vec4 arg2) {\n float epsilon = 0.001;\n vec3 colorDiff = arg1.rgb - (texColor.rgb / max(texColor.a, 0.0000000001));\n float colorDistance = length(colorDiff);\n if (colorDistance < epsilon) {\n arg2.rgb *= arg2.a;\n return arg2;\n } else {\n return texColor;\n }\n}\n",changeBulletColor:"\nvec4 transform(vec4 texColor, vec4 arg1, vec4 arg2) {\n if (texColor.a == 0.0) {\n return texColor;\n } else {\n return arg2;\n }\n}\n"};class gA extends Gx{constructor(t,e,n){var i;super(void 0,(i=mA[t],`\nvarying vec2 vTextureCoord;\n\nuniform vec4 arg1;\nuniform vec4 arg2;\nuniform sampler2D uSampler;\n\n${fA.map(t=>t+"\n").join("\n")}\n\n${i}\n\nvoid main(void){\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = transform(texColor, arg1, arg2);\n}\n`),{arg1:Float32Array.from(e),arg2:Float32Array.from(n)})}}const vA=[hA],_A={lum:"\nvec4 transform(vec4 texColor, float arg1, float arg2) {\n if (arg1 > 0.0) {\n texColor.r += (1.0 - texColor.r) * arg1;\n texColor.g += (1.0 - texColor.g) * arg1;\n texColor.b += (1.0 - texColor.b) * arg1;\n } else if (arg1 < 0.0) {\n texColor.r -= texColor.r * arg1;\n texColor.g -= texColor.g * arg1;\n texColor.b -= texColor.b * arg1;\n }\n // todo 对比度\n texColor.rgb *= texColor.a;\n return texColor;\n}\n"};class yA extends Gx{constructor(t,e,n){var i;super(void 0,(i=_A[t],`\nvarying vec2 vTextureCoord;\n\nuniform float arg1;\nuniform float arg2;\nuniform sampler2D uSampler;\n\n${vA.map(t=>t+"\n").join("\n")}\n\n${i}\n\nvoid main(void){\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = transform(texColor, arg1, arg2);\n}\n`),{arg1:e,arg2:n})}}class xA{constructor(t,e,n,i,r){this.ctx=t,this.fillStyle=e,this.width=n,this.height=i,this.config=r,this.clonedObjects=[],this._displayObject=null}get displayObject(){return this._displayObject||(this._displayObject=this.createDisplayObject()),this._displayObject}set displayObject(t){this._displayObject&&this._displayObject.destroy({children:!0,texture:!0}),this._displayObject=t}get hasFill(){return!!this.fillStyle&&"noFill"!==this.fillStyle.fillType}createDisplayObject(){var t;if(!this.fillStyle)return null;if(this.config.useSlideBackgroundFill&&this.ctx.bgTexture){const t=new Ow;return t.texture=this.ctx.bgTexture,t}if("solidFill"===this.fillStyle.fillType||"noFill"===this.fillStyle.fillType)return null;if("gradientFill"===this.fillStyle.fillType)return lA(this.fillStyle,this.width,this.height);if("blipFill"===this.fillStyle.fillType){const{src:e,filters:n}=this.fillStyle,i=this.ctx.spriteTexture.getTexture(e),r=this.ctx.spriteTexture.getFrameData(e);if(i){const e=new Ow;if(e.texture=i,n.length>0&&this.config.useFilter&&(e.filters=function(t){const e=[];return t.forEach(t=>{if("biLevel"===t.type)e.push(new pA("biLevel",t.args[0]));else if("clrChange"===t.type||"changeBulletColor"===t.type){const n=IM(t.args[0]),i=IM(t.args[1]);e.push(new gA(t.type,n,i))}else"alphaModFix"===t.type?e.push(new pA(t.type,t.args[0])):"lum"===t.type&&e.push(new yA(t.type,t.args[0],t.args[1]))}),e}(n)),this.config.fillFloat){const{l:n,t:i,r:r,b:o}=this.config.fillFloat.fillRect,s=this.width*(1-n-r),a=this.height*(1-i-o),l=null!==(t=this.config.shapeRotation)&&void 0!==t?t:0,u=new Aw;u.drawRect(0,0,s,a),u.pivot.x=s/2,u.pivot.y=a/2,u.rotation=l;const h=u.getBounds(),c=h.width,d=h.height;e.width=c,e.height=d,e.anchor.x=.5,e.anchor.y=.5,e.rotation=-1*l,e.name="math-texture",0===l?(e.position.x=c/2+n*this.width,e.position.y=d/2+i*this.width):(e.position.x=this.width/2,e.position.y=this.height/2)}else e.width=this.width,e.height=this.height,r.rotate&&(e.position.x=this.width/2,e.position.y=this.height/2,e.anchor.x=.5,e.anchor.y=.5,e.rotation=r.rotate/180*Math.PI);return e}}else if("gifFill"===this.fillStyle.fillType){const{src:t,delays:e}=this.fillStyle,n=this.ctx.spriteTexture.getGifFrames(t).map((t,n)=>({texture:t,time:e[n]||20})),i=new jE(n,!0);i.width=this.width,i.height=this.height;const r=this.fillStyle.loop;let o=1;return i.onLoop=()=>{o+=1,r>0&&o>r&&i.gotoAndStop(i.totalFrames)},i}return null}isSolidFill(){var t;return"solidFill"===(null===(t=this.fillStyle)||void 0===t?void 0:t.fillType)}getSolidFillColor(){var t;return"solidFill"===(null===(t=this.fillStyle)||void 0===t?void 0:t.fillType)?this.fillStyle.color:"#000000"}getClonedDisplayObject(){const t=this.createDisplayObject();return this.clonedObjects.push(t),t}destroy(){var t;null===(t=this._displayObject)||void 0===t||t.destroy(),this._displayObject=null,this.clonedObjects.forEach(t=>{null==t||t.destroy()}),this.clonedObjects=[]}}var bA=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class TA extends GM{constructor(t,e,n){var i;super(t,e,n),this.textureContainer=new ty,this.underline=null,this.cacheSprite=new Ow;const{shapeId:r,paragraphIndex:o,lineIndex:s,unitIndex:a,lineHeight:l,width:u,underLine:h,fill:c,height:d,isHorz:p,lineWidth:f}=t,m="solidFill"===(null===(i=null==c?void 0:c.fill)||void 0===i?void 0:i.fillType)?c.fill.color:null;if(h){const t=p?l/16:f/16;this.underline=new HM(e,h.type,t,u,d,m,p,r,o,s,a)}this.textGraphics=this.createTextGraphics(),this.textFill=this.createTextFill(),this.strokeGraphics=this.createStrokeGraphics(),this.strokeFill=this.createStrokeFill()}createStrokeFill(){const{stroke:t,lineWidth:e,lineHeight:n}=this.json;return new xA(this.ctx,null==t?void 0:t.fill,e,n,{useFilter:!1,useSlideBackgroundFill:!1})}createStrokeGraphics(){const{stroke:t}=this.json,e=(null==t?void 0:t.key)?{fillType:"blipFill",src:t.key,filters:[]}:void 0;return new xA(this.ctx,e,(null==t?void 0:t.width)||0,(null==t?void 0:t.height)||0,{useFilter:!1,useSlideBackgroundFill:!1})}createTextFill(){const{isHorz:t,fill:e,lineWidth:n,lineHeight:i,fillLineHeight:r}=this.json;return t?new xA(this.ctx,null==e?void 0:e.fill,n,Math.max(r,i),{useFilter:!1,useSlideBackgroundFill:!1}):new xA(this.ctx,null==e?void 0:e.fill,r,i,{useFilter:!1,useSlideBackgroundFill:!1})}createTextGraphics(){var t;const{fill:e,content:n}=this.json;let i="#000000";"solidFill"===(null===(t=null==e?void 0:e.fill)||void 0===t?void 0:t.fillType)&&(i=e.fill.color);const r=(null==e?void 0:e.key)?{fillType:"blipFill",src:e.key,filters:[{type:"changeBulletColor",args:["#000000",i]}]}:void 0;return new xA(this.ctx,r,(null==e?void 0:e.width)||0,(null==e?void 0:e.height)||0,{useFilter:"◾"===n,useSlideBackgroundFill:!1})}getIterateEntry(){return null}getBgElement(){return null}updateTransform(t){var e,n,i,r;const{isHorz:o}=this.json;t.position={x:o&&null!==(n=null===(e=t.position)||void 0===e?void 0:e.x)&&void 0!==n?n:0,y:o?0:null!==(r=null===(i=t.position)||void 0===i?void 0:i.y)&&void 0!==r?r:0},t.width=o?this.json.width:this.json.lineWidth,t.height=o?this.json.lineHeight:this.json.height,super.updateTransform(t)}preRender(){var t;null===(t=this.underline)||void 0===t||t.preRender()}render(t){t.addSubMTask(()=>bA(this,void 0,void 0,(function*(){this.doRender()})),"@TextUnitImpl[doRender]")}doRender(){let t=!1;const{lineWidth:e,lineHeight:n,baseLine:i,isHorz:r,underline:o,height:s,width:a,highlightColor:l,x:u,y:h,content:c,fillLineHeight:d,fill:p}=this.json;let f=!1!==this.json.needFill;if(p&&p.fill&&"solidFill"!==p.fill.fillType&&(f=!0),l){const t=new Aw,[i,o]=CM(l);t.beginFill(i,o),t.drawRect(0,0,r?a:e,r?n:s),t.endFill(),this.textureContainer.addChild(t)}if(this.textGraphics.displayObject){const e=this.textGraphics.displayObject;if(e.scale.x=.5,e.scale.y=.5,r&&(e.position.y=h>0?h:0),f){const n=this.textFill.displayObject;if(n)n.mask=e,n.addChild(e),n.position.x=-u,e.position.x+=u,t=!0,this.textureContainer.addChild(n);else if(this.textFill.isSolidFill()){const n=new NM;n.color=this.textFill.getSolidFillColor(),e.filters=[n],t=!0,this.textureContainer.addChild(e)}}else this.textureContainer.addChild(e)}if(this.strokeGraphics.displayObject){const e=this.strokeGraphics.displayObject;if(e.scale.x=.5,e.scale.y=.5,f){const n=this.strokeFill.displayObject;if(n)n.mask=e,n.addChild(e),r?n.position.y=h>0?h:0:n.position.x=u,this.textureContainer.addChild(n);else if(this.strokeFill.isSolidFill()){r?e.position.y=h>0?h:0:e.position.x=u;const n=new NM;n.color=this.strokeFill.getSolidFillColor(),e.filters=[n],t=!0,this.textureContainer.addChild(e)}}else r?e.position.y=h>0?h:0:e.position.x=u,this.textureContainer.addChild(e)}if(this.underline&&(this.underline.render(),this.underline.sprite)){r?(this.underline.sprite.position.y=o?o-n/16:i,this.underline.sprite.position.x=0):(this.underline.sprite.position.x=0,this.underline.sprite.position.y=0);const t=this.textFill.getClonedDisplayObject();t?(t.mask=this.underline.sprite,t.addChild(this.underline.sprite),this.textureContainer.addChild(t)):this.textureContainer.addChild(this.underline.sprite)}if(t){const t=Hy.create({width:r?a:e,height:r?Math.max(d,n):s,resolution:this.ctx.renderer.resolution});this.ctx.renderer.render(this.textureContainer,{renderTexture:t}),this.cacheSprite.texture=t,r&&h<0&&(this.cacheSprite.position.y=h),this.container.addChild(this.cacheSprite)}else this.container.addChild(this.textureContainer);this.container.name=c}destroy(){this.textFill.destroy(),this.textGraphics.destroy(),this.strokeFill.destroy(),this.strokeGraphics.destroy(),this.cacheSprite.texture.destroy(!0),this.cacheSprite.destroy(),this.textureContainer.destroy(),this.container.destroy()}}var wA=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class SA extends GM{constructor(){super(...arguments),this.units=[],this.isHorz=!0}getIterateElements(){return this.units}getIterateEntry(t,e,n){return this.units[e]?this.units[e]:(this.ctx.eventHub.emit("IterateTimeNodeEnd",n),null)}preRender(){}createUnits(t,e,n,i){for(let r=0,o=this.json.textUnits.length;r<o;r++)i.addSubMTask(()=>wA(this,void 0,void 0,(function*(){const i=this.json.textUnits[r],{height:o,width:s,fillHeight:a,baseline:l,y:u,underline:h}=this.json,c=new TA(Object.assign(Object.assign({},i),{lineHeight:o,lineWidth:s,baseLine:l-u,underline:h,fillLineHeight:a||o,isHorz:this.isHorz,shapeId:t,paragraphIndex:e,lineIndex:n,unitIndex:r}),this.ctx,this.global);c.preRender(),this.units.push(c)})),"@TextLineImpl[createUnits]")}render(t){for(const e of this.units.reverse())e.render(t),t.addSubMTask(()=>wA(this,void 0,void 0,(function*(){this.container.addChild(e.container)})),"@TextLineImpl[container.addChild]")}destroy(){this.units.forEach(t=>{t.destroy()}),this.container.destroy({children:!1})}}var EA=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class MA extends GM{constructor(){super(...arguments),this.iterateElements=[],this.lines=[],this.isHorz=!0}getIterateElements(){if(this.iterateElements.length>0)return this.iterateElements;const t=this.lines.reduce((t,e)=>t=t.concat(e.getIterateElements()),[]);return this.iterateElements=t,t}getIterateEntry(t,e,n){const i=this.getIterateElements();return i[e]?i[e]:(this.ctx.eventHub.emit("IterateTimeNodeEnd",n),null)}preRender(){}createLines(t,e,n){for(let i=0,r=this.json.lines.length;i<r;i++)n.addSubMTask(()=>EA(this,void 0,void 0,(function*(){const r=this.json.lines[i],o=new SA(r,this.ctx,this.global);o.isHorz=this.isHorz,o.container.name="line-"+i,o.createUnits(t,e,i,n),this.lines.push(o)})),"@TextParagraphImpl[createLines]")}render(t){for(const e of this.lines)e.render(t),t.addSubMTask(()=>EA(this,void 0,void 0,(function*(){this.container.addChild(e.container)})),"@TextParagraphImpl[container.addChild]")}destroy(){this.lines.forEach(t=>{t.destroy()}),this.container.destroy({children:!1})}}var AA=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class RA{constructor(t,e,n,i){this.iterateElements=[],this.paragraphs=[],this.container=new ty,this.json=t,this.ctx=e,this.parentGlobalPos=i,this.iterateType=n,this.container.name="textBody",this.global={x:this.parentGlobalPos.x+t.position.x,y:this.parentGlobalPos.y+t.position.y},this.container.position.x=t.position.x,this.container.position.y=t.position.y,this.container.scale.x=t.scale.x,this.container.scale.y=t.scale.y;const r=new Aw;r.drawRect(0,0,t.width,t.height),this.container.addChild(r)}get width(){return this.json.width}get height(){return this.json.height}get x(){return this.json.position.x}get y(){return this.json.position.y}getTextElement(t,e){return"paragraph"===t?this.paragraphs[e[0]]:null}getIterateEntry(t,e){return this.iterateElements[t]?this.iterateElements[t]:(this.ctx.eventHub.emit("IterateTimeNodeEnd",e),null)}destroy(){this.paragraphs.forEach(t=>{t.destroy()})}createParagraphs(t,e){for(let n=0,i=this.json.paragraphs.length;n<i;n++)e.addSubMTask(()=>AA(this,void 0,void 0,(function*(){var i;const r=this.json.paragraphs[n],o=new MA(r,this.ctx,this.global);o.isHorz=null===(i=this.json.isHorz)||void 0===i||i,o.createLines(t,n,e),e.addSubMTask(()=>AA(this,void 0,void 0,(function*(){this.iterateElements=this.iterateElements.concat(o.getIterateElements()),o.container.name="段落-"+n,this.paragraphs.push(o)})),"@TextBodyImpl[paragraphs.push]")})),"@TextBodyImpl[createParagraphs]")}render(t){for(const e of this.paragraphs)e.render(t),t.addSubMTask(()=>AA(this,void 0,void 0,(function*(){this.container.addChild(e.container)})),"@TextBodyImpl[container.addChild]");t.addSubMTask(()=>AA(this,void 0,void 0,(function*(){const{width:t}=this.container;this.container.scale.x<0&&(this.container.x+=-1*t)})),"@TextBodyImpl[reset width]")}}var PA=n(47),CA=n.n(PA),IA=n(48),OA=n.n(IA);const LA={Reflection:class extends Gx{constructor(t){super(CA.a,OA.a,{uShapeFilterArea:new Float32Array([0,0,0,0]),uStartAlpha:t.startAlpha,uEndAlpha:t.endAlpha,uBlur:0}),this.json=t}}};class NA{constructor(t){this.scaleX=1,this.scaleY=1,this.pivot={x:0,y:0},this.paths=[],this.hash="",this.width=0,this.height=0,this.graphicsId="",this.textureId="",this.id=t.id,this.type=t.type,this.heightSize=t.heightSize,this.widthSize=t.widthSize,this.fillStyle=t.fillStyle||{fillType:"solidFill",color:"#ffffffff"},this.lineWidth=t.lineWidth||1,this.position=t.position||{x:0,y:0},this.rotate=t.rotation||1,this.path=this.getUnitPath(),this.setScaleFromLineWidth(),this.setScaleFromSize(),this.generatePaths(),this.setPivot()}setPivot(){switch(this.type){case"oval":case"diamond":this.pivot={x:this.width/2,y:this.height/2};break;case"triangle":this.pivot={x:.7*this.width,y:this.height/2};break;case"arrow":case"stealth":default:this.pivot={x:this.width,y:this.height/2}}}generatePaths(){this.hash="arrow-"+dM()(this.path+this.scaleX+this.scaleY),this.paths=[{id:this.id,path:this.path,fill:"norm",hasStroke:!1,hash:this.hash,scale:{x:this.scaleX,y:this.scaleY}}]}getUnitPath(){switch(this.type){case"stealth":return"M 0,0 L 95250,47625 L 0,95250 L 28575,47625 C C";case"oval":return"M 0,47625 A 47625,47625,-3.14159265,6.2831853 C C";case"diamond":return"M 47625,0 L 95250,47625 L 47625,95250 L 0,47625 C C";case"arrow":return"M 9525,0 L 95250,47625 L 9525,95250 L 0,85725 L 68389.5,47625 L 0,9525 C C";case"triangle":return"M 0,0 L 95250,47625 L 0,95250 C C";default:return""}}setScaleFromLineWidth(){switch(this.type){case"stealth":case"oval":case"diamond":case"arrow":case"triangle":this.scaleX*=.29*this.lineWidth+.7,this.scaleY*=.29*this.lineWidth+.7;break;default:throw new Error("can't match any arrow type!")}}setScaleFromSize(){switch(this.type){case"stealth":case"oval":case"diamond":case"arrow":case"triangle":this.scaleX*=1,this.scaleY*=1;break;default:throw new Error("can't match any arrow type!")}switch(this.widthSize){case"sm":this.scaleX*=3/4;break;case"lg":this.scaleX*=1.25;break;case"med":this.scaleX*=1}switch(this.heightSize){case"sm":this.scaleY*=3/4;break;case"lg":this.scaleY*=1.25;break;case"med":this.scaleY*=1}this.width=10*this.scaleX,this.height=10*this.scaleY}}class DA{constructor(t,e,n,i,r,o,s,a,l,u,h){this.id=t,this.ctx=e,this.paths=n,this.hash=i,this.nept=r,this.width=o,this.height=s,this.lineStyle=a,this.shouldFill=l,this.bgColor=u,this.lnColor=h,this.clonedObjects=[],this._displayObject=null,this.isRectangle=!1,this.isPureRect=!1,this.isColoredPureRect=!1,this.isRectangle=this.rectangleDetect(n),this.isRectangle&&l?this.bgColor?this.isColoredPureRect=!0:this.isPureRect=!0:this.ctx.graphicsTexture.addGraphics(this.id,this.paths,this.hash,this.nept,this.width,this.height,this.lineStyle,this.ctx.objectPoolGroup,this.shouldFill,this.bgColor,this.lnColor)}get displayObject(){return this._displayObject}pointDis(t,e){return Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)}rectangleDetect(t){if(1!==t.length)return!1;const e=t[0].path.trim().split(" ");if(10!==e.length)return!1;const n=[],i=[];for(let t=0;t<e.length;t+=2){const r=e[t],o=e[t+1],[s,a]=o.split(",").map(t=>Number(t)/100);n.push(r),i.push({x:s,y:a})}if("MLLLC"!==n.join(""))return!1;for(let t=0;t<3;t++){const e=i[t],n=i[t+1];if(e.x!==n.x&&e.y!==n.y)return!1}const r=i.slice(0,4).reduce((t,e)=>t+e.x,0)/4,o=i.slice(0,4).reduce((t,e)=>t+e.y,0)/4;if(Number.isNaN(r)||Number.isNaN(o))return!1;const s={x:r,y:o};return KE(this.pointDis(s,i[0]),this.pointDis(s,i[1]))&&KE(this.pointDis(s,i[0]),this.pointDis(s,i[2]))&&KE(this.pointDis(s,i[0]),this.pointDis(s,i[3]))&&this.pointDis(s,i[0])===this.pointDis(s,i[1])}createDisplayObject(){if(this.isPureRect){const t=new Aw;return t.beginFill(0,1),t.drawRect(0,0,this.width,this.height),t}if(this.isColoredPureRect&&this.bgColor){const t=new Aw,[e,n]=CM(this.bgColor);return t.beginFill(e,n),t.drawRect(0,0,this.width,this.height),t}{const t=new Ow,e=this.ctx.graphicsTexture.getGraphicsData(this.id);return e?(t.texture=e.texture,t.pivot.x=e.pivot.x,t.pivot.y=e.pivot.y,t):null}}getClonedDisplayObject(){const t=this.createDisplayObject();return this.clonedObjects.push(t),t}render(){this._displayObject=this.createDisplayObject()}isNeedMask(t,e){let n=!1;return this._displayObject&&(n=!(this.isRectangle&&Math.abs(t-this._displayObject.width)<2&&Math.abs(e-this._displayObject.height)<2&&this.shouldFill)),n}addArrows(t){var e;null===(e=this._displayObject)||void 0===e||e.addChild(t)}destroy(){var t;null===(t=this._displayObject)||void 0===t||t.destroy(),this._displayObject=null,this.clonedObjects.forEach(t=>{null==t||t.destroy()}),this.clonedObjects=[]}}var FA=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};const BA={pivot:{x:0,y:0},width:0,height:0};class UA extends AM{constructor(t,e,n,i){var r;super(t,e,n),this.renderContainer=new ty,this.needCacheAsBitMap=!1,this.backgroundGraphics=null,this.filterAreaJustifies=[],this.strokeGraphics=null,this.arrowList=[],this.fillColorFilter=new NM,this.strokeColorFilter=new NM,this.id="",this.fill=new SM(this),this.stroke=new TM(this),this.updateFilterArea=()=>{const t=this.renderContainer.getBounds(!1),e=this.filterAreaJustifies.map(e=>e(t)),n=e.map(t=>t.width),i=e.map(t=>t.height),r=new d_(t.x,t.y,Math.max(...n),Math.max(...i));this.renderContainer.filterArea=r,(this.renderContainer.filters||[]).forEach(t=>{t.uniforms.uShapeFilterArea=new Float32Array(4),t.uniforms.uShapeFilterArea[0]=r.x,t.uniforms.uShapeFilterArea[1]=r.y,t.uniforms.uShapeFilterArea[2]=r.width,t.uniforms.uShapeFilterArea[3]=r.height})},this.json=t,this.json.fillStyle&&"groupFill"===this.json.fillStyle.fillType&&i&&(this.json.fillStyle=i),this.id=t.id;const{fillStyle:o,lineStyle:s}=this.json;this.container.name=t.id,this.renderContainer.name=t.id+"-render-container",this.generateArrowList(),this.backgroundFill=this.createBackgroundFill(),this.backgroundGraphics=this.createBackgroundGraphics(),this.strokeFill=this.createStrokeFill(),this.strokeGraphics=this.createStrokeGraphics(),this.ctx.timingTargets.addTarget(this.id,this),"solidFill"===(null==o?void 0:o.fillType)&&(this.fillColorFilter.currentColor=o.color,this.fillColorFilter.designColor=o.color),"solidFill"===(null===(r=null==s?void 0:s.fill)||void 0===r?void 0:r.fillType)&&(this.strokeColorFilter.currentColor=s.fill.color,this.strokeColorFilter.designColor=s.fill.color),this.updateTransform(this.json),t.textBody&&(this.text=new RA(t.textBody,this.ctx,t.textBody.iterateType,{x:this.designGlobalPosition.x,y:this.designGlobalPosition.y})),this.container.hitArea=new g_(1,1,this.json.width,this.json.height)}get interactiveContainer(){return this.renderContainer}get strokeActive(){var t,e,n,i,r,o,s;return this.strokeFill.displayObject?(null!==(n=null===(e=null===(t=this.strokeFill.displayObject)||void 0===t?void 0:t.filters)||void 0===e?void 0:e.length)&&void 0!==n?n:-1)>0:(null!==(s=null===(o=null===(r=null===(i=this.strokeGraphics)||void 0===i?void 0:i.displayObject)||void 0===r?void 0:r.filters)||void 0===o?void 0:o.length)&&void 0!==s?s:-1)>0}set strokeActive(t){var e,n,i,r,o,s;const{displayObject:a}=this.strokeFill;t?a&&(null!==(n=null===(e=a.filters)||void 0===e?void 0:e.indexOf(this.strokeColorFilter))&&void 0!==n?n:-1)<0?a.filters=[this.strokeColorFilter]:(null===(i=this.strokeGraphics)||void 0===i?void 0:i.displayObject)&&(null!==(o=null===(r=this.strokeGraphics.displayObject.filters)||void 0===r?void 0:r.indexOf(this.strokeColorFilter))&&void 0!==o?o:-1)<0&&(this.strokeGraphics.displayObject.filters=[this.strokeColorFilter]):a?a.filters=[]:(null===(s=this.strokeGraphics)||void 0===s?void 0:s.displayObject)&&(this.strokeGraphics.displayObject.filters=[])}get fillActive(){var t,e,n,i,r,o,s;return this.backgroundFill.displayObject?(null!==(n=null===(e=null===(t=this.backgroundFill.displayObject)||void 0===t?void 0:t.filters)||void 0===e?void 0:e.length)&&void 0!==n?n:-1)>0:(null!==(s=null===(o=null===(r=null===(i=this.backgroundGraphics)||void 0===i?void 0:i.displayObject)||void 0===r?void 0:r.filters)||void 0===o?void 0:o.length)&&void 0!==s?s:-1)>0}set fillActive(t){var e,n,i,r,o,s;t?this.backgroundFill.displayObject&&(null!==(n=null===(e=this.backgroundFill.displayObject.filters)||void 0===e?void 0:e.indexOf(this.fillColorFilter))&&void 0!==n?n:-1)<0?this.backgroundFill.displayObject.filters=[this.fillColorFilter]:(null===(i=this.backgroundGraphics)||void 0===i?void 0:i.displayObject)&&(null!==(o=null===(r=this.backgroundGraphics.displayObject.filters)||void 0===r?void 0:r.indexOf(this.fillColorFilter))&&void 0!==o?o:-1)<0&&(this.backgroundGraphics.displayObject.filters=[this.fillColorFilter]):this.backgroundFill.displayObject?this.backgroundFill.displayObject.filters=[]:(null===(s=this.backgroundGraphics)||void 0===s?void 0:s.displayObject)&&(this.backgroundGraphics.displayObject.filters=[])}getTextElement(t,e){var n,i;return null!==(i=null===(n=this.text)||void 0===n?void 0:n.getTextElement(t,e))&&void 0!==i?i:null}getBgElement(){return this}getIterateEntry(t,e,n){return 0===e?this:"el"===t?(this.ctx.eventHub.emit("IterateTimeNodeEnd",n),null):this.text?this.text.getIterateEntry(e-1,n)||null:(this.ctx.eventHub.emit("IterateTimeNodeEnd",n),null)}createStrokeGraphics(){var t,e,n,i;const{id:r,geometry:o,lineStyle:s}=this.json,{width:a,height:l,pivot:u}=(null==o?void 0:o.lineTransform)||BA,h=a||this.json.width,c=l||this.json.height,d="solidFill"===(null===(t=null==s?void 0:s.fill)||void 0===t?void 0:t.fillType)?s.fill.color:null;return s&&"noFill"!==(null===(e=s.fill)||void 0===e?void 0:e.fillType)?new DA(r+"-path-graphics",this.ctx,null!==(n=null==o?void 0:o.paths)&&void 0!==n?n:[],null!==(i=null==o?void 0:o.hash)&&void 0!==i?i:"",u||{x:0,y:0},h,c,s,!1,null,d):null}createStrokeFill(){const[t,e]=this.calculateFillObjectOffset(),{geometry:n,lineStyle:i,width:r,height:o}=this.json,s=(null==n?void 0:n.lineTransform)||BA,a=Object(l.isNumber)(null==i?void 0:i.width)?i.width:1;return new xA(this.ctx,null==i?void 0:i.fill,(s.width||r)+a+t,Math.max((s.height||o)+a,e),{useFilter:!1,useSlideBackgroundFill:!1})}createBackgroundGraphics(){var t;const{geometry:e,lineStyle:n,fillStyle:i,id:r}=this.json,{width:o,height:s,pivot:a}=(null==e?void 0:e.lineTransform)||BA,l=o||this.json.width,u=s||this.json.height,h="solidFill"===(null==i?void 0:i.fillType)?i.color:null;return i&&"noFill"!==i.fillType||this.json.isPicture?new DA(r+"-bg-graphics",this.ctx,null!==(t=null==e?void 0:e.paths)&&void 0!==t?t:[],(null==e?void 0:e.hash)||"",a||{x:0,y:0},l,u,n,!0,h,null):null}createBackgroundFill(){var t,e;const{fillStyle:n,width:i,height:r,lineStyle:o,geometry:s}=this.json,a=(null==s?void 0:s.fillTransform)||BA;return new xA(this.ctx,n,(a.width||i)+(null!==(t=null==o?void 0:o.width)&&void 0!==t?t:0),(a.height||r)+(null!==(e=null==o?void 0:o.width)&&void 0!==e?e:0),{useFilter:!1,useSlideBackgroundFill:this.json.useBgFill,fillFloat:this.json.fillFloat,shapeRotation:this.json.rotation})}createBackground(){var t,e,n,i,r,o,s,a;const{pivot:l,width:u,height:h}=(null===(t=this.json.geometry)||void 0===t?void 0:t.fillTransform)||BA,{displayObject:c}=this.backgroundFill;c?(this.json.useBgFill&&(null===(n=this.backgroundGraphics)||void 0===n?void 0:n.displayObject)?(this.needCacheAsBitMap=!0,c.mask=this.backgroundGraphics.displayObject,c.pivot.x=(null===(i=this.json.position)||void 0===i?void 0:i.x)||0,c.pivot.y=(null===(r=this.json.position)||void 0===r?void 0:r.y)||0,this.container.addChild(this.backgroundGraphics.displayObject)):"gifFill"===(null===(o=this.json.fillStyle)||void 0===o?void 0:o.fillType)?(c.height=h||this.designHeight,c.width=u||this.designWidth,c instanceof jE&&c.play(),(null===(s=this.backgroundGraphics)||void 0===s?void 0:s.isNeedMask(c.width,c.height))&&(c.mask=this.backgroundGraphics.displayObject,this.backgroundGraphics.displayObject&&this.container.addChild(this.backgroundGraphics.displayObject))):(null===(a=this.backgroundGraphics)||void 0===a?void 0:a.isNeedMask(c.width,c.height))&&(this.json.fillFloat||(this.needCacheAsBitMap=!0,c.mask=this.backgroundGraphics.displayObject,this.backgroundGraphics.displayObject&&this.container.addChild(this.backgroundGraphics.displayObject))),this.json.fillFloat||(c.x=l.x,c.y=l.y),this.container.addChild(c)):this.backgroundFill.hasFill&&(null===(e=this.backgroundGraphics)||void 0===e?void 0:e.displayObject)&&this.container.addChild(this.backgroundGraphics.displayObject)}createPathFill(){var t,e,n;const{displayObject:i}=this.strokeFill,r=null===(t=this.strokeGraphics)||void 0===t?void 0:t.displayObject,[o,s]=this.calculateFillObjectOffset();i?((null===(e=this.strokeGraphics)||void 0===e?void 0:e.isNeedMask(i.width,i.height))&&r&&(this.needCacheAsBitMap=!0,i.pivot.x=r.pivot.x,i.pivot.y=r.pivot.y,r.pivot.x=0,r.pivot.y=0,i.mask=r,i.addChild(r),i.position.x=-o/2,i.position.y=-s/2,r.position.x=o/2,r.position.y=s/2),this.container.addChild(i)):this.strokeFill.hasFill&&(null===(n=this.strokeGraphics)||void 0===n?void 0:n.displayObject)&&this.container.addChild(this.strokeGraphics.displayObject)}createFilledPathMask(){var t,e,n;const i=(null===(e=null===(t=this.json.geometry)||void 0===t?void 0:t.paths)||void 0===e?void 0:e.filter(t=>"none"!==t.fill&&"norm"!==t.fill))||[];for(const t of i){const e=this.ctx.graphicsTexture.getGraphicsData(t.id);if(e){const i=new Ow(e.texture);i.pivot.x=e.pivot.x,i.pivot.y=e.pivot.y;const r=this.backgroundFill.getClonedDisplayObject(),o=null===(n=this.backgroundGraphics)||void 0===n?void 0:n.getClonedDisplayObject(),s=r||o;s&&(this.backgroundFill.displayObject&&(s.pivot.x=this.backgroundFill.displayObject.pivot.x,s.pivot.y=this.backgroundFill.displayObject.pivot.y),s.mask=i,s.filters=[kM[t.fill]],this.needCacheAsBitMap=!0,this.container.addChild(s),this.container.addChild(i))}}}createArrow(){this.arrowList.length&&this.arrowList.forEach(t=>{var e;const n=this.ctx.graphicsTexture.getGraphicsData(t.graphicsId);if(n){const{texture:i}=n,r=new Ow(i);r.pivot.x=t.pivot.x,r.pivot.y=t.pivot.y,r.position.x=t.position.x,r.position.y=t.position.y,r.rotation=t.rotate/180*Math.PI,null===(e=this.backgroundGraphics)||void 0===e||e.addArrows(r)}})}generateArrowList(){var t,e;const{lineArrowList:n,lineStyle:i,id:r}=this.json,o="solidFill"===(null===(t=null==i?void 0:i.fill)||void 0===t?void 0:t.fillType)?i.fill.color:null;null===(e=n||[])||void 0===e||e.forEach((t,e)=>{var n,s;const a=new NA(Object.assign(Object.assign({},t),{fillStyle:null==i?void 0:i.fill,lineWidth:null!==(n=null==i?void 0:i.width)&&void 0!==n?n:0}));a.graphicsId=`${r}-arrow-${e}-graphics`,a.textureId=`${r}-arrow-${e}-fill`,this.ctx.graphicsTexture.addGraphics(a.graphicsId,null!==(s=a.paths)&&void 0!==s?s:[],a.hash,{x:0,y:0},a.width,a.height,void 0,this.ctx.objectPoolGroup,!0,o,null),this.arrowList.push(a)})}calculateFillObjectOffset(){let[t,e]=[0,0];return this.arrowList.length&&(t=this.arrowList.reduce((t,e)=>Math.max(t,e.width),0),e=this.arrowList.reduce((t,e)=>Math.max(t,e.height),0)),[t,e]}preRender(t){var e,n,i;const{lineStyle:r,geometry:o}=this.json,{width:s,height:a}=(null==o?void 0:o.lineTransform)||BA,l=s||this.json.width,u=a||this.json.height,h=(null===(e=null==o?void 0:o.paths)||void 0===e?void 0:e.filter(t=>"none"!==t.fill&&"norm"!==t.fill))||[],c="solidFill"===(null===(n=null==r?void 0:r.fill)||void 0===n?void 0:n.fillType)?r.fill.color:null;t.addSubMTask(()=>FA(this,void 0,void 0,(function*(){for(const t of h)this.ctx.graphicsTexture.addGraphics(t.id,[t],t.hash,((null==o?void 0:o.lineTransform)||BA).pivot,l,u,r,this.ctx.objectPoolGroup,!0,null,c)})),"@ShapeImpl[addGraphics]"),null===(i=this.text)||void 0===i||i.createParagraphs(this.json.id,t)}subClassRender(){}setupEffect(){const{effectList:t}=this.json;if(t&&t.length>0){const e=[];return t.forEach(t=>{"reflection"===t.type&&(this.filterAreaJustifies.push(t=>(t.height*=2,t)),e.push(new LA.Reflection(t)))}),this.ctx.ticker.add(this.updateFilterArea,void 0,-20),this.renderContainer.filters=e,!0}return!1}render(t){t.addSubMTask(()=>FA(this,void 0,void 0,(function*(){var t,e;null===(t=this.strokeGraphics)||void 0===t||t.render(),null===(e=this.backgroundGraphics)||void 0===e||e.render(),this.createBackground(),this.subClassRender(),this.createFilledPathMask(),this.createPathFill(),this.createArrow()})),"@ShapeImpl[render]"),this.text&&this.text.render(t),t.addSubMTask(()=>FA(this,void 0,void 0,(function*(){var t,e,n,i,r,o,s,a;if("wd"===(null===(t=this.json.textBody)||void 0===t?void 0:t.iterateType)||"lt"===(null===(e=this.json.textBody)||void 0===e?void 0:e.iterateType))this.renderContainer.addChild(this.container),this.text&&(this.text.container.scale.y=null!==(i=null===(n=this.json.scale)||void 0===n?void 0:n.y)&&void 0!==i?i:0,this.text.container.position.x+=(null!==(o=null===(r=this.json.position)||void 0===r?void 0:r.x)&&void 0!==o?o:0)+this.text.x,this.text.container.position.y+=(null!==(a=null===(s=this.json.position)||void 0===s?void 0:s.y)&&void 0!==a?a:0)+this.text.y,-1===this.text.container.scale.y&&(this.text.container.position.y+=this.text.height),this.renderContainer.addChild(this.text.container));else{if(this.text){if(Object(l.isBoolean)(this.json.textRotateWithShape)&&!this.json.textRotateWithShape){const t=this.json.rotation||0;this.text.container.rotation=-t;const{width:e}=this.text;this.text.container.position.x=e}this.container.addChild(this.text.container)}this.renderContainer.addChild(this.container)}if(this.needCacheAsBitMap,"background"===this.json.id&&this.ctx.hasBackgroundFillShape){const t=Hy.create({width:this.json.width,height:this.json.height,resolution:Math.ceil(this.ctx.renderer.resolution)});this.ctx.renderer.render(this.renderContainer,{renderTexture:t}),this.ctx.bgTexture=t}})),"@ShapeImpl[post.render]")}clearOnSlideChange(){}initOnReuse(){}destroy(){var t,e,n,i;null===(t=this.text)||void 0===t||t.destroy(),this.fillColorFilter.destroy(),this.strokeColorFilter.destroy(),this.backgroundFill.destroy(),null===(e=this.backgroundGraphics)||void 0===e||e.destroy(),this.strokeFill.destroy(),null===(n=this.strokeGraphics)||void 0===n||n.destroy(),this.renderContainer.destroy(),null===(i=this.arrowRenderTexture)||void 0===i||i.destroy(!0),this.arrowList=[]}}var kA=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};function GA(t,e){for(const n in e)t.style[n]=e[n]}class HA{constructor(t){var e,n;this.progress=document.createElement("div"),this.totalTime=document.createElement("span"),this.playButton=document.createElement("div"),this.pauseButton=document.createElement("div"),this.currentTime=document.createElement("span"),this.mediaController=document.createElement("div"),this.currentProgress=document.createElement("div"),this.medianIsEnd=!1,this.playCallBackList=[],this.duration=0,this.start=0,this.end=0,this.changeMediaProgress=t=>{if(this.ctx.isPlayerPaused())return void this.ctx.logger.info("Media controller prevent seek event with paused state",this.ctx.taskId);t.stopPropagation();const e=t.offsetX/this.progress.clientWidth*this.duration;this.jumpToTime(e),this.medianIsEnd=!1,this.ctx.eventHub.emit(YR.mediaSeek,{id:this.targetId,time:this.media.currentTime-this.start,isPlaying:this.media.isPlaying})},this.jumpToTime=(t=0)=>{const e=Math.floor(t)+this.start;this.media.currentTime!==e&&(this.media.currentTime=e)},this.showController=t=>{t.stopPropagation(),this.show()},this.getMediaDuration=()=>{this.duration&&!Number.isNaN(this.duration)||(this.duration=this.media.duration,this.start&&(this.duration-=this.start,this.jumpToTime()),this.end&&(this.duration-=this.end)),this.totalTime.innerText=HA.formatTime(this.duration)},this.playMedia=()=>kA(this,void 0,void 0,(function*(){this.playButton.style.display="none",this.pauseButton.style.display="block",yield this.media.play(),this.medianIsEnd&&(this.medianIsEnd=!1,this.jumpToTime()),this.playCallBackList.forEach(t=>{t()})})),this.pauseMedia=()=>kA(this,void 0,void 0,(function*(){this.playButton.style.display="block",this.pauseButton.style.display="none",yield this.media.pause()})),this.onMouseOut=t=>{t.stopPropagation(),this.mediaController.style.display="none"},this.mediaTimeUpdate=()=>kA(this,void 0,void 0,(function*(){const t=this.media.currentTime-this.start;this.duration>0&&(t>this.duration||this.media.ended)&&(yield this.pauseMedia(),this.medianIsEnd=!0),this.currentTime.innerText=HA.formatTime(t),this.currentProgress.style.flex=(t/this.duration).toString()})),this.onPauseMedia=()=>{this.playButton.style.display="block",this.pauseButton.style.display="none"},this.onPlayMedia=()=>{this.playButton.style.display="none",this.pauseButton.style.display="block",this.playCallBackList.forEach(t=>{t()})},this.playMediaFromCtrl=()=>{this.ctx.isPlayerPaused()?this.ctx.logger.info("Media controller prevent play event with paused state",this.ctx.taskId):(this.ctx.eventHub.emit(YR.mediaPlay,{id:this.targetId,time:this.media.currentTime}),this.playMedia())},this.pauseMediaFromCtrl=()=>{this.ctx.isPlayerPaused()?this.ctx.logger.info("Media controller prevent pause event with paused state",this.ctx.taskId):(this.ctx.eventHub.emit(YR.mediaPause,{id:this.targetId,time:this.media.currentTime}),this.pauseMedia())},this.targetId=t.targetId,this.ctx=t.ctx,this.height=t.height,this.width=t.width,this.target=t.target,this.media=t.media,this.info=t.info,this.canvasElement=t.canvasElement,this.getMedianContainer(),this.createMediaController(),this.info.cut&&(this.start=null!==(e=this.info.cut.start)&&void 0!==e?e:0,this.end=null!==(n=this.info.cut.end)&&void 0!==n?n:0)}getMedianContainer(){var t;let e=null===(t=this.canvasElement.parentElement)||void 0===t?void 0:t.querySelector(".median-container");e||(e=document.createElement("div"),e.className="median-container",this.canvasElement.parentElement.appendChild(e)),this.container=e}static formatTime(t){let e="00:00";if(t){const n=Math.floor(t/60),i=String(n<0?0:n).padStart(2,"0"),r=Math.floor(t%60);e=`${i}:${String(r<0?0:r).padStart(2,"0")}`}return e}createButton(){const t={marginLeft:"15px",marginRight:"10px",fontSize:"0",height:"20px"};GA(this.playButton,Object.assign(Object.assign({},t),{display:"block"}));const e=document.createElement("img");GA(e,{height:"20px"}),e.src="https://convertcdn.netless.link/publicFiles/icon/play.png",this.playButton.appendChild(e),GA(this.pauseButton,Object.assign(Object.assign({},t),{display:"none"}));const n=document.createElement("img");GA(n,{height:"20px"}),n.src="https://convertcdn.netless.link/publicFiles/icon/pause.png",this.pauseButton.appendChild(n)}createTimer(){const t=document.createElement("div");GA(t,{width:"100px"}),this.currentTime.innerText="00:00";const e=document.createElement("span");return e.innerText="/",t.append(this.currentTime,e,this.totalTime),t}createProgress(){GA(this.progress,{flex:"1",position:"relative",marginRight:"10px"});const t=document.createElement("div");GA(t,{background:"#D9D9D9",position:"relative",height:"10px",display:"flex"}),this.progress.appendChild(t),GA(this.currentProgress,{background:"#4F4F4F",top:"0px",left:"0",height:"10px",flex:"0"}),t.appendChild(this.currentProgress)}bindEvent(){this.mediaController.addEventListener("mouseover",this.showController,!1),this.mediaController.addEventListener("mouseout",this.onMouseOut,!1),this.progress.addEventListener("mousedown",this.changeMediaProgress,!1),this.playButton.addEventListener("click",this.playMediaFromCtrl,!1),this.pauseButton.addEventListener("click",this.pauseMediaFromCtrl,!1),this.media.on("durationchange",this.getMediaDuration,!1),this.media.on("timeupdate",this.mediaTimeUpdate,!1),this.media.on("pause",this.onPauseMedia,!1),this.media.on("play",this.onPlayMedia,!1)}setControllerPosition(){var t;const{target:e}=this,{stageWidth:n,stageHeight:i}=this.ctx,r=e.getGlobalPosition(),o=Number(null===(t=this.container)||void 0===t?void 0:t.getAttribute("data-scale")),s=n*o,a=1/o*(300>s?s/300:1);r.y=r.y+this.height-50,r.x=Math.max(r.x,0),r.x=Math.min(r.x,n-300*a),r.y=Math.max(r.y,0),r.y=Math.min(r.y,i-50),GA(this.mediaController,{height:"50px",borderRadius:"25px",width:"300px",flexDirection:"row",alignItems:"center",position:"absolute",left:r.x+"px",top:r.y+"px",display:"none",background:"#fff",zIndex:"2",border:"1px solid #ccc",transform:`scale(${a})`,transformOrigin:"0 100%"})}createMediaController(){this.setControllerPosition(),this.createButton();const t=this.createTimer();this.createProgress(),this.mediaController.append(this.playButton,this.pauseButton,t,this.progress),this.container.appendChild(this.mediaController),this.bindEvent()}addPlayCallBack(t){this.playCallBackList.push(t)}unbindEvent(){this.mediaController.removeEventListener("mouseover",this.showController,!1),this.mediaController.removeEventListener("mouseout",this.onMouseOut,!1),this.progress.removeEventListener("mousedown",this.changeMediaProgress,!1),this.playButton.removeEventListener("click",this.playMediaFromCtrl,!1),this.pauseButton.removeEventListener("click",this.pauseMediaFromCtrl,!1),this.media.removeAllListeners()}show(){this.setControllerPosition(),this.mediaController.style.display="flex"}hide(){this.mediaController.style.display="none"}destroy(){var t;this.unbindEvent(),this.playCallBackList=[],null===(t=this.container)||void 0===t||t.removeChild(this.mediaController)}}var zA=n(49);class jA extends a.a{constructor(t,e){super(),this.isGlobalPause=!1,this.lastTime=-1,this.howl=null,this.rctClient=null,this.url=t,this.runningAudio=e,ZR.RtcAudioClazz?(this.rctClient=new ZR.RtcAudioClazz(t),this.rctClient.on("load",()=>this.emit("load")),this.rctClient.on("pause",()=>this.emit("pause")),this.rctClient.on("play",()=>this.emit("play"))):(this.howl=new zA.Howl({src:[t]}),this.howl.on("load",()=>this.emit("load")),this.howl.on("pause",()=>this.emit("pause")),this.howl.on("play",()=>this.emit("play")))}startTimeChangeEmit(){this.currentTime!==this.lastTime&&(this.lastTime=this.currentTime,this.emit("timeupdate")),this.isEnded||requestAnimationFrame(()=>this.startTimeChangeEmit())}play(){var t,e,n;this.runningAudio.has(this.url)&&(null===(t=this.runningAudio.get(this.url))||void 0===t||t.stop(),this.runningAudio.delete(this.url)),this.lastTime=-1,null===(e=this.howl)||void 0===e||e.play(),null===(n=this.rctClient)||void 0===n||n.play(),this.startTimeChangeEmit(),this.runningAudio.set(this.url,this)}pause(){var t,e;null===(t=this.howl)||void 0===t||t.pause(),null===(e=this.rctClient)||void 0===e||e.pause(),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}globalPause(){this.isPaused||(this.isGlobalPause=!0,this.pause())}globalResume(){this.isGlobalPause&&(this.isGlobalPause=!1,this.play())}stop(){var t;null===(t=this.howl)||void 0===t||t.stop(),this.rctClient&&(this.rctClient.pause(),this.rctClient.currentTime=0),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}destroy(){var t,e,n,i,r,o,s;null===(t=this.howl)||void 0===t||t.pause(),null===(e=this.howl)||void 0===e||e.unload(),null===(n=this.rctClient)||void 0===n||n.pause(),null===(i=this.rctClient)||void 0===i||i.destroy(),null===(r=this.rctClient)||void 0===r||r.removeAllListeners("load"),null===(o=this.rctClient)||void 0===o||o.removeAllListeners("play"),null===(s=this.rctClient)||void 0===s||s.removeAllListeners("pause"),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}get currentTime(){return this.rctClient?this.rctClient.currentTime:this.howl?this.howl.seek():-1}set currentTime(t){this.rctClient?this.rctClient.currentTime=t:this.howl&&this.howl.seek(t)}get duration(){return this.rctClient?this.rctClient.duration:this.howl?this.howl.duration():0}get isEnded(){return Math.abs(this.currentTime-this.duration)<.001}get isPaused(){return this.rctClient?this.rctClient.isPaused:!!this.howl&&this.howl.playing()}}var VA=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class WA extends a.a{constructor(t){var e,n;super(),this.type="video",this.sprite=new Ow,this.isPlaying=!1,this.isGlobalPause=!1,this.id=t.id,this.start=null===(e=t.video.cut)||void 0===e?void 0:e.start,this.end=null===(n=t.video.cut)||void 0===n?void 0:n.end,this.container=t.container,this.ctx=t.ctx,this.ctx.medias[this.id]=this;let i=t.video.src;this.ctx.loaderDelegate&&(i=this.ctx.loaderDelegate.redirectMedia(i),this.ctx.logger.info(`redirect media url from ${t.video.src} to ${i} by delegate.`,t.ctx.taskId)),this.videoResource=new Iy(i,{autoLoad:!0,autoPlay:!1,updateFPS:30,crossorigin:!0});let r=t.video.src.replace(/4$/,"3");this.ctx.loaderDelegate&&(r=this.ctx.loaderDelegate.redirectMedia(r),this.ctx.logger.info(`redirect media url from ${t.video.src.replace(/4$/,"3")} to ${r} by delegate.`,t.ctx.taskId)),this.rtcAudio=new jA(r,t.ctx.runningAudio);const{video:o,width:s,height:a,target:l}=t;this.controller=new HA({targetId:t.id,ctx:t.ctx,width:s,height:a,target:l,media:this,info:o,canvasElement:t.canvasElement}),this.controller.addPlayCallBack(()=>{this.sprite.width=s,this.sprite.height=a,this.ctx.clock.setTimeout(()=>{this.sprite.visible=!0},50)});const u=new wy(null,{height:a,width:s});u.resource=this.videoResource,this.videoResource.bind(u),this.sprite=new Ow,this.sprite.visible=!1,this.sprite.texture=new ky(u),this.sprite.interactive=!0,this.container.addChild(this.sprite),this.sprite.on("mouseover",t=>{t.stopPropagation(),this.controller.show()}),this.sprite.on("mouseout",t=>{t.stopPropagation(),this.controller.hide()}),["durationchange","timeupdate","pause","play"].forEach(t=>{this.videoResource.source.addEventListener(t,()=>{"timeupdate"!==t||this.isPlaying||this.pause(),this.emit(t)})}),this.ctx.activeMedia.add(this)}get currentTime(){var t,e;return null!==(e=null===(t=this.videoResource.source)||void 0===t?void 0:t.currentTime)&&void 0!==e?e:0}set currentTime(t){this.videoResource.source&&(this.videoResource.source.currentTime=t)}get paused(){var t,e;return null===(e=null===(t=this.videoResource.source)||void 0===t?void 0:t.paused)||void 0===e||e}get ended(){var t,e;return null===(e=null===(t=this.videoResource.source)||void 0===t?void 0:t.ended)||void 0===e||e}get duration(){var t,e;return null!==(e=null===(t=this.videoResource.source)||void 0===t?void 0:t.duration)&&void 0!==e?e:0}showController(){this.controller.show()}hideController(){this.controller.hide()}play(){var t;return VA(this,void 0,void 0,(function*(){this.isPlaying=!0,yield this.load(),yield this.ctx.clock.waitUntil(()=>{const t=this.videoResource.source;return!!(t&&t.videoWidth>0)},3e3);const e=this.videoResource.source;e&&e.videoWidth<=0||(ZR.RtcAudioClazz&&(this.rtcAudio.play(),this.videoResource.source.volume=0),yield null===(t=this.videoResource.source)||void 0===t?void 0:t.play())}))}load(){return this.videoResource.load()}pause(){var t;this.isPlaying=!1,ZR.RtcAudioClazz&&this.rtcAudio.pause(),null===(t=this.videoResource.source)||void 0===t||t.pause()}globalPause(){this.isPlaying&&(this.isGlobalPause=!0,this.pause())}globalResume(){this.isGlobalPause&&(this.isGlobalPause=!1,this.play())}togglePause(){this.isPlaying?this.pause():this.play()}seek(t){this.controller.jumpToTime(t)}stop(){this.seek(0),this.pause()}destroy(){var t;this.sprite.interactive=!1,this.sprite.destroy({texture:!0,baseTexture:!0}),null===(t=this.videoResource)||void 0===t||t.destroy(),this.rtcAudio.destroy(),this.controller.destroy(),this.ctx.activeMedia.delete(this)}}var XA=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class qA extends a.a{constructor(t){super(),this.type="audio",this.isPlaying=!1,this.isGlobalPause=!1,this.id=t.id;let e=t.audio.src;t.ctx.loaderDelegate&&(e=t.ctx.loaderDelegate.redirectMedia(e),t.ctx.logger.info(`redirect media url from ${t.audio.src} to ${e} by delegate.`,t.ctx.taskId)),this.audioPlayer=new jA(e,t.ctx.runningAudio),t.audio.cut&&(this.start=t.audio.cut.start,this.end=t.audio.cut.end),this.ctx=t.ctx,this.ctx.medias[this.id]=this;const{width:n,height:i,target:r}=t;this.controller=new HA({targetId:t.id,ctx:t.ctx,height:i,width:n,target:r,media:this,info:t.audio,canvasElement:t.canvasElement}),this.audioPlayer.on("load",()=>this.emit("durationchange")),this.audioPlayer.on("timeupdate",()=>this.emit("timeupdate")),this.audioPlayer.on("pause",()=>this.emit("pause")),this.audioPlayer.on("play",()=>this.emit("play")),this.ctx.activeMedia.add(this)}get currentTime(){return this.audioPlayer.currentTime}set currentTime(t){this.audioPlayer.currentTime=t}get paused(){return this.audioPlayer.isPaused}get isPaused(){return this.audioPlayer.isPaused}get ended(){return this.audioPlayer.isEnded}get duration(){return this.audioPlayer.duration}load(){return Promise.resolve()}showController(){this.controller.show()}hideController(){this.controller.hide()}play(){return XA(this,void 0,void 0,(function*(){this.ctx.isPlayerPaused()?this.ctx.logger.info("Audio player prevent play event with paused state",this.ctx.taskId):(this.isPlaying=!0,this.audioPlayer.play())}))}pause(){this.ctx.isPlayerPaused()?this.ctx.logger.info("Audio player prevent pause event with paused state",this.ctx.taskId):(this.isPlaying=!1,this.audioPlayer.pause())}globalPause(){this.isPlaying&&(this.isGlobalPause=!0,this.pause())}globalResume(){this.isGlobalPause&&(this.isGlobalPause=!1,this.play())}togglePause(){this.isPlaying?this.pause():this.play()}seek(t){this.ctx.isPlayerPaused()?this.ctx.logger.info("Audio player prevent seek event with paused state",this.ctx.taskId):this.controller.jumpToTime(t)}stop(){this.seek(0),this.pause()}destroy(){this.audioPlayer.pause(),this.controller.destroy(),this.ctx.activeMedia.delete(this)}}class YA extends UA{constructor(t,e,n,i){super(Object.assign(Object.assign({},t),{type:"Shape",useBgFill:!1,textRotateWithShape:!0,isPicture:!0}),e,n,i),this.isInteractiveOutside=!1,this.cmd=new wM(this),this.media=null==t?void 0:t.media,this.picFill=new xA(this.ctx,t.picFill,t.width,t.height,{useFilter:!1,useSlideBackgroundFill:!1})}applyCommand(t,e){var n,i,r,o,s;if("call"===e)if(/playFrom\(([0-9.]+)\)/.test(t)){const e=t.match(/playFrom\(([0-9.]+)\)/),i=Number(e[1]||"0");null===(n=this.mediaPlayer)||void 0===n||n.play().then(()=>{var t;null===(t=this.mediaPlayer)||void 0===t||t.seek(i)})}else"custom-pause"===t?null===(i=this.mediaPlayer)||void 0===i||i.pause():"togglePause"===t?null===(r=this.mediaPlayer)||void 0===r||r.togglePause():"stop"===t&&(null===(o=this.mediaPlayer)||void 0===o||o.pause(),null===(s=this.mediaPlayer)||void 0===s||s.seek(0))}renderPic(){var t,e,n,i,r;const{displayObject:o}=this.picFill;if(o){const s=null===(t=this.backgroundGraphics)||void 0===t?void 0:t.getClonedDisplayObject();(null===(e=this.backgroundGraphics)||void 0===e?void 0:e.isNeedMask(o.width,o.height))&&s&&(o.mask=s,this.container.addChild(s)),o.width=this.designWidth,o.height=this.designHeight,o instanceof jE&&this.ctx.slideScopeEventHub.once("slide-render",t=>{this.ctx.slideIndex===t&&o.play()}),this.container.addChild(o),"video"===(null===(n=this.media)||void 0===n?void 0:n.type)&&this.media.src?(this.mediaPlayer=new WA({id:this.json.id+"-video",ctx:this.ctx,video:this.media,height:this.designHeight,width:this.designWidth,target:o,container:this.container,canvasElement:this.ctx.view}),null===(i=this.mediaPlayer)||void 0===i||i.sprite):"audio"===(null===(r=this.media)||void 0===r?void 0:r.type)&&this.media.src&&(this.mediaPlayer=new qA({id:this.json.id+"-audio",ctx:this.ctx,audio:this.media,height:this.designHeight,width:this.designWidth,target:o,canvasElement:this.ctx.view})),this.mediaPlayer&&(this.isInteractiveOutside=this.container.interactive,this.container.interactive=!0,this.container.on("mouseover",()=>{this.mediaPlayer.showController()}),this.container.on("mouseout",()=>{this.mediaPlayer.hideController()},!1))}}preRender(t){super.preRender(t)}subClassRender(){this.renderPic()}clearOnSlideChange(){super.clearOnSlideChange(),this.mediaPlayer&&(this.container.interactive=!1,this.mediaPlayer.stop(),this.mediaPlayer.hideController())}initOnReuse(){super.initOnReuse(),this.mediaPlayer&&(this.container.interactive=!0)}destroy(){this.mediaPlayer&&(this.picFill.displayObject&&!this.isInteractiveOutside&&(this.container.interactive=!1),this.mediaPlayer.destroy(),this.mediaPlayer=void 0),this.picFill.destroy()}}var ZA=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class JA extends AM{constructor(t,e,n,i,r){super(t,e,n),this.children=[],this.cacheSprite=new Ow,this.cacheContainer=new ty,this.json=t,this.json.fillStyle&&"groupFill"===this.json.fillStyle.fillType&&i&&(this.json.fillStyle=i),this.container.name=t.id,this.cacheContainer.name=t.id+"-cache-container",this.ctx.timingTargets.addTarget(t.id,this),this.updateTransform(this.json),this.fillObject=new xA(this.ctx,t.fillStyle,t.width,t.height,{useFilter:!1,useSlideBackgroundFill:!1}),this.createChildren(r)}createChildren(t){var e,n,i,r;const o={x:null!==(n=null===(e=this.json.position)||void 0===e?void 0:e.x)&&void 0!==n?n:0,y:null!==(r=null===(i=this.json.position)||void 0===i?void 0:i.y)&&void 0!==r?r:0};for(let e=0,n=this.json.children.length;e<n;e++)t.addSubMTask(()=>ZA(this,void 0,void 0,(function*(){const n=this.json.children[e];let i=null;"Shape"===(null==n?void 0:n.type)?i=new UA(n,this.ctx,o,this.json.fillStyle):"Picture"===(null==n?void 0:n.type)?i=new YA(n,this.ctx,o,this.json.fillStyle):"Container"===(null==n?void 0:n.type)&&(i=new JA(n,this.ctx,o,this.json.fillStyle,t)),i&&this.children.push(i)})),"@ContainerImpl[child.init]")}get interactiveContainer(){return this.container}get renderContainer(){return this.container}preRender(t){for(const e of this.children)t.addSubMTask(()=>ZA(this,void 0,void 0,(function*(){e.preRender(t)})),"@ContainerImpl[child.preRender]")}getBgElement(){return null}getIterateEntry(t,e,n){return 0===e?this:(this.ctx.eventHub.emit("IterateTimeNodeEnd",n),null)}getTextElement(){return null}render(t){for(const e of this.children)e.render(t),t.addSubMTask(()=>ZA(this,void 0,void 0,(function*(){var t;e.renderContainer&&this.cacheContainer.addChild(e.renderContainer),(e.json.hlinkHover||e.json.hlinkClick)&&(null===(t=e.hyperlink)||void 0===t||t.addProxy(this.container))})),"@ContainerImpl[child.render]");t.addSubMTask(()=>ZA(this,void 0,void 0,(function*(){this.container.addChild(this.cacheContainer)})),"@ContainerImpl[child.append]")}clearOnSlideChange(){this.children.forEach(t=>t.clearOnSlideChange())}initOnReuse(){this.children.forEach(t=>t.initOnReuse())}destroy(){this.cacheSprite&&this.cacheSprite.destroy({texture:!0}),this.children.forEach(t=>t.destroy()),this.container.destroy({children:!0,texture:!0,baseTexture:!0}),this.cacheContainer.destroy({children:!0,texture:!0,baseTexture:!0})}}class KA extends a.a{constructor(t,e,n,i){super(),this.cond={},this.timeoutIds=[],this.condHandle=(t,e={})=>{if(t)if(t.delay&&t.delay>0){const n=this.ctx.clock.setTimeout(()=>{t.event&&(this.cond[t.event]=!0,this.detectTrigger(e))},t.delay);this.timeoutIds.push(n)}else this.cond[t.event]=!0,this.detectTrigger(e);else this.detectTrigger(e)},this.id=t,this.ctx=i,this.eventHubs=n,e.forEach(t=>{this.addCond(t)})}setTriggerParams(t){this.triggerParams=t}addCond(t){const e=e=>this.condHandle(t,e);t.event&&(/^shape/.test(t.event)||/^time/.test(t.event)?(this.cond[t.event]=!1,this.eventHubs.global.addListener(t.event,e)):/^runtime/.test(t.event)?(this.cond[t.event]=!1,this.eventHubs.runtime.addListener(t.event,e)):/^self/.test(t.event)?t.delay&&t.delay>0&&(this.cond[t.event]=!1,this.eventHubs.runtime.addListener(t.event,e)):this.cond[t.event]=!1)}isTrigger(){return Object.keys(this.cond).every(t=>!!this.cond[t])}isTriggerWithoutParent(){return Object.keys(this.cond).filter(t=>"self"!==t).every(t=>!!this.cond[t])}detectTrigger(t){if(Object.keys(this.cond).every(t=>!!this.cond[t])){Object.keys(this.cond).forEach(t=>{this.cond[t]=!1});const e=this.triggerParams;this.triggerParams=void 0,this.emit("active",e,t)}}reset(){Object.keys(this.cond).forEach(t=>{this.cond[t]=!1}),this.timeoutIds.forEach(t=>this.ctx.clock.clearTimeout(t))}}class $A extends a.a{constructor(t){super(),this.isTimeNodeEndSync=!1,this.interactiveListeners=[],this.runtimeNodeEventHub=new a.a,this._currentSeqIndex=0,this._currentSeqState="idle",this.isForward=!0,this.autoPlay=!1,this.handlePrev=(t=!1)=>{var e,n,i,r,o,s;this.hasPrev()||!this.isMainSeq?"idle"===this.currentSeqState?(this.decrSeqIndex(),null===(e=this.commonTimeNode.children[this.currentSeqIndex])||void 0===e||e.commonTimeNode.seekToStart(),null===(n=this.commonTimeNode.children[this.currentSeqIndex])||void 0===n||n.commonTimeNode.clearSubList(),this.currentSeqState="idle"):"running"===this.currentSeqState?(null===(i=this.commonTimeNode.children[this.currentSeqIndex])||void 0===i||i.commonTimeNode.seekToStart(),null===(r=this.commonTimeNode.children[this.currentSeqIndex])||void 0===r||r.commonTimeNode.clearSubList(),this.currentSeqState="idle"):"end"===this.currentSeqState&&(this.currentSeqIndex>=this.commonTimeNode.children.length&&(this.currentSeqIndex=this.commonTimeNode.children.length-1),null===(o=this.commonTimeNode.children[this.currentSeqIndex])||void 0===o||o.commonTimeNode.seekToStart(),null===(s=this.commonTimeNode.children[this.currentSeqIndex])||void 0===s||s.commonTimeNode.clearSubList(),this.currentSeqState="idle"):this.globalEventHub.emit("c:prev slide",t)},this.handleNext=(t=!1)=>{var e,n,i,r;this.isTimeNodeEndSync&&(this.isTimeNodeEndSync=!1,this.currentSeqState="idle",this.currentSeqIndex=0),this.hasNext()||!this.isMainSeq?"idle"===this.currentSeqState?null===(e=this.commonTimeNode.children[this.currentSeqIndex])||void 0===e||e.commonTimeNode.startTimeNodeForce():"running"===this.currentSeqState?(null===(n=this.commonTimeNode.children[this.currentSeqIndex])||void 0===n||n.commonTimeNode.seekToEnd(!1,!0),this.currentSeqState="end",this.incrSeqIndex(),null===(i=this.commonTimeNode.children[this.currentSeqIndex])||void 0===i||i.commonTimeNode.startTimeNodeForce()):"end"===this.currentSeqState&&(this.incrSeqIndex(),null===(r=this.commonTimeNode.children[this.currentSeqIndex])||void 0===r||r.commonTimeNode.startTimeNodeForce()):this.globalEventHub.emit("c:next slide",t)};const{json:e,iterateType:n,isIterate:i,isSub:r,parent:o,ctx:s,eventHub:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:c}=t;this.isMainSeq="mainSeq"===e.ctn.nodeType,this.isInteractiveSeq="interactiveSeq"===e.ctn.nodeType,this.id=e.ctn.id,this.isIterate=i,this.json=e,this.ctx=s,this.globalEventHub=l,this.commonTimeNode=new MR({json:e.ctn,isSub:r,eventHubs:{global:l,runtime:this.runtimeNodeEventHub},ctx:s,parent:o,isIterate:!1,iterateType:n,iterateIndex:u,iterateId:h,isInInteractiveSeq:c||this.isInteractiveSeq}),this.bindShapeEvent(),this.nextConds=new KA("mainSeq",e.nextCondLst,{global:l,runtime:this.runtimeNodeEventHub},this.ctx),this.prevConds=new KA("mainSeq",e.preCondLst,{global:l,runtime:this.runtimeNodeEventHub},this.ctx),this.commonTimeNode.on("timeNodeRestart",()=>{this.currentSeqIndex=0,this.currentSeqState="idle"}),this.commonTimeNode.on("childTimeNodeStart",t=>{const e=this.commonTimeNode.children.findIndex(e=>e.commonTimeNode.uuid===t.id);e>=0&&(this.currentSeqIndex=e),this.currentSeqState="running",this.isMainSeq&&this.ctx.eventHub.emit(YR.mainSeqStepStart,e)}),this.commonTimeNode.on("childTimeNodeEnd",t=>{const e=this.commonTimeNode.children.findIndex(e=>e.commonTimeNode.uuid===t.id);e>=0&&(this.currentSeqIndex=e),this.currentSeqState="end",this.autoPlay&&this.ctx.clock.setTimeout(()=>{this.handleNext()}),this.isMainSeq&&this.ctx.eventHub.emit(YR.mainSeqStepEnd,e)}),this.commonTimeNode.on("timeNodeEndSync",()=>{this.isTimeNodeEndSync=!0,this.commonTimeNode.resetForRepeat()}),this.commonTimeNode.on("timeNodeDestroy",()=>{this.interactiveListeners.forEach(([t,e])=>{t&&e&&t.interactiveContainer.removeListener("pointerdown",e)}),this.interactiveListeners=[]}),this.nextConds.on("active",(t,e)=>{this.handleNext(e)}),this.prevConds.on("active",(t,e)=>{this.handlePrev(e)})}get currentSeqIndex(){return this._currentSeqIndex}set currentSeqIndex(t){this._currentSeqIndex=t,this.isMainSeq?this.ctx.eventHub.emit(YR.mainSeqStepChange,t):this.isInteractiveSeq&&this.ctx.eventHub.emit(YR.interactiveSeqStateChange,{id:this.json.ctn.id,state:{step:t,state:this._currentSeqState}})}get currentSeqState(){return this._currentSeqState}set currentSeqState(t){this._currentSeqState=t,this.isMainSeq?this.ctx.eventHub.emit(YR.mainSeqStateChange,t):this.isInteractiveSeq&&this.ctx.eventHub.emit(YR.interactiveSeqStateChange,{id:this.json.ctn.id,state:{step:this._currentSeqIndex,state:t}})}get stepLength(){return this.commonTimeNode.children.length}get currentStep(){return this.currentSeqIndex}get currentState(){return this.currentSeqState}startAutoPlay(){this.autoPlay=!0,this.commonTimeNode.children[0].commonTimeNode.startTimeNodeForce()}incrSeqIndex(){this.currentSeqIndex+1<=this.commonTimeNode.children.length&&(this.currentSeqIndex+=1)}decrSeqIndex(){this.currentSeqIndex-1>=-1&&(this.currentSeqIndex-=1)}hasPrev(){return!(this.currentSeqIndex<=0&&"idle"===this.currentSeqState)}hasNext(){return!(this.currentSeqIndex>=this.commonTimeNode.children.length||this.currentSeqIndex===this.commonTimeNode.children.length-1&&"end"===this.currentSeqState)}bindShapeEvent(){"interactiveSeq"===this.json.ctn.nodeType&&this.json.nextCondLst.forEach(t=>{if(/^shape/.test(t.event)){const e=t.event.split(" ")[1];if(e){const t=this.ctx.timingTargets.getTargetById(e);if(t){t.interactiveContainer.interactive=!0,t.interactiveContainer.cursor="pointer";const n=()=>{this.ctx.eventHub.emit(YR.userInput);const t=`shape ${e} onClick`,{mode:n}=this.ctx;"interactive"!==n&&"sync"!==n||this.ctx.eventHub.emit(YR.interactiveSeqAction,{action:t,seqId:this.json.ctn.id}),"sync"!==n&&"local"!==n||this.globalEventHub.emit(t)};t.interactiveContainer.on("pointerdown",n),this.interactiveListeners.push([t,n])}}}})}setCurrentStep(t,e){this.isInteractiveSeq&&0===this.commonTimeNode.applyCount&&(this.commonTimeNode.applyCount=1);let n=t;this.commonTimeNode.seekToStart();const{length:i}=this.commonTimeNode.children;if(-1===n&&(n=i-1),n>=0&&n<i)for(let t=0;t<=n;t++){const i=this.commonTimeNode.children[t];t!==n?i.commonTimeNode.seekToEnd(!1,!0):"start"===e?i.commonTimeNode.seekToStart():"end"===e&&i.commonTimeNode.seekToEnd(!1,!0)}this.currentSeqIndex=n,this.currentSeqState="start"===e?"idle":"end"}}function QA(t,e,n){const i=e.split(".");i.reduce((r,o,s)=>{if(r)return s!==i.length-1?r[o]:void(r[o]=n);console.warn(`${t} not support ${e}`)},t)}function tR(t,e){if(!e)return null;return e.split(".").reduce((n,i)=>{if(n)return n[i];console.warn(`${t} not support ${e}`)},t)}class eR{constructor(t){this.timingTarget=null,this.runtimeNodeEventHub=new a.a,this.basicOnTimeNodeEnd=()=>{if(this.isConflict){const{target:t}=this.json.cBhvr,e=this.getTargetId(t);this.ctx.conflictTimeNodeManager.removeRunningTimeNode(e,this.modifyAttrKey)}},this.basicOnTimeLineStart=()=>{if(this.isConflict){const{target:t}=this.json.cBhvr;if("next"===this.activeWhenConflict){const e=this.getTargetId(t);this.ctx.conflictTimeNodeManager.addRunningTimeNode(e,this.modifyAttrKey,this.commonTimeNode)}else"prev"===this.activeWhenConflict&&this.commonTimeNode.dispose()}};const{isIterate:e,isSub:n,json:i,ctx:r,parent:o,eventHub:s,iterateType:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:c}=t;this.json=i,this.id=i.cBhvr.ctn.id,this.ctx=r,this.globalEventHub=s,this.commonTimeNode=new MR({json:i.cBhvr.ctn,isSub:n,eventHubs:{global:s,runtime:this.runtimeNodeEventHub},ctx:r,parent:o,isIterate:e,iterateType:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:c}),this.timingTarget=this.ctx.timingTargets.getTarget(i.cBhvr.target,e,{type:l,index:u,id:h}),this.commonTimeNode.on("seekToStart",()=>this.onSeekToStart()),this.commonTimeNode.on("seekToEnd",()=>this.onSeekToEnd()),this.commonTimeNode.on("timelineStart",this.basicOnTimeLineStart),this.commonTimeNode.on("timeNodeEnd",this.basicOnTimeNodeEnd)}getTargetId(t){let e=t.id;return"shape"===t.type&&t.txEl&&(e=`${e}-txEl-${t.txEl.range[0]}`),this.commonTimeNode.isIterate&&(e=`${e}-iterate-${this.commonTimeNode.iterateIndex}`),e}}class nR extends eR{constructor(t){super(t),this.isConflict=!1,this.activeWhenConflict="next",this.startVal=null,this.updateStartValue=()=>{this.timingTarget&&(this.startVal=tR(this.timingTarget,this.json.cBhvr.attrList[0]))},this.onSeekToStart=()=>{const t=this.json.cBhvr.attrList[0];null!==this.startVal&&this.timingTarget&&QA(this.timingTarget,t,this.startVal)},this.onSeekToEnd=()=>{const t=this.json.cBhvr.attrList[0],e=this.json.cBhvr.to||this.json.to;e&&this.timingTarget&&QA(this.timingTarget,t,e)},this.commonTimeNode.on("timeNodeStart",this.updateStartValue),this.commonTimeNode.on("timeNodeCreate",this.updateStartValue),this.commonTimeNode.on("timeUpdate",({duration:t,delta:e})=>{if(e/t>=1){const t=this.json.cBhvr.attrList[0];this.json.cBhvr.attrList.length>1&&console.warn("this.json.cBhvr.attrList.length > 0");const e=this.json.cBhvr.to||this.json.to;e&&this.timingTarget&&QA(this.timingTarget,t,e)}})}get modifyAttrKey(){return this.json.cBhvr.attrList[0]}}var iR=function(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s};class rR{constructor(t,e){this.math={pi:Math.PI,e:Math.E,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,ceil:Math.ceil,cos:Math.cos,cosh:Math.cosh,deg:t=>t/Math.PI*180,exp:Math.exp,floor:Math.floor,ln:Math.log,max:Math.max,min:Math.min,rad:t=>t/180*Math.PI,rand:Math.random,sin:Math.sin,sinh:Math.sinh,sqrt:Math.sqrt,tan:Math.tan,tanh:Math.tanh},this.timingTarget=e,this.val=t.val.value,this.time=t.time,t.fmla&&(this.fmla=this.parseFmla(t.fmla))}parseFmla(t){let e=t.replace(/#ppt_h/g,`(${this.timingTarget.design_ppt_h})`);return e=e.replace(/#ppt_w/g,`(${this.timingTarget.design_ppt_w})`),e=e.replace(/#ppt_x/g,`(${this.timingTarget.design_ppt_x})`),e=e.replace(/#ppt_y/g,`(${this.timingTarget.design_ppt_y})`),e=e.replace(/ppt_w/g,"vars.ppt_w"),e=e.replace(/ppt_h/g,"vars.ppt_h"),e=e.replace(/ppt_x/g,"vars.ppt_x"),e=e.replace(/ppt_y/g,"vars.ppt_y"),e=e.replace(/#/g,"vars."),["abs","acos","asin","atan","ceil","cos","cosh","deg","exp","floor","ln","max","min","rad","rand","sin","sinh","sqrt","tan","tanh","pi","e"].forEach(t=>{const n=new RegExp(`([^a-z])${t}([^a-z])`,"g");e=e.replace(n,(e,n,i)=>`${n}math.${t}${i}`)}),new Function("vars","math","$","return "+e)}}class oR extends rR{constructor(t,e,n){super(t,e),this.value=t.val.value,n&&(this.fmla=this.parseFmla(n))}resolveValue(){return this.value}interpolationFrom(t,e,n){const i=t.resolveValue(n),r=i+(this.resolveValue()-i)*e;return t.fmla?t.fmla(n,this.math,r):r}}iR([YE()],oR.prototype,"interpolationFrom",null);class sR extends rR{constructor(t,e){var n;super(t,e),this.value=null===(n=t.val)||void 0===n?void 0:n.value}interpolationFrom(t,e,n){let i=t.resolveValue(n);return e>this.time&&(i=this.resolveValue()),i}resolveValue(){return this.value||""}}iR([YE()],sR.prototype,"interpolationFrom",null);class aR extends rR{constructor(t,e){super(t,e),this.fn=this.parseFmla(this.val)}resolveValue(t){return this.fn(t,this.math,1)}interpolationFrom(t,e,n){const i=t.resolveValue(n),r=i+(this.resolveValue(n)-i)*e;return t.fmla?t.fmla(n,this.math,r):r}}iR([YE()],aR.prototype,"interpolationFrom",null);class lR extends rR{constructor(t,e){super(t,e),this.value=t.val.value}interpolationFrom(t,e){return LM(t.resolveValue(),this.value,e)}resolveValue(){return this.value}}iR([YE()],lR.prototype,"interpolationFrom",null);class uR extends eR{constructor(t){super(t),this.isConflict=!0,this.activeWhenConflict="next",this.startVal=null,this.vars={ppt_x:0,ppt_y:0,ppt_w:0,ppt_h:0},this.keyFrames=[],this.isColorAnim=!1,this.onTimeNodeStart=()=>{this.timingTarget&&(this.startVal=tR(this.timingTarget,this.json.cBhvr.attrList[0]))},this.updateVars=()=>{var t,e,n,i;(null===(t=this.timingTarget)||void 0===t?void 0:t.ppt_h)&&(this.vars.ppt_h=this.timingTarget.ppt_h),(null===(e=this.timingTarget)||void 0===e?void 0:e.ppt_w)&&(this.vars.ppt_w=this.timingTarget.ppt_w),(null===(n=this.timingTarget)||void 0===n?void 0:n.ppt_x)&&(this.vars.ppt_x=this.timingTarget.ppt_x),(null===(i=this.timingTarget)||void 0===i?void 0:i.ppt_y)&&(this.vars.ppt_y=this.timingTarget.ppt_y),this.isColorAnim},this.onTimeUpdate=({duration:t,delta:e})=>{const n=e/t,i=this.keyFrames.findIndex(t=>n<=t[0]),{attrList:r}=this.json.cBhvr;if(i<0){const t=this.keyFrames[this.keyFrames.length-1];return void(this.timingTarget&&r&&r[0]&&QA(this.timingTarget,r[0],t[1].resolveValue(this.vars)))}const o=i-1,s=this.keyFrames[i],a=this.keyFrames[o]||s,l=s[0]-a[0]==0?1:(n-a[0])/(s[0]-a[0]),u=s[1].interpolationFrom(a[1],l,this.vars);this.timingTarget&&r&&r[0]&&QA(this.timingTarget,r[0],u)},this.onSeekToStart=()=>{null!==this.startVal&&this.timingTarget&&QA(this.timingTarget,this.json.cBhvr.attrList[0],this.startVal)},this.onSeekToEnd=()=>{this.onTimeUpdate({duration:1,delta:1,isReverse:!1})},this.initKeyFrames(),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("timelineStart",this.updateVars),this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart)}get modifyAttrKey(){return this.json.cBhvr.attrList[0]}initKeyFrames(){var t;const{valueType:e}=this.json;if(this.json.tavLst.length<=0)if(this.json.to){if(this.json.from||this.startVal){const t={time:0,val:{type:"string",value:this.json.from||this.startVal.toString()},fmla:""};if("num"===e&&this.timingTarget){const e=new aR(t,this.timingTarget);this.keyFrames.push([t.time,e])}}const t={time:1,val:{type:"string",value:this.json.to},fmla:""};if("num"===e&&this.timingTarget){const e=new aR(t,this.timingTarget);this.keyFrames.push([t.time,e])}}else if(this.json.by){const n={time:0,val:{type:"string",value:this.json.cBhvr.attrList[0]},fmla:""};if("num"===e&&this.timingTarget){const t=new aR(n,this.timingTarget);this.keyFrames.push([n.time,t])}const i={time:1,val:{type:"string",value:((null===(t=n.val)||void 0===t?void 0:t.value)||"")+"+"+this.json.by},fmla:""};if("num"===e&&this.timingTarget){const t=new aR(i,this.timingTarget);this.keyFrames.push([i.time,t])}}if(this.json.tavLst.length>0)for(const t of this.json.tavLst)if(t.val&&this.timingTarget){let n=null;"string"===t.val.type?"num"===e?n=new aR(t,this.timingTarget):"str"===e&&(n=new sR(t,this.timingTarget)):"number"===t.val.type?n=new oR(t,this.timingTarget):"color"===t.val.type?(this.isColorAnim=!0,n=new lR(t,this.timingTarget)):"boolean"===t.val.type&&console.warn("not implements"),n&&this.keyFrames.push([t.time,n])}}}var hR=n(50),cR=n.n(hR),dR=n(51),pR=n.n(dR);class fR extends Gx{constructor(){super(pR.a,cR.a,{percent:0,direction:1,transition:0})}set transition(t){this.uniforms.transition=t}set percent(t){this.uniforms.percent=t}set direction(t){this.uniforms.direction=t}}var mR=n(52),gR=n.n(mR);class vR extends Gx{constructor(){super(void 0,gR.a,{percent:0,transition:1})}set transition(t){this.uniforms.transition=Math.pow(t,t)}set percent(t){this.uniforms.percent=t}}class _R extends eR{constructor(t){var e;super(t),this.filterType="",this.isConflict=!0,this.activeWhenConflict="prev",this.onTimeUpdate=({duration:t,delta:e})=>{const n=e/t;this.filter&&(this.filter.percent=this.commonTimeNode.applyTimeFilter(n)),n>=1&&this.timingTarget&&this.ctx.clock.setTimeout(()=>{this.timingTarget&&(this.timingTarget.container.filters=[])})},this.onSeekToStart=()=>{this.timingTarget&&(this.timingTarget.container.filters=[])},this.onSeekToEnd=()=>{this.timingTarget&&(this.timingTarget.container.filters=[])},this.commonTimeNode.on("timelineStart",()=>{this.filter&&this.timingTarget&&(this.timingTarget.container.filters=[this.filter])}),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate);let n=0;"out"===t.json.transition?n=-1:"in"===t.json.transition&&(n=1);const i=null===(e=t.json.filter)||void 0===e?void 0:e.match(/^([a-zA-Z]+)(\((.+)\))?/);if(i){const t=i[1],e=i[3];if("wipe"===t){const n=new fR;"up"===e?n.direction=1:"down"===e?n.direction=2:"left"===e?n.direction=3:"right"===e&&(n.direction=4),this.filter=n,this.filterType=`${t}-${e}`}else if("fade"===t){const e=new vR;this.filter=e,this.filterType=""+t}this.filter&&(this.filter.transition=n)}}get modifyAttrKey(){return this.filterType}}class yR extends eR{constructor(t){super(t),this.isConflict=!0,this.activeWhenConflict="next",this.startPos=null,this.onTimeNodeStart=()=>{var t,e;this.startPos={x:(null===(t=this.timingTarget)||void 0===t?void 0:t.ppt_x)||0,y:(null===(e=this.timingTarget)||void 0===e?void 0:e.ppt_y)||0}},this.onTimeUpdate=({duration:t,delta:e})=>{var n;const i=e/t,r=null===(n=this.path)||void 0===n?void 0:n.getPoint(i);this.timingTarget&&r&&(this.timingTarget.ppt_x=r.x+this.timingTarget.design_ppt_x,this.timingTarget.ppt_y=r.y+ +this.timingTarget.design_ppt_y)},this.onSeekToStart=()=>{this.timingTarget&&this.startPos&&(this.timingTarget.ppt_x=this.startPos.x,this.timingTarget.ppt_y=this.startPos.y)},this.onSeekToEnd=()=>{var t,e,n;const i=null!==(e=null===(t=this.commonTimeNode.json)||void 0===t?void 0:t.spd)&&void 0!==e?e:1,r=null===(n=this.path)||void 0===n?void 0:n.getPoint(i>0?1:0);this.timingTarget&&r&&(this.timingTarget.ppt_x=r.x+this.timingTarget.design_ppt_x,this.timingTarget.ppt_y=r.y+this.timingTarget.design_ppt_y)},this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.createPath()}get modifyAttrKey(){return"motion"}createPath(){var t;const e=new xc,n=null===(t=this.json.path)||void 0===t?void 0:t.match(/[MLCmlc][^MLCmlc]+/g);if(n)for(const t of n){const[n,...i]=t.trim().replace(/\s+/g," ").split(" ");if("M"===n){const[t,n]=i.map(t=>Number(t));e.moveTo(t,n)}else if("L"===n){const[t,n]=i.map(t=>Number(t));e.lineTo(t,n)}else if("C"===n){const[t,n,r,o,s,a]=i.map(t=>Number(t));e.bezierCurveTo(t,n,r,o,s,a)}else if("Z"===n)e.closePath();else if("E"===n)console.warn("not implements");else if("c"===n){const[t,n,r,o,s,a]=i.map(t=>Number(t)),l=e.currentPoint;e.bezierCurveTo(t+l.x,n+l.y,r+l.x,o+l.y,s+l.x,a+l.y)}else if("l"===n){const t=e.currentPoint,[n,r]=i.map(t=>Number(t));e.lineTo(n+t.x,r+t.y)}else if("m"===n){const t=e.currentPoint,[n,r]=i.map(t=>Number(t));e.moveTo(n+t.x,r+t.y)}}this.path=e}}class xR extends eR{constructor(t){super(t),this.isConflict=!0,this.activeWhenConflict="next",this.startVal=null,this.onTimelineStart=t=>{t.isReverse||this.updateCurrentValue()},this.onTimeUpdate=({duration:t,delta:e})=>{var n,i,r,o,s;const a=e/t,l={x:1,y:1};if(this.to){const t=null!==(n=this.from)&&void 0!==n?n:{x:null!==(r=null===(i=this.startVal)||void 0===i?void 0:i.x)&&void 0!==r?r:1,y:null!==(s=null===(o=this.startVal)||void 0===o?void 0:o.y)&&void 0!==s?s:1};l.x=t.x+(this.to.x-t.x)*a,l.y=t.y+(this.to.y-t.y)*a}else if(this.by){const t={x:this.by.x,y:this.by.y};l.x=1+(t.x-1)*a,l.y=1+(t.y-1)*a}this.timingTarget&&(this.timingTarget.scale=l)},this.onTimeNodeStart=()=>{this.timingTarget&&(this.startVal={x:this.timingTarget.scale.x,y:this.timingTarget.scale.y})},this.onSeekToStart=()=>{this.timingTarget&&this.startVal&&(this.timingTarget.scale=this.startVal)},this.onSeekToEnd=()=>{this.onTimeUpdate({duration:1,delta:1,isReverse:!1})},this.from=t.json.from,this.to=t.json.to,this.by=t.json.by,this.commonTimeNode.on("timelineStart",this.onTimelineStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart)}get modifyAttrKey(){return"scale"}updateCurrentValue(){this.timingTarget&&(this.current={x:this.timingTarget.scale.x,y:this.timingTarget.scale.y})}}class bR extends eR{constructor(t){super(t),this.isConflict=!1,this.activeWhenConflict="next",this.isTimelineStart=!1,this.startColorString=null,this.currentColorString="#FFFFFFFF",this.onTimelineStart=t=>{if(this.isTimelineStart)return;this.isTimelineStart=!0,t.isReverse||this.updateCurrentValue(),this.from.isInit()||this.from.fromHexString(this.currentColorString),this.to.isInit()||this.from.by(this.by,this.to);const[e]=this.json.cBhvr.attrList[0].split(".");QA(this.timingTarget,e+".on","true")},this.onTimeNodeEnd=()=>{if("remove"===this.json.cBhvr.ctn.fill){const[t]=this.json.cBhvr.attrList[0].split(".");QA(this.timingTarget,t+".on","false")}this.isTimelineStart=!1},this.onSeekToStart=()=>{var t;if(this.timingTarget&&(this.onTimeUpdate({duration:1,delta:0}),(null===(t=this.timingTarget.fill)||void 0===t?void 0:t.designColor.toUpperCase())===this.from.toHexString().toUpperCase())){const[t]=this.json.cBhvr.attrList[0].split(".");QA(this.timingTarget,t+".on","false")}},this.onTimeNodeStart=()=>{if(this.timingTarget){const t=tR(this.timingTarget,this.json.cBhvr.attrList[0]);t&&(this.startColorString=t)}},this.onTimeUpdate=({delta:t,duration:e})=>{const n=t/e;this.to.interpolationFrom(this.from,n,this.target),this.timingTarget&&QA(this.timingTarget,this.json.cBhvr.attrList[0],this.target.toHexString())},this.onSeekToEnd=()=>{this.isTimelineStart||this.onTimelineStart({isReverse:!1,activeCount:0,id:""}),this.onTimeUpdate({duration:1,delta:1})},"rgb"===this.json.clrSpc?(this.from=new PM(this.json.from),this.to=new PM(this.json.to),this.by=new PM(this.json.by),this.target=new PM):(this.from=new RM(this.json.from),this.to=new RM(this.json.to),this.by=new RM(this.json.by),this.target=new RM),this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.commonTimeNode.on("timelineStart",this.onTimelineStart),this.commonTimeNode.on("timeNodeEnd",this.onTimeNodeEnd),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate)}get modifyAttrKey(){return this.json.cBhvr.attrList[0]}updateCurrentValue(){if(this.timingTarget){const t=tR(this.timingTarget,this.json.cBhvr.attrList[0]);t&&(this.currentColorString=t)}}}class TR extends eR{constructor(t){super(t),this.isConflict=!1,this.activeWhenConflict="next",this.startVal=null,this.lastVal=null,this.onTimelineStart=t=>{this.lastVal=null,t.isReverse||this.updateCurrentValue()},this.onTimeUpdate=({duration:t,delta:e})=>{const n=e/t;let i=0,r=0;if(void 0!==this.from&&void 0!==this.to){i=this.from,r=this.to;const t=i+(r-i)*n;this.timingTarget&&(this.timingTarget.r=t)}else if(void 0!==this.by){this.lastVal||(this.lastVal=0);const t=this.by*n-this.lastVal;this.lastVal=this.by*n,this.timingTarget&&(this.timingTarget.r+=t)}},this.onTimeNodeStart=()=>{var t;Object(l.isNumber)(null===(t=this.timingTarget)||void 0===t?void 0:t.r)&&(this.startVal=this.timingTarget.r)},this.onSeekToStart=()=>{this.timingTarget&&null!==this.startVal&&(this.timingTarget.r=this.startVal)},this.onSeekToEnd=()=>{this.onTimeUpdate({duration:1,delta:1,isReverse:!1})},this.from=this.json.from,this.to=this.json.to,this.by=this.json.by,this.by?this.isConflict=!1:this.isConflict=!0,this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.commonTimeNode.on("timelineStart",this.onTimelineStart),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate)}get modifyAttrKey(){return"rotate"}updateCurrentValue(){var t;this.currentVal=null===(t=this.timingTarget)||void 0===t?void 0:t.r}}class wR extends eR{constructor(t){super(t),this.isConflict=!1,this.activeWhenConflict="next",this.isApplied=!1,this.onTimeUpdate=()=>{var t,e;const{cmd:n,cmdType:i}=this.json;!this.isApplied&&n&&i&&(this.isApplied=!0,null===(e=null===(t=this.timingTarget)||void 0===t?void 0:t.cmd)||void 0===e||e.applyCommand(n,i))},this.onSeekToStart=()=>{var t,e;null===(e=null===(t=this.timingTarget)||void 0===t?void 0:t.cmd)||void 0===e||e.applyCommand("custom-pause","call")},this.onSeekToEnd=()=>{},this.commonTimeNode.on("timeNodeStart",()=>{this.isApplied=!1}),this.commonTimeNode.on("timeNodeEnd",()=>{this.isApplied=!1}),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("seekToStart",this.onSeekToStart),this.commonTimeNode.on("seekToEnd",this.onSeekToEnd)}get modifyAttrKey(){var t,e,n,i;return(null!==(e=null===(t=this.json)||void 0===t?void 0:t.cmd)&&void 0!==e?e:"")+(null!==(i=null===(n=this.json)||void 0===n?void 0:n.cmdType)&&void 0!==i?i:"")}}class SR{constructor(t){this.runtimeNodeEventHub=new a.a,this.stopAudio=()=>{this.audio.stop()},this.destroy=()=>{this.stopAudio(),this.audio.destroy(),this.ctx.activeMedia.delete(this.audio)};const{json:e,isIterate:n,isSub:i,eventHub:r,ctx:o,parent:s,iterateType:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:c}=t;this.json=e,this.id=e.cMediaNode.ctn.id,this.commonTimeNode=new MR({json:e.cMediaNode.ctn,isSub:i,eventHubs:{global:r,runtime:this.runtimeNodeEventHub},ctx:o,parent:s,isIterate:n,iterateType:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:c});let d=e.cMediaNode.tgtEl;o.loaderDelegate&&(d=o.loaderDelegate.redirectMedia(d),o.logger.info(`redirect media url from ${e.cMediaNode.tgtEl} to ${d} by delegate.`,o.taskId)),this.audio=new jA(d,o.runningAudio),o.activeMedia.add(this.audio),this.commonTimeNode.on("timelineStart",()=>{this.audio.play()}),this.commonTimeNode.on("seekToStart",this.stopAudio),this.commonTimeNode.on("seekToEnd",this.stopAudio),this.commonTimeNode.on("timeNodeDestroy",this.destroy),this.ctx=o}}var ER=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class MR extends a.a{constructor(t){var e,n;super(),this.uuid=Date.now().toString(32)+Math.random().toString(32).substring(2),this.isSub=!1,this.isShadow=!1,this.startCount=0,this.applyCount=0,this.isReverse=!1,this.isConflictDispose=!1,this.isIterateEnd=!1,this.parentTimeNode=null,this.isActive=!1,this.isDestroy=!1,this.shouldSeekOnStart=!1,this.repeatTimeoutId="",this.iterateShadows=[],this.isEndEventsEmitted=!1,this.tmFilter=[],this.timeDelta=0,this.isIterate=!1,this.iterateType="el",this.iterateIndex=0,this.children=[],this.subList=[],this.duration=0,this.isNegativeSpeed=!1,this.handleEndCond=()=>{this.isActive&&(this.isActive=!1,this.isInfiniteRepeat()?this.repeatTimeNodeEnd():this.seekToEnd(!1,!0))},this.handleActive=(t=!0)=>{if(this.isActive=!0,this.isConflictDispose=!1,this.applyCount+=1,this.json.iterate||this.emit("timeNodeStart",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}),this.startCount>0&&this.json.restart){if("never"===this.json.restart)return;"whenNotActive"!==this.json.restart&&"always"!==this.json.restart||(this.seekToStart(),this.emit("timeNodeRestart",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}),this.startTimeLine(t))}else this.startTimeLine(t)},this.updateTimeLine=t=>{const e=t/(mv.TARGET_FPMS||.06);this.timeDelta+=e,this.duration-this.timeDelta<=e&&(this.timeDelta=this.duration),this.timeDelta<this.duration?this.emit("timeUpdate",{delta:this.isReverse||this.isNegativeSpeed?this.duration-this.timeDelta:this.timeDelta,duration:this.duration,isReverse:this.isReverse}):(this.emit("timeUpdate",{delta:this.isReverse||this.isNegativeSpeed?0:this.duration,duration:this.duration,isReverse:this.isReverse}),this.onTimeLineEnd())},this.handleEnd=(t=!1)=>{(this.isTimeNodeEnd()||t)&&(this.isActive=!1,this.isSub&&this.destroy(),this.emitEndEvents())};const{isSub:i,isIterate:r,ctx:o,eventHubs:s,parent:a,json:l,iterateType:u,iterateId:h,iterateIndex:c,isInInteractiveSeq:d}=t;this.isSub=i,this.isInInteractiveSeq=d,this.isIterate=r,this.parentTimeNode=a,this.json=l,this.ctx=o,this.iterateIndex=c,this.eventHubs=s,this.iterateType=u,this.iterateId=h,this.tmFilter=null!==(n=null===(e=l.tmFilter)||void 0===e?void 0:e.split(";").map(t=>t.split(",").map(t=>parseFloat(t.trim()))))&&void 0!==n?n:[];const p=Number(this.json.dur),f=this.json.spd||1;this.isNegativeSpeed=f<0,Number.isNaN(p)||(this.duration=p/Math.abs(f)),this.uuid+="--"+this.json.id,this.setPreStyle(),l.childTnLst&&this.createChildren(l.childTnLst),this.startConds=new KA(this.json.id||"",l.stCondLst,s,this.ctx),this.endConds=new KA(this.json.id||"",l.endCondLst,s,this.ctx),l.endSync&&(this.endSync=new KA(this.json.id||"",[l.endSync],s,this.ctx),this.endSync.on("active",()=>{var t;"interactiveSeq"===this.json.nodeType&&(this.isActive=!1,this.shouldSeekOnStart=!0,this.emit("timeNodeEndSync"),null===(t=this.endSync)||void 0===t||t.reset())})),this.startConds.on("active",t=>{this.isActive||(this.shouldSeekOnStart&&(this.shouldSeekOnStart=!1,this.seekToStart()),this.handleActive(t))}),this.endConds.on("active",()=>{this.handleEndCond(),this.children.forEach(t=>t.commonTimeNode.handleEndCond())}),this.parentTimeNode&&this.parentTimeNode.on("timeNodeStart",()=>{this.applyCount=0}),this.isSub&&"nextClick"===this.json.masterRel&&this.startConds.addCond({event:"shape slide onNext"}),this.json.iterate&&!1===this.isIterate&&this.createIterateShadow()}createIterateShadow(){const t=eM();let e=!0,n=0;const i=n=>{n===t&&(e=!1,this.ctx.eventHub.removeListener("IterateTimeNodeEnd",i))};for(this.ctx.eventHub.on("IterateTimeNodeEnd",i);e;){const e=JSON.parse(JSON.stringify(this.json)),i=new MR({json:e,isSub:!1,eventHubs:this.eventHubs,ctx:this.ctx,parent:null,isIterate:!0,iterateType:e.iterate.type,iterateIndex:n,iterateId:t,isInInteractiveSeq:this.isInInteractiveSeq});this.iterateShadows[n]=i,n+=1}}isInfiniteRepeat(){return this.json.repeatCount>999999998}getReverse(){return this.isReverse}setReverse(t){this.isReverse=t}createTimeNode(t,e){let n=null;const i={json:t,isSub:e,isIterate:this.isIterate,eventHub:this.eventHubs.global,ctx:this.ctx,parent:this,iterateType:this.iterateType,iterateIndex:this.iterateIndex,iterateId:this.iterateId,isInInteractiveSeq:this.isInInteractiveSeq};return"seq"===t.type?n=new $A(i):"par"===t.type?n=new AR(i):"set"===t.type?n=new nR(i):"anim"===t.type?n=new uR(i):"animEffect"===t.type?n=new _R(i):"animMotion"===t.type?n=new yR(i):"animScale"===t.type?n=new xR(i):"animClr"===t.type?n=new bR(i):"animRot"===t.type?n=new TR(i):"cmd"===t.type?n=new wR(i):"audio"===t.type&&(n=new SR(i)),n}createSubList(t){this.subList=[],t.forEach(t=>{const e=this.createTimeNode(t,!0);e&&this.subList.push(e)})}bindCommonTimeNodeEvent(t){t.commonTimeNode.on("timeNodeStart",t=>{this.emit("childTimeNodeStart",t)}),t.commonTimeNode.on("timeNodeEnd",t=>{this.emit("childTimeNodeEnd",t),this.children.every(t=>t.commonTimeNode.isTimeNodeEndWhenDetectEndSync())&&(this.json.iterate||this.allChildrenEndHandle())})}createChildren(t){function e(t){return(e=t,function(t){var e;return!!(null===(e=t)||void 0===e?void 0:e.cBhvr)}(e)?e.cBhvr.ctn:function(t){var e,n;return!!(null===(n=null===(e=t)||void 0===e?void 0:e.cMediaNode)||void 0===n?void 0:n.ctn)}(e)?e.cMediaNode.ctn:e.ctn).presetOrder;var e}if(t&&t[0]&&e(t[0])){[...t].sort((t,n)=>{var i,r;return(null!==(i=e(t))&&void 0!==i?i:0)-(null!==(r=e(n))&&void 0!==r?r:0)}).forEach(e=>{const n=t.findIndex(t=>t===e),i=this.createTimeNode(e,!1);i&&(this.bindCommonTimeNodeEvent(i),this.children[n]=i)})}else t.forEach(t=>{const e=this.createTimeNode(t,!1);e&&(this.bindCommonTimeNodeEvent(e),this.children.push(e))})}playReverse(){this.isReverse=!0,this.startReverseTimeLine(),this.children.forEach(t=>t.commonTimeNode.playReverse())}allChildrenEndHandle(){if(!this.isDestroy){if(this.json.autoRev&&!this.isReverse)return this.isReverse=!0,void this.playReverse();this.isReverse&&(this.isReverse=!1),this.json.repeatCount&&this.json.repeatCount>this.applyCount?this.repeatTimeoutId=this.ctx.clock.setTimeout(()=>{this.seekToStart(!1),this.resetForRepeat(),this.startTimeNodeRepeat()}):(this.json.iterate&&!this.isIterate&&(this.isIterateEnd=!0),this.eventHubs.runtime.emit("runtime all end"),this.startSubList(),this.handleEnd())}}resetForRepeat(){this.isInInteractiveSeq&&this.isInfiniteRepeat()&&this.repeatTimeNodeEnd(),this.timeDelta=0,this.children.forEach(t=>t.commonTimeNode.resetForRepeat())}startSubList(){this.subList.forEach(t=>t.commonTimeNode.startTimeNode())}startReverseTimeLine(){this.isEndEventsEmitted=!1,this.timeDelta=0;const t=1e3/this.ctx.ticker.maxFPS;this.duration<=t&&this.duration>0?(this.emit("timeUpdate",{delta:this.duration,duration:this.duration,isReverse:this.isReverse}),this.ctx.eventHub.emit(YR.animateEnd),this.ctx.ticker.remove(this.updateTimeLine)):this.duration>t&&(this.ctx.eventHub.emit(YR.animateStart),this.ctx.ticker.add(this.updateTimeLine))}startTimeLine(t=!0){if(t&&(this.isEndEventsEmitted=!1,this.eventHubs.global.emit(`time ${this.json.id} begin`),this.eventHubs.global.emit(`time ${this.json.id} onBegin`),this.eventHubs.runtime.emit(`runtime ${this.json.id} begin`)),this.json.iterate)return void this.startIterate();this.timeDelta=0,this.emit("timelineStart",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse});const e=1e3/this.ctx.ticker.maxFPS;this.duration<=e&&this.duration>0?(this.timeDelta=this.isReverse?0:this.duration,this.emit("timeUpdate",{delta:this.timeDelta,duration:this.duration,isReverse:this.isReverse}),this.emit("timelineEnd",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}),this.ctx.ticker.addOnce(()=>{this.onTimeLineEnd()})):this.duration>e&&(this.ctx.eventHub.emit(YR.animateStart),this.updateTimeLine(0),this.ctx.ticker.add(this.updateTimeLine))}startIterate(){return ER(this,void 0,void 0,(function*(){if(this.json.iterate){this.isIterateEnd=!1;for(const t of this.iterateShadows){if(this.isIterateEnd)break;t.children.forEach(t=>{t.commonTimeNode.startTimeNode()}),t.applyCount+=1,yield this.ctx.clock.delay(this.json.iterate.interval)}this.onTimeLineEnd()}}))}applyTimeFilter(t){if(!this.tmFilter.every(t=>Object(l.isNumber)(t[0])&&Object(l.isNumber)(t[1])))return t;for(let e=0;e<this.tmFilter.length;e++){const n=this.tmFilter[e];if(t<n[0]){const i=this.tmFilter[e-1];return(t-i[0])/(n[0]-i[0])*(n[1]-i[1])+i[1]}}return this.tmFilter.length>0?this.tmFilter[this.tmFilter.length-1][1]:t}isNatureTimeEnd(){return this.duration>=0&&this.timeDelta>=this.duration}findTargets(){const t=[],e=n=>{n.forEach(n=>{var i,r,o;n.cBhvr&&n.cBhvr.target&&t.findIndex(t=>t.id===n.cBhvr.target.id)<0&&t.push(n.cBhvr.target),(null===(r=null===(i=null==n?void 0:n.cBhvr)||void 0===i?void 0:i.ctn)||void 0===r?void 0:r.childTnLst)&&n.cBhvr.ctn.childTnLst.length>0&&e(n.cBhvr.ctn.childTnLst),(null===(o=null==n?void 0:n.ctn)||void 0===o?void 0:o.childTnLst)&&n.ctn.childTnLst.length>0&&e(n.ctn.childTnLst)})};return e(this.json.childTnLst||[]),t}setPreStyle(){this.json.presetClass&&this.findTargets().forEach(t=>{if(this.json.iterate){let e=0,n=!0;for(;n;){const i=this.ctx.timingTargets.getTarget(t,!0,{type:this.json.iterate.type,index:e,id:""});i&&(this.setPreStyleForTarget(i),e+=1),n=!!i}}else{const e=this.ctx.timingTargets.getTarget(t,!1);e&&this.setPreStyleForTarget(e)}})}setPreStyleForTarget(t){var e,n;if(t&&this.json.presetSubtype&&(t.presetSubType=this.json.presetSubtype),t&&!t.hasPreset)if("entr"===this.json.presetClass){const i=null===(n=null===(e=this.json)||void 0===e?void 0:e.childTnLst)||void 0===n?void 0:n.filter(t=>"set"===t.type&&"visible"===t.to);(null==i?void 0:i.length)&&(t.hasPreset=!0,t.style.visibility="hidden")}else("exit"===this.json.presetClass||"path"===this.json.presetClass)&&(t.hasPreset=!0,t.style.visibility="visible")}startTimeNodeRepeat(){this.timeDelta=0,this.isActive=!0,this.applyCount+=1,this.startTimeLine(!1),this.json.iterate||this.emit("timeNodeRepeat",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse})}startTimeNodeForce(){this.json.subTnLst&&this.createSubList(this.json.subTnLst),this.timeDelta=0,this.isActive=!0,this.handleActive(!1)}startTimeNode(t=!0){if(this.isDestroy)return;this.collectStartValue(),this.timeDelta=0,this.isReverse=!1,this.json.subTnLst&&this.createSubList(this.json.subTnLst),this.startConds.setTriggerParams(t);const e=this.json.stCondLst.filter(t=>/^self/.test(t.event||""))[0];e&&this.startConds.condHandle(e);const n=this.json.endCondLst.filter(t=>/^self/.test(t.event||""))[0];n&&this.endConds.condHandle(n),this.startConds.condHandle()}onTimeLineEnd(){this.dispose(),(0===this.children.length||this.json.iterate)&&this.allChildrenEndHandle()}clearSubList(){this.subList.forEach(t=>t.commonTimeNode.destroy())}seekToStart(t=!0){if(this.isEndEventsEmitted=!1,this.isActive=!1,this.dispose(),this.timeDelta=0,this.emit("seekToStart"),this.json.iterate&&!this.isIterate)return this.isIterateEnd=!0,void this.iterateShadows.forEach(e=>e.seekToStart(t));if(t)for(let t=this.subList.length-1;t>=0;t--){const e=this.subList[t];null==e||e.commonTimeNode.seekToStart()}for(let t=this.children.length-1;t>=0;t--){const e=this.children[t];null==e||e.commonTimeNode.seekToStart()}for(let t=this.children.length-1;t>=0;t--){const e=this.children[t];null==e||e.commonTimeNode.seekToStart()}}repeatTimeNodeEnd(){this.dispose(),this.children.forEach(t=>{t.commonTimeNode.isActive=!1,t.commonTimeNode.dispose()})}dispose(t=!1){this.isConflictDispose=t,this.ctx.clock.clearTimeout(this.repeatTimeoutId),this.ctx.eventHub.emit(YR.animateEnd);try{this.ctx.ticker.remove(this.updateTimeLine)}catch(t){}this.startConds.reset(),this.endConds.reset()}seekToEnd(t,e=!1){if(this.isInfiniteRepeat())return;!this.isActive&&this.applyCount<=0&&this.collectStartValue(),this.applyCount=this.json.repeatCount,this.json.autoRev&&(this.isReverse=!0),this.timeDelta=this.duration,this.isActive=!1,this.dispose();const n=this.json.autoRev||t;if(n?this.emit("seekToStart"):this.emit("seekToEnd"),this.json.iterate&&!this.isIterate)return this.isIterateEnd=!0,void this.iterateShadows.forEach(t=>t.seekToEnd(n,e));0===this.children.length&&(this.eventHubs.runtime.emit("runtime all end"),this.handleEnd()),this.children.forEach(t=>t.commonTimeNode.seekToEnd(n,e)),e&&this.json.subTnLst&&(this.subList.length<=0&&this.createSubList(this.json.subTnLst),this.subList.forEach(t=>t.commonTimeNode.seekToEnd(!1)),this.clearSubList())}isTimeNodeEndWhenDetectEndSync(){if(this.isInInteractiveSeq&&this.isInfiniteRepeat())return!0;let t=!0;return this.children.length>0&&(t=t&&this.children.every(t=>t.commonTimeNode.isTimeNodeEndWhenDetectEndSync())),this.json.repeatCount&&(t=t&&this.applyCount>=this.json.repeatCount),this.json.autoRev&&(t=t&&!this.isReverse),t=t&&this.isNatureTimeEnd(),!!this.isConflictDispose||(!(!this.isIterateEnd||!this.json.iterate)||t)}isTimeNodeEnd(){let t=!0;return this.children.length>0&&(t=t&&this.children.every(t=>t.commonTimeNode.isTimeNodeEnd())),this.json.repeatCount&&(t=t&&this.applyCount>=this.json.repeatCount),this.json.autoRev&&(t=t&&!this.isReverse),t=t&&this.isNatureTimeEnd(),!!this.isConflictDispose||(!(!this.isIterateEnd||!this.json.iterate)||t)}emitEndEvents(){this.isEndEventsEmitted||(this.isEndEventsEmitted=!0,this.eventHubs.global.emit(`time ${this.json.id} end`),this.eventHubs.global.emit(`time ${this.json.id} onEnd`),this.eventHubs.runtime.emit(`runtime ${this.json.id} end`),this.emit("timeNodeEnd",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}))}collectStartValue(){this.emit("timeNodeCreate"),this.children.forEach(t=>t.commonTimeNode.collectStartValue())}destroy(){this.emit("timeNodeDestroy"),this.isDestroy=!0,this.dispose(),this.startConds.removeAllListeners(),this.endConds.removeAllListeners(),this.children.forEach(t=>t.commonTimeNode.destroy()),this.clearSubList()}}class AR extends a.a{constructor(t){super(),this.isRunning=!1,this.runtimeNodeEventHub=new a.a;const{json:e,iterateType:n,isIterate:i,isSub:r,parent:o,ctx:s,eventHub:l,iterateIndex:u,iterateId:h,isInInteractiveSeq:c}=t;this.id=e.ctn.id,this.json=e,this.ctx=s,this.isIterate=i,this.globalEventHub=l,this.commonTimeNode=new MR({json:e.ctn,isSub:r,eventHubs:{global:l,runtime:this.runtimeNodeEventHub},ctx:s,parent:o,isIterate:!1,iterateType:n,iterateIndex:u,iterateId:h,isInInteractiveSeq:c}),this.commonTimeNode.on("timeNodeStart",()=>{this.commonTimeNode.children.forEach(t=>{t.commonTimeNode.setReverse(this.commonTimeNode.getReverse()),t.commonTimeNode.startTimeNode()}),this.isRunning||(this.isRunning=!0,this.globalEventHub.emit(`runtime ${this.id} begin`),this.emit("begin"))}),this.commonTimeNode.on("timeNodeRepeat",()=>{this.commonTimeNode.children.forEach(t=>{t.commonTimeNode.startTimeNode(!1)})}),this.commonTimeNode.on("timeNodeEnd",()=>{this.commonTimeNode.isTimeNodeEnd()&&this.isRunning&&(this.isRunning=!1,this.globalEventHub.emit(`runtime ${this.id} end`),this.emit("end"))})}}var RR=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class PR{constructor(t,e,n){this.json=t,this.ctx=n,this.globalEventHub=e;const i=t.timeNodeList.find(t=>"par"===t.type&&"tmRoot"===t.ctn.nodeType);i&&(this.tmRoot=new AR({json:i,isSub:!1,isIterate:!1,eventHub:e,ctx:n,parent:null,iterateType:"el",iterateIndex:0,iterateId:"",isInInteractiveSeq:!1}),this.mainSeq=this.tmRoot.commonTimeNode.children.find(t=>{var e,n,i;return"seq"===(null===(e=t.json)||void 0===e?void 0:e.type)&&"mainSeq"===(null===(i=null===(n=t.json)||void 0===n?void 0:n.ctn)||void 0===i?void 0:i.nodeType)}))}findSeq(t){var e;return null===(e=this.tmRoot)||void 0===e?void 0:e.commonTimeNode.children.find(e=>{var n,i,r;return"seq"===(null===(n=e.json)||void 0===n?void 0:n.type)&&(null===(r=null===(i=e.json)||void 0===i?void 0:i.ctn)||void 0===r?void 0:r.id)===t})}start(){var t,e;return RR(this,void 0,void 0,(function*(){this.json.autoPlayMainSeq?(yield this.ctx.clock.delay(16),null===(t=this.mainSeq)||void 0===t||t.commonTimeNode.startTimeNode()):null===(e=this.mainSeq)||void 0===e||e.commonTimeNode.startTimeNode()}))}setMainSeqApplied(){this.mainSeq&&(this.mainSeq.commonTimeNode.applyCount=1)}collectMainSeqStartValue(){var t;null===(t=this.mainSeq)||void 0===t||t.commonTimeNode.collectStartValue()}setMainSeqStep(t,e){var n;-1===t&&this.mainSeq&&(this.mainSeq.commonTimeNode.applyCount=1),null===(n=this.mainSeq)||void 0===n||n.setCurrentStep(t,e)}destroy(){var t;this.globalEventHub.removeAllListeners(),null===(t=this.tmRoot)||void 0===t||t.commonTimeNode.destroy()}hasMainSeq(){return!!this.mainSeq&&this.mainSeq.commonTimeNode.children.length>0}currentMainSeqState(){return this.mainSeq?this.mainSeq.currentState:null}currentMainSeqStep(){return this.mainSeq?this.mainSeq.currentStep:0}currentMainSeqLength(){return this.mainSeq?this.mainSeq.stepLength:0}mainSeqHasNextStep(){return!!this.mainSeq&&this.mainSeq.hasNext()}mainSeqHasPrevStep(){return!!this.mainSeq&&this.mainSeq.hasPrev()}seekInteractiveSeqToEnd(t){const e=this.findSeq(t);e&&e.commonTimeNode.seekToEnd(!1,!0)}setInteractiveSeqState(t,e,n){const i=this.findSeq(t);i&&i.setCurrentStep(e,n)}resetAllInteractiveSeq(){var t;((null===(t=this.tmRoot)||void 0===t?void 0:t.commonTimeNode.children.filter(t=>{var e,n,i;return"seq"===(null===(e=t.json)||void 0===e?void 0:e.type)&&"interactiveSeq"===(null===(i=null===(n=t.json)||void 0===n?void 0:n.ctn)||void 0===i?void 0:i.nodeType)}))||[]).forEach(t=>{t.setCurrentStep(0,"start")})}applyInteractiveAction(t){this.globalEventHub.emit(t)}}var CR=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class IR extends JA{constructor(t,e,n,i){super({id:"stage",width:t.width,height:t.height,type:"Container",children:t.children},e,n,void 0,i),this.isRendered=!1,this.isTimingStartValueCollected=!1,this.globalEventHub=new a.a,this.json=t,e.hasBackgroundFillShape=this.detectUseBackgroundFill(this.json),this.container.visible=!1,this.ctx=e;const r=new Aw;r.beginFill(16777215),r.drawRect(0,0,t.width,t.height),r.endFill(),this.container.addChild(r)}detectUseBackgroundFill(t){return!!t&&("Picture"===t.type||"Shape"===t.type?t.useBgFill:!(!t.children||!Object(l.isArray)(t.children))&&t.children.some(t=>this.detectUseBackgroundFill(t)))}initOnReuse(){super.initOnReuse(),this.globalEventHub.on("c:prev slide",t=>{this.ctx.eventHub.emit(YR.requestPrevSlide,t)}),this.globalEventHub.on("c:next slide",t=>{this.ctx.eventHub.emit(YR.requestNextSlide,t)})}get interactiveContainer(){return this.container}render(t){this.isRendered||(this.isRendered=!0,super.render(t),t.addSubMTask(()=>CR(this,void 0,void 0,(function*(){this.ctx.eventHub.emit("StageRenderEnd")})),"@StageImpl[emit.StageRenderEnd]"))}createTiming(){this.json.timing&&!this.timing&&(this.timing=new PR(this.json.timing,this.globalEventHub,this.ctx))}startTiming(){var t;return(null===(t=this.timing)||void 0===t?void 0:t.start())||Promise.resolve()}setMainSeqApplied(){var t;null===(t=this.timing)||void 0===t||t.setMainSeqApplied()}setMainSeqStep(t,e){var n;null===(n=this.timing)||void 0===n||n.setMainSeqStep(t,e)}collectMainSeqStartValue(){var t;this.isTimingStartValueCollected||(this.isTimingStartValueCollected=!0,null===(t=this.timing)||void 0===t||t.collectMainSeqStartValue())}hasTiming(){return!!this.timing}clearOnSlideChange(){this.ctx.eventHub.removeAllListeners(),this.globalEventHub.removeAllListeners(),super.clearOnSlideChange()}clearOnTransactionEnd(){var t,e;this.ctx.timingTargets.getTargets().forEach(t=>{t.hasPreset=!1}),null===(t=this.timing)||void 0===t||t.resetAllInteractiveSeq(),null===(e=this.timing)||void 0===e||e.destroy(),this.timing=void 0}destroy(){var t,e;this.isTimingStartValueCollected=!1,this.isRendered=!1,this.ctx.eventHub.removeAllListeners(),this.ctx.graphicsTexture.destroy(),null===(t=this.ctx.bgTexture)||void 0===t||t.destroy(!0),this.ctx.spriteTexture.destroy(),this.globalEventHub.removeAllListeners(),null===(e=this.timing)||void 0===e||e.destroy(),this.timing=void 0,super.destroy()}mainSeqStep(){var t,e;return null!==(e=null===(t=this.timing)||void 0===t?void 0:t.currentMainSeqStep())&&void 0!==e?e:0}mainSeqLength(){var t,e;return null!==(e=null===(t=this.timing)||void 0===t?void 0:t.currentMainSeqLength())&&void 0!==e?e:0}mainSeqHasNextStep(){var t,e;return null!==(e=null===(t=this.timing)||void 0===t?void 0:t.mainSeqHasNextStep())&&void 0!==e&&e}mainSeqHasPrevStep(){var t,e;return null!==(e=null===(t=this.timing)||void 0===t?void 0:t.mainSeqHasPrevStep())&&void 0!==e&&e}mainSeqState(){return this.timing?this.timing.currentMainSeqState():null}nextStep(t=!1){var e;this.hasTiming()&&(null===(e=this.timing)||void 0===e?void 0:e.hasMainSeq())?(this.globalEventHub.emit("shape slide onStopAudio"),this.globalEventHub.emit("shape slide onNext",t)):this.ctx.eventHub.emit(YR.requestNextSlide,t)}prevStep(t=!1){var e;this.hasTiming()&&(null===(e=this.timing)||void 0===e?void 0:e.hasMainSeq())?(this.globalEventHub.emit("shape slide onStopAudio"),this.globalEventHub.emit("shape slide onPrev",t)):this.ctx.eventHub.emit(YR.requestPrevSlide,t)}applyInteractiveAction(t){var e;null===(e=this.timing)||void 0===e||e.applyInteractiveAction(t)}seekInteractiveSeqToEnd(t){var e;null===(e=this.timing)||void 0===e||e.seekInteractiveSeqToEnd(t)}setInteractiveSeqState(t,e,n){var i;null===(i=this.timing)||void 0===i||i.setInteractiveSeqState(t,e,n)}setMediaState(t,e){return CR(this,void 0,void 0,(function*(){const n=this.ctx.medias[t];n&&(e?yield n.play():yield n.pause())}))}setMediaCurrentTime(t,e){const n=this.ctx.medias[t];n&&n.seek(e)}}class OR{constructor(t){this.ticker=t,this.tasks=[],this.couldRunning=!1,this.applyNext=()=>{const t=this.tasks[0];t&&t.applyNext()},t.add(this.applyNext)}addTask(t){this.tasks.push(t),t.once("task-finish",()=>{const e=this.tasks.indexOf(t);e>=0&&this.tasks.splice(e,1)}),t.once("task-error",()=>{const e=this.tasks.indexOf(t);e>=0&&this.tasks.splice(e,1)})}start(){this.couldRunning=!0}stop(){this.couldRunning=!1}}var LR=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};const NR=t=>new Promise(e=>setTimeout(e,t));class DR extends a.a{constructor(t,e,n){super(),this.slideIndex=t,this.taskId=e,this.logger=n,this.uuid=eM(),this.isCancel=!1,this.tasks=[]}addMTask(t,e){this.tasks.push({fn:t,state:"wait",sub:[],name:e})}addSubMTask(t,e){let n=this.tasks.findIndex(t=>"running"===t.state);n<0&&(n=0),this.tasks[n].sub.push({fn:t,state:"wait",sub:[],name:e})}cancel(){this.tasks=[],this.isCancel=!0}applyNext(){if(this.tasks.some(t=>"running"===t.state))return;if(this.tasks.some(t=>"error"===t.state))return;if(this.tasks.every(t=>"finish"===t.state))return void(this.isCancel||this.emit("task-finish"));const t=this.tasks.find(t=>"wait"===t.state);t&&(t.state="running",t.fn.apply(null).then(()=>{if(t.state="finish",t.sub.length>0){const e=this.tasks.findIndex(e=>e===t);this.tasks.splice(e+1,0,...t.sub)}}).catch(e=>{t.state="error",this.logger.error(`${e} ${e.stack}`,this.taskId),this.emit("task-error",qE.transform(e),this.slideIndex)}))}applyAll(){return LR(this,void 0,void 0,(function*(){for(;!this.tasks.every(t=>"finish"===t.state);)if(this.tasks.some(t=>"running"===t.state))yield NR(16);else{if(this.tasks.some(t=>"error"===t.state))return;{const t=this.tasks.find(t=>"wait"===t.state);if(t){t.state="running";try{if((yield iM(()=>t.fn.apply(null),6e4))===nM)throw new qE(VE.RuntimeError,`subtask ${t.name} apply timeout`);if(t.state="finish",t.sub.length>0){const e=this.tasks.findIndex(e=>e===t);this.tasks.splice(e+1,0,...t.sub)}}catch(e){let n;n=e.errorType?e:new qE(VE.RuntimeError,`subtask ${t.name} error. ${e}`),t.state="error",this.logger.error(`${e} ${e.stack}`,this.taskId),this.emit("task-error",qE.transform(n),this.slideIndex);break}}}}this.isCancel||this.emit("task-finish")}))}}var FR=n(53);const BR=new(n.n(FR).a),UR=BR.getDevice(),kR=BR.getBrowser(),GR=BR.getOS(),HR={isDesktop(){let t=!0;return"mobile"===UR.type&&(t=!1),/Samsung/.test(kR.name||"")&&(t=!1),window.__nativeTags&&window.__nativeTags.platform&&(t=!1),t},isIOS(){let t=!1;return window.__nativeTags&&window.__nativeTags.platform&&/^ios/i.test(window.__nativeTags.platform)&&(t=!0),GR.name&&/iOS/.test(GR.name)&&(t=!0),t},isAndroid(){let t=!1;return window.__nativeTags&&window.__nativeTags.platform&&/^android/i.test(window.__nativeTags.platform)&&(t=!0),GR.name&&/android/i.test(GR.name)&&(t=!0),t},isLowGpuMemory(){var t,e;const n=null!==(e=null===(t=window.__nativeTags)||void 0===t?void 0:t.platform)&&void 0!==e?e:"";if(n){const t=n.split(" ");if(t[1]){if(/^iPad/.test(t[1])){const e=t[1].match(/^iPad(\d+)/);return!(e&&e[1]&&parseInt(e[1],10)>=6)}if(/^iPhone/.test(t[1])){const e=t[1].match(/^iPhone(\d+)/);return!(e&&e[1]&&parseInt(e[1],10)>=9)}return!1}return!1}return!0}};var zR=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};class jR{constructor(t,e,n,i,r,o,s,a,l,u,h,c){this.loader=t,this.mode=e,this.renderer=n,this.ticker=i,this.view=r,this.clock=o,this.objPoolGroup=s,this.errorChannel=a,this.localstorage=l,this.logger=u,this.loaderDelegate=h,this.isPlayerPaused=c,this.currentStageIndex=0,this.cacheCount=HR.isDesktop()?2:1,this.stageStates=Object.create(null),this.stageJsons=Object.create(null),this.stageCtxs=Object.create(null),this.stageImpls=Object.create(null),this.taskId="",this.url="",this.runningAudio=new Map,this.activeMedia=new Set,this.microTaskManager=new OR(i)}setResourceData(t,e){this.taskId=t,this.url=e}createCtx(t){const{task:e}=this.stageStates[t];e.addMTask(()=>zR(this,void 0,void 0,(function*(){const e=new hM(this.loader),n=new a.a,i={taskId:this.taskId,mode:this.mode,renderer:this.renderer,graphicsTexture:new yM,stageWidth:0,stageHeight:0,ticker:this.ticker,timingTargets:new bM(n),eventHub:n,view:this.view,medias:Object.create(null),lastViewedIndex:0,conflictTimeNodeManager:new xM,clock:this.clock,spriteTexture:e,slideIndex:t,objectPoolGroup:this.objPoolGroup,hasBackgroundFillShape:!1,slideScopeEventHub:new a.a,logger:this.logger,loaderDelegate:this.loaderDelegate,runningAudio:this.runningAudio,activeMedia:this.activeMedia,isPlayerPaused:this.isPlayerPaused};this.stageCtxs[t]=i})),"@StagePool[createCtx]")}loadStageJson(t){const{task:e}=this.stageStates[t];e.addMTask(()=>zR(this,void 0,void 0,(function*(){const e=yield this.loader.fetchJson(`${this.url}/${this.taskId}/jsonOutput/slide-${t}.json`);this.stageJsons[t]=e,this.stageCtxs[t].stageWidth=e.width,this.stageCtxs[t].stageHeight=e.height})),"@StagePool[loadStageJson]")}loadSpriteSheets(t){const{task:e}=this.stageStates[t];e.addMTask(()=>{const n=this.stageJsons[t],{spriteTexture:i}=this.stageCtxs[t],{coloredSheets:r,sheets:o}=n,s=r||o;return s&&s.forEach(t=>{e.addSubMTask(()=>i.loadSpriteSheetItem(this.url,this.taskId,t),"@StagePool[spriteTexture.loadSpriteSheetItem]")}),Promise.resolve()},"@StagePool[loadSpriteSheets]")}createStage(t){const{task:e}=this.stageStates[t];e.addMTask(()=>{const n=this.stageJsons[t],i=this.stageCtxs[t],r=new IR(n,i,{x:0,y:0},e);return this.stageImpls[t]=r,Promise.resolve()},"@StagePool[createStage]")}preRenderStage(t){const{task:e}=this.stageStates[t];e.addMTask(()=>(this.stageImpls[t].preRender(e),Promise.resolve()),"@StagePool[preRenderStage]")}createGraphicsTexture(t){const{task:e}=this.stageStates[t];e.addMTask(()=>zR(this,void 0,void 0,(function*(){const n=this.stageCtxs[t];n.graphicsTexture.pack().forEach((t,i)=>{e.addSubMTask(()=>n.graphicsTexture.render(t,i,this.objPoolGroup),"@StagePool[graphicsTexture.render]")})})),"@StagePool[createGraphicsTexture]")}renderStage(t){const{task:e}=this.stageStates[t];e.addMTask(()=>zR(this,void 0,void 0,(function*(){const n=this.stageImpls[t],i=this.stageCtxs[t];yield n.render(e),e.addSubMTask(()=>zR(this,void 0,void 0,(function*(){var e;const r=`snapshot-${t.toString()}-start`;if(!(yield null===(e=this.localstorage)||void 0===e?void 0:e.getItem(r))&&ZR.platform.isLowGpuMemory()){n.createTiming(),n.container.visible=!0,n.collectMainSeqStartValue(),n.setMainSeqStep(0,"start");const t=Hy.create({width:n.json.width,height:n.json.height,resolution:1});i.renderer.render(n.container,{renderTexture:t});const e=i.renderer.plugins.extract.base64(t,"image/jpeg");this.localstorage.setItem(r,e,!0).catch(()=>{}),n.container.visible=!1,t.destroy(),n.timing&&(n.timing.destroy(),n.timing=void 0)}})),"@StagePool[snapshot]")})),"@StagePool[renderStage]")}destroyStageByIndex(t){"load"===this.stageStates[t].state&&this.stageStates[t].task.cancel(),delete this.stageStates[t];this.stageImpls[t].destroy(),delete this.stageImpls[t],delete this.stageCtxs[t]}destroyStage(){Object.keys(this.stageImpls).forEach(t=>{const e=parseInt(t,10);Math.abs(this.currentStageIndex-e)>this.cacheCount&&this.destroyStageByIndex(e)})}destroyAllStage(){Object.keys(this.stageImpls).forEach(t=>{const e=parseInt(t,10);this.destroyStageByIndex(e)})}preload(t,e=!1){if(this.stageImpls[t]||this.stageStates[t])return Promise.resolve();const n=new DR(t,this.taskId,this.logger);return n.on("task-error",(t,e)=>{delete this.stageStates[e],delete this.stageImpls[e],delete this.stageCtxs[e],this.errorChannel.emit("error",t,e)}),this.stageStates[t]={state:"load",task:n},this.createCtx(t),this.loadStageJson(t),this.loadSpriteSheets(t),this.createStage(t),this.preRenderStage(t),this.createGraphicsTexture(t),this.renderStage(t),this.microTaskManager.addTask(n),e?n.applyAll():new Promise(e=>{n.once("task-finish",()=>{this.stageStates[t].state="finish";Object.keys(this.stageStates).length>2*this.cacheCount+1&&this.destroyStage(),e()})})}getStageJson(t){return this.stageJsons[t]||null}getStage(t){return zR(this,void 0,void 0,(function*(){this.currentStageIndex=t;const e=this.stageStates[t];return"finish"===(null==e?void 0:e.state)&&this.stageImpls[t]?this.stageImpls[t]:"load"===(null==e?void 0:e.state)?(yield e.task.applyAll(),this.stageImpls[t]):(yield this.preload(t,!0),this.stageImpls[t])}))}destroy(){this.runningAudio.clear()}}var VR=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};o.config({storeName:"slide_local_cache"});class WR{constructor(t){this.logger=t,this.taskId="",this.isIndexDBReady=!1,this.memoryCache=new Map,o.ready(()=>{this.isIndexDBReady=!0}).catch(()=>{t.warn("local storage not ready",this.taskId)})}get couldUseIndexDBCache(){return this.isIndexDBReady&&this.taskId.length>0}attachTaskId(t){this.taskId=t}getItem(t){return VR(this,void 0,void 0,(function*(){let e=null;return this.couldUseIndexDBCache&&(e=yield iM(()=>o.getItem(`${this.taskId}/${t}`),500)),e=e===nM?null:e,e||this.memoryCache.get(t)||null}))}setItem(t,e,n=!1){return VR(this,void 0,void 0,(function*(){if(!this.couldUseIndexDBCache)return n&&this.memoryCache.set(t,e),Promise.resolve();(yield iM(()=>o.setItem(`${this.taskId}/${t}`,e).catch(()=>{n&&this.memoryCache.set(t,e)}),500))===nM&&n&&this.memoryCache.set(t,e)}))}dispose(){this.memoryCache=new Map,this.couldUseIndexDBCache&&o.keys().then(t=>{t.filter(t=>t.indexOf(this.taskId)>=0).forEach(t=>{o.removeItem(t).catch(()=>{})})})}}var XR=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};r.skipHello();const qR={randomBar:"RandomLines",circle:"Shape",ripple:"Ripples",wipe:"Erase",dissolve:"Dissolve",morph:"Smooth",fade:"FadeInOut",push:"Push",split:"Separation",reveal:"Display",pull:"Uncover",cover:"Cover",flash:"Flash",checker:"Checkerboard",blinds:"WindowShades",curtains:"Curtain",fallOver:"Fall",drape:"Suspension",wheel:"Clock",comb:"Combing",warp:"Scale",peelOff:"PeelOff",flip:"Flip"},YR={mainSeqStepChange:"mainSeqStepChange",mainSeqStateChange:"mainSeqStateChange",interactiveSeqStateChange:"interactiveSeqStateChange",interactiveSeqAction:"interactiveSeqAction",mainSeqStepStart:"mainSeqStepStart",mainSeqStepEnd:"mainSeqStepEnd",slideChange:"slideChange",renderStart:"renderStart",renderEnd:"renderEnd",hyperlinkTrigger:"hyperlinkTrigger",animateStart:"animateStart",animateEnd:"animateEnd",mediaSeek:"mediaSeek",mediaPlay:"mediaPlay",mediaPause:"mediaPause",requestNextSlide:"requestNextSlide",requestPrevSlide:"requestPrevSlide",requestGotoSlide:"requestGotoSlide",userInput:"userInput"};class ZR extends a.a{constructor(t,e={}){super(),this.errorChannel=new a.a,this.transactionPlayer=null,this.transactionSprite=new Ow,this.isForward=!0,this.drawCall=0,this.scale=1,this.prevSlideBase64=null,this._isPaused=!1,this.fps=new XE,this.designWidth=0,this.designHeight=0,this.currentIndex=0,this.slideCount=0,this.runtime={drawCall:0,fps:0},this.isPlayerPaused=()=>this._isPaused,this.onWebGLLost=()=>{this.errorChannel.emit("error",new qE(VE.CanvasCrash,"webgl context lost."))},this.logger=t.logger,this.mode=t.mode,this.localStorage=new WR(this.logger);let n=Math.max(window.devicePixelRatio,2);HR.isDesktop()||(n=1),this.config={minFPS:Object(l.isUndefined)(e.minFPS)?30:e.minFPS,maxFPS:Object(l.isUndefined)(e.maxFPS)?40:e.maxFPS,resolution:Object(l.isUndefined)(e.resolution)?n:e.resolution,autoFPS:!Object(l.isUndefined)(e.autoFPS)&&e.autoFPS,autoResolution:!Object(l.isUndefined)(e.autoResolution)&&e.autoResolution,transactionBgColor:Object(l.isUndefined)(e.transactionBgColor)?0:e.transactionBgColor},this.loader=new sM(this.localStorage,t.useLocalCache,this.logger,t.resourceTimeout,t.loadDelegate),this.app=new Lb({antialias:!0,autoDensity:!1,backgroundColor:16777215}),this.updateConfig(this.config),this.app.view.style.zIndex="1",this.app.stage.sortableChildren=!0;const i=this.app.renderer,{drawElements:r}=i.gl;i.gl.drawElements=(...t)=>{r.call(i.gl,...t),this.drawCall+=1},this.fps.on("update",t=>{if(t<this.config.minFPS){if(this.config.autoResolution){const t=.7*this.scale,e=this.app.renderer.resolution,n=Math.max(t,e-.1);n>=t&&this.updateResolution(n)}if(this.config.autoFPS){const t=14,{minFPS:e,maxFPS:n}=this.app.ticker,i=Math.max(t,e-2),r=Math.max(t,n-2);i>=t&&r>=t&&(this.app.ticker.minFPS=i,this.app.ticker.maxFPS=r)}}else if(t>this.config.maxFPS){if(this.config.autoResolution){const t=this.scale*this.config.resolution,e=this.app.renderer.resolution,n=Math.min(t,e+.1);n<=this.config.resolution&&this.updateResolution(n)}if(this.config.autoFPS){const t=this.config.minFPS,e=this.config.maxFPS,{minFPS:n,maxFPS:i}=this.app.ticker,r=Math.min(t,n+2),o=Math.min(e,i+2);r<=t&&o<=e&&(this.app.ticker.minFPS=r,this.app.ticker.maxFPS=o)}}}),this.app.ticker.add(()=>{this.runtime.drawCall=this.drawCall,this.runtime.fps=Math.floor(this.app.ticker.minFPS),this.drawCall=0},null,ey.LOW),this.clock=new lM(this.app.ticker),this.objPoolGroup=eM(),this.stagePool=new jR(this.loader,this.mode,this.app.renderer,this.app.ticker,this.app.view,this.clock,this.objPoolGroup,this.errorChannel,this.localStorage,this.logger,t.loadDelegate,this.isPlayerPaused),this.app.view.addEventListener("webglcontextlost",this.onWebGLLost);try{this.transactionPlayer=new og}catch(t){/Error creating WebGL context/.test(t.message)?this.errorChannel.emit("error",new qE(VE.CanvasCrash,"webgl context lost.")):this.errorChannel.emit("error",new qE(VE.RuntimeWarn,t.message))}}get view(){return this.app.renderer?this.app.view:null}get nextSlideIndex(){var t;return(null===(t=this.currentStage)||void 0===t?void 0:t.json.nextIndex)?this.currentStage.json.nextIndex:this.currentIndex+1}get prevSlideIndex(){var t;return(null===(t=this.currentStage)||void 0===t?void 0:t.json.prevIndex)?this.currentStage.json.prevIndex:this.currentIndex-1}updateConfig(t){Object(l.isUndefined)(t.minFPS)||(this.config.minFPS=t.minFPS,this.app.ticker.minFPS=t.minFPS),Object(l.isUndefined)(t.maxFPS)||(this.config.maxFPS=t.maxFPS,this.app.ticker.maxFPS=t.maxFPS),Object(l.isUndefined)(t.resolution)||(this.config.resolution=t.resolution,this.updateResolution(this.scale*this.config.resolution)),Object(l.isUndefined)(t.autoFPS)||(this.config.autoFPS=t.autoFPS),Object(l.isUndefined)(t.autoResolution)||(this.config.autoResolution=t.autoResolution),Object(l.isUndefined)(t.transactionBgColor)||(this.config.transactionBgColor=t.transactionBgColor),this.taskId&&this.logger.info("ppt player update config: "+JSON.stringify(this.config),this.taskId)}preload(t){return XR(this,void 0,void 0,(function*(){t<1||t>this.slideCount||(this.logger.info(`preload slide ${t} begin`,this.taskId),yield this.stagePool.preload(t),this.logger.info(`preload slide ${t} end`,this.taskId))}))}setResourceData(t,e){this.logger.info("ppt player init config: "+JSON.stringify(this.config),t),this.logger.info("set resource to "+e,t),this.taskId=t,this.url=e,this.stagePool.setResourceData(t,e),this.localStorage.attachTaskId(t),this.loader.attachTaskId(t)}setInteractive(t){this.app.stage.interactive=t,this.app.stage.interactiveChildren=t}translateEvent(t,e){e.forEach(e=>{t.on(e,(...t)=>{this.emit(e,...t)})})}renderSlide(t,e=!1){var n;return XR(this,void 0,void 0,(function*(){if(this._isPaused)return void this.logger.info("ppt play prevent render slide with paused state",this.taskId);this.logger.info("render slide "+t,this.taskId),this.emit(YR.renderStart,t);const i=yield this.stagePool.getStage(t);if(!i)return;this.translateEvent(i.ctx.eventHub,[YR.mainSeqStepChange,YR.mainSeqStateChange,YR.hyperlinkTrigger,YR.interactiveSeqAction,YR.mainSeqStepStart,YR.mainSeqStepEnd,YR.animateStart,YR.animateEnd,YR.mediaPlay,YR.mediaPause,YR.mediaSeek,YR.requestGotoSlide,YR.requestNextSlide,YR.requestPrevSlide,YR.interactiveSeqStateChange,YR.userInput]),this.currentIndex=Number(t);const{width:r,height:o,slideCount:s}=i.json;this.slideCount=s,this.designWidth=r,this.designHeight=o,i.json.transition&&i.json.transition.type&&!this.prevSlideBase64&&this.currentStage&&(this.prevSlideBase64=this.getBase64(this.currentStage)),null===(n=this.currentStage)||void 0===n||n.clearOnSlideChange();const a=this.currentStage;this.currentStage=i,i.initOnReuse(),i.createTiming(),i.container.visible=!0,i.collectMainSeqStartValue(),this.isForward?i.setMainSeqStep(0,"start"):i.setMainSeqStep(-1,"end");let l=null;if(i.json.transition&&i.json.transition.type){const n=t.toString()+(this.isForward||e?"-start":"-end"),i=yield this.localStorage.getItem("snapshot-"+n);l=i||this.getBase64(this.currentStage)}i.container.visible=!1,this.app.stage.addChild(i.container);let{transition:u}=i.json;!this.isForward&&(null==a?void 0:a.json.transition)&&(u=a.json.transition),this.prevSlideBase64&&l&&u&&u.type&&a&&i&&(yield this.playTransaction(this.prevSlideBase64,l,u,a,i),this.prevSlideBase64=null),this.isForward?yield i.startTiming():i.setMainSeqApplied(),this.updateResolution(this.config.resolution*this.scale),i.container.visible=!0,a&&(a.setMainSeqStep(0,"start"),a.clearOnTransactionEnd(),this.app.stage.removeChild(a.container)),i.ctx.slideScopeEventHub.emit("slide-render",i.ctx.slideIndex),this.emit(YR.renderEnd,t),this.emit(YR.slideChange,t),this.preload(t+1).catch(e=>{this.errorChannel.emit("error",qE.transform(e),t+1)}),this.preload(t-1).catch(e=>{this.errorChannel.emit("error",qE.transform(e),t-1)})}))}getBase64(t){if(!t.container.transform)return null;const e=Hy.create({width:this.designWidth,height:this.designHeight,resolution:1});this.app.renderer.render(t.container,{renderTexture:e});const n=this.app.renderer.plugins.extract.base64(e,"image/jpeg");return e.destroy(!0),n}playTransaction(t,e,n,i,r){return XR(this,void 0,void 0,(function*(){const o=this.app.view.parentElement;if(t&&e&&o&&qR[n.type]&&this.transactionPlayer){this.transactionSprite.zIndex=999,this.transactionSprite.visible=!1,this.app.stage.addChild(this.transactionSprite);const o=this.transactionPlayer.renderer.domElement,s=ky.from(o),a=()=>s.update();return this.app.ticker.add(a),this.transactionSprite.texture=s,setTimeout(()=>{this.transactionSprite.visible=!0},100),new Promise(o=>{var s,l,u,h;null===(s=this.transactionPlayer)||void 0===s||s.play({reverse:!this.isForward,prevTextureUrl:t,nextTextureUrl:e,textureWidth:this.designWidth,textureHeight:this.designHeight,presetType:qR[n.type],stageWidth:this.designWidth,stageHeight:this.designHeight,duration:null===(u=null===(l=this.currentStage)||void 0===l?void 0:l.json.transition)||void 0===u?void 0:u.dur,delay:0,clearColor:this.config.transactionBgColor,maxFPS:Math.ceil(null!==(h=this.config.maxFPS)&&void 0!==h?h:60),onTransactionEnd:()=>{var t,e;o(),i.container.visible=!1,r.container.visible=!0,null===(t=this.app.stage)||void 0===t||t.removeChild(this.transactionSprite),null===(e=this.app.ticker)||void 0===e||e.remove(a)}})})}return Promise.resolve()}))}scaleView(t,e,n){if(this.view&&(this.view.style.width=Math.floor(this.designWidth*t)+"px",this.view.style.height=Math.floor(this.designHeight*t)+"px"),e){this.scale=t;const e=this.scale*this.config.resolution;this.updateResolution(e,n)}}updateResolution(t,e){this.app.ticker.addOnce(()=>{let n=HR.isDesktop()?t:1;for(;n*this.designWidth>5120||n*this.designHeight>5120;)n-=.1;this.app.renderer.resolution=n,this.app.renderer.plugins.interaction.resolution=this.app.renderer.resolution,this.app.renderer.resize(this.designWidth,this.designHeight),Object(l.isFunction)(e)&&e()})}nextStep(t=!1){var e;if(this._isPaused)this.logger.info("ppt play prevent next step with paused state",this.taskId);else{this.logger.info("ppt play trigger next step",this.taskId);try{null===(e=this.currentStage)||void 0===e||e.nextStep(t)}catch(t){this.errorChannel.emit("error",qE.transform(t),this.currentIndex)}}}prevStep(t=!1){var e;if(this._isPaused)this.logger.info("ppt play prevent prev step with paused state",this.taskId);else{this.logger.info("ppt play trigger prev step",this.taskId);try{null===(e=this.currentStage)||void 0===e||e.prevStep(t)}catch(t){this.errorChannel.emit("error",qE.transform(t),this.currentIndex)}}}mainSeqLength(){var t,e;return null!==(e=null===(t=this.currentStage)||void 0===t?void 0:t.mainSeqLength())&&void 0!==e?e:0}mainSeqStep(){var t,e;return null!==(e=null===(t=this.currentStage)||void 0===t?void 0:t.mainSeqStep())&&void 0!==e?e:0}setMainSeqStep(t,e){var n;null===(n=this.currentStage)||void 0===n||n.setMainSeqStep(t,e)}mainSeqState(){var t,e;return null!==(e=null===(t=this.currentStage)||void 0===t?void 0:t.mainSeqState())&&void 0!==e?e:null}mainSeqHasNextStep(){var t,e;return null!==(e=null===(t=this.currentStage)||void 0===t?void 0:t.mainSeqHasNextStep())&&void 0!==e&&e}mainSeqHasPrevStep(){var t,e;return null!==(e=null===(t=this.currentStage)||void 0===t?void 0:t.mainSeqHasPrevStep())&&void 0!==e&&e}nextTick(t){this.app.ticker.addOnce(()=>{t()},ey.LOW)}applyInteractiveAction(t){var e;null===(e=this.currentStage)||void 0===e||e.applyInteractiveAction(t)}seekInteractiveSeqToEnd(t){var e;null===(e=this.currentStage)||void 0===e||e.seekInteractiveSeqToEnd(t)}setInteractiveSeqState(t,e,n){var i;null===(i=this.currentStage)||void 0===i||i.setInteractiveSeqState(t,e,n)}setMediaState(t,e){var n;return XR(this,void 0,void 0,(function*(){yield null===(n=this.currentStage)||void 0===n?void 0:n.setMediaState(t,e)}))}setMediaCurrentTime(t,e){var n;null===(n=this.currentStage)||void 0===n||n.setMediaCurrentTime(t,e)}pause(){var t;this.app.ticker.stop(),null===(t=this.currentStage)||void 0===t||t.ctx.activeMedia.forEach(t=>{t.globalPause()}),this._isPaused=!0}resume(){var t;this._isPaused=!1,this.app.ticker.start(),null===(t=this.currentStage)||void 0===t||t.ctx.activeMedia.forEach(t=>{t.globalResume()})}getSnapshot(){return this.currentStage&&this.getBase64(this.currentStage)||""}createSnapshotForNextSlide(t){return XR(this,void 0,void 0,(function*(){const e=this.nextSlideIndex,n=this.stagePool.getStageJson(e);if(n&&n.transition&&n.transition.type&&this.currentStage&&this.transactionPlayer){const e=t?`snapshot-${this.currentStage.json.index}-start`:`snapshot-${this.currentStage.json.index}-end`;if(this.currentStage.timing&&(t?this.currentStage.timing.mainSeqHasPrevStep():this.currentStage.timing.mainSeqHasNextStep()))this.prevSlideBase64=this.getBase64(this.currentStage);else{const t=yield this.localStorage.getItem(e);t?this.prevSlideBase64=t:(this.prevSlideBase64=this.getBase64(this.currentStage),this.localStorage.setItem(e,this.prevSlideBase64,!0).catch(()=>{}))}}}))}clearLocalCache(){this.localStorage.dispose()}static clearLocalCache(){o.clear()}destroy(){var t;try{this.app.view.removeEventListener("webglcontextlost",this.onWebGLLost);try{this.app.renderer.filter.texturePool.clear(!0)}catch(t){}gM.collectObjectByGroup(this.objPoolGroup),vM.collectObjectByGroup(this.objPoolGroup),null===(t=this.transactionPlayer)||void 0===t||t.destroy(),this.loader.destroy(),this.fps.destroy(),this.stagePool.destroyAllStage(),this.stagePool.destroy();try{this.app.renderer.gl.getExtension("WEBGL_lose_context").loseContext()}catch(t){}this.app.destroy(!0,{children:!0,texture:!0,baseTexture:!0})}catch(t){}}}ZR.platform=HR,ZR.RtcAudioClazz=null;var JR,KR=[],$R="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(JR||(JR={}));var QR,tP=function(t){return Object.freeze(t)},eP=function(t,e){this.inlineSize=t,this.blockSize=e,tP(this)},nP=function(){function t(t,e,n,i){return this.x=t,this.y=e,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,tP(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),iP=function(t){return t instanceof SVGElement&&"getBBox"in t},rP=function(t){if(iP(t)){var e=t.getBBox(),n=e.width,i=e.height;return!n&&!i}var r=t,o=r.offsetWidth,s=r.offsetHeight;return!(o||s||t.getClientRects().length)},oP=function(t){var e,n;if(t instanceof Element)return!0;var i=null===(n=null===(e=t)||void 0===e?void 0:e.ownerDocument)||void 0===n?void 0:n.defaultView;return!!(i&&t instanceof i.Element)},sP="undefined"!=typeof window?window:{},aP=new WeakMap,lP=/auto|scroll/,uP=/^tb|vertical/,hP=/msie|trident/i.test(sP.navigator&&sP.navigator.userAgent),cP=function(t){return parseFloat(t||"0")},dP=function(t,e,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=!1),new eP((n?e:t)||0,(n?t:e)||0)},pP=tP({devicePixelContentBoxSize:dP(),borderBoxSize:dP(),contentBoxSize:dP(),contentRect:new nP(0,0,0,0)}),fP=function(t,e){if(void 0===e&&(e=!1),aP.has(t)&&!e)return aP.get(t);if(rP(t))return aP.set(t,pP),pP;var n=getComputedStyle(t),i=iP(t)&&t.ownerSVGElement&&t.getBBox(),r=!hP&&"border-box"===n.boxSizing,o=uP.test(n.writingMode||""),s=!i&&lP.test(n.overflowY||""),a=!i&&lP.test(n.overflowX||""),l=i?0:cP(n.paddingTop),u=i?0:cP(n.paddingRight),h=i?0:cP(n.paddingBottom),c=i?0:cP(n.paddingLeft),d=i?0:cP(n.borderTopWidth),p=i?0:cP(n.borderRightWidth),f=i?0:cP(n.borderBottomWidth),m=c+u,g=l+h,v=(i?0:cP(n.borderLeftWidth))+p,_=d+f,y=a?t.offsetHeight-_-t.clientHeight:0,x=s?t.offsetWidth-v-t.clientWidth:0,b=r?m+v:0,T=r?g+_:0,w=i?i.width:cP(n.width)-b-x,S=i?i.height:cP(n.height)-T-y,E=w+m+x+v,M=S+g+y+_,A=tP({devicePixelContentBoxSize:dP(Math.round(w*devicePixelRatio),Math.round(S*devicePixelRatio),o),borderBoxSize:dP(E,M,o),contentBoxSize:dP(w,S,o),contentRect:new nP(c,l,w,S)});return aP.set(t,A),A},mP=function(t,e,n){var i=fP(t,n),r=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(e){case JR.DEVICE_PIXEL_CONTENT_BOX:return s;case JR.BORDER_BOX:return r;default:return o}},gP=function(t){var e=fP(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=tP([e.borderBoxSize]),this.contentBoxSize=tP([e.contentBoxSize]),this.devicePixelContentBoxSize=tP([e.devicePixelContentBoxSize])},vP=function(t){if(rP(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},_P=function(){var t=1/0,e=[];KR.forEach((function(n){if(0!==n.activeTargets.length){var i=[];n.activeTargets.forEach((function(e){var n=new gP(e.target),r=vP(e.target);i.push(n),e.lastReportedSize=mP(e.target,e.observedBox),r<t&&(t=r)})),e.push((function(){n.callback.call(n.observer,i,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,i=e;n<i.length;n++){(0,i[n])()}return t},yP=function(t){KR.forEach((function(e){e.activeTargets.splice(0,e.activeTargets.length),e.skippedTargets.splice(0,e.skippedTargets.length),e.observationTargets.forEach((function(n){n.isActive()&&(vP(n.target)>t?e.activeTargets.push(n):e.skippedTargets.push(n))}))}))},xP=function(){var t,e=0;for(yP(e);KR.some((function(t){return t.activeTargets.length>0}));)e=_P(),yP(e);return KR.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:$R}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=$R),window.dispatchEvent(t)),e>0},bP=[],TP=function(t){if(!QR){var e=0,n=document.createTextNode("");new MutationObserver((function(){return bP.splice(0).forEach((function(t){return t()}))})).observe(n,{characterData:!0}),QR=function(){n.textContent=""+(e?e--:e++)}}bP.push(t),QR()},wP=0,SP={attributes:!0,characterData:!0,childList:!0,subtree:!0},EP=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],MP=function(t){return void 0===t&&(t=0),Date.now()+t},AP=!1,RP=new(function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var e=this;if(void 0===t&&(t=250),!AP){AP=!0;var n,i=MP(t);n=function(){var n=!1;try{n=xP()}finally{if(AP=!1,t=i-MP(),!wP)return;n?e.run(1e3):t>0?e.run(t):e.start()}},TP((function(){requestAnimationFrame(n)}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,SP)};document.body?e():sP.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),EP.forEach((function(e){return sP.addEventListener(e,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),EP.forEach((function(e){return sP.removeEventListener(e,t.listener,!0)})),this.stopped=!0)},t}()),PP=function(t){!wP&&t>0&&RP.start(),!(wP+=t)&&RP.stop()},CP=function(){function t(t,e){this.target=t,this.observedBox=e||JR.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=mP(this.target,this.observedBox,!0);return t=this.target,iP(t)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),IP=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},OP=new WeakMap,LP=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},NP=function(){function t(){}return t.connect=function(t,e){var n=new IP(t,e);OP.set(t,n)},t.observe=function(t,e,n){var i=OP.get(t),r=0===i.observationTargets.length;LP(i.observationTargets,e)<0&&(r&&KR.push(i),i.observationTargets.push(new CP(e,n&&n.box)),PP(1),RP.schedule())},t.unobserve=function(t,e){var n=OP.get(t),i=LP(n.observationTargets,e),r=1===n.observationTargets.length;i>=0&&(r&&KR.splice(KR.indexOf(n),1),n.observationTargets.splice(i,1),PP(-1))},t.disconnect=function(t){var e=this,n=OP.get(t);n.observationTargets.slice().forEach((function(n){return e.unobserve(t,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},t}(),DP=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");NP.connect(this,t)}return t.prototype.observe=function(t,e){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!oP(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");NP.observe(this,t,e)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!oP(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");NP.unobserve(this,t)},t.prototype.disconnect=function(){NP.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}(),FP=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))},BP=function(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},UP=function(){function t(t,e,n,i,r){this.state="idle",this.index=-1,this.slideIndex=-1,this.fn=n,this.index=t,this.slideIndex=e,this.eventHub=i,this.id=r}return t.prototype.apply=function(){return FP(this,void 0,void 0,(function(){var t;return BP(this,(function(e){switch(e.label){case 0:this.eventHub.emit("task-start",this),e.label=1;case 1:return e.trys.push([1,3,,4]),this.state="start",[4,this.fn()];case 2:return e.sent(),this.state="end",this.eventHub.emit("task-end",this),[3,4];case 3:return t=e.sent(),this.eventHub.emit("task-error",{task:this,error:t}),[3,4];case 4:return[2]}}))}))},t}(),kP=function(){function t(){var t=this;this.eventHub=new a.a,this.tasks=[],this.index=0,this.eventHub.on("task-end",(function(e){var n,i=t.tasks.findIndex((function(t){return t.index===e.index})),r=i+1;r>=0&&(null===(n=t.tasks[r])||void 0===n||n.apply()),i>=0&&(t.tasks.splice(i,1),t.replaceIdleTask()),t.eventHub.emit("task-end-"+e.id)})),this.eventHub.on("task-error",(function(e){var n=e.task,i=t.tasks.findIndex((function(t){return t.index===n.index}));i>=0&&(t.tasks.splice(i,1),t.replaceIdleTask())}))}return t.prototype.replaceIdleTask=function(){for(var t,e=this,n=new Set,i=0,r=this.tasks.length;i<r;i++)"idle"===this.tasks[i].state&&"idle"===(null===(t=this.tasks[i+1])||void 0===t?void 0:t.state)&&n.add(i);Array.from(n).forEach((function(t){e.tasks.splice(t,1)}))},t.prototype.addTask=function(t,e,n){var i=new UP(this.index++,e,t,this.eventHub,n);this.tasks.push(i),this.tasks.sort((function(t,e){return t.index-e.index})),this.replaceIdleTask(),1===this.tasks.length&&i.apply()},t.prototype.hasStartTask=function(){return this.tasks.some((function(t){return"start"===t.state}))},t.prototype.destroy=function(){this.eventHub.removeAllListeners()},t}();function GP(t,e){var n=t.__state.conversionName.toString(),i=Math.round(t.r),r=Math.round(t.g),o=Math.round(t.b),s=t.a,a=Math.round(t.h),l=t.s.toFixed(1),u=t.v.toFixed(1);if(e||"THREE_CHAR_HEX"===n||"SIX_CHAR_HEX"===n){for(var h=t.hex.toString(16);h.length<6;)h="0"+h;return"#"+h}return"CSS_RGB"===n?"rgb("+i+","+r+","+o+")":"CSS_RGBA"===n?"rgba("+i+","+r+","+o+","+s+")":"HEX"===n?"0x"+t.hex.toString(16):"RGB_ARRAY"===n?"["+i+","+r+","+o+"]":"RGBA_ARRAY"===n?"["+i+","+r+","+o+","+s+"]":"RGB_OBJ"===n?"{r:"+i+",g:"+r+",b:"+o+"}":"RGBA_OBJ"===n?"{r:"+i+",g:"+r+",b:"+o+",a:"+s+"}":"HSV_OBJ"===n?"{h:"+a+",s:"+l+",v:"+u+"}":"HSVA_OBJ"===n?"{h:"+a+",s:"+l+",v:"+u+",a:"+s+"}":"unknown format"}var HP=Array.prototype.forEach,zP=Array.prototype.slice,jP={BREAK:{},extend:function(t){return this.each(zP.call(arguments,1),(function(e){(this.isObject(e)?Object.keys(e):[]).forEach(function(n){this.isUndefined(e[n])||(t[n]=e[n])}.bind(this))}),this),t},defaults:function(t){return this.each(zP.call(arguments,1),(function(e){(this.isObject(e)?Object.keys(e):[]).forEach(function(n){this.isUndefined(t[n])&&(t[n]=e[n])}.bind(this))}),this),t},compose:function(){var t=zP.call(arguments);return function(){for(var e=zP.call(arguments),n=t.length-1;n>=0;n--)e=[t[n].apply(this,e)];return e[0]}},each:function(t,e,n){if(t)if(HP&&t.forEach&&t.forEach===HP)t.forEach(e,n);else if(t.length===t.length+0){var i,r=void 0;for(r=0,i=t.length;r<i;r++)if(r in t&&e.call(n,t[r],r)===this.BREAK)return}else for(var o in t)if(e.call(n,t[o],o)===this.BREAK)return},defer:function(t){setTimeout(t,0)},debounce:function(t,e,n){var i=void 0;return function(){var r=this,o=arguments;function s(){i=null,n||t.apply(r,o)}var a=n||!i;clearTimeout(i),i=setTimeout(s,e),a&&t.apply(r,o)}},toArray:function(t){return t.toArray?t.toArray():zP.call(t)},isUndefined:function(t){return void 0===t},isNull:function(t){return null===t},isNaN:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){return isNaN(t)})),isArray:Array.isArray||function(t){return t.constructor===Array},isObject:function(t){return t===Object(t)},isNumber:function(t){return t===t+0},isString:function(t){return t===t+""},isBoolean:function(t){return!1===t||!0===t},isFunction:function(t){return t instanceof Function}},VP=[{litmus:jP.isString,conversions:{THREE_CHAR_HEX:{read:function(t){var e=t.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);return null!==e&&{space:"HEX",hex:parseInt("0x"+e[1].toString()+e[1].toString()+e[2].toString()+e[2].toString()+e[3].toString()+e[3].toString(),0)}},write:GP},SIX_CHAR_HEX:{read:function(t){var e=t.match(/^#([A-F0-9]{6})$/i);return null!==e&&{space:"HEX",hex:parseInt("0x"+e[1].toString(),0)}},write:GP},CSS_RGB:{read:function(t){var e=t.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==e&&{space:"RGB",r:parseFloat(e[1]),g:parseFloat(e[2]),b:parseFloat(e[3])}},write:GP},CSS_RGBA:{read:function(t){var e=t.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==e&&{space:"RGB",r:parseFloat(e[1]),g:parseFloat(e[2]),b:parseFloat(e[3]),a:parseFloat(e[4])}},write:GP}}},{litmus:jP.isNumber,conversions:{HEX:{read:function(t){return{space:"HEX",hex:t,conversionName:"HEX"}},write:function(t){return t.hex}}}},{litmus:jP.isArray,conversions:{RGB_ARRAY:{read:function(t){return 3===t.length&&{space:"RGB",r:t[0],g:t[1],b:t[2]}},write:function(t){return[t.r,t.g,t.b]}},RGBA_ARRAY:{read:function(t){return 4===t.length&&{space:"RGB",r:t[0],g:t[1],b:t[2],a:t[3]}},write:function(t){return[t.r,t.g,t.b,t.a]}}}},{litmus:jP.isObject,conversions:{RGBA_OBJ:{read:function(t){return!!(jP.isNumber(t.r)&&jP.isNumber(t.g)&&jP.isNumber(t.b)&&jP.isNumber(t.a))&&{space:"RGB",r:t.r,g:t.g,b:t.b,a:t.a}},write:function(t){return{r:t.r,g:t.g,b:t.b,a:t.a}}},RGB_OBJ:{read:function(t){return!!(jP.isNumber(t.r)&&jP.isNumber(t.g)&&jP.isNumber(t.b))&&{space:"RGB",r:t.r,g:t.g,b:t.b}},write:function(t){return{r:t.r,g:t.g,b:t.b}}},HSVA_OBJ:{read:function(t){return!!(jP.isNumber(t.h)&&jP.isNumber(t.s)&&jP.isNumber(t.v)&&jP.isNumber(t.a))&&{space:"HSV",h:t.h,s:t.s,v:t.v,a:t.a}},write:function(t){return{h:t.h,s:t.s,v:t.v,a:t.a}}},HSV_OBJ:{read:function(t){return!!(jP.isNumber(t.h)&&jP.isNumber(t.s)&&jP.isNumber(t.v))&&{space:"HSV",h:t.h,s:t.s,v:t.v}},write:function(t){return{h:t.h,s:t.s,v:t.v}}}}}],WP=void 0,XP=void 0,qP=function(){XP=!1;var t=arguments.length>1?jP.toArray(arguments):arguments[0];return jP.each(VP,(function(e){if(e.litmus(t))return jP.each(e.conversions,(function(e,n){if(WP=e.read(t),!1===XP&&!1!==WP)return XP=WP,WP.conversionName=n,WP.conversion=e,jP.BREAK})),jP.BREAK})),XP},YP=void 0,ZP={hsv_to_rgb:function(t,e,n){var i=Math.floor(t/60)%6,r=t/60-Math.floor(t/60),o=n*(1-e),s=n*(1-r*e),a=n*(1-(1-r)*e),l=[[n,a,o],[s,n,o],[o,n,a],[o,s,n],[a,o,n],[n,o,s]][i];return{r:255*l[0],g:255*l[1],b:255*l[2]}},rgb_to_hsv:function(t,e,n){var i=Math.min(t,e,n),r=Math.max(t,e,n),o=r-i,s=void 0;return 0===r?{h:NaN,s:0,v:0}:(s=t===r?(e-n)/o:e===r?2+(n-t)/o:4+(t-e)/o,(s/=6)<0&&(s+=1),{h:360*s,s:o/r,v:r/255})},rgb_to_hex:function(t,e,n){var i=this.hex_with_component(0,2,t);return i=this.hex_with_component(i,1,e),i=this.hex_with_component(i,0,n)},component_from_hex:function(t,e){return t>>8*e&255},hex_with_component:function(t,e,n){return n<<(YP=8*e)|t&~(255<<YP)}},JP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},KP=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},$P=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),QP=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0},tC=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},eC=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},nC=function(){function t(){if(KP(this,t),this.__state=qP.apply(this,arguments),!1===this.__state)throw new Error("Failed to interpret color arguments");this.__state.a=this.__state.a||1}return $P(t,[{key:"toString",value:function(){return GP(this)}},{key:"toHexString",value:function(){return GP(this,!0)}},{key:"toOriginal",value:function(){return this.__state.conversion.write(this)}}]),t}();function iC(t,e,n){Object.defineProperty(t,e,{get:function(){return"RGB"===this.__state.space||nC.recalculateRGB(this,e,n),this.__state[e]},set:function(t){"RGB"!==this.__state.space&&(nC.recalculateRGB(this,e,n),this.__state.space="RGB"),this.__state[e]=t}})}function rC(t,e){Object.defineProperty(t,e,{get:function(){return"HSV"===this.__state.space||nC.recalculateHSV(this),this.__state[e]},set:function(t){"HSV"!==this.__state.space&&(nC.recalculateHSV(this),this.__state.space="HSV"),this.__state[e]=t}})}nC.recalculateRGB=function(t,e,n){if("HEX"===t.__state.space)t.__state[e]=ZP.component_from_hex(t.__state.hex,n);else{if("HSV"!==t.__state.space)throw new Error("Corrupted color state");jP.extend(t.__state,ZP.hsv_to_rgb(t.__state.h,t.__state.s,t.__state.v))}},nC.recalculateHSV=function(t){var e=ZP.rgb_to_hsv(t.r,t.g,t.b);jP.extend(t.__state,{s:e.s,v:e.v}),jP.isNaN(e.h)?jP.isUndefined(t.__state.h)&&(t.__state.h=0):t.__state.h=e.h},nC.COMPONENTS=["r","g","b","h","s","v","hex","a"],iC(nC.prototype,"r",2),iC(nC.prototype,"g",1),iC(nC.prototype,"b",0),rC(nC.prototype,"h"),rC(nC.prototype,"s"),rC(nC.prototype,"v"),Object.defineProperty(nC.prototype,"a",{get:function(){return this.__state.a},set:function(t){this.__state.a=t}}),Object.defineProperty(nC.prototype,"hex",{get:function(){return"HEX"!==this.__state.space&&(this.__state.hex=ZP.rgb_to_hex(this.r,this.g,this.b),this.__state.space="HEX"),this.__state.hex},set:function(t){this.__state.space="HEX",this.__state.hex=t}});var oC=function(){function t(e,n){KP(this,t),this.initialValue=e[n],this.domElement=document.createElement("div"),this.object=e,this.property=n,this.__onChange=void 0,this.__onFinishChange=void 0}return $P(t,[{key:"onChange",value:function(t){return this.__onChange=t,this}},{key:"onFinishChange",value:function(t){return this.__onFinishChange=t,this}},{key:"setValue",value:function(t){return this.object[this.property]=t,this.__onChange&&this.__onChange.call(this,t),this.updateDisplay(),this}},{key:"getValue",value:function(){return this.object[this.property]}},{key:"updateDisplay",value:function(){return this}},{key:"isModified",value:function(){return this.initialValue!==this.getValue()}}]),t}(),sC={};jP.each({HTMLEvents:["change"],MouseEvents:["click","mousemove","mousedown","mouseup","mouseover"],KeyboardEvents:["keydown"]},(function(t,e){jP.each(t,(function(t){sC[t]=e}))}));var aC=/(\d+(\.\d+)?)px/;function lC(t){if("0"===t||jP.isUndefined(t))return 0;var e=t.match(aC);return jP.isNull(e)?0:parseFloat(e[1])}var uC={makeSelectable:function(t,e){void 0!==t&&void 0!==t.style&&(t.onselectstart=e?function(){return!1}:function(){},t.style.MozUserSelect=e?"auto":"none",t.style.KhtmlUserSelect=e?"auto":"none",t.unselectable=e?"on":"off")},makeFullscreen:function(t,e,n){var i=n,r=e;jP.isUndefined(r)&&(r=!0),jP.isUndefined(i)&&(i=!0),t.style.position="absolute",r&&(t.style.left=0,t.style.right=0),i&&(t.style.top=0,t.style.bottom=0)},fakeEvent:function(t,e,n,i){var r=n||{},o=sC[e];if(!o)throw new Error("Event type "+e+" not supported.");var s=document.createEvent(o);switch(o){case"MouseEvents":var a=r.x||r.clientX||0,l=r.y||r.clientY||0;s.initMouseEvent(e,r.bubbles||!1,r.cancelable||!0,window,r.clickCount||1,0,0,a,l,!1,!1,!1,!1,0,null);break;case"KeyboardEvents":var u=s.initKeyboardEvent||s.initKeyEvent;jP.defaults(r,{cancelable:!0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,keyCode:void 0,charCode:void 0}),u(e,r.bubbles||!1,r.cancelable,window,r.ctrlKey,r.altKey,r.shiftKey,r.metaKey,r.keyCode,r.charCode);break;default:s.initEvent(e,r.bubbles||!1,r.cancelable||!0)}jP.defaults(s,i),t.dispatchEvent(s)},bind:function(t,e,n,i){var r=i||!1;return t.addEventListener?t.addEventListener(e,n,r):t.attachEvent&&t.attachEvent("on"+e,n),uC},unbind:function(t,e,n,i){var r=i||!1;return t.removeEventListener?t.removeEventListener(e,n,r):t.detachEvent&&t.detachEvent("on"+e,n),uC},addClass:function(t,e){if(void 0===t.className)t.className=e;else if(t.className!==e){var n=t.className.split(/ +/);-1===n.indexOf(e)&&(n.push(e),t.className=n.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}return uC},removeClass:function(t,e){if(e)if(t.className===e)t.removeAttribute("class");else{var n=t.className.split(/ +/),i=n.indexOf(e);-1!==i&&(n.splice(i,1),t.className=n.join(" "))}else t.className=void 0;return uC},hasClass:function(t,e){return new RegExp("(?:^|\\s+)"+e+"(?:\\s+|$)").test(t.className)||!1},getWidth:function(t){var e=getComputedStyle(t);return lC(e["border-left-width"])+lC(e["border-right-width"])+lC(e["padding-left"])+lC(e["padding-right"])+lC(e.width)},getHeight:function(t){var e=getComputedStyle(t);return lC(e["border-top-width"])+lC(e["border-bottom-width"])+lC(e["padding-top"])+lC(e["padding-bottom"])+lC(e.height)},getOffset:function(t){var e=t,n={left:0,top:0};if(e.offsetParent)do{n.left+=e.offsetLeft,n.top+=e.offsetTop,e=e.offsetParent}while(e);return n},isActive:function(t){return t===document.activeElement&&(t.type||t.href)}},hC=function(t){function e(t,n){KP(this,e);var i=eC(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n)),r=i;return i.__prev=i.getValue(),i.__checkbox=document.createElement("input"),i.__checkbox.setAttribute("type","checkbox"),uC.bind(i.__checkbox,"change",(function(){r.setValue(!r.__prev)}),!1),i.domElement.appendChild(i.__checkbox),i.updateDisplay(),i}return tC(e,t),$P(e,[{key:"setValue",value:function(t){var n=QP(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setValue",this).call(this,t);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),this.__prev=this.getValue(),n}},{key:"updateDisplay",value:function(){return!0===this.getValue()?(this.__checkbox.setAttribute("checked","checked"),this.__checkbox.checked=!0,this.__prev=!0):(this.__checkbox.checked=!1,this.__prev=!1),QP(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"updateDisplay",this).call(this)}}]),e}(oC),cC=function(t){function e(t,n,i){KP(this,e);var r=eC(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n)),o=i,s=r;if(r.__select=document.createElement("select"),jP.isArray(o)){var a={};jP.each(o,(function(t){a[t]=t})),o=a}return jP.each(o,(function(t,e){var n=document.createElement("option");n.innerHTML=e,n.setAttribute("value",t),s.__select.appendChild(n)})),r.updateDisplay(),uC.bind(r.__select,"change",(function(){var t=this.options[this.selectedIndex].value;s.setValue(t)})),r.domElement.appendChild(r.__select),r}return tC(e,t),$P(e,[{key:"setValue",value:function(t){var n=QP(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setValue",this).call(this,t);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),n}},{key:"updateDisplay",value:function(){return uC.isActive(this.__select)?this:(this.__select.value=this.getValue(),QP(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"updateDisplay",this).call(this))}}]),e}(oC),dC=function(t){function e(t,n){KP(this,e);var i=eC(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n)),r=i;function o(){r.setValue(r.__input.value)}return i.__input=document.createElement("input"),i.__input.setAttribute("type","text"),uC.bind(i.__input,"keyup",o),uC.bind(i.__input,"change",o),uC.bind(i.__input,"blur",(function(){r.__onFinishChange&&r.__onFinishChange.call(r,r.getValue())})),uC.bind(i.__input,"keydown",(function(t){13===t.keyCode&&this.blur()})),i.updateDisplay(),i.domElement.appendChild(i.__input),i}return tC(e,t),$P(e,[{key:"updateDisplay",value:function(){return uC.isActive(this.__input)||(this.__input.value=this.getValue()),QP(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"updateDisplay",this).call(this)}}]),e}(oC);function pC(t){var e=t.toString();return e.indexOf(".")>-1?e.length-e.indexOf(".")-1:0}var fC=function(t){function e(t,n,i){KP(this,e);var r=eC(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n)),o=i||{};return r.__min=o.min,r.__max=o.max,r.__step=o.step,jP.isUndefined(r.__step)?0===r.initialValue?r.__impliedStep=1:r.__impliedStep=Math.pow(10,Math.floor(Math.log(Math.abs(r.initialValue))/Math.LN10))/10:r.__impliedStep=r.__step,r.__precision=pC(r.__impliedStep),r}return tC(e,t),$P(e,[{key:"setValue",value:function(t){var n=t;return void 0!==this.__min&&n<this.__min?n=this.__min:void 0!==this.__max&&n>this.__max&&(n=this.__max),void 0!==this.__step&&n%this.__step!=0&&(n=Math.round(n/this.__step)*this.__step),QP(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setValue",this).call(this,n)}},{key:"min",value:function(t){return this.__min=t,this}},{key:"max",value:function(t){return this.__max=t,this}},{key:"step",value:function(t){return this.__step=t,this.__impliedStep=t,this.__precision=pC(t),this}}]),e}(oC);var mC=function(t){function e(t,n,i){KP(this,e);var r=eC(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,i));r.__truncationSuspended=!1;var o=r,s=void 0;function a(){o.__onFinishChange&&o.__onFinishChange.call(o,o.getValue())}function l(t){var e=s-t.clientY;o.setValue(o.getValue()+e*o.__impliedStep),s=t.clientY}function u(){uC.unbind(window,"mousemove",l),uC.unbind(window,"mouseup",u),a()}return r.__input=document.createElement("input"),r.__input.setAttribute("type","text"),uC.bind(r.__input,"change",(function(){var t=parseFloat(o.__input.value);jP.isNaN(t)||o.setValue(t)})),uC.bind(r.__input,"blur",(function(){a()})),uC.bind(r.__input,"mousedown",(function(t){uC.bind(window,"mousemove",l),uC.bind(window,"mouseup",u),s=t.clientY})),uC.bind(r.__input,"keydown",(function(t){13===t.keyCode&&(o.__truncationSuspended=!0,this.blur(),o.__truncationSuspended=!1,a())})),r.updateDisplay(),r.domElement.appendChild(r.__input),r}return tC(e,t),$P(e,[{key:"updateDisplay",value:function(){var t,n,i;return this.__input.value=this.__truncationSuspended?this.getValue():(t=this.getValue(),n=this.__precision,i=Math.pow(10,n),Math.round(t*i)/i),QP(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"updateDisplay",this).call(this)}}]),e}(fC);function gC(t,e,n,i,r){return i+(t-e)/(n-e)*(r-i)}var vC=function(t){function e(t,n,i,r,o){KP(this,e);var s=eC(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,{min:i,max:r,step:o})),a=s;function l(t){t.preventDefault();var e=a.__background.getBoundingClientRect();return a.setValue(gC(t.clientX,e.left,e.right,a.__min,a.__max)),!1}function u(){uC.unbind(window,"mousemove",l),uC.unbind(window,"mouseup",u),a.__onFinishChange&&a.__onFinishChange.call(a,a.getValue())}function h(t){var e=t.touches[0].clientX,n=a.__background.getBoundingClientRect();a.setValue(gC(e,n.left,n.right,a.__min,a.__max))}function c(){uC.unbind(window,"touchmove",h),uC.unbind(window,"touchend",c),a.__onFinishChange&&a.__onFinishChange.call(a,a.getValue())}return s.__background=document.createElement("div"),s.__foreground=document.createElement("div"),uC.bind(s.__background,"mousedown",(function(t){document.activeElement.blur(),uC.bind(window,"mousemove",l),uC.bind(window,"mouseup",u),l(t)})),uC.bind(s.__background,"touchstart",(function(t){if(1!==t.touches.length)return;uC.bind(window,"touchmove",h),uC.bind(window,"touchend",c),h(t)})),uC.addClass(s.__background,"slider"),uC.addClass(s.__foreground,"slider-fg"),s.updateDisplay(),s.__background.appendChild(s.__foreground),s.domElement.appendChild(s.__background),s}return tC(e,t),$P(e,[{key:"updateDisplay",value:function(){var t=(this.getValue()-this.__min)/(this.__max-this.__min);return this.__foreground.style.width=100*t+"%",QP(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"updateDisplay",this).call(this)}}]),e}(fC),_C=function(t){function e(t,n,i){KP(this,e);var r=eC(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n)),o=r;return r.__button=document.createElement("div"),r.__button.innerHTML=void 0===i?"Fire":i,uC.bind(r.__button,"click",(function(t){return t.preventDefault(),o.fire(),!1})),uC.addClass(r.__button,"button"),r.domElement.appendChild(r.__button),r}return tC(e,t),$P(e,[{key:"fire",value:function(){this.__onChange&&this.__onChange.call(this),this.getValue().call(this.object),this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())}}]),e}(oC),yC=function(t){function e(t,n){KP(this,e);var i=eC(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));i.__color=new nC(i.getValue()),i.__temp=new nC(0);var r=i;i.domElement=document.createElement("div"),uC.makeSelectable(i.domElement,!1),i.__selector=document.createElement("div"),i.__selector.className="selector",i.__saturation_field=document.createElement("div"),i.__saturation_field.className="saturation-field",i.__field_knob=document.createElement("div"),i.__field_knob.className="field-knob",i.__field_knob_border="2px solid ",i.__hue_knob=document.createElement("div"),i.__hue_knob.className="hue-knob",i.__hue_field=document.createElement("div"),i.__hue_field.className="hue-field",i.__input=document.createElement("input"),i.__input.type="text",i.__input_textShadow="0 1px 1px ",uC.bind(i.__input,"keydown",(function(t){13===t.keyCode&&c.call(this)})),uC.bind(i.__input,"blur",c),uC.bind(i.__selector,"mousedown",(function(){uC.addClass(this,"drag").bind(window,"mouseup",(function(){uC.removeClass(r.__selector,"drag")}))})),uC.bind(i.__selector,"touchstart",(function(){uC.addClass(this,"drag").bind(window,"touchend",(function(){uC.removeClass(r.__selector,"drag")}))}));var o,s=document.createElement("div");function a(t){p(t),uC.bind(window,"mousemove",p),uC.bind(window,"touchmove",p),uC.bind(window,"mouseup",u),uC.bind(window,"touchend",u)}function l(t){f(t),uC.bind(window,"mousemove",f),uC.bind(window,"touchmove",f),uC.bind(window,"mouseup",h),uC.bind(window,"touchend",h)}function u(){uC.unbind(window,"mousemove",p),uC.unbind(window,"touchmove",p),uC.unbind(window,"mouseup",u),uC.unbind(window,"touchend",u),d()}function h(){uC.unbind(window,"mousemove",f),uC.unbind(window,"touchmove",f),uC.unbind(window,"mouseup",h),uC.unbind(window,"touchend",h),d()}function c(){var t=qP(this.value);!1!==t?(r.__color.__state=t,r.setValue(r.__color.toOriginal())):this.value=r.__color.toString()}function d(){r.__onFinishChange&&r.__onFinishChange.call(r,r.__color.toOriginal())}function p(t){-1===t.type.indexOf("touch")&&t.preventDefault();var e=r.__saturation_field.getBoundingClientRect(),n=t.touches&&t.touches[0]||t,i=n.clientX,o=n.clientY,s=(i-e.left)/(e.right-e.left),a=1-(o-e.top)/(e.bottom-e.top);return a>1?a=1:a<0&&(a=0),s>1?s=1:s<0&&(s=0),r.__color.v=a,r.__color.s=s,r.setValue(r.__color.toOriginal()),!1}function f(t){-1===t.type.indexOf("touch")&&t.preventDefault();var e=r.__hue_field.getBoundingClientRect(),n=1-((t.touches&&t.touches[0]||t).clientY-e.top)/(e.bottom-e.top);return n>1?n=1:n<0&&(n=0),r.__color.h=360*n,r.setValue(r.__color.toOriginal()),!1}return jP.extend(i.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),jP.extend(i.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:i.__field_knob_border+(i.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),jP.extend(i.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1}),jP.extend(i.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),jP.extend(s.style,{width:"100%",height:"100%",background:"none"}),bC(s,"top","rgba(0,0,0,0)","#000"),jP.extend(i.__hue_field.style,{width:"15px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",right:"3px"}),(o=i.__hue_field).style.background="",o.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",o.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",o.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",o.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",o.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",jP.extend(i.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:i.__input_textShadow+"rgba(0,0,0,0.7)"}),uC.bind(i.__saturation_field,"mousedown",a),uC.bind(i.__saturation_field,"touchstart",a),uC.bind(i.__field_knob,"mousedown",a),uC.bind(i.__field_knob,"touchstart",a),uC.bind(i.__hue_field,"mousedown",l),uC.bind(i.__hue_field,"touchstart",l),i.__saturation_field.appendChild(s),i.__selector.appendChild(i.__field_knob),i.__selector.appendChild(i.__saturation_field),i.__selector.appendChild(i.__hue_field),i.__hue_field.appendChild(i.__hue_knob),i.domElement.appendChild(i.__input),i.domElement.appendChild(i.__selector),i.updateDisplay(),i}return tC(e,t),$P(e,[{key:"updateDisplay",value:function(){var t=qP(this.getValue());if(!1!==t){var e=!1;jP.each(nC.COMPONENTS,(function(n){if(!jP.isUndefined(t[n])&&!jP.isUndefined(this.__color.__state[n])&&t[n]!==this.__color.__state[n])return e=!0,{}}),this),e&&jP.extend(this.__color.__state,t)}jP.extend(this.__temp.__state,this.__color.__state),this.__temp.a=1;var n=this.__color.v<.5||this.__color.s>.5?255:0,i=255-n;jP.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+n+","+n+","+n+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__temp.s=1,this.__temp.v=1,bC(this.__saturation_field,"left","#fff",this.__temp.toHexString()),this.__input.value=this.__color.toString(),jP.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+n+","+n+","+n+")",textShadow:this.__input_textShadow+"rgba("+i+","+i+","+i+",.7)"})}}]),e}(oC),xC=["-moz-","-o-","-webkit-","-ms-",""];function bC(t,e,n,i){t.style.background="",jP.each(xC,(function(r){t.style.cssText+="background: "+r+"linear-gradient("+e+", "+n+" 0%, "+i+" 100%); "}))}var TC=function(t,e){var n=e||document,i=document.createElement("style");i.type="text/css",i.innerHTML=t;var r=n.getElementsByTagName("head")[0];try{r.appendChild(i)}catch(t){}},wC='<div id="dg-save" class="dg dialogue">\n\n Here\'s the new load parameter for your <code>GUI</code>\'s constructor:\n\n <textarea id="dg-new-constructor"></textarea>\n\n <div id="dg-save-locally">\n\n <input id="dg-local-storage" type="checkbox"/> Automatically save\n values to <code>localStorage</code> on exit.\n\n <div id="dg-local-explain">The values saved to <code>localStorage</code> will\n override those passed to <code>dat.GUI</code>\'s constructor. This makes it\n easier to work incrementally, but <code>localStorage</code> is fragile,\n and your friends may not see the same values you do.\n\n </div>\n\n </div>\n\n</div>',SC=function(t,e){var n=t[e];return jP.isArray(arguments[2])||jP.isObject(arguments[2])?new cC(t,e,arguments[2]):jP.isNumber(n)?jP.isNumber(arguments[2])&&jP.isNumber(arguments[3])?jP.isNumber(arguments[4])?new vC(t,e,arguments[2],arguments[3],arguments[4]):new vC(t,e,arguments[2],arguments[3]):jP.isNumber(arguments[4])?new mC(t,e,{min:arguments[2],max:arguments[3],step:arguments[4]}):new mC(t,e,{min:arguments[2],max:arguments[3]}):jP.isString(n)?new dC(t,e):jP.isFunction(n)?new _C(t,e,""):jP.isBoolean(n)?new hC(t,e):null};var EC=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,1e3/60)},MC=function(){function t(){KP(this,t),this.backgroundElement=document.createElement("div"),jP.extend(this.backgroundElement.style,{backgroundColor:"rgba(0,0,0,0.8)",top:0,left:0,display:"none",zIndex:"1000",opacity:0,WebkitTransition:"opacity 0.2s linear",transition:"opacity 0.2s linear"}),uC.makeFullscreen(this.backgroundElement),this.backgroundElement.style.position="fixed",this.domElement=document.createElement("div"),jP.extend(this.domElement.style,{position:"fixed",display:"none",zIndex:"1001",opacity:0,WebkitTransition:"-webkit-transform 0.2s ease-out, opacity 0.2s linear",transition:"transform 0.2s ease-out, opacity 0.2s linear"}),document.body.appendChild(this.backgroundElement),document.body.appendChild(this.domElement);var e=this;uC.bind(this.backgroundElement,"click",(function(){e.hide()}))}return $P(t,[{key:"show",value:function(){var t=this;this.backgroundElement.style.display="block",this.domElement.style.display="block",this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)",this.layout(),jP.defer((function(){t.backgroundElement.style.opacity=1,t.domElement.style.opacity=1,t.domElement.style.webkitTransform="scale(1)"}))}},{key:"hide",value:function(){var t=this,e=function e(){t.domElement.style.display="none",t.backgroundElement.style.display="none",uC.unbind(t.domElement,"webkitTransitionEnd",e),uC.unbind(t.domElement,"transitionend",e),uC.unbind(t.domElement,"oTransitionEnd",e)};uC.bind(this.domElement,"webkitTransitionEnd",e),uC.bind(this.domElement,"transitionend",e),uC.bind(this.domElement,"oTransitionEnd",e),this.backgroundElement.style.opacity=0,this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)"}},{key:"layout",value:function(){this.domElement.style.left=window.innerWidth/2-uC.getWidth(this.domElement)/2+"px",this.domElement.style.top=window.innerHeight/2-uC.getHeight(this.domElement)/2+"px"}}]),t}();TC(function(t){if(t&&"undefined"!=typeof window){var e=document.createElement("style");return e.setAttribute("type","text/css"),e.innerHTML=t,document.head.appendChild(e),t}}(".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}\n"));var AC=function(){try{return!!window.localStorage}catch(t){return!1}}(),RC=void 0,PC=!0,CC=void 0,IC=!1,OC=[],LC=function t(e){var n=this,i=e||{};this.domElement=document.createElement("div"),this.__ul=document.createElement("ul"),this.domElement.appendChild(this.__ul),uC.addClass(this.domElement,"dg"),this.__folders={},this.__controllers=[],this.__rememberedObjects=[],this.__rememberedObjectIndecesToControllers=[],this.__listening=[],i=jP.defaults(i,{closeOnTop:!1,autoPlace:!0,width:t.DEFAULT_WIDTH}),i=jP.defaults(i,{resizable:i.autoPlace,hideable:i.autoPlace}),jP.isUndefined(i.load)?i.load={preset:"Default"}:i.preset&&(i.load.preset=i.preset),jP.isUndefined(i.parent)&&i.hideable&&OC.push(this),i.resizable=jP.isUndefined(i.parent)&&i.resizable,i.autoPlace&&jP.isUndefined(i.scrollable)&&(i.scrollable=!0);var r,o=AC&&"true"===localStorage.getItem(kC(this,"isLocal")),s=void 0,a=void 0;if(Object.defineProperties(this,{parent:{get:function(){return i.parent}},scrollable:{get:function(){return i.scrollable}},autoPlace:{get:function(){return i.autoPlace}},closeOnTop:{get:function(){return i.closeOnTop}},preset:{get:function(){return n.parent?n.getRoot().preset:i.load.preset},set:function(t){n.parent?n.getRoot().preset=t:i.load.preset=t,function(t){for(var e=0;e<t.__preset_select.length;e++)t.__preset_select[e].value===t.preset&&(t.__preset_select.selectedIndex=e)}(this),n.revert()}},width:{get:function(){return i.width},set:function(t){i.width=t,VC(n,t)}},name:{get:function(){return i.name},set:function(t){i.name=t,a&&(a.innerHTML=i.name)}},closed:{get:function(){return i.closed},set:function(e){i.closed=e,i.closed?uC.addClass(n.__ul,t.CLASS_CLOSED):uC.removeClass(n.__ul,t.CLASS_CLOSED),this.onResize(),n.__closeButton&&(n.__closeButton.innerHTML=e?t.TEXT_OPEN:t.TEXT_CLOSED)}},load:{get:function(){return i.load}},useLocalStorage:{get:function(){return o},set:function(t){AC&&(o=t,t?uC.bind(window,"unload",s):uC.unbind(window,"unload",s),localStorage.setItem(kC(n,"isLocal"),t))}}}),jP.isUndefined(i.parent)){if(this.closed=i.closed||!1,uC.addClass(this.domElement,t.CLASS_MAIN),uC.makeSelectable(this.domElement,!1),AC&&o){n.useLocalStorage=!0;var l=localStorage.getItem(kC(this,"gui"));l&&(i.load=JSON.parse(l))}this.__closeButton=document.createElement("div"),this.__closeButton.innerHTML=t.TEXT_CLOSED,uC.addClass(this.__closeButton,t.CLASS_CLOSE_BUTTON),i.closeOnTop?(uC.addClass(this.__closeButton,t.CLASS_CLOSE_TOP),this.domElement.insertBefore(this.__closeButton,this.domElement.childNodes[0])):(uC.addClass(this.__closeButton,t.CLASS_CLOSE_BOTTOM),this.domElement.appendChild(this.__closeButton)),uC.bind(this.__closeButton,"click",(function(){n.closed=!n.closed}))}else{void 0===i.closed&&(i.closed=!0);var u=document.createTextNode(i.name);uC.addClass(u,"controller-name"),a=NC(n,u);uC.addClass(this.__ul,t.CLASS_CLOSED),uC.addClass(a,"title"),uC.bind(a,"click",(function(t){return t.preventDefault(),n.closed=!n.closed,!1})),i.closed||(this.closed=!1)}i.autoPlace&&(jP.isUndefined(i.parent)&&(PC&&(CC=document.createElement("div"),uC.addClass(CC,"dg"),uC.addClass(CC,t.CLASS_AUTO_PLACE_CONTAINER),document.body.appendChild(CC),PC=!1),CC.appendChild(this.domElement),uC.addClass(this.domElement,t.CLASS_AUTO_PLACE)),this.parent||VC(n,i.width)),this.__resizeHandler=function(){n.onResizeDebounced()},uC.bind(window,"resize",this.__resizeHandler),uC.bind(this.__ul,"webkitTransitionEnd",this.__resizeHandler),uC.bind(this.__ul,"transitionend",this.__resizeHandler),uC.bind(this.__ul,"oTransitionEnd",this.__resizeHandler),this.onResize(),i.resizable&&jC(this),s=function(){AC&&"true"===localStorage.getItem(kC(n,"isLocal"))&&localStorage.setItem(kC(n,"gui"),JSON.stringify(n.getSaveObject()))},this.saveToLocalStorageIfPossible=s,i.parent||((r=n.getRoot()).width+=1,jP.defer((function(){r.width-=1})))};function NC(t,e,n){var i=document.createElement("li");return e&&i.appendChild(e),n?t.__ul.insertBefore(i,n):t.__ul.appendChild(i),t.onResize(),i}function DC(t){uC.unbind(window,"resize",t.__resizeHandler),t.saveToLocalStorageIfPossible&&uC.unbind(window,"unload",t.saveToLocalStorageIfPossible)}function FC(t,e){var n=t.__preset_select[t.__preset_select.selectedIndex];n.innerHTML=e?n.value+"*":n.value}function BC(t,e){var n=t.getRoot(),i=n.__rememberedObjects.indexOf(e.object);if(-1!==i){var r=n.__rememberedObjectIndecesToControllers[i];if(void 0===r&&(r={},n.__rememberedObjectIndecesToControllers[i]=r),r[e.property]=e,n.load&&n.load.remembered){var o=n.load.remembered,s=void 0;if(o[t.preset])s=o[t.preset];else{if(!o.Default)return;s=o.Default}if(s[i]&&void 0!==s[i][e.property]){var a=s[i][e.property];e.initialValue=a,e.setValue(a)}}}}function UC(t,e,n,i){if(void 0===e[n])throw new Error('Object "'+e+'" has no property "'+n+'"');var r=void 0;if(i.color)r=new yC(e,n);else{var o=[e,n].concat(i.factoryArgs);r=SC.apply(t,o)}i.before instanceof oC&&(i.before=i.before.__li),BC(t,r),uC.addClass(r.domElement,"c");var s=document.createElement("span");uC.addClass(s,"property-name"),s.innerHTML=r.property;var a=document.createElement("div");a.appendChild(s),a.appendChild(r.domElement);var l=NC(t,a,i.before);return uC.addClass(l,LC.CLASS_CONTROLLER_ROW),r instanceof yC?uC.addClass(l,"color"):uC.addClass(l,JP(r.getValue())),function(t,e,n){if(n.__li=e,n.__gui=t,jP.extend(n,{options:function(e){if(arguments.length>1){var i=n.__li.nextElementSibling;return n.remove(),UC(t,n.object,n.property,{before:i,factoryArgs:[jP.toArray(arguments)]})}if(jP.isArray(e)||jP.isObject(e)){var r=n.__li.nextElementSibling;return n.remove(),UC(t,n.object,n.property,{before:r,factoryArgs:[e]})}},name:function(t){return n.__li.firstElementChild.firstElementChild.innerHTML=t,n},listen:function(){return n.__gui.listen(n),n},remove:function(){return n.__gui.remove(n),n}}),n instanceof vC){var i=new mC(n.object,n.property,{min:n.__min,max:n.__max,step:n.__step});jP.each(["updateDisplay","onChange","onFinishChange","step","min","max"],(function(t){var e=n[t],r=i[t];n[t]=i[t]=function(){var t=Array.prototype.slice.call(arguments);return r.apply(i,t),e.apply(n,t)}})),uC.addClass(e,"has-slider"),n.domElement.insertBefore(i.domElement,n.domElement.firstElementChild)}else if(n instanceof mC){var r=function(e){if(jP.isNumber(n.__min)&&jP.isNumber(n.__max)){var i=n.__li.firstElementChild.firstElementChild.innerHTML,r=n.__gui.__listening.indexOf(n)>-1;n.remove();var o=UC(t,n.object,n.property,{before:n.__li.nextElementSibling,factoryArgs:[n.__min,n.__max,n.__step]});return o.name(i),r&&o.listen(),o}return e};n.min=jP.compose(r,n.min),n.max=jP.compose(r,n.max)}else n instanceof hC?(uC.bind(e,"click",(function(){uC.fakeEvent(n.__checkbox,"click")})),uC.bind(n.__checkbox,"click",(function(t){t.stopPropagation()}))):n instanceof _C?(uC.bind(e,"click",(function(){uC.fakeEvent(n.__button,"click")})),uC.bind(e,"mouseover",(function(){uC.addClass(n.__button,"hover")})),uC.bind(e,"mouseout",(function(){uC.removeClass(n.__button,"hover")}))):n instanceof yC&&(uC.addClass(e,"color"),n.updateDisplay=jP.compose((function(t){return e.style.borderLeftColor=n.__color.toString(),t}),n.updateDisplay),n.updateDisplay());n.setValue=jP.compose((function(e){return t.getRoot().__preset_select&&n.isModified()&&FC(t.getRoot(),!0),e}),n.setValue)}(t,l,r),t.__controllers.push(r),r}function kC(t,e){return document.location.href+"."+e}function GC(t,e,n){var i=document.createElement("option");i.innerHTML=e,i.value=e,t.__preset_select.appendChild(i),n&&(t.__preset_select.selectedIndex=t.__preset_select.length-1)}function HC(t,e){e.style.display=t.useLocalStorage?"block":"none"}function zC(t){var e=t.__save_row=document.createElement("li");uC.addClass(t.domElement,"has-save"),t.__ul.insertBefore(e,t.__ul.firstChild),uC.addClass(e,"save-row");var n=document.createElement("span");n.innerHTML=" ",uC.addClass(n,"button gears");var i=document.createElement("span");i.innerHTML="Save",uC.addClass(i,"button"),uC.addClass(i,"save");var r=document.createElement("span");r.innerHTML="New",uC.addClass(r,"button"),uC.addClass(r,"save-as");var o=document.createElement("span");o.innerHTML="Revert",uC.addClass(o,"button"),uC.addClass(o,"revert");var s=t.__preset_select=document.createElement("select");if(t.load&&t.load.remembered?jP.each(t.load.remembered,(function(e,n){GC(t,n,n===t.preset)})):GC(t,"Default",!1),uC.bind(s,"change",(function(){for(var e=0;e<t.__preset_select.length;e++)t.__preset_select[e].innerHTML=t.__preset_select[e].value;t.preset=this.value})),e.appendChild(s),e.appendChild(n),e.appendChild(i),e.appendChild(r),e.appendChild(o),AC){var a=document.getElementById("dg-local-explain"),l=document.getElementById("dg-local-storage");document.getElementById("dg-save-locally").style.display="block","true"===localStorage.getItem(kC(0,"isLocal"))&&l.setAttribute("checked","checked"),HC(t,a),uC.bind(l,"change",(function(){t.useLocalStorage=!t.useLocalStorage,HC(t,a)}))}var u=document.getElementById("dg-new-constructor");uC.bind(u,"keydown",(function(t){!t.metaKey||67!==t.which&&67!==t.keyCode||RC.hide()})),uC.bind(n,"click",(function(){u.innerHTML=JSON.stringify(t.getSaveObject(),void 0,2),RC.show(),u.focus(),u.select()})),uC.bind(i,"click",(function(){t.save()})),uC.bind(r,"click",(function(){var e=prompt("Enter a new preset name.");e&&t.saveAs(e)})),uC.bind(o,"click",(function(){t.revert()}))}function jC(t){var e=void 0;function n(n){return n.preventDefault(),t.width+=e-n.clientX,t.onResize(),e=n.clientX,!1}function i(){uC.removeClass(t.__closeButton,LC.CLASS_DRAG),uC.unbind(window,"mousemove",n),uC.unbind(window,"mouseup",i)}function r(r){return r.preventDefault(),e=r.clientX,uC.addClass(t.__closeButton,LC.CLASS_DRAG),uC.bind(window,"mousemove",n),uC.bind(window,"mouseup",i),!1}t.__resize_handle=document.createElement("div"),jP.extend(t.__resize_handle.style,{width:"6px",marginLeft:"-3px",height:"200px",cursor:"ew-resize",position:"absolute"}),uC.bind(t.__resize_handle,"mousedown",r),uC.bind(t.__closeButton,"mousedown",r),t.domElement.insertBefore(t.__resize_handle,t.domElement.firstElementChild)}function VC(t,e){t.domElement.style.width=e+"px",t.__save_row&&t.autoPlace&&(t.__save_row.style.width=e+"px"),t.__closeButton&&(t.__closeButton.style.width=e+"px")}function WC(t,e){var n={};return jP.each(t.__rememberedObjects,(function(i,r){var o={},s=t.__rememberedObjectIndecesToControllers[r];jP.each(s,(function(t,n){o[n]=e?t.initialValue:t.getValue()})),n[r]=o})),n}LC.toggleHide=function(){IC=!IC,jP.each(OC,(function(t){t.domElement.style.display=IC?"none":""}))},LC.CLASS_AUTO_PLACE="a",LC.CLASS_AUTO_PLACE_CONTAINER="ac",LC.CLASS_MAIN="main",LC.CLASS_CONTROLLER_ROW="cr",LC.CLASS_TOO_TALL="taller-than-window",LC.CLASS_CLOSED="closed",LC.CLASS_CLOSE_BUTTON="close-button",LC.CLASS_CLOSE_TOP="close-top",LC.CLASS_CLOSE_BOTTOM="close-bottom",LC.CLASS_DRAG="drag",LC.DEFAULT_WIDTH=245,LC.TEXT_CLOSED="Close Controls",LC.TEXT_OPEN="Open Controls",LC._keydownHandler=function(t){"text"===document.activeElement.type||72!==t.which&&72!==t.keyCode||LC.toggleHide()},uC.bind(window,"keydown",LC._keydownHandler,!1),jP.extend(LC.prototype,{add:function(t,e){return UC(this,t,e,{factoryArgs:Array.prototype.slice.call(arguments,2)})},addColor:function(t,e){return UC(this,t,e,{color:!0})},remove:function(t){this.__ul.removeChild(t.__li),this.__controllers.splice(this.__controllers.indexOf(t),1);var e=this;jP.defer((function(){e.onResize()}))},destroy:function(){if(this.parent)throw new Error("Only the root GUI should be removed with .destroy(). For subfolders, use gui.removeFolder(folder) instead.");this.autoPlace&&CC.removeChild(this.domElement);var t=this;jP.each(this.__folders,(function(e){t.removeFolder(e)})),uC.unbind(window,"keydown",LC._keydownHandler,!1),DC(this)},addFolder:function(t){if(void 0!==this.__folders[t])throw new Error('You already have a folder in this GUI by the name "'+t+'"');var e={name:t,parent:this};e.autoPlace=this.autoPlace,this.load&&this.load.folders&&this.load.folders[t]&&(e.closed=this.load.folders[t].closed,e.load=this.load.folders[t]);var n=new LC(e);this.__folders[t]=n;var i=NC(this,n.domElement);return uC.addClass(i,"folder"),n},removeFolder:function(t){this.__ul.removeChild(t.domElement.parentElement),delete this.__folders[t.name],this.load&&this.load.folders&&this.load.folders[t.name]&&delete this.load.folders[t.name],DC(t);var e=this;jP.each(t.__folders,(function(e){t.removeFolder(e)})),jP.defer((function(){e.onResize()}))},open:function(){this.closed=!1},close:function(){this.closed=!0},hide:function(){this.domElement.style.display="none"},show:function(){this.domElement.style.display=""},onResize:function(){var t=this.getRoot();if(t.scrollable){var e=uC.getOffset(t.__ul).top,n=0;jP.each(t.__ul.childNodes,(function(e){t.autoPlace&&e===t.__save_row||(n+=uC.getHeight(e))})),window.innerHeight-e-20<n?(uC.addClass(t.domElement,LC.CLASS_TOO_TALL),t.__ul.style.height=window.innerHeight-e-20+"px"):(uC.removeClass(t.domElement,LC.CLASS_TOO_TALL),t.__ul.style.height="auto")}t.__resize_handle&&jP.defer((function(){t.__resize_handle.style.height=t.__ul.offsetHeight+"px"})),t.__closeButton&&(t.__closeButton.style.width=t.width+"px")},onResizeDebounced:jP.debounce((function(){this.onResize()}),50),remember:function(){if(jP.isUndefined(RC)&&((RC=new MC).domElement.innerHTML=wC),this.parent)throw new Error("You can only call remember on a top level GUI.");var t=this;jP.each(Array.prototype.slice.call(arguments),(function(e){0===t.__rememberedObjects.length&&zC(t),-1===t.__rememberedObjects.indexOf(e)&&t.__rememberedObjects.push(e)})),this.autoPlace&&VC(this,this.width)},getRoot:function(){for(var t=this;t.parent;)t=t.parent;return t},getSaveObject:function(){var t=this.load;return t.closed=this.closed,this.__rememberedObjects.length>0&&(t.preset=this.preset,t.remembered||(t.remembered={}),t.remembered[this.preset]=WC(this)),t.folders={},jP.each(this.__folders,(function(e,n){t.folders[n]=e.getSaveObject()})),t},save:function(){this.load.remembered||(this.load.remembered={}),this.load.remembered[this.preset]=WC(this),FC(this,!1),this.saveToLocalStorageIfPossible()},saveAs:function(t){this.load.remembered||(this.load.remembered={},this.load.remembered.Default=WC(this,!0)),this.load.remembered[t]=WC(this),this.preset=t,GC(this,t,!0),this.saveToLocalStorageIfPossible()},revert:function(t){jP.each(this.__controllers,(function(e){this.getRoot().load.remembered?BC(t||this.getRoot(),e):e.setValue(e.initialValue),e.__onFinishChange&&e.__onFinishChange.call(e,e.getValue())}),this),jP.each(this.__folders,(function(t){t.revert(t)})),t||FC(this.getRoot(),!1)},listen:function(t){var e=0===this.__listening.length;this.__listening.push(t),e&&function t(e){0!==e.length&&EC.call(window,(function(){t(e)}));jP.each(e,(function(t){t.updateDisplay()}))}(this.__listening)},updateDisplay:function(){jP.each(this.__controllers,(function(t){t.updateDisplay()})),jP.each(this.__folders,(function(t){t.updateDisplay()}))}});var XC=LC,qC=function(){function t(t){this.runTime={fps:0,resolution:""},this.target=t.target,this.data=t.params,this.player=t.player,this.gui=this.createControllerGUI(),this.createStats(),this.addEventListener()}return t.prototype.createStats=function(){var t=this;this.stateId=setInterval((function(){t.player.view&&(t.controller.runTimeFps.setValue(t.player.fps.value),t.controller.drawCall.setValue(t.player.runtime.drawCall),t.controller.runTimeResolution.setValue(t.player.view.width+"*"+t.player.view.height))}),500)},t.prototype.createControllerGUI=function(){var t,e,n,i,r,o=new XC({autoPlace:!0,closed:!0});o.domElement.style.opacity=".6",o.domElement.style.transformOrigin="100% 0",o.domElement.style.transform="scale(1)",this.target.appendChild(o.domElement),o.domElement.style.position="absolute",o.domElement.style.right="0",o.domElement.style.top="0",o.domElement.style.zIndex="2";var s=o.add({FPS:0},"FPS",0),a=o.add({drawCall:0},"drawCall",0),l=o.add({"分辨率":""},"分辨率",""),u=o.add({"额外计算":0},"额外计算",0,200),h=o.addFolder("renderOptions");return this.controller={runTimeResolution:l,runTimeFps:s,drawCall:a,moreCalculation:u,minFPS:h.add({"最低fps":null!==(t=this.data.minFPS)&&void 0!==t?t:40},"最低fps",0,60),maxFPS:h.add({"最高fps":null!==(e=this.data.maxFPS)&&void 0!==e?e:50},"最高fps",0,60),resolution:h.add({"目标分辨倍率":null!==(n=this.data.resolution)&&void 0!==n?n:window.devicePixelRatio},"目标分辨倍率",.5,6),autoResolution:h.add({"自动分辨率":null!==(i=this.data.autoResolution)&&void 0!==i&&i},"自动分辨率",!0),autoFps:h.add({"自动fps":null===(r=this.data.autoFPS)||void 0===r||r},"自动fps",!0),transactionBgColor:h.addColor({"切页背景色":this.data.transactionBgColor},"切页背景色")},this.controller.runTimeFps.disabled=!0,this.controller.runTimeResolution.disabled=!0,o},t.prototype.addEventListener=function(){var t,e=this;this.controller.autoFps.onChange((function(t){e.data.autoFPS=t,e.player.updateConfig(e.data)})),this.controller.maxFPS.onChange((function(t){e.data.maxFPS=t,e.player.updateConfig(e.data)})),this.controller.minFPS.onChange((function(t){e.data.minFPS=t,e.player.updateConfig(e.data)})),this.controller.autoResolution.onChange((function(t){e.data.autoResolution=t,e.player.updateConfig(e.data)})),this.controller.resolution.onChange((function(t){e.data.resolution=t,e.player.updateConfig(e.data)})),this.controller.transactionBgColor.onChange((function(t){e.data.transactionBgColor=t,e.player.updateConfig(e.data)})),this.controller.moreCalculation.onChange((function(n){t&&e.player.app.ticker.remove(t),n>0&&(t=function(){for(var t="";t.length<8e3*n;)t+=Math.random().toString(32).substr(2);dM()(t)},e.player.app.ticker.add(t))}))},t.prototype.destroy=function(){try{window.clearInterval(this.stateId),this.target.removeChild(this.gui.domElement),this.gui.destroy()}catch(t){}},t}(),YC=function(){function t(t){var e=this;this.tasks=[],this.isDestroy=!1,this.schedule=function(){var t=e.tasks[0];t&&!e.isDestroy?e.fn(t).then((function(){e.tasks.splice(0,1),window.requestAnimationFrame(e.schedule)})):window.requestAnimationFrame(e.schedule)},this.fn=t,this.schedule()}return t.prototype.destroy=function(){this.isDestroy=!0},t.prototype.addTask=function(t){this.tasks.push(t)},t}(),ZC=function(){function t(t){this.autoUnlock=Object.create(null),this.locks=Object.create(null),this.available=!1,this.available=t}return t.prototype.addLock=function(t,e){var n=this;this.available&&(this.locks[t]=e,this.autoUnlock[t]=window.setTimeout((function(){delete n.locks[t]}),3e3))},t.prototype.unlock=function(t,e){this.available&&e&&this.locks[t]&&this.locks[t]===e&&(window.clearTimeout(this.autoUnlock[t]),delete this.locks[t])},t.prototype.isLocked=function(t){return!!this.available&&!!this.locks[t]},t}(),JC=function(){function t(){var t=this;this.tasks=[],this.isDestroy=!1,this.schedule=function(){var e=t.tasks.shift();e&&!t.isDestroy?(e.status="running",e.fn.apply(null).then((function(){window.setTimeout(t.schedule)})).catch((function(){window.setTimeout(t.schedule)}))):window.setTimeout(t.schedule)},this.schedule()}return t.prototype.getRunningTask=function(){return this.tasks[0]&&"running"===this.tasks[0].status?this.tasks[0]:null},t.prototype.addTask=function(t,e){var n={type:t,status:"wait",fn:e},i=this.getRunningTask();i&&t===i.type||(this.tasks=this.tasks.filter((function(e){return e.type!==t})),this.tasks.push(n))},t.prototype.destroy=function(){this.isDestroy=!0},t}(),KC=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$C=function(){return($C=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},QC=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))},tI=function(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};window.__slide_local_logger__||(window.__slide_local_logger__=o.createInstance({name:"_slide_local_log_",driver:o.INDEXEDDB,version:1}));var eI=window.ResizeObserver||DP,nI=function(t){return new Promise((function(e){return setTimeout(e,t)}))};function iI(t,e){return QC(this,void 0,void 0,(function(){var n;return tI(this,(function(i){switch(i.label){case 0:n=Date.now(),i.label=1;case 1:return!t()&&Date.now()-n<e?[4,nI(50)]:[3,3];case 2:return i.sent(),[3,1];case 3:return[2]}}))}))}var rI={syncDispatch:"syncDispatch",syncReceive:"syncReceive",syncEventLag:"syncEventLag",renderStart:"renderStart",renderEnd:"renderEnd",renderError:"renderError",slideChange:"slideChange",mainSeqStepStart:"mainSeqStepStart",mainSeqStepEnd:"mainSeqStepEnd",animateStart:"animateStart",animateEnd:"animateEnd",stateChange:"stateChange"},oI={taskId:"",url:"",currentSlideIndex:-1,mainSeqStep:-1,mainSeqState:null,mediaState:Object.create(null),interactiveSeqState:Object.create(null)},sI="";try{sI="0.5.4"}catch(t){sI="dev"}var aI=function(t){function e(n){var i=t.call(this)||this;return i.iosResetCache=[],i.needClearCacheImage=!1,i.version=sI,i.__slideState=Object(l.cloneDeep)(oI),i.userInputTime=0,i.isSyncingSlideState=!1,i.frozenTaskManager=new JC,i.randomId=Math.random().toString(32).substr(2),i.resize=!1,i.isAnimating=!1,i.renderingTaskManager=new kP,i.isLoading=!1,i.interactive=!0,i.renderingIndex=0,i.frameWidth=1,i.frameHeight=1,i.frame=document.createElement("div"),i.medianController=document.createElement("div"),i.frameResizeObserver=new eI((function(){return i.frameResizeHandler()})),i.timestamp=function(){return Date.now()},i.mode="local",i.enableGlobalClick=!1,i.lastEmitedState=null,i.playerController=null,i.isInitResized=!1,i.cacheImage=document.createElement("img"),i.isTouchStart=!1,i.touchStartId=void 0,i.taskId="",i.designWidth=0,i.designHeight=0,i._slideCount=0,i._dispatchIncrId=0,i._receiveIncrId=0,i.userInputHandle=function(){i.userInputTime=Date.now()},i.handleViewClick=function(){setTimeout((function(){var t=Date.now();Math.abs(t-i.userInputTime)>500&&i.enableGlobalClick&&i.nextStep()}))},i.handleViewTouchStart=function(){window.clearTimeout(i.touchStartId),i.isTouchStart=!0,i.touchStartId=setTimeout((function(){i.isTouchStart=!1}),350)},i.handleViewTouchEnd=function(){i.isTouchStart&&(i.isTouchStart=!1,i.handleViewClick())},i.handleSlideRef=function(){console.log(i),window.__slide=i},i.receiveSyncHandler=function(t){return QC(i,void 0,void 0,(function(){var e,n,i,r,o=this;return tI(this,(function(s){switch(s.label){case 0:return Object(l.isNumber)(t.incrId)&&(t.incrId&&t.incrId-this._receiveIncrId!=1&&this.emit(rI.syncEventLag),this._receiveIncrId=t.incrId||0),this.logger.info("sync receive "+JSON.stringify(t),this.taskId),"nextStep"!==t.type?[3,1]:(this.mainSeqStep!==t.next-1&&this.mainSeqStep+1!==this.mainSeqLength&&this.player?(this.setMainSeqStep(t.next,"start"),this.player.nextTick((function(){o.doNextStep(!0)}))):this.doNextStep(!0),[3,6]);case 1:return"prevStep"!==t.type?[3,2]:(0===this.mainSeqStep&&"idle"===this.mainSeqState||this.mainSeqStep===t.next+1||this.mainSeqStep+1===this.mainSeqLength?this.doPrevStep(!0):(this.setMainSeqStep(t.next+1,"start"),null===(e=this.player)||void 0===e||e.nextTick((function(){o.doPrevStep(!0)}))),[3,6]);case 2:return"interactiveAnim"!==t.type?[3,3]:(this.player?this.player.applyInteractiveAction(t.action):this.__slideState.interactiveSeqState[t.seqId].step+=1,[3,6]);case 3:return"renderSlide"!==t.type?[3,5]:[4,this.doRenderSlide(t.index,t.isForward)];case 4:return s.sent(),[3,6];case 5:"mediaPlay"===t.type?(null===(n=this.player)||void 0===n||n.setMediaState(t.id,!0),this.__slideState.mediaState[t.id]=t.state):"mediaPause"===t.type?(null===(i=this.player)||void 0===i||i.setMediaState(t.id,!1),this.__slideState.mediaState[t.id]=t.state):"mediaSeek"===t.type&&(null===(r=this.player)||void 0===r||r.setMediaCurrentTime(t.id,t.time),this.__slideState.mediaState[t.id]=t.state),s.label=6;case 6:return[2]}}))}))},i.handlePrevSlide=function(t){return void 0===t&&(t=!1),QC(i,void 0,void 0,(function(){var e,n;return tI(this,(function(i){switch(i.label){case 0:return this.player?[4,null===(n=this.player)||void 0===n?void 0:n.createSnapshotForNextSlide(!0)]:[2];case 1:return i.sent(),(e=this.player.prevSlideIndex)>=1&&(this.config.navigatorDelegate?this.config.navigatorDelegate.gotoPage(e):t?this.doRenderSlide(e,!1):this.renderSlide(e,!1)),[2]}}))}))},i.handleNextSlide=function(t){return void 0===t&&(t=!1),QC(i,void 0,void 0,(function(){var e,n;return tI(this,(function(i){switch(i.label){case 0:return this.player?[4,null===(n=this.player)||void 0===n?void 0:n.createSnapshotForNextSlide(!1)]:[2];case 1:return i.sent(),(e=this.player.nextSlideIndex)<=this.slideCount&&(this.config.navigatorDelegate?this.config.navigatorDelegate.gotoPage(e):t?this.doRenderSlide(e,!0):this.renderSlide(e,!0)),[2]}}))}))},i.handleGotoSlide=function(t){if(t<=i.slideCount&&t>=1){var e=i.slideState.currentSlideIndex<=t;i.renderSlide(t,e)}else-1===t&&i.renderSlide(i.slideCount,!0)},n.timestamp&&(i.timestamp=n.timestamp),n.rtcAudio&&(ZR.RtcAudioClazz=n.rtcAudio),i.logger={info:function(t,r){var o,s;(null===(o=n.logger)||void 0===o?void 0:o.info)&&(e._tempLog+="INFO - "+(new Date).toISOString()+" - {"+i.randomId+"}["+r+"] "+t+"\n\n",null===(s=n.logger)||void 0===s||s.info("["+r+"] "+t))},warn:function(t,r){var o,s;(null===(o=n.logger)||void 0===o?void 0:o.warn)&&(e._tempLog+="WARN - "+(new Date).toISOString()+" - {"+i.randomId+"}["+r+"] "+t+"\n\n",null===(s=n.logger)||void 0===s||s.warn("["+r+"] "+t))},error:function(t,r){var o,s;(null===(o=n.logger)||void 0===o?void 0:o.error)&&(e._tempLog+="ERROR - "+(new Date).toISOString()+" - {"+i.randomId+"}["+r+"] "+t+"\n\n",null===(s=n.logger)||void 0===s||s.error("["+r+"] "+t))}},i.config=n,i.syncQueue=new YC(i.receiveSyncHandler),i.mode=n.mode,i.lock=new ZC("interactive"===i.mode),i.anchor=n.anchor,i.enableGlobalClick=!Object(l.isUndefined)(n.enableGlobalClick)&&n.enableGlobalClick,i.resize=n.resize||!1,i.interactive=n.interactive,i.cacheImage.style.position="absolute",i.cacheImage.style.zIndex="100",i.frame.style.cssText=n.fixedFrameSize?"width:"+n.fixedFrameSize.width+"px;height:"+n.fixedFrameSize.height+"px;":"width:100%;height:100%",i.frame.style.cssText+="display:flex;justify-content:center;align-items:center;visibility:hidden;position:relative;z-index:1;",n.fixedFrameSize&&(i.frameWidth=n.fixedFrameSize.width,i.frameHeight=n.fixedFrameSize.height),i.setMedianControllerAttribute(),i.frame.appendChild(i.medianController),i.anchor.appendChild(i.frame),i.frameResizeObserver.observe(i.frame),i.on(rI.syncReceive,(function(t){i.lock.unlock(t.type,t.uuid),i.syncQueue.addTask(t)})),i.renderingTaskManager.eventHub.on("task-error",(function(t){var e=t.error,n=t.task,r=qE.transform(e);r.errorType===VE.RuntimeWarn?i.logger.warn(r.message,i.taskId):i.logger.error(r.message,i.taskId),i.isLoading=!1,i.emit(rI.renderError,{error:r,index:n.slideIndex})})),window.addEventListener("__slide_ref__",i.handleSlideRef),i.resizeView=Object(l.debounce)(i.resizeView.bind(i),50),i.player=i.initPlayer(n),(null==n?void 0:n.controller)&&i.createController(),i.player.view&&i.frame.appendChild(i.player.view),i.handleViewClick=Object(l.debounce)(i.handleViewClick,300),i.player.errorChannel.on("error",(function(t,e){var n=qE.transform(t);n.errorType===VE.RuntimeWarn?i.logger.warn(n.message,i.taskId):i.logger.error(n.message,i.taskId),i.isLoading=!1,e===i.renderingIndex&&i.emit(rI.renderError,{error:t,index:e})})),i.logger.info("new slide",""),i}return KC(e,t),e.flushLog=function(){return QC(this,void 0,void 0,(function(){return tI(this,(function(t){switch(t.label){case 0:return e._tempLog.length>0?[4,e.logStore.setItem("run_time_log_"+e._tempLogIndex,e._tempLog)]:[3,2];case 1:t.sent(),e._tempLog="",e._tempLogIndex+=1,t.label=2;case 2:return[2]}}))}))},Object.defineProperty(e.prototype,"dispatchIncrId",{get:function(){return this._dispatchIncrId++},enumerable:!1,configurable:!0}),e.prototype.initPlayer=function(t){var e,n,i,r=this,o=new ZR({mode:this.mode,useLocalCache:!!Object(l.isUndefined)(this.config.useLocalCache)||this.config.useLocalCache,logger:this.logger,resourceTimeout:Object(l.isUndefined)(this.config.resourceTimeout)?15e3:this.config.resourceTimeout,loadDelegate:this.config.loaderDelegate});return o.setInteractive(this.interactive),o.updateConfig(t.renderOptions||{}),o.on(YR.renderStart,(function(t){r.isLoading=!0,r.emit(rI.renderStart,t)})),o.on(YR.renderEnd,(function(t){r.isLoading=!1,r.player&&(r.designHeight=r.player.designHeight,r.designWidth=r.player.designWidth,r.cacheImage.style.width=r.player.designWidth+"px",r.cacheImage.style.height=r.player.designHeight+"px",r._slideCount=r.player.slideCount),r.emit(rI.renderEnd,t)})),o.on(YR.slideChange,(function(t){r.__slideState.currentSlideIndex=t,r.emitStateChange(),r.emit(rI.slideChange,t)})),o.on(YR.mainSeqStateChange,(function(t){r.__slideState.mainSeqState=t,r.emitStateChange()})),o.on(YR.mainSeqStepChange,(function(t){r.__slideState.mainSeqStep=t,r.emitStateChange()})),o.on(YR.interactiveSeqStateChange,(function(t){var e=t.id,n=t.state;r.__slideState.interactiveSeqState[e]=n,r.emitStateChange()})),o.on(YR.animateStart,(function(){!0!==r.isAnimating&&(r.isAnimating=!0,r.emit(rI.animateStart))})),o.on(YR.animateEnd,(function(){!1!==r.isAnimating&&(r.isAnimating=!1,r.emit(rI.animateEnd))})),o.on(YR.interactiveSeqAction,(function(t){var e=t.action,n=t.seqId;r.emitSyncDispatch({slideIndex:r.__slideState.currentSlideIndex,type:"interactiveAnim",action:e,seqId:n}),r.emitStateChange()})),o.on(YR.mainSeqStepStart,(function(t){r.emit(rI.mainSeqStepStart,t)})),o.on(YR.mainSeqStepEnd,(function(t){r.emit(rI.mainSeqStepEnd,t)})),o.on(YR.mediaPlay,(function(t){var e={type:"play",time:r.timestamp()-1e3*t.time};r.__slideState.mediaState[t.id]=e,r.emitSyncDispatch({slideIndex:r.__slideState.currentSlideIndex,type:"mediaPlay",id:t.id,state:e}),r.emitStateChange()})),o.on(YR.mediaPause,(function(t){var e={type:"pause",time:t.time};r.__slideState.mediaState[t.id]=e,r.emitSyncDispatch({slideIndex:r.__slideState.currentSlideIndex,type:"mediaPause",id:t.id,state:e}),r.emitStateChange()})),o.on(YR.mediaSeek,(function(t){var e={type:"pause",time:0};t.isPlaying?(e.type="play",r.__slideState.mediaState[t.id]?e.time=r.__slideState.mediaState[t.id].time-1e3*t.time:e.time=r.timestamp()-1e3*t.time,r.__slideState.mediaState[t.id]=e):(e.type="pause",e.time=t.time,r.__slideState.mediaState[t.id]=e),r.emitSyncDispatch({slideIndex:r.__slideState.currentSlideIndex,type:"mediaSeek",id:t.id,time:t.time,state:e}),r.emitStateChange()})),o.on(YR.requestPrevSlide,(function(t){r.handlePrevSlide(t)})),o.on(YR.requestNextSlide,(function(t){r.handleNextSlide(t)})),o.on(YR.requestGotoSlide,(function(t){r.config.navigatorDelegate?r.config.navigatorDelegate.gotoPage(t):r.handleGotoSlide(t)})),null===(e=o.view)||void 0===e||e.addEventListener("touchend",this.handleViewTouchEnd),null===(n=o.view)||void 0===n||n.addEventListener("touchstart",this.handleViewTouchStart),null===(i=o.view)||void 0===i||i.addEventListener("click",this.handleViewClick),o.on(YR.userInput,this.userInputHandle),o},e.prototype.createController=function(){this.player&&(this.playerController=new qC({player:this.player,params:this.player.config||{},target:this.frame}))},e.prototype.setMedianControllerAttribute=function(){this.medianController.className="median-container",this.medianController.style.position="absolute",this.medianController.style.left="0",this.medianController.style.top="0",this.medianController.style.zIndex="2"},e.prototype.frameResizeHandler=function(){if(!this.config.fixedFrameSize){var t=this.frame.getBoundingClientRect(),e=t.width,n=t.height;this.frameWidth=e,this.frameHeight=n,this.resizeView()}},e.prototype.updateFixedFrameSize=function(t,e,n){this.config.fixedFrameSize&&(this.frameWidth=t,this.frameHeight=e,this.frame.style.width=t+"px",this.frame.style.height=e+"px",this.resizeView(n))},e.prototype.resizeView=function(t){var e,n,i=this,r=this.width,o=this.height;if(r>0&&o>0){var s=this.frameWidth/r,a=s*o;a>this.frameHeight&&(s*=this.frameHeight/a),null===(e=this.player)||void 0===e||e.scaleView(s,this.resize,t),this.cacheImage.style.transform="scale("+s+")",this.medianController.style.transform="scale("+s+")",this.medianController.style.top=(this.frameHeight-o*s)/2+"px",this.medianController.setAttribute("data-scale",s.toString()),this.isInitResized||(this.isInitResized=!0,null===(n=this.player)||void 0===n||n.clock.setTimeout((function(){i.frame.style.visibility="visible"}),32))}},e.prototype.setSlideState=function(t){var e,n,i;return QC(this,void 0,void 0,(function(){var r,o=this;return tI(this,(function(s){switch(s.label){case 0:return this.isSyncingSlideState=!0,this.logger.info("stateChange receive "+JSON.stringify(t),this.taskId),t.taskId&&t.taskId!==this.__slideState.taskId&&(this.__slideState.taskId=t.taskId,null===(e=this.player)||void 0===e||e.setResourceData(t.taskId,this.__slideState.url)),t.url&&t.url!==this.__slideState.url&&(this.__slideState.url=t.url,null===(n=this.player)||void 0===n||n.setResourceData(this.__slideState.taskId,t.url)),Number.isInteger(t.currentSlideIndex)&&t.currentSlideIndex!==this.__slideState.currentSlideIndex?(this.__slideState.currentSlideIndex=t.currentSlideIndex,[4,this.doRenderSlide(t.currentSlideIndex)]):[3,2];case 1:s.sent(),s.label=2;case 2:return[4,null===(i=this.player)||void 0===i?void 0:i.clock.waitUntil((function(){var e,n;return(null===(e=o.player)||void 0===e?void 0:e.currentIndex)===t.currentSlideIndex&&(null===(n=o.player)||void 0===n?void 0:n.currentStage)}),3e3)];case 3:return s.sent(),r=!1,Number.isInteger(t.mainSeqStep)&&t.mainSeqStep!==this.__slideState.mainSeqStep&&(r=!0,this.__slideState.mainSeqStep=t.mainSeqStep),t.mainSeqState&&t.mainSeqState!==this.__slideState.mainSeqState&&(r=!0,this.__slideState.mainSeqState=t.mainSeqState),r&&this.setMainSeqStep(this.__slideState.mainSeqStep,"idle"===this.__slideState.mainSeqState?"start":"end"),t.mediaState&&(this.initMedia(t),this.__slideState.mediaState=t.mediaState),t.interactiveSeqState&&(this.initInteractiveSeq(t),this.__slideState.interactiveSeqState=t.interactiveSeqState),this.isSyncingSlideState=!1,[2]}}))}))},e.prototype.initInteractiveSeq=function(t){var e;for(var n in t.interactiveSeqState){var i=t.interactiveSeqState[n];null===(e=this.player)||void 0===e||e.setInteractiveSeqState(n,i.step,"end"===i.state?"end":"start")}},e.prototype.initMedia=function(t){var e,n,i=this,r=function(r){var s=t.mediaState[r],a=o.__slideState.mediaState[r];if(a&&s.type===a.type&&s.time===a.time)return"continue";"play"===s.type?null===(e=o.player)||void 0===e||e.setMediaState(r,!0).then((function(){var t,e=i.timestamp();null===(t=i.player)||void 0===t||t.setMediaCurrentTime(r,(e-s.time)/1e3)})):null===(n=o.player)||void 0===n||n.setMediaState(r,!1).then((function(){var t;null===(t=i.player)||void 0===t||t.setMediaCurrentTime(r,s.time)}))},o=this;for(var s in t.mediaState)r(s)},Object.defineProperty(e.prototype,"slideCount",{get:function(){return this._slideCount},enumerable:!1,configurable:!0}),e.prototype.getSizeAsync=function(){return QC(this,void 0,void 0,(function(){var t;return tI(this,(function(e){switch(e.label){case 0:if(this.width>0&&this.height>0)return[2,[this.width,this.height]];e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(this.__slideState.url+"/"+this.__slideState.taskId+"/jsonOutput/slide-1.json")];case 2:return[4,e.sent().json()];case 3:return[2,[(t=e.sent()).width,t.height]];case 4:return e.sent(),[2,[0,0]];case 5:return[2]}}))}))},e.prototype.getSlideCountAsync=function(){return QC(this,void 0,void 0,(function(){return tI(this,(function(t){switch(t.label){case 0:if(this._slideCount>0)return[2,this._slideCount];t.label=1;case 1:return t.trys.push([1,4,,5]),[4,fetch(this.__slideState.url+"/"+this.__slideState.taskId+"/jsonOutput/slide-1.json")];case 2:return[4,t.sent().json()];case 3:return[2,t.sent().slideCount];case 4:return t.sent(),[2,0];case 5:return[2]}}))}))},Object.defineProperty(e.prototype,"slideState",{get:function(){return this.__slideState.mainSeqState=this.mainSeqState,this.__slideState.mainSeqStep=this.mainSeqStep,JSON.parse(JSON.stringify(this.__slideState))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mainSeqLength",{get:function(){var t;return(null===(t=this.player)||void 0===t?void 0:t.mainSeqLength())||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mainSeqStep",{get:function(){var t;return(null===(t=this.player)||void 0===t?void 0:t.mainSeqStep())||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mainSeqState",{get:function(){var t;return(null===(t=this.player)||void 0===t?void 0:t.mainSeqState())||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderOptions",{get:function(){var t;return(null===(t=this.player)||void 0===t?void 0:t.config)||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drawCall",{get:function(){var t;return(null===(t=this.player)||void 0===t?void 0:t.runtime.drawCall)||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderFps",{get:function(){var t;return(null===(t=this.player)||void 0===t?void 0:t.runtime.fps)||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"runtimeFps",{get:function(){var t;return(null===(t=this.player)||void 0===t?void 0:t.fps.value)||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"view",{get:function(){var t;return(null===(t=this.player)||void 0===t?void 0:t.view)||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.designWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.designHeight},enumerable:!1,configurable:!0}),e.prototype.updateRenderOption=function(t){this.player&&(this.player.updateConfig(t),this.renderOptions&&(this.config.renderOptions=this.renderOptions))},e.prototype.setResource=function(t,e){var n;this.taskId=t,null===(n=this.player)||void 0===n||n.setResourceData(t,e),this.__slideState.taskId=t,this.__slideState.url=e,this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"setResource",taskId:t,url:e})},e.prototype._renderSlide=function(t){var e;return QC(this,void 0,void 0,(function(){var n=this;return tI(this,(function(i){switch(i.label){case 0:return this.renderingIndex=t,this.player&&t===this.player.currentIndex?[2]:((ZR.platform.isIOS()||ZR.platform.isAndroid())&&this.iosResetCache.indexOf(t)<0&&this.iosResetCache.push(t),[4,null===(e=this.player)||void 0===e?void 0:e.renderSlide(t)]);case 1:return i.sent(),this.__slideState.currentSlideIndex=t,this.resizeView(),this.__slideState.interactiveSeqState={},this.emitStateChange(),setTimeout((function(){var t,e;if("hidden"===(null===(e=null===(t=n.player)||void 0===t?void 0:t.view)||void 0===e?void 0:e.style.visibility)&&(n.player.view.style.visibility="visible"),"hidden"===n.frame.style.visibility&&(n.frame.style.visibility="visible"),n.needClearCacheImage)try{n.frame.removeChild(n.cacheImage)}catch(t){}}),100),[2]}}))}))},e.prototype.renderSlide=function(t,e){if(void 0===e&&(e=!0),this.player){var n=Number(t);(n!==this.player.currentIndex||this.renderingTaskManager.hasStartTask())&&(n>this.slideCount&&this.slideCount>0||this.poseRenderSlide(n,e))}},e.prototype.needCreateNewPlayer=function(){var t=ZR.platform.isLowGpuMemory()?15:30;return(ZR.platform.isIOS()||ZR.platform.isAndroid())&&this.iosResetCache.length>t},e.prototype.poseRenderSlide=function(t,e){"interactive"===this.mode?this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"renderSlide",index:t,isForward:e}):"sync"===this.mode?(this.doRenderSlide(t,e),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"renderSlide",index:t,isForward:e})):this.doRenderSlide(t,e)},e.prototype.doRenderSlide=function(t,e){var n,i,r,o=this;if(void 0===e&&(e=!0),!this.player)return Promise.resolve();if(this.needCreateNewPlayer()&&(this.iosResetCache=[],this.iosNewPlayer=this.initPlayer(this.config),this.iosNewPlayer.setResourceData(this.__slideState.taskId,this.__slideState.url)),this.iosNewPlayer){var s=this.player.getSnapshot();this.cacheImage.src=s,this.frame.appendChild(this.cacheImage),this.player.destroy(),null===(n=this.playerController)||void 0===n||n.destroy(),this.player=this.iosNewPlayer,this.iosNewPlayer=void 0,(null===(i=this.config)||void 0===i?void 0:i.controller)&&this.createController(),this.needClearCacheImage=!0,(null===(r=null==this?void 0:this.player)||void 0===r?void 0:r.view)&&(this.player.view.style.visibility="hidden",this.frame.appendChild(this.player.view))}var a=Math.random().toString(32).substr(2);return this.player.isForward=e,this.renderingTaskManager.addTask((function(){return o._renderSlide(t)}),t,a),new Promise((function(t){o.renderingTaskManager.eventHub.once("task-end-"+a,t)}))},e.prototype.nextStep=function(){!this.isLoading&&this.player&&this.interactive?this.player.mainSeqHasNextStep()?"interactive"===this.mode?this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"nextStep",next:this.player.mainSeqStep()+1}):"sync"===this.mode?(this.doNextStep(),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"nextStep",next:this.player.mainSeqStep()})):this.doNextStep():this.handleNextSlide():this.logger.info("prevent nextStep. "+this.isLoading+" "+this.player+" "+this.interactive,this.taskId)},e.prototype.doNextStep=function(t){if(void 0===t&&(t=!1),this.player){this.player.nextStep(t);var e=this.player.mainSeqStep();this.__slideState.mainSeqStep=e,this.emitStateChange()}},e.prototype.prevStep=function(){!this.isLoading&&this.player&&this.interactive?this.player.mainSeqHasPrevStep()?"interactive"===this.mode?this.emitSyncDispatch({type:"prevStep",slideIndex:this.__slideState.currentSlideIndex,next:this.player.mainSeqStep()-1}):"sync"===this.mode?(this.doPrevStep(),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"prevStep",next:this.player.mainSeqStep()})):this.doPrevStep():this.handlePrevSlide():this.logger.info("prevent nextStep. "+this.isLoading+" "+this.player+" "+this.interactive,this.taskId)},e.prototype.doPrevStep=function(t){if(void 0===t&&(t=!1),this.player){this.player.prevStep(t);var e=this.player.mainSeqStep();this.__slideState.mainSeqStep=e,this.emitStateChange()}},e.prototype.isSlideStateReady=function(t){return t.taskId.length>0&&t.url.length>0&&t.currentSlideIndex>0},e.prototype.emitStateChange=function(){if("local"!==this.mode&&!this.isSyncingSlideState){var t=this.slideState;!Object(l.isEqual)(this.lastEmitedState,t)&&this.isSlideStateReady(t)&&(this.lastEmitedState=t,this.emit(rI.stateChange,t),this.logger.info("stateChange dispatch "+JSON.stringify(this.slideState),this.taskId))}},e.prototype.emitSyncDispatch=function(t){if(!this.lock.isLocked(t.type)){var e=Math.random().toString(32).substr(2);this.lock.addLock(t.type,e);var n=$C($C({},t),{uuid:e});"sync"===this.config.mode&&(n.incrId=this.dispatchIncrId),this.emit(rI.syncDispatch,n),this.logger.info("sync dispatch "+JSON.stringify(n),this.taskId)}},e.prototype.setMainSeqStep=function(t,e){var n;null===(n=this.player)||void 0===n||n.setMainSeqStep(t,e)},e.prototype.setInteractive=function(t){var e;this.interactive=t,null===(e=this.player)||void 0===e||e.setInteractive(t)},e.prototype.pause=function(){var t;null===(t=this.player)||void 0===t||t.pause()},e.prototype.resume=function(){var t;null===(t=this.player)||void 0===t||t.resume()},e.prototype._doFrozen=function(){var t;return QC(this,void 0,void 0,(function(){var e,n,i,r=this;return tI(this,(function(o){switch(o.label){case 0:return this.view&&this.player?[4,this.player.clock.waitUntil((function(){return!r.isLoading}),6e4)]:[3,2];case 1:for(n in o.sent(),e=this.player.getSnapshot()||"",this.cacheImage.src=e,this.frame.appendChild(this.cacheImage),this.player.destroy(),null===(t=this.playerController)||void 0===t||t.destroy(),this.player=void 0,this.__slideState.mediaState)i=this.__slideState.mediaState[n],this.__slideState.mediaState[n]=$C($C({},i),{frozenTime:this.timestamp()});o.label=2;case 2:return[2]}}))}))},e.prototype.frozen=function(){var t=this;this.frozenTaskManager.addTask("frozen",(function(){return t._doFrozen()}))},e.prototype._doRelease=function(){var t,e;return QC(this,void 0,void 0,(function(){var n,i,r,o;return tI(this,(function(s){switch(s.label){case 0:if(this.player)return[2];for(i in this.player=this.initPlayer(this.config),(null===(t=this.config)||void 0===t?void 0:t.controller)&&this.createController(),this.player.view&&(this.frame.appendChild(this.player.view),this.player.view.style.visibility="hidden"),n=this.__slideState,this.__slideState=Object(l.cloneDeep)(oI),n.mediaState)"play"===(r=n.mediaState[i]).type&&(o=Math.max(null!==(e=r.frozenTime)&&void 0!==e?e:0,r.time),r.time=this.timestamp()-(o-r.time),r.frozenTime=void 0);return[4,this.setSlideState(n)];case 1:return s.sent(),[4,this.player.clock.delay(333)];case 2:s.sent(),this.player.view&&(this.player.view.style.visibility="visible");try{this.frame.removeChild(this.cacheImage)}catch(t){}return[2]}}))}))},e.prototype.release=function(){var t=this;this.frozenTaskManager.addTask("release",(function(){return t._doRelease()}))},e.prototype._doDestroy=function(){var t,e,n,i;this.playerController&&this.playerController.destroy(),this.frameResizeObserver.disconnect(),null===(t=this.player)||void 0===t||t.removeAllListeners(),null===(e=this.player)||void 0===e||e.destroy(),null===(n=this.player)||void 0===n||n.removeAllListeners(),this.logger={warn:function(){return{}},info:function(){return{}},error:function(){return{}}},this.syncQueue.destroy(),this.renderingTaskManager.destroy(),this.frozenTaskManager.destroy(),window.removeEventListener("__slide_ref__",this.handleSlideRef),this.removeAllListeners();try{(null===(i=this.player)||void 0===i?void 0:i.view)&&this.anchor.removeChild(this.player.view),this.anchor.removeChild(this.frame)}catch(t){}this.logger.info("after destroy slide","")},e.prototype.waitLoadEnd=function(){return QC(this,void 0,void 0,(function(){var t;return tI(this,(function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return this.isLoading&&t<10?[4,nI(100)]:[3,3];case 2:return e.sent(),t+=1,[3,1];case 3:return[2]}}))}))},e.prototype.destroy=function(){var t=this;this.logger.info("pre destroy slide",""),this.isLoading?this.waitLoadEnd().then((function(){t._doDestroy()})):this._doDestroy()},e.prototype.clearSlideCache=function(){var t;null===(t=this.player)||void 0===t||t.clearLocalCache()},e.prototype.hasNextStep=function(){if(!this.player)return!1;var t=this.player.currentIndex===this.slideCount,e=0===this.mainSeqLength||this.mainSeqStep>=this.mainSeqLength-1,n="end"===this.mainSeqState||"running"===this.mainSeqState||null==this.mainSeqState;return!(t&&e&&n)},e.prototype.hasPrevStep=function(){if(!this.player)return!1;var t=1===this.player.currentIndex,e=0===this.mainSeqLength||0===this.mainSeqStep,n="idle"===this.mainSeqState||null===this.mainSeqState;return!(t&&e&&n)},e.clearLocalCache=function(){ZR.clearLocalCache()},e.disposeLocalCache=function(){},e.logStore=o.createInstance({name:"__slide_local_log__",driver:o.INDEXEDDB,version:1}),e._tempLog="",e._tempLogIndex=1,e.handleLogDownload=function(){return QC(void 0,void 0,void 0,(function(){var t,n,i,r,o,s,a;return tI(this,(function(l){switch(l.label){case 0:return t="",e.logStore?[4,e.logStore.keys()]:[3,5];case 1:n=(l.sent()||[]).sort((function(t,e){return parseInt(t.replace("run_time_log_",""))-parseInt(e.replace("run_time_log_",""))})),i=0,r=n,l.label=2;case 2:return i<r.length?(o=r[i],s=t,[4,e.logStore.getItem(o)]):[3,5];case 3:t=s+(l.sent()||""),l.label=4;case 4:return i++,[3,2];case 5:return(a=document.createElement("a")).setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),a.setAttribute("download","slide_log"),a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a),window.__slideLogText=t,[2]}}))}))},e}(a.a);aI.logStore.clear(),window.addEventListener("__slide_log__",aI.handleLogDownload),window.setInterval((function(){aI.flushLog().catch((function(){}))}),1e4)}]);
|