1var t=Object.prototype.hasOwnProperty,e=Object.getOwnPropertySymbols,i=Object.prototype.propertyIsEnumerable,n=Object.assign,r=(n,r)=>{var s={};for(var o in n)t.call(n,o)&&r.indexOf(o)<0&&(s[o]=n[o]);if(null!=n&&e)for(var o of e(n))r.indexOf(o)<0&&i.call(n,o)&&(s[o]=n[o]);return s};function s(t,e){const i=Object.create(null),n=t.split(",");for(let r=0;r<n.length;r++)i[n[r]]=!0;return e?t=>!!i[t.toLowerCase()]:t=>!!i[t]}const o=s("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl"),a=s("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function h(t){if(A(t)){const e={};for(let i=0;i<t.length;i++){const n=t[i],r=h(M(n)?c(n):n);if(r)for(const t in r)e[t]=r[t]}return e}if(I(t))return t}const u=/;(?![^(]*\))/g,l=/:(.+)/;function c(t){const e={};return t.split(u).forEach((t=>{if(t){const i=t.split(l);i.length>1&&(e[i[0].trim()]=i[1].trim())}})),e}function f(t){let e="";if(M(t))e=t;else if(A(t))for(let i=0;i<t.length;i++)e+=f(t[i])+" ";else if(I(t))for(const i in t)t[i]&&(e+=i+" ");return e.trim()}const d=t=>null==t?"":I(t)?JSON.stringify(t,p,2):String(t),p=(t,e)=>C(e)?{[`Map(${e.size})`]:[...e.entries()].reduce(((t,[e,i])=>(t[`${e} =>`]=i,t)),{})}:O(e)?{[`Set(${e.size})`]:[...e.values()]}:!I(e)||A(e)||F(e)?e:String(e),v={},g=[],m=()=>{},y=()=>!1,x=/^on[^a-z]/,w=t=>x.test(t),_=t=>t.startsWith("onUpdate:"),b=Object.assign,T=(t,e)=>{const i=t.indexOf(e);i>-1&&t.splice(i,1)},E=Object.prototype.hasOwnProperty,S=(t,e)=>E.call(t,e),A=Array.isArray,C=t=>"[object Map]"===D(t),O=t=>"[object Set]"===D(t),R=t=>"function"==typeof t,M=t=>"string"==typeof t,P=t=>"symbol"==typeof t,I=t=>null!==t&&"object"==typeof t,k=t=>I(t)&&R(t.then)&&R(t.catch),L=Object.prototype.toString,D=t=>L.call(t),F=t=>"[object Object]"===D(t),N=t=>M(t)&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,B=s(",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),U=t=>{const e=Object.create(null);return i=>e[i]||(e[i]=t(i))},V=/-(\w)/g,Y=U((t=>t.replace(V,((t,e)=>e?e.toUpperCase():"")))),z=/\B([A-Z])/g,X=U((t=>t.replace(z,"-$1").toLowerCase())),G=U((t=>t.charAt(0).toUpperCase()+t.slice(1))),W=U((t=>t?`on${G(t)}`:"")),j=(t,e)=>t!==e&&(t==t||e==e),H=(t,e)=>{for(let i=0;i<t.length;i++)t[i](e)},q=(t,e,i)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:i})},K=t=>{const e=parseFloat(t);return isNaN(e)?t:e},Z=new WeakMap,Q=[];let J;const $=Symbol(""),tt=Symbol("");function et(t,e=v){(function(t){return t&&!0===t._isEffect})(t)&&(t=t.raw);const i=function(t,e){const i=function(){if(!i.active)return e.scheduler?void 0:t();if(!Q.includes(i)){rt(i);try{return ot.push(st),st=!0,Q.push(i),J=i,t()}finally{Q.pop(),ht(),J=Q[Q.length-1]}}};return i.id=nt++,i.allowRecurse=!!e.allowRecurse,i._isEffect=!0,i.active=!0,i.raw=t,i.deps=[],i.options=e,i}(t,e);return e.lazy||i(),i}function it(t){t.active&&(rt(t),t.options.onStop&&t.options.onStop(),t.active=!1)}let nt=0;function rt(t){const{deps:e}=t;if(e.length){for(let i=0;i<e.length;i++)e[i].delete(t);e.length=0}}let st=!0;const ot=[];function at(){ot.push(st),st=!1}function ht(){const t=ot.pop();st=void 0===t||t}function ut(t,e,i){if(!st||void 0===J)return;let n=Z.get(t);n||Z.set(t,n=new Map);let r=n.get(i);r||n.set(i,r=new Set),r.has(J)||(r.add(J),J.deps.push(r))}function lt(t,e,i,n,r,s){const o=Z.get(t);if(!o)return;const a=new Set,h=t=>{t&&t.forEach((t=>{(t!==J||t.allowRecurse)&&a.add(t)}))};if("clear"===e)o.forEach(h);else if("length"===i&&A(t))o.forEach(((t,e)=>{("length"===e||e>=n)&&h(t)}));else switch(void 0!==i&&h(o.get(i)),e){case"add":A(t)?N(i)&&h(o.get("length")):(h(o.get($)),C(t)&&h(o.get(tt)));break;case"delete":A(t)||(h(o.get($)),C(t)&&h(o.get(tt)));break;case"set":C(t)&&h(o.get($))}a.forEach((t=>{t.options.scheduler?t.options.scheduler(t):t()}))}const ct=new Set(Object.getOwnPropertyNames(Symbol).map((t=>Symbol[t])).filter(P)),ft=mt(),dt=mt(!1,!0),pt=mt(!0),vt=mt(!0,!0),gt={};function mt(t=!1,e=!1){return function(i,n,r){if("__v_isReactive"===n)return!t;if("__v_isReadonly"===n)return t;if("__v_raw"===n&&r===(t?Gt:Xt).get(i))return i;const s=A(i);if(!t&&s&&S(gt,n))return Reflect.get(gt,n,r);const o=Reflect.get(i,n,r);if(P(n)?ct.has(n):"__proto__"===n||"__v_isRef"===n)return o;if(t||ut(i,0,n),e)return o;if(te(o)){return!s||!N(n)?o.value:o}return I(o)?t?Ht(o):jt(o):o}}["includes","indexOf","lastIndexOf"].forEach((t=>{const e=Array.prototype[t];gt[t]=function(...t){const i=Jt(this);for(let e=0,r=this.length;e<r;e++)ut(i,0,e+"");const n=e.apply(i,t);return-1===n||!1===n?e.apply(i,t.map(Jt)):n}})),["push","pop","shift","unshift","splice"].forEach((t=>{const e=Array.prototype[t];gt[t]=function(...t){at();const i=e.apply(this,t);return ht(),i}}));function yt(t=!1){return function(e,i,n,r){const s=e[i];
1if(!t&&(n=Jt(n),!A(e)&&te(s)&&!te(n)))return s.value=n,!0;const o=A(e)&&N(i)?Number(i)<e.length:S(e,i),a=Reflect.set(e,i,n,r);return e===Jt(r)&&(o?j(n,s)&<(e,"set",i,n):lt(e,"add",i,n)),a}}const xt={get:ft,set:yt(),deleteProperty:function(t,e){const i=S(t,e);t[e];const n=Reflect.deleteProperty(t,e);return n&&i&<(t,"delete",e,void 0),n},has:function(t,e){const i=Reflect.has(t,e);return P(e)&&ct.has(e)||ut(t,0,e),i},ownKeys:function(t){return ut(t,0,A(t)?"length":$),Reflect.ownKeys(t)}},wt={get:pt,set:(t,e)=>!0,deleteProperty:(t,e)=>!0},_t=b({},xt,{get:dt,set:yt(!0)});b({},wt,{get:vt});const bt=t=>I(t)?jt(t):t,Tt=t=>I(t)?Ht(t):t,Et=t=>t,St=t=>Reflect.getPrototypeOf(t);function At(t,e,i=!1,n=!1){const r=Jt(t=t.__v_raw),s=Jt(e);e!==s&&!i&&ut(r,0,e),!i&&ut(r,0,s);const{has:o}=St(r),a=i?Tt:n?Et:bt;return o.call(r,e)?a(t.get(e)):o.call(r,s)?a(t.get(s)):void 0}function Ct(t,e=!1){const i=this.__v_raw,n=Jt(i),r=Jt(t);return t!==r&&!e&&ut(n,0,t),!e&&ut(n,0,r),t===r?i.has(t):i.has(t)||i.has(r)}function Ot(t,e=!1){return t=t.__v_raw,!e&&ut(Jt(t),0,$),Reflect.get(t,"size",t)}function Rt(t){t=Jt(t);const e=Jt(this),i=St(e).has.call(e,t);return e.add(t),i||lt(e,"add",t,t),this}function Mt(t,e){e=Jt(e);const i=Jt(this),{has:n,get:r}=St(i);let s=n.call(i,t);s||(t=Jt(t),s=n.call(i,t));const o=r.call(i,t);return i.set(t,e),s?j(e,o)&<(i,"set",t,e):lt(i,"add",t,e),this}function Pt(t){const e=Jt(this),{has:i,get:n}=St(e);let r=i.call(e,t);r||(t=Jt(t),r=i.call(e,t)),n&&n.call(e,t);const s=e.delete(t);return r&<(e,"delete",t,void 0),s}function It(){const t=Jt(this),e=0!==t.size,i=t.clear();return e&<(t,"clear",void 0,void 0),i}function kt(t,e){return function(i,n){const r=this,s=r.__v_raw,o=Jt(s),a=t?Tt:e?Et:bt;return!t&&ut(o,0,$),s.forEach(((t,e)=>i.call(n,a(t),a(e),r)))}}function Lt(t,e,i){return function(...n){const r=this.__v_raw,s=Jt(r),o=C(s),a="entries"===t||t===Symbol.iterator&&o,h="keys"===t&&o,u=r[t](...n),l=e?Tt:i?Et:bt;return!e&&ut(s,0,h?tt:$),{next(){const{value:t,done:e}=u.next();return e?{value:t,done:e}:{value:a?[l(t[0]),l(t[1])]:l(t),done:e}},[Symbol.iterator](){return this}}}}function Dt(t){return function(...e){return"delete"!==t&&this}}const Ft={get(t){return At(this,t)},get size(){return Ot(this)},has:Ct,add:Rt,set:Mt,delete:Pt,clear:It,forEach:kt(!1,!1)},Nt={get(t){return At(this,t,!1,!0)},get size(){return Ot(this)},has:Ct,add:Rt,set:Mt,delete:Pt,clear:It,forEach:kt(!1,!0)},Bt={get(t){return At(this,t,!0)},get size(){return Ot(this,!0)},has(t){return Ct.call(this,t,!0)},add:Dt("add"),set:Dt("set"),delete:Dt("delete"),clear:Dt("clear"),forEach:kt(!0,!1)};function Ut(t,e){const i=e?Nt:t?Bt:Ft;return(e,n,r)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(S(i,n)&&n in e?i:e,n,r)}["keys","values","entries",Symbol.iterator].forEach((t=>{Ft[t]=Lt(t,!1,!1),Bt[t]=Lt(t,!0,!1),Nt[t]=Lt(t,!1,!0)}));const Vt={get:Ut(!1,!1)},Yt={get:Ut(!1,!0)},zt={get:Ut(!0,!1)},Xt=new WeakMap,Gt=new WeakMap;function Wt(t){return t.__v_skip||!Object.isExtensible(t)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((t=>D(t).slice(8,-1))(t))}function jt(t){return t&&t.__v_isReadonly?t:qt(t,!1,xt,Vt)}function Ht(t){return qt(t,!0,wt,zt)}function qt(t,e,i,n){if(!I(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=e?Gt:Xt,s=r.get(t);if(s)return s;const o=Wt(t);if(0===o)return t;const a=new Proxy(t,2===o?n:i);return r.set(t,a),a}function Kt(t){return Zt(t)?Kt(t.__v_raw):!(!t||!t.__v_isReactive)}function Zt(t){return!(!t||!t.__v_isReadonly)}function Qt(t){return Kt(t)||Zt(t)}function Jt(t){return t&&Jt(t.__v_raw)||t}const $t=t=>I(t)?jt(t):t;function te(t){return Boolean(t&&!0===t.__v_isRef)}class ee{constructor(t,e=!1){this._rawValue=t,this._shallow=e,this.__v_isRef=!0,this._value=e?t:$t(t)}get value(){return ut(Jt(this),0,"value"),this._value}set value(t){j(Jt(t),this._rawValue)&&(this._rawValue=t,this._value=this._shallow?t:$t(t),lt(Jt(this),"set","value",t))}}function ie(t,e=!1){return te(t)?t:new ee(t,e)}function ne(t){return te(t)?t.value:t}const re={get:(t,e,i)=>ne(Reflect.get(t,e,i)),set:(t,e,i,n)=>{const r=t[e];return te(r)&&!te(i)?(r.value=i,!0):Reflect.set(t,e,i,n)}};function se(t){return Kt(t)?t:new Proxy(t,re)}class oe{constructor(t,e){this._object=t,this._key=e,this.__v_isRef=!0}get value(){return this._object[this._key]}set value(t){this._object[this._key]=t}}class ae{constructor(t,e,i){this._setter=e,this._dirty=!0,this.__v_isRef=!0,this.effect=et(t,{lazy:!0,scheduler:()=>{this._dirty||(this._dirty=!0,lt(Jt(this),"set","value"))}}),this.__v_isReadonly=i}get value(){return this._dirty&&(this._value=this.effect(),this._dirty=!1),ut(Jt(this),0,"value"),this._value}set value(t){this._setter(t)}}function he(t,e,i,n){let r;try{r=n?t(...n):t()}catch(s){le(s,e,i)}return r}function ue(t,e,i,n){if(R(t)){const r=he(t,e,i,n);return r&&k(r)&&r.catch((t=>{le(t,e,i)})),r}const r=[];for(let s=0;s<t.length;s++)r.push(ue(t[s],e,i,n));return r}function le(t,e,i,n=!0){e&&e.vnode;if(e){let n=e.parent;const r=e.proxy,s=i;for(;n;){const e=n.ec;if(e)for(let i=0;i<e.length;i++)if(!1===e[i](t,r,s))return;n=n.parent}const o=e.appContext.config.errorHandler;if(o)return void he(o,null,10,[t,r,s])}
1!function(t,e,i,n=!0){console.error(t)}(t,0,0,n)}let ce=!1,fe=!1;const de=[];let pe=0;const ve=[];let ge=null,me=0;const ye=[];let xe=null,we=0;const _e=Promise.resolve();let be=null,Te=null;function Ee(t){const e=be||_e;return t?e.then(this?t.bind(this):t):e}function Se(t){de.length&&de.includes(t,ce&&t.allowRecurse?pe+1:pe)||t===Te||(de.push(t),Ae())}function Ae(){ce||fe||(fe=!0,be=_e.then(Pe))}function Ce(t,e,i,n){A(t)?i.push(...t):e&&e.includes(t,t.allowRecurse?n+1:n)||i.push(t),Ae()}function Oe(t,e=null){if(ve.length){for(Te=e,ge=[...new Set(ve)],ve.length=0,me=0;me<ge.length;me++)ge[me]();ge=null,me=0,Te=null,Oe(t,e)}}function Re(t){if(ye.length){const t=[...new Set(ye)];if(ye.length=0,xe)return void xe.push(...t);for(xe=t,xe.sort(((t,e)=>Me(t)-Me(e))),we=0;we<xe.length;we++)xe[we]();xe=null,we=0}}const Me=t=>null==t.id?1/0:t.id;function Pe(t){fe=!1,ce=!0,Oe(t),de.sort(((t,e)=>Me(t)-Me(e)));try{for(pe=0;pe<de.length;pe++){const t=de[pe];t&&he(t,null,14)}}finally{pe=0,de.length=0,Re(),ce=!1,be=null,(de.length||ye.length)&&Pe(t)}}function Ie(t,e,...i){const n=t.vnode.props||v;let r=i;const s=e.startsWith("update:"),o=s&&e.slice(7);if(o&&o in n){const t=`${"modelValue"===o?"model":o}Modifiers`,{number:e,trim:s}=n[t]||v;s?r=i.map((t=>t.trim())):e&&(r=i.map(K))}let a=W(Y(e)),h=n[a];!h&&s&&(a=W(X(e)),h=n[a]),h&&ue(h,t,6,r);const u=n[a+"Once"];if(u){if(t.emitted){if(t.emitted[a])return}else(t.emitted={})[a]=!0;ue(u,t,6,r)}}function ke(t,e,i=!1){if(!e.deopt&&void 0!==t.__emits)return t.__emits;const n=t.emits;let r={},s=!1;if(!R(t)){const n=t=>{s=!0,b(r,ke(t,e,!0))};!i&&e.mixins.length&&e.mixins.forEach(n),t.extends&&n(t.extends),t.mixins&&t.mixins.forEach(n)}return n||s?(A(n)?n.forEach((t=>r[t]=null)):b(r,n),t.__emits=r):t.__emits=null}function Le(t,e){return!(!t||!w(e))&&(e=e.slice(2).replace(/Once$/,""),S(t,e[0].toLowerCase()+e.slice(1))||S(t,X(e))||S(t,e))}let De=null;function Fe(t){De=t}function Ne(t){const{type:e,vnode:i,proxy:n,withProxy:r,props:s,propsOptions:[o],slots:a,attrs:h,emit:u,render:l,renderCache:c,data:f,setupState:d,ctx:p}=t;let v;De=t;try{let t;if(4&i.shapeFlag){const e=r||n;v=rn(l.call(e,e,c,s,d,f,p)),t=h}else{const i=e;0,v=rn(i.length>1?i(s,{attrs:h,slots:a,emit:u}):i(s,null)),t=e.props?h:Ue(h)}let g=v;if(!1!==e.inheritAttrs&&t){const e=Object.keys(t),{shapeFlag:i}=g;e.length&&(1&i||6&i)&&(o&&e.some(_)&&(t=Ve(t,o)),g=tn(g,t))}i.dirs&&(g.dirs=g.dirs?g.dirs.concat(i.dirs):i.dirs),i.transition&&(g.transition=i.transition),v=g}catch(g){le(g,t,1),v=$i(Yi)}return De=null,v}function Be(t){let e;for(let i=0;i<t.length;i++){const n=t[i];if(!qi(n))return;if(n.type!==Yi||"v-if"===n.children){if(e)return;e=n}}return e}const Ue=t=>{let e;for(const i in t)("class"===i||"style"===i||w(i))&&((e||(e={}))[i]=t[i]);return e},Ve=(t,e)=>{const i={};for(const n in t)_(n)&&n.slice(9)in e||(i[n]=t[n]);return i};function Ye(t,e,i){const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!0;for(let r=0;r<n.length;r++){const s=n[r];if(e[s]!==t[s]&&!Le(i,s))return!0}return!1}function ze(t){if(R(t)&&(t=t()),A(t)){t=Be(t)}return rn(t)}let Xe=0;const Ge=t=>Xe+=t;function We(t,e=De){if(!e)return t;const i=(...i)=>{Xe||Wi(!0);const n=De;Fe(e);const r=t(...i);return Fe(n),Xe||ji(),r};return i._c=!0,i}function je(t,e,i,n=!1){const r={},s={};q(s,Zi,1),He(t,e,r,s),i?t.props=n?r:qt(r,!1,_t,Yt):t.type.props?t.props=r:t.props=s,t.attrs=s}function He(t,e,i,n){const[r,s]=t.propsOptions;if(e)for(const o in e){const s=e[o];if(B(o))continue;let a;r&&S(r,a=Y(o))?i[a]=s:Le(t.emitsOptions,o)||(n[o]=s)}if(s){const e=Jt(i);for(let n=0;n<s.length;n++){const o=s[n];i[o]=qe(r,e,o,e[o],t)}}}function qe(t,e,i,n,r){const s=t[i];if(null!=s){const t=S(s,"default");if(t&&void 0===n){const t=s.default;s.type!==Function&&R(t)?(Sn(r),n=t(e),Sn(null)):n=t}s[0]&&(S(e,i)||t?!s[1]||""!==n&&n!==X(i)||(n=!0):n=!1)}return n}function Ke(t,e,i=!1){if(!e.deopt&&t.__props)return t.__props;const n=t.props,r={},s=[];let o=!1;if(!R(t)){const n=t=>{o=!0;const[i,n]=Ke(t,e,!0);b(r,i),n&&s.push(...n)};!i&&e.mixins.length&&e.mixins.forEach(n),t.extends&&n(t.extends),t.mixins&&t.mixins.forEach(n)}if(!n&&!o)return t.__props=g;if(A(n))for(let a=0;a<n.length;a++){const t=Y(n[a]);Ze(t)&&(r[t]=v)}else if(n)for(const a in n){const t=Y(a);if(Ze(t)){const e=n[a],i=r[t]=A(e)||R(e)?{type:e}:e;if(i){const e=$e(Boolean,i.type),n=$e(String,i.type);i[0]=e>-1,i[1]=n<0||e<n,(e>-1||S(i,"default"))&&s.push(t)}}}return t.__props=[r,s]}function Ze(t){return"$"!==t[0]}function Qe(t){const e=t&&t.toString().match(/^\s*function (\w+)/);return e?e[1]:""}function Je(t,e){return Qe(t)===Qe(e)}function $e(t,e){if(A(e)){for(let i=0,n=e.length;i<n;i++)if(Je(e[i],t))return i}else if(R(e))return Je(e,t)?0:-1;return-1}function ti(t,e,i=En,n=!1){if(i){const r=i[t]||(i[t]=[]),s=e.__weh||(e.__weh=(...n)=>{if(i.isUnmounted)return;at(),Sn(i);const r=ue(e,i,t,n);
1return Sn(null),ht(),r});return n?r.unshift(s):r.push(s),s}}const ei=t=>(e,i=En)=>!An&&ti(t,e,i),ii=ei("bm"),ni=ei("m"),ri=ei("bu"),si=ei("u"),oi=ei("bum"),ai=ei("um"),hi=ei("rtg"),ui=ei("rtc"),li={};function ci(t,e,i){return fi(t,e,i)}function fi(t,e,{immediate:i,deep:n,flush:r,onTrack:s,onTrigger:o}=v,a=En){let h,u,l=!1;if(te(t)?(h=()=>t.value,l=!!t._shallow):Kt(t)?(h=()=>t,n=!0):h=A(t)?()=>t.map((t=>te(t)?t.value:Kt(t)?pi(t):R(t)?he(t,a,2):void 0)):R(t)?e?()=>he(t,a,2):()=>{if(!a||!a.isUnmounted)return u&&u(),he(t,a,3,[c])}:m,e&&n){const t=h;h=()=>pi(t())}const c=t=>{u=g.options.onStop=()=>{he(t,a,4)}};let f=A(t)?[]:li;const d=()=>{if(g.active)if(e){const t=g();(n||l||j(t,f))&&(u&&u(),ue(e,a,3,[t,f===li?void 0:f,c]),f=t)}else g()};let p;d.allowRecurse=!!e,p="sync"===r?d:"post"===r?()=>Mi(d,a&&a.suspense):()=>{!a||a.isMounted?function(t){Ce(t,ge,ve,me)}(d):d()};const g=et(h,{lazy:!0,onTrack:s,onTrigger:o,scheduler:p});return Rn(g,a),e?i?d():f=g():"post"===r?Mi(g,a&&a.suspense):g(),()=>{it(g),a&&T(a.effects,g)}}function di(t,e,i){const n=this.proxy;return fi(M(t)?()=>n[t]:t.bind(n),e.bind(n),i,this)}function pi(t,e=new Set){if(!I(t)||e.has(t))return t;if(e.add(t),te(t))pi(t.value,e);else if(A(t))for(let i=0;i<t.length;i++)pi(t[i],e);else if(O(t)||C(t))t.forEach((t=>{pi(t,e)}));else for(const i in t)pi(t[i],e);return t}const vi=t=>t.type.__isKeepAlive;function gi(t,e,i=En){const n=t.__wdc||(t.__wdc=()=>{let e=i;for(;e;){if(e.isDeactivated)return;e=e.parent}t()});if(ti(e,n,i),i){let t=i.parent;for(;t&&t.parent;)vi(t.parent.vnode)&&mi(n,e,i,t),t=t.parent}}function mi(t,e,i,n){const r=ti(e,t,n,!0);ai((()=>{T(n[e],r)}),i)}const yi=t=>"_"===t[0]||"$stable"===t,xi=t=>A(t)?t.map(rn):[rn(t)],wi=(t,e,i)=>We((t=>xi(e(t))),i),_i=(t,e)=>{const i=t._ctx;for(const n in t){if(yi(n))continue;const r=t[n];if(R(r))e[n]=wi(0,r,i);else if(null!=r){const t=xi(r);e[n]=()=>t}}},bi=(t,e)=>{const i=xi(e);t.slots.default=()=>i};function Ti(t,e){if(null===De)return t;const i=De.proxy,n=t.dirs||(t.dirs=[]);for(let r=0;r<e.length;r++){let[t,s,o,a=v]=e[r];R(t)&&(t={mounted:t,updated:t}),n.push({dir:t,instance:i,value:s,oldValue:void 0,arg:o,modifiers:a})}return t}function Ei(t,e,i,n){const r=t.dirs,s=e&&e.dirs;for(let o=0;o<r.length;o++){const a=r[o];s&&(a.oldValue=s[o].value);const h=a.dir[n];h&&ue(h,i,8,[t.el,a,t,e])}}function Si(){return{app:null,config:{isNativeTag:y,performance:!1,globalProperties:{},optionMergeStrategies:{},isCustomElement:y,errorHandler:void 0,warnHandler:void 0},mixins:[],components:{},directives:{},provides:Object.create(null)}}let Ai=0;function Ci(t,e){return function(i,n=null){null==n||I(n)||(n=null);const r=Si(),s=new Set;let o=!1;const a=r.app={_uid:Ai++,_component:i,_props:n,_container:null,_context:r,version:Ln,get config(){return r.config},set config(t){},use:(t,...e)=>(s.has(t)||(t&&R(t.install)?(s.add(t),t.install(a,...e)):R(t)&&(s.add(t),t(a,...e))),a),mixin:t=>(r.mixins.includes(t)||(r.mixins.push(t),(t.props||t.emits)&&(r.deopt=!0)),a),component:(t,e)=>e?(r.components[t]=e,a):r.components[t],directive:(t,e)=>e?(r.directives[t]=e,a):r.directives[t],mount(s,h){if(!o){const u=$i(i,n);return u.appContext=r,h&&e?e(u,s):t(u,s),o=!0,a._container=s,s.__vue_app__=a,u.component.proxy}},unmount(){o&&t(null,a._container)},provide:(t,e)=>(r.provides[t]=e,a)};return a}}function Oi(t){return R(t)?{setup:t,name:t.name}:t}const Ri={scheduler:Se,allowRecurse:!0},Mi=function(t,e){e&&e.pendingBranch?A(t)?e.effects.push(...t):e.effects.push(t):Ce(t,xe,ye,we)},Pi=(t,e,i,n)=>{if(A(t))return void t.forEach(((t,r)=>Pi(t,e&&(A(e)?e[r]:e),i,n)));let r;r=!n||n.type.__asyncLoader?null:4&n.shapeFlag?n.component.exposed||n.component.proxy:n.el;const{i:s,r:o}=t,a=e&&e.r,h=s.refs===v?s.refs={}:s.refs,u=s.setupState;if(null!=a&&a!==o&&(M(a)?(h[a]=null,S(u,a)&&(u[a]=null)):te(a)&&(a.value=null)),M(o)){const t=()=>{h[o]=r,S(u,o)&&(u[o]=r)};r?(t.id=-1,Mi(t,i)):t()}else if(te(o)){const t=()=>{o.value=r};r?(t.id=-1,Mi(t,i)):t()}else R(o)&&he(o,s,12,[r,h])};function Ii(t){return function(t,e){const{insert:i,remove:n,patchProp:r,forcePatchProp:s,createElement:o,createText:a,createComment:h,setText:u,setElementText:l,parentNode:c,nextSibling:f,setScopeId:d=m,cloneNode:p,insertStaticContent:y}=t,x=(t,e,i,n=null,r=null,s=null,o=!1,a=!1)=>{t&&!Ki(t,e)&&(n=nt(t),Z(t,r,s,!0),t=null),-2===e.patchFlag&&(a=!1,e.dynamicChildren=null);const{type:h,ref:u,shapeFlag:l}=e;switch(h){case Vi:w(t,e,i,n);break;case Yi:_(t,e,i,n);break;case zi:null==t&&T(e,i,n,o);break;case Ui:D(t,e,i,n,r,s,o,a);break;default:1&l?C(t,e,i,n,r,s,o,a):6&l?F(t,e,i,n,r,s,o,a):(64&l||128&l)&&h.process(t,e,
1i,n,r,s,o,a,st)}null!=u&&r&&Pi(u,t&&t.ref,s,e)},w=(t,e,n,r)=>{if(null==t)i(e.el=a(e.children),n,r);else{const i=e.el=t.el;e.children!==t.children&&u(i,e.children)}},_=(t,e,n,r)=>{null==t?i(e.el=h(e.children||""),n,r):e.el=t.el},T=(t,e,i,n)=>{[t.el,t.anchor]=y(t.children,e,i,n)},E=({el:t,anchor:e},n,r)=>{let s;for(;t&&t!==e;)s=f(t),i(t,n,r),t=s;i(e,n,r)},A=({el:t,anchor:e})=>{let i;for(;t&&t!==e;)i=f(t),n(t),t=i;n(e)},C=(t,e,i,n,r,s,o,a)=>{o=o||"svg"===e.type,null==t?O(e,i,n,r,s,o,a):P(t,e,r,s,o,a)},O=(t,e,n,s,a,h,u)=>{let c,f;const{type:d,props:v,shapeFlag:g,transition:m,scopeId:y,patchFlag:x,dirs:w}=t;if(t.el&&void 0!==p&&-1===x)c=t.el=p(t.el);else{if(c=t.el=o(t.type,h,v&&v.is),8&g?l(c,t.children):16&g&&M(t.children,c,null,s,a,h&&"foreignObject"!==d,u||!!t.dynamicChildren),w&&Ei(t,null,s,"created"),v){for(const e in v)B(e)||r(c,e,null,v[e],h,t.children,s,a,tt);(f=v.onVnodeBeforeMount)&&ki(f,s,t)}R(c,y,t,s)}w&&Ei(t,null,s,"beforeMount");const _=(!a||a&&!a.pendingBranch)&&m&&!m.persisted;_&&m.beforeEnter(c),i(c,e,n),((f=v&&v.onVnodeMounted)||_||w)&&Mi((()=>{f&&ki(f,s,t),_&&m.enter(c),w&&Ei(t,null,s,"mounted")}),a)},R=(t,e,i,n)=>{if(e&&d(t,e),n){const r=n.type.__scopeId;r&&r!==e&&d(t,r+"-s"),i===n.subTree&&R(t,n.vnode.scopeId,n.vnode,n.parent)}},M=(t,e,i,n,r,s,o,a=0)=>{for(let h=a;h<t.length;h++){const a=t[h]=o?sn(t[h]):rn(t[h]);x(null,a,e,i,n,r,s,o)}},P=(t,e,i,n,o,a)=>{const h=e.el=t.el;let{patchFlag:u,dynamicChildren:c,dirs:f}=e;u|=16&t.patchFlag;const d=t.props||v,p=e.props||v;let g;if((g=p.onVnodeBeforeUpdate)&&ki(g,i,e,t),f&&Ei(e,t,i,"beforeUpdate"),u>0){if(16&u)L(h,e,d,p,i,n,o);else if(2&u&&d.class!==p.class&&r(h,"class",null,p.class,o),4&u&&r(h,"style",d.style,p.style,o),8&u){const a=e.dynamicProps;for(let e=0;e<a.length;e++){const u=a[e],l=d[u],c=p[u];(c!==l||s&&s(h,u))&&r(h,u,l,c,o,t.children,i,n,tt)}}1&u&&t.children!==e.children&&l(h,e.children)}else a||null!=c||L(h,e,d,p,i,n,o);const m=o&&"foreignObject"!==e.type;c?I(t.dynamicChildren,c,h,i,n,m):a||G(t,e,h,null,i,n,m),((g=p.onVnodeUpdated)||f)&&Mi((()=>{g&&ki(g,i,e,t),f&&Ei(e,t,i,"updated")}),n)},I=(t,e,i,n,r,s)=>{for(let o=0;o<e.length;o++){const a=t[o],h=e[o],u=a.type===Ui||!Ki(a,h)||6&a.shapeFlag||64&a.shapeFlag?c(a.el):i;x(a,h,u,null,n,r,s,!0)}},L=(t,e,i,n,o,a,h)=>{if(i!==n){for(const u in n){if(B(u))continue;const l=n[u],c=i[u];(l!==c||s&&s(t,u))&&r(t,u,c,l,h,e.children,o,a,tt)}if(i!==v)for(const s in i)B(s)||s in n||r(t,s,i[s],null,h,e.children,o,a,tt)}},D=(t,e,n,r,s,o,h,u)=>{const l=e.el=t?t.el:a(""),c=e.anchor=t?t.anchor:a("");let{patchFlag:f,dynamicChildren:d}=e;f>0&&(u=!0),null==t?(i(l,n,r),i(c,n,r),M(e.children,n,c,s,o,h,u)):f>0&&64&f&&d&&t.dynamicChildren?(I(t.dynamicChildren,d,n,s,o,h),(null!=e.key||s&&e===s.subTree)&&Li(t,e,!0)):G(t,e,n,c,s,o,h,u)},F=(t,e,i,n,r,s,o,a)=>{null==t?512&e.shapeFlag?r.ctx.activate(e,i,n,o,a):N(e,i,n,r,s,o,a):U(t,e,a)},N=(t,e,i,n,r,s,o)=>{const a=t.component=function(t,e,i){const n=t.type,r=(e?e.appContext:t.appContext)||bn,s={uid:Tn++,vnode:t,type:n,parent:e,appContext:r,root:null,next:null,subTree:null,update:null,render:null,proxy:null,exposed:null,withProxy:null,effects:null,provides:e?e.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Ke(n,r),emitsOptions:ke(n,r),emit:null,emitted:null,ctx:v,data:v,props:v,attrs:v,slots:v,refs:v,setupState:v,setupContext:null,suspense:i,suspenseId:i?i.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null};return s.ctx={_:s},s.root=e?e.root:s,s.emit=Ie.bind(null,s),s}(t,n,r);if(vi(t)&&(a.ctx.renderer=st),function(t,e=!1){An=e;const{props:i,children:n,shapeFlag:r}=t.vnode,s=4&r;je(t,i,s,e),((t,e)=>{if(32&t.vnode.shapeFlag){const i=e._;i?(t.slots=e,q(e,"_",i)):_i(e,t.slots={})}else t.slots={},e&&bi(t,e);q(t.slots,Zi,1)})(t,n);const o=s?function(t,e){const i=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,wn);const{setup:n}=i;if(n){const i=t.setupContext=n.length>1?function(t){const e=e=>{t.exposed=se(e)};return{attrs:t.attrs,slots:t.slots,emit:t.emit,expose:e}}(t):null;En=t,at();const r=he(n,t,0,[t.props,i]);if(ht(),En=null,k(r)){if(e)return r.then((e=>{Cn(t,e)}));t.asyncDep=r}else Cn(t,r)}else On(t)}(t,e):void 0;An=!1}(a),a.asyncDep){if(r&&r.registerDep(a,V),!t.el){const t=a.subTree=$i(Yi);_(null,t,e,i)}}else V(a,t,e,i,r,s,o)},U=(t,e,i)=>{const n=e.component=t.component;
vendor: 6,172 bytes, line 1
1if(function(t,e,i){const{props:n,children:r,component:s}=t,{props:o,children:a,patchFlag:h}=e,u=s.emitsOptions;if(e.dirs||e.transition)return!0;if(!(i&&h>=0))return!(!r&&!a||a&&a.$stable)||n!==o&&(n?!o||Ye(n,o,u):!!o);if(1024&h)return!0;if(16&h)return n?Ye(n,o,u):!!o;if(8&h){const t=e.dynamicProps;for(let e=0;e<t.length;e++){const i=t[e];if(o[i]!==n[i]&&!Le(u,i))return!0}}return!1}(t,e,i)){if(n.asyncDep&&!n.asyncResolved)return void z(n,e,i);n.next=e,function(t){const e=de.indexOf(t);e>-1&&de.splice(e,1)}(n.update),n.update()}else e.component=t.component,e.el=t.el,n.vnode=e},V=(t,e,i,n,r,s,o)=>{t.update=et((function(){if(t.isMounted){let e,{next:i,bu:n,u:a,parent:h,vnode:u}=t,l=i;i?(i.el=u.el,z(t,i,o)):i=u,n&&H(n),(e=i.props&&i.props.onVnodeBeforeUpdate)&&ki(e,h,i,u);const f=Ne(t),d=t.subTree;t.subTree=f,x(d,f,c(d.el),nt(d),t,r,s),i.el=f.el,null===l&&function({vnode:t,parent:e},i){for(;e&&e.subTree===t;)(t=e.vnode).el=i,e=e.parent}(t,f.el),a&&Mi(a,r),(e=i.props&&i.props.onVnodeUpdated)&&Mi((()=>{ki(e,h,i,u)}),r)}else{let o;const{el:a,props:h}=e,{bm:u,m:l,parent:c}=t;u&&H(u),(o=h&&h.onVnodeBeforeMount)&&ki(o,c,e);const f=t.subTree=Ne(t);if(a&&ut?ut(e.el,f,t,r):(x(null,f,i,n,t,r,s),e.el=f.el),l&&Mi(l,r),o=h&&h.onVnodeMounted){const t=e;Mi((()=>{ki(o,c,t)}),r)}const{a:d}=t;d&&256&e.shapeFlag&&Mi(d,r),t.isMounted=!0,e=i=n=null}}),Ri)},z=(t,e,i)=>{e.component=t;const n=t.vnode.props;t.vnode=e,t.next=null,function(t,e,i,n){const{props:r,attrs:s,vnode:{patchFlag:o}}=t,a=Jt(r),[h]=t.propsOptions;if(!(n||o>0)||16&o){let n;He(t,e,r,s);for(const s in a)e&&(S(e,s)||(n=X(s))!==s&&S(e,n))||(h?!i||void 0===i[s]&&void 0===i[n]||(r[s]=qe(h,e||v,s,void 0,t)):delete r[s]);if(s!==a)for(const t in s)e&&S(e,t)||delete s[t]}else if(8&o){const i=t.vnode.dynamicProps;for(let n=0;n<i.length;n++){const o=i[n],u=e[o];if(h)if(S(s,o))s[o]=u;else{const e=Y(o);r[e]=qe(h,a,e,u,t)}else s[o]=u}}lt(t,"set","$attrs")}(t,e.props,n,i),((t,e)=>{const{vnode:i,slots:n}=t;let r=!0,s=v;if(32&i.shapeFlag){const t=e._;t?1===t?r=!1:b(n,e):(r=!e.$stable,_i(e,n)),s=e}else e&&(bi(t,e),s={default:1});if(r)for(const o in n)yi(o)||o in s||delete n[o]})(t,e.children),Oe(void 0,t.update)},G=(t,e,i,n,r,s,o,a=!1)=>{const h=t&&t.children,u=t?t.shapeFlag:0,c=e.children,{patchFlag:f,shapeFlag:d}=e;if(f>0){if(128&f)return void j(h,c,i,n,r,s,o,a);if(256&f)return void W(h,c,i,n,r,s,o,a)}8&d?(16&u&&tt(h,r,s),c!==h&&l(i,c)):16&u?16&d?j(h,c,i,n,r,s,o,a):tt(h,r,s,!0):(8&u&&l(i,""),16&d&&M(c,i,n,r,s,o,a))},W=(t,e,i,n,r,s,o,a)=>{e=e||g;const h=(t=t||g).length,u=e.length,l=Math.min(h,u);let c;for(c=0;c<l;c++){const n=e[c]=a?sn(e[c]):rn(e[c]);x(t[c],n,i,null,r,s,o,a)}h>u?tt(t,r,s,!0,!1,l):M(e,i,n,r,s,o,a,l)},j=(t,e,i,n,r,s,o,a)=>{let h=0;const u=e.length;let l=t.length-1,c=u-1;for(;h<=l&&h<=c;){const n=t[h],u=e[h]=a?sn(e[h]):rn(e[h]);if(!Ki(n,u))break;x(n,u,i,null,r,s,o,a),h++}for(;h<=l&&h<=c;){const n=t[l],h=e[c]=a?sn(e[c]):rn(e[c]);if(!Ki(n,h))break;x(n,h,i,null,r,s,o,a),l--,c--}if(h>l){if(h<=c){const t=c+1,l=t<u?e[t].el:n;for(;h<=c;)x(null,e[h]=a?sn(e[h]):rn(e[h]),i,l,r,s,o),h++}}else if(h>c)for(;h<=l;)Z(t[h],r,s,!0),h++;else{const f=h,d=h,p=new Map;for(h=d;h<=c;h++){const t=e[h]=a?sn(e[h]):rn(e[h]);null!=t.key&&p.set(t.key,h)}let v,m=0;const y=c-d+1;let w=!1,_=0;const b=new Array(y);for(h=0;h<y;h++)b[h]=0;for(h=f;h<=l;h++){const n=t[h];if(m>=y){Z(n,r,s,!0);continue}let u;if(null!=n.key)u=p.get(n.key);else for(v=d;v<=c;v++)if(0===b[v-d]&&Ki(n,e[v])){u=v;break}void 0===u?Z(n,r,s,!0):(b[u-d]=h+1,u>=_?_=u:w=!0,x(n,e[u],i,null,r,s,o,a),m++)}const T=w?function(t){const e=t.slice(),i=[0];let n,r,s,o,a;const h=t.length;for(n=0;n<h;n++){const h=t[n];if(0!==h){if(r=i[i.length-1],t[r]<h){e[n]=r,i.push(n);continue}for(s=0,o=i.length-1;s<o;)a=(s+o)/2|0,t[i[a]]<h?s=a+1:o=a;h<t[i[s]]&&(s>0&&(e[n]=i[s-1]),i[s]=n)}}s=i.length,o=i[s-1];for(;s-- >0;)i[s]=o,o=e[o];return i}(b):g;for(v=T.length-1,h=y-1;h>=0;h--){const t=d+h,a=e[t],l=t+1<u?e[t+1].el:n;0===b[h]?x(null,a,i,l,r,s,o):w&&(v<0||h!==T[v]?K(a,i,l,2):v--)}}},K=(t,e,n,r,s=null)=>{const{el:o,type:a,transition:h,children:u,shapeFlag:l}=t;if(6&l)return void K(t.component.subTree,e,n,r);if(128&l)return void t.suspense.move(e,n,r);if(64&l)return void a.move(t,e,n,st);if(a===Ui){i(o,e,n);for(let t=0;t<u.length;t++)K(u[t],e,n,r);return void i(t.anchor,e,n)}if(a===zi)return void E(t,e,n);if(2!==r&&1&l&&h)if(0===r)h.beforeEnter(o),i(o,e,n),Mi((()=>h.enter(o)),s);else{const{leave:t,delayLeave:r,afterLeave:s}=h,a=()=>i(o,e,n),u=()=>{t(o,(()=>{a(),s&&s()}))};r?r(o,a,u):u()}else i(o,e,n)},Z=(t,e,i,n=!1,r=!1)=>{const{type:s,props:o,ref:a,children:h,dynamicChildren:u,shapeFlag:l,patchFlag:c,dirs:f}=t;if(null!=a&&Pi(a,null,i,null),256&l)return void e.ctx.deactivate(t);const d=1&l&&f;let p;if((p=o&&o.onVnodeBeforeUnmount)&&ki(p,e,t),6&l)$(t.component,i,n);else{if(128&l)return void t.suspense.unmount(i,n);d&&Ei(t,null,e,"beforeUnmount"),u&&(s!==Ui||c>0&&64&c)?tt(u,e,i,!1,!0):(s===Ui&&(128&c||256&c)||!r&&16&l)&&tt(h,e,i),64&l&&(n||!Di(t.props))&&t.type.remove(t,st),n&&Q(t)}((p=o&&o.onVnodeUnmounted)||d)&&Mi((()=>{p&&ki(p,e,t),d&&Ei(t,null,e,"unmounted")}),i)},Q=t=>{const{type:e,el:i,anchor:r,transition:s}=t;if(e===Ui)return void J(i,r);if(e===zi)return void A(t);const o=()=>{n(i),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&t.shapeFlag&&s&&!s.persisted){const{leave:e,delayLeave:n}=s,r=()=>e(i,o);n?n(t.el,o,r):r()}else o()},J=(t,e)=>{let i;for(;t!==e;)i=f(t),n(t),t=i;n(e)},$=(t,e,i)=>{const{bum:n,effects:r,update:s,subTree:o,um:a}=t;if(n&&H(n),r)for(let h=0;h<r.length;h++)it(r[h]);s&&(it(s),Z(o,t,e,i)),a&&Mi(a,e),Mi((()=>{t.isUnmounted=!0}),e),e&&e.pendingBranch&&!e.isUnmounted&&t.asyncDep&&!t.asyncResolved&&t.suspenseId===e.pendingId&&(e.deps--,0===e.deps&&e.resolve())},tt=(t,e,i,n=!1,r=!1,s=0)=>{for(let o=s;o<t.length;o++)Z(t[o],e,i,n,r)},nt=t=>6&t.shapeFlag?nt(t.component.subTree):128&t.shapeFlag?t.suspense.next():f(t.anchor||t.el),rt=(t,e)=>{null==t?e._vnode&&Z(e._vnode,null,null,!0):x(e._vnode||null,t,e),Re(),e._vnode=t},st={p:x,um:Z,m:K,r:Q,mt:N,mc:M,pc:G,pbc:I,n:nt,o:t};let ot,ut;e&&([ot,ut]=e(st));return{render:rt,hydrate:ot,createApp:Ci(rt,ot)}}(t)}function ki(t,e,i,n=null){ue(t,e,7,[i,n])}
1function Li(t,e,i=!1){const n=t.children,r=e.children;if(A(n)&&A(r))for(let s=0;s<n.length;s++){const t=n[s];let e=r[s];1&e.shapeFlag&&!e.dynamicChildren&&((e.patchFlag<=0||32===e.patchFlag)&&(e=r[s]=sn(r[s]),e.el=t.el),i||Li(t,e))}}const Di=t=>t&&(t.disabled||""===t.disabled);function Fi(t){return function(t,e,i=!0){const n=De||En;if(n){const i=n.type;if("components"===t){if("_self"===e)return i;const t=Mn(i);if(t&&(t===e||t===Y(e)||t===G(Y(e))))return i}return Bi(n[t]||i[t],e)||Bi(n.appContext[t],e)}}("components",t)||t}const Ni=Symbol();function Bi(t,e){return t&&(t[e]||t[Y(e)]||t[G(Y(e))])}const Ui=Symbol(void 0),Vi=Symbol(void 0),Yi=Symbol(void 0),zi=Symbol(void 0),Xi=[];let Gi=null;function Wi(t=!1){Xi.push(Gi=t?null:[])}function ji(){Xi.pop(),Gi=Xi[Xi.length-1]||null}function Hi(t,e,i,n,r){const s=$i(t,e,i,n,r,!0);return s.dynamicChildren=Gi||g,ji(),Gi&&Gi.push(s),s}function qi(t){return!!t&&!0===t.__v_isVNode}function Ki(t,e){return t.type===e.type&&t.key===e.key}const Zi="__vInternal",Qi=({key:t})=>null!=t?t:null,Ji=({ref:t})=>null!=t?M(t)||te(t)||R(t)?{i:De,r:t}:t:null,$i=function(t,e=null,i=null,n=0,r=null,s=!1){t&&t!==Ni||(t=Yi);if(qi(t)){const n=tn(t,e,!0);return i&&on(n,i),n}o=t,R(o)&&"__vccOpts"in o&&(t=t.__vccOpts);var o;if(e){(Qt(e)||Zi in e)&&(e=b({},e));let{class:t,style:i}=e;t&&!M(t)&&(e.class=f(t)),I(i)&&(Qt(i)&&!A(i)&&(i=b({},i)),e.style=h(i))}const a=M(t)?1:(t=>t.__isSuspense)(t)?128:(t=>t.__isTeleport)(t)?64:I(t)?4:R(t)?2:0,u={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&Qi(e),ref:e&&Ji(e),scopeId:null,children:null,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:n,dynamicProps:r,dynamicChildren:null,appContext:null};if(on(u,i),128&a){const{content:t,fallback:e}=function(t){const{shapeFlag:e,children:i}=t;let n,r;return 32&e?(n=ze(i.default),r=ze(i.fallback)):(n=ze(i),r=rn(null)),{content:n,fallback:r}}(u);u.ssContent=t,u.ssFallback=e}!s&&Gi&&(n>0||6&a)&&32!==n&&Gi.push(u);return u};function tn(t,e,i=!1){const{props:n,ref:r,patchFlag:s}=t,o=e?function(...t){const e=b({},t[0]);for(let i=1;i<t.length;i++){const n=t[i];for(const t in n)if("class"===t)e.class!==n.class&&(e.class=f([e.class,n.class]));else if("style"===t)e.style=h([e.style,n.style]);else if(w(t)){const i=e[t],r=n[t];i!==r&&(e[t]=i?[].concat(i,n[t]):r)}else""!==t&&(e[t]=n[t])}return e}(n||{},e):n;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:o,key:o&&Qi(o),ref:e&&e.ref?i&&r?A(r)?r.concat(Ji(e)):[r,Ji(e)]:Ji(e):r,scopeId:t.scopeId,children:t.children,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Ui?-1===s?16:16|s:s,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&tn(t.ssContent),ssFallback:t.ssFallback&&tn(t.ssFallback),el:t.el,anchor:t.anchor}}function en(t=" ",e=0){return $i(Vi,null,t,e)}function nn(t="",e=!1){return e?(Wi(),Hi(Yi,null,t)):$i(Yi,null,t)}function rn(t){return null==t||"boolean"==typeof t?$i(Yi):A(t)?$i(Ui,null,t):"object"==typeof t?null===t.el?t:tn(t):$i(Vi,null,String(t))}function sn(t){return null===t.el?t:tn(t)}function on(t,e){let i=0;const{shapeFlag:n}=t;if(null==e)e=null;else if(A(e))i=16;else if("object"==typeof e){if(1&n||64&n){const i=e.default;return void(i&&(i._c&&Ge(1),on(t,i()),i._c&&Ge(-1)))}{i=32;const n=e._;n||Zi in e?3===n&&De&&(1024&De.vnode.patchFlag?(e._=2,t.patchFlag|=1024):e._=1):e._ctx=De}}else R(e)?(e={default:e,_ctx:De},i=32):(e=String(e),64&n?(i=16,e=[en(e)]):i=8);t.children=e,t.shapeFlag|=i}function an(t,e){if(En){let i=En.provides;const n=En.parent&&En.parent.provides;n===i&&(i=En.provides=Object.create(n)),i[t]=e}else;}function hn(t,e,i=!1){const n=En||De;if(n){const r=null==n.parent?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides;if(r&&t in r)return r[t];if(arguments.length>1)return i&&R(e)?e():e}}let un=!1;function ln(t,e,i=[],n=[],r=[],s=!1){const{mixins:o,extends:a,data:h,computed:u,methods:l,watch:c,provide:f,inject:d,c
1omponents:p,directives:g,beforeMount:y,mounted:x,beforeUpdate:w,updated:_,activated:T,deactivated:E,beforeDestroy:S,beforeUnmount:C,destroyed:O,unmounted:M,render:P,renderTracked:k,renderTriggered:L,errorCaptured:D,expose:F}=e,N=t.proxy,B=t.ctx,U=t.appContext.mixins;if(s&&P&&t.render===m&&(t.render=P),s||(un=!0,cn("beforeCreate","bc",e,t,U),un=!1,pn(t,U,i,n,r)),a&&ln(t,a,i,n,r,!0),o&&pn(t,o,i,n,r),d)if(A(d))for(let v=0;v<d.length;v++){const t=d[v];B[t]=hn(t)}else for(const v in d){const t=d[v];I(t)?B[v]=hn(t.from||v,t.default,!0):B[v]=hn(t)}if(l)for(const v in l){const t=l[v];R(t)&&(B[v]=t.bind(N))}if(s?h&&i.push(h):(i.length&&i.forEach((e=>vn(t,e,N))),h&&vn(t,h,N)),u)for(const v in u){const t=u[v],e=Pn({get:R(t)?t.bind(N,N):R(t.get)?t.get.bind(N,N):m,set:!R(t)&&R(t.set)?t.set.bind(N):m});Object.defineProperty(B,v,{enumerable:!0,configurable:!0,get:()=>e.value,set:t=>e.value=t})}var V;if(c&&n.push(c),!s&&n.length&&n.forEach((t=>{for(const e in t)gn(t[e],B,N,e)})),f&&r.push(f),!s&&r.length&&r.forEach((t=>{const e=R(t)?t.call(N):t;Reflect.ownKeys(e).forEach((t=>{an(t,e[t])}))})),s&&(p&&b(t.components||(t.components=b({},t.type.components)),p),g&&b(t.directives||(t.directives=b({},t.type.directives)),g)),s||cn("created","c",e,t,U),y&&ii(y.bind(N)),x&&ni(x.bind(N)),w&&ri(w.bind(N)),_&&si(_.bind(N)),T&&gi(T.bind(N),"a",V),E&&function(t,e){gi(t,"da",e)}(E.bind(N)),D&&((t,e=En)=>{ti("ec",t,e)})(D.bind(N)),k&&ui(k.bind(N)),L&&hi(L.bind(N)),C&&oi(C.bind(N)),M&&ai(M.bind(N)),A(F)&&!s)if(F.length){const e=t.exposed||(t.exposed=se({}));F.forEach((t=>{e[t]=function(t,e){return te(t[e])?t[e]:new oe(t,e)}(N,t)}))}else t.exposed||(t.exposed=v)}function cn(t,e,i,n,r){dn(t,e,r,n);const{extends:s,mixins:o}=i;s&&fn(t,e,s,n),o&&dn(t,e,o,n);const a=i[t];a&&ue(a.bind(n.proxy),n,e)}function fn(t,e,i,n){i.extends&&fn(t,e,i.extends,n);const r=i[t];r&&ue(r.bind(n.proxy),n,e)}function dn(t,e,i,n){for(let r=0;r<i.length;r++){const s=i[r].mixins;s&&dn(t,e,s,n);const o=i[r][t];o&&ue(o.bind(n.proxy),n,e)}}function pn(t,e,i,n,r){for(let s=0;s<e.length;s++)ln(t,e[s],i,n,r,!0)}function vn(t,e,i){const n=e.call(i,i);I(n)&&(t.data===v?t.data=jt(n):b(t.data,n))}function gn(t,e,i,n){const r=n.includes(".")?function(t,e){const i=e.split(".");return()=>{let e=t;for(let t=0;t<i.length&&e;t++)e=e[i[t]];return e}}(i,n):()=>i[n];if(M(t)){const i=e[t];R(i)&&ci(r,i)}else if(R(t))ci(r,t.bind(i));else if(I(t))if(A(t))t.forEach((t=>gn(t,e,i,n)));else{const n=R(t.handler)?t.handler.bind(i):e[t.handler];R(n)&&ci(r,n,t)}}function mn(t,e,i){const n=i.appContext.config.optionMergeStrategies,{mixins:r,extends:s}=e;s&&mn(t,s,i),r&&r.forEach((e=>mn(t,e,i)));for(const o in e)n&&S(n,o)?t[o]=n[o](t[o],e[o],i.proxy,o):t[o]=e[o]}const yn=t=>t&&(t.proxy?t.proxy:yn(t.parent)),xn=b(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>yn(t.parent),$root:t=>t.root&&t.root.proxy,$emit:t=>t.emit,$options:t=>function(t){const e=t.type,{__merged:i,mixins:n,extends:r}=e;if(i)return i;const s=t.appContext.mixins;if(!s.length&&!n&&!r)return e;const o={};return s.forEach((e=>mn(o,e,t))),mn(o,e,t),e.__merged=o}(t),$forceUpdate:t=>()=>Se(t.update),$nextTick:t=>Ee.bind(t.proxy),$watch:t=>di.bind(t)}),wn={get({_:t},e){const{ctx:i,setupState:n,data:r,props:s,accessCache:o,type:a,appContext:h}=t;if("__v_skip"===e)return!0;let u;if("$"!==e[0]){const a=o[e];if(void 0!==a)switch(a){case 0:return n[e];case 1:return r[e];case 3:return i[e];case 2:return s[e]}else{if(n!==v&&S(n,e))return o[e]=0,n[e];if(r!==v&&S(r,e))return o[e]=1,r[e];if((u=t.propsOptions[0])&&S(u,e))return o[e]=2,s[e];if(i!==v&&S(i,e))return o[e]=3,i[e];un||(o[e]=4)}}const l=xn[e];let c,f;return l?("$attrs"===e&&ut(t,0,e),l(t)):(c=a.__cssModules)&&(c=c[e])?c:i!==v&&S(i,e)?(o[e]=3,i[e]):(f=h.config.globalProperties,S(f,e)?f[e]:void 0)},set({_:t},e,i){const{data:n,setupState:r,ctx:s}=t;if(r!==v&&S(r,e))r[e]=i;else if(n!==v&&S(n,e))n[e]=i;else if(e in t.props)return!1;return("$"!==e[0]||!(e.slice(1)in t))&&(s[e]=i,!0)},has({_:{data:t,setupState:e,accessCache:i,ctx:n,appContext:r,propsOptions:s}},o){let a;return void 0!==i[o]||t!==v&&S(t,o)||e!==v&&S(e,o)||(a=s[0])&&S(a,o)||S(n,o)||S(xn,o)||S(r.config.globalProperties,o)}},_n=b({},wn,{get(t,e){if(e!==Symbol.unscopables)return wn.get(t,e,t)},has:(t,e)=>"_"!==e[0]&&!o(e)}),bn=Si();let Tn=0;let En=null;const Sn=t=>{En=t};let An=!1;function Cn(t,e,i){R(e)?t.render=e:I(e)&&(t.setupState=se(e)),On(t)}function On(t,e){const i=t.type;t.render||(t.render=i.render||m,t.render._rc&&(t.withProxy=new Proxy(t.ctx,_n))),En=t,at(),ln(t,i),ht(),En=null}function Rn(t,e=En){e&&(e.effects||(e.effects=[])).push(t)}function Mn(t){return R(t)&&t.displayName||t.name}function Pn(t){const e=function(t){let e,i;return R(t)?(e=t,i=m):(e=t.get,i=t.set),new ae(e,i,R(t)||!t.set)}(t);return Rn(e.effect),e}function In(t,e,i){const n=arguments.length;return 2===n?I(e)&&!A(e)?qi(e)?$i(t,null,[e]):$i(t,e):$i(t,null,e):(n>3?i=Array.prototype.slice.call(arguments,2):3===n&&qi(i)&&(i=[i]),$i(t,e,i))}function kn(t,e){let i;if(A(t)||M(t)){i=new Array(t.length);for(let n=0,r=t.length;n<r;n++)i[n]=e(t[n],n)}else if("number"==typeof t){i=new Array(t);for(let n=0;n<t;n++)i[n]=e(n+1,n)}else if(I(t))if(t[Symbol.iterator])i=Array.from(t,e);else{const n=Object.keys(t);i=new Array(n.length);for(let r=0,s=n.length;r<s;r++){const s=n[r];i[r]=e(t[s],s,r)}}else i=[];return i}const Ln="3.0.5",Dn="http://www.w3.org/2000/svg",Fn="undefined"!=typeof document?document:null;let Nn,Bn;const Un={insert:(t,e,i)=>{e.insertBefore(t,i||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,i)=>e?Fn.createElementNS(Dn,t):Fn.createElement(t,i?{is:i}:void 0),createText:t=>Fn.createTextNode(t),createComment:t=>Fn.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Fn.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},cloneNode:t=>t.cloneNode(!0),insertStaticContent(t,e,i,n){const r=n?Bn||(Bn=Fn.createElementNS(Dn,"svg")):Nn||(Nn=Fn.createElement("div"));r.innerHTML=t;const s=r.firstChild;let o=s,a=o;for(;o;)a=o,Un.insert(o,e,i),o=r.firstChild;return[s,a]}};const Vn=/\s*!important$/;function Yn(t,e,i){if(A(i))i.forEach((i=>Yn(t,e,i)));else if(e.startsWith("--"))t.setProperty(e,i);else{const n=function(t,e){const i=Xn[e];if(i)return i;let n=Y(e);if("filter"!==n&&n in t)return Xn[e]=n;n=G(n);for(let r=0;r<zn.length;r++){const i=zn[r]+n;if(i in t)return Xn[e]=i}return e}(t,e);Vn.test(i)?t.setProperty(X(n),i.replace(Vn,""),"important"):t[n]=i}}const zn=["Webkit","Moz","ms"],Xn={};const Gn="http://www.w3.org/1999/xlink";let Wn=Date.now;"undefined"!=typeof document&&Wn()>document.createEvent("Event").timeStamp&&(Wn=()=>performance.now());let jn=0;const Hn=Promise.resolve(),qn=()=>{jn=0};
1function Kn(t,e,i,n){t.addEventListener(e,i,n)}function Zn(t,e,i,n,r=null){const s=t._vei||(t._vei={}),o=s[e];if(n&&o)o.value=n;else{const[i,a]=function(t){let e;if(Qn.test(t)){let i;for(e={};i=t.match(Qn);)t=t.slice(0,t.length-i[0].length),e[i[0].toLowerCase()]=!0}return[t.slice(2).toLowerCase(),e]}(e);if(n){Kn(t,i,s[e]=function(t,e){const i=t=>{(t.timeStamp||Wn())>=i.attached-1&&ue(function(t,e){if(A(e)){const i=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{i.call(t),t._stopped=!0},e.map((t=>e=>!e._stopped&&t(e)))}return e}(t,i.value),e,5,[t])};return i.value=t,i.attached=(()=>jn||(Hn.then(qn),jn=Wn()))(),i}(n,r),a)}else o&&(!function(t,e,i,n){t.removeEventListener(e,i,n)}(t,i,o,a),s[e]=void 0)}}const Qn=/(?:Once|Passive|Capture)$/;const Jn=/^on[a-z]/;const $n=t=>{const e=t.props["onUpdate:modelValue"];return A(e)?t=>H(e,t):e};function tr(t){t.target.composing=!0}function er(t){const e=t.target;e.composing&&(e.composing=!1,function(t,e){const i=document.createEvent("HTMLEvents");i.initEvent(e,!0,!0),t.dispatchEvent(i)}(e,"input"))}const ir={created(t,{modifiers:{lazy:e,trim:i,number:n}},r){t._assign=$n(r);const s=n||"number"===t.type;Kn(t,e?"change":"input",(e=>{if(e.target.composing)return;let n=t.value;i?n=n.trim():s&&(n=K(n)),t._assign(n)})),i&&Kn(t,"change",(()=>{t.value=t.value.trim()})),e||(Kn(t,"compositionstart",tr),Kn(t,"compositionend",er),Kn(t,"change",er))},mounted(t,{value:e}){t.value=null==e?"":e},beforeUpdate(t,{value:e,modifiers:{trim:i,number:n}},r){if(t._assign=$n(r),t.composing)return;if(document.activeElement===t){if(i&&t.value.trim()===e)return;if((n||"number"===t.type)&&K(t.value)===e)return}const s=null==e?"":e;t.value!==s&&(t.value=s)}},nr=b({patchProp:(t,e,i,n,r=!1,s,o,h,u)=>{switch(e){case"class":!function(t,e,i){if(null==e&&(e=""),i)t.setAttribute("class",e);else{const i=t._vtc;i&&(e=(e?[e,...i]:[...i]).join(" ")),t.className=e}}(t,n,r);break;case"style":!function(t,e,i){const n=t.style;if(i)if(M(i))e!==i&&(n.cssText=i);else{for(const t in i)Yn(n,t,i[t]);if(e&&!M(e))for(const t in e)null==i[t]&&Yn(n,t,"")}else t.removeAttribute("style")}(t,i,n);break;default:w(e)?_(e)||Zn(t,e,0,n,o):function(t,e,i,n){if(n)return"innerHTML"===e||!!(e in t&&Jn.test(e)&&R(i));if("spellcheck"===e||"draggable"===e)return!1;if("form"===e&&"string"==typeof i)return!1;if("list"===e&&"INPUT"===t.tagName)return!1;if(Jn.test(e)&&M(i))return!1;return e in t}(t,e,n,r)?function(t,e,i,n,r,s,o){if("innerHTML"===e||"textContent"===e)return n&&o(n,r,s),void(t[e]=null==i?"":i);if("value"!==e||"PROGRESS"===t.tagName){if(""===i||null==i){const n=typeof t[e];if(""===i&&"boolean"===n)return void(t[e]=!0);if(null==i&&"string"===n)return t[e]="",void t.removeAttribute(e);if("number"===n)return t[e]=0,void t.removeAttribute(e)}try{t[e]=i}catch(lC){}}else{t._value=i;const e=null==i?"":i;t.value!==e&&(t.value=e)}}(t,e,n,s,o,h,u):("true-value"===e?t._trueValue=n:"false-value"===e&&(t._falseValue=n),function(t,e,i,n){if(n&&e.startsWith("xlink:"))null==i?t.removeAttributeNS(Gn,e.slice(6,e.length)):t.setAttributeNS(Gn,e,i);else{const n=a(e);null==i||n&&!1===i?t.removeAttribute(e):t.setAttribute(e,n?"":i)}}(t,e,n,r))}},forcePatchProp:(t,e)=>"value"===e},Un);let rr;const sr=(...t)=>{const e=(rr||(rr=Ii(nr))).createApp(...t),{mount:i}=e;return e.mount=t=>{const n=function(t){if(M(t)){return document.querySelector(t)}return t}(t);if(!n)return;const r=e._component;R(r)||r.render||r.template||(r.template=n.innerHTML),n.innerHTML="";const s=i(n);return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),s},e};var or="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ar(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function hr(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach((function(i){var n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:function(){return t[i]}})})),e}function ur(t){var e={exports:{}};return t(e,e.exports),e.exports}var lr=ar(ur((function(t,e){var i;window,i=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};
vendor: 13,153 bytes, lines 1-43
1return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1497)}([function(t,e){function i(t,e,i){var n=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&n.value&&"object"==typeof n.value&&(n=n.value),!(!n||! 2/** 3 * @author Richard Davey <[email protected]> 4 * @copyright 2020 Photon Storm Ltd. 5 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6 */ 7function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(n))&&(void 0===n.enumerable&&(n.enumerable=!0),void 0===n.configurable&&(n.configurable=!0),n)}function n(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function r(t,e,r,s){for(var a in e)if(e.hasOwnProperty(a)){var h=i(e,a,r);if(!1!==h){if(n((s||t).prototype,a)){if(o.ignoreFinals)continue;throw new Error("cannot override final property '"+a+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,a,h)}else t.prototype[a]=e[a]}}function s(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)r(t,e[i].prototype||e[i])}}function o(t){var e,i;if(t||(t={}),t.initialize){if("function"!=typeof t.initialize)throw new Error("initialize must be a function");e=t.initialize,delete t.initialize}else if(t.Extends){var n=t.Extends;e=function(){n.apply(this,arguments)}}else e=function(){};t.Extends?(e.prototype=Object.create(t.Extends.prototype),e.prototype.constructor=e,i=t.Extends,delete t.Extends):e.prototype.constructor=e;var o=null;return t.Mixins&&(o=t.Mixins,delete t.Mixins),s(e,o),r(e,t,!0,i),e}o.extend=r,o.mixin=s,o.ignoreFinals=!1,t.exports=o},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e,i){var n=typeof t;return t&&"number"!==n&&"string"!==n&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},function(t,e,i){ 8/** 9 * @author Richard Davey <[email protected]> 10 * @copyright 2020 Photon Storm Ltd. 11 * @license {@link https://opensource.org/licenses/MIT|MIT License} 12 */ 13var n=i(0),r=i(123),s=new n({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new s(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)}});s.ZERO=new s,s.RIGHT=new s(1,0),s.LEFT=new s(-1,0),s.UP=new s(0,-1),s.DOWN=new s(0,1),s.ONE=new s(1,1),t.exports=s},function(t,e,i){ 14/** 15 * @author Richard Davey <[email protected]> 16 * @copyright 2020 Photon Storm Ltd. 17 * @license {@link https://opensource.org/licenses/MIT|MIT License} 18 */ 19var n=i(0),r=i(55),s=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=r.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=s},function(t,e,i){ 20/** 21 * @author Richard Davey <[email protected]> 22 * @copyright 2020 Photon Storm Ltd. 23 * @license {@link https://opensource.org/licenses/MIT|MIT License} 24 */ 25var n=i(0),r=i(24),s=i(21),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(s.BOOT,this.boot,this),this.events.on(s.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(s.DESTROY,this.destroy,this)},start:function(){this.events.once(s.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(s.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},r.register("GameObjectFactory",o,"add"),t.exports=o},function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),r=t,s=i,o=0;o<n.length;o++){if(!r.hasOwnProperty(n[o])){s=i;break}s=r[n[o]],r=r[n[o]]}return s}return i}return i}},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(lC){return!1}return!0}},function(t,e){ 26/** 27 * @author Richard Davey <[email protected]> 28 * @copyright 2020 Photon Storm Ltd. 29 * @license {@link https://opensource.org/licenses/MIT|MIT License} 30 */ 31var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e,i){var n=Object.prototype.hasOwnProperty,r="~";function s(){}function o(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function a(t,e,i,n,s){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new o(i,n||t,s),h=r?r+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function h(t,e){0==--t._eventsCount?t._events=new s:delete t._events[e]}function u(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(r=!1)),u.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(r?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},u.prototype.listeners=function(t){var e=r?r+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,s=i.length,o=new Array(s);n<s;n++)o[n]=i[n].fn;return o},u.prototype.listenerCount=function(t){var e=r?r+t:t,i=this._events[e];return i?i.fn?1:i.length:0},u.prototype.emit=function(t,e,i,n,s,o){var a=r?r+t:t;if(!this._events[a])return!1;var h,u,l=this._events[a],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,i),!0;case 4:return l.fn.call(l.context,e,i,n),!0;case 5:return l.fn.call(l.context,e,i,n,s),!0;case 6:return l.fn.call(l.context,e,i,n,s,o),!0}for(u=1,h=new Array(c-1);u<c;u++)h[u-1]=arguments[u];l.fn.apply(l.context,h)}else{var f,d=l.length;for(u=0;u<d;u++)switch(l[u].once&&this.removeListener(t,l[u].fn,void 0,!0),c){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,e);break;case 3:l[u].fn.call(l[u].context,e,i);break;case 4:l[u].fn.call(l[u].context,e,i,n);break;default:if(!h)for(f=1,h=new Array(c-1);f<c;f++)h[f-1]=arguments[f];l[u].fn.apply(l[u].context,h)}}return!0},u.prototype.on=function(t,e,i){return a(this,t,e,i,!1)},u.prototype.once=function(t,e,i){return a(this,t,e,i,!0)},u.prototype.removeListener=function(t,e,i,n){var s=r?r+t:t;if(!this._events[s])return this;if(!e)return h(this,s),this;var o=this._events[s];if(o.fn)o.fn!==e||n&&!o.once||i&&o.context!==i||h(this,s);else{for(var a=0,u=[],l=o.length;a<l;a++)(o[a].fn!==e||n&&!o[a].once||i&&o[a].context!==i)&&u.push(o[a]);u.length?this._events[s]=1===u.length?u[0]:u:h(this,s)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&h(this,e)):(this._events=new s,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,i){ 32/** 33 * @author Richard Davey <[email protected]> 34 * @copyright 2020 Photon Storm Ltd. 35 * @license {@link https://opensource.org/licenses/MIT|MIT License} 36 */ 37var n=i(0),r=i(56),s=i(167),o=i(300),a=i(55),h=i(45),u=i(170),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return u(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},function(t,e,i){ 38/** 39 * @author Richard Davey <[email protected]> 40 * @copyright 2020 Photon Storm Ltd. 41 * @license {@link https://opensource.org/licenses/MIT|MIT License} 42 */ 43t.exports={Alpha:i(605),AlphaSingle:i(297),BlendMode:i(298),ComputedSize:i(606),Crop:i(607
43),Depth:i(299),Flip:i(608),GetBounds:i(609),Mask:i(303),Origin:i(630),PathFollower:i(631),Pipeline:i(171),ScrollFactor:i(306),Size:i(632),Texture:i(633),TextureCrop:i(634),Tint:i(635),ToJSON:i(173),Transform:i(307),TransformMatrix:i(25),Visible:i(308)}},function(t,e){ 44/** 45 * @author Richard Davey <[email protected]> 46 * @author Felipe Alfonso <@bitnenfer> 47 * @author Matthew Groves <@doormat> 48 * @copyright 2020 Photon Storm Ltd. 49 * @license {@link https://opensource.org/licenses/MIT|MIT License} 50 */ 51function i(t){for(var e="",i=0;i<t;++i)i>0&&(e+="\nelse "),i<t-1&&(e+="if(test == "+i+".0){}");return e}t.exports={getTintFromFloats:function(t,e,i,n){return((255&(255*n|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},checkShaderMax:function(t,e){e&&-1!==e||(e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS));for(var n=t.createShader(t.FRAGMENT_SHADER),r=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");;){var s=r.replace(/%forloop%/gi,i(e));if(t.shaderSource(n,s),t.compileShader(n),t.getShaderParameter(n,t.COMPILE_STATUS))break;e=e/2|0}return e},parseFragmentShaderMaxTextures:function(t,e){if(!t)return"";for(var i="",n=0;n<e;n++)n>0&&(i+="\n\telse "),n<e-1&&(i+="if (outTexId < "+n+".5)"),i+="\n\t{",i+="\n\t\ttexture = texture2D(uMainSampler["+n+"], outTexCoord);",i+="\n\t}";return(t=t.replace(/%count%/gi,e.toString())).replace(/%forloop%/gi,i)}}},function(t,e,i){ 52/** 53 * @author Richard Davey <[email protected]> 54 * @copyright 2020 Photon Storm Ltd. 55 * @license {@link https://opensource.org/licenses/MIT|MIT License} 56 */ 57var n=i(190),r=i(6);t.exports=function(t,e,i){var s=r(t,e,null);if(null===s)return i;if(Array.isArray(s))return n.RND.pick(s);if("object"==typeof s){if(s.hasOwnProperty("randInt"))return n.RND.integerInRange(s.randInt[0],s.randInt[1]);if(s.hasOwnProperty("randFloat"))return n.RND.realInRange(s.randFloat[0],s.randFloat[1])}else if("function"==typeof s)return s(e);return s}},function(t,e){ 58/** 59 * @author Richard Davey <[email protected]> 60 * @copyright 2020 Photon Storm Ltd. 61 * @license {@link https://opensource.org/licenses/MIT|MIT License} 62 */ 63var i={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=i},function(t,e,i){ 64/** 65 * @author Richard Davey <[email protected]> 66 * @copyright 2020 Photon Storm Ltd. 67 * @license {@link https://opensource.org/licenses/MIT|MIT License} 68 */ 69var n=i(0),r=i(173),s=i(98),o=i(9),a=i(75),h=new n({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new s(this)),this},setData:function(t,e){return this.data||(this.data=new s(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new s(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new s(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new s(this)),this.data.get(t)}
vendor: 4,579 bytes, lines 69-93
69,setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},destroy:function(){this.scene&&!this.ignoreDestroy&&(this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.displayList&&(this.displayList.queueDepthSort(),this.displayList.remove(this)),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.displayList=void 0,this.parentContainer=void 0)}});h.RENDER_MASK=15,t.exports=h},function(t,e,i){ 70/** 71 * @author Richard Davey <[email protected]> 72 * @copyright 2020 Photon Storm Ltd. 73 * @license {@link https://opensource.org/licenses/MIT|MIT License} 74 */ 75var n=i(0),r=i(24),s=i(21),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(s.BOOT,this.boot,this),this.events.on(s.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(s.DESTROY,this.destroy,this)},start:function(){this.events.once(s.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(s.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},r.register("GameObjectCreator",o,"make"),t.exports=o},function(t,e,i){ 76/** 77 * @author Richard Davey <[email protected]> 78 * @copyright 2020 Photon Storm Ltd. 79 * @license {@link https://opensource.org/licenses/MIT|MIT License} 80 */ 81var n=i(7),r=function(){var t,e,i,s,o,a,h=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},u=2),l===u&&(h=this,--u);u<l;u++)if(null!=(t=arguments[u]))for(e in t)i=h[e],h!==(s=t[e])&&(c&&s&&(n(s)||(o=Array.isArray(s)))?(o?(o=!1,a=i&&Array.isArray(i)?i:[]):a=i&&n(i)?i:{},h[e]=r(c,a,s)):void 0!==s&&(h[e]=s));return h};t.exports=r},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e,i){ 82/** 83 * @author Richard Davey <[email protected]> 84 * @copyright 2020 Photon Storm Ltd. 85 * @license {@link https://opensource.org/licenses/MIT|MIT License} 86 */ 87var n=i(25),r=new n,s=new n,o=new n,a={camera:r,sprite:s,calc:o};t.exports=function(t,e,i){var n=r,h=s,u=o;return h.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),h.e=t.x,h.f=t.y):(h.e-=e.scrollX*t.scrollFactorX,h.f-=e.scrollY*t.scrollFactorY),n.multiply(h,u),a}},function(t,e){t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19}},function(t,e,i){ 88/** 89 * @author Richard Davey <[email protected]> 90 * @copyright 2020 Photon Storm Ltd. 91 * @license {@link https://opensource.org/licenses/MIT|MIT License} 92 */ 93t.exports={ADDED_TO_SCENE:i(782),BOOT:i(783),CREATE:i(784),DESTROY:i(785),PAUSE:i(786),POST_UPDATE:i(787),PRE_UPDATE:i(788),READY:i(789),REMOVED_FROM_SCENE:i(790),RENDER:i(791),RESUME:i(792),SHUTDOWN:i(793),SLEEP:i(794),START:i(795),TRANSITION_COMPLETE:i(796),TRANSITION_INIT:i(797),TRANSITION_OUT:i(798),TRANSITION_START:i(799),TRANSITION_WAKE:i(800),UPDATE:i(801),WAKE:i(802)}}
vendor: 29,896 bytes, lines 93-213
93,function(t,e,i){ 94/** 95 * @author Richard Davey <[email protected]> 96 * @copyright 2020 Photon Storm Ltd. 97 * @license {@link https://opensource.org/licenses/MIT|MIT License} 98 */ 99t.exports={BLUR:i(610),BOOT:i(611),CONTEXT_LOST:i(612),CONTEXT_RESTORED:i(613),DESTROY:i(614),FOCUS:i(615),HIDDEN:i(616),PAUSE:i(617),POST_RENDER:i(618),POST_STEP:i(619),PRE_RENDER:i(620),PRE_STEP:i(621),READY:i(622),RESUME:i(623),STEP:i(624),VISIBLE:i(625)}},function(t,e,i){ 100/** 101 * @author Richard Davey <[email protected]> 102 * @copyright 2020 Photon Storm Ltd. 103 * @license {@link https://opensource.org/licenses/MIT|MIT License} 104 */ 105var n=i(0),r=i(20),s=i(91),o=i(2),a=i(153),h=i(237),u=i(511),l=i(154),c=new n({initialize:function(t,e){this.loader=t,this.cache=o(e,"cache",!1),this.type=o(e,"type",!1),this.key=o(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.type||!this.key)throw new Error("Invalid Loader."+this.type+" key");var n=o(e,"url");void 0===n?n=t.path+i+"."+o(e,"extension",""):"string"!=typeof n||n.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)||(n=t.path+n),this.url=n,this.src="",this.xhrSettings=l(o(e,"responseType",void 0)),o(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,o(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?r.FILE_POPULATED:r.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=o(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=a(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=u(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&0===t.responseURL.indexOf("file://")&&0===e.target.status,n=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(n=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,n)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(s.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=r.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=r.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=r.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(s.FILE_COMPLETE,e,i,t),this.loader.emit(s.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){ 106/** 107 * @author Richard Davey <[email protected]> 108 * @copyright 2020 Photon Storm Ltd. 109 * @license {@link https://opensource.org/licenses/MIT|MIT License} 110 */ 111var i={},n={},r={register:function(t,e,n,r){void 0===r&&(r=!1),i[t]={plugin:e,mapping:n,custom:r}},registerCustom:function(t,e,i,r){n[t]={plugin:e,mapping:i,data:r}},hasCore:function(t){return i.hasOwnProperty(t)},hasCustom:function(t){return n.hasOwnProperty(t)},getCore:function(t){return i[t]},getCustom:function(t){return n[t]},getCustomClass:function(t){return n.hasOwnProperty(t)?n[t].plugin:null},remove:function(t){i.hasOwnProperty(t)&&delete i[t]},removeCustom:function(t){n.hasOwnProperty(t)&&delete n[t]},destroyCorePlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]},destroyCustomPlugins:function(){for(var t in n)n.hasOwnProperty(t)&&delete n[t]}};t.exports=r},function(t,e,i){ 112/** 113 * @author Richard Davey <[email protected]> 114 * @copyright 2020 Photon Storm Ltd. 115 * @license {@link https://opensource.org/licenses/MIT|MIT License} 116 */ 117var n=i(0),r=i(14),s=i(3),o=new n({initialize:function(t,e,i,n,r,s){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=0),this.matrix=new Float32Array([t,e,i,n,r,s,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||s?r.TAU-(s>0?Math.acos(-n/this.scaleY):-Math.acos(n/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,r=n[0],s=n[1],o=n[2],a=n[3];return n[0]=r*i+o*e,n[1]=s*i+a*e,n[2]=r*-e+o*i,n[3]=s*-e+a*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,r=i[0],s=i[1],o=i[2],a=i[3],h=i[4],u=i[5],l=n[0],c=n[1],f=n[2],d=n[3],p=n[4],v=n[5],g=void 0===e?this:e;return g.a=l*r+c*o,g.b=l*s+c*a,g.c=f*r+d*o,g.d=f*s+d*a,g.e=p*r+v*o+h,g.f=p*s+v*a+u,g},multiplyWithOffset:function(t,e,i){var n=this.matrix,r=t.matrix,s=n[0],o=n[1],a=n[2],h=n[3],u=e*s+i*a+n[4],l=e*o+i*h+n[5],c=r[0],f=r[1],d=r[2],p=r[3],v=r[4],g=r[5];return n[0]=c*s+f*a,n[1]=c*o+f*h,n[2]=d*s+p*a,n[3]=d*o+p*h,n[4]=v*s+g*a+u,n[5]=v*o+g*h+l,this},transform:function(t,e,i,n,r,s){var o=this.matrix,a=o[0],h=o[1],u=o[2],l=o[3],c=o[4],f=o[5];return o[0]=t*a+e*u,o[1]=t*h+e*l,o[2]=i*a+n*u,o[3]=i*h+n*l,o[4]=r*a+s*u+c,o[5]=r*h+s*l+f,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=n[4],u=n[5];return i.x=t*r+e*o+h,i.y=t*s+e*a+u,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=e*r-i*n;return t[0]=r/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-r*s)/a,t[5]=-(e*o-i*s)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,n,r,s){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=r,o[5]=s,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],r=e[2],s=e[3],o=i*s-n*r;if(t.translateX=e[4],t.translateY=e[5],i||n){var a=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(r||s){var h=Math.sqrt(r*r+s*s);t.rotation=.5*Math.PI-(s>0?Math.acos(-r/h):-Math.acos(r/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,n,r){var s=this.matrix,o=Math.sin(i),a=Math.cos(i);return s[4]=t,s[5]=e,s[0]=a*n,s[1]=o*n,s[2]=-o*r,s[3]=a*r,this},applyInverse:function(t,e,i){void 0===i&&(i=new s);var n=this.matrix,r=n[0],o=n[1],a=n[2],h=n[3],u=n[4],l=n[5],c=1/(r*h+a*-o);return i.x=h*c*t+-a*c*e+(l*a-u*h)*c,i.y=r*c*e+-o*c*t+(-l*r+u*o)*c,i},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var n=this.getX(t,e);return i&&(n=Math.round(n)),n},getYRound:function(t,e,i){var n=this.getY(t,e);return i&&(n=Math.round(n)),n},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=o},function(t,e,i){ 118/** 119 * @author Richard Davey <[email protected]> 120 * @copyright 2020 Photon Storm Ltd. 121 * @license {@link https://opensource.org/licenses/MIT|MIT License} 122 */ 123var n=i(2);t.exports=function(t,e,i,r,s,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=o.width),void 0===r&&(r=o.height),s||(s={});var a=n(s,"isNotEmpty",!1),h=n(s,"isColliding",!1),u=n(s,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(r+=e,e=0),t+i>o.width&&(i=Math.max(o.width-t,0)),e+r>o.height&&(r=Math.max(o.height-e,0));for(var l=[],c=e;c<e+r;c++)for(var f=t;f<t+i;f++){var d=o.data[c][f];if(null!==d){if(a&&-1===d.index)continue;if(h&&!d.collides)continue;if(u&&!d.hasInterestingFace)continue;l.push(d)}}return l}},function(t,e){t.exports=function(t,e,i,n,r,s){var o;void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=1);var a=0,h=t.length;if(1===s)for(o=r;o<h;o++)t[o][e]=i+a*n,a++;else for(o=r;o>=0;o--)t[o][e]=i+a*n,a++;return t}},function(t,e,i){ 124/** 125 * @author Richard Davey <[email protected]> 126 * @copyright 2020 Photon Storm Ltd. 127 * @license {@link https://opensource.org/licenses/MIT|MIT License} 128 */ 129var n=i(34),r=i(13);t.exports=function(t,e,i){e.x=r(i,"x",0),e.y=r(i,"y",0),e.depth=r(i,"depth",0),e.flipX=r(i,"flipX",!1),e.flipY=r(i,"flipY",!1);var s=r(i,"scale",null);"number"==typeof s?e.setScale(s):null!==s&&(e.scaleX=r(s,"x",1),e.scaleY=r(s,"y",1));var o=r(i,"scrollFactor",null);"number"==typeof o?e.setScrollFactor(o):null!==o&&(e.scrollFactorX=r(o,"x",1),e.scrollFactorY=r(o,"y",1)),e.rotation=r(i,"rotation",0);var a=r(i,"angle",null);null!==a&&(e.angle=a),e.alpha=r(i,"alpha",1);var h=r(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var u=r(h,"x",.5),l=r(h,"y",.5);e.setOrigin(u,l)}return e.blendMode=r(i,"blendMode",n.NORMAL),e.visible=r(i,"visible",!0),r(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},function(t,e){ 130/** 131 * @author Richard Davey <[email protected]> 132 * @copyright 2020 Photon Storm Ltd. 133 * @license {@link https://opensource.org/licenses/MIT|MIT License} 134 */ 135t.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},function(t,e,i){ 136/** 137 * @author Richard Davey <[email protected]> 138 * @copyright 2020 Photon Storm Ltd. 139 * @license {@link https://opensource.org/licenses/MIT|MIT License} 140 */ 141var n=i(19);t.exports=function(t,e,i,r,s){var o=r.alpha*i.alpha;if(o<=0)return!1;var a=n(i,r,s).calc;return e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=o,e.save(),a.setToContext(e),e.imageSmoothingEnabled=!(!t.antialias||i.frame&&i.frame.source.scaleMode),!0}},function(t,e,i){ 142/** 143 * @author Richard Davey <[email protected]> 144 * @copyright 2020 Photon Storm Ltd. 145 * @license {@link https://opensource.org/licenses/MIT|MIT License} 146 */ 147var n,r,s,o=i(32),a=i(189),h=[],u=!1;t.exports=(s=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return n(t,e,i,o.CANVAS)},create:n=function(t,e,i,n,s){var l;void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=o.CANVAS),void 0===s&&(s=!1);var c=r(n);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:n},n===o.CANVAS&&h.push(c),l=c.canvas):(c.parent=t,l=c.canvas),s&&(c.parent=l),l.width=e,l.height=i,u&&n===o.CANVAS&&a.disable(l.getContext("2d")),l},createWebGL:function(t,e,i){return n(t,e,i,o.WEBGL)},disableSmoothing:function(){u=!0},enableSmoothing:function(){u=!1},first:r=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e<h.length;e++){var i=h[e];if(!i.parent&&i.type===t)return i}return null},free:function(){return h.length-s()},pool:h,remove:function(t){var e=t instanceof HTMLCanvasElement;h.forEach((function(i){(e&&i.canvas===t||!e&&i.parent===t)&&(i.parent=null,i.canvas.width=1,i.canvas.height=1)}))},total:s})},function(t,e,i){ 148/** 149 * @author Richard Davey <[email protected]> 150 * @copyright 2020 Photon Storm Ltd. 151 * @license {@link https://opensource.org/licenses/MIT|MIT License} 152 */ 153var n={VERSION:"3.52.0",BlendModes:i(34),ScaleModes:i(164),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=n},function(t,e,i){ 154/** 155 * @author Richard Davey <[email protected]> 156 * @copyright 2020 Photon Storm Ltd. 157 * @license {@link https://opensource.org/licenses/MIT|MIT License} 158 */ 159var n=i(0),r=i(11),s=i(15),o=i(45),a=i(65),h=new n({Extends:s,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Transform,r.Visible],initialize:function(t,e,i){void 0===e&&(e="Shape"),s.call(this,t,e),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new o,this.width=0,this.height=0,this.initPipeline(a.GRAPHICS_PIPELINE)},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.isFilled=!1:(this.fillColor=t,this.fillAlpha=e,this.isFilled=!0),this},setStrokeStyle:function(t,e,i){return void 0===i&&(i=1),void 0===t?this.isStroked=!1:(this.lineWidth=t,this.strokeColor=e,this.strokeAlpha=i,this.isStroked=!0),this},setClosePath:function(t){return this.closePath=t,this},setSize:function(t,e){return this.width=t,this.height=e,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}});t.exports=h},function(t,e){ 160/** 161 * @author Richard Davey <[email protected]> 162 * @copyright 2020 Photon Storm Ltd. 163 * @license {@link https://opensource.org/licenses/MIT|MIT License} 164 */ 165t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},function(t,e,i){ 166/** 167 * @author Richard Davey <[email protected]> 168 * @copyright 2020 Photon Storm Ltd. 169 * @license {@link https://opensource.org/licenses/MIT|MIT License} 170 */ 171var n=i(14);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){ 172/** 173 * @author Richard Davey <[email protected]> 174 * @copyright 2020 Photon Storm Ltd. 175 * @license {@link https://opensource.org/licenses/MIT|MIT License} 176 */ 177t.exports={DESTROY:i(719),FADE_IN_COMPLETE:i(720),FADE_IN_START:i(721),FADE_OUT_COMPLETE:i(722),FADE_OUT_START:i(723),FLASH_COMPLETE:i(724),FLASH_START:i(725),FOLLOW_UPDATE:i(726),PAN_COMPLETE:i(727),PAN_START:i(728),POST_RENDER:i(729),PRE_RENDER:i(730),ROTATE_COMPLETE:i(731),ROTATE_START:i(732),SHAKE_COMPLETE:i(733),SHAKE_START:i(734),ZOOM_COMPLETE:i(735),ZOOM_START:i(736)}},function(t,e,i){ 178/** 179 * @author Richard Davey <[email protected]> 180 * @copyright 2020 Photon Storm Ltd. 181 * @license {@link https://opensource.org/licenses/MIT|MIT License} 182 */ 183var n=i(0),r=i(100),s=i(322),o=i(185),a=i(323),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,n)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(t,e,i,n,r){return void 0===n&&(n=255),void 0===r&&(r=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=n,this._locked=!1,this.update(r)},setGLTo:function(t,e,i,n){return void 0===n&&(n=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=n,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return o(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,n=this.b,o=this.a;return this._color=r(e,i,n),this._color32=s(e,i,n,o),this._rgba="rgba("+e+","+i+","+n+","+o/255+")",t&&a(e,i,n,this),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return a(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),n=Math.floor(t+Math.random()*(e-t)),r=Math.floor(t+Math.random()*(e-t));return this.setTo(i,n,r)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,n=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),n=Math.max(0,Math.min(255,n-Math.round(-t/100*255))),this.setTo(e,i,n)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,o(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,o(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,o(this._h,this._s,t,this)}}});t.exports=h},function(t,e,i){ 184/** 185 * @author Richard Davey <[email protected]> 186 * @copyright 2020 Photon Storm Ltd. 187 * @license {@link https://opensource.org/licenses/MIT|MIT License} 188 */ 189var n=new(i(0))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new n(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,n=t.y,r=t.z,s=e.x,o=e.y,a=e.z;return this.x=n*a-r*o,this.y=r*s-i*a,this.z=i*o-n*s,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z;return this.x=i*o-n*s,this.y=n*r-e*o,this.z=e*s-i*r,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this},applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=r[0]*e+r[3]*i+r[6]*n,this.y=r[1]*e+r[4]*i+r[7]*n,this.z=r[2]*e+r[5]*i+r[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=1/(r[3]*e+r[7]*i+r[11]*n+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*n+r[12])*s,this.y=(r[1]*e+r[5]*i+r[9]*n+r[13])*s,this.z=(r[2]*e+r[6]*i+r[10]*n+r[14])*s,this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=e*r[0]+i*r[3]+n*r[6],this.y=e*r[1]+i*r[4]+n*r[7],this.z=e*r[2]+i*r[5]+n*r[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12],this.y=r[1]*e+r[5]*i+r[9]*n+r[13],this.z=r[2]*e+r[6]*i+r[10]*n+r[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=e*r[0]+i*r[4]+n*r[8]+r[12],o=e*r[1]+i*r[5]+n*r[9]+r[13],a=e*r[2]+i*r[6]+n*r[10]+r[14],h=e*r[3]+i*r[7]+n*r[11]+r[15];return this.x=s/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z,a=t.w,h=a*e+s*n-o*i,u=a*i+o*e-r*n,l=a*n+r*i-s*e,c=-r*e-s*i-o*n;return this.x=h*a+c*-r+u*-o-l*-s,this.y=u*a+c*-s+l*-r-h*-o,this.z=l*a+c*-o+h*-s-u*-r,this},project:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=r[0],o=r[1],a=r[2],h=r[3],u=r[4],l=r[5],c=r[6],f=r[7],d=r[8],p=r[9],v=r[10],g=r[11],m=r[12],y=r[13],x=r[14],w=1/(e*h+i*f+n*g+r[15]);return this.x=(e*s+i*u+n*d+m)*w,this.y=(e*o+i*l+n*p+y)*w,this.z=(e*a+i*c+n*v+x)*w,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,n=t.y,r=t.z,s=t.w,o=this.x-i,a=s-this.y-1-n,h=this.z;return this.x=2*o/r-1,this.y=2*a/s-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},function(t,e){ 190/** 191 * @author Richard Davey <[email protected]> 192 * @copyright 2020 Photon Storm Ltd. 193 * @license {@link https://opensource.org/licenses/MIT|MIT License} 194 */ 195t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},function(t,e){t.exports=function(t){return t.y+t.height-t.height*t.originY}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX}},function(t,e){t.exports=function(t){return t.x+t.width-t.width*t.originX}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY}},function(t,e){t.exports=function(t,e,i,n,r,s){var o;void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=1);var a=0,h=t.length;if(1===s)for(o=r;o<h;o++)t[o][e]+=i+a*n,a++;else for(o=r;o>=0;o--)t[o][e]+=i+a*n,a++;return t}},function(t,e,i){ 196/** 197 * @author Richard Davey <[email protected]> 198 * @copyright 2020 Photon Storm Ltd. 199 * @license {@link https://opensource.org/licenses/MIT|MIT License} 200 */ 201var n=i(0),r=i(301),s=i(168),o=i(55),a=i(169),h=i(3),u=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return s(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=u},function(t,e){t.exports=function(t,e,i,n){var r=i||e.fillColor,s=n||e.fillAlpha,o=(16711680&r)>>>16,a=(65280&r)>>>8,h=255&r;t.fillStyle="rgba("+o+","+a+","+h+","+s+")"}},function(t,e,i){ 202/** 203 * @author Richard Davey <[email protected]> 204 * @copyright 2020 Photon Storm Ltd. 205 * @license {@link https://opensource.org/licenses/MIT|MIT License} 206 */ 207var n=new(i(0))({initialize:function(t,e,i,n){var r=[];n.forEach((function(t){t&&r.push(t)})),this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=r,this.complete=!1,this.pending=r.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var s=0;s<r.length;s++)r[s].multiFile=this},isReadyToProcess:function(){return 0===this.pending&&0===this.failed&&!this.complete},addToMultiFile:function(t){return this.files.push(t),t.multiFile=this,this.pending++,this.complete=!1,this},onFileComplete:function(t){-1!==this.files.indexOf(t)&&this.pending--},onFileFailed:function(t){-1!==this.files.indexOf(t)&&this.failed++}});t.exports=n},function(t,e){t.exports=function(t,e,i,n){var r=t-i,s=e-n;return Math.sqrt(r*r+s*s)}},function(t,e,i){ 208/** 209 * @author Richard Davey <[email protected]> 210 * @copyright 2020 Photon Storm Ltd. 211 * @license {@link https://opensource.org/licenses/MIT|MIT License} 212 */ 213t.exports={BOOT:i(918),DESTROY:i(919),DRAG_END:i(920),DRAG_ENTER:i(921),DRAG:i(922),DRAG_LEAVE:i(923),DRAG_OVER:i(924),DRAG_START:i(925),DROP:i(926),GAME_OUT:i(927),GAME_OVER:i(928),GAMEOBJECT_DOWN:i(929),GAMEOBJECT_DRAG_END:i(930),GAMEOBJECT_DRAG_ENTER:i(931),GAMEOBJECT_DRAG:i(932),GAMEOBJECT_DRAG_LEAVE:i(933),GAMEOBJECT_DRAG_OVER:i(934),GAMEOBJECT_DRAG_START:i(935),GAMEOBJECT_DROP:i(936),GAMEOBJECT_MOVE:i(937),GAMEOBJECT_OUT:i(938),GAMEOBJECT_OVER:i(939),GAMEOBJECT_POINTER_DOWN:i(940),GAMEOBJECT_POINTER_MO
vendor: 4,484 bytes, line 213
213VE:i(941),GAMEOBJECT_POINTER_OUT:i(942),GAMEOBJECT_POINTER_OVER:i(943),GAMEOBJECT_POINTER_UP:i(944),GAMEOBJECT_POINTER_WHEEL:i(945),GAMEOBJECT_UP:i(946),GAMEOBJECT_WHEEL:i(947),MANAGER_BOOT:i(948),MANAGER_PROCESS:i(949),MANAGER_UPDATE:i(950),POINTER_DOWN:i(951),POINTER_DOWN_OUTSIDE:i(952),POINTER_MOVE:i(953),POINTER_OUT:i(954),POINTER_OVER:i(955),POINTER_UP:i(956),POINTER_UP_OUTSIDE:i(957),POINTER_WHEEL:i(958),POINTERLOCK_CHANGE:i(959),PRE_UPDATE:i(960),SHUTDOWN:i(961),START:i(962),UPDATE:i(963)}},function(t,e){var i={};t.exports=i,function(){i._nextId=0,i._seed=0,i._nowStartTime=+new Date,i.extend=function(t,e){var n,r;"boolean"==typeof e?(n=2,r=e):(n=1,r=!0);for(var s=n;s<arguments.length;s++){var o=arguments[s];if(o)for(var a in o)r&&o[a]&&o[a].constructor===Object?t[a]&&t[a].constructor!==Object?t[a]=o[a]:(t[a]=t[a]||{},i.extend(t[a],r,o[a])):t[a]=o[a]}return t},i.clone=function(t,e){return i.extend({},e,t)},i.keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var i in t)e.push(i);return e},i.values=function(t){var e=[];if(Object.keys){for(var i=Object.keys(t),n=0;n<i.length;n++)e.push(t[i[n]]);return e}for(var r in t)e.push(t[r]);return e},i.get=function(t,e,i,n){e=e.split(".").slice(i,n);for(var r=0;r<e.length;r+=1)t=t[e[r]];return t},i.set=function(t,e,n,r,s){var o=e.split(".").slice(r,s);return i.get(t,e,0,-1)[o[o.length-1]]=n,n},i.shuffle=function(t){for(var e=t.length-1;e>0;e--){var n=Math.floor(i.random()*(e+1)),r=t[e];t[e]=t[n],t[n]=r}return t},i.choose=function(t){return t[Math.floor(i.random()*t.length)]},i.isElement=function(t){return"undefined"!=typeof HTMLElement?t instanceof HTMLElement:!!(t&&t.nodeType&&t.nodeName)},i.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},i.isFunction=function(t){return"function"==typeof t},i.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},i.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)},i.clamp=function(t,e,i){return t<e?e:t>i?i:t},i.sign=function(t){return t<0?-1:1},i.now=function(){if("undefined"!=typeof window&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-i._nowStartTime},i.random=function(e,i){return i=void 0!==i?i:1,(e=void 0!==e?e:0)+t()*(i-e)};var t=function(){return i._seed=(9301*i._seed+49297)%233280,i._seed/233280};i.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},i.logLevel=1,i.log=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.info=function(){console&&i.logLevel>0&&i.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.warn=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.nextId=function(){return i._nextId++},i.indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1},i.map=function(t,e){if(t.map)return t.map(e);for(var i=[],n=0;n<t.length;n+=1)i.push(e(t[n]));return i},i.topologicalSort=function(t){var e=[],n=[],r=[];for(var s in t)n[s]||r[s]||i._topologicalSort(s,n,r,t,e);return e},i._topologicalSort=function(t,e,n,r,s){var o=r[t]||[];n[t]=!0;for(var a=0;a<o.length;a+=1){var h=o[a];n[h]||e[h]||i._topologicalSort(h,e,n,r,s)}n[t]=!1,e[t]=!0,s.push(t)},i.chain=function(){for(var t=[],e=0;e<arguments.length;e+=1){var i=arguments[e];i._chained?t.push.apply(t,i._chained):t.push(i)}var n=function(){for(var e,i=new Array(arguments.length),n=0,r=arguments.length;n<r;n++)i[n]=arguments[n];for(n=0;n<t.length;n+=1){var s=t[n].apply(e,i);void 0!==s&&(e=s)}return e};return n._chained=t,n},i.chainPathBefore=function(t,e,n){return i.set(t,e,i.chain(n,i.get(t,e)))},i.chainPathAfter=function(t,e,n){return i.set(t,e,i.chain(i.get(t,e),n))}}()},function(t,e){t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},function(t,e){t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},function(t,e){t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},function(t,e){t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}}
213,function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i}},function(t,e,i){ 214/** 215 * @author Richard Davey <[email protected]> 216 * @copyright 2020 Photon Storm Ltd. 217 * @license {@link https://opensource.org/licenses/MIT|MIT License} 218 */ 219var n=i(0),r=i(172),s=i(9),o=i(368),a=i(2),h=i(67),u=i(88),l=i(139),c=i(12),f=i(369),d=new n({Extends:s,initialize:function(t){s.call(this);var e=t.game,i=e.renderer,n=i.gl;this.name=a(t,"name","WebGLPipeline"),this.game=e,this.renderer=i,this.manager,this.gl=n,this.view=e.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.topology=a(t,"topology",n.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.currentUnit=0,this.forceZero=a(t,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=t},boot:function(){var t,e=this.gl,i=this.config,n=this.renderer;this.isPostFX||(this.projectionMatrix=(new h).identity());var r=this.renderTargets,s=a(i,"renderTarget",!1);"boolean"==typeof s&&s&&(s=1);var c=n.width,f=n.height;if("number"==typeof s)for(t=0;t<s;t++)r.push(new l(n,c,f,1,0,!0));else if(Array.isArray(s))for(t=0;t<s.length;t++){var d=a(s[t],"scale",1),p=a(s[t],"minFilter",0),v=a(s[t],"autoClear",1);r.push(new l(n,c,f,d,p,v))}r.length&&(this.currentRenderTarget=r[0]),this.setShadersFromConfig(i);var g=this.shaders,m=0;for(t=0;t<g.length;t++)g[t].vertexSize>m&&(m=g[t].vertexSize);var y=a(i,"batchSize",n.config.batchSize);this.vertexCapacity=6*y;var x=new ArrayBuffer(this.vertexCapacity*m);this.vertexData=x,this.bytes=new Uint8Array(x),this.vertexViewF32=new Float32Array(x),this.vertexViewU32=new Uint32Array(x);var w=a(i,"vertices",null);for(w?(this.vertexViewF32.set(w),this.vertexBuffer=n.createVertexBuffer(x,e.STATIC_DRAW)):this.vertexBuffer=n.createVertexBuffer(x.byteLength,e.DYNAMIC_DRAW),this.setVertexBuffer(),t=g.length-1;t>=0;t--)g[t].rebind();this.hasBooted=!0,n.on(u.RESIZE,this.resize,this),n.on(u.PRE_RENDER,this.onPreRender,this),n.on(u.RENDER,this.onRender,this),n.on(u.POST_RENDER,this.onPostRender,this),this.emit(o.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(t,e){var i=this.renderer;return t===this.currentShader&&i.currentProgram===this.currentShader.program||(this.flush(),i.resetTextures(),this.setVertexBuffer()&&!e&&(e=!0),t.bind(e,!1),this.currentShader=t),this},getShaderByName:function(t){for(var e=this.shaders,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},setShadersFromConfig:function(t){var e,i=this.shaders,n=this.renderer;for(e=0;e<i.length;e++)i[e].destroy();var s="vertShader",o="fragShader",h="attributes",u=a(t,s,null),l=c.parseFragmentShaderMaxTextures(a(t,o,null),n.maxTextures),d=a(t,h,null),p=a(t,"shaders",[]),v=p.length;if(0===v)u&&l&&(this.shaders=[new f(this,"default",u,l,r(d))]);else{var g=[];for(e=0;e<v;e++){var m=p[e],y=a(m,"name","default"),x=a(m,s,u),w=c.parseFragmentShaderMaxTextures(a(m,o,l),n.maxTextures),_=a(m,h,d);x&&w&&g.push(new f(this,y,x,w,r(_)))}this.shaders=g}return 0===this.shaders.length?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},setGameObject:function(t,e){return void 0===e&&(e=t.frame),this.currentUnit=this.renderer.setTextureSource(e.source),this.currentUnit},shouldFlush:function(t){return void 0===t&&(t=0),this.vertexCount+t>this.vertexCapacity},resize:function(t,e){t===this.width&&e===this.height||this.flush(),this.width=t,this.height=e;for(var i=this.renderTargets,n=0;n<i.length;n++)i[n].resize(t,e);return this.setProjectionMatrix(t,e),this.emit(o.RESIZE,t,e,this),this.onResize(t,e),this},setProjectionMatrix:function(t,e){var i=this.projectionMatrix;if(!i)return this;this.projectionWidth=t,this.projectionHeight=e,i.ortho(0,t,e,0,-1e3,1e3);for(var n=this.shaders,r="uProjectionMatrix",s=0;s<n.length;s++){var o=n[s];o.hasUniform(r)&&(o.resetUniform(r),o.setMatrix4fv(r,!1,i.val,o))}return this},updateProjectionMatrix:function(){if(this.projectionMatrix){var t=this.renderer.projectionWidth,e=this.renderer.projectionHeight;this.projectionWidth===t&&this.projectionHeight===e||this.setProjectionMatrix(t,e)}},bind:function(t){void 0===t&&(t=this.currentShader);var e=this.setVertexBuffer();
219return t.bind(e),this.currentShader=t,this.emit(o.BIND,this,t),this.onActive(t),this},rebind:function(){this.setVertexBuffer();for(var t=this.shaders,e=t.length-1;e>=0;e--)this.currentShader=t[e].rebind();return this.emit(o.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this},setVertexBuffer:function(){var t=this.gl,e=this.vertexBuffer;return t.getParameter(t.ARRAY_BUFFER_BINDING)!==e&&(t.bindBuffer(t.ARRAY_BUFFER,e),!0)},preBatch:function(t){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(t),this},postBatch:function(t){return this.onDraw(this.currentRenderTarget),this.onPostBatch(t),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(t){if(void 0===t&&(t=!1),this.vertexCount>0){this.emit(o.BEFORE_FLUSH,this,t),this.onBeforeFlush(t);var e=this.gl,i=this.vertexCount,n=this.currentShader.vertexSize;this.active&&(this.setVertexBuffer(),i===this.vertexCapacity?e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,this.bytes.subarray(0,i*n)),e.drawArrays(this.topology,0,i)),this.vertexCount=0,this.emit(o.AFTER_FLUSH,this,t),this.onAfterFlush(t)}return this},onActive:function(){},onBind:function(){},onRebind:function(){},onBatch:function(){},onPreBatch:function(){},onPostBatch:function(){},onPreRender:function(){},onRender:function(){},onPostRender:function(){},onBeforeFlush:function(){},onAfterFlush:function(){},batchVert:function(t,e,i,n,r,s,o){var a=this.vertexViewF32,h=this.vertexViewU32,u=this.vertexCount*this.currentShader.vertexComponentCount-1;
219a[++u]=t,a[++u]=e,a[++u]=i,a[++u]=n,a[++u]=r,a[++u]=s,h[++u]=o,this.vertexCount++},batchQuad:function(t,e,i,n,r,s,o,a,h,u,l,c,f,d,p,v,g,m,y,x){void 0===x&&(x=this.currentUnit);var w=!1;return this.shouldFlush(6)&&(this.flush(),w=!0,x=this.setTexture2D(y)),this.batchVert(e,i,u,l,x,m,d),this.batchVert(n,r,u,f,x,m,v),this.batchVert(s,o,c,f,x,m,g),this.batchVert(e,i,u,l,x,m,d),this.batchVert(s,o,c,f,x,m,g),this.batchVert(a,h,c,l,x,m,p),this.onBatch(t),w},batchTri:function(t,e,i,n,r,s,o,a,h,u,l,c,f,d,p,v,g){void 0===g&&(g=this.currentUnit);var m=!1;return this.shouldFlush(3)&&(this.flush(),m=!0,g=this.setTexture2D(v)),this.batchVert(e,i,a,h,g,p,c),this.batchVert(n,r,a,l,g,p,f),this.batchVert(s,o,u,l,g,p,d),this.onBatch(t),m},drawFillRect:function(t,e,i,n,r,s,o,a){void 0===o&&(o=this.renderer.whiteTexture.glTexture),void 0===a&&(a=!0),t=Math.floor(t),e=Math.floor(e);var h=Math.floor(t+i),u=Math.floor(e+n),l=this.setTexture2D(o),f=c.getTintAppendFloatAlphaAndSwap(r,s),d=0,p=1;a&&(d=1,p=0),this.batchQuad(null,t,e,t,u,h,u,h,e,0,d,1,p,f,f,f,f,0,o,l)},setTexture2D:function(t){return void 0===t&&(t=this.renderer.whiteTexture.glTexture),this.currentUnit=this.renderer.setTexture2D(t),this.currentUnit},bindTexture:function(t,e){void 0===e&&(e=0);var i=this.gl;return i.activeTexture(i.TEXTURE0+e),i.bindTexture(i.TEXTURE_2D,t),this},bindRenderTarget:function(t,e){return this.bindTexture(t.texture,e)},setTime:function(t){return this.set1f(t,this.game.loop.getDuration()),this},set1f:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1f(t,e),this},set2f:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.set2f(t,e,i),this},set3f:function(t,e,i,n,r){return void 0===r&&(r=this.currentShader),r.set3f(t,e,i,n),this},set4f:function(t,e,i,n,r,s){return void 0===s&&(s=this.currentShader),s.set4f(t,e,i,n,r),this},set1fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1fv(t,e),this},set2fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set2fv(t,e),this},set3fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set3fv(t,e),this},set4fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set4fv(t,e),this},set1iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1iv(t,e),this},set2iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set2iv(t,e),this},set3iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set3iv(t,e),this},set4iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set4iv(t,e),this},set1i:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1i(t,e),this},set2i:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.set2i(t,e,i),this},set3i:function(t,e,i,n,r){return void 0===r&&(r=this.currentShader),r.set3i(t,e,i,n),this},set4i:function(t,e,i,n,r,s){return void 0===s&&(s=this.currentShader),s.set4i(t,e,i,n,r),this},setMatrix2fv:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.setMatrix2fv(t,e,i),this},setMatrix3fv:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.setMatrix3fv(t,e,i),this},setMatrix4fv:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.setMatrix4fv(t,e,i),this},destroy:function(){var t;this.emit(o.DESTROY,this);var e=this.shaders;for(t=0;t<e.length;t++)e[t].destroy();var i=this.renderTargets;for(t=0;t<i.length;t++)i[t].destroy();this.gl.deleteBuffer(this.vertexBuffer);var n=this.renderer;return n.off(u.RESIZE,this.resize,this),n.off(u.PRE_RENDER,this.onPreRender,this),n.off(u.RENDER,this.onRender,this),n.off(u.POST_RENDER,this.onPostRender,this),this.removeAllListeners(),this.game=null,this.renderer=null,this.manager=null,this.gl=null,this.view=null,this.shaders=null,this.renderTargets=null,this.bytes=null,this.vertexViewF32=null,this.vertexViewU32=null,this.vertexData=null,this.vertexBuffer=null,this.currentShader=null,this.currentRenderTarget=null,this}});t.exports=d},function(t,e){t.exports=function(t,e,i,n){var r=i||e.strokeColor,s=n||e.strokeAlpha,o=(16711680&r)>>>16,a=(65280&r)>>>8,h=255&r;t.strokeStyle="rgba("+o+","+a+","+h+","+s+")",t.lineWidth=e.lineWidth}}
vendor: 15,461 bytes, lines 219-249
219,function(t,e,i){ 220/** 221 * @author Richard Davey <[email protected]> 222 * @copyright 2020 Photon Storm Ltd. 223 * @license {@link https://opensource.org/licenses/MIT|MIT License} 224 */ 225var n=i(0),r=i(20),s=i(23),o=i(8),a=i(2),h=i(6),u=i(7),l=new n({Extends:s,initialize:function(t,e,i,n,o){var l="json";if(u(e)){var c=e;e=a(c,"key"),i=a(c,"url"),n=a(c,"xhrSettings"),l=a(c,"extension",l),o=a(c,"dataKey",o)}var f={type:"json",cache:t.cacheManager.json,extension:l,responseType:"text",key:e,url:i,xhrSettings:n,config:o};s.call(this,t,f),u(i)&&(this.data=o?h(i,o):i,this.state=r.FILE_POPULATED)},onProcess:function(){if(this.state!==r.FILE_POPULATED){this.state=r.FILE_PROCESSING;var t=JSON.parse(this.xhrLoader.responseText),e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new l(this,t[r]));else this.addFile(new l(this,t,e,n,i));return this})),t.exports=l},function(t,e){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e,i){ 226/** 227 * @author Richard Davey <[email protected]> 228 * @copyright 2020 Photon Storm Ltd. 229 * @license {@link https://opensource.org/licenses/MIT|MIT License} 230 */ 231var n=i(156),r=i(26);t.exports=function(t,e,i,s,o){for(var a=null,h=null,u=null,l=null,c=r(t,e,i,s,null,o),f=0;f<c.length;f++){var d=c[f];d&&(d.collides?(a=n(d.x,d.y-1,!0,o),h=n(d.x,d.y+1,!0,o),u=n(d.x-1,d.y,!0,o),l=n(d.x+1,d.y,!0,o),d.faceTop=!a||!a.collides,d.faceBottom=!h||!h.collides,d.faceLeft=!u||!u.collides,d.faceRight=!l||!l.collides):d.resetFaces())}}},function(t,e,i){ 232/** 233 * @author Richard Davey <[email protected]> 234 * @copyright 2020 Photon Storm Ltd. 235 * @license {@link https://opensource.org/licenses/MIT|MIT License} 236 */ 237var n=i(0),r=i(63),s=i(294),o=i(295),a=i(55),h=i(166),u=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.type=a.CIRCLE,this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=u},function(t,e){t.exports=function(t,e,i){return t.radius>0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline"}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){ 238/** 239 * @author Richard Davey <[email protected]> 240 * @copyright 2020 Photon Storm Ltd. 241 * @license {@link https://opensource.org/licenses/MIT|MIT License} 242 */ 243var n=i(0),r=i(38),s=1e-6,o=new n({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new o(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,n,r,s,o,a,h,u,l,c,f,d,p,v){var g=this.val;return g[0]=t,g[1]=e,g[2]=i,g[3]=n,g[4]=r,g[5]=s,g[6]=o,g[7]=a,g[8]=h,g[9]=u,g[10]=l,g[11]=c,g[12]=f,g[13]=d,g[14]=p,g[15]=v,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var n=a.fromQuat(i).val,r=e.x,s=e.y,o=e.z;return this.setValues(n[0]*r,n[1]*r,n[2]*r,0,n[4]*s,n[5]*s,n[6]*s,0,n[8]*o,n[9]*o,n[10]*o,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],r=t[6],s=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=r,t[11]=t[14],t[12]=n,t[13]=s,t[14]=o,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],u=t[8],l=t[9],c=t[10],f=t[11],d=t[12],p=t[13],v=t[14],g=t[15],m=e*o-i*s,y=e*a-n*s,x=e*h-r*s,w=i*a-n*o,_=i*h-r*o,b=n*h-r*a,T=u*p-l*d,E=u*v-c*d,S=u*g-f*d,A=l*v-c*p,C=l*g-f*p,O=c*g-f*v,R=m*O-y*C+x*A+w*S-_*E+b*T;return R?(R=1/R,this.setValues((o*O-a*C+h*A)*R,(n*C-i*O-r*A)*R,(p*b-v*_+g*w)*R,(c*_-l*b-f*w)*R,(a*S-s*O-h*E)*R,(e*O-n*S+r*E)*R,(v*x-d*b-g*y)*R,(u*b-c*x+f*y)*R,(s*C-o*S+h*T)*R,(i*S-e*C-r*T)*R,(d*_-p*x+g*m)*R,(l*x-u*_-f*m)*R,(o*E-s*A-a*T)*R,(e*A-i*E+n*T)*R,(p*y-d*w-v*m)*R,(u*w-l*y+c*m)*R)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],u=t[8],l=t[9],c=t[10],f=t[11],d=t[12],p=t[13],v=t[14],g=t[15];return this.setValues(o*(c*g-f*v)-l*(a*g-h*v)+p*(a*f-h*c),-(i*(c*g-f*v)-l*(n*g-r*v)+p*(n*f-r*c)),i*(a*g-h*v)-o*(n*g-r*v)+p*(n*h-r*a),-(i*(a*f-h*c)-o*(n*f-r*c)+l*(n*h-r*a)),-(s*(c*g-f*v)-u*(a*g-h*v)+d*(a*f-h*c)),e*(c*g-f*v)-u*(n*g-r*v)+d*(n*f-r*c),-(e*(a*g-h*v)-s*(n*g-r*v)+d*(n*h-r*a)),e*(a*f-h*c)-s*(n*f-r*c)+u*(n*h-r*a),s*(l*g-f*p)-u*(o*g-h*p)+d*(o*f-h*l),-(e*(l*g-f*p)-u*(i*g-r*p)+d*(i*f-r*l)),e*(o*g-h*p)-s*(i*g-r*p)+d*(i*h-r*o),-(e*(o*f-h*l)-s*(i*f-r*l)+u*(i*h-r*o)),-(s*(l*v-c*p)-u*(o*v-a*p)+d*(o*c-a*l)),e*(l*v-c*p)-u*(i*v-n*p)+d*(i*c-n*l),-(e*(o*v-a*p)-s*(i*v-n*p)+d*(i*a-n*o)),e*(o*c-a*l)-s*(i*c-n*l)+u*(i*a-n*o))},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],u=t[8],l=t[9],c=t[10],f=t[11],d=t[12],p=t[13],v=t[14],g=t[15];return(e*o-i*s)*(c*g-f*v)-(e*a-n*s)*(l*g-f*p)+(e*h-r*s)*(l*v-c*p)+(i*a-n*o)*(u*g-f*d)-(i*h-r*o)*(u*v-c*d)+(n*h-r*a)*(u*p-l*d)},multiply:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=e[6],u=e[7],l=e[8],c=e[9],f=e[10],d=e[11],p=e[12],v=e[13],g=e[14],m=e[15],y=t.val,x=y[0],w=y[1],_=y[2],b=y[3];return e[0]=x*i+w*o+_*l+b*p,e[1]=x*n+w*a+_*c+b*v,e[2]=x*r+w*h+_*f+b*g,e[3]=x*s+w*u+_*d+b*m,x=y[4],w=y[5],_=y[6],b=y[7],e[4]=x*i+w*o+_*l+b*p,e[5]=x*n+w*a+_*c+b*v,e[6]=x*r+w*h+_*f+b*g,e[7]=x*s+w*u+_*d+b*m,x=y[8],w=y[9],_=y[10],b=y[11],e[8]=x*i+w*o+_*l+b*p,e[9]=x*n+w*a+_*c+b*v,e[10]=x*r+w*h+_*f+b*g,e[11]=x*s+w*u+_*d+b*m,x=y[12],w=y[13],_=y[14],b=y[15],e[12]=x*i+w*o+_*l+b*p,e[13]=x*n+w*a+_*c+b*v,e[14]=x*r+w*h+_*f+b*g,e[15]=x*s+w*u+_*d+b*m,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,n=e.val,r=i[0],s=i[4],o=i[8],a=i[12],h=i[1],u=i[5],l=i[9],c=i[13],f=i[2],d=i[6],p=i[10],v=i[14],g=i[3],m=i[7],y=i[11],x=i[15],w=n[0],_=n[4],b=n[8],T=n[12],E=n[1],S=n[5],A=n[9],C=n[13],O=n[2],R=n[6],M=n[10],P=n[14],I=n[3],k=n[7],L=n[11],D=n[15];return this.setValues(r*w+s*E+o*O+a*I,h*w+u*E+l*O+c*I,f*w+d*E+p*O+v*I,g*w+m*E+y*O+x*I,r*_+s*S+o*R+a*k,h*_+u*S+l*R+c*k,f*_+d*S+p*R+v*k,g*_+m*S+y*R+x*k,r*b+s*A+o*M+a*L,h*b+u*A+l*M+c*L,f*b+d*A+p*M+v*L,g*b+m*A+y*M+x*L,r*T+s*C+o*P+a*D,h*T+u*C+l*P+c*D,f*T+d*C+p*P+v*D,g*T+m*C+y*P+x*D)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),r=1-i,s=t.x,o=t.y,a=t.z,h=r*s,u=r*o;return this.setValues(h*s+i,h*o-n*a,h*a+n*o,0,h*o+n*a,u*o+i,u*a-n*s,0,h*a-n*o,u*a+n*s,r*a*a+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,n=e.x,r=e.y,o=e.z,a=Math.sqrt(n*n+r*r+o*o);if(Math.abs(a)<s)return this;n*=a=1/a,r*=a,o*=a;var h=Math.sin(t),u=Math.cos(t),l=1-u,c=i[0],f=i[1],d=i[2],p=i[3],v=i[4],g=i[5],m=i[6],y=i[7],x=i[8],w=i[9],_=i[10],b=i[11],T=i[12],E=i[13],S=i[14],A=i[15],C=n*n*l+u,O=r*n*l+o*h,R=o*n*l-r*h,M=n*r*l-o*h,P=r*r*l+u,I=o*r*l+n*h,k=n*o*l+r*h,L=r*o*l-n*h,D=o*o*l+u;return this.setValues(c*C+v*O+x*R,f*C+g*O+w*R,d*C+m*O+_*R,p*C+y*O+b*R,c*M+v*P+x*I,f*M+g*P+w*I,d*M+m*P+_*I,p*M+y*P+b*I,c*k+v*L+x*D,f*k+g*L+w*D,d*k+m*L+_*D,p*k+y*L+b*D,T,E,S,A)},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),r=e[4],s=e[5],o=e[6],a=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=r*n+h*i,e[5]=s*n+u*i,e[6]=o*n+l*i,e[7]=a*n+c*i,e[8]=h*n-r*i,e[9]=u*n-s*i,e[10]=l*n-o*i,e[11]=c*n-a*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),r=e[0],s=e[1],o=e[2],a=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=r*n-h*i,e[1]=s*n-u*i,e[2]=o*n-l*i,e[3]=a*n-c*i,e[8]=r*i+h*n,e[9]=s*i+u*n,e[10]=o*i+l*n,e[11]=a*i+c*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),r=e[0],s=e[1],o=e[2],a=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=r*n+h*i,e[1]=s*n+u*i,e[2]=o*n+l*i,e[3]=a*n+c*i,e[4]=h*n-r*i,e[5]=u*n-s*i,e[6]=l*n-o*i,e[7]=c*n-a*i,this},fromRotationTranslation:function(t,e){var i=t.x,n=t.y,r=t.z,s=t.w,o=i+i,a=n+n,h=r+r,u=i*o,l=i*a,c=i*h,f=n*a,d=n*h,p=r*h,v=s*o,g=s*a,m=s*h;return this.setValues(1-(f+p),l+m,c-g,0,l-m,1-(u+p),d+v,0,c+g,d-v,1-(u+f),0,e.x,e.y,e.z,1)},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,r=t.w,s=e+e,o=i+i,a=n+n,h=e*s,u=e*o,l=e*a,c=i*o,f=i*a,d=n*a,p=r*s,v=r*o,g=r*a;return this.setValues(1-(c+d),u+g,l-v,0,u-g,1-(h+d),f+p,0,l+v,f-p,1-(h+c),0,0,0,0,1)},frustum:function(t,e,i,n,r,s){var o=1/(e-t),a=1/(n-i),h=1/(r-s);return this.setValues(2*r*o,0,0,0,0,2*r*a,0,0,(e+t)*o,(n+i)*a,(s+r)*h,-1,0,0,s*r*2*h,0)},perspective:function(t,e,i,n){var r=1/Math.tan(t/2),s=1/(i-n);return this.setValues(r/e,0,0,0,0,r,0,0,0,0,(n+i)*s,-1,0,0,2*n*i*s,0)},perspectiveLH:function(t,e,i,n){return this.setValues(2*i/t,0,0,0,0,2*i/e,0,0,0,0,-n/(i-n),1,0,0,i*n/(i-n),0)},ortho:function(t,e,i,n,r,s){var o=t-e,a=i-n,h=r-s;return o=0===o?o:1/o,a=0===a?a:1/a,h=0===h?h:1/h,this.setValues(-2*o,0,0,0,0,-2*a,0,0,0,0,2*h,0,(t+e)*o,(n+i)*a,(s+r)*h,1)},lookAtRH:function(t,e,i){var n=this.val;return c.subVectors(t,e),0===c.getLengthSquared()&&(c.z=1),c.normalize(),u.crossVectors(i,c),0===u.getLengthSquared()&&(1===Math.abs(i.z)?c.x+=1e-4:c.z+=1e-4,c.normalize(),u.crossVectors(i,c)),u.normalize(),l.crossVectors(c,u),n[0]=u.x,n[1]=u.y,n[2]=u.z,n[4]=l.x,n[5]=l.y,n[6]=l.z,n[8]=c.x,n[9]=c.y,n[10]=c.z,this},lookAt:function(t,e,i){var n=t.x,r=t.y,o=t.z,a=i.x,h=i.y,u=i.z,l=e.x,c=e.y,f=e.z;if(Math.abs(n-l)<s&&Math.abs(r-c)<s&&Math.abs(o-f)<s)return this.identity();var d=n-l,p=r-c,v=o-f,g=1/Math.sqrt(d*d+p*p+v*v),m=h*(v*=g)-u*(p*=g),y=u*(d*=g)-a*v,x=a*p-h*d;(g=Math.sqrt(m*m+y*y+x*x))?(m*=g=1/g,y*=g,x*=g):(m=0,y=0,x=0);var w=p*x-v*y,_=v*m-d*x,b=d*y-p*m;return(g=Math.sqrt(w*w+_*_+b*b))?(w*=g=1/g,_*=g,b*=g):(w=0,_=0,b=0),this.setValues(m,w,d,0,y,_,p,0,x,b,v,0,-(m*n+y*r+x*o),-(w*n+_*r+b*o),-(d*n+p*r+v*o),1)},yawPitchRoll:function(t,e,i){this.zero(),a.zero(),h.zero();var n=this.val,r=a.val,s=h.val,o=Math.sin(i),u=Math.cos(i);return n[10]=1,n[15]=1,n[0]=u,n[1]=o,n[4]=-o,n[5]=u,o=Math.sin(e),u=Math.cos(e),r[0]=1,r[15]=1,r[5]=u,r[10]=u,r[9]=-o,r[6]=o,o=Math.sin(t),u=Math.cos(t),s[5]=1,s[15]=1,s[0]=u,s[2]=-o,s[8]=o,s[10]=u,this.multiplyLocal(a),this.multiplyLocal(h),this},setWorldMatrix:function(t,e,i,n,r){return this.yawPitchRoll(t.y,t.x,t.z),a.scaling(i.x,i.y,i.z),h.xyz(e.x,e.y,e.z),this.multiplyLocal(a),this.multiplyLocal(h),n&&this.multiplyLocal(n),r&&this.multiplyLocal(r),this},multiplyToMat4:function(t,e){var i=this.val,n=t.val,r=i[0],s=i[1],o=i[2],a=i[3],h=i[4],u=i[5],l=i[6],c=i[7],f=i[8],d=i[9],p=i[10],v=i[11],g=i[12],m=i[13],y=i[14],x=i[15],w=n[0],_=n[1],b=n[2],T=n[3],E=n[4],S=n[5],A=n[6],C=n[7],O=n[8],R=n[9],M=n[10],P=n[11],I=n[12],k=n[13],L=n[14],D=n[15];return e.setValues(w*r+_*h+b*f+T*g,_*s+_*u+b*d+T*m,b*o+_*l+b*p+T*y,T*a+_*c+b*v+T*x,E*r+S*h+A*f+C*g,E*s+S*u+A*d+C*m,E*o+S*l+A*p+C*y,E*a+S*c+A*v+C*x,O*r+R*h+M*f+P*g,O*s+R*u+M*d+P*m,O*o+R*l+M*p+P*y,O*a+R*c+M*v+P*x,I*r+k*h+L*f+D*g,I*s+k*u+L*d+D*m,I*o+k*l+L*p+D*y,I*a+k*c+L*v+D*x)},fromRotationXYTranslation:function(t,e,i){var n=e.x,r=e.y,s=e.z,o=Math.sin(t.x),a=Math.cos(t.x),h=Math.sin(t.y),u=Math.cos(t.y),l=n,c=r,f=s,d=-o,p=0-d*h,v=0-a*h,g=d*u,m=a*u;return i||(l=u*n+h*s,c=p*n+a*r+g*s,f=v*n+o*r+m*s),this.setValues(u,p,v,0,0,a,o,0,h,g,m,0,l,c,f,1)},getMaxScaleOnAxis:function(){var t=this.val,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,n))}}),a=new o,h=new o,u=new r,l=new r,c=new r;t.exports=o},function(t,e,i){ 244/** 245 * @author Richard Davey <[email protected]> 246 * @copyright 2020 Photon Storm Ltd. 247 * @license {@link https://opensource.org/licenses/MIT|MIT License} 248 */ 249function n(t,e,i){i=i||2;var n,a,h,u,l,d,p,g=e&&e.length,m=g?e[0]*i:t.length,y=r(t,0,m,i,!0),x=[];if(!y||y.next===y.prev)return x;if(g&&(y=function(t,e,i,n){var o,a,h,u=[];for(o=0,a=e.length;o<a;o++)(h=r(t,e[o]*n,o<a-1?e[o+1]*n:t.length,n,!1))===h.next&&(h.steiner=!0),u.push(v(h));for(u.sort(c),o=0;o<u.length;o++)f(u[o],i),i=s(i,i.next);return i}(t,e,y,i)),t.length>80*i){n=h=t[0],a=u=t[1];for(var w=i;w<m;w+=i)(l=t[w])<n&&(n=l),(d=t[w+1])<a&&(a=d),l>h&&(h=l),d>u&&(u=d);p=0!==(p=Math.max(h-n,u-a))?1/p:0}
vendor: 5,221 bytes, line 249
249return o(y,x,i,n,a,p),x}function r(t,e,i,n,r){var s,o;if(r===O(t,e,i,n)>0)for(s=e;s<i;s+=n)o=S(s,t[s],t[s+1],o);else for(s=i-n;s>=e;s-=n)o=S(s,t[s],t[s+1],o);return o&&x(o,o.next)&&(A(o),o=o.next),o}function s(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!x(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(A(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,r,c,f){if(t){!f&&c&&function(t,e,i,n){var r=t;do{null===r.z&&(r.z=p(r.x,r.y,e,i,n)),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,i,n,r,s,o,a,h,u=1;do{for(i=t,t=null,s=null,o=0;i;){for(o++,n=i,a=0,e=0;e<u&&(a++,n=n.nextZ);e++);for(h=u;a>0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(r=i,i=i.nextZ,a--):(r=n,n=n.nextZ,h--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;i=n}s.nextZ=null,u*=2}while(o>1)}(r)}(t,n,r,c);for(var d,v,g=t;t.prev!==t.next;)if(d=t.prev,v=t.next,c?h(t,n,r,c):a(t))e.push(d.i/i),e.push(t.i/i),e.push(v.i/i),A(t),t=v.next,g=v.next;else if((t=v)===g){f?1===f?o(t=u(s(t),e,i),e,i,n,r,c,2):2===f&&l(t,e,i,n,r,c):o(s(t),e,i,n,r,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(y(e,i,n)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,r.x,r.y)&&y(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function h(t,e,i,n){var r=t.prev,s=t,o=t.next;if(y(r,s,o)>=0)return!1;for(var a=r.x<s.x?r.x<o.x?r.x:o.x:s.x<o.x?s.x:o.x,h=r.y<s.y?r.y<o.y?r.y:o.y:s.y<o.y?s.y:o.y,u=r.x>s.x?r.x>o.x?r.x:o.x:s.x>o.x?s.x:o.x,l=r.y>s.y?r.y>o.y?r.y:o.y:s.y>o.y?s.y:o.y,c=p(a,h,e,i,n),f=p(u,l,e,i,n),d=t.prevZ,v=t.nextZ;d&&d.z>=c&&v&&v.z<=f;){if(d!==t.prev&&d!==t.next&&g(r.x,r.y,s.x,s.y,o.x,o.y,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,v!==t.prev&&v!==t.next&&g(r.x,r.y,s.x,s.y,o.x,o.y,v.x,v.y)&&y(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;d&&d.z>=c;){if(d!==t.prev&&d!==t.next&&g(r.x,r.y,s.x,s.y,o.x,o.y,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;v&&v.z<=f;){if(v!==t.prev&&v!==t.next&&g(r.x,r.y,s.x,s.y,o.x,o.y,v.x,v.y)&&y(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function u(t,e,i){var n=t;do{var r=n.prev,o=n.next.next;!x(r,o)&&w(r,n,n.next,o)&&T(r,o)&&T(o,r)&&(e.push(r.i/i),e.push(n.i/i),e.push(o.i/i),A(n),A(n.next),n=t=o),n=n.next}while(n!==t);return s(n)}function l(t,e,i,n,r,a){var h=t;do{for(var u=h.next.next;u!==h.prev;){if(h.i!==u.i&&m(h,u)){var l=E(h,u);return h=s(h,h.next),l=s(l,l.next),o(h,e,i,n,r,a),void o(l,e,i,n,r,a)}u=u.next}h=h.next}while(h!==t)}function c(t,e){return t.x-e.x}function f(t,e){if(e=function(t,e){var i,n=e,r=t.x,s=t.y,o=-1/0;do{if(s<=n.y&&s>=n.next.y&&n.next.y!==n.y){var a=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=r&&a>o){if(o=a,a===r){if(s===n.y)return n;if(s===n.next.y)return n.next}i=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!i)return null;if(r===o)return i;var h,u=i,l=i.x,c=i.y,f=1/0;n=i;do{r>=n.x&&n.x>=l&&r!==n.x&&g(s<c?r:o,s,l,c,s<c?o:r,s,n.x,n.y)&&(h=Math.abs(s-n.y)/(r-n.x),T(n,t)&&(h<f||h===f&&(n.x>i.x||n.x===i.x&&d(i,n)))&&(i=n,f=h)),n=n.next}while(n!==u);return i}(t,e)){var i=E(e,t);s(e,e.next),s(i,i.next)}}function d(t,e){return y(t.prev,t,e.prev)<0&&y(e.next,t,t.next)<0}function p(t,e,i,n,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function v(t){var e=t,i=t;do{(e.x<i.x||e.x===i.x&&e.y<i.y)&&(i=e),e=e.next}while(e!==t);return i}function g(t,e,i,n,r,s,o,a){return(r-o)*(e-a)-(t-o)*(s-a)>=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(s-a)-(r-o)*(n-a)>=0}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&w(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(T(t,e)&&T(e,t)&&function(t,e){var i=t,n=!1,r=(t.x+e.x)/2,s=(t.y+e.y)/2;do{i.y>s!=i.next.y>s&&i.next.y!==i.y&&r<(i.next.x-i.x)*(s-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)&&(y(t.prev,t,e.prev)||y(t,e.prev,e))||x(t,e)&&y(t.prev,t,t.next)>0&&y(e.prev,e,e.next)>0)}function y(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function w(t,e,i,n){var r=b(y(t,e,i)),s=b(y(t,e,n)),o=b(y(i,n,t)),a=b(y(i,n,e));return r!==s&&o!==a||!(0!==r||!_(t,i,e))||!(0!==s||!_(t,n,e))||!(0!==o||!_(i,t,n))||!(0!==a||!_(i,e,n))}function _(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function b(t){return t>0?1:t<0?-1:0}function T(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function E(t,e){var i=new C(t.i,t.x,t.y),n=new C(e.i,e.x,e.y),r=t.next,s=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,n.next=i,i.prev=n,s.next=n,n.prev=s,n}function S(t,e,i,n){var r=new C(t,e,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function A(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 C(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function O(t,e,i,n){for(var r=0,s=e,o=i-n;s<i;
vendor: 2,257 bytes, lines 249-261
249s+=n)r+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return r}n.deviation=function(t,e,i,n){var r=e&&e.length,s=r?e[0]*i:t.length,o=Math.abs(O(t,0,s,i));if(r)for(var a=0,h=e.length;a<h;a++){var u=e[a]*i,l=a<h-1?e[a+1]*i:t.length;o-=Math.abs(O(t,u,l,i))}var c=0;for(a=0;a<n.length;a+=3){var f=n[a]*i,d=n[a+1]*i,p=n[a+2]*i;c+=Math.abs((t[f]-t[p])*(t[d+1]-t[f+1])-(t[f]-t[d])*(t[p+1]-t[f+1]))}return 0===o&&0===c?0:Math.abs((c-o)/o)},n.flatten=function(t){for(var e=t[0][0].length,i={vertices:[],holes:[],dimensions:e},n=0,r=0;r<t.length;r++){for(var s=0;s<t[r].length;s++)for(var o=0;o<e;o++)i.vertices.push(t[r][s][o]);r>0&&(n+=t[r-1].length,i.holes.push(n))}return i},t.exports=n},function(t,e,i){ 250/** 251 * @author Richard Davey <[email protected]> 252 * @copyright 2020 Photon Storm Ltd. 253 * @license {@link https://opensource.org/licenses/MIT|MIT License} 254 */ 255t.exports={COMPLETE:i(983),DECODED:i(984),DECODED_ALL:i(985),DESTROY:i(986),DETUNE:i(987),GLOBAL_DETUNE:i(988),GLOBAL_MUTE:i(989),GLOBAL_RATE:i(990),GLOBAL_VOLUME:i(991),LOOP:i(992),LOOPED:i(993),MUTE:i(994),PAN:i(995),PAUSE_ALL:i(996),PAUSE:i(997),PLAY:i(998),RATE:i(999),RESUME_ALL:i(1e3),RESUME:i(1001),SEEK:i(1002),STOP_ALL:i(1003),STOP:i(1004),UNLOCKED:i(1005),VOLUME:i(1006)}},function(t,e,i){ 256/** 257 * @author Richard Davey <[email protected]> 258 * @copyright 2020 Photon Storm Ltd. 259 * @license {@link https://opensource.org/licenses/MIT|MIT License} 260 */ 261var n=i(0),r=i(20),s=i(23),o=i(8),a=i(2),h=i(7),u=new n({Extends:s,initialize:function t(e,i,n,r,o){var u,l="png";if(h(i)){var c=i;i=a(c,"key"),n=a(c,"url"),u=a(c,"normalMap"),r=a(c,"xhrSettings"),l=a(c,"extension",l),o=a(c,"frameConfig")}Array.isArray(n)&&(u=n[1],n=n[0]);var f={type:"image",cache:e.textureManager,extension:l,responseType:"blob",key:i,url:n,xhrSettings:r,config:o};if(s.call(this,e,f),u){var d=new t(e,this.key,u,r,o);d.type="normalMap",this.setLink(d),e.addFile(d)}},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){s.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){s.revokeObjectURL(t.data),t.onProcessError()}
vendor: 9,125 bytes, line 261
261,s.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===r.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});o.register("image",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new u(this,t[n]));else this.addFile(new u(this,t,e,i));return this})),t.exports=u},function(t,e,i){var n={};t.exports=n;var r=i(94),s=i(116),o=i(267),a=i(50),h=i(117),u=i(585);!function(){n._inertiaScale=4,n._nextCollidingGroupId=1,n._nextNonCollidingGroupId=-1,n._nextCategory=1,n.create=function(e){var i={id:a.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},previousPositionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!e.hasOwnProperty("position")&&e.hasOwnProperty("vertices")?e.position=r.centre(e.vertices):e.hasOwnProperty("vertices")||(i.vertices=r.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var n=a.extend(i,e);return t(n,e),n.setOnCollideWith=function(t,e){return e?this.onCollideWith[t.id]=e:delete this.onCollideWith[t.id],this},n},n.nextGroup=function(t){return t?n._nextNonCollidingGroupId--:n._nextCollidingGroupId++},n.nextCategory=function(){return n._nextCategory=n._nextCategory<<1,n._nextCategory};var t=function(t,e){e=e||{},n.set(t,{bounds:t.bounds||h.create(t.vertices),positionPrev:t.positionPrev||s.clone(t.position),anglePrev:t.anglePrev||t.angle,vertices:t.vertices,parts:t.parts||[t],isStatic:t.isStatic,isSleeping:t.isSleeping,parent:t.parent||t});var i=t.bounds;if(r.rotate(t.vertices,t.angle,t.position),u.rotate(t.axes,t.angle),h.update(i,t.vertices,t.velocity),n.set(t,{axes:e.axes||t.axes,area:e.area||t.area,mass:e.mass||t.mass,inertia:e.inertia||t.inertia}),1===t.parts.length){var o=t.centerOfMass,a=t.centerOffset,l=i.max.x-i.min.x,c=i.max.y-i.min.y;o.x=-(i.min.x-t.position.x)/l,o.y=-(i.min.y-t.position.y)/c,a.x=l*o.x,a.y=c*o.y}};n.set=function(t,e,i){var r;for(r in"string"==typeof e&&(r=e,(e={})[r]=i),e)if(Object.prototype.hasOwnProperty.call(e,r))switch(i=e[r],r){case"isStatic":n.setStatic(t,i);break;case"isSleeping":o.set(t,i);break;case"mass":n.setMass(t,i);break;case"density":n.setDensity(t,i);break;case"inertia":n.setInertia(t,i);break;case"vertices":n.setVertices(t,i);break;case"position":n.setPosition(t,i);break;case"angle":n.setAngle(t,i);break;case"velocity":n.setVelocity(t,i);break;case"angularVelocity":n.setAngularVelocity(t,i);break;case"parts":n.setParts(t,i);break;case"centre":n.setCentre(t,i);break;default:t[r]=i}},n.setStatic=function(t,e){for(var i=0;i<t.parts.length;i++){var n=t.parts[i];n.isStatic=e,e?(n._original={restitution:n.restitution,friction:n.friction,mass:n.mass,inertia:n.inertia,density:n.density,inverseMass:n.inverseMass,inverseInertia:n.inverseInertia},n.restitution=0,n.friction=1,n.mass=n.inertia=n.density=1/0,n.inverseMass=n.inverseInertia=0,n.positionPrev.x=n.position.x,n.positionPrev.y=n.position.y,n.anglePrev=n.angle,n.angularVelocity=0,n.speed=0,n.angularSpeed=0,n.motion=0):n._original&&(n.restitution=n._original.restitution,n.friction=n._original.friction,n.mass=n._original.mass,n.inertia=n._original.inertia,n.density=n._original.density,n.inverseMass=n._original.inverseMass,n.inverseInertia=n._original.inverseInertia,n._original=null)}},n.setMass=function(t,e){var i=t.inertia/(t.mass/6);t.inertia=i*(e/6),t.inverseInertia=1/t.inertia,t.mass=e,t.inverseMass=1/t.mass,t.density=t.mass/t.area},n.setDensity=function(t,e){n.setMass(t,e*t.area),t.density=e},n.setInertia=function(t,e){t.inertia=e,t.inverseInertia=1/t.inertia},n.setVertices=function(t,e){e[0].body===t?t.vertices=e:t.vertices=r.create(e,t),t.axes=u.fromVertices(t.vertices),t.area=r.area(t.vertices),n.setMass(t,t.density*t.area);var i=r.centre(t.vertices);r.translate(t.vertices,i,-1),n.setInertia(t,n._inertiaScale*r.inertia(t.vertices,t.mass)),r.translate(t.vertices,t.position),h.update(t.bounds,t.vertices,t.velocity)},n.setParts=function(t,e,i){var s;for(e=e.slice(0),t.parts.length=0,t.parts.push(t),t.parent=t,s=0;s<e.length;s++){var o=e[s];o!==t&&(o.parent=t,t.parts.push(o))}if(1!==t.parts.length){if(i=void 0===i||i){var a=[];for(s=0;s<e.length;s++)a=a.concat(e[s].vertices);r.clockwiseSort(a);var u=r.hull(a),l=r.centre(u);n.setVertices(t,u),r.translate(t.vertices,l)}var c=n._totalProperties(t),f=c.centre.x,d=c.centre.y,p=t.bounds,v=t.centerOfMass,g=t.centerOffset;h.update(p,t.vertices,t.velocity),v.x=-(p.min.x-f)/(p.max.x-p.min.x),v.y=-(p.min.y-d)/(p.max.y-p.min.y),g.x=f,g.y=d,t.area=c.area,t.parent=t,t.position.x=f,t.position.y=d,t.positionPrev.x=f,t.positionPrev.y=d,n.setMass(t,c.mass),n.setInertia(t,c.inertia),n.setPosition(t,c.centre)}},n.setCentre=function(t,e,i){i?(t.positionPrev.x+=e.x,t.positionPrev.y+=e.y,t.position.x+=e.x,t.position.y+=e.y):(t.positionPrev.x=e.x-(t.position.x-t.positionPrev.x),t.positionPrev.y=e.y-(t.position.y-t.positionPrev.y),t.position.x=e.x,t.position.y=e.y)},n.setPosition=function(t,e){var i=s.sub(e,t.position);t.positionPrev.x+=i.x,t.positionPrev.y+=i.y;for(var n=0;n<t.parts.length;n++){var o=t.parts[n];o.position.x+=i.x,o.position.y+=i.y,r.translate(o.vertices,i),h.update(o.bounds,o.vertices,t.velocity)}},n.setAngle=function(t,e){var i=e-t.angle;t.anglePrev+=i;for(var n=0;n<t.parts.length;n++){var o=t.parts[n];o.angle+=i,r.rotate(o.vertices,i,t.position),u.rotate(o.axes,i),h.update(o.bounds,o.vertices,t.velocity),n>0&&s.rotateAbout(o.position,i,t.position,o.position)}},n.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=s.magnitude(t.velocity)},n.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},n.translate=function(t,e){n.setPosition(t,s.add(t.position,e))},n.rotate=function(t,e,i){if(i){var r=Math.cos(e),s=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;n.setPosition(t,{x:i.x+(o*r-a*s),y:i.y+(o*s+a*r)}),n.setAngle(t,t.angle+e)}else n.setAngle(t,t.angle+e)},n.scale=function(t,e,i,s){var o=0,a=0;s=s||t.position;for(var l=0;l<t.parts.length;l++){var c=t.parts[l];c.scale.x=e,c.scale.y=i,r.scale(c.vertices,e,i,s),c.axes=u.fromVertices(c.vertices),c.area=r.area(c.vertices),n.setMass(c,t.density*c.area),r.translate(c.vertices,{x:-c.position.x,y:-c.position.y}),n.setInertia(c,n._inertiaScale*r.inertia(c.vertices,c.mass)),r.translate(c.vertices,{x:c.position.x,y:c.position.y}),l>0&&(o+=c.area,a+=c.inertia),c.position.x=s.x+(c.position.x-s.x)*e,c.position.y=s.y+(c.position.y-s.y)*i,h.update(c.bounds,c.vertices,t.velocity)}t.parts.length>1&&(t.area=o,t.isStatic||(n.setMass(t,t.density*o),n.setInertia(t,a))),t.circleRadius&&(e===i?t.circleRadius*=e:t.circleRadius=null)},n.update=function(t,e,i,n){var o=Math.pow(e*i*t.timeScale,2),a=1-t.frictionAir*i*t.timeScale,l=t.position.x-t.positionPrev.x,c=t.position.y-t.positionPrev.y;t.velocity.x=l*a*n+t.force.x/t.mass*o,t.velocity.y=c*a*n+t.force.y/t.mass*o,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.position.x+=t.velocity.x,t.position.y+=t.velocity.y,t.angularVelocity=(t.angle-t.anglePrev)*a*n+t.torque/t.inertia*o,t.anglePrev=t.angle,t.angle+=t.angularVelocity,t.speed=s.magnitude(t.velocity),t.angularSpeed=Math.abs(t.angularVelocity);for(var f=0;f<t.parts.length;f++){var d=t.parts[f];r.translate(d.vertices,t.velocity),f>0&&(d.position.x+=t.velocity.x,d.position.y+=t.velocity.y),0!==t.angularVelocity&&(r.rotate(d.vertices,t.angularVelocity,t.position),u.rotate(d.axes,t.angularVelocity),f>0&&s.rotateAbout(d.position,t.angularVelocity,t.position,d.position)),h.update(d.bounds,d.vertices,t.velocity)}},n.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var n=e.x-t.position.x,r=e.y-t.position.y;t.torque+=n*i.y-r*i.x},n._totalProperties=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i<t.parts.length;i++){var n=t.parts[i],r=n.mass!==1/0?n.mass:1;e.mass+=r,e.area+=n.area,e.inertia+=n.inertia,e.centre=s.add(e.centre,s.mult(n.position,r))}return e.centre=s.div(e.centre,e.mass),e}}()}
261,function(t,e){t.exports=function(t,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)}},function(t,e,i){ 262/** 263 * @author Richard Davey <[email protected]> 264 * @copyright 2020 Photon Storm Ltd. 265 * @license {@link https://opensource.org/licenses/MIT|MIT License} 266 */ 267var n=i(162),r=i(0),s=i(11),o=i(15),a=i(1059),h=new r({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,a],initialize:function(t,e,i,r,s){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new n(this),this.setTexture(r,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e){return this.anims.play(t,e)},playReverse:function(t,e){return this.anims.playReverse(t,e)},playAfterDelay:function(t,e){return this.anims.playAfterDelay(t,e)},playAfterRepeat:function(t,e){return this.anims.playAfterRepeat(t,e)},chain:function(t){return this.anims.chain(t)},stop:function(){return this.anims.stop()},stopAfterDelay:function(t){return this.anims.stopAfterDelay(t)},stopAfterRepeat:function(t){return this.anims.stopAfterRepeat(t)},stopOnFrame:function(t){return this.anims.stopOnFrame(t)},toJSON:function(){return s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=h},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],r=e;r<i;r++)t[r]=t[r+1];return t.length=i,n}}},function(t,e,i){ 268/** 269 * @author Richard Davey <[email protected]> 270 * @copyright 2020 Photon Storm Ltd. 271 * @license {@link https://opensource.org/licenses/MIT|MIT License} 272 */ 273t.exports={ADDED_TO_SCENE:i(641),DESTROY:i(642),REMOVED_FROM_SCENE:i(643),VIDEO_COMPLETE:i(644),VIDEO_CREATED:i(645),VIDEO_ERROR:i(646),VIDEO_LOOP:i(647),VIDEO_PLAY:i(648),VIDEO_SEEKED:i(649),VIDEO_SEEKING:i(650),VIDEO_STOP:i(651),VIDEO_TIMEOUT:i(652),VIDEO_UNLOCKED:i(653)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i,n){var r=t.length;if(e<0||e>r||e>=i||i>r||e+i>r){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e){ 274/** 275 * @author Richard Davey <[email protected]> 276 * @author Angry Bytes (and contributors) 277 * @copyright 2020 Photon Storm Ltd. 278 * @license {@link https://opensource.org/licenses/MIT|MIT License} 279 */ 280function i(t,e){return String(t).localeCompare(e)}function n(t,e,i,n){var r,s,o,a,h,u=t.length,l=0,c=2*i;for(r=0;r<u;r+=c)for(o=(s=r+i)+i,s>u&&(s=u),o>u&&(o=u),a=r,h=s;;)if(a<s&&h<o)e(t[a],t[h])<=0?n[l++]=t[a++]:n[l++]=t[h++];else if(a<s)n[l++]=t[a++];else{if(!(h<o))break;n[l++]=t[h++]}}t.exports=function(t,e){void 0===e&&(e=i);var r=function(t,e){var i=t.length;if(i<=1)return t;for(var r=new Array(i),s=1;s<i;s*=2){n(t,e,s,r);var o=t;t=r,r=o}return t}(t,e);return r!==t&&n(r,null,t.length,t),t}},function(t,e,i){ 281/** 282 * @author Richard Davey <[email protected]> 283 * @copyright 2020 Photon Storm Ltd. 284 * @license {@link https://opensource.org/licenses/MIT|MIT License} 285 */ 286var n=i(132),r=i(202);t.exports=function(t,e){var i=n.Power0;if("string"==typeof t)if(n.hasOwnProperty(t))i=n[t];else{var s="";t.indexOf(".")&&("in"===(s=t.substr(t.indexOf(".")+1)).toLowerCase()?s="easeIn":"out"===s.toLowerCase()?s="easeOut":"inout"===s.toLowerCase()&&(s="easeInOut")),t=r(t.substr(0,t.indexOf(".")+1)+s),n.hasOwnProperty(t)&&(i=n[t])}else"function"==typeof t?i=t:Array.isArray(t)&&t.length;if(!e)return i;var o=e.slice(0);return o.unshift(0),function(t){return o[0]=t,i.apply(this,o)}}}
286,function(t,e,i){ 287/** 288 * @author Richard Davey <[email protected]> 289 * @copyright 2020 Photon Storm Ltd. 290 * @license {@link https://opensource.org/licenses/MIT|MIT License} 291 */ 292var n=i(12);t.exports=function(t,e,i,r,s){var o=t.strokeTint,a=n.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*i);o.TL=a,o.TR=a,o.BL=a,o.BR=a;var h=e.pathData,u=h.length-1,l=e.lineWidth,c=l/2,f=h[0]-r,d=h[1]-s;e.closePath||(u-=2);for(var p=2;p<u;p+=2){var v=h[p]-r,g=h[p+1]-s;t.batchLine(f,d,v,g,c,c,l,p-2,!!e.closePath&&p===u-1),f=v,d=g}}},function(t,e,i){ 293/** 294 * @author Richard Davey <[email protected]> 295 * @copyright 2020 Photon Storm Ltd. 296 * @license {@link https://opensource.org/licenses/MIT|MIT License} 297 */ 298var n=i(0),r=i(112),s=i(470),o=i(471),a=i(55),h=i(45),u=i(178),l=new n({initialize:function(t,e,i,n,r,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=0),this.type=a.TRIANGLE,this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=r,this.y3=s},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return u(this,t)},setTo:function(t,e,i,n,r,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=r,this.y3=s,this},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=l},function(t,e,i){ 299/** 300 * @author Richard Davey <[email protected]> 301 * @copyright 2020 Photon Storm Ltd. 302 * @license {@link https://opensource.org/licenses/MIT|MIT License} 303 */ 304var n=i(29),r=i(0),s=i(11),o=i(496),a=new r({Mixins:[s.Alpha,s.Flip,s.Visible],initialize:function(t,e,i,n,r,s,o,a){this.layer=t,this.index=e,this.x=i,this.y=n,this.width=r,this.height=s,this.right,this.bottom,this.baseWidth=void 0!==o?o:r,this.baseHeight=void 0!==a?a:s,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.physics={}},containsPoint:function(t,e){return!(t<this.pixelX||e<this.pixelY||t>this.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new o),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2}
vendor: 4,575 bytes, lines 304-322
304,intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){return void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,r){return void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===r&&(r=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,r&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){var t=this.layer.orientation;if(t===n.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(t===n.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(t===n.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(t===n.HEXAGONAL){var e=this.layer.hexSideLength,i=(this.baseHeight-e)/2+e;this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*i}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||void 0!==this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=a},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e,i){ 305/** 306 * @author Richard Davey <[email protected]> 307 * @copyright 2020 Photon Storm Ltd. 308 * @license {@link https://opensource.org/licenses/MIT|MIT License} 309 */ 310t.exports={POST_RENDER:i(626),PRE_RENDER:i(627),RENDER:i(628),RESIZE:i(629)}},function(t,e,i){ 311/** 312 * @author Richard Davey <[email protected]> 313 * @copyright 2020 Photon Storm Ltd. 314 * @license {@link https://opensource.org/licenses/MIT|MIT License} 315 */ 316var n=i(74);t.exports=function(t,e,i,r){var s;if(void 0===r&&(r=t),!Array.isArray(e))return-1!==(s=t.indexOf(e))?(n(t,s),i&&i.call(r,e),e):null;for(var o=e.length-1,a=[];o>=0;){var h=e[o];-1!==(s=t.indexOf(h))&&(n(t,s),a.push(h),i&&i.call(r,h)),o--}return a}},function(t,e,i){ 317/** 318 * @author Richard Davey <[email protected]> 319 * @copyright 2020 Photon Storm Ltd. 320 * @license {@link https://opensource.org/licenses/MIT|MIT License} 321 */ 322var n=i(0),r=i(196),s=i(10),o=i(3),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new s),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var n=Math.max(1,Math.round(i/e));return r(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);
vendor: 4,367 bytes, lines 322-334
322return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),r=0;i.push(0);for(var s=1;s<=t;s++)r+=(e=this.getPoint(s/t,this._tmpVec2B)).distance(n),i.push(r),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++)i.push(this.getPoint(n/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++){var r=this.getUtoTmapping(n/t,null,t);i.push(this.getPoint(r))}return i},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=1e-4,n=t-i,r=t+i;return n<0&&(n=0),r>1&&(r=1),this.getPoint(n,this._tmpVec2A),this.getPoint(r,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,r=this.getLengths(i),s=0,o=r.length;n=e?Math.min(e,r[o-1]):t*r[o-1];for(var a,h=0,u=o-1;h<=u;)if((a=r[s=Math.floor(h+(u-h)/2)]-n)<0)h=s+1;else{if(!(a>0)){u=s;break}u=s-1}if(r[s=u]===n)return s/(o-1);var l=r[s];return(s+(n-l)/(r[s+1]-l))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){ 323/** 324 * @author Richard Davey <[email protected]> 325 * @copyright 2020 Photon Storm Ltd. 326 * @license {@link https://opensource.org/licenses/MIT|MIT License} 327 */ 328t.exports={ADD:i(964),COMPLETE:i(965),FILE_COMPLETE:i(966),FILE_KEY_COMPLETE:i(967),FILE_LOAD_ERROR:i(968),FILE_LOAD:i(969),FILE_PROGRESS:i(970),POST_PROCESS:i(971),PROGRESS:i(972),START:i(973)}},function(t,e,i){ 329/** 330 * @author Richard Davey <[email protected]> 331 * @copyright 2020 Photon Storm Ltd. 332 * @license {@link https://opensource.org/licenses/MIT|MIT License} 333 */ 334var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=t.x1,s=t.y1,o=t.x2,a=t.y2,h=e.x1,u=e.y1,l=e.x2,c=e.y2,f=(c-u)*(o-r)-(l-h)*(a-s);if(0===f)return!1;var d=((l-h)*(s-u)-(c-u)*(r-h))/f,p=((o-r)*(s-u)-(a-s)*(r-h))/f;return d>=0&&d<=1&&p>=0&&p<=1&&(i.x=r+d*(o-r),i.y=s+d*(a-s),!0)}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n={};t.exports=n;var r=i(116),s=i(50);n.create=function(t,e){for(var i=[],n=0;n<t.length;n++){var r=t[n],s={x:r.x,y:r.y,index:n,body:e,isInternal:!1,contact:null,offset:null};s.contact={vertex:s,normalImpulse:0,tangentImpulse:0},i.push(s)}return i},n.fromPath=function(t,e){var i=[];return t.replace(/L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/gi,(function(t,e,n){i.push({x:parseFloat(e),y:parseFloat(n)})})),n.create(i,e)},n.centre=function(t){for(var e,i,s,o=n.area(t,!0),a={x:0,y:0},h=0;h<t.length;h++)s=(h+1)%t.length,e=r.cross(t[h],t[s]),i=r.mult(r.add(t[h],t[s]),e),a=r.add(a,i);return r.div(a,6*o)},n.mean=function(t){for(var e={x:0,y:0},i=0;i<t.length;i++)e.x+=t[i].x,e.y+=t[i].y;return r.div(e,t.length)},n.area=function(t,e){for(var i=0,n=t.length-1,r=0;r<t.length;r++)i+=(t[n].x-t[r].x)*(t[n].y+t[r].y),n=r;return e?i/2:Math.abs(i)/2},n.inertia=function(t,e){for(var i,n,s=0,o=0,a=t,h=0;h<a.length;h++)n=(h+1)%a.length,s+=(i=Math.abs(r.cross(a[n],a[h])))*(r.dot(a[n],a[n])+r.dot(a[n],a[h])+r.dot(a[h],a[h])),o+=i;return e/6*(s/o)},n.translate=function(t,e,i){var n;if(i)for(n=0;n<t.length;n++)t[n].x+=e.x*i,t[n].y+=e.y*i;else for(n=0;n<t.length;n++)t[n].x+=e.x,t[n].y+=e.y;return t},n.rotate=function(t,e,i){if(0!==e){for(var n=Math.cos(e),r=Math.sin(e),s=0;s<t.length;s++){var o=t[s],a=o.x-i.x,h=o.y-i.y;o.x=i.x+(a*n-h*r),o.y=i.y+(a*r+h*n)}return t}},n.contains=function(t,e){for(var i=0;i<t.length;i++){var n=t[i],r=t[(i+1)%t.length];if((e.x-n.x)*(r.y-n.y)+(e.y-n.y)*(n.x-r.x)>0)return!1}return!0}
vendor: 1,840 bytes, lines 334-340
334,n.scale=function(t,e,i,s){if(1===e&&1===i)return t;var o,a;s=s||n.centre(t);for(var h=0;h<t.length;h++)o=t[h],a=r.sub(o,s),t[h].x=s.x+a.x*e,t[h].y=s.y+a.y*i;return t},n.chamfer=function(t,e,i,n,o){e="number"==typeof e?[e]:e||[8],i=void 0!==i?i:-1,n=n||2,o=o||14;for(var a=[],h=0;h<t.length;h++){var u=t[h-1>=0?h-1:t.length-1],l=t[h],c=t[(h+1)%t.length],f=e[h<e.length?h:e.length-1];if(0!==f){var d=r.normalise({x:l.y-u.y,y:u.x-l.x}),p=r.normalise({x:c.y-l.y,y:l.x-c.x}),v=Math.sqrt(2*Math.pow(f,2)),g=r.mult(s.clone(d),f),m=r.normalise(r.mult(r.add(d,p),.5)),y=r.sub(l,r.mult(m,v)),x=i;-1===i&&(x=1.75*Math.pow(f,.32)),(x=s.clamp(x,n,o))%2==1&&(x+=1);for(var w=Math.acos(r.dot(d,p))/x,_=0;_<x;_++)a.push(r.add(r.rotate(g,w*_),y))}else a.push(l)}return a},n.clockwiseSort=function(t){var e=n.mean(t);return t.sort((function(t,i){return r.angle(e,t)-r.angle(e,i)})),t},n.isConvex=function(t){var e,i,n,r,s=0,o=t.length;if(o<3)return null;for(e=0;e<o;e++)if(n=(e+2)%o,r=(t[i=(e+1)%o].x-t[e].x)*(t[n].y-t[i].y),(r-=(t[i].y-t[e].y)*(t[n].x-t[i].x))<0?s|=1:r>0&&(s|=2),3===s)return!1;return 0!==s||null},n.hull=function(t){var e,i,n=[],s=[];for((t=t.slice(0)).sort((function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y})),i=0;i<t.length;i+=1){for(e=t[i];s.length>=2&&r.cross3(s[s.length-2],s[s.length-1],e)<=0;)s.pop();s.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];n.length>=2&&r.cross3(n[n.length-2],n[n.length-1],e)<=0;)n.pop();n.push(e)}return n.pop(),s.pop(),n.concat(s)}},function(t,e,i){ 335/** 336 * @author Richard Davey <[email protected]> 337 * @copyright 2020 Photon Storm Ltd. 338 * @license {@link https://opensource.org/licenses/MIT|MIT License} 339 */ 340var n=i(18);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}}
vendor: 4,575 bytes, lines 340-352
340,function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){ 341/** 342 * @author Richard Davey <[email protected]> 343 * @copyright 2020 Photon Storm Ltd. 344 * @license {@link https://opensource.org/licenses/MIT|MIT License} 345 */ 346var n=i(0),r=i(309),s=new n({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(r.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;n<t.length;n++)i.push(e[t[n]]);return i}return e[t]},getAll:function(){var t={};for(var e in this.list)this.list.hasOwnProperty(e)&&(t[e]=this.list[e]);return t},query:function(t){var e={};for(var i in this.list)this.list.hasOwnProperty(i)&&i.match(t)&&(e[i]=this.list[i]);return e},set:function(t,e){if(this._frozen)return this;if("string"==typeof t)return this.setValue(t,e);for(var i in t)this.setValue(i,t[i]);return this},inc:function(t,e){if(this._frozen)return this;void 0===e&&(e=1);var i=this.get(t);return void 0===i&&(i=0),this.set(t,i+e),this},toggle:function(t){return this._frozen||this.set(t,!this.get(t)),this},setValue:function(t,e){if(this._frozen)return this;if(this.has(t))this.values[t]=e;else{var i=this,n=this.list,s=this.events,o=this.parent;Object.defineProperty(this.values,t,{enumerable:!0,configurable:!0,get:function(){return n[t]},set:function(e){if(!i._frozen){var a=n[t];n[t]=e,s.emit(r.CHANGE_DATA,o,t,e,a),s.emit(r.CHANGE_DATA_KEY+t,o,e,a)}}}),n[t]=e,s.emit(r.SET_DATA,o,t,e)}return this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n<arguments.length;n++)i.push(arguments[n]);for(var r in this.list)i[1]=r,i[2]=this.list[r],t.apply(e,i);return this},merge:function(t,e){for(var i in void 0===e&&(e=!0),t)t.hasOwnProperty(i)&&(e||!e&&!this.has(i))&&this.setValue(i,t[i]);return this},remove:function(t){if(this._frozen)return this;if(!Array.isArray(t))return this.removeValue(t);for(var e=0;e<t.length;e++)this.removeValue(t[e]);return this},removeValue:function(t){if(this.has(t)){var e=this.list[t];delete this.list[t],delete this.values[t],this.events.emit(r.REMOVE_DATA,this.parent,t,e)}return this},pop:function(t){var e=void 0;return!this._frozen&&this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit(r.REMOVE_DATA,this.parent,t,e)),e},has:function(t){return this.list.hasOwnProperty(t)},setFreeze:function(t){return this._frozen=t,this},reset:function(){for(var t in this.list)delete this.list[t],delete this.values[t];return this._frozen=!1,this},destroy:function(){this.reset(),this.events.off(r.CHANGE_DATA),this.events.off(r.SET_DATA),this.events.off(r.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(t){this._frozen=!!t}},count:{get:function(){var t=0;for(var e in this.list)void 0!==this.list[e]&&t++;return t}}});t.exports=s},function(t,e,i){ 347/** 348 * @author Richard Davey <[email protected]> 349 * @copyright 2020 Photon Storm Ltd. 350 * @license {@link https://opensource.org/licenses/MIT|MIT License} 351 */ 352var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e<t.length;e++)this.set(t[e][0],t[e][1])},set:function(t,e){return this.has(t)||this.size++,this.entries[t]=e,this},get:function(t){if(this.has(t))return this.entries[t]},getArray:function(){var t=[],e=this.entries;for(var i in e)t.push(e[i]);return t},has:function(t){return this.entries.hasOwnProperty(t)},delete:function(t){return this.has(t)&&(delete this.entries[t],this.size--),this},clear:function(){return Object.keys(this.entries).forEach((function(t){delete this.entries[t]}),this),this.size=0,this},keys:function(){return Object.keys(this.entries)},values:function(){var t=[],e=this.entries;for(var i in e)t.push(e[i]);return t},dump:function(){var t=this.entries;for(var e in console.group("Map"),t)console.log(e,t[e]);console.groupEnd()},each:function(t){var e=this.entries;for(var i in e)if(!1===t(i,e[i]))break;return this},contains:function(t){var e=this.entries;for(var i in e)if(e[i]===t)return!0;return!1},merge:function(t,e){void 0===e&&(e=!1);var i=this.entries,n=t.entries;for(var r in n)i.hasOwnProperty(r)&&e?i[r]=n[r]:this.set(r,n[r]);return this}});t.exports=n}
352,function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){ 353/** 354 * @author Richard Davey <[email protected]> 355 * @copyright 2020 Photon Storm Ltd. 356 * @license {@link https://opensource.org/licenses/MIT|MIT License} 357 */ 358t.exports={ENTER_FULLSCREEN:i(776),FULLSCREEN_FAILED:i(777),FULLSCREEN_UNSUPPORTED:i(778),LEAVE_FULLSCREEN:i(779),ORIENTATION_CHANGE:i(780),RESIZE:i(781)}},function(t,e,i){(function(e){ 359/** 360 * @author Richard Davey <[email protected]> 361 * @copyright 2020 Photon Storm Ltd. 362 * @license {@link https://opensource.org/licenses/MIT|MIT License} 363 */ 364var i={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(i.iOS=!0,i.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),i.iOSVersion=parseInt(RegExp.$1,10)):i.macOS=!0:/Android/.test(t)?i.android=!0:/Linux/.test(t)?i.linux=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);return(i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&e.versions&&e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(this,i(804))},function(t,e,i){ 365/** 366 * @author Richard Davey <[email protected]> 367 * @copyright 2020 Photon Storm Ltd. 368 * @license {@link https://opensource.org/licenses/MIT|MIT License} 369 */ 370t.exports={ADD:i(857),ERROR:i(858),LOAD:i(859),READY:i(860),REMOVE:i(861)}},function(t,e){t.exports={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}}},function(t,e,i){ 371/** 372 * @author Richard Davey <[email protected]> 373 * @author Felipe Alfonso <@bitnenfer> 374 * @copyright 2020 Photon Storm Ltd. 375 * @license {@link https://opensource.org/licenses/MIT|MIT License} 376 */ 377var n=i(0),r=i(2),s=i(874),o=i(875),a=i(25),h=i(12),u=i(104),l=i(57),c=new n({Extends:l,initialize:function(t){var e=t.game.renderer,i=r(t,"fragShader",s);t.fragShader=h.parseFragmentShaderMaxTextures(i,e.maxTextures),t.vertShader=r(t,"vertShader",o),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:u.UNSIGNED_BYTE,normalized:!0}]),l.call(this,t),this._tempMatrix1=new a,this._tempMatrix2=new a,this._tempMatrix3=new a},boot:function(){l.prototype.boot.call(this),this.currentShader.set1iv("uMainSampler",this.renderer.textureIndexes)},batchSprite:function(t,e,i){this.manager.set(this,t);var n=this._tempMatrix1,r=this._tempMatrix2,s=this._tempMatrix3,o=t.frame,a=o.glTexture,u=o.u0,l=o.v0,c=o.u1,f=o.v1,d=o.x,p=o.y,v=o.cutWidth,g=o.cutHeight,m=o.customPivot,y=t.displayOriginX,x=t.displayOriginY,w=-y+d,_=-x+p;if(t.isCropped){var b=t._crop;b.flipX===t.flipX&&b.flipY===t.flipY||o.updateCropUVs(b,t.flipX,t.flipY),u=b.u0,l=b.v0,c=b.u1,f=b.v1,v=b.width,g=b.height,w=-y+(d=b.x),_=-x+(p=b.y)}var T=1,E=1;t.flipX&&(m||(w+=-o.realWidth+2*y),T=-1),(t.flipY||o.source.isGLTexture&&!a.flipY)&&(m||(_+=-o.realHeight+2*x),E=-1),r.applyITRS(t.x,t.y,t.rotation,t.scaleX*T,t.scaleY*E),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),r.e=t.x,r.f=t.y):(r.e-=e.scrollX*t.scrollFactorX,r.f-=e.scrollY*t.scrollFactorY),n.multiply(r,s);var S=w+v,A=_+g,C=e.roundPixels,O=s.getXRound(w,_,C),R=s.getYRound(w,_,C),M=s.getXRound(w,A,C),P=s.getYRound(w,A,C),I=s.getXRound(S,A,C),k=s.getYRound(S,A,C),L=s.getXRound(S,_,C),D=s.getYRound(S,_,C),F=h.getTintAppendFloatAlpha,N=e.alpha,B=F(t.tintTopLeft,N*t._alphaTL),U=F(t.tintTopRight,N*t._alphaTR),V=F(t.tintBottomLeft,N*t._alphaBL),Y=F(t.tintBottomRight,N*t._alphaBR);this.shouldFlush(6)&&this.flush();var z=this.setGameObject(t,o);this.manager.preBatch(t),this.batchQuad(t,O,R,M,P,I,k,L,D,u,l,c,f,B,U,V,Y,t.tintFill,a,z),this.manager.postBatch(t)}
377,batchTexture:function(t,e,i,n,r,s,o,a,h,u,l,c,f,d,p,v,g,m,y,x,w,_,b,T,E,S,A,C,O,R,M,P){this.manager.set(this,t);var I=this._tempMatrix1,k=this._tempMatrix2,L=this._tempMatrix3,D=m/i+A,F=y/n+C,N=(m+x)/i+A,B=(y+w)/n+C,U=o,V=a,Y=-v,z=-g;if(t.isCropped){var X=t._crop,G=X.width,W=X.height;U=G,V=W,o=G,a=W;var j=m=X.x,H=y=X.y;c&&(j=x-X.x-G),f&&(H=w-X.y-W),D=j/i+A,F=H/n+C,N=(j+G)/i+A,B=(H+W)/n+C,Y=-v+m,z=-g+y}c&&(U*=-1,Y+=o),(f^=!M&&e.isRenderTexture?1:0)&&(V*=-1,z+=a);var q=Y+U,K=z+V;k.applyITRS(r,s,l,h,u),I.copyFrom(O.matrix),R?(I.multiplyWithOffset(R,-O.scrollX*d,-O.scrollY*p),k.e=r,k.f=s):(k.e-=O.scrollX*d,k.f-=O.scrollY*p),I.multiply(k,L);var Z=O.roundPixels,Q=L.getXRound(Y,z,Z),J=L.getYRound(Y,z,Z),$=L.getXRound(Y,K,Z),tt=L.getYRound(Y,K,Z),et=L.getXRound(q,K,Z),it=L.getYRound(q,K,Z),nt=L.getXRound(q,z,Z),rt=L.getYRound(q,z,Z);void 0===P&&(P=this.renderer.setTexture2D(e)),t&&this.manager.preBatch(t),this.batchQuad(t,Q,J,$,tt,et,it,nt,rt,D,F,N,B,_,b,T,E,S,e,P),t&&this.manager.postBatch(t)},batchTextureFrame:function(t,e,i,n,r,s,o){this.manager.set(this);var a=this._tempMatrix1.copyFrom(s),u=this._tempMatrix2,l=e+t.width,c=i+t.height;o?a.multiply(o,u):u=a;var f=u.getX(e,i),d=u.getY(e,i),p=u.getX(e,c),v=u.getY(e,c),g=u.getX(l,c),m=u.getY(l,c),y=u.getX(l,i),x=u.getY(l,i),w=this.renderer.setTextureSource(t.source);n=h.getTintAppendFloatAlpha(n,r),this.batchQuad(null,f,d,p,v,g,m,y,x,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,w)}});t.exports=c},function(t,e,i){ 378/** 379 * @author Richard Davey <[email protected]> 380 * @copyright 2020 Photon Storm Ltd. 381 * @license {@link https://opensource.org/licenses/MIT|MIT License} 382 */ 383var n=i(0),r=i(18),s=i(17),o=new n({initialize:function(t,e,i,n,r,s,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(s,o,n,r)},setSize:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this.cutX=i,this.cutY=n,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var r=this.data,s=r.cut;s.x=i,s.y=n,s.w=t,s.h=e,s.r=i+t,s.b=n+e,r.sourceSize.w=t,r.sourceSize.h=e,r.spriteSourceSize.w=t,r.spriteSourceSize.h=e,r.radius=.5*Math.sqrt(t*t+e*e);var o=r.drawImage;return o.x=i,o.y=n,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,n,r,s){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=r,a.h=s,a.r=i+r,a.b=n+s,this.x=i,this.y=n,this.width=r,this.height=s,this.halfWidth=.5*r,this.halfHeight=.5*s,this.centerX=Math.floor(r/2),this.centerY=Math.floor(s/2),this.updateUVs()},setCropUVs:function(t,e,i,n,s,o,a){var h=this.cutX,u=this.cutY,l=this.cutWidth,c=this.cutHeight,f=this.realWidth,d=this.realHeight,p=h+(e=r(e,0,f)),v=u+(i=r(i,0,d)),g=n=r(n,0,f-e),m=s=r(s,0,d-i),y=this.data;if(y.trim){var x=y.spriteSourceSize,w=e+(n=r(n,0,l-e)),_=i+(s=r(s,0,c-i));if(x.r<e||x.b<i||x.x>w||x.y>_)p=0,v=0,g=0,m=0;else{var b=Math.max(x.x,e),T=Math.max(x.y,i),E=Math.min(x.r,w)-b,S=Math.min(x.b,_)-T;g=E,m=S,p=o?h+(l-(b-x.x)-E):h+(b-x.x),v=a?u+(c-(T-x.y)-S):u+(T-x.y),e=b,i=T,n=E,s=S}}else o&&(p=h+(l-e-n)),a&&(v=u+(c-i-s));var A=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/A),t.v0=Math.max(0,v/C),t.u1=Math.min(1,(p+g)/A),t.v1=Math.min(1,(v+m)/C),t.x=e,t.y=i,t.cx=p,t.cy=v,t.cw=g,t.ch=m,t.width=n,t.height=s,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,n,r,s){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=r,this.v1=s,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,r=this.data.drawImage;
vendor: 9,689 bytes, lines 383-401
383r.width=i,r.height=n;var s=this.source.width,o=this.source.height;return this.u0=t/s,this.v0=e/o,this.u1=(t+i)/s,this.v1=(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=s(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=o},function(t,e,i){ 384/** 385 * @author Richard Davey <[email protected]> 386 * @copyright 2020 Photon Storm Ltd. 387 * @license {@link https://opensource.org/licenses/MIT|MIT License} 388 */ 389var n=i(205),r=i(0),s=i(1),o=i(79),a=new r({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=s,this.removeCallback=s,this._sortKey=""},add:function(t,e){return e?n.Add(this.list,t):n.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?n.AddAt(this.list,t,e):n.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),o(this.list,e),this):this},getByName:function(t){return n.GetFirst(this.list,"name",t)},getRandom:function(t,e){return n.GetRandom(this.list,t,e)},getFirst:function(t,e,i,r){return n.GetFirst(this.list,t,e,i,r)},getAll:function(t,e,i,r){return n.GetAll(this.list,t,e,i,r)},count:function(t,e){return n.CountAllMatching(this.list,t,e)},swap:function(t,e){n.Swap(this.list,t,e)},moveTo:function(t,e){return n.MoveTo(this.list,t,e)},remove:function(t,e){return e?n.Remove(this.list,t):n.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?n.RemoveAt(this.list,t):n.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?n.RemoveBetween(this.list,t,e):n.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return n.BringToTop(this.list,t)},sendToBack:function(t){return n.SendToBack(this.list,t)},moveUp:function(t){return n.MoveUp(this.list,t),t},moveDown:function(t){return n.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(t,e){return n.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,r){return n.SetAll(this.list,t,e,i,r),this},each:function(t,e){for(var i=[null],n=2;n<arguments.length;n++)i.push(arguments[n]);for(n=0;n<this.list.length;n++)i[0]=this.list[n],t.apply(e,i)},shutdown:function(){this.removeAll(),this.list=[]},destroy:function(){this.removeAll(),this.parent=null,this.addCallback=null,this.removeCallback=null},length:{get:function(){return this.list.length}},first:{get:function(){return this.position=0,this.list.length>0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position<this.list.length?(this.position++,this.list[this.position]):null}},previous:{get:function(){return this.position>0?(this.position--,this.list[this.position]):null}}});t.exports=a},function(t,e,i){ 390/** 391 * @author Richard Davey <[email protected]> 392 * @copyright 2020 Photon Storm Ltd. 393 * @license {@link https://opensource.org/licenses/MIT|MIT License} 394 */ 395var n=i(0),r=i(109),s=i(439),o=i(440),a=i(55),h=i(177),u=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,r=(i-t.y)/t.height;return(n*=n)+(r*=r)<.25}},function(t,e,i){ 396/** 397 * @author Richard Davey <[email protected]> 398 * @copyright 2020 Photon Storm Ltd. 399 * @license {@link https://opensource.org/licenses/MIT|MIT License} 400 */ 401var n=i(269),r=i(0),s=i(75),o=i(9),a=i(204),h=i(2),u=i(6),l=i(7),c=i(431),f=i(148),d=i(73),p=new r({Extends:o,initialize:function(t,e,i){o.call(this),i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?l(e[0])&&(i=e,e=null):l(e)&&(i=e,e=null),this.scene=t,this.children=new f,this.isParent=!0,this.type="Group",this.classType=h(i,"classType",d),this.name=h(i,"name",""),this.active=h(i,"active",!0),this.maxSize=h(i,"maxSize",-1),this.defaultKey=h(i,"defaultKey",null),this.defaultFrame=h(i,"defaultFrame",null),this.runChildUpdate=h(i,"runChildUpdate",!1),this.createCallback=h(i,"createCallback",null),this.removeCallback=h(i,"removeCallback",null),this.createMultipleCallback=h(i,"createMultipleCallback",null),this.internalCreateCallback=h(i,"internalCreateCallback",null),this.internalRemoveCallback=h(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(t,e,i,n,r,s){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===r&&(r=!0),void 0===s&&(s=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=r,o.setActive(s),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i<t.length;i++){var n=this.createFromConfig(t[i]);e=e.concat(n)}return e},createFromConfig:function(t){if(this.isFull())return[];this.classType=h(t,"classType",this.classType);var e=h(t,"key",void 0),i=h(t,"frame",null),r=h(t,"visible",!0),s=h(t,"active",!0),o=[];if(void 0===e)return o;Array.isArray(e)||(e=[e]),Array.isArray(i)||(i=[i]);var a=h(t,"repeat",0),l=h(t,"randomKey",!1),f=h(t,"randomFrame",!1),d=h(t,"yoyo",!1),p=h(t,"quantity",!1),v=h(t,"frameQuantity",1),g=h(t,"max",0),m=c(e,i,{max:g,qty:p||v,random:l,randomB:f,repeat:a,yoyo:d});t.createCallback&&(this.createCallback=t.createCallback),t.removeCallback&&(this.removeCallback=t.removeCallback);for(var y=0;y<m.length;y++){var x=this.create(0,0,m[y].a,m[y].b,r,s);if(!x)break;o.push(x)}var w=u(t,"setXY.x",0),_=u(t,"setXY.y",0),b=u(t,"setXY.stepX",0),T=u(t,"setXY.stepY",0);n.SetXY(o,w,_,b,T);var E=u(t,"setRotation.value",0),S=u(t,"setRotation.step",0);n.SetRotation(o,E,S);var A=u(t,"setScale.x",1),C=u(t,"setScale.y",A),O=u(t,"setScale.stepX",0),R=u(t,"setScale.stepY",0);n.SetScale(o,A,C,O,R);var M=u(t,"setOrigin.x",.5),P=u(t,"setOrigin.y",M),I=u(t,"setOrigin.stepX",0),k=u(t,"setOrigin.stepY",0);n.SetOrigin(o,M,P,I,k);var L=u(t,"setAlpha.value",1),D=u(t,"setAlpha.step",0);n.SetAlpha(o,L,D);var F=u(t,"setDepth.value",0),N=u(t,"setDepth.step",0);n.SetDepth(o,F,N);var B=u(t,"setScrollFactor.x",1),U=u(t,"setScrollFactor.y",B),V=u(t,"setScrollFactor.stepX",0),Y=u(t,"setScrollFactor.stepY",0);n.SetScrollFactor(o,B,U,V,Y);var z=h(t,"hitArea",null),X=h(t,"hitAreaCallback",null);z&&n.SetHitArea(o,z,X);var G=h(t,"gridAlign",!1);return G&&n.GridAlign(o,G),this.createMultipleCallback&&this.createMultipleCallback.call(this,o),o},preUpdate:function(t,e){if(this.runChildUpdate&&0!==this.children.size)for(var i=this.children.entries.slice(),n=0;n<i.length;n++){var r=i[n];r.active&&r.update(t,e)}},add:function(t,e){return void 0===e&&(e=!1),this.isFull()||(this.children.set(t),this.internalCreateCallback&&this.internalCreateCallback.call(this,t),this.createCallback&&this.createCallback.call(this,t),e&&(this.scene.sys.displayList.add(t),t.preUpdate&&this.scene.sys.updateList.add(t)),t.on(s.DESTROY,this.remove,this)),this},addMultiple:function(t,e){if(void 0===e&&(e=!1),Array.isArray(t))for(var i=0;i<t.length;i++)this.add(t[i],e);return this}
vendor: 4,287 bytes, line 401
401,remove:function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=!1),this.children.contains(t)?(this.children.delete(t),this.internalRemoveCallback&&this.internalRemoveCallback.call(this,t),this.removeCallback&&this.removeCallback.call(this,t),t.off(s.DESTROY,this.remove,this),i?t.destroy():e&&(t.scene.sys.displayList.remove(t),t.preUpdate&&t.scene.sys.updateList.remove(t)),this):this},clear:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);for(var i=this.children,n=0;n<i.size;n++){var r=i.entries[n];r.off(s.DESTROY,this.remove,this),e?r.destroy():t&&(r.scene.sys.displayList.remove(r),r.preUpdate&&r.scene.sys.updateList.remove(r))}return this.children.clear(),this},contains:function(t){return this.children.contains(t)},getChildren:function(){return this.children.entries},getLength:function(){return this.children.size},getMatching:function(t,e,i,n){return a(this.children.entries,t,e,i,n)},getFirst:function(t,e,i,n,r,s,o){return this.getHandler(!0,1,t,e,i,n,r,s,o)},getFirstNth:function(t,e,i,n,r,s,o,a){return this.getHandler(!0,t,e,i,n,r,s,o,a)},getLast:function(t,e,i,n,r,s,o){return this.getHandler(!1,1,t,e,i,n,r,s,o)},getLastNth:function(t,e,i,n,r,s,o,a){return this.getHandler(!1,t,e,i,n,r,s,o,a)},getHandler:function(t,e,i,n,r,s,o,a,h){var u,l;void 0===i&&(i=!1),void 0===n&&(n=!1);var c=0,f=this.children.entries;if(t)for(l=0;l<f.length;l++)if((u=f[l]).active===i){if(++c===e)break}else u=null;else for(l=f.length-1;l>=0;l--)if((u=f[l]).active===i){if(++c===e)break}else u=null;return u?("number"==typeof r&&(u.x=r),"number"==typeof s&&(u.y=s),u):n?this.create(r,s,o,a,h):null},get:function(t,e,i,n,r){return this.getFirst(!1,!0,t,e,i,n,r)},getFirstAlive:function(t,e,i,n,r,s){return this.getFirst(!0,t,e,i,n,r,s)},getFirstDead:function(t,e,i,n,r,s){return this.getFirst(!1,t,e,i,n,r,s)},playAnimation:function(t,e){return n.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i<this.children.size;i++)this.children.entries[i].active===t&&e++;return e},getTotalUsed:function(){return this.countActive()},getTotalFree:function(){var t=this.getTotalUsed();return(-1===this.maxSize?999999999999:this.maxSize)-t},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},propertyValueSet:function(t,e,i,r,s){return n.PropertyValueSet(this.children.entries,t,e,i,r,s),this},propertyValueInc:function(t,e,i,r,s){return n.PropertyValueInc(this.children.entries,t,e,i,r,s),this},setX:function(t,e){return n.SetX(this.children.entries,t,e),this},setY:function(t,e){return n.SetY(this.children.entries,t,e),this},setXY:function(t,e,i,r){return n.SetXY(this.children.entries,t,e,i,r),this},incX:function(t,e){return n.IncX(this.children.entries,t,e),this},incY:function(t,e){return n.IncY(this.children.entries,t,e),this},incXY:function(t,e,i,r){return n.IncXY(this.children.entries,t,e,i,r),this},shiftPosition:function(t,e,i){return n.ShiftPosition(this.children.entries,t,e,i),this},angle:function(t,e){return n.Angle(this.children.entries,t,e),this},rotate:function(t,e){return n.Rotate(this.children.entries,t,e),this},rotateAround:function(t,e){return n.RotateAround(this.children.entries,t,e),this},rotateAroundDistance:function(t,e,i){return n.RotateAroundDistance(this.children.entries,t,e,i),this},setAlpha:function(t,e){return n.SetAlpha(this.children.entries,t,e),this},setTint:function(t,e,i,r){return n.SetTint(this.children.entries,t,e,i,r),this},setOrigin:function(t,e,i,r){return n.SetOrigin(this.children.entries,t,e,i,r),this},scaleX:function(t,e){return n.ScaleX(this.children.entries,t,e),this},scaleY:function(t,e){return n.ScaleY(this.children.entries,t,e),this},scaleXY:function(t,e,i,r){return n.ScaleXY(this.children.entries,t,e,i,r),this},setDepth:function(t,e){return n.SetDepth(this.children.entries,t,e),this},setBlendMode:function(t){return n.SetBlendMode(this.children.entries,t),this},setHitArea:function(t,e){return n.SetHitArea(this.children.entries,t,e),this},shuffle:function(){return n.Shuffle(this.children.entries),this},kill:function(t){this.children.contains(t)&&t.setActive(!1)},killAndHide:function(t){this.children.contains(t)&&(t.setActive(!1),t.setVisible(!1))}
401,setVisible:function(t,e,i){return n.SetVisible(this.children.entries,t,e,i),this},toggleVisible:function(){return n.ToggleVisible(this.children.entries),this},destroy:function(t){void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy&&(this.clear(!1,t),this.scene=void 0,this.children=void 0)}});t.exports=p},function(t,e,i){ 402/** 403 * @author Richard Davey <[email protected]> 404 * @copyright 2020 Photon Storm Ltd. 405 * @license {@link https://opensource.org/licenses/MIT|MIT License} 406 */ 407var n=i(12);t.exports=function(t,e,i,r,s,o){for(var a=n.getTintAppendFloatAlpha(i.fillColor,i.fillAlpha*r),h=i.pathData,u=i.pathIndexes,l=0;l<u.length;l+=3){var c=2*u[l],f=2*u[l+1],d=2*u[l+2],p=h[c+0]-s,v=h[c+1]-o,g=h[f+0]-s,m=h[f+1]-o,y=h[d+0]-s,x=h[d+1]-o,w=e.getX(p,v),_=e.getY(p,v),b=e.getX(g,m),T=e.getY(g,m),E=e.getX(y,x),S=e.getY(y,x);t.batchTri(w,_,b,T,E,S,a,a,a)}}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,r=t.y3-t.y1,s=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,u=n*n+r*r,l=n*s+r*o,c=n*a+r*h,f=s*s+o*o,d=s*a+o*h,p=u*f-l*l,v=0===p?0:1/p,g=(f*c-l*d)*v,m=(u*d-l*c)*v;return g>=0&&m>=0&&g+m<1}},function(t,e,i){ 408/** 409 * @author Richard Davey <[email protected]> 410 * @copyright 2020 Photon Storm Ltd. 411 * @license {@link https://opensource.org/licenses/MIT|MIT License} 412 */ 413var n=i(0),r=i(10),s=i(114),o=i(3);function a(t,e,i,n){var r=t-i,s=e-n,o=r*r+s*s;return Math.sqrt(o)}var h=new n({initialize:function(t,e,i){this.vertex1=t,this.vertex2=e,this.vertex3=i,this.bounds=new r,this._inCenter=new o},getInCenter:function(t){void 0===t&&(t=!0);var e,i,n,r,s,o,h=this.vertex1,u=this.vertex2,l=this.vertex3;t?(e=h.x,i=h.y,n=u.x,r=u.y,s=l.x,o=l.y):(e=h.vx,i=h.vy,n=u.vx,r=u.vy,s=l.vx,o=l.vy);var c=a(s,o,n,r),f=a(e,i,s,o),d=a(n,r,e,i),p=c+f+d;return this._inCenter.set((e*c+n*f+s*d)/p,(i*c+r*f+o*d)/p)},contains:function(t,e,i){var n=this.vertex1,r=this.vertex2,s=this.vertex3,o=n.vx,a=n.vy,h=r.vx,u=r.vy,l=s.vx,c=s.vy;if(i){var f=i.a,d=i.b,p=i.c,v=i.d,g=i.e,m=i.f;o=n.vx*f+n.vy*p+g,a=n.vx*d+n.vy*v+m,h=r.vx*f+r.vy*p+g,u=r.vx*d+r.vy*v+m,l=s.vx*f+s.vy*p+g,c=s.vx*d+s.vy*v+m}var y=l-o,x=c-a,w=h-o,_=u-a,b=t-o,T=e-a,E=y*y+x*x,S=y*w+x*_,A=y*b+x*T,C=w*w+_*_,O=w*b+_*T,R=E*C-S*S,M=0===R?0:1/R,P=(C*A-S*O)*M,I=(E*O-S*A)*M;return P>=0&&I>=0&&P+I<1},isCounterClockwise:function(t){var e=this.vertex1,i=this.vertex2,n=this.vertex3,r=(i.vx-e.vx)*(n.vy-e.vy)-(i.vy-e.vy)*(n.vx-e.vx);return t<=0?r>=0:r<0},load:function(t,e,i,n,r){return i=this.vertex1.load(t,e,i,n,r),i=this.vertex2.load(t,e,i,n,r),i=this.vertex3.load(t,e,i,n,r)},transformCoordinatesLocal:function(t,e,i,n){return this.vertex1.transformCoordinatesLocal(t,e,i,n),this.vertex2.transformCoordinatesLocal(t,e,i,n),this.vertex3.transformCoordinatesLocal(t,e,i,n),this},updateBounds:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3,n=this.bounds;return n.x=Math.min(t.vx,e.vx,i.vx),n.y=Math.min(t.vy,e.vy,i.vy),n.width=Math.max(t.vx,e.vx,i.vx)-n.x,n.height=Math.max(t.vy,e.vy,i.vy)-n.y,this},isInView:function(t,e,i,n,r,o,a,h,u,l,c){var f=this.vertex1.update(r,o,a,h,u,l,c,n),d=this.vertex2.update(r,o,a,h,u,l,c,n),p=this.vertex3.update(r,o,a,h,u,l,c,n);if(f.ta<=0&&d.ta<=0&&p.ta<=0)return!1;if(e&&!this.isCounterClockwise(i))return!1;var v=this.bounds;return v.x=Math.min(f.tx,d.tx,p.tx),v.y=Math.min(f.ty,d.ty,p.ty),v.width=Math.max(f.tx,d.tx,p.tx)-v.x,v.height=Math.max(f.ty,d.ty,p.ty)-v.y,s(v,t.worldView)},translate:function(t,e){void 0===e&&(e=0);var i=this.vertex1,n=this.vertex2,r=this.vertex3;return i.x+=t,i.y+=e,n.x+=t,n.y+=e,r.x+=t,r.y+=e,this},x:{get:function(){return this.getInCenter().x},set:function(t){var e=this.getInCenter();this.translate(t-e.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(t){var e=this.getInCenter();this.translate(0,t-e.y)}},alpha:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.alpha+e.alpha+i.alpha)/3},set:function(t){this.vertex1.alpha=t,this.vertex2.alpha=t,this.vertex3.alpha=t}},depth:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.vz+e.vz+i.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});t.exports=h},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.right<e.x||t.bottom<e.y||t.x>e.right||t.y>e.bottom)}}
vendor: 4,482 bytes, lines 413-425
413,function(t,e,i){ 414/** 415 * @author Richard Davey <[email protected]> 416 * @copyright 2020 Photon Storm Ltd. 417 * @license {@link https://opensource.org/licenses/MIT|MIT License} 418 */ 419var n=i(0),r=i(12),s=i(38),o=new n({Extends:s,initialize:function(t,e,i,n,r,o,a,h,u,l){void 0===o&&(o=16777215),void 0===a&&(a=1),void 0===h&&(h=0),void 0===u&&(u=0),void 0===l&&(l=0),s.call(this,t,e,i),this.vx=0,this.vy=0,this.vz=0,this.nx=h,this.ny=u,this.nz=l,this.u=n,this.v=r,this.color=o,this.alpha=a,this.tx=0,this.ty=0,this.ta=0},setUVs:function(t,e){return this.u=t,this.v=e,this},transformCoordinatesLocal:function(t,e,i,n){var r=this.x,s=this.y,o=this.z,a=t.val,h=r*a[0]+s*a[4]+o*a[8]+a[12],u=r*a[1]+s*a[5]+o*a[9]+a[13],l=r*a[2]+s*a[6]+o*a[10]+a[14],c=r*a[3]+s*a[7]+o*a[11]+a[15];this.vx=h/c*e,this.vy=-u/c*i,this.vz=n<=0?l/c:-l/c},update:function(t,e,i,n,r,s,o,a){var h=this.vx*t+this.vy*i+r,u=this.vx*e+this.vy*n+s;return o&&(h=Math.round(h),u=Math.round(u)),this.tx=h,this.ty=u,this.ta=this.alpha*a,this},load:function(t,e,i,n,s){return t[++i]=this.tx,t[++i]=this.ty,t[++i]=this.u,t[++i]=this.v,t[++i]=n,t[++i]=s,e[++i]=r.getTintAppendFloatAlpha(this.color,this.ta),i}});t.exports=o},function(t,e){var i={};t.exports=i,i.create=function(t,e){return{x:t||0,y:e||0}},i.clone=function(t){return{x:t.x,y:t.y}},i.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},i.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},i.rotate=function(t,e,i){var n=Math.cos(e),r=Math.sin(e);i||(i={});var s=t.x*n-t.y*r;return i.y=t.x*r+t.y*n,i.x=s,i},i.rotateAbout=function(t,e,i,n){var r=Math.cos(e),s=Math.sin(e);n||(n={});var o=i.x+((t.x-i.x)*r-(t.y-i.y)*s);return n.y=i.y+((t.x-i.x)*s+(t.y-i.y)*r),n.x=o,n},i.normalise=function(t){var e=i.magnitude(t);return 0===e?{x:0,y:0}:{x:t.x/e,y:t.y/e}},i.dot=function(t,e){return t.x*e.x+t.y*e.y},i.cross=function(t,e){return t.x*e.y-t.y*e.x},i.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},i.add=function(t,e,i){return i||(i={}),i.x=t.x+e.x,i.y=t.y+e.y,i},i.sub=function(t,e,i){return i||(i={}),i.x=t.x-e.x,i.y=t.y-e.y,i},i.mult=function(t,e){return{x:t.x*e,y:t.y*e}},i.div=function(t,e){return{x:t.x/e,y:t.y/e}},i.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},i.neg=function(t){return{x:-t.x,y:-t.y}},i.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},i._temp=[i.create(),i.create(),i.create(),i.create(),i.create(),i.create()]},function(t,e){var i={};t.exports=i,i.create=function(t){var e={min:{x:0,y:0},max:{x:0,y:0}};return t&&i.update(e,t),e},i.update=function(t,e,i){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var n=0;n<e.length;n++){var r=e[n];r.x>t.max.x&&(t.max.x=r.x),r.x<t.min.x&&(t.min.x=r.x),r.y>t.max.y&&(t.max.y=r.y),r.y<t.min.y&&(t.min.y=r.y)}i&&(i.x>0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},i.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},function(t,e){t.exports=function(t,e,i){return t>=0&&t<i.width&&e>=0&&e<i.height}},function(t,e,i){ 420/** 421 * @author Richard Davey <[email protected]> 422 * @copyright 2020 Photon Storm Ltd. 423 * @license {@link https://opensource.org/licenses/MIT|MIT License} 424 */ 425var n=i(0),r=i(29),s=i(2),o=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","layer"),this.x=s(t,"x",0),this.y=s(t,"y",0),this.width=s(t,"width",0),this.height=s(t,"height",0),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.baseTileWidth=s(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=s(t,"baseTileHeight",this.tileHeight),this.orientation=s(t,"orientation",r.ORTHOGONAL),this.widthInPixels=s(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=s(t,"alpha",1),this.visible=s(t,"visible",!0),this.properties=s(t,"properties",[]),this.indexes=s(t,"indexes",[]),this.collideIndexes=s(t,"collideIndexes",[]),this.callbacks=s(t,"callbacks",[]),this.bodies=s(t,"bodies",[]),this.data=s(t,"data",[]),this.tilemapLayer=s(t,"tilemapLayer",null),this.hexSideLength=s(t,"hexSideLength",0)}});t.exports=o}
vendor: 4,164 bytes, lines 425-443
425,function(t,e,i){ 426/** 427 * @author Richard Davey <[email protected]> 428 * @copyright 2020 Photon Storm Ltd. 429 * @license {@link https://opensource.org/licenses/MIT|MIT License} 430 */ 431var n=i(0),r=i(29),s=i(2),o=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","map"),this.width=s(t,"width",0),this.height=s(t,"height",0),this.infinite=s(t,"infinite",!1),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.widthInPixels=s(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.tileHeight),this.format=s(t,"format",null),this.orientation=s(t,"orientation",r.ORTHOGONAL),this.renderOrder=s(t,"renderOrder","right-down"),this.version=s(t,"version","1"),this.properties=s(t,"properties",{}),this.layers=s(t,"layers",[]),this.images=s(t,"images",[]),this.objects=s(t,"objects",{}),this.collision=s(t,"collision",{}),this.tilesets=s(t,"tilesets",[]),this.imageCollections=s(t,"imageCollections",[]),this.tiles=s(t,"tiles",[]),this.hexSideLength=s(t,"hexSideLength",0)}});t.exports=o},function(t,e,i){ 432/** 433 * @author Richard Davey <[email protected]> 434 * @copyright 2020 Photon Storm Ltd. 435 * @license {@link https://opensource.org/licenses/MIT|MIT License} 436 */ 437var n=new(i(0))({initialize:function(t,e,i,n,r,s,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===r&&(r=0),void 0===s&&(s=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=r,this.tileSpacing=s,this.tileProperties=o,this.tileData=a,this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t<this.firstgid+this.total},getTileTextureCoordinates:function(t){return this.containsTileIndex(t)?this.texCoordinates[t-this.firstgid]:null},setImage:function(t){return this.image=t,this.glTexture=t.get().source.glTexture,this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setTileSize:function(t,e){return void 0!==t&&(this.tileWidth=t),void 0!==e&&(this.tileHeight=e),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(t,e){return void 0!==t&&(this.tileMargin=t),void 0!==e&&(this.tileSpacing=e),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(t,e){var i=(e-2*this.tileMargin+this.tileSpacing)/(this.tileHeight+this.tileSpacing),n=(t-2*this.tileMargin+this.tileSpacing)/(this.tileWidth+this.tileSpacing);i%1==0&&n%1==0||console.warn("Image tile area not tile size multiple in: "+this.name),i=Math.floor(i),n=Math.floor(n),this.rows=i,this.columns=n,this.total=i*n,this.texCoordinates.length=0;for(var r=this.tileMargin,s=this.tileMargin,o=0;o<this.rows;o++){for(var a=0;a<this.columns;a++)this.texCoordinates.push({x:r,y:s}),r+=this.tileWidth+this.tileSpacing;r=this.tileMargin,s+=this.tileHeight+this.tileSpacing}return this}});t.exports=n},function(t,e){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)<i}},function(t,e,i){ 438/** 439 * @author Richard Davey <[email protected]> 440 * @copyright 2020 Photon Storm Ltd. 441 * @license {@link https://opensource.org/licenses/MIT|MIT License} 442 */ 443var n=i(0),r=i(11),s=i(15),o=i(1062),a=new n({Extends:s,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,o],initialize:function(t,e,
vendor: 9,208 bytes, lines 443-461
443i,n,r){s.call(this,t,"Image"),this._crop=this.resetCropObject(),this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()}});t.exports=a},function(t,e){t.exports=function(t,e){return t.hasOwnProperty(e)}},function(t,e,i){var n={};t.exports=n;var r=i(94),s=i(50),o=i(71),a=i(117),h=i(116),u=i(1487);n.rectangle=function(t,e,i,n,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:r.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(a.chamfer){var u=a.chamfer;h.vertices=r.chamfer(h.vertices,u.radius,u.quality,u.qualityMin,u.qualityMax),delete a.chamfer}return o.create(s.extend({},h,a))},n.trapezoid=function(t,e,i,n,a,h){h=h||{};var u,l=i*(a*=.5),c=l+(1-2*a)*i,f=c+l;u=a<.5?"L 0 0 L "+l+" "+-n+" L "+c+" "+-n+" L "+f+" 0":"L 0 0 L "+c+" "+-n+" L "+f+" 0";var d={label:"Trapezoid Body",position:{x:t,y:e},vertices:r.fromPath(u)};if(h.chamfer){var p=h.chamfer;d.vertices=r.chamfer(d.vertices,p.radius,p.quality,p.qualityMin,p.qualityMax),delete h.chamfer}return o.create(s.extend({},d,h))},n.circle=function(t,e,i,r,o){r=r||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),n.polygon(t,e,h,i,s.extend({},a,r))},n.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return n.circle(t,e,a,h);for(var u=2*Math.PI/i,l="",c=.5*u,f=0;f<i;f+=1){var d=c+f*u,p=Math.cos(d)*a,v=Math.sin(d)*a;l+="L "+p.toFixed(3)+" "+v.toFixed(3)+" "}var g={label:"Polygon Body",position:{x:t,y:e},vertices:r.fromPath(l)};if(h.chamfer){var m=h.chamfer;g.vertices=r.chamfer(g.vertices,m.radius,m.quality,m.qualityMin,m.qualityMax),delete h.chamfer}return o.create(s.extend({},g,h))},n.fromVertices=function(t,e,i,a,h,l,c){var f,d,p,v,g,m;for(a=a||{},d=[],h=void 0!==h&&h,l=void 0!==l?l:.01,c=void 0!==c?c:10,u||s.warn("Bodies.fromVertices: poly-decomp.js required. Could not decompose vertices. Fallback to convex hull."),s.isArray(i[0])||(i=[i]),m=0;m<i.length;m+=1)if(v=i[m],(p=r.isConvex(v))||!u)v=p?r.clockwiseSort(v):r.hull(v),d.push({position:{x:t,y:e},vertices:v});else{var y=v.map((function(t){return[t.x,t.y]}));u.makeCCW(y),!1!==l&&u.removeCollinearPoints(y,l);var x=u.quickDecomp(y);for(g=0;g<x.length;g++){var w=x[g].map((function(t){return{x:t[0],y:t[1]}}));c>0&&r.area(w)<c||d.push({position:r.centre(w),vertices:w})}}for(g=0;g<d.length;g++)d[g]=o.create(s.extend(d[g],a));return h&&n.flagCoincidentParts(d,5),d.length>1?(f=o.create(s.extend({parts:d.slice(0)},a)),o.setPosition(f,{x:t,y:e}),f):d[0]},n.flagCoincidentParts=function(t,e){void 0===e&&(e=5);for(var i=0;i<t.length;i++)for(var n=t[i],r=i+1;r<t.length;r++){var s=t[r];if(a.overlaps(n.bounds,s.bounds))for(var o=n.vertices,u=s.vertices,l=0;l<n.vertices.length;l++)for(var c=0;c<s.vertices.length;c++){var f=h.magnitudeSquared(h.sub(o[(l+1)%o.length],u[c])),d=h.magnitudeSquared(h.sub(o[l],u[(c+1)%u.length]));f<e&&d<e&&(o[l].isInternal=!0,u[c].isInternal=!0)}}return t}},function(t,e,i){ 444/** 445 * @author Richard Davey <[email protected]> 446 * @copyright 2020 Photon Storm Ltd. 447 * @license {@link https://opensource.org/licenses/MIT|MIT License} 448 */ 449var n=i(34),r=i(62),s=i(63),o=i(0),a=i(11),h=i(15),u=i(10),l=i(56),c=new o({Extends:h,Mixins:[a.Depth,a.GetBounds,a.Origin,a.Transform,a.ScrollFactor,a.Visible],initialize:function(t,e,i,r,s){void 0===r&&(r=1),void 0===s&&(s=r),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=r,this.height=s,this.blendMode=n.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e,i){void 0===i&&(i=!0),this.width=t,this.height=e,this.updateDisplayOrigin();var n=this.input;return i&&n&&!n.customHitArea&&(n.hitArea.width=t,n.hitArea.height=e),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},setCircleDropZone:function(t){return this.setDropZone(new r(0,0,t),s)},setRectangleDropZone:function(t,e){return this.setDropZone(new u(0,0,t,e),l)},setDropZone:function(t,e){return void 0===t?this.setRectangleDropZone(this.width,this.height):this.input||this.setInteractive(t,e,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(){},renderWebGL:function(){}});t.exports=c},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e){t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){ 450/** 451 * @author Richard Davey <[email protected]> 452 * @copyright 2020 Photon Storm Ltd. 453 * @license {@link https://opensource.org/licenses/MIT|MIT License} 454 */ 455t.exports={ADD_ANIMATION:i(700),ANIMATION_COMPLETE:i(701),ANIMATION_COMPLETE_KEY:i(702),ANIMATION_REPEAT:i(703),ANIMATION_RESTART:i(704),ANIMATION_START:i(705),ANIMATION_STOP:i(706),ANIMATION_UPDATE:i(707),PAUSE_ALL:i(708),REMOVE_ANIMATION:i(709),RESUME_ALL:i(710)}},function(t,e,i){ 456/** 457 * @author Richard Davey <[email protected]> 458 * @copyright 2020 Photon Storm Ltd. 459 * @license {@link https://opensource.org/licenses/MIT|MIT License} 460 */ 461var n=i(0),r=i(11),s=i(35),o=i(9),a=i(36),h=i(10),u=i(25),l=i(184),c=i(3),f=new n({Extends:o,Mixins:[r.Alpha,r.Visible],initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._width=i,this._height=n,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new u,this.transparent=!0,this.backgroundColor=l("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,n/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[]},addToRenderList:function(t){this.renderList.push(t)},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var n=.5*this.width,r=.5*this.height;return i.x=t-n,i.y=e-r,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],n=e[1],r=e[2],s=e[3],o=i*s-n*r;if(!o)return t;var a=e[4],h=e[5],u=this.scrollX,l=this.scrollY,c=this.width,f=this.height,d=this.y,p=d+f,v=this.x,g=v+c,m=this.culledObjects,y=t.length;o=1/o,m.length=0;for(var x=0;x<y;++x){var w=t[x];if(w.hasOwnProperty("width")&&!w.parentContainer){var _=w.width,b=w.height,T=w.x-u*w.scrollFactorX-_*w.originX,E=w.y-l*w.scrollFactorY-b*w.originY;(T+_)*i+(E+b)*r+a>v&&T*i+E*r+a<g&&(T+_)*n+(E+b)*s+h>d&&T*n+E*s+h<p&&m.push(w)}else m.push(w)}return m},getWorldPoint:function(t,e,i){void 0===i&&(i=new c);var n=this.matrix.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=n[4],u=n[5],l=r*a-s*o;if(!l)return i.x=t,i.y=e,i;var f=a*(l=1/l),d=-s*l,p=-o*l,v=r*l,g=(o*u-a*h)*l,m=(s*h-r*u)*l,y=Math.cos(this.rotation),x=Math.sin(this.rotation),w=this.zoomX,_=this.zoomY,b=this.scrollX,T=this.scrollY,E=t+(b*y-T*x)*w,S=e+(b*x+T*y)*_;return i.x=E*f+S*p+g,i.y=E*d+S*v+m,i},ignore:function(t){var e=this.id;Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i];Array.isArray(n)?this.ignore(n):n.isParent?this.ignore(n.getChildren()):n.cameraFilter|=e}return this},preRender:function(){this.renderList.length=0;var t=this.width,e=this.height,i=.5*t,n=.5*e,r=this.zoomX,s=this.zoomY,o=this.matrix,a=t*this.originX,h=e*this.originY,u=this.scrollX,l=this.scrollY;this.useBounds&&(u=this.clampX(u),l=this.clampY(l)),this.roundPixels&&(a=Math.round(a),h=Math.round(h)),this.scrollX=u,this.scrollY=l;var c=u+i,f=l+n;this.midPoint.set(c,f);var d=t/r,p=e/s;this.worldView.setTo(c-d/2,f-p/2,d,p),o.applyITRS(this.x+a,this.y+h,this.rotation,r,s),o.translate(-a,-h)},clampX:function(t){var e=this._bounds,i=this.displayWidth,n=e.x+(i-this.width)/2,r=Math.max(n,n+e.width-i);return t<n?t=n:t>r&&(t=r),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,n=e.y+(i-this.height)/2,r=Math.max(n,n+e.height-i);return t<n?t=n:t>r&&(t=r),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=s(t),this}
vendor: 9,253 bytes, lines 461-479
461,setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=l(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n,r){return void 0===r&&(r=!1),this._bounds.setTo(t,e,i,n),this.dirty=!0,this.useBounds=!0,r?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t;var e=t.sys;return this.sceneManager=e.game.scene,this.scaleManager=e.scale,this.cameraManager=e.cameras,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),0===t&&(t=.001),0===e&&(e=.001),this.zoomX=t,this.zoomY=e,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},updateSystem:function(){if(this.scaleManager){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){this._scrollX=t,this.dirty=!0}},scrollY:{get:function(){return this._scrollY},set:function(t){this._scrollY=t,this.dirty=!0}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(t){this._zoomX=t,this._zoomY=t,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(t){this._zoomX=t,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(t){this._zoomY=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});t.exports=f},function(t,e,i){ 462/** 463 * @author Richard Davey <[email protected]> 464 * @copyright 2020 Photon Storm Ltd. 465 * @license {@link https://opensource.org/licenses/MIT|MIT License} 466 */ 467var n=i(328),r=i(329),s=i(330),o=i(331),a=i(332),h=i(333),u=i(334),l=i(335),c=i(336),f=i(337),d=i(338),p=i(339);t.exports={Power0:u,Power1:l.Out,Power2:o.Out,Power3:c.Out,Power4:f.Out,Linear:u,Quad:l.Out,Cubic:o.Out,Quart:c.Out,Quint:f.Out,Sine:d.Out,Expo:h.Out,Circ:s.Out,Elastic:a.Out,Back:n.Out,Bounce:r.Out,Stepped:p,"Quad.easeIn":l.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":f.In,"Sine.easeIn":d.In,"Expo.easeIn":h.In,"Circ.easeIn":s.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":r.In,"Quad.easeOut":l.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":f.Out,"Sine.easeOut":d.Out,"Expo.easeOut":h.Out,"Circ.easeOut":s.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":r.Out,"Quad.easeInOut":l.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":f.InOut,"Sine.easeInOut":d.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":s.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":r.InOut}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e,i){ 468/** 469 * @author Richard Davey <[email protected]> 470 * @copyright 2020 Photon Storm Ltd. 471 * @license {@link https://opensource.org/licenses/MIT|MIT License} 472 */ 473var n,r=i(102),s={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?s.edge=!0:/Chrome\/(\d+)/.test(n)&&!r.windowsPhone?(s.chrome=!0,s.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(s.firefox=!0,s.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&r.iOS?s.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(s.ie=!0,s.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?s.opera=!0:/Safari/.test(n)&&!r.windowsPhone?s.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(s.ie=!0,s.trident=!0,s.tridentVersion=parseInt(RegExp.$1,10),s.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(s.silk=!0),s)},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e){t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),n?(i+t)/e:i+t)}},function(t,e,i){ 474/** 475 * @author Richard Davey <[email protected]> 476 * @copyright 2020 Photon Storm Ltd. 477 * @license {@link https://opensource.org/licenses/MIT|MIT License} 478 */ 479var n=new(i(0))({initialize:function(t,e,i,n){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},clone:function(){return new n(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=n*r),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z,s=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this.w=s+e*(t.w-s),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+r*r)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,r=t.w-this.w||0;return e*e+i*i+n*n+r*r},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,r=this.w,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12]*r,this.y=s[1]*e+s[5]*i+s[9]*n+s[13]*r,this.z=s[2]*e+s[6]*i+s[10]*n+s[14]*r,this.w=s[3]*e+s[7]*i+s[11]*n+s[15]*r,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z,a=t.w,h=a*e+s*n-o*i,u=a*i+o*e-r*n,l=a*n+r*i-s*e,c=-r*e-s*i-o*n;return this.x=h*a+c*-r+u*-o-l*-s,this.y=u*a+c*-s+l*-r-h*-o,this.z=l*a+c*-o+h*-s-u*-r,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n}
479,function(t,e,i){ 480/** 481 * @author Richard Davey <[email protected]> 482 * @copyright 2020 Photon Storm Ltd. 483 * @license {@link https://opensource.org/licenses/MIT|MIT License} 484 */ 485var n=i(0),r=i(88),s=new n({initialize:function(t,e,i,n,r,s,o){void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=!0),void 0===o&&(o=!1),this.renderer=t,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=n,this.minFilter=r,this.autoClear=s,this.autoResize=!1,this.resize(e,i),o&&this.setAutoResize(!0)},setAutoResize:function(t){return t&&!this.autoResize?(this.renderer.on(r.RESIZE,this.resize,this),this.autoResize=!0):!t&&this.autoResize&&(this.renderer.off(r.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(t,e){var i=t*this.scale,n=e*this.scale;if(i!==this.width||n!==this.height){var r=this.renderer;r.deleteFramebuffer(this.framebuffer),r.deleteTexture(this.texture),t*=this.scale,e*=this.scale,this.texture=r.createTextureFromSource(null,t,e,this.minFilter),this.framebuffer=r.createFramebuffer(t,e,this.texture,!1),this.width=t,this.height=e}return this},bind:function(t,e,i){if(void 0===t&&(t=!1),t&&this.renderer.flush(),e&&i&&this.resize(e,i),this.renderer.pushFramebuffer(this.framebuffer,!1,!1,!1),t&&this.adjustViewport(),this.autoClear){var n=this.renderer.gl;n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT)}},adjustViewport:function(){var t=this.renderer.gl;t.viewport(0,0,this.width,this.height),t.disable(t.SCISSOR_TEST)},clear:function(){var t=this.renderer,e=t.gl;t.pushFramebuffer(this.framebuffer),e.disable(e.SCISSOR_TEST),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),t.popFramebuffer(),t.resetScissor()},unbind:function(t){void 0===t&&(t=!1);var e=this.renderer;return t&&e.flush(),e.popFramebuffer()},destroy:function(){var t=this.renderer;t.deleteFramebuffer(this.framebuffer),t.deleteTexture(this.texture),t.off(r.RESIZE,this.resize,this),this.renderer=null,this.framebuffer=null,this.texture=null}});t.exports=s},function(t,e){t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement||null===e)return t;return i||(i=document.body),i.appendChild(t),t}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){ 486/** 487 * @author Richard Davey <[email protected]> 488 * @copyright 2020 Photon Storm Ltd. 489 * @license {@link https://opensource.org/licenses/MIT|MIT License} 490 */ 491var n=i(77);t.exports=function(t,e){var i=n(t);for(var r in e)i.hasOwnProperty(r)||(i[r]=e[r]);return i}},function(t,e,i){ 492/** 493 * @author Richard Davey <[email protected]> 494 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 495 * @copyright 2020 Photon Storm Ltd. 496 * @license {@link https://opensource.org/licenses/MIT|MIT License} 497 */ 498var n=i(0),r=i(77),s=i(9),o=i(69),a=i(22),h=i(1),u=i(204),l=i(422),c=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,t.events.on(a.BLUR,this.onGameBlur,this),t.events.on(a.FOCUS,this.onGameFocus,this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var n in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var s=r(e),o=i.spritemap[n];s.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:n,start:o.start,duration:o.end-o.start,config:s})}return i},get:function(t){return l(this.sounds,"key",t)},getAll:function(t){return u(this.sounds,"key",t)},play:function(t,e){var i=this.add(t);return i.once(o.COMPLETE,i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()}
498,playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once(o.COMPLETE,n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeAll:function(){this.sounds.forEach((function(t){t.destroy()})),this.sounds.length=0},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound((function(t){t.pause()})),this.emit(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound((function(t){t.resume()})),this.emit(o.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound((function(t){t.stop()})),this.emit(o.STOP_ALL,this)},stopByKey:function(t){var e=0;return this.getAll(t).forEach((function(t){t.stop()&&e++})),e},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.pauseOnBlur&&this.onFocus()},update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach((function(i){i.update(t,e)}))},destroy:function(){this.game.events.off(a.BLUR,this.onGameBlur,this),this.game.events.off(a.FOCUS,this.onGameFocus,this),this.game.events.off(a.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach((function(n,r){n&&!n.pendingRemove&&t.call(e||i,n,r,i.sounds)}))},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(o.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(o.GLOBAL_DETUNE,this,t)}}});t.exports=c},function(t,e,i){ 499/** 500 * @author Richard Davey <[email protected]> 501 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 502 * @copyright 2020 Photon Storm Ltd. 503 * @license {@link https://opensource.org/licenses/MIT|MIT License} 504 */ 505var n=i(0),r=i(9),s=i(69),o=i(17),a=i(1),h=new n({Extends:r,initialize:function(t,e,i){r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name||(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),1):(t=o(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},t),this.markers[t.name]=t,0)))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name||(this.markers[t.name]?(this.markers[t.name]=o(!0,this.markers[t.name],t),0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),1)))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=o(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying||(this.isPlaying=!1,this.isPaused=!0,0))},resume:function(){return!(!this.isPaused||this.isPlaying||(this.isPlaying=!0,this.isPaused=!1,0))},stop:function(){return!(!this.isPaused&&!this.isPlaying||(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),0))},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:a,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e}
vendor: 4,860 bytes, lines 505-517
505,destroy:function(){this.pendingRemove||(this.emit(s.DESTROY,this),this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=h},function(t,e,i){ 506/** 507 * @author Richard Davey <[email protected]> 508 * @copyright 2020 Photon Storm Ltd. 509 * @license {@link https://opensource.org/licenses/MIT|MIT License} 510 */ 511var n=i(206),r=i(429);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=r(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=r(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i<t.length;i++)t[i].reverse();t.reverse()}return t}},function(t,e,i){ 512/** 513 * @author Richard Davey <[email protected]> 514 * @copyright 2020 Photon Storm Ltd. 515 * @license {@link https://opensource.org/licenses/MIT|MIT License} 516 */ 517var n=i(0),r=i(18),s=i(11),o=i(15),a=i(1037),h=i(1038),u=i(209),l=i(10),c=i(1039),f=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Texture,s.Tint,s.Transform,s.Visible,c],initialize:function(t,e,i,n,r,s,h){void 0===r&&(r=""),void 0===h&&(h=0),o.call(this,t,"BitmapText"),this.font=n;var u=this.scene.sys.cache.bitmapFont.get(n);u||console.warn("Invalid BitmapText key: "+n),this.fontData=u.data,this._text="",this._fontSize=s||this.fontData.size,this._letterSpacing=0,this._align=h,this._bounds=a(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.setTexture(u.texture,u.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.setText(r)},setLeftAlign:function(){return this._align=f.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=f.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=f.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(t){return this._fontSize=t,this._dirty=!0,this},setLetterSpacing:function(t){return void 0===t&&(t=0),this._letterSpacing=t,this._dirty=!0,this},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this.text&&(this._text=t.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=.5),this.dropShadowX=t,this.dropShadowY=e,this.dropShadowColor=i,this.dropShadowAlpha=n,this},setCharacterTint:function(t,e,i,n,s,o,a){void 0===t&&(t=0),void 0===e&&(e=1),void 0===i&&(i=!1),void 0===n&&(n=-1),void 0===s&&(s=n,o=n,a=n);var h=this.text.length;-1===e&&(e=h),t<0&&(t=h+t),t=r(t,0,h-1);for(var u=r(t+e,t,h),l=this.charColors,c=t;c<u;c++){var f=l[c];if(-1===n)l[c]=null;else{var d=i?1:0;f?(f.tintEffect=d,f.tintTL=n,f.tintTR=s,f.tintBL=o,f.tintBR=a):l[c]={tintEffect:d,tintTL:n,tintTR:s,tintBL:o,tintBR:a}}}return this},setWordTint:function(t,e,i,n,r,s,o){void 0===e&&(e=1);for(var a=this.getTextBounds().words,h="number"==typeof t,u=0,l=0;l<a.length;l++){var c=a[l];if((h&&l===t||!h&&c.word===t)&&(this.setCharacterTint(c.i,c.word.length,i,n,r,s,o),++u===e))return this}return this},getTextBounds:function(t){var e=this._bounds;return(this._dirty||t||this.scaleX!==e.scaleX||this.scaleY!==e.scaleY)&&(a(this,t,!0,e),this._dirty=!1),e},getCharacterAt:function(t,e,i){for(var n=this.getLocalPoint(t,e,null,i),r=this.getTextBounds().characters,s=new l,o=0;o<r.length;o++){var a=r[o];if(s.setTo(a.x,a.t,a.r-a.x,a.b),s.contains(n.x,n.y))return a}return null},updateDisplayOrigin:function(){return this._dirty=!0,this.getTextBounds(!1),this},setFont:function(t,e,i){if(void 0===e&&(e=this._fontSize),void 0===i&&(i=this._align),t!==this.font){var n=this.scene.sys.cache.bitmapFont.get(t);n&&(this.font=t,this.fontData=n.data,this._fontSize=e,this._align=i,this.setTexture(n.texture,n.frame),a(this,!1,!0,this._bounds))}return this},setMaxWidth:function(t,e){return this._maxWidth=t,this._dirty=!0,void 0!==e&&(this.wordWrapCharCode=e),this},align:{set:function(t){this._align=t,this._dirty=!0},get:function(){return this._align}},text:{set:function(t){this.setText(t)},get:function(){return this._text}},fontSize:{set:function(t){this._fontSize=t,this._dirty=!0},get:function(){return this._fontSize}},letterSpacing:{set:function(t){this._letterSpacing=t,this._dirty=!0},get:function(){return this._letterSpacing}},maxWidth:{set:function(t){this._maxWidth=t,this._dirty=!0},get:function(){return this._maxWidth}},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.he
517ight}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing,align:this.align};return t.data=e,t},preDestroy:function(){this.charColors.length=0,this._bounds=null,this.fontData=null}});f.ALIGN_LEFT=0,f.ALIGN_CENTER=1,f.ALIGN_RIGHT=2,f.ParseFromAtlas=h,f.ParseXMLBitmapFont=u,t.exports=f},function(t,e,i){ 518/** 519 * @author Richard Davey <[email protected]> 520 * @copyright 2020 Photon Storm Ltd. 521 * @license {@link https://opensource.org/licenses/MIT|MIT License} 522 */ 523var n=new(i(0))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=0;e<t.length;e++)this.set(t[e])},set:function(t){return-1===this.entries.indexOf(t)&&this.entries.push(t),this},get:function(t,e){for(var i=0;i<this.entries.length;i++){var n=this.entries[i];if(n[t]===e)return n}},getArray:function(){return this.entries.slice(0)},delete:function(t){var e=this.entries.indexOf(t);return e>-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t<this.entries.length;t++){var e=this.entries[t];console.log(e)}console.groupEnd()},each:function(t,e){var i,n=this.entries.slice(),r=n.length;if(e)for(i=0;i<r&&!1!==t.call(e,n[i],i);i++);else for(i=0;i<r&&!1!==t(n[i],i);i++);return this},iterate:function(t,e){var i,n=this.entries.length;if(e)for(i=0;i<n&&!1!==t.call(e,this.entries[i],i);i++);else for(i=0;i<n&&!1!==t(this.entries[i],i);i++);return this},iterateLocal:function(t){var e,i=[];for(e=1;e<arguments.length;e++)i.push(arguments[e]);var n=this.entries.length;for(e=0;e<n;e++){var r=this.entries[e];r[t].apply(r,i)}return this},clear:function(){return this.entries.length=0,this},contains:function(t){return this.entries.indexOf(t)>-1},union:function(t){var e=new n;return t.entries.forEach((function(t){e.set(t)})),this.entries.forEach((function(t){e.set(t)})),e},intersect:function(t){var e=new n;return this.entries.forEach((function(i){t.contains(i)&&e.set(i)})),e},difference:function(t){var e=new n;return this.entries.forEach((function(i){t.contains(i)||e.set(i)})),e},size:{get:function(){return this.entries.length},set:function(t){return t<this.entries.length?this.entries.length=t:this.entries.length}}});t.exports=n},function(t,e,i){ 524/** 525 * @author Richard Davey <[email protected]> 526 * @copyright 2020 Photon Storm Ltd. 527 * @license {@link https://opensource.org/licenses/MIT|MIT License} 528 */ 529var n=i(0),r=i(11),s=i(15),o=i(186),a=i(65),h=i(1176),u=new n({Extends:s,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.GetBounds,r.Mask,r.Pipeline,r.ScrollFactor,r.Transform,r.Visible,h],initialize:function(t,e,i,n,r,h,u){void 0===n&&(n=16777215),void 0===r&&(r=128),void 0===h&&(h=1),void 0===u&&(u=.1),s.call(this,t,"PointLight"),this.initPipeline(a.POINTLIGHT_PIPELINE),this.setPosition(e,i),this.color=o(n),this.intensity=h,this.attenuation=u,this.width=2*r,this.height=2*r,this._radius=r},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this.width=2*t,this.height=2*t}},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});t.exports=u},function(t,e){t.exports=function(t,e){var i=e.width/2,n=e.height/2,r=Math.abs(t.x-e.x-i),s=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(r>o||s>a)return!1;if(r<=i||s<=n)return!0;var h=r-i,u=s-n;return h*h+u*u<=t.radius*t.radius}},function(t,e,i){ 530/** 531 * @author Richard Davey <[email protected]> 532 * @copyright 2020 Photon Storm Ltd. 533 * @license {@link https://opensource.org/licenses/MIT|MIT License} 534 */ 535var n=i(6),r={},s={register:function(t,e,i,n,s){r[t]={plugin:e,mapping:i,settingsKey:n,configKey:s}},getPlugin:function(t){return r[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,s=e.game.config;for(var o in r){var a=r[o].plugin,h=r[o].mapping,u=r[o].settingsKey,l=r[o].configKey;n(i,u,s[l])&&(t[h]=new a(t))}},remove:function(t){r.hasOwnProperty(t)&&delete r[t]}};t.exports=s}
535,function(t,e,i){ 536/** 537 * @author Richard Davey <[email protected]> 538 * @copyright 2020 Photon Storm Ltd. 539 * @license {@link https://opensource.org/licenses/MIT|MIT License} 540 */ 541t.exports={ANY_KEY_DOWN:i(1317),ANY_KEY_UP:i(1318),COMBO_MATCH:i(1319),DOWN:i(1320),KEY_DOWN:i(1321),KEY_UP:i(1322),UP:i(1323)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,r,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===r&&(r=0),void 0===s&&(s=!1),{responseType:t,async:e,user:i,password:n,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s}}},function(t,e,i){ 542/** 543 * @author Richard Davey <[email protected]> 544 * @copyright 2020 Photon Storm Ltd. 545 * @license {@link https://opensource.org/licenses/MIT|MIT License} 546 */ 547var n=i(0),r=i(240),s=i(73),o=new n({Extends:s,Mixins:[r.Acceleration,r.Angular,r.Bounce,r.Debug,r.Drag,r.Enable,r.Friction,r.Gravity,r.Immovable,r.Mass,r.Pushable,r.Size,r.Velocity],initialize:function(t,e,i,n,r){s.call(this,t,e,i,n,r),this.body=null}});t.exports=o},function(t,e,i){ 548/** 549 * @author Richard Davey <[email protected]> 550 * @copyright 2020 Photon Storm Ltd. 551 * @license {@link https://opensource.org/licenses/MIT|MIT License} 552 */ 553var n=i(118);t.exports=function(t,e,i,r){if(void 0===i&&(i=!1),n(t,e,r)){var s=r.data[e][t]||null;return s?-1===s.index?i?s:null:s:null}return null}},function(t,e){t.exports=function(t,e,i,n){var r,s,o,a=t.data,h=t.width,u=t.height,l=t.tilemapLayer,c=Math.max(0,e.left),f=Math.min(h,e.right),d=Math.max(0,e.top),p=Math.min(u,e.bottom);if(0===i)for(s=d;s<p;s++)for(r=c;a[s]&&r<f;r++)(o=a[s][r])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);else if(1===i)for(s=d;s<p;s++)for(r=f;a[s]&&r>=c;r--)(o=a[s][r])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);else if(2===i)for(s=p;s>=d;s--)for(r=c;a[s]&&r<f;r++)(o=a[s][r])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);else if(3===i)for(s=p;s>=d;s--)for(r=f;a[s]&&r>=c;r--)(o=a[s][r])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);return l.tilesDrawn=n.length,l.tilesTotal=h*u,n}},function(t,e){t.exports=function(t,e,i){var n=i.collideIndexes.indexOf(t);e&&-1===n?i.collideIndexes.push(t):e||-1===n||i.collideIndexes.splice(n,1)}},function(t,e,i){ 554/** 555 * @author Seth Berrier <[email protected]> 556 * @copyright 2020 Photon Storm Ltd. 557 * @license {@link https://opensource.org/licenses/MIT|MIT License} 558 */ 559var n=i(2);t.exports=function(t,e,i){if(!e)return{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0};var r=e.x+n(e,"startx",0)*t.tilewidth+n(e,"offsetx",0),s=e.y+n(e,"starty",0)*t.tileheight+n(e,"offsety",0);return{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+r,y:i.y+s}}},function(t,e){t.exports=function(t,e,i){return t.hasOwnProperty(e)?"function"==typeof t[e]?function(i,n,r,s,o,a){return t[e](i,n,r,s,o,a)}:function(){return t[e]}:"function"==typeof i?i:function(){return i}}},function(t,e,i){ 560/** 561 * @author Richard Davey <[email protected]> 562 * @copyright 2020 Photon Storm Ltd. 563 * @license {@link https://opensource.org/licenses/MIT|MIT License} 564 */ 565var n=i(261),r=i(13),s=i(96),o=i(80),a=i(160),h=i(579),u=i(259),l=i(6),c=i(260),f=i(262),d=i(264);t.exports=function(t,e,i){void 0===i&&(i=n);for(var p=i.targets?i.targets:u(e),v=h(e),g=a(e,"delay",i.delay),m=a(e,"duration",i.duration),y=l(e,"easeParams",i.easeParams),x=o(l(e,"ease",i.ease),y),w=a(e,"hold",i.hold),_=a(e,"repeat",i.repeat),b=a(e,"repeatDelay",i.repeatDelay),T=s(e,"yoyo",i.yoyo),E=s(e,"flipX",i.flipX),S=s(e,"flipY",i.flipY),A=[],C=0;C<v.length;C++)for(var O=v[C].key,R=v[C].value,M=0;M<p.length;M++){var P=c(O,R),I=d(p[M],M,O,P.getEnd,P.getStart,P.getActive,o(l(R,"ease",x),l(R,"easeParams",y)),a(R,"delay",g),a(R,"duration",m),s(R,"yoyo",T),a(R,"hold",w),a(R,"repeat",_),a(R,"repeatDelay",b),s(R,"flipX",E),s(R,"flipY",S));A.push(I)}var k=new f(t,A,p);k.offset=r(e,"offset",null),k.completeDelay=r(e,"completeDelay",0),k.loop=Math.round(r(e,"loop",0)),k.loopDelay=Math.round(r(e,"loopDelay",0)),k.paused=s(e,"paused",!1),k.useFrames=s(e,"useFrames",!1);for(var L=l(e,"callbackScope",k),D=[k,null],F=f.TYPES,N=0;N<F.length;N++){var B=F[N],U=l(e,B,!1);if(U){var V=l(e,B+"Scope",L),Y=l(e,B+"Params",[]);k.setCallback(B,U,D.concat(Y),V)}}return k}}
vendor: 8,794 bytes, lines 565-571
565,function(t,e,i){ 566/** 567 * @author Richard Davey <[email protected]> 568 * @copyright 2020 Photon Storm Ltd. 569 * @license {@link https://opensource.org/licenses/MIT|MIT License} 570 */ 571var n=i(0),r=i(99),s=i(2),o=i(130),a=i(182),h=new n({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.on(o.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(t){var e=this.parent;if(void 0===t)return this.nextAnimsQueue.length=0,this.nextAnim=null,e;Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i];null===this.nextAnim?this.nextAnim=n:this.nextAnimsQueue.push(n)}return this.parent},getName:function(){return this.currentAnim?this.currentAnim.key:""},getFrameName:function(){return this.currentFrame?this.currentFrame.textureFrame:""},load:function(t){this.isPlaying&&this.stop();var e=this.animationManager,i="string"==typeof t?t:s(t,"key",null),n=this.exists(i)?this.get(i):e.get(i);if(n){this.currentAnim=n;var r=n.getTotalFrames(),o=s(t,"frameRate",n.frameRate),a=s(t,"duration",n.duration);n.calculateDuration(this,r,a,o),this.delay=s(t,"delay",n.delay),this.repeat=s(t,"repeat",n.repeat),this.repeatDelay=s(t,"repeatDelay",n.repeatDelay),this.yoyo=s(t,"yoyo",n.yoyo),this.showOnStart=s(t,"showOnStart",n.showOnStart),this.hideOnComplete=s(t,"hideOnComplete",n.hideOnComplete),this.skipMissedFrames=s(t,"skipMissedFrames",n.skipMissedFrames),this.timeScale=s(t,"timeScale",this.timeScale);var h=s(t,"startFrame",0);h>n.getTotalFrames()&&(h=0);var u=n.frames[h];0!==h||this.forward||(u=n.getLastFrame()),this.currentFrame=u}else console.warn("Missing animation: "+i);return this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.setCurrentFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.setCurrentFrame(t),this.parent},playAfterDelay:function(t,e){if(this.isPlaying){var i=this.nextAnim,n=this.nextAnimsQueue;i&&n.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e}else this.delayCounter=e,this.play(t,!0);return this.parent},playAfterRepeat:function(t,e){if(void 0===e&&(e=1),this.isPlaying){var i=this.nextAnim,n=this.nextAnimsQueue;i&&n.unshift(i),-1!==this.repeatCounter&&e>this.repeatCounter&&(e=this.repeatCounter),this.nextAnim=t,this._pendingStop=2,this._pendingStopValue=e}else this.play(t);return this.parent},play:function(t,e){void 0===e&&(e=!1);var i=this.currentAnim,n=this.parent,r="string"==typeof t?t:t.key;if(e&&this.isPlaying&&i.key===r)return n;if(i&&this.isPlaying){var s=this.animationManager.getMix(i.key,t);if(s>0)return this.playAfterDelay(t,s)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t)},playReverse:function(t,e){void 0===e&&(e=!1);var i="string"==typeof t?t:t.key;return e&&this.isPlaying&&this.currentAnim.key===i?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t))},startAnimation:function(t){this.load(t);var e=this.currentAnim,i=this.parent;return e?(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat,e.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,0===this.delayCounter&&this.handleStart(),i):i},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(o.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(o.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(o.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(o.ANIMATION_COMPLETE,o.ANIMATION_COMPLETE_KEY)},emitEvents:function(t,e){var i=this.currentAnim,n=this.currentFrame,r=this.parent,s=n.textureFrame;r.emit(t,i,n,r,s),e&&r.emit(e+i.key,i,n,r,s)},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var t=this.currentFrame;if(!t)return 0;var e=t.progress;return this.inReverse&&(e*=-1),e},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},setRepeat:function(t){return this.repeatCounter=-1===t?Number.MAX_VALUE:t,this.parent},globalRemove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=this.currentAnim,n=this.parent;return i?(e&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat),i.getFirstTick(this),this.emitEvents(o.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!t,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(i.frames[0]),this.parent):n},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(t)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleStop(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(t)}return this.parent},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopAfterRepeat:function(t){return void 0===t&&(t=1),-1!==this.repeatCounter&&t>this.repeatCounter&&(t=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=t,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(t,e){var i=this.currentAnim;if(this.isPlaying&&i&&!i.paused){if(this.accumulator+=e*this.timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?i.nextFrame(this):i.previousFrame(this),this.isPlaying&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var n=0;do{this.forward?i.nextFrame(this):i.previousFrame(this),n++}while(this.accumulator>this.nextTick&&n<60)}}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),t.setAlpha&&(e.alpha=t.alpha),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(o.ANIMATION_UPDATE),3===this._pendingStop&&this._pendingStopValue===t&&this.stop()),e},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(t){return this.anims?this.anims.get(t):null},exists:function(t){return!!this.anims&&this.anims.has(t)},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new a(this,e,t),this.anims||(this.anims=new r),this.anims.set(e,i))),i},generateFrameNames:function(t,e){return this.animationManager.generateFrameNames(t,e)},generateFrameNumbers:function(t,e){return this.animationManager.generateFrameNumbers(t,e)},remove:function(t){var e=this.get(t);return e&&(this.currentAnim===e&&this.stop(),this.anims.delete(t)),e},destroy:function(){this.animationManager.off(o.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});t.exports=h}
vendor: 4,458 bytes, line 571
571,function(t,e,i){var n={};t.exports=n;var r=i(268),s=i(50),o=i(117),a=i(71);n.create=function(t){return s.extend({id:s.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{}},t)},n.setModified=function(t,e,i,s){if(r.trigger(t,"compositeModified",t),t.isModified=e,i&&t.parent&&n.setModified(t.parent,e,i,s),s)for(var o=0;o<t.composites.length;o++){var a=t.composites[o];n.setModified(a,e,i,s)}},n.add=function(t,e){var i=[].concat(e);r.trigger(t,"beforeAdd",{object:e});for(var o=0;o<i.length;o++){var a=i[o];switch(a.type){case"body":if(a.parent!==a){s.warn("Composite.add: skipped adding a compound body part (you must add its parent instead)");break}n.addBody(t,a);break;case"constraint":n.addConstraint(t,a);break;case"composite":n.addComposite(t,a);break;case"mouseConstraint":n.addConstraint(t,a.constraint)}}return r.trigger(t,"afterAdd",{object:e}),t},n.remove=function(t,e,i){var s=[].concat(e);r.trigger(t,"beforeRemove",{object:e});for(var o=0;o<s.length;o++){var a=s[o];switch(a.type){case"body":n.removeBody(t,a,i);break;case"constraint":n.removeConstraint(t,a,i);break;case"composite":n.removeComposite(t,a,i);break;case"mouseConstraint":n.removeConstraint(t,a.constraint)}}return r.trigger(t,"afterRemove",{object:e}),t},n.addComposite=function(t,e){return t.composites.push(e),e.parent=t,n.setModified(t,!0,!0,!1),t},n.removeComposite=function(t,e,i){var r=t.composites.indexOf(e);if(-1!==r&&(n.removeCompositeAt(t,r),n.setModified(t,!0,!0,!1)),i)for(var s=0;s<t.composites.length;s++)n.removeComposite(t.composites[s],e,!0);return t},n.removeCompositeAt=function(t,e){return t.composites.splice(e,1),n.setModified(t,!0,!0,!1),t},n.addBody=function(t,e){return t.bodies.push(e),n.setModified(t,!0,!0,!1),t},n.removeBody=function(t,e,i){var r=t.bodies.indexOf(e);if(-1!==r&&(n.removeBodyAt(t,r),n.setModified(t,!0,!0,!1)),i)for(var s=0;s<t.composites.length;s++)n.removeBody(t.composites[s],e,!0);return t},n.removeBodyAt=function(t,e){return t.bodies.splice(e,1),n.setModified(t,!0,!0,!1),t},n.addConstraint=function(t,e){return t.constraints.push(e),n.setModified(t,!0,!0,!1),t},n.removeConstraint=function(t,e,i){var r=t.constraints.indexOf(e);if(-1!==r&&n.removeConstraintAt(t,r),i)for(var s=0;s<t.composites.length;s++)n.removeConstraint(t.composites[s],e,!0);return t},n.removeConstraintAt=function(t,e){return t.constraints.splice(e,1),n.setModified(t,!0,!0,!1),t},n.clear=function(t,e,i){if(i)for(var r=0;r<t.composites.length;r++)n.clear(t.composites[r],e,!0);return e?t.bodies=t.bodies.filter((function(t){return t.isStatic})):t.bodies.length=0,t.constraints.length=0,t.composites.length=0,n.setModified(t,!0,!0,!1),t},n.allBodies=function(t){for(var e=[].concat(t.bodies),i=0;i<t.composites.length;i++)e=e.concat(n.allBodies(t.composites[i]));return e},n.allConstraints=function(t){for(var e=[].concat(t.constraints),i=0;i<t.composites.length;i++)e=e.concat(n.allConstraints(t.composites[i]));return e},n.allComposites=function(t){for(var e=[].concat(t.composites),i=0;i<t.composites.length;i++)e=e.concat(n.allComposites(t.composites[i]));return e},n.get=function(t,e,i){var r,s;switch(i){case"body":r=n.allBodies(t);break;case"constraint":r=n.allConstraints(t);break;case"composite":r=n.allComposites(t).concat(t)}return r?0===(s=r.filter((function(t){return t.id.toString()===e.toString()}))).length?null:s[0]:null},n.move=function(t,e,i){return n.remove(t,e),n.add(i,e),t},n.rebase=function(t){for(var e=n.allBodies(t).concat(n.allConstraints(t)).concat(n.allComposites(t)),i=0;i<e.length;i++)e[i].id=s.nextId();return n.setModified(t,!0,!0,!1),t},n.translate=function(t,e,i){for(var r=i?n.allBodies(t):t.bodies,s=0;s<r.length;s++)a.translate(r[s],e);return n.setModified(t,!0,!0,!1),t},n.rotate=function(t,e,i,r){for(var s=Math.cos(e),o=Math.sin(e),h=r?n.allBodies(t):t.bodies,u=0;u<h.length;u++){var l=h[u],c=l.position.x-i.x,f=l.position.y-i.y;a.setPosition(l,{x:i.x+(c*s-f*o),y:i.y+(c*o+f*s)}),a.rotate(l,e)}return n.setModified(t,!0,!0,!1),t},n.scale=function(t,e,i,r,s){for(var o=s?n.allBodies(t):t.bodies,h=0;h<o.length;h++){var u=o[h],l=u.position.x-r.x,c=u.position.y-r.y;a.setPosition(u,{x:r.x+l*e,y:r.y+c*i}),a.scale(u,e,i)}return n.setModified(t,!0,!0,!1),t},n.bounds=function(t){for(var e=n.allBodies(t),i=[],r=0;r<e.length;r+=1){var s=e[r];i.push(s.bounds.min,s.bounds.max)}return o.create(i)}},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}}
571,function(t,e,i){ 572/** 573 * @author Richard Davey <[email protected]> 574 * @copyright 2020 Photon Storm Ltd. 575 * @license {@link https://opensource.org/licenses/MIT|MIT License} 576 */ 577var n=i(4);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},function(t,e,i){ 578/** 579 * @author Richard Davey <[email protected]> 580 * @copyright 2020 Photon Storm Ltd. 581 * @license {@link https://opensource.org/licenses/MIT|MIT License} 582 */ 583var n=i(4);t.exports=function(t,e){void 0===e&&(e=new n);var i=2*Math.PI*Math.random(),r=Math.random()+Math.random(),s=r>1?2-r:r,o=s*Math.cos(i),a=s*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){ 584/** 585 * @author Richard Davey <[email protected]> 586 * @copyright 2020 Photon Storm Ltd. 587 * @license {@link https://opensource.org/licenses/MIT|MIT License} 588 */ 589var n=i(128),r=i(4);t.exports=function(t,e,i){if(void 0===i&&(i=new r),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var s=n(t)*e;return e>.5?(s-=t.width+t.height)<=t.width?(i.x=t.right-s,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(s-t.width)):s<=t.width?(i.x=t.x+s,i.y=t.y):(i.x=t.right,i.y=t.y+(s-t.width)),i}},function(t,e,i){ 590/** 591 * @author Richard Davey <[email protected]> 592 * @copyright 2020 Photon Storm Ltd. 593 * @license {@link https://opensource.org/licenses/MIT|MIT License} 594 */ 595var n=i(64),r=i(4);t.exports=function(t,e,i,s){void 0===s&&(s=[]),!e&&i>0&&(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,u=t.y2,l=0;l<e;l++){var c=l/e,f=o+(h-o)*c,d=a+(u-a)*c;s.push(new r(f,d))}return s}},function(t,e,i){ 596/** 597 * @author Richard Davey <[email protected]> 598 * @copyright 2020 Photon Storm Ltd. 599 * @license {@link https://opensource.org/licenses/MIT|MIT License} 600 */ 601var n=i(4);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},function(t,e,i){ 602/** 603 * @author Richard Davey <[email protected]> 604 * @copyright 2020 Photon Storm Ltd. 605 * @license {@link https://opensource.org/licenses/MIT|MIT License} 606 */ 607var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){ 608/** 609 * @author Richard Davey <[email protected]> 610 * @copyright 2020 Photon Storm Ltd. 611 * @license {@link https://opensource.org/licenses/MIT|MIT License} 612 */ 613var n=i(172),r=i(65),s=i(74),o={defaultPipeline:null,pipeline:null,hasPostPipeline:!1,postPipelines:null,pipelineData:null,initPipeline:function(t){void 0===t&&(t=r.MULTI_PIPELINE);var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(this.postPipelines=[],this.pipelineData={},i){var n=i.get(t);if(n)return this.defaultPipeline=n,this.pipeline=n,!0}return!1},setPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var s=r.pipelines;if(s){var o=s.get(t);o&&(this.pipeline=o),e&&(this.pipelineData=i?n(e):e)}return this},setPostPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var s=r.pipelines;if(s){Array.isArray(t)||(t=[t]);for(var o=0;o<t.length;o++){var a=s.getPostPipeline(t[o],this);a&&this.postPipelines.push(a)}e&&(this.pipelineData=i?n(e):e)}return this.hasPostPipeline=this.postPipelines.length>0,this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e=this.postPipelines,i=[],n=0;n<e.length;n++){var r=e[n];("string"==typeof t&&r.name===t||r instanceof t)&&i.push(r)}return 1===i.length?i[0]:i},resetPipeline:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.pipeline=this.defaultPipeline,t&&(this.postPipelines=[],this.hasPostPipeline=!1),e&&(this.pipelineData={}),null!==this.pipeline},resetPostPipeline:function(t){void 0===t&&(t=!1);for(var e=this.postPipelines,i=0;i<e.length;i++)e[i].destroy();this.postPipelines=[],this.hasPostPipeline=!1,t&&(this.pipelineData={})},removePostPipeline:function(t){for(var e=this.postPipelines,i=e.length-1;i>=0;i--){var n=e[i];("string"==typeof t&&n.name===t||"string"!=typeof t&&n instanceof t)&&(n.destroy(),s(e,i))}return this.hasPostPipeline=this.postPipelines.length>0,this},getPipelineName:function(){return this.pipeline.name}};t.exports=o},function(t,e){ 614/** 615 * @author Richard Davey <[email protected]> 616 * @copyright 2020 Photon Storm Ltd. 617 * @license {@link https://opensource.org/licenses/MIT|MIT License} 618 */ 619var i=function(t){var e,n,r;if("object"!=typeof t||null===t)return t;for(r in e=Array.isArray(t)?[]:{},t)n=t[r],e[r]=i(n);return e};t.exports=i},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}}
vendor: 4,431 bytes, lines 619-643
619,function(t,e,i){ 620/** 621 * @author Richard Davey <[email protected]> 622 * @copyright 2020 Photon Storm Ltd. 623 * @license {@link https://opensource.org/licenses/MIT|MIT License} 624 */ 625var n=i(3);t.exports=function(t,e,i,r,s,o,a,h){void 0===h&&(h=new n);var u=Math.sin(s),l=Math.cos(s),c=l*o,f=u*o,d=-u*a,p=l*a,v=1/(c*p+d*-f);return h.x=p*v*t+-d*v*e+(r*d-i*p)*v,h.y=c*v*e+-f*v*t+(-r*c+i*f)*v,h}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n<e;n++)i=t.shift(),t.push(i);return i}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n<e;n++)i=t.pop(),t.unshift(i);return i}},function(t,e,i){ 626/** 627 * @author Richard Davey <[email protected]> 628 * @copyright 2020 Photon Storm Ltd. 629 * @license {@link https://opensource.org/licenses/MIT|MIT License} 630 */ 631var n=i(4);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random()*Math.PI*2,r=Math.sqrt(Math.random());return e.x=t.x+r*Math.cos(i)*t.width/2,e.y=t.y+r*Math.sin(i)*t.height/2,e}},function(t,e,i){ 632/** 633 * @author Richard Davey <[email protected]> 634 * @copyright 2020 Photon Storm Ltd. 635 * @license {@link https://opensource.org/licenses/MIT|MIT License} 636 */ 637var n=i(4);t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x2-t.x1,r=t.y2-t.y1,s=t.x3-t.x1,o=t.y3-t.y1,a=Math.random(),h=Math.random();return a+h>=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+s*h),e.y=t.y1+(r*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,r){var s=n+Math.atan2(t.y-i,t.x-e);return t.x=e+r*Math.cos(s),t.y=i+r*Math.sin(s),t}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e,i){ 638/** 639 * @author Richard Davey <[email protected]> 640 * @copyright 2020 Photon Storm Ltd. 641 * @license {@link https://opensource.org/licenses/MIT|MIT License} 642 */ 643var n=i(18),r=i(0),s=i(130),o=i(312),a=i(313),h=i(6),u=i(314),l=new r({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,h(i,"frames",[]),h(i,"defaultTextureKey",null),h(i,"sortFrames",!0)),this.frameRate=h(i,"frameRate",null),this.duration=h(i,"duration",null),this.msPerFrame,this.skipMissedFrames=h(i,"skipMissedFrames",!0),this.delay=h(i,"delay",0),this.repeat=h(i,"repeat",0),this.repeatDelay=h(i,"repeatDelay",0),this.yoyo=h(i,"yoyo",!1),this.showOnStart=h(i,"showOnStart",!1),this.hideOnComplete=h(i,"hideOnComplete",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(s.PAUSE_ALL,this.pause,this),this.manager.on(s.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(t,e,i,n){null===i&&null===n?(t.frameRate=24,t.duration=24/e*1e3):i&&null===n?(t.duration=i,t.frameRate=e/(i/1e3)):(t.frameRate=n,t.duration=e/n*1e3),t.msPerFrame=1e3/t.frameRate},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),r=this.frames.slice(t);this.frames=n.concat(i,r)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t<this.frames.length},getFirstTick:function(t){t.accumulator=0,t.nextTick=t.msPerFrame+t.currentFrame.duration},getFrameAt:function(t){return this.frames[t]},getFrames:function(t,e,i,n){void 0===n&&(n=!0);var r,s,o,l,c=[],f=1;if("string"==typeof e){l=e;var d=t.get(l).getFrameNames();n&&u(d),e=[],d.forEach((function(t){e.push({key:l,frame:t})}))}if(!Array.isArray(e)||0===e.length)return c;for(o=0;o<e.length;o++){var p=e[o],v=h(p,"key",i);if(v){var g=h(p,"frame",0),m=t.getFrame(v,g);(s=new a(v,g,f,m)).duration=h(p,"duration",0),s.isFirst=!r,r&&(r.nextFrame=s,s.prevFrame=r),c.push(s),r=s,f++}}if(c.length>0){s.isLast=!0,s.nextFrame=c[0],c[0].prevFrame=s;var y=1/(c.length-1);for(o=0;o<c.length;o++)c[o].progress=o*y}return c},getNextTick:function(t){t.accumulator-=t.nextTick,t.nextTick=t.msPerFrame+t.currentFrame.duration},getFrameByProgress:function(t){return t=n(t,0,1),o
vendor: 1,760 bytes, line 643
643(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t.yoyo?this.handleYoyoFrame(t,!1):t.repeatCounter>0?t.inReverse&&t.forward?t.forward=!1:this.repeatAnimation(t):t.complete():this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t.inReverse===!e&&t.repeatCounter>0)return(0===t.repeatDelay||t.pendingRepeat)&&(t.forward=e),void this.repeatAnimation(t);if(t.inReverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else t.complete()},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?(t.inReverse&&!t.forward||(t.forward=!0),this.repeatAnimation(t)):t.complete():this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.setCurrentFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop){if(0===t._pendingStopValue)return t.stop();t._pendingStopValue--}t.repeatDelay>0&&!t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t.repeatDelay):(t.repeatCounter--,t.forward?t.setCurrentFrame(t.currentFrame.nextFrame):t.setCurrentFrame(t.currentFrame.prevFrame),t.isPlaying&&(this.getNextTick(t),t.handleRepeat()))},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,show
vendor: 4,258 bytes, lines 643-667
643OnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach((function(e){t.frames.push(e.toJSON())})),t},updateFrameSequence:function(){for(var t,e=this.frames.length,i=1/(e-1),n=0;n<e;n++)(t=this.frames[n]).index=n+1,t.isFirst=!1,t.isLast=!1,t.progress=n*i,0===n?(t.isFirst=!0,1===e?(t.isLast=!0,t.nextFrame=t,t.prevFrame=t):(t.isLast=!1,t.prevFrame=this.frames[e-1],t.nextFrame=this.frames[n+1])):n===e-1&&e>1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[n-1],t.nextFrame=this.frames[n+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(s.PAUSE_ALL,this.pause,this),this.manager.off(s.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var t=0;t<this.frames.length;t++)this.frames[t].destroy();this.frames=[],this.manager=null}});t.exports=l},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===n&&(n=3);var r=0;if(e+1>=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var s=Math.ceil((r=e-t.length)/2);t=new Array(r-s+1).join(i)+t+new Array(s+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){ 644/** 645 * @author Richard Davey <[email protected]> 646 * @copyright 2020 Photon Storm Ltd. 647 * @license {@link https://opensource.org/licenses/MIT|MIT License} 648 */ 649var n=i(321),r=i(186),s=i(325),o=i(326);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return r(t);case"object":return s(t)}}},function(t,e,i){ 650/** 651 * @author Richard Davey <[email protected]> 652 * @copyright 2020 Photon Storm Ltd. 653 * @license {@link https://opensource.org/licenses/MIT|MIT License} 654 */ 655var n=i(100);function r(t,e,i,n){var r=(t+6*e)%6,s=Math.min(r,4-r,1);return Math.round(255*(n-n*i*Math.max(0,s)))}t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1);var o=r(5,t,e,i),a=r(3,t,e,i),h=r(1,t,e,i);return s?s.setTo?s.setTo(o,a,h,s.alpha,!1):(s.r=o,s.g=a,s.b=h,s.color=n(o,a,h),s):{r:o,g:a,b:h,color:n(o,a,h)}}},function(t,e,i){ 656/** 657 * @author Richard Davey <[email protected]> 658 * @copyright 2020 Photon Storm Ltd. 659 * @license {@link https://opensource.org/licenses/MIT|MIT License} 660 */ 661var n=i(37),r=i(324);t.exports=function(t){var e=r(t);return new n(e.r,e.g,e.b,e.a)}},function(t,e){t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},function(t,e,i){ 662/** 663 * @author Richard Davey <[email protected]> 664 * @copyright 2020 Photon Storm Ltd. 665 * @license {@link https://opensource.org/licenses/MIT|MIT License} 666 */ 667var n=i(102),r=i(134),s=i(31),o={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){o.canvas=!!window.CanvasRenderingContext2D;try{o.localStorage=!!localStorage.getItem}catch(h){o.localStorage=!1}o.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),o.fileSystem=!!window.requestFileSystem;var t,e,i,a=!1;return o.webGL=function(){if(window.WebGLRenderingContext)try{var t=s.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=s.create2D(this),n=i.getContext("2d").createImageData(1,1);return a=n.data instanceof Uint8ClampedArray,s.remove(t),s.remove(i),!!e}catch(lC){return!1}return!1}(),o.worker=!!window.Worker,o.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,o.getUserMedia=o.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,r.firefox&&r.firefoxVersion<21&&(o.getUserMedia=!1),!n.iOS&&(r.ie||r.firefox||r.chrome)&&(o.canvasBitBltShift=!0),(r.safari||r.mobileSafari)&&(o.c
667anvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(o.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(o.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),o.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==o.littleEndian&&a,o}()},function(t,e){ 668/** 669 * @author Richard Davey <[email protected]> 670 * @copyright 2020 Photon Storm Ltd. 671 * @license {@link https://opensource.org/licenses/MIT|MIT License} 672 */ 673var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i<e.length;i++){var n=e[i]+"mageSmoothingEnabled";if(n in t)return n}return null},isEnabled:function(t){return null!==n?t[n]:null}}},function(t,e,i){ 674/** 675 * @author Richard Davey <[email protected]> 676 * @copyright 2020 Photon Storm Ltd. 677 * @license {@link https://opensource.org/licenses/MIT|MIT License} 678 */ 679var n=i(14),r=i(17),s={Angle:i(809),Distance:i(818),Easing:i(823),Fuzzy:i(824),Interpolation:i(827),Pow2:i(832),Snap:i(834),RandomDataGenerator:i(836),Average:i(837),Bernstein:i(350),Between:i(192),CatmullRom:i(191),CeilTo:i(838),Clamp:i(18),DegToRad:i(35),Difference:i(839),Euler:i(840),Factorial:i(351),FloatBetween:i(135),FloorTo:i(841),FromPercent:i(95),GetSpeed:i(842),IsEven:i(843),IsEvenStrict:i(844),Linear:i(133),MaxAdd:i(845),MinSub:i(846),Percent:i(847),RadToDeg:i(193),RandomXY:i(848),RandomXYZ:i(849),RandomXYZW:i(850),Rotate:i(356),RotateAround:i(302),RotateAroundDistance:i(179),RotateTo:i(851),RoundAwayFromZero:i(357),RoundTo:i(852),SinCosTableGenerator:i(853),SmootherStep:i(180),SmoothStep:i(181),ToXY:i(854),TransformXY:i(174),Within:i(855),Wrap:i(66),Vector2:i(3),Vector3:i(38),Vector4:i(138),Matrix3:i(358),Matrix4:i(67),Quaternion:i(359),RotateVec3:i(856)};s=r(!1,s,n),t.exports=s},function(t,e){t.exports=function(t,e,i,n,r){var s=.5*(n-e),o=.5*(r-i),a=t*t;return(2*i-2*n+s+o)*(t*a)+(-3*i+3*n-2*s-o)*a+s*t+i}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){ 680/** 681 * @author Richard Davey <[email protected]> 682 * @copyright 2020 Photon Storm Ltd. 683 * @license {@link https://opensource.org/licenses/MIT|MIT License} 684 */ 685var n=i(14);t.exports=function(t){return t*n.RAD_TO_DEG}},function(t,e,i){t.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){ 686/** 687 * @author Richard Davey <[email protected]> 688 * @copyright 2020 Photon Storm Ltd. 689 * @license {@link https://opensource.org/licenses/MIT|MIT License} 690 */ 691var n=new(i(0))({initialize:function(){this._matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],this.alpha=1,this._dirty=!0,this._data},set:function(t){return this._matrix=t,this._dirty=!0,this},reset:function(){var t=this._matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=1,t[13]=0,t[14]=0,t[15]=0,t[16]=0,t[17]=0,t[18]=1,t[19]=0,this._dirty=!0,this},getData:function(){if(this._dirty){var t=new Float32Array(this._matrix);t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,this._data=t,this._dirty=!1}return this._data},brightness:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t;return this.multiply([i,0,0,0,0,0,i,0,0,0,0,0,i,0,0,0,0,0,1,0],e)},saturate:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=2*t/3+1,n=-.5*(i-1);return this.multiply([i,n,n,0,0,n,i,n,0,0,n,n,i,0,0,0,0,0,1,0],e)},desaturate:function(t){return void 0===t&&(t=!1),this.saturate(-1,t)},hue:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1),t=t/180*Math.PI;
691var i=Math.cos(t),n=Math.sin(t),r=.213,s=.715,o=.072;return this.multiply([r+.787*i+n*-r,s+i*-s+n*-s,o+i*-o+.928*n,0,0,r+i*-r+.143*n,s+i*(1-s)+.14*n,o+i*-o+-.283*n,0,0,r+i*-r+-.787*n,s+i*-s+n*s,o+.928*i+n*o,0,0,0,0,0,1,0],e)},grayscale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!1),this.saturate(-t,e)},blackWhite:function(t){return void 0===t&&(t=!1),this.multiply([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},contrast:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t+1,n=-.5*(i-1);return this.multiply([i,0,0,0,n,0,i,0,0,n,0,0,i,0,n,0,0,0,1,0],e)},negative:function(t){return void 0===t&&(t=!1),this.multiply([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t)},desaturateLuminance:function(t){return void 0===t&&(t=!1),this.multiply([.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],t)},sepia:function(t){return void 0===t&&(t=!1),this.multiply([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},night:function(t,e){return void 0===t&&(t=.1),void 0===e&&(e=!1),this.multiply([-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0],e)},lsd:function(t){return void 0===t&&(t=!1),this.multiply([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},brown:function(t){return void 0===t&&(t=!1),this.multiply([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},vintagePinhole:function(t){return void 0===t&&(t=!1),this.multiply([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},kodachrome:function(t){return void 0===t&&(t=!1),this.multiply([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},technicolor:function(t){return void 0===t&&(t=!1),this.multiply([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},polaroid:function(t){return void 0===t&&(t=!1),this.multiply([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},shiftToBGR:function(t){return void 0===t&&(t=!1),this.multiply([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},multiply:function(t,e){e||this.reset();for(var i=this._matrix,n=[],r=0;r<20;r++)n[r]=i[r];return i[0]=n[0]*t[0]+n[1]*t[5]+n[2]*t[10]+n[3]*t[15],i[1]=n[0]*t[1]+n[1]*t[6]+n[2]*t[11]+n[3]*t[16],i[2]=n[0]*t[2]+n[1]*t[7]+n[2]*t[12]+n[3]*t[17],i[3]=n[0]*t[3]+n[1]*t[8]+n[2]*t[13]+n[3]*t[18],i[4]=n[0]*t[4]+n[1]*t[9]+n[2]*t[14]+n[3]*t[19]+n[4],i[5]=n[5]*t[0]+n[6]*t[5]+n[7]*t[10]+n[8]*t[15],i[6]=n[5]*t[1]+n[6]*t[6]+n[7]*t[11]+n[8]*t[16],i[7]=n[5]*t[2]+n[6]*t[7]+n[7]*t[12]+n[8]*t[17],i[8]=n[5]*t[3]+n[6]*t[8]+n[7]*t[13]+n[8]*t[18],i[9]=n[5]*t[4]+n[6]*t[9]+n[7]*t[14]+n[8]*t[19]+n[9],i[10]=n[10]*t[0]+n[11]*t[5]+n[12]*t[10]+n[13]*t[15],i[11]=n[10]*t[1]+n[11]*t[6]+n[12]*t[11]+n[13]*t[16],i[12]=n[10]*t[2]+n[11]*t[7]+n[12]*t[12]+n[13]*t[17],i[13]=n[10]*t[3]+n[11]*t[8]+n[12]*t[13]+n[13]*t[18],i[14]=n[10]*t[4]+n[11]*t[9]+n[12]*t[14]+n[13]*t[19]+n[14],i[15]=n[15]*t[0]+n[16]*t[5]+n[17]*t[10]+n[18]*t[15],i[16]=n[15]*t[1]+n[16]*t[6]+n[17]*t[11]+n[18]*t[16],i[17]=n[15]*t[2]+n[16]*t[7]+n[17]*t[12]+n[18]*t[17],i[18]=n[15]*t[3]+n[16]*t[8]+n[17]*t[13]+n[18]*t[18],i[19]=n[15]*t[4]+n[16]*t[9]+n[17]*t[14]+n[18]*t[19]+n[19],this._dirty=!0,this}});t.exports=n},function(t,e,i){ 692/** 693 * @author Richard Davey <[email protected]> 694 * @copyright 2020 Photon Storm Ltd. 695 * @license {@link https://opensource.org/licenses/MIT|MIT License} 696 */ 697var n=i(10),r=i(14);t.exports=function(t,e){if(void 0===e&&(e=new n),0===t.length)return e;for(var i,s,o,a=Number.MAX_VALUE,h=Number.MAX_VALUE,u=r.MIN_SAFE_INTEGER,l=r.MIN_SAFE_INTEGER,c=0;c<t.length;c++)i=t[c],Array.isArray(i)?(s=i[0],o=i[1]):(s=i.x,o=i.y),a=Math.min(a,s),h=Math.min(h,o),u=
vendor: 5,128 bytes, lines 697-715
697Math.max(u,s),l=Math.max(l,o);return e.x=a,e.y=h,e.width=u-a,e.height=l-h,e}},function(t,e,i){ 698/** 699 * @author Richard Davey <[email protected]> 700 * @copyright 2020 Photon Storm Ltd. 701 * @license {@link https://opensource.org/licenses/MIT|MIT License} 702 */ 703var n=i(0),r=i(1),s=new n({initialize:function(t,e,i){this._rgb=[0,0,0],this.onChangeCallback=r,this.dirty=!1,this.set(t,e,i)},set:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this._rgb=[t,e,i],this.onChange(),this},equals:function(t,e,i){var n=this._rgb;return n.r===t&&n.g===e&&n.b===i},onChange:function(){this.dirty=!0;var t=this._rgb;this.onChangeCallback.call(this,t[0],t[1],t[2])},r:{get:function(){return this._rgb[0]},set:function(t){this._rgb[0]=t,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(t){this._rgb[1]=t,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(t){this._rgb[2]=t,this.onChange()}},destroy:function(){this.onChangeCallback=null}});t.exports=s},function(t,e,i){ 704/** 705 * @author Richard Davey <[email protected]> 706 * @copyright 2020 Photon Storm Ltd. 707 * @license {@link https://opensource.org/licenses/MIT|MIT License} 708 */ 709var n={CENTER:i(397),ORIENTATION:i(398),SCALE_MODE:i(399),ZOOM:i(400)};t.exports=n},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e){t.exports={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8}},function(t,e,i){ 710/** 711 * @author Richard Davey <[email protected]> 712 * @copyright 2020 Photon Storm Ltd. 713 * @license {@link https://opensource.org/licenses/MIT|MIT License} 714 */ 715var n=i(0),r=i(142),s=i(194),o=i(21),a=i(413),h=i(414),u=i(32),l=i(1),c=i(415),f=new n({initialize:function(t,e){this.scene=t,this.game,this.renderer,this.config=e,this.settings=c.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.scale,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=l},init:function(t){this.settings.status=r.INIT,this.sceneUpdate=l,this.game=t,this.renderer=t.renderer,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.addToScene(this,s.Global,[s.CoreScene,h(this),a(this)]),this.events.emit(o.BOOT,this),this.settings.isBooted=!0},install:function(t){Array.isArray(t)||(t=[t]),this.plugins.installLocal(this,t)},step:function(t,e){var i=this.events;i.emit(o.PRE_UPDATE,t,e),i.emit(o.UPDATE,t,e),this.sceneUpdate.call(this.scene,t,e),i.emit(o.POST_UPDATE,t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.cameras.render(t,e),this.events.emit(o.RENDER,t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(t){var e=this.events,i=this.settings;return this.settings.active&&(i.status=r.PAUSED,i.active=!1,e.emit(o.PAUSE,this,t)),this},resume:function(t){var e=this.events,i=this.settings;return this.settings.active||(i.status=r.RUNNING,i.active=!0,e.emit(o.RESUME,this,t)),this},sleep:function(t){var e=this.events,i=this.settings;return i.status=r.SLEEPING,i.active=!1,i.visible=!1,e.emit(o.SLEEP,this,t),this},wake:function(t){var e=this.events,i=this.settings;return i.status=r.RUNNING,i.active=!0,i.visible=!0,e.emit(o.WAKE,this,t),i.isTransition&&e.emit(o.TRANSITION_WAKE,i.transitionFrom,i.transitionDuration),this},getData:function(){return this.settings.data},isSleeping:function(){return this.settings.status===r.SLEEPING},isActive:function(){return this.settings.status===r.RUNNING},isPaused:function(){return this.settings.status===r.PAUSED},isTransitioning:function(){return this.settings.isTransition||null!==this.scenePlugin._target},isTransitionOut:function(){return null!==this.scenePlugin._target&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){var e=this.events,i=this.settings;t&&(i.data=t),i.status=r.START,i.active=!0,i.visible=!0,e.emit(o.START,this),e.emit(o.READY,this,t)},shutdown:function(t){var e=this.events,i=this.settings;e.off(o.TRANSITION_INIT),e.off(o.TRANSITION_START),e.off(o.TRANSITION_COMPLETE),e.off(o.TRANSITION_OUT),i.status=r.SHUTDOWN,i.active=!1,i.visible=!1,this.renderer===u.WEBGL&&this.renderer.resetTextures(!0),e.emit(o.SHUTDOWN,this,t)},destroy:function(){var t=this.events,e=this.settings;e.status=r.DESTROYED,e.active=!1,e.visible=!1,t.emit(o.DESTROY,this),t.removeAllListeners();for(var i=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],n=0;n<i.length;n++)this[i[n]]=null}});t.exports=f},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}}
715,function(t,e,i){ 716/** 717 * @author Richard Davey <[email protected]> 718 * @copyright 2020 Photon Storm Ltd. 719 * @license {@link https://opensource.org/licenses/MIT|MIT License} 720 */ 721var n=i(32),r=i(0),s=i(106),o=i(418),a="Texture.frame missing: ",h=new r({initialize:function(t,e,i,n,r){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var s=0;s<i.length;s++)this.source.push(new o(this,i[s],n,r))},add:function(t,e,i,n,r,o){if(this.has(t))return null;var a=new s(this,t,e,i,n,r,o);return this.frames[t]=a,"__BASE"===this.firstFrame&&(this.firstFrame=t),this.frameTotal++,a},remove:function(t){return!!this.has(t)&&(this.get(t).destroy(),delete this.frames[t],!0)},has:function(t){return this.frames[t]},get:function(t){t||(t=this.firstFrame);var e=this.frames[t];return e||(console.warn(a+t),e=this.frames[this.firstFrame]),e},getTextureSourceIndex:function(t){for(var e=0;e<this.source.length;e++)if(this.source[e]===t)return e;return-1},getFramesFromTextureSource:function(t,e){void 0===e&&(e=!1);var i=[];for(var n in this.frames)if("__BASE"!==n||e){var r=this.frames[n];r.sourceIndex===t&&i.push(r)}return i},getFrameNames:function(t){void 0===t&&(t=!1);var e=Object.keys(this.frames);if(!t){var i=e.indexOf("__BASE");-1!==i&&e.splice(i,1)}return e},getSourceImage:function(t){null!=t&&1!==this.frameTotal||(t="__BASE");var e=this.frames[t];return e?e.source.image:(console.warn(a+t),this.frames.__BASE.source.image)},getDataSourceImage:function(t){null!=t&&1!==this.frameTotal||(t="__BASE");var e,i=this.frames[t];return i?e=i.sourceIndex:(console.warn(a+t),e=this.frames.__BASE.sourceIndex),this.dataSource[e].image},setDataSource:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=this.source[e];this.dataSource.push(new o(this,t[e],i.width,i.height))}},setFilter:function(t){var e;for(e=0;e<this.source.length;e++)this.source[e].setFilter(t);for(e=0;e<this.dataSource.length;e++)this.dataSource[e].setFilter(t)},destroy:function(){var t;for(t=0;t<this.source.length;t++)this.source[t].destroy();for(t=0;t<this.dataSource.length;t++)this.dataSource[t].destroy();for(var e in this.frames)this.frames[e].destroy();this.source=[],this.dataSource=[],this.frames={},this.manager.removeKey(this.key);var i=this.manager.game.renderer;i.type===n.WEBGL&&i.resetTextures(!0),this.manager=null}});t.exports=h},function(t,e,i){ 722/** 723 * @author Richard Davey <[email protected]> 724 * @copyright 2020 Photon Storm Ltd. 725 * @license {@link https://opensource.org/licenses/MIT|MIT License} 726 */ 727var n=i(78);t.exports=function(t,e,i,r,s){void 0===r&&(r=0),void 0===s&&(s=t.length);var o=[];if(n(t,r,s))for(var a=r;a<s;a++){var h=t[a];(!e||e&&void 0===i&&h.hasOwnProperty(e)||e&&void 0!==i&&h[e]===i)&&o.push(h)}return o}},function(t,e,i){ 728/** 729 * @author Richard Davey <[email protected]> 730 * @copyright 2020 Photon Storm Ltd. 731 * @license {@link https://opensource.org/licenses/MIT|MIT License} 732 */ 733t.exports={Matrix:i(1009),Add:i(1017),AddAt:i(1018),BringToTop:i(1019),CountAllMatching:i(1020),Each:i(1021),EachInRange:i(1022),FindClosestInSorted:i(312),GetAll:i(204),GetFirst:i(422),GetRandom:i(207),MoveDown:i(1023),MoveTo:i(1024),MoveUp:i(1025),NumberArray:i(316),NumberArrayStep:i(1026),QuickSelect:i(430),Range:i(431),Remove:i(89),RemoveAt:i(1027),RemoveBetween:i(1028),RemoveRandomElement:i(1029),Replace:i(1030),RotateLeft:i(175),RotateRight:i(176),SafeRange:i(78),SendToBack:i(1031),SetAll:i(1032),Shuffle:i(129),SortByDigits:i(314),SpliceOne:i(74),StableSort:i(79),Swap:i(1033)}},function(t,e){t.exports=function(t){if(!Array.isArray(t)||t.length<2||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i<t.length;i++)if(t[i].length!==e)return!1;return!0}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return void 0===t[n]?null:t[n]}}
vendor: 17,542 bytes, lines 733-770
733,function(t,e,i){ 734/** 735 * @author Richard Davey <[email protected]> 736 * @copyright 2020 Photon Storm Ltd. 737 * @license {@link https://opensource.org/licenses/MIT|MIT License} 738 */ 739var n=i(0),r=i(9),s=i(432),o=new n({Extends:r,initialize:function(){r.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},add:function(t){return this._pending.push(t),this._toProcess++,t},remove:function(t){return this._destroy.push(t),this._toProcess++,t},removeAll:function(){for(var t=this._active,e=this._destroy,i=t.length;i--;)e.push(t[i]),this._toProcess++;return this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;t<i.length;t++){e=i[t];var r=n.indexOf(e);-1!==r&&(n.splice(r,1),this.emit(s.PROCESS_QUEUE_REMOVE,e))}for(i.length=0,i=this._pending,t=0;t<i.length;t++)e=i[t],(!this.checkQueue||this.checkQueue&&-1===n.indexOf(e))&&(n.push(e),this.emit(s.PROCESS_QUEUE_ADD,e));return i.length=0,this._toProcess=0,n},getActive:function(){return this._active},length:{get:function(){return this._active.length}},destroy:function(){this._toProcess=0,this._pending=[],this._active=[],this._destroy=[]}});t.exports=o},function(t,e){ 740/** 741 * @author Richard Davey <[email protected]> 742 * @copyright 2020 Photon Storm Ltd. 743 * @license {@link https://opensource.org/licenses/MIT|MIT License} 744 */ 745function i(t,e){return parseInt(t.getAttribute(e),10)}t.exports=function(t,e,n,r,s){void 0===n&&(n=0),void 0===r&&(r=0);var o=e.cutX,a=e.cutY,h=e.source.width,u=e.source.height,l=e.sourceIndex,c={},f=t.getElementsByTagName("info")[0],d=t.getElementsByTagName("common")[0];c.font=f.getAttribute("face"),c.size=i(f,"size"),c.lineHeight=i(d,"lineHeight")+r,c.chars={};var p=t.getElementsByTagName("char"),v=void 0!==e&&e.trimmed;if(v)var g=e.height,m=e.width;for(var y=0;y<p.length;y++){var x=p[y],w=i(x,"id"),_=String.fromCharCode(w),b=i(x,"x"),T=i(x,"y"),E=i(x,"width"),S=i(x,"height");v&&(b<m&&(m=b),T<g&&(g=T)),v&&0!==g&&0!==m&&(b-=e.x,T-=e.y);var A=(o+b)/h,C=(a+T)/u,O=(o+b+E)/h,R=(a+T+S)/u;if(c.chars[w]={x:b,y:T,width:E,height:S,centerX:Math.floor(E/2),centerY:Math.floor(S/2),xOffset:i(x,"xoffset"),yOffset:i(x,"yoffset"),xAdvance:i(x,"xadvance")+n,data:{},kerning:{},u0:A,v0:C,u1:O,v1:R},s&&0!==E&&0!==S){var M=s.add(_,l,b,T,E,S);M&&M.setUVs(E,S,A,C,O,R)}}var P=t.getElementsByTagName("kerning");for(y=0;y<P.length;y++){var I=P[y],k=i(I,"first"),L=i(I,"second"),D=i(I,"amount");c.chars[L].kerning[k]=D}return c}},function(t,e,i){ 746/** 747 * @author Richard Davey <[email protected]> 748 * @copyright 2020 Photon Storm Ltd. 749 * @license {@link https://opensource.org/licenses/MIT|MIT License} 750 */ 751var n=i(1043),r=i(434),s=i(0),o=i(11),a=i(106),h=i(15),u=i(107),l=new s({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,r){h.call(this,t,"Blitter"),this.setTexture(n,r),this.setPosition(e,i),this.initPipeline(),this.children=new u,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,s){void 0===n&&(n=!0),void 0===s&&(s=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new r(this,t,e,i,n);return this.children.addAt(o,s,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var r=this.createMultiple(e,i,n),s=0;s<r.length;s++){var o=r[s];t.call(this,o,s)}return r},createMultiple:function(t,e,i){void 0===e&&(e=this.frame.name),void 0===i&&(i=!0),Array.isArray(e)||(e=[e]);var n=[],r=this;return e.forEach((function(e){for(var s=0;s<t;s++)n.push(r.create(0,0,e,i))})),n},childCanRender:function(t){return t.visible&&t.alpha>0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=l},function(t,e,i){ 752/** 753 * @author Richard Davey <[email protected]> 754 * @author Felipe Alfonso <@bitnenfer> 755 * @copyright 2020 Photon Storm Ltd. 756 * @license {@link https://opensource.org/licenses/MIT|MIT License} 757 */ 758var n=i(205),r=i(34),s=i(0),o=i(11),a=i(75),h=i(15),u=i(10),l=i(1046),c=i(435),f=i(3),d=new s({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Pipeline,o.Transform,o.Visible,l],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(r.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new u),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,n=new u,r=!1;t.setEmpty();for(var s=0;s<i.length;s++){var o=i[s];o.getBounds&&(o.getBounds(n),r?c(n,t,t):(t.setTo(n.x,n.y,n.width,n.height),r=!0))}}return t},addHandler:function(t){t.once(a.DESTROY,this.remove,this),this.exclusive&&(t.displayList&&t.displayList.remove(t),t.parentContainer&&t.parentContainer.remove(t),this.displayList?t.displayList=this.displayList:t.displayList=this.scene.sys.displayList,t.parentContainer=this),this.scene.sys.displayList.exists(t)||t.emit(a.ADDED_TO_SCENE,t,this.scene)},removeHandler:function(t){t.off(a.DESTROY,this.remove),this.exclusive&&(t.parentContainer=null),this.scene.sys.displayList.exists(t)||t.emit(a.REMOVED_FROM_SCENE,t,this.scene)},pointToContainer:function(t,e){void 0===e&&(e=new f),this.parentContainer?this.parentContainer.pointToContainer(t,e):e=new f(t.x,t.y);var i=this.tempTransformMatrix;return i.applyITRS(this.x,this.y,this.rotation,this.scaleX,this.scaleY),i.invert(),i.transformPoint(t.x,t.y,e),e},getBoundsTransformMatrix:function(){return this.getWorldTransformMatrix(this.tempTransformMatrix,this.localTransform)},add:function(t){return n.Add(this.list,t,this.maxSize,this.addHandler,this),this},addAt:function(t,e){return n.AddAt(this.list,t,e,this.maxSize,this.addHandler,this),this},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),n.StableSort(this.list,e),this):this},getByName:function(t){return n.GetFirst(this.list,"name",t)},getRandom:function(t,e){return n.GetRandom(this.list,t,e)},getFirst:function(t,e,i,r){return n.GetFirst(this.list,t,e,i,r)},getAll:function(t,e,i,r){return n.GetAll(this.list,t,e,i,r)},count:function(t,e,i,r){return n.CountAllMatching(this.list,t,e,i,r)},swap:function(t,e){return n.Swap(this.list,t,e),this},moveTo:function(t,e){return n.MoveTo(this.list,t,e),this},remove:function(t,e){var i=n.Remove(this.list,t,this.removeHandler,this);if(e&&i){Array.isArray(i)||(i=[i]);for(var r=0;r<i.length;r++)i[r].destroy()}return this},removeAt:function(t,e){var i=n.RemoveAt(this.list,t,this.removeHandler,this);return e&&i&&i.destroy(),this},removeBetween:function(t,e,i){var r=n.RemoveBetween(this.list,t,e,this.removeHandler,this);if(i)for(var s=0;s<r.length;s++)r[s].destroy();return this},removeAll:function(t){var e=n.RemoveBetween(this.list,0,this.list.length,this.removeHandler,this);if(t)for(var i=0;i<e.length;i++)e[i].destroy();return this},bringToTop:function(t){return n.BringToTop(this.list,t),this},sendToBack:function(t){return n.SendToBack(this.list,t),this},moveUp:function(t){return n.MoveUp(this.list,t),this},moveDown:function(t){return n.MoveDown(this.list,t),this},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(t,e,i){return n.Replace(this.list,t,e)&&(this.addHandler(e),this.removeHandler(t),i&&t.destroy()),this},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,r){return n.SetAll(this.list,t,e,i,r),this},each:function(t,e){var i,n=[null],r=this.list.slice(),s=r.length;for(i=2;i<arguments.length;i++)n.push(arguments[i]);for(i=0;i<s;i++)n[0]=r[i],t.apply(e,n);return this},iterate:function(t,e){var i,n=[null];for(i=2;i<arguments.length;i++)n.push(arguments[i]);for(i=0;i<this.list.length;i++)n[0]=this.list[i],t.apply(e,n);return this},setScrollFactor:function(t,e,i){return void 0===e&&(e=t),void 0===i&&(i=!1),this.scrollFactorX=t,this.scrollFactorY=e,i&&(n.SetAll(this.list,"scrollFactorX",t),n.SetAll(this.list,"scrollFactorY",e)),this},length:{get:function(){return this.list.length}},first:{get:function(){return this.position=0,this.list.length>0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position<this.list.length?(this.position++,this.list[this.position]):null}},previous:{get:function(){return this.position>0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=d},function(t,e,i){ 759/** 760 * @author Richard Davey <[email protected]> 761 * @copyright 2020 Photon Storm Ltd. 762 * @license {@link https://opensource.org/licenses/MIT|MIT License} 763 */ 764var n=i(147),r=i(0),s=i(1051),o=new r({Extends:n,Mixins:[s],initialize:function(t,e,i,r,s,o,a){n.call(this,t,e,i,r,s,o,a),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=o},function(t,e,i){ 765/** 766 * @author Richard Davey <[email protected]> 767 * @copyright 2020 Photon Storm Ltd. 768 * @license {@link https://opensource.org/licenses/MIT|MIT License} 769 */ 770var n=i(131),r=i(0),s=i(214),o=i(297),a=i(298),h=i(299),u=i(303),l=i(171),c=i(306),f=i(307),d=i(308),p=i(108),v=i(15),g=i(2),m=i(6),y=i(14),x=i(65),w=i(1057),_=new r({Extends:v,Mixins:[o,a,h,u,l,f,d,c,w],initialize:function(t,e){var i=m(e,"x",0),n=m(e,"y",0);v.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline(x.GRAPHICS_PIPELINE),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return m(t,"lineStyle",null)&&(this.defaultStrokeWidth=m(t,"lineStyle.width",1),this.defaultStrokeColor=m(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=m(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),m(t,"fillStyle",null)&&(this.defaultFillColor=m(t,"fillStyle.color",16777215),this.defaultFillAlpha=m(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(s.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(s.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,n,r,o,a,h){return void 0===r&&(r=1),void 0===o&&(o=r),void 0===a&&(a=r),void 0===h&&(h=r),this.commandBuffer.push(s.GRADIENT_FILL_STYLE,r,o,a,h,t,e,i,n),this},lineGradientStyle:function(t,e,i,n,r,o){return void 0===o&&(o=1),this.commandBuffer.push(s.GRADIENT_LINE_STYLE,t,o,e,i,n,r),this},beginPath:function(){return this.commandBuffer.push(s.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(s.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(s.FILL_PATH),this},fill:function(){return this.commandBuffer.push(s.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(s.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(s.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,y.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,y.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(s.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var r=this._lineWidth/2,s=t-r,o=t+r;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.beginPath(),this.moveTo(s,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(s,e+n),this.lineTo(o+i,e+n),this.strokePath(),this},fillRoundedRect:function(t,e,i,n,r){void 0===r&&(r=20);var s=r,o=r,a=r,h=r;return"number"!=typeof r&&(s=g(r,"tl",20),o=g(r,"tr",20),a=g(r,"bl",20),h=g(r,"br",20)),this.beginPath(),this.moveTo(t+s,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-y.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,y.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,y.TAU,Math.PI),this.lineTo(t,e+s),this.arc(t+s,e+s,s,-Math.PI,-y.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,n,r){void 0===r&&(r=20);var s=r,o=r,a=r,h=r;return"number"!=typeof r&&(s=g(r,"tl",20),o=g(r,"tr",20),a=g(r,"bl",20),h=g(r,"br",20)),this.beginPath(),this.moveTo(t+s,e),this.lineTo(t+i-o,e),this.moveTo(t+i-o,e),this.arc(t+i-o,e+o,o,-y.TAU,0),this.lineTo(t+i,e+n-h),this.moveTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,y.TAU),this.lineTo(t+a,e+n),this.moveTo(t+a,e+n),this.arc(t+a,e+n-a,a,y.TAU,Math.PI),this.lineTo(t,e+s),this.moveTo(t,e+s),this.arc(t+s,e+s,s,-Math.PI,-y.TAU),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(s.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,r,o){return this.commandBuffer.push(s.FILL_TRIANGLE,t,e,i,n,r,o),this},strokeTriangle:function(t,e,i,n,r,o){return this.commandBuffer.push(s.STROKE_TRIANGLE,t,e,i,n,r,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(s.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(s.MOVE_TO,t,e),this},strokePoints:function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var r=1;r<n;r++)this.lineTo(t[r].x,t[r].y);return e&&this.lineTo(t[0].x,t[0].y),i&&this.closePath(),this.strokePath(),this},fillPoints:function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var r=1;r<n;r++)this.lineTo(t[r].x,t[r].y);return e&&this.lineTo(t[0].x,t[0].y),i&&this.closePath(),this.fillPath(),this},strokeEllipseShape:function(t,e){void 0===e&&(e=32);var i=t.getPoints(e);return this.strokePoints(i,!0)},strokeEllipse:function(t,e,i,n,r){void 0===r&&(r=32);var s=new p(t,e,i,n).getPoints(r);return this.strokePoints(s,!0)},fillEllipseShape:function(t,e){void 0===e&&(e=32);var i=t.getPoints(e);return this.fillPoints(i,!0)},fillEllipse:function(t,e,i,n,r){void 0===r&&(r=32);var s=new p(t,e,i,n).getPoints(r);return this.fillPoints(s,!0)},arc:function(t,e,i,n,r,o,a){return void 0===o&&(o=!1),void 0===a&&(a=0),this.commandBuffer.push(s.ARC,t,e,i,n,r,o,a),this},slice:function(t,e,i,n,r,o,a){return void 0===o&&(o=!1),void 0===a&&(a=0),this.commandBuffer.push(s.BEGIN_PATH),this.commandBuffer.push(s.MOVE_TO,t,e),this.commandBuffer.push(s.ARC,t,e,i,n,r,o,a),this.commandBuffer.push(s.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(s.SAVE),this},restore:function(){return this.commandBuffer.push(s.RESTORE),this},translateCanvas:function(t,e){return this.commandBuffer.push(s.TRANSLATE,t,e),this},scaleCanvas:function(t,e){return this.commandBuffer.push(s.SCALE,t,e),this},rotateCanvas:function(t){return this.commandBuffer.push(s.ROTATE,t),this},clear:function(){return this.commandBuffer.length=0,this.defaultFillColor>-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this}
770,generateTexture:function(t,e,i){var n,r,s=this.scene.sys,o=s.game.renderer;if(void 0===e&&(e=s.scale.width),void 0===i&&(i=s.scale.height),_.TargetCamera.setScene(this.scene),_.TargetCamera.setViewport(0,0,e,i),_.TargetCamera.scrollX=this.x,_.TargetCamera.scrollY=this.y,"string"==typeof t)if(s.textures.exists(t)){var a=(n=s.textures.get(t)).getSourceImage();a instanceof HTMLCanvasElement&&(r=a.getContext("2d"))}else r=(n=s.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(r=t.getContext("2d"));return r&&(this.renderCanvas(o,this,_.TargetCamera,null,r,!1),n&&n.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});_.TargetCamera=new n,t.exports=_},function(t,e){ 771/** 772 * @author Richard Davey <[email protected]> 773 * @copyright 2020 Photon Storm Ltd. 774 * @license {@link https://opensource.org/licenses/MIT|MIT License} 775 */ 776t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},function(t,e,i){ 777/** 778 * @author Richard Davey <[email protected]> 779 * @copyright 2020 Photon Storm Ltd. 780 * @license {@link https://opensource.org/licenses/MIT|MIT License} 781 */ 782var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=t.width/2,s=t.height/2;return i.x=t.x+r*Math.cos(e),i.y=t.y+s*Math.sin(e),i}},function(t,e,i){ 783/** 784 * @author Richard Davey <[email protected]> 785 * @copyright 2020 Photon Storm Ltd. 786 * @license {@link https://opensource.org/licenses/MIT|MIT License} 787 */ 788var n=i(34),r=i(0),s=i(11),o=i(173),a=i(98),h=i(9),u=i(75),l=i(107),c=i(1065),f=i(21),d=i(79),p=new r({Extends:l,Mixins:[s.AlphaSingle,s.BlendMode,s.Depth,s.Mask,s.Pipeline,s.Visible,h,c],initialize:function(t,e){l.call(this,t),h.call(this),this.scene=t,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=t.sys,this.events=t.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPipeline(),this.clearAlpha(),this.setBlendMode(n.SKIP_CHECK),e&&this.add(e),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new a(this)),this},setData:function(t,e){return this.data||(this.data=new a(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new a(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new a(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new a(this)),this.data.get(t)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return o(this)},willRender:function(t){return!(15!==this.renderFlags||0===this.list.length||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.displayList.getIndex(t)),i},addChildCallback:function(t){t.emit(u.ADDED_TO_SCENE,t,this.scene),t.displayList&&t.displayList.remove(t),t.displayList=this,this.queueDepthSort(),this.events.emit(f.ADDED_TO_SCENE,t,this.scene)},removeChildCallback:function(t){t.emit(u.REMOVED_FROM_SCENE,t,this.scene),t.displayList=null,this.queueDepthSort(),this.events.emit(f.REMOVED_FROM_SCENE,t,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(d(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},destroy:function(){if(this.scene&&!this.ignoreDestroy){this.emit
788(u.DESTROY,this);for(var t=this.list.length;t--;)this.list[t].destroy();this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.queueDepthSort(),this.displayList.remove(this)),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});t.exports=p},function(t,e,i){ 789/** 790 * @author Richard Davey <[email protected]> 791 * @copyright 2020 Photon Storm Ltd. 792 * @license {@link https://opensource.org/licenses/MIT|MIT License} 793 */ 794var n=i(0),r=i(11),s=i(15),o=i(444),a=i(107),h=i(446),u=i(1069),l=new n({Extends:s,Mixins:[r.Depth,r.Mask,r.Pipeline,r.Transform,r.Visible,u],initialize:function(t,e,i,n){if(s.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline(),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var r=0;r<n.length;r++)this.createEmitter(n[r])}},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame
794(e)},setFrame:function(t){this.frame=this.texture.get(t);var e=this.texture.getFramesFromTextureSource(this.frame.sourceIndex),i=[];return e.forEach((function(t){i.push(t.name)})),this.frameNames=i,this.defaultFrame=this.frame,this},setEmitterFrames:function(t,e){Array.isArray(t)||(t=[t]);var i=e.frames;i.length=0;for(var n=0;n<t.length;n++){var r=t[n];-1!==this.frameNames.indexOf(r)&&i.push(this.texture.get(r))}return i.length>0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},removeEmitter:function(t){return this.emitters.remove(t,!0)},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,r=0;r<n.length;r++){var s=n[r];s.active&&s.emitParticle(t,e,i)}return this},emitParticleAt:function(t,e,i){return this.emitParticle(i,t,e)},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},getProcessors:function(){return this.wells.getAll("active",!0)},preUpdate:function(t,e){e*=this.timeScale;for(var i=this.emitters.list,n=0;n<i.length;n++){var r=i[n];r.active&&r.preUpdate(t,e)}},setAlpha:function(){},setScrollFactor:function(){},setBlendMode:function(){}});t.exports=l},function(t,e,i){ 795/** 796 * @author Richard Davey <[email protected]> 797 * @copyright 2020 Photon Storm Ltd. 798 * @license {@link https://opensource.org/licenses/MIT|MIT License} 799 */ 800var n=i(34),r=i(131),s=i(31),o=i(0),a=i(11),h=i(32),u=i(106),l=i(15),c=i(1),f=i(65),d=i(1073),p=i(139),v=i(12),g=i(219),m=new o({Extends:l,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Crop,a.Depth,a.Flip,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.ScrollFactor,a.Tint,a.Transform,a.Visible,d],initialize:function(t,e,i,n,o,a,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=32),void 0===o&&(o=32),l.call(this,t,"RenderTexture"),this.renderer=t.sys.renderer,this.textureManager=t.sys.textures,this.globalTint=16777215,this.globalAlpha=1,this.canvas=null,this.dirty=!1,this._crop=this.resetCropObject(),this.texture=null,this.frame=null,this._saved=!1,void 0===a?(this.canvas=s.create2D(this,n,o),this.texture=t.sys.textures.addCanvas(g(),this.canvas),this.frame=this.texture.get()):(this.texture=t.sys.textures.get(a),this.frame=this.texture.get(u),this.canvas=this.frame.source.image,this._saved=!0,this.dirty=!0,this.width=this.frame.cutWidth,this.height=this.frame.cutHeight),this.context=this.canvas.getContext("2d"),this._eraseMode=!1,this.camera=new r(0,0,n,o),this.renderTarget=null;var d=this.renderer;d?d.type===h.WEBGL?(this.drawGameObject=this.batchGameObjectWebGL,this.renderTarget=new p(d,n,o,1,0,!1)):d.type===h.CANVAS&&(this.drawGameObject=this.batchGameObjectCanvas):this.drawGameObject=c,this.camera.setScene(t),this.setPosition(e,i),void 0===a&&this.setSize(n,o),this.setOrigin(0,0),this.initPipeline(f.SINGLE_PIPELINE)},setSize:function(t,e){return this.resize(t,e)},resize:function(t,e){void 0===e&&(e=t);var i=this.frame;if(t!==this.width||e!==this.height){if("__BASE"===i.name){this.canvas.width=t,this.canvas.height=e,this.texture.width=t,this.texture.height=e;var n=this.renderTarget;n&&(n.resize(t,e),i.glTexture=n.texture,i.source.isRenderTexture=!0,i.source.isGLTexture=!0,i.source.glTexture=n.texture),this.camera.setSize(t,e),i.source.width=t,i.source.height=e,i.setSize(t,e),this.width=t,this.height=e}}else{var r=this.texture.getSourceImage();i.cutX+t>r.width&&(t=r.width-i.cutX),i.cutY+e>r.height&&(e=r.height-i.cutY),i.setSize(t,e,i.cutX,i.cutY)}this.updateDisplayOrigin();var s=this.input;return s&&!s.customHitArea&&(s.hitArea.width=t,s.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,r,s){var o=this.frame,a=this.camera,h=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=o.cutWidth),void 0===s&&(s=o.cutHeight);var u=(t>>16&255)/255,l=(t>>8&255)/255,c=(255&t)/255,f=this.renderTarget;if(a.preRender(),f){f.bind(!0);var d=this.pipeline;d.manager.set(d);var p=f.width,g=f.height,m=h.width/p,y=h.height/g;d.drawFillRect(i*m,n*y,r*m,s*y,v.getTintFromFloats(c,l,u,1),e),f.unbind(!0)}else{var x=this.context;h.setContext(x),x.fillStyle="rgba("+u+","+l+","+c+","+e+")",x.fillRect(i+o.cutX,n+o.cutY,r,s),h.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var t=this.renderTarget;if(t)t.clear();else{var e=this.context;e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),e.restore(
800)}this.dirty=!1}return this},erase:function(t,e,i){return this._eraseMode=!0,this.draw(t,e,i,1,16777215),this._eraseMode=!1,this},draw:function(t,e,i,n,r){return this.beginDraw(),this.batchDraw(t,e,i,n,r),this.endDraw(),this},drawFrame:function(t,e,i,n,r,s){return this.beginDraw(),this.batchDrawFrame(t,e,i,n,r,s),this.endDraw(),this},beginDraw:function(){var t=this.camera,e=this.renderer,i=this.renderTarget;return t.preRender(),i?e.beginCapture(i.width,i.height):e.setContext(this.context),this},batchDraw:function(t,e,i,n,r){return void 0===n&&(n=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16),Array.isArray(t)||(t=[t]),this.batchList(t,e,i,n,r),this},batchDrawFrame:function(t,e,i,n,r,s){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16);var o=this.textureManager.getFrame(t,e);return o&&(this.renderTarget?this.pipeline.batchTextureFrame(o,i,n,s,r,this.camera.matrix,null):this.batchTextureFrame(o,i+this.frame.cutX,n+this.frame.cutY,r,s)),this},endDraw:function(){var t=this.renderer,e=this.renderTarget;if(e){var i=t.endCapture();t.pipelines.setUtility().blitFrame(i,e,1,!1,!1,this._eraseMode),t.resetScissor(),t.resetViewport()}else t.setContext();return this.dirty=!0,this},batchList:function(t,e,i,n,r){for(var s=0;s<t.length;s++){var o=t[s];o&&o!==this&&(o.renderWebGL||o.renderCanvas?this.drawGameObject(o,e,i):o.isParent||o.list?this.batchGroup(o.getChildren(),e,i):"string"==typeof o?this.batchTextureFrameKey(o,null,e,i,n,r):o instanceof u?this.batchTextureFrame(o,e,i,n,r):Array.isArray(o)&&this.batchList(o,e,i,n,r))}},batchGroup:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),e+=this.frame.cutX,i+=this.frame.cutY;for(var n=0;n<t.length;n++){var r=t[n];if(r.willRender(this.camera)){var s=r.x+e,o=r.y+i;this.drawGameObject(r,s,o)}}},batchGameObjectWebGL:function(t,e,i){void 0===e&&(e=t.x),void 0===i&&(i=t.y);var n=t.x,r=t.y;t.setPosition(e+this.frame.cutX,i+this.frame.cutY),t.renderDirect?t.renderDirect(this.renderer,t,this.camera):t.renderWebGL(this.renderer,t,this.camera),t.setPosition(n,r)},batchGameObjectCanvas:function(t,e,i){void 0===e&&(e=t.x),void 0===i&&(i=t.y);var r=t.x,s=t.y;if(this._eraseMode){var o=t.blendMode;t.blendMode=n.ERASE}t.setPosition(e+this.frame.cutX,i+this.frame.cutY),t.renderCanvas(this.renderer,t,this.camera,null),t.setPosition(r,s),this._eraseMode&&(t.blendMode=o)},batchTextureFrameKey:function(t,e,i,n,r,s){var o=this.textureManager.getFrame(t,e);o&&this.batchTextureFrame(o,i,n,r,s)},batchTextureFrame:function(t,e,i,n,r){if(void 0===e&&(e=0),void 0===i&&(i=0),e+=this.frame.cutX,i+=this.frame.cutY,this.renderTarget)this.pipeline.batchTextureFrame(t,e,i,r,n,this.camera.matrix,null);else{var s=this.context,o=t.canvasData,a=t.source.image,h=this.camera.matrix;s.save(),s.globalCompositeOperation=this._eraseMode?"destination-out":"source-over",s.globalAlpha=n,h.setToContext(s),s.drawImage(a,o.x,o.y,o.width,o.height,e,i,o.width,o.height),s.restore()}},snapshotArea:function(t,e,i,n,r,s,o){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,r,!1,t,e,i,n,s,o):this.renderer.snapshotCanvas(this.canvas,r,!1,t,e,i,n,s,o),this},snapshot:function(t,e,i){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,t,!1,0,0,this.width,this.height,e,i):this.renderer.snapshotCanvas(this.canvas,t,!1,0,0,this.width,this.height,e,i),this},snapshotPixel:function(t,e,i){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,i,!0,t,e):this.renderer.snapshotCanvas(this.canvas,i,!0,t,e),this},preDestroy:function(){this._saved||(s.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.texture.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.texture=null)}});t.exports=m},function(t,e){t.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}}
vendor: 4,125 bytes, lines 800-806
800,function(t,e,i){ 801/** 802 * @author Richard Davey <[email protected]> 803 * @copyright 2020 Photon Storm Ltd. 804 * @license {@link https://opensource.org/licenses/MIT|MIT License} 805 */ 806var n=i(162),r=i(0),s=i(11),o=i(15),a=i(65),h=i(1079),u=i(3),l=new r({Extends:o,Mixins:[s.AlphaSingle,s.BlendMode,s.Depth,s.Flip,s.Mask,s.Pipeline,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,h],initialize:function(t,e,i,r,s,h,l,c,f){void 0===r&&(r="__DEFAULT"),void 0===h&&(h=2),void 0===l&&(l=!0),o.call(this,t,"Rope"),this.anims=new n(this),this.points=h,this.vertices,this.uv,this.colors,this.alphas,this.tintFill="__DEFAULT"===r,this.dirty=!1,this.horizontal=l,this._flipX=!1,this._flipY=!1,this._perp=new u,this.debugCallback=null,this.debugGraphic=null,this.setTexture(r,s),this.setPosition(e,i),this.setSizeToFrame(),this.initPipeline(a.ROPE_PIPELINE),Array.isArray(h)&&this.resizeArrays(h.length),this.setPoints(h,c,f),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){var i=this.anims.currentFrame;this.anims.update(t,e),this.anims.currentFrame!==i&&(this.updateUVs(),this.updateVertices())},play:function(t,e,i){return this.anims.play(t,e,i),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(t,e,i))},setVertical:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(t,e,i)):this},setTintFill:function(t){return void 0===t&&(t=!1),this.tintFill=t,this},setAlphas:function(t,e){var i=this.points.length;if(i<1)return this;var n,r=this.alphas;void 0===t?t=[1]:Array.isArray(t)||void 0!==e||(t=[t]);var s=0;if(void 0!==e)for(n=0;n<i;n++)r[s=2*n]=t,r[s+1]=e;else if(t.length===i)for(n=0;n<i;n++)r[s=2*n]=t[n],r[s+1]=t[n];else{var o=t[0];for(n=0;n<i;n++)s=2*n,t.length>s&&(o=t[s]),r[s]=o,t.length>s+1&&(o=t[s+1]),r[s+1]=o}return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i,n=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var r=0;if(t.length===e)for(i=0;i<e;i++)n[r=2*i]=t[i],n[r+1]=t[i];else{var s=t[0];for(i=0;i<e;i++)r=2*i,t.length>r&&(s=t[r]),n[r]=s,t.length>r+1&&(s=t[r+1]),n[r+1]=s}return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,r,s,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(s=-this.frame.halfWidth,r=this.frame.width/(o-1),n=0;n<o;n++)t.push({x:s+n*r,y:0});else for(s=-this.frame.halfHeight,r=this.frame.height/(o-1),n=0;n<o;n++)t.push({x:0,y:s+n*r})}var a=t.length,h=this.points.length;return a<1?(console.warn("Rope: Not enough points given"),this):(1===a&&(t.unshift({x:0,y:0}),a++),h!==a&&this.resizeArrays(a),this.points=t,this.updateUVs(),null!=e&&this.setColors(e),null!=i&&this.setAlphas(i),this)},updateUVs:function(){for(var t=this.uv,e=this.points.length,i=this.frame.u0,n=this.frame.v0,r=this.frame.u1,s=this.frame.v1,o=(r-i)/(e-1),a=(s-n)/(e-1),h=0;h<e;h++){var u,l,c,f,d=4*h;this.horizontal?(this._flipX?(u=r-h*o,c=r-h*o):(u=i+h*o,c=i+h*o),this._flipY?(l=s,f=n):(l=n,f=s)):(this._flipX?(u=i,c=r):(u=r,c=i),this._flipY?(l=s-h*a,f=s-h*a):(l=n+h*a,f=n+h*a)),t[d+0]=u,t[d+1]=l,t[d+2]=c,t[d+3]=f}return this},resizeArrays:function(t){var e=this.colors,i=this.alphas;this.vertices=new Float32Array(4*t),this.uv=new Float32Array(4*t),e=new Uint32Array(2*t),i=new Float32Array(2*t);for(var n=0;n<2*t;n++)e[n]=16777215,i[n]=1;return this.colors=e,this.alphas=i,this.dirty=!0,this},updateVertices:function(){var t=this._perp,e=this.points,i=this.vertices,n=e.length;if(this.dirty=!1,!(n<1)){for(var r,s=e[0],o=this.horizontal?this.frame.halfHeight:this.frame.halfWidth,a=0;a<n;a++){var h=e[a],u=4*a;r=a<n-1?e[a+1]:h,t.x=r.y-s.y,t.y=-(r.x-s.x);var l=t.length();t.x/=l,t.y/=l,t.x*=o,t.y*=o,i[u]=h.x+t.x,i[u+1]=h.y+t.y,i[u+2]=h.x-t.x,i[u+3]=h.y-t.y,s=h}return this}},setDebug:function(t,e){return this.debugGraphic=t,this.debugCallback=t||e?e||this.renderDebugVerts:null,this}
806,renderDebugVerts:function(t,e,i){var n=t.debugGraphic,r=i[0],s=i[1],o=i[2],a=i[3];n.lineBetween(r,s,o,a);for(var h=4;h<e;h+=4){var u=i[h+0],l=i[h+1],c=i[h+2],f=i[h+3];n.lineBetween(r,s,u,l),n.lineBetween(o,a,c,f),n.lineBetween(o,a,u,l),n.lineBetween(u,l,c,f),r=u,s=l,o=c,a=f}},preDestroy:function(){this.anims.destroy(),this.anims=void 0,this.points=null,this.vertices=null,this.uv=null,this.colors=null,this.alphas=null,this.debugCallback=null,this.debugGraphic=null},flipX:{get:function(){return this._flipX},set:function(t){return this._flipX=t,this.updateUVs()}},flipY:{get:function(){return this._flipY},set:function(t){return this._flipY=t,this.updateUVs()}}});t.exports=l},function(t,e,i){ 807/** 808 * @author Richard Davey <[email protected]> 809 * @copyright 2020 Photon Storm Ltd. 810 * @license {@link https://opensource.org/licenses/MIT|MIT License} 811 */ 812var n=i(140),r=i(31),s=i(0),o=i(11),a=i(22),h=i(15),u=i(452),l=i(6),c=i(199),f=i(1082),d=i(453),p=new s({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScrollFactor,o.Tint,o.Transform,o.Visible,f],initialize:function(t,e,i,n,s){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Text"),this.renderer=t.sys.renderer,this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.canvas=r.create(this),this.context=this.canvas.getContext("2d"),this.style=new d(this,s),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.dirty=!1,0===this.style.resolution&&(this.style.resolution=1),this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(n),s&&s.padding&&this.setPadding(s.padding),s&&s.lineSpacing&&this.setLineSpacing(s.lineSpacing),t.sys.game.events.on(a.CONTEXT_RESTORED,(function(){this.dirty=!0}),this)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",n(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(t){var e=this.style;if(e.wordWrapCallback){var i=e.wordWrapCallback.call(e.wordWrapCallbackScope,t,this);return Array.isArray(i)&&(i=i.join("\n")),i}return e.wordWrapWidth?e.wordWrapUseAdvanced?this.advancedWordWrap(t,this.context,this.style.wordWrapWidth):this.basicWordWrap(t,this.context,this.style.wordWrapWidth):t},advancedWordWrap:function(t,e,i){for(var n="",r=t.replace(/ +/gi," ").split(this.splitRegExp),s=r.length,o=0;o<s;o++){var a=r[o],h="";if(a=a.replace(/^ *|\s*$/gi,""),e.measureText(a).width<i)n+=a+"\n";else{for(var u=i,l=a.split(" "),c=0;c<l.length;c++){var f=l[c],d=f+" ",p=e.measureText(d).width;if(p>u){if(0===c){for(var v=d;v.length&&(v=v.slice(0,-1),!((p=e.measureText(v).width)<=u)););if(!v.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var g=f.substr(v.length);l[c]=g,h+=v}var m=l[c].length?c:c+1,y=l.slice(m).join(" ").replace(/[ \n]*$/gi,"");r[o+1]=y+" "+(r[o+1]||""),s=r.length;break}h+=d,u-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",r=t.split(this.splitRegExp),s=r.length-1,o=e.measureText(" ").width,a=0;a<=s;a++){for(var h=i,u=r[a].split(" "),l=u.length-1,c=0;c<=l;c++){var f=u[c],d=e.measureText(f).width,p=d;c<l&&(p+=o),p>h&&c>0&&(n+="\n",h=i),n+=f,c<l?(n+=" ",h-=p):h-=d}a<s&&(n+="\n")}return n},getWrappedText:function(t){return void 0===t&&(t=this._text),this.style.syncFont(this.canvas,this.context),this.runWordWrap(t).split(this.splitRegExp)},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this._text&&(this._text=t.toString(),this.updateText()),this},setStyle:function(t){return this.style.setStyle(t)},setFont:function(t){return this.style.setFont(t)},setFontFamily:function(t){return this.style.setFontFamily(t)},setFontSize:function(t){return this.style.setFontSize(t)},setFontStyle:function(t){return this.style.setFontStyle(t)},setFixedSize:function(t,e){return this.style.setFixedSize(t,e)}
vendor: 4,269 bytes, lines 812-818
812,setBackgroundColor:function(t){return this.style.setBackgroundColor(t)},setFill:function(t){return this.style.setFill(t)},setColor:function(t){return this.style.setColor(t)},setStroke:function(t,e){return this.style.setStroke(t,e)},setShadow:function(t,e,i,n,r,s){return this.style.setShadow(t,e,i,n,r,s)},setShadowOffset:function(t,e){return this.style.setShadowOffset(t,e)},setShadowColor:function(t){return this.style.setShadowColor(t)},setShadowBlur:function(t){return this.style.setShadowBlur(t)},setShadowStroke:function(t){return this.style.setShadowStroke(t)},setShadowFill:function(t){return this.style.setShadowFill(t)},setWordWrapWidth:function(t,e){return this.style.setWordWrapWidth(t,e)},setWordWrapCallback:function(t,e){return this.style.setWordWrapCallback(t,e)},setAlign:function(t){return this.style.setAlign(t)},setResolution:function(t){return this.style.setResolution(t)},setLineSpacing:function(t){return this.lineSpacing=t,this.updateText()},setPadding:function(t,e,i,n){if("object"==typeof t){var r=t,s=l(r,"x",null);null!==s?(t=s,i=s):(t=l(r,"left",0),i=l(r,"right",t));var o=l(r,"y",null);null!==o?(e=o,n=o):(e=l(r,"top",0),n=l(r,"bottom",e))}else void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=e);return this.padding.left=t,this.padding.top=e,this.padding.right=i,this.padding.bottom=n,this.updateText()},setMaxLines:function(t){return this.style.setMaxLines(t)},updateText:function(){var t=this.canvas,e=this.context,i=this.style,n=i.resolution,r=i.metrics;i.syncFont(t,e);var s=this._text;(i.wordWrapWidth||i.wordWrapCallback)&&(s=this.runWordWrap(this._text));var o,a=s.split(this.splitRegExp),h=u(this,r,a),l=this.padding;0===i.fixedWidth?(this.width=h.width+l.left+l.right,o=h.width):(this.width=i.fixedWidth,(o=this.width-l.left-l.right)<h.width&&(o=h.width)),0===i.fixedHeight?this.height=h.height+l.top+l.bottom:this.height=i.fixedHeight;var c,f,d=this.width,p=this.height;this.updateDisplayOrigin(),d*=n,p*=n,d=Math.max(d,1),p=Math.max(p,1),t.width!==d||t.height!==p?(t.width=d,t.height=p,this.frame.setSize(d,p),i.syncFont(t,e)):e.clearRect(0,0,d,p),e.save(),e.scale(n,n),i.backgroundColor&&(e.fillStyle=i.backgroundColor,e.fillRect(0,0,d,p)),i.syncStyle(t,e),e.textBaseline="alphabetic",e.translate(l.left,l.top);for(var v=0;v<h.lines;v++){if(c=i.strokeThickness/2,f=i.strokeThickness/2+v*h.lineHeight+r.ascent,v>0&&(f+=h.lineSpacing*v),i.rtl)c=d-c;else if("right"===i.align)c+=o-h.lineWidths[v];else if("center"===i.align)c+=(o-h.lineWidths[v])/2;else if("justify"===i.align&&h.lineWidths[v]/h.width>=.85){var g=h.width-h.lineWidths[v],m=e.measureText(" ").width,y=a[v].trim(),x=y.split(" ");g+=(a[v].length-y.length)*m;for(var w=Math.floor(g/m),_=0;w>0;)x[_]+=" ",_=(_+1)%(x.length-1||1),--w;a[v]=x.join(" ")}this.autoRound&&(c=Math.round(c),f=Math.round(f)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(a[v],c,f)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(a[v],c,f))}e.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var b=this.input;return b&&!b.customHitArea&&(b.hitArea.width=this.width,b.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&c(this.canvas),r.remove(this.canvas),this.texture.destroy()}});t.exports=p},function(t,e,i){ 813/** 814 * @author Richard Davey <[email protected]> 815 * @copyright 2020 Photon Storm Ltd. 816 * @license {@link https://opensource.org/licenses/MIT|MIT License} 817 */ 818var n=i(31),r=i(0),s=i(11),o=i(22),a=i(15),h=i(355),u=i(189),l=i(1085),c=i(3),f=new r({Extends:a,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Crop,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Tint,s.Transform,s.Visible,l],initialize:function(t,e,
818i,r,s,u,l){var f=t.sys.renderer;a.call(this,t,"TileSprite");var d=t.sys.textures.get(u),p=d.get(l);r&&s?(r=Math.floor(r),s=Math.floor(s)):(r=p.width,s=p.height),this._tilePosition=new c,this._tileScale=new c(1,1),this.dirty=!1,this.renderer=f,this.canvas=n.create(this,r,s),this.context=this.canvas.getContext("2d"),this.displayTexture=d,this.displayFrame=p,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=h(p.width),this.potHeight=h(p.height),this.fillCanvas=n.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(r,s),this.setFrame(l),this.setOriginFromFrame(),this.initPipeline(),t.sys.game.events.on(o.CONTEXT_RESTORED,(function(t){var e=t.gl;this.dirty=!0,this.fillPattern=null,this.fillPattern=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.fillCanvas,this.potWidth,this.potHeight)}),this)},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame
818(e)},setFrame:function(t){var e=this.displayTexture.get(t);return this.potWidth=h(e.width),this.potHeight=h(e.height),this.canvas.width=0,e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=e,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame;if(t.source.isRenderTexture||t.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var e=this.fillContext,i=this.fillCanvas,n=this.potWidth,r=this.potHeight;this.renderer.gl||(n=t.cutWidth,r=t.cutHeight),e.clearRect(0,0,n,r),i.width=n,i.height=r,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,n,r),this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||u.disable(e);var i=this._tileScale.x,n=this._tileScale.y,r=this._tilePosition.x,s=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,n),e.translate(-r,-s),e.fillStyle=this.fillPattern,e.fillRect(r,s,this.width/i,this.height/n),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),n.remove(this.canvas),n.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=f},function(t,e,i){ 819/** 820 * @author Richard Davey <[email protected]> 821 * @copyright 2020 Photon Storm Ltd. 822 * @license {@link https://opensource.org/licenses/MIT|MIT License} 823 */ 824var n=i(0),r=i(18),s=i(11),o=i(75),a=i(22),h=i(49),u=i(15),l=i(69),c=i(219),f=i(1088),d=i(14),p=new n({Extends:u,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,f],initialize:function(t,e,i,n){u.call(this,t,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=c(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=d.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(e,i),this.initPipeline(),n&&this.changeSource(n,!1);var r=t.sys.game.events;r.on(a.PAUSE,this.globalPause,this),r.on(a.RESUME,this.globalResume,this);var s=t.sys.sound;s&&s.on(l.GLOBAL_MUTE,this.globalMute,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)}
824,play:function(t,e,i){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var n=this.video;if(!n)return console.warn("Video not loaded"),this;void 0===t&&(t=n.loop);var r=this.scene.sys.sound;r&&r.mute&&this.setMute(!0),isNaN(e)||(this._markerIn=e),!isNaN(i)&&i>e&&(this._markerOut=i),n.loop=t;var s=this._callbacks,o=n.play();return void 0!==o?o.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(n.addEventListener("playing",s.play,!0),n.readyState<2&&(this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),n.addEventListener("ended",s.end,!0),n.addEventListener("timeupdate",s.time,!0),n.addEventListener("seeking",s.seeking,!0),n.addEventListener("seeked",s.seeked,!0),this},changeSource:function(t,e,i,n,r){void 0===e&&(e=!0),this.video&&this.stop();var s=this.scene.sys.cache.video.get(t);return s?(this.video=s,this._cacheKey=t,this._codePaused=s.paused,this._codeMuted=s.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,s,s.videoWidth,s.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,s.videoWidth,s.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,s.videoWidth,s.videoHeight)):this.updateTexture(),s.currentTime=0,this._lastUpdate=0,e&&this.play(i,n,r)):this.video=null,this},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)},snapshotArea:function(t,e,i,n,r,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),void 0===r&&(r=i),void 0===s&&(s=n);var o=this.video,a=this.snapshotTexture;return a?(a.setSize(r,s),o&&a.context.drawImage(o,t,e,i,n,0,0,r,s)):(a=this.scene.sys.textures.createCanvas(c(),r,s),this.snapshotTexture=a,o&&a.context.drawImage(o,t,e,i,n,0,0,r,s)),a.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},loadURL:function(t,e,i){void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");return n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),n.addEventListener("error",this._callbacks.error,!0),n.src=t,n.load(),this.video=n,this},loadMediaStream:function(t,e,i){void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),n.addEventListener("error",this._callbacks.error,!0);try{n.srcObject=t}catch(r){n.src=window.URL.createObjectURL(t)}return n.load(),this.video=n,this},playPromiseSuccessHandler:function(){this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(t){this.scene.sys.input.once(h.POINTER_DOWN,this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(o.VIDEO_ERROR,this,t)},playHandler:function(){this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadErrorHandler:function(t){this.stop(),this.emit(o.VIDEO_ERROR,this,t)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(o.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.video.play(),this.emit
824(o.VIDEO_PLAY,this)},completeHandler:function(){this.emit(o.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime<this._lastUpdate&&(this.emit(o.VIDEO_LOOP,this),this._lastUpdate=0)},preUpdate:function(){var t=this.video;if(t){var e=t.currentTime;e!==this._lastUpdate&&(this._lastUpdate=e,this.updateTexture(),e>=this._markerOut&&(t.loop?(t.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=e,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))}},checkVideoProgress:function(){this.video.readyState>=2?this.updateTexture():(this.retry--,this.retry>0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(o.VIDEO_TIMEOUT,this))},updateTexture:function(){var t=this.video,e=t.videoWidth,i=t.videoHeight;if(this.videoTexture){var n=this.videoTextureSource;n.source!==t&&(n.source=t,n.width=e,n.height=i),n.update()}else this.videoTexture=this.scene.sys.textures.create(this._key,t,e,i),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,e,i),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,e,i)},getVideoKey:function(){return this._cacheKey},seekTo:function(t){var e=this.video;if(e){var i=e.duration;if(i!==1/0&&!isNaN(i)){var n=i*t;this.setCurrentTime(n)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],n=parseFloat(t.substr(1));"+"===i?t=e.currentTime+n:"-"===i&&(t=e.currentTime-n)}e.currentTime=t,this._lastUpdate=t}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(o.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var t=this.video;if(t){var e=t.currentTime,i=t.duration;if(i!==1/0&&!isNaN(i))return e/i}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;
824i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.video.play()},setPaused:function(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&(t?e.paused||e.pause():t||e.paused&&!this._systemPaused&&e.play()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=r(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,t),this._key=t,this.flipY=e,this.videoTextureSource&&this.videoTextureSource.setFlipY(e),this.videoTexture},stop:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i],!0);t.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(o.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var t=this.scene.sys.game.events;t.off(a.PAUSE,this.globalPause,this),t.off(a.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(l.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});t.exports=p},function(t,e,i){ 825/** 826 * @author Richard Davey <[email protected]> 827 * @copyright 2020 Photon Storm Ltd. 828 * @license {@link https://opensource.org/licenses/MIT|MIT License} 829 */ 830var n=i(0),r=i(225),s=i(464),o=i(55),a=new n({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return r(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n<t.length;n++)e={x:0,y:0},"number"==typeof t[n]||"string"==typeof t[n]?(e.x=parseFloat(t[n]),e.y=parseFloat(t[n+1]),n++):Array.isArray(t[n])?(e.x=t[n][0],e.y=t[n][1]):(e.x=t[n].x,e.y=t[n].y),this.points.push(e),e.y<i&&(i=e.y);return this.calculateArea(i),this},calculateArea:function(){if(this.points.length<3)return this.area=0,this.area;for(var t,e,i=0,n=0;n<this.points.length-1;n++)t=this.points[n],i+=((e=this.points[n+1]).x-t.x)*(t.y+e.y);return t=this.points[0],e=this.points[this.points.length-1],i+=(t.x-e.x)*(e.y+t.y),this.area=.5*-i,this.area},getPoints:function(t,e,i){return s(this,t,e,i)}});t.exports=a},function(t,e){t.exports=function(t,e,i){for(var n=!1,r=-1,s=t.points.length-1;++r<t.points.length;s=r){var o=t.points[r].x,a=t.points[r].y,h=t.points[s].x,u=t.points[s].y;(a<=i&&i<u||u<=i&&i<a)&&e<(h-o)*(i-a)/(u-a)+o&&(n=!n)}return n}},function(t,e,i){ 831/** 832 * @author Richard Davey <[email protected]> 833 * @copyright 2020 Photon Storm Ltd. 834 * @license {@link https://opensource.org/licenses/MIT|MIT License} 835 */ 836var n=i(0),r=i(11),s=i(15),o=i(2),a=i(17),h=i(472),u=i(1170),l=i(25),c=new n({Extends:s,Mixins:[r.ComputedSize,r.Depth,r.GetBounds,r.Mask,r.Origin,r.ScrollFactor,r.Transform,r.Visible,u],initialize:function(t,e,i,n,r,o,a,h){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=128),void 0===o&&(o=128),s.call(this,t,"Shader"),this.blendMode=-1,this.shader;var u=t.sys.renderer;this.renderer=u,this.gl=u.gl,this.vertexData=new ArrayBuffer(2*Float32Array.BYTES_PER_ELEMENT*6),this.vertexBuffer=u.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=u.width,this._rendererHeight=u.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(i,n),this.setSize(r,o),this.setOrigin(.5,.5),this.setShader(e,a,h)},willRender:function(t){return!!this.renderToTexture||!(s.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setRenderToTexture:function(t,e){if(void 0===e&&(e=!1),!this.renderToTexture){var i=this.width,n=this.height,r=this.renderer;this.glTexture=r.createTextureFromSource(null,i,n,0),this.glTexture.flipY=e,this.framebuffer=r.createFramebuffer(i,n,this.glTexture,!1),this._rendererWidth=i,this._rendererHeight=n,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),t&&(this.texture=this.scene.sys.textures.addGLTexture(t,this.glTexture,i,n))}return this.shader&&(r.pipelines.clear(),this.load(),this.flush(),r.pipelines.rebind()),this}
836,setShader:function(t,e,i){if(void 0===e&&(e=[]),"string"==typeof t){var n=this.scene.sys.cache.shader;if(!n.has(t))return console.warn("Shader missing: "+t),this;this.shader=n.get(t)}else this.shader=t;var r=this.gl,s=this.renderer;this.program&&r.deleteProgram(this.program);var o=s.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);r.uniformMatrix4fv(r.getUniformLocation(o,"uViewMatrix"),!1,this.viewMatrix),r.uniformMatrix4fv(r.getUniformLocation(o,"uProjectionMatrix"),!1,this.projectionMatrix),r.uniform2f(r.getUniformLocation(o,"uResolution"),this.width,this.height),this.program=o;var h=new Date,u={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[h.getFullYear(),h.getMonth(),h.getDate(),60*h.getHours()*60+60*h.getMinutes()+h.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=a(!0,{},this.shader.uniforms,u):this.uniforms=u;for(var l=0;l<4;l++)e[l]&&this.setSampler2D("iChannel"+l,e[l],l,i);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(t){return this.pointer=t,this},projOrtho:function(t,e,i,n){var r=1/(t-e),s=1/(i-n),o=this.projectionMatrix;o[0]=-2*r,o[5]=-2*s,o[10]=-.001,o[12]=(t+e)*r,o[13]=(n+i)*s,o[14]=-0;var a=this.program,h=this.gl;this.renderer.setProgram(a),h.uniformMatrix4fv(h.getUniformLocation(a,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=e,this._rendererHeight=i},initUniforms:function(){var t=this.gl,e=this.renderer.glFuncMap,i=this.program;for(var n in this._textureCount=0,this.uniforms){var r=this.uniforms[n],s=r.type,o=e[s];r.uniformLocation=t.getUniformLocation(i,n),"sampler2D"!==s&&(r.glMatrix=o.matrix,r.glValueLength=o.length,r.glFunc=o.func)}},setSampler2DBuffer:function(t,e,i,n,r,s){void 0===r&&(r=0),void 0===s&&(s={});var o=this.uniforms[t];return o.value=e,s.width=i,s.height=n,o.textureData=s,this._textureCount=r,this.initSampler2D(o),this},setSampler2D:function(t,e,i,n){void 0===i&&(i=0);var r=this.scene.sys.textures;if(r.exists(e)){var s=r.getFrame(e);if(s.glTexture&&s.glTexture.isRenderTexture)return this.setSampler2DBuffer(t,s.glTexture,s.width,s.height,i,n);var o=this.uniforms[t],a=s.source;o.textureKey=e,o.source=a.image,o.value=s.glTexture,a.isGLTexture&&(n||(n={}),n.width=a.width,n.height=a.height),n&&(o.textureData=n),this._textureCount=i,this.initSampler2D(o)}return this},setUniform:function(t,e){return h(this.uniforms,t,e),this},getUniform:function(t){return o(this.uniforms,t,null)},setChannel0:function(t,e){return this.setSampler2D("iChannel0",t,0,e)},setChannel1:function(t,e){return this.setSampler2D("iChannel1",t,1,e)},setChannel2:function(t,e){return this.setSampler2D("iChannel2",t,2,e)},setChannel3:function(t,e){return this.setSampler2D("iChannel3",t,3,e)},initSampler2D:function(t){if(t.value){var e=this.gl;e.activeTexture(e.TEXTURE0+this._textureCount),e.bindTexture(e.TEXTURE_2D,t.value);var i=t.textureData;if(i&&!t.value.isRenderTexture){var n=e[o(i,"magFilter","linear").toUpperCase()],r=e[o(i,"minFilter","linear").toUpperCase()],s=e[o(i,"wrapS","repeat").toUpperCase()],a=e[o(i,"wrapT","repeat").toUpperCase()],h=e[o(i,"format","rgba").toUpperCase()];if(i.repeat&&(s=e.REPEAT,a=e.REPEAT),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!!i.flipY),i.width){var u=o(i,"width",512),l=o(i,"height",2),c=o(i,"border",0);e.texImage2D(e.TEXTURE_2D,0,h,u,l,c,h,e.UNSIGNED_BYTE,null)}else e.texImage2D(e.TEXTURE_2D,0,h,e.RGBA,e.UNSIGNED_BYTE,t.source);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,s),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,a)}this.renderer.setProgram(this.program),e.uniform1i(t.uniformLocation,this._textureCount),this._textureCount++}},syncUniforms:function(){var t,e,i,n,r,s=this.gl,o=this.uniforms,a=0;for(var h in o)i=(t=o[h]).glFunc,e=t.glValueLength,n=t.uniformLocation,null!==(r=t.value)&&(1===e?t.glMatrix?i.call(s,n,t.transpose,r):i.call(s,n,r):2===e?i.call(s,n,r.x,r.y):3===e?i.call(s,n,r.x,r.y,r.z):4===e?i.call(s,n,r.x,r.y,r.z,r.w):"sampler2D"===t.type&&(s.activeTexture(s.TEXTURE0+a),s.bindTexture(s.TEXTURE_2D,r),s.uniform1i(n,a),a++))},load:function(t){var e=this.gl,i=this.width,n=this.height,r=this.renderer,s=this.program,o=this.viewMatrix;if(!this.renderToTexture){var a=-this._displayOriginX,h=-this._displayOriginY;o[0]=t[0],o[1]=t[1],o[4]=t[2],o[5]=t[3],o[8]=t[4],o[9]=t[5],o[12]=o[0]*a+o[4]*h,o[13]=o[1]*a+o[5]*h}e.useProgram(s),e.uniformMatrix4fv(e.getUniformLocation(s,"uViewMatrix"),!1,o),e.uniform2f(e.getUniformLocation(s,"uResolution"),this.width,this.height);var u=this.uniforms,l=u.resolution;l.value.x=i,l.value.y=n,u.time.value=r.game.loop.getDuration();var c=this.pointer;if(c){var f=u.mouse,d=c.x/i,p=1-c.y/n;f.value.x=d.toFixed(2),f.value.y=p.toFixed(2)}this.syncUniforms()},flush:function(){var t=this.width,e=this.height,i=this.program,n=this.gl,r=this.vertexBuffer,s=this.renderer,o=2*Float32Array.BYTES_PER_ELEMENT;this.renderToTexture&&(s.setFramebuffer(this.framebuffer),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT)),n.bindBuffer(n.ARRAY_BUFFER,r);var a=n.getAttribLocation(i,"inPosition");-1!==a&&(n.enableVertexAttribArray(a),n.vertexAttribPointer(a,2,n.FLOAT,!1,o,0));var h=this.vertexViewF32;h[3]=e,h[4]=t,h[5]=e,h[8]=t,h[9]=e,h[10]=t,n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,6*o)),n.drawArrays(n.TRIANGLES,0,6),this.renderToTexture&&s.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},preDestroy:function(){var t=this.gl;t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(this.renderer.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null)}});t.exports=c}
836,function(t,e,i){ 837/** 838 * @author Richard Davey <[email protected]> 839 * @copyright 2020 Photon Storm Ltd. 840 * @license {@link https://opensource.org/licenses/MIT|MIT License} 841 */ 842var n=i(0),r=i(11),s=i(35),o=i(113),a=i(15),h=i(473),u=i(474),l=i(19),c=i(67),f=i(1173),d=i(79),p=i(38),v=i(115),g=new n({Extends:a,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.Size,r.Texture,r.Transform,r.Visible,r.ScrollFactor,f],initialize:function(t,e,i,n,r,s,o,h,u,l,f,d){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n="__WHITE"),a.call(this,t,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new p,this.modelScale=new p(1,1,1),this.modelRotation=new p,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new c,this.viewPosition=new p,this.viewMatrix=new c,this.projectionMatrix=new c,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1;var v=t.sys.renderer;this.setPosition(e,i),this.setTexture(n,r),this.setSize(v.width,v.height),this.initPipeline(),this.setPerspective(v.width,v.height),s&&this.addVertices(s,o,h,u,l,f,d)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(t){return this.viewPosition.addScale(p.LEFT,t),this.dirtyCache[10]=1,this},panY:function(t){return this.viewPosition.y+=p.DOWN.y*t,this.dirtyCache[10]=1,this},panZ:function(t){return this.viewPosition.z+=t,this.dirtyCache[10]=1,this},setPerspective:function(t,e,i,n,r){return void 0===i&&(i=45),void 0===n&&(n=.01),void 0===r&&(r=1e3),this.projectionMatrix.perspective(s(i),t/e,n,r),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(t,e,i,n){return void 0===t&&(t=this.scene.sys.renderer.getAspectRatio()),void 0===e&&(e=1),void 0===i&&(i=-1e3),void 0===n&&(n=1e3),this.projectionMatrix.ortho(-t,t,-e,e,i,n),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach((function(t){t.destroy()})),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(t,e,i,n,r,s,o,a,h){var l=this.scene.sys.cache.obj.get(t);return l&&u(l,this,e,i,n,r,s,o,a,h),this},sortByDepth:function(t,e){return t.depth-e.depth},depthSort:function(){return d(this.faces,this.sortByDepth),this},addVertex:function(t,e,i,n,r,s,o){var a=new v(t,e,i,n,r,s,o);return this.vertices.push(a),a},addFace:function(t,e,i){var n=new o(t,e,i);return this.faces.push(n),this.dirtyCache[9]=-1,n},addVertices:function(t,e,i,n,r,s,o){var a=h(t,e,i,n,r,s,o);return a&&(this.faces=this.faces.concat(a.faces),this.vertices=this.vertices.concat(a.vertices)),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(t){return this.faces[t]},getFaceAt:function(t,e,i){void 0===i&&(i=this.scene.sys.cameras.main);for(var n=l(this,i).calc,r=this.faces,s=[],o=0;o<r.length;o++){var a=r[o];a.contains(t,e,n)&&s.push(a)}return d(s,this.sortByDepth)},setDebug:function(t,e){return this.debugGraphic=t,this.debugCallback=t||e?e||this.renderDebug:null,this},isDirty:function(){var t=this.modelPosition,e=this.modelRotation,i=this.modelScale,n=this.dirtyCache,r=t.x,s=t.y,o=t.z,a=e.x,h=e.y,u=e.z,l=i.x,c=i.y,f=i.z,d=this.getFaceCount(),p=n[0],v=n[1],g=n[2],m=n[3],y=n[4],x=n[5],w=n[6],_=n[7],b=n[8],T=n[9];return n[0]=r,n[1]=s,n[2]=o,n[3]=a,n[4]=h,n[5]=u,n[6]=l,n[7]=c,n[8]=f,n[9]=d,p!==r||v!==s||g!==o||m!==a||y!==h||x!==u||w!==l||_!==c||b!==f||T!==d},preUpdate:function(){this.totalRendered=this.totalFrame,this.totalFrame=0;var t=this.dirtyCache;if(this.ignoreDirtyCache||t[10]||this.isDirty()){var e=this.width,i=this.height,n=this.viewMatrix,r=this.viewPosition;t[10]&&(n.identity(),n.translate(r),n.invert(),t[10]=0);var s=this.transformMatrix;s.setWorldMatrix(this.modelRotation,this.modelPosition,this.modelScale,this.viewMatrix,this.projectionMatrix);for(var o=r.z,a=this.faces,h=0;h<a.length;h++)a[h].transformCoordinatesLocal(s,e,i,o);this.depthSort()}},renderDebug:function(t,e){for(var i=t.debugGraphic,n=0;n<e.length;n++){var r=e[n],s=r.vertex1.tx,o=r.vertex1.ty,a=r.vertex2.tx,h=r.vertex2.ty,u=r.vertex3.tx,l=r.vertex3.ty;i.strokeTriangle(s,o,a,h,u,l)}},preDestroy:function(){this.clear(),this.debugCallback=null,this.debugGraphic=null}});t.exports=g}
vendor: 4,288 bytes, lines 842-886
842,function(t,e,i){ 843/** 844 * @author Richard Davey <[email protected]> 845 * @copyright 2020 Photon Storm Ltd. 846 * @license {@link https://opensource.org/licenses/MIT|MIT License} 847 */ 848var n=i(48);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e,i){ 849/** 850 * @author Florian Vazelle 851 * @author Geoffrey Glaive 852 * @copyright 2020 Photon Storm Ltd. 853 * @license {@link https://opensource.org/licenses/MIT|MIT License} 854 */ 855var n=i(4),r=i(230);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e)){var s,o,a=t.x1,h=t.y1,u=t.x2,l=t.y2,c=e.x,f=e.y,d=e.radius,p=u-a,v=l-h,g=a-c,m=h-f,y=p*p+v*v,x=2*(p*g+v*m),w=x*x-4*y*(g*g+m*m-d*d);if(0===w){var _=-x/(2*y);s=a+_*p,o=h+_*v,_>=0&&_<=1&&i.push(new n(s,o))}else if(w>0){var b=(-x-Math.sqrt(w))/(2*y);s=a+b*p,o=h+b*v,b>=0&&b<=1&&i.push(new n(s,o));var T=(-x+Math.sqrt(w))/(2*y);s=a+T*p,o=h+T*v,T>=0&&T<=1&&i.push(new n(s,o))}}return i}},function(t,e,i){ 856/** 857 * @author Richard Davey <[email protected]> 858 * @copyright 2020 Photon Storm Ltd. 859 * @license {@link https://opensource.org/licenses/MIT|MIT License} 860 */ 861var n=i(63),r=new(i(4));t.exports=function(t,e,i){if(void 0===i&&(i=r),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var s=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,u=s*s+o*o,l=s,c=o;if(u>0){var f=(a*s+h*o)/u;l*=f,c*=f}return i.x=t.x1+l,i.y=t.y1+c,l*l+c*c<=u&&l*s+c*o>=0&&n(e,i.x,i.y)}},function(t,e,i){ 862/** 863 * @author Florian Vazelle 864 * @author Geoffrey Glaive 865 * @copyright 2020 Photon Storm Ltd. 866 * @license {@link https://opensource.org/licenses/MIT|MIT License} 867 */ 868var n=i(4),r=i(92),s=i(482);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e))for(var o=e.getLineA(),a=e.getLineB(),h=e.getLineC(),u=e.getLineD(),l=[new n,new n,new n,new n],c=[r(o,t,l[0]),r(a,t,l[1]),r(h,t,l[2]),r(u,t,l[3])],f=0;f<4;f++)c[f]&&i.push(l[f]);return i}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var r,s,o,a,h,u,l=t.x3-t.x1,c=t.y3-t.y1,f=t.x2-t.x1,d=t.y2-t.y1,p=l*l+c*c,v=l*f+c*d,g=f*f+d*d,m=p*g-v*v,y=0===m?0:1/m,x=t.x1,w=t.y1,_=0;_<e.length&&(s=(p*(u=f*(o=e[_].x-x)+d*(a=e[_].y-w))-v*(h=l*o+c*a))*y,!((r=(g*h-v*u)*y)>=0&&s>=0&&r+s<1&&(n.push({x:e[_].x,y:e[_].y}),i)));_++);return n}},function(t,e){t.exports=function(t,e,i,n){var r=Math.cos(n),s=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*r-a*s+e,t.y1=o*s+a*r+i,o=t.x2-e,a=t.y2-i,t.x2=o*r-a*s+e,t.y2=o*s+a*r+i,t}},function(t,e){t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},function(t,e){t.exports=function(t,e,i,n){var r=Math.cos(n),s=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*r-a*s+e,t.y1=o*s+a*r+i,o=t.x2-e,a=t.y2-i,t.x2=o*r-a*s+e,t.y2=o*s+a*r+i,o=t.x3-e,a=t.y3-i,t.x3=o*r-a*s+e,t.y3=o*s+a*r+i,t}},function(t,e,i){ 869/** 870 * @author Richard Davey <[email protected]> 871 * @copyright 2020 Photon Storm Ltd. 872 * @license {@link https://opensource.org/licenses/MIT|MIT License} 873 */ 874t.exports={BUTTON_DOWN:i(1304),BUTTON_UP:i(1305),CONNECTED:i(1306),DISCONNECTED:i(1307),GAMEPAD_BUTTON_DOWN:i(1308),GAMEPAD_BUTTON_UP:i(1309)}},function(t,e,i){ 875/** 876 * @author Richard Davey <[email protected]> 877 * @copyright 2020 Photon Storm Ltd. 878 * @license {@link https://opensource.org/licenses/MIT|MIT License} 879 */ 880var n=i(17),r=i(154);t.exports=function(t,e){var i=void 0===t?r():n({},t);if(e)for(var s in e)void 0!==e[s]&&(i[s]=e[s]);return i}},function(t,e,i){ 881/** 882 * @author Richard Davey <[email protected]> 883 * @copyright 2020 Photon Storm Ltd. 884 * @license {@link https://opensource.org/licenses/MIT|MIT License} 885 */ 886var n=i(0),r=i(20),s=i(23),o=i(8),a=i(2),h=i(7),u=i(402),l=new n({Extends:s,initialize:function(t,e,i,n){var r="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),r=a(o,"extension",r)}var u={type:"xml",cache:t.cacheManager.xml,extension:r,responseType:"text",key:e,url:i,xhrSettings:n};s.call(this,t,u)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=u(this.xhrLo
886ader.responseText),this.data?this.onProcessComplete():(console.warn("Invalid XMLFile: "+this.key),this.onProcessError())}});o.register("xml",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new l(this,t[n]));else this.addFile(new l(this,t,e,i));return this})),t.exports=l},function(t,e,i){ 887/** 888 * @author Richard Davey <[email protected]> 889 * @copyright 2020 Photon Storm Ltd. 890 * @license {@link https://opensource.org/licenses/MIT|MIT License} 891 */ 892var n=i(0),r=i(20),s=i(23),o=i(8),a=i(2),h=i(7),u=new n({Extends:s,initialize:function(t,e,i,n){var r="text",o="txt",u=t.cacheManager.text;if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),n=a(l,"xhrSettings"),o=a(l,"extension",o),r=a(l,"type",r),u=a(l,"cache",u)}var c={type:r,cache:u,extension:o,responseType:"text",key:e,url:i,xhrSettings:n};s.call(this,t,c)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("text",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new u(this,t[n]));else this.addFile(new u(this,t,e,i));return this})),t.exports=u},function(t,e,i){ 893/** 894 * @author Richard Davey <[email protected]> 895 * @copyright 2020 Photon Storm Ltd. 896 * @license {@link https://opensource.org/licenses/MIT|MIT License} 897 */ 898t.exports={Acceleration:i(1362),Angular:i(1363),Bounce:i(1364),Debug:i(1365),Drag:i(1366),Enable:i(1367),Friction:i(1368),Gravity:i(1369),Immovable:i(1370),Mass:i(1371),OverlapCirc:i(517),OverlapRect:i(241),Pushable:i(1372),Size:i(1373),Velocity:i(1374)}},function(t,e){t.exports=function(t,e,i,n,r,s,o){void 0===s&&(s=!0),void 0===o&&(o=!1);var a=[],h=[],u=t.treeMinMax;if(u.minX=e,u.minY=i,u.maxX=e+n,u.maxY=i+r,o&&(h=t.staticTree.search(u)),s&&t.useTree)a=t.tree.search(u);else if(s){var l=t.bodies,c={position:{x:e,y:i},left:e,top:i,right:e+n,bottom:i+r,isCircle:!1},f=t.intersects;l.iterate((function(t){f(t,c)&&a.push(t)}))}return h.concat(a)}},function(t,e,i){ 899/** 900 * @author Richard Davey <[email protected]> 901 * @copyright 2020 Photon Storm Ltd. 902 * @license {@link https://opensource.org/licenses/MIT|MIT License} 903 */ 904t.exports={COLLIDE:i(1375),OVERLAP:i(1376),PAUSE:i(1377),RESUME:i(1378),TILE_COLLIDE:i(1379),TILE_OVERLAP:i(1380),WORLD_BOUNDS:i(138
vendor: 5,756 bytes, lines 904-916
9041),WORLD_STEP:i(1382)}},function(t,e,i){ 905/** 906 * @author Richard Davey <[email protected]> 907 * @copyright 2020 Photon Storm Ltd. 908 * @license {@link https://opensource.org/licenses/MIT|MIT License} 909 */ 910var n=i(60);t.exports=function(t,e,i,r){var s=0,o=t.deltaAbsX()+e.deltaAbsX()+r;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(s=t.right-e.x)>o&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.right=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.left=!0)):t._dx<e._dx&&(-(s=t.x-e.width-e.x)>o&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?s=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.left=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=s,e.overlapX=s,s}},function(t,e,i){ 911/** 912 * @author Richard Davey <[email protected]> 913 * @copyright 2020 Photon Storm Ltd. 914 * @license {@link https://opensource.org/licenses/MIT|MIT License} 915 */ 916var n=i(60);t.exports=function(t,e,i,r){var s=0,o=t.deltaAbsY()+e.deltaAbsY()+r;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(s=t.bottom-e.y)>o&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.down=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.up=!0)):t._dy<e._dy&&(-(s=t.y-e.bottom)>o&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?s=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.up=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=s,e.overlapY=s,s}},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n={};t.exports=n;var r=i(94),s=i(116),o=i(267),a=i(117),h=i(585),u=i(50);n._warming=.4,n._torqueDampen=1,n._minLength=1e-6,n.create=function(t){var e=t;e.bodyA&&!e.pointA&&(e.pointA={x:0,y:0}),e.bodyB&&!e.pointB&&(e.pointB={x:0,y:0});var i=e.bodyA?s.add(e.bodyA.position,e.pointA):e.pointA,n=e.bodyB?s.add(e.bodyB.position,e.pointB):e.pointB,r=s.magnitude(s.sub(i,n));e.length=void 0!==e.length?e.length:r,e.id=e.id||u.nextId(),e.label=e.label||"Constraint",e.type="constraint",e.stiffness=e.stiffness||(e.length>0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=u.extend(o,e.render),e},n.preSolveAll=function(t){for(var e=0;e<t.length;e+=1){var i=t[e],n=i.constraintImpulse;i.isStatic||0===n.x&&0===n.y&&0===n.angle||(i.position.x+=n.x,i.position.y+=n.y,i.angle+=n.angle)}},n.solveAll=function(t,e){for(var i=0;i<t.length;i+=1){var r=t[i],s=!r.bodyA||r.bodyA&&r.bodyA.isStatic,o=!r.bodyB||r.bodyB&&r.bodyB.isStatic;(s||o)&&n.solve(t[i],e)}for(i=0;i<t.length;i+=1)s=!(r=t[i]).bodyA||r.bodyA&&r.bodyA.isStatic,o=!r.bodyB||r.bodyB&&r.bodyB.isStatic,s||o||n.solve(t[i],e)},n.solve=function(t,e){var i=t.bodyA,r=t.bodyB,o=t.pointA,a=t.pointB;if(i||r){i&&!i.isStatic&&(s.rotate(o,i.angle-t.angleA,o),t.angleA=i.angle),r&&!r.isStatic&&(s.rotate(a,r.angle-t.angleB,a),t.angleB=r.angle);var h=o,u=a;if(i&&(h=s.add(i.position,o)),r&&(u=s.add(r.position,a)),h&&u){var l=s.sub(h,u),c=s.magnitude(l);c<n._minLength&&(c=n._minLength);var f,d,p,v,g,m=(c-t.length)/c,y=t.stiffness<1?t.stiffness*e:t.stiffness,x=s.mult(l,m*y),w=(i?i.inverseMass:0)+(r?r.inverseMass:0),_=w+((i?i.inverseInertia:0)+(r?r.inverseInertia:0));if(t.damping){var b=s.create();p=s.div(l,c),g=s.sub(r&&s.sub(r.position,r.positionPrev)||b,i&&s.sub(i.position,i.positionPrev)||b),v=s.dot(p,g)}i&&!i.isStatic&&(d=i.inverseMass/w,i.constraintImpulse.x-=x.x*d,i.constraintImpulse.y-=x.y*d,i.position.x-=x.x*d,i.position.y-=x.y*d,t.damping&&(i.positionPrev.x-=t.damping*p.x*v*d,i.positionPrev.y-=t.damping*p.y*v*d),f=s.cross(o,x)/_*n._torqueDampen*i.inverseInertia*(1-t.angularStiffness),i.constraintImpulse.angle-=f,i.angle-=f),r&&!r.isStatic&&(d=r.inverseMass/w,r.constraintImpulse.x+=x.x*d,r.constraintImpulse.y+=x.y*d,r.position.x+=x.x*d,r.position.y+=x.y*d,t.damping&&(r.positionPrev.x+=t.damping*p.x*v*d,r.positionPrev.y+=t.damping*p.y*v*d),f=s.cross(a,x)/_*n._torqueDampen*r.inverseInertia*(1-t.angularStiffness),r.constraintImpulse.angle+=f,r.angle+=f)}}},n.postSolveAll=function(t){for(var e=0;e<t.length;e++){var i=t[e],u=i.constraintImpulse;if(!(i.isStatic||0===u.x&&0===u.y&&0===u.angle)){o.set(i,!1);for(var l=0;l<i.parts.length;l++){var c=i.parts[l];r.translate(c.vertices,u),l>0&&(c.position.x+=u.x,c.position.y+=u.y),0!==u.angle&&(r.rotate(c.vertices,u.angle,i.position),h.rotate(c.axes,u.angle),l>0&&s.rotateAbout(c.position,u.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}u.angle*=n._warming,u.x*=n._warming,u.y*=n._warming}}},n.pointAWorld=function(t){return{x:(t.bodyA?t.bodyA.position.x:0)+t.pointA.x,y:(t.bodyA?t.bodyA.position.y:0)+t.pointA.y}},n.pointBWorld=function(t){return{x:(t.bodyB?t.bodyB.position.x:0)+t.pointB.x,y:(t.bodyB?t.bodyB.position.y:0)+t.pointB.y}}}
916,function(t,e,i){ 917/** 918 * @author Richard Davey <[email protected]> 919 * @copyright 2020 Photon Storm Ltd. 920 * @license {@link https://opensource.org/licenses/MIT|MIT License} 921 */ 922t.exports={CalculateFacesAt:i(248),CalculateFacesWithin:i(61),CheckIsoBounds:i(537),Copy:i(1414),CreateFromTiles:i(1415),CullBounds:i(539),CullTiles:i(540),Fill:i(1416),FilterTiles:i(1417),FindByIndex:i(1418),FindTile:i(1419),ForEachTile:i(1420),GetCullTilesFunction:i(1421),GetTileAt:i(156),GetTileAtWorldXY:i(1422),GetTilesWithin:i(26),GetTilesWithinShape:i(1423),GetTilesWithinWorldXY:i(523),GetTileToWorldXFunction:i(1424),GetTileToWorldXYFunction:i(1425),GetTileToWorldYFunction:i(1426),GetWorldToTileXFunction:i(1427),GetWorldToTileXYFunction:i(1428),GetWorldToTileYFunction:i(1429),HasTileAt:i(558),HasTileAtWorldXY:i(1430),HexagonalCullBounds:i(542),HexagonalCullTiles:i(541),HexagonalTileToWorldXY:i(546),HexagonalTileToWorldY:i(550),HexagonalWorldToTileXY:i(552),HexagonalWorldToTileY:i(556),IsInLayerBounds:i(118),IsometricCullTiles:i(543),IsometricTileToWorldXY:i(547),IsometricWorldToTileXY:i(553),PutTileAt:i(253),PutTileAtWorldXY:i(1431),PutTilesAt:i(1432),Randomize:i(1433),RemoveTileAt:i(559),RemoveTileAtWorldXY:i(1434),RenderDebug:i(1435),ReplaceByIndex:i(538),RunCull:i(157),SetCollision:i(1436),SetCollisionBetween:i(1437),SetCollisionByExclusion:i(1438),SetCollisionByProperty:i(1439),SetCollisionFromCollisionGroup:i(1440),SetLayerCollisionIndex:i(158),SetTileCollision:i(72),SetTileIndexCallback:i(1441),SetTileLocationCallback:i(1442),Shuffle:i(1443),StaggeredCullBounds:i(545),StaggeredCullTiles:i(544),StaggeredTileToWorldXY:i(548),StaggeredTileToWorldY:i(551),StaggeredWorldToTileXY:i(554),StaggeredWorldToTileY:i(557),SwapByIndex:i(1444),TileToWorldX:i(249),TileToWorldXY:i(549),TileToWorldY:i(250),WeightedRandomize:i(1445),WorldToTileX:i(251),WorldToTileXY:i(555),WorldToTileY:i(252)}},function(t,e,i){ 923/** 924 * @author Richard Davey <[email protected]> 925 * @copyright 2020 Photon Storm Ltd. 926 * @license {@link https://opensource.org/licenses/MIT|MIT License} 927 */ 928var n=i(156);t.exports=function(t,e,i){var r=n(t,e,!0,i),s=n(t,e-1,!0,i),o=n(t,e+1,!0,i),a=n(t-1,e,!0,i),h=n(t+1,e,!0,i),u=r&&r.collides;return u&&(r.faceTop=!0,r.faceBottom=!0,r.faceLeft=!0,r.faceRight=!0),s&&s.collides&&(u&&(r.faceTop=!1),s.faceBottom=!u),o&&o.collides&&(u&&(r.faceBottom=!1),o.faceTop=!u),a&&a.collides&&(u&&(r.faceLeft=!1),a.faceRight=!u),h&&h.collides&&(u&&(r.faceRight=!1),h.faceLeft=!u),r&&!r.collides&&r.resetFaces(),r}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,r=i.tilemapLayer,s=0;return r&&(e||(e=r.scene.cameras.main),s=r.x+e.scrollX*(1-r.scrollFactorX),n*=r.scaleX),s+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,r=i.tilemapLayer,s=0;return r&&(e||(e=r.scene.cameras.main),s=r.y+e.scrollY*(1-r.scrollFactorY),n*=r.scaleY),s+t*n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=!0);var r=n.baseTileWidth,s=n.tilemapLayer;return s&&(i||(i=s.scene.cameras.main),t-=s.x+i.scrollX*(1-s.scrollFactorX),r*=s.scaleX),e?Math.floor(t/r):t/r}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=!0);var r=n.baseTileHeight,s=n.tilemapLayer;return s&&(i||(i=s.scene.cameras.main),t-=s.y+i.scrollY*(1-s.scrollFactorY),r*=s.scaleY),e?Math.floor(t/r):t/r}},function(t,e,i){ 929/** 930 * @author Richard Davey <[email protected]> 931 * @copyright 2020 Photon Storm Ltd. 932 * @license {@link https://opensource.org/licenses/MIT|MIT License} 933 */ 934var n=i(83),r=i(118),s=i(248),o=i(72);t.exports=function(t,e,i,a,h){if(void 0===a&&(a=!0),!r(e,i,h))return null;var u=h.data[i][e],l=u&&u.collides;if(t instanceof n)null===h.data[i][e]&&(h.data[i][e]=new n(h,t.index,e,i,h.tileWidth,h.tileHeight)),h.data[i][e].copy(t);else{var c=t;null===h.data[i][e]?h.data[i][e]=new n(h,c,e,i,h.tileWidth,h.tileHeight):h.data[i][e].index=c}var f=h.data[i][e],d=-1!==h.collideIndexes.indexOf(f.index);return o(f,d),a&&l!==f.collides&&s(e,i,h),f}}
vendor: 4,093 bytes, lines 934-976
934,function(t,e,i){ 935/** 936 * @author Richard Davey <[email protected]> 937 * @copyright 2020 Photon Storm Ltd. 938 * @license {@link https://opensource.org/licenses/MIT|MIT License} 939 */ 940var n=i(29);t.exports=function(t){return"isometric"===(t=t.toLowerCase())?n.ISOMETRIC:"staggered"===t?n.STAGGERED:"hexagonal"===t?n.HEXAGONAL:n.ORTHOGONAL}},function(t,e,i){ 941/** 942 * @author Richard Davey <[email protected]> 943 * @copyright 2020 Photon Storm Ltd. 944 * @license {@link https://opensource.org/licenses/MIT|MIT License} 945 */ 946var n=i(39),r=i(119),s=i(120),o=i(83);t.exports=function(t,e,i,a,h){for(var u=new r({tileWidth:i,tileHeight:a}),l=new s({name:t,tileWidth:i,tileHeight:a,format:n.ARRAY_2D,layers:[u]}),c=[],f=e.length,d=0,p=0;p<e.length;p++){c[p]=[];for(var v=e[p],g=0;g<v.length;g++){var m=parseInt(v[g],10);isNaN(m)||-1===m?c[p][g]=h?null:new o(u,-1,g,p,i,a):c[p][g]=new o(u,m,g,p,i,a)}0===d&&(d=v.length)}return l.width=u.width=d,l.height=u.height=f,l.widthInPixels=u.widthInPixels=d*i,l.heightInPixels=u.heightInPixels=f*a,u.data=c,l}},function(t,e,i){ 947/** 948 * @author Richard Davey <[email protected]> 949 * @copyright 2020 Photon Storm Ltd. 950 * @license {@link https://opensource.org/licenses/MIT|MIT License} 951 */ 952var n=i(567),r=i(257),s=function(t){return{x:t.x,y:t.y}},o=["id","name","type","rotation","properties","visible","x","y","width","height"];t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var a=n(t,o);if(a.x+=e,a.y+=i,t.gid){var h=r(t.gid);a.gid=h.gid,a.flippedHorizontal=h.flippedHorizontal,a.flippedVertical=h.flippedVertical,a.flippedAntiDiagonal=h.flippedAntiDiagonal}else t.polyline?a.polyline=t.polyline.map(s):t.polygon?a.polygon=t.polygon.map(s):t.ellipse?a.ellipse=t.ellipse:t.text?a.text=t.text:t.point?a.point=!0:a.rectangle=!0;return a}},function(t,e){ 953/** 954 * @author Richard Davey <[email protected]> 955 * @copyright 2020 Photon Storm Ltd. 956 * @license {@link https://opensource.org/licenses/MIT|MIT License} 957 */ 958var i=2147483648,n=1073741824,r=536870912;t.exports=function(t){var e=Boolean(t&i),s=Boolean(t&n),o=Boolean(t&r);t&=536870911;var a=0,h=!1;return e&&s&&o?(a=Math.PI/2,h=!0):e&&s&&!o?(a=Math.PI,h=!1):e&&!s&&o?(a=Math.PI/2,h=!1):!e||s||o?!e&&s&&o?(a=3*Math.PI/2,h=!1):e||!s||o?e||s||!o?e||s||o||(a=0,h=!1):(a=3*Math.PI/2,h=!0):(a=Math.PI,h=!0):(a=0,h=!0),{gid:t,flippedHorizontal:e,flippedVertical:s,flippedAntiDiagonal:o,rotation:a,flipped:h}}},function(t,e,i){ 959/** 960 * @author Richard Davey <[email protected]> 961 * @copyright 2020 Photon Storm Ltd. 962 * @license {@link https://opensource.org/licenses/MIT|MIT License} 963 */ 964var n=i(39),r=i(120),s=i(560),o=i(576);t.exports=function(t,e,i,a,h,u,l,c){void 0===i&&(i=32),void 0===a&&(a=32),void 0===h&&(h=10),void 0===u&&(u=10),void 0===c&&(c=!1);var f=null;if(Array.isArray(l))f=s(void 0!==e?e:"map",n.ARRAY_2D,l,i,a,c);else if(void 0!==e){var d=t.cache.tilemap.get(e);d?f=s(e,d.format,d.data,i,a,c):console.warn("No map data found for key "+e)}return null===f&&(f=new r({tileWidth:i,tileHeight:a,width:h,height:u})),new o(t,f)}},function(t,e,i){ 965/** 966 * @author Richard Davey <[email protected]> 967 * @copyright 2020 Photon Storm Ltd. 968 * @license {@link https://opensource.org/licenses/MIT|MIT License} 969 */ 970var n=i(6);t.exports=function(t){var e=n(t,"targets",null);return null===e||("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e])),e}},function(t,e){ 971/** 972 * @author Richard Davey <[email protected]> 973 * @copyright 2020 Photon Storm Ltd. 974 * @license {@link https://opensource.org/licenses/MIT|MIT License} 975 */ 976function i(t){return!!t.getActive&&"function"==typeof t.getActive}function n(t){return!!t.getStart&&"function"==typeof t.getStart}function r(t){return!!t.getEnd&&"function"==typeof t.getEnd}var s=function(t,e){var o,a,h=function(t,e,i){return i}
976,u=function(t,e,i){return i},l=null,c=typeof e;if("number"===c)h=function(){return e};else if("string"===c){var f=e[0],d=parseFloat(e.substr(2));switch(f){case"+":h=function(t,e,i){return i+d};break;case"-":h=function(t,e,i){return i-d};break;case"*":h=function(t,e,i){return i*d};break;case"/":h=function(t,e,i){return i/d};break;default:h=function(){return parseFloat(e)}}}else if("function"===c)h=e;else if("object"===c)if(n(a=e)||r(a)||i(a))i(e)&&(l=e.getActive),r(e)&&(h=e.getEnd),n(e)&&(u=e.getStart);else if(e.hasOwnProperty("value"))o=s(t,e.value);else{var p=e.hasOwnProperty("to"),v=e.hasOwnProperty("from"),g=e.hasOwnProperty("start");if(p&&(v||g)){if(o=s(t,e.to),g){var m=s(t,e.start);o.getActive=m.getEnd}if(v){var y=s(t,e.from);o.getStart=y.getEnd}}}return o||(o={getActive:l,getEnd:h,getStart:u}),o};t.exports=s},function(t,e){t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1}},function(t,e,i){ 977/** 978 * @author Richard Davey <[email protected]> 979 * @copyright 2020 Photon Storm Ltd. 980 * @license {@link https://opensource.org/licenses/MIT|MIT License} 981 */ 982var n=i(0),r=i(9),s=i(263),o=i(16),a=i(5),h=i(97),u=i(14),l=new n({Extends:r,initialize:function(t,e,i){r.call(this),this.parent=t,this.parentIsTimeline=t.hasOwnProperty("isTimeline"),this.data=e,this.totalData=e.length,this.targets=i,this.totalTargets=i.length,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.startDelay=0,this.hasStarted=!1,this.isSeeking=!1,this.completeDelay=0,this.countdown=0,this.offset=0,this.calculatedOffset=0,this.state=h.PENDING_ADD,this._pausedState=h.INIT,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onActive:null,onComplete:null,onLoop:null,onRepeat:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope},getValue:function(t){return void 0===t&&(t=0),this.data[t].current},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===h.ACTIVE},isPaused:function(){return this.state===h.PAUSED},hasTarget:function(t){return-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){void 0===i&&(i=!1);for(var n=0;n<this.totalData;n++){var r=this.data[n];r.key===t&&(r.end=e,i&&(r.start=r.current))}return this},restart:function(){return this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0,this.state===h.ACTIVE?this.seek(0):this.state===h.REMOVED?(this.seek(0),this.parent.makeActive(this),this):this.state===h.PENDING_ADD?this:this.play()},calcDuration:function(){for(var t=0,e=u.MAX_SAFE_INTEGER,i=this.data,n=0;n<this.totalData;n++){var r=i[n];r.t1=r.duration+r.hold,r.yoyo&&(r.t1+=r.duration),r.t2=r.t1+r.repeatDelay,r.totalDuration=r.delay+r.t1,-1===r.repeat?r.totalDuration+=999999999999*r.t2:r.repeat>0&&(r.totalDuration+=r.t2*r.repeat),r.totalDuration>t&&(t=r.totalDuration),r.delay<e&&(e=r.delay)}this.duration=Math.max(t,.001),this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay,this.startDelay=e},init:function(){if(this.paused&&!this.parentIsTimeline)return this.state=h.PENDING_ADD,this._pausedState=h.INIT,!1;for(var t=this.data,e=this.totalTargets,i=0;i<this.totalData;i++){var n=t[i],r=n.target,s=n.gen,o=n.key,a=n.index;n.delay=s.delay(r,o,0,a,e,this),n.duration=Math.max(s.duration(r,o,0,a,e,this),.001),n.hold=s.hold(r,o,0,a,e,this),n.repeat=s.repeat(r,o,0,a,e,this),n.repeatDelay=s.repeatDelay(r,o,0,a,e,this)}return this.calcDuration(),this.progress=0,this.totalProgress=0,this.elapsed=0,this.totalElapsed=0,this.state=h.INIT,!0},makeActive:function(){this.parent.makeActive(this),this.dispatchTweenEvent(s.TWEEN_ACTIVE,this.callbacks.onActive)},nextState:function(){this.loopCounter>0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=h.LOOP_DELAY):(this.state=h.ACTIVE,this.dispatchTweenEvent(s.TWEEN_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=h.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=h.PENDING_REMOVE,this.dispatchTweenEvent(s.TWEEN_COMPLETE,this.callbacks.onComplete))},pause:function(){return this.state===h.PAUSED||(this.paused=!0,this._pausedState=this.state,this.state=h.PAUSED),this},play:function(t){void 0===t&&(t=!1);var e=this.state;return e!==h.INIT||this.parentIsTimeline?e===h.ACTIVE||e===h.PENDING_ADD&&this._pausedState===h.PENDING_ADD?this:this.parentIsTimeline||e!==h.PENDING_REMOVE&&e!==h.REMOVED?(this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?this.state=h.ACTIVE:(this.countdown=this.calculatedOffset,this.state=h.OFFSET_DELAY)):this.paused?(this.paused=!1,this.makeActive()):(this.resetTweenData(t),this.state=h.ACTIVE,this.makeActive()),this):(this.seek(0),this.parent.makeActive(this),this):(this.resetTweenData(!1),this.state=h.ACTIVE,this)},resetTweenData:function(t){for(var e=this.data,i=this.totalData,n=this.totalTargets,r=0;r<i;r++){var s=e[r],o=s.target,a=s.key,u=s.index;s.progress=0,s.elapsed=0,s.repeatCounter=-1===s.repeat?999999999999:s.repeat,t?(s.start=s.getStartValue(o,a,s.start,u,n,this),s.end=s.getEndValue(o,a,s.end,u,n,this),s.current=s.start,s.state=h.PLAYING_FORWARD):s.state=h.PENDING_RENDER,s.delay>0&&(s.elapsed=s.delay,s.state=h.DELAY),s.getActiveValue&&(o[a]=s.getActiveValue(s.target,s.key,s.start))}},resume:function(){return this.state===h.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t,e){void 0===e&&(e=16.6),this.state===h.REMOVED&&this.makeActive(),this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0;for(var i=this.data,n=this.totalTargets,r=0;r<this.totalData;r++){var s=i[r],o=s.target,a=s.gen,u=s.key,l=s.index;s.progress=0,s.elapsed=0,s.repeatCounter=-1===s.repeat?999999999999:s.repeat,s.delay=a.delay(o,u,0,l,n,this),s.duration=Math.max(a.duration(o,u,0,l,n,this),.001),s.hold=a.hold(o,u,0,l,n,this),s.repeat=a.repeat(o,u,0,l,n,this),s.repeatDelay=a.repeatDelay(o,u,0,l,n,this),s.current=s.start,s.state=h.PLAYING_FORWARD,this.updateTweenData(this,s,0,l,n),s.delay>0&&(s.elapsed=s.delay,s.state=h.DELAY)}this.calcDuration();var c=!1;this.state===h.PAUSED&&(c=!0,this.state=h.ACTIVE),this.isSeeking=!0;do{this.update(0,e)}while(this.totalProgress<t);return this.isSeeking=!1,c&&(this.state=h.PAUSED),this}
982,setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},complete:function(t){return void 0===t&&(t=0),t?(this.state=h.COMPLETE_DELAY,this.countdown=t):(this.state=h.PENDING_REMOVE,this.dispatchTweenEvent(s.TWEEN_COMPLETE,this.callbacks.onComplete)),this},remove:function(){return this.parent.remove(this),this},stop:function(t){return this.state===h.ACTIVE&&void 0!==t&&this.seek(t),this.state!==h.REMOVED&&(this.state!==h.PAUSED&&this.state!==h.PENDING_ADD||(this.parentIsTimeline?(this.parent.manager._destroy.push(this),this.parent.manager._toProcess++):(this.parent._destroy.push(this),this.parent._toProcess++)),this.dispatchTweenEvent(s.TWEEN_STOP,this.callbacks.onStop),this.removeAllListeners(),this.state=h.PENDING_REMOVE),this},update:function(t,e){if(this.state===h.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case h.ACTIVE:this.hasStarted||this.isSeeking||(this.startDelay-=e,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchTweenEvent(s.TWEEN_START,this.callbacks.onStart)));for(var i=!1,n=0;n<this.totalData;n++){var r=this.data[n];this.updateTweenData(this,r,e)&&(i=!0)}i||this.nextState();break;case h.LOOP_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=h.ACTIVE,this.dispatchTweenEvent(s.TWEEN_LOOP,this.callbacks.onLoop));break;case h.OFFSET_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=h.ACTIVE);break;case h.COMPLETE_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=h.PENDING_REMOVE,this.dispatchTweenEvent(s.TWEEN_COMPLETE,this.callbacks.onComplete))}return this.state===h.PENDING_REMOVE},dispatchTweenDataEvent:function(t,e,i){this.isSeeking||(this.emit
982(t,this,i.key,i.target,i.current,i.previous),e&&(e.params[1]=i.target,e.func.apply(e.scope,e.params)))},dispatchTweenEvent:function(t,e){this.isSeeking||(this.emit(t,this,this.targets),e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)))},setStateFromEnd:function(t,e,i){return e.yoyo?(e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),this.dispatchTweenDataEvent(s.TWEEN_YOYO,t.callbacks.onYoyo,e),e.start=e.getStartValue(e.target,e.key,e.start,e.index,t.totalTargets,t),h.PLAYING_BACKWARD):e.repeatCounter>0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.start=e.getStartValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(s.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},setStateFromStart:function(t,e,i){return e.repeatCounter>0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(s.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},updateTweenData:function(t,e,i){var n=e.target;switch(e.state){case h.PLAYING_FORWARD:case h.PLAYING_BACKWARD:if(!n){e.state=h.COMPLETE;break}var r=e.elapsed,o=e.duration,a=0;(r+=i)>o&&(a=r-o,r=o);var u=e.state===h.PLAYING_FORWARD,l=r/o;if(e.elapsed=r,e.progress=l,e.previous=e.current,1===l)u?(e.current=e.end,n[e.key]=e.end,e.hold>0?(e.elapsed=e.hold-a,e.state=h.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,a)):(e.current=e.start,n[e.key]=e.start,e.state=this.setStateFromStart(t,e,a));else{var c=u?e.ease(l):e.ease(1-l);e.current=e.start+(e.end-e.start)*c,n[e.key]=e.current}this.dispatchTweenDataEvent(s.TWEEN_UPDATE,t.callbacks.onUpdate,e);break;case h.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PENDING_RENDER);break;case h.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PLAYING_FORWARD,this.dispatchTweenDataEvent(s.TWEEN_REPEAT,t.callbacks.onRepeat,e));break;case h.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case h.PENDING_RENDER:n?(e.start=e.getStartValue(n,e.key,n[e.key],e.index,t.totalTargets,t),e.end=e.getEndValue(n,e.key,e.start,e.index,t.totalTargets,t),e.current=e.start,n[e.key]=e.start,e.state=h.PLAYING_FORWARD):e.state=h.COMPLETE}return e.state!==h.COMPLETE}});l.TYPES=["onActive","onComplete","onLoop","onRepeat","onStart","onStop","onUpdate","onYoyo"],a.register("tween",(function(t){return this.scene.sys.tweens.add(t)})),o.register("tween",(function(t){return this.scene.sys.tweens.create(t)})),t.exports=l},function(t,e,i){ 983/** 984 * @author Richard Davey <[email protected]> 985 * @copyright 2020 Photon Storm Ltd. 986 * @license {@link https://opensource.org/licenses/MIT|MIT License} 987 */ 988t.exports={TIMELINE_COMPLETE:i(1459),TIMELINE_LOOP:i(1460),TIMELINE_PAUSE:i(1461),TIMELINE_RESUME:i(1462),TIMELINE_START:i(1463),TIMELINE_UPDATE:i(1464),TWEEN_ACTIVE:i(1465),TWEEN_COMPLETE:i(1466),TWEEN_LOOP:i(1467),TWEEN_REPEAT:i(1468),TWEEN_START:i(1469),TWEEN_STOP:i(1470),TWEEN_UPDATE:i(1471),TWEEN_YOYO:i(1472)}},function(t,e){t.exports=function(t,e,i,n,r,s,o,a,h,u,l,c,f,d,p){return{target:t,index:e,key:i,getActiveValue:s,getEndValue:n,getStartValue:r,ease:o,duration:0,totalDuration:0,delay:0,yoyo:u,hold:0,repeat:0,repeatDelay:0,flipX:d,flipY:p,progress:0,elapsed:0,repeatCounter:0,start:0,previous:0,current:0,end:0,t1:0,t2:0,gen:{delay:a,duration:h,hold:l,repeat:c,repeatDelay:f},state:0}}},function(t,e,i){ 989/** 990 * @author Richard Davey <[email protected]> 991 * @copyright 2020 Photon Storm Ltd. 992 * @license {@link https://opensource.org/licenses/MIT|MIT License} 993 */ 994var n=i(66);t.exports=function(t){return n(t,-Math.PI,Math.PI)}}
vendor: 4,186 bytes, lines 994-1018
994,function(t,e,i){ 995/** 996 * @author Richard Davey <[email protected]> 997 * @copyright 2020 Photon Storm Ltd. 998 * @license {@link https://opensource.org/licenses/MIT|MIT License} 999 */ 1000var n=i(66);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n={};t.exports=n;var r=i(268);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(t,e){for(var i=e*e*e,r=0;r<t.length;r++){var s=t[r],o=s.speed*s.speed+s.angularSpeed*s.angularSpeed;if(0===s.force.x&&0===s.force.y){var a=Math.min(s.motion,o),h=Math.max(s.motion,o);s.motion=n._minBias*a+(1-n._minBias)*h,s.sleepThreshold>0&&s.motion<n._motionSleepThreshold*i?(s.sleepCounter+=1,s.sleepCounter>=s.sleepThreshold&&n.set(s,!0)):s.sleepCounter>0&&(s.sleepCounter-=1)}else n.set(s,!1)}},n.afterCollisions=function(t,e){for(var i=e*e*e,r=0;r<t.length;r++){var s=t[r];if(s.isActive){var o=s.collision,a=o.bodyA.parent,h=o.bodyB.parent;if(!(a.isSleeping&&h.isSleeping||a.isStatic||h.isStatic)&&(a.isSleeping||h.isSleeping)){var u=a.isSleeping&&!a.isStatic?a:h,l=u===a?h:a;!u.isStatic&&l.motion>n._motionWakeThreshold*i&&n.set(u,!1)}}}},n.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||r.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&r.trigger(t,"sleepEnd"))}},function(t,e,i){var n={};t.exports=n;var r=i(50);n.on=function(t,e,i){for(var n,r=e.split(" "),s=0;s<r.length;s++)n=r[s],t.events=t.events||{},t.events[n]=t.events[n]||[],t.events[n].push(i);return i},n.off=function(t,e,i){if(e){"function"==typeof e&&(i=e,e=r.keys(t.events).join(" "));for(var n=e.split(" "),s=0;s<n.length;s++){var o=t.events[n[s]],a=[];if(i&&o)for(var h=0;h<o.length;h++)o[h]!==i&&a.push(o[h]);t.events[n[s]]=a}}else t.events={}},n.trigger=function(t,e,i){var n,s,o,a,h=t.events;if(h&&r.keys(h).length>0){i||(i={}),n=e.split(" ");for(var u=0;u<n.length;u++)if(o=h[s=n[u]]){(a=r.clone(i,!1)).name=s,a.source=t;for(var l=0;l<o.length;l++)o[l].apply(t,[a])}}}},function(t,e,i){ 1001/** 1002 * @author Richard Davey <[email protected]> 1003 * @copyright 2020 Photon Storm Ltd. 1004 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1005 */ 1006t.exports={AlignTo:i(599),Angle:i(600),Call:i(601),GetFirst:i(602),GetLast:i(603),GridAlign:i(604),IncAlpha:i(654),IncX:i(655),IncXY:i(656),IncY:i(657),PlaceOnCircle:i(658),PlaceOnEllipse:i(659),PlaceOnLine:i(660),PlaceOnRectangle:i(661),PlaceOnTriangle:i(662),PlayAnimation:i(663),PropertyValueInc:i(44),PropertyValueSet:i(27),RandomCircle:i(664),RandomEllipse:i(665),RandomLine:i(666),RandomRectangle:i(667),RandomTriangle:i(668),Rotate:i(669),RotateAround:i(670),RotateAroundDistance:i(671),ScaleX:i(672),ScaleXY:i(673),ScaleY:i(674),SetAlpha:i(675),SetBlendMode:i(676),SetDepth:i(677),SetHitArea:i(678),SetOrigin:i(679),SetRotation:i(680),SetScale:i(681),SetScaleX:i(682),SetScaleY:i(683),SetScrollFactor:i(684),SetScrollFactorX:i(685),SetScrollFactorY:i(686),SetTint:i(687),SetVisible:i(688),SetX:i(689),SetXY:i(690),SetY:i(691),ShiftPosition:i(692),Shuffle:i(693),SmootherStep:i(694),SmoothStep:i(695),Spread:i(696),ToggleVisible:i(697),WrapInRectangle:i(698)}},function(t,e,i){ 1007/** 1008 * @author samme 1009 * @copyright 2020 Photon Storm Ltd. 1010 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1011 */ 1012var n=i(122),r=[];r[n.BOTTOM_CENTER]=i(271),r[n.BOTTOM_LEFT]=i(272),r[n.BOTTOM_RIGHT]=i(273),r[n.LEFT_BOTTOM]=i(274),r[n.LEFT_CENTER]=i(275),r[n.LEFT_TOP]=i(276),r[n.RIGHT_BOTTOM]=i(277),r[n.RIGHT_CENTER]=i(278),r[n.RIGHT_TOP]=i(279),r[n.TOP_CENTER]=i(280),r[n.TOP_LEFT]=i(281),r[n.TOP_RIGHT]=i(282),t.exports=function(t,e,i,n,s){return r[i](t,e,n,s)}},function(t,e,i){ 1013/** 1014 * @author Richard Davey <[email protected]> 1015 * @copyright 2020 Photon Storm Ltd. 1016 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1017 */ 1018var n=i(40),r=i(84),s=i(85),o=i(51);
vendor: 8,799 bytes, lines 1018-1162
1018t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,r(e)+i),o(t,n(e)+a),t}},function(t,e,i){ 1019/** 1020 * @author Richard Davey <[email protected]> 1021 * @copyright 2020 Photon Storm Ltd. 1022 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1023 */ 1024var n=i(40),r=i(41),s=i(52),o=i(51);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,r(e)-i),o(t,n(e)+a),t}},function(t,e,i){ 1025/** 1026 * @author Richard Davey <[email protected]> 1027 * @copyright 2020 Photon Storm Ltd. 1028 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1029 */ 1030var n=i(40),r=i(42),s=i(53),o=i(51);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,r(e)+i),o(t,n(e)+a),t}},function(t,e,i){ 1031/** 1032 * @author Richard Davey <[email protected]> 1033 * @copyright 2020 Photon Storm Ltd. 1034 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1035 */ 1036var n=i(40),r=i(41),s=i(54),o=i(53);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,r(e)-i),s(t,n(e)+a),t}},function(t,e,i){ 1037/** 1038 * @author Richard Davey <[email protected]> 1039 * @copyright 2020 Photon Storm Ltd. 1040 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1041 */ 1042var n=i(86),r=i(41),s=i(87),o=i(53);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,r(e)-i),s(t,n(e)+a),t}},function(t,e,i){ 1043/** 1044 * @author Richard Davey <[email protected]> 1045 * @copyright 2020 Photon Storm Ltd. 1046 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1047 */ 1048var n=i(41),r=i(43),s=i(53),o=i(51);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,n(e)-i),o(t,r(e)-a),t}},function(t,e,i){ 1049/** 1050 * @author Richard Davey <[email protected]> 1051 * @copyright 2020 Photon Storm Ltd. 1052 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1053 */ 1054var n=i(40),r=i(42),s=i(54),o=i(52);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,r(e)+i),s(t,n(e)+a),t}},function(t,e,i){ 1055/** 1056 * @author Richard Davey <[email protected]> 1057 * @copyright 2020 Photon Storm Ltd. 1058 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1059 */ 1060var n=i(86),r=i(42),s=i(87),o=i(52);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,r(e)+i),s(t,n(e)+a),t}},function(t,e,i){ 1061/** 1062 * @author Richard Davey <[email protected]> 1063 * @copyright 2020 Photon Storm Ltd. 1064 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1065 */ 1066var n=i(42),r=i(43),s=i(52),o=i(51);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,n(e)+i),o(t,r(e)-a),t}},function(t,e,i){ 1067/** 1068 * @author Richard Davey <[email protected]> 1069 * @copyright 2020 Photon Storm Ltd. 1070 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1071 */ 1072var n=i(84),r=i(43),s=i(54),o=i(85);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),s(t,r(e)-a),t}},function(t,e,i){ 1073/** 1074 * @author Richard Davey <[email protected]> 1075 * @copyright 2020 Photon Storm Ltd. 1076 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1077 */ 1078var n=i(41),r=i(43),s=i(54),o=i(52);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),s(t,r(e)-a),t}},function(t,e,i){ 1079/** 1080 * @author Richard Davey <[email protected]> 1081 * @copyright 2020 Photon Storm Ltd. 1082 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1083 */ 1084var n=i(42),r=i(43),s=i(54),o=i(53);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),s(t,r(e)-a),t}},function(t,e,i){ 1085/** 1086 * @author Richard Davey <[email protected]> 1087 * @copyright 2020 Photon Storm Ltd. 1088 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1089 */ 1090var n=i(122),r=[];r[n.BOTTOM_CENTER]=i(284),r[n.BOTTOM_LEFT]=i(285),r[n.BOTTOM_RIGHT]=i(286),r[n.CENTER]=i(287),r[n.LEFT_CENTER]=i(289),r[n.RIGHT_CENTER]=i(290),r[n.TOP_CENTER]=i(291),r[n.TOP_LEFT]=i(292),r[n.TOP_RIGHT]=i(293),r[n.LEFT_BOTTOM]=r[n.BOTTOM_LEFT],r[n.LEFT_TOP]=r[n.TOP_LEFT],r[n.RIGHT_BOTTOM]=r[n.BOTTOM_RIGHT],r[n.RIGHT_TOP]=r[n.TOP_RIGHT],t.exports=function(t,e,i,n,s){return r[i](t,e,n,s)}},function(t,e,i){ 1091/** 1092 * @author Richard Davey <[email protected]> 1093 * @copyright 2020 Photon Storm Ltd. 1094 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1095 */ 1096var n=i(40),r=i(84),s=i(54),o=i(85);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,r(e)+i),s(t,n(e)+a),t}},function(t,e,i){ 1097/** 1098 * @author Richard Davey <[email protected]> 1099 * @copyright 2020 Photon Storm Ltd. 1100 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1101 */ 1102var n=i(40),r=i(41),s=i(54),o=i(52);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,r(e)-i),s(t,n(e)+a),t}},function(t,e,i){ 1103/** 1104 * @author Richard Davey <[email protected]> 1105 * @copyright 2020 Photon Storm Ltd. 1106 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1107 */ 1108var n=i(40),r=i(42),s=i(54),o=i(53);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,r(e)+i),s(t,n(e)+a),t}},function(t,e,i){ 1109/** 1110 * @author Richard Davey <[email protected]> 1111 * @copyright 2020 Photon Storm Ltd. 1112 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1113 */ 1114var n=i(288),r=i(84),s=i(86);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,r(e)+i,s(e)+o),t}},function(t,e,i){ 1115/** 1116 * @author Richard Davey <[email protected]> 1117 * @copyright 2020 Photon Storm Ltd. 1118 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1119 */ 1120var n=i(85),r=i(87);t.exports=function(t,e,i){return n(t,e),r(t,i)}},function(t,e,i){ 1121/** 1122 * @author Richard Davey <[email protected]> 1123 * @copyright 2020 Photon Storm Ltd. 1124 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1125 */ 1126var n=i(86),r=i(41),s=i(87),o=i(52);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,r(e)-i),s(t,n(e)+a),t}},function(t,e,i){ 1127/** 1128 * @author Richard Davey <[email protected]> 1129 * @copyright 2020 Photon Storm Ltd. 1130 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1131 */ 1132var n=i(86),r=i(42),s=i(87),o=i(53);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,r(e)+i),s(t,n(e)+a),t}},function(t,e,i){ 1133/** 1134 * @author Richard Davey <[email protected]> 1135 * @copyright 2020 Photon Storm Ltd. 1136 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1137 */ 1138var n=i(84),r=i(43),s=i(85),o=i(51);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,n(e)+i),o(t,r(e)-a),t}},function(t,e,i){ 1139/** 1140 * @author Richard Davey <[email protected]> 1141 * @copyright 2020 Photon Storm Ltd. 1142 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1143 */ 1144var n=i(41),r=i(43),s=i(52),o=i(51);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,n(e)-i),o(t,r(e)-a),t}},function(t,e,i){ 1145/** 1146 * @author Richard Davey <[email protected]> 1147 * @copyright 2020 Photon Storm Ltd. 1148 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1149 */ 1150var n=i(42),r=i(43),s=i(53),o=i(51);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,n(e)+i),o(t,r(e)-a),t}},function(t,e,i){ 1151/** 1152 * @author Richard Davey <[email protected]> 1153 * @copyright 2020 Photon Storm Ltd. 1154 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1155 */ 1156var n=i(165),r=i(95),s=i(14),o=i(4);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=r(e,0,s.PI2);return n(t,a,i)}},function(t,e,i){ 1157/** 1158 * @author Richard Davey <[email protected]> 1159 * @copyright 2020 Photon Storm Ltd. 1160 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1161 */ 1162var n=i(296),r=i(165),s=i(95),o=i(14);
1162t.exports=function(t,e,i,a){void 0===a&&(a=[]),!e&&i>0&&(e=n(t)/i);for(var h=0;h<e;h++){var u=s(h/e,0,o.PI2);a.push(r(t,u))}return a}},function(t,e){t.exports=function(t){return Math.PI*t.radius*2}},function(t,e,i){ 1163/** 1164 * @author Richard Davey <[email protected]> 1165 * @copyright 2020 Photon Storm Ltd. 1166 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1167 */ 1168var n=i(18),r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=r},function(t,e,i){ 1169/** 1170 * @author Richard Davey <[email protected]> 1171 * @copyright 2020 Photon Storm Ltd. 1172 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1173 */ 1174var n=i(34),r={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=r},function(t,e){t.exports={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}}},function(t,e,i){ 1175/** 1176 * @author Richard Davey <[email protected]> 1177 * @copyright 2020 Photon Storm Ltd. 1178 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1179 */ 1180var n=i(167),r=i(128);t.exports=function(t,e,i,s){void 0===s&&(s=[]),!e&&i>0&&(e=r(t)/i);for(var o=0;o<e;o++){var a=o/e;s.push(n(t,a))}return s}},function(t,e,i){ 1181/** 1182 * @author Richard Davey <[email protected]> 1183 * @copyright 2020 Photon Storm Ltd. 1184 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1185 */ 1186var n=i(4);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e){t.exports=function(t,e,i,n){var r=Math.cos(n),s=Math.sin(n),o=t.x-e,a=t.y-i;return t.x=o*r-a*s+e,t.y=o*s+a*r+i,t}},function(t,e,i){ 1187/** 1188 * @author Richard Davey <[email protected]> 1189 * @copyright 2020 Photon Storm Ltd. 1190 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1191 */ 1192var n=i(304),r=i(305),s={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t){return void 0===t&&(this.texture||this.shader)&&(t=this),new n(this.scene,t)},createGeometryMask:function(t){return void 0===t&&"Graphics"===this.type&&(t=this),new r(this.scene,t)}};t.exports=s},function(t,e,i){ 1193/** 1194 * @author Richard Davey <[email protected]> 1195 * @copyright 2020 Photon Storm Ltd. 1196 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1197 */ 1198var n=i(0),r=i(22),s=i(88),o=new n({initialize:function(t,e){var i=t.sys.renderer;this.renderer=i,this.bitmapMask=e,this.maskTexture=null,this.mainTexture=null,this.dirty=!0,this.mainFramebuffer=null,this.maskFramebuffer=null,this.invertAlpha=!1,this.isStencil=!1,this.createMask(),t.sys.game.events.on(r.CONTEXT_RESTORED,this.createMask,this),i.on(s.RESIZE,this.createMask,this)},createMask:function(){var t=this.renderer;if(t.gl){this.mainTexture&&this.clearMask();var e=t.width,i=t.height,n=0==(e&e-1)&&0==(i&i-1),r=t.gl,s=n?r.REPEAT:r.CLAMP_TO_EDGE,o=r.LINEAR;this.mainTexture=t.createTexture2D(0,o,o,s,s,r.RGBA,null,e,i),this.maskTexture=t.createTexture2D(0,o,o,s,s,r.RGBA,null,e,i),this.mainFramebuffer=t.createFramebuffer(e,i,this.mainTexture,!0),this.maskFramebuffer=t.createFramebuffer(e,i,this.maskTexture,!0)}},clearMask:function(){var t=this.renderer;t.gl&&this.mainTexture&&(t.deleteTexture(this.mainTexture),t.deleteTexture(this.maskTexture),t.deleteFramebuffer(this.mainFramebuffer),t.deleteFramebuffer(this.maskFramebuffer),this.mainTexture=null,this.maskTexture=null,this.mainFramebuffer=null,this.maskFramebuffer=null)},setBitmap:function(t){this.bitmapMask=t}
1198,preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.clearMask(),this.renderer.off(s.RESIZE,this.createMask,this),this.bitmapMask=null,this.prevFramebuffer=null,this.renderer=null}});t.exports=o},function(t,e,i){ 1199/** 1200 * @author Richard Davey <[email protected]> 1201 * @copyright 2020 Photon Storm Ltd. 1202 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1203 */ 1204var n=new(i(0))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var n=t.gl;t.flush(),0===t.maskStack.length&&(n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var n=t.gl,r=this.geometryMask,s=t.maskCount;n.colorMask(!1,!1,!1,!1),i?(n.stencilFunc(n.EQUAL,s,255),n.stencilOp(n.KEEP,n.KEEP,n.INCR)):(n.stencilFunc(n.EQUAL,s+1,255),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),r.renderWebGL(t,r,e),t.flush(),n.colorMask(!0,!0,!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),i?this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s+1,255):n.stencilFunc(n.EQUAL,s+1,255):this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s,255):n.stencilFunc(n.EQUAL,s,255)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var n=t.maskStack[t.maskStack.length-1];n.mask.applyStencil(t,n.camera,!1),t.currentCameraMask.mask!==n.mask?(i.mask=n.mask,i.camera=n.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var n=this.geometryMask;t.currentContext.save(),n.renderCanvas(t,n,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=n},function(t,e){t.exports={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}}},function(t,e,i){ 1205/** 1206 * @author Richard Davey <[email protected]> 1207 * @copyright 2020 Photon Storm Ltd. 1208 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1209 */ 1210var n=i(14),r=i(25),s=i(174),o=i(265),a=i(266),h=i(3),u={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return a(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=a(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=o(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r),void 0===e&&(e=new r);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t}
vendor: 4,656 bytes, lines 1210-1240
1210,getLocalPoint:function(t,e,i,n){i||(i=new h),n||(n=this.scene.sys.cameras.main);var r=n.scrollX,o=n.scrollY,a=t+r*this.scrollFactorX-r,u=e+o*this.scrollFactorY-o;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(a,u,i):s(a,u,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=u},function(t,e){ 1211/** 1212 * @author Richard Davey <[email protected]> 1213 * @copyright 2020 Photon Storm Ltd. 1214 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1215 */ 1216var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e,i){ 1217/** 1218 * @author Richard Davey <[email protected]> 1219 * @copyright 2020 Photon Storm Ltd. 1220 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1221 */ 1222t.exports={CHANGE_DATA:i(636),CHANGE_DATA_KEY:i(637),DESTROY:i(638),REMOVE_DATA:i(639),SET_DATA:i(640)}},function(t,e,i){ 1223/** 1224 * @author Richard Davey <[email protected]> 1225 * @copyright 2020 Photon Storm Ltd. 1226 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1227 */ 1228var n=i(128),r=i(4);t.exports=function(t,e,i,s){if(void 0===s&&(s=[]),!e&&!i)return s;e?i=Math.round(n(t)/e):e=n(t)/i;for(var o=t.x,a=t.y,h=0,u=0;u<i;u++)switch(s.push(new r(o,a)),h){case 0:(o+=e)>=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return s}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var n=Math.round(t.x1),r=Math.round(t.y1),s=Math.round(t.x2),o=Math.round(t.y2),a=Math.abs(s-n),h=Math.abs(o-r),u=n<s?1:-1,l=r<o?1:-1,c=a-h;i.push({x:n,y:r});for(var f=1;n!==s||r!==o;){var d=c<<1;d>-h&&(c-=h,n+=u),d<a&&(c+=a,r+=l),f%e==0&&i.push({x:n,y:r}),f++}return i}},function(t,e){t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var n,r,s=1;if(i){if(t<e[0][i])return e[0];for(;e[s][i]<t;)s++}else for(;e[s]<t;)s++;return s>e.length&&(s=e.length),i?(n=e[s-1][i],(r=e[s][i])-t<=t-n?e[s]:e[s-1]):(n=e[s-1],(r=e[s])-t<=t-n?r:n)}},function(t,e,i){ 1229/** 1230 * @author Richard Davey <[email protected]> 1231 * @copyright 2020 Photon Storm Ltd. 1232 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1233 */ 1234var n=new(i(0))({initialize:function(t,e,i,n,r){void 0===r&&(r=!1),this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=r},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e){t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},function(t,e,i){ 1235/** 1236 * @author Richard Davey <[email protected]> 1237 * @copyright 2020 Photon Storm Ltd. 1238 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1239 */ 1240var n=i(182),r=i(0),s=i(99),o=i(9),a=i(130),h=i(22),u=i(2),l=i(6),c=i(183),f=i(316),d=new r({Extends:o,initialize:function(t){o.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new s,this.mixes=new s,this.paused=!1,this.name="AnimationManager",t.events.once(h.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(h.DESTROY,this.destroy,this)},addMix:function(t,e,i){var n=this.anims,r=this.mixes,s="string"==typeof t?t:t.key,o="string"==typeof e?e:e.key;if(n.has(s)&&n.has(o)){var a=r.get(s);a||(a={}),a[o]=i,r.set(s,a)}return this},removeMix:function(t,e){var i=this.mixes,n="string"==typeof t?t:t.key,r=i.get(n);if(r)if(e){var s="string"==typeof e?e:e.key;r.hasOwnProperty(s)&&delete r[s]}else e||i.delete(n);return this},getMix:function(t,e){var i=this.mixes,n="string"==typeof t?t:t.key,r="string"==typeof e?e:e.key,s=i.get(n);return s&&s.hasOwnProperty(r)?s[r]:0},add:function(t,e){return this.anims.has(t)?(console.warn("Animation key exists: "+t),this):(e.key=t,this.anims.set(t,e),this.emit
1240(a.ADD_ANIMATION,t,e),this)},exists:function(t){return this.anims.has(t)},createFromAseprite:function(t,e){var i=[],n=this.game.cache.json.get(t);if(!n)return i;var r=this,s=l(n,"meta",null),o=l(n,"frames",null);return s&&o&&l(s,"frameTags",[]).forEach((function(n){var s=[],a=u(n,"name",null),h=u(n,"from",0),l=u(n,"to",0),c=u(n,"direction","forward");if(a&&(!e||e&&e.indexOf(a)>-1)){for(var f=[],d=Number.MAX_SAFE_INTEGER,p=h;p<=l;p++){var v=p.toString(),g=o[v];if(g){var m=u(g,"duration",Number.MAX_SAFE_INTEGER);m<d&&(d=m),f.push({frame:v,duration:m})}}f.forEach((function(e){s.push({key:t,frame:e.frame,duration:d-e.duration})}));var y=d*s.length;"reverse"===c&&(s=s.reverse());var x={key:a,frames:s,duration:y,yoyo:"pingpong"===c},w=r.create(x);w&&i.push(w)}})),i},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new n(this,e,t),this.anims.set(e,i),this.emit(a.ADD_ANIMATION,e,i))),i},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var n=0;n<t.anims.length;n++)i.push(this.create(t.anims[n]));t.hasOwnProperty("globalTimeScale")&&(this.globalTimeScale=t.globalTimeScale)}else t.hasOwnProperty("key")&&"frame"===t.type&&i.push(this.create(t));return i},generateFrameNames:function(t,e){var i,n=l(e,"prefix",""),r=l(e,"start",0),s=l(e,"end",0),o=l(e,"suffix",""),a=l(e,"zeroPad",0),h=l(e,"outputArray",[]),u=l(e,"frames",!1),d=this.textureManager.get(t);if(!d)return h;if(e)for(u||(u=f(r,s)),i=0;i<u.length;i++){var p=n+c(u[i],a,"0",1)+o;d.has(p)?h.push({key:t,frame:p}):console.warn("generateFrameNames: Frame missing: "+p+" from texture: "+t)}else for(u=d.getFrameNames(),i=0;i<u.length;i++)h.push({key:t,frame:u[i]});return h},generateFrameNumbers:function(t,e){var i=l(e,"start",0),n=l(e,"end",-1),r=l(e,"first",!1),s=l(e,"outputArray",[]),o=l(e,"frames",!1),a=this.textureManager.get(t);if(!a)return s;r&&a.has(r)&&s.push({key:t,frame:r}),o||(-1===n&&(n=a.frameTotal-2),o=f(i,n));for(var h=0;h<o.length;h++)a.has(o[h])?s.push({key:t,frame:o[h]}):console.warn("generateFrameNumbers: Frame "+h+" missing from texture: "+t);return s},get:function(t){return this.anims.get(t)},pauseAll:function(){return this.paused||(this.paused=!0,this.emit(a.PAUSE_ALL)),this},play:function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)e[i].anims.play(t);return this},staggerPlay:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=!0),Array.isArray(e)||(e=[e]);var r=e.length;n||r--;for(var s=0;s<e.length;s++){var o=i<0?Math.abs(i)*(r-s):i*s;e[s].anims.playAfterDelay(t,o)}return this},remove:function(t){var e=this.get(t);
vendor: 4,094 bytes, lines 1240-1264
1240return e&&(this.emit(a.REMOVE_ANIMATION,t,e),this.anims.delete(t),this.removeMix(t)),e},resumeAll:function(){return this.paused&&(this.paused=!1,this.emit(a.RESUME_ALL)),this},toJSON:function(t){var e={anims:[],globalTimeScale:this.globalTimeScale};return void 0!==t&&""!==t?e.anims.push(this.anims.get(t).toJSON()):this.anims.each((function(t,i){e.anims.push(i.toJSON())})),e},destroy:function(){this.anims.clear(),this.mixes.clear(),this.textureManager=null,this.game=null}});t.exports=d},function(t,e){t.exports=function(t,e,i,n){var r,s=[],o=!1;if((i||n)&&(o=!0,i||(i=""),n||(n="")),e<t)for(r=t;r>=e;r--)o?s.push(i+r.toString()+n):s.push(r);else for(r=t;r<=e;r++)o?s.push(i+r.toString()+n):s.push(r);return s}},function(t,e,i){ 1241/** 1242 * @author Richard Davey <[email protected]> 1243 * @copyright 2020 Photon Storm Ltd. 1244 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1245 */ 1246var n=i(0),r=i(99),s=i(9),o=i(318),a=new n({initialize:function(){this.entries=new r,this.events=new s},add:function(t,e){return this.entries.set(t,e),this.events.emit(o.ADD,this,t,e),this},has:function(t){return this.entries.has(t)},exists:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit(o.REMOVE,this,t,e.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=a},function(t,e,i){ 1247/** 1248 * @author Richard Davey <[email protected]> 1249 * @copyright 2020 Photon Storm Ltd. 1250 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1251 */ 1252t.exports={ADD:i(712),REMOVE:i(713)}},function(t,e,i){ 1253/** 1254 * @author Richard Davey <[email protected]> 1255 * @copyright 2020 Photon Storm Ltd. 1256 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1257 */ 1258var n=i(317),r=i(0),s=i(22),o=new r({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.video=new n,this.text=new n,this.html=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once(s.DESTROY,this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e<t.length;e++)this[t[e]].destroy(),this[t[e]]=null;for(var i in this.custom)this.custom[i].destroy();this.custom=null,this.game=null}});t.exports=o},function(t,e,i){ 1259/** 1260 * @author Richard Davey <[email protected]> 1261 * @copyright 2020 Photon Storm Ltd. 1262 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1263 */ 1264var n=i(131),r=i(187),s=i(18),o=i(0),a=i(11),h=i(327),u=i(36),l=i(133),c=i(10),f=i(3),d=new o({Extends:n,Mixins:[a.Flip,a.Tint,a.Pipeline],initialize:function(t,e,i,r){n.call(this,t,e,i,r),this.postPipelines=[],this.pipelineData={},this.inputEnabled=!0,this.fadeEffect=new h.Fade(this),this.flashEffect=new h.Flash(this),this.shakeEffect=new h.Shake(this),this.panEffect=new h.Pan(this),this.rotateToEffect=new h.RotateTo(this),this.zoomEffect=new h.Zoom(this),this.lerp=new f(1,1),this.followOffset=new f,this.deadzone=null,this._follow=null},setDeadzone:function(t,e){if(void 0===t)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=t,this.deadzone.height=e):this.deadzone=new c(0,0,t,e),this._follow){var i=this.width/2,n=this.height/2,s=this._follow.x-this.followOffset.x,o=this._follow.y-this.followOffset.y;this.midPoint.set(s,o),this.scrollX=s-i,this.scrollY=o-n}r(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(t,e,i,n,r,s){return this.fadeEffect.start(!1,t,e,i,n,!0,r,s)},fadeOut:function(t,e,i,n,r,s){return this.fadeEffect.start(!0,t,e,i,n,!0,r,s)}
1264,fadeFrom:function(t,e,i,n,r,s,o){return this.fadeEffect.start(!1,t,e,i,n,r,s,o)},fade:function(t,e,i,n,r,s,o){return this.fadeEffect.start(!0,t,e,i,n,r,s,o)},flash:function(t,e,i,n,r,s,o){return this.flashEffect.start(t,e,i,n,r,s,o)},shake:function(t,e,i,n,r){return this.shakeEffect.start(t,e,i,n,r)},pan:function(t,e,i,n,r,s,o){return this.panEffect.start(t,e,i,n,r,s,o)},rotateTo:function(t,e,i,n,r,s,o){return this.rotateToEffect.start(t,e,i,n,r,s,o)},zoomTo:function(t,e,i,n,r,s){return this.zoomEffect.start(t,e,i,n,r,s)},preRender:function(){this.renderList.length=0;var t=this.width,e=this.height,i=.5*t,n=.5*e,s=this.zoom,o=this.matrix,a=t*this.originX,h=e*this.originY,c=this._follow,f=this.deadzone,d=this.scrollX,p=this.scrollY;f&&r(f,this.midPoint.x,this.midPoint.y);var v=!1;if(c&&!this.panEffect.isRunning){var g=c.x-this.followOffset.x,m=c.y-this.followOffset.y;f?(g<f.x?d=l(d,d-(f.x-g),this.lerp.x):g>f.right&&(d=l(d,d+(g-f.right),this.lerp.x)),m<f.y?p=l(p,p-(f.y-m),this.lerp.y):m>f.bottom&&(p=l(p,p+(m-f.bottom),this.lerp.y))):(d=l(d,g-a,this.lerp.x),p=l(p,m-h,this.lerp.y)),v=!0}this.useBounds&&(d=this.clampX(d),p=this.clampY(p)),this.roundPixels&&(a=Math.round(a),h=Math.round(h),d=Math.round(d),p=Math.round(p)),this.scrollX=d,this.scrollY=p;var y=d+i,x=p+n;this.midPoint.set(y,x);var w=t/s,_=e/s,b=y-w/2,T=x-_/2;this.roundPixels&&(b=Math.round(b),T=Math.round(T)),this.worldView.setTo(b,T,w,_),o.applyITRS(this.x+a,this.y+h,this.rotation,s,s),o.translate(-a,-h),this.shakeEffect.preRender(),v&&this.emit(u.FOLLOW_UPDATE,this,c)},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,r,o){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===r&&(r=0),void 0===o&&(o=r),this._follow=t,this.roundPixels=e,i=s(i,0,1),n=s(n,0,1),this.lerp.set(i,n),this.followOffset.set(r,o);var a=this.width/2,h=this.height/2,u=t.x-r,l=t.y-o;return this.midPoint.set(u,l),this.scrollX=u-a,this.scrollY=l-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.resetFX(),n.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=d},function(t,e,i){ 1265/** 1266 * @author Richard Davey <[email protected]> 1267 * @copyright 2020 Photon Storm Ltd. 1268 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1269 */ 1270var n=i(37);t.exports=function(t){var e=new n;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,i,n){return e+e+i+i+n+n}));var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var r=parseInt(i[1],16),s=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(r,s,o)}return e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var r=Math.min(t,e,i),s=Math.max(t,e,i),o=s-r,a=0,h=0===s?0:o/s,u=s;return s!==r&&(s===t?a=(e-i)/o+(e<i?6:0):s===e?a=(i-t)/o+2:s===i&&(a=(t-e)/o+4),a/=6),n.hasOwnProperty("_h")?(n._h=a,n._s=h,n._v=u):(n.h=a,n.s=h,n.v=u),n}},function(t,e){t.exports=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){ 1271/** 1272 * @author Richard Davey <[email protected]> 1273 * @copyright 2020 Photon Storm Ltd. 1274 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1275 */ 1276var n=i(37);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){ 1277/** 1278 * @author Richard Davey <[email protected]> 1279 * @copyright 2020 Photon Storm Ltd. 1280 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1281 */ 1282var n=i(37);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var r=parseInt(i[1],10),s=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(r,s,o,255*a)}return e}}
vendor: 22,653 bytes, lines 1282-1420
1282,function(t,e,i){ 1283/** 1284 * @author Richard Davey <[email protected]> 1285 * @copyright 2020 Photon Storm Ltd. 1286 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1287 */ 1288t.exports={Fade:i(737),Flash:i(738),Pan:i(739),Shake:i(772),RotateTo:i(773),Zoom:i(774)}},function(t,e,i){ 1289/** 1290 * @author Richard Davey <[email protected]> 1291 * @copyright 2020 Photon Storm Ltd. 1292 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1293 */ 1294t.exports={In:i(740),Out:i(741),InOut:i(742)}},function(t,e,i){ 1295/** 1296 * @author Richard Davey <[email protected]> 1297 * @copyright 2020 Photon Storm Ltd. 1298 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1299 */ 1300t.exports={In:i(743),Out:i(744),InOut:i(745)}},function(t,e,i){ 1301/** 1302 * @author Richard Davey <[email protected]> 1303 * @copyright 2020 Photon Storm Ltd. 1304 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1305 */ 1306t.exports={In:i(746),Out:i(747),InOut:i(748)}},function(t,e,i){ 1307/** 1308 * @author Richard Davey <[email protected]> 1309 * @copyright 2020 Photon Storm Ltd. 1310 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1311 */ 1312t.exports={In:i(749),Out:i(750),InOut:i(751)}},function(t,e,i){ 1313/** 1314 * @author Richard Davey <[email protected]> 1315 * @copyright 2020 Photon Storm Ltd. 1316 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1317 */ 1318t.exports={In:i(752),Out:i(753),InOut:i(754)}},function(t,e,i){ 1319/** 1320 * @author Richard Davey <[email protected]> 1321 * @copyright 2020 Photon Storm Ltd. 1322 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1323 */ 1324t.exports={In:i(755),Out:i(756),InOut:i(757)}},function(t,e,i){ 1325/** 1326 * @author Richard Davey <[email protected]> 1327 * @copyright 2020 Photon Storm Ltd. 1328 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1329 */ 1330t.exports=i(758)},function(t,e,i){ 1331/** 1332 * @author Richard Davey <[email protected]> 1333 * @copyright 2020 Photon Storm Ltd. 1334 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1335 */ 1336t.exports={In:i(759),Out:i(760),InOut:i(761)}},function(t,e,i){ 1337/** 1338 * @author Richard Davey <[email protected]> 1339 * @copyright 2020 Photon Storm Ltd. 1340 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1341 */ 1342t.exports={In:i(762),Out:i(763),InOut:i(764)}},function(t,e,i){ 1343/** 1344 * @author Richard Davey <[email protected]> 1345 * @copyright 2020 Photon Storm Ltd. 1346 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1347 */ 1348t.exports={In:i(765),Out:i(766),InOut:i(767)}},function(t,e,i){ 1349/** 1350 * @author Richard Davey <[email protected]> 1351 * @copyright 2020 Photon Storm Ltd. 1352 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1353 */ 1354t.exports={In:i(768),Out:i(769),InOut:i(770)}},function(t,e,i){ 1355/** 1356 * @author Richard Davey <[email protected]> 1357 * @copyright 2020 Photon Storm Ltd. 1358 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1359 */ 1360t.exports=i(771)},function(t,e,i){ 1361/** 1362 * @author Richard Davey <[email protected]> 1363 * @copyright 2020 Photon Storm Ltd. 1364 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1365 */ 1366var n=i(0),r=i(32),s=i(341),o=i(2),a=i(6),h=i(7),u=i(190),l=i(1),c=i(194),f=i(184),d=new n({initialize:function(t){void 0===t&&(t={}),this.width=a(t,"width",1024),this.height=a(t,"height",768),this.zoom=a(t,"zoom",1),this.parent=a(t,"parent",void 0),this.scaleMode=a(t,"scaleMode",0),this.expandParent=a(t,"expandParent",!0),this.autoRound=a(t,"autoRound",!1),this.autoCenter=a(t,"autoCenter",0),this.resizeInterval=a(t,"resizeInterval",500),this.fullscreenTarget=a(t,"fullscreenTarget",null),this.minWidth=a(t,"minWidth",0),this.maxWidth=a(t,"maxWidth",0),this.minHeight=a(t,"minHeight",0),this.maxHeight=a(t,"maxHeight",0);var e=a(t,"scale",null);e&&(this.width=a(e,"width",this.width),this.height=a(e,"height",this.height),this.zoom=a(e,"zoom",this.zoom),this.parent=a(e,"parent",this.parent),this.scaleMode=a(e,"mode",this.scaleMode),this.expandParent=a(e,"expandParent",this.expandParent),this.autoRound=a(e,"autoRound",this.autoRound),this.autoCenter=a(e,"autoCenter",this.autoCenter),this.resizeInterval=a(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=a(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=a(e,"min.width",this.minWidth),this.maxWidth=a(e,"max.width",this.maxWidth),this.minHeight=a(e,"min.height",this.minHeight),this.maxHeight=a(e,"max.height",this.maxHeight)),this.renderType=a(t,"type",r.AUTO),this.canvas=a(t,"canvas",null),this.context=a(t,"context",null),this.canvasStyle=a(t,"canvasStyle",null),this.customEnvironment=a(t,"customEnvironment",!1),this.sceneConfig=a(t,"scene",null),this.seed=a(t,"seed",[(Date.now()*Math.random()).toString()]),u.RND=new u.RandomDataGenerator(this.seed),this.gameTitle=a(t,"title",""),this.gameURL=a(t,"url","https://phaser.io"),this.gameVersion=a(t,"version",""),this.autoFocus=a(t,"autoFocus",!0),this.domCreateContainer=a(t,"dom.createContainer",!1),this.domBehindCanvas=a(t,"dom.behindCanvas",!1),this.inputKeyboard=a(t,"input.keyboard",!0),this.inputKeyboardEventTarget=a(t,"input.keyboard.target",window),this.inputKeyboardCapture=a(t,"input.keyboard.capture",[]),this.inputMouse=a(t,"input.mouse",!0),this.inputMouseEventTarget=a(t,"input.mouse.target",null),this.inputMousePreventDefaultDown=a(t,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=a(t,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=a(t,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=a(t,"input.mouse.preventDefaultWheel",!0),this.inputTouch=a(t,"input.touch",s.input.touch),this.inputTouchEventTarget=a(t,"input.touch.target",null),this.inputTouchCapture=a(t,"input.touch.capture",!0),this.inputActivePointers=a(t,"input.activePointers",1),this.inputSmoothFactor=a(t,"input.smoothFactor",0),this.inputWindowEvents=a(t,"input.windowEvents",!0),this.inputGamepad=a(t,"input.gamepad",!1),this.inputGamepadEventTarget=a(t,"input.gamepad.target",window),this.disableContextMenu=a(t,"disableContextMenu",!1),this.audio=a(t,"audio",{}),this.hideBanner=!1===a(t,"banner",null),this.hidePhaser=a(t,"banner.hidePhaser",!1),this.bannerTextColor=a(t,"banner.text","#ffffff"),this.bannerBackgroundColor=a(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=a(t,"fps",null);var i=a(t,"render",t);this.pipeline=a(i,"pipeline",null),this.antialias=a(i,"antialias",!0),this.antialiasGL=a(i,"antialiasGL",!0),this.mipmapFilter=a(i,"mipmapFilter","LINEAR"),this.desynchronized=a(i,"desynchronized",!1),this.roundPixels=a(i,"roundPixels",!1),this.pixelArt=a(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=a(i,"transparent",!1),this.clearBeforeRender=a(i,"clearBeforeRender",!0),this.premultipliedAlpha=a(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=a(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=a(i,"powerPreference","default"),this.batchSize=a(i,"batchSize",4096),this.maxTextures=a(i,"maxTextures",-1),this.maxLights=a(i,"maxLights",10);var n=a(t,"backgroundColor",0);this.backgroundColor=f(n),this.transparent&&(this.backgroundColor=f(0),this.backgroundColor.alpha=0),this.preBoot=a(t,"callbacks.preBoot",l),this.postBoot=a(t,"callbacks.postBoot",l),this.physics=a(t,"physics",{}),this.defaultPhysicsSystem=a(this.physics,"default",!1),this.loaderBaseURL=a(t,"loader.baseURL",""),this.loaderPath=a(t,"loader.path","");var d=s.os.android?6:32;this.loaderMaxParallelDownloads=a(t,"loader.maxParallelDownloads",d),this.loaderCrossOrigin=a(t,"loader.crossOrigin",void 0),this.loaderResponseType=a(t,"loader.responseType",""),this.loaderAsync=a(t,"loader.async",!0),this.loaderUser=a(t,"loader.user",""),this.loaderPassword=a(t,"loader.password",""),this.loaderTimeout=a(t,"loader.timeout",0),this.loaderWithCredentials=a(t,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[];var p=a(t,"plugins",null),v=c.DefaultScene;p&&(Array.isArray(p)?this.defaultPlugins=p:h(p)&&(this.installGlobalPlugins=o(p,"global",[]),this.installScenePlugins=o(p,"scene",[]),Array.isArray(p.default)?v=p.default:Array.isArray(p.defaultMerge)&&(v=v.concat(p.defaultMerge)))),this.defaultPlugins=v;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=a(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=a(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=a(t,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=r.WEBGL:window.FORCE_CANVAS&&(this.renderType=r.CANVAS))}});t.exports=d},function(t,e,i){ 1367/** 1368 * @author Richard Davey <[email protected]> 1369 * @copyright 2020 Photon Storm Ltd. 1370 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1371 */ 1372t.exports={os:i(102),browser:i(134),features:i(188),input:i(805),audio:i(806),video:i(807),fullscreen:i(808),canvasFeatures:i(342)}},function(t,e,i){ 1373/** 1374 * @author Richard Davey <[email protected]> 1375 * @copyright 2020 Photon Storm Ltd. 1376 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1377 */ 1378var n,r,s,o=i(31),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",r="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(s=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(s,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+r},s.src=n+"AP804Oa6"+r,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e,i,n){var r=t-i,s=e-n;return r*r+s*s}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t<e+i}},function(t,e,i){ 1379/** 1380 * @author Richard Davey <[email protected]> 1381 * @copyright 2020 Photon Storm Ltd. 1382 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1383 */ 1384var n=i(351);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e,i,n,r){ 1385/** 1386 * @author Richard Davey <[email protected]> 1387 * @copyright 2020 Photon Storm Ltd. 1388 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1389 */ 1390return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,n)+function(t,e){return t*t*t*e}(t,r)}},function(t,e){t.exports=function(t,e,i,n){ 1391/** 1392 * @author Richard Davey <[email protected]> 1393 * @copyright 2020 Photon Storm Ltd. 1394 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1395 */ 1396return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,n)}},function(t,e,i){ 1397/** 1398 * @author Richard Davey <[email protected]> 1399 * @copyright 2020 Photon Storm Ltd. 1400 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1401 */ 1402var n=i(181);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e){t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<<Math.ceil(e)}},function(t,e){t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e,i){ 1403/** 1404 * @author Richard Davey <[email protected]> 1405 * @copyright 2020 Photon Storm Ltd. 1406 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1407 */ 1408var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],u=t[8],l=u*s-o*h,c=-u*r+o*a,f=h*r-s*a,d=e*l+i*c+n*f;return d?(d=1/d,t[0]=l*d,t[1]=(-u*i+n*h)*d,t[2]=(o*i-n*s)*d,t[3]=c*d,t[4]=(u*e-n*a)*d,t[5]=(-o*e+n*r)*d,t[6]=f*d,t[7]=(-h*e+i*a)*d,t[8]=(s*e-i*r)*d,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],u=t[8];return t[0]=s*u-o*h,t[1]=n*h-i*u,t[2]=i*o-n*s,t[3]=o*a-r*u,t[4]=e*u-n*a,t[5]=n*r-e*o,t[6]=r*h-s*a,t[7]=i*a-e*h,t[8]=e*s-i*r,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],u=t[8];return e*(u*s-o*h)+i*(-u*r+o*a)+n*(h*r-s*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=e[6],u=e[7],l=e[8],c=t.val,f=c[0],d=c[1],p=c[2],v=c[3],g=c[4],m=c[5],y=c[6],x=c[7],w=c[8];return e[0]=f*i+d*s+p*h,e[1]=f*n+d*o+p*u,e[2]=f*r+d*a+p*l,e[3]=v*i+g*s+m*h,e[4]=v*n+g*o+m*u,e[5]=v*r+g*a+m*l,e[6]=y*i+x*s+w*h,e[7]=y*n+x*o+w*u,e[8]=y*r+x*a+w*l,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=Math.sin(t),u=Math.cos(t);return e[0]=u*i+h*s,e[1]=u*n+h*o,e[2]=u*r+h*a,e[3]=u*s-h*i,e[4]=u*o-h*n,e[5]=u*a-h*r,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,r=t.w,s=e+e,o=i+i,a=n+n,h=e*s,u=e*o,l=e*a,c=i*o,f=i*a,d=n*a,p=r*s,v=r*o,g=r*a,m=this.val;return m[0]=1-(c+d),m[3]=u+g,m[6]=l-v,m[1]=u-g,m[4]=1-(h+d),m[7]=f+p,m[2]=l+v,m[5]=f-p,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],r=e[1],s=e[2],o=e[3],a=e[4],h=e[5],u=e[6],l=e[7],c=e[8],f=e[9],d=e[10],p=e[11],v=e[12],g=e[13],m=e[14],y=e[15],x=n*h-r*a,w=n*u-s*a,_=n*l-o*a,b=r*u-s*h,T=r*l-o*h,E=s*l-o*u,S=c*g-f*v,A=c*m-d*v,C=c*y-p*v,O=f*m-d*g,R=f*y-p*g,M=d*y-p*m,P=x*M-w*R+_*O+b*C-T*A+E*S;return P?(P=1/P,i[0]=(h*M-u*R+l*O)*P,i[1]=(u*C-a*M-l*A)*P,i[2]=(a*R-h*C+l*S)*P,i[3]=(s*R-r*M-o*O)*P,i[4]=(n*M-s*C+o*A)*P,i[5]=(r*C-n*R-o*S)*P,i[6]=(g*E-m*T+y*b)*P,i[7]=(m*_-v*E-y*w)*P,i[8]=(v*T-g*_+y*x)*P,this):null}});t.exports=n},function(t,e,i){ 1409/** 1410 * @author Richard Davey <[email protected]> 1411 * @copyright 2020 Photon Storm Ltd. 1412 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1413 */ 1414var n=i(0),r=i(358),s=i(1),o=i(38),a=1e-6,h=new Int8Array([1,2,0]),u=new Float32Array([0,0,0]),l=new o(1,0,0),c=new o(0,1,0),f=new o,d=new r,p=new n({initialize:function(t,e,i,n){this.onChangeCallback=s,this.set(t,e,i,n)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,n,r){return void 0===r&&(r=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=n||0),r&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n;return r>0&&(r=1/Math.sqrt(r),this._x=t*r,this._y=e*r,this._z=i*r,this._w=n*r),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z,s=this.w;return this.set(i+e*(t.x-i),n+e*(t.y-n),r+e*(t.z-r),s+e*(t.w-s))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(f.copy(l).cross(t).length()<a&&f.copy(c).cross(t),f.normalize(),this.setAxisAngle(f,Math.PI)):i>.999999?this.set(0,0,0,1):(f.copy(t).cross(e),this._x=f.x,this._y=f.y,this._z=f.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var n=d.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(d).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,n=this.z,r=this.w,s=t.x,o=t.y,a=t.z,h=t.w;return this.set(e*h+r*s+i*a-n*o,i*h+r*o+n*s-e*a,n*h+r*a+e*o-i*s,r*h-e*s-i*o-n*a)},slerp:function(t,e){var i=this.x,n=this.y,r=this.z,s=this.w,o=t.x,h=t.y,u=t.z,l=t.w,c=i*o+n*h+r*u+s*l;c<0&&(c=-c,o=-o,h=-h,u=-u,l=-l);var f=1-e,d=e;if(1-c>a){var p=Math.acos(c),v=Math.sin(p);f=Math.sin((1-e)*p)/v,d=Math.sin(e*p)/v}return this.set(f*i+d*o,f*n+d*h,f*r+d*u,f*s+d*l)},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n,s=r?1/r:0;return this.set(-t*s,-e*s,-i*s,n*s)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.set(e*o+r*s,i*o+n*s,n*o-i*s,r*o-e*s)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.set(e*o-n*s,i*o+r*s,n*o+e*s,r*o-i*s)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.set(e*o+i*s,i*o-e*s,n*o+r*s,r*o-n*s)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,n=t.y/2,r=t.z/2,s=Math.cos(i),o=Math.cos(n),a=Math.cos(r),h=Math.sin(i),u=Math.sin(n),l=Math.sin(r);switch(t.order){case"XYZ":this.set(h*o*a+s*u*l,s*u*a-h*o*l,s*o*l+h*u*a,s*o*a-h*u*l,e);break;case"YXZ":this.set(h*o*a+s*u*l,s*u*a-h*o*l,s*o*l-h*u*a,s*o*a+h*u*l,e);break;case"ZXY":this.set(h*o*a-s*u*l,s*u*a+h*o*l,s*o*l+h*u*a,s*o*a-h*u*l,e);break;case"ZYX":this.set(h*o*a-s*u*l,s*u*a+h*o*l,s*o*l-h*u*a,s*o*a+h*u*l,e);break;case"YZX":this.set(h*o*a+s*u*l,s*u*a+h*o*l,s*o*l-h*u*a,s*o*a-h*u*l,e);break;case"XZY":this.set(h*o*a-s*u*l,s*u*a-h*o*l,s*o*l+h*u*a,s*o*a+h*u*l,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,n=i[0],r=i[4],s=i[8],o=i[1],a=i[5],h=i[9],u=i[2],l=i[6],c=i[10],f=n+a+c;return f>0?(e=.5/Math.sqrt(f+1),this.set((l-h)*e,(s-u)*e,(o-r)*e,.25/e)):n>a&&n>c?(e=2*Math.sqrt(1+n-a-c),this.set(.25*e,(r+o)/e,(s+u)/e,(l-h)/e)):a>c?(e=2*Math.sqrt(1+a-n-c),this.set((r+o)/e,.25*e,(h+l)/e,(s-u)/e)):(e=2*Math.sqrt(1+c-n-a),this.set((s+u)/e,(h+l)/e,.25*e,(o-r)/e)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var r=0;i[4]>i[0]&&(r=1),i[8]>i[3*r+r]&&(r=2);var s=h[r],o=h[s];e=Math.sqrt(i[3*r+r]-i[3*s+s]-i[3*o+o]+1),u[r]=.5*e,e=.5/e,u[s]=(i[3*s+r]+i[3*r+s])*e,u[o]=(i[3*o+r]+i[3*r+o])*e,this._x=u[0],this._y=u[1],this._z=u[2],this._w=(i[3*o+s]-i[3*s+o])*e}return this.onChangeCallback(this),this}});t.exports=p},function(t,e,i){ 1415/** 1416 * @author Richard Davey <[email protected]> 1417 * @copyright 2020 Photon Storm Ltd. 1418 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1419 */ 1420var n=i(361),r=i(31),s=i(32),o=i(188);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===s.AUTO)throw new Error("Mu
1420st set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==s.HEADLESS)if(e.renderType===s.CANVAS||e.renderType!==s.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=s.CANVAS}else e.renderType=s.WEBGL;e.antialias||r.disableSmoothing();var a,h,u=t.scale.baseSize,l=u.width,c=u.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=l,t.canvas.height=c):t.canvas=r.create(t,l,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||n.setCrisp(t.canvas),e.renderType!==s.HEADLESS&&(a=i(362),h=i(365),e.renderType===s.WEBGL?t.renderer=new h(t):(t.renderer=new a(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach((function(e){t.style["image-rendering"]=e})),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){ 1421/** 1422 * @author Richard Davey <[email protected]> 1423 * @author Felipe Alfonso <@bitnenfer> 1424 * @copyright 2020 Photon Storm Ltd. 1425 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1426 */ 1427var n=i(36),r=i(363),s=i(0),o=i(32),a=i(9),h=i(88),u=i(364),l=i(101),c=i(103),f=i(25),d=new s({Extends:a,initialize:function(t){a.call(this);var e=t.config;this.config={clearBeforeRender:e.clearBeforeRender,backgroundColor:e.backgroundColor,antialias:e.antialias,roundPixels:e.roundPixels},this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=t.canvas;var i={alpha:t.config.transparent,desynchronized:t.config.desynchronized};this.gameContext=e.context?e.context:this.gameCanvas.getContext("2d",i),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=u(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new f,this._tempMatrix2=new f,this._tempMatrix3=new f,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(c.READY,this.boot,this)},boot:function(){var t=this.game,e=t.scale.baseSize;this.width=e.width,this.height=e.height,this.isBooted=!0,t.scale.on(l.RESIZE,this.onResize,this),this.resize(e.width,e.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e,this.emit(h.RESIZE,t,e)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n)),t.save(),this.drawCount=0,this.emit(h.PRE_RENDER)},render:function(t,e,i){var r=e.length;this.emit(h.RENDER,t,i);var s=i.x,o=i.y,a=i.width,u=i.height,l=i.renderToTexture?i.context:t.sys.context;l.save(),this.game.scene.customViewports&&(l.beginPath(),l.rect(s,o,a,u),l.clip()),this.currentContext=l;var c=i.mask;c&&c.preRenderCanvas(this,null,i._maskCamera),i.transparent||(l.fillStyle=i.backgroundColor.rgba,l.fillRect(s,o,a,u)),l.globalAlpha=i.alpha,l.globalCompositeOperation="source-over",this.drawCount+=r,i.renderToTexture&&i.emit(n.PRE_RENDER,i),i.matrix.copyToContext(l);for(var f=0;f<r;f++){var d=e[f];d.mask&&d.mask.preRenderCanvas(this,d,i),d.renderCanvas(this,d,i),d.mask&&d.mask.postRenderCanvas(this,d,i)}l.setTransform(1,0,0,1,0,0),l.globalCompositeOperation="source-over",l.globalAlpha=1,i.flashEffect.postRenderCanvas(l),i.fadeEffect.postRenderCanvas(l),i.dirty=!1,c&&c.postRenderCanvas(this),l.restore(
vendor: 4,243 bytes, lines 1427-1439
1427),i.renderToTexture&&(i.emit(n.POST_RENDER,i),i.renderToGame&&t.sys.context.drawImage(i.canvas,s,o))},postRender:function(){this.gameContext.restore(),this.emit(h.POST_RENDER);var t=this.snapshotState;t.callback&&(r(this.gameCanvas,t),t.callback=null)},snapshotCanvas:function(t,e,i,n,s,o,a,h,u){void 0===i&&(i=!1),this.snapshotArea(n,s,o,a,e,h,u);var l=this.snapshotState;return l.getPixel=i,r(this.canvas,l),l.callback=null,this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.gameCanvas.width,this.gameCanvas.height,t,e,i)},snapshotArea:function(t,e,i,n,r,s,o){var a=this.snapshotState;return a.callback=r,a.type=s,a.encoder=o,a.getPixel=!1,a.x=t,a.y=e,a.width=Math.min(i,this.gameCanvas.width),a.height=Math.min(n,this.gameCanvas.height),this},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i),this.snapshotState.getPixel=!0,this},batchSprite:function(t,e,i,n){var r=i.alpha*t.alpha;if(0!==r){var s=this.currentContext,o=this._tempMatrix1,a=this._tempMatrix2,h=e.canvasData,u=h.x,l=h.y,c=e.cutWidth,f=e.cutHeight,d=e.customPivot,p=e.source.resolution,v=t.displayOriginX,g=t.displayOriginY,m=-v+e.x,y=-g+e.y;if(t.isCropped){var x=t._crop;x.flipX===t.flipX&&x.flipY===t.flipY||e.updateCropUVs(x,t.flipX,t.flipY),c=x.cw,f=x.ch,u=x.cx,l=x.cy,m=-v+x.x,y=-g+x.y,t.flipX&&(m>=0?m=-(m+c):m<0&&(m=Math.abs(m)-c)),t.flipY&&(y>=0?y=-(y+f):y<0&&(y=Math.abs(y)-f))}var w=1,_=1;t.flipX&&(d||(m+=-e.realWidth+2*v),w=-1),t.flipY&&(d||(y+=-e.realHeight+2*g),_=-1),a.applyITRS(t.x,t.y,t.rotation,t.scaleX*w,t.scaleY*_),o.copyFrom(i.matrix),n?(o.multiplyWithOffset(n,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),a.e=t.x,a.f=t.y):(a.e-=i.scrollX*t.scrollFactorX,a.f-=i.scrollY*t.scrollFactorY),o.multiply(a),s.save(),o.setToContext(s),s.globalCompositeOperation=this.blendModes[t.blendMode],s.globalAlpha=r,s.imageSmoothingEnabled=!(!this.antialias||e.source.scaleMode),t.mask&&t.mask.preRenderCanvas(this,t,i),s.drawImage(e.source.image,u,l,c,f,m,y,c/p,f/p),t.mask&&t.mask.postRenderCanvas(this,t,i),s.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});t.exports=d},function(t,e,i){ 1428/** 1429 * @author Richard Davey <[email protected]> 1430 * @copyright 2020 Photon Storm Ltd. 1431 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1432 */ 1433var n=i(31),r=i(37),s=i(2);t.exports=function(t,e){var i=s(e,"callback"),o=s(e,"type","image/png"),a=s(e,"encoder",.92),h=Math.abs(Math.round(s(e,"x",0))),u=Math.abs(Math.round(s(e,"y",0))),l=s(e,"width",t.width),c=s(e,"height",t.height);if(s(e,"getPixel",!1)){var f=t.getContext("2d").getImageData(h,u,1,1).data;i.call(null,new r(f[0],f[1],f[2],f[3]/255))}else if(0!==h||0!==u||l!==t.width||c!==t.height){var d=n.createWebGL(this,l,c);d.getContext("2d").drawImage(t,h,u,l,c,0,0,l,c);var p=new Image;p.onerror=function(){i.call(null),n.remove(d)},p.onload=function(){i.call(null,p),n.remove(d)},p.src=d.toDataURL(o,a)}else{var v=new Image;v.onerror=function(){i.call(null)},v.onload=function(){i.call(null,v)},v.src=t.toDataURL(o,a)}}},function(t,e,i){ 1434/** 1435 * @author Richard Davey <[email protected]> 1436 * @copyright 2020 Photon Storm Ltd. 1437 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1438 */ 1439var n=i(34),r=i(342);t.exports=function(){var t=[],e=r.supportNewBlendModes,i="source-over";return t[n.NORMAL]=i,t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":i,t[n.SCREEN]=e?"screen":i,t[n.OVERLAY]=e?"overlay":i,t[n.DARKEN]=e?"darken":i,t[n.LIGHTEN]=e?"lighten":i,t[n.COLOR_DODGE]=e?"color-dodge":i,t[n.COLOR_BURN]=e?"color-burn":i,t[n.HARD_LIGHT]=e?"hard-light":i,t[n.SOFT_LIGHT]=e?"soft-light":i,t[n.DIFFERENCE]=e?"difference":i,t[n.EXCLUSION]=e?"exclusion":i,t[n.HUE]=e?"hue":i,t[n.SATURATION]=e?"saturation":i,t[n.COLOR]=e?"color":i,t[n.LUMINOSITY]=e?"luminosity":i,t[n.ERASE]="destination-out",t[n.SOURCE_IN]="source-in",t[n.SOURCE_OUT]="source-out",t[n.SOURCE_ATOP]="source-atop",t[n.DESTINATION_OVER]="destination-over",t[n.DESTINATION_IN]="destination-in",t[n.DESTINATION_OUT]="destination-out",t[n.DESTINATION_ATOP]="destination-atop",t[n.LIGHTER]="lighter",t[n.COPY]="copy",t[n.XOR]="xor",t}}
1439,function(t,e,i){ 1440/** 1441 * @author Richard Davey <[email protected]> 1442 * @author Felipe Alfonso <@bitnenfer> 1443 * @copyright 2020 Photon Storm Ltd. 1444 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1445 */ 1446var n=i(89),r=i(36),s=i(0),o=i(32),a=i(9),h=i(88),u=i(22),l=i(136),c=i(67),f=i(1),d=i(366),p=i(139),v=i(101),g=i(103),m=i(12),y=i(377),x=new s({Extends:a,initialize:function(t){a.call(this);var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!1,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=o.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.currentActiveTexture=0,this.startActiveTexture=0,this.maxTextures=0,this.textureIndexes,this.tempTextures,this.textureZero,this.normalTexture,this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=f,this.contextRestoredHandler=f,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats=[],this.compression={ETC1:!1,PVRTC:!1,S3TC:!1},this.drawingBufferHeight=0,this.blankTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.textureFlush=0,this.isTextureClean=!1,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.init(this.config)},init:function(t){var e,i=this.game,n=this.canvas,r=t.backgroundColor;if(!(e=i.config.context?i.config.context:n.getContext("webgl",t.contextCreation)||n.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var s=this;this.contextLostHandler=function(t){s.contextLost=!0,s.game.events.emit(u.CONTEXT_LOST,s),t.preventDefault()},this.contextRestoredHandler=function(){s.contextLost=!1,s.init(s.config),s.game.events.emit(u.CONTEXT_RESTORED,s)},n.addEventListener("webglcontextlost",this.contextLostHandler,!1),n.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),i.context=e;for(var a=0;a<=27;a++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats[0]=e.BYTE,this.glFormats[1]=e.SHORT,this.glFormats[2]=e.UNSIGNED_BYTE,this.glFormats[3]=e.UNSIGNED_SHORT,this.glFormats[4]=e.FLOAT,this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}};
1446var h=e.getSupportedExtensions();t.maxTextures&&-1!==t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE));var l="WEBGL_compressed_texture_",f="WEBKIT_"+l;this.compression.ETC1=e.getExtension(l+"etc1")||e.getExtension(f+"etc1"),this.compression.PVRTC=e.getExtension(l+"pvrtc")||e.getExtension(f+"pvrtc"),this.compression.S3TC=e.getExtension(l+"s3tc")||e.getExtension(f+"s3tc"),this.supportedExtensions=h;var p="ANGLE_instanced_arrays";this.instancedArraysExtension=h.indexOf(p)>-1?e.getExtension(p):null;var v="OES_vertex_array_object";this.vaoExtension=h.indexOf(v)>-1?e.getExtension(v):null,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(r.redGL,r.greenGL,r.blueGL,r.alphaGL),this.mipmapFilter=e[t.mipmapFilter],this.maxTextures=m.checkShaderMax(e,t.maxTextures),this.textureIndexes=[];var y=this.tempTextures;if(Array.isArray(y))for(var x=0;a<this.maxTextures;x++)e.deleteTexture(y[x]);else y=new Array(this.maxTextures);for(var w=0;w<this.maxTextures;w++){var _=e.createTexture();e.activeTexture(e.TEXTURE0+w),e.bindTexture(e.TEXTURE_2D,_),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([0,0,255,255])),y[w]=_,this.textureIndexes.push(w)}return this.tempTextures=y,this.currentActiveTexture=1,this.startActiveTexture++,e.activeTexture(e.TEXTURE1),this.pipelines=new d(this),this.setBlendMode(o.BlendModes.NORMAL),this.projectionMatrix=(new c).identity(),i.textures.once(g.READY,this.boot,this),this},boot:function(){var t=this.game,e=this.pipelines,i=t.scale.baseSize;this.width=i.width,this.height=i.height,this.isBooted=!0,this.renderTarget=new p(this,this.width,this.height,1,0,!0,!0),e.boot(t.config.pipeline),this.blankTexture=t.textures.getFrame("__DEFAULT"),this.whiteTexture=t.textures.getFrame("__WHITE");var n=this.gl;n.bindFramebuffer(n.FRAMEBUFFER,null),n.enable(n.SCISSOR_TEST),t.scale.on(v.RESIZE,this.onResize,this),this.resize(i.width,i.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},beginCapture:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.renderTarget.bind(!0,t,e),this.setProjectionMatrix(t,e),this.resetTextures()},endCapture:function(){return this.renderTarget.unbind(!0),this.resetProjectionMatrix(),this.renderTarget},resize:function(t,e){var i=this.gl;return this.width=t,this.height=e,this.setProjectionMatrix(t,e),i.viewport(0,0,t,e),this.drawingBufferHeight=i.drawingBufferHeight,i.scissor(0,i.drawingBufferHeight-e,t,e),this.defaultScissor[2]=t,this.defaultScissor[3]=e,this.emit(h.RESIZE,t,e),this},getAspectRatio:function(){return this.width/this.height},setProjectionMatrix:function(t,e){return t===this.projectionWidth&&e===this.projectionHeight||(this.projectionWidth=t,this.projectionHeight=e,this.projectionMatrix.ortho(0,t,e,0,-1e3,1e3)),this},resetProjectionMatrix:function(){this.projectionWidth=this.width,this.projectionHeight=this.height,this.projectionMatrix.ortho(0,this.width,this.height,0,-1e3,1e3)},hasExtension:function(t){return!!this.supportedExtensions&&this.supportedExtensions.indexOf(t)},getExtension:function(t){return this.hasExtension(t)?(t in this.extensions||(this.extensions[t]=this.gl.getExtension(t)),this.extensions[t]):null},flush:function(){this.pipelines.flush()},pushScissor:function(t,e,i,n,r){void 0===r&&(r=this.drawingBufferHeight);var s=[t,e,i,n];return this.scissorStack.push(s),this.setScissor(t,e,i,n,r),this.currentScissor=s,s},setScissor:function(t,e,i,n,r){void 0===r&&(r=this.drawingBufferHeight);var s=this.gl,o=this.currentScissor,a=i>0&&n>0;if(o&&a){var h=o[0],u=o[1],l=o[2],c=o[3];a=h!==t||u!==e||l!==i||c!==n}a&&(this.flush(),s.scissor(t,r-e-n,i,n))},resetScissor:function(){var t=this.gl;t.enable(t.SCISSOR_TEST);var e=this.currentScissor;if(e){var i=e[0],n=e[1],r=e[2],s=e[3];r>0&&s>0&&t.scissor(i,this.drawingBufferHeight-n-s,r,s)}},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},resetViewport:function(){var t=this.gl;t.viewport(0,0,this.width,this.height),this.drawingBufferHeight=t.drawingBufferHeight},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.blendModes[t];return!!(e||t!==o.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(n.equation),n.func.length>2?i.blendFuncSeparate(n.func[0],n.func[1],n.func[2],n.func[3]):i.blendFunc(n.func[0],n.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1}
1446,updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setBlankTexture:function(){this.setTexture2D(this.blankTexture.glTexture)},setTextureSource:function(t){if(this.pipelines.forceZero())return this.setTextureZero(t.glTexture,!0),0;var e=this.gl,i=this.currentActiveTexture;return t.glIndexCounter<this.startActiveTexture&&(t.glIndexCounter=this.startActiveTexture,i<this.maxTextures?(t.glIndex=i,e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,t.glTexture),this.currentActiveTexture++):(this.flush(),this.startActiveTexture++,this.textureFlush++,t.glIndexCounter=this.startActiveTexture,t.glIndex=1,e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,t.glTexture),this.currentActiveTexture=2)),this.isTextureClean=!1,t.glIndex},isNewNormalMap:function(t,e){return this.textureZero!==t||this.normalTexture!==e},setTextureZero:function(t,e){if(this.textureZero!==t){e&&this.flush();var i=this.gl;i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,t),this.textureZero=t}},clearTextureZero:function(){this.textureZero=null},setNormalMap:function(t){if(this.normalTexture!==t){var e=this.gl;e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,t),this.normalTexture=t,1===this.currentActiveTexture&&(this.currentActiveTexture=2)}},clearNormalMap:function(){this.normalTexture=null,this.startActiveTexture++,this.currentActiveTexture=1,this.textureFlush++},unbindTextures:function(){for(var t=this.gl,e=this.tempTextures,i=0;i<e.length;i++)t.activeTexture(t.TEXTURE0+i),t.bindTexture(t.TEXTURE_2D,null);this.normalTexture=null,this.textureZero=null,this.currentActiveTexture=1,this.startActiveTexture++,this.textureFlush++},resetTextures:function(t){if(void 0===t&&(t=!1),!this.isTextureClean){this.flush();var e=this.gl,i=this.tempTextures;if(t){for(var n=0;n<i.length;n++)e.activeTexture(e.TEXTURE0+n),e.bindTexture(e.TEXTURE_2D,i[n]);e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,i[1]),this.isTextureClean=!0}else e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,i[0]),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,i[1]);this.normalTexture=null,this.textureZero=null,this.currentActiveTexture=1,this.startActiveTexture++,this.textureFlush++}},setTexture2D:function(t){if(this.pipelines.forceZero())return this.setTextureZero(t,!0),0;var e=this.gl,i=this.currentActiveTexture;return t.glIndexCounter<this.startActiveTexture&&(t.glIndexCounter=this.startActiveTexture,i<this.maxTextures?(t.glIndex=i,e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,t),this.currentActiveTexture++):(this.flush(),this.startActiveTexture++,this.textureFlush++,t.glIndexCounter=this.startActiveTexture,t.glIndex=1,e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,t),this.currentActiveTexture=2)),this.isTextureClean=!1,t.glIndex},pushFramebuffer:function(t,e,i,n){return t===this.currentFramebuffer?this:(this.fboStack.push(t),this.setFramebuffer(t,e,i,n))},setFramebuffer:function(t,e,i,n){if(void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=!0),t===this.currentFramebuffer)return this;var r=this.gl,s=this.width,o=this.height;return t&&t.renderTexture&&n?(s=t.renderTexture.width,o=t.renderTexture.height):this.flush(),r.bindFramebuffer(r.FRAMEBUFFER,t),n&&r.viewport(0,0,s,o),e&&(t?(this.drawingBufferHeight=o,this.pushScissor(0,0,s,o)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t,i&&this.resetTextures(),this},popFramebuffer:function(t,e,i){void 0===t&&(t=!1),void 0===e&&(e=!1),void 0===i&&(i=!0);var n=this.fboStack;n.pop();var r=n[n.length-1];return r||(r=null),this.setFramebuffer(r,t,e,i),r},setProgram:function(t){return t!==this.currentProgram&&(this.flush(),this.gl.useProgram(t),this.currentProgram=t,!0)},resetProgram:function(){return this.gl.useProgram(this.currentProgram),this},createTextureFromSource:function(t,e,i,n){var r=this.gl,s=r.NEAREST,a=r.NEAREST,h=r.CLAMP_TO_EDGE;e=t?t.width:e,i=t?t.height:i;var u=l(e,i);return u&&(h=r.REPEAT),n===o.ScaleModes.LINEAR&&this.config.antialias&&(s=u?this.mipmapFilter:r.LINEAR,a=r.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,s,a,h,h,r.RGBA,t):this.createTexture2D(0,s,a,h,h,r.RGBA,null,e,i)}
1446,createTexture2D:function(t,e,i,n,r,s,o,a,h,u,c,f){u=null==u||u,void 0===c&&(c=!1),void 0===f&&(f=!1);var d=this.gl,p=d.createTexture();d.activeTexture(d.TEXTURE0);var v=d.getParameter(d.TEXTURE_BINDING_2D);return d.bindTexture(d.TEXTURE_2D,p),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,e),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,i),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,r),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,n),d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,f),null==o?d.texImage2D(d.TEXTURE_2D,t,s,a,h,0,s,d.UNSIGNED_BYTE,null):(c||(a=o.width,h=o.height),d.texImage2D(d.TEXTURE_2D,t,s,s,d.UNSIGNED_BYTE,o)),l(a,h)&&d.generateMipmap(d.TEXTURE_2D),v&&d.bindTexture(d.TEXTURE_2D,v),p.isAlphaPremultiplied=u,p.isRenderTexture=!1,p.width=a,p.height=h,p.glIndex=0,p.glIndexCounter=-1,p},createFramebuffer:function(t,e,i,n){var r,s=this.gl,o=s.createFramebuffer();if(this.setFramebuffer(o),n){var a=s.createRenderbuffer();s.bindRenderbuffer(s.RENDERBUFFER,a),s.renderbufferStorage(s.RENDERBUFFER,s.DEPTH_STENCIL,t,e),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,i,0),(r=s.checkFramebufferStatus(s.FRAMEBUFFER))!==s.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[r]);return o.renderTexture=i,this.setFramebuffer(null),this.resetTextures(),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),r=i.createShader(i.VERTEX_SHADER),s=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(r,t),i.shaderSource(s,e),i.compileShader(r),i.compileShader(s),!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Vertex Shader failed:\n"+i.getShaderInfoLog(r));if(!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Fragment Shader failed:\n"+i.getShaderInfoLog(s));if(i.attachShader(n,r),i.attachShader(n,s),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Link Program failed:\n"+i.getProgramInfoLog(n));return i.useProgram(n),n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return i.bindBuffer(i.ARRAY_BUFFER,n),i.bufferData(i.ARRAY_BUFFER,t,e),i.bindBuffer(i.ARRAY_BUFFER,null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,null),n},deleteTexture:function(t,e){return t&&this.gl.deleteTexture(t),e&&this.resetTextures(),this},deleteFramebuffer:function(t){return t&&(this.gl.deleteFramebuffer(t),n(this.fboStack,t),this.currentFramebuffer===t&&(this.currentFramebuffer=null)),this},deleteProgram:function(t){return t&&this.gl.deleteProgram(t),this},deleteBuffer:function(t){return this.gl.deleteBuffer(t),this},preRenderCamera:function(t){var e=t.x,i=t.y,n=t.width,s=t.height,o=t.backgroundColor;t.emit(r.PRE_RENDER,t),this.pipelines.preBatchCamera(t),this.pushScissor(e,i,n,s),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),o.alphaGL>0&&this.pipelines.setMulti().drawFillRect(e,i,n,s,m.getTintFromFloats(o.blueGL,o.greenGL,o.redGL,1),o.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e=t.flashEffect,i=t.fadeEffect;if(e.isRunning||i.isRunning||i.isComplete){var n=this.pipelines.setMulti();e.postRenderWebGL(n,m.getTintFromFloats),i.postRenderWebGL(n,m.getTintFromFloats)}t.dirty=!1,this.popScissor(),t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera)),this.pipelines.postBatchCamera(t),t.emit(r.POST_RENDER,t)},preRender:function(){if(!this.contextLost){var t=this.gl;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var e=this.config.backgroundColor;t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}t.enable(t.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.textureFlush=0,this.emit
1446(h.PRE_RENDER)}},render:function(t,e,i){if(!this.contextLost){var n=e.length;if(this.emit(h.RENDER,t,i),this.preRenderCamera(i),0===n)return this.setBlendMode(o.BlendModes.NORMAL),void this.postRenderCamera(i);this.currentType="";for(var r=this.currentMask,s=0;s<n;s++){this.finalType=s===n-1;var a=e[s],u=a.mask;(r=this.currentMask).mask&&r.mask!==u&&r.mask.postRenderWebGL(this,r.camera),u&&r.mask!==u&&u.preRenderWebGL(this,a,i),a.blendMode!==this.currentBlendMode&&this.setBlendMode(a.blendMode);var l=a.type;l!==this.currentType&&(this.newType=!0,this.currentType=l),this.finalType?this.nextTypeMatch=!1:this.nextTypeMatch=e[s+1].type===this.currentType,a.renderWebGL(this,a,i),this.newType=!1}(r=this.currentMask).mask&&r.mask.postRenderWebGL(this,r.camera),this.setBlendMode(o.BlendModes.NORMAL),this.postRenderCamera(i)}},postRender:function(){if(!this.contextLost){this.flush(),this.emit(h.POST_RENDER);var t=this.snapshotState;t.callback&&(y(this.canvas,t),t.callback=null),this.textureFlush>0&&(this.startActiveTexture++,this.currentActiveTexture=1)}},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,t,e,i)},snapshotArea:function(t,e,i,n,r,s,o){var a=this.snapshotState;return a.callback=r,a.type=s,a.encoder=o,a.getPixel=!1,a.x=t,a.y=e,a.width=Math.min(i,this.gl.drawingBufferWidth),a.height=Math.min(n,this.gl.drawingBufferHeight),this},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i),this.snapshotState.getPixel=!0,this},snapshotFramebuffer:function(t,e,i,n,r,s,o,a,h,u,l){void 0===r&&(r=!1),void 0===s&&(s=0),void 0===o&&(o=0),void 0===a&&(a=e),void 0===h&&(h=i);var c=this.currentFramebuffer;this.snapshotArea(s,o,a,h,n,u,l);var f=this.snapshotState;return f.getPixel=r,f.isFramebuffer=!0,f.bufferWidth=e,f.bufferHeight=i,this.setFramebuffer(t),y(this.canvas,f),this.setFramebuffer(c),f.callback=null,f.isFramebuffer=!1,this},canvasToTexture:function(t,e,i,n){return void 0===i&&(i=!1),void 0===n&&(n=!1),e?this.updateCanvasTexture(t,e,n):this.createCanvasTexture(t,i,n)},createCanvasTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,r=n.NEAREST,s=n.NEAREST,o=t.width,a=t.height,h=n.CLAMP_TO_EDGE,u=l(o,a);return!e&&u&&(h=n.REPEAT),this.config.antialias&&(r=u?this.mipmapFilter:n.LINEAR,s=n.LINEAR),this.createTexture2D(0,r,s,h,h,n.RGBA,t,o,a,!0,!1,i)},updateCanvasTexture:function(t,e,i){void 0===i&&(i=!1);var n=this.gl,r=t.width,s=t.height;if(r>0&&s>0){n.activeTexture(n.TEXTURE0);var o=n.getParameter(n.TEXTURE_BINDING_2D);n.bindTexture(n.TEXTURE_2D,e),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=r,e.height=s,o&&n.bindTexture(n.TEXTURE_2D,o)}return e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,r=n.NEAREST,s=n.NEAREST,o=t.videoWidth,a=t.videoHeight,h=n.CLAMP_TO_EDGE,u=l(o,a);return!e&&u&&(h=n.REPEAT),this.config.antialias&&(r=u?this.mipmapFilter:n.LINEAR,s=n.LINEAR),this.createTexture2D(0,r,s,h,h,n.RGBA,t,o,a,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var n=this.gl,r=t.videoWidth,s=t.videoHeight;if(r>0&&s>0){n.activeTexture(n.TEXTURE0);var o=n.getParameter(n.TEXTURE_BINDING_2D);n.bindTexture(n.TEXTURE_2D,e),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=r,e.height=s,o&&n.bindTexture(n.TEXTURE_2D,o)}return e},setTextureFilter:function(t,e){var i=this.gl,n=[i.LINEAR,i.NEAREST][e];i.activeTexture(i.TEXTURE0);var r=i.getParameter(i.TEXTURE_BINDING_2D);return i.bindTexture(i.TEXTURE_2D,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,n),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,n),r&&i.bindTexture(i.TEXTURE_2D,r),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.removeEventListener("webglcontextrestored",this.contextRestoredHandler,!1);for(var t=this.gl,e=this.tempTextures,i=0;i<e.length;i++)t.deleteTexture(e[i]);this.pipelines.destroy(),this.removeAllListeners(),this.fboStack=[],this.maskStack=[],this.extensions={},this.textureIndexes=[],this.gl=null,this.game=null,this.canvas=null,this.contextLost=!0,this.currentMask=null,this.currentCameraMask=null}});t.exports=x}
1446,function(t,e,i){ 1447/** 1448 * @author Richard Davey <[email protected]> 1449 * @copyright 2020 Photon Storm Ltd. 1450 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1451 */ 1452var n=i(0),r=i(65),s=i(99),o=i(367),a=i(370),h=i(371),u=i(105),l=i(372),c=i(373),f=i(374),d=i(375),p=new n({initialize:function(t){this.game=t.game,this.renderer=t,this.classes=new s([[r.UTILITY_PIPELINE,d],[r.MULTI_PIPELINE,u],[r.BITMAPMASK_PIPELINE,o],[r.SINGLE_PIPELINE,f],[r.ROPE_PIPELINE,c],[r.LIGHT_PIPELINE,h],[r.POINTLIGHT_PIPELINE,l],[r.GRAPHICS_PIPELINE,a]]),this.postPipelineClasses=new s,this.pipelines=new s,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(t){var e,i,n=this,s=this.game;if(this.classes.each((function(t,i){e=n.add(t,new i({game:s})),t===r.UTILITY_PIPELINE&&(n.UTILITY_PIPELINE=e,n.fullFrame1=e.fullFrame1,n.fullFrame2=e.fullFrame2,n.halfFrame1=e.halfFrame1,n.halfFrame2=e.halfFrame2)})),this.MULTI_PIPELINE=this.get(r.MULTI_PIPELINE),this.BITMAPMASK_PIPELINE=this.get(r.BITMAPMASK_PIPELINE),t)for(i in t){var o=t[i];(e=new o(s)).isPostFX?this.postPipelineClasses.set(i,o):this.has(i)||(this.classes.set(i,o),this.add(i,e))}},add:function(t,e){if(!e.isPostFX){var i=this.pipelines,n=this.renderer;return i.has(t)?console.warn("Pipeline exists: "+t):(e.name=t,e.manager=this,i.set(t,e)),e.hasBooted||e.boot(),0!==n.width&&0!==n.height&&e.resize(n.width,n.height),e}console.warn(t+" is a Post Pipeline. Use `addPostPipeline` instead")},addPostPipeline:function(t,e){this.postPipelineClasses.has(t)||this.postPipelineClasses.set(t,e)},flush:function(){this.current&&this.current.flush()},has:function(t){var e=this.pipelines;return"string"==typeof t?e.has(t):!!e.contains(t)},get:function(t){var e=this.pipelines;return"string"==typeof t?e.get(t):e.contains(t)?t:void 0},getPostPipeline:function(t,e){var i,n=this.postPipelineClasses;if("string"==typeof t?i=n.get(t):"function"==typeof t?n.contains(t)&&(i=t):"object"==typeof t&&(i=n.get(t.name)),i){var r=new i(this.game);return e&&(r.gameObject=e),r}},remove:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!0),this.pipelines.delete(t),e&&this.classes.delete(t),i&&this.postPipelineClasses.delete(t)},set:function(t,e,i){if(!t.isPostFX)return this.isCurrent(t,i)||(this.flush(),this.current&&this.current.unbind(),this.current=t,t.bind(i)),t.updateProjectionMatrix(),t.onBind(e),t},preBatch:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=e.length-1;i>=0;i--){var n=e[i];n.active&&n.preBatch(t)}}},postBatch:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i<e.length;i++){var n=e[i];n.active&&n.postBatch(t)}}},preBatchCamera:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=e.length-1;i>=0;i--){var n=e[i];n.active&&n.preBatch(t)}}},postBatchCamera:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i<e.length;i++){var n=e[i];n.active&&n.postBatch(t)}}},isCurrent:function(t,e){var i=this.renderer,n=this.current;return n&&!e&&(e=n.currentShader),!(n!==t||e.program!==i.currentProgram)},copyFrame:function(t,e,i,n,r){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyFrame(t,e,i,n,r),this},copyToGame:function(t){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyToGame(t),this},drawFrame:function(t,e,i,n){return this.setUtility(this.UTILITY_PIPELINE.colorMatrixShader).drawFrame(t,e,i,n),this},blendFrames:function(t,e,i,n,r){return this.setUtility(this.UTILITY_PIPELINE.linearShader).blendFrames(t,e,i,n,r),this},blendFramesAdditive:function(t,e,i,n,r){return this.setUtility(this.UTILITY_PIPELINE.addShader).blendFramesAdditive(t,e,i,n,r),this},clearFrame:function(t,e){return this.UTILITY_PIPELINE.clearFrame(t,e),this},blitFrame:function(t,e,i,n,r,s){return this.setUtility(this.UTILITY_PIPELINE.copyShader).blitFrame(t,e,i,n,r,s),this},copyFrameRect:function(t,e,i,n,r,s,o,a){return this.UTILITY_PIPELINE.copyFrameRect(t,e,i,n,r,s,o,a),this},forceZero:function(){return this.current&&this.current.forceZero},setMulti:function(){return this.set(this.MULTI_PIPELINE)},setUtility:function(t){return this.UTILITY_PIPELINE.bind(t)},rebind:function(t){void 0===t&&this.previous&&(t=this.previous);var e=this.renderer,i=e.gl;i.disable(i.DEPTH_TEST),i.disable(i.CULL_FACE),e.hasActiveStencilMask()?i.clear(i.DEPTH_BUFFER_BIT):(i.disable(i.STENCIL_TEST),i.clear(i.DEPTH_BUFFER_BIT|i.STENCIL_BUFFER_BIT)),i.viewport(0,0,e.width,e.height),e.currentProgram=null,e.setBlendMode(0,!0),t&&(this.current=t,t.rebind()),e.resetTextures()},clear:function(){var t=this.renderer;this.flush(),this.current?(this.current.unbind(),this.previous=this.current,this.current=null):this.previous=null,t.currentProgram=null,t.setBlendMode(0,!0)},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.current=null,this.previous=null}});t.exports=p}
1452,function(t,e,i){ 1453/** 1454 * @author Richard Davey <[email protected]> 1455 * @author Felipe Alfonso <@bitnenfer> 1456 * @copyright 2020 Photon Storm Ltd. 1457 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1458 */ 1459var n=i(0),r=i(2),s=i(862),o=i(863),a=i(104),h=i(57),u=new n({Extends:h,initialize:function(t){t.fragShader=r(t,"fragShader",s),t.vertShader=r(t,"vertShader",o),t.batchSize=r(t,"batchSize",1),t.vertices=r(t,"vertices",[-1,1,-1,-7,7,1]),t.attributes=r(t,"attributes",[{name:"inPosition",size:2,type:a.FLOAT}]),h.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(t,e){h.prototype.resize.call(this,t,e),this.set2f("uResolution",t,e)},beginMask:function(t,e,i){var n=this.gl;if(t.bitmapMask&&n){var r=this.renderer;r.flush(),r.pushFramebuffer(t.mainFramebuffer),n.disable(n.STENCIL_TEST),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),r.currentCameraMask.mask!==t&&(r.currentMask.mask=t,r.currentMask.camera=i)}},endMask:function(t,e){var i=this.gl,n=this.renderer,r=t.bitmapMask;if(r&&i){n.flush(),n.pushFramebuffer(t.maskFramebuffer),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),n.setBlendMode(0,!0),r.renderWebGL(n,r,e),n.flush(),n.popFramebuffer(),n.popFramebuffer();var s=n.getCurrentStencilMask();s?(i.enable(i.STENCIL_TEST),s.mask.applyStencil(n,s.camera,!0)):n.currentMask.mask=null,n.pipelines.set(this),i.activeTexture(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,t.maskTexture),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,t.mainTexture),this.set1i("uInvertMaskAlpha",t.invertAlpha),i.drawArrays(this.topology,0,3),n.resetTextures()}}});t.exports=u},function(t,e,i){ 1460/** 1461 * @author Richard Davey <[email protected]> 1462 * @copyright 2020 Photon Storm Ltd. 1463 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1464 */ 1465t.exports={AFTER_FLUSH:i(864),BEFORE_FLUSH:i(865),BIND:i(866),BOOT:i(867),DESTROY:i(868),REBIND:i(869),RESIZE:i(870)}},function(t,e,i){ 1466/** 1467 * @author Richard Davey <[email protected]> 1468 * @copyright 2020 Photon Storm Ltd. 1469 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1470 */ 1471var n=i(0),r=i(2),s=i(104),o=new n({initialize:function(t,e,i,n,r){this.pipeline=t,this.name=e,this.renderer=t.renderer,this.gl=this.renderer.gl,this.program=this.renderer.createProgram(i,n),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(r),this.createUniforms()},createAttributes:function(t){var e=0,i=0,n=[];this.vertexComponentCount=0;for(var o=0;o<t.length;o++){var a=t[o],h=a.name,u=r(a,"size",1),l=r(a,"type",s.FLOAT),c=l.enum,f=l.size,d=!!a.normalized;n.push({name:h,size:u,type:c,normalized:d,offset:i,enabled:!1,location:-1}),4===f?e+=u:e++,i+=u*f}this.vertexSize=i,this.vertexComponentCount=e,this.attributes=n},bind:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),e&&this.pipeline.flush(),this.renderer.setProgram(this.program),t&&this.setAttribPointers(),this},rebind:function(){return this.renderer.setProgram(this.program),this.setAttribPointers(!0),this},setAttribPointers:function(t){void 0===t&&(t=!1);for(var e=this.gl,i=this.vertexSize,n=this.attributes,r=this.program,s=0;s<n.length;s++){var o=n[s],a=o.size,h=o.type,u=o.offset,l=o.enabled,c=o.location,f=!!o.normalized;if(t){var d=e.getAttribLocation(r,o.name);d>=0?(e.enableVertexAttribArray(d),e.vertexAttribPointer(d,a,h,f,i,u),o.enabled=!0,o.location=d):-1!==d&&e.disableVertexAttribArray(d)}else l?e.vertexAttribPointer(c,a,h,f,i,u):!l&&c>-1&&(e.disableVertexAttribArray(c),o.location=-1)}return this},createUniforms:function(){var t,e,i,n=this.gl,r=this.program,s=this.uniforms,o=n.getProgramParameter(r,n.ACTIVE_UNIFORMS);for(t=0;t<o;t++){var a=n.getActiveUniform(r,t);if(a){e=a.name,null!==(i=n.getUniformLocation(r,e))&&(s[e]={name:e,location:i,value1:null,value2:null,value3:null,value4:null});var h=e.indexOf("[");h>0&&(e=e.substr(0,h),s.hasOwnProperty(e)||null!==(i=n.getUniformLocation(r,e))&&(s[e]={name:e,location:i,value1:null,value2:null,value3:null,value4:null}))}}return this},hasUniform:function(t){return this.uniforms.hasOwnProperty(t)},resetUniform:function(t){var e=this.uniforms[t];return e&&(e.value1=null,e.value2=null,e.value3=null,e.value4=null),this}
1471,setUniform1:function(t,e,i){var n=this.uniforms[e];return n?(n.value1!==i&&(n.value1=i,this.renderer.setProgram(this.program),t.call(this.gl,n.location,i),this.pipeline.currentShader=this),this):this},setUniform2:function(t,e,i,n){var r=this.uniforms[e];return r?(r.value1===i&&r.value2===n||(r.value1=i,r.value2=n,this.renderer.setProgram(this.program),t.call(this.gl,r.location,i,n),this.pipeline.currentShader=this),this):this},setUniform3:function(t,e,i,n,r){var s=this.uniforms[e];return s?(s.value1===i&&s.value2===n&&s.value3===r||(s.value1=i,s.value2=n,s.value3=r,this.renderer.setProgram(this.program),t.call(this.gl,s.location,i,n,r),this.pipeline.currentShader=this),this):this},setUniform4:function(t,e,i,n,r,s){var o=this.uniforms[e];return o?(o.value1===i&&o.value2===n&&o.value3===r&&o.value4===s||(o.value1=i,o.value2=n,o.value3=r,o.value4=s,this.renderer.setProgram(this.program),t.call(this.gl,o.location,i,n,r,s),this.pipeline.currentShader=this),this):this},set1f:function(t,e){return this.setUniform1(this.gl.uniform1f,t,e)},set2f:function(t,e,i){return this.setUniform2(this.gl.uniform2f,t,e,i)},set3f:function(t,e,i,n){return this.setUniform3(this.gl.uniform3f,t,e,i,n)},set4f:function(t,e,i,n,r){return this.setUniform4(this.gl.uniform4f,t,e,i,n,r)},set1fv:function(t,e){return this.setUniform1(this.gl.uniform1fv,t,e)},set2fv:function(t,e){return this.setUniform1(this.gl.uniform2fv,t,e)},set3fv:function(t,e){return this.setUniform1(this.gl.uniform3fv,t,e)},set4fv:function(t,e){return this.setUniform1(this.gl.uniform4fv,t,e)},set1iv:function(t,e){return this.setUniform1(this.gl.uniform1iv,t,e)},set2iv:function(t,e){return this.setUniform1(this.gl.uniform2iv,t,e)},set3iv:function(t,e){return this.setUniform1(this.gl.uniform3iv,t,e)},set4iv:function(t,e){return this.setUniform1(this.gl.uniform4iv,t,e)},set1i:function(t,e){return this.setUniform1(this.gl.uniform1i,t,e)},set2i:function(t,e,i){return this.setUniform2(this.gl.uniform2i,t,e,i)},set3i:function(t,e,i,n){return this.setUniform3(this.gl.uniform3i,t,e,i,n)},set4i:function(t,e,i,n,r){return this.setUniform4(this.gl.uniform4i,t,e,i,n,r)},setMatrix2fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix2fv,t,e,i)},setMatrix3fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix3fv,t,e,i)},setMatrix4fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix4fv,t,e,i)},destroy:function(){this.gl.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null,this.attributes=null,this.uniforms=null}});t.exports=o},function(t,e,i){ 1472/** 1473 * @author Richard Davey <[email protected]> 1474 * @author Felipe Alfonso <@bitnenfer> 1475 * @copyright 2020 Photon Storm Ltd. 1476 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1477 */ 1478var n=i(0),r=i(68),s=i(2),o=i(871),a=i(872),h=i(25),u=i(104),l=i(57),c=new n({Extends:l,initialize:function(t){t.fragShader=s(t,"fragShader",o),t.vertShader=s(t,"vertShader",a),t.attributes=s(t,"attributes",[{name:"inPosition",size:2},{name:"inColor",size:4,type:u.UNSIGNED_BYTE,normalized:!0}]),l.call(this,t),this.calcMatrix=new h,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},batchFillRect:function(t,e,i,n,r,s){this.renderer.pipelines.set(this);var o=this.calcMatrix;s&&s.multiply(r,o);
1478var a=t+i,h=e+n,u=o.getX(t,e),l=o.getY(t,e),c=o.getX(t,h),f=o.getY(t,h),d=o.getX(a,h),p=o.getY(a,h),v=o.getX(a,e),g=o.getY(a,e),m=this.fillTint;this.batchQuad(u,l,c,f,d,p,v,g,m.TL,m.TR,m.BL,m.BR)},batchFillTriangle:function(t,e,i,n,r,s,o,a){this.renderer.pipelines.set(this);var h=this.calcMatrix;a&&a.multiply(o,h);var u=h.getX(t,e),l=h.getY(t,e),c=h.getX(i,n),f=h.getY(i,n),d=h.getX(r,s),p=h.getY(r,s),v=this.fillTint;this.batchTri(u,l,c,f,d,p,v.TL,v.TR,v.BL)},batchStrokeTriangle:function(t,e,i,n,r,s,o,a,h){var u=this.tempTriangle;u[0].x=t,u[0].y=e,u[0].width=o,u[1].x=i,u[1].y=n,u[1].width=o,u[2].x=r,u[2].y=s,u[2].width=o,u[3].x=t,u[3].y=e,u[3].width=o,this.batchStrokePath(u,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var n=this.calcMatrix;i&&i.multiply(e,n);for(var s,o,a=t.length,h=this.polygonCache,u=this.fillTint.TL,l=this.fillTint.TR,c=this.fillTint.BL,f=0;f<a;++f)o=t[f],h.push(o.x,o.y);a=(s=r(h)).length;for(var d=0;d<a;d+=3){var p=2*s[d+0],v=2*s[d+1],g=2*s[d+2],m=h[p+0],y=h[p+1],x=h[v+0],w=h[v+1],_=h[g+0],b=h[g+1],T=n.getX(m,y),E=n.getY(m,y),S=n.getX(x,w),A=n.getY(x,w),C=n.getX(_,b),O=n.getY(_,b);this.batchTri(T,E,S,A,C,O,u,l,c)}h.length=0},batchStrokePath:function(t,e,i,n,r){this.renderer.pipelines.set(this),this.prevQuad[4]=0,this.firstQuad[4]=0;for(var s=t.length-1,o=0;o<s;o++){var a=t[o],h=t[o+1];this.batchLine(a.x,a.y,h.x,h.y,a.width/2,h.width/2,e,o,!i&&o===s-1,n,r)}},batchLine:function(t,e,i,n,r,s,o,a,h,u,l){this.renderer.pipelines.set(this);var c=this.calcMatrix;l&&l.multiply(u,c);var f=i-t,d=n-e,p=Math.sqrt(f*f+d*d),v=r*(n-e)/p,g=r*(t-i)/p,m=s*(n-e)/p,y=s*(t-i)/p,x=i-m,w=n-y,_=t-v,b=e-g,T=i+m,E=n+y,S=t+v,A=e+g,C=c.getX(x,w),O=c.getY(x,w),R=c.getX(_,b),M=c.getY(_,b),P=c.getX(T,E),I=c.getY(T,E),k=c.getX(S,A),L=c.getY(S,A),D=this.strokeTint,F=D.TL,N=D.TR,B=D.BL,U=D.BR;if(this.batchQuad(k,L,R,M,C,O,P,I,F,N,B,U),!(o<=2)){var V=this.prevQuad,Y=this.firstQuad;a>0&&V[4]?this.batchQuad(k,L,R,M,V[0],V[1],V[2],V[3],F,N,B,U):(Y[0]=k,Y[1]=L,Y[2]=R,Y[3]=M,Y[4]=1),h&&Y[4]?this.batchQuad(C,O,P,I,Y[0],Y[1],Y[2],Y[3],F,N,B,U):(V[0]=C,V[1]=O,V[2]=P,V[3]=I,V[4]=1)}},batchVert:function(t,e,i){var n=this.vertexViewF32,r=this.vertexViewU32,s=this.vertexCount*this.currentShader.vertexComponentCount-1;n[++s]=t,n[++s]=e,r[++s]=i,this.vertexCount++},batchQuad:function(t,e,i,n,r,s,o,a,h,u,l,c){var f=!1;return this.shouldFlush(6)&&(this.flush(),f=!0),this.batchVert(t,e,h),this.batchVert(i,n,l),this.batchVert(r,s,c),this.batchVert(t,e,h),this.batchVert(r,s,c),this.batchVert(o,a,u),f},batchTri:function(t,e,i,n,r,s,o,a,h){var u=!1;return this.shouldFlush(3)&&(this.flush(),u=!0),this.batchVert(t,e,o),this.batchVert(i,n,a),this.batchVert(r,s,h),u},destroy:function(){return l.prototype.destroy.call(this),this.polygonCache=null,this}});t.exports=c},function(t,e,i){ 1479/** 1480 * @author Richard Davey <[email protected]> 1481 * @author Felipe Alfonso <@bitnenfer> 1482 * @copyright 2020 Photon Storm Ltd. 1483 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1484 */ 1485var n=i(0),r=i(2),s=i(873),o=i(105),a=i(3),h=i(57),u=10,l=new a,c=new n({Extends:o,initialize:function(t){u=t.game.renderer.config.maxLights;for(var e=r(t,"fragShader",s),i=[],n=1;n<=u;n++)i.push({name:"lights"+n,fragShader:e.replace("%LIGHT_COUNT%",n.toString())});t.shaders=i,o.call(this,t),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.defaultNormalMap},boot:function(){h.prototype.boot.call(this);var t=this.gl,e=t.createTexture();t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([127,127,255,255])),this.defaultNormalMap={glTexture:e};for(var i=0;i<this.shaders.length;i++)this["lightShader"+(i+1)]=this.shaders[i]},onRender:function(t,e){var i=t.sys.lights;if(i&&i.active){var n=i.getLights(e),r=n.length;if(0!==r){var s;this.setShader(this["lightShader"+r],!0);var o=this.renderer.height,a=e.matrix;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",e.x,e.y,e.rotation,e.zoom),this.set3f("uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),s=0;s<r;s++){var h=n[s].light,u=h.color,c="uLights["+s+"].";a.transformPoint(h.x,h.y,l),this.set2f(c+"position",l.x-e.scrollX*h.scrollFactorX*e.zoom,o-(l.y-e.scrollY*h.scrollFactorY*e.zoom)),this.set3f(c+"color",u.r,u.g,u.b),this.set1f(c+"intensity",h.intensity),this.set1f(c+"radius",h.radius)}this.currentNormalMapRotation=null}}},setNormalMapRotation:function(t){if(t!==this.currentNormalMapRotation||0===this.vertexCount){this.vertexCount>0&&this.flush();var e=this.inverseRotationMatrix;if(t){var i=-t,n=Math.cos(i),r=Math.sin(i);e[1]=r,e[3]=-r,e[0]=e[4]=n}else e[0]=e[4]=1,e[1]=e[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t}},setTexture2D:function(t,e){var i=this.renderer;void 0===t&&(t=i.tempTextures[0]);var n=this.getNormalMap(e);
1485i.isNewNormalMap(t,n)&&(this.flush(),i.setTextureZero(t),i.setNormalMap(n));var r=e?e.rotation:0;return this.setNormalMapRotation(r),this.currentUnit=0,0},setGameObject:function(t,e){void 0===e&&(e=t.frame);var i=this.renderer,n=e.glTexture,r=this.getNormalMap(t);return i.isNewNormalMap()&&(this.flush(),i.setTextureZero(n),i.setNormalMap(r)),this.setNormalMapRotation(t.rotation),this.currentUnit=0,0},getNormalMap:function(t){var e;return t?t.displayTexture?e=t.displayTexture.dataSource[t.displayFrame.sourceIndex]:t.texture?e=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(e=Array.isArray(t.tileset)?t.tileset[0].image.dataSource[0]:t.tileset.image.dataSource[0]):e=this.defaultNormalMap,e||(e=this.defaultNormalMap),e.glTexture}});c.LIGHT_COUNT=u,t.exports=c},function(t,e,i){ 1486/** 1487 * @author Richard Davey <[email protected]> 1488 * @copyright 2020 Photon Storm Ltd. 1489 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1490 */ 1491var n=i(0),r=i(2),s=i(876),o=i(877),a=i(57),h=new n({Extends:a,initialize:function(t){t.vertShader=r(t,"vertShader",o),t.fragShader=r(t,"fragShader",s),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),a.call(this,t)},onRender:function(t,e){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",e.zoom)},batchPointLight:function(t,e,i,n,r,s,o,a,h,u,l,c){var f=t.color,d=t.intensity,p=t.radius,v=t.attenuation,g=f.r*d,m=f.g*d,y=f.b*d,x=e.alpha*t.alpha;this.shouldFlush(6)&&this.flush(),this.batchLightVert(i,n,l,c,p,v,g,m,y,x),this.batchLightVert(r,s,l,c,p,v,g,m,y,x),this.batchLightVert(o,a,l,c,p,v,g,m,y,x),this.batchLightVert(i,n,l,c,p,v,g,m,y,x),this.batchLightVert(o,a,l,c,p,v,g,m,y,x),this.batchLightVert(h,u,l,c,p,v,g,m,y,x)},batchLightVert:function(t,e,i,n,r,s,o,a,h,u){var l=this.vertexViewF32,c=this.vertexCount*this.currentShader.vertexComponentCount-1;l[++c]=t,l[++c]=e,l[++c]=i,l[++c]=n,l[++c]=r,l[++c]=s,l[++c]=o,l[++c]=a,l[++c]=h,l[++c]=u,this.vertexCount++}});t.exports=h},function(t,e,i){ 1492/** 1493 * @author Richard Davey <[email protected]> 1494 * @copyright 2020 Photon Storm Ltd. 1495 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1496 */ 1497var n=i(0),r=i(2),s=i(105),o=new n({Extends:s,initialize:function(t){t.topology=5,t.batchSize=r(t,"batchSize",256),s.call(this,t)}});t.exports=o},function(t,e,i){ 1498/** 1499 * @author Richard Davey <[email protected]> 1500 * @copyright 2020 Photon Storm Ltd. 1501 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1502 */ 1503var n=i(0),r=i(2),s=i(105),o=i(878),a=i(879),h=i(57),u=new n({Extends:s,initialize:function(t){t.fragShader=r(t,"fragShader",o),t.vertShader=r(t,"vertShader",a),t.forceZero=!0,s.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0)}});t.exports=u},function(t,e,i){ 1504/** 1505 * @author Richard Davey <[email protected]> 1506 * @copyright 2020 Photon Storm Ltd. 1507 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1508 */ 1509var n=i(880),r=i(34),s=i(0),o=i(195),a=i(881),h=i(882),u=i(2),l=i(883),c=i(376),f=i(57),d=new s({Extends:f,initialize:function(t){t.renderTarget=u(t,"renderTarget",[{scale:1},{scale:1},{scale:.5},{scale:.5}]),t.vertShader=u(t,"vertShader",c),t.shaders=u(t,"shaders",[{name:"Copy",fragShader:h},{name:"AddBlend",fragShader:n},{name:"LinearBlend",fragShader:l},{name:"ColorMatrix",fragShader:a}]),t.attributes=u(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],t.batchSize=1,f.call(this,t),this.colorMatrix=new o,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){f.prototype.boot.call(this);var t=this.shaders,e=this.renderTargets;this.copyShader=t[0],this.addShader=t[1],this.linearShader=t[2],this.colorMatrixShader=t[3],this.fullFrame1=e[0],this.fullFrame2=e[1],this.halfFrame1=e[2],this.halfFrame2=e[3]}
1509,copyFrame:function(t,e,i,n,r){void 0===i&&(i=1),void 0===n&&(n=!0),void 0===r&&(r=!0);var s=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,t.texture),e?(s.viewport(0,0,e.width,e.height),s.bindFramebuffer(s.FRAMEBUFFER,e.framebuffer),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,e.texture,0)):s.viewport(0,0,t.width,t.height),n&&(r?s.clearColor(0,0,0,0):s.clearColor(0,0,0,1),s.clear(s.COLOR_BUFFER_BIT)),s.bufferData(s.ARRAY_BUFFER,this.vertexData,s.STATIC_DRAW),s.drawArrays(s.TRIANGLES,0,6),s.bindFramebuffer(s.FRAMEBUFFER,null),s.bindTexture(s.TEXTURE_2D,null)},blitFrame:function(t,e,i,n,s,o){void 0===i&&(i=1),void 0===n&&(n=!0),void 0===s&&(s=!0),void 0===o&&(o=!1);var a=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,t.texture),t.height>e.height)a.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e);else{var h=e.height-t.height;a.viewport(0,h,t.width,t.height)}if(a.bindFramebuffer(a.FRAMEBUFFER,e.framebuffer),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,e.texture,0),n&&(s?a.clearColor(0,0,0,0):a.clearColor(0,0,0,1),a.clear(a.COLOR_BUFFER_BIT)),o){var u=this.renderer.currentBlendMode;this.renderer.setBlendMode(r.ERASE)}a.bufferData(a.ARRAY_BUFFER,this.vertexData,a.STATIC_DRAW),a.drawArrays(a.TRIANGLES,0,6),o&&this.renderer.setBlendMode(u),a.bindFramebuffer(a.FRAMEBUFFER,null),a.bindTexture(a.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(t,e,i,n,r,s,o,a){void 0===o&&(o=!0),void 0===a&&(a=!0);var h=this.gl;h.bindFramebuffer(h.FRAMEBUFFER,t.framebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,t.texture,0),o&&(a?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,e.texture),h.copyTexSubImage2D(h.TEXTURE_2D,0,0,0,i,n,r,s),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null)},copyToGame:function(t){var e=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t.texture),e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.STATIC_DRAW),e.drawArrays(e.TRIANGLES,0,6),this.renderer.resetTextures()},drawFrame:function(t,e,i,n){void 0===i&&(i=!0),void 0===n&&(n=this.colorMatrix);var r=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",n.getData()),this.set1f("uAlpha",n.alpha),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture,0)):r.viewport(0,0,t.width,t.height),i?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindTexture(r.TEXTURE_2D,null)},blendFrames:function(t,e,i,n,r,s){void 0===n&&(n=1),void 0===r&&(r=!0),void 0===s&&(s=this.linearShader);var o=this.gl;this.setShader(s),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",n),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,t.texture),o.activeTexture(o.TEXTURE1),o.bindTexture(o.TEXTURE_2D,e.texture),i?(o.bindFramebuffer(o.FRAMEBUFFER,i.framebuffer),o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,i.texture,0),o.viewport(0,0,i.width,i.height)):o.viewport(0,0,t.width,t.height),r?o.clearColor(0,0,0,0):o.clearColor(0,0,0,1),o.clear(o.COLOR_BUFFER_BIT),o.bufferData(o.ARRAY_BUFFER,this.vertexData,o.STATIC_DRAW),o.drawArrays(o.TRIANGLES,0,6),o.bindFramebuffer(o.FRAMEBUFFER,null),o.bindTexture(o.TEXTURE_2D,null)},blendFramesAdditive:function(t,e,i,n,r){this.blendFrames(t,e,i,n,r,this.addShader)},clearFrame:function(t,e){void 0===e&&(e=!0);var i=this.gl;i.viewport(0,0,t.width,t.height),i.bindFramebuffer(i.FRAMEBUFFER,t.framebuffer),e?i.clearColor(0,0,0,0):i.clearColor(0,0,0,1),i.clear(i.COLOR_BUFFER_BIT);var n=this.renderer.currentFramebuffer;i.bindFramebuffer(i.FRAMEBUFFER,n)}
1509,setUVs:function(t,e,i,n,r,s,o,a){var h=this.vertexViewF32;h[2]=t,h[3]=e,h[6]=i,h[7]=n,h[10]=r,h[11]=s,h[14]=t,h[15]=e,h[18]=r,h[19]=s,h[22]=o,h[23]=a},setTargetUVs:function(t,e){var i=e.height/t.height;i=i>.5?.5-(i-.5):.5-i+.5,this.setUVs(0,i,0,1+i,1,1+i,1,i)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});t.exports=d},function(t,e){t.exports=["#define SHADER_NAME PHASER_QUAD_VS","","precision mediump float;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","","varying vec2 outFragCoord;","varying vec2 outTexCoord;","","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;",""," gl_Position = vec4(inPosition, 0, 1);","}",""].join("\n")},function(t,e,i){ 1510/** 1511 * @author Richard Davey <[email protected]> 1512 * @copyright 2020 Photon Storm Ltd. 1513 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1514 */ 1515var n=i(31),r=i(37),s=i(2);t.exports=function(t,e){var i=t.getContext("experimental-webgl"),o=s(e,"callback"),a=s(e,"type","image/png"),h=s(e,"encoder",.92),u=s(e,"x",0),l=s(e,"y",0),c=s(e,"getPixel",!1),f=s(e,"isFramebuffer",!1),d=f?s(e,"bufferWidth",1):i.drawingBufferWidth,p=f?s(e,"bufferHeight",1):i.drawingBufferHeight;if(c){var v=new Uint8Array(4),g=f?l:p-l;i.readPixels(u,g,1,1,i.RGBA,i.UNSIGNED_BYTE,v),o.call(null,new r(v[0],v[1],v[2],v[3]/255))}else{var m=s(e,"width",d),y=s(e,"height",p),x=new Uint8Array(m*y*4);i.readPixels(u,p-l-y,m,y,i.RGBA,i.UNSIGNED_BYTE,x);for(var w=n.createWebGL(this,m,y),_=w.getContext("2d"),b=_.getImageData(0,0,m,y),T=b.data,E=0;E<y;E++)for(var S=0;S<m;S++){var A=4*((y-E-1)*m+S),C=4*(E*m+S);T[C+0]=x[A+0],T[C+1]=x[A+1],T[C+2]=x[A+2],T[C+3]=x[A+3]}_.putImageData(b,0,0);var O=new Image;O.onerror=function(){o.call(null),n.remove(w)},O.onload=function(){o.call(null,O),n.remove(w)},O.src=w.toDataURL(a,h)}}},function(t,e,i){ 1516/** 1517 * @author Richard Davey <[email protected]> 1518 * @copyright 2020 Photon Storm Ltd. 1519 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1520 */ 1521var n=i(32);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===n.CANVAS?i="Canvas":e.renderType===n.HEADLESS&&(i="Headless");var r,s=e.audio,o=t.device.audio;if(r=o.webAudio&&!s.disableWebAudio?"Web Audio":s.noAudio||!o.webAudio&&!o.audioData?"No Audio":"HTML5 Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+n.VERSION+" / https://phaser.io");else{var a,h="",u=[h];Array.isArray(e.bannerBackgroundColor)?(e.bannerBackgroundColor.forEach((function(t){h=h.concat("%c "),u.push("background: "+t),a=t})),u[u.length-1]="color: "+e.bannerTextColor+"; background: "+a):(h=h.concat("%c "),u.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor)),u.push("background: transparent"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / "))),e.hidePhaser||(h=h.concat("Phaser v"+n.VERSION+" ("+i+" | "+r+")")),h=h.concat(" %c "+e.gameURL),u[0]=h,console.log.apply(console,u)}}}},function(t,e,i){ 1522/** 1523 * @author Richard Davey <[email protected]> 1524 * @copyright 2020 Photon Storm Ltd. 1525 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1526 */ 1527var n=i(0),r=i(6),s=i(1),o=i(380),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=r(e,"min",5),this.targetFps=r(e,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=s,this.forceSetTimeOut=r(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=r(e,"deltaHistory",10),this.panicMax=r(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=r(e,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e<this.deltaSmoothingMax;e++)this.deltaHistory[e]=Math.min(this._target,this.deltaHistory[e]);this.delta=0,this.deltaIndex=0,this._coolDown=this.panicMax},start:function(t){if(this.started)return this;this.started=!0,this.running=!0;for(var e=0;e<this.deltaSmoothingMax;e++)this.deltaHistory[e]=this._target;this.resetDelta(),this.startTime=window.performance.now(),this.callback=t,this.raf.start(this.step.bind(this),this.forceSetTimeOut,this._target)},step:function(){var t=window.performance.now();this.now=t;var e=t-this.lastTime;e<0&&(e=0),this.rawDelta=e;var i=this.deltaIndex,n=this.deltaHistory,r=this.deltaSmoothingMax,s=e,o=e;if(this.smoothStep){(this._coolDown>0||!this.inFocus)&&(this._coolDown--,s=Math.min(s,this._target)),s>this._min&&(s=n[i],s=Math.min(s,this._min)),n[i]=s,this.deltaIndex++,this.deltaIndex>r&&(this.deltaIndex=0),o=0;for(var a=0;a<r;a++)o+=n[a];o/=r}this.delta=o,this.time+=this.rawDelta,t>this.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running||(t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=s,this.raf=null,this.game=null}});t.exports=a}
1527,function(t,e,i){ 1528/** 1529 * @author Richard Davey <[email protected]> 1530 * @copyright 2020 Photon Storm Ltd. 1531 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1532 */ 1533var n=i(0),r=i(1),s=new n({initialize:function(){this.isRunning=!1,this.callback=r,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var t=this;this.step=function e(){var i=window.performance.now();t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.min(Math.max(2*t.target+t.tick-i,0),t.target);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=r}});t.exports=s},function(t,e,i){ 1534/** 1535 * @author Richard Davey <[email protected]> 1536 * @copyright 2020 Photon Storm Ltd. 1537 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1538 */ 1539var n=i(22);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach((function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")})),e&&document.addEventListener(e,(function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)}),!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){ 1540/** 1541 * @author Richard Davey <[email protected]> 1542 * @copyright 2020 Photon Storm Ltd. 1543 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1544 */ 1545var n=i(383),r=i(31),s=i(6);t.exports=function(t){var e=s(t,"data",[]),i=s(t,"canvas",null),o=s(t,"palette",n),a=s(t,"pixelWidth",1),h=s(t,"pixelHeight",a),u=s(t,"resizeCanvas",!0),l=s(t,"clearCanvas",!0),c=s(t,"preRender",null),f=s(t,"postRender",null),d=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=r.create2D(this,d,p),u=!1,l=!1),u&&(i.width=d,i.height=p);var v=i.getContext("2d");l&&v.clearRect(0,0,d,p),c&&c(i,v);for(var g=0;g<e.length;g++)for(var m=e[g],y=0;y<m.length;y++){var x=m[y];"."!==x&&" "!==x&&(v.fillStyle=o[x],v.fillRect(y*a,g*h,a,h))}return f&&f(i,v),i}},function(t,e){ 1546/** 1547 * @author Richard Davey <[email protected]> 1548 * @copyright 2020 Photon Storm Ltd. 1549 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1550 */ 1551t.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},function(t,e,i){ 1552/** 1553 * @author Richard Davey <[email protected]> 1554 * @copyright 2020 Photon Storm Ltd. 1555 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1556 */ 1557var n=i(0),r=i(352),s=i(90),o=i(3),a=new n({Extends:s,initialize:function(t,e,i,n){s.call(this,"CubicBezierCurve"),Array.isArray(t)&&(n=new o(t[6],t[7]),i=new o(t[4],t[5]),e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i,this.p3=n},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.p0,n=this.p1,s=this.p2,a=this.p3;return e.set(r(t,i.x,n.x,s.x,a.x),r(t,i.y,n.y,s.y,a.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var n=1;n<i.length;n++)t.lineTo(i[n].x,i[n].y);return t.strokePath(),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y,this.p2.x,this.p2.y,this.p3.x,this.p3.y]}}});a.fromJSON=function(t){var e=t.points,i=new o(e[0],e[1]),n=new o(e[2],e[3]),r=new o(e[4],e[5]),s=new o(e[6],e[7]);return new a(i,n,r,s)},t.exports=a}
vendor: 13,168 bytes, lines 1557-1641
1557,function(t,e,i){ 1558/** 1559 * @author Richard Davey <[email protected]> 1560 * @copyright 2020 Photon Storm Ltd. 1561 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1562 */ 1563var n=i(0),r=i(90),s=i(35),o=i(6),a=i(193),h=i(3),u=new n({Extends:r,initialize:function(t,e,i,n,a,u,l,c){if("object"==typeof t){var f=t;t=o(f,"x",0),e=o(f,"y",0),i=o(f,"xRadius",0),n=o(f,"yRadius",i),a=o(f,"startAngle",0),u=o(f,"endAngle",360),l=o(f,"clockwise",!1),c=o(f,"rotation",0)}else void 0===n&&(n=i),void 0===a&&(a=0),void 0===u&&(u=360),void 0===l&&(l=!1),void 0===c&&(c=0);r.call(this,"EllipseCurve"),this.p0=new h(t,e),this._xRadius=i,this._yRadius=n,this._startAngle=s(a),this._endAngle=s(u),this._clockwise=l,this._rotation=s(c)},getStartPoint:function(t){return void 0===t&&(t=new h),this.getPoint(0,t)},getResolution:function(t){return 2*t},getPoint:function(t,e){void 0===e&&(e=new h);for(var i=2*Math.PI,n=this._endAngle-this._startAngle,r=Math.abs(n)<Number.EPSILON;n<0;)n+=i;for(;n>i;)n-=i;n<Number.EPSILON&&(n=r?0:i),this._clockwise&&!r&&(n===i?n=-i:n-=i);var s=this._startAngle+t*n,o=this.p0.x+this._xRadius*Math.cos(s),a=this.p0.y+this._yRadius*Math.sin(s);if(0!==this._rotation){var u=Math.cos(this._rotation),l=Math.sin(this._rotation),c=o-this.p0.x,f=a-this.p0.y;o=c*u-f*l+this.p0.x,a=c*l+f*u+this.p0.y}return e.set(o,a)},setXRadius:function(t){return this.xRadius=t,this},setYRadius:function(t){return this.yRadius=t,this},setWidth:function(t){return this.xRadius=t/2,this},setHeight:function(t){return this.yRadius=t/2,this},setStartAngle:function(t){return this.startAngle=t,this},setEndAngle:function(t){return this.endAngle=t,this},setClockwise:function(t){return this.clockwise=t,this},setRotation:function(t){return this.rotation=t,this},x:{get:function(){return this.p0.x},set:function(t){this.p0.x=t}},y:{get:function(){return this.p0.y},set:function(t){this.p0.y=t}},xRadius:{get:function(){return this._xRadius},set:function(t){this._xRadius=t}},yRadius:{get:function(){return this._yRadius},set:function(t){this._yRadius=t}},startAngle:{get:function(){return a(this._startAngle)},set:function(t){this._startAngle=s(t)}},endAngle:{get:function(){return a(this._endAngle)},set:function(t){this._endAngle=s(t)}},clockwise:{get:function(){return this._clockwise},set:function(t){this._clockwise=t}},angle:{get:function(){return a(this._rotation)},set:function(t){this._rotation=s(t)}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t}},toJSON:function(){return{type:this.type,x:this.p0.x,y:this.p0.y,xRadius:this._xRadius,yRadius:this._yRadius,startAngle:a(this._startAngle),endAngle:a(this._endAngle),clockwise:this._clockwise,rotation:a(this._rotation)}}});u.fromJSON=function(t){return new u(t)},t.exports=u},function(t,e,i){ 1564/** 1565 * @author Richard Davey <[email protected]> 1566 * @copyright 2020 Photon Storm Ltd. 1567 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1568 */ 1569var n=i(0),r=i(90),s=i(196),o=i(10),a=i(3),h=new a,u=new n({Extends:r,initialize:function(t,e){r.call(this,"LineCurve"),Array.isArray(t)&&(e=new a(t[2],t[3]),t=new a(t[0],t[1])),this.p0=t,this.p1=e,this.arcLengthDivisions=1},getBounds:function(t){return void 0===t&&(t=new o),s([this.p0,this.p1],t)},getStartPoint:function(t){return void 0===t&&(t=new a),t.copy(this.p0)},getResolution:function(t){return void 0===t&&(t=1),t},getPoint:function(t,e){return void 0===e&&(e=new a),1===t?e.copy(this.p1):(e.copy(this.p1).subtract(this.p0).scale(t).add(this.p0),e)},getPointAt:function(t,e){return this.getPoint(t,e)},getTangent:function(){return h.copy(this.p1).subtract(this.p0).normalize()},getUtoTmapping:function(t,e,i){var n;if(e){var r=this.getLengths(i),s=r[r.length-1];n=Math.min(e,s)/s}else n=t;return n},draw:function(t){return t.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});u.fromJSON=function(t){var e=t.points,i=new a(e[0],e[1]),n=new a(e[2],e[3]);return new u(i,n)},t.exports=u},function(t,e,i){ 1570/** 1571 * @author Richard Davey <[email protected]> 1572 * @copyright 2020 Photon Storm Ltd. 1573 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1574 */ 1575var n=i(0),r=i(3),s=new n({initialize:function(t,e){this.active=!1,this.p0=new r(t,e)},getPoint:function(t,e){return void 0===e&&(e=new r),e.copy(this.p0)},getPointAt:function(t,e){return this.getPoint(t,e)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});t.exports=s},function(t,e,i){ 1576/** 1577 * @author Richard Davey <[email protected]> 1578 * @copyright 2020 Photon Storm Ltd. 1579 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1580 */ 1581var n=i(0),r=i(90),s=i(353),o=i(3),a=new n({Extends:r,initialize:function(t,e,i){r.call(this,"QuadraticBezier"),Array.isArray(t)&&(i=new o(t[4],t[5]),e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.p0,n=this.p1,r=this.p2;return e.set(s(t,i.x,n.x,r.x),s(t,i.y,n.y,r.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var n=1;n<i.length;n++)t.lineTo(i[n].x,i[n].y);return t.strokePath(),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y,this.p2.x,this.p2.y]}}});a.fromJSON=function(t){var e=t.points,i=new o(e[0],e[1]),n=new o(e[2],e[3]),r=new o(e[4],e[5]);return new a(i,n,r)},t.exports=a},function(t,e,i){ 1582/** 1583 * @author Richard Davey <[email protected]> 1584 * @copyright 2020 Photon Storm Ltd. 1585 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1586 */ 1587var n=i(191),r=i(0),s=i(90),o=i(3),a=new r({Extends:s,initialize:function(t){void 0===t&&(t=[]),s.call(this,"SplineCurve"),this.points=[],this.addPoints(t)},addPoints:function(t){for(var e=0;e<t.length;e++){var i=new o;"number"==typeof t[e]?(i.x=t[e],i.y=t[e+1],e++):Array.isArray(t[e])?(i.x=t[e][0],i.y=t[e][1]):(i.x=t[e].x,i.y=t[e].y),this.points.push(i)}return this},addPoint:function(t,e){var i=new o(t,e);return this.points.push(i),i},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.points[0])},getResolution:function(t){return t*this.points.length},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.points,r=(i.length-1)*t,s=Math.floor(r),a=r-s,h=i[0===s?s:s-1],u=i[s],l=i[s>i.length-2?i.length-1:s+1],c=i[s>i.length-3?i.length-1:s+2];return e.set(n(a,h.x,u.x,l.x,c.x),n(a,h.y,u.y,l.y,c.y))},toJSON:function(){for(var t=[],e=0;e<this.points.length;e++)t.push(this.points[e].x),t.push(this.points[e].y);return{type:this.type,points:t}}});a.fromJSON=function(t){return new a(t.points)},t.exports=a},function(t,e,i){ 1588/** 1589 * @author Richard Davey <[email protected]> 1590 * @copyright 2020 Photon Storm Ltd. 1591 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1592 */ 1593var n=new(i(0))({initialize:function(t,e,i,n){e&&""!==e||(e=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join("\n")),i&&""!==i||(i=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join("\n")),void 0===n&&(n=null),this.key=t,this.fragmentSrc=e,this.vertexSrc=i,this.uniforms=n}});t.exports=n},function(t,e,i){ 1594/** 1595 * @author Richard Davey <[email protected]> 1596 * @copyright 2020 Photon Storm Ltd. 1597 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1598 */ 1599var n=i(37);n.ColorSpectrum=i(905),n.ColorToRGBA=i(906),n.ComponentToHex=i(392),n.GetColor=i(100),n.GetColor32=i(322),n.HexStringToColor=i(321),n.HSLToColor=i(907),n.HSVColorWheel=i(908),n.HSVToRGB=i(185),n.HueToComponent=i(393),n.IntegerToColor=i(186),n.IntegerToRGB=i(324),n.Interpolate=i(909),n.ObjectToColor=i(325),n.RandomRGB=i(910),n.RGBStringToColor=i(326),n.RGBToHSV=i(323),n.RGBToString=i(911),n.ValueToColor=i(184),t.exports=n},function(t,e){t.exports=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e}},function(t,e){t.exports=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},function(t,e,i){ 1600/** 1601 * @author Richard Davey <[email protected]> 1602 * @copyright 2020 Photon Storm Ltd. 1603 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1604 */ 1605var n=i(102);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},function(t,e,i){ 1606/** 1607 * @author Richard Davey <[email protected]> 1608 * @copyright 2020 Photon Storm Ltd. 1609 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1610 */ 1611var n=i(198);t.exports=function(t,e){var i=window.screen,r=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);return r&&"string"==typeof r.type?r.type:"string"==typeof r?r:"number"==typeof window.orientation?0===window.orientation||180===window.orientation?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE:window.matchMedia?window.matchMedia("(orientation: portrait)").matches?n.ORIENTATION.PORTRAIT:window.matchMedia("(orientation: landscape)").matches?n.ORIENTATION.LANDSCAPE:void 0:e>t?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE}},function(t,e){ 1612/** 1613 * @author Richard Davey <[email protected]> 1614 * @copyright 2020 Photon Storm Ltd. 1615 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1616 */ 1617t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},function(t,e){ 1618/** 1619 * @author Richard Davey <[email protected]> 1620 * @copyright 2020 Photon Storm Ltd. 1621 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1622 */ 1623t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},function(t,e){ 1624/** 1625 * @author Richard Davey <[email protected]> 1626 * @copyright 2020 Photon Storm Ltd. 1627 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1628 */ 1629t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},function(t,e){ 1630/** 1631 * @author Richard Davey <[email protected]> 1632 * @copyright 2020 Photon Storm Ltd. 1633 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1634 */ 1635t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},function(t,e){t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(lC){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e,i){ 1636/** 1637 * @author Richard Davey <[email protected]> 1638 * @copyright 2020 Photon Storm Ltd. 1639 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1640 */ 1641var n=i(0),r=i(200),s=i(9),o=i(49),a=i(22),h=i(404),u=i(405),l=i(406),c=i(407),f=i(25),d=i(174),p=new n({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new s,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new u(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputA
vendor: 4,122 bytes, line 1641
1641ctivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var n=new l(this,i);n.smoothFactor=e.inputSmoothFactor,this.pointers.push(n)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new f,this._tempMatrix2=new f,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(a.BOOT,this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.scaleManager=this.game.scale,this.events.emit(o.MANAGER_BOOT),this.game.events.on(a.PRE_RENDER,this.preRender,this),this.game.events.once(a.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(o.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(o.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(o.MANAGER_UPDATE);for(var n=0;n<i.length;n++){var r=i[n];if(r.sys.input&&r.sys.input.updatePoll(t,e)&&this.globalTopOnly)return}},setDefaultCursor:function(t){this.defaultCursor=t,this.canvas.style.cursor!==t&&(this.canvas.style.cursor=t)},setCursor:function(t){t.cursor&&(this.canvas.style.cursor=t.cursor)},resetCursor:function(t){t.cursor&&this.canvas&&(this.canvas.style.cursor=this.defaultCursor)},addPointer:function(t){void 0===t&&(t=1);var e=[];this.pointersTotal+t>10&&(t=10-this.pointersTotal);for(var i=0;i<t;i++){var n=this.pointers.length,r=new l(this,n);r.smoothFactor=this.config.inputSmoothFactor,this.pointers.push(r),this.pointersTotal++,e.push(r)}return e},updateInputPlugins:function(t,e){var i=this.game.scene.getScenes(!0,!0);this._tempSkip=!1;for(var n=0;n<i.length;n++){var r=i[n];if(r.sys.input&&(r.sys.input.update(t,e)&&this.globalTopOnly||this._tempSkip))return}},onTouchStart:function(t){for(var e=this.pointers,i=[],n=0;n<t.changedTouches.length;n++)for(var s=t.changedTouches[n],o=1;o<this.pointersTotal;o++){var a=e[o];if(!a.active){a.touchstart(s,t),this.activePointer=a,i.push(a);break}}this.updateInputPlugins(r.TOUCH_START,i)},onTouchMove:function(t){for(var e=this.pointers,i=[],n=0;n<t.changedTouches.length;n++)for(var s=t.changedTouches[n],o=1;o<this.pointersTotal;o++){var a=e[o];if(a.active&&a.identifier===s.identifier){a.touchmove(s,t),this.activePointer=a,i.push(a);break}}this.updateInputPlugins(r.TOUCH_MOVE,i)},onTouchEnd:function(t){for(var e=this.pointers,i=[],n=0;n<t.changedTouches.length;n++)for(var s=t.changedTouches[n],o=1;o<this.pointersTotal;o++){var a=e[o];if(a.active&&a.identifier===s.identifier){a.touchend(s,t),i.push(a);break}}this.updateInputPlugins(r.TOUCH_END,i)},onTouchCancel:function(t){for(var e=this.pointers,i=[],n=0;n<t.changedTouches.length;n++)for(var s=t.changedTouches[n],o=1;o<this.pointersTotal;o++){var a=e[o];if(a.active&&a.identifier===s.identifier){a.touchcancel(s,t),i.push(a);break}}this.updateInputPlugins(r.TOUCH_CANCEL,i)},onMouseDown:function(t){var e=this.mousePointer;e.down(t),e.updateMotion(),this.activePointer=e,this.updateInputPlugins(r.MOUSE_DOWN,this.mousePointerContainer)},onMouseMove:function(t){var e=this.mousePointer;e.move(t),e.updateMotion(),this.activePointer=e,this.updateInputPlugins(r.MOUSE_MOVE,this.mousePointerContainer)},onMouseUp:function(t){var e=this.mousePointer;e.up(t),e.updateMotion(),this.activePointer=e,this.updateInputPlugins(r.MOUSE_UP,this.mousePointerContainer)},onMouseWheel:function(t){var e=this.mousePointer;e.wheel(t),this.activePointer=e,this.updateInputPlugins(r.MOUSE_WHEEL,this.mousePointerContainer)},onPointerLockChange:function(t){var e=this.mouse.locked;this.mousePointer.locked=e,this.events.emit(o.POINTERLOCK_CHANGE,t,e)},inputCandidate:function(t,e){var i=t.input;if(!i||!i.enabled||!i.alwaysEnabled&&!t.willRender(e))return!1;var n=!0,r=t.parentContainer;if(r)do{if(!r.willRender(e)){n=!1;break}r=r.parentContainer}while(r);return n},hitTest:function(t,e,i,n){void 0===n&&(n=this._tempHitTest);var r=this._tempPoint,s=i.scrollX,o=i.scrollY;n.length=0;var a=t.x,h=t.y;
vendor: 14,213 bytes, lines 1641-1659
1641i.getWorldPoint(a,h,r),t.worldX=r.x,t.worldY=r.y;for(var u={x:0,y:0},l=this._tempMatrix,c=this._tempMatrix2,f=0;f<e.length;f++){var p=e[f];if(this.inputCandidate(p,i)){var v=r.x+s*p.scrollFactorX-s,g=r.y+o*p.scrollFactorY-o;p.parentContainer?(p.getWorldTransformMatrix(l,c),l.applyInverse(v,g,u)):d(v,g,p.x,p.y,p.rotation,p.scaleX,p.scaleY,u),this.pointWithinHitArea(p,u.x,u.y)&&n.push(p)}}return n},pointWithinHitArea:function(t,e,i){e+=t.displayOriginX,i+=t.displayOriginY;var n=t.input;return!(!n||!n.hitAreaCallback(n.hitArea,e,i,t)||(n.localX=e,n.localY=i,0))},pointWithinInteractiveObject:function(t,e,i){return!!t.hitArea&&(e+=t.gameObject.displayOriginX,i+=t.gameObject.displayOriginY,t.localX=e,t.localY=i,t.hitAreaCallback(t.hitArea,e,i,t))},transformPointer:function(t,e,i,n){var r=t.position,s=t.prevPosition;s.x=r.x,s.y=r.y;var o=this.scaleManager.transformX(e),a=this.scaleManager.transformY(i),h=t.smoothFactor;n&&0!==h?(r.x=o*h+s.x*(1-h),r.y=a*h+s.y*(1-h)):(r.x=o,r.y=a)},destroy:function(){this.events.removeAllListeners(),this.game.events.off(a.PRE_RENDER),this.keyboard&&this.keyboard.destroy(),this.mouse&&this.mouse.destroy(),this.touch&&this.touch.destroy();for(var t=0;t<this.pointers.length;t++)this.pointers[t].destroy();this.pointers=[],this._tempHitTest=[],this._tempMatrix.destroy(),this.canvas=null,this.game=null}});t.exports=p},function(t,e,i){ 1642/** 1643 * @author Richard Davey <[email protected]> 1644 * @copyright 2020 Photon Storm Ltd. 1645 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1646 */ 1647var n=i(89),r=i(0),s=i(22),o=i(49),a=i(141),h=i(1),u=new r({initialize:function(t){this.manager=t,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=h,this.onKeyUp=h,t.events.once(o.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.addCapture(t.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(s.POST_STEP,this.postUpdate,this)},startListeners:function(){var t=this;this.onKeyDown=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i<t.length;i++){var n=t[i];"string"==typeof n&&(n=a[n.trim().toUpperCase()]),-1===e.indexOf(n)&&e.push(n)}this.preventDefault=e.length>0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i<t.length;i++){var r=t[i];"string"==typeof r&&(r=a[r.toUpperCase()]),n(e,r)}this.preventDefault=e.length>0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(s.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=u},function(t,e,i){ 1648/** 1649 * @author Richard Davey <[email protected]> 1650 * @copyright 2020 Photon Storm Ltd. 1651 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1652 */ 1653var n=i(0),r=i(188),s=i(49),o=i(1),a=new n({initialize:function(t){this.manager=t,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,this.isTop=!0,t.events.once(s.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.passive=t.inputMousePassive,this.preventDefaultDown=t.inputMousePreventDefaultDown,this.preventDefaultUp=t.inputMousePreventDefaultUp,this.preventDefaultMove=t.inputMousePreventDefaultMove,this.preventDefaultWheel=t.inputMousePreventDefaultWheel,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},requestPointerLock:function(){if(r.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){r.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,n=i.canvas,s=window&&window.focus&&i.game.config.autoFocus;this.onMouseMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseMove(t),e.preventDefaultMove&&t.preventDefault())},this.onMouseDown=function(t){s&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseDown(t),e.preventDefaultDown&&t.target===n&&t.preventDefault())},this.onMouseDownWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==n&&i.onMouseDown(t)},this.onMouseUp=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseUp(t),e.preventDefaultUp&&t.target===n&&t.preventDefault())},this.onMouseUpWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==n&&i.onMouseUp(t)},this.onMouseOver=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOver(t)},this.onMouseOut=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOut(t)},this.onMouseWheel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onMouseWheel(t),e.preventDefaultWheel&&t.target===n&&t.preventDefault()};var o={passive:!0};if(t.addEventListener("mousemove",this.onMouseMove),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("mouseover",this.onMouseOver,o),t.addEventListener("mouseout",this.onMouseOut,o),this.preventDefaultWheel?t.addEventListener("wheel",this.onMouseWheel,{passive:!1}):t.addEventListener("wheel",this.onMouseWheel,o),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,o),window.top.addEventListener("mouseup",this.onMouseUpWindow,o)}catch(a){window.addEventListener("mousedown",this.onMouseDownWindow,o),window.addEventListener("mouseup",this.onMouseUpWindow,o),this.isTop=!1}r.pointerLock&&(this.pointerLockChange=function(t){var n=e.target;e.locked=document.pointerLockElement===n||document.mozPointerLockElement===n||document.webkitPointerLockElement===n,i.onPointerLockChange(t)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&((t=this.isTop?window.top:window).removeEventListener("mousedown",this.onMouseDownWindow),t.removeEventListener("mouseup",this.onMouseUpWindow)),r.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=a},function(t,e,i){ 1654/** 1655 * @author Richard Davey <[email protected]> 1656 * @copyright 2020 Photon Storm Ltd. 1657 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1658 */ 1659var n=i(343),r=i(0),s=i(48),o=i(123),a=i(354),h=i(3),u=i(102),l=new r({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=t.getWorldPoint(this.x,this.y);return this.worldX=e.x,this.worldY=e.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,r=this.midPoint.y;if(t!==i||e!==r){var s=a(this.motionFactor,i,t),h=a(this.motionFactor,r,e);o(s,t,.1)&&(s=t),o(h,e,.1)&&(h=e),this.midPoint.set(s,h);var u=t-s,l=e-h;this.velocity.set(u,l),this.angle=n(s,h,t,e),this.distance=Math.sqrt(u*u+l*l)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),0===this.buttons&&(this.isDown=!1,this.upTime=t.timeStamp,this.wasTouch=!1)},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),u.macOS&&t.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=t.timeStamp),this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?s(this.downX,this.downY,this.x,this.y):s(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?n(this.downX,this.downY,this.x,this.y):n(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,n=this.prevPosition.y,r=this.position.x,s=this.position.y,o=0;o<t;o++){var h=1/t*o;e[o]={x:a(h,i,r),y:a(h,n,s)}}return e},destroy:function(){this.camera=null,this.manager=null,this.position=null},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},time:{get:function(){return this.event?this.event.timeStamp:0}}});t.exports=l}
1659,function(t,e,i){ 1660/** 1661 * @author Richard Davey <[email protected]> 1662 * @copyright 2020 Photon Storm Ltd. 1663 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1664 */ 1665var n=i(0),r=i(49),s=i(1),o=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=s,this.onTouchStartWindow=s,this.onTouchMove=s,this.onTouchEnd=s,this.onTouchEndWindow=s,this.onTouchCancel=s,this.onTouchCancelWindow=s,this.onTouchOver=s,this.onTouchOut=s,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target||(this.target=this.manager.game.canvas),t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},startListeners:function(){var t=this,e=this.manager.canvas,i=window&&window.focus&&this.manager.game.config.autoFocus;this.onTouchStart=function(n){i&&window.focus(),!n.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onTouchStart(n),t.capture&&n.cancelable&&n.target===e&&n.preventDefault())},this.onTouchStartWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onTouchStart(i)},this.onTouchMove=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onTouchMove(e),t.capture&&e.cancelable&&e.preventDefault())},this.onTouchEnd=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onTouchEnd(i),t.capture&&i.cancelable&&i.target===e&&i.preventDefault())},this.onTouchEndWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onTouchEnd(i)},this.onTouchCancel=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onTouchCancel(e),t.capture&&e.preventDefault())},this.onTouchCancelWindow=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.onTouchCancel(e)},this.onTouchOver=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOver(e)},this.onTouchOut=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOut(e)};var n=this.target;if(n){var r={passive:!0},s={passive:!1};n.addEventListener("touchstart",this.onTouchStart,this.capture?s:r),n.addEventListener("touchmove",this.onTouchMove,this.capture?s:r),n.addEventListener("touchend",this.onTouchEnd,this.capture?s:r),n.addEventListener("touchcancel",this.onTouchCancel,this.capture?s:r),n.addEventListener("touchover",this.onTouchOver,this.capture?s:r),n.addEventListener("touchout",this.onTouchOut,this.capture?s:r),window&&this.manager.game.config.inputWindowEvents&&(window.addEventListener("touchstart",this.onTouchStartWindow,s),window.addEventListener("touchend",this.onTouchEndWindow,s),window.addEventListener("touchcancel",this.onTouchCancelWindow,s)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.onTouchStart),t.removeEventListener("touchmove",this.onTouchMove),t.removeEventListener("touchend",this.onTouchEnd),t.removeEventListener("touchcancel",this.onTouchCancel),t.removeEventListener("touchover",this.onTouchOver),t.removeEventListener("touchout",this.onTouchOut),window&&(window.removeEventListener("touchstart",this.onTouchStartWindow),window.removeEventListener("touchend",this.onTouchEndWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=o},function(t,e,i){ 1666/** 1667 * @author Richard Davey <[email protected]> 1668 * @copyright 2020 Photon Storm Ltd. 1669 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1670 */ 1671var n=i(0),r=i(22),s=i(9),o=i(8),a=i(16),h=i(5),u=i(2),l=i(24),c=i(89),f=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once(r.BOOT,this.boot,this)},boot:function(){var t,e,i,n,s,o,a,h=this.game.config,l=h.installGlobalPlugins;
vendor: 24,913 bytes, lines 1671-1689
1671for(l=l.concat(this._pendingGlobal),t=0;t<l.length;t++)e=l[t],i=u(e,"key",null),n=u(e,"plugin",null),s=u(e,"start",!1),o=u(e,"mapping",null),a=u(e,"data",null),i&&(n?this.install(i,n,s,o,a):console.warn("Missing `plugin` for key: "+i));for(l=(l=h.installScenePlugins).concat(this._pendingScene),t=0;t<l.length;t++)e=l[t],i=u(e,"key",null),n=u(e,"plugin",null),o=u(e,"mapping",null),i&&(n?this.installScenePlugin(i,n,o):console.warn("Missing `plugin` for key: "+i));this._pendingGlobal=[],this._pendingScene=[],this.game.events.once(r.DESTROY,this.destroy,this)},addToScene:function(t,e,i){var n,r,s,o=this.game,a=t.scene,h=t.settings.map,u=t.settings.isBooted;for(n=0;n<e.length;n++)o[r=e[n]]?(t[r]=o[r],h.hasOwnProperty(r)&&(a[h[r]]=t[r])):"game"===r&&h.hasOwnProperty(r)&&(a[h[r]]=o);for(var c=0;c<i.length;c++)for(s=i[c],n=0;n<s.length;n++)if(r=s[n],l.hasCore(r)){var f=l.getCore(r),d=new f.plugin(a,this);t[f.mapping]=d,f.custom?a[f.mapping]=d:h.hasOwnProperty(f.mapping)&&(a[h[f.mapping]]=d),u&&d.boot()}for(s=this.plugins,n=0;n<s.length;n++){var p=s[n];p.mapping&&(a[p.mapping]=p.plugin)}},getDefaultScenePlugins:function(){var t=this.game.config.defaultPlugins;return t=t.concat(this.scenePlugins)},installScenePlugin:function(t,e,i,n,r){if(void 0===r&&(r=!1),"function"==typeof e){if(l.hasCore(t)){if(!r&&l.hasCore(t))return void console.warn("Scene Plugin key in use: "+t)}else l.register(t,e,i,!0),this.scenePlugins.push(t);if(n){var s=new e(n,this);n.sys[t]=s,i&&""!==i&&(n[i]=s),s.boot()}}else console.warn("Invalid Scene Plugin: "+t)},install:function(t,e,i,n,r){if(void 0===i&&(i=!1),void 0===n&&(n=null),void 0===r&&(r=null),"function"!=typeof e)return console.warn("Invalid Plugin: "+t),null;if(l.hasCustom(t))return console.warn("Plugin key in use: "+t),null;if(null!==n&&(i=!0),this.game.isBooted){if(l.registerCustom(t,e,n,r),i)return this.start(t)}else this._pendingGlobal.push({key:t,plugin:e,start:i,mapping:n,data:r});return null},getIndex:function(t){for(var e=this.plugins,i=0;i<e.length;i++)if(e[i].key===t)return i;return-1},getEntry:function(t){var e=this.getIndex(t);if(-1!==e)return this.plugins[e]},isActive:function(t){var e=this.getEntry(t);return e&&e.active},start:function(t,e){void 0===e&&(e=t);var i=this.getEntry(e);return i&&!i.active?(i.active=!0,i.plugin.start()):i||(i=this.createEntry(t,e)),i?i.plugin:null},createEntry:function(t,e){var i=l.getCustom(t);if(i){var n=new i.plugin(this);i={key:e,plugin:n,active:!0,mapping:i.mapping,data:i.data},this.plugins.push(i),n.init(i.data),n.start()}return i},stop:function(t){var e=this.getEntry(t);return e&&e.active&&(e.active=!1,e.plugin.stop()),this},get:function(t,e){void 0===e&&(e=!0);var i=this.getEntry(t);if(i)return i.plugin;var n=this.getClass(t);return n&&e?(i=this.createEntry(t,t))?i.plugin:null:n||null},getClass:function(t){return l.getCustomClass(t)},removeGlobalPlugin:function(t){var e=this.getEntry(t);e&&c(this.plugins,e),l.removeCustom(t)},removeScenePlugin:function(t){c(this.scenePlugins,t),l.remove(t)},registerGameObject:function(t,e,i){return e&&h.register(t,e),i&&a.register(t,i),this},removeGameObject:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),e&&h.remove(t),i&&a.remove(t),this},registerFileType:function(t,e,i){o.register(t,e),i&&i.sys.load&&(i.sys.load[t]=e)},destroy:function(){for(var t=0;t<this.plugins.length;t++)this.plugins[t].plugin.destroy();l.destroyCustomPlugins(),this.game.noReturn&&l.destroyCorePlugins(),this.game=null,this.plugins=[],this.scenePlugins=[]}});t.exports=f},function(t,e,i){ 1672/** 1673 * @author Richard Davey <[email protected]> 1674 * @copyright 2020 Photon Storm Ltd. 1675 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1676 */ 1677var n=i(198),r=i(0),s=i(9),o=i(101),a=i(22),h=i(395),u=i(401),l=i(396),c=i(1),f=i(10),d=i(410),p=i(76),v=i(3),g=new r({Extends:s,initialize:function(t){s.call(this),this.game=t,this.canvas,this.canvasBounds=new f,this.parent=null,this.parentIsWindow=!1,this.parentSize=new d,this.gameSize=new d,this.baseSize=new d,this.displaySize=new d,this.scaleMode=n.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new v(1,1),this.autoRound=!1,this.autoCenter=n.CENTER.NO_CENTER,this.orientation=n.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.listeners={orientationChange:c,windowResize:c,fullScreenChange:c,fullScreenError:c}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(a.BOOT,this.boot,this)},boot:function(){var t=this.game;this.canvas=t.canvas,this.fullscreen=t.device.fullscreen,this.scaleMode!==n.SCALE_MODE.RESIZE&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===n.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(a.PRE_STEP,this.step,this),t.events.once(a.READY,this.refresh,this),t.events.once(a.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,r=t.scaleMode,s=t.zoom,o=t.autoRound;if("string"==typeof e){var a=this.parentSize.width;0===a&&(a=window.innerWidth);var h=parseInt(e,10)/100;e=Math.floor(a*h)}if("string"==typeof i){var u=this.parentSize.height;0===u&&(u=window.innerHeight);var c=parseInt(i,10)/100;i=Math.floor(u*c)}this.scaleMode=r,this.autoRound=o,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,o&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),s===n.ZOOM.MAX_ZOOM&&(s=this.getMaxZoom()),this.zoom=s,1!==s&&(this._resetZoom=!0),this.baseSize.setSize(e,i),o&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*s,t.minHeight*s),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*s,t.maxHeight*s),this.displaySize.setSize(e,i),this.orientation=l(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=u(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==n.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=u(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=e.width,n=e.height;return(t.width!==i||t.height!==n)&&(t.setSize(i,n),!0)},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e.call(screen,t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound;i&&(t=Math.floor(t),e=Math.floor(e));var n=this.width,r=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t,e),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(t/e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(n,r)},resize:function(t,e){var i=this.zoom,n=this.autoRound;n&&(t=Math.floor(t),e=Math.floor(e));var r=this.width,s=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t,e),n&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i,e*i),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var o=this.canvas.style,a=t*i,h=e*i;return n&&(a=Math.floor(a),h=Math.floor(h)),a===t&&h===e||(o.width=a+"px",o.height=h+"px"),this.refresh(r,s)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var n=this.canvas.style,r=i.style;r.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",r.marginLeft=n.marginLeft,r.marginTop=n.marginTop}return this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=l(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(o.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,r=this.gameSize.width,s=this.gameSize.height,o=this.zoom,a=this.autoRound;this.scaleMode===n.SCALE_MODE.NONE?(this.displaySize.setSize(r*o,s*o),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1)):this.scaleMode===n.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=p(this.parentSize.width,this.gameSize.width,0,!0),e=p(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==n.CENTER.NO_CENTER){var e=this.canvas,i=e.style,r=e.getBoundingClientRect(),s=r.width,o=r.height,a=Math.floor((this.parentSize.width-s)/2),h=Math.floor((this.parentSize.height-o)/2);t===n.CENTER.CENTER_HORIZONTALLY?h=0:t===n.CENTER.CENTER_VERTICALLY&&(a=0),i.marginLeft=a+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i=this.getFullscreenTarget();e.keyboard?i[e.request](Element.ALLOW_KEYBOARD_INPUT):i[e.request](t)}}else this.emit(o.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(o.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(o.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}return this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas)),this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(o.FULLSCREEN_UNSUPPORTED),!1;t.active&&document[t.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(o.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.listeners;e.orientationChange=function(){t.updateBounds(),t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.updateBounds(),t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available&&(e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)},["webkit","moz",""].forEach((function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)})),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1))},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.listeners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1),["webkit","moz",""].forEach((function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)})),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===n.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===n.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=g},function(t,e,i){ 1678/** 1679 * @author Richard Davey <[email protected]> 1680 * @copyright 2020 Photon Storm Ltd. 1681 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1682 */ 1683var n=i(18),r=i(0),s=i(76),o=i(3),a=new r({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(s(t,this.snapTo.x)),this._height=this.getNewHeight(s(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(s(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(s(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(s(t,this.snapTo.x)),this._height=this.getNewHeight(s(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,r=0===e?1:t/e;return i&&this.aspectRatio>r||!i&&this.aspectRatio<r?(e=(t=s(t,n.x))/this.aspectRatio,n.y>0&&(t=(e=s(e,n.y))*this.aspectRatio)):(i&&this.aspectRatio<r||!i&&this.aspectRatio>r)&&(t=(e=s(e,n.y))*this.aspectRatio,n.x>0&&(e=(t=s(t,n.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});a.NONE=0,a.WIDTH_CONTROLS_HEIGHT=1,a.HEIGHT_CONTROLS_WIDTH=2,a.FIT=3,a.ENVELOP=4,t.exports=a},function(t,e,i){ 1684/** 1685 * @author Richard Davey <[email protected]> 1686 * @copyright 2020 Photon Storm Ltd. 1687 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1688 */ 1689var n=i(0),r=i(142),s=i(21),o=i(22),a=i(6),h=i(91),u=i(1),l=i(412),c=i(201),f=new n({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)this._pending.push({key:"default",scene:e[i],autoStart:0===i,data:{}})}t.events.once(o.READY,this.bootQueue,this)},bootQueue:function(){if(!this.isBooted){var t,e,i,n;for(t=0;t<this._pending.length;t++){var r;i=(e=this._pending[t]).key,(n=e.scene)instanceof l?r=this.createSceneFromInstance(i,n):"object"==typeof n?r=this.createSceneFromObject(i,n):"function"==typeof n&&(r=this.createSceneFromFunction(i,n)),i=r.sys.settings.key,this.keys[i]=r,this.scenes.push(r),this._data[i]&&(r.sys.settings.data=this._data[i].data,this._data[i].autoStart&&(e.autoStart=!0)),(e.autoStart||r.sys.settings.active)&&this._start.push(i)}for(this._pending.length=0,this._data={},this.isBooted=!0,t=0;t<this._start.length;t++)e=this._start[t],this.start(e);this._start.length=0}},processQueue:function(){var t=this._pending.length,e=this._queue.length;if(0!==t||0!==e){var i,n;if(t){for(i=0;i<t;i++)n=this._pending[i],this.add(n.key,n.scene,n.autoStart,n.data);for(i=0;i<this._start.length;i++)n=this._start[i],this.start(n);return this._start.length=0,void(this._pending.length=0)}for(i=0;i<this._queue.length;i++)this[(n=this._queue[i]).op](n.keyA,n.keyB);this._queue.length=0}},add:function(t,e,i,n){return void 0===i&&(i=!1),void 0===n&&(n={}),this.isProcessing||!this.isBooted?(this._pending.push({key:t,scene:e,autoStart:i,data:n}),this.isBooted||(this._data[t]={data:n}),null):(t=this.getKey(t,e),e instanceof l?r=this.createSceneFromInstance(t,e):"object"==typeof e?(e.key=t,r=this.createSceneFromObject(t,e)):"function"==typeof e&&(r=this.createSceneFromFunction(t,e)),r.sys.settings.data=n,t=r.sys.settings.key,this.keys[t]=r,this.scenes.push(r),(i||r.sys.settings.active)&&(this._pending.length?this._start.push(t):this.start(t)),r);var r},remove:function(t){if(this.isProcessing)this._queue.push({op:"remove",keyA:t,keyB:null});else{var e=this.getScene(t);if(!e||e.sys.isTransitioning())return this;var i=this.scenes.indexOf(e),n=e.sys.settings.key;i>-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;i.sceneUpdate=u,t.init&&(t.init.call(t,n.data),n.status=r.INIT,n.isTransition&&i.events.emit(s.TRANSITION_INIT,n.transitionFrom,n.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),0===e.list.size?this.create(t):(n.status=r.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){var e=t.scene;this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(e)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var n=this.scenes[i].sys;n.settings.status>r.START&&n.settings.status<=r.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e<this.scenes.length;e++){var i=this.scenes[e].sys;i.settings.visible&&i.settings.status>=r.LOADING&&i.settings.status<r.SLEEPING&&i.render(t)}this.isProcessing=!1},create:function(t){var e=t.sys,i=e.settings;t.create&&(i.status=r.CREATING,t.create.call(t,i.data),i.status===r.DESTROYED)||(i.isTransition&&e.events.emit(s.TRANSITION_START,i.transitionFrom,i.transitionDuration),t.update&&(e.sceneUpdate=t.update),i.status=r.RUNNING,e.events.emit(s.CREATE,t))},createSceneFromFunction:function(t,e){var i=new e;if(i instanceof l){var n=i.sys.settings.key;if(""!==n&&(t=n),this.keys.hasOwnProperty(t))throw new Error("Cannot add a Scene with duplicate key: "+t);return this.createSceneFromInstance(t,i)}return i.sys=new c(i),i.sys.settings.key=t,i.sys.init(this.game),i},createSceneFromInstance:function(t,e){return""===e.sys.settings.key&&(e.sys.settings.key=t),e.sys.init(this.game),e},createSceneFromObject:function(t,e){var i=new l(e),n=i.sys.settings.key;""!==n?t=n:i.sys.settings.key=t,i.sys.init(this.game);for(var r=["init","preload","create","update","render"],s=0;s<r.length;s++){var o=a(e,r[s],null);o&&(i[r[s]]=o)}if(e.hasOwnProperty("extend"))for(var h in e.extend)if(e.extend.hasOwnProperty(h)){var u=e.extend[h];"data"===h&&i.hasOwnProperty("data")&&"object"==typeof u?i.data.merge(u):"sys"!==h&&(i[h]=u)}return i},getKey:function(t,e){if(t||(t="default"),"function"==typeof e)return t;if(e instanceof l?t=e.sys.settings.key:"object"==typeof e&&e.hasOwnProperty("key")&&(t=e.key),this.keys.hasOwnProperty(t))throw new Error("Cannot add a Scene with duplicate key: "+t);return t},getScenes:function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1);for(var i=[],n=this.scenes,r=0;r<n.length;r++){var s=n[r];s&&(!t||t&&s.sys.isActive())&&i.push(s)}return e?i.reverse():i},getScene:function(t){if("string"==typeof t){if(this.keys[t])return this.keys[t]}else for(var e=0;e<this.scenes.length;e++)if(t===this.scenes[e])return t;return null},isActive:function(t){var e=this.getScene(t);return e?e.sys.isActive():null},isPaused:function(t){var e=this.getScene(t);return e?e.sys.isPaused():null},isVisible:function(t){var e=this.getScene(t);return e?e.sys.isVisible():null},isSleeping:function(t){var e=this.getScene(t);return e?e.sys.isSleeping():null},pause:function(t,e){var i=this.getScene(t);return i&&i.sys.pause(e),this},resume:function(t,e){var i=this.getScene(t);return i&&i.sys.resume(e),this},sleep:function(t,e){var i=this.getScene(t);return i&&!i.sys.isTransitioning()&&i.sys.sleep(e),this},wake:function(t,e){var i=this.getScene(t);return i&&i.sys.wake(e),this},run:function(t,e){var i=this.getScene(t);if(!i){for(var n=0;
vendor: 4,371 bytes, lines 1689-1701
1689n<this._pending.length;n++)if(this._pending[n].key===t){this.queueOp("start",t,e);break}return this}i.sys.isSleeping()?i.sys.wake(e):i.sys.isPaused()?i.sys.resume(e):this.start(t,e)},start:function(t,e){if(!this.isBooted)return this._data[t]={autoStart:!0,data:e},this;var i=this.getScene(t);if(i){var n,s=i.sys;if(s.isActive()||s.isPaused())s.shutdown(),s.sceneUpdate=u,s.start(e);else if(s.sceneUpdate=u,s.start(e),s.load&&(n=s.load),n&&s.settings.hasOwnProperty("pack")&&(n.reset(),n.addPack({payload:s.settings.pack})))return s.settings.status=r.LOADING,n.once(h.COMPLETE,this.payloadComplete,this),n.start(),this;this.bootScene(i)}return this},stop:function(t,e){var i=this.getScene(t);return i&&!i.sys.isTransitioning()&&i.sys.shutdown(e),this},switch:function(t,e){var i=this.getScene(t),n=this.getScene(e);return i&&n&&i!==n&&(this.sleep(t),this.isSleeping(e)?this.wake(e):this.start(e)),this},getAt:function(t){return this.scenes[t]},getIndex:function(t){var e=this.getScene(t);return this.scenes.indexOf(e)},bringToTop:function(t){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:t,keyB:null});else{var e=this.getIndex(t);if(-1!==e&&e<this.scenes.length){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.push(i)}}return this},sendToBack:function(t){if(this.isProcessing)this._queue.push({op:"sendToBack",keyA:t,keyB:null});else{var e=this.getIndex(t);if(-1!==e&&e>0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),r=this.getAt(i);this.scenes[e]=r,this.scenes[i]=n}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e<this.scenes.length-1){var i=e+1,n=this.getScene(t),r=this.getAt(i);this.scenes[e]=r,this.scenes[i]=n}}return this},moveAbove:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveAbove",keyA:t,keyB:e});else{var i=this.getIndex(t),n=this.getIndex(e);if(-1!==i&&-1!==n){var r=this.getAt(n);this.scenes.splice(n,1),this.scenes.splice(i+1,0,r)}}return this},moveBelow:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:t,keyB:e});else{var i=this.getIndex(t),n=this.getIndex(e);if(-1!==i&&-1!==n){var r=this.getAt(n);this.scenes.splice(n,1),0===i?this.scenes.unshift(r):this.scenes.splice(i,0,r)}}return this},queueOp:function(t,e,i){return this._queue.push({op:t,keyA:e,keyB:i}),this},swapPosition:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"swapPosition",keyA:t,keyB:e});else{var i=this.getIndex(t),n=this.getIndex(e);if(i!==n&&-1!==i&&-1!==n){var r=this.getAt(i);this.scenes[i]=this.scenes[n],this.scenes[n]=r}}return this},dump:function(){for(var t=[],e=["pending","init","start","loading","creating","running","paused","sleeping","shutdown","destroyed"],i=0;i<this.scenes.length;i++){var n=this.scenes[i].sys,s=!n.settings.visible||n.settings.status!==r.RUNNING&&n.settings.status!==r.PAUSED?"[-] ":"[*] ";s+=n.settings.key+" ("+e[n.settings.status]+")",t.push(s)}console.log(t.join("\n"))},destroy:function(){for(var t=0;t<this.scenes.length;t++)this.scenes[t].sys.destroy();this.update=u,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=f},function(t,e,i){ 1690/** 1691 * @author Richard Davey <[email protected]> 1692 * @copyright 2020 Photon Storm Ltd. 1693 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1694 */ 1695var n=i(0),r=i(201),s=new n({initialize:function(t){this.sys=new r(this,t),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.scale,this.plugins,this.renderer},update:function(){}});t.exports=s},function(t,e,i){ 1696/** 1697 * @author Richard Davey <[email protected]> 1698 * @copyright 2020 Photon Storm Ltd. 1699 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1700 */ 1701var n=i(2),r=i(202);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var s=[];
vendor: 8,681 bytes, lines 1701-1725
1701if(e&&s.push(r(e+"Physics")),i)for(var o in i)o=r(o.concat("Physics")),-1===s.indexOf(o)&&s.push(o);return s}}},function(t,e,i){ 1702/** 1703 * @author Richard Davey <[email protected]> 1704 * @copyright 2020 Photon Storm Ltd. 1705 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1706 */ 1707var n=i(2);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e,i){ 1708/** 1709 * @author Richard Davey <[email protected]> 1710 * @copyright 2020 Photon Storm Ltd. 1711 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1712 */ 1713var n=i(142),r=i(6),s=i(143),o=i(974),a={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:r(t,"key",""),active:r(t,"active",!1),visible:r(t,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:r(t,"pack",!1),cameras:r(t,"cameras",null),map:r(t,"map",s(o,r(t,"mapAdd",{}))),physics:r(t,"physics",{}),loader:r(t,"loader",{}),plugins:r(t,"plugins",!1),input:r(t,"input",{})}}};t.exports=a},function(t,e,i){ 1714/** 1715 * @author Richard Davey <[email protected]> 1716 * @copyright 2020 Photon Storm Ltd. 1717 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1718 */ 1719var n=i(31),r=i(417),s=i(0),o=i(37),a=i(32),h=i(9),u=i(103),l=i(22),c=i(382),f=i(6),d=i(419),p=i(203),v=new s({Extends:h,initialize:function(t){h.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=n.create2D(this,1,1),this._tempContext=this._tempCanvas.getContext("2d"),this._pending=0,t.events.once(l.BOOT,this.boot,this)},boot:function(){this.on(u.LOAD,this.updatePending,this),this.on(u.ERROR,this.updatePending,this);var t=this.game.config;this.addBase64("__DEFAULT",t.defaultImage),this.addBase64("__MISSING",t.missingImage),this.addBase64("__WHITE",t.whiteImage),this._pending=3,this.game.events.once(l.DESTROY,this.destroy,this)},updatePending:function(){this._pending--,0===this._pending&&(this.off(u.LOAD),this.off(u.ERROR),this.emit(u.READY))},checkKey:function(t){return!this.exists(t)||(console.error("Texture key already in use: "+t),!1)},remove:function(t){if("string"==typeof t){if(!this.exists(t))return console.warn("No texture found matching key: "+t),this;t=this.get(t)}return this.list.hasOwnProperty(t.key)&&(t.destroy(),this.emit(u.REMOVE,t.key)),this},removeKey:function(t){return this.list.hasOwnProperty(t)&&delete this.list[t],this},addBase64:function(t,e){if(this.checkKey(t)){var i=this,n=new Image;n.onerror=function(){i.emit(u.ERROR,t)},n.onload=function(){var e=i.create(t,n);d.Image(e,0),i.emit(u.ADD,t,e),i.emit(u.LOAD,t,e)},n.src=e}return this},getBase64:function(t,e,i,r){void 0===i&&(i="image/png"),void 0===r&&(r=.92);var s="",o=this.getFrame(t,e);if(o&&(o.source.isRenderTexture||o.source.isGLTexture))console.warn("Cannot getBase64 from WebGL Texture");else if(o){var a=o.canvasData,h=n.create2D(this,a.width,a.height);h.getContext("2d").drawImage(o.source.image,a.x,a.y,a.width,a.height,0,0,a.width,a.height),s=h.toDataURL(i,r),n.remove(h)}return s},addImage:function(t,e,i){var n=null;return this.checkKey(t)&&(n=this.create(t,e),d.Image(n,0),i&&n.setDataSource(i),this.emit(u.ADD,t,n)),n},addGLTexture:function(t,e,i,n){var r=null;return this.checkKey(t)&&(void 0===i&&(i=e.width),void 0===n&&(n=e.height),(r=this.create(t,e,i,n)).add("__BASE",0,0,0,i,n),this.emit(u.ADD,t,r)),r},addRenderTexture:function(t,e){var i=null;return this.checkKey(t)&&((i=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),this.emit(u.ADD,t,i)),i},generate:function(t,e){if(this.checkKey(t)){var i=n.create(this,1,1);return e.canvas=i,c(e),this.addCanvas(t,i)}return null},createCanvas:function(t,e,i){if(void 0===e&&(e=256),void 0===i&&(i=256),this.checkKey(t)){var r=n.create(this,e,i,a.CANVAS,!0);return this.addCanvas(t,r)}return null},addCanvas:function(t,e,i){void 0===i&&(i=!1);var n=null;return i?n=new r(this,t,e,e.width,e.height):this.checkKey(t)&&(n=new r(this,t,e,e.width,e.height),this.list[t]=n,this.emit(u.ADD,t,n)),n},addAtlas:function(t,e,i,n){return Array.isArray(i.textures)||Array.isArray(i.frames)?this.addAtlasJSONArray(t,e,i,n):this.addAtlasJSONHash(t,e,i,n)},addAtlasJSONArray:function(t,e,i,n){var r=null;if(this.checkKey(t)){if(r=this.create(t,e),Array.isArray(i))for(var s=1===i.length,o=0;o<r.source.length;o++){var a=s?i[0]:i[o];d.JSONArray(r,o,a)}else d.JSONArray(r,0,i);n&&r.setDataSource(n),this.emit(u.ADD,t,r)}return r},addAtlasJSONHash:function(t,e,i,n){var r=null;if(this.checkKey(t)){if(r=this.create(t,e),Array.isArray(i))for(var s=0;s<i.length;s++)d.JSONHash(r,s,i[s]);else d.JSONHash(r,0,i);n&&r.setDataSource(n),this.emit(u.ADD,t,r)}return r},addAtlasXML:function(t,e,i,n){var r=null;return this.checkKey(t)&&(r=this.create(t,e),d.AtlasXML(r,0,i),n&&r.setDataSource(n),this.emit(u.ADD,t,r)),r},addUnityAtlas:function(t,e,i,n){var r=null;return this.checkKey(t)&&(r=this.create(t,e),d.UnityYAML(r,0,i),n&&r.setDataSource(n),this.emit(u.ADD,t,r)),r},addSpriteSheet:function(t,e,i){var n=null;if(this.checkKey(t)){var r=(n=this.create(t,e)).source[0].width,s=n.source[0].height;d.SpriteSheet(n,0,0,0,r,s,i),this.emit(u.ADD,t,n)}return n},addSpriteSheetFromAtlas:function(t,e){if(!this.checkKey(t))return null;var i=f(e,"atlas",null),n=f(e,"frame",null);if(i&&n){var r=this.get(i).get(n);if(r){var s=this.create(t,r.source.image);return r.trimmed?d.SpriteSheetFromAtlas(s,r,e):d.SpriteSheet(s,0,r.cutX,r.cutY,r.cutWidth,r.cutHeight,e),this.emit(u.ADD,t,s),s}}},create:function(t,e,i,n){var r=null;return this.checkKey(t)&&(r=new p(this,t,e,i,n),this.list[t]=r),r},exists:function(t){return this.list.hasOwnProperty(t)},get:function(t){return void 0===t&&(t="__DEFAULT"),this.list[t]?this.list[t]:t instanceof p?t:this.list.__MISSING},cloneFrame:function(t,e){if(this.list[t])return this.list[t].get(e).clone()},getFrame:function(t,e){if(this.list[t])return this.list[t].get(e)},getTextureKeys:function(){var t=[];for(var e in this.list)"__DEFAULT"!==e&&"__MISSING"!==e&&t.push(e);return t},getPixel:function(t,e,i,n){var r=this.getFrame(i,n);if(r){t-=r.x,e-=r.y;var s=r.data.cut;if(t+=s.x,e+=s.y,t>=s.x&&t<s.r&&e>=s.y&&e<s.b){var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(r.source.image,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new o(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},getPixelAlpha:function(t,e,i,n){var r=this.getFrame(i,n);if(r){t-=r.x,e-=r.y;var s=r.data.cut;if(t+=s.x,e+=s.y,t>=s.x&&t<s.r&&e>=s.y&&e<s.b){var o=this._tempContext;return o.clearRect(0,0,1,1),o.drawImage(r.source.image,t,e,1,1,0,0,1,1),o.getImageData(0,0,1,1).data[3]}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},renameTexture:function(t,e){var i=this.get(t);return!(!i||t===e||(i.key=e,this.list[e]=i,delete this.list[t],0))},each:function(t,e){for(var i=[null],n=1;n<arguments.length;n++)i.push(arguments[n]);for(var r in this.list)i[0]=this.list[r],t.apply(e,i)},destroy:function(){for(var t in this.list)this.list[t].destroy();this.list={},this.game=null,n.remove(this._tempCanvas)}});t.exports=v},function(t,e,i){ 1720/** 1721 * @author Richard Davey <[email protected]> 1722 * @copyright 2020 Photon Storm Ltd. 1723 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1724 */ 1725var n=i(0),r=i(18),s=i(37),o=i(32),a=i(136),h=i(203),u=new n({Extends:h,initialize:function(t,e,i,n,r){h.call(this,t,e,i,n,r),this.add("__BASE",0,0,0,n,r),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d"),this.width=n,this.height=r,this.imageData=this.context.getImageData(0,0,n,r),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===o.WEBGL&&this.refresh(),this}
1725,draw:function(t,e,i){return this.context.drawImage(i,t,e),this.update()},drawFrame:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0);var r=this.manager.getFrame(t,e);if(r){var s=r.canvasData,o=r.cutWidth,a=r.cutHeight,h=r.source.resolution;return this.context.drawImage(r.source.image,s.x,s.y,o,a,i,n,o/h,a/h),this.update()}return this},setPixel:function(t,e,i,n,r,s){if(void 0===s&&(s=255),t=Math.abs(Math.floor(t)),e=Math.abs(Math.floor(e)),this.getIndex(t,e)>-1){var o=this.context.getImageData(t,e,1,1);o.data[0]=i,o.data[1]=n,o.data[2]=r,o.data[3]=s,this.context.putImageData(o,t,e)}return this},putData:function(t,e,i,n,r,s,o){return void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=t.width),void 0===o&&(o=t.height),this.context.putImageData(t,e,i,n,r,s,o),this},getData:function(t,e,i,n){return t=r(Math.floor(t),0,this.width-1),e=r(Math.floor(e),0,this.height-1),i=r(i,1,this.width-t),n=r(n,1,this.height-e),this.context.getImageData(t,e,i,n)},getPixel:function(t,e,i){i||(i=new s);var n=this.getIndex(t,e);if(n>-1){var r=this.data,o=r[n+0],a=r[n+1],h=r[n+2],u=r[n+3];i.setTo(o,a,h,u)}return i},getPixels:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var o=r(t,0,this.width),a=r(t+i,0,this.width),h=r(e,0,this.height),u=r(e+n,0,this.height),l=new s,c=[],f=h;f<u;f++){for(var d=[],p=o;p<a;p++)l=this.getPixel(p,f,l),d.push({x:p,y:f,color:l.color,alpha:l.alphaGL});c.push(d)}return c},getIndex:function(t,e){return t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e)),t<this.width&&e<this.height?4*(t+e*this.width):-1},refresh:function(){return this._source.update(),this},getCanvas:function(){return this.canvas},getContext:function(){return this.context},clear:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),this.context.clearRect(t,e,i,n),this.update()},setSize:function(t,e){return void 0===e&&(e=t),t===this.width&&e===this.height||(this.canvas.width=t,this.canvas.height=e,this._source.width=t,this._source.height=e,this._source.isPowerOf2=a(t,e),this.frames.__BASE.setSize(t,e,0,0),this.width=t,this.height=e,this.refresh()),this},destroy:function(){h.prototype.destroy.call(this),this._source=null,this.canvas=null,this.context=null,this.imageData=null,this.data=null,this.pixels=null,this.buffer=null}});t.exports=u},function(t,e,i){ 1726/** 1727 * @author Richard Davey <[email protected]> 1728 * @copyright 2020 Photon Storm Ltd. 1729 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1730 */ 1731var n=i(31),r=i(0),s=i(136),o=i(164),a=new r({initialize:function(t,e,i,n,r){void 0===r&&(r=!1);var a=t.manager.game;this.renderer=a.renderer,this.texture=t,this.source=e,this.image=e,this.compressionAlgorithm=null,this.resolution=1,this.width=i||e.naturalWidth||e.videoWidth||e.width||0,this.height=n||e.naturalHeight||e.videoHeight||e.height||0,this.scaleMode=o.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&e instanceof HTMLVideoElement,this.isRenderTexture="RenderTexture"===e.type,this.isGLTexture=window.hasOwnProperty("WebGLTexture")&&e instanceof WebGLTexture,this.isPowerOf2=s(this.width,this.height),this.glTexture=null,this.glIndex=0,this.glIndexCounter=-1,this.flipY=r,this.init(a)},init:function(t){var e=this.renderer;e&&(e.gl?this.isCanvas?this.glTexture=e.createCanvasTexture(this.image,!1,this.flipY):this.isVideo?this.glTexture=e.createVideoTexture(this.image,!1,this.flipY):this.isRenderTexture?(this.image=this.source.canvas,this.glTexture=e.createTextureFromSource(null,this.width,this.height,this.scaleMode)):this.isGLTexture?this.glTexture=this.source:this.glTexture=e.createTextureFromSource(this.image,this.width,this.height,this.scaleMode):this.isRenderTexture&&(this.image=this.source.canvas)),t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t),this.scaleMode=t},setFlipY:function(t){return void 0===t&&(t=!0),this.flipY=t,this},update:function(){var t=this.renderer.gl;t&&this.isCanvas?this.glTexture=this.renderer.updateCanvasTexture(this.image,this.glTexture,this.flipY):t&&this.isVideo&&(this.glTexture=this.renderer.updateVideoTexture(this.image,this.glTexture,this.flipY))},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture,!1),this.isCanvas&&n.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=a}
1731,function(t,e,i){ 1732/** 1733 * @author Richard Davey <[email protected]> 1734 * @copyright 2020 Photon Storm Ltd. 1735 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1736 */ 1737t.exports={AtlasXML:i(975),Canvas:i(976),Image:i(977),JSONArray:i(978),JSONHash:i(979),SpriteSheet:i(980),SpriteSheetFromAtlas:i(981),UnityYAML:i(982)}},function(t,e,i){ 1738/** 1739 * @author Richard Davey <[email protected]> 1740 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 1741 * @copyright 2020 Photon Storm Ltd. 1742 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1743 */ 1744var n=i(421),r=i(424),s=i(426),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e.noAudio||!i.webAudio&&!i.audioData?new r(t):i.webAudio&&!e.disableWebAudio?new s(t):new n(t)}};t.exports=o},function(t,e,i){ 1745/** 1746 * @author Richard Davey <[email protected]> 1747 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 1748 * @copyright 2020 Photon Storm Ltd. 1749 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1750 */ 1751var n=i(144),r=i(0),s=i(69),o=i(423),a=new r({Extends:n,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,n.call(this,t)},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each((function(e,i){for(var n=0;n<i.length;n++)if("true"===i[n].dataset.locked)return t.locked=!0,!1;return!0})),this.locked){var e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var r=[];if(t.game.cache.audio.entries.each((function(t,e){for(var i=0;i<e.length;i++){var n=e[i];"true"===n.dataset.locked&&r.push(n)}return!0})),0!==r.length){var s=r[r.length-1];s.oncanplaythrough=function(){s.oncanplaythrough=null,r.forEach((function(t){t.dataset.locked="false"})),t.unlocked=!0},r.forEach((function(t){t.load()}))}}};this.once(s.UNLOCKED,(function(){for(this.forEachActiveSound((function(t){null===t.currentMarker&&0===t.duration&&(t.duration=t.tags[0].duration),t.totalDuration=t.tags[0].duration}));this.lockedActionsQueue.length;){var t=this.lockedActionsQueue.shift();t.sound[t.prop].apply?t.sound[t.prop].apply(t.sound,t.value||[]):t.sound[t.prop]=t.value}}),this),document.body.addEventListener("touchmove",i,!1),document.body.addEventListener("touchend",n,!1)}},onBlur:function(){this.forEachActiveSound((function(t){t.isPlaying&&(this.onBlurPausedSounds.push(t),t.onBlur())}))},onFocus:function(){this.onBlurPausedSounds.forEach((function(t){t.onFocus()})),this.onBlurPausedSounds.length=0},destroy:function(){n.prototype.destroy.call(this),this.onBlurPausedSounds.length=0,this.onBlurPausedSounds=null},isLocked:function(t,e,i){return"true"===t.tags[0].dataset.locked&&(this.lockedActionsQueue.push({sound:t,prop:e,value:i}),!0)},setMute:function(t){return this.mute=t,this},mute:{get:function(){return this._mute},set:function(t){this._mute=t,this.forEachActiveSound((function(t){t.updateMute()})),this.emit(s.GLOBAL_MUTE,this,t)}},setVolume:function(t){return this.volume=t,this},volume:{get:function(){return this._volume},set:function(t){this._volume=t,this.forEachActiveSound((function(t){t.updateVolume()})),this.emit(s.GLOBAL_VOLUME,this,t)}}});t.exports=a},function(t,e,i){ 1752/** 1753 * @author Richard Davey <[email protected]> 1754 * @copyright 2020 Photon Storm Ltd. 1755 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1756 */ 1757var n=i(78);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s))for(var o=r;o<s;o++){var a=t[o];if(!e||e&&void 0===i&&a.hasOwnProperty(e)||e&&void 0!==i&&a[e]===i)return a}return null}},function(t,e,i){ 1758/** 1759 * @author Richard Davey <[email protected]> 1760 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 1761 * @copyright 2020 Photon Storm Ltd. 1762 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1763 */ 1764var n=i(145),r=i(0),s=i(69),o=i(18),a=new r({Extends:n,initialize:function(t,e,
vendor: 9,441 bytes, lines 1764-1785
1764i){if(void 0===i&&(i={}),this.tags=t.game.cache.audio.get(e),!this.tags)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,n.call(this,t,e,i)},play:function(t,e){return!(this.manager.isLocked(this,"play",[t,e])||!n.prototype.play.call(this,t,e)||!this.pickAndPlayAudioTag()||(this.emit(s.PLAY,this),0))},pause:function(){return!(this.manager.isLocked(this,"pause")||this.startTime>0||!n.prototype.pause.call(this)||(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(s.PAUSE,this),0))},resume:function(){return!(this.manager.isLocked(this,"resume")||this.startTime>0||!n.prototype.resume.call(this)||!this.pickAndPlayAudioTag()||(this.emit(s.RESUME,this),0))},stop:function(){return!this.manager.isLocked(this,"stop")&&!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(s.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t<this.tags.length;t++){var e=this.tags[t];if("false"===e.dataset.used)return e.dataset.used="true",this.audio=e,!0}if(!this.manager.override)return!1;var i=[];this.manager.forEachActiveSound((function(t){t.key===this.key&&t.audio&&i.push(t)}),this),i.sort((function(t,e){return t.loop===e.loop?e.seek/e.duration-t.seek/t.duration:t.loop?1:-1}));var n=i[0];return this.audio=n.audio,n.reset(),n.audio=null,n.startTime=0,n.previousTime=0,!0},playCatchPromise:function(){var t=this.audio.play();t&&t.catch((function(t){console.warn(t)}))},stopAndReleaseAudioTag:function(){this.startTime=0,this.previousTime=0,this.audio&&(this.audio.pause(),this.audio.dataset.used="false",this.audio=null)},reset:function(){n.prototype.stop.call(this)},onBlur:function(){this.isPlaying=!1,this.isPaused=!0,this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.currentConfig.delay=Math.max(0,(this.startTime-window.performance.now())/1e3),this.stopAndReleaseAudioTag()},onFocus:function(){this.isPlaying=!0,this.isPaused=!1,this.pickAndPlayAudioTag()},update:function(t){if(this.isPlaying)if(this.startTime>0)this.startTime<t-this.manager.audioPlayDelay&&(this.audio.currentTime+=Math.max(0,t-this.startTime)/1e3,this.startTime=0,this.previousTime=this.audio.currentTime,this.playCatchPromise());else{var e=this.currentMarker?this.currentMarker.start:0,i=e+this.duration,n=this.audio.currentTime;if(this.currentConfig.loop)n>=i-this.manager.loopEndOffset?(this.audio.currentTime=e+Math.max(0,n-i),n=this.audio.currentTime):n<e&&(this.audio.currentTime+=e,n=this.audio.currentTime),n<this.previousTime&&this.emit(s.LOOPED,this);else if(n>=i)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(s.COMPLETE,this);this.previousTime=n}},destroy:function(){n.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=o(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){n.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit(s.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(s.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,s.RATE,t)||(this.calculateRate(),this.emit(s.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,s.DETUNE,t)||(this.calculateRate(),this.emit(s.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(s.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(s.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this},pan:{get:function(){return this.currentConfig.pan},set:function(t){this.currentConfig.pan=t,this.emit(s.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});t.exports=a},function(t,e,i){ 1765/** 1766 * @author Richard Davey <[email protected]> 1767 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 1768 * @copyright 2020 Photon Storm Ltd. 1769 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1770 */ 1771var n=i(144),r=i(0),s=i(9),o=i(425),a=i(1),h=new r({Extends:s,initialize:function(t){s.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){n.prototype.destroy.call(this)}});t.exports=h},function(t,e,i){ 1772/** 1773 * @author Richard Davey <[email protected]> 1774 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 1775 * @copyright 2020 Photon Storm Ltd. 1776 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1777 */ 1778var n=i(145),r=i(0),s=i(9),o=i(17),a=function(){return!1},h=function(){return this},u=new r({Extends:s,initialize:function(t,e,i){void 0===i&&(i={}),s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:a,updateMarker:a,removeMarker:function(){return null},play:a,pause:a,resume:a,stop:a,destroy:function(){n.prototype.destroy.call(this)},setMute:h,setVolume:h,setRate:h,setDetune:h,setSeek:h,setLoop:h,setPan:h});t.exports=u},function(t,e,i){ 1779/** 1780 * @author Richard Davey <[email protected]> 1781 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 1782 * @copyright 2020 Photon Storm Ltd. 1783 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1784 */ 1785var n=i(427),r=i(144),s=i(0),o=i(69),a=i(22),h=i(428),u=new s({Extends:r,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),r.call(this,t),this.locked&&t.isBooted?this.unlock():t.events.once(a.BOOT,this.unlock,this)},createAudioContext:function(t){var e=t.config.audio;return e.context?(e.context.resume(),e.context):new AudioContext},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new h(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var r=this.game.cache.audio,s=i.length,a=0;a<i.length;a++){var h=i[a],u=h.key,l=h.data;"string"==typeof l&&(l=n(l));
1785var c=function(t,e){r.add(t,e),this.emit(o.DECODED,t),0==--s&&this.emit(o.DECODED_ALL)}.bind(this,u),f=function(t,e){console.error("Error decoding audio: "+t+" - ",e?e.message:""),0==--s&&this.emit(o.DECODED_ALL)}.bind(this,u);this.context.decodeAudioData(l,c,f)}},unlock:function(){var t=this,e=document.body,i=function i(){t.context&&t.context.resume().then((function(){e.removeEventListener("touchstart",i),e.removeEventListener("touchend",i),e.removeEventListener("click",i),e.removeEventListener("keydown",i),t.unlocked=!0}),(function(){e.removeEventListener("touchstart",i),e.removeEventListener("touchend",i),e.removeEventListener("click",i),e.removeEventListener("keydown",i)}))};e&&(e.addEventListener("touchstart",i,!1),e.addEventListener("touchend",i,!1),e.addEventListener("click",i,!1),e.addEventListener("keydown",i,!1))},onBlur:function(){this.locked||this.context.suspend()},onFocus:function(){this.locked||this.context.resume()},destroy:function(){if(this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.game.config.audio.context)this.context.suspend();else{var t=this;this.context.close().then((function(){t.context=null}))}r.prototype.destroy.call(this)},setMute:function(t){return this.mute=t,this},mute:{get:function(){return 0===this.masterMuteNode.gain.value},set:function(t){this.masterMuteNode.gain.setValueAtTime(t?0:1,0),this.emit(o.GLOBAL_MUTE,this,t)}},setVolume:function(t){return this.volume=t,this},volume:{get:function(){return this.masterVolumeNode.gain.value},set:function(t){this.masterVolumeNode.gain.setValueAtTime(t,0),this.emit(o.GLOBAL_VOLUME,this,t)}}});t.exports=u},function(t,e){for( 1786/** 1787 * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) 1788 * @author Richard Davey <[email protected]> 1789 * @copyright 2020 Photon Storm Ltd. 1790 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1791 */ 1792var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),r=0;r<i.length;r++)n[i.charCodeAt(r)]=r;t.exports=function(t){var e,i,r,s,o=(t=t.substr(t.indexOf(",")+1)).length,a=.75*o,h=0;"="===t[o-1]&&(a--,"="===t[o-2]&&a--);for(var u=new ArrayBuffer(a),l=new Uint8Array(u),c=0;c<o;c+=4)e=n[t.charCodeAt(c)],i=n[t.charCodeAt(c+1)],r=n[t.charCodeAt(c+2)],s=n[t.charCodeAt(c+3)],l[h++]=e<<2|i>>4,l[h++]=(15&i)<<4|r>>2,l[h++]=(3&r)<<6|63&s;return u}},function(t,e,i){ 1793/** 1794 * @author Richard Davey <[email protected]> 1795 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 1796 * @copyright 2020 Photon Storm Ltd. 1797 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1798 */ 1799var n=i(145),r=i(0),s=i(69),o=new r({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('Audio key "'+e+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.pannerNode=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),t.context.createStereoPanner?(this.pannerNode=t.context.createStereoPanner(),this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(t.destination)):this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(s.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime<this.startTime||!n.prototype.pause.call(this)||(this.currentConfig.seek=this.getCurrentTime(),this.stopAndRemoveBufferSource(),this.emit(s.PAUSE,this),0))},resume:function(){return!(this.manager.context.currentTime<this.startTime||!n.prototype.resume.call(this)||(this.createAndStartBufferSource(),this.emit
vendor: 13,570 bytes, lines 1799-1841
1799(s.RESUME,this),0))},stop:function(){return!!n.prototype.stop.call(this)&&(this.stopAndRemoveBufferSource(),this.emit(s.STOP,this),!0)},createAndStartBufferSource:function(){var t=this.currentConfig.seek,e=this.currentConfig.delay,i=this.manager.context.currentTime+e,n=(this.currentMarker?this.currentMarker.start:0)+t,r=this.duration-t;this.playTime=i-t,this.startTime=i,this.source=this.createBufferSource(),this.applyConfig(),this.source.start(Math.max(0,i),Math.max(0,n),Math.max(0,r)),this.resetConfig()},createAndStartLoopBufferSource:function(){var t=this.getLoopTime(),e=this.currentMarker?this.currentMarker.start:0,i=this.duration;this.loopTime=t,this.loopSource=this.createBufferSource(),this.loopSource.playbackRate.setValueAtTime(this.totalRate,0),this.loopSource.start(Math.max(0,t),Math.max(0,e),Math.max(0,i))},createBufferSource:function(){var t=this,e=this.manager.context.createBufferSource();return e.buffer=this.audioBuffer,e.connect(this.muteNode),e.onended=function(e){e.target===t.source&&(t.currentConfig.loop?t.hasLooped=!0:t.hasEnded=!0)},e},stopAndRemoveBufferSource:function(){this.source&&(this.source.stop(),this.source.disconnect(),this.source=null),this.playTime=0,this.startTime=0,this.stopAndRemoveLoopBufferSource()},stopAndRemoveLoopBufferSource:function(){this.loopSource&&(this.loopSource.stop(),this.loopSource.disconnect(),this.loopSource=null),this.loopTime=0},applyConfig:function(){this.rateUpdates.length=0,this.rateUpdates.push({time:0,rate:1}),n.prototype.applyConfig.call(this)},update:function(){this.hasEnded?(this.hasEnded=!1,n.prototype.stop.call(this),this.stopAndRemoveBufferSource(),this.emit(s.COMPLETE,this)):this.hasLooped&&(this.hasLooped=!1,this.source=this.loopSource,this.loopSource=null,this.playTime=this.startTime=this.loopTime,this.rateUpdates.length=0,this.rateUpdates.push({time:0,rate:this.totalRate}),this.createAndStartLoopBufferSource(),this.emit(s.LOOPED,this))},destroy:function(){n.prototype.destroy.call(this),this.audioBuffer=null,this.stopAndRemoveBufferSource(),this.muteNode.disconnect(),this.muteNode=null,this.volumeNode.disconnect(),this.volumeNode=null,this.pannerNode&&(this.pannerNode.disconnect(),this.pannerNode=null),this.rateUpdates.length=0,this.rateUpdates=null},calculateRate:function(){n.prototype.calculateRate.call(this);var t=this.manager.context.currentTime;this.source&&"number"==typeof this.totalRate&&this.source.playbackRate.setValueAtTime(this.totalRate,t),this.isPlaying&&(this.rateUpdates.push({time:Math.max(this.startTime,t)-this.playTime,rate:this.totalRate}),this.loopSource&&(this.stopAndRemoveLoopBufferSource(),this.createAndStartLoopBufferSource()))},getCurrentTime:function(){for(var t=0,e=0;e<this.rateUpdates.length;e++)t+=((e<this.rateUpdates.length-1?this.rateUpdates[e+1].time:this.manager.context.currentTime-this.playTime)-this.rateUpdates[e].time)*this.rateUpdates[e].rate;return t},getLoopTime:function(){for(var t=0,e=0;e<this.rateUpdates.length-1;e++)t+=(this.rateUpdates[e+1].time-this.rateUpdates[e].time)*this.rateUpdates[e].rate;var i=this.rateUpdates[this.rateUpdates.length-1];return this.playTime+i.time+(this.duration-t)/i.rate},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.calculateRate(),this.emit(s.RATE,this,t)}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.calculateRate(),this.emit(s.DETUNE,this,t)}},setDetune:function(t){return this.detune=t,this},mute:{get:function(){return 0===this.muteNode.gain.value},set:function(t){this.currentConfig.mute=t,this.muteNode.gain.setValueAtTime(t?0:1,0),this.emit(s.MUTE,this,t)}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.volumeNode.gain.value},set:function(t){this.currentConfig.volume=t,this.volumeNode.gain.setValueAtTime(t,0),this.emit(s.VOLUME,this,t)}},setVolume:function(t){return this.volume=t,this},seek:{get:function(){return this.isPlaying?this.manager.context.currentTime<this.startTime?this.startTime-this.playTime:this.getCurrentTime():this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.context.currentTime<this.startTime||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.currentConfig.seek=t,this.isPlaying&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource()),this.emit(s.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.isPlaying&&(this.stopAndRemoveLoopBufferSource(),t&&this.createAndStartLoopBufferSource()),this.emit(s.LOOP,this,t)}},setLoop:function(t){return this.loop=t,this},pan:{get:function(){return this.pannerNode?this.pannerNode.pan.value:0},set:function(t){this.currentConfig.pan=t,this.pannerNode&&this.pannerNode.pan.setValueAtTime(t,this.manager.context.currentTime),this.emit(s.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});t.exports=o},function(t,e){t.exports=function(t){for(var e=t.length,i=t[0].length,n=new Array(i),r=0;r<i;r++){n[r]=new Array(e);for(var s=e-1;s>-1;s--)n[r][s]=t[s][r]}return n}},function(t,e){ 1800/** 1801 * @author Richard Davey <[email protected]> 1802 * @copyright 2020 Photon Storm Ltd. 1803 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1804 */ 1805function i(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function n(t,e){return t<e?-1:t>e?1:0}var r=function(t,e,s,o,a){for(void 0===s&&(s=0),void 0===o&&(o=t.length-1),void 0===a&&(a=n);o>s;){if(o-s>600){var h=o-s+1,u=e-s+1,l=Math.log(h),c=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*c*(h-c)/h)*(u-h/2<0?-1:1),d=Math.max(s,Math.floor(e-u*c/h+f)),p=Math.min(o,Math.floor(e+(h-u)*c/h+f));r(t,e,d,p,a)}var v=t[e],g=s,m=o;for(i(t,s,e),a(t[o],v)>0&&i(t,s,o);g<m;){for(i(t,g,m),g++,m--;a(t[g],v)<0;)g++;for(;a(t[m],v)>0;)m--}0===a(t[s],v)?i(t,s,m):i(t,++m,o),m<=e&&(s=m+1),e<=m&&(o=m-1)}};t.exports=r},function(t,e,i){ 1806/** 1807 * @author Richard Davey <[email protected]> 1808 * @copyright 2020 Photon Storm Ltd. 1809 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1810 */ 1811var n=i(6),r=i(129),s=function(t,e,i){for(var n=[],r=0;r<t.length;r++)for(var s=0;s<e.length;s++)for(var o=0;o<i;o++)n.push({a:t[r],b:e[s]});return n};t.exports=function(t,e,i){var o=n(i,"max",0),a=n(i,"qty",1),h=n(i,"random",!1),u=n(i,"randomB",!1),l=n(i,"repeat",0),c=n(i,"yoyo",!1),f=[];if(u&&r(e),-1===l)if(0===o)l=0;else{var d=t.length*e.length*a;c&&(d*=2),l=Math.ceil(o/d)}for(var p=0;p<=l;p++){var v=s(t,e,a);h&&r(v),f=f.concat(v),c&&(v.reverse(),f=f.concat(v))}return o&&f.splice(o),f}},function(t,e,i){ 1812/** 1813 * @author Richard Davey <[email protected]> 1814 * @copyright 2020 Photon Storm Ltd. 1815 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1816 */ 1817t.exports={PROCESS_QUEUE_ADD:i(1035),PROCESS_QUEUE_REMOVE:i(1036)}},function(t,e,i){ 1818/** 1819 * @author Richard Davey <[email protected]> 1820 * @copyright 2020 Photon Storm Ltd. 1821 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1822 */ 1823var n=i(13);t.exports=function(t,e){var i=n(e,"anims",null);if(null===i)return t;if("string"==typeof i)t.anims.play(i);else if("object"==typeof i){var r=t.anims,s=n(i,"key",void 0);if(s){var o=n(i,"startFrame",void 0),a=n(i,"delay",0),h=n(i,"repeat",0),u=n(i,"repeatDelay",0),l=n(i,"yoyo",!1),c=n(i,"play",!1),f=n(i,"delayedPlay",0),d={key:s,delay:a,repeat:h,repeatDelay:u,yoyo:l,startFrame:o};c?r.play(d):f>0?r.playAfterDelay(d,f):r.load(d)}}return t}},function(t,e,i){ 1824/** 1825 * @author Richard Davey <[email protected]> 1826 * @copyright 2020 Photon Storm Ltd. 1827 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1828 */ 1829var n=i(0),r=i(106),s=new n({initialize:function(t,e,i,n,r){this.parent=t,this.x=e,this.y=i,this.frame=n,this.data={},this.tint=16777215,this._visible=r,this._alpha=1,this.flipX=!1,this.flipY=!1},setFrame:function(t){return void 0===t?this.frame=this.parent.frame:t instanceof r&&t.texture===this.parent.texture?this.frame=t:this.frame=this.parent.texture.get(t),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(t,e,i){return this.x=t,this.y=e,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,i&&this.setFrame(i),this},setPosition:function(t,e){return this.x=t,this.y=e,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},setVisible:function(t){return this.visible=t,this},setAlpha:function(t){return this.alpha=t,this},setTint:function(t){return this.tint=t,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(t){this.parent.dirty|=this._visible!==t,this._visible=t}},alpha:{get:function(){return this._alpha},set:function(t){this.parent.dirty|=this._alpha>0!=t>0,this._alpha=t}}});t.exports=s},function(t,e,i){ 1830/** 1831 * @author Richard Davey <[email protected]> 1832 * @copyright 2020 Photon Storm Ltd. 1833 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1834 */ 1835var n=i(10);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=Math.min(t.x,e.x),s=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-r,a=Math.max(t.bottom,e.bottom)-s;return i.setTo(r,s,o,a)}},function(t,e,i){ 1836/** 1837 * @author Richard Davey <[email protected]> 1838 * @copyright 2020 Photon Storm Ltd. 1839 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1840 */ 1841var n=i(0),r=i(11),s=i(1049),o=i(15),a=i(7),h=i(199),u=i(21),l=i(138),c=new n({Extends:o,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Origin,r.ScrollFactor,r.Transform,r.Visible,s],initialize:function(t,e,i,n,r,s){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new l,this.rotate3dAngle="deg",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof n?"#"===n[0]?this.setElement(n.substr(1),r,s):this.createElement(n,r,s):n&&this.setElement(n,r,s),t.sys.events.on(u.SLEEP,this.handleSceneEvent,this),t.sys.events.on(u.WAKE,this.handleSceneEvent,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},handleSceneEvent:function(t){var e=this.node,i=e.style;e&&(i.display=t.settings.visible?"block":"none")},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e<t.length;e++)this.node.addEventListener(t[e],this.handler,!1)}return this},removeListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e<t.length;e++)this.node.removeEventListener(t[e],this.handler)}return this},dispatchNativeEvent:function(t){this.emit(t.type,t)},createElement:function(t,e,i){return this.setElement(document.createElement(t),e,i)},setElement:function(t,e,i){var n;if(this.removeElement(),"string"==typeof t?("#"===t[0]&&(t=t.substr(1)),n=document.getElementById(t)):"object"==typeof t&&1===t.nodeType&&(n=t),!n)return this;if(this.node=n,e&&a(e))for(var r in e)n.style[r]=e[r];else"string"==typeof e&&(n.style=e);return n.style.zIndex="0",n.style.display="inline",n.style.position="absolute",n.phaser=this,this.parent&&this.parent.appendChild(n),i&&(n.innerText=i),this.updateSize()},createFromCache:function(t,e){var i=this.cache.get(t);return i&&this.createFromHTML(i,e),this},createFromHTML:function(t,e){void 0===e&&(e="div"),this.removeElement();var i=document.createElement(e);return this.node=i,i.style.zIndex="0",i.style.display="inline",i.style.position="absolute",i.phaser=this,this.parent&&this.parent.appendChild(i),i.innerHTML=t,this.updateSize()},removeElement:function(){return this.node&&(h(this.node),this.node=null),this},updateSize:function(){var t=this.node,e=t.getBoundingClientRect();return this.width=t.clientWidth,this.height=t.clientHeight,this.displayWidth=e.width||0,this.displayHeight=e.height||0,this},getChildByProperty:function(t,e){if(this.node)for(var i=this.node.querySelectorAll("*"),n=0;n<i.length;n++)if(i[n][t]===e)return i[n];return null},getChildByID:function(t){return this.getChildByProperty("id",t)},getChildByName:function(t){return this.getChildByProperty("name",t)},setClassName:function(t){return this.node&&(this.node.className=t,this.updateSize()),this},setText:function(t){return this.node&&(this.node.innerText=t,this.updateSize()),this},setHTML:function(t){return this.node&&(this.node.innerHTML=t,this.updateSize()),this},preUpdate:function(){var t=this.parentContainer,e=this.node;e&&t&&!t.willRender()&&(e.style.display="none")},willRender:function(){return!0},preDestroy:function(){this.removeElement(),this.scene.sys.events.off(u.SLEEP,this.handleSceneEvent,this),this.scene.sys.events.off(u.WAKE,this.handleSceneEvent,this)}});t.exports=c}
1841,function(t,e,i){ 1842/** 1843 * @author Richard Davey <[email protected]> 1844 * @copyright 2020 Photon Storm Ltd. 1845 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1846 */ 1847var n=i(1050),r=i(15),s=i(25),o=new s,a=new s,h=new s;t.exports=function(t,e,i,s){var u=e.node,l=u.style,c=e.scene.sys.settings;if(!(u&&l&&c.visible&&r.RENDER_MASK===e.renderFlags)||0!==e.cameraFilter&&e.cameraFilter&i.id||e.parentContainer&&!e.parentContainer.willRender())u&&(l.display="none");else{var f=e.parentContainer,d=i.alpha*e.alpha;f&&(d*=f.alpha);var p=o,v=a,g=h,m=0,y=0,x="0%",w="0%";s?(m=e.width*e.scaleX*e.originX,y=e.height*e.scaleY*e.originY,v.applyITRS(e.x-m,e.y-y,e.rotation,e.scaleX,e.scaleY),p.copyFrom(i.matrix),p.multiplyWithOffset(s,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),v.e=e.x-m,v.f=e.y-y,p.multiply(v,g)):(m=e.width*e.originX,y=e.height*e.originY,v.applyITRS(e.x-m,e.y-y,e.rotation,e.scaleX,e.scaleY),p.copyFrom(i.matrix),x=100*e.originX+"%",w=100*e.originY+"%",v.e-=i.scrollX*e.scrollFactorX,v.f-=i.scrollY*e.scrollFactorY,p.multiply(v,g)),e.transformOnly||(l.display="block",l.opacity=d,l.zIndex=e._depth,l.pointerEvents="auto",l.mixBlendMode=n[e._blendMode]),l.transform=g.getCSSMatrix()+" skew("+e.skewX+"rad, "+e.skewY+"rad) rotate3d("+e.rotate3d.x+","+e.rotate3d.y+","+e.rotate3d.z+","+e.rotate3d.w+e.rotate3dAngle+")",l.transformOrigin=x+" "+w}}},function(t,e,i){ 1848/** 1849 * @author Richard Davey <[email protected]> 1850 * @copyright 2020 Photon Storm Ltd. 1851 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1852 */ 1853var n=i(0),r=i(11),s=i(15),o=i(1054),a=new n({Extends:s,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.Origin,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,o],initialize:function(t){s.call(this,t,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});t.exports=a},function(t,e,i){ 1854/** 1855 * @author Richard Davey <[email protected]> 1856 * @copyright 2020 Photon Storm Ltd. 1857 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1858 */ 1859var n=i(215),r=i(95),s=i(14),o=i(4);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=r(e,0,s.PI2);return n(t,a,i)}},function(t,e,i){ 1860/** 1861 * @author Richard Davey <[email protected]> 1862 * @copyright 2020 Photon Storm Ltd. 1863 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1864 */ 1865var n=i(441),r=i(215),s=i(95),o=i(14);t.exports=function(t,e,i,a){void 0===a&&(a=[]),!e&&i>0&&(e=n(t)/i);for(var h=0;h<e;h++){var u=s(h/e,0,o.PI2);a.push(r(t,u))}return a}},function(t,e){t.exports=function(t){var e=t.width/2,i=t.height/2,n=Math.pow(e-i,2)/Math.pow(e+i,2);return Math.PI*(e+i)*(1+3*n/(10+Math.sqrt(4-3*n)))}},function(t,e,i){ 1866/** 1867 * @author Richard Davey <[email protected]> 1868 * @copyright 2020 Photon Storm Ltd. 1869 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1870 */ 1871var n=i(214),r=i(30);t.exports=function(t,e,i,s,o,a){var h=e.commandBuffer,u=h.length,l=o||t.currentContext;if(0!==u&&r(t,l,e,i,s)){i.addToRenderList(e);var c=1,f=1,d=0,p=0,v=1,g=0,m=0,y=0;l.beginPath();for(var x=0;x<u;++x)switch(h[x]){case n.ARC:l.arc(h[x+1],h[x+2],h[x+3],h[x+4],h[x+5],h[x+6]),x+=7;break;case n.LINE_STYLE:v=h[x+1],d=h[x+2],c=h[x+3],g=(16711680&d)>>>16,m=(65280&d)>>>8,y=255&d,l.strokeStyle="rgba("+g+","+m+","+y+","+c+")",l.lineWidth=v,x+=3;break;case n.FILL_STYLE:p=h[x+1],f=h[x+2],g=(16711680&p)>>>16,m=(65280&p)>>>8,y=255&p,l.fillStyle="rgba("+g+","+m+","+y+","+f+")",x+=2;break;case n.BEGIN_PATH:l.beginPath();break;case n.CLOSE_PATH:l.closePath();break;case n.FILL_PATH:a||l.fill();break;case n.STROKE_PATH:a||l.stroke();break;case n.FILL_RECT:a?l.rect(h[x+1],h[x+2],h[x+3],h[x+4]):l.fillRect(h[x+1],h[x+2],h[x+3],h[x+4]),x+=4;break;case n.FILL_TRIANGLE:l.beginPath(),l.moveTo(h[x+1],h[x+2]),l.lineTo(h[x+3],h[x+4]),l.lineTo(h[x+5],h[x+6]),l.closePath(),a||l.fill(),x+=6;break;case n.STROKE_TRIANGLE:l.beginPath(),l.moveTo(h[x+1],h[x+2]),l.lineTo(h[x+3],h[x+4]),l.lineTo(h[x+5],h[x+6]),l.closePath(),a||l.stroke(),x+=6;break;case n.LINE_TO:l.lineTo(h[x+1],h[x+2]),x+=2;break;case n.MOVE_TO:l.moveTo(h[x+1],h[x+2]),x+=2;break;case n.LINE_FX_TO:l.lineTo(h[x+1],h[x+2]),x+=5;break;case n.MOVE_FX_TO:l.moveTo(h[x+1],h[x+2]),x+=5;break;case n.SAVE:l.save();break;
1871case n.RESTORE:l.restore();break;case n.TRANSLATE:l.translate(h[x+1],h[x+2]),x+=2;break;case n.SCALE:l.scale(h[x+1],h[x+2]),x+=2;break;case n.ROTATE:l.rotate(h[x+1]),x+=1;break;case n.GRADIENT_FILL_STYLE:x+=5;break;case n.GRADIENT_LINE_STYLE:x+=6}l.restore()}}},function(t,e,i){ 1872/** 1873 * @author Richard Davey <[email protected]> 1874 * @copyright 2020 Photon Storm Ltd. 1875 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1876 */ 1877var n=i(0),r=i(135),s=i(80),o=i(2),a=i(66),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if(this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,"number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&this.hasBoth(t,"start","end")){this.start=t.start,this.end=t.end;var i=this.has(t,"random");if(i&&(this.onEmit=this.randomRangedValueEmit),this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var n=this.has(t,"ease")?t.ease:"Linear";this.ease=s(n,t.easeParams),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else if("object"===e&&this.hasBoth(t,"min","max"))this.start=t.min,this.end=t.max,this.onEmit=this.randomRangedValueEmit;else if("object"===e&&this.has(t,"random")){var r=t.random;Array.isArray(r)&&(this.start=r[0],this.end=r[1]),this.onEmit=this.randomRangedValueEmit}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=r(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){ 1878/** 1879 * @author Richard Davey <[email protected]> 1880 * @copyright 2020 Photon Storm Ltd. 1881 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1882 */ 1883var n=i(0),r=i(2),s=new n({initialize:function(t,e,i,n,s){if("object"==typeof t){var o=t;t=r(o,"x",0),e=r(o,"y",0),i=r(o,"power",0),n=r(o,"epsilon",100),s=r(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===s&&(s=50);this.x=t,this.y=e,this.active=!0,this._gravity=s,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,r=i*i+n*n;if(0!==r){var s=Math.sqrt(r);r<this._epsilon&&(r=this._epsilon);var o=this._power*e/(r*s)*100;t.velocityX+=i*o,t.velocityY+=n*o}},epsilon:{get:function(){return Math.sqrt(this._epsilon)},set:function(t){this._epsilon=t*t}},power:{get:function(){return this._power/this._gravity},set:function(t){this._power=t*this._gravity}},gravity:{get:function(){return this._gravity},set:function(t){var e=this.power;this._gravity=t,this.power=e}}});t.exports=s}
1883,function(t,e,i){ 1884/** 1885 * @author Richard Davey <[email protected]> 1886 * @copyright 2020 Photon Storm Ltd. 1887 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1888 */ 1889var n=i(0),r=i(35),s=i(48),o=new n({initialize:function(t){this.emitter=t,this.frame=null,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},resetPosition:function(){this.x=0,this.y=0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),this.x+=void 0===t?i.x.onEmit(this,"x"):t,this.y+=void 0===e?i.y.onEmit(this,"y"):e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=r(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),u=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,l=Math.atan2(u-this.y,h-this.x),c=s(this.x,this.y,h,u)/(this.life/1e3);this.velocityX=Math.cos(l)*c,this.velocityY=Math.sin(l)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=r(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint")},computeVelocity:function(t,e,i,n){var r=this.velocityX,s=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,u=this.maxVelocityY;r+=t.gravityX*i,s+=t.gravityY*i,o&&(r+=o*i),a&&(s+=a*i),r>h?r=h:r<-h&&(r=-h),s>u?s=u:s<-u&&(s=-u),this.velocityX=r,this.velocityY=s;for(var l=0;l<n.length;l++)n[l].update(this,e,i)},checkBounds:function(t){var e=t.bounds,i=-this.bounce;this.x<e.x&&t.collideLeft?(this.x=e.x,this.velocityX*=i):this.x>e.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.y<e.y&&t.collideTop?(this.y=e.y,this.velocityY*=i):this.y>e.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,s=1-this.lifeCurrent/this.life;return this.lifeT=s,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",s,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",s,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",s,this.angle),this.rotation=r(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",s,this.alpha),this.tint=n.tint.onUpdate(this,"tint",s,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){ 1890/** 1891 * @author Richard Davey <[email protected]> 1892 * @copyright 2020 Photon Storm Ltd. 1893 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1894 */ 1895var n=i(34),r=i(0),s=i(11),o=i(447),a=i(448),h=i(443),u=i(2),l=i(207),c=i(449),f=i(125),d=i(445),p=i(450),v=i(10),g=i(79),m=i(3),y=i(66),x=new r({Mixins:[s.BlendMode,s.Mask,s.ScrollFactor,s.Visible],initialize:function(t,e){this.manager=t,this.texture=t.texture,this.frames=[t.defaultFrame],this.defaultFrame=t.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=d,this.x=new h(e,"x",0,!0),this.y=new h(e,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new h(e,"accelerationX",0,!0),this.accelerationY=new h(e,"accelerationY",0,!0),this.maxVelocityX=new h(e,"maxVelocityX",1e4,!0),this.maxVelocityY=new h(e,"maxVelocityY",1e4,!0),this.speedX=new h(e,"speedX",0,!0),this.speedY=new h(e,"speedY",0,!0),this.moveTo=!1,this.moveToX=new h(e,"moveToX",0,!0),this.moveToY=new h(e,"moveToY",0,!0),this.bounce=new h(e,"bounce",0,!0),this.scaleX=new h(e,"scaleX",1),this.scaleY=new h(e,"scaleY",1),this.tint=new h(e,"tint",16777215),this.alpha=new h(e,"alpha",1),this.lifespan=new h(e,"lifespan",1e3,!0),this.angle=new h(e,"angle",{min:0,max:360},!0),this.rotate=new h(e,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.quantity=new h(e,"quantity",1,!0),this.delay=new h(e,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=n.NORMAL,this.follow=null,this.followOffset=new m,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,e&&this.fromJSON(e)},fromJSON:function(t){if(!t)return this;var e=0,i="";for(e=0;e<this.configFastMap.length;
1895e++)i=this.configFastMap[e],f(t,i)&&(this[i]=u(t,i));for(e=0;e<this.configOpMap.length;e++)i=this.configOpMap[e],f(t,i)&&this[i].loadConfig(t);if(this.acceleration=0!==this.accelerationX.propertyValue||0!==this.accelerationY.propertyValue,this.moveTo=0!==this.moveToX.propertyValue||0!==this.moveToY.propertyValue,f(t,"speed")&&(this.speedX.loadConfig(t,"speed"),this.speedY=null),(c(t,["speedX","speedY"])||this.moveTo)&&(this.radial=!1),f(t,"scale")&&(this.scaleX.loadConfig(t,"scale"),this.scaleY=null),f(t,"callbackScope")){var n=u(t,"callbackScope",null);this.emitCallbackScope=n,this.deathCallbackScope=n}return f(t,"emitZone")&&this.setEmitZone(t.emitZone),f(t,"deathZone")&&this.setDeathZone(t.deathZone),f(t,"bounds")&&this.setBounds(t.bounds),f(t,"followOffset")&&this.followOffset.setFromObject(u(t,"followOffset",0)),f(t,"frame")&&this.setFrame(t.frame),f(t,"reserve")&&this.reserve(t.reserve),this},toJSON:function(t){void 0===t&&(t={});var e=0,i="";for(e=0;e<this.configFastMap.length;e++)t[i=this.configFastMap[e]]=this[i];for(e=0;e<this.configOpMap.length;e++)this[i=this.configOpMap[e]]&&(t[i]=this[i].toJSON());return this.speedY||(delete t.speedX,t.speed=this.speedX.toJSON()),this.scaleY||(delete t.scaleX,t.scale=this.scaleX.toJSON()),t},startFollow:function(t,e,i,n){return void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=!1),this.follow=t,this.followOffset.set(e,i),this.trackVisible=n,this},stopFollow:function(){return this.follow=null,this.followOffset.set(0,0),this.trackVisible=!1,this},getFrame:function(){if(1===this.frames.length)return this.defaultFrame;if(this.randomFrame)return l(this.frames);var t=this.frames[this.currentFrame];return this._frameCounter++,this._frameCounter===this.frameQuantity&&(this._frameCounter=0,this.currentFrame=y(this.currentFrame+1,0,this._frameLength)),t},setFrame:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=1),this.randomFrame=e,this.frameQuantity=i,this.currentFrame=0,this._frameCounter=0;var n=typeof t;if(Array.isArray(t)||"string"===n||"number"===n)this.manager.setEmitterFrames(t,this);else if("object"===n){var r=t;(t=u(r,"frames",null))&&this.manager.setEmitterFrames(t,this);var s=u(r,"cycle",!1);this.randomFrame=!s,this.frameQuantity=u(r,"quantity",i)}return this._frameLength=this.frames.length,1===this._frameLength&&(this.frameQuantity=1,this.randomFrame=!1),this},setRadial:function(t){return void 0===t&&(t=!0),this.radial=t,this},setPosition:function(t,e){return this.x.onChange(t),this.y.onChange(e),this},setBounds:function(t,e,i,n){if("object"==typeof t){var r=t;t=r.x,e=r.y,i=f(r,"w")?r.w:r.width,n=f(r,"h")?r.h:r.height}return this.bounds?this.bounds.setTo(t,e,i,n):this.bounds=new v(t,e,i,n),this},setSpeedX:function(t){return this.speedX.onChange(t),this.radial=!1,this},setSpeedY:function(t){return this.speedY&&(this.speedY.onChange(t),this.radial=!1),this},setSpeed:function(t){return this.speedX.onChange(t),this.speedY=null,this.radial=!0,this},setScaleX:function(t){return this.scaleX.onChange(t),this},setScaleY:function(t){return this.scaleY.onChange(t),this},setScale:function(t){return this.scaleX.onChange(t),this.scaleY=null,this},setGravityX:function(t){return this.gravityX=t,this},setGravityY:function(t){return this.gravityY=t,this},setGravity:function(t,e){return this.gravityX=t,this.gravityY=e,this},setAlpha:function(t){return this.alpha.onChange(t),this},setTint:function(t){return this.tint.onChange(t),this},setEmitterAngle:function(t){return this.angle.onChange(t),this},setAngle:function(t){return this.angle.onChange(t),this},setLifespan:function(t){return this.lifespan.onChange(t),this},setQuantity:function(t){return this.quantity.onChange(t),this},setFrequency:function(t,e){return this.frequency=t,this._counter=0,e&&this.quantity.onChange(e),this},setEmitZone:function(t){if(void 0===t)this.emitZone=null;else{var e=u(t,"type","random"),i=u(t,"source",null);switch(e){case"random":this.emitZone=new p(i);break;case"edge":var n=u(t,"quantity",1),r=u(t,"stepRate",0),s=u(t,"yoyo",!1),o=u(t,"seamless",!0);this.emitZone=new a(i,n,r,s,o)}}return this},setDeathZone:function(t){if(void 0===t)this.deathZone=null;else{var e=u(t,"type","onEnter"),i=u(t,"source",null);if(i&&"function"==typeof i.contains){var n="onEnter"===e;this.deathZone=new o(i,n)}}return this},reserve:function(t){for(var e=this.dead,i=0;i<t;i++)e.push(new this.particleClass(this));return this},getAliveParticleCount:function(){return this.alive.length},getDeadParticleCount:function(){return this.dead.length},getParticleCount:function(){return this.getAliveParticleCount()+this.getDeadParticleCount()},atLimit:function(){return this.maxParticles>0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this}
vendor: 8,803 bytes, lines 1895-1925
1895,forEachAlive:function(t,e){for(var i=this.alive,n=i.length,r=0;r<n;++r)t.call(e,i[r],this);return this},forEachDead:function(t,e){for(var i=this.dead,n=i.length,r=0;r<n;++r)t.call(e,i[r],this);return this},start:function(){return this.on=!0,this._counter=0,this},stop:function(){return this.on=!1,this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},remove:function(){return this.manager.removeEmitter(this),this},depthSort:function(){return g(this.alive,this.depthSortCallback),this},flow:function(t,e){return void 0===e&&(e=1),this.frequency=t,this.quantity.onChange(e),this.start()},explode:function(t,e,i){return this.frequency=-1,this.emitParticle(t,e,i)},emitParticleAt:function(t,e,i){return this.emitParticle(i,t,e)},emitParticle:function(t,e,i){if(!this.atLimit()){void 0===t&&(t=this.quantity.onEmit());for(var n=this.dead,r=this.follow?this.follow.x+this.followOffset.x:e,s=this.follow?this.follow.y+this.followOffset.y:i,o=0;o<t;o++){var a=n.pop();if(a||(a=new this.particleClass(this)),a.fire(r,s),this.particleBringToTop?this.alive.push(a):this.alive.unshift(a),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,a,this),this.atLimit())break}return a}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible);var n=this.manager.getProcessors(),r=this.alive,s=this.dead,o=0,a=[],h=r.length;for(o=0;o<h;o++){var u=r[o];u.update(e,i,n)&&a.push({index:o,particle:u})}if((h=a.length)>0){var l=this.deathCallback,c=this.deathCallbackScope;for(o=h-1;o>=0;o--){var f=a[o];r.splice(f.index,1),s.push(f.particle),l&&l.call(c,f.particle),f.particle.resetPosition()}}this.on&&(0===this.frequency?this.emitParticle():this.frequency>0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y}});t.exports=x},function(t,e,i){ 1896/** 1897 * @author Richard Davey <[email protected]> 1898 * @copyright 2020 Photon Storm Ltd. 1899 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1900 */ 1901var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){ 1902/** 1903 * @author Richard Davey <[email protected]> 1904 * @copyright 2020 Photon Storm Ltd. 1905 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1906 */ 1907var n=new(i(0))({initialize:function(t,e,i,n,r){void 0===n&&(n=!1),void 0===r&&(r=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=r,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._length<i&&this.counter>this._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e){t.exports=function(t,e){for(var i=0;i<e.length;i++)if(t.hasOwnProperty(e[i]))return!0;return!1}},function(t,e,i){ 1908/** 1909 * @author Richard Davey <[email protected]> 1910 * @copyright 2020 Photon Storm Ltd. 1911 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1912 */ 1913var n=i(0),r=i(3),s=new n({initialize:function(t){this.source=t,this._tempVec=new r},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=s},function(t,e,i){ 1914/** 1915 * @author Richard Davey <[email protected]> 1916 * @copyright 2020 Photon Storm Ltd. 1917 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1918 */ 1919var n=i(0),r=i(11),s=i(73),o=new n({Extends:s,Mixins:[r.PathFollower],initialize:function(t,e,i,n,r,o){s.call(this,t,i,n,r,o),this.path=e},preUpdate:function(t,e){this.anims.update(t,e),this.pathUpdate(t)}});t.exports=o},function(t,e){t.exports=function(t,e,i){var n=t.canvas,r=t.context,s=t.style,o=[],a=0,h=i.length;s.maxLines>0&&s.maxLines<i.length&&(h=s.maxLines),s.syncFont(n,r);for(var u=0;u<h;u++){var l=s.strokeThickness;l+=r.measureText(i[u]).width,s.wordWrap&&(l-=r.measureText(" ").width),o[u]=Math.ceil(l),a=Math.max(a,o[u])}var c=e.fontSize+s.strokeThickness,f=c*h,d=t.lineSpacing;return h>1&&(f+=d*(h-1)),{width:a,height:f,lines:h,lineWidths:o,lineSpacing:d,lineHeight:c}}},function(t,e,i){ 1920/** 1921 * @author Richard Davey <[email protected]> 1922 * @copyright 2020 Photon Storm Ltd. 1923 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1924 */ 1925var n=i(0),r=i(13),s=i(6),o=i(454),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÃâ°qgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(e,!1,!0);var i=s(e,"metrics",!1);this.metrics=i?{ascent:s(i,"ascent",0),descent:s(i,"descent",0),fontSize:s(i,"fontSize",0)}:o(this)},setStyle:function(t,e,i){for(var n in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a){var o=i?a[n][1]:this[n];this[n]="wordWrapCallback"===n||"wordWrapCallbackScope"===n?s(t,a[n][0],o):r(t,a[n][0],o)}var h=s(t,"font",null);null!==h&&this.setFont(h,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var u=s(t,"fill",null);return null!==u&&(this.color=u),e?this.update(!0):this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=o(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,n="",r="";if("string"!=typeof t)i=s(t,"fontFamily","Courier"),n=s(t,"fontSize","16px"),r=s(t,"fontStyle","");else{var o=t.split(" "),a=0;r=o.length>2?o[a++]:"",n=o[a++]||"16px",i=o[a++]||"Courier"}return i===this.fontFamily&&n===this.fontSize&&r===this.fontStyle||(this.fontFamily=i,this.fontSize=n,this.fontStyle=r,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)}
vendor: 4,770 bytes, lines 1925-1937
1925,setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,n,r,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===r&&(r=!1),void 0===s&&(s=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=r,this.shadowFill=s,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){ 1926/** 1927 * @author Richard Davey <[email protected]> 1928 * @copyright 2020 Photon Storm Ltd. 1929 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1930 */ 1931var n=i(31);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var r=i.measureText(t.testString);if(r.hasOwnProperty("actualBoundingBoxAscent")){var s=r.actualBoundingBoxAscent,o=r.actualBoundingBoxDescent;return n.remove(e),{ascent:s,descent:o,fontSize:s+o}}var a=Math.ceil(r.width*t.baselineX),h=a,u=2*h;h=h*t.baselineY|0,e.width=a,e.height=u,i.fillStyle="#f00",i.fillRect(0,0,a,u),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,h);var l={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,a,u))return l.ascent=h,l.descent=h+6,l.fontSize=l.ascent+l.descent,n.remove(e),l;var c,f,d=i.getImageData(0,0,a,u).data,p=d.length,v=4*a,g=0,m=!1;for(c=0;c<h;c++){for(f=0;f<v;f+=4)if(255!==d[g+f]){m=!0;break}if(m)break;g+=v}for(l.ascent=h-c,g=p-v,m=!1,c=u;c>h;c--){for(f=0;f<v;f+=4)if(255!==d[g+f]){m=!0;break}if(m)break;g-=v}return l.descent=c-h,l.fontSize=l.ascent+l.descent,n.remove(e),l}},function(t,e,i){ 1932/** 1933 * @author Richard Davey <[email protected]> 1934 * @copyright 2020 Photon Storm Ltd. 1935 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1936 */ 1937var n=i(1091),r=i(0),s=i(35),o=i(68),a=i(62),h=i(14),u=i(33),l=new r({Extends:u,Mixins:[n],initialize:function(t,e,i,n,r,s,o,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===r&&(r=0),void 0===s&&(s=360),void 0===o&&(o=!1),u.call(this,t,"Arc",new a(0,0,n)),this._startAngle=r,this._endAngle=s,this._anticlockwise=o,this._iterations=.01,this.setPosition(e,i);var c=2*this.geom.radius;this.setSize(c,c),void 0!==h&&this.setFillStyle(h,l),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(t){this._iterations=t,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(t){this.geom.radius=t;var e=2*t;this.setSize(e,e),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(t){this._startAngle=t,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(t){this._endAngle=t,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(t){this._anticlockwise=t,this.updateData()}},setRadius:function(t){return this.radius=t,this},setIterations:function(t){return void 0===t&&(t=.01),this.iterations=t,this},setStartAngle:function(t,e){return this._startAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},setEndAngle:function(t,e){return this._endAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()}
vendor: 12,969 bytes, lines 1937-2022
1937,updateData:function(){var t=this._iterations,e=t,i=this.geom.radius,n=s(this._startAngle),r=s(this._endAngle),a=i,u=i;r-=n,this._anticlockwise?r<-h.PI2?r=-h.PI2:r>0&&(r=-h.PI2+r%h.PI2):r>h.PI2?r=h.PI2:r<0&&(r=h.PI2+r%h.PI2);for(var l,c=[a+Math.cos(n)*i,u+Math.sin(n)*i];e<1;)l=r*e+n,c.push(a+Math.cos(l)*i,u+Math.sin(l)*i),e+=t;return l=r+n,c.push(a+Math.cos(l)*i,u+Math.sin(l)*i),c.push(a+Math.cos(n)*i,u+Math.sin(n)*i),this.pathIndexes=o(c),this.pathData=c,this}});t.exports=l},function(t,e,i){ 1938/** 1939 * @author Richard Davey <[email protected]> 1940 * @copyright 2020 Photon Storm Ltd. 1941 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1942 */ 1943var n=i(0),r=i(1094),s=i(68),o=i(10),a=i(33),h=new n({Extends:a,Mixins:[r],initialize:function(t,e,i,n,r,s){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==r&&this.setFillStyle(r,s),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),r=0;r<n.length;r++)i.push(n[r].x,n[r].y);return i.push(n[0].x,n[0].y),this.pathIndexes=s(i),this.pathData=i,this}});t.exports=h},function(t,e,i){ 1944/** 1945 * @author Richard Davey <[email protected]> 1946 * @copyright 2020 Photon Storm Ltd. 1947 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1948 */ 1949var n=i(0),r=i(68),s=i(1097),o=i(108),a=i(33),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,r,s,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===r&&(r=128),a.call(this,t,"Ellipse",new o(n/2,r/2,n,r)),this._smoothness=64,this.setPosition(e,i),this.width=n,this.height=r,void 0!==s&&this.setFillStyle(s,h),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSize:function(t,e){return this.width=t,this.height=e,this.geom.setPosition(t/2,e/2),this.geom.setSize(t,e),this.updateData()},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){for(var t=[],e=this.geom.getPoints(this._smoothness),i=0;i<e.length;i++)t.push(e[i].x,e[i].y);return t.push(e[0].x,e[0].y),this.pathIndexes=r(t),this.pathData=t,this}});t.exports=h},function(t,e,i){ 1950/** 1951 * @author Richard Davey <[email protected]> 1952 * @copyright 2020 Photon Storm Ltd. 1953 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1954 */ 1955var n=i(0),r=i(33),s=i(1100),o=new n({Extends:r,Mixins:[s],initialize:function(t,e,i,n,s,o,a,h,u,l,c){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===s&&(s=128),void 0===o&&(o=32),void 0===a&&(a=32),r.call(this,t,"Grid",null),this.cellWidth=o,this.cellHeight=a,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(e,i),this.setSize(n,s),this.setFillStyle(h,u),void 0!==l&&this.setOutlineStyle(l,c),this.updateDisplayOrigin()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showCells=!1:(this.fillColor=t,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showAltCells=!1:(this.altFillColor=t,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showOutline=!1:(this.outlineFillColor=t,this.outlineFillAlpha=e,this.showOutline=!0),this}});t.exports=o},function(t,e,i){ 1956/** 1957 * @author Richard Davey <[email protected]> 1958 * @copyright 2020 Photon Storm Ltd. 1959 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1960 */ 1961var n=i(1103),r=i(0),s=i(33),o=new r({Extends:s,Mixins:[n],initialize:function(t,e,i,n,r,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=48),void 0===r&&(r=32),void 0===o&&(o=15658734),void 0===a&&(a=10066329),void 0===h&&(h=13421772),s.call(this,t,"IsoBox",null),this.projection=4,this.fillTop=o,this.fillLeft=a,this.fillRight=h,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(e,i),this.setSize(n,r),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=o},function(t,e,i){ 1962/** 1963 * @author Richard Davey <[email protected]> 1964 * @copyright 2020 Photon Storm Ltd. 1965 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1966 */ 1967var n=i(0),r=i(1106),s=i(33),o=new n({Extends:s,Mixins:[r],initialize:function(t,e,i,n,r,o,a,h,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=48),void 0===r&&(r=32),void 0===o&&(o=!1),void 0===a&&(a=15658734),void 0===h&&(h=10066329),void 0===u&&(u=13421772),s.call(this,t,"IsoTriangle",null),this.projection=4,this.fillTop=a,this.fillLeft=h,this.fillRight=u,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=o,this.isFilled=!0,this.setPosition(e,i),this.setSize(n,r),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setReversed:function(t){return this.isReversed=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=o},function(t,e,i){ 1968/** 1969 * @author Richard Davey <[email protected]> 1970 * @copyright 2020 Photon Storm Ltd. 1971 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1972 */ 1973var n=i(0),r=i(33),s=i(45),o=i(1109),a=new n({Extends:r,Mixins:[o],initialize:function(t,e,i,n,o,a,h,u,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=0),void 0===a&&(a=128),void 0===h&&(h=0),r.call(this,t,"Line",new s(n,o,a,h));var c=Math.max(1,this.geom.right-this.geom.left),f=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(e,i),this.setSize(c,f),void 0!==u&&this.setStrokeStyle(1,u,l),this.updateDisplayOrigin()},setLineWidth:function(t,e){return void 0===e&&(e=t),this._startWidth=t,this._endWidth=e,this.lineWidth=t,this},setTo:function(t,e,i,n){return this.geom.setTo(t,e,i,n),this}});t.exports=a},function(t,e,i){ 1974/** 1975 * @author Richard Davey <[email protected]> 1976 * @copyright 2020 Photon Storm Ltd. 1977 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1978 */ 1979var n=i(1112),r=i(0),s=i(68),o=i(463),a=i(224),h=i(33),u=i(466),l=new r({Extends:h,Mixins:[n],initialize:function(t,e,i,n,r,s){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Polygon",new a(n));var u=o(this.geom);this.setPosition(e,i),this.setSize(u.width,u.height),void 0!==r&&this.setFillStyle(r,s),this.updateDisplayOrigin(),this.updateData()},smooth:function(t){void 0===t&&(t=1);for(var e=0;e<t;e++)u(this.geom);return this.updateData()},updateData:function(){for(var t=[],e=this.geom.points,i=0;i<e.length;i++)t.push(e[i].x,e[i].y);return t.push(e[0].x,e[0].y),this.pathIndexes=s(t),this.pathData=t,this}});t.exports=l},function(t,e,i){ 1980/** 1981 * @author Richard Davey <[email protected]> 1982 * @copyright 2020 Photon Storm Ltd. 1983 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1984 */ 1985var n=i(10);t.exports=function(t,e){void 0===e&&(e=new n);for(var i,r=1/0,s=1/0,o=-r,a=-s,h=0;h<t.points.length;h++)i=t.points[h],r=Math.min(r,i.x),s=Math.min(s,i.y),o=Math.max(o,i.x),a=Math.max(a,i.y);return e.x=r,e.y=s,e.width=o-r,e.height=a-s,e}},function(t,e,i){ 1986/** 1987 * @author Richard Davey <[email protected]> 1988 * @copyright 2020 Photon Storm Ltd. 1989 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1990 */ 1991var n=i(64),r=i(45),s=i(465);t.exports=function(t,e,i,o){void 0===o&&(o=[]);var a=t.points,h=s(t);!e&&i>0&&(e=h/i);for(var u=0;u<e;u++)for(var l=h*(u/e),c=0,f=0;f<a.length;f++){var d=a[f],p=a[(f+1)%a.length],v=new r(d.x,d.y,p.x,p.y),g=n(v);if(!(l<c||l>c+g)){var m=v.getPoint((l-c)/g);o.push(m);break}c+=g}return o}},function(t,e,i){ 1992/** 1993 * @author Richard Davey <[email protected]> 1994 * @copyright 2020 Photon Storm Ltd. 1995 * @license {@link https://opensource.org/licenses/MIT|MIT License} 1996 */ 1997var n=i(64),r=i(45);t.exports=function(t){for(var e=t.points,i=0,s=0;s<e.length;s++){var o=e[s],a=e[(s+1)%e.length],h=new r(o.x,o.y,a.x,a.y);i+=n(h)}return i}},function(t,e){ 1998/** 1999 * @author Richard Davey <[email protected]> 2000 * @author Igor Ognichenko <[email protected]> 2001 * @copyright 2020 Photon Storm Ltd. 2002 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2003 */ 2004var i=function(t,e){return t[0]=e[0],t[1]=e[1],t};t.exports=function(t){var e,n=[],r=t.points;for(e=0;e<r.length;e++)n.push([r[e].x,r[e].y]);var s=[];for(n.length>0&&s.push(i([0,0],n[0])),e=0;e<n.length-1;e++){var o=n[e],a=n[e+1],h=o[0],u=o[1],l=a[0],c=a[1];s.push([.85*h+.15*l,.85*u+.15*c]),s.push([.15*h+.85*l,.15*u+.85*c])}return n.length>1&&s.push(i([0,0],n[n.length-1])),t.setTo(s)}},function(t,e,i){ 2005/** 2006 * @author Richard Davey <[email protected]> 2007 * @copyright 2020 Photon Storm Ltd. 2008 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2009 */ 2010var n=i(0),r=i(10),s=i(33),o=i(1115),a=new n({Extends:s,Mixins:[o],initialize:function(t,e,i,n,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===o&&(o=128),s.call(this,t,"Rectangle",new r(0,0,n,o)),this.setPosition(e,i),this.setSize(n,o),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setSize:function(t,e){return this.width=t,this.height=e,this.geom.setSize(t,e),this.updateData(),this},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},function(t,e,i){ 2011/** 2012 * @author Richard Davey <[email protected]> 2013 * @copyright 2020 Photon Storm Ltd. 2014 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2015 */ 2016var n=i(1118),r=i(0),s=i(68),o=i(33),a=new r({Extends:o,Mixins:[n],initialize:function(t,e,i,n,r,s,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=5),void 0===r&&(r=32),void 0===s&&(s=64),o.call(this,t,"Star",null),this._points=n,this._innerRadius=r,this._outerRadius=s,this.setPosition(e,i),this.setSize(2*s,2*s),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,n=this._outerRadius,r=Math.PI/2*3,o=Math.PI/e,a=n,h=n;t.push(a,h+-n);for(var u=0;u<e;u++)t.push(a+Math.cos(r)*n,h+Math.sin(r)*n),r+=o,t.push(a+Math.cos(r)*i,h+Math.sin(r)*i),r+=o;return t.push(a,h+-n),this.pathIndexes=s(t),this.pathData=t,this}});t.exports=a},function(t,e,i){ 2017/** 2018 * @author Richard Davey <[email protected]> 2019 * @copyright 2020 Photon Storm Ltd. 2020 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2021 */ 2022var n=i(0),r=i(33),s=i(82),o=i(1121),a=new n({Extends:r,Mixins:[o],initialize:function(t,e,i,n,o,a,h,u,l,c,f){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=128),void 0===a&&(a=64),void 0===h&&(h=0),void 0===u&&(u=128),void 0===l&&(l=128),r.call(this,t,"Triangle",new s(n,o,a,h,u,l));var d=this.geom.right-this.geom.left,p=this.geom.bottom-this.geom.top;this.setPosition(e,i),this.setSize(d,p),void 0!==c&&this.setFillStyle(c,f),this.updateDisplayOrigin(),this.updateData()}
2022,setTo:function(t,e,i,n,r,s){return this.geom.setTo(t,e,i,n,r,s),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},function(t,e,i){ 2023/** 2024 * @author Richard Davey <[email protected]> 2025 * @copyright 2020 Photon Storm Ltd. 2026 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2027 */ 2028var n=i(4),r=i(64);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.getLineA(),o=t.getLineB(),a=t.getLineC();if(e<=0||e>=1)return i.x=s.x1,i.y=s.y1,i;var h=r(s),u=r(o),l=r(a),c=(h+u+l)*e,f=0;return c<h?(f=c/h,i.x=s.x1+(s.x2-s.x1)*f,i.y=s.y1+(s.y2-s.y1)*f):c>h+u?(f=(c-=h+u)/l,i.x=a.x1+(a.x2-a.x1)*f,i.y=a.y1+(a.y2-a.y1)*f):(f=(c-=h)/u,i.x=o.x1+(o.x2-o.x1)*f,i.y=o.y1+(o.y2-o.y1)*f),i}},function(t,e,i){ 2029/** 2030 * @author Richard Davey <[email protected]> 2031 * @copyright 2020 Photon Storm Ltd. 2032 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2033 */ 2034var n=i(64),r=i(4);t.exports=function(t,e,i,s){void 0===s&&(s=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),u=n(o),l=n(a),c=n(h),f=u+l+c;!e&&i>0&&(e=f/i);for(var d=0;d<e;d++){var p=f*(d/e),v=0,g=new r;p<u?(v=p/u,g.x=o.x1+(o.x2-o.x1)*v,g.y=o.y1+(o.y2-o.y1)*v):p>u+l?(v=(p-=u+l)/c,g.x=h.x1+(h.x2-h.x1)*v,g.y=h.y1+(h.y2-h.y1)*v):(v=(p-=u)/l,g.x=a.x1+(a.x2-a.x1)*v,g.y=a.y1+(a.y2-a.y1)*v),s.push(g)}return s}},function(t,e){t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var n=e.split("."),r=t,s=t,o=0;o<n.length;o++){if(!r.hasOwnProperty(n[o]))return!1;s=r,r=r[n[o]]}return s[n[n.length-1]]=i,!0}return!1}},function(t,e,i){ 2035/** 2036 * @author Richard Davey <[email protected]> 2037 * @copyright 2020 Photon Storm Ltd. 2038 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2039 */ 2040var n=i(113),r=i(115);t.exports=function(t,e,i,s,o,a,h){if(void 0===s&&(s=!1),void 0===a&&(a=16777215),void 0===h&&(h=1),t.length===e.length){var u,l,c,f,d,p,v,g,m,y,x,w={faces:[],vertices:[]},_=s?3:2,b=Array.isArray(a),T=Array.isArray(h);if(Array.isArray(i)&&i.length>0)for(u=0;u<i.length;u++){var E=i[u],S=2*i[u],A=i[u]*_;l=t[A],c=t[A+1],f=s?t[A+2]:0,d=e[S],p=e[S+1],v=b?a[E]:a,g=T?h[E]:h,m=0,y=0,x=0,o&&(m=o[A],y=o[A+1],x=s?o[A+2]:0),w.vertices.push(new r(l,c,f,d,p,v,g,m,y,x))}else{var C=0,O=0;for(u=0;u<t.length;u+=_)l=t[u],c=t[u+1],f=s?t[u+2]:0,d=e[C],p=e[C+1],v=b?a[O]:a,g=T?h[O]:h,m=0,y=0,x=0,o&&(m=o[u],y=o[u+1],x=s?o[u+2]:0),w.vertices.push(new r(l,c,f,d,p,v,g,m,y,x)),C+=2,O++}for(u=0;u<w.vertices.length;u+=3){var R=w.vertices[u],M=w.vertices[u+1],P=w.vertices[u+2];w.faces.push(new n(R,M,P))}return w}console.warn("GenerateVerts: vertices and uvs count not equal")}},function(t,e,i){ 2041/** 2042 * @author Richard Davey <[email protected]> 2043 * @copyright 2020 Photon Storm Ltd. 2044 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2045 */ 2046var n=i(113),r=i(67),s=i(38),o=i(115),a=new s,h=new s,u=new r;
2046t.exports=function(t,e,i,r,s,l,c,f,d,p){void 0===i&&(i=1),void 0===r&&(r=0),void 0===s&&(s=0),void 0===l&&(l=0),void 0===c&&(c=0),void 0===f&&(f=0),void 0===d&&(d=0),void 0===p&&(p=!0);var v={faces:[],verts:[]},g=t.materials;a.set(r,s,l),h.set(c,f,d),u.fromRotationXYTranslation(h,a,p);for(var m=0;m<t.models.length;m++)for(var y=t.models[m],x=y.vertices,w=y.textureCoords,_=y.faces,b=0;b<_.length;b++){var T=_[b],E=T.vertices[0],S=T.vertices[1],A=T.vertices[2],C=x[E.vertexIndex],O=x[S.vertexIndex],R=x[A.vertexIndex],M=E.textureCoordsIndex,P=S.textureCoordsIndex,I=A.textureCoordsIndex,k=-1===M?{u:0,v:1}:w[M],L=-1===P?{u:0,v:0}:w[P],D=-1===I?{u:1,v:1}:w[I],F=16777215;""!==T.material&&g[T.material]&&(F=g[T.material]);var N=new o(C.x*i,C.y*i,C.z*i,k.u,k.v,F).transformMat4(u),B=new o(O.x*i,O.y*i,O.z*i,L.u,L.v,F).transformMat4(u),U=new o(R.x*i,R.y*i,R.z*i,D.u,D.v,F).transformMat4(u);v.verts.push(N,B,U),v.faces.push(new n(N,B,U))}return e&&(e.faces=e.faces.concat(v.faces),e.vertices=e.vertices.concat(v.verts)),v}},function(t,e,i){ 2047/** 2048 * @author Richard Davey <[email protected]> 2049 * @copyright 2020 Photon Storm Ltd. 2050 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2051 */ 2052var n=i(62),r=i(0),s=i(11),o=i(197),a=i(12),h=new r({Extends:n,Mixins:[s.ScrollFactor,s.Visible],initialize:function(t,e,i,r,s,a,h){n.call(this,t,e,i),this.color=new o(r,s,a),this.intensity=h,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setColor:function(t){var e=a.getFloatsFromUintRGB(t);return this.color.set(e[0],e[1],e[2]),this},setIntensity:function(t){return this.intensity=t,this},setRadius:function(t){return this.radius=t,this}});h.RENDER_MASK=15,t.exports=h},function(t,e,i){ 2053/** 2054 * @author Richard Davey <[email protected]> 2055 * @copyright 2020 Photon Storm Ltd. 2056 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2057 */ 2058var n=i(150),r=i(0),s=i(48),o=i(475),a=i(149),h=i(197),u=i(74),l=i(79),c=i(12),f=new r({initialize:function(){this.lights=[],this.ambientColor=new h(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(t,e,i,n,r){return this.systems.displayList.add(new a(this.scene,t,e,i,n,r))},enable:function(){return-1===this.maxLights&&(this.maxLights=this.scene.sys.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(t){for(var e=this.lights,i=t.worldView,r=[],o=0;o<e.length;o++){var a=e[o];a.willRender(t)&&n(a,i)&&r.push({light:a,distance:s(a.x,a.y,i.centerX,i.centerY)})}return r.length>this.maxLights&&(l(r,this.sortByDistance),r=r.slice(0,this.maxLights)),this.visibleLights=r.length,r},sortByDistance:function(t,e){return t.distance>=e.distance},setAmbientColor:function(t){var e=c.getFloatsFromUintRGB(t);return this.ambientColor.set(e[0],e[1],e[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(t,e,i,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=128),void 0===n&&(n=16777215),void 0===r&&(r=1);var s=c.getFloatsFromUintRGB(n),a=new o(t,e,i,s[0],s[1],s[2],r);return this.lights.push(a),a},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&u(this.lights,e),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=f},function(t,e,i){ 2059/** 2060 * @author Richard Davey <[email protected]> 2061 * @copyright 2020 Photon Storm Ltd. 2062 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2063 */ 2064var n=i(55),r=i(17),s={Circle:i(1185),Ellipse:i(1195),Intersects:i(478),Line:i(1215),Mesh:i(1237),Point:i(1240),Polygon:i(1254),Rectangle:i(496),Triangle:i(1287)};s=r(!1,s,n),t.exports=s},function(t,e,i){ 2065/** 2066 * @author Richard Davey <[email protected]> 2067 * @copyright 2020 Photon Storm Ltd. 2068 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2069 */ 2070t.exports={CircleToCircle:i(228),CircleToRectangle:i(150),GetCircleToCircle:i(1205),GetCircleToRectangle:i(1206),GetLineToCircle:i(229),GetLineToLine:i(479),GetLineToPoints:i(480),GetLineToPolygon:i(481),GetLineToRectangle:i(231
2070),GetRaysFromPointToPolygon:i(1207),GetRectangleIntersection:i(1208),GetRectangleToRectangle:i(1209),GetRectangleToTriangle:i(1210),GetTriangleToCircle:i(1211),GetTriangleToLine:i(486),GetTriangleToTriangle:i(1212),LineToCircle:i(230),LineToLine:i(92),LineToRectangle:i(482),PointToLine:i(490),PointToLineSegment:i(1213),RectangleToRectangle:i(114),RectangleToTriangle:i(483),RectangleToValues:i(1214),TriangleToCircle:i(485),TriangleToLine:i(487),TriangleToTriangle:i(488)}},function(t,e,i){ 2071/** 2072 * @author Richard Davey 2073 * @copyright 2020 Photon Storm Ltd. 2074 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2075 */ 2076var n=i(38);t.exports=function(t,e,i){var r=t.x1,s=t.y1,o=t.x2,a=t.y2,h=e.x1,u=e.y1,l=o-r,c=a-s,f=e.x2-h,d=e.y2-u;if(0===l||0==d*l-f*c)return!1;var p=(l*(u-s)+c*(r-h))/(f*c-d*l),v=(h+f*p-r)/l;return v<0||p<0||p>1?null:(void 0===i&&(i=new n),i.set(r+l*v,s+c*v,v))}},function(t,e,i){ 2077/** 2078 * @author Richard Davey 2079 * @copyright 2020 Photon Storm Ltd. 2080 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2081 */ 2082var n=i(38),r=i(479),s=new(i(45)),o=new n;t.exports=function(t,e,i){void 0===i&&(i=new n);var a=!1;i.set(),o.set();for(var h=e[0],u=1;u<e.length;u++){var l=e[u];s.setTo(h.x,h.y,l.x,l.y),h=l,r(t,s,o)&&(!a||o.z<i.z)&&(i.copy(o),a=!0)}return a?i:null}},function(t,e,i){ 2083/** 2084 * @author Richard Davey 2085 * @copyright 2020 Photon Storm Ltd. 2086 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2087 */ 2088var n=i(38),r=i(138),s=i(480),o=new n;t.exports=function(t,e,i){void 0===i&&(i=new r),Array.isArray(e)||(e=[e]);var n=!1;i.set(),o.set();for(var a=0;a<e.length;a++)s(t,e[a].points,o)&&(!n||o.z<i.z)&&(i.set(o.x,o.y,o.z,a),n=!0);return n?i:null}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,r=t.x2,s=t.y2,o=e.x,a=e.y,h=e.right,u=e.bottom,l=0;if(i>=o&&i<=h&&n>=a&&n<=u||r>=o&&r<=h&&s>=a&&s<=u)return!0;if(i<o&&r>=o){if((l=n+(s-n)*(o-i)/(r-i))>a&&l<=u)return!0}else if(i>h&&r<=h&&(l=n+(s-n)*(h-i)/(r-i))>=a&&l<=u)return!0;if(n<a&&s>=a){if((l=i+(r-i)*(a-n)/(s-n))>=o&&l<=h)return!0}else if(n>u&&s<=u&&(l=i+(r-i)*(u-n)/(s-n))>=o&&l<=h)return!0;return!1}},function(t,e,i){ 2089/** 2090 * @author Richard Davey <[email protected]> 2091 * @copyright 2020 Photon Storm Ltd. 2092 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2093 */ 2094var n=i(92),r=i(56),s=i(232),o=i(484);t.exports=function(t,e){if(e.left>t.right||e.right<t.left||e.top>t.bottom||e.bottom<t.top)return!1;var i=e.getLineA(),a=e.getLineB(),h=e.getLineC();if(r(t,i.x1,i.y1)||r(t,i.x2,i.y2))return!0;if(r(t,a.x1,a.y1)||r(t,a.x2,a.y2))return!0;if(r(t,h.x1,h.y1)||r(t,h.x2,h.y2))return!0;var u=t.getLineA(),l=t.getLineB(),c=t.getLineC(),f=t.getLineD();if(n(i,u)||n(i,l)||n(i,c)||n(i,f))return!0;if(n(a,u)||n(a,l)||n(a,c)||n(a,f))return!0;if(n(h,u)||n(h,l)||n(h,c)||n(h,f))return!0;var d=o(t);return s(e,d,!0).length>0}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e,i){ 2095/** 2096 * @author Richard Davey <[email protected]> 2097 * @copyright 2020 Photon Storm Ltd. 2098 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2099 */ 2100var n=i(230),r=i(112);t.exports=function(t,e){return!(t.left>e.right||t.right<e.left||t.top>e.bottom||t.bottom<e.top||!r(t,e.x,e.y)&&!n(t.getLineA(),e)&&!n(t.getLineB(),e)&&!n(t.getLineC(),e))}},function(t,e,i){ 2101/** 2102 * @author Florian Vazelle 2103 * @author Geoffrey Glaive 2104 * @copyright 2020 Photon Storm Ltd. 2105 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2106 */ 2107var n=i(4),r=i(487),s=i(92);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),u=[new n,new n,new n],l=[s(o,e,u[0]),s(a,e,u[1]),s(h,e,u[2])],c=0;c<3;c++)l[c]&&i.push(u[c]);return i}}
2107,function(t,e,i){ 2108/** 2109 * @author Richard Davey <[email protected]> 2110 * @copyright 2020 Photon Storm Ltd. 2111 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2112 */ 2113var n=i(92);t.exports=function(t,e){return!!(t.contains(e.x1,e.y1)||t.contains(e.x2,e.y2)||n(t.getLineA(),e)||n(t.getLineB(),e)||n(t.getLineC(),e))}},function(t,e,i){ 2114/** 2115 * @author Richard Davey <[email protected]> 2116 * @copyright 2020 Photon Storm Ltd. 2117 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2118 */ 2119var n=i(232),r=i(489),s=i(92);t.exports=function(t,e){if(t.left>e.right||t.right<e.left||t.top>e.bottom||t.bottom<e.top)return!1;var i=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=e.getLineA(),u=e.getLineB(),l=e.getLineC();if(s(i,h)||s(i,u)||s(i,l))return!0;if(s(o,h)||s(o,u)||s(o,l))return!0;if(s(a,h)||s(a,u)||s(a,l))return!0;var c=r(t),f=n(e,c,!0);return f.length>0||(c=r(e),(f=n(t,c,!0)).length>0)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=1);var n=e.x1,r=e.y1,s=e.x2,o=e.y2,a=t.x,h=t.y,u=(s-n)*(s-n)+(o-r)*(o-r);if(0===u)return!1;var l=((a-n)*(s-n)+(h-r)*(o-r))/u;if(l<0)return Math.sqrt((n-a)*(n-a)+(r-h)*(r-h))<=i;if(l>=0&&l<=1){var c=((r-h)*(s-n)-(n-a)*(o-r))/u;return Math.abs(c)*Math.sqrt(u)<=i}return Math.sqrt((s-a)*(s-a)+(o-h)*(o-h))<=i}},function(t,e,i){ 2120/** 2121 * @author Richard Davey <[email protected]> 2122 * @copyright 2020 Photon Storm Ltd. 2123 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2124 */ 2125var n=i(14),r=i(66),s=i(93);t.exports=function(t){var e=s(t)-n.TAU;return r(e,-Math.PI,Math.PI)}},function(t,e){ 2126/** 2127 * @author Richard Davey <[email protected]> 2128 * @copyright 2020 Photon Storm Ltd. 2129 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2130 */ 2131var i=!0,n="untitled",r="",s="";function o(t){var e=t.indexOf("#");return e>-1?t.substring(0,e):t}function a(t){return 0===t.models.length&&t.models.push({faces:[],name:n,textureCoords:[],vertexNormals:[],vertices:[]}),r="",t.models[t.models.length-1]}function h(t,e){var i=t.length>=2?t[1]:n;e.models.push({faces:[],name:i,textureCoords:[],vertexNormals:[],vertices:[]}),r=""}function u(t){2===t.length&&(r=t[1])}function l(t,e){var i=t.length,n=i>=2?parseFloat(t[1]):0,r=i>=3?parseFloat(t[2]):0,s=i>=4?parseFloat(t[3]):0;a(e).vertices.push({x:n,y:r,z:s})}function c(t,e){var n=t.length,r=n>=2?parseFloat(t[1]):0,s=n>=3?parseFloat(t[2]):0,o=n>=4?parseFloat(t[3]):0;isNaN(r)&&(r=0),isNaN(s)&&(s=0),isNaN(o)&&(o=0),i&&(s=1-s),a(e).textureCoords.push({u:r,v:s,w:o})}function f(t,e){var i=t.length,n=i>=2?parseFloat(t[1]):0,r=i>=3?parseFloat(t[2]):0,s=i>=4?parseFloat(t[3]):0;a(e).vertexNormals.push({x:n,y:r,z:s})}function d(t,e){var i=t.length-1;if(!(i<3)){for(var n={group:r,material:s,vertices:[]},o=0;o<i;o++){var h=t[o+1].split("/"),u=h.length;if(!(u<1||u>3)){var l=0,c=0,f=0;l=parseInt(h[0],10),u>1&&""!==h[1]&&(c=parseInt(h[1],10)),u>2&&(f=parseInt(h[2],10)),0!==l&&(l<0&&(l=a(e).vertices.length+1+l),c-=1,l-=1,f-=1,n.vertices.push({textureCoordsIndex:c,vertexIndex:l,vertexNormalIndex:f}))}}a(e).faces.push(n)}}function p(t,e){t.length>=2&&e.materialLibraries.push(t[1])}function v(t){t.length>=2&&(s=t[1])}t.exports=function(t,e){void 0===e&&(e=!0),i=e;var n={materials:{},materialLibraries:[],models:[]};r="",s="";for(var a=t.split("\n"),g=0;g<a.length;g++){var m=o(a[g]).replace(/\s\s+/g," ").trim().split(" ");switch(m[0].toLowerCase()){case"o":h(m,n);break;case"g":u(m);break;case"v":l(m,n);break;case"vt":c(m,n);break;case"vn":f(m,n);break;case"f":d(m,n);break;case"mtllib":p(m,n);break;case"usemtl":v(m)}}return n}},function(t,e,i){ 2132/** 2133 * @author Richard Davey <[email protected]> 2134 * @copyright 2020 Photon Storm Ltd. 2135 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2136 */ 2137var n=i(100);t.exports=function(t){for(var e={},i=t.split("\n"),r="",s=0;s<i.length;s++){var o=i[s].trim();if(0!==o.indexOf("#")&&""!==o){var a=o.replace(/\s\s+/g," ").trim().split(" ");switch(a[0].toLowerCase()){case"newmtl":r=a[1];break;case"kd":var h=Math.floor(255*a[1]),u=a.length>=2?Math.floor(255*a[2]):h,l=a.length>=3?Math.floor(255*a[3]):h;e[r]=n(h,u,l)}}}return e}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}}
vendor: 22,023 bytes, lines 2137-2239
2137,function(t,e,i){ 2138/** 2139 * @author Richard Davey <[email protected]> 2140 * @copyright 2020 Photon Storm Ltd. 2141 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2142 */ 2143var n=i(10);n.Area=i(1261),n.Ceil=i(1262),n.CeilAll=i(1263),n.CenterOn=i(187),n.Clone=i(1264),n.Contains=i(56),n.ContainsPoint=i(1265),n.ContainsRect=i(497),n.CopyFrom=i(1266),n.Decompose=i(484),n.Equals=i(1267),n.FitInside=i(1268),n.FitOutside=i(1269),n.Floor=i(1270),n.FloorAll=i(1271),n.FromPoints=i(196),n.FromXY=i(1272),n.GetAspectRatio=i(234),n.GetCenter=i(1273),n.GetPoint=i(167),n.GetPoints=i(300),n.GetSize=i(1274),n.Inflate=i(1275),n.Intersection=i(1276),n.MarchingAnts=i(310),n.MergePoints=i(1277),n.MergeRect=i(1278),n.MergeXY=i(1279),n.Offset=i(1280),n.OffsetPoint=i(1281),n.Overlaps=i(1282),n.Perimeter=i(128),n.PerimeterPoint=i(1283),n.Random=i(170),n.RandomOutside=i(1284),n.SameDimensions=i(1285),n.Scale=i(1286),n.Union=i(435),t.exports=n},function(t,e){t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&e.x>t.x&&e.x<t.right&&e.right>t.x&&e.right<t.right&&e.y>t.y&&e.y<t.bottom&&e.bottom>t.y&&e.bottom<t.bottom}},function(t,e,i){ 2144/** 2145 * @author Richard Davey <[email protected]> 2146 * @copyright 2020 Photon Storm Ltd. 2147 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2148 */ 2149var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},function(t,e,i){ 2150/** 2151 * @author Richard Davey <[email protected]> 2152 * @copyright 2020 Photon Storm Ltd. 2153 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2154 */ 2155var n=i(4);function r(t,e,i,n){var r=t-i,s=e-n,o=r*r+s*s;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,s=t.y1,o=t.x2,a=t.y2,h=t.x3,u=t.y3,l=r(h,u,o,a),c=r(i,s,h,u),f=r(o,a,i,s),d=l+c+f;return e.x=(i*l+o*c+h*f)/d,e.y=(s*l+a*c+u*f)/d,e}},function(t,e){t.exports=function(t,e){return function(i,n,r,s){var o=t.getPixelAlpha(n,r,s.texture.key,s.frame.name);return o&&o>=e}}},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,alwaysEnabled:!1,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}}},function(t,e,i){ 2156/** 2157 * @author Richard Davey <[email protected]> 2158 * @copyright 2020 Photon Storm Ltd. 2159 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2160 */ 2161var n=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value)<this.threshold?0:this.value},destroy:function(){this.pad=null,this.events=null}});t.exports=n},function(t,e,i){ 2162/** 2163 * @author Richard Davey <[email protected]> 2164 * @copyright 2020 Photon Storm Ltd. 2165 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2166 */ 2167var n=i(0),r=i(236),s=new n({initialize:function(t,e){this.pad=t,this.events=t.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(t){this.value=t;var e=this.pad,i=this.index;t>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(r.BUTTON_DOWN,e,this,t),this.pad.emit(r.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(r.BUTTON_UP,e,this,t),this.pad.emit(r.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=s},function(t,e,i){ 2168/** 2169 * @author Richard Davey <[email protected]> 2170 * @copyright 2020 Photon Storm Ltd. 2171 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2172 */ 2173var n=i(503),r=i(504),s=i(0),o=i(9),a=i(3),h=new s({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],s=0;s<e.buttons.length;s++)i.push(new r(this,s));this.buttons=i;var h=[];for(s=0;s<e.axes.length;s++)h.push(new n(this,s));this.axes=h,this.vibration=e.vibrationActuator;var u={value:0,pressed:!1};this._LCLeft=i[14]?i[14]:u,this._LCRight=i[15]?i[15]:u,this._LCTop=i[12]?i[12]:u,this._LCBottom=i[13]?i[13]:u,this._RCLeft=i[2]?i[2]:u,this._RCRight=i[1]?i[1]:u,this._RCTop=i[3]?i[3]:u,this._RCBottom=i[0]?i[0]:u,this._FBLeftTop=i[4]?i[4]:u,this._FBLeftBottom=i[6]?i[6]:u,this._FBRightTop=i[5]?i[5]:u,this._FBRightBottom=i[7]?i[7]:u;var l={value:0};this._HAxisLeft=h[0]?h[0]:l,this._VAxisLeft=h[1]?h[1]:l,this._HAxisRight=h[2]?h[2]:l,this._VAxisRight=h[3]?h[3]:l,this.leftStick=new a,this.rightStick=new a,this._created=performance.now()},getAxisTotal:function(){return this.axes.length},getAxisValue:function(t){return this.axes[t].getValue()},setAxisThreshold:function(t){for(var e=0;e<this.axes.length;e++)this.axes[e].threshold=t},getButtonTotal:function(){return this.buttons.length},getButtonValue:function(t){return this.buttons[t].value},isButtonDown:function(t){return this.buttons[t].pressed},update:function(t){if(!(t.timestamp<this._created)){var e,i=this.buttons,n=t.buttons,r=i.length;for(e=0;e<r;e++)i[e].update(n[e].value);var s=this.axes,o=t.axes;for(r=s.length,e=0;e<r;e++)s[e].update(o[e]);r>=2&&(this.leftStick.set(s[0].getValue(),s[1].getValue()),r>=4&&this.rightStick.set(s[2].getValue(),s[3].getValue()))}},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t<this.buttons.length;t++)this.buttons[t].destroy();for(t=0;t<this.axes.length;t++)this.axes[t].destroy();this.buttons=[],this.axes=[]},connected:{get:function(){return this.pad.connected}},timestamp:{get:function(){return this.pad.timestamp}},left:{get:function(){return this._LCLeft.pressed}},right:{get:function(){return this._LCRight.pressed}},up:{get:function(){return this._LCTop.pressed}},down:{get:function(){return this._LCBottom.pressed}},A:{get:function(){return this._RCBottom.pressed}},Y:{get:function(){return this._RCTop.pressed}},X:{get:function(){return this._RCLeft.pressed}},B:{get:function(){return this._RCRight.pressed}},L1:{get:function(){return this._FBLeftTop.value}},L2:{get:function(){return this._FBLeftBottom.value}},R1:{get:function(){return this._FBRightTop.value}},R2:{get:function(){return this._FBRightBottom.value}}});t.exports=h},function(t,e,i){ 2174/** 2175 * @author Richard Davey <[email protected]> 2176 * @copyright 2020 Photon Storm Ltd. 2177 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2178 */ 2179var n=i(0),r=i(9),s=i(152),o=new n({Extends:r,initialize:function(t,e){r.call(this),this.plugin=t,this.keyCode=e,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(t){return this.emitOnRepeat=t,this},onDown:function(t){this.originalEvent=t,this.enabled&&(this.altKey=t.altKey,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.location=t.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(s.DOWN,this,t):(this.isDown=!0,this.isUp=!1,this.timeDown=t.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(s.DOWN,this,t)))},onUp:function(t){this.originalEvent=t,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=t.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(s.UP,this,t))},reset:function(){return this.preventDefault=!0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});t.exports=o},function(t,e,i){ 2180/** 2181 * @author Richard Davey <[email protected]> 2182 * @copyright 2020 Photon Storm Ltd. 2183 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2184 */ 2185var n=i(0),r=i(152),s=i(2),o=i(508),a=i(510),h=new n({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var n=0;n<e.length;n++){var h=e[n];"string"==typeof h?this.keyCodes.push(h.toUpperCase().charCodeAt(0)):"number"==typeof h?this.keyCodes.push(h):h.hasOwnProperty("keyCode")&&this.keyCodes.push(h.keyCode)}this.current=this.keyCodes[0],this.index=0,this.size=this.keyCodes.length,this.timeLastMatched=0,this.matched=!1,this.timeMatched=0,this.resetOnWrongKey=s(i,"resetOnWrongKey",!0),this.maxKeyDelay=s(i,"maxKeyDelay",0),this.resetOnMatch=s(i,"resetOnMatch",!1),this.deleteOnMatch=s(i,"deleteOnMatch",!1);var u=this;this.onKeyDown=function(t){!u.matched&&u.enabled&&o(t,u)&&(u.manager.emit(r.COMBO_MATCH,u,t),u.resetOnMatch?a(u):u.deleteOnMatch&&u.destroy())},this.manager.on(r.ANY_KEY_DOWN,this.onKeyDown)},progress:{get:function(){return this.index/this.size}},destroy:function(){this.enabled=!1,this.keyCodes=[],this.manager.off(r.ANY_KEY_DOWN,this.onKeyDown),this.manager=null}});t.exports=h},function(t,e,i){ 2186/** 2187 * @author Richard Davey <[email protected]> 2188 * @copyright 2020 Photon Storm Ltd. 2189 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2190 */ 2191var n=i(509);t.exports=function(t,e){if(e.matched)return!0;var i=!1,r=!1;if(t.keyCode===e.current)if(e.index>0&&e.maxKeyDelay>0){var s=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=s&&(r=!0,i=n(t,e))}else r=!0,i=n(t,e);return!r&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){ 2192/** 2193 * @author Richard Davey <[email protected]> 2194 * @copyright 2020 Photon Storm Ltd. 2195 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2196 */ 2197var n=i(237);t.exports=function(t,e){var i=n(e,t.xhrSettings),r=new XMLHttpRequest;if(r.open("GET",t.src,i.async,i.user,i.password),r.responseType=t.xhrSettings.responseType,r.timeout=i.timeout,i.headers)for(var s in i.headers)r.setRequestHeader(s,i.headers[s]);return i.header&&i.headerValue&&r.setRequestHeader(i.header,i.headerValue),i.requestedWith&&r.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&r.overrideMimeType(i.overrideMimeType),i.withCredentials&&(r.withCredentials=!0),r.onload=t.onLoad.bind(t,r),r.onerror=t.onError.bind(t,r),r.onprogress=t.onProgress.bind(t),r.send(),r}},function(t,e,i){ 2198/** 2199 * @author Richard Davey <[email protected]> 2200 * @copyright 2020 Photon Storm Ltd. 2201 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2202 */ 2203var n=i(0),r=i(20),s=i(23),o=i(8),a=i(2),h=i(513),u=i(7),l=new n({Extends:s,initialize:function(t,e,i,n,r){if(u(e)){var o=e;e=a(o,"key"),n=a(o,"xhrSettings"),r=a(o,"context",r)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,responseType:"arraybuffer",key:e,url:i.url,xhrSettings:n,config:{context:r}};s.call(this,t,h)},onProcess:function(){this.state=r.FILE_PROCESSING;var t=this;this.config.context.decodeAudioData(this.xhrLoader.response,(function(e){t.data=e,t.onProcessComplete()}),(function(e){console.error("Error decoding audio: "+t.key+" - ",e?e.message:null),t.onProcessError()})),this.config.context=null}});l.create=function(t,e,i,n,r){var s=t.systems.game,o=s.config.audio,c=s.device.audio;u(e)&&(i=a(e,"url",[]),n=a(e,"config",{}));var f=l.getAudioURL(s,i);return f?c.webAudio&&!o.disableWebAudio?new l(t,e,f,r,s.sound.context):new h(t,e,f,n):null},l.getAudioURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++){var n=a(e[i],"url",e[i]);if(0===n.indexOf("blob:")||0===n.indexOf("data:"))return{url:n,type:""};var r=n.match(/\.([a-zA-Z0-9]+)($|\?)/);if(r=a(e[i],"type",r?r[1]:"").toLowerCase(),t.device.audio[r])return{url:n,type:r}}return null},o.register("audio",(function(t,e,i,n){var r,s=this.systems.game,o=s.config.audio,a=s.device.audio;if(o.noAudio||!a.webAudio&&!a.audioData)return this;if(Array.isArray(t))for(var h=0;h<t.length;h++)(r=l.create(this,t[h]))&&this.addFile(r);else(r=l.create(this,t,e,i,n))&&this.addFile(r);return this})),t.exports=l},function(t,e,i){ 2204/** 2205 * @author Richard Davey <[email protected]> 2206 * @copyright 2020 Photon Storm Ltd. 2207 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2208 */ 2209var n=i(0),r=i(91),s=i(23),o=i(2),a=i(153),h=i(7),u=new n({Extends:s,initialize:function(t,e,i,n){if(h(e)){var r=e;e=o(r,"key"),n=o(r,"config",n)}var a={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:n};s.call(this,t,a),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t<this.data.length;t++){var e=this.data[t];e.oncanplaythrough=null,e.onerror=null}this.loader.nextFile(this,!1)},onProgress:function(t){var e=t.target;e.oncanplaythrough=null,e.onerror=null,this.filesLoaded++,this.percentComplete=Math.min(this.filesLoaded/this.filesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete),this.filesLoaded===this.filesTotal&&this.onLoad()},load:function(){this.data=[];var t=this.config&&this.config.instances||1;this.filesTotal=t,this.filesLoaded=0,this.percentComplete=0;for(var e=0;e<t;e++){var i=new Audio;i.dataset||(i.dataset={}),i.dataset.name=this.key+("0"+e).slice(-2),i.dataset.used="false",this.locked?i.dataset.locked="true":(i.dataset.locked="false",i.preload="auto",i.oncanplaythrough=this.onProgress.bind(this),i.onerror=this.onError.bind(this)),this.data.push(i)}for(e=0;e<this.data.length;e++)(i=this.data[e]).src=a(this,this.loader.baseURL),this.locked||i.load();this.locked&&setTimeout(this.onLoad.bind(this))}});t.exports=u},function(t,e,i){ 2210/** 2211 * @author Richard Davey <[email protected]> 2212 * @copyright 2020 Photon Storm Ltd. 2213 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2214 */ 2215var n=i(0),r=i(20),s=i(23),o=i(8),a=i(2),h=i(7),u=new n({Extends:s,initialize:function(t,e,i,n){var r="js";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),r=a(o,"extension",r)}var u={type:"script",cache:!1,extension:r,responseType:"text",key:e,url:i,xhrSettings:n};s.call(this,t,u)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});o.register("script",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new u(this,t[n]));else this.addFile(new u(this,t,e,i));return this})),t.exports=u},function(t,e,i){ 2216/** 2217 * @author Richard Davey <[email protected]> 2218 * @copyright 2020 Photon Storm Ltd. 2219 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2220 */ 2221var n=i(516),r=i(155),s=i(0),o=i(60),a=i(518),h=i(519),u=new s({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,n,r){return this.world.addCollider(t,e,i,n,r)},overlap:function(t,e,i,n,r){return this.world.addOverlap(t,e,i,n,r)},existing:function(t,e){var i=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,r){var s=new n(this.scene,t,e,i,r);return this.sys.displayList.add(s),this.world.enableBody(s,o.STATIC_BODY),s},image:function(t,e,i,r){var s=new n(this.scene,t,e,i,r);return this.sys.displayList.add(s),this.world.enableBody(s,o.DYNAMIC_BODY),s},staticSprite:function(t,e,i,n){var s=new r(this.scene,t,e,i,n);return this.sys.displayList.add(s),this.sys.updateList.add(s),this.world.enableBody(s,o.STATIC_BODY),s},sprite:function(t,e,i,n){var s=new r(this.scene,t,e,i,n);return this.sys.displayList.add(s),this.sys.updateList.add(s),this.world.enableBody(s,o.DYNAMIC_BODY),s},staticGroup:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new a(this.world,this.world.scene,t,e))},destroy:function(){this.world=null,this.scene=null,this.sys=null}});t.exports=u},function(t,e,i){ 2222/** 2223 * @author Richard Davey <[email protected]> 2224 * @copyright 2020 Photon Storm Ltd. 2225 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2226 */ 2227var n=i(0),r=i(240),s=i(124),o=new n({Extends:s,Mixins:[r.Acceleration,r.Angular,r.Bounce,r.Debug,r.Drag,r.Enable,r.Friction,r.Gravity,r.Immovable,r.Mass,r.Pushable,r.Size,r.Velocity],initialize:function(t,e,i,n,r){s.call(this,t,e,i,n,r),this.body=null}});t.exports=o},function(t,e,i){var n=i(241),r=i(62),s=i(228),o=i(150);t.exports=function(t,e,i,a,h,u){var l=n(t,e-a,i-a,2*a,2*a,h,u);if(0===l.length)return l;for(var c=new r(e,i,a),f=new r,d=[],p=0;p<l.length;p++){var v=l[p];v.isCircle?(f.setTo(v.center.x,v.center.y,v.halfWidth),s(c,f)&&d.push(v)):o(c,v)&&d.push(v)}return d}},function(t,e,i){ 2228/** 2229 * @author Richard Davey <[email protected]> 2230 * @copyright 2020 Photon Storm Ltd. 2231 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2232 */ 2233var n=i(155),r=i(0),s=i(60),o=i(2),a=i(110),h=i(7),u=new r({Extends:a,initialize:function(t,e,i,r){if(i||r)if(h(i))r=i,i=null,r.internalCreateCallback=this.createCallbackHandler,r.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(i)&&h(i[0])){r=i[0];var u=this;i.forEach((function(t){t.internalCreateCallback=u.createCallbackHandler,t.internalRemoveCallback=u.removeCallbackHandler})),i=null}else r={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else r={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=t,r.classType=o(r,"classType",n),this.physicsType=s.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(r,"collideWorldBounds",!1),setBoundsRectangle:o(r,"customBoundsRectangle",null),setAccelerationX:o(r,"accelerationX",0),setAccelerationY:o(r,"accelerationY",0),setAllowDrag:o(r,"allowDrag",!0),setAllowGravity:o(r,"allowGravity",!0),setAllowRotation:o(r,"allowRotation",!0),setBounceX:o(r,"bounceX",0),setBounceY:o(r,"bounceY",0),setDragX:o(r,"dragX",0),setDragY:o(r,"dragY",0),setEnable:o(r,"enable",!0),setGravityX:o(r,"gravityX",0),setGravityY:o(r,"gravityY",0),setFrictionX:o(r,"frictionX",0),setFrictionY:o(r,"frictionY",0),setMaxVelocityX:o(r,"maxVelocityX",1e4),setMaxVelocityY:o(r,"maxVelocityY",1e4),setVelocityX:o(r,"velocityX",0),setVelocityY:o(r,"velocityY",0),setAngularVelocity:o(r,"angularVelocity",0),setAngularAcceleration:o(r,"angularAcceleration",0),setAngularDrag:o(r,"angularDrag",0),setMass:o(r,"mass",1),setImmovable:o(r,"immovable",!1)},a.call(this,e,i,r),this.type="PhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,s.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var n=this.getChildren(),r=0;r<n.length;r++)n[r].body.velocity.set(t+r*i,e+r*i);return this},setVelocityX:function(t,e){void 0===e&&(e=0);for(var i=this.getChildren(),n=0;n<i.length;n++)i[n].body.velocity.x=t+n*e;return this},setVelocityY:function(t,e){void 0===e&&(e=0);for(var i=this.getChildren(),n=0;n<i.length;n++)i[n].body.velocity.y=t+n*e;return this}});t.exports=u},function(t,e,i){ 2234/** 2235 * @author Richard Davey <[email protected]> 2236 * @copyright 2020 Photon Storm Ltd. 2237 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2238 */ 2239var n=i(155),r=i(0),s=i(60),o=i(2),a=i(110),h=i(7),u=new r({Extends:a,initialize:function(t,e,i,r){i||r?h(i)?(r=i,i=null,r.internalCreateCallback=this.createCallbackHandler,r.internalRemoveCallback=this.removeCallbackHandler,r.createMultipleCallback=this.createMultipleCallbackHandler,r.classType=o(r,"classType",n)):Array.isArray(i)&&h(i[0])?(r=i,i=null,r.forEach((function(t){t.internalCreateCallback=this.createCallbackHandler,t.internalRemoveCallback=this.removeCallbackHandler,t.createMultipleCallback=this.createMultipleCallbackHandler,t.classType=o(t,"classType",n)}))):r={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler}:r={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:n},this.world=t,this.physicsType=s.STATIC_BODY,a.call(this,e,i,r),this.type="StaticPhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,s.STATIC_BODY)},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var t=this.children.entries,e=0;e<t.length;e++)t[e].body.reset();return this}});t.exports=u}
vendor: 4,283 bytes, lines 2239-2245
2239,function(t,e,i){ 2240/** 2241 * @author Richard Davey <[email protected]> 2242 * @copyright 2020 Photon Storm Ltd. 2243 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2244 */ 2245var n=i(344),r=i(521),s=i(18),o=i(0),a=i(522),h=i(60),u=i(48),l=i(9),c=i(242),f=i(123),d=i(348),p=i(349),v=i(243),g=i(244),m=i(523),y=i(6),x=i(14),w=i(208),_=i(524),b=i(10),T=i(525),E=i(526),S=i(531),A=i(532),C=i(148),O=i(533),R=i(245),M=i(25),P=i(3),I=i(66),k=new o({Extends:l,initialize:function(t,e){l.call(this),this.scene=t,this.bodies=new C,this.staticBodies=new C,this.pendingDestroy=new C,this.colliders=new w,this.gravity=new P(y(e,"gravity.x",0),y(e,"gravity.y",0)),this.bounds=new b(y(e,"x",0),y(e,"y",0),y(e,"width",t.sys.scale.width),y(e,"height",t.sys.scale.height)),this.checkCollision={up:y(e,"checkCollision.up",!0),down:y(e,"checkCollision.down",!0),left:y(e,"checkCollision.left",!0),right:y(e,"checkCollision.right",!0)},this.fps=y(e,"fps",60),this.fixedStep=y(e,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=y(e,"timeScale",1),this.OVERLAP_BIAS=y(e,"overlapBias",4),this.TILE_BIAS=y(e,"tileBias",16),this.forceX=y(e,"forceX",!1),this.isPaused=y(e,"isPaused",!1),this._total=0,this.drawDebug=y(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:y(e,"debugShowBody",!0),debugShowStaticBody:y(e,"debugShowStaticBody",!0),debugShowVelocity:y(e,"debugShowVelocity",!0),bodyDebugColor:y(e,"debugBodyColor",16711935),staticBodyDebugColor:y(e,"debugStaticBodyColor",255),velocityDebugColor:y(e,"debugVelocityColor",65280)},this.maxEntries=y(e,"maxEntries",16),this.useTree=y(e,"useTree",!0),this.tree=new T(this.maxEntries),this.staticTree=new T(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new M,this._tempMatrix2=new M,this.drawDebug&&this.createDebugGraphic()},enable:function(t,e){void 0===e&&(e=h.DYNAMIC_BODY),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i];if(n.isParent)for(var r=n.getChildren(),s=0;s<r.length;s++){var o=r[s];o.isParent?this.enable(o,e):this.enableBody(o,e)}else this.enableBody(n,e)}},enableBody:function(t,e){return void 0===e&&(e=h.DYNAMIC_BODY),t.body||(e===h.DYNAMIC_BODY?t.body=new r(this,t):e===h.STATIC_BODY&&(t.body=new O(this,t))),this.add(t.body),t},add:function(t){return t.physicsType===h.DYNAMIC_BODY?this.bodies.set(t):t.physicsType===h.STATIC_BODY&&(this.staticBodies.set(t),this.staticTree.insert(t)),t.enable=!0,t},disable:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];if(i.isParent)for(var n=i.getChildren(),r=0;r<n.length;r++){var s=n[r];s.isParent?this.disable(s):this.disableBody(s.body)}else this.disableBody(i.body)}},disableBody:function(t){this.remove(t),t.enable=!1},remove:function(t){t.physicsType===h.DYNAMIC_BODY?(this.tree.remove(t),this.bodies.delete(t)):t.physicsType===h.STATIC_BODY&&(this.staticBodies.delete(t),this.staticTree.remove(t))},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},setBounds:function(t,e,i,n,r,s,o,a){return this.bounds.setTo(t,e,i,n),void 0!==r&&this.setBoundsCollision(r,s,o,a),this},setBoundsCollision:function(t,e,i,n){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===n&&(n=!0),this.checkCollision.left=t,this.checkCollision.right=e,this.checkCollision.up=i,this.checkCollision.down=n,this},pause:function(){return this.isPaused=!0,this.emit(c.PAUSE),this},resume:function(){return this.isPaused=!1,this.emit(c.RESUME),this},addCollider:function(t,e,i,n,r){void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=i);var s=new a(this,!1,t,e,i,n,r);return this.colliders.add(s),s},addOverlap:function(t,e,i,n,r){void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=i);var s=new a(this,!0,t,e,i,n,r);return this.colliders.add(s),s},removeCollider:function(t){return this.colliders.remove(t),this},setFPS:function(t){return this.fps=t,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this},update:function(t,e){if(!this.isPaused&&0!==this.bodies.size){var i,n,r=this._frameTime,s=this._frameTimeMS*this.timeScale;this._elapsed+=e;
2245var o=this.bodies.entries,a=this._elapsed>=s;for(this.fixedStep||(r=.001*e,a=!0,this._elapsed=0),i=0;i<o.length;i++)(n=o[i]).enable&&n.preUpdate(a,r);if(a){this._elapsed-=s,this.stepsLastFrame=1,this.useTree&&(this.tree.clear(),this.tree.load(o));var h=this.colliders.update();for(i=0;i<h.length;i++){var u=h[i];u.active&&u.update()}this.emit(c.WORLD_STEP,r)}for(;this._elapsed>=s;)this._elapsed-=s,this.step(r)}},step:function(t){var e,i,n=this.bodies.entries,r=n.length;for(e=0;e<r;e++)(i=n[e]).enable&&i.update(t);this.useTree&&(this.tree.clear(),this.tree.load(n));var s=this.colliders.update();for(e=0;e<s.length;e++){var o=s[e];o.active&&o.update()}this.emit(c.WORLD_STEP,t),this.stepsLastFrame++},postUpdate:function(){var t,e,i=this.bodies.entries,n=i.length,r=this.bodies,s=this.staticBodies;if(this.stepsLastFrame)for(this.stepsLastFrame=0,t=0;t<n;t++)(e=i[t]).enable&&e.postUpdate();if(this.drawDebug){var o=this.debugGraphic;for(o.clear(),t=0;t<n;t++)(e=i[t]).willDrawDebug()&&e.drawDebug(o);for(n=(i=s.entries).length,t=0;t<n;t++)(e=i[t]).willDrawDebug()&&e.drawDebug(o)}var a=this.pendingDestroy;if(a.size>0){var u=this.tree,l=this.staticTree;for(n=(i=a.entries).length,t=0;t<n;t++)(e=i[t]).physicsType===h.DYNAMIC_BODY?(u.remove(e),r.delete(e)):e.physicsType===h.STATIC_BODY&&(l.remove(e),s.delete(e)),e.world=void 0,e.gameObject=void 0;a.clear()}},updateMotion:function(t,e){t.allowRotation&&this.computeAngularVelocity(t,e),this.computeVelocity(t,e)},computeAngularVelocity:function(t,e){var i=t.angularVelocity,n=t.angularAcceleration,r=t.angularDrag,o=t.maxAngular;n?i+=n*e:t.allowDrag&&r&&(d(i-(r*=e),0,.1)?i-=r:p(i+r,0,.1)?i+=r:i=0);var a=(i=s(i,-o,o))-t.angularVelocity;t.angularVelocity+=a,t.rotation+=t.angularVelocity*e},computeVelocity:function(t,e){var i=t.velocity.x,n=t.acceleration.x,r=t.drag.x,o=t.maxVelocity.x,a=t.velocity.y,h=t.acceleration.y,u=t.drag.y,l=t.maxVelocity.y,c=t.speed,v=t.maxSpeed,g=t.allowDrag,m=t.useDamping;t.allowGravity&&(i+=(this.gravity.x+t.gravity.x)*e,a+=(this.gravity.y+t.gravity.y)*e),n?i+=n*e:g&&r&&(m?(i*=r=Math.pow(r,e),c=Math.sqrt(i*i+a*a),f(c,0,.001)&&(i=0)):d(i-(r*=e),0,.01)?i-=r:p(i+r,0,.01)?i+=r:i=0),h?a+=h*e:g&&u&&(m?(a*=u=Math.pow(u,e),c=Math.sqrt(i*i+a*a),f(c,0,.001)&&(a=0)):d(a-(u*=e),0,.01)?a-=u:p(a+u,0,.01)?a+=u:a=0),i=s(i,-o,o),a=s(a,-l,l),t.velocity.set(i,a),v>-1&&c>v&&(t.velocity.normalize().scale(v),c=v),t.speed=c},separate:function(t,e,i,n,r,s){if(!s&&!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,r);if(t.isCircle!==e.isCircle){var o=t.isCircle?e:t,a=t.isCircle?t:e,h={x:o.x,y:o.y,right:o.right,bottom:o.bottom},u=a.center;if((u.y<h.y||u.y>h.bottom)&&(u.x<h.x||u.x>h.right))return this.separateCircle(t,e,r)}var l=!1,f=!1;r?(l=S(t,e,r,this.OVERLAP_BIAS),f=A(t,e,r,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)<Math.abs(this.gravity.x+t.gravity.x)?(l=S(t,e,r,this.OVERLAP_BIAS),this.intersects(t,e)&&(f=A(t,e,r,this.OVERLAP_BIAS))):(f=A(t,e,r,this.OVERLAP_BIAS),this.intersects(t,e)&&(l=S(t,e,r,this.OVERLAP_BIAS)));var d=l||f;return d&&(r?(t.onOverlap||e.onOverlap)&&this.emit(c.OVERLAP,t.gameObject,e.gameObject,t,e):(t.onCollide||e.onCollide)&&this.emit(c.COLLIDE,t.gameObject,e.gameObject,t,e)),d},separateCircle:function(t,e,i,r){v(t,e,!1,r),g(t,e,!1,r);var s=0;if(t.isCircle!==e.isCircle){var o={x:e.isCircle?t.position.x:e.position.x,y:e.isCircle?t.position.y:e.position.y,right:e.isCircle?t.right:e.right,bottom:e.isCircle?t.bottom:e.bottom},a={x:t.isCircle?t.center.x:e.center.x,y:t.isCircle?t.center.y:e.center.y,radius:t.isCircle?t.halfWidth:e.halfWidth};a.y<o.y?a.x<o.x?s=u(a.x,a.y,o.x,o.y)-a.radius:a.x>o.right&&(s=u(a.x,a.y,o.right,o.y)-a.radius):a.y>o.bottom&&(a.x<o.x?s=u(a.x,a.y,o.x,o.bottom)-a.radius:a.x>o.right&&(s=u(a.x,a.y,o.right,o.bottom)-a.radius)),s*=-1}else s=t.halfWidth+e.halfWidth-u(t.center.x,t.center.y,e.center.x,e.center.y);if(t.overlapR=s,e.overlapR=s,i||0===s||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==s&&(t.onOverlap||e.onOverlap)&&this.emit
2245(c.OVERLAP,t.gameObject,e.gameObject,t,e),0!==s;var h=t.center.x-e.center.x,l=t.center.y-e.center.y,f=Math.sqrt(Math.pow(h,2)+Math.pow(l,2)),d=(e.center.x-t.center.x)/f||0,p=(e.center.y-t.center.y)/f||0,m=2*(t.velocity.x*d+t.velocity.y*p-e.velocity.x*d-e.velocity.y*p)/(t.mass+e.mass);(t.immovable||e.immovable)&&(m*=2),t.immovable||(t.velocity.x=t.velocity.x-m/t.mass*d,t.velocity.y=t.velocity.y-m/t.mass*p),e.immovable||(e.velocity.x=e.velocity.x+m/e.mass*d,e.velocity.y=e.velocity.y+m/e.mass*p),t.immovable||e.immovable||(s/=2);var y=n(t.center,e.center),w=(s+x.EPSILON)*Math.cos(y),_=(s+x.EPSILON)*Math.sin(y);return t.immovable||(t.x-=w,t.y-=_,t.updateCenter()),e.immovable||(e.x+=w,e.y+=_,e.updateCenter()),t.velocity.x*=t.bounce.x,t.velocity.y*=t.bounce.y,e.velocity.x*=e.bounce.x,e.velocity.y*=e.bounce.y,(t.onCollide||e.onCollide)&&this.emit(c.COLLIDE,t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?u(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.position.x||t.bottom<=e.position.y||t.position.x>=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,r){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=i),this.collideObjects(t,e,i,n,r,!0)},collide:function(t,e,i,n,r){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=i),this.collideObjects(t,e,i,n,r,!1)},collideObjects:function(t,e,i,n,r,s){var o,a;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),u=Array.isArray(e);if(this._total=0,h||u)if(!h&&u)for(o=0;o<e.length;o++)this.collideHandler(t,e[o],i,n,r,s);else if(h&&!u)if(e)for(o=0;o<t.length;o++)this.collideHandler(t[o],e,i,n,r,s);else for(o=0;o<t.length;o++){var l=t[o];for(a=o+1;a<t.length;a++)o!==a&&this.collideHandler(l,t[a],i,n,r,s)}else for(o=0;o<t.length;o++)for(a=0;a<e.length;a++)this.collideHandler(t[o],e[a],i,n,r,s);else this.collideHandler(t,e,i,n,r,s);return this._total>0},collideHandler:function(t,e,i,n,r,s){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,n,r,s);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,r,s);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,r,s);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,r,s)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,r,s);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,r,s);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,r,s)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,r,s);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,r,s)}},collideSpriteVsSprite:function(t,e,i,n,r,s){return!(!t.body||!e.body||(this.separate(t.body,e.body,n,r,s)&&(i&&i.call(r,t,e),this._total++),0))},collideSpriteVsGroup:function(t,e,i,n,r,s){var o,a,u,l=t.body;if(0!==e.length&&l&&l.enable&&!l.checkCollision.none)if(this.useTree||e.physicsType===h.STATIC_BODY){var c=this.treeMinMax;c.minX=l.left,c.minY=l.top,c.maxX=l.right,c.maxY=l.bottom;var f=e.physicsType===h.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(a=f.length,o=0;o<a;o++)l!==(u=f[o])&&u.enable&&!u.checkCollision.none&&e.contains(u.gameObject)&&this.separate(l,u,n,r,s,!0)&&(i&&i.call(r,l.gameObject,u.gameObject),this._total++)}else{var d=e.getChildren(),p=e.children.entries.indexOf(t);for(a=d.length,o=0;o<a;o++)(u=d[o].body)&&o!==p&&u.enable&&this.separate(l,u,n,r,s)&&(i&&i.call(r,l.gameObject,u.gameObject),this._total++)}},collideGroupVsTilemapLayer:function(t,e,i,n,r,s){var o=t.getChildren();if(0===o.length)return!1;for(var a=!1,h=0;h<o.length;h++)o[h].body&&this.collideSpriteVsTilemapLayer(o[h],e,i,n,r,s)&&(a=!0);return a},collideTiles:function(t,e,i,n,r){return!(!t.body.enable||0===e.length)&&this.collideSpriteVsTilesHandler(t,e,i,n,r,!1,!1)}
2245,overlapTiles:function(t,e,i,n,r){return!(!t.body.enable||0===e.length)&&this.collideSpriteVsTilesHandler(t,e,i,n,r,!0,!1)},collideSpriteVsTilemapLayer:function(t,e,i,n,r,s){var o=t.body;if(!o.enable||o.checkCollision.none)return!1;var a=o.position.x,h=o.position.y,u=o.width,l=o.height,c=e.layer;if(c.tileWidth>c.baseTileWidth){var f=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=f,u+=f}c.tileHeight>c.baseTileHeight&&(l+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var d=m(a,h,u,l,null,e.scene.cameras.main,e.layer);return 0!==d.length&&this.collideSpriteVsTilesHandler(t,d,i,n,r,s,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,r,s,o){for(var a,h,u=t.body,l={left:0,right:0,top:0,bottom:0},f=!1,d=0;d<e.length;d++){var p=(h=(a=e[d]).tilemapLayer).tileToWorldXY(a.x,a.y);l.left=p.x,l.top=p.y,a.baseHeight!==a.height&&(l.top-=(a.height-a.baseHeight)*h.scaleY),l.right=l.left+a.width*h.scaleX,l.bottom=l.top+a.height*h.scaleY,R(l,u)&&(!n||n.call(r,t,a))&&_(a,t)&&(s||E(d,u,a,l,h,this.TILE_BIAS,o))&&(this._total++,f=!0,i&&i.call(r,t,a),s&&u.onOverlap?this.emit(c.TILE_OVERLAP,t,a,u):u.onCollide&&this.emit(c.TILE_COLLIDE,t,a,u))}return f},collideGroupVsGroup:function(t,e,i,n,r,s){if(0!==t.length&&0!==e.length)for(var o=t.getChildren(),a=0;a<o.length;a++)this.collideSpriteVsGroup(o[a],e,i,n,r,s)},wrap:function(t,e){t.body?this.wrapObject(t,e):t.getChildren?this.wrapArray(t.getChildren(),e):Array.isArray(t)?this.wrapArray(t,e):this.wrapObject(t,e)},wrapArray:function(t,e){for(var i=0;i<t.length;i++)this.wrapObject(t[i],e)},wrapObject:function(t,e){void 0===e&&(e=0),t.x=I(t.x,this.bounds.left-e,this.bounds.right+e),t.y=I(t.y,this.bounds.top-e,this.bounds.bottom+e)},shutdown:function(){this.tree.clear(),this.staticTree.clear(),this.bodies.clear(),this.staticBodies.clear(),this.colliders.destroy(),this.removeAllListeners()},destroy:function(){this.shutdown(),this.scene=null}});t.exports=k},function(t,e,i){ 2246/** 2247 * @author Richard Davey <[email protected]> 2248 * @author Benjamin D. Richards <[email protected]> 2249 * @copyright 2020 Photon Storm Ltd. 2250 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2251 */ 2252var n=i(0),r=i(60),s=i(242),o=i(193),a=i(10),h=i(56),u=i(3),l=new n({initialize:function(t,e){var i=e.displayWidth?e.displayWidth:64,n=e.displayHeight?e.displayHeight:64;this.world=t,this.gameObject=e,this.transform={x:e.x,y:e.y,rotation:e.angle,scaleX:e.scaleX,scaleY:e.scaleY,displayOriginX:e.displayOriginX,displayOriginY:e.displayOriginY},this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new u,this.position=new u(e.x-e.scaleX*e.displayOriginX,e.y-e.scaleY*e.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=e.angle,this.preRotation=e.angle,this.width=i,this.height=n,this.sourceWidth=i,this.sourceHeight=n,e.frame&&(this.sourceWidth=e.frame.realWidth,this.sourceHeight=e.frame.realHeight),this.halfWidth=Math.abs(i/2),this.halfHeight=Math.abs(n/2),this.center=new u(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new u,this.newVelocity=new u,this.deltaMax=new u,this.acceleration=new u,this.allowDrag=!0,this.drag=new u,this.allowGravity=!0,this.gravity=new u,this.bounce=new u,this.worldBounce=null,this.customBoundsRectangle=t.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new u(1e4,1e4),this.maxSpeed=-1,this.friction=new u(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=r.FACING_NONE,this.immovable=!1,this.pushable=!0,this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.syncBounds=!1,this.physicsType=r.DYNAMIC_BODY,this._sx=e.scaleX,this._sy=e.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new a},updateBounds:function(){var t=this.gameObject,e=this.transform;if(t.parentContainer){var i=t.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);e.x=i.tx,e.y=i.ty,e.rotation=o(i.rotation),e.scaleX=i.scaleX,e.scaleY=i.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY}else e.x=t.x,e.y=t.y,e.rotation=t.angle,e.scaleX=t.scaleX,e.scaleY=t.
2252scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY;var n=!1;if(this.syncBounds){var r=t.getBounds(this._bounds);this.width=r.width,this.height=r.height,n=!0}else{var s=Math.abs(e.scaleX),a=Math.abs(e.scaleY);this._sx===s&&this._sy===a||(this.width=this.sourceWidth*s,this.height=this.sourceHeight*a,this._sx=s,this._sy=a,n=!0)}n&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var t=this.transform;this.position.x=t.x+t.scaleX*(this.offset.x-t.displayOriginX),this.position.y=t.y+t.scaleY*(this.offset.y-t.displayOriginY),this.updateCenter()},resetFlags:function(t){void 0===t&&(t=!1);var e=this.wasTouching,i=this.touching,n=this.blocked;t?(e.none=!0,e.up=!1,e.down=!1,e.left=!1,e.right=!1):(e.none=i.none,e.up=i.up,e.down=i.down,e.left=i.left,e.right=i.right),i.none=!0,i.up=!1,i.down=!1,i.left=!1,i.right=!1,n.none=!0,n.up=!1,n.down=!1,n.left=!1,n.right=!1,this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(t,e){t&&this.resetFlags(),this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves&&(this.prev.x=this.position.x,this.prev.y=this.position.y,this.prevFrame.x=this.position.x,this.prevFrame.y=this.position.y),t&&this.update(e)},update:function(t){if(this.prev.x=this.position.x,this.prev.y=this.position.y,this.moves){this.world.updateMotion(this,t);var e=this.velocity.x,i=this.velocity.y;this.newVelocity.set(e*t,i*t),this.position.add(this.newVelocity),this.updateCenter(),this.angle=Math.atan2(i,e),this.speed=Math.sqrt(e*e+i*i),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.world.emit(s.WORLD_BOUNDS,this,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)}this._dx=this.position.x-this.prev.x,this._dy=this.position.y-this.prev.y},postUpdate:function(){var t=this.position.x-this.prevFrame.x,e=this.position.y-this.prevFrame.y;if(this.moves){var i=this.deltaMax.x,n=this.deltaMax.y;0!==i&&0!==t&&(t<0&&t<-i?t=-i:t>0&&t>i&&(t=i)),0!==n&&0!==e&&(e<0&&e<-n?e=-n:e>0&&e>n&&(e=n)),this.gameObject.x+=t,this.gameObject.y+=e}t<0?this.facing=r.FACING_LEFT:t>0&&(this.facing=r.FACING_RIGHT),e<0?this.facing=r.FACING_UP:e>0&&(this.facing=r.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this._tx=t,this._ty=e},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.customBoundsRectangle,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,r=this.worldBounce?-this.worldBounce.y:-this.bounce.y,s=!1;return t.x<e.x&&i.left?(t.x=e.x,this.velocity.x*=n,this.blocked.left=!0,s=!0):this.right>e.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,s=!0),t.y<e.y&&i.up?(t.y=e.y,this.velocity.y*=r,this.blocked.up=!0,s=!0):this.bottom>e.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=r,this.blocked.down=!0,s=!0),s&&(this.blocked.none=!1,this.updateCenter()),s},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&n.getCenter){var r=(n.width-t)/2,s=(n.height-e)/2;this.offset.set(r,s)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft?i.getTopLeft(this.position):this.position.set(t,e),this.prev.copy(this.position),this.prevFrame.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>
vendor: 20,142 bytes, lines 2252-2313
22520?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t,e,i,n){void 0===t&&(t=!0),this.collideWorldBounds=t;var r=void 0!==e,s=void 0!==i;return(r||s)&&(this.worldBounce||(this.worldBounce=new u),r&&(this.worldBounce.x=e),s&&(this.worldBounce.y=i)),void 0!==n&&(this.onWorldBounds=n),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){this.velocity.x=t;var e=t,i=this.velocity.y;return this.speed=Math.sqrt(e*e+i*i),this},setVelocityY:function(t){this.velocity.y=t;var e=this.velocity.x,i=t;return this.speed=Math.sqrt(e*e+i*i),this},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxVelocityX:function(t){return this.maxVelocity.x=t,this},setMaxVelocityY:function(t){return this.maxVelocity.y=t,this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDamping:function(t){return this.useDamping=t,this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},processX:function(t,e,i,n){this.x+=t,this.updateCenter(),null!==e&&(this.velocity.x=e);var r=this.blocked;i&&(r.left=!0),n&&(r.right=!0)},processY:function(t,e,i,n){this.y+=t,this.updateCenter(),null!==e&&(this.velocity.y=e);var r=this.blocked;i&&(r.up=!0),n&&(r.down=!0)},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=l},function(t,e,i){ 2253/** 2254 * @author Richard Davey <[email protected]> 2255 * @copyright 2020 Photon Storm Ltd. 2256 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2257 */ 2258var n=new(i(0))({initialize:function(t,e,i,n,r,s,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=r,this.processCallback=s,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e,i){ 2259/** 2260 * @author Richard Davey <[email protected]> 2261 * @copyright 2020 Photon Storm Ltd. 2262 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2263 */ 2264var n=i(26),r=i(3),s=new r,o=new r;t.exports=function(t,e,i,r,a,h,u){var l=u.tilemapLayer.tilemap._convert.WorldToTileXY;l(t,e,!0,s,h,u);var c=s.x,f=s.y;l(t+i,e+r,!1,o,h,u);var d=Math.ceil(o.x),p=Math.ceil(o.y);return n(c,f,d-c,p-f,a,u)}},function(t,e){t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},function(t,e,i){ 2265/** 2266 * @author Vladimir Agafonkin 2267 * @author Richard Davey <[email protected]> 2268 * @copyright 2020 Photon Storm Ltd. 2269 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2270 */ 2271var n=i(430);function r(t){if(!(this instanceof r))return new r(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function s(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function o(t,e){a(t,0,t.children.length,e,t)}function a(t,e,i,n,r){r||(r=v(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var s,o=e;o<i;o++)s=t.children[o],h(r,t.leaf?n(s):s);return r}function h(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function u(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function p(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function v(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,e,i,r,s){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=r||(o=e+Math.ceil((i-e)/r/2)*r,n(t,o,e,i,s),a.push(e,o,o,i))}r.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var r,s,o,a,h=[];e;){for(r=0,s=e.children.length;r<s;r++)o=e.children[r],p(t,a=e.leaf?n(o):o)&&(e.leaf?i.push(o):d(t,a)?this._all(o,i):h.push(o));e=h.pop()}return i},collides:function(t){var e=this.data,i=this.toBBox;if(!p(t,e))return!1;for(var n,r,s,o,a=[];e;){for(n=0,r=e.children.length;n<r;n++)if(s=e.children[n],p(t,o=e.leaf?i(s):s)){if(e.leaf||d(t,o))return!0;a.push(s)}e=a.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,i=t.length;e<i;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=v([]),this},remove:function(t,e){if(!t)return this;for(var i,n,r,o,a=this.data,h=this.toBBox(t),u=[],l=[];a||u.length;){if(a||(a=u.pop(),n=u[u.length-1],i=l.pop(),o=!0),a.leaf&&-1!==(r=s(t,a.children,e)))return a.children.splice(r,1),u.push(a),this._condense(u),this;o||a.leaf||!d(a,h)?n?(i++,a=n.children[i],o=!1):a=null:(u.push(a),l.push(i),i=0,n=a,a=a.children[0])}return this},toBBox:function(t){return t},compareMinX:u,compareMinY:l,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},_build:function(t,e,i,n){var r,s=i-e+1,a=this._maxEntries;if(s<=a)return o(r=v(t.slice(e,i+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,n-1))),(r=v([])).leaf=!1,r.height=n;var h,u,l,c,f=Math.ceil(s/a),d=f*Math.ceil(Math.sqrt(a));for(g(t,e,i,d,this.compareMinX),h=e;h<=i;h+=d)for(g(t,h,l=Math.min(h+d-1,i),f,this.compareMinY),u=h;u<=l;u+=f)c=Math.min(u+f-1,l),r.children.push(this._build(t,u,c,n-1));return o(r,this.toBBox),r},_chooseSubtree:function(t,e,i,n){for(var r,s,o,a,h,u,l,f,d,p;n.push(e),!e.leaf&&n.length-1!==i;){for(l=f=1/0,r=0,s=e.children.length;r<s;r++)h=c(o=e.children[r]),d=t,p=o,(u=(Math.max(p.maxX,d.maxX)-Math.min(p.minX,d.minX))*(Math.max(p.maxY,d.maxY)-Math.min(p.minY,d.minY))-h)<f?(f=u,l=h<l?h:l,a=o):u===f&&h<l&&(l=h,a=o);e=a||e.children[0]}return e},_insert:function(t,e,i){var n=this.toBBox,r=i?t:n(t),s=[],o=this._chooseSubtree(r,this.data,e,s);for(o.children.push(t),h(o,r);e>=0&&s[e].children.length>this._maxEntries;)this._split(s,e),e--;this._adjustParentBBoxes(r,s,e)},_split:function(t,e){var i=t[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var s=this._chooseSplitIndex(i,r,n),a=v(i.children.splice(s,i.children.length-s));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=v([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,r,s,o,h,u,l,f,d,p,v,g,m,y;for(u=l=1/0,n=e;n<=i-e;n++)r=a(t,0,n,this.toBBox),s=a(t,n,i,this.toBBox),d=r,p=s,v=void 0,g=void 0,m=void 0,y=void 0,v=Math.max(d.minX,p.minX),g=Math.max(d.minY,p.minY),m=Math.min(d.maxX,p.maxX),y=Math.min(d.maxY,p.maxY),o=Math.max(0,m-v)*Math.max(0,y-g),h=c(r)+c(s),o<u?(u=o,f=n,l=h<l?h:l):o===u&&h<l&&(l=h,f=n);return f},_chooseSplitAxis:function(t,e,i){var n=t.leaf?this.compareMinX:u,r=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,r)&&t.children.sort(n)},_allDistMargin:function(t,e,i,n){t.children.sort(n);var r,s,o=this.toBBox,u=a(t,0,e,o),l=a(t,i-e,i,o),c=f(u)+f(l);for(r=e;r<i-e;r++)s=t.children[r],h(u,t.leaf?o(s):s),c+=f(u);for(r=i-e-1;r>=e;r--)s=t.children[r],h(l,t.leaf?o(s):s),c+=f(l);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=r},function(t,e,i){ 2272/** 2273 * @author Richard Davey <[email protected]> 2274 * @copyright 2020 Photon Storm Ltd. 2275 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2276 */ 2277var n=i(527),r=i(529),s=i(245);t.exports=function(t,e,i,o,a,h,u){var l=o.left,c=o.top,f=o.right,d=o.bottom,p=i.faceLeft||i.faceRight,v=i.faceTop||i.faceBottom;if(u||(p=!0,v=!0),!p&&!v)return!1;var g=0,m=0,y=0,x=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX()<e.deltaAbsY()&&(x=-1),0!==e.deltaX()&&0!==e.deltaY()&&p&&v&&(y=Math.min(Math.abs(e.position.x-f),Math.abs(e.right-l)),x=Math.min(Math.abs(e.position.y-d),Math.abs(e.bottom-c))),y<x){if(p&&0!==(g=n(e,i,l,f,h,u))&&!s(o,e))return!0;v&&(m=r(e,i,c,d,h,u))}else{if(v&&0!==(m=r(e,i,c,d,h,u))&&!s(o,e))return!0;p&&(g=n(e,i,l,f,h,u))}return 0!==g||0!==m}},function(t,e,i){ 2278/** 2279 * @author Richard Davey <[email protected]> 2280 * @copyright 2020 Photon Storm Ltd. 2281 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2282 */ 2283var n=i(528);t.exports=function(t,e,i,r,s,o){var a=0,h=e.faceLeft,u=e.faceRight,l=e.collideLeft,c=e.collideRight;return o||(h=!0,u=!0,l=!0,c=!0),t.deltaX()<0&&c&&t.checkCollision.left?u&&t.x<r&&(a=t.x-r)<-s&&(a=0):t.deltaX()>0&&l&&t.checkCollision.right&&h&&t.right>i&&(a=t.right-i)>s&&(a=0),0!==a&&(t.customSeparateX?t.overlapX=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){ 2284/** 2285 * @author Richard Davey <[email protected]> 2286 * @copyright 2020 Photon Storm Ltd. 2287 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2288 */ 2289var n=i(530);t.exports=function(t,e,i,r,s,o){var a=0,h=e.faceTop,u=e.faceBottom,l=e.collideUp,c=e.collideDown;return o||(h=!0,u=!0,l=!0,c=!0),t.deltaY()<0&&c&&t.checkCollision.up?u&&t.y<r&&(a=t.y-r)<-s&&(a=0):t.deltaY()>0&&l&&t.checkCollision.down&&h&&t.bottom>i&&(a=t.bottom-i)>s&&(a=0),0!==a&&(t.customSeparateY?t.overlapY=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){ 2290/** 2291 * @author Richard Davey <[email protected]> 2292 * @copyright 2020 Photon Storm Ltd. 2293 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2294 */ 2295var n=i(243),r=i(1383);t.exports=function(t,e,i,s){var o=n(t,e,i,s),a=t.immovable,h=e.immovable;if(i||0===o||a&&h||t.customSeparateX||e.customSeparateX)return 0!==o||t.embedded&&e.embedded;var u=r.Set(t,e,o);return a||h?(a?r.RunImmovableBody1(u):h&&r.RunImmovableBody2(u),!0):u>0||r.Check()}},function(t,e,i){ 2296/** 2297 * @author Richard Davey <[email protected]> 2298 * @copyright 2020 Photon Storm Ltd. 2299 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2300 */ 2301var n=i(244),r=i(1384);t.exports=function(t,e,i,s){var o=n(t,e,i,s),a=t.immovable,h=e.immovable;if(i||0===o||a&&h||t.customSeparateY||e.customSeparateY)return 0!==o||t.embedded&&e.embedded;var u=r.Set(t,e,o);return a||h?(a?r.RunImmovableBody1(u):h&&r.RunImmovableBody2(u),!0):u>0||r.Check()}},function(t,e,i){ 2302/** 2303 * @author Richard Davey <[email protected]> 2304 * @copyright 2020 Photon Storm Ltd. 2305 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2306 */ 2307var n=i(63),r=i(0),s=i(60),o=i(56),a=i(3),h=new r({initialize:function(t,e){var i=e.displayWidth?e.displayWidth:64,n=e.displayHeight?e.displayHeight:64;this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-i*e.originX,e.y-n*e.originY),this.width=i,this.height=n,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=s.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&n.getCenter){var r=n.displayWidth/2,s=n.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(r-this.halfWidth,s-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},function(t,e,i){ 2308/** 2309 * @author Richard Davey <[email protected]> 2310 * @copyright 2020 Photon Storm Ltd. 2311 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2312 */ 2313t.exports={Bounce:i(1500),Collision:i(1501),Force:i(1502),Friction:i(1503),Gravity:i(1504),Mass:i(1505
2313),Sensor:i(1506),SetBody:i(1507),Sleep:i(1508),Static:i(1525),Transform:i(1526),Velocity:i(1527)}},function(t,e){var i={};t.exports=i,i.create=function(t,e){var n=t.bodyA,r=t.bodyB,s={id:i.id(n,r),bodyA:n,bodyB:r,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||r.isSensor,timeCreated:e,timeUpdated:e,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return i.update(s,t,e),s},i.update=function(t,e,n){if(t.collision=e,e.collided){var r=e.supports,s=t.activeContacts,o=e.parentA,a=e.parentB;t.inverseMass=o.inverseMass+a.inverseMass,t.friction=Math.min(o.friction,a.friction),t.frictionStatic=Math.max(o.frictionStatic,a.frictionStatic),t.restitution=Math.max(o.restitution,a.restitution),t.slop=Math.max(o.slop,a.slop);for(var h=0;h<r.length;h++)s[h]=r[h].contact;var u=r.length;u<s.length&&(s.length=u),t.separation=e.depth,i.setActive(t,!0,n)}else!0===t.isActive&&i.setActive(t,!1,n)},i.setActive=function(t,e,i){e?(t.isActive=!0,t.timeUpdated=i):(t.isActive=!1,t.activeContacts.length=0)},i.id=function(t,e){return t.id<e.id?"A"+t.id+"B"+e.id:"A"+e.id+"B"+t.id}},function(t,e,i){ 2314/** 2315 * @author Richard Davey <[email protected]> 2316 * @copyright 2020 Photon Storm Ltd. 2317 * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} 2318 */ 2319var n=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=n},function(t,e,i){ 2320/** 2321 * @author Richard Davey <[email protected]> 2322 * @copyright 2020 Photon Storm Ltd. 2323 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2324 */ 2325var n=new(i(3));t.exports=function(t,e,i,r){var s=i.tilemapLayer,o=s.cullPaddingX,a=s.cullPaddingY,h=s.tilemap.tileToWorldXY(t,e,n,r,s);return h.x>r.worldView.x+s.scaleX*i.tileWidth*(-o-.5)&&h.x<r.worldView.right+s.scaleX*i.tileWidth*(o-.5)&&h.y>r.worldView.y+s.scaleY*i.tileHeight*(-a-1)&&h.y<r.worldView.bottom+s.scaleY*i.tileHeight*(a-.5)}},function(t,e,i){ 2326/** 2327 * @author Richard Davey <[email protected]> 2328 * @copyright 2020 Photon Storm Ltd. 2329 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2330 */ 2331var n=i(26);t.exports=function(t,e,i,r,s,o,a){for(var h=n(i,r,s,o,null,a),u=0;u<h.length;u++)h[u]&&h[u].index===t&&(h[u].index=e)}},function(t,e,i){ 2332/** 2333 * @author Richard Davey <[email protected]> 2334 * @copyright 2020 Photon Storm Ltd. 2335 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2336 */ 2337var n=i(10),r=i(137),s=i(76),o=new n;t.exports=function(t,e){var i=t.tilemapLayer.tilemap,n=t.tilemapLayer,a=Math.floor(i.tileWidth*n.scaleX),h=Math.floor(i.tileHeight*n.scaleY),u=s(e.worldView.x-n.x,a,0,!0)-n.cullPaddingX,l=r(e.worldView.right-n.x,a,0,!0)+n.cullPaddingX,c=s(e.worldView.y-n.y,h,0,!0)-n.cullPaddingY,f=r(e.worldView.bottom-n.y,h,0,!0)+n.cullPaddingY;return o.setTo(u,c,l-u,f-c)}},function(t,e,i){ 2338/** 2339 * @author Richard Davey <[email protected]> 2340 * @copyright 2020 Photon Storm Ltd. 2341 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2342 */ 2343var n=i(539),r=i(157);t.exports=function(t,e,i,s){void 0===i&&(i=[]),void 0===s&&(s=0),i.length=0;var o=t.tilemapLayer,a=n(t,e);return(o.skipCull||1!==o.scrollFactorX||1!==o.scrollFactorY)&&(a.left=0,a.right=t.width,a.top=0,a.bottom=t.height),r(t,a,s,i),i}},function(t,e,i){ 2344/** 2345 * @author Richard Davey <[email protected]> 2346 * @copyright 2020 Photon Storm Ltd. 2347 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2348 */ 2349var n=i(542),r=i(157);t.exports=function(t,e,i,s){void 0===i&&(i=[]),void 0===s&&(s=0),i.length=0;var o=t.tilemapLayer;if(!o.skipCull&&1===o.scrollFactorX&&1===o.scrollFactorY){var a=n(t,e);r(t,a,s,i)}return i}}
2349,function(t,e,i){ 2350/** 2351 * @author Richard Davey <[email protected]> 2352 * @copyright 2020 Photon Storm Ltd. 2353 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2354 */ 2355var n=i(137),r=i(76);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,s=t.tilemapLayer,o=Math.floor(i.tileWidth*s.scaleX),a=Math.floor(i.tileHeight*s.scaleY),h=t.hexSideLength,u=(a-h)/2+h;return{left:r(e.worldView.x-s.x,o,0,!0)-s.cullPaddingX,right:n(e.worldView.right-s.x,o,0,!0)+s.cullPaddingX,top:r(e.worldView.y-s.y,u,0,!0)-s.cullPaddingY,bottom:n(e.worldView.bottom-s.y,u,0,!0)+s.cullPaddingY}}},function(t,e,i){ 2356/** 2357 * @author Richard Davey <[email protected]> 2358 * @copyright 2020 Photon Storm Ltd. 2359 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2360 */ 2361var n=i(537);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var s,o,a,h=t.tilemapLayer,u=t.data,l=t.width,c=t.height,f=l,d=c;if(!h.skipCull)if(0===r){for(o=0;o<d;o++)for(s=0;u[o]&&s<f;s++)if(n(s,o,t,e)){if(!(a=u[o][s])||-1===a.index||!a.visible||0===a.alpha)continue;i.push(a)}}else if(1===r){for(o=0;o<d;o++)for(s=f;u[o]&&s>=0;s--)if(n(s,o,t,e)){if(!(a=u[o][s])||-1===a.index||!a.visible||0===a.alpha)continue;i.push(a)}}else if(2===r){for(o=d;o>=0;o--)for(s=0;u[o]&&s<f;s++)if(n(s,o,t,e)){if(!(a=u[o][s])||-1===a.index||!a.visible||0===a.alpha)continue;i.push(a)}}else if(3===r)for(o=d;o>=0;o--)for(s=f;u[o]&&s>=0;s--)if(n(s,o,t,e)){if(!(a=u[o][s])||-1===a.index||!a.visible||0===a.alpha)continue;i.push(a)}return h.tilesDrawn=i.length,h.tilesTotal=l*c,i}},function(t,e,i){ 2362/** 2363 * @author Richard Davey <[email protected]> 2364 * @copyright 2020 Photon Storm Ltd. 2365 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2366 */ 2367var n=i(545),r=i(157);t.exports=function(t,e,i,s){void 0===i&&(i=[]),void 0===s&&(s=0),i.length=0;var o=t.tilemapLayer;if(!o.skipCull&&1===o.scrollFactorX&&1===o.scrollFactorY){var a=n(t,e);r(t,a,s,i)}return i}},function(t,e,i){ 2368/** 2369 * @author Richard Davey <[email protected]> 2370 * @copyright 2020 Photon Storm Ltd. 2371 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2372 */ 2373var n=i(137),r=i(76);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,s=t.tilemapLayer,o=Math.floor(i.tileWidth*s.scaleX),a=Math.floor(i.tileHeight*s.scaleY);return{left:r(e.worldView.x-s.x,o,0,!0)-s.cullPaddingX,right:n(e.worldView.right-s.x,o,0,!0)+s.cullPaddingX,top:r(e.worldView.y-s.y,a/2,0,!0)-s.cullPaddingY,bottom:n(e.worldView.bottom-s.y,a/2,0,!0)+s.cullPaddingY}}},function(t,e,i){ 2374/** 2375 * @author Richard Davey <[email protected]> 2376 * @copyright 2020 Photon Storm Ltd. 2377 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2378 */ 2379var n=i(3);t.exports=function(t,e,i,r,s){i||(i=new n);var o=s.baseTileWidth,a=s.baseTileHeight,h=s.tilemapLayer,u=0,l=0;h&&(r||(r=h.scene.cameras.main),u=h.x+r.scrollX*(1-h.scrollFactorX),o*=h.scaleX,l=h.y+r.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var c=s.hexSideLength,f=u+t*o+e%2*(o/2),d=l+e*((a-c)/2+c);return i.set(f,d)}},function(t,e,i){ 2380/** 2381 * @author Richard Davey <[email protected]> 2382 * @copyright 2020 Photon Storm Ltd. 2383 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2384 */ 2385var n=i(3);t.exports=function(t,e,i,r,s){i||(i=new n);var o=s.baseTileWidth,a=s.baseTileHeight,h=s.tilemapLayer,u=0,l=0;h&&(r||(r=h.scene.cameras.main),u=h.x+r.scrollX*(1-h.scrollFactorX),o*=h.scaleX,l=h.y+r.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var c=u+o/2*(t-e),f=l+(t+e)*(a/2);return i.set(c,f)}},function(t,e,i){ 2386/** 2387 * @author Richard Davey <[email protected]> 2388 * @copyright 2020 Photon Storm Ltd. 2389 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2390 */ 2391var n=i(3);t.exports=function(t,e,i,r,s){i||(i=new n);var o=s.baseTileWidth,a=s.baseTileHeight,h=s.tilemapLayer,u=0,l=0;h&&(r||(r=h.scene.cameras.main),u=h.x+r.scrollX*(1-h.scrollFactorX),o*=h.scaleX,l=h.y+r.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var c=u+t*o+e%2*(o/2),f=l+e*(a/2);return i.set(c,f)}}
2391,function(t,e,i){ 2392/** 2393 * @author Richard Davey <[email protected]> 2394 * @copyright 2020 Photon Storm Ltd. 2395 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2396 */ 2397var n=i(249),r=i(250),s=i(3);t.exports=function(t,e,i,o,a){return i||(i=new s(0,0)),i.x=n(t,o,a),i.y=r(e,o,a),i}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,r=i.tilemapLayer,s=0;r&&(void 0===e&&(e=r.scene.cameras.main),s=r.y+e.scrollY*(1-r.scrollFactorY),n*=r.scaleY);var o=r.tilemap.hexSideLength;return s+t*((n-o)/2+o)}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,r=i.tilemapLayer,s=0;return r&&(void 0===e&&(e=r.scene.cameras.main),s=r.y+e.scrollY*(1-r.scrollFactorY),n*=r.scaleY),s+t*(n/2)}},function(t,e,i){ 2398/** 2399 * @author Richard Davey <[email protected]> 2400 * @copyright 2020 Photon Storm Ltd. 2401 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2402 */ 2403var n=i(3);t.exports=function(t,e,i,r,s,o){r||(r=new n);var a=o.baseTileWidth,h=o.baseTileHeight,u=o.tilemapLayer;u&&(s||(s=u.scene.cameras.main),e-=u.y+s.scrollY*(1-u.scrollFactorY),h*=u.scaleY,t-=u.x+s.scrollX*(1-u.scrollFactorX),a*=u.scaleX);var l=o.hexSideLength,c=(h-l)/2+l,f=i?Math.floor(e/c):e/c,d=i?Math.floor((t-f%2*.5*a)/a):(t-f%2*.5*a)/a;return r.set(d,f)}},function(t,e,i){ 2404/** 2405 * @author Richard Davey <[email protected]> 2406 * @copyright 2020 Photon Storm Ltd. 2407 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2408 */ 2409var n=i(3);t.exports=function(t,e,i,r,s,o){r||(r=new n);var a=o.baseTileWidth,h=o.baseTileHeight,u=o.tilemapLayer;u&&(s||(s=u.scene.cameras.main),e-=u.y+s.scrollY*(1-u.scrollFactorY),h*=u.scaleY,t-=u.x+s.scrollX*(1-u.scrollFactorX),a*=u.scaleX),t-=a/2;var l=i?Math.floor((t/(a/2)+e/(h/2))/2):(t/(a/2)+e/(h/2))/2,c=i?Math.floor((e/(h/2)-t/(a/2))/2):(e/(h/2)-t/(a/2))/2;return r.set(l,c)}},function(t,e,i){ 2410/** 2411 * @author Richard Davey <[email protected]> 2412 * @copyright 2020 Photon Storm Ltd. 2413 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2414 */ 2415var n=i(3);t.exports=function(t,e,i,r,s,o){r||(r=new n);var a=o.baseTileWidth,h=o.baseTileHeight,u=o.tilemapLayer;u&&(s||(s=u.scene.cameras.main),e-=u.y+s.scrollY*(1-u.scrollFactorY),h*=u.scaleY,t-=u.x+s.scrollX*(1-u.scrollFactorX),a*=u.scaleX);var l=i?Math.floor(e/(h/2)):e/(h/2),c=i?Math.floor((t+l%2*.5*a)/a):(t+l%2*.5*a)/a;return r.set(c,l)}},function(t,e,i){ 2416/** 2417 * @author Richard Davey <[email protected]> 2418 * @copyright 2020 Photon Storm Ltd. 2419 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2420 */ 2421var n=i(251),r=i(252),s=i(3);t.exports=function(t,e,i,o,a,h){return void 0===i&&(i=!0),o||(o=new s(0,0)),o.x=n(t,i,a,h),o.y=r(e,i,a,h),o}},function(t,e){t.exports=function(t,e,i,n){var r=n.baseTileHeight,s=n.tilemapLayer;s&&(i||(i=s.scene.cameras.main),t-=s.y+i.scrollY*(1-s.scrollFactorY),r*=s.scaleY);var o=n.hexSideLength,a=(r-o)/2+o;return e?Math.floor(t/a):t/a}},function(t,e){t.exports=function(t,e,i,n){var r=n.baseTileHeight,s=n.tilemapLayer;return s&&(i||(i=s.scene.cameras.main),t-=s.y+i.scrollY*(1-s.scrollFactorY),r*=s.scaleY),e?Math.floor(t/(r/2)):t/(r/2)}},function(t,e,i){ 2422/** 2423 * @author Richard Davey <[email protected]> 2424 * @copyright 2020 Photon Storm Ltd. 2425 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2426 */ 2427var n=i(118);t.exports=function(t,e,i){if(n(t,e,i)){var r=i.data[e][t];return null!==r&&r.index>-1}return!1}},function(t,e,i){ 2428/** 2429 * @author Richard Davey <[email protected]> 2430 * @copyright 2020 Photon Storm Ltd. 2431 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2432 */ 2433var n=i(83),r=i(118),s=i(248);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!0),void 0===o&&(o=!0),!r(t,e,a))return null;var h=a.data[e][t];return h?(a.data[e][t]=i?null:new n(a,-1,t,e,a.tileWidth,a.tileHeight),o&&h&&h.collides&&s(t,e,a),h):null}}
vendor: 9,009 bytes, lines 2433-2499
2433,function(t,e,i){ 2434/** 2435 * @author Richard Davey <[email protected]> 2436 * @copyright 2020 Photon Storm Ltd. 2437 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2438 */ 2439var n=i(39),r=i(255),s=i(561),o=i(562),a=i(573);t.exports=function(t,e,i,h,u,l){var c;switch(e){case n.ARRAY_2D:c=r(t,i,h,u,l);break;case n.CSV:c=s(t,i,h,u,l);break;case n.TILED_JSON:c=o(t,i,l);break;case n.WELTMEISTER:c=a(t,i,l);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){ 2440/** 2441 * @author Richard Davey <[email protected]> 2442 * @copyright 2020 Photon Storm Ltd. 2443 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2444 */ 2445var n=i(39),r=i(255);t.exports=function(t,e,i,s,o){var a=e.trim().split("\n").map((function(t){return t.split(",")})),h=r(t,a,i,s,o);return h.format=n.CSV,h}},function(t,e,i){ 2446/** 2447 * @author Richard Davey <[email protected]> 2448 * @copyright 2020 Photon Storm Ltd. 2449 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2450 */ 2451var n=i(563),r=i(564),s=i(29),o=i(39),a=i(254),h=i(120),u=i(565),l=i(566),c=i(569),f=i(571);t.exports=function(t,e,i){var d=new h({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:a(e.orientation),format:o.TILED_JSON,version:e.version,properties:e.properties,renderOrder:e.renderorder,infinite:e.infinite});d.orientation===s.HEXAGONAL&&(d.hexSideLength=e.hexsidelength),d.layers=c(e,i),d.images=u(e);var p=f(e);return d.tilesets=p.tilesets,d.imageCollections=p.imageCollections,d.objects=l(e),d.tiles=r(d),n(d),d}},function(t,e,i){ 2452/** 2453 * @author Richard Davey <[email protected]> 2454 * @copyright 2020 Photon Storm Ltd. 2455 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2456 */ 2457var n=i(17);t.exports=function(t){for(var e,i,r,s,o,a=0;a<t.layers.length;a++){e=t.layers[a],s=null;for(var h=0;h<e.data.length;h++){o=e.data[h];for(var u=0;u<o.length;u++)null===(i=o[u])||i.index<0||(r=t.tiles[i.index][2],s=t.tilesets[r],i.width=s.tileWidth,i.height=s.tileHeight,s.tileProperties&&s.tileProperties[i.index-s.firstgid]&&(i.properties=n(i.properties,s.tileProperties[i.index-s.firstgid])))}}}},function(t,e,i){ 2458/** 2459 * @author Richard Davey <[email protected]> 2460 * @copyright 2020 Photon Storm Ltd. 2461 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2462 */ 2463var n=i(121);t.exports=function(t){var e,i,r=[];for(e=0;e<t.imageCollections.length;e++)for(var s=t.imageCollections[e],o=s.images,a=0;a<o.length;a++){var h=o[a];(i=new n(h.image,h.gid,s.imageWidth,s.imageHeight,0,0)).updateTileData(s.imageWidth,s.imageHeight),t.tilesets.push(i)}for(e=0;e<t.tilesets.length;e++)for(var u=(i=t.tilesets[e]).tileMargin,l=i.tileMargin,c=0,f=0,d=0,p=i.firstgid;p<i.firstgid+i.total&&(r[p]=[u,l,e],u+=i.tileWidth+i.tileSpacing,++c!==i.total)&&(++f!==i.columns||(u=i.tileMargin,l+=i.tileHeight+i.tileSpacing,f=0,++d!==i.rows));p++);return r}},function(t,e,i){ 2464/** 2465 * @author Richard Davey <[email protected]> 2466 * @copyright 2020 Photon Storm Ltd. 2467 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2468 */ 2469var n=i(2),r=i(159);t.exports=function(t){for(var e=[],i=[],s=r(t);s.i<s.layers.length||i.length>0;)if(s.i>=s.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}s=i.pop()}else{var o=s.layers[s.i];if(s.i++,"imagelayer"===o.type){var a=n(o,"offsetx",0)+n(o,"startx",0),h=n(o,"offsety",0)+n(o,"starty",0);e.push({name:s.name+o.name,image:o.image,x:s.x+a+o.x,y:s.y+h+o.y,alpha:s.opacity*o.opacity,visible:s.visible&&o.visible,properties:n(o,"properties",{})})}else if("group"===o.type){var u=r(t,o,s);i.push(s),s=u}}return e}},function(t,e,i){ 2470/** 2471 * @author Richard Davey <[email protected]> 2472 * @copyright 2020 Photon Storm Ltd. 2473 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2474 */ 2475var n=i(2),r=i(256),s=i(568),o=i(159);t.exports=function(t){for(var e=[],i=[],a=o(t);a.i<a.layers.length||i.length>0;)if(a.i>=a.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}a=i.pop()}else{var h=a.layers[a.i];if(a.i++,h.opacity*=a.opacity,h.visible=a.visible&&h.visible,"objectgroup"===h.type){h.name=a.name+h.name;for(var u=a.x+n(h,"startx",0)+n(h,"offsetx",0),l=a.y+n(h,"starty",0)+n(h,"offsety",0),c=[],f=0;f<h.objects.length;f++){var d=r(h.objects[f],u,l);c.push(d)}var p=new s(h);p.objects=c,e.push(p)}else if("group"===h.type){var v=o(t,h,a);i.push(a),a=v}}return e}},function(t,e,i){ 2476/** 2477 * @author Richard Davey <[email protected]> 2478 * @copyright 2020 Photon Storm Ltd. 2479 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2480 */ 2481var n=i(125);t.exports=function(t,e){for(var i={},r=0;r<e.length;r++){var s=e[r];n(t,s)&&(i[s]=t[s])}return i}},function(t,e,i){ 2482/** 2483 * @author Richard Davey <[email protected]> 2484 * @copyright 2020 Photon Storm Ltd. 2485 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2486 */ 2487var n=i(0),r=i(2),s=new n({initialize:function(t){void 0===t&&(t={}),this.name=r(t,"name","object layer"),this.opacity=r(t,"opacity",1),this.properties=r(t,"properties",{}),this.propertyTypes=r(t,"propertytypes",{}),this.type=r(t,"type","objectgroup"),this.visible=r(t,"visible",!0),this.objects=r(t,"objects",[])}});t.exports=s},function(t,e,i){ 2488/** 2489 * @author Richard Davey <[email protected]> 2490 * @copyright 2020 Photon Storm Ltd. 2491 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2492 */ 2493var n=i(570),r=i(29),s=i(159),o=i(254),a=i(2),h=i(119),u=i(257),l=i(83);t.exports=function(t,e){for(var i=a(t,"infinite",!1),c=[],f=[],d=s(t);d.i<d.layers.length||f.length>0;)if(d.i>=d.layers.length){if(f.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}d=f.pop()}else{var p=d.layers[d.i];if(d.i++,"tilelayer"===p.type)if(p.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+p.name+"'");else{if(p.encoding&&"base64"===p.encoding){if(p.chunks)for(var v=0;v<p.chunks.length;v++)p.chunks[v].data=n(p.chunks[v].data);p.data&&(p.data=n(p.data)),delete p.encoding}var g,m,y,x,w=[],_=0;if(i){var b=a(p,"startx",0)+p.x,T=a(p,"starty",0)+p.y;(g=new h({name:d.name+p.name,x:d.x+a(p,"offsetx",0)+b*t.tilewidth,y:d.y+a(p,"offsety",0)+T*t.tileheight,width:p.width,height:p.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:d.opacity*p.opacity,visible:d.visible&&p.visible,properties:a(p,"properties",[]),orientation:o(t.orientation)})).orientation===r.HEXAGONAL&&(g.hexSideLength=t.hexsidelength);for(var E=0;E<p.height;E++){w.push([null]);for(var S=0;S<p.width;S++)w[E][S]=null}for(E=0,F=p.chunks.length;E<F;E++)for(var A=p.chunks[E],C=A.x-b,O=A.y-T,R=0,M=0,P=A.data.length;M<P;M++){var I=_+C,k=R+O;(m=u(A.data[M])).gid>0?((y=new l(g,m.gid,I,k,t.tilewidth,t.tileheight)).rotation=m.rotation,y.flipX=m.flipped,w[k][I]=y):(x=e?null:new l(g,-1,I,k,t.tilewidth,t.tileheight),w[k][I]=x),++_===A.width&&(R++,_=0)}}else{(g=new h({name:d.name+p.name,x:d.x+a(p,"offsetx",0)+p.x,y:d.y+a(p,"offsety",0)+p.y,width:p.width,height:p.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:d.opacity*p.opacity,visible:d.visible&&p.visible,properties:a(p,"properties",[]),orientation:o(t.orientation)})).orientation===r.HEXAGONAL&&(g.hexSideLength=t.hexsidelength);for(var L=[],D=0,F=p.data.length;D<F;D++)(m=u(p.data[D])).gid>0?((y=new l(g,m.gid,_,w.length,t.tilewidth,t.tileheight)).rotation=m.rotation,y.flipX=m.flipped,L.push(y)):(x=e?null:new l(g,-1,_,w.length,t.tilewidth,t.tileheight),L.push(x)),++_===p.width&&(w.push(L),_=0,L=[])}g.data=w,c.push(g)}else if("group"===p.type){var N=s(t,p,d);f.push(d),d=N}}return c}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i/4),r=0;r<i;r+=4)n[r/4]=(e.charCodeAt(r)|e.charCodeAt(r+1)<<8|e.charCodeAt(r+2)<<16|e.charCodeAt(r+3)<<24)>>>0;return n}},function(t,e,i){ 2494/** 2495 * @author Richard Davey <[email protected]> 2496 * @copyright 2020 Photon Storm Ltd. 2497 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2498 */ 2499var n=i(121),r=i(572),s=i(256);t.exports=function(t){for(var e,i=[],o=[],a=null,h=0;h<t.tilesets.length;h++){var u=t.tilesets[h];if(u.source)console.warn("External tilesets unsupported. Use Embed Tileset and re-export");else if(u.image){var l=new n(u.name,u.firstgid,u.tilewidth,u.tileheight,u.margin,u.spacing);if(t.version>1){if(Array.isArray(u.tiles)){for(var c={},f={},d=0;d<u.tiles.length;d++){var p=u.tiles[d];if(p.properties){var v={};
2499p.properties.forEach((function(t){v[t.name]=t.value})),f[p.id]=v}if(p.objectgroup&&(c[p.id]={objectgroup:p.objectgroup},p.objectgroup.objects)){var g=p.objectgroup.objects.map((function(t){return s(t)}));c[p.id].objectgroup.objects=g}p.animation&&(c.hasOwnProperty(p.id)?c[p.id].animation=p.animation:c[p.id]={animation:p.animation})}l.tileData=c,l.tileProperties=f}}else if(u.tileproperties&&(l.tileProperties=u.tileproperties),u.tiles)for(e in l.tileData=u.tiles,l.tileData){var m=l.tileData[e].objectgroup;if(m&&m.objects){var y=m.objects.map((function(t){return s(t)}));l.tileData[e].objectgroup.objects=y}}l.updateTileData(u.imagewidth,u.imageheight),i.push(l)}else{var x=new r(u.name,u.firstgid,u.tilewidth,u.tileheight,u.margin,u.spacing,u.properties),w=0;for(d=0;d<u.tiles.length;d++){var _=(p=u.tiles[d]).image,b=parseInt(p.id,10),T=u.firstgid+b;x.addImage(T,_),w=Math.max(b,w)}x.maxId=w,o.push(x)}a&&(a.lastgid=u.firstgid-1),a=u}return{tilesets:i,imageCollections:o}}},function(t,e,i){ 2500/** 2501 * @author Richard Davey <[email protected]> 2502 * @copyright 2020 Photon Storm Ltd. 2503 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2504 */ 2505var n=new(i(0))({initialize:function(t,e,i,n,r,s,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===r&&(r=0),void 0===s&&(s=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|r,this.imageSpacing=0|s,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&t<this.firstgid+this.total},addImage:function(t,e){return this.images.push({gid:t,image:e}),this.total++,this}});t.exports=n},function(t,e,i){ 2506/** 2507 * @author Richard Davey <[email protected]> 2508 * @copyright 2020 Photon Storm Ltd. 2509 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2510 */ 2511var n=i(39),r=i(120),s=i(574),o=i(575);t.exports=function(t,e,i){if(0===e.layer.length)return console.warn("No layers found in the Weltmeister map: "+t),null;for(var a=0,h=0,u=0;u<e.layer.length;u++)e.layer[u].width>a&&(a=e.layer[u].width),e.layer[u].height>h&&(h=e.layer[u].height);var l=new r({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return l.layers=s(e,i),l.tilesets=o(e),l}},function(t,e,i){ 2512/** 2513 * @author Richard Davey <[email protected]> 2514 * @copyright 2020 Photon Storm Ltd. 2515 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2516 */ 2517var n=i(119),r=i(83);t.exports=function(t,e){for(var i=[],s=0;s<t.layer.length;s++){for(var o=t.layer[s],a=new n({name:o.name,width:o.width,height:o.height,tileWidth:o.tilesize,tileHeight:o.tilesize,visible:1===o.visible}),h=[],u=[],l=0;l<o.data.length;l++){for(var c=0;c<o.data[l].length;c++){var f,d=o.data[l][c]-1;f=d>-1?new r(a,d,c,l,o.tilesize,o.tilesize):e?null:new r(a,-1,c,l,o.tilesize,o.tilesize),h.push(f)}u.push(h),h=[]}a.data=u,i.push(a)}return i}},function(t,e,i){ 2518/** 2519 * @author Richard Davey <[email protected]> 2520 * @copyright 2020 Photon Storm Ltd. 2521 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2522 */ 2523var n=i(121);t.exports=function(t){for(var e=[],i=[],r=0;r<t.layer.length;r++){var s=t.layer[r],o=s.tilesetName;""!==o&&-1===i.indexOf(o)&&(i.push(o),e.push(new n(o,0,s.tilesize,s.tilesize,0,0)))}return e}},function(t,e,i){ 2524/** 2525 * @author Richard Davey <[email protected]> 2526 * @copyright 2020 Photon Storm Ltd. 2527 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2528 */ 2529var n=i(0),r=i(35),s=i(39),o=i(2),a=i(119),h=i(29),u=i(356),l=i(74),c=i(73),f=i(83),d=i(247),p=i(577),v=i(121),g=new n({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.renderOrder=e.renderOrder,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.he
2529ightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0,this.hexSideLength=e.hexSideLength;var i=this.orientation;this._convert={WorldToTileXY:d.GetWorldToTileXYFunction(i),WorldToTileX:d.GetWorldToTileXFunction(i),WorldToTileY:d.GetWorldToTileYFunction(i),TileToWorldXY:d.GetTileToWorldXYFunction(i),TileToWorldX:d.GetTileToWorldXFunction(i),TileToWorldY:d.GetTileToWorldYFunction(i)}},createBlankDynamicLayer:function(t,e,i,n,r,s,o,a){return console.warn("createBlankDynamicLayer is deprecated. Use createBlankLayer"),this.createBlankLayer(t,e,i,n,r,s,o,a)},createDynamicLayer:function(t,e,i,n){return console.warn("createDynamicLayer is deprecated. Use createLayer"),this.createLayer(t,e,i,n)},createStaticLayer:function(t,e,i,n){return console.warn("createStaticLayer is deprecated. Use createLayer"),this.createLayer(t,e,i,n)},setRenderOrder:function(t){var e=["right-down","left-down","right-up","left-up"];return"number"==typeof t&&(t=e[t]),e.indexOf(t)>-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,n,r,o,a){if(void 0===t)return null;if(null==e&&(e=t),!this.scene.sys.textures.exists(e))return console.warn("Invalid Tileset Image: "+e),null;var h=this.scene.sys.textures.get(e),u=this.getTilesetIndex(t);if(null===u&&this.format===s.TILED_JSON)return console.warn("No data found for Tileset: "+t),null;var l=this.tilesets[u];return l?(l.setTileSize(i,n),l.setSpacing(r,o),l.setImage(h),l):(void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===r&&(r=0),void 0===o&&(o=0),void 0===a&&(a=0),(l=new v(t,a,i,n,r,o)).setImage(h),this.tilesets.push(l),l)},copy:function(t,e,i,n,r,s,o,a){return null!==(a=this.getLayer(a))?(d.Copy(t,e,i,n,r,s,o,a),this):null},createBlankLayer:function(t,e,i,n,r,s,o,h){if(void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=this.width),void 0===s&&(s=this.height),void 0===o&&(o=this.tileWidth),void 0===h&&(h=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var u,l=new a({name:t,tileWidth:o,tileHeight:h,width:r,height:s,orientation:this.orientation}),c=0;c<s;c++){u=[];for(var d=0;d<r;d++)u.push(new f(l,-1,d,c,o,h,this.tileWidth,this.tileHeight));l.data.push(u)}this.layers.push(l),this.currentLayerIndex=this.layers.length-1;var v=new p(this.scene,this,this.currentLayerIndex,e,i,n);return v.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(v),v},createLayer:function(t,e,i,n){var r=this.getLayerIndex(t);if(null===r)return console.warn("Invalid Tilemap Layer ID: "+t),"string"==typeof t&&console.warn("Valid tilelayer names:\n\t"+this.getTileLayerNames().join(",\n\t")),null;var s=this.layers[r];if(s.tilemapLayer)return console.warn("Tilemap Layer ID already exists:"+t),null;this.currentLayerIndex=r,void 0===i&&(i=s.x),void 0===n&&(n=s.y);var o=new p(this.scene,this,r,e,i,n);return o.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(o),o},createFromObjects:function(t,e){var i=[],n=this.getObjectLayer(t);if(!n)return console.warn("createFromObjects: Invalid objectLayerName given: "+t),i;Array.isArray(e)||(e=[e]);for(var s=n.objects,a=0;a<e.length;a++){for(var h,l=e[a],f=o(l,"id",null),d=o(l,"gid",null),p=o(l,"name",null),v=[],g=0;g<s.length;g++)h=s[g],(null===f&&null===d&&null===p||null!==f&&h.id===f||null!==d&&h.gid===d||null!==p&&h.name===p)&&v.push(h);for(var m=o(l,"classType",c),y=o(l,"scene",this.scene),x=o(l,"container",null),w=o(l,"key",null),_=o(l,"frame",null),b=0;b<v.length;b++){h=v[b];var T=new m(y);T.setName(h.name),T.setPosition(h.x,h.y),T.setTexture(w,_),h.width&&(T.displayWidth=h.width),h.height&&(T.displayHeight=h.height);var E={x:T.originX*h.width,y:(T.originY-1)*h.height};if(h.rotation){var S=r(h.rotation);u(E,S),T.rotation=S}for(var A in T.x+=E.x,T.y+=E.y,void 0===h.flippedHorizontal&&void 0===h.flippedVertical||T.setFlip(h.flippedHorizontal,h.flippedVertical),h.visible||(T.visible=!1),h.properties)void 0!==T[A]?T[A]=h.properties[A]:T.setData(A,h.properties[A]);x?x.add(T):y.add.existing(T),i.push(T)}}return i}
vendor: 12,752 bytes, lines 2529-2535
2529,createFromTiles:function(t,e,i,n,r,s){return null===(s=this.getLayer(s))?null:d.CreateFromTiles(t,e,i,n,r,s)},fill:function(t,e,i,n,r,s,o){return void 0===s&&(s=!0),null===(o=this.getLayer(o))?null:(d.Fill(t,e,i,n,r,s,o),this)},filterObjects:function(t,e,i){if("string"==typeof t){var n=t;if(!(t=this.getObjectLayer(t)))return console.warn("No object layer found with the name: "+n),null}return t.objects.filter(e,i)},filterTiles:function(t,e,i,n,r,s,o,a){return null===(a=this.getLayer(a))?null:d.FilterTiles(t,e,i,n,r,s,o,a)},findByIndex:function(t,e,i,n){return null===(n=this.getLayer(n))?null:d.FindByIndex(t,e,i,n)},findObject:function(t,e,i){if("string"==typeof t){var n=t;if(!(t=this.getObjectLayer(t)))return console.warn("No object layer found with the name: "+n),null}return t.objects.find(e,i)||null},findTile:function(t,e,i,n,r,s,o,a){return null===(a=this.getLayer(a))?null:d.FindTile(t,e,i,n,r,s,o,a)},forEachTile:function(t,e,i,n,r,s,o,a){return null===(a=this.getLayer(a))?null:(d.ForEachTile(t,e,i,n,r,s,o,a),this)},getImageIndex:function(t){return this.getIndex(this.images,t)},getImageLayerNames:function(){return this.images&&Array.isArray(this.images)?this.images.map((function(t){return t.name})):[]},getIndex:function(t,e){for(var i=0;i<t.length;i++)if(t[i].name===e)return i;return null},getLayer:function(t){var e=this.getLayerIndex(t);return null!==e?this.layers[e]:null},getObjectLayer:function(t){var e=this.getIndex(this.objects,t);return null!==e?this.objects[e]:null},getObjectLayerNames:function(){return this.objects&&Array.isArray(this.objects)?this.objects.map((function(t){return t.name})):[]},getLayerIndex:function(t){return void 0===t?this.currentLayerIndex:"string"==typeof t?this.getLayerIndexByName(t):"number"==typeof t&&t<this.layers.length?t:t instanceof p?t.layerIndex:null},getLayerIndexByName:function(t){return this.getIndex(this.layers,t)},getTileAt:function(t,e,i,n){return null===(n=this.getLayer(n))?null:d.GetTileAt(t,e,i,n)},getTileAtWorldXY:function(t,e,i,n,r){return null===(r=this.getLayer(r))?null:d.GetTileAtWorldXY(t,e,i,n,r)},getTileLayerNames:function(){return this.layers&&Array.isArray(this.layers)?this.layers.map((function(t){return t.name})):[]},getTilesWithin:function(t,e,i,n,r,s){return null===(s=this.getLayer(s))?null:d.GetTilesWithin(t,e,i,n,r,s)},getTilesWithinShape:function(t,e,i,n){return null===(n=this.getLayer(n))?null:d.GetTilesWithinShape(t,e,i,n)},getTilesWithinWorldXY:function(t,e,i,n,r,s,o){return null===(o=this.getLayer(o))?null:d.GetTilesWithinWorldXY(t,e,i,n,r,s,o)},getTileset:function(t){var e=this.getIndex(this.tilesets,t);return null!==e?this.tilesets[e]:null},getTilesetIndex:function(t){return this.getIndex(this.tilesets,t)},hasTileAt:function(t,e,i){return null===(i=this.getLayer(i))?null:d.HasTileAt(t,e,i)},hasTileAtWorldXY:function(t,e,i,n){return null===(n=this.getLayer(n))?null:d.HasTileAtWorldXY(t,e,i,n)},layer:{get:function(){return this.layers[this.currentLayerIndex]},set:function(t){this.setLayer(t)}},putTileAt:function(t,e,i,n,r){return void 0===n&&(n=!0),null===(r=this.getLayer(r))?null:d.PutTileAt(t,e,i,n,r)},putTileAtWorldXY:function(t,e,i,n,r,s){return void 0===n&&(n=!0),null===(s=this.getLayer(s))?null:d.PutTileAtWorldXY(t,e,i,n,r,s)},putTilesAt:function(t,e,i,n,r){return void 0===n&&(n=!0),null===(r=this.getLayer(r))?null:(d.PutTilesAt(t,e,i,n,r),this)},randomize:function(t,e,i,n,r,s){return null===(s=this.getLayer(s))?null:(d.Randomize(t,e,i,n,r,s),this)},calculateFacesAt:function(t,e,i){return null===(i=this.getLayer(i))?null:(d.CalculateFacesAt(t,e,i),this)},calculateFacesWithin:function(t,e,i,n,r){return null===(r=this.getLayer(r))?null:(d.CalculateFacesWithin(t,e,i,n,r),this)},removeLayer:function(t){var e=this.getLayerIndex(t);if(null!==e){l(this.layers,e);for(var i=e;i<this.layers.length;i++)this.layers[i].tilemapLayer&&this.layers[i].tilemapLayer.layerIndex--;return this.currentLayerIndex===e&&(this.currentLayerIndex=0),this}return null},destroyLayer:function(t){var e=this.getLayerIndex(t);return null!==e?((t=this.layers[e]).destroy(),l(this.layers,e),this.currentLayerIndex===e&&(this.currentLayerIndex=0),this):null},removeAllLayers:function(){for(var t=this.layers,e=0;e<t.length;e++)t[e].tilemapLayer&&t[e].tilemapLayer.destroy(!1);return t.length=0,this.currentLayerIndex=0,this},removeTile:function(t,e,i){void 0===e&&(e=-1),void 0===i&&(i=!0);var n=[];Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var s=t[r];n.push(this.removeTileAt(s.x,s.y,!0,i,s.tilemapLayer)),e>-1&&this.putTileAt(e,s.x,s.y,i,s.tilemapLayer)}return n},removeTileAt:function(t,e,i,n,r){return void 0===i&&(i=!0),void 0===n&&(n=!0),null===(r=this.getLayer(r))?null:d.RemoveTileAt(t,e,i,n,r)},removeTileAtWorldXY:function(t,e,i,n,r,s){return void 0===i&&(i=!0),void 0===n&&(n=!0),null===(s=this.getLayer(s))?null:d.RemoveTileAtWorldXY(t,e,i,n,r,s)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(this.orientation===h.ORTHOGONAL&&d.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,n=0;n<i.length;n++)d.RenderDebug(t,e,i[n]);return this},replaceByIndex:function(t,e,i,n,r,s,o){return null===(o=this.getLayer(o))?null:(d.ReplaceByIndex(t,e,i,n,r,s,o),this)},setCollision:function(t,e,i,n,r){return void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===r&&(r=!0),null===(n=this.getLayer(n))?null:(d.SetCollision(t,e,i,n,r),this)},setCollisionBetween:function(t,e,i,n,r){return void 0===i&&(i=!0),void 0===n&&(n=!0),null===(r=this.getLayer(r))?null:(d.SetCollisionBetween(t,e,i,n,r),this)},setCollisionByProperty:function(t,e,i,n){return void 0===e&&(e=!0),void 0===i&&(i=!0),null===(n=this.getLayer(n))?null:(d.SetCollisionByProperty(t,e,i,n),this)},setCollisionByExclusion:function(t,e,i,n){return void 0===e&&(e=!0),void 0===i&&(i=!0),null===(n=this.getLayer(n))?null:(d.SetCollisionByExclusion(t,e,i,n),this)},setCollisionFromCollisionGroup:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),null===(i=this.getLayer(i))?null:(d.SetCollisionFromCollisionGroup(t,e,i),this)},setTileIndexCallback:function(t,e,i,n){return null===(n=this.getLayer(n))?null:(d.SetTileIndexCallback(t,e,i,n),this)},setTileLocationCallback:function(t,e,i,n,r,s,o){return null===(o=this.getLayer(o))?null:(d.SetTileLocationCallback(t,e,i,n,r,s,o),this)},setLayer:function(t){var e=this.getLayerIndex(t);return null!==e&&(this.currentLayerIndex=e),this},setBaseTileSize:function(t,e){this.tileWidth=t,this.tileHeight=e,this.widthInPixels=this.width*t,this.heightInPixels=this.height*e;for(var i=0;i<this.layers.length;i++){this.layers[i].baseTileWidth=t,this.layers[i].baseTileHeight=e;for(var n=this.layers[i].data,r=this.layers[i].width,s=this.layers[i].height,o=0;o<s;o++)for(var a=0;a<r;a++){var h=n[o][a];null!==h&&h.setSize(void 0,void 0,t,e)}}return this},setLayerTileSize:function(t,e,i){if(null===(i=this.getLayer(i)))return this;i.tileWidth=t,i.tileHeight=e;for(var n=i.data,r=i.width,s=i.height,o=0;o<s;o++)for(var a=0;a<r;a++){var h=n[o][a];null!==h&&h.setSize(t,e)}return this},shuffle:function(t,e,i,n,r){return null===(r=this.getLayer(r))?null:(d.Shuffle(t,e,i,n,r),this)},swapByIndex:function(t,e,i,n,r,s,o){return null===(o=this.getLayer(o))?null:(d.SwapByIndex(t,e,i,n,r,s,o),this)},tileToWorldX:function(t,e,i){return null===(i=this.getLayer(i))?null:this._convert.TileToWorldX(t,e,i)},tileToWorldY:function(t,e,i){return null===(i=this.getLayer(i))?null:this._convert.TileToWorldY(t,e,i)},tileToWorldXY:function(t,e,i,n,r){return null===(r=this.getLayer(r))?null:this._convert.TileToWorldXY(t,e,i,n,r)},weightedRandomize:function(t,e,i,n,r,s){return null===(s=this.getLayer(s))?null:(d.WeightedRandomize(e,i,n,r,t,s),this)},worldToTileX:function(t,e,i,n){return null===(n=this.getLayer(n))?null:this._convert.WorldToTileX(t,e,i,n)},worldToTileY:function(t,e,i,n){return null===(n=this.getLayer(n))?null:this._convert.WorldToTileY(t,e,i,n)},worldToTileXY:function(t,e,i,n,r,s){return null===(s=this.getLayer(s))?null:this._convert.WorldToTileXY(t,e,i,n,r,s)},destroy:function(){this.removeAllLayers(),this.tilesets.length=0,this.objects.length=0,this.scene=null}});t.exports=g},function(t,e,i){ 2530/** 2531 * @author Richard Davey <[email protected]> 2532 * @copyright 2020 Photon Storm Ltd. 2533 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2534 */ 2535var n=i(0),r=i(11),s=i(15),o=i(247),a=i(1449),h=new n({Extends:s,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Depth,r.Flip,r.GetBounds,r.Origin,r.Pipeline,r.Transform,r.Visible,r.ScrollFactor,a],initialize:function(t,e,i,n,r,a){s.call(this,t,"TilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=o.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.setTilesets(n),this.setAlpha(this.layer.alpha),this.setPosition(r,a),this.setOrigin(),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.initPipeline()},setTilesets:function(t){var e=[],i=[],n=this.tilemap;Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var s=t[r];if("string"==typeof s&&(s=n.getTileset(s)),s){i.push(s);for(var o=s.firstgid,a=0;a<s.total;a++)e[o+a]=s}}this.gidMap=e,this.tileset=i},setRenderOrder:function(t){return"string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),t>=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return o.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,n){return o.CalculateFacesWithin(t,e,i,n,this.layer),this},createFromTiles:function(t,e,i,n,r){return o.CreateFromTiles(t,e,i,n,r,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,n,r,s,a){return o.Copy(t,e,i,n,r,s,a,this.layer),this},fill:function(t,e,i,n,r,s){return o.Fill(t,e,i,n,r,s,this.layer),this},filterTiles:function(t,e,i,n,r,s,a){return o.FilterTiles(t,e,i,n,r,s,a,this.layer)},findByIndex:function(t,e,i){return o.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,n,r,s,a){return o.FindTile(t,e,i,n,r,s,a,this.layer)},forEachTile:function(t,e,i,n,r,s,a){return o.ForEachTile(t,e,i,n,r,s,a,this.layer),this},getTileAt:function(t,e,i){return o.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,n){return o.GetTileAtWorldXY(t,e,i,n,this.layer)},getTilesWithin:function(t,e,i,n,r){return o.GetTilesWithin(t,e,i,n,r,this.layer)},getTilesWithinShape:function(t,e,i){return o.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,n,r,s){return o.GetTilesWithinWorldXY(t,e,i,n,r,s,this.layer)},hasTileAt:function(t,e){return o.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return o.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,n){return o.PutTileAt(t,e,i,n,this.layer)},putTileAtWorldXY:function(t,e,i,n,r){return o.PutTileAtWorldXY(t,e,i,n,r,this.layer)},putTilesAt:function(t,e,i,n){return o.PutTilesAt(t,e,i,n,this.layer),this},randomize:function(t,e,i,n,r){return o.Randomize(t,e,i,n,r,this.layer),this},removeTileAt:function(t,e,i,n){return o.RemoveTileAt(t,e,i,n,this.layer)},removeTileAtWorldXY:function(t,e,i,n,r){return o.RemoveTileAtWorldXY(t,e,i,n,r,this.layer)},renderDebug:function(t,e){return o.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,n,r,s){return o.ReplaceByIndex(t,e,i,n,r,s,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i,n){return o.SetCollision(t,e,i,this.layer,n),this},setCollisionBetween:function(t,e,i,n){return o.SetCollisionBetween(t,e,i,n,this.layer),this},setCollisionByProperty:function(t,e,i){return o.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return o.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return o.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return o.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,n,r,s){return o.SetTileLocationCallback(t,e,i,n,r,s,this.layer),this},shuffle:function(t,e,i,n){return o.Shuffle(t,e,i,n,this.layer),this},swapByIndex:function(t,e,i,n,r,s){return o.SwapByIndex(t,e,i,n,r,s,this.layer),this},tileToWorldX:function(t,e){return this.tilemap.tileToWorldX(t,e,this)},tileToWorldY:function(t,e){return this.tilemap.tileToWorldY(t,e,this)}
2535,tileToWorldXY:function(t,e,i,n){return this.tilemap.tileToWorldXY(t,e,i,n,this)},weightedRandomize:function(t,e,i,n,r){return o.WeightedRandomize(e,i,n,r,t,this.layer),this},worldToTileX:function(t,e,i){return this.tilemap.worldToTileX(t,e,i,this)},worldToTileY:function(t,e,i){return this.tilemap.worldToTileY(t,e,i,this)},worldToTileXY:function(t,e,i,n,r){return this.tilemap.worldToTileXY(t,e,i,n,r,this)},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],s.prototype.destroy.call(this))}});t.exports=h},function(t,e,i){ 2536/** 2537 * @author Richard Davey <[email protected]> 2538 * @copyright 2020 Photon Storm Ltd. 2539 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2540 */ 2541var n=i(0),r=i(2),s=new n({initialize:function(t){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.callback,this.callbackScope,this.args,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(t)},reset:function(t){return this.delay=r(t,"delay",0),this.repeat=r(t,"repeat",0),this.loop=r(t,"loop",!1),this.callback=r(t,"callback",void 0),this.callbackScope=r(t,"callbackScope",this.callback),this.args=r(t,"args",[]),this.timeScale=r(t,"timeScale",1),this.startAt=r(t,"startAt",0),this.paused=r(t,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=-1===this.repeat||this.loop?999999999999:this.repeat,this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return.001*this.getRemaining()},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return.001*this.getOverallRemaining()},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=s},function(t,e,i){ 2542/** 2543 * @author Richard Davey <[email protected]> 2544 * @copyright 2020 Photon Storm Ltd. 2545 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2546 */ 2547var n=i(1458);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){ 2548/** 2549 * @author Richard Davey <[email protected]> 2550 * @copyright 2020 Photon Storm Ltd. 2551 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2552 */ 2553var n=i(6);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){ 2554/** 2555 * @author Richard Davey <[email protected]> 2556 * @copyright 2020 Photon Storm Ltd. 2557 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2558 */ 2559var n=i(261),r=i(13),s=i(96),o=i(80),a=i(160),h=i(6),u=i(260),l=i(262),c=i(264);t.exports=function(t,e,i){void 0===i&&(i=n);var f=h(e,"from",0),d=h(e,"to",1),p=[{value:f}],v=a(e,"delay",i.delay),g=a(e,"duration",i.duration),m=h(e,"easeParams",i.easeParams),y=o(h(e,"ease",i.ease),m),x=a(e,"hold",i.hold),w=a(e,"repeat",i.repeat),_=a(e,"repeatDelay",i.repeatDelay),b=s(e,"yoyo",i.yoyo),T=[],E=u("value",d),S=c(p[0],0,"value",E.getEnd,E.getStart,E.getActive,y,v,g,b,x,w,_,!1,!1);S.start=f,S.current=f,S.to=d,T.push(S);var A=new l(t,T,p);A.offset=r(e,"offset",null),A.completeDelay=r(e,"completeDelay",0),A.loop=Math.round(r(e,"loop",0)),A.loopDelay=Math.round(r(e,"loopDelay",0)),A.paused=s(e,"paused",!1),A.useFrames=s(e,"useFrames",!1);for(var C=h(e,"callbackScope",A),O=[A,null],R=l.TYPES,M=0;M<R.length;M++){var P=R[M],I=h(e,P,!1);if(I){var k=h(e,P+"Scope",C),L=h(e,P+"Params",[]);A.setCallback(P,I,O.concat(L),k)}}return A}}
2559,function(t,e,i){ 2560/** 2561 * @author Richard Davey <[email protected]> 2562 * @copyright 2020 Photon Storm Ltd. 2563 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2564 */ 2565var n=i(80),r=i(6),s=i(14);t.exports=function(t,e){void 0===e&&(e={});var i=r(e,"start",0),o=r(e,"ease",null),a=r(e,"grid",null),h=r(e,"from",0),u="first"===h,l="center"===h,c="last"===h,f="number"==typeof h,d=Array.isArray(t),p=d?parseFloat(t[0]):parseFloat(t),v=d?parseFloat(t[1]):0,g=Math.max(p,v);if(d&&(i+=p),a){var m=a[0],y=a[1],x=0,w=0,_=0,b=0,T=[];c?(x=m-1,w=y-1):f?(x=h%m,w=Math.floor(h/m)):l&&(x=(m-1)/2,w=(y-1)/2);for(var E=s.MIN_SAFE_INTEGER,S=0;S<y;S++){T[S]=[];for(var A=0;A<m;A++){_=x-A,b=w-S;var C=Math.sqrt(_*_+b*b);C>E&&(E=C),T[S][A]=C}}}var O=o?n(o):null;return a?function(t,e,n,r){var s,o=0,a=r%m,h=Math.floor(r/m);if(a>=0&&a<m&&h>=0&&h<y&&(o=T[h][a]),d){var u=v-p;s=O?o/E*u*O(o/E):o/E*u}else s=O?o*p*O(o/E):o*p;return s+i}:function(t,e,n,r,s){var o,a,m;return s--,u?o=r:l?o=Math.abs(s/2-r):c?o=s-r:f&&(o=Math.abs(h-r)),d?(m=l?(v-p)/s*(2*o):(v-p)/s*o,a=O?m*O(o/s):m):a=O?s*g*O(o/s):o*p,a+i}}},function(t,e,i){ 2566/** 2567 * @author Richard Davey <[email protected]> 2568 * @copyright 2020 Photon Storm Ltd. 2569 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2570 */ 2571var n=i(77),r=i(261),s=i(13),o=i(96),a=i(80),h=i(160),u=i(259),l=i(580),c=i(6),f=i(584),d=i(161);t.exports=function(t,e){var i=new f(t);i.completeDelay=s(e,"completeDelay",0),i.loop=Math.round(s(e,"loop",0)),i.loopDelay=Math.round(s(e,"loopDelay",0)),i.paused=o(e,"paused",!1),i.useFrames=o(e,"useFrames",!1);var p=c(e,"callbackScope",i),v=[i],g=c(e,"onStart",!1);if(g){var m=c(e,"onStartScope",p),y=c(e,"onStartParams",[]);i.setCallback("onStart",g,v.concat(y),m)}var x=c(e,"onUpdate",!1);if(x){var w=c(e,"onUpdateScope",p),_=c(e,"onUpdateParams",[]);i.setCallback("onUpdate",x,v.concat(_),w)}var b=c(e,"onLoop",!1);if(b){var T=c(e,"onLoopScope",p),E=c(e,"onLoopParams",[]);i.setCallback("onLoop",b,v.concat(E),T)}var S=c(e,"onYoyo",!1);if(S){var A=c(e,"onYoyoScope",p),C=c(e,"onYoyoParams",[]);i.setCallback("onYoyo",S,v.concat(null,C),A)}var O=c(e,"onComplete",!1);if(O){var R=c(e,"onCompleteScope",p),M=c(e,"onCompleteParams",[]);i.setCallback("onComplete",O,v.concat(M),R)}var P=l(e);if(0===P.length)return i.paused=!0,i;var I=n(r);I.targets=u(e);var k=s(e,"totalDuration",0);I.duration=k>0?Math.floor(k/P.length):h(e,"duration",I.duration),I.delay=h(e,"delay",I.delay),I.easeParams=c(e,"easeParams",I.easeParams),I.ease=a(c(e,"ease",I.ease),I.easeParams),I.hold=h(e,"hold",I.hold),I.repeat=h(e,"repeat",I.repeat),I.repeatDelay=h(e,"repeatDelay",I.repeatDelay),I.yoyo=o(e,"yoyo",I.yoyo),I.flipX=o(e,"flipX",I.flipX),I.flipY=o(e,"flipY",I.flipY);for(var L=0;L<P.length;L++)i.queue(d(i,P[L],I));return i}},function(t,e,i){ 2572/** 2573 * @author Richard Davey <[email protected]> 2574 * @copyright 2020 Photon Storm Ltd. 2575 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2576 */ 2577var n=i(0),r=i(9),s=i(263),o=i(161),a=i(97),h=new n({Extends:r,initialize:function(t){r.call(this),this.manager=t,this.isTimeline=!0,this.data=[],this.totalData=0,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=a.PENDING_ADD,this._pausedState=a.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},dispatchTimelineEvent:function(t,e){this.emit(t,this),e&&e.func.apply(e.scope,e.params)},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===a.ACTIVE},add:function(t){return this.queue(o(this,t))},queue:function(t){return this.isPlaying()||(t.parent=this,t.parentIsTimeline=!0,this.data.push(t),this.totalData=this.data.length),this},hasOffset:function(t){return null!==t.offset},isOffsetAbsolute:function(t){return"number"==typeof t},isOffsetRelative:function(t){if("string"==typeof t){var e=t[0];if("-"===e||"+"===e)return!0}return!1},getRelativeOffset:function(t,e){var i=t[0],n=parseFloat(t.substr(2)),r=e;switch(i){case"+":r+=n;break;case"-":r-=n}return Math.max(0,r)},calcDuration:function(){for(var t=0,e=0,i=0,n=0;n<this.totalData;n++){var r=this.data[n];r.init(),this.hasOffset(r)?this.isOffsetAbsolute(r.offset)?(r.calculatedOffset=r.offset,0===r.offset&&(i=0)):this.isOffsetRelative(r.offset)&&(r.calculatedOffset=this.getRelativeOffset(r.offset,t)):r.calculatedOffset=i,t=r.totalDuration+r.calculatedOffset,e+=r.totalDuration,i+=r.totalDuration}this.duration=e,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=a.PAUSED,!1)},resetTweens:function(t){for(var e=0;e<this.totalData;e++)this.data[e].play(t)}
2577,setCallback:function(t,e,i,n){return-1!==h.TYPES.indexOf(t)&&(this.callbacks[t]={func:e,scope:n,params:i}),this},makeActive:function(t){return this.manager.makeActive(t)},play:function(){if(this.state!==a.ACTIVE){if(this.paused)return this.paused=!1,void this.manager.makeActive(this);this.resetTweens(!1),this.state=a.ACTIVE,this.dispatchTimelineEvent(s.TIMELINE_START,this.callbacks.onStart)}},nextState:function(){this.loopCounter>0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=a.LOOP_DELAY):(this.state=a.ACTIVE,this.dispatchTimelineEvent(s.TIMELINE_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=a.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=a.PENDING_REMOVE,this.dispatchTimelineEvent(s.TIMELINE_COMPLETE,this.callbacks.onComplete))},update:function(t,e){if(this.state!==a.PAUSED){switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case a.ACTIVE:for(var i=this.totalData,n=0;n<this.totalData;n++)this.data[n].update(t,e)&&i--;this.dispatchTimelineEvent(s.TIMELINE_UPDATE,this.callbacks.onUpdate),0===i&&this.nextState();break;case a.LOOP_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=a.ACTIVE,this.dispatchTimelineEvent(s.TIMELINE_LOOP,this.callbacks.onLoop));break;case a.COMPLETE_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=a.PENDING_REMOVE,this.dispatchTimelineEvent(s.TIMELINE_COMPLETE,this.callbacks.onComplete))}return this.state===a.PENDING_REMOVE}},stop:function(){this.state=a.PENDING_REMOVE},pause:function(){if(this.state!==a.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=a.PAUSED,this.emit(s.TIMELINE_PAUSE,this),this},resume:function(){return this.state===a.PAUSED&&(this.paused=!1,this.state=this._pausedState,this.emit(s.TIMELINE_RESUME,this)),this},hasTarget:function(t){for(var e=0;e<this.data.length;e++)if(this.data[e].hasTarget(t))return!0;return!1},destroy:function(){for(var t=0;t<this.data.length;t++)this.data[t].stop()}});h.TYPES=["onStart","onUpdate","onLoop","onComplete","onYoyo"],t.exports=h},function(t,e,i){var n={};t.exports=n;var r=i(116),s=i(50);n.fromVertices=function(t){for(var e={},i=0;i<t.length;i++){var n=(i+1)%t.length,o=r.normalise({x:t[n].y-t[i].y,y:t[i].x-t[n].x}),a=0===o.y?1/0:o.x/o.y;e[a=a.toFixed(3).toString()]=o}return s.values(e)},n.rotate=function(t,e){if(0!==e)for(var i=Math.cos(e),n=Math.sin(e),r=0;r<t.length;r++){var s,o=t[r];s=o.x*i-o.y*n,o.y=o.x*n+o.y*i,o.x=s}}},function(t,e,i){ 2578/** 2579 * @author Richard Davey <[email protected]> 2580 * @copyright 2020 Photon Storm Ltd. 2581 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2582 */ 2583t.exports={AFTER_ADD:i(1509),AFTER_REMOVE:i(1510),AFTER_UPDATE:i(1511),BEFORE_ADD:i(1512),BEFORE_REMOVE:i(1513),BEFORE_UPDATE:i(1514),COLLISION_ACTIVE:i(1515),COLLISION_END:i(1516),COLLISION_START:i(1517),DRAG_END:i(1518),DRAG:i(1519),DRAG_START:i(1520),PAUSE:i(1521),RESUME:i(1522),SLEEP_END:i(1523),SLEEP_START:i(1524)}},function(t,e,i){var n={};t.exports=n;var r=i(588),s=i(535),o=i(117);n.collisions=function(t,e){for(var i=[],a=e.pairs.table,h=e.metrics,u=0;u<t.length;u++){var l=t[u][0],c=t[u][1];if((!l.isStatic&&!l.isSleeping||!c.isStatic&&!c.isSleeping)&&n.canCollide(l.collisionFilter,c.collisionFilter)&&(h.midphaseTests+=1,o.overlaps(l.bounds,c.bounds)))for(var f=l.parts.length>1?1:0;f<l.parts.length;f++)for(var d=l.parts[f],p=c.parts.length>1?1:0;p<c.parts.length;p++){var v=c.parts[p];if(d===l&&v===c||o.overlaps(d.bounds,v.bounds)){var g,m=a[s.id(d,v)];g=m&&m.isActive?m.collision:null;var y=r.collides(d,v,g);h.narrowphaseTests+=1,y.reused&&(h.narrowReuseCount+=1),y.collided&&(i.push(y),h.narrowDetections+=1)}}}return i},n.canCollide=function(t,e){return t.group===e.group&&0!==t.group?t.group>0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var n={};t.exports=n;var r=i(94),s=i(116);
2583n.collides=function(t,e,i){var o,a,h,u,l=!1;if(i){var c=t.parent,f=e.parent,d=c.speed*c.speed+c.angularSpeed*c.angularSpeed+f.speed*f.speed+f.angularSpeed*f.angularSpeed;l=i&&i.collided&&d<.2,u=i}else u={collided:!1,bodyA:t,bodyB:e};if(i&&l){var p=u.axisBody,v=p===t?e:t,g=[p.axes[i.axisNumber]];if(h=n._overlapAxes(p.vertices,v.vertices,g),u.reused=!0,h.overlap<=0)return u.collided=!1,u}else{if((o=n._overlapAxes(t.vertices,e.vertices,t.axes)).overlap<=0)return u.collided=!1,u;if((a=n._overlapAxes(e.vertices,t.vertices,e.axes)).overlap<=0)return u.collided=!1,u;o.overlap<a.overlap?(h=o,u.axisBody=t):(h=a,u.axisBody=e),u.axisNumber=h.axisNumber}u.bodyA=t.id<e.id?t:e,u.bodyB=t.id<e.id?e:t,u.collided=!0,u.depth=h.overlap,u.parentA=u.bodyA.parent,u.parentB=u.bodyB.parent,t=u.bodyA,e=u.bodyB,s.dot(h.axis,s.sub(e.position,t.position))<0?u.normal={x:h.axis.x,y:h.axis.y}:u.normal={x:-h.axis.x,y:-h.axis.y},u.tangent=s.perp(u.normal),u.penetration=u.penetration||{},u.penetration.x=u.normal.x*u.depth,u.penetration.y=u.normal.y*u.depth;var m=n._findSupports(t,e,u.normal),y=[];if(r.contains(t.vertices,m[0])&&y.push(m[0]),r.contains(t.vertices,m[1])&&y.push(m[1]),y.length<2){var x=n._findSupports(e,t,s.neg(u.normal));r.contains(e.vertices,x[0])&&y.push(x[0]),y.length<2&&r.contains(e.vertices,x[1])&&y.push(x[1])}return y.length<1&&(y=[m[0]]),u.supports=y,u},n._overlapAxes=function(t,e,i){for(var r,o,a=s._temp[0],h=s._temp[1],u={overlap:Number.MAX_VALUE},l=0;l<i.length;l++){if(o=i[l],n._projectToAxis(a,t,o),n._projectToAxis(h,e,o),(r=Math.min(a.max-h.min,h.max-a.min))<=0)return u.overlap=r,u;r<u.overlap&&(u.overlap=r,u.axis=o,u.axisNumber=l)}return u},n._projectToAxis=function(t,e,i){for(var n=s.dot(e[0],i),r=n,o=1;o<e.length;o+=1){var a=s.dot(e[o],i);a>r?r=a:a<n&&(n=a)}t.min=n,t.max=r},n._findSupports=function(t,e,i){for(var n,r,o,a,h=Number.MAX_VALUE,u=s._temp[0],l=e.vertices,c=t.position,f=0;f<l.length;f++)r=l[f],u.x=r.x-c.x,u.y=r.y-c.y,(n=-s.dot(i,u))<h&&(h=n,o=r);return r=l[o.index-1>=0?o.index-1:l.length-1],u.x=r.x-c.x,u.y=r.y-c.y,h=-s.dot(i,u),a=r,r=l[(o.index+1)%l.length],u.x=r.x-c.x,u.y=r.y-c.y,(n=-s.dot(i,u))<h&&(a=r),[o,a]}},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(lC){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){i(591),i(592),i(593),i(594),i(595),i(596),i(597),i(598)},function(t,e){Array.prototype.forEach||(Array.prototype.forEach=function(t){if(null==this)throw new TypeError;var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,r=0;r<i;r++)r in e&&t.call(n,e[r],r,e)})},function(t,e){Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)})},function(t,e){!function(){function t(t){t&&(t.setTargetAtTime||(t.setTargetAtTime=t.setTargetValueAtTime))}window.hasOwnProperty("webkitAudioContext")&&!window.hasOwnProperty("AudioContext")&&(window.AudioContext=webkitAudioContext,AudioContext.prototype.hasOwnProperty("createGain")||(AudioContext.prototype.createGain=AudioContext.prototype.createGainNode),AudioContext.prototype.hasOwnProperty("createDelay")||(AudioContext.prototype.createDelay=AudioContext.prototype.createDelayNode),AudioContext.prototype.hasOwnProperty("createScriptProcessor")||(AudioContext.prototype.createScriptProcessor=AudioContext.prototype.createJavaScriptNode),AudioContext.prototype.hasOwnProperty("createPeriodicWave")||(AudioContext.prototype.createPeriodicWave=AudioContext.prototype.createWaveTable),AudioContext.prototype.internal_createGain=AudioContext.prototype.createGain,AudioContext.prototype.createGain=function(){var e=this.internal_createGain();return t(e.gain),e},AudioContext.prototype.internal_createDelay=AudioContext.prototype.createDelay,AudioContext.prototype.createDelay=function(e){var i=e?this.internal_createDelay(e):this.internal_createDelay();return t(i.delayTime),i},AudioContext.prototype.internal_createBufferSource=AudioContext.prototype.createBufferSource,AudioContext.prototype.createBufferSource=function(){var e=this.internal_createBufferSource();return e.start?(e.internal_start=e.start,e.start=function(t,i,n){void 0!==n?e.internal_start(t||0,i,n):e.internal_start(t||0,i||0)}
2583):e.start=function(t,e,i){e||i?this.noteGrainOn(t||0,e,i):this.noteOn(t||0)},e.stop?(e.internal_stop=e.stop,e.stop=function(t){e.internal_stop(t||0)}):e.stop=function(t){this.noteOff(t||0)},t(e.playbackRate),e},AudioContext.prototype.internal_createDynamicsCompressor=AudioContext.prototype.createDynamicsCompressor,AudioContext.prototype.createDynamicsCompressor=function(){var e=this.internal_createDynamicsCompressor();return t(e.threshold),t(e.knee),t(e.ratio),t(e.reduction),t(e.attack),t(e.release),e},AudioContext.prototype.internal_createBiquadFilter=AudioContext.prototype.createBiquadFilter,AudioContext.prototype.createBiquadFilter=function(){var e=this.internal_createBiquadFilter();return t(e.frequency),t(e.detune),t(e.Q),t(e.gain),e},AudioContext.prototype.hasOwnProperty("createOscillator")&&(AudioContext.prototype.internal_createOscillator=AudioContext.prototype.createOscillator,AudioContext.prototype.createOscillator=function(){var e=this.internal_createOscillator();return e.start?(e.internal_start=e.start,e.start=function(t){e.internal_start(t||0)}):e.start=function(t){this.noteOn(t||0)},e.stop?(e.internal_stop=e.stop,e.stop=function(t){e.internal_stop(t||0)}):e.stop=function(t){this.noteOff(t||0)},e.setPeriodicWave||(e.setPeriodicWave=e.setWaveTable),t(e.frequency),t(e.detune),e})),window.hasOwnProperty("webkitOfflineAudioContext")&&!window.hasOwnProperty("OfflineAudioContext")&&(window.OfflineAudioContext=webkitOfflineAudioContext)}()},function(t,e){window.console||(window.console={},window.console.log=window.console.assert=function(){},window.console.warn=window.console.assert=function(){})},function(t,e){Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)})},function(t,e){!function(){if("performance"in window==0&&(window.performance={}),Date.now=Date.now||function(){return(new Date).getTime()},"now"in window.performance==0){var t=Date.now();performance.timing&&performance.timing.navigationStart&&(t=performance.timing.navigationStart),window.performance.now=function(){return Date.now()-t}}}()},function(t,e){for(var i=Date.now(),n=["ms","moz","webkit","o"],r=0;r<n.length&&!window.requestAnimationFrame;r++)window.requestAnimationFrame=window[n[r]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[n[r]+"CancelAnimationFrame"]||window[n[r]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t){if("function"!=typeof t)throw new TypeError(t+"is not a function");var e=Date.now(),n=16+i-e;return n<0&&(n=0),i=e,setTimeout((function(){i=Date.now(),t(performance.now())}),n)}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})},function(t,e){if("function"!=typeof window.Uint32Array&&"object"!=typeof window.Uint32Array){var i=function(t){var e=new Array;window[t]=function(t){if("number"==typeof t){Array.call(this,t),this.length=t;for(var e=0;e<this.length;e++)this[e]=0}else for(Array.call(this,t.length),this.length=t.length,e=0;e<this.length;e++)this[e]=t[e]},window[t].prototype=e,window[t].constructor=window[t]};i("Float32Array"),i("Uint32Array"),i("Uint16Array"),i("Int16Array"),i("ArrayBuffer")}},function(t,e,i){ 2584/** 2585 * @author samme 2586 * @copyright 2020 Photon Storm Ltd. 2587 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2588 */ 2589var n=i(270);t.exports=function(t,e,i,r){for(var s=t[0],o=1;o<t.length;o++){var a=t[o];n(a,s,e,i,r),s=a}return t}},function(t,e,i){ 2590/** 2591 * @author Richard Davey <[email protected]> 2592 * @copyright 2020 Photon Storm Ltd. 2593 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2594 */ 2595var n=i(44);t.exports=function(t,e,i,r,s){return n(t,"angle",e,i,r,s)}},function(t,e){t.exports=function(t,e,i){for(var n=0;n<t.length;n++){var r=t[n];e.call(i,r)}return t}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=0);for(var n=i;n<t.length;n++){var r=t[n],s=!0;for(var o in e)r[o]!==e[o]&&(s=!1);if(s)return r}return null}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=0);for(var n=i;n<t.length;n++){var r=t[n],s=!0;for(var o in e)r[o]!==e[o]&&(s=!1);if(s)return r}return null}}
vendor: 17,423 bytes, lines 2595-2757
2595,function(t,e,i){ 2596/** 2597 * @author Richard Davey <[email protected]> 2598 * @copyright 2020 Photon Storm Ltd. 2599 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2600 */ 2601var n=i(283),r=i(122),s=i(2),o=i(1),a=new(i(127))({sys:{queueDepthSort:o,events:{once:o}}},0,0,1,1);t.exports=function(t,e){void 0===e&&(e={});var i=e.hasOwnProperty("width"),o=e.hasOwnProperty("height"),h=s(e,"width",-1),u=s(e,"height",-1),l=s(e,"cellWidth",1),c=s(e,"cellHeight",l),f=s(e,"position",r.TOP_LEFT),d=s(e,"x",0),p=s(e,"y",0),v=0,g=0,m=h*l,y=u*c;a.setPosition(d,p),a.setSize(l,c);for(var x=0;x<t.length;x++)if(n(t[x],a,f),i&&-1===h)a.x+=l;else if(o&&-1===u)a.y+=c;else if(o&&!i){if(g+=c,a.y+=c,g===y&&(g=0,v+=l,a.y=p,a.x+=l,v===m))break}else if(v+=l,a.x+=l,v===m&&(v=0,g+=c,a.x=d,a.y+=c,g===y))break;return t}},function(t,e,i){ 2602/** 2603 * @author Richard Davey <[email protected]> 2604 * @copyright 2020 Photon Storm Ltd. 2605 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2606 */ 2607var n=i(18),r={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,r){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=n(t,0,1),this._alphaTR=n(e,0,1),this._alphaBL=n(i,0,1),this._alphaBR=n(r,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=n(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=n(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=n(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=n(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=r},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},function(t,e){t.exports={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}}},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e,i){ 2608/** 2609 * @author Richard Davey <[email protected]> 2610 * @copyright 2020 Photon Storm Ltd. 2611 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2612 */ 2613var n=i(10),r=i(302),s=i(3),o={prepareBoundsOutput:function(t,e){return void 0===e&&(e=!1),0!==this.rotation&&r(t,this.x,this.y,this.rotation),e&&this.parentContainer&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t),t},getCenter:function(t){return void 0===t&&(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,r,s,o,a,h,u;if(void 0===t&&(t=new n),this.parentContainer){var l=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),l.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),l.transformPoint(t.x,t.y,t),r=t.x,s=t.y,this.getBottomLeft(t),l.transformPoint(t.x,t.y,t),o=t.x,a=t.y,this.getBottomRight(t),l.transformPoint(t.x,t.y,t),h=t.x,u=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),r=t.x,s=t.y,this.getBottomLeft(t),o=t.x,a=t.y,this.getBottomRight(t),h=t.x,u=t.y;return t.x=Math.min(e,r,o,h),t.y=Math.min(i,s,a,u),t.width=Math.max(e,r,o,h)-t.x,t.height=Math.max(i,s,a,u)-t.y,t}};t.exports=o},function(t,e){ 2614/** 2615 * @author Richard Davey <[email protected]> 2616 * @copyright 2020 Photon Storm Ltd. 2617 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2618 */ 2619t.exports="blur"},function(t,e){ 2620/** 2621 * @author Richard Davey <[email protected]> 2622 * @copyright 2020 Photon Storm Ltd. 2623 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2624 */ 2625t.exports="boot"},function(t,e){ 2626/** 2627 * @author Richard Davey <[email protected]> 2628 * @copyright 2020 Photon Storm Ltd. 2629 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2630 */ 2631t.exports="contextlost"},function(t,e){ 2632/** 2633 * @author Richard Davey <[email protected]> 2634 * @copyright 2020 Photon Storm Ltd. 2635 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2636 */ 2637t.exports="contextrestored"},function(t,e){ 2638/** 2639 * @author Richard Davey <[email protected]> 2640 * @copyright 2020 Photon Storm Ltd. 2641 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2642 */ 2643t.exports="destroy"},function(t,e){ 2644/** 2645 * @author Richard Davey <[email protected]> 2646 * @copyright 2020 Photon Storm Ltd. 2647 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2648 */ 2649t.exports="focus"},function(t,e){ 2650/** 2651 * @author Richard Davey <[email protected]> 2652 * @copyright 2020 Photon Storm Ltd. 2653 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2654 */ 2655t.exports="hidden"},function(t,e){ 2656/** 2657 * @author Richard Davey <[email protected]> 2658 * @copyright 2020 Photon Storm Ltd. 2659 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2660 */ 2661t.exports="pause"},function(t,e){ 2662/** 2663 * @author Richard Davey <[email protected]> 2664 * @copyright 2020 Photon Storm Ltd. 2665 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2666 */ 2667t.exports="postrender"},function(t,e){ 2668/** 2669 * @author Richard Davey <[email protected]> 2670 * @copyright 2020 Photon Storm Ltd. 2671 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2672 */ 2673t.exports="poststep"},function(t,e){ 2674/** 2675 * @author Richard Davey <[email protected]> 2676 * @copyright 2020 Photon Storm Ltd. 2677 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2678 */ 2679t.exports="prerender"},function(t,e){ 2680/** 2681 * @author Richard Davey <[email protected]> 2682 * @copyright 2020 Photon Storm Ltd. 2683 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2684 */ 2685t.exports="prestep"},function(t,e){ 2686/** 2687 * @author Richard Davey <[email protected]> 2688 * @copyright 2020 Photon Storm Ltd. 2689 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2690 */ 2691t.exports="ready"},function(t,e){ 2692/** 2693 * @author Richard Davey <[email protected]> 2694 * @copyright 2020 Photon Storm Ltd. 2695 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2696 */ 2697t.exports="resume"},function(t,e){ 2698/** 2699 * @author Richard Davey <[email protected]> 2700 * @copyright 2020 Photon Storm Ltd. 2701 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2702 */ 2703t.exports="step"},function(t,e){ 2704/** 2705 * @author Richard Davey <[email protected]> 2706 * @copyright 2020 Photon Storm Ltd. 2707 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2708 */ 2709t.exports="visible"},function(t,e){ 2710/** 2711 * @author Richard Davey <[email protected]> 2712 * @copyright 2020 Photon Storm Ltd. 2713 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2714 */ 2715t.exports="postrender"},function(t,e){ 2716/** 2717 * @author Richard Davey <[email protected]> 2718 * @copyright 2020 Photon Storm Ltd. 2719 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2720 */ 2721t.exports="prerender"},function(t,e){ 2722/** 2723 * @author Richard Davey <[email protected]> 2724 * @copyright 2020 Photon Storm Ltd. 2725 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2726 */ 2727t.exports="render"},function(t,e){ 2728/** 2729 * @author Richard Davey <[email protected]> 2730 * @copyright 2020 Photon Storm Ltd. 2731 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2732 */ 2733t.exports="resize"},function(t,e){t.exports={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}}},function(t,e,i){ 2734/** 2735 * @author Richard Davey <[email protected]> 2736 * @copyright 2020 Photon Storm Ltd. 2737 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2738 */ 2739var n=i(35),r=i(96),s=i(6),o=i(97),a=i(3),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:o.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=s(t,"from",0),t.to=s(t,"to",1);var h=r(t,"positionOnPath",!1);this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=s(t,"rotationOffset",0);var u=s(t,"startAt",e);if(u&&(t.onStart=function(t){var e=t.data[0];e.progress=u,e.elapsed=e.duration*u;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.target[e.key]=e.current}),this.pathOffset||(this.pathOffset=new a(this.x,this.y)),this.pathVector||(this.pathVector=new a),this.pathDelta||(this.pathDelta=new a),this.pathDelta.reset(),this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=o.PLAYING_FORWARD,this.rotateToPath){var l=this.path.getPoint(.1);this.rotation=Math.atan2(l.y-this.y,l.x-this.x)+n(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],i=this.pathDelta,r=this.pathVector;if(i.copy(r).negate(),e.state===o.COMPLETE)return this.path.getPoint(1,r),i.add(r),r.add(this.pathOffset),void this.setPosition(r.x,r.y);if(e.state!==o.PLAYING_FORWARD&&e.state!==o.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),r),i.add(r),r.add(this.pathOffset);var s=this.x,a=this.y;this.setPosition(r.x,r.y);var h=this.x-s,u=this.y-a;if(0===h&&0===u)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(u,h)+n(this.pathRotationOffset))}}};t.exports=h},function(t,e){ 2740/** 2741 * @author Richard Davey <[email protected]> 2742 * @copyright 2020 Photon Storm Ltd. 2743 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2744 */ 2745var i={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){ 2746/** 2747 * @author Richard Davey <[email protected]> 2748 * @copyright 2020 Photon Storm Ltd. 2749 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2750 */ 2751var i={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=i},function(t,e){ 2752/** 2753 * @author Richard Davey <[email protected]> 2754 * @copyright 2020 Photon Storm Ltd. 2755 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2756 */ 2757var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,
2757ch:0}}};t.exports=i},function(t,e){t.exports={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,n){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,n=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=n,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}}},function(t,e){ 2758/** 2759 * @author Richard Davey <[email protected]> 2760 * @copyright 2020 Photon Storm Ltd. 2761 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2762 */ 2763t.exports="changedata"},function(t,e){ 2764/** 2765 * @author Richard Davey <[email protected]> 2766 * @copyright 2020 Photon Storm Ltd. 2767 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2768 */ 2769t.exports="changedata-"},function(t,e){ 2770/** 2771 * @author Richard Davey <[email protected]> 2772 * @copyright 2020 Photon Storm Ltd. 2773 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2774 */ 2775t.exports="destroy"},function(t,e){ 2776/** 2777 * @author Richard Davey <[email protected]> 2778 * @copyright 2020 Photon Storm Ltd. 2779 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2780 */ 2781t.exports="removedata"},function(t,e){ 2782/** 2783 * @author Richard Davey <[email protected]> 2784 * @copyright 2020 Photon Storm Ltd. 2785 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2786 */ 2787t.exports="setdata"},function(t,e){ 2788/** 2789 * @author Richard Davey <[email protected]> 2790 * @copyright 2020 Photon Storm Ltd. 2791 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2792 */ 2793t.exports="addedtoscene"},function(t,e){ 2794/** 2795 * @author Richard Davey <[email protected]> 2796 * @copyright 2020 Photon Storm Ltd. 2797 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2798 */ 2799t.exports="destroy"},function(t,e){ 2800/** 2801 * @author Richard Davey <[email protected]> 2802 * @copyright 2020 Photon Storm Ltd. 2803 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2804 */ 2805t.exports="removedfromscene"},function(t,e){ 2806/** 2807 * @author Richard Davey <[email protected]> 2808 * @copyright 2020 Photon Storm Ltd. 2809 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2810 */ 2811t.exports="complete"},function(t,e){ 2812/** 2813 * @author Richard Davey <[email protected]> 2814 * @copyright 2020 Photon Storm Ltd. 2815 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2816 */ 2817t.exports="created"},function(t,e){ 2818/** 2819 * @author Richard Davey <[email protected]> 2820 * @copyright 2020 Photon Storm Ltd. 2821 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2822 */ 2823t.exports="error"},function(t,e){ 2824/** 2825 * @author Richard Davey <[email protected]> 2826 * @copyright 2020 Photon Storm Ltd. 2827 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2828 */ 2829t.exports="loop"},function(t,e){ 2830/** 2831 * @author Richard Davey <[email protected]> 2832 * @copyright 2020 Photon Storm Ltd. 2833 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2834 */ 2835t.exports="play"},function(t,e){ 2836/** 2837 * @author Richard Davey <[email protected]> 2838 * @copyright 2020 Photon Storm Ltd. 2839 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2840 */ 2841t.exports="seeked"},function(t,e){ 2842/** 2843 * @author Richard Davey <[email protected]> 2844 * @copyright 2020 Photon Storm Ltd. 2845 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2846 */ 2847t.exports="seeking"},function(t,e){ 2848/** 2849 * @author Richard Davey <[email protected]> 2850 * @copyright 2020 Photon Storm Ltd. 2851 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2852 */ 2853t.exports="stop"},function(t,e){ 2854/** 2855 * @author Richard Davey <[email protected]> 2856 * @copyright 2020 Photon Storm Ltd. 2857 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2858 */ 2859t.exports="timeout"},function(t,e){ 2860/** 2861 * @author Richard Davey <[email protected]> 2862 * @copyright 2020 Photon Storm Ltd. 2863 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2864 */ 2865t.exports="unlocked"}
2865,function(t,e,i){ 2866/** 2867 * @author Richard Davey <[email protected]> 2868 * @copyright 2020 Photon Storm Ltd. 2869 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2870 */ 2871var n=i(44);t.exports=function(t,e,i,r,s){return n(t,"alpha",e,i,r,s)}},function(t,e,i){ 2872/** 2873 * @author Richard Davey <[email protected]> 2874 * @copyright 2020 Photon Storm Ltd. 2875 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2876 */ 2877var n=i(44);t.exports=function(t,e,i,r,s){return n(t,"x",e,i,r,s)}},function(t,e,i){ 2878/** 2879 * @author Richard Davey <[email protected]> 2880 * @copyright 2020 Photon Storm Ltd. 2881 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2882 */ 2883var n=i(44);t.exports=function(t,e,i,r,s,o,a){return null==i&&(i=e),n(t,"x",e,r,o,a),n(t,"y",i,s,o,a)}},function(t,e,i){ 2884/** 2885 * @author Richard Davey <[email protected]> 2886 * @copyright 2020 Photon Storm Ltd. 2887 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2888 */ 2889var n=i(44);t.exports=function(t,e,i,r,s){return n(t,"y",e,i,r,s)}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=6.28);for(var r=i,s=(n-i)/t.length,o=0;o<t.length;o++)t[o].x=e.x+e.radius*Math.cos(r),t[o].y=e.y+e.radius*Math.sin(r),r+=s;return t}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=6.28);for(var r=i,s=(n-i)/t.length,o=e.width/2,a=e.height/2,h=0;h<t.length;h++)t[h].x=e.x+o*Math.cos(r),t[h].y=e.y+a*Math.sin(r),r+=s;return t}},function(t,e,i){ 2890/** 2891 * @author Richard Davey <[email protected]> 2892 * @copyright 2020 Photon Storm Ltd. 2893 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2894 */ 2895var n=i(168);t.exports=function(t,e){for(var i=n(e,t.length),r=0;r<t.length;r++){var s=t[r],o=i[r];s.x=o.x,s.y=o.y}return t}},function(t,e,i){ 2896/** 2897 * @author Richard Davey <[email protected]> 2898 * @copyright 2020 Photon Storm Ltd. 2899 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2900 */ 2901var n=i(310),r=i(175),s=i(176);t.exports=function(t,e,i){void 0===i&&(i=0);var o=n(e,!1,t.length);i>0?r(o,i):i<0&&s(o,Math.abs(i));for(var a=0;a<t.length;a++)t[a].x=o[a].x,t[a].y=o[a].y;return t}},function(t,e,i){ 2902/** 2903 * @author Richard Davey <[email protected]> 2904 * @copyright 2020 Photon Storm Ltd. 2905 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2906 */ 2907var n=i(311);t.exports=function(t,e,i){var r=n({x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},i),s=n({x1:e.x2,y1:e.y2,x2:e.x3,y2:e.y3},i),o=n({x1:e.x3,y1:e.y3,x2:e.x1,y2:e.y1},i);r.pop(),s.pop(),o.pop();for(var a=(r=r.concat(s,o)).length/t.length,h=0,u=0;u<t.length;u++){var l=t[u],c=r[Math.floor(h)];l.x=c.x,l.y=c.y,h+=a}return t}},function(t,e){t.exports=function(t,e,i){for(var n=0;n<t.length;n++)t[n].anims.play(e,i);return t}},function(t,e,i){ 2908/** 2909 * @author Richard Davey <[email protected]> 2910 * @copyright 2020 Photon Storm Ltd. 2911 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2912 */ 2913var n=i(166);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},function(t,e,i){ 2914/** 2915 * @author Richard Davey <[email protected]> 2916 * @copyright 2020 Photon Storm Ltd. 2917 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2918 */ 2919var n=i(177);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},function(t,e,i){ 2920/** 2921 * @author Richard Davey <[email protected]> 2922 * @copyright 2020 Photon Storm Ltd. 2923 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2924 */ 2925var n=i(169);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},function(t,e,i){ 2926/** 2927 * @author Richard Davey <[email protected]> 2928 * @copyright 2020 Photon Storm Ltd. 2929 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2930 */ 2931var n=i(170);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}}
2931,function(t,e,i){ 2932/** 2933 * @author Richard Davey <[email protected]> 2934 * @copyright 2020 Photon Storm Ltd. 2935 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2936 */ 2937var n=i(178);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},function(t,e,i){ 2938/** 2939 * @author Richard Davey <[email protected]> 2940 * @copyright 2020 Photon Storm Ltd. 2941 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2942 */ 2943var n=i(44);t.exports=function(t,e,i,r,s){return n(t,"rotation",e,i,r,s)}},function(t,e,i){ 2944/** 2945 * @author Richard Davey <[email protected]> 2946 * @copyright 2020 Photon Storm Ltd. 2947 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2948 */ 2949var n=i(179),r=i(48);t.exports=function(t,e,i){for(var s=e.x,o=e.y,a=0;a<t.length;a++){var h=t[a];n(h,s,o,i,Math.max(1,r(h.x,h.y,s,o)))}return t}},function(t,e,i){ 2950/** 2951 * @author Richard Davey <[email protected]> 2952 * @copyright 2020 Photon Storm Ltd. 2953 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2954 */ 2955var n=i(179);t.exports=function(t,e,i,r){var s=e.x,o=e.y;if(0===r)return t;for(var a=0;a<t.length;a++)n(t[a],s,o,i,r);return t}},function(t,e,i){ 2956/** 2957 * @author Richard Davey <[email protected]> 2958 * @copyright 2020 Photon Storm Ltd. 2959 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2960 */ 2961var n=i(44);t.exports=function(t,e,i,r,s){return n(t,"scaleX",e,i,r,s)}},function(t,e,i){ 2962/** 2963 * @author Richard Davey <[email protected]> 2964 * @copyright 2020 Photon Storm Ltd. 2965 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2966 */ 2967var n=i(44);t.exports=function(t,e,i,r,s,o,a){return null==i&&(i=e),n(t,"scaleX",e,r,o,a),n(t,"scaleY",i,s,o,a)}},function(t,e,i){ 2968/** 2969 * @author Richard Davey <[email protected]> 2970 * @copyright 2020 Photon Storm Ltd. 2971 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2972 */ 2973var n=i(44);t.exports=function(t,e,i,r,s){return n(t,"scaleY",e,i,r,s)}},function(t,e,i){ 2974/** 2975 * @author Richard Davey <[email protected]> 2976 * @copyright 2020 Photon Storm Ltd. 2977 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2978 */ 2979var n=i(27);t.exports=function(t,e,i,r,s){return n(t,"alpha",e,i,r,s)}},function(t,e,i){ 2980/** 2981 * @author Richard Davey <[email protected]> 2982 * @copyright 2020 Photon Storm Ltd. 2983 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2984 */ 2985var n=i(27);t.exports=function(t,e,i,r){return n(t,"blendMode",e,0,i,r)}},function(t,e,i){ 2986/** 2987 * @author Richard Davey <[email protected]> 2988 * @copyright 2020 Photon Storm Ltd. 2989 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2990 */ 2991var n=i(27);t.exports=function(t,e,i,r,s){return n(t,"depth",e,i,r,s)}},function(t,e){t.exports=function(t,e,i){for(var n=0;n<t.length;n++)t[n].setInteractive(e,i);return t}},function(t,e,i){ 2992/** 2993 * @author Richard Davey <[email protected]> 2994 * @copyright 2020 Photon Storm Ltd. 2995 * @license {@link https://opensource.org/licenses/MIT|MIT License} 2996 */ 2997var n=i(27);t.exports=function(t,e,i,r,s,o,a){return null==i&&(i=e),n(t,"originX",e,r,o,a),n(t,"originY",i,s,o,a),t.forEach((function(t){t.updateDisplayOrigin()})),t}},function(t,e,i){ 2998/** 2999 * @author Richard Davey <[email protected]> 3000 * @copyright 2020 Photon Storm Ltd. 3001 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3002 */ 3003var n=i(27);t.exports=function(t,e,i,r,s){return n(t,"rotation",e,i,r,s)}},function(t,e,i){ 3004/** 3005 * @author Richard Davey <[email protected]> 3006 * @copyright 2020 Photon Storm Ltd. 3007 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3008 */ 3009var n=i(27);
3009t.exports=function(t,e,i,r,s,o,a){return null==i&&(i=e),n(t,"scaleX",e,r,o,a),n(t,"scaleY",i,s,o,a)}},function(t,e,i){ 3010/** 3011 * @author Richard Davey <[email protected]> 3012 * @copyright 2020 Photon Storm Ltd. 3013 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3014 */ 3015var n=i(27);t.exports=function(t,e,i,r,s){return n(t,"scaleX",e,i,r,s)}},function(t,e,i){ 3016/** 3017 * @author Richard Davey <[email protected]> 3018 * @copyright 2020 Photon Storm Ltd. 3019 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3020 */ 3021var n=i(27);t.exports=function(t,e,i,r,s){return n(t,"scaleY",e,i,r,s)}},function(t,e,i){ 3022/** 3023 * @author Richard Davey <[email protected]> 3024 * @copyright 2020 Photon Storm Ltd. 3025 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3026 */ 3027var n=i(27);t.exports=function(t,e,i,r,s,o,a){return null==i&&(i=e),n(t,"scrollFactorX",e,r,o,a),n(t,"scrollFactorY",i,s,o,a)}},function(t,e,i){ 3028/** 3029 * @author Richard Davey <[email protected]> 3030 * @copyright 2020 Photon Storm Ltd. 3031 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3032 */ 3033var n=i(27);t.exports=function(t,e,i,r,s){return n(t,"scrollFactorX",e,i,r,s)}},function(t,e,i){ 3034/** 3035 * @author Richard Davey <[email protected]> 3036 * @copyright 2020 Photon Storm Ltd. 3037 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3038 */ 3039var n=i(27);t.exports=function(t,e,i,r,s){return n(t,"scrollFactorY",e,i,r,s)}},function(t,e){t.exports=function(t,e,i,n,r){for(var s=0;s<t.length;s++)t[s].setTint(e,i,n,r);return t}},function(t,e,i){ 3040/** 3041 * @author Richard Davey <[email protected]> 3042 * @copyright 2020 Photon Storm Ltd. 3043 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3044 */ 3045var n=i(27);t.exports=function(t,e,i,r){return n(t,"visible",e,0,i,r)}},function(t,e,i){ 3046/** 3047 * @author Richard Davey <[email protected]> 3048 * @copyright 2020 Photon Storm Ltd. 3049 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3050 */ 3051var n=i(27);t.exports=function(t,e,i,r,s){return n(t,"x",e,i,r,s)}},function(t,e,i){ 3052/** 3053 * @author Richard Davey <[email protected]> 3054 * @copyright 2020 Photon Storm Ltd. 3055 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3056 */ 3057var n=i(27);t.exports=function(t,e,i,r,s,o,a){return null==i&&(i=e),n(t,"x",e,r,o,a),n(t,"y",i,s,o,a)}},function(t,e,i){ 3058/** 3059 * @author Richard Davey <[email protected]> 3060 * @copyright 2020 Photon Storm Ltd. 3061 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3062 */ 3063var n=i(27);t.exports=function(t,e,i,r,s){return n(t,"y",e,i,r,s)}},function(t,e,i){ 3064/** 3065 * @author Richard Davey <[email protected]> 3066 * @copyright 2020 Photon Storm Ltd. 3067 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3068 */ 3069var n=i(3);t.exports=function(t,e,i,r,s){var o,a,h,u,l,c;if(void 0===r&&(r=0),void 0===s&&(s=new n),t.length>1)if(0===r){var f=t.length-1;for(o=t[f].x,a=t[f].y,h=f-1;h>=0;h--)u=(c=t[h]).x,l=c.y,c.x=o,c.y=a,o=u,a=l;t[f].x=e,t[f].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h<t.length;h++)u=(c=t[h]).x,l=c.y,c.x=o,c.y=a,o=u,a=l;t[0].x=e,t[0].y=i}else o=t[0].x,a=t[0].y,t[0].x=e,t[0].y=i;return s.x=o,s.y=a,s}},function(t,e,i){ 3070/** 3071 * @author Richard Davey <[email protected]> 3072 * @copyright 2020 Photon Storm Ltd. 3073 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3074 */ 3075var n=i(129);t.exports=function(t){return n(t)}},function(t,e,i){ 3076/** 3077 * @author Richard Davey <[email protected]> 3078 * @copyright 2020 Photon Storm Ltd. 3079 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3080 */ 3081var n=i(180);
3081t.exports=function(t,e,i,r,s){void 0===s&&(s=!1);var o,a=Math.abs(r-i)/t.length;if(s)for(o=0;o<t.length;o++)t[o][e]+=n(o*a,i,r);else for(o=0;o<t.length;o++)t[o][e]=n(o*a,i,r);return t}},function(t,e,i){ 3082/** 3083 * @author Richard Davey <[email protected]> 3084 * @copyright 2020 Photon Storm Ltd. 3085 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3086 */ 3087var n=i(181);t.exports=function(t,e,i,r,s){void 0===s&&(s=!1);var o,a=Math.abs(r-i)/t.length;if(s)for(o=0;o<t.length;o++)t[o][e]+=n(o*a,i,r);else for(o=0;o<t.length;o++)t[o][e]=n(o*a,i,r);return t}},function(t,e){t.exports=function(t,e,i,n,r){void 0===r&&(r=!1);var s,o=Math.abs(n-i)/t.length;if(r)for(s=0;s<t.length;s++)t[s][e]+=s*o+i;else for(s=0;s<t.length;s++)t[s][e]=s*o+i;return t}},function(t,e){t.exports=function(t){for(var e=0;e<t.length;e++)t[e].visible=!t[e].visible;return t}},function(t,e,i){ 3088/** 3089 * @author Richard Davey <[email protected]> 3090 * @author samme <[email protected]> 3091 * @copyright 2020 Photon Storm Ltd. 3092 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3093 */ 3094var n=i(66);t.exports=function(t,e,i){void 0===i&&(i=0);for(var r=0;r<t.length;r++){var s=t[r];s.x=n(s.x,e.left-i,e.right+i),s.y=n(s.y,e.top-i,e.bottom+i)}return t}},function(t,e,i){ 3095/** 3096 * @author Richard Davey <[email protected]> 3097 * @copyright 2020 Photon Storm Ltd. 3098 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3099 */ 3100t.exports={Animation:i(182),AnimationFrame:i(313),AnimationManager:i(315),AnimationState:i(162),Events:i(130)}},function(t,e){ 3101/** 3102 * @author Richard Davey <[email protected]> 3103 * @copyright 2020 Photon Storm Ltd. 3104 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3105 */ 3106t.exports="add"},function(t,e){ 3107/** 3108 * @author Richard Davey <[email protected]> 3109 * @copyright 2020 Photon Storm Ltd. 3110 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3111 */ 3112t.exports="animationcomplete"},function(t,e){ 3113/** 3114 * @author Richard Davey <[email protected]> 3115 * @copyright 2020 Photon Storm Ltd. 3116 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3117 */ 3118t.exports="animationcomplete-"},function(t,e){ 3119/** 3120 * @author Richard Davey <[email protected]> 3121 * @copyright 2020 Photon Storm Ltd. 3122 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3123 */ 3124t.exports="animationrepeat"},function(t,e){ 3125/** 3126 * @author Richard Davey <[email protected]> 3127 * @copyright 2020 Photon Storm Ltd. 3128 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3129 */ 3130t.exports="animationrestart"},function(t,e){ 3131/** 3132 * @author Richard Davey <[email protected]> 3133 * @copyright 2020 Photon Storm Ltd. 3134 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3135 */ 3136t.exports="animationstart"},function(t,e){ 3137/** 3138 * @author Richard Davey <[email protected]> 3139 * @copyright 2020 Photon Storm Ltd. 3140 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3141 */ 3142t.exports="animationstop"},function(t,e){ 3143/** 3144 * @author Richard Davey <[email protected]> 3145 * @copyright 2020 Photon Storm Ltd. 3146 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3147 */ 3148t.exports="animationupdate"},function(t,e){ 3149/** 3150 * @author Richard Davey <[email protected]> 3151 * @copyright 2020 Photon Storm Ltd. 3152 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3153 */ 3154t.exports="pauseall"},function(t,e){ 3155/** 3156 * @author Richard Davey <[email protected]> 3157 * @copyright 2020 Photon Storm Ltd. 3158 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3159 */ 3160t.exports="remove"},function(t,e){ 3161/** 3162 * @author Richard Davey <[email protected]> 3163 * @copyright 2020 Photon Storm Ltd. 3164 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3165 */ 3166t.exports="resumeall"}
vendor: 5,324 bytes, lines 3166-3208
3166,function(t,e,i){ 3167/** 3168 * @author Richard Davey <[email protected]> 3169 * @copyright 2020 Photon Storm Ltd. 3170 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3171 */ 3172t.exports={BaseCache:i(317),CacheManager:i(319),Events:i(318)}},function(t,e){ 3173/** 3174 * @author Richard Davey <[email protected]> 3175 * @copyright 2020 Photon Storm Ltd. 3176 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3177 */ 3178t.exports="add"},function(t,e){ 3179/** 3180 * @author Richard Davey <[email protected]> 3181 * @copyright 2020 Photon Storm Ltd. 3182 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3183 */ 3184t.exports="remove"},function(t,e,i){ 3185/** 3186 * @author Richard Davey <[email protected]> 3187 * @copyright 2020 Photon Storm Ltd. 3188 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3189 */ 3190t.exports={Controls:i(715),Scene2D:i(718)}},function(t,e,i){ 3191/** 3192 * @author Richard Davey <[email protected]> 3193 * @copyright 2020 Photon Storm Ltd. 3194 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3195 */ 3196t.exports={FixedKeyControl:i(716),SmoothedKeyControl:i(717)}},function(t,e,i){ 3197/** 3198 * @author Richard Davey <[email protected]> 3199 * @copyright 2020 Photon Storm Ltd. 3200 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3201 */ 3202var n=i(0),r=i(6),s=new n({initialize:function(t){this.camera=r(t,"camera",null),this.left=r(t,"left",null),this.right=r(t,"right",null),this.up=r(t,"up",null),this.down=r(t,"down",null),this.zoomIn=r(t,"zoomIn",null),this.zoomOut=r(t,"zoomOut",null),this.zoomSpeed=r(t,"zoomSpeed",.01),this.speedX=0,this.speedY=0;var e=r(t,"speed",null);"number"==typeof e?(this.speedX=e,this.speedY=e):(this.speedX=r(t,"speed.x",0),this.speedY=r(t,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this.up&&this.up.isDown?e.scrollY-=this.speedY*t|0:this.down&&this.down.isDown&&(e.scrollY+=this.speedY*t|0),this.left&&this.left.isDown?e.scrollX-=this.speedX*t|0:this.right&&this.right.isDown&&(e.scrollX+=this.speedX*t|0),this.zoomIn&&this.zoomIn.isDown?(e.zoom-=this.zoomSpeed,e.zoom<.1&&(e.zoom=.1)):this.zoomOut&&this.zoomOut.isDown&&(e.zoom+=this.zoomSpeed)}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=s},function(t,e,i){ 3203/** 3204 * @author Richard Davey <[email protected]> 3205 * @copyright 2020 Photon Storm Ltd. 3206 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3207 */ 3208var n=i(0),r=i(6),s=new n({initialize:function(t){this.camera=r(t,"camera",null),this.left=r(t,"left",null),this.right=r(t,"right",null),this.up=r(t,"up",null),this.down=r(t,"down",null),this.zoomIn=r(t,"zoomIn",null),this.zoomOut=r(t,"zoomOut",null),this.zoomSpeed=r(t,"zoomSpeed",.01),this.accelX=0,this.accelY=0;var e=r(t,"acceleration",null);"number"==typeof e?(this.accelX=e,this.accelY=e):(this.accelX=r(t,"acceleration.x",0),this.accelY=r(t,"acceleration.y",0)),this.dragX=0,this.dragY=0;var i=r(t,"drag",null);"number"==typeof i?(this.dragX=i,this.dragY=i):(this.dragX=r(t,"drag.x",0),this.dragY=r(t,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var n=r(t,"maxSpeed",null);"number"==typeof n?(this.maxSpeedX=n,this.maxSpeedY=n):(this.maxSpeedX=r(t,"maxSpeed.x",0),this.maxSpeedY=r(t,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this._speedX>0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.001&&(e.zoom=.001))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=s}
3208,function(t,e,i){ 3209/** 3210 * @author Richard Davey <[email protected]> 3211 * @copyright 2020 Photon Storm Ltd. 3212 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3213 */ 3214t.exports={Camera:i(320),BaseCamera:i(131),CameraManager:i(775),Effects:i(327),Events:i(36)}},function(t,e){ 3215/** 3216 * @author Richard Davey <[email protected]> 3217 * @copyright 2020 Photon Storm Ltd. 3218 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3219 */ 3220t.exports="cameradestroy"},function(t,e){ 3221/** 3222 * @author Richard Davey <[email protected]> 3223 * @copyright 2020 Photon Storm Ltd. 3224 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3225 */ 3226t.exports="camerafadeincomplete"},function(t,e){ 3227/** 3228 * @author Richard Davey <[email protected]> 3229 * @copyright 2020 Photon Storm Ltd. 3230 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3231 */ 3232t.exports="camerafadeinstart"},function(t,e){ 3233/** 3234 * @author Richard Davey <[email protected]> 3235 * @copyright 2020 Photon Storm Ltd. 3236 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3237 */ 3238t.exports="camerafadeoutcomplete"},function(t,e){ 3239/** 3240 * @author Richard Davey <[email protected]> 3241 * @copyright 2020 Photon Storm Ltd. 3242 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3243 */ 3244t.exports="camerafadeoutstart"},function(t,e){ 3245/** 3246 * @author Richard Davey <[email protected]> 3247 * @copyright 2020 Photon Storm Ltd. 3248 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3249 */ 3250t.exports="cameraflashcomplete"},function(t,e){ 3251/** 3252 * @author Richard Davey <[email protected]> 3253 * @copyright 2020 Photon Storm Ltd. 3254 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3255 */ 3256t.exports="cameraflashstart"},function(t,e){ 3257/** 3258 * @author Richard Davey <[email protected]> 3259 * @copyright 2020 Photon Storm Ltd. 3260 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3261 */ 3262t.exports="followupdate"},function(t,e){ 3263/** 3264 * @author Richard Davey <[email protected]> 3265 * @copyright 2020 Photon Storm Ltd. 3266 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3267 */ 3268t.exports="camerapancomplete"},function(t,e){ 3269/** 3270 * @author Richard Davey <[email protected]> 3271 * @copyright 2020 Photon Storm Ltd. 3272 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3273 */ 3274t.exports="camerapanstart"},function(t,e){ 3275/** 3276 * @author Richard Davey <[email protected]> 3277 * @copyright 2020 Photon Storm Ltd. 3278 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3279 */ 3280t.exports="postrender"},function(t,e){ 3281/** 3282 * @author Richard Davey <[email protected]> 3283 * @copyright 2020 Photon Storm Ltd. 3284 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3285 */ 3286t.exports="prerender"},function(t,e){ 3287/** 3288 * @author Richard Davey <[email protected]> 3289 * @copyright 2020 Photon Storm Ltd. 3290 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3291 */ 3292t.exports="camerarotatecomplete"},function(t,e){ 3293/** 3294 * @author Richard Davey <[email protected]> 3295 * @copyright 2020 Photon Storm Ltd. 3296 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3297 */ 3298t.exports="camerarotatestart"},function(t,e){ 3299/** 3300 * @author Richard Davey <[email protected]> 3301 * @copyright 2020 Photon Storm Ltd. 3302 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3303 */ 3304t.exports="camerashakecomplete"},function(t,e){ 3305/** 3306 * @author Richard Davey <[email protected]> 3307 * @copyright 2020 Photon Storm Ltd. 3308 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3309 */ 3310t.exports="camerashakestart"},function(t,e){ 3311/** 3312 * @author Richard Davey <[email protected]> 3313 * @copyright 2020 Photon Storm Ltd. 3314 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3315 */ 3316t.exports="camerazoomcomplete"},function(t,e){ 3317/** 3318 * @author Richard Davey <[email protected]> 3319 * @copyright 2020 Photon Storm Ltd. 3320 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3321 */ 3322t.exports="camerazoomstart"}
vendor: 10,921 bytes, lines 3322-3346
3322,function(t,e,i){ 3323/** 3324 * @author Richard Davey <[email protected]> 3325 * @copyright 2020 Photon Storm Ltd. 3326 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3327 */ 3328var n=i(18),r=i(0),s=i(36),o=new r({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,r,o,a,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===o&&(o=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),!o&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=r,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h;var u=t?s.FADE_OUT_START:s.FADE_IN_START;return this.camera.emit(u,this.camera,this,e,i,n,r),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration?this.alpha=this.direction?this.progress:1-this.progress:(this.alpha=this.direction?1:0,this.effectComplete()))},postRenderCanvas:function(t){if(!this.isRunning&&!this.isComplete)return!1;var e=this.camera;return t.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",t.fillRect(e.x,e.y,e.width,e.height),!0},postRenderWebGL:function(t,e){if(!this.isRunning&&!this.isComplete)return!1;var i=this.camera,n=this.red/255,r=this.green/255,s=this.blue/255;return t.drawFillRect(i.x,i.y,i.width,i.height,e(s,r,n,1),this.alpha),!0},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.isComplete=!0;var t=this.direction?s.FADE_OUT_COMPLETE:s.FADE_IN_COMPLETE;this.camera.emit(t,this.camera,this)},reset:function(){this.isRunning=!1,this.isComplete=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});t.exports=o},function(t,e,i){ 3329/** 3330 * @author Richard Davey <[email protected]> 3331 * @copyright 2020 Photon Storm Ltd. 3332 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3333 */ 3334var n=i(18),r=i(0),s=i(36),o=new r({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,r,o,a){return void 0===t&&(t=250),void 0===e&&(e=255),void 0===i&&(i=255),void 0===n&&(n=255),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!r&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,this.red=e,this.green=i,this.blue=n,this.alpha=1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a,this.camera.emit(s.FLASH_START,this.camera,this,t,e,i,n)),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration?this.alpha=1-this.progress:this.effectComplete())},postRenderCanvas:function(t){if(!this.isRunning)return!1;var e=this.camera;return t.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",t.fillRect(e.x,e.y,e.width,e.height),!0},postRenderWebGL:function(t,e){if(!this.isRunning)return!1;var i=this.camera,n=this.red/255,r=this.green/255,s=this.blue/255;return t.drawFillRect(i.x,i.y,i.width,i.height,e(s,r,n,1),this.alpha),!0},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(s.FLASH_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});t.exports=o},function(t,e,i){ 3335/** 3336 * @author Richard Davey <[email protected]> 3337 * @copyright 2020 Photon Storm Ltd. 3338 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3339 */ 3340var n=i(18),r=i(0),s=i(132),o=i(36),a=i(3),h=new r({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new a,this.current=new a,this.destination=new a,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,r,a,h){void 0===i&&(i=1e3),void 0===n&&(n=s.Linear),void 0===r&&(r=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene);var u=this.camera;return!r&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(u.scrollX,u.scrollY),this.destination.set(t,e),u.getScroll(t,e,this.current),"string"==typeof n&&s.hasOwnProperty(n)?this.ease=s[n]:"function"==typeof n&&(this.ease=n),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h,this.camera.emit(o.PAN_START,this.camera,this,i,t,e)),u},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=n(this._elapsed/this.duration,0,1);this.progress=i;var r=this.camera;if(this._elapsed<this.duration){var s=this.ease(i);r.getScroll(this.destination.x,this.destination.y,this.current);var o=this.source.x+(this.current.x-this.source.x)*s,a=this.source.y+(this.current.y-this.source.y)*s;r.setScroll(o,a),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,r,i,o,a)}else r.centerOn(this.destination.x,this.destination.y),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,r,i,r.scrollX,r.scrollY),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(o.PAN_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});t.exports=h},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},function(t,e,i){ 3341/** 3342 * @author Richard Davey <[email protected]> 3343 * @copyright 2020 Photon Storm Ltd. 3344 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3345 */ 3346var n=i(18),r=i(0),s=i(36),o=i(3),a=new r({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new o,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,r){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===n&&(n=null),void 0===r&&(r=this.camera.scene),!i&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=n,this._onUpdateScope=r,this.camera.emit(s.SHAKE_START,this.camera,this,t,e)),this.camera},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration){var i=this.intensity,r=this.camera.width,s=this.camera.height,o=this.camera.zoom;this._offsetX=(Math.random()*i.x*r*2-i.x*r)*o,this._offsetY=(Math.random()*i.y*s*2-i.y*s)*o,this.camera.roundPixels&&(this._offsetX=Math.round(this._offsetX),this._offsetY=Math.round(this._offsetY))}else this.effectComplete()},effectComplete:function(){this._offsetX=0,this._offsetY=0,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit
3346(s.SHAKE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._offsetX=0,this._offsetY=0,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.intensity=null}});t.exports=a},function(t,e,i){ 3347/** 3348 * @author Jason Nicholls <[email protected]> 3349 * @copyright 2018 Photon Storm Ltd. 3350 * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} 3351 */ 3352var n=i(18),r=i(0),s=i(36),o=i(132),a=new r({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(t,e,i,n,r,a,h){void 0===i&&(i=1e3),void 0===n&&(n=o.Linear),void 0===r&&(r=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),void 0===e&&(e=!1),this.shortestPath=e;var u=t;t<0?(u=-1*t,this.clockwise=!1):this.clockwise=!0;var l=360*Math.PI/180;u-=Math.floor(u/l)*l;var c=this.camera;if(!r&&this.isRunning)return c;if(this.isRunning=!0,this.duration=i,this.progress=0,this.source=c.rotation,this.destination=u,"string"==typeof n&&o.hasOwnProperty(n)?this.ease=o[n]:"function"==typeof n&&(this.ease=n),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h,this.shortestPath){var f=0,d=0;(f=this.destination>this.source?Math.abs(this.destination-this.source):Math.abs(this.destination+l)-this.source)<(d=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+l)-this.destination)?this.clockwise=!0:f>d&&(this.clockwise=!1)}
3352return this.camera.emit(s.ROTATE_START,this.camera,this,i,u),c},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=n(this._elapsed/this.duration,0,1);this.progress=i;var r=this.camera;if(this._elapsed<this.duration){var s=this.ease(i);this.current=r.rotation;var o=0,a=360*Math.PI/180,h=this.destination,u=this.current;!1===this.clockwise&&(h=this.current,u=this.destination),o=h>=u?Math.abs(h-u):Math.abs(h+a)-u;var l=0;l=this.clockwise?r.rotation+o*s:r.rotation-o*s,r.rotation=l,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,r,i,l)}else r.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,r,i,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(s.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});t.exports=a},function(t,e,i){ 3353/** 3354 * @author Richard Davey <[email protected]> 3355 * @copyright 2020 Photon Storm Ltd. 3356 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3357 */ 3358var n=i(18),r=i(0),s=i(132),o=i(36),a=new r({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,r,a){void 0===e&&(e=1e3),void 0===i&&(i=s.Linear),void 0===n&&(n=!1),void 0===r&&(r=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!n&&this.isRunning||(this.isRunning=!0,this.duration=e,this.progress=0,this.source=h.zoom,this.destination=t,"string"==typeof i&&s.hasOwnProperty(i)?this.ease=s[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=r,this._onUpdateScope=a,this.camera.emit
vendor: 11,672 bytes, lines 3358-3526
3358(o.ZOOM_START,this.camera,this,e,t)),h},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._elapsed<this.duration?(this.camera.zoom=this.source+(this.destination-this.source)*this.ease(this.progress),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress,this.camera.zoom)):(this.camera.zoom=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress,this.destination),this.effectComplete()))},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(o.ZOOM_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});t.exports=a},function(t,e,i){ 3359/** 3360 * @author Richard Davey <[email protected]> 3361 * @copyright 2020 Photon Storm Ltd. 3362 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3363 */ 3364var n=i(320),r=i(0),s=i(2),o=i(24),a=i(56),h=i(101),u=i(21),l=new r({initialize:function(t){this.scene=t,this.systems=t.sys,this.roundPixels=t.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,t.sys.events.once(u.BOOT,this.boot,this),t.sys.events.on(u.START,this.start,this)},boot:function(){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new n(0,0,t.scale.width,t.scale.height).setScene(this.scene),t.game.scale.on(h.RESIZE,this.onResize,this),this.systems.events.once(u.DESTROY,this.destroy,this)},start:function(){if(!this.main){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0]}var e=this.systems.events;e.on(u.UPDATE,this.update,this),e.once(u.SHUTDOWN,this.shutdown,this)},add:function(t,e,i,r,s,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===r&&(r=this.scene.sys.scale.height),void 0===s&&(s=!1),void 0===o&&(o="");var a=new n(t,e,i,r);return a.setName(o),a.setScene(this.scene),a.setRoundPixels(this.roundPixels),a.id=this.getNextID(),this.cameras.push(a),s&&(this.main=a),a},addExisting:function(t,e){return void 0===e&&(e=!1),-1===this.cameras.indexOf(t)?(t.id=this.getNextID(),t.setRoundPixels(this.roundPixels),this.cameras.push(t),e&&(this.main=t),t):null},getNextID:function(){for(var t=this.cameras,e=1,i=0;i<32;i++){for(var n=!1,r=0;r<t.length;r++){var s=t[r];s&&s.id===e&&(n=!0)}if(!n)return e;e<<=1}return 0},getTotal:function(t){void 0===t&&(t=!1);for(var e=0,i=this.cameras,n=0;n<i.length;n++){var r=i[n];(!t||t&&r.visible)&&e++}return e},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.scale.width,i=this.scene.sys.scale.height,n=0;n<t.length;n++){var r=t[n],o=s(r,"x",0),a=s(r,"y",0),h=s(r,"width",e),u=s(r,"height",i),l=this.add(o,a,h,u);l.name=s(r,"name",""),l.zoom=s(r,"zoom",1),l.rotation=s(r,"rotation",0),l.scrollX=s(r,"scrollX",0),l.scrollY=s(r,"scrollY",0),l.roundPixels=s(r,"roundPixels",!1),l.visible=s(r,"visible",!0);var c=s(r,"backgroundColor",!1);c&&l.setBackgroundColor(c);var f=s(r,"bounds",null);if(f){var d=s(f,"x",0),p=s(f,"y",0),v=s(f,"width",e),g=s(f,"height",i);l.setBounds(d,p,v,g)}}return this},getCamera:function(t){for(var e=this.cameras,i=0;i<e.length;i++)if(e[i].name===t)return e[i];return null},getCamerasBelowPointer:function(t){for(var e=this.cameras,i=t.x,n=t.y,r=[],s=0;s<e.length;s++){var o=e[s];o.visible&&o.inputEnabled&&a(o,i,n)&&r.unshift(o)}return r},remove:function(t,e){void 0===e&&(e=!0),Array.isArray(t)||(t=[t]);for(var i=0,n=this.cameras,r=0;r<t.length;r++){var s=n.indexOf(t[r]);-1!==s&&(e?n[s].destroy():n[s].renderList=[],n.splice(s,1),i++)}return!this.main&&n[0]&&(this.main=n[0]),i},render:function(t,e){for(var i=this.scene,n=this.cameras,r=0;r<this.cameras.length;r++){var s=n[r];if(s.visible&&s.alpha>0){s.preRender();var o=this.getVisibleChildren(e.getChildren(),s);t.render(i,o,s)}}},getVisibleChildren:function(t,e){for(var i=[],n=0;n<t.length;n++){var r=t[n];r.willRender(e)&&i.push(r)}return i},resetAll:function(){for(var t=0;t<this.cameras.length;t++)this.cameras[t].destroy();return this.cameras=[],this.main=this.add(),this.main},update:function(t,e){for(var i=0;i<this.cameras.length;i++)this.cameras[i].update(t,e)},onResize:function(t,e,i,n,r){for(var s=0;s<this.cameras.length;s++){var o=this.cameras[s];0===o._x&&0===o._y&&o._width===n&&o._height===r&&o.setSize(e.width,e.height)}},resize:function(t,e){for(var i=0;i<this.cameras.length;i++)this.cameras[i].setSize(t,e)},shutdown:function(){this.main=void 0;for(var t=0;t<this.cameras.length;t++)this.cameras[t].destroy();this.cameras=[];var e=this.systems.events;e.off(u.UPDATE,this.update,this),e.off(u.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.default.destroy(),this.scene.sys.events.off(u.START,this.start,this),this.scene=null,this.systems=null}});o.register("CameraManager",l,"cameras"),t.exports=l},function(t,e){ 3365/** 3366 * @author Richard Davey <[email protected]> 3367 * @copyright 2020 Photon Storm Ltd. 3368 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3369 */ 3370t.exports="enterfullscreen"},function(t,e){ 3371/** 3372 * @author Richard Davey <[email protected]> 3373 * @copyright 2020 Photon Storm Ltd. 3374 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3375 */ 3376t.exports="fullscreenfailed"},function(t,e){ 3377/** 3378 * @author Richard Davey <[email protected]> 3379 * @copyright 2020 Photon Storm Ltd. 3380 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3381 */ 3382t.exports="fullscreenunsupported"},function(t,e){ 3383/** 3384 * @author Richard Davey <[email protected]> 3385 * @copyright 2020 Photon Storm Ltd. 3386 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3387 */ 3388t.exports="leavefullscreen"},function(t,e){ 3389/** 3390 * @author Richard Davey <[email protected]> 3391 * @copyright 2020 Photon Storm Ltd. 3392 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3393 */ 3394t.exports="orientationchange"},function(t,e){ 3395/** 3396 * @author Richard Davey <[email protected]> 3397 * @copyright 2020 Photon Storm Ltd. 3398 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3399 */ 3400t.exports="resize"},function(t,e){ 3401/** 3402 * @author Richard Davey <[email protected]> 3403 * @copyright 2020 Photon Storm Ltd. 3404 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3405 */ 3406t.exports="addedtoscene"},function(t,e){ 3407/** 3408 * @author Richard Davey <[email protected]> 3409 * @copyright 2020 Photon Storm Ltd. 3410 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3411 */ 3412t.exports="boot"},function(t,e){ 3413/** 3414 * @author Richard Davey <[email protected]> 3415 * @copyright 2020 Photon Storm Ltd. 3416 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3417 */ 3418t.exports="create"},function(t,e){ 3419/** 3420 * @author Richard Davey <[email protected]> 3421 * @copyright 2020 Photon Storm Ltd. 3422 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3423 */ 3424t.exports="destroy"},function(t,e){ 3425/** 3426 * @author Richard Davey <[email protected]> 3427 * @copyright 2020 Photon Storm Ltd. 3428 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3429 */ 3430t.exports="pause"},function(t,e){ 3431/** 3432 * @author Richard Davey <[email protected]> 3433 * @copyright 2020 Photon Storm Ltd. 3434 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3435 */ 3436t.exports="postupdate"},function(t,e){ 3437/** 3438 * @author Richard Davey <[email protected]> 3439 * @copyright 2020 Photon Storm Ltd. 3440 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3441 */ 3442t.exports="preupdate"},function(t,e){ 3443/** 3444 * @author Richard Davey <[email protected]> 3445 * @copyright 2020 Photon Storm Ltd. 3446 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3447 */ 3448t.exports="ready"},function(t,e){ 3449/** 3450 * @author Richard Davey <[email protected]> 3451 * @copyright 2020 Photon Storm Ltd. 3452 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3453 */ 3454t.exports="removedfromscene"},function(t,e){ 3455/** 3456 * @author Richard Davey <[email protected]> 3457 * @copyright 2020 Photon Storm Ltd. 3458 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3459 */ 3460t.exports="render"},function(t,e){ 3461/** 3462 * @author Richard Davey <[email protected]> 3463 * @copyright 2020 Photon Storm Ltd. 3464 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3465 */ 3466t.exports="resume"},function(t,e){ 3467/** 3468 * @author Richard Davey <[email protected]> 3469 * @copyright 2020 Photon Storm Ltd. 3470 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3471 */ 3472t.exports="shutdown"},function(t,e){ 3473/** 3474 * @author Richard Davey <[email protected]> 3475 * @copyright 2020 Photon Storm Ltd. 3476 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3477 */ 3478t.exports="sleep"},function(t,e){ 3479/** 3480 * @author Richard Davey <[email protected]> 3481 * @copyright 2020 Photon Storm Ltd. 3482 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3483 */ 3484t.exports="start"},function(t,e){ 3485/** 3486 * @author Richard Davey <[email protected]> 3487 * @copyright 2020 Photon Storm Ltd. 3488 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3489 */ 3490t.exports="transitioncomplete"},function(t,e){ 3491/** 3492 * @author Richard Davey <[email protected]> 3493 * @copyright 2020 Photon Storm Ltd. 3494 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3495 */ 3496t.exports="transitioninit"},function(t,e){ 3497/** 3498 * @author Richard Davey <[email protected]> 3499 * @copyright 2020 Photon Storm Ltd. 3500 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3501 */ 3502t.exports="transitionout"},function(t,e){ 3503/** 3504 * @author Richard Davey <[email protected]> 3505 * @copyright 2020 Photon Storm Ltd. 3506 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3507 */ 3508t.exports="transitionstart"},function(t,e){ 3509/** 3510 * @author Richard Davey <[email protected]> 3511 * @copyright 2020 Photon Storm Ltd. 3512 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3513 */ 3514t.exports="transitionwake"},function(t,e){ 3515/** 3516 * @author Richard Davey <[email protected]> 3517 * @copyright 2020 Photon Storm Ltd. 3518 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3519 */ 3520t.exports="update"},function(t,e){ 3521/** 3522 * @author Richard Davey <[email protected]> 3523 * @copyright 2020 Photon Storm Ltd. 3524 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3525 */ 3526t.exports="wake"}
vendor: 2,663 bytes, lines 3526-3538
3526,function(t,e,i){ 3527/** 3528 * @author Richard Davey <[email protected]> 3529 * @copyright 2020 Photon Storm Ltd. 3530 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3531 */ 3532t.exports={Config:i(340),CreateRenderer:i(360),DebugHeader:i(378),Events:i(22),TimeStep:i(379),VisibilityHandler:i(381)}},function(t,e){var i,n,r=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(lC){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:s}catch(lC){i=s}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(lC){n=o}}();var h,u=[],l=!1,c=-1;function f(){l&&h&&(l=!1,h.length?u=h.concat(u):c=-1,u.length&&d())}function d(){if(!l){var t=a(f);l=!0;for(var e=u.length;e;){for(h=u,u=[];++c<e;)h&&h[c].run();c=-1,e=u.length}h=null,l=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(lC){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function v(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];u.push(new p(t,e)),1!==u.length||l||a(d)},p.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=v,r.addListener=v,r.once=v,r.off=v,r.removeListener=v,r.removeAllListeners=v,r.emit=v,r.prependListener=v,r.prependOnceListener=v,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,i){ 3533/** 3534 * @author Richard Davey <[email protected]> 3535 * @copyright 2020 Photon Storm Ltd. 3536 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3537 */ 3538var n=i(134),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),"onwheel"in window||n.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mou
3538sewheel":n.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll"),r)},function(t,e,i){ 3539/** 3540 * @author Richard Davey <[email protected]> 3541 * @copyright 2020 Photon Storm Ltd. 3542 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3543 */ 3544var n=i(134),r={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){r.audioData=!!window.Audio,r.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(r.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(r.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(r.mp3=!0),t.canPlayType("audio/wav").replace(/^no$/,"")&&(r.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(r.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(r.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)r.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),s=parseInt(RegExp.$2,10);(10===i&&s>=11||i>10)&&(r.dolby=!0)}}catch(lC){}return r}()},function(t,e){ 3545/** 3546 * @author Richard Davey <[email protected]> 3547 * @copyright 2020 Photon Storm Ltd. 3548 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3549 */ 3550var i={h264:!1,hls:!1,mp4:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264=!0,i.mp4=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hls=!0))}catch(lC){}return i}()},function(t,e){ 3551/** 3552 * @author Richard Davey <[email protected]> 3553 * @copyright 2020 Photon Storm Ltd. 3554 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3555 */ 3556var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e="Fullscreen",n="FullScreen",r=["request"+e,"request"+n,"webkitRequest"+e,"webkitRequest"+n,"msRequest"+e,"msRequest"+n,"mozRequest"+n,"mozRequest"+e];for(t=0;t<r.length;t++)if(document.documentElement[r[t]]){i.available=!0,i.request=r[t];break}var s=["cancel"+n,"exit"+e,"webkitCancel"+n,"webkitExit"+e,"msCancel"+n,"msExit"+e,"mozCancel"+n,"mozExit"+e];if(i.available)for(t=0;t<s.length;t++)if(document[s[t]]){i.cancel=s[t];break}return window.Element&&Element.ALLOW_KEYBOARD_INPUT&&!/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)&&(i.keyboard=!0),Object.defineProperty(i,"active",{get:function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}}),i}()},function(t,e,i){ 3557/** 3558 * @author Richard Davey <[email protected]> 3559 * @copyright 2020 Photon Storm Ltd. 3560 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3561 */ 3562t.exports={Between:i(343),BetweenPoints:i(344),BetweenPointsY:i(810),BetweenY:i(811),CounterClockwise:i(812),Normalize:i(345),Random:i(813),RandomDegrees:i(814),Reverse:i(815),RotateTo:i(816),ShortestBetween:i(817),Wrap:i(265),WrapDegrees:i(266)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(i-t,n-e)}},function(t,e,i){ 3563/** 3564 * @author Richard Davey <[email protected]> 3565 * @copyright 2020 Photon Storm Ltd. 3566 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3567 */ 3568var n=i(14);t.exports=function(t){return t>Math.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}}
vendor: 12,462 bytes, lines 3568-3672
3568,function(t,e,i){ 3569/** 3570 * @author Richard Davey <[email protected]> 3571 * @author @samme 3572 * @copyright 2020 Photon Storm Ltd. 3573 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3574 */ 3575var n=i(135);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){ 3576/** 3577 * @author Richard Davey <[email protected]> 3578 * @author @samme 3579 * @copyright 2020 Photon Storm Ltd. 3580 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3581 */ 3582var n=i(135);t.exports=function(){return n(-180,180)}},function(t,e,i){ 3583/** 3584 * @author Richard Davey <[email protected]> 3585 * @copyright 2020 Photon Storm Ltd. 3586 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3587 */ 3588var n=i(345);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){ 3589/** 3590 * @author Richard Davey <[email protected]> 3591 * @copyright 2020 Photon Storm Ltd. 3592 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3593 */ 3594var n=i(14);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e<t?e+=n.PI2:e-=n.PI2),e>t?t+=i:e<t&&(t-=i))),t}},function(t,e){t.exports=function(t,e){var i=e-t;return 0===i?0:i-360*Math.floor((i- -180)/360)}},function(t,e,i){ 3595/** 3596 * @author Richard Davey <[email protected]> 3597 * @copyright 2020 Photon Storm Ltd. 3598 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3599 */ 3600t.exports={Between:i(48),BetweenPoints:i(346),BetweenPointsSquared:i(819),Chebyshev:i(820),Power:i(821),Snake:i(822),Squared:i(347)}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n}},function(t,e){t.exports=function(t,e,i,n){return Math.max(Math.abs(t-i),Math.abs(e-n))}},function(t,e){t.exports=function(t,e,i,n,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(i-t,r)+Math.pow(n-e,r))}},function(t,e){t.exports=function(t,e,i,n){return Math.abs(t-i)+Math.abs(e-n)}},function(t,e,i){ 3601/** 3602 * @author Richard Davey <[email protected]> 3603 * @copyright 2020 Photon Storm Ltd. 3604 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3605 */ 3606t.exports={Back:i(328),Bounce:i(329),Circular:i(330),Cubic:i(331),Elastic:i(332),Expo:i(333),Linear:i(334),Quadratic:i(335),Quartic:i(336),Quintic:i(337),Sine:i(338),Stepped:i(339)}},function(t,e,i){ 3607/** 3608 * @author Richard Davey <[email protected]> 3609 * @copyright 2020 Photon Storm Ltd. 3610 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3611 */ 3612t.exports={Ceil:i(825),Equal:i(123),Floor:i(826),GreaterThan:i(348),LessThan:i(349)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},function(t,e,i){ 3613/** 3614 * @author Richard Davey <[email protected]> 3615 * @copyright 2020 Photon Storm Ltd. 3616 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3617 */ 3618t.exports={Bezier:i(828),CatmullRom:i(829),CubicBezier:i(352),Linear:i(830),QuadraticBezier:i(353),SmoothStep:i(354),SmootherStep:i(831)}},function(t,e,i){ 3619/** 3620 * @author Richard Davey <[email protected]> 3621 * @copyright 2020 Photon Storm Ltd. 3622 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3623 */ 3624var n=i(350);t.exports=function(t,e){for(var i=0,r=t.length-1,s=0;s<=r;s++)i+=Math.pow(1-e,r-s)*Math.pow(e,s)*t[s]*n(r,s);return i}},function(t,e,i){ 3625/** 3626 * @author Richard Davey <[email protected]> 3627 * @copyright 2020 Photon Storm Ltd. 3628 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3629 */ 3630var n=i(191);t.exports=function(t,e){var i=t.length-1,r=i*e,s=Math.floor(r);return t[0]===t[i]?(e<0&&(s=Math.floor(r=i*(1+e))),n(r-s,t[(s-1+i)%i],t[s],t[(s+1)%i],t[(s+2)%i])):e<0?t[0]-(n(-r,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(n(r-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(r-s,t[s?s-1:0],t[s],t[i<s+1?i:s+1],t[i<s+2?i:s+2])}},function(t,e,i){ 3631/** 3632 * @author Richard Davey <[email protected]> 3633 * @copyright 2020 Photon Storm Ltd. 3634 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3635 */ 3636var n=i(133);t.exports=function(t,e){var i=t.length-1,r=i*e,s=Math.floor(r);return e<0?n(t[0],t[1],r):e>1?n(t[i],t[i-1],i-r):n(t[s],t[s+1>i?i:s+1],r-s)}},function(t,e,i){ 3637/** 3638 * @author Richard Davey <[email protected]> 3639 * @copyright 2020 Photon Storm Ltd. 3640 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3641 */ 3642var n=i(180);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){ 3643/** 3644 * @author Richard Davey <[email protected]> 3645 * @copyright 2020 Photon Storm Ltd. 3646 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3647 */ 3648t.exports={GetNext:i(355),IsSize:i(136),IsValue:i(833)}},function(t,e){t.exports=function(t){return t>0&&0==(t&t-1)}},function(t,e,i){ 3649/** 3650 * @author Richard Davey <[email protected]> 3651 * @copyright 2020 Photon Storm Ltd. 3652 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3653 */ 3654t.exports={Ceil:i(137),Floor:i(76),To:i(835)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},function(t,e,i){ 3655/** 3656 * @author Richard Davey <[email protected]> 3657 * @copyright 2020 Photon Storm Ltd. 3658 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3659 */ 3660var n=new(i(0))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var n=0;n<t.length;n++)e=.02519603282416938*(i+=t.charCodeAt(n)),e-=i=e>>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e<t.length&&null!=t[e];e++){var i=t[e];this.s0-=this.hash(i),this.s0+=~~(this.s0<0),this.s1-=this.hash(i),this.s1+=~~(this.s1<0),this.s2-=this.hash(i),this.s2+=~~(this.s2<0)}},integer:function(){return 4294967296*this.rnd()},frac:function(){return this.rnd()+11102230246251565e-32*(2097152*this.rnd()|0)},real:function(){return this.integer()+this.frac()},integerInRange:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},between:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},realInRange:function(t,e){return this.frac()*(e-t)+t},normal:function(){return 1-2*this.frac()},uuid:function(){var t="",e="";for(e=t="";t++<36;e+=~t%5|3*t&4?(15^t?8^this.frac()*(20^t?16:4):4).toString(16):"-");return e},pick:function(t){return t[this.integerInRange(0,t.length-1)]},sign:function(){return this.pick(this.signs)},weightedPick:function(t){return t[~~(Math.pow(this.frac(),2)*(t.length-1)+.5)]},timestamp:function(t,e){return this.realInRange(t||9466848e5,e||1577862e6)},angle:function(){return this.integerInRange(-180,180)},rotation:function(){return this.realInRange(-3.1415926,3.1415926)},state:function(t){return"string"==typeof t&&t.match(/^!rnd/)&&(t=t.split(","),this.c=parseFloat(t[1]),this.s0=parseFloat(t[2]),this.s1=parseFloat(t[3]),this.s2=parseFloat(t[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")},shuffle:function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},function(t,e){t.exports=function(t){for(var e=0,i=0;i<t.length;i++)e+=+t[i];return e/t.length}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.ceil(t*n)/n}},function(t,e){t.exports=function(t,e){return Math.abs(t-e)}},function(t,e,i){ 3661/** 3662 * @author Richard Davey <[email protected]> 3663 * @copyright 2020 Photon Storm Ltd. 3664 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3665 */ 3666var n=i(18),r=i(0),s=i(67),o=i(1),a=new s,h=new r({initialize:function t(e,i,n,r){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=t.DefaultOrder),this._x=e,this._y=i,this._z=n,this._order=r,this.onChangeCallback=o},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,n){return void 0===n&&(n=this._order),this._x=t,this._y=e,this._z=i,this._order=n,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),a.fromQuat(t),this.setFromRotationMatrix(a,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var r=t.val,s=r[0],o=r[4],a=r[8],h=r[1],u=r[5],l=r[9],c=r[2],f=r[6],d=r[10],p=0,v=0,g=0,m=.99999;switch(e){case"XYZ":v=Math.asin(n(a,-1,1)),Math.abs(a)<m?(p=Math.atan2(-l,d),g=Math.atan2(-o,s)):p=Math.atan2(f,u);break;case"YXZ":p=Math.asin(-n(l,-1,1)),Math.abs(l)<m?(v=Math.atan2(a,d),g=Math.atan2(h,u)):v=Math.atan2(-c,s);break;case"ZXY":p=Math.asin(n(f,-1,1)),Math.abs(f)<m?(v=Math.atan2(-c,d),g=Math.atan2(-o,u)):g=Math.atan2(h,s);break;case"ZYX":v=Math.asin(-n(c,-1,1)),Math.abs(c)<m?(p=Math.atan2(f,d),g=Math.atan2(h,s)):g=Math.atan2(-o,u);break;case"YZX":g=Math.asin(n(h,-1,1)),Math.abs(h)<m?(p=Math.atan2(-l,u),v=Math.atan2(-c,s)):v=Math.atan2(a,d);break;case"XZY":g=Math.asin(-n(o,-1,1)),Math.abs(o)<m?(p=Math.atan2(f,u),v=Math.atan2(a,s)):p=Math.atan2(-l,d)}return this._x=p,this._y=v,this._z=g,this._order=e,i&&this.onChangeCallback(this),this}});h.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],h.DefaultOrder="XYZ",t.exports=h},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.floor(t*n)/n}},function(t,e){t.exports=function(t,e){return t/e/1e3}},function(t,e){t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t,e,i){return Math.min(t+e,i)}},function(t,e){t.exports=function(t,e,i){return Math.max(t-e,i)}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=e+1);var r=(t-e)/(i-e);return r>1?void 0!==n?(r=(n-t)/(n-i))<0&&(r=0):r=1:r<0&&(r=0),r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,r=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*r,t.y=Math.sin(i)*r,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e){t.exports=function(t,e,i,n,r){return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var r=[],s=[],o=0;o<t;o++)e+=(i-=e*n)*n,r[o]=i,s[o]=e;return{sin:s,cos:r,length:t}}},function(t,e,i){ 3667/** 3668 * @author Richard Davey <[email protected]> 3669 * @copyright 2020 Photon Storm Ltd. 3670 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3671 */ 3672var n=i(3);t.exports=function(t,e,i,r){void 0===r&&(r=new n);var s=0,o=0;return t>0&&t<=e*i&&(s=t>e-1?t-(o=Math.floor(t/e))*e:t,r.set(s,o)),r}}
3672,function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e,i){ 3673/** 3674 * @author Richard Davey <[email protected]> 3675 * @copyright 2020 Photon Storm Ltd. 3676 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3677 */ 3678var n=i(38),r=i(67),s=i(359),o=new r,a=new s,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e){ 3679/** 3680 * @author Richard Davey <[email protected]> 3681 * @copyright 2020 Photon Storm Ltd. 3682 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3683 */ 3684t.exports="addtexture"},function(t,e){ 3685/** 3686 * @author Richard Davey <[email protected]> 3687 * @copyright 2020 Photon Storm Ltd. 3688 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3689 */ 3690t.exports="onerror"},function(t,e){ 3691/** 3692 * @author Richard Davey <[email protected]> 3693 * @copyright 2020 Photon Storm Ltd. 3694 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3695 */ 3696t.exports="onload"},function(t,e){ 3697/** 3698 * @author Richard Davey <[email protected]> 3699 * @copyright 2020 Photon Storm Ltd. 3700 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3701 */ 3702t.exports="ready"},function(t,e){ 3703/** 3704 * @author Richard Davey <[email protected]> 3705 * @copyright 2020 Photon Storm Ltd. 3706 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3707 */ 3708t.exports="removetexture"},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," float alpha = mainColor.a;",""," if (!uInvertMaskAlpha)"," {"," alpha *= (maskColor.a);"," }"," else"," {"," alpha *= (1.0 - maskColor.a);"," }",""," gl_FragColor = vec4(mainColor.rgb * alpha, alpha);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},function(t,e){ 3709/** 3710 * @author Richard Davey <[email protected]> 3711 * @copyright 2020 Photon Storm Ltd. 3712 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3713 */ 3714t.exports="pipelineafterflush"},function(t,e){ 3715/** 3716 * @author Richard Davey <[email protected]> 3717 * @copyright 2020 Photon Storm Ltd. 3718 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3719 */ 3720t.exports="pipelinebeforeflush"},function(t,e){ 3721/** 3722 * @author Richard Davey <[email protected]> 3723 * @copyright 2020 Photon Storm Ltd. 3724 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3725 */ 3726t.exports="pipelinebind"},function(t,e){ 3727/** 3728 * @author Richard Davey <[email protected]> 3729 * @copyright 2020 Photon Storm Ltd. 3730 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3731 */ 3732t.exports="pipelineboot"},function(t,e){ 3733/** 3734 * @author Richard Davey <[email protected]> 3735 * @copyright 2020 Photon Storm Ltd. 3736 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3737 */ 3738t.exports="pipelinedestroy"},function(t,e){ 3739/** 3740 * @author Richard Davey <[email protected]> 3741 * @copyright 2020 Photon Storm Ltd. 3742 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3743 */ 3744t.exports="pipelinerebind"},function(t,e){ 3745/** 3746 * @author Richard Davey <[email protected]> 3747 * @copyright 2020 Photon Storm Ltd. 3748 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3749 */ 3750t.exports="pipelineresize"},function(t,e){t.exports=["#define SHADER_NAME PHASER_GRAPHICS_FS","","precision mediump float;","","varying vec4 outColor;
3750","","void main ()","{"," gl_FragColor = vec4(outColor.bgr * outColor.a, outColor.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_GRAPHICS_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec4 inColor;","","varying vec4 outColor;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outColor = inColor;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_LIGHT_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","","varying vec2 outTexCoord;","varying vec4 outTint;","","void main()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.bgr * outTint.a, outTint.a);"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;",""," for (int index = 0; index < kMaxLights; ++index)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }",""," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);",""," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_MULTI_FS","","precision mediump float;","","uniform sampler2D uMainSampler[%count%];","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture;",""," %forloop%",""," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_MULTI_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform float uCameraZoom;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);",""," float distToSurf = length(center - gl_FragCoord.xy);",""," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);",""," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);",""," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;
3750",""," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);",""," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_SINGLE_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_SINGLE_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = frame1 + frame2 * uStrength;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);",""," if (uAlpha == 0.0)"," {"," gl_FragColor = c;",""," return;"," }",""," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }",""," vec4 result;",""," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];",""," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);",""," rgb *= result.a;",""," gl_FragColor = vec4(rgb, result.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_COPY_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uBrightness;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}",""].join("\n")}
vendor: 9,006 bytes, lines 3750-3822
3750,function(t,e,i){ 3751/** 3752 * @author Richard Davey <[email protected]> 3753 * @copyright 2020 Photon Storm Ltd. 3754 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3755 */ 3756t.exports={GenerateTexture:i(382),Palettes:i(885)}},function(t,e,i){ 3757/** 3758 * @author Richard Davey <[email protected]> 3759 * @copyright 2020 Photon Storm Ltd. 3760 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3761 */ 3762t.exports={ARNE16:i(383),C64:i(886),CGA:i(887),JMP:i(888),MSX:i(889)}},function(t,e){ 3763/** 3764 * @author Richard Davey <[email protected]> 3765 * @copyright 2020 Photon Storm Ltd. 3766 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3767 */ 3768t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},function(t,e){ 3769/** 3770 * @author Richard Davey <[email protected]> 3771 * @copyright 2020 Photon Storm Ltd. 3772 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3773 */ 3774t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},function(t,e){ 3775/** 3776 * @author Richard Davey <[email protected]> 3777 * @copyright 2020 Photon Storm Ltd. 3778 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3779 */ 3780t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},function(t,e){ 3781/** 3782 * @author Richard Davey <[email protected]> 3783 * @copyright 2020 Photon Storm Ltd. 3784 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3785 */ 3786t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},function(t,e,i){ 3787/** 3788 * @author Richard Davey <[email protected]> 3789 * @copyright 2020 Photon Storm Ltd. 3790 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3791 */ 3792t.exports={Path:i(891),MoveTo:i(387),CubicBezier:i(384),Curve:i(90),Ellipse:i(385),Line:i(386),QuadraticBezier:i(388),Spline:i(389)}},function(t,e,i){ 3793/** 3794 * @author Richard Davey <[email protected]> 3795 * @copyright 2020 Photon Storm Ltd. 3796 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3797 */ 3798var n=i(0),r=i(384),s=i(385),o=i(5),a=i(386),h=i(387),u=i(388),l=i(10),c=i(389),f=i(3),d=i(14),p=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new f,this._tmpVec2A=new f,this._tmpVec2B=new f,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new a(e,t)),this},cubicBezierTo:function(t,e,i,n,s,o){var a,h,u,l=this.getEndPoint();return t instanceof f?(a=t,h=e,u=i):(a=new f(i,n),h=new f(s,o),u=new f(t,e)),this.add(new r(l,a,h,u))},quadraticBezierTo:function(t,e,i,n){var r,s,o=this.getEndPoint();return t instanceof f?(r=t,s=e):(r=new f(i,n),s=new f(t,e)),this.add(new u(o,r,s))},draw:function(t,e){for(var i=0;i<this.curves.length;i++){var n=this.curves[i];n.active&&n.draw(t,e)}return t},ellipseTo:function(t,e,i,n,r,o){var a=new s(0,0,t,e,i,n,r,o),h=this.getEndPoint(this._tmpVec2A),u=a.getStartPoint(this._tmpVec2B);return h.subtract(u),a.x=h.x,a.y=h.y,this.add(a)},fromJSON:function(t){this.curves=[],this.cacheLengths=[],this.startPoint.set(t.x,t.y),this.autoClose=t.autoClose;for(var e=0;e<t.curves.length;e++){var i=t.curves[e];switch(i.type){case"LineCurve":this.add(a.fromJSON(i));break;case"EllipseCurve":this.add(s.fromJSON(i));break;case"SplineCurve":this.add(c.fromJSON(i));break;case"CubicBezierCurve":this.add(r.fromJSON(i));break;case"QuadraticBezierCurve":this.add(u.fromJSON(i))}}return this},getBounds:function(t,e){void 0===t&&(t=new l),void 0===e&&(e=16),t.x=Number.MAX_VALUE,t.y=Number.MAX_VALUE;for(var i=new l,n=d.MIN_SAFE_INTEGER,r=d.MIN_SAFE_INTEGER,s=0;s<this.curves.length;s++){var o=this.curves[s];o.active&&(o.getBounds(i,e),t.x=Math.min(t.x,i.x),t.y=Math.min(t.y,i.y),n=Math.max(n,i.right),r=Math.max(r,i.bottom))}return t.right=n,t.bottom=r,t},getCurveLengths:function(){if(this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,i=0;i<this.curves.length;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t,t},getEndPoint:function(t){return void 0===t&&(t=new f),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new f);for(var i=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=i){var s=n[r]-i,o=this.curves[r],a=o.getLength(),h=0===a?0:1-s/a;return o.getPointAt(h,e)}r++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n<this.curves.length;n++){var r=this.curves[n];if(r.active)for(var s=r.getResolution(t),o=r.getPoints(s),a=0;a<o.length;a++){var h=o[a];e&&e.equals(h)||(i.push(h),e=h)}}return this.autoClose&&i.length>1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new f),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new f),t.copy(this.startPoint)},getTangent:function(t,e){void 0===e&&(e=new f);for(var i=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=i){var s=n[r]-i,o=this.curves[r],a=o.getLength(),h=0===a?0:1-s/a;return o.getTangentAt(h,e)}r++}return null},lineTo:function(t,e){t instanceof f?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof f?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e<this.curves.length;e++)t.push(this.curves[e].toJSON());return{type:"Path",x:this.startPoint.x,y:this.startPoint.y,autoClose:this.autoClose,curves:t}},updateArcLengths:function(){this.cacheLengths=[],this.getCurveLengths()},destroy:function(){this.curves.length=0,this.cacheLengths.length=0,this.startPoint=void 0}});o.register("path",(function(t,e){return new p(t,e)})),t.exports=p},function(t,e,i){ 3799/** 3800 * @author Richard Davey <[email protected]> 3801 * @copyright 2020 Photon Storm Ltd. 3802 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3803 */ 3804t.exports={DataManager:i(98),DataManagerPlugin:i(893),Events:i(309)}},function(t,e,i){ 3805/** 3806 * @author Richard Davey <[email protected]> 3807 * @copyright 2020 Photon Storm Ltd. 3808 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3809 */ 3810var n=i(0),r=i(98),s=i(24),o=i(21),a=new n({Extends:r,initialize:function(t){r.call(this,t,t.sys.events),this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){r.prototype.destroy.call(this),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});s.register("DataManagerPlugin",a,"data"),t.exports=a},function(t,e,i){ 3811/** 3812 * @author Richard Davey <[email protected]> 3813 * @copyright 2020 Photon Storm Ltd. 3814 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3815 */ 3816t.exports={Align:i(895),BaseShader:i(390),Bounds:i(898),Canvas:i(902),Color:i(391),ColorMatrix:i(195),Masks:i(912),RGB:i(197)}},function(t,e,i){ 3817/** 3818 * @author Richard Davey <[email protected]> 3819 * @copyright 2020 Photon Storm Ltd. 3820 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3821 */ 3822var n=i(122),r=i(17),s={In:i(896),To:i(897)};s=r(!1,s,n),t.exports=s}
3822,function(t,e,i){ 3823/** 3824 * @author Richard Davey <[email protected]> 3825 * @copyright 2020 Photon Storm Ltd. 3826 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3827 */ 3828t.exports={BottomCenter:i(284),BottomLeft:i(285),BottomRight:i(286),Center:i(287),LeftCenter:i(289),QuickSet:i(283),RightCenter:i(290),TopCenter:i(291),TopLeft:i(292),TopRight:i(293)}},function(t,e,i){ 3829/** 3830 * @author Richard Davey <[email protected]> 3831 * @copyright 2020 Photon Storm Ltd. 3832 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3833 */ 3834t.exports={BottomCenter:i(271),BottomLeft:i(272),BottomRight:i(273),LeftBottom:i(274),LeftCenter:i(275),LeftTop:i(276),QuickSet:i(270),RightBottom:i(277),RightCenter:i(278),RightTop:i(279),TopCenter:i(280),TopLeft:i(281),TopRight:i(282)}},function(t,e,i){ 3835/** 3836 * @author Richard Davey <[email protected]> 3837 * @copyright 2020 Photon Storm Ltd. 3838 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3839 */ 3840t.exports={CenterOn:i(288),GetBottom:i(40),GetBounds:i(899),GetCenterX:i(84),GetCenterY:i(86),GetLeft:i(41),GetOffsetX:i(900),GetOffsetY:i(901),GetRight:i(42),GetTop:i(43),SetBottom:i(54),SetCenterX:i(85),SetCenterY:i(87),SetLeft:i(52),SetRight:i(53),SetTop:i(51)}},function(t,e,i){ 3841/** 3842 * @author samme 3843 * @copyright 2020 Photon Storm Ltd. 3844 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3845 */ 3846var n=i(40),r=i(41),s=i(42),o=i(43);t.exports=function(t,e){void 0===e&&(e={});var i=r(t),a=o(t);return e.x=i,e.y=a,e.width=s(t)-i,e.height=n(t)-a,e}},function(t,e){t.exports=function(t){return t.width*t.originX}},function(t,e){t.exports=function(t){return t.height*t.originY}},function(t,e,i){ 3847/** 3848 * @author Richard Davey <[email protected]> 3849 * @copyright 2020 Photon Storm Ltd. 3850 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3851 */ 3852t.exports={CanvasInterpolation:i(361),CanvasPool:i(31),Smoothing:i(189),TouchAction:i(903),UserSelect:i(904)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e="none"),t.style.msTouchAction=e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e="none"),["-webkit-","-khtml-","-moz-","-ms-",""].forEach((function(i){t.style[i+"user-select"]=e})),t.style["-webkit-touch-callout"]=e,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t}},function(t,e,i){ 3853/** 3854 * @author Richard Davey <[email protected]> 3855 * @copyright 2020 Photon Storm Ltd. 3856 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3857 */ 3858var n=i(100);t.exports=function(t){void 0===t&&(t=1024);var e,i=[],r=255,s=255,o=0,a=0;for(e=0;e<=r;e++)i.push({r:s,g:e,b:a,color:n(s,e,a)});for(o=255,e=r;e>=0;e--)i.push({r:e,g:o,b:a,color:n(e,o,a)});for(s=0,e=0;e<=r;e++,o--)i.push({r:s,g:o,b:e,color:n(s,o,e)});for(o=0,a=255,e=0;e<=r;e++,a--,s++)i.push({r:s,g:o,b:a,color:n(s,o,a)});if(1024===t)return i;var h=[],u=0,l=1024/t;for(e=0;e<t;e++)h.push(i[Math.floor(u)]),u+=l;return h}},function(t,e){t.exports=function(t){var e={r:t>>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){ 3859/** 3860 * @author Richard Davey <[email protected]> 3861 * @copyright 2020 Photon Storm Ltd. 3862 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3863 */ 3864var n=i(37),r=i(393);t.exports=function(t,e,i){var s=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,u=2*i-h;s=r(u,h,t+1/3),o=r(u,h,t),a=r(u,h,t-1/3)}return(new n).setGLTo(s,o,a,1)}},function(t,e,i){ 3865/** 3866 * @author Richard Davey <[email protected]> 3867 * @copyright 2020 Photon Storm Ltd. 3868 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3869 */ 3870var n=i(185);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],r=0;r<=359;r++)i.push(n(r/359,t,e));return i}}
vendor: 5,850 bytes, lines 3870-3918
3870,function(t,e,i){ 3871/** 3872 * @author Richard Davey <[email protected]> 3873 * @copyright 2020 Photon Storm Ltd. 3874 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3875 */ 3876var n=i(133),r=function(t,e,i,r,s,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var u=h/a;return{r:n(t,r,u),g:n(e,s,u),b:n(i,o,u)}};t.exports={RGBWithRGB:r,ColorWithRGB:function(t,e,i,n,s,o){return void 0===s&&(s=100),void 0===o&&(o=0),r(t.r,t.g,t.b,e,i,n,s,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),r(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){ 3877/** 3878 * @author Richard Davey <[email protected]> 3879 * @copyright 2020 Photon Storm Ltd. 3880 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3881 */ 3882var n=i(192),r=i(37);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new r(n(t,e),n(t,e),n(t,e))}},function(t,e,i){ 3883/** 3884 * @author Richard Davey <[email protected]> 3885 * @copyright 2020 Photon Storm Ltd. 3886 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3887 */ 3888var n=i(392);t.exports=function(t,e,i,r,s){return void 0===r&&(r=255),void 0===s&&(s="#"),"#"===s?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+n(r)+n(t)+n(e)+n(i)}},function(t,e,i){ 3889/** 3890 * @author Richard Davey <[email protected]> 3891 * @copyright 2020 Photon Storm Ltd. 3892 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3893 */ 3894t.exports={BitmapMask:i(304),GeometryMask:i(305)}},function(t,e,i){ 3895/** 3896 * @author Richard Davey <[email protected]> 3897 * @copyright 2020 Photon Storm Ltd. 3898 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3899 */ 3900var n={AddToDOM:i(140),DOMContentLoaded:i(394),GetInnerHeight:i(395),GetScreenOrientation:i(396),GetTarget:i(401),ParseXML:i(402),RemoveFromDOM:i(199),RequestAnimationFrame:i(380)};t.exports=n},function(t,e,i){ 3901/** 3902 * @author Richard Davey <[email protected]> 3903 * @copyright 2020 Photon Storm Ltd. 3904 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3905 */ 3906t.exports={EventEmitter:i(915)}},function(t,e,i){ 3907/** 3908 * @author Richard Davey <[email protected]> 3909 * @copyright 2020 Photon Storm Ltd. 3910 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3911 */ 3912var n=i(0),r=i(9),s=i(24),o=new n({Extends:r,initialize:function(){r.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});s.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){ 3913/** 3914 * @author Richard Davey <[email protected]> 3915 * @copyright 2020 Photon Storm Ltd. 3916 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3917 */ 3918var n=i(140),r=i(315),s=i(319),o=i(31),a=i(0),h=i(340),u=i(917),l=i(360),c=i(98),f=i(378),d=i(341),p=i(394),v=i(9),g=i(22),m=i(403),y=i(24),x=i(408),w=i(409),_=i(411),b=i(103),T=i(416),E=i(379),S=i(381),A=i(420),C=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new v,this.anims=new r(this),this.textures=new T(this),this.cache=new s(this),this.registry=new c(this),this.input=new m(this,this.config),this.scene=new _(this,this.config.sceneConfig),this.device=d,this.scale=new w(this,this.config),this.sound=null,this.sound=A.create(this),this.loop=new E(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,p(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),l(this),u(this),f(this),n(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(g.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(g.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),S(this);var t=this.events;t.on(g.HIDDEN,this.onHidden,this),t.on(g.VISIBLE,this.onVisible,this),t.on(g.BLUR,this.onBlur,this),t.on(g.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(g.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(g.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e),i.emit(g.PRE_RENDER),i.emit(g.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(g.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(g.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(g.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C}
3918,function(t,e,i){ 3919/** 3920 * @author Richard Davey <[email protected]> 3921 * @copyright 2020 Photon Storm Ltd. 3922 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3923 */ 3924var n=i(140);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=i,n(i,e.parent)}}},function(t,e){ 3925/** 3926 * @author Richard Davey <[email protected]> 3927 * @copyright 2020 Photon Storm Ltd. 3928 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3929 */ 3930t.exports="boot"},function(t,e){ 3931/** 3932 * @author Richard Davey <[email protected]> 3933 * @copyright 2020 Photon Storm Ltd. 3934 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3935 */ 3936t.exports="destroy"},function(t,e){ 3937/** 3938 * @author Richard Davey <[email protected]> 3939 * @copyright 2020 Photon Storm Ltd. 3940 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3941 */ 3942t.exports="dragend"},function(t,e){ 3943/** 3944 * @author Richard Davey <[email protected]> 3945 * @copyright 2020 Photon Storm Ltd. 3946 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3947 */ 3948t.exports="dragenter"},function(t,e){ 3949/** 3950 * @author Richard Davey <[email protected]> 3951 * @copyright 2020 Photon Storm Ltd. 3952 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3953 */ 3954t.exports="drag"},function(t,e){ 3955/** 3956 * @author Richard Davey <[email protected]> 3957 * @copyright 2020 Photon Storm Ltd. 3958 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3959 */ 3960t.exports="dragleave"},function(t,e){ 3961/** 3962 * @author Richard Davey <[email protected]> 3963 * @copyright 2020 Photon Storm Ltd. 3964 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3965 */ 3966t.exports="dragover"},function(t,e){ 3967/** 3968 * @author Richard Davey <[email protected]> 3969 * @copyright 2020 Photon Storm Ltd. 3970 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3971 */ 3972t.exports="dragstart"},function(t,e){ 3973/** 3974 * @author Richard Davey <[email protected]> 3975 * @copyright 2020 Photon Storm Ltd. 3976 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3977 */ 3978t.exports="drop"},function(t,e){ 3979/** 3980 * @author Richard Davey <[email protected]> 3981 * @copyright 2020 Photon Storm Ltd. 3982 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3983 */ 3984t.exports="gameout"},function(t,e){ 3985/** 3986 * @author Richard Davey <[email protected]> 3987 * @copyright 2020 Photon Storm Ltd. 3988 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3989 */ 3990t.exports="gameover"},function(t,e){ 3991/** 3992 * @author Richard Davey <[email protected]> 3993 * @copyright 2020 Photon Storm Ltd. 3994 * @license {@link https://opensource.org/licenses/MIT|MIT License} 3995 */ 3996t.exports="gameobjectdown"},function(t,e){ 3997/** 3998 * @author Richard Davey <[email protected]> 3999 * @copyright 2020 Photon Storm Ltd. 4000 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4001 */ 4002t.exports="dragend"},function(t,e){ 4003/** 4004 * @author Richard Davey <[email protected]> 4005 * @copyright 2020 Photon Storm Ltd. 4006 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4007 */ 4008t.exports="dragenter"},function(t,e){ 4009/** 4010 * @author Richard Davey <[email protected]> 4011 * @copyright 2020 Photon Storm Ltd. 4012 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4013 */ 4014t.exports="drag"},function(t,e){ 4015/** 4016 * @author Richard Davey <[email protected]> 4017 * @copyright 2020 Photon Storm Ltd. 4018 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4019 */ 4020t.exports="dragleave"},function(t,e){ 4021/** 4022 * @author Richard Davey <[email protected]> 4023 * @copyright 2020 Photon Storm Ltd. 4024 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4025 */ 4026t.exports="dragover"},function(t,e){ 4027/** 4028 * @author Richard Davey <[email protected]> 4029 * @copyright 2020 Photon Storm Ltd. 4030 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4031 */ 4032t.exports="dragstart"},function(t,e){ 4033/** 4034 * @author Richard Davey <[email protected]> 4035 * @copyright 2020 Photon Storm Ltd. 4036 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4037 */ 4038t.exports="drop"},function(t,e){ 4039/** 4040 * @author Richard Davey <[email protected]> 4041 * @copyright 2020 Photon Storm Ltd. 4042 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4043 */ 4044t.exports="gameobjectmove"},function(t,e){ 4045/** 4046 * @author Richard Davey <[email protected]> 4047 * @copyright 2020 Photon Storm Ltd. 4048 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4049 */ 4050t.exports="gameobjectout"},function(t,e){ 4051/** 4052 * @author Richard Davey <[email protected]> 4053 * @copyright 2020 Photon Storm Ltd. 4054 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4055 */ 4056t.exports="gameobjectover"},function(t,e){ 4057/** 4058 * @author Richard Davey <[email protected]> 4059 * @copyright 2020 Photon Storm Ltd. 4060 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4061 */ 4062t.exports="pointerdown"},function(t,e){ 4063/** 4064 * @author Richard Davey <[email protected]> 4065 * @copyright 2020 Photon Storm Ltd. 4066 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4067 */ 4068t.exports="pointermove"},function(t,e){ 4069/** 4070 * @author Richard Davey <[email protected]> 4071 * @copyright 2020 Photon Storm Ltd. 4072 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4073 */ 4074t.exports="pointerout"},function(t,e){ 4075/** 4076 * @author Richard Davey <[email protected]> 4077 * @copyright 2020 Photon Storm Ltd. 4078 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4079 */ 4080t.exports="pointerover"},function(t,e){ 4081/** 4082 * @author Richard Davey <[email protected]> 4083 * @copyright 2020 Photon Storm Ltd. 4084 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4085 */ 4086t.exports="pointerup"},function(t,e){ 4087/** 4088 * @author Richard Davey <[email protected]> 4089 * @copyright 2020 Photon Storm Ltd. 4090 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4091 */ 4092t.exports="wheel"},function(t,e){ 4093/** 4094 * @author Richard Davey <[email protected]> 4095 * @copyright 2020 Photon Storm Ltd. 4096 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4097 */ 4098t.exports="gameobjectup"},function(t,e){ 4099/** 4100 * @author Richard Davey <[email protected]> 4101 * @copyright 2020 Photon Storm Ltd. 4102 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4103 */ 4104t.exports="gameobjectwheel"},function(t,e){ 4105/** 4106 * @author Richard Davey <[email protected]> 4107 * @copyright 2020 Photon Storm Ltd. 4108 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4109 */ 4110t.exports="boot"},function(t,e){ 4111/** 4112 * @author Richard Davey <[email protected]> 4113 * @copyright 2020 Photon Storm Ltd. 4114 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4115 */ 4116t.exports="process"},function(t,e){ 4117/** 4118 * @author Richard Davey <[email protected]> 4119 * @copyright 2020 Photon Storm Ltd. 4120 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4121 */ 4122t.exports="update"},function(t,e){ 4123/** 4124 * @author Richard Davey <[email protected]> 4125 * @copyright 2020 Photon Storm Ltd. 4126 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4127 */ 4128t.exports="pointerdown"},function(t,e){ 4129/** 4130 * @author Richard Davey <[email protected]> 4131 * @copyright 2020 Photon Storm Ltd. 4132 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4133 */ 4134t.exports="pointerdownoutside"},function(t,e){ 4135/** 4136 * @author Richard Davey <[email protected]> 4137 * @copyright 2020 Photon Storm Ltd. 4138 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4139 */ 4140t.exports="pointermove"},function(t,e){ 4141/** 4142 * @author Richard Davey <[email protected]> 4143 * @copyright 2020 Photon Storm Ltd. 4144 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4145 */ 4146t.exports="pointerout"},function(t,e){ 4147/** 4148 * @author Richard Davey <[email protected]> 4149 * @copyright 2020 Photon Storm Ltd. 4150 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4151 */ 4152t.exports="pointerover"},function(t,e){ 4153/** 4154 * @author Richard Davey <[email protected]> 4155 * @copyright 2020 Photon Storm Ltd. 4156 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4157 */ 4158t.exports="pointerup"},function(t,e){ 4159/** 4160 * @author Richard Davey <[email protected]> 4161 * @copyright 2020 Photon Storm Ltd. 4162 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4163 */ 4164t.exports="pointerupoutside"},function(t,e){ 4165/** 4166 * @author Richard Davey <[email protected]> 4167 * @copyright 2020 Photon Storm Ltd. 4168 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4169 */ 4170t.exports="wheel"},function(t,e){ 4171/** 4172 * @author Richard Davey <[email protected]> 4173 * @copyright 2020 Photon Storm Ltd. 4174 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4175 */ 4176t.exports="pointerlockchange"},function(t,e){ 4177/** 4178 * @author Richard Davey <[email protected]> 4179 * @copyright 2020 Photon Storm Ltd. 4180 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4181 */ 4182t.exports="preupdate"},function(t,e){ 4183/** 4184 * @author Richard Davey <[email protected]> 4185 * @copyright 2020 Photon Storm Ltd. 4186 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4187 */ 4188t.exports="shutdown"},function(t,e){ 4189/** 4190 * @author Richard Davey <[email protected]> 4191 * @copyright 2020 Photon Storm Ltd. 4192 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4193 */ 4194t.exports="start"},function(t,e){ 4195/** 4196 * @author Richard Davey <[email protected]> 4197 * @copyright 2020 Photon Storm Ltd. 4198 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4199 */ 4200t.exports="update"},function(t,e){ 4201/** 4202 * @author Richard Davey <[email protected]> 4203 * @copyright 2020 Photon Storm Ltd. 4204 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4205 */ 4206t.exports="addfile"},function(t,e){ 4207/** 4208 * @author Richard Davey <[email protected]> 4209 * @copyright 2020 Photon Storm Ltd. 4210 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4211 */ 4212t.exports="complete"},function(t,e){ 4213/** 4214 * @author Richard Davey <[email protected]> 4215 * @copyright 2020 Photon Storm Ltd. 4216 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4217 */ 4218t.exports="filecomplete"},function(t,e){ 4219/** 4220 * @author Richard Davey <[email protected]> 4221 * @copyright 2020 Photon Storm Ltd. 4222 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4223 */ 4224t.exports="filecomplete-"},function(t,e){ 4225/** 4226 * @author Richard Davey <[email protected]> 4227 * @copyright 2020 Photon Storm Ltd. 4228 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4229 */ 4230t.exports="loaderror"},function(t,e){ 4231/** 4232 * @author Richard Davey <[email protected]> 4233 * @copyright 2020 Photon Storm Ltd. 4234 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4235 */ 4236t.exports="load"},function(t,e){ 4237/** 4238 * @author Richard Davey <[email protected]> 4239 * @copyright 2020 Photon Storm Ltd. 4240 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4241 */ 4242t.exports="fileprogress"},function(t,e){ 4243/** 4244 * @author Richard Davey <[email protected]> 4245 * @copyright 2020 Photon Storm Ltd. 4246 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4247 */ 4248t.exports="postprocess"},function(t,e){ 4249/** 4250 * @author Richard Davey <[email protected]> 4251 * @copyright 2020 Photon Storm Ltd. 4252 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4253 */ 4254t.exports="progress"},function(t,e){ 4255/** 4256 * @author Richard Davey <[email protected]> 4257 * @copyright 2020 Photon Storm Ltd. 4258 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4259 */ 4260t.exports="start"}
vendor: 10,867 bytes, lines 4260-4415
4260,function(t,e,i){t.exports={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var r,s=i.getElementsByTagName("SubTexture"),o=0;o<s.length;o++){var a=s[o].attributes,h=a.name.value,u=parseInt(a.x.value,10),l=parseInt(a.y.value,10),c=parseInt(a.width.value,10),f=parseInt(a.height.value,10);if(r=t.add(h,e,u,l,c,f),a.frameX){var d=Math.abs(parseInt(a.frameX.value,10)),p=Math.abs(parseInt(a.frameY.value,10)),v=parseInt(a.frameWidth.value,10),g=parseInt(a.frameHeight.value,10);r.setTrim(c,f,d,p,v,g)}}return t}console.warn("Invalid Texture Atlas XML given")}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e,i){ 4261/** 4262 * @author Richard Davey <[email protected]> 4263 * @copyright 2020 Photon Storm Ltd. 4264 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4265 */ 4266var n=i(77);t.exports=function(t,e,i){if(i.frames||i.textures){var r=t.source[e];t.add("__BASE",e,0,0,r.width,r.height);for(var s,o=Array.isArray(i.textures)?i.textures[e].frames:i.frames,a=0;a<o.length;a++){var h=o[a];s=t.add(h.filename,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h),h.trimmed&&s.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(s.rotated=!0,s.updateUVsInverted());var u=h.anchor||h.pivot;u&&(s.customPivot=!0,s.pivotX=u.x,s.pivotY=u.y),s.customData=n(h)}for(var l in i)"frames"!==l&&(Array.isArray(i[l])?t.customData[l]=i[l].slice(0):t.customData[l]=i[l]);return t}console.warn("Invalid Texture Atlas JSON Array")}},function(t,e,i){ 4267/** 4268 * @author Richard Davey <[email protected]> 4269 * @copyright 2020 Photon Storm Ltd. 4270 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4271 */ 4272var n=i(77);t.exports=function(t,e,i){if(i.frames){var r=t.source[e];t.add("__BASE",e,0,0,r.width,r.height);var s,o=i.frames;for(var a in o)if(o.hasOwnProperty(a)){var h=o[a];s=t.add(a,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h),h.trimmed&&s.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(s.rotated=!0,s.updateUVsInverted());var u=h.anchor||h.pivot;u&&(s.customPivot=!0,s.pivotX=u.x,s.pivotY=u.y),s.customData=n(h)}for(var l in i)"frames"!==l&&(Array.isArray(i[l])?t.customData[l]=i[l].slice(0):t.customData[l]=i[l]);return t}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},function(t,e,i){ 4273/** 4274 * @author Richard Davey <[email protected]> 4275 * @copyright 2020 Photon Storm Ltd. 4276 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4277 */ 4278var n=i(2);t.exports=function(t,e,i,r,s,o,a){var h=n(a,"frameWidth",null),u=n(a,"frameHeight",h);if(null===h)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var l=t.source[e];t.add("__BASE",e,0,0,l.width,l.height);var c=n(a,"startFrame",0),f=n(a,"endFrame",-1),d=n(a,"margin",0),p=n(a,"spacing",0),v=Math.floor((s-d+p)/(h+p))*Math.floor((o-d+p)/(u+p));0===v&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",t.key),(c>v||c<-v)&&(c=0),c<0&&(c=v+c),-1!==f&&(v=c+(f+1));for(var g=d,m=d,y=0,x=0,w=0;w<v;w++){y=0,x=0;var _=g+h,b=m+u;_>s&&(y=_-s),b>o&&(x=b-o),t.add(w,e,i+g,r+m,h-y,u-x),(g+=h+p)+h>s&&(g=d,m+=u+p)}return t}},function(t,e,i){ 4279/** 4280 * @author Richard Davey <[email protected]> 4281 * @copyright 2020 Photon Storm Ltd. 4282 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4283 */ 4284var n=i(2);t.exports=function(t,e,i){var r=n(i,"frameWidth",null),s=n(i,"frameHeight",r);if(!r)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o=t.source[0];t.add("__BASE",0,0,0,o.width,o.height),n(i,"startFrame",0),n(i,"endFrame",-1);for(var a,h=n(i,"margin",0),u=n(i,"spacing",0),l=e.cutX,c=e.cutY,f=e.cutWidth,d=e.cutHeight,p=e.realWidth,v=e.realHeight,g=Math.floor((p-h+u)/(r+u)),m=Math.floor((v-h+u)/(s+u)),y=e.x,x=r-y,w=r-(p-f-y),_=e.y,b=s-_,T=s-(v-d-_),E=h,S=h,A=0,C=e.sourceIndex,O=0;O<m;O++){for(var R=0===O,M=O===m-1,P=0;P<g;P++){var I=0===P,k=P===g-1;if(a=t.add(A,C,l+E,c+S,r,s),I||R||k||M){var L=I?y:0,D=R?_:0,F=0,N=0;I&&(F+=r-x),k&&(F+=r-w),R&&(N+=s-b),M&&(N+=s-T);var B=r-F,U=s-N;a.cutWidth=B,a.cutHeight=U,a.setTrim(r,s,L,D,B,U)}E+=u,E+=I?x:k?w:r,A++}E=h,S+=u,S+=R?b:M?T:s}return t}},function(t,e){ 4285/** 4286 * @author Richard Davey <[email protected]> 4287 * @copyright 2020 Photon Storm Ltd. 4288 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4289 */ 4290var i=0,n=function(t,e,n,r){var s=i-r.y-r.height;t.add(n,e,r.x,s,r.width,r.height)};t.exports=function(t,e,r){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height),i=s.height;for(var o=r.split("\n"),a=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",u="",l={x:0,y:0,width:0,height:0},c=0;c<o.length;c++){var f=o[c].match(a);if(f){var d="- "===f[1],p=f[2],v=f[3];if(d&&(u!==h&&(n(t,e,u,l),h=u),l={x:0,y:0,width:0,height:0}),"name"!==p)switch(p){case"x":case"y":case"width":case"height":l[p]=parseInt(v,10)}else u=v}}return u!==h&&n(t,e,u,l),t}},function(t,e){ 4291/** 4292 * @author Richard Davey <[email protected]> 4293 * @copyright 2020 Photon Storm Ltd. 4294 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4295 */ 4296t.exports="complete"},function(t,e){ 4297/** 4298 * @author Richard Davey <[email protected]> 4299 * @copyright 2020 Photon Storm Ltd. 4300 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4301 */ 4302t.exports="decoded"},function(t,e){ 4303/** 4304 * @author Richard Davey <[email protected]> 4305 * @copyright 2020 Photon Storm Ltd. 4306 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4307 */ 4308t.exports="decodedall"},function(t,e){ 4309/** 4310 * @author Richard Davey <[email protected]> 4311 * @copyright 2020 Photon Storm Ltd. 4312 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4313 */ 4314t.exports="destroy"},function(t,e){ 4315/** 4316 * @author Richard Davey <[email protected]> 4317 * @copyright 2020 Photon Storm Ltd. 4318 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4319 */ 4320t.exports="detune"},function(t,e){ 4321/** 4322 * @author Richard Davey <[email protected]> 4323 * @copyright 2020 Photon Storm Ltd. 4324 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4325 */ 4326t.exports="detune"},function(t,e){ 4327/** 4328 * @author Richard Davey <[email protected]> 4329 * @copyright 2020 Photon Storm Ltd. 4330 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4331 */ 4332t.exports="mute"},function(t,e){ 4333/** 4334 * @author Richard Davey <[email protected]> 4335 * @copyright 2020 Photon Storm Ltd. 4336 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4337 */ 4338t.exports="rate"},function(t,e){ 4339/** 4340 * @author Richard Davey <[email protected]> 4341 * @copyright 2020 Photon Storm Ltd. 4342 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4343 */ 4344t.exports="volume"},function(t,e){ 4345/** 4346 * @author Richard Davey <[email protected]> 4347 * @copyright 2020 Photon Storm Ltd. 4348 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4349 */ 4350t.exports="loop"},function(t,e){ 4351/** 4352 * @author Richard Davey <[email protected]> 4353 * @copyright 2020 Photon Storm Ltd. 4354 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4355 */ 4356t.exports="looped"},function(t,e){ 4357/** 4358 * @author Richard Davey <[email protected]> 4359 * @copyright 2020 Photon Storm Ltd. 4360 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4361 */ 4362t.exports="mute"},function(t,e){ 4363/** 4364 * @author pi-kei 4365 * @copyright 2020 Photon Storm Ltd. 4366 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4367 */ 4368t.exports="pan"},function(t,e){ 4369/** 4370 * @author Richard Davey <[email protected]> 4371 * @copyright 2020 Photon Storm Ltd. 4372 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4373 */ 4374t.exports="pauseall"},function(t,e){ 4375/** 4376 * @author Richard Davey <[email protected]> 4377 * @copyright 2020 Photon Storm Ltd. 4378 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4379 */ 4380t.exports="pause"},function(t,e){ 4381/** 4382 * @author Richard Davey <[email protected]> 4383 * @copyright 2020 Photon Storm Ltd. 4384 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4385 */ 4386t.exports="play"},function(t,e){ 4387/** 4388 * @author Richard Davey <[email protected]> 4389 * @copyright 2020 Photon Storm Ltd. 4390 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4391 */ 4392t.exports="rate"},function(t,e){ 4393/** 4394 * @author Richard Davey <[email protected]> 4395 * @copyright 2020 Photon Storm Ltd. 4396 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4397 */ 4398t.exports="resumeall"},function(t,e){ 4399/** 4400 * @author Richard Davey <[email protected]> 4401 * @copyright 2020 Photon Storm Ltd. 4402 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4403 */ 4404t.exports="resume"},function(t,e){ 4405/** 4406 * @author Richard Davey <[email protected]> 4407 * @copyright 2020 Photon Storm Ltd. 4408 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4409 */ 4410t.exports="seek"},function(t,e){ 4411/** 4412 * @author Richard Davey <[email protected]> 4413 * @copyright 2020 Photon Storm Ltd. 4414 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4415 */
4416t.exports="stopall"},function(t,e){ 4417/** 4418 * @author Richard Davey <[email protected]> 4419 * @copyright 2020 Photon Storm Ltd. 4420 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4421 */ 4422t.exports="stop"},function(t,e){ 4423/** 4424 * @author Richard Davey <[email protected]> 4425 * @copyright 2020 Photon Storm Ltd. 4426 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4427 */ 4428t.exports="unlocked"},function(t,e){ 4429/** 4430 * @author Richard Davey <[email protected]> 4431 * @copyright 2020 Photon Storm Ltd. 4432 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4433 */ 4434t.exports="volume"},function(t,e,i){ 4435/** 4436 * @author Richard Davey <[email protected]> 4437 * @copyright 2020 Photon Storm Ltd. 4438 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4439 */ 4440var n={Events:i(75),DisplayList:i(1008),GameObjectCreator:i(16),GameObjectFactory:i(5),UpdateList:i(1034),Components:i(11),GetCalcMatrix:i(19),BuildGameObject:i(28),BuildGameObjectAnimation:i(433),GameObject:i(15),BitmapText:i(147),Blitter:i(210),Bob:i(434),Container:i(211),DOMElement:i(436),DynamicBitmapText:i(212),Extern:i(438),Graphics:i(213),Group:i(110),Image:i(124),Layer:i(216),Particles:i(1068),PathFollower:i(451),RenderTexture:i(218),RetroFont:i(1076),Rope:i(220),Sprite:i(73),Text:i(221),GetTextSize:i(452),MeasureText:i(454),TextStyle:i(453),TileSprite:i(222),Zone:i(127),Video:i(223),Shape:i(33),Arc:i(455),Curve:i(456),Ellipse:i(457),Grid:i(458),IsoBox:i(459),IsoTriangle:i(460),Line:i(461),Polygon:i(462),Rectangle:i(467),Star:i(468),Triangle:i(469),Factories:{Blitter:i(1124),Container:i(1125),DOMElement:i(1126),DynamicBitmapText:i(1127),Extern:i(1128),Graphics:i(1129),Group:i(1130),Image:i(1131),Layer:i(1132),Particles:i(1133),PathFollower:i(1134),RenderTexture:i(1135),Rope:i(1136),Sprite:i(1137),StaticBitmapText:i(1138),Text:i(1139),TileSprite:i(1140),Zone:i(1141),Video:i(1142),Arc:i(1143),Curve:i(1144),Ellipse:i(1145),Grid:i(1146),IsoBox:i(1147),IsoTriangle:i(1148),Line:i(1149),Polygon:i(1150),Rectangle:i(1151),Star:i(1152),Triangle:i(1153)},Creators:{Blitter:i(1154),Container:i(1155),DynamicBitmapText:i(1156),Graphics:i(1157),Group:i(1158),Image:i(1159),Layer:i(1160),Particles:i(1161),RenderTexture:i(1162),Rope:i(1163),Sprite:i(1164),StaticBitmapText:i(1165),Text:i(1166),TileSprite:i(1167),Zone:i(1168),Video:i(1169)}};n.Shader=i(226),n.Mesh=i(227),n.PointLight=i(149),n.Factories.Shader=i(1178),n.Factories.Mesh=i(1179),n.Factories.PointLight=i(1180),n.Creators.Shader=i(1181),n.Creators.Mesh=i(1182),n.Creators.PointLight=i(1183),n.Light=i(475),n.LightsManager=i(476),n.LightsPlugin=i(1184),t.exports=n},function(t,e,i){ 4441/** 4442 * @author Richard Davey <[email protected]> 4443 * @copyright 2020 Photon Storm Ltd. 4444 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4445 */ 4446var n=i(0),r=i(107),s=i(24),o=i(75),a=i(21),h=i(79),u=new n({Extends:r,initialize:function(t){r.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(a.BOOT,this.boot,this),this.events.on(a.START,this.start,this)},boot:function(){this.events.once(a.DESTROY,this.destroy,this)},addChildCallback:function(t){t.emit(o.ADDED_TO_SCENE,t,this.scene),t.displayList&&t.displayList.remove(t),t.displayList=this,this.queueDepthSort(),this.events.emit(a.ADDED_TO_SCENE,t,this.scene)},removeChildCallback:function(t){t.emit(o.REMOVED_FROM_SCENE,t,this.scene),t.displayList=null,this.queueDepthSort(),this.events.emit(a.REMOVED_FROM_SCENE,t,this.scene)},start:function(){this.events.once(a.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(h(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},shutdown:function(){for(var t=this.list,e=t.length;e--;)t[e].destroy(!0);t.length=0,this.events.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});s.register("DisplayList",u,"displayList"),t.exports=u}
vendor: 9,012 bytes, lines 4446-4542
4446,function(t,e,i){ 4447/** 4448 * @author Richard Davey <[email protected]> 4449 * @copyright 2020 Photon Storm Ltd. 4450 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4451 */ 4452t.exports={CheckMatrix:i(206),MatrixToString:i(1010),ReverseColumns:i(1011),ReverseRows:i(1012),Rotate180:i(1013),RotateLeft:i(1014),RotateMatrix:i(146),RotateRight:i(1015),Translate:i(1016),TransposeMatrix:i(429)}},function(t,e,i){ 4453/** 4454 * @author Richard Davey <[email protected]> 4455 * @copyright 2020 Photon Storm Ltd. 4456 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4457 */ 4458var n=i(183),r=i(206);t.exports=function(t){var e="";if(!r(t))return e;for(var i=0;i<t.length;i++){for(var s=0;s<t[i].length;s++){var o=t[i][s].toString();e+="undefined"!==o?n(o,2):"?",s<t[i].length-1&&(e+=" |")}if(i<t.length-1){e+="\n";for(var a=0;a<t[i].length;a++)e+="---",a<t[i].length-1&&(e+="+");e+="\n"}}return e}},function(t,e){t.exports=function(t){return t.reverse()}},function(t,e){t.exports=function(t){for(var e=0;e<t.length;e++)t[e].reverse();return t}},function(t,e,i){ 4459/** 4460 * @author Richard Davey <[email protected]> 4461 * @copyright 2020 Photon Storm Ltd. 4462 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4463 */ 4464var n=i(146);t.exports=function(t){return n(t,180)}},function(t,e,i){ 4465/** 4466 * @author Richard Davey <[email protected]> 4467 * @copyright 2020 Photon Storm Ltd. 4468 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4469 */ 4470var n=i(146);t.exports=function(t){return n(t,90)}},function(t,e,i){ 4471/** 4472 * @author Richard Davey <[email protected]> 4473 * @copyright 2020 Photon Storm Ltd. 4474 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4475 */ 4476var n=i(146);t.exports=function(t){return n(t,-90)}},function(t,e,i){ 4477/** 4478 * @author Richard Davey <[email protected]> 4479 * @copyright 2020 Photon Storm Ltd. 4480 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4481 */ 4482var n=i(175),r=i(176);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?n(t,Math.abs(i)):r(t,i)),0!==e)for(var s=0;s<t.length;s++){var o=t[s];e<0?n(o,Math.abs(e)):r(o,e)}return t}},function(t,e){t.exports=function(t,e,i,n,r){if(void 0===r&&(r=t),i>0){var s=i-t.length;if(s<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(r,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;i>0&&o>s&&(e.splice(s),o=s);for(var a=0;a<o;a++){var h=e[a];t.push(h),n&&n.call(r,h)}return e}},function(t,e){t.exports=function(t,e,i,n,r,s){if(void 0===i&&(i=0),void 0===s&&(s=t),n>0){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),r&&r.call(s,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;n>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var u=e[h];t.splice(i,0,u),r&&r.call(s,u)}return e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i<t.length&&(t.splice(i,1),t.push(e)),e}},function(t,e,i){ 4483/** 4484 * @author Richard Davey <[email protected]> 4485 * @copyright 2020 Photon Storm Ltd. 4486 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4487 */ 4488var n=i(78);t.exports=function(t,e,i,r,s){void 0===r&&(r=0),void 0===s&&(s=t.length);var o=0;if(n(t,r,s))for(var a=r;a<s;a++)t[a][e]===i&&o++;return o}},function(t,e){t.exports=function(t,e,i){var n,r=[null];for(n=3;n<arguments.length;n++)r.push(arguments[n]);for(n=0;n<t.length;n++)r[0]=t[n],e.apply(i,r);return t}},function(t,e,i){ 4489/** 4490 * @author Richard Davey <[email protected]> 4491 * @copyright 2020 Photon Storm Ltd. 4492 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4493 */ 4494var n=i(78);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s)){var o,a=[null];for(o=5;o<arguments.length;o++)a.push(arguments[o]);for(o=r;o<s;o++)a[0]=t[o],e.apply(i,a)}return t}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var n=t[i-1],r=t.indexOf(n);t[i]=n,t[r]=e}return t}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i<t.length-1){var n=t[i+1],r=t.indexOf(n);t[i]=n,t[r]=e}return t}},function(t,e,i){ 4495/** 4496 * @author Richard Davey <[email protected]> 4497 * @copyright 2020 Photon Storm Ltd. 4498 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4499 */ 4500var n=i(357);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var r=[],s=Math.max(n((e-t)/(i||1)),0),o=0;o<s;o++)r.push(t),t+=i;return r}},function(t,e,i){ 4501/** 4502 * @author Richard Davey <[email protected]> 4503 * @copyright 2020 Photon Storm Ltd. 4504 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4505 */ 4506var n=i(74);t.exports=function(t,e,i,r){if(void 0===r&&(r=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var s=n(t,e);return i&&i.call(r,s),s}},function(t,e,i){ 4507/** 4508 * @author Richard Davey <[email protected]> 4509 * @copyright 2020 Photon Storm Ltd. 4510 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4511 */ 4512var n=i(78);t.exports=function(t,e,i,r,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),n(t,e,i)){var o=i-e,a=t.splice(e,o);if(r)for(var h=0;h<a.length;h++){var u=a[h];r.call(s,u)}return a}return[]}},function(t,e,i){ 4513/** 4514 * @author Richard Davey <[email protected]> 4515 * @copyright 2020 Photon Storm Ltd. 4516 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4517 */ 4518var n=i(74);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var r=e+Math.floor(Math.random()*i);return n(t,r)}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e),r=t.indexOf(i);return-1!==n&&-1===r&&(t[n]=i,!0)}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e,i){ 4519/** 4520 * @author Richard Davey <[email protected]> 4521 * @copyright 2020 Photon Storm Ltd. 4522 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4523 */ 4524var n=i(78);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s))for(var o=r;o<s;o++){var a=t[o];a.hasOwnProperty(e)&&(a[e]=i)}return t}},function(t,e){t.exports=function(t,e,i){if(e!==i){var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[n]=i,t[r]=e,t}}},function(t,e,i){ 4525/** 4526 * @author Richard Davey <[email protected]> 4527 * @copyright 2020 Photon Storm Ltd. 4528 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4529 */ 4530var n=i(0),r=i(208),s=i(24),o=i(21),a=new n({Extends:r,initialize:function(t){r.call(this),this.checkQueue=!0,this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(o.PRE_UPDATE,this.update,this),t.on(o.UPDATE,this.sceneUpdate,this),t.once(o.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(t,e){for(var i=this._active,n=i.length,r=0;r<n;r++){var s=i[r];s.active&&s.preUpdate.call(s,t,e)}},shutdown:function(){for(var t=this._active.length;t--;)this._active[t].destroy(!0);for(t=this._pending.length;t--;)this._pending[t].destroy(!0);for(t=this._destroy.length;t--;)this._destroy[t].destroy(!0);this._toProcess=0,this._pending=[],this._active=[],this._destroy=[],this.removeAllListeners();var e=this.systems.events;e.off(o.PRE_UPDATE,this.preUpdate,this),e.off(o.UPDATE,this.sceneUpdate,this),e.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.systems.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});s.register("UpdateList",a,"updateList"),t.exports=a},function(t,e){ 4531/** 4532 * @author Richard Davey <[email protected]> 4533 * @copyright 2020 Photon Storm Ltd. 4534 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4535 */ 4536t.exports="add"},function(t,e){ 4537/** 4538 * @author Richard Davey <[email protected]> 4539 * @copyright 2020 Photon Storm Ltd. 4540 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4541 */ 4542t.exports="remove"}
4542,function(t,e){t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),void 0===n)return n={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0};var r,s,o,a,h=t.text,u=h.length,l=t.maxWidth,c=t.wordWrapCharCode,f=Number.MAX_VALUE,d=Number.MAX_VALUE,p=0,v=0,g=t.fontData.chars,m=t.fontData.lineHeight,y=t.letterSpacing,x=0,w=0,_=0,b=null,T=t._align,E=0,S=0,A=t.fontSize/t.fontData.size,C=A*t.scaleX,O=A*t.scaleY,R=null,M=0,P=[],I=Number.MAX_VALUE,k=0,L=0,D=0,F=[],N=[],B=null;if(l>0){for(r=0;r<u;r++)if(10!==(_=h.charCodeAt(r))){if(b=g[_]){if(null!==R)var U=b.kerning[M];_===c?null!==B&&(F.push({word:B.word,i:B.i,x:B.x*C,y:B.y*O,w:B.w*C,h:B.h*O,cr:!1}),B=null):(null===B&&(B={word:"",i:r,x:x,y:w,w:0,h:m,cr:!1}),B.word=B.word.concat(h[r]),B.w+=b.xOffset+b.xAdvance+(void 0!==U?U:0)),x+=b.xAdvance+y,R=b,M=_}}else null!==B&&(F.push({word:B.word,i:B.i,x:B.x*C,y:B.y*O,w:B.w*C,h:B.h*O,cr:!0}),B=null),x=0,w+=m,R=null;var V;null!==B&&F.push({word:B.word,i:B.i,x:B.x*C,y:B.y*O,w:B.w*C,h:B.h*O,cr:!1}),x=0,w=0,R=null,M=0;var Y=0,z=[];for(r=0;r<F.length;r++){var X=F[r],G=X.x,W=X.x+X.w;V&&(Y=G-(G-(V.x+V.w)+V.w),V=null),G-Y>l||W-Y>l?(z.push(X.i-1),X.cr?(z.push(X.i+X.word.length),Y=0,V=null):V=X):X.cr&&(z.push(X.i+X.word.length),Y=0,V=null)}for(r=z.length-1;r>=0;r--)s=h,o=z[r],a="\n",h=s.substr(0,o)+a+s.substr(o+1);n.wrappedText=h,u=h.length,F=[],B=null}var j=0;for(r=0;r<u;r++)if(10!==(_=h.charCodeAt(r))){if(b=g[_]){if(E=x,S=w,null!==R){var H=b.kerning[M];E+=void 0!==H?H:0}f>E&&(f=E),d>S&&(d=S);var q=E+b.xAdvance,K=S+m;p<q&&(p=q),v<K&&(v=K);var Z=b.xOffset+b.xAdvance+(void 0!==H?H:0);_===c?null!==B&&(F.push({word:B.word,i:B.i,x:B.x*C,y:B.y*O,w:B.w*C,h:B.h*O}),B=null):(null===B&&(B={word:"",i:j,x:x,y:w,w:0,h:m}),B.word=B.word.concat(h[r]),B.w+=Z),N.push({i:j,char:h[r],code:_,x:(b.xOffset+x)*A,y:(b.yOffset+w)*A,w:b.width*A,h:b.height*A,t:w*A,r:q*A,b:m*A,line:L,glyph:b}),x+=b.xAdvance+y,R=b,M=_,D=q*A,j++}}else null!==B&&(F.push({word:B.word,i:B.i,x:B.x*C,y:B.y*O,w:B.w*C,h:B.h*O}),B=null),x=0,w+=m,R=null,P[L]=D,D>k&&(k=D),D<I&&(I=D),L++,D=0;if(null!==B&&F.push({word:B.word,i:B.i,x:B.x*C,y:B.y*O,w:B.w*C,h:B.h*O}),P[L]=D,D>k&&(k=D),D<I&&(I=D),T>0)for(var Q=0;Q<N.length;Q++){var J=N[Q];if(1===T){var $=(k-P[J.line])/2;J.x+=$,J.r+=$}else if(2===T){var tt=k-P[J.line];J.x+=tt,J.r+=tt}}var et=n.local,it=n.global,nt=n.lines;return et.x=f*A,et.y=d*A,et.width=p*A,et.height=v*A,it.x=t.x-t._displayOriginX+f*C,it.y=t.y-t._displayOriginY+d*O,it.width=p*C,it.height=v*O,nt.shortest=I,nt.longest=k,nt.lengths=P,e&&(et.x=Math.ceil(et.x),et.y=Math.ceil(et.y),et.width=Math.ceil(et.width),et.height=Math.ceil(et.height),it.x=Math.ceil(it.x),it.y=Math.ceil(it.y),it.width=Math.ceil(it.width),it.height=Math.ceil(it.height),nt.shortest=Math.ceil(I),nt.longest=Math.ceil(k)),i&&(t._displayOriginX=t.originX*et.width,t._displayOriginY=t.originY*et.height,it.x=t.x-t._displayOriginX*t.scaleX,it.y=t.y-t._displayOriginY*t.scaleY,e&&(it.x=Math.ceil(it.x),it.y=Math.ceil(it.y))),n.words=F,n.characters=N,n.lines.height=m,n.scale=A,n.scaleX=t.scaleX,n.scaleY=t.scaleY,n}},function(t,e,i){ 4543/** 4544 * @author Richard Davey <[email protected]> 4545 * @copyright 2020 Photon Storm Ltd. 4546 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4547 */ 4548var n=i(209);t.exports=function(t,e,i,r,s,o,a){var h=t.sys.textures.get(i),u=h.get(r),l=t.sys.cache.xml.get(s);if(u&&l){var c=n(l,u,o,a,h);return t.sys.cache.bitmapFont.add(e,{data:c,texture:i,frame:r}),!0}return!1}},function(t,e,i){ 4549/** 4550 * @author Richard Davey <[email protected]> 4551 * @copyright 2020 Photon Storm Ltd. 4552 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4553 */ 4554var n=i(1),r=i(1);n=i(1040),r=i(1042),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4555/** 4556 * @author Richard Davey <[email protected]> 4557 * @copyright 2020 Photon Storm Ltd. 4558 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4559 */ 4560var n=i(1041),r=i(19),s=i(12);
4560t.exports=function(t,e,i,o){if(0!==e._text.length){i.addToRenderList(e);var a,h,u,l=t.pipelines.set(e.pipeline,e),c=r(e,i,o).calc,f=i.roundPixels,d=i.alpha,p=e.charColors,v=e.tintFill,g=s.getTintAppendFloatAlpha,m=g(e.tintTopLeft,d*e._alphaTL),y=g(e.tintTopRight,d*e._alphaTR),x=g(e.tintBottomLeft,d*e._alphaBL),w=g(e.tintBottomRight,d*e._alphaBR),_=e.frame.glTexture,b=l.setGameObject(e),T=e.getTextBounds(!1).characters,E=e.dropShadowX,S=e.dropShadowY,A=0!==E||0!==S;if(t.pipelines.preBatch(e),A){var C=e.dropShadowColor,O=e.dropShadowAlpha,R=g(C,d*O*e._alphaTL),M=g(C,d*O*e._alphaTR),P=g(C,d*O*e._alphaBL),I=g(C,d*O*e._alphaBR);for(a=0;a<T.length;a++)u=(h=T[a]).glyph,32!==h.code&&0!==u.width&&0!==u.height&&n(l,e,h,u,E,S,c,f,R,M,P,I,1,_,b)}for(a=0;a<T.length;a++)if(u=(h=T[a]).glyph,32!==h.code&&0!==u.width&&0!==u.height)if(p[h.i]){var k=p[h.i],L=k.tintEffect,D=g(k.tintTL,d*e._alphaTL),F=g(k.tintTR,d*e._alphaTR),N=g(k.tintBL,d*e._alphaBL),B=g(k.tintBR,d*e._alphaBR);n(l,e,h,u,0,0,c,f,D,F,N,B,L,_,b)}else n(l,e,h,u,0,0,c,f,m,y,x,w,v,_,b);t.pipelines.postBatch(e)}}},function(t,e){t.exports=function(t,e,i,n,r,s,o,a,h,u,l,c,f,d,p){var v=i.x-e.displayOriginX+r,g=i.y-e.displayOriginY+s,m=v+i.w,y=g+i.h,x=o.getXRound(v,g,a),w=o.getYRound(v,g,a),_=o.getXRound(v,y,a),b=o.getYRound(v,y,a),T=o.getXRound(m,y,a),E=o.getYRound(m,y,a),S=o.getXRound(m,g,a),A=o.getYRound(m,g,a);t.batchQuad(e,x,w,_,b,T,E,S,A,n.u0,n.v0,n.u1,n.v1,h,u,l,c,f,d,p)}},function(t,e,i){ 4561/** 4562 * @author Richard Davey <[email protected]> 4563 * @copyright 2020 Photon Storm Ltd. 4564 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4565 */ 4566var n=i(30);t.exports=function(t,e,i,r){var s=e._text,o=s.length,a=t.currentContext;if(0!==o&&n(t,a,e,i,r)){i.addToRenderList(e);var h=e.texture.frames.__BASE,u=e.fontData.chars,l=e.fontData.lineHeight,c=e._letterSpacing,f=0,d=0,p=0,v=null,g=0,m=0,y=0,x=0,w=0,_=0,b=null,T=0,E=h.source.image,S=h.cutX,A=h.cutY,C=e._fontSize/e.fontData.size,O=e._align,R=0,M=0,P=e.getTextBounds(!1);e.maxWidth>0&&(o=(s=P.wrappedText).length);var I=e._bounds.lines;1===O?M=(I.longest-I.lengths[0])/2:2===O&&(M=I.longest-I.lengths[0]),a.translate(-e.displayOriginX,-e.displayOriginY);for(var k=i.roundPixels,L=0;L<o;L++)if(10!==(p=s.charCodeAt(L))){if(v=u[p]){if(g=S+v.x,m=A+v.y,y=v.width,x=v.height,w=v.xOffset+f,_=v.yOffset+d,null!==b){var D=v.kerning[T];w+=void 0!==D?D:0}w*=C,_*=C,w+=M,f+=v.xAdvance+c,b=v,T=p,0!==y&&0!==x&&32!==p&&(k&&(w=Math.round(w),_=Math.round(_)),a.save(),a.translate(w,_),a.scale(C,C),a.drawImage(E,g,m,y,x,0,0,y,x),a.restore())}}else R++,1===O?M=(I.longest-I.lengths[R])/2:2===O&&(M=I.longest-I.lengths[R]),f=0,d+=l,b=null;a.restore()}}},function(t,e,i){ 4567/** 4568 * @author Richard Davey <[email protected]> 4569 * @copyright 2020 Photon Storm Ltd. 4570 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4571 */ 4572var n=i(1),r=i(1);n=i(1044),r=i(1045),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4573/** 4574 * @author Richard Davey <[email protected]> 4575 * @copyright 2020 Photon Storm Ltd. 4576 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4577 */ 4578var n=i(25),r=i(12),s=new n;t.exports=function(t,e,i,n){var o=e.getRenderList();if(0===o.length)return e.clearRenderDepth(i);e.setRenderDepth(i);var a=t.pipelines.set(this.pipeline,e),h=i.scrollX*e.scrollFactorX,u=i.scrollY*e.scrollFactorY,l=s.copyFrom(i.matrix);n&&(l.multiplyWithOffset(n,-h,-u),h=0,u=0);var c=e.x-h,f=e.y-u,d=-1,p=i.alpha*e.alpha,v=i.roundPixels;t.pipelines.preBatch(e);for(var g=0;g<o.length;g++){var m=o[g],y=m.frame,x=m.alpha*p;if(0!==x){var w=y.width,_=y.height,b=c+m.x+y.x,T=f+m.y+y.y;m.flipX&&(w*=-1,b+=y.width),m.flipY&&(_*=-1,T+=y.height);var E=b+w,S=T+_,A=l.getX(b,T),C=l.getY(b,T),O=l.getX(E,S),R=l.getY(E,S),M=r.getTintAppendFloatAlpha(m.tint,x);if(y.sourceIndex!==d){var P=a.setGameObject(e,y);d=y.sourceIndex}v&&(A=Math.round(A),C=Math.round(C),O=Math.round(O),R=Math.round(R)),a.batchQuad(e,A,C,A,R,O,R,O,C,y.u0,y.v0,y.u1,y.v1,M,M,M,M,!1,y.glTexture,P)&&(d=-1)}}t.pipelines.postBatch(e)}}
4578,function(t,e){t.exports=function(t,e,i,n){var r=e.getRenderList();if(0!==r.length){var s=t.currentContext,o=i.alpha*e.alpha;if(0!==o){i.addToRenderList(e),s.globalCompositeOperation=t.blendModes[e.blendMode],s.imageSmoothingEnabled=!(!t.antialias||e.frame.source.scaleMode);var a=e.x-i.scrollX*e.scrollFactorX,h=e.y-i.scrollY*e.scrollFactorY;s.save(),n&&n.copyToContext(s);for(var u=i.roundPixels,l=0;l<r.length;l++){var c=r[l],f=c.flipX||c.flipY,d=c.frame,p=d.canvasData,v=d.x,g=d.y,m=1,y=1,x=c.alpha*o;0!==x&&(s.globalAlpha=x,f?(c.flipX&&(m=-1,v-=p.width),c.flipY&&(y=-1,g-=p.height),s.save(),s.translate(c.x+a,c.y+h),s.scale(m,y),s.drawImage(d.source.image,p.x,p.y,p.width,p.height,v,g,p.width,p.height),s.restore()):(u&&(v=Math.round(v),g=Math.round(g)),s.drawImage(d.source.image,p.x,p.y,p.width,p.height,v+c.x+a,g+c.y+h,p.width,p.height)))}s.restore()}}}},function(t,e,i){ 4579/** 4580 * @author Richard Davey <[email protected]> 4581 * @author Felipe Alfonso <@bitnenfer> 4582 * @copyright 2020 Photon Storm Ltd. 4583 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4584 */ 4585var n=i(1),r=i(1);n=i(1047),r=i(1048),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e){t.exports=function(t,e,i,n){var r=e.list,s=r.length;if(0!==s){var o=e.localTransform;n?(o.loadIdentity(),o.multiply(n),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e);var a=-1!==e.blendMode;a||t.setBlendMode(0);for(var h=e.alpha,u=e.scrollFactorX,l=e.scrollFactorY,c=0;c<s;c++){var f=r[c];if(f.willRender(i)){var d,p,v,g;if(void 0!==f.alphaTopLeft)d=f.alphaTopLeft,p=f.alphaTopRight,v=f.alphaBottomLeft,g=f.alphaBottomRight;else{var m=f.alpha;d=m,p=m,v=m,g=m}var y=f.scrollFactorX,x=f.scrollFactorY;a||f.blendMode===t.currentBlendMode||t.setBlendMode(f.blendMode);var w=f.mask;w&&w.preRenderWebGL(t,f,i);var _=f.type;_!==t.currentType&&(t.newType=!0,t.currentType=_),t.nextTypeMatch=c<s-1&&r[c+1].type===t.currentType,f.setScrollFactor(y*u,x*l),f.setAlpha(d*h,p*h,v*h,g*h),f.renderWebGL(t,f,i,o),f.setAlpha(d,p,v,g),f.setScrollFactor(y,x),w&&w.postRenderWebGL(t,i),t.newType=!1}}t.pipelines.postBatch(e)}}},function(t,e){t.exports=function(t,e,i,n){var r=e.list;if(0!==r.length){var s=e.localTransform;n?(s.loadIdentity(),s.multiply(n),s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.scaleX,e.scaleY)):s.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var o=-1!==e.blendMode;o||t.setBlendMode(0);var a=e._alpha,h=e.scrollFactorX,u=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var l=0;l<r.length;l++){var c=r[l];if(c.willRender(i)){var f=c.alpha,d=c.scrollFactorX,p=c.scrollFactorY;o||c.blendMode===t.currentBlendMode||t.setBlendMode(c.blendMode),c.setScrollFactor(d*h,p*u),c.setAlpha(f*a),c.renderCanvas(t,c,i,s),c.setAlpha(f),c.setScrollFactor(d,p)}}e.mask&&e.mask.postRenderCanvas(t)}}},function(t,e,i){ 4586/** 4587 * @author Richard Davey <[email protected]> 4588 * @copyright 2020 Photon Storm Ltd. 4589 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4590 */ 4591var n=i(1),r=i(1);n=i(437),r=i(437),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e){ 4592/** 4593 * @author Richard Davey <[email protected]> 4594 * @copyright 2020 Photon Storm Ltd. 4595 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4596 */ 4597t.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},function(t,e,i){ 4598/** 4599 * @author Richard Davey <[email protected]> 4600 * @copyright 2020 Photon Storm Ltd. 4601 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4602 */ 4603var n=i(1),r=i(1);n=i(1052),r=i(1053),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4604/** 4605 * @author Richard Davey <[email protected]> 4606 * @copyright 2020 Photon Storm Ltd. 4607 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4608 */ 4609var n=i(19),r=i(25),s=i(12),o=new r;
vendor: 7,418 bytes, lines 4609-4639
4609t.exports=function(t,e,i,r){var a=e.text,h=a.length;if(0!==h){i.addToRenderList(e);var u=t.pipelines.set(e.pipeline,e),l=n(e,i,r),c=l.sprite,f=l.calc,d=o,p=e.cropWidth>0||e.cropHeight>0;p&&(u.flush(),t.pushScissor(f.tx,f.ty,e.cropWidth*f.scaleX,e.cropHeight*f.scaleY));var v,g,m=e.frame.glTexture,y=e.tintFill,x=s.getTintAppendFloatAlpha(e.tintTopLeft,i.alpha*e._alphaTL),w=s.getTintAppendFloatAlpha(e.tintTopRight,i.alpha*e._alphaTR),_=s.getTintAppendFloatAlpha(e.tintBottomLeft,i.alpha*e._alphaBL),b=s.getTintAppendFloatAlpha(e.tintBottomRight,i.alpha*e._alphaBR),T=u.setGameObject(e),E=0,S=0,A=0,C=0,O=e.letterSpacing,R=0,M=0,P=e.scrollX,I=e.scrollY,k=e.fontData,L=k.chars,D=k.lineHeight,F=e.fontSize/k.size,N=0,B=e._align,U=0,V=0,Y=e.getTextBounds(!1);e.maxWidth>0&&(h=(a=Y.wrappedText).length);var z=e._bounds.lines;1===B?V=(z.longest-z.lengths[0])/2:2===B&&(V=z.longest-z.lengths[0]);var X=i.roundPixels,G=e.displayCallback,W=e.callbackData;t.pipelines.preBatch(e);for(var j=0;j<h;j++)if(10!==(A=a.charCodeAt(j))){if(v=L[A]){R=v.width,M=v.height;var H=v.xOffset+E-P,q=v.yOffset+S-I;if(null!==g){var K=v.kerning[C];H+=void 0!==K?K:0}if(E+=v.xAdvance+O,g=v,C=A,0!==R&&0!==M&&32!==A){if(F=e.fontSize/e.fontData.size,N=0,G){W.color=0,W.tint.topLeft=x,W.tint.topRight=w,W.tint.bottomLeft=_,W.tint.bottomRight=b,W.index=j,W.charCode=A,W.x=H,W.y=q,W.scale=F,W.rotation=N,W.data=v.data;var Z=G(W);H=Z.x,q=Z.y,F=Z.scale,N=Z.rotation,Z.color?(x=Z.color,w=Z.color,_=Z.color,b=Z.color):(x=Z.tint.topLeft,w=Z.tint.topRight,_=Z.tint.bottomLeft,b=Z.tint.bottomRight),x=s.getTintAppendFloatAlpha(x,i.alpha*e._alphaTL),w=s.getTintAppendFloatAlpha(w,i.alpha*e._alphaTR),_=s.getTintAppendFloatAlpha(_,i.alpha*e._alphaBL),b=s.getTintAppendFloatAlpha(b,i.alpha*e._alphaBR)}H*=F,q*=F,H-=e.displayOriginX,q-=e.displayOriginY,H+=V,d.applyITRS(H,q,N,F,F),f.multiply(d,c);var Q=v.u0,J=v.v0,$=v.u1,tt=v.v1,et=R,it=M,nt=c.e,rt=c.f,st=it*c.c+c.e,ot=it*c.d+c.f,at=et*c.a+it*c.c+c.e,ht=et*c.b+it*c.d+c.f,ut=et*c.a+c.e,lt=et*c.b+c.f;X&&(nt=Math.round(nt),rt=Math.round(rt),st=Math.round(st),ot=Math.round(ot),at=Math.round(at),ht=Math.round(ht),ut=Math.round(ut),lt=Math.round(lt)),u.batchQuad(e,nt,rt,st,ot,at,ht,ut,lt,Q,J,$,tt,x,w,_,b,y,m,T)}}}else U++,1===B?V=(z.longest-z.lengths[U])/2:2===B&&(V=z.longest-z.lengths[U]),E=0,S+=D,g=null;p&&(u.flush(),t.popScissor()),t.pipelines.postBatch(e)}}},function(t,e,i){ 4610/** 4611 * @author Richard Davey <[email protected]> 4612 * @copyright 2020 Photon Storm Ltd. 4613 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4614 */ 4615var n=i(30);t.exports=function(t,e,i,r){var s=e._text,o=s.length,a=t.currentContext;if(0!==o&&n(t,a,e,i,r)){i.addToRenderList(e);var h=e.frame,u=e.displayCallback,l=e.callbackData,c=e.fontData.chars,f=e.fontData.lineHeight,d=e._letterSpacing,p=0,v=0,g=0,m=null,y=0,x=0,w=0,_=0,b=0,T=0,E=null,S=0,A=e.frame.source.image,C=h.cutX,O=h.cutY,R=0,M=0,P=e._fontSize/e.fontData.size,I=e._align,k=0,L=0;e.getTextBounds(!1);var D=e._bounds.lines;1===I?L=(D.longest-D.lengths[0])/2:2===I&&(L=D.longest-D.lengths[0]),a.translate(-e.displayOriginX,-e.displayOriginY);var F=i.roundPixels;e.cropWidth>0&&e.cropHeight>0&&(a.beginPath(),a.rect(0,0,e.cropWidth,e.cropHeight),a.clip());for(var N=0;N<o;N++)if(M=P,R=0,10!==(g=s.charCodeAt(N))){if(m=c[g]){if(y=C+m.x,x=O+m.y,w=m.width,_=m.height,b=m.xOffset+p-e.scrollX,T=m.yOffset+v-e.scrollY,null!==E){var B=m.kerning[S];b+=void 0!==B?B:0}if(u){l.index=N,l.charCode=g,l.x=b,l.y=T,l.scale=M,l.rotation=R,l.data=m.data;var U=u(l);b=U.x,T=U.y,M=U.scale,R=U.rotation}b*=M,T*=M,b+=L,p+=m.xAdvance+d,E=m,S=g,0!==w&&0!==_&&32!==g&&(F&&(b=Math.round(b),T=Math.round(T)),a.save(),a.translate(b,T),a.rotate(R),a.scale(M,M),a.drawImage(A,y,x,w,_,0,0,w,_),a.restore())}}else k++,1===I?L=(D.longest-D.lengths[k])/2:2===I&&(L=D.longest-D.lengths[k]),p=0,v+=f,E=null;a.restore()}}},function(t,e,i){ 4616/** 4617 * @author Richard Davey <[email protected]> 4618 * @copyright 2020 Photon Storm Ltd. 4619 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4620 */ 4621var n=i(1),r=i(1);n=i(1055),r=i(1056),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4622/** 4623 * @author Richard Davey <[email protected]> 4624 * @copyright 2020 Photon Storm Ltd. 4625 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4626 */ 4627var n=i(19);t.exports=function(t,e,i,r){t.pipelines.clear();var s=n(e,i,r).calc;e.render.call(e,t,i,s),t.pipelines.rebind()}},function(t,e){},function(t,e,i){ 4628/** 4629 * @author Richard Davey <[email protected]> 4630 * @copyright 2020 Photon Storm Ltd. 4631 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4632 */ 4633var n=i(1),r=i(1);n=i(1058),i(442),r=i(442),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4634/** 4635 * @author Richard Davey <[email protected]> 4636 * @copyright 2020 Photon Storm Ltd. 4637 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4638 */ 4639var n=i(214),r=i(19),s=i(25),o=i(12),a=function(t,e,i){this.x=t,this.y=e,this.width=i},h=function(t,e,i){this.points=[],this.pointsLength=1,this.points[0]=new a(t,e,i)},u=[],l=new s;t.exports=function(t,e,i,s){if(0!==e.commandBuffer.length){i.addToRenderList(e);var c=t.pipelines.set(e.pipeline,e);t.pipelines.preBatch(e);for(var f=r(e,i,s).calc,d=l.loadIdentity(),p=e.commandBuffer,v=i.alpha*e.alpha,g=1,m=c.fillTint,y=c.strokeTint,x=0,w=0,_=0,b=2*Math.PI,T=[],E=0,S=!0,A=null,C=o.getTintAppendFloatAlpha,O=0;O<p.length;O++)switch(p[O]){case n.BEGIN_PATH:T.length=0,A=null,S=!0;break;case n.CLOSE_PATH:S=!1,A&&A.points.length&&A.points.push(A.points[0]);break;case n.FILL_PATH:for(E=0;E<T.length;E++)c.batchFillPath(T[E].points,d,f);break;case n.STROKE_PATH:for(E=0;E<T.length;E++)c.batchStrokePath(T[E].points,g,S,d,f);break;case n.LINE_STYLE:g=p[++O];var R=C(p[++O],p[++O]*v);y.TL=R,y.TR=R,y.BL=R,y.BR=R;break;case n.FILL_STYLE:var M=C(p[++O],p[++O]*v);m.TL=M,m.TR=M,m.BL=M,m.BR=M;break;case n.GRADIENT_FILL_STYLE:var P=p[++O]*v,I=p[++O]*v,k=p[++O]*v,L=p[++O]*v;m.TL=C(p[++O],P),m.TR=C(p[++O],I),m.BL=C(p[++O],k),m.BR=C(p[++O],L);break;case n.GRADIENT_LINE_STYLE:g=p[++O];var D=p[++O]*v;y.TL=C(p[++O],D),y.TR=C(p[++O],D),y.BL=C(p[++O],D),y.BR=C(p[++O],D);break;case n.ARC:var F=0,N=p[++O],B=p[++O],U=p[++O],V=p[++O],Y=p[++O],z=p[++O],X=p[++O];for(Y-=V,z?Y<-b?Y=-b:Y>0&&(Y=Y%b-b):Y>b?Y=b:Y<0&&(Y=b+Y%b),null===A&&(A=new h(N+Math.cos(V)*U,B+Math.sin(V)*U,g),T.push(A),F+=.01);F<1+X;)_=Y*F+V,x=N+Math.cos(_)*U,w=B+Math.sin(_)*U,A.points.push(new a(x,w,g)),F+=.01;_=Y+V,x=N+Math.cos(_)*U,w=B+Math.sin(_)*U,A.points.push(new a(x,w,g));break;case n.FILL_RECT:c.batchFillRect(p[++O],p[++O],p[++O],p[++O],d,f);break;case n.FILL_TRIANGLE:c.batchFillTriangle(p[++O],p[++O],p[++O],p[++O],p[++O],p[++O],d,f);break;case n.STROKE_TRIANGLE:c.batchStrokeTriangle(p[++O],p[++O],p[++O],p[++O],p[++O],p[++O],g,d,f);break;case n.LINE_TO:null!==A?A.points.push(new a(p[++O],p[++O],g)):(A=new h(p[++O],p[++O],g),T.push(A));break;case n.MOVE_TO:A=new h(p[++O],p[++O],g),T.push(A);break;case n.SAVE:u.push(d.copyToArray());break;case n.RESTORE:d.copyFromArray(u.pop());break;case n.TRANSLATE:N=p[++O],B=p[++O],d.translate(N,B);break;case n.SCALE:N=p[++O],B=p[++O],d.scale(N,B);break;case n.ROTATE:d.rotate(p[++O])}t.pipelines.postBatch(e)}}}
4639,function(t,e,i){ 4640/** 4641 * @author Richard Davey <[email protected]> 4642 * @copyright 2020 Photon Storm Ltd. 4643 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4644 */ 4645var n=i(1),r=i(1);n=i(1060),r=i(1061),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),e.pipeline.batchSprite(e,i,n)}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},function(t,e,i){ 4646/** 4647 * @author Richard Davey <[email protected]> 4648 * @copyright 2020 Photon Storm Ltd. 4649 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4650 */ 4651var n=i(1),r=i(1);n=i(1063),r=i(1064),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),this.pipeline.batchSprite(e,i,n)}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},function(t,e,i){ 4652/** 4653 * @author Richard Davey <[email protected]> 4654 * @copyright 2020 Photon Storm Ltd. 4655 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4656 */ 4657var n=i(1),r=i(1);n=i(1066),r=i(1067),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e){t.exports=function(t,e,i){var n=e.list,r=n.length;if(0!==r){e.depthSort(),t.pipelines.preBatch(e);var s=-1!==e.blendMode;s||t.setBlendMode(0);for(var o=e.alpha,a=0;a<r;a++){var h=n[a];if(h.willRender(i)){var u,l,c,f;if(void 0!==h.alphaTopLeft)u=h.alphaTopLeft,l=h.alphaTopRight,c=h.alphaBottomLeft,f=h.alphaBottomRight;else{var d=h.alpha;u=d,l=d,c=d,f=d}s||h.blendMode===t.currentBlendMode||t.setBlendMode(h.blendMode);var p=h.mask;p&&p.preRenderWebGL(t,h,i);var v=h.type;v!==t.currentType&&(t.newType=!0,t.currentType=v),t.nextTypeMatch=a<r-1&&n[a+1].type===t.currentType,h.setAlpha(u*o,l*o,c*o,f*o),h.renderWebGL(t,h,i),h.setAlpha(u,l,c,f),p&&p.postRenderWebGL(t,i),t.newType=!1}}t.pipelines.postBatch(e)}}},function(t,e){t.exports=function(t,e,i){var n=e.list;if(0!==n.length){e.depthSort();var r=-1!==e.blendMode;r||t.setBlendMode(0);var s=e._alpha;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var o=0;o<n.length;o++){var a=n[o];if(a.willRender(i)){var h=a.alpha;r||a.blendMode===t.currentBlendMode||t.setBlendMode(a.blendMode),a.setAlpha(h*s),a.renderCanvas(t,a,i),a.setAlpha(h)}}e.mask&&e.mask.postRenderCanvas(t)}}},function(t,e,i){ 4658/** 4659 * @author Richard Davey <[email protected]> 4660 * @copyright 2020 Photon Storm Ltd. 4661 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4662 */ 4663t.exports={EmitterOp:i(443),GravityWell:i(444),Particle:i(445),ParticleEmitter:i(446),ParticleEmitterManager:i(217),Zones:i(1072)}},function(t,e,i){ 4664/** 4665 * @author Richard Davey <[email protected]> 4666 * @copyright 2020 Photon Storm Ltd. 4667 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4668 */ 4669var n=i(1),r=i(1);n=i(1070),r=i(1071),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4670/** 4671 * @author Richard Davey <[email protected]> 4672 * @copyright 2020 Photon Storm Ltd. 4673 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4674 */ 4675var n=i(25),r=i(12),s=new n,o=new n,a=new n,h=new n;t.exports=function(t,e,i,n){var u=e.emitters.list,l=u.length;if(0!==l){var c=t.pipelines.set(e.pipeline),f=s,d=o,p=a,v=h;n?(v.loadIdentity(),v.multiply(n),v.translate(e.x,e.y),v.rotate(e.rotation),v.scale(e.scaleX,e.scaleY)):v.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var g=i.roundPixels,m=e.defaultFrame.glTexture,y=r.getTintAppendFloatAlpha,x=c.setGameObject(e,e.defaultFrame);t.pipelines.preBatch(e);for(var w=0;w<l;w++){var _=u[w],b=_.alive,T=b.length;if(_.visible&&0!==T){i.addToRenderList(_);var E=_.scrollFactorX,S=_.scrollFactorY;t.setBlendMode(_.blendMode),_.mask&&(_.mask.preRenderWebGL(t,_,i),t.pipelines.set(e.pipeline));for(var A=0;A<T;A++){var C=b[A],O=C.alpha*i.alpha;if(!(O<=0)){p.applyITRS(C.x,C.y,C.rotation,C.scaleX,C.scaleY),f.copyFrom(i.matrix
4675),f.multiplyWithOffset(v,-i.scrollX*E,-i.scrollY*S),p.e=C.x,p.f=C.y,f.multiply(p,d);var R=C.frame,M=-R.halfWidth,P=-R.halfHeight,I=M+R.width,k=P+R.height,L=d.getXRound(M,P,g),D=d.getYRound(M,P,g),F=d.getXRound(M,k,g),N=d.getYRound(M,k,g),B=d.getXRound(I,k,g),U=d.getYRound(I,k,g),V=d.getXRound(I,P,g),Y=d.getYRound(I,P,g),z=y(C.tint,O);c.batchQuad(_,L,D,F,N,B,U,V,Y,R.u0,R.v0,R.u1,R.v1,z,z,z,z,0,m,x)}}_.mask&&_.mask.postRenderWebGL(t,i)}}t.pipelines.postBatch(e)}}},function(t,e,i){ 4676/** 4677 * @author Richard Davey <[email protected]> 4678 * @copyright 2020 Photon Storm Ltd. 4679 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4680 */ 4681var n=i(25),r=new n,s=new n,o=new n,a=new n;t.exports=function(t,e,i,n){var h=e.emitters.list,u=h.length;if(0!==u){var l=r.copyFrom(i.matrix),c=s,f=o,d=a;n?(d.loadIdentity(),d.multiply(n),d.translate(e.x,e.y),d.rotate(e.rotation),d.scale(e.scaleX,e.scaleY)):d.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);for(var p=t.currentContext,v=i.roundPixels,g=0;g<u;g++){var m=h[g],y=m.alive,x=y.length;if(m.visible&&0!==x){i.addToRenderList(m);var w=m.follow?m.follow.x+m.followOffset.x:0,_=m.follow?m.follow.y+m.followOffset.y:0,b=m.scrollFactorX,T=m.scrollFactorY;p.save(),p.globalCompositeOperation=t.blendModes[m.blendMode];for(var E=0;E<x;E++){var S=y[E],A=S.alpha*i.alpha;if(!(A<=0)){f.applyITRS(S.x,S.y,S.rotation,S.scaleX,S.scaleY),l.copyFrom(i.matrix),l.multiplyWithOffset(d,w+-i.scrollX*b,_+-i.scrollY*T),f.e=S.x,f.f=S.y,l.multiply(f,c);var C=S.frame,O=C.canvasData,R=-C.halfWidth,M=-C.halfHeight;p.globalAlpha=A,p.save(),c.setToContext(p),v&&(R=Math.round(R),M=Math.round(M)),p.imageSmoothingEnabled=!(!t.antialias||C.source.scaleMode),p.drawImage(C.source.image,O.x,O.y,O.width,O.height,R,M,O.width,O.height),p.restore(
4681)}}p.restore()}}}}},function(t,e,i){ 4682/** 4683 * @author Richard Davey <[email protected]> 4684 * @copyright 2020 Photon Storm Ltd. 4685 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4686 */ 4687t.exports={DeathZone:i(447),EdgeZone:i(448),RandomZone:i(450)}},function(t,e,i){ 4688/** 4689 * @author Richard Davey <[email protected]> 4690 * @copyright 2020 Photon Storm Ltd. 4691 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4692 */ 4693var n=i(1),r=i(1);n=i(1074),r=i(1075),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4694/** 4695 * @author Richard Davey <[email protected]> 4696 * @copyright 2020 Photon Storm Ltd. 4697 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4698 */ 4699var n=i(12);t.exports=function(t,e,i,r){i.addToRenderList(e);var s=i.alpha,o=e.renderTarget,a=o.width,h=o.height,u=n.getTintAppendFloatAlpha,l=t.pipelines.set(e.pipeline),c=l.setTexture2D(o.texture);t.pipelines.preBatch(e),l.batchTexture(e,o.texture,a,h,e.x,e.y,a,h,e.scaleX,e.scaleY,e.rotation,e.flipX,!e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,a,h,u(e.tintTopLeft,s*e._alphaTL),u(e.tintTopRight,s*e._alphaTR),u(e.tintBottomLeft,s*e._alphaBL),u(e.tintBottomRight,s*e._alphaBR),e.tintFill,0,0,i,r,!0,c),t.resetTextures(),t.pipelines.postBatch(e)}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},function(t,e,i){ 4700/** 4701 * @author Richard Davey <[email protected]> 4702 * @copyright 2020 Photon Storm Ltd. 4703 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4704 */ 4705var n=i(1077),r=i(17),s={Parse:i(1078)};s=r(!1,s,n),t.exports=s},function(t,e){ 4706/** 4707 * @author Richard Davey <[email protected]> 4708 * @copyright 2020 Photon Storm Ltd. 4709 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4710 */ 4711var i={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"};t.exports=i},function(t,e,i){ 4712/** 4713 * @author Richard Davey <[email protected]> 4714 * @copyright 2020 Photon Storm Ltd. 4715 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4716 */ 4717var n=i(6);t.exports=function(t,e){var i=e.width,r=e.height,s=Math.floor(i/2),o=Math.floor(r/2),a=n(e,"chars","");if(""!==a){var h=n(e,"image",""),u=t.sys.textures.getFrame(h),l=u.cutX,c=u.cutY,f=u.source.width,d=u.source.height,p=n(e,"offset.x",0),v=n(e,"offset.y",0),g=n(e,"spacing.x",0),m=n(e,"spacing.y",0),y=n(e,"lineSpacing",0),x=n(e,"charsPerRow",null);null===x&&(x=f/i)>a.length&&(x=a.length);for(var w=p,_=v,b={retroFont:!0,font:h,size:i,lineHeight:r+y,chars:{}},T=0,E=0;E<a.length;E++){var S=a.charCodeAt(E),A=(l+w)/f,C=(c+_)/d,O=(l+w+i)/f,R=(c+_+r)/d;b.chars[S]={x:w,y:_,width:i,height:r,centerX:s,centerY:o,xOffset:0,yOffset:0,xAdvance:i,data:{},kerning:{},u0:A,v0:C,u1:O,v1:R},++T===x?(T=0,w=p,_+=r+m):w+=i+g}return{data:b,frame:null,texture:h}}}},function(t,e,i){ 4718/** 4719 * @author Richard Davey <[email protected]> 4720 * @copyright 2020 Photon Storm Ltd. 4721 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4722 */ 4723var n=i(1),r=i(1);n=i(1080),r=i(1081),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4724/** 4725 * @author Richard Davey <[email protected]> 4726 * @copyright 2020 Photon Storm Ltd. 4727 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4728 */ 4729var n=i(19),r=i(12);
4729t.exports=function(t,e,i,s){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline,e),a=n(e,i,s).calc,h=e.vertices,u=e.uv,l=e.colors,c=e.alphas,f=e.alpha,d=r.getTintAppendFloatAlpha,p=i.roundPixels,v=h.length,g=Math.floor(.5*v);o.flush(),t.pipelines.preBatch(e);var m=o.setGameObject(e),y=o.vertexViewF32,x=o.vertexViewU32,w=o.vertexCount*o.currentShader.vertexComponentCount-1,_=0,b=e.tintFill;e.dirty&&e.updateVertices();for(var T=e.debugCallback,E=[],S=0;S<v;S+=2){var A=h[S+0],C=h[S+1],O=A*a.a+C*a.c+a.e,R=A*a.b+C*a.d+a.f;p&&(O=Math.round(O),R=Math.round(R)),y[++w]=O,y[++w]=R,y[++w]=u[S+0],y[++w]=u[S+1],y[++w]=m,y[++w]=b,x[++w]=d(l[_],i.alpha*(c[_]*f)),_++,T&&(E[S+0]=O,E[S+1]=R)}T&&T.call(e,e,v,E),o.vertexCount+=g,t.pipelines.postBatch(e)}},function(t,e){t.exports=function(){}},function(t,e,i){ 4730/** 4731 * @author Richard Davey <[email protected]> 4732 * @copyright 2020 Photon Storm Ltd. 4733 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4734 */ 4735var n=i(1),r=i(1);n=i(1083),r=i(1084),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4736/** 4737 * @author Richard Davey <[email protected]> 4738 * @copyright 2020 Photon Storm Ltd. 4739 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4740 */ 4741var n=i(12);t.exports=function(t,e,i,r){if(0!==e.width&&0!==e.height){i.addToRenderList(e);var s=e.frame,o=s.width,a=s.height,h=n.getTintAppendFloatAlpha,u=t.pipelines.set(e.pipeline,e),l=u.setTexture2D(s.glTexture,e);t.pipelines.preBatch(e),u.batchTexture(e,s.glTexture,o,a,e.x,e.y,o/e.style.resolution,a/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,o,a,h(e.tintTopLeft,i.alpha*e._alphaTL),h(e.tintTopRight,i.alpha*e._alphaTR),h(e.tintBottomLeft,i.alpha*e._alphaBL),h(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,0,0,i,r,!1,l),t.pipelines.postBatch(e)}}},function(t,e){t.exports=function(t,e,i,n){0!==e.width&&0!==e.height&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,n))}},function(t,e,i){ 4742/** 4743 * @author Richard Davey <[email protected]> 4744 * @copyright 2020 Photon Storm Ltd. 4745 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4746 */ 4747var n=i(1),r=i(1);n=i(1086),r=i(1087),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4748/** 4749 * @author Richard Davey <[email protected]> 4750 * @copyright 2020 Photon Storm Ltd. 4751 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4752 */ 4753var n=i(12);t.exports=function(t,e,i,r){e.updateCanvas();var s=e.width,o=e.height;if(0!==s&&0!==o){i.addToRenderList(e),t.pipelines.preBatch(e);var a=n.getTintAppendFloatAlpha,h=t.pipelines.set(e.pipeline,e),u=h.setTexture2D(e.fillPattern,e);h.batchTexture(e,e.fillPattern,e.displayFrame.width*e.tileScaleX,e.displayFrame.height*e.tileScaleY,e.x,e.y,s,o,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.originX*s,e.originY*o,0,0,s,o,a(e.tintTopLeft,i.alpha*e._alphaTL),a(e.tintTopRight,i.alpha*e._alphaTR),a(e.tintBottomLeft,i.alpha*e._alphaBL),a(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,e.tilePositionX%e.displayFrame.width/e.displayFrame.width,e.tilePositionY%e.displayFrame.height/e.displayFrame.height,i,r,!1,u),t.pipelines.postBatch(e)}}},function(t,e){t.exports=function(t,e,i,n){e.updateCanvas(),i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},function(t,e,i){ 4754/** 4755 * @author Richard Davey <[email protected]> 4756 * @copyright 2020 Photon Storm Ltd. 4757 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4758 */ 4759var n=i(1),r=i(1);n=i(1089),r=i(1090),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e){t.exports=function(t,e,i,n){e.videoTexture&&(i.addToRenderList(e),e.pipeline.batchSprite(e,i,n))}},function(t,e){t.exports=function(t,e,i,n){e.videoTexture&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,n))}},function(t,e,i){ 4760/** 4761 * @author Richard Davey <[email protected]> 4762 * @copyright 2020 Photon Storm Ltd. 4763 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4764 */ 4765var n=i(1),r=i(1);
vendor: 4,203 bytes, lines 4765-4813
4765n=i(1092),r=i(1093),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4766/** 4767 * @author Richard Davey <[email protected]> 4768 * @copyright 2020 Photon Storm Ltd. 4769 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4770 */ 4771var n=i(19),r=i(111),s=i(81);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o),u=a.calcMatrix.copyFrom(h.calc),l=e._displayOriginX,c=e._displayOriginY,f=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&r(a,u,e,f,l,c),e.isStroked&&s(a,e,f,l,c),t.pipelines.postBatch(e)}},function(t,e,i){ 4772/** 4773 * @author Richard Davey <[email protected]> 4774 * @copyright 2020 Photon Storm Ltd. 4775 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4776 */ 4777var n=i(35),r=i(46),s=i(58),o=i(30);t.exports=function(t,e,i,a){i.addToRenderList(e);var h=t.currentContext;if(o(t,h,e,i,a)){var u=e.radius;h.beginPath(),h.arc(u-e.originX*(2*u),u-e.originY*(2*u),u,n(e._startAngle),n(e._endAngle),e.anticlockwise),e.closePath&&h.closePath(),e.isFilled&&(r(h,e),h.fill()),e.isStroked&&(s(h,e),h.stroke()),h.restore()}}},function(t,e,i){ 4778/** 4779 * @author Richard Davey <[email protected]> 4780 * @copyright 2020 Photon Storm Ltd. 4781 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4782 */ 4783var n=i(1),r=i(1);n=i(1095),r=i(1096),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4784/** 4785 * @author Richard Davey <[email protected]> 4786 * @copyright 2020 Photon Storm Ltd. 4787 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4788 */ 4789var n=i(111),r=i(19),s=i(81);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=r(e,i,o),u=a.calcMatrix.copyFrom(h.calc),l=e._displayOriginX+e._curveBounds.x,c=e._displayOriginY+e._curveBounds.y,f=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&n(a,u,e,f,l,c),e.isStroked&&s(a,e,f,l,c),t.pipelines.postBatch(e)}},function(t,e,i){ 4790/** 4791 * @author Richard Davey <[email protected]> 4792 * @copyright 2020 Photon Storm Ltd. 4793 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4794 */ 4795var n=i(46),r=i(58),s=i(30);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(s(t,a,e,i,o)){var h=e._displayOriginX+e._curveBounds.x,u=e._displayOriginY+e._curveBounds.y,l=e.pathData,c=l.length-1,f=l[0]-h,d=l[1]-u;a.beginPath(),a.moveTo(f,d),e.closePath||(c-=2);for(var p=2;p<c;p+=2){var v=l[p]-h,g=l[p+1]-u;a.lineTo(v,g)}e.closePath&&a.closePath(),e.isFilled&&(n(a,e),a.fill()),e.isStroked&&(r(a,e),a.stroke()),a.restore()}}},function(t,e,i){ 4796/** 4797 * @author Richard Davey <[email protected]> 4798 * @copyright 2020 Photon Storm Ltd. 4799 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4800 */ 4801var n=i(1),r=i(1);n=i(1098),r=i(1099),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4802/** 4803 * @author Richard Davey <[email protected]> 4804 * @copyright 2020 Photon Storm Ltd. 4805 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4806 */ 4807var n=i(111),r=i(19),s=i(81);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=r(e,i,o),u=a.calcMatrix.copyFrom(h.calc),l=e._displayOriginX,c=e._displayOriginY,f=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&n(a,u,e,f,l,c),e.isStroked&&s(a,e,f,l,c),t.pipelines.postBatch(e)}},function(t,e,i){ 4808/** 4809 * @author Richard Davey <[email protected]> 4810 * @copyright 2020 Photon Storm Ltd. 4811 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4812 */ 4813var n=i(46),r=i(58),s=i(30);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(s(t,a,e,i,o)){var h=e._displayOriginX,u=e._displayOriginY,l=e.pathData,c=l.length-1,f=l[0]-h,d=l[1]-u;a.beginPath(),a.moveTo(f,d),e.closePath||(c-=2);for(var p=2;p<c;p+=2){var v=l[p]-h,g=l[p+1]-u;a.lineTo(v,g)}a.closePath(),e.isFilled&&(n(a,e),a.fill()),e.isStroked&&(r(a,e),a.stroke()),a.restore(
4813)}}},function(t,e,i){ 4814/** 4815 * @author Richard Davey <[email protected]> 4816 * @copyright 2020 Photon Storm Ltd. 4817 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4818 */ 4819var n=i(1),r=i(1);n=i(1101),r=i(1102),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4820/** 4821 * @author Richard Davey <[email protected]> 4822 * @copyright 2020 Photon Storm Ltd. 4823 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4824 */ 4825var n=i(19),r=i(12);t.exports=function(t,e,i,s){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),a=n(e,i,s);o.calcMatrix.copyFrom(a.calc).translate(-e._displayOriginX,-e._displayOriginY);var h,u,l=i.alpha*e.alpha,c=e.width,f=e.height,d=e.cellWidth,p=e.cellHeight,v=Math.ceil(c/d),g=Math.ceil(f/p),m=d,y=p,x=d-(v*d-c),w=p-(g*p-f),_=e.showCells,b=e.showAltCells,T=e.showOutline,E=0,S=0,A=0,C=0,O=0;if(T&&(m--,y--,x===d&&x--,w===p&&w--),t.pipelines.preBatch(e),_&&e.fillAlpha>0)for(h=o.fillTint,u=r.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*l),h.TL=u,h.TR=u,h.BL=u,h.BR=u,S=0;S<g;S++)for(b&&(A=S%2),E=0;E<v;E++)b&&A?A=0:(A++,C=E<v-1?m:x,O=S<g-1?y:w,o.batchFillRect(E*d,S*p,C,O));if(b&&e.altFillAlpha>0)for(h=o.fillTint,u=r.getTintAppendFloatAlpha(e.altFillColor,e.altFillAlpha*l),h.TL=u,h.TR=u,h.BL=u,h.BR=u,S=0;S<g;S++)for(b&&(A=S%2),E=0;E<v;E++)!b||A?(A=0,C=E<v-1?m:x,O=S<g-1?y:w,o.batchFillRect(E*d,S*p,C,O)):A=1;if(T&&e.outlineFillAlpha>0){var R=o.strokeTint,M=r.getTintAppendFloatAlpha(e.outlineFillColor,e.outlineFillAlpha*l);for(R.TL=M,R.TR=M,R.BL=M,R.BR=M,E=1;E<v;E++){var P=E*d;o.batchLine(P,0,P,f,1,1,1,0,!1)}for(S=1;S<g;S++){var I=S*p;o.batchLine(0,I,c,I,1,1,1,0,!1)}}t.pipelines.postBatch(e)}},function(t,e,i){ 4826/** 4827 * @author Richard Davey <[email protected]> 4828 * @copyright 2020 Photon Storm Ltd. 4829 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4830 */ 4831var n=i(46),r=i(58),s=i(30);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(s(t,a,e,i,o)){var h=-e._displayOriginX,u=-e._displayOriginY,l=i.alpha*e.alpha,c=e.width,f=e.height,d=e.cellWidth,p=e.cellHeight,v=Math.ceil(c/d),g=Math.ceil(f/p),m=d,y=p,x=d-(v*d-c),w=p-(g*p-f),_=e.showCells,b=e.showAltCells,T=e.showOutline,E=0,S=0,A=0,C=0,O=0;if(T&&(m--,y--,x===d&&x--,w===p&&w--),_&&e.fillAlpha>0)for(n(a,e),S=0;S<g;S++)for(b&&(A=S%2),E=0;E<v;E++)b&&A?A=0:(A++,C=E<v-1?m:x,O=S<g-1?y:w,a.fillRect(h+E*d,u+S*p,C,O));if(b&&e.altFillAlpha>0)for(n(a,e,e.altFillColor,e.altFillAlpha*l),S=0;S<g;S++)for(b&&(A=S%2),E=0;E<v;E++)!b||A?(A=0,C=E<v-1?m:x,O=S<g-1?y:w,a.fillRect(h+E*d,u+S*p,C,O)):A=1;if(T&&e.outlineFillAlpha>0){for(r(a,e,e.outlineFillColor,e.outlineFillAlpha*l),E=1;E<v;E++){var R=E*d;a.beginPath(),a.moveTo(R+h,u),a.lineTo(R+h,f+u),a.stroke()}for(S=1;S<g;S++){var M=S*p;a.beginPath(),a.moveTo(h,M+u),a.lineTo(h+c,M+u),a.stroke()}}a.restore()}}},function(t,e,i){ 4832/** 4833 * @author Richard Davey <[email protected]> 4834 * @copyright 2020 Photon Storm Ltd. 4835 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4836 */ 4837var n=i(1),r=i(1);n=i(1104),r=i(1105),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4838/** 4839 * @author Richard Davey <[email protected]> 4840 * @copyright 2020 Photon Storm Ltd. 4841 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4842 */ 4843var n=i(19),r=i(12);t.exports=function(t,e,i,s){i.addToRenderList(e);var o,a,h,u,l,c,f,d,p,v=t.pipelines.set(e.pipeline),g=n(e,i,s),m=v.calcMatrix.copyFrom(g.calc),y=e.width,x=e.height,w=y/2,_=y/e.projection,b=i.alpha*e.alpha;e.isFilled&&(t.pipelines.preBatch(e),e.showTop&&(o=r.getTintAppendFloatAlpha(e.fillTop,b),a=m.getX(-w,-x),h=m.getY(-w,-x),u=m.getX(0,-_-x),l=m.getY(0,-_-x),c=m.getX(w,-x),f=m.getY(w,-x),d=m.getX(0,_-x),p=m.getY(0,_-x),v.batchQuad(a,h,u,l,c,f,d,p,o,o,o,o)),e.showLeft&&(o=r.getTintAppendFloatAlpha(e.fillLeft,b),a=m.getX(-w,0),h=m.getY(-w,0),u=m.getX(0,_),l=m.getY(0,_),c=m.getX(0,_-x),f=m.getY(0,_-x),d=m.getX(-w,-x),p=m.getY(-w,-x),v.batchQuad(a,h,u,l,c,f,d,p,o,o,o,o)),e.showRight&&(o=r.getTintAppendFloatAlpha(e.fillRight,b),a=m.getX(w,0),h=m.getY(w,0),u=m.getX(0,_),l=m.getY(0,_),c=m.getX(0,_-x),f=m.getY(0,_-x),d=m.getX(w,-x),p=m.getY(w,-x),v.batchQuad(a,h,u,l,c,f,d,p,o,o,o,o)),t.pipelines.postBatch(e))}}
4843,function(t,e,i){ 4844/** 4845 * @author Richard Davey <[email protected]> 4846 * @copyright 2020 Photon Storm Ltd. 4847 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4848 */ 4849var n=i(46),r=i(30);t.exports=function(t,e,i,s){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,s)&&e.isFilled){var a=e.width,h=e.height,u=a/2,l=a/e.projection;e.showTop&&(n(o,e,e.fillTop),o.beginPath(),o.moveTo(-u,-h),o.lineTo(0,-l-h),o.lineTo(u,-h),o.lineTo(u,-1),o.lineTo(0,l-1),o.lineTo(-u,-1),o.lineTo(-u,-h),o.fill()),e.showLeft&&(n(o,e,e.fillLeft),o.beginPath(),o.moveTo(-u,0),o.lineTo(0,l),o.lineTo(0,l-h),o.lineTo(-u,-h),o.lineTo(-u,0),o.fill()),e.showRight&&(n(o,e,e.fillRight),o.beginPath(),o.moveTo(u,0),o.lineTo(0,l),o.lineTo(0,l-h),o.lineTo(u,-h),o.lineTo(u,0),o.fill()),o.restore()}}},function(t,e,i){ 4850/** 4851 * @author Richard Davey <[email protected]> 4852 * @copyright 2020 Photon Storm Ltd. 4853 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4854 */ 4855var n=i(1),r=i(1);n=i(1107),r=i(1108),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4856/** 4857 * @author Richard Davey <[email protected]> 4858 * @copyright 2020 Photon Storm Ltd. 4859 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4860 */ 4861var n=i(19),r=i(12);t.exports=function(t,e,i,s){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),a=n(e,i,s),h=o.calcMatrix.copyFrom(a.calc),u=e.width,l=e.height,c=u/2,f=u/e.projection,d=e.isReversed,p=i.alpha*e.alpha;if(e.isFilled){var v,g,m,y,x,w,_;if(t.pipelines.preBatch(e),e.showTop&&d){v=r.getTintAppendFloatAlpha(e.fillTop,p),g=h.getX(-c,-l),m=h.getY(-c,-l),y=h.getX(0,-f-l),x=h.getY(0,-f-l),w=h.getX(c,-l),_=h.getY(c,-l);var b=h.getX(0,f-l),T=h.getY(0,f-l);o.batchQuad(g,m,y,x,w,_,b,T,v,v,v,v)}e.showLeft&&(v=r.getTintAppendFloatAlpha(e.fillLeft,p),d?(g=h.getX(-c,-l),m=h.getY(-c,-l),y=h.getX(0,f),x=h.getY(0,f),w=h.getX(0,f-l),_=h.getY(0,f-l)):(g=h.getX(-c,0),m=h.getY(-c,0),y=h.getX(0,f),x=h.getY(0,f),w=h.getX(0,f-l),_=h.getY(0,f-l)),o.batchTri(g,m,y,x,w,_,v,v,v)),e.showRight&&(v=r.getTintAppendFloatAlpha(e.fillRight,p),d?(g=h.getX(c,-l),m=h.getY(c,-l),y=h.getX(0,f),x=h.getY(0,f),w=h.getX(0,f-l),_=h.getY(0,f-l)):(g=h.getX(c,0),m=h.getY(c,0),y=h.getX(0,f),x=h.getY(0,f),w=h.getX(0,f-l),_=h.getY(0,f-l)),o.batchTri(g,m,y,x,w,_,v,v,v)),t.pipelines.postBatch(e)}}},function(t,e,i){ 4862/** 4863 * @author Richard Davey <[email protected]> 4864 * @copyright 2020 Photon Storm Ltd. 4865 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4866 */ 4867var n=i(46),r=i(30);t.exports=function(t,e,i,s){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,s)&&e.isFilled){var a=e.width,h=e.height,u=a/2,l=a/e.projection,c=e.isReversed;e.showTop&&c&&(n(o,e,e.fillTop),o.beginPath(),o.moveTo(-u,-h),o.lineTo(0,-l-h),o.lineTo(u,-h),o.lineTo(0,l-h),o.fill()),e.showLeft&&(n(o,e,e.fillLeft),o.beginPath(),c?(o.moveTo(-u,-h),o.lineTo(0,l),o.lineTo(0,l-h)):(o.moveTo(-u,0),o.lineTo(0,l),o.lineTo(0,l-h)),o.fill()),e.showRight&&(n(o,e,e.fillRight),o.beginPath(),c?(o.moveTo(u,-h),o.lineTo(0,l),o.lineTo(0,l-h)):(o.moveTo(u,0),o.lineTo(0,l),o.lineTo(0,l-h)),o.fill()),o.restore()}}},function(t,e,i){ 4868/** 4869 * @author Richard Davey <[email protected]> 4870 * @copyright 2020 Photon Storm Ltd. 4871 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4872 */ 4873var n=i(1),r=i(1);n=i(1110),r=i(1111),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4874/** 4875 * @author Richard Davey <[email protected]> 4876 * @copyright 2020 Photon Storm Ltd. 4877 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4878 */ 4879var n=i(19),r=i(12);t.exports=function(t,e,i,s){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),a=n(e,i,s);o.calcMatrix.copyFrom(a.calc);var h=e._displayOriginX,u=e._displayOriginY,l=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isStroked){var c=o.strokeTint,f=r.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*l);c.TL=f,c.TR=f,c.BL=f,c.BR=f;var d=e._startWidth,p=e._endWidth;o.batchLine(e.geom.x1-h,e.geom.y1-u,e.geom.x2-h,e.geom.y2-u,d,p,1,0,!1,a.sprite,a.camera)}t.pipelines.postBatch(e)}}
4879,function(t,e,i){ 4880/** 4881 * @author Richard Davey <[email protected]> 4882 * @copyright 2020 Photon Storm Ltd. 4883 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4884 */ 4885var n=i(58),r=i(30);t.exports=function(t,e,i,s){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,s)){var a=e._displayOriginX,h=e._displayOriginY;e.isStroked&&(n(o,e),o.beginPath(),o.moveTo(e.geom.x1-a,e.geom.y1-h),o.lineTo(e.geom.x2-a,e.geom.y2-h),o.stroke()),o.restore()}}},function(t,e,i){ 4886/** 4887 * @author Richard Davey <[email protected]> 4888 * @copyright 2020 Photon Storm Ltd. 4889 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4890 */ 4891var n=i(1),r=i(1);n=i(1113),r=i(1114),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4892/** 4893 * @author Richard Davey <[email protected]> 4894 * @copyright 2020 Photon Storm Ltd. 4895 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4896 */ 4897var n=i(111),r=i(19),s=i(81);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=r(e,i,o),u=a.calcMatrix.copyFrom(h.calc),l=e._displayOriginX,c=e._displayOriginY,f=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&n(a,u,e,f,l,c),e.isStroked&&s(a,e,f,l,c),t.pipelines.postBatch(e)}},function(t,e,i){ 4898/** 4899 * @author Richard Davey <[email protected]> 4900 * @copyright 2020 Photon Storm Ltd. 4901 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4902 */ 4903var n=i(46),r=i(58),s=i(30);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(s(t,a,e,i,o)){var h=e._displayOriginX,u=e._displayOriginY,l=e.pathData,c=l.length-1,f=l[0]-h,d=l[1]-u;a.beginPath(),a.moveTo(f,d),e.closePath||(c-=2);for(var p=2;p<c;p+=2){var v=l[p]-h,g=l[p+1]-u;a.lineTo(v,g)}a.closePath(),e.isFilled&&(n(a,e),a.fill()),e.isStroked&&(r(a,e),a.stroke()),a.restore()}}},function(t,e,i){ 4904/** 4905 * @author Richard Davey <[email protected]> 4906 * @copyright 2020 Photon Storm Ltd. 4907 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4908 */ 4909var n=i(1),r=i(1);n=i(1116),r=i(1117),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4910/** 4911 * @author Richard Davey <[email protected]> 4912 * @copyright 2020 Photon Storm Ltd. 4913 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4914 */ 4915var n=i(19),r=i(81),s=i(12);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o);a.calcMatrix.copyFrom(h.calc);var u=e._displayOriginX,l=e._displayOriginY,c=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isFilled){var f=a.fillTint,d=s.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*c);f.TL=d,f.TR=d,f.BL=d,f.BR=d,a.batchFillRect(-u,-l,e.width,e.height)}e.isStroked&&r(a,e,c,u,l),t.pipelines.postBatch(e)}},function(t,e,i){ 4916/** 4917 * @author Richard Davey <[email protected]> 4918 * @copyright 2020 Photon Storm Ltd. 4919 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4920 */ 4921var n=i(46),r=i(58),s=i(30);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(s(t,a,e,i,o)){var h=e._displayOriginX,u=e._displayOriginY;e.isFilled&&(n(a,e),a.fillRect(-h,-u,e.width,e.height)),e.isStroked&&(r(a,e),a.beginPath(),a.rect(-h,-u,e.width,e.height),a.stroke()),a.restore()}}},function(t,e,i){ 4922/** 4923 * @author Richard Davey <[email protected]> 4924 * @copyright 2020 Photon Storm Ltd. 4925 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4926 */ 4927var n=i(1),r=i(1);n=i(1119),r=i(1120),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4928/** 4929 * @author Richard Davey <[email protected]> 4930 * @copyright 2020 Photon Storm Ltd. 4931 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4932 */ 4933var n=i(111),r=i(19),s=i(81);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=r(e,i,o),u=a.calcMatrix.copyFrom(h.calc),l=e._displayOriginX,c=e._displayOriginY,f=i.alpha*e.alpha;
4933t.pipelines.preBatch(e),e.isFilled&&n(a,u,e,f,l,c),e.isStroked&&s(a,e,f,l,c),t.pipelines.postBatch(e)}},function(t,e,i){ 4934/** 4935 * @author Richard Davey <[email protected]> 4936 * @copyright 2020 Photon Storm Ltd. 4937 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4938 */ 4939var n=i(46),r=i(58),s=i(30);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(s(t,a,e,i,o)){var h=e._displayOriginX,u=e._displayOriginY,l=e.pathData,c=l.length-1,f=l[0]-h,d=l[1]-u;a.beginPath(),a.moveTo(f,d),e.closePath||(c-=2);for(var p=2;p<c;p+=2){var v=l[p]-h,g=l[p+1]-u;a.lineTo(v,g)}a.closePath(),e.isFilled&&(n(a,e),a.fill()),e.isStroked&&(r(a,e),a.stroke()),a.restore()}}},function(t,e,i){ 4940/** 4941 * @author Richard Davey <[email protected]> 4942 * @copyright 2020 Photon Storm Ltd. 4943 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4944 */ 4945var n=i(1),r=i(1);n=i(1122),r=i(1123),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 4946/** 4947 * @author Richard Davey <[email protected]> 4948 * @copyright 2020 Photon Storm Ltd. 4949 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4950 */ 4951var n=i(19),r=i(81),s=i(12);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o);a.calcMatrix.copyFrom(h.calc);var u=e._displayOriginX,l=e._displayOriginY,c=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isFilled){var f=a.fillTint,d=s.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*c);f.TL=d,f.TR=d,f.BL=d,f.BR=d;var p=e.geom.x1-u,v=e.geom.y1-l,g=e.geom.x2-u,m=e.geom.y2-l,y=e.geom.x3-u,x=e.geom.y3-l;a.batchFillTriangle(p,v,g,m,y,x,h.sprite,h.camera)}e.isStroked&&r(a,e,c,u,l),t.pipelines.postBatch(e)}},function(t,e,i){ 4952/** 4953 * @author Richard Davey <[email protected]> 4954 * @copyright 2020 Photon Storm Ltd. 4955 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4956 */ 4957var n=i(46),r=i(58),s=i(30);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(s(t,a,e,i,o)){var h=e._displayOriginX,u=e._displayOriginY,l=e.geom.x1-h,c=e.geom.y1-u,f=e.geom.x2-h,d=e.geom.y2-u,p=e.geom.x3-h,v=e.geom.y3-u;a.beginPath(),a.moveTo(l,c),a.lineTo(f,d),a.lineTo(p,v),a.closePath(),e.isFilled&&(n(a,e),a.fill()),e.isStroked&&(r(a,e),a.stroke()),a.restore()}}},function(t,e,i){ 4958/** 4959 * @author Richard Davey <[email protected]> 4960 * @copyright 2020 Photon Storm Ltd. 4961 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4962 */ 4963var n=i(210);i(5).register("blitter",(function(t,e,i,r){return this.displayList.add(new n(this.scene,t,e,i,r))}))},function(t,e,i){ 4964/** 4965 * @author Richard Davey <[email protected]> 4966 * @author Felipe Alfonso <@bitnenfer> 4967 * @copyright 2020 Photon Storm Ltd. 4968 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4969 */ 4970var n=i(211);i(5).register("container",(function(t,e,i){return this.displayList.add(new n(this.scene,t,e,i))}))},function(t,e,i){ 4971/** 4972 * @author Richard Davey <[email protected]> 4973 * @copyright 2020 Photon Storm Ltd. 4974 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4975 */ 4976var n=i(436);i(5).register("dom",(function(t,e,i,r,s){var o=new n(this.scene,t,e,i,r,s);return this.displayList.add(o),o}))},function(t,e,i){ 4977/** 4978 * @author Richard Davey <[email protected]> 4979 * @copyright 2020 Photon Storm Ltd. 4980 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4981 */ 4982var n=i(212);i(5).register("dynamicBitmapText",(function(t,e,i,r,s){return this.displayList.add(new n(this.scene,t,e,i,r,s))}))},function(t,e,i){ 4983/** 4984 * @author Richard Davey <[email protected]> 4985 * @copyright 2020 Photon Storm Ltd. 4986 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4987 */ 4988var n=i(438);i(5).register("extern",(function(){var t=new n(this.scene);return this.displayList.add(t),t}))}
4988,function(t,e,i){ 4989/** 4990 * @author Richard Davey <[email protected]> 4991 * @copyright 2020 Photon Storm Ltd. 4992 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4993 */ 4994var n=i(213);i(5).register("graphics",(function(t){return this.displayList.add(new n(this.scene,t))}))},function(t,e,i){ 4995/** 4996 * @author Richard Davey <[email protected]> 4997 * @copyright 2020 Photon Storm Ltd. 4998 * @license {@link https://opensource.org/licenses/MIT|MIT License} 4999 */ 5000var n=i(110);i(5).register("group",(function(t,e){return this.updateList.add(new n(this.scene,t,e))}))},function(t,e,i){ 5001/** 5002 * @author Richard Davey <[email protected]> 5003 * @copyright 2020 Photon Storm Ltd. 5004 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5005 */ 5006var n=i(124);i(5).register("image",(function(t,e,i,r){return this.displayList.add(new n(this.scene,t,e,i,r))}))},function(t,e,i){ 5007/** 5008 * @author Richard Davey <[email protected]> 5009 * @copyright 2020 Photon Storm Ltd. 5010 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5011 */ 5012var n=i(216);i(5).register("layer",(function(t){return this.displayList.add(new n(this.scene,t))}))},function(t,e,i){ 5013/** 5014 * @author Richard Davey <[email protected]> 5015 * @copyright 2020 Photon Storm Ltd. 5016 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5017 */ 5018var n=i(5),r=i(217);n.register("particles",(function(t,e,i){return this.displayList.add(new r(this.scene,t,e,i))}))},function(t,e,i){ 5019/** 5020 * @author Richard Davey <[email protected]> 5021 * @copyright 2020 Photon Storm Ltd. 5022 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5023 */ 5024var n=i(5),r=i(451);n.register("follower",(function(t,e,i,n,s){var o=new r(this.scene,t,e,i,n,s);return this.displayList.add(o),this.updateList.add(o),o}))},function(t,e,i){ 5025/** 5026 * @author Richard Davey <[email protected]> 5027 * @copyright 2020 Photon Storm Ltd. 5028 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5029 */ 5030var n=i(5),r=i(218);n.register("renderTexture",(function(t,e,i,n,s,o){return this.displayList.add(new r(this.scene,t,e,i,n,s,o))}))},function(t,e,i){ 5031/** 5032 * @author Richard Davey <[email protected]> 5033 * @copyright 2020 Photon Storm Ltd. 5034 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5035 */ 5036var n=i(220);i(5).register("rope",(function(t,e,i,r,s,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,r,s,o,a,h))}))},function(t,e,i){ 5037/** 5038 * @author Richard Davey <[email protected]> 5039 * @copyright 2020 Photon Storm Ltd. 5040 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5041 */ 5042var n=i(5),r=i(73);n.register("sprite",(function(t,e,i,n){var s=new r(this.scene,t,e,i,n);return this.displayList.add(s),s}))},function(t,e,i){ 5043/** 5044 * @author Richard Davey <[email protected]> 5045 * @copyright 2020 Photon Storm Ltd. 5046 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5047 */ 5048var n=i(147);i(5).register("bitmapText",(function(t,e,i,r,s,o){return this.displayList.add(new n(this.scene,t,e,i,r,s,o))}))},function(t,e,i){ 5049/** 5050 * @author Richard Davey <[email protected]> 5051 * @copyright 2020 Photon Storm Ltd. 5052 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5053 */ 5054var n=i(221);i(5).register("text",(function(t,e,i,r){return this.displayList.add(new n(this.scene,t,e,i,r))}))},function(t,e,i){ 5055/** 5056 * @author Richard Davey <[email protected]> 5057 * @copyright 2020 Photon Storm Ltd. 5058 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5059 */ 5060var n=i(222);i(5).register("tileSprite",(function(t,e,i,r,s,o){return this.displayList.add(new n(this.scene,t,e,i,r,s,o))}))}
5060,function(t,e,i){ 5061/** 5062 * @author Richard Davey <[email protected]> 5063 * @copyright 2020 Photon Storm Ltd. 5064 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5065 */ 5066var n=i(127);i(5).register("zone",(function(t,e,i,r){return this.displayList.add(new n(this.scene,t,e,i,r))}))},function(t,e,i){ 5067/** 5068 * @author Richard Davey <[email protected]> 5069 * @copyright 2020 Photon Storm Ltd. 5070 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5071 */ 5072var n=i(223);i(5).register("video",(function(t,e,i){return this.displayList.add(new n(this.scene,t,e,i))}))},function(t,e,i){ 5073/** 5074 * @author Richard Davey <[email protected]> 5075 * @copyright 2020 Photon Storm Ltd. 5076 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5077 */ 5078var n=i(455),r=i(5);r.register("arc",(function(t,e,i,r,s,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,r,s,o,a,h))})),r.register("circle",(function(t,e,i,r,s){return this.displayList.add(new n(this.scene,t,e,i,0,360,!1,r,s))}))},function(t,e,i){ 5079/** 5080 * @author Richard Davey <[email protected]> 5081 * @copyright 2020 Photon Storm Ltd. 5082 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5083 */ 5084var n=i(5),r=i(456);n.register("curve",(function(t,e,i,n,s){return this.displayList.add(new r(this.scene,t,e,i,n,s))}))},function(t,e,i){ 5085/** 5086 * @author Richard Davey <[email protected]> 5087 * @copyright 2020 Photon Storm Ltd. 5088 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5089 */ 5090var n=i(457);i(5).register("ellipse",(function(t,e,i,r,s,o){return this.displayList.add(new n(this.scene,t,e,i,r,s,o))}))},function(t,e,i){ 5091/** 5092 * @author Richard Davey <[email protected]> 5093 * @copyright 2020 Photon Storm Ltd. 5094 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5095 */ 5096var n=i(5),r=i(458);n.register("grid",(function(t,e,i,n,s,o,a,h,u,l){return this.displayList.add(new r(this.scene,t,e,i,n,s,o,a,h,u,l))}))},function(t,e,i){ 5097/** 5098 * @author Richard Davey <[email protected]> 5099 * @copyright 2020 Photon Storm Ltd. 5100 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5101 */ 5102var n=i(5),r=i(459);n.register("isobox",(function(t,e,i,n,s,o,a){return this.displayList.add(new r(this.scene,t,e,i,n,s,o,a))}))},function(t,e,i){ 5103/** 5104 * @author Richard Davey <[email protected]> 5105 * @copyright 2020 Photon Storm Ltd. 5106 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5107 */ 5108var n=i(5),r=i(460);n.register("isotriangle",(function(t,e,i,n,s,o,a,h){return this.displayList.add(new r(this.scene,t,e,i,n,s,o,a,h))}))},function(t,e,i){ 5109/** 5110 * @author Richard Davey <[email protected]> 5111 * @copyright 2020 Photon Storm Ltd. 5112 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5113 */ 5114var n=i(5),r=i(461);n.register("line",(function(t,e,i,n,s,o,a,h){return this.displayList.add(new r(this.scene,t,e,i,n,s,o,a,h))}))},function(t,e,i){ 5115/** 5116 * @author Richard Davey <[email protected]> 5117 * @copyright 2020 Photon Storm Ltd. 5118 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5119 */ 5120var n=i(5),r=i(462);n.register("polygon",(function(t,e,i,n,s){return this.displayList.add(new r(this.scene,t,e,i,n,s))}))},function(t,e,i){ 5121/** 5122 * @author Richard Davey <[email protected]> 5123 * @copyright 2020 Photon Storm Ltd. 5124 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5125 */ 5126var n=i(5),r=i(467);n.register("rectangle",(function(t,e,i,n,s,o){return this.displayList.add(new r(this.scene,t,e,i,n,s,o))}))},function(t,e,i){ 5127/** 5128 * @author Richard Davey <[email protected]> 5129 * @copyright 2020 Photon Storm Ltd. 5130 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5131 */ 5132var n=i(468);
5132i(5).register("star",(function(t,e,i,r,s,o,a){return this.displayList.add(new n(this.scene,t,e,i,r,s,o,a))}))},function(t,e,i){ 5133/** 5134 * @author Richard Davey <[email protected]> 5135 * @copyright 2020 Photon Storm Ltd. 5136 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5137 */ 5138var n=i(5),r=i(469);n.register("triangle",(function(t,e,i,n,s,o,a,h,u,l){return this.displayList.add(new r(this.scene,t,e,i,n,s,o,a,h,u,l))}))},function(t,e,i){ 5139/** 5140 * @author Richard Davey <[email protected]> 5141 * @copyright 2020 Photon Storm Ltd. 5142 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5143 */ 5144var n=i(210),r=i(28),s=i(16),o=i(13);s.register("blitter",(function(t,e){void 0===t&&(t={});var i=o(t,"key",null),s=o(t,"frame",null),a=new n(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),r(this.scene,a,t),a}))},function(t,e,i){ 5145/** 5146 * @author Richard Davey <[email protected]> 5147 * @author Felipe Alfonso <@bitnenfer> 5148 * @copyright 2020 Photon Storm Ltd. 5149 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5150 */ 5151var n=i(28),r=i(211),s=i(16),o=i(13);s.register("container",(function(t,e){void 0===t&&(t={});var i=o(t,"x",0),s=o(t,"y",0),a=o(t,"children",null),h=new r(this.scene,i,s,a);return void 0!==e&&(t.add=e),n(this.scene,h,t),h}))},function(t,e,i){ 5152/** 5153 * @author Richard Davey <[email protected]> 5154 * @copyright 2020 Photon Storm Ltd. 5155 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5156 */ 5157var n=i(212),r=i(28),s=i(16),o=i(13);s.register("dynamicBitmapText",(function(t,e){void 0===t&&(t={});var i=o(t,"font",""),s=o(t,"text",""),a=o(t,"size",!1),h=new n(this.scene,0,0,i,s,a);return void 0!==e&&(t.add=e),r(this.scene,h,t),h}))},function(t,e,i){ 5158/** 5159 * @author Richard Davey <[email protected]> 5160 * @copyright 2020 Photon Storm Ltd. 5161 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5162 */ 5163var n=i(16),r=i(213);n.register("graphics",(function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);var i=new r(this.scene,t);return t.add&&this.scene.sys.displayList.add(i),i}))},function(t,e,i){ 5164/** 5165 * @author Richard Davey <[email protected]> 5166 * @copyright 2020 Photon Storm Ltd. 5167 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5168 */ 5169var n=i(16),r=i(110);n.register("group",(function(t){return new r(this.scene,null,t)}))},function(t,e,i){ 5170/** 5171 * @author Richard Davey <[email protected]> 5172 * @copyright 2020 Photon Storm Ltd. 5173 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5174 */ 5175var n=i(28),r=i(16),s=i(13),o=i(124);r.register("image",(function(t,e){void 0===t&&(t={});var i=s(t,"key",null),r=s(t,"frame",null),a=new o(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),n(this.scene,a,t),a}))},function(t,e,i){ 5176/** 5177 * @author Richard Davey <[email protected]> 5178 * @copyright 2020 Photon Storm Ltd. 5179 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5180 */ 5181var n=i(28),r=i(216),s=i(16),o=i(13);s.register("layer",(function(t,e){void 0===t&&(t={});var i=o(t,"children",null),s=new r(this.scene,i);return void 0!==e&&(t.add=e),n(this.scene,s,t),s}))},function(t,e,i){ 5182/** 5183 * @author Richard Davey <[email protected]> 5184 * @copyright 2020 Photon Storm Ltd. 5185 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5186 */ 5187var n=i(16),r=i(13),s=i(2),o=i(217);n.register("particles",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),a=s(t,"emitters",null),h=new o(this.scene,i,n,a);return void 0!==e&&(t.add=e),s(t,"add",!1)?this.displayList.add(h):this.updateList.add(h),h}))},function(t,e,i){ 5188/** 5189 * @author Richard Davey <[email protected]> 5190 * @copyright 2020 Photon Storm Ltd. 5191 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5192 */ 5193var n=i(28),r=i(16),s=i(13),o=i(218);r.register("renderTexture",(function(t,e){void 0===t&&(t={});var i=s(t,"x",0),r=s(t,"y",0),a=s(t,"width",32),h=s(t,"height",32),u=s(t,"key",void 0),l=s(t,"frame",void 0),c=new o(this.scene,i,r,a,h,u,l);return void 0!==e&&(t.add=e),n(this.scene,c,t),c}))}
5193,function(t,e,i){ 5194/** 5195 * @author Richard Davey <[email protected]> 5196 * @copyright 2020 Photon Storm Ltd. 5197 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5198 */ 5199var n=i(28),r=i(16),s=i(13),o=i(6),a=i(220);r.register("rope",(function(t,e){void 0===t&&(t={});var i=s(t,"key",null),r=s(t,"frame",null),h=s(t,"horizontal",!0),u=o(t,"points",void 0),l=o(t,"colors",void 0),c=o(t,"alphas",void 0),f=new a(this.scene,0,0,i,r,u,h,l,c);return void 0!==e&&(t.add=e),n(this.scene,f,t),t.add||this.updateList.add(f),f}))},function(t,e,i){ 5200/** 5201 * @author Richard Davey <[email protected]> 5202 * @copyright 2020 Photon Storm Ltd. 5203 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5204 */ 5205var n=i(28),r=i(433),s=i(16),o=i(13),a=i(73);s.register("sprite",(function(t,e){void 0===t&&(t={});var i=o(t,"key",null),s=o(t,"frame",null),h=new a(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),n(this.scene,h,t),r(h,t),h}))},function(t,e,i){ 5206/** 5207 * @author Richard Davey <[email protected]> 5208 * @copyright 2020 Photon Storm Ltd. 5209 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5210 */ 5211var n=i(147),r=i(28),s=i(16),o=i(13),a=i(6);s.register("bitmapText",(function(t,e){void 0===t&&(t={});var i=a(t,"font",""),s=o(t,"text",""),h=o(t,"size",!1),u=a(t,"align",0),l=new n(this.scene,0,0,i,s,h,u);return void 0!==e&&(t.add=e),r(this.scene,l,t),l}))},function(t,e,i){ 5212/** 5213 * @author Richard Davey <[email protected]> 5214 * @copyright 2020 Photon Storm Ltd. 5215 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5216 */ 5217var n=i(28),r=i(16),s=i(13),o=i(221);r.register("text",(function(t,e){void 0===t&&(t={});var i=s(t,"text",""),r=s(t,"style",null),a=s(t,"padding",null);null!==a&&(r.padding=a);var h=new o(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),n(this.scene,h,t),h.autoRound=s(t,"autoRound",!0),h.resolution=s(t,"resolution",1),h}))},function(t,e,i){ 5218/** 5219 * @author Richard Davey <[email protected]> 5220 * @copyright 2020 Photon Storm Ltd. 5221 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5222 */ 5223var n=i(28),r=i(16),s=i(13),o=i(222);r.register("tileSprite",(function(t,e){void 0===t&&(t={});var i=s(t,"x",0),r=s(t,"y",0),a=s(t,"width",512),h=s(t,"height",512),u=s(t,"key",""),l=s(t,"frame",""),c=new o(this.scene,i,r,a,h,u,l);return void 0!==e&&(t.add=e),n(this.scene,c,t),c}))},function(t,e,i){ 5224/** 5225 * @author Richard Davey <[email protected]> 5226 * @copyright 2020 Photon Storm Ltd. 5227 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5228 */ 5229var n=i(16),r=i(13),s=i(127);n.register("zone",(function(t){var e=r(t,"x",0),i=r(t,"y",0),n=r(t,"width",1),o=r(t,"height",n);return new s(this.scene,e,i,n,o)}))},function(t,e,i){ 5230/** 5231 * @author Richard Davey <[email protected]> 5232 * @copyright 2020 Photon Storm Ltd. 5233 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5234 */ 5235var n=i(28),r=i(16),s=i(13),o=i(223);r.register("video",(function(t,e){void 0===t&&(t={});var i=s(t,"key",null),r=new o(this.scene,0,0,i);return void 0!==e&&(t.add=e),n(this.scene,r,t),t.add||this.updateList.add(r),r}))},function(t,e,i){ 5236/** 5237 * @author Richard Davey <[email protected]> 5238 * @copyright 2020 Photon Storm Ltd. 5239 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5240 */ 5241var n=i(1),r=i(1);n=i(1171),r=i(1172),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 5242/** 5243 * @author Richard Davey <[email protected]> 5244 * @copyright 2020 Photon Storm Ltd. 5245 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5246 */ 5247var n=i(19);t.exports=function(t,e,i,r){if(e.shader){if(i.addToRenderList(e),t.pipelines.clear(),e.renderToTexture)e.load(),e.flush();else{var s=n(e,i,r).calc;t.width===e._rendererWidth&&t.height===e._rendererHeight||e.projOrtho(0,t.width,t.height,0),e.load(s.matrix
5247),e.flush()}t.pipelines.rebind()}}},function(t,e){t.exports=function(){}},function(t,e,i){ 5248/** 5249 * @author Richard Davey <[email protected]> 5250 * @copyright 2020 Photon Storm Ltd. 5251 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5252 */ 5253var n=i(1),r=i(1);n=i(1174),r=i(1175),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 5254/** 5255 * @author Richard Davey <[email protected]> 5256 * @copyright 2020 Photon Storm Ltd. 5257 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5258 */ 5259var n=i(19);t.exports=function(t,e,i,r){var s=e.faces,o=s.length;if(0!==o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline,e),h=n(e,i,r).calc,u=a.setGameObject(e),l=a.vertexViewF32,c=a.vertexViewU32,f=a.vertexCount*a.currentShader.vertexComponentCount-1,d=e.tintFill,p=[],v=e.debugCallback,g=h.a,m=h.b,y=h.c,x=h.d,w=h.e,_=h.f,b=e.viewPosition.z,T=e.hideCCW,E=i.roundPixels,S=i.alpha*e.alpha,A=0;t.pipelines.preBatch(e);for(var C=0;C<o;C++){var O=s[C];O.isInView(i,T,b,S,g,m,y,x,w,_,E)&&(a.shouldFlush(3)&&(a.flush(),f=0),f=O.load(l,c,f,u,d),A++,a.vertexCount+=3,v&&p.push(O))}e.totalFrame+=A,v&&v.call(e,e,p),t.pipelines.postBatch(e)}}},function(t,e){t.exports=function(){}},function(t,e,i){ 5260/** 5261 * @author Richard Davey <[email protected]> 5262 * @copyright 2020 Photon Storm Ltd. 5263 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5264 */ 5265var n=i(1),r=i(1);n=i(1177),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 5266/** 5267 * @author Richard Davey <[email protected]> 5268 * @copyright 2020 Photon Storm Ltd. 5269 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5270 */ 5271var n=i(19);t.exports=function(t,e,i,r){i.addToRenderList(e);var s=t.pipelines.set(e.pipeline),o=n(e,i,r).calc,a=e.width,h=e.height,u=-e._radius,l=-e._radius,c=u+a,f=l+h,d=o.getX(0,0),p=o.getY(0,0),v=o.getX(u,l),g=o.getY(u,l),m=o.getX(u,f),y=o.getY(u,f),x=o.getX(c,f),w=o.getY(c,f),_=o.getX(c,l),b=o.getY(c,l);t.pipelines.preBatch(e),s.batchPointLight(e,i,v,g,m,y,x,w,_,b,d,p),t.pipelines.postBatch(e)}},function(t,e,i){ 5272/** 5273 * @author Richard Davey <[email protected]> 5274 * @copyright 2020 Photon Storm Ltd. 5275 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5276 */ 5277var n=i(226);i(5).register("shader",(function(t,e,i,r,s,o,a){return this.displayList.add(new n(this.scene,t,e,i,r,s,o,a))}))},function(t,e,i){ 5278/** 5279 * @author Richard Davey <[email protected]> 5280 * @copyright 2020 Photon Storm Ltd. 5281 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5282 */ 5283var n=i(227);i(5).register("mesh",(function(t,e,i,r,s,o,a,h,u,l,c){return this.displayList.add(new n(this.scene,t,e,i,r,s,o,a,h,u,l,c))}))},function(t,e,i){ 5284/** 5285 * @author Richard Davey <[email protected]> 5286 * @copyright 2020 Photon Storm Ltd. 5287 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5288 */ 5289var n=i(5),r=i(149);n.register("pointlight",(function(t,e,i,n,s,o){return this.displayList.add(new r(this.scene,t,e,i,n,s,o))}))},function(t,e,i){ 5290/** 5291 * @author Richard Davey <[email protected]> 5292 * @copyright 2020 Photon Storm Ltd. 5293 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5294 */ 5295var n=i(28),r=i(16),s=i(13),o=i(226);r.register("shader",(function(t,e){void 0===t&&(t={});var i=s(t,"key",null),r=s(t,"x",0),a=s(t,"y",0),h=s(t,"width",128),u=s(t,"height",128),l=new o(this.scene,i,r,a,h,u);return void 0!==e&&(t.add=e),n(this.scene,l,t),l}))},function(t,e,i){ 5296/** 5297 * @author Richard Davey <[email protected]> 5298 * @copyright 2020 Photon Storm Ltd. 5299 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5300 */ 5301var n=i(28),r=i(16),s=i(13),o=i(6),a=i(227);r.register("mesh",(function(t,e){void 0===t&&(t={});var i=s(t,"key",null),r=s(t,"frame",null),h=o(t,"vertices",[]),u=o(t,"uvs",[]),l=o(t,"indicies",[]),c=o(t,"containsZ",!1),f=o(t,"normals",[]),d=o(t,"colors",16777215),p=o(t,"alphas",1),v=new a(this.scene,0,0,i,r,h,u,l,c,f,d,p);return void 0!==e&&(t.add=e),n(this.scene,v,t),v}))}
5301,function(t,e,i){ 5302/** 5303 * @author Richard Davey <[email protected]> 5304 * @copyright 2020 Photon Storm Ltd. 5305 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5306 */ 5307var n=i(28),r=i(16),s=i(13),o=i(149);r.register("pointlight",(function(t,e){void 0===t&&(t={});var i=s(t,"color",16777215),r=s(t,"radius",128),a=s(t,"intensity",1),h=s(t,"attenuation",.1),u=new o(this.scene,0,0,i,r,a,h);return void 0!==e&&(t.add=e),n(this.scene,u,t),u}))},function(t,e,i){ 5308/** 5309 * @author Richard Davey <[email protected]> 5310 * @copyright 2020 Photon Storm Ltd. 5311 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5312 */ 5313var n=i(0),r=i(476),s=i(24),o=i(21),a=new n({Extends:r,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once(o.BOOT,this.boot,this),r.call(this)},boot:function(){var t=this.systems.events;t.on(o.SHUTDOWN,this.shutdown,this),t.on(o.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});s.register("LightsPlugin",a,"lights"),t.exports=a},function(t,e,i){ 5314/** 5315 * @author Richard Davey <[email protected]> 5316 * @copyright 2020 Photon Storm Ltd. 5317 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5318 */ 5319var n=i(62);n.Area=i(1186),n.Circumference=i(296),n.CircumferencePoint=i(165),n.Clone=i(1187),n.Contains=i(63),n.ContainsPoint=i(1188),n.ContainsRect=i(1189),n.CopyFrom=i(1190),n.Equals=i(1191),n.GetBounds=i(1192),n.GetPoint=i(294),n.GetPoints=i(295),n.Offset=i(1193),n.OffsetPoint=i(1194),n.Random=i(166),t.exports=n},function(t,e){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},function(t,e,i){ 5320/** 5321 * @author Richard Davey <[email protected]> 5322 * @copyright 2020 Photon Storm Ltd. 5323 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5324 */ 5325var n=i(62);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){ 5326/** 5327 * @author Richard Davey <[email protected]> 5328 * @copyright 2020 Photon Storm Ltd. 5329 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5330 */ 5331var n=i(63);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){ 5332/** 5333 * @author Richard Davey <[email protected]> 5334 * @copyright 2020 Photon Storm Ltd. 5335 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5336 */ 5337var n=i(63);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){ 5338/** 5339 * @author Richard Davey <[email protected]> 5340 * @copyright 2020 Photon Storm Ltd. 5341 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5342 */ 5343var n=i(10);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){ 5344/** 5345 * @author Richard Davey <[email protected]> 5346 * @copyright 2020 Photon Storm Ltd. 5347 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5348 */ 5349var n=i(108);n.Area=i(1196),n.Circumference=i(441),n.CircumferencePoint=i(215),n.Clone=i(1197),n.Contains=i(109),n.ContainsPoint=i(1198),n.ContainsRect=i(1199),n.CopyFrom=i(1200),n.Equals=i(1201),n.GetBounds=i(1202),n.GetPoint=i(439),n.GetPoints=i(440),n.Offset=i(1203),n.OffsetPoint=i(1204),n.Random=i(177),t.exports=n},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){ 5350/** 5351 * @author Richard Davey <[email protected]> 5352 * @copyright 2020 Photon Storm Ltd. 5353 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5354 */ 5355var n=i(108);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}}
vendor: 8,313 bytes, lines 5355-5457
5355,function(t,e,i){ 5356/** 5357 * @author Richard Davey <[email protected]> 5358 * @copyright 2020 Photon Storm Ltd. 5359 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5360 */ 5361var n=i(109);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){ 5362/** 5363 * @author Richard Davey <[email protected]> 5364 * @copyright 2020 Photon Storm Ltd. 5365 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5366 */ 5367var n=i(109);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){ 5368/** 5369 * @author Richard Davey <[email protected]> 5370 * @copyright 2020 Photon Storm Ltd. 5371 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5372 */ 5373var n=i(10);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){ 5374/** 5375 * @author Florian Vazelle 5376 * @author Geoffrey Glaive 5377 * @copyright 2020 Photon Storm Ltd. 5378 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5379 */ 5380var n=i(4),r=i(228);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e)){var s,o,a,h,u=t.x,l=t.y,c=t.radius,f=e.x,d=e.y,p=e.radius;if(l===d)0==(a=(o=-2*d)*o-4*(s=1)*(f*f+(h=(p*p-c*c-f*f+u*u)/(2*(u-f)))*h-2*f*h+d*d-p*p))?i.push(new n(h,-o/(2*s))):a>0&&(i.push(new n(h,(-o+Math.sqrt(a))/(2*s))),i.push(new n(h,(-o-Math.sqrt(a))/(2*s))));else{var v=(u-f)/(l-d),g=(p*p-c*c-f*f+u*u-d*d+l*l)/(2*(l-d));0==(a=(o=2*l*v-2*g*v-2*u)*o-4*(s=v*v+1)*(u*u+l*l+g*g-c*c-2*l*g))?(h=-o/(2*s),i.push(new n(h,g-h*v))):a>0&&(h=(-o+Math.sqrt(a))/(2*s),i.push(new n(h,g-h*v)),h=(-o-Math.sqrt(a))/(2*s),i.push(new n(h,g-h*v)))}}return i}},function(t,e,i){ 5381/** 5382 * @author Florian Vazelle 5383 * @author Geoffrey Glaive 5384 * @copyright 2020 Photon Storm Ltd. 5385 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5386 */ 5387var n=i(229),r=i(150);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e)){var s=e.getLineA(),o=e.getLineB(),a=e.getLineC(),h=e.getLineD();n(s,t,i),n(o,t,i),n(a,t,i),n(h,t,i)}return i}},function(t,e,i){ 5388/** 5389 * @author Richard Davey 5390 * @copyright 2020 Photon Storm Ltd. 5391 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5392 */ 5393var n=i(138),r=i(481),s=new(i(45));function o(t,e,i,o,a){var h=Math.cos(t),u=Math.sin(t);s.setTo(e,i,e+h,i+u);var l=r(s,o);l&&a.push(new n(l.x,l.y,t,l.w))}function a(t,e){return t.z-e.z}t.exports=function(t,e,i){Array.isArray(i)||(i=[i]);for(var n=[],r=[],s=0;s<i.length;s++)for(var h=i[s].points,u=0;u<h.length;u++){var l=Math.atan2(h[u].y-e,h[u].x-t);-1===r.indexOf(l)&&(o(l,t,e,i,n),o(l-1e-5,t,e,i,n),o(l+1e-5,t,e,i,n),r.push(l))}return n.sort(a)}},function(t,e,i){ 5394/** 5395 * @author Richard Davey <[email protected]> 5396 * @copyright 2020 Photon Storm Ltd. 5397 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5398 */ 5399var n=i(10),r=i(114);t.exports=function(t,e,i){return void 0===i&&(i=new n),r(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e,i){ 5400/** 5401 * @author Florian Vazelle 5402 * @author Geoffrey Glaive 5403 * @copyright 2020 Photon Storm Ltd. 5404 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5405 */ 5406var n=i(231),r=i(114);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e)){var s=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=t.getLineD();n(s,e,i),n(o,e,i),n(a,e,i),n(h,e,i)}return i}},function(t,e,i){ 5407/** 5408 * @author Florian Vazelle 5409 * @author Geoffrey Glaive 5410 * @copyright 2020 Photon Storm Ltd. 5411 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5412 */ 5413var n=i(483),r=i(231);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var s=e.getLineA(),o=e.getLineB(),a=e.getLineC();r(s,t,i),r(o,t,i),r(a,t,i)}return i}},function(t,e,i){ 5414/** 5415 * @author Florian Vazelle 5416 * @author Geoffrey Glaive 5417 * @copyright 2020 Photon Storm Ltd. 5418 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5419 */ 5420var n=i(229),r=i(485);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e)){var s=t.getLineA(),o=t.getLineB(),a=t.getLineC();n(s,e,i),n(o,e,i),n(a,e,i)}return i}},function(t,e,i){ 5421/** 5422 * @author Florian Vazelle 5423 * @author Geoffrey Glaive 5424 * @copyright 2020 Photon Storm Ltd. 5425 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5426 */ 5427var n=i(488),r=i(486);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var s=e.getLineA(),o=e.getLineB(),a=e.getLineC();r(t,s,i),r(t,o,i),r(t,a,i)}return i}},function(t,e,i){ 5428/** 5429 * @author Richard Davey <[email protected]> 5430 * @copyright 2020 Photon Storm Ltd. 5431 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5432 */ 5433var n=i(490);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),r=Math.max(e.x1,e.x2),s=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=r&&t.y>=s&&t.y<=o}},function(t,e){t.exports=function(t,e,i,n,r,s){return void 0===s&&(s=0),!(e>t.right+s||i<t.left-s||n>t.bottom+s||r<t.top-s)}},function(t,e,i){ 5434/** 5435 * @author Richard Davey <[email protected]> 5436 * @copyright 2020 Photon Storm Ltd. 5437 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5438 */ 5439var n=i(45);n.Angle=i(93),n.BresenhamPoints=i(311),n.CenterOn=i(1216),n.Clone=i(1217),n.CopyFrom=i(1218),n.Equals=i(1219),n.Extend=i(1220),n.GetEasedPoints=i(1221),n.GetMidPoint=i(1222),n.GetNearestPoint=i(1223),n.GetNormal=i(1224),n.GetPoint=i(301),n.GetPoints=i(168),n.GetShortestDistance=i(1225),n.Height=i(1226),n.Length=i(64),n.NormalAngle=i(491),n.NormalX=i(1227),n.NormalY=i(1228),n.Offset=i(1229),n.PerpSlope=i(1230),n.Random=i(169),n.ReflectAngle=i(1231),n.Rotate=i(1232),n.RotateAroundPoint=i(1233),n.RotateAroundXY=i(233),n.SetToAngle=i(1234),n.Slope=i(1235),n.Width=i(1236),t.exports=n},function(t,e){t.exports=function(t,e,i){var n=e-(t.x1+t.x2)/2,r=i-(t.y1+t.y2)/2;return t.x1+=n,t.y1+=r,t.x2+=n,t.y2+=r,t}},function(t,e,i){ 5440/** 5441 * @author Richard Davey <[email protected]> 5442 * @copyright 2020 Photon Storm Ltd. 5443 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5444 */ 5445var n=i(45);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},function(t,e,i){ 5446/** 5447 * @author Richard Davey <[email protected]> 5448 * @copyright 2020 Photon Storm Ltd. 5449 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5450 */ 5451var n=i(64);t.exports=function(t,e,i){void 0===i&&(i=e);var r=n(t),s=t.x2-t.x1,o=t.y2-t.y1;return e&&(t.x1=t.x1-s/r*e,t.y1=t.y1-o/r*e),i&&(t.x2=t.x2+s/r*i,t.y2=t.y2+o/r*i),t}},function(t,e,i){ 5452/** 5453 * @author Richard Davey <[email protected]> 5454 * @copyright 2020 Photon Storm Ltd. 5455 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5456 */ 5457var n=i(346),r=i(80),s=i(4);t.exports=function(t,e,i,o,a){void 0===o&&(o=0),void 0===a&&(a=[]);var h,u,l=[],c=t.x1,f=t.y1,d=t.x2-c,p=t.y2-f,v=r(e,a),g=i-1;for(h=0;h<g;h++)u=v(h/g),l.push(new s(c+d*u,f+p*u));if(u=v(1),l.push(new s(c+d*u,f+p*u)),o>0){var m=l[0],y=[m];for(h=1;h<l.length-1;h++){var x=l[h];n(m,x)>=o&&(y.push(x),m=x)}var w=l[l.length-1];return n(m,w)<o&&y.pop(),y.push(w),y}return l}}
5457,function(t,e,i){ 5458/** 5459 * @author Richard Davey <[email protected]> 5460 * @copyright 2020 Photon Storm Ltd. 5461 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5462 */ 5463var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},function(t,e,i){ 5464/** 5465 * @author Richard Davey <[email protected]> 5466 * @author Florian Mertens 5467 * @copyright 2020 Photon Storm Ltd. 5468 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5469 */ 5470var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=t.x1,s=t.y1,o=t.x2,a=t.y2,h=(o-r)*(o-r)+(a-s)*(a-s);if(0===h)return i;var u=((e.x-r)*(o-r)+(e.y-s)*(a-s))/h;return i.x=r+u*(o-r),i.y=s+u*(a-s),i}},function(t,e,i){ 5471/** 5472 * @author Richard Davey <[email protected]> 5473 * @copyright 2020 Photon Storm Ltd. 5474 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5475 */ 5476var n=i(14),r=i(93),s=i(4);t.exports=function(t,e){void 0===e&&(e=new s);var i=r(t)-n.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,r=t.x2,s=t.y2,o=(r-i)*(r-i)+(s-n)*(s-n);if(0===o)return!1;var a=((n-e.y)*(r-i)-(i-e.x)*(s-n))/o;return Math.abs(a)*Math.sqrt(o)}},function(t,e){t.exports=function(t){return Math.abs(t.y1-t.y2)}},function(t,e,i){ 5477/** 5478 * @author Richard Davey <[email protected]> 5479 * @copyright 2020 Photon Storm Ltd. 5480 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5481 */ 5482var n=i(14),r=i(93);t.exports=function(t){return Math.cos(r(t)-n.TAU)}},function(t,e,i){ 5483/** 5484 * @author Richard Davey <[email protected]> 5485 * @copyright 2020 Photon Storm Ltd. 5486 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5487 */ 5488var n=i(14),r=i(93);t.exports=function(t){return Math.sin(r(t)-n.TAU)}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},function(t,e){t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},function(t,e,i){ 5489/** 5490 * @author Richard Davey <[email protected]> 5491 * @copyright 2020 Photon Storm Ltd. 5492 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5493 */ 5494var n=i(93),r=i(491);t.exports=function(t,e){return 2*r(e)-Math.PI-n(t)}},function(t,e,i){ 5495/** 5496 * @author Richard Davey <[email protected]> 5497 * @copyright 2020 Photon Storm Ltd. 5498 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5499 */ 5500var n=i(233);t.exports=function(t,e){var i=(t.x1+t.x2)/2,r=(t.y1+t.y2)/2;return n(t,i,r,e)}},function(t,e,i){ 5501/** 5502 * @author Richard Davey <[email protected]> 5503 * @copyright 2020 Photon Storm Ltd. 5504 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5505 */ 5506var n=i(233);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e){t.exports=function(t,e,i,n,r){return t.x1=e,t.y1=i,t.x2=e+Math.cos(n)*r,t.y2=i+Math.sin(n)*r,t}},function(t,e){t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},function(t,e){t.exports=function(t){return Math.abs(t.x1-t.x2)}},function(t,e,i){ 5507/** 5508 * @author Richard Davey <[email protected]> 5509 * @copyright 2020 Photon Storm Ltd. 5510 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5511 */ 5512var n={Face:i(113),GenerateGridVerts:i(1238),GenerateObjVerts:i(474),GenerateVerts:i(473),ParseObj:i(492),ParseObjMaterial:i(493),RotateFace:i(1239),Vertex:i(115)};t.exports=n},function(t,e,i){ 5513/** 5514 * @author Richard Davey <[email protected]> 5515 * @copyright 2020 Photon Storm Ltd. 5516 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5517 */ 5518var n=i(113),r=i(2),s=i(67),o=i(38),a=i(115),h=new o,u=new o,l=new s;t.exports=function(t){var e=r(t,"mesh"),i=r(t,"texture",null),s=r(t,"frame"),o=r(t,"width",1),c=r(t,"height",o),f=r(t,"widthSegments",1),d=r(t,"heightSegments",f),p=r(t,"x",0),v=r(t,"y",0),g=r(t,"z",0),m=r(t,"rotateX",0),y=r(t,"rotateY",0),x=r(t,"rotateZ",0),w=r(t,"zIsUp",!0),_=r(t,"isOrtho",!!e&&e.dirtyCache[11]),b=r(t,"colors",[16777215]),T=r(t,"alphas",[1]),E=r(t,"tile",!1),S=r(t,"flipY",!1),A=r(t,"width",null),C={faces:[],verts:[]};if(h.set(p,v,g),u.set(m,y,x),l.fromRotationXYTranslation(u,h,w),!i&&e)i=e.texture;else{if(!e||"string"!=typeof i)return C;i=e.scene.sys.textures.get(i)}var O=i.get(s);
5518!A&&_&&i&&e&&(o=O.width/e.height,c=O.height/e.height);var R,M,P=o/2,I=c/2,k=Math.floor(f),L=Math.floor(d),D=k+1,F=L+1,N=o/k,B=c/L,U=[],V=[],Y=0,z=1,X=0,G=1;O&&(Y=O.u0,z=O.u1,S?(X=O.v1,G=O.v0):(X=O.v0,G=O.v1));var W=z-Y,j=G-X;for(M=0;M<F;M++){var H=M*B-I;for(R=0;R<D;R++){var q=R*N-P;V.push(q,-H);var K=Y+W*(R/k),Z=X+j*(M/L);U.push(K,Z)}}Array.isArray(b)||(b=[b]),Array.isArray(T)||(T=[T]);var Q=0,J=0;for(M=0;M<L;M++)for(R=0;R<k;R++){var $=2*(R+D*M),tt=2*(R+D*(M+1)),et=2*(R+1+D*(M+1)),it=2*(R+1+D*M),nt=b[J],rt=T[Q],st=new a(V[$],V[$+1],0,U[$],U[$+1],nt,rt).transformMat4(l),ot=new a(V[tt],V[tt+1],0,U[tt],U[tt+1],nt,rt).transformMat4(l),at=new a(V[it],V[it+1],0,U[it],U[it+1],nt,rt).transformMat4(l),ht=new a(V[tt],V[tt+1],0,U[tt],U[tt+1],nt,rt).transformMat4(l),ut=new a(V[et],V[et+1],0,U[et],U[et+1],nt,rt).transformMat4(l),lt=new a(V[it],V[it+1],0,U[it],U[it+1],nt,rt).transformMat4(l);E&&(st.setUVs(Y,G),ot.setUVs(Y,X),at.setUVs(z,G),ht.setUVs(Y,X),ut.setUVs(z,X),lt.setUVs(z,G)),++J===b.length&&(J=0),++Q===T.length&&(Q=0),C.verts.push(st,ot,at,ht,ut,lt),C.faces.push(new n(st,ot,at),new n(ht,ut,lt))}return e&&(e.faces=e.faces.concat(C.faces),e.vertices=e.vertices.concat(C.verts)),C}},function(t,e){t.exports=function(t,e,i,n){var r,s;if(void 0===i&&void 0===n){var o=t.getInCenter();r=o.x,s=o.y}var a=Math.cos(e),h=Math.sin(e),u=t.vertex1,l=t.vertex2,c=t.vertex3,f=u.x-r,d=u.y-s;u.set(f*a-d*h+r,f*h+d*a+s),f=l.x-r,d=l.y-s,l.set(f*a-d*h+r,f*h+d*a+s),f=c.x-r,d=c.y-s,c.set(f*a-d*h+r,f*h+d*a+s)}},function(t,e,i){ 5519/** 5520 * @author Richard Davey <[email protected]> 5521 * @copyright 2020 Photon Storm Ltd. 5522 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5523 */ 5524var n=i(4);n.Ceil=i(1241),n.Clone=i(1242),n.CopyFrom=i(1243),n.Equals=i(1244),n.Floor=i(1245),n.GetCentroid=i(1246),n.GetMagnitude=i(494),n.GetMagnitudeSq=i(495),n.GetRectangleFromPoints=i(1247),n.Interpolate=i(1248),n.Invert=i(1249),n.Negative=i(1250),n.Project=i(1251),n.ProjectUnit=i(1252),n.SetMagnitude=i(1253),t.exports=n},function(t,e){t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},function(t,e,i){ 5525/** 5526 * @author Richard Davey <[email protected]> 5527 * @copyright 2020 Photon Storm Ltd. 5528 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5529 */ 5530var n=i(4);t.exports=function(t){return new n(t.x,t.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},function(t,e){t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},function(t,e,i){ 5531/** 5532 * @author Richard Davey <[email protected]> 5533 * @copyright 2020 Photon Storm Ltd. 5534 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5535 */ 5536var n=i(4);t.exports=function(t,e){if(void 0===e&&(e=new n),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var r=0;r<i;r++)e.x+=t[r].x,e.y+=t[r].y;e.x/=i,e.y/=i}return e}},function(t,e,i){ 5537/** 5538 * @author Richard Davey <[email protected]> 5539 * @copyright 2020 Photon Storm Ltd. 5540 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5541 */ 5542var n=i(10);t.exports=function(t,e){void 0===e&&(e=new n);for(var i=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,a=0;a<t.length;a++){var h=t[a];h.x>i&&(i=h.x),h.x<r&&(r=h.x),h.y>s&&(s=h.y),h.y<o&&(o=h.y)}return e.x=r,e.y=o,e.width=i-r,e.height=s-o,e}},function(t,e,i){ 5543/** 5544 * @author Richard Davey <[email protected]> 5545 * @copyright 2020 Photon Storm Ltd. 5546 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5547 */ 5548var n=i(4);t.exports=function(t,e,i,r){return void 0===i&&(i=0),void 0===r&&(r=new n),r.x=t.x+(e.x-t.x)*i,r.y=t.y+(e.y-t.y)*i,r}},function(t,e){t.exports=function(t){return t.setTo(t.y,t.x)}}
5548,function(t,e,i){ 5549/** 5550 * @author Richard Davey <[email protected]> 5551 * @copyright 2020 Photon Storm Ltd. 5552 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5553 */ 5554var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.setTo(-t.x,-t.y)}},function(t,e,i){ 5555/** 5556 * @author Richard Davey <[email protected]> 5557 * @copyright 2020 Photon Storm Ltd. 5558 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5559 */ 5560var n=i(4),r=i(495);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=(t.x*e.x+t.y*e.y)/r(e);return 0!==s&&(i.x=s*e.x,i.y=s*e.y),i}},function(t,e,i){ 5561/** 5562 * @author Richard Davey <[email protected]> 5563 * @copyright 2020 Photon Storm Ltd. 5564 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5565 */ 5566var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=t.x*e.x+t.y*e.y;return 0!==r&&(i.x=r*e.x,i.y=r*e.y),i}},function(t,e,i){ 5567/** 5568 * @author Richard Davey <[email protected]> 5569 * @copyright 2020 Photon Storm Ltd. 5570 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5571 */ 5572var n=i(494);t.exports=function(t,e){if(0!==t.x||0!==t.y){var i=n(t);t.x/=i,t.y/=i}return t.x*=e,t.y*=e,t}},function(t,e,i){ 5573/** 5574 * @author Richard Davey <[email protected]> 5575 * @copyright 2020 Photon Storm Ltd. 5576 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5577 */ 5578var n=i(224);n.Clone=i(1255),n.Contains=i(225),n.ContainsPoint=i(1256),n.Earcut=i(68),n.GetAABB=i(463),n.GetNumberArray=i(1257),n.GetPoints=i(464),n.Perimeter=i(465),n.Reverse=i(1258),n.Simplify=i(1259),n.Smooth=i(466),n.Translate=i(1260),t.exports=n},function(t,e,i){ 5579/** 5580 * @author Richard Davey <[email protected]> 5581 * @copyright 2020 Photon Storm Ltd. 5582 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5583 */ 5584var n=i(224);t.exports=function(t){return new n(t.points)}},function(t,e,i){ 5585/** 5586 * @author Richard Davey <[email protected]> 5587 * @copyright 2020 Photon Storm Ltd. 5588 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5589 */ 5590var n=i(225);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=[]);for(var i=0;i<t.points.length;i++)e.push(t.points[i].x),e.push(t.points[i].y);return e}},function(t,e){t.exports=function(t){return t.points.reverse(),t}},function(t,e){function i(t,e,i){var n=e.x,r=e.y,s=i.x-n,o=i.y-r;if(0!==s||0!==o){var a=((t.x-n)*s+(t.y-r)*o)/(s*s+o*o);a>1?(n=i.x,r=i.y):a>0&&(n+=s*a,r+=o*a)}return(s=t.x-n)*s+(o=t.y-r)*o}function n(t,e,r,s,o){for(var a,h=s,u=e+1;u<r;u++){var l=i(t[u],t[e],t[r]);l>h&&(a=u,h=l)}h>s&&(a-e>1&&n(t,e,a,s,o),o.push(t[a]),r-a>1&&n(t,a,r,s,o))}function r(t,e){var i=t.length-1,r=[t[0]];return n(t,0,i,e,r),r.push(t[i]),r}t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=!1);var n=t.points;if(n.length>2){var s=e*e;i||(n=function(t,e){for(var i,n,r,s,o,a=t[0],h=[a],u=1,l=t.length;u<l;u++)i=t[u],r=a,s=void 0,o=void 0,s=(n=i).x-r.x,o=n.y-r.y,s*s+o*o>e&&(h.push(i),a=i);return a!==i&&h.push(i),h}(n,s)),t.setTo(r(n,s))}return t}},function(t,e){t.exports=function(t,e,i){for(var n=t.points,r=0;r<n.length;r++)n[r].x+=e,n[r].y+=i;return t}},function(t,e){t.exports=function(t){return t.width*t.height}},function(t,e){t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t}}
5590,function(t,e){t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t.width=Math.ceil(t.width),t.height=Math.ceil(t.height),t}},function(t,e,i){ 5591/** 5592 * @author Richard Davey <[email protected]> 5593 * @copyright 2020 Photon Storm Ltd. 5594 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5595 */ 5596var n=i(10);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){ 5597/** 5598 * @author Richard Davey <[email protected]> 5599 * @copyright 2020 Photon Storm Ltd. 5600 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5601 */ 5602var n=i(56);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){ 5603/** 5604 * @author Richard Davey <[email protected]> 5605 * @copyright 2020 Photon Storm Ltd. 5606 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5607 */ 5608var n=i(234);t.exports=function(t,e){var i=n(t);return i<n(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e,i){ 5609/** 5610 * @author Richard Davey <[email protected]> 5611 * @copyright 2020 Photon Storm Ltd. 5612 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5613 */ 5614var n=i(234);t.exports=function(t,e){var i=n(t);return i>n(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){ 5615/** 5616 * @author samme 5617 * @copyright 2020 Photon Storm Ltd. 5618 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5619 */ 5620var n=i(10);t.exports=function(t,e,i,r,s){return void 0===s&&(s=new n),s.setTo(Math.min(t,i),Math.min(e,r),Math.abs(t-i),Math.abs(e-r))}},function(t,e,i){ 5621/** 5622 * @author Richard Davey <[email protected]> 5623 * @copyright 2020 Photon Storm Ltd. 5624 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5625 */ 5626var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){ 5627/** 5628 * @author Richard Davey <[email protected]> 5629 * @copyright 2020 Photon Storm Ltd. 5630 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5631 */ 5632var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){ 5633/** 5634 * @author Richard Davey <[email protected]> 5635 * @copyright 2020 Photon Storm Ltd. 5636 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5637 */ 5638var n=i(187);t.exports=function(t,e,i){var r=t.centerX,s=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,r,s)}},function(t,e,i){ 5639/** 5640 * @author Richard Davey <[email protected]> 5641 * @copyright 2020 Photon Storm Ltd. 5642 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5643 */ 5644var n=i(10),r=i(114);t.exports=function(t,e,i){return void 0===i&&(i=new n),r(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,r=t.y,s=t.bottom,o=0;o<e.length;o++)i=Math.min(i,e[o].x),n=Math.max(n,e[o].x),r=Math.min(r,e[o].y),s=Math.max(s,e[o].y);return t.x=i,t.y=r,t.width=n-i,t.height=s-r,t}},function(t,e){t.exports=function(t,e){var i=Math.min(t.x,e.x),n=Math.max(t.right,e.right);t.x=i,t.width=n-i;var r=Math.min(t.y,e.y),s=Math.max(t.bottom,e.bottom);
vendor: 23,046 bytes, lines 5644-5812
5644return t.y=r,t.height=s-r,t}},function(t,e){t.exports=function(t,e,i){var n=Math.min(t.x,e),r=Math.max(t.right,e);t.x=n,t.width=r-n;var s=Math.min(t.y,i),o=Math.max(t.bottom,i);return t.y=s,t.height=o-s,t}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e){t.exports=function(t,e){return t.x<e.right&&t.right>e.x&&t.y<e.bottom&&t.bottom>e.y}},function(t,e,i){ 5645/** 5646 * @author Richard Davey <[email protected]> 5647 * @copyright 2020 Photon Storm Ltd. 5648 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5649 */ 5650var n=i(4),r=i(35);t.exports=function(t,e,i){void 0===i&&(i=new n),e=r(e);var s=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=s>0?t.height/2:t.height/-2;return Math.abs(a*s)<Math.abs(h*o)?h=a*s/o:a=h*o/s,i.x=a+t.centerX,i.y=h+t.centerY,i}},function(t,e,i){ 5651/** 5652 * @author Richard Davey <[email protected]> 5653 * @copyright 2020 Photon Storm Ltd. 5654 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5655 */ 5656var n=i(192),r=i(497),s=i(4);t.exports=function(t,e,i){if(void 0===i&&(i=new s),r(t,e))switch(n(0,3)){case 0:i.x=t.x+Math.random()*(e.right-t.x),i.y=t.y+Math.random()*(e.top-t.y);break;case 1:i.x=e.x+Math.random()*(t.right-e.x),i.y=e.bottom+Math.random()*(t.bottom-e.bottom);break;case 2:i.x=t.x+Math.random()*(e.x-t.x),i.y=e.y+Math.random()*(t.bottom-e.y);break;case 3:i.x=e.right+Math.random()*(t.right-e.right),i.y=t.y+Math.random()*(e.bottom-t.y)}return i}},function(t,e){t.exports=function(t,e){return t.width===e.width&&t.height===e.height}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=e),t.width*=e,t.height*=i,t}},function(t,e,i){ 5657/** 5658 * @author Richard Davey <[email protected]> 5659 * @copyright 2020 Photon Storm Ltd. 5660 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5661 */ 5662var n=i(82);n.Area=i(1288),n.BuildEquilateral=i(1289),n.BuildFromPolygon=i(1290),n.BuildRight=i(1291),n.CenterOn=i(1292),n.Centroid=i(498),n.CircumCenter=i(1293),n.CircumCircle=i(1294),n.Clone=i(1295),n.Contains=i(112),n.ContainsArray=i(232),n.ContainsPoint=i(1296),n.CopyFrom=i(1297),n.Decompose=i(489),n.Equals=i(1298),n.GetPoint=i(470),n.GetPoints=i(471),n.InCenter=i(500),n.Perimeter=i(1299),n.Offset=i(499),n.Random=i(178),n.Rotate=i(1300),n.RotateAroundPoint=i(1301),n.RotateAroundXY=i(235),t.exports=n},function(t,e){t.exports=function(t){var e=t.x1,i=t.y1,n=t.x2,r=t.y2,s=t.x3,o=t.y3;return Math.abs(((s-e)*(r-i)-(n-e)*(o-i))/2)}},function(t,e,i){ 5663/** 5664 * @author Richard Davey <[email protected]> 5665 * @copyright 2020 Photon Storm Ltd. 5666 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5667 */ 5668var n=i(82);t.exports=function(t,e,i){var r=i*(Math.sqrt(3)/2);return new n(t,e,t+i/2,e+r,t-i/2,e+r)}},function(t,e,i){ 5669/** 5670 * @author Richard Davey <[email protected]> 5671 * @copyright 2020 Photon Storm Ltd. 5672 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5673 */ 5674var n=i(68),r=i(82);t.exports=function(t,e,i,s,o){void 0===e&&(e=null),void 0===i&&(i=1),void 0===s&&(s=1),void 0===o&&(o=[]);for(var a,h,u,l,c,f,d,p,v,g=n(t,e),m=0;m<g.length;m+=3)a=g[m],h=g[m+1],u=g[m+2],l=t[2*a]*i,c=t[2*a+1]*s,f=t[2*h]*i,d=t[2*h+1]*s,p=t[2*u]*i,v=t[2*u+1]*s,o.push(new r(l,c,f,d,p,v));return o}},function(t,e,i){ 5675/** 5676 * @author Richard Davey <[email protected]> 5677 * @copyright 2020 Photon Storm Ltd. 5678 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5679 */ 5680var n=i(82);t.exports=function(t,e,i,r){return void 0===r&&(r=i),new n(t,e,t,e-r,t+i,e)}},function(t,e,i){ 5681/** 5682 * @author Richard Davey <[email protected]> 5683 * @copyright 2020 Photon Storm Ltd. 5684 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5685 */ 5686var n=i(498),r=i(499);t.exports=function(t,e,i,s){void 0===s&&(s=n);var o=s(t),a=e-o.x,h=i-o.y;return r(t,a,h)}},function(t,e,i){ 5687/** 5688 * @author Richard Davey <[email protected]> 5689 * @copyright 2020 Photon Storm Ltd. 5690 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5691 */ 5692var n=i(3);function r(t,e,i,n){return t*n-e*i}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x3,s=t.y3,o=t.x1-i,a=t.y1-s,h=t.x2-i,u=t.y2-s,l=2*r(o,a,h,u),c=r(a,o*o+a*a,u,h*h+u*u),f=r(o,o*o+a*a,h,h*h+u*u);return e.x=i-c/l,e.y=s+f/l,e}},function(t,e,i){ 5693/** 5694 * @author Richard Davey <[email protected]> 5695 * @copyright 2020 Photon Storm Ltd. 5696 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5697 */ 5698var n=i(62);t.exports=function(t,e){void 0===e&&(e=new n);var i,r,s=t.x1,o=t.y1,a=t.x2,h=t.y2,u=t.x3,l=t.y3,c=a-s,f=h-o,d=u-s,p=l-o,v=c*(s+a)+f*(o+h),g=d*(s+u)+p*(o+l),m=2*(c*(l-h)-f*(u-a));if(Math.abs(m)<1e-6){var y=Math.min(s,a,u),x=Math.min(o,h,l);i=.5*(Math.max(s,a,u)-y),r=.5*(Math.max(o,h,l)-x),e.x=y+i,e.y=x+r,e.radius=Math.sqrt(i*i+r*r)}else e.x=(p*v-f*g)/m,e.y=(c*g-d*v)/m,i=e.x-s,r=e.y-o,e.radius=Math.sqrt(i*i+r*r);return e}},function(t,e,i){ 5699/** 5700 * @author Richard Davey <[email protected]> 5701 * @copyright 2020 Photon Storm Ltd. 5702 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5703 */ 5704var n=i(82);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},function(t,e,i){ 5705/** 5706 * @author Richard Davey <[email protected]> 5707 * @copyright 2020 Photon Storm Ltd. 5708 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5709 */ 5710var n=i(112);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2&&t.x3===e.x3&&t.y3===e.y3}},function(t,e,i){ 5711/** 5712 * @author Richard Davey <[email protected]> 5713 * @copyright 2020 Photon Storm Ltd. 5714 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5715 */ 5716var n=i(64);t.exports=function(t){var e=t.getLineA(),i=t.getLineB(),r=t.getLineC();return n(e)+n(i)+n(r)}},function(t,e,i){ 5717/** 5718 * @author Richard Davey <[email protected]> 5719 * @copyright 2020 Photon Storm Ltd. 5720 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5721 */ 5722var n=i(235),r=i(500);t.exports=function(t,e){var i=r(t);return n(t,i.x,i.y,e)}},function(t,e,i){ 5723/** 5724 * @author Richard Davey <[email protected]> 5725 * @copyright 2020 Photon Storm Ltd. 5726 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5727 */ 5728var n=i(235);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e,i){ 5729/** 5730 * @author Richard Davey <[email protected]> 5731 * @copyright 2020 Photon Storm Ltd. 5732 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5733 */ 5734var n=i(200),r=i(17),s={CreatePixelPerfectHandler:i(501),CreateInteractiveObject:i(502),Events:i(49),Gamepad:i(1303),InputManager:i(403),InputPlugin:i(1315),InputPluginCache:i(151),Keyboard:i(1316),Mouse:i(1330),Pointer:i(406),Touch:i(1331)};s=r(!1,s,n),t.exports=s},function(t,e,i){ 5735/** 5736 * @author Richard Davey <[email protected]> 5737 * @copyright 2020 Photon Storm Ltd. 5738 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5739 */ 5740t.exports={Axis:i(503),Button:i(504),Events:i(236),Gamepad:i(505),GamepadPlugin:i(1310),Configs:i(1311)}},function(t,e){ 5741/** 5742 * @author Richard Davey <[email protected]> 5743 * @copyright 2020 Photon Storm Ltd. 5744 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5745 */ 5746t.exports="down"},function(t,e){ 5747/** 5748 * @author Richard Davey <[email protected]> 5749 * @copyright 2020 Photon Storm Ltd. 5750 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5751 */ 5752t.exports="up"},function(t,e){ 5753/** 5754 * @author Richard Davey <[email protected]> 5755 * @copyright 2020 Photon Storm Ltd. 5756 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5757 */ 5758t.exports="connected"},function(t,e){ 5759/** 5760 * @author Richard Davey <[email protected]> 5761 * @copyright 2020 Photon Storm Ltd. 5762 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5763 */ 5764t.exports="disconnected"},function(t,e){ 5765/** 5766 * @author Richard Davey <[email protected]> 5767 * @copyright 2020 Photon Storm Ltd. 5768 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5769 */ 5770t.exports="down"},function(t,e){ 5771/** 5772 * @author Richard Davey <[email protected]> 5773 * @copyright 2020 Photon Storm Ltd. 5774 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5775 */ 5776t.exports="up"},function(t,e,i){ 5777/** 5778 * @author Richard Davey <[email protected]> 5779 * @copyright 2020 Photon Storm Ltd. 5780 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5781 */ 5782var n=i(0),r=i(9),s=i(236),o=i(505),a=i(6),h=i(151),u=i(49),l=new n({Extends:r,initialize:function(t){r.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,t.pluginEvents.once(u.BOOT,this.boot,this),t.pluginEvents.on(u.START,this.start,this)},boot:function(){var t=this.scene.sys.game,e=this.settings.input,i=t.config;this.enabled=a(e,"gamepad",i.inputGamepad)&&t.device.input.gamepads,this.target=a(e,"gamepad.target",i.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(u.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(u.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=this.target,i=function(e){!e.defaultPrevented&&t.isActive()&&(t.refreshPads(),t.queue.push(e))};this.onGamepadHandler=i,e.addEventListener("gamepadconnected",i,!1),e.addEventListener("gamepaddisconnected",i,!1),this.sceneInputPlugin.pluginEvents.on(u.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(u.UPDATE,this.update);for(var t=0;t<this.gamepads.length;t++)this.gamepads[t].removeAllListeners()},disconnectAll:function(){for(var t=0;t<this.gamepads.length;t++)this.gamepads[t].pad.connected=!1},refreshPads:function(){var t=navigator.getGamepads();if(t)for(var e=this.gamepads,i=0;i<t.length;i++){var n=t[i];if(n){var r=n.id,s=n.index,a=e[s];if(a)a.id!==r?(a.destroy(),e[s]=new o(this,n)):a.update(n);else{var h=new o(this,n);e[s]=h,this._pad1?this._pad2?this._pad3?this._pad4||(this._pad4=h):this._pad3=h:this._pad2=h:this._pad1=h}}}else this.disconnectAll()},getAll:function(){for(var t=[],e=this.gamepads,i=0;i<e.length;i++)e[i]&&t.push(e[i]);return t},getPad:function(t){for(var e=this.gamepads,i=0;i<e.length;i++)if(e[i]&&e[i].index===t)return e[i]},update:function(){if(this.enabled){this.refreshPads();var t=this.queue.length;if(0!==t)for(var e=this.queue.splice(0,t),i=0;i<t;i++){var n=e[i],r=this.getPad(n.gamepad.index);"gamepadconnected"===n.type?this.emit(s.CONNECTED,r,n):"gamepaddisconnected"===n.type&&this.emit(s.DISCONNECTED,r,n)}}},shutdown:function(){this.stopListeners(),this.removeAllListeners()},destroy:function(){this.shutdown();for(var t=0;t<this.gamepads.length;t++)this.gamepads[t]&&this.gamepads[t].destroy();this.gamepads=[],this.scene=null,this.settings=null,this.sceneInputPlugin=null,this.target=null},total:{get:function(){return this.gamepads.length}},pad1:{get:function(){return this._pad1}},pad2:{get:function(){return this._pad2}},pad3:{get:function(){return this._pad3}},pad4:{get:function(){return this._pad4}}});h.register("GamepadPlugin",l,"gamepad","gamepad","inputGamepad"),t.exports=l},function(t,e,i){ 5783/** 5784 * @author Richard Davey <[email protected]> 5785 * @copyright 2020 Photon Storm Ltd. 5786 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5787 */ 5788t.exports={DUALSHOCK_4:i(1312),SNES_USB:i(1313),XBOX_360:i(1314)}},function(t,e){ 5789/** 5790 * @author Richard Davey <[email protected]> 5791 * @copyright 2020 Photon Storm Ltd. 5792 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5793 */ 5794t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(t,e){ 5795/** 5796 * @author Richard Davey <[email protected]> 5797 * @copyright 2020 Photon Storm Ltd. 5798 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5799 */ 5800t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},function(t,e){ 5801/** 5802 * @author Richard Davey <[email protected]> 5803 * @copyright 2020 Photon Storm Ltd. 5804 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5805 */ 5806t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(t,e,i){ 5807/** 5808 * @author Richard Davey <[email protected]> 5809 * @copyright 2020 Photon Storm Ltd. 5810 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5811 */ 5812var n=i(62),r=i(63),s=i(0),o=i(200),a=i(502),h=i(501),u=i(48),l=i(108),c=i(109),f=i(49),d=i(9),p=i(2),v=i(55),g=i(151),m=i(7),y=i(24),x=i(10),w=i(56),_=i(21),b=i(82),T=i(112),E=new s({Extends:d,initialize:function(t){d.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new d,this.enabled=!0,this.displayList,this.cameras,g.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var e={cancelled:!1};this._eventContainer={stopPropagation:function(){e.cancelled=!0}},this._eventData=e,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,t.sys.events.once(_.BOOT,this.boot,this),t.sys.events.on(_.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(_.DESTROY,this.destroy,this),this.pluginEvents.emit(f.BOOT)},start:function(){var t=this.systems.events;t.on(_.TRANSITION_START,this.transitionIn,this),t.on(_.TRANSITION_OUT,this.transitionOut,this),t.on(_.TRANSITION_COMPLETE,this.transitionComplete,this),t.on(_.PRE_UPDATE,this.preUpdate,this),t.once(_.SHUTDOWN,this.shutdown,this),this.manager.events.on(f.GAME_OUT,this.onGameOut,this),this.manager.events.on(f.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(f.START)},onGameOver:function(t){this.isActive()&&this.emit(f.GAME_OVER,t.timeStamp,t)},onGameOut:function(t){this.isActive()&&this.emit(f.GAME_OUT,t.timeStamp,t)},preUpdate:function(){this.pluginEvents.emit(f.PRE_UPDATE);var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,n=e.length;if(0!==i||0!==n){for(var r=this._list,s=0;s<i;s++){var o=t[s],a=r.indexOf(o);a>-1&&(r.splice(a,1),this.clear(o,!0))}t.length=0,this._pendingRemoval.length=0,this._list=r.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(f.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,n=this.manager,r=n.pointers,s=n.pointersTotal;for(i=0;i<s;i++)r[i].updateMotion();if(0===this._list.length)return!1;var o=this.pollRate;if(-1===o)return!1;if(o>0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var a=!1;for(i=0;i<s;i++){var h=0,u=r[i];this._tempZones=[],this._temp=this.hitTestPointer(u),this.sortGameObjects(this._temp,u),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),h+=this.processOverOutEvents(u),2===this.getDragState(u)&&this.processDragThresholdEvent(u,t),h>0&&(a=!0)}return a},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,n=!1,r=0;r<i;r++){var s=0,a=e[r];switch(this._tempZones=[],this._temp=this.hitTestPointer(a),this.sortGameObjects(this._temp,a),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),t){case o.MOUSE_DOWN:s+=this.processDragDownEvent(a),s+=this.processDownEvents(a),s+=this.processOverOutEvents(a);break;case o.MOUSE_UP:s+=this.processDragUpEvent(a),s+=this.processUpEvents(a),s+=this.processOverOutEvents(a);break;case o.TOUCH_START:s+=this.processDragDownEvent(a),s+=this.processDownEvents(a),s+=this.processOverEvents(a);break;case o.TOUCH_END:case o.TOUCH_CANCEL:s+=this.processDragUpEvent(a),s+=this.processUpEvents(a),s+=this.processOutEvents(a);break;case o.MOUSE_MOVE:case o.TOUCH_MOVE:s+=this.processDragMoveEvent(a),s+=this.processMoveEvents(a),s+=this.processOverOutEvents(a);break;case o.MOUSE_WHEEL:s+=this.processWheelEvent(a)}s>0&&(n=!0)}return this._updatedThisFrame=!0,n},clear:function(t,e){void 0===e&&(e=!1);var i=t.input;if(i){e||this.queueForRemoval(t),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,t.input=null;var n=this._draggable.indexOf(t);return n>-1&&this._draggable.splice(n,1),(n=this._drag[0].indexOf(t))>-1&&this._drag[0].splice(n,1),(n=this._over[0].indexOf(t))>-1&&(this._over[0].splice(n,1),this.manager.resetCursor(i)),t}},disable:function(t){t.input.enabled=!1},enable:function(t,e,i,n){return void 0===n&&(n=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&n&&!t.input.dropZone&&(t.input.dropZone=n),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i<e.length;i++){for(var n=e[i],r=this.manager.hitTest(t,this._list,n),s=0;s<r.length;s++){var o=r[s];o.input.dropZone&&this._tempZones.push(o)}if(r.length>0)return t.camera=n,r}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,n=this._eventData,r=this._eventContainer;n.cancelled=!1;for(var s=!1,o=0;o<i.length;o++){var a=i[o];if(a.input){if(e++,a.emit(f.GAMEOBJECT_POINTER_DOWN,t,a.input.localX,a.input.localY,r),n.cancelled||!a.input){s=!0;break}if(this.emit(f.GAMEOBJECT_DOWN,t,a,r),n.cancelled||!a.input){s=!0;break}}}return!s&&this.manager&&(t.downElement===this.manager.game.canvas?this.emit(f.POINTER_DOWN,t,i):this.emit(f.POINTER_DOWN_OUTSIDE,t)),e},getDragState:function(t){return this._dragState[t.id]},setDragState:function(t,e){this._dragState[t.id]=e},processDragThresholdEvent:function(t,e){var i=!1,n=this.dragTimeThreshold,r=this.dragDistanceThreshold;if((r>0&&u(t.x,t.y,t.downX,t.downY)>=r||n>0&&e>=t.downTime+n)&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i<e.length;i++){var n=e[i],r=n.input;r.dragState=2,r.dragStartX=n.x,r.dragStartY=n.y,r.dragStartXGlobal=t.worldX,r.dragStartYGlobal=t.worldY,r.dragX=r.dragStartXGlobal-r.dragStartX,r.dragY=r.dragStartYGlobal-r.dragStartY,n.emit(f.GAMEOBJECT_DRAG_START,t,r.dragX,r.dragY),this.emit(f.DRAG_START,t,n)}return this.setDragState(t,4),e.length},processDragDownEvent:function(t){var e=this._temp;if(0===this._draggable.length||0===e.length||!t.primaryDown||0!==this.getDragState(t))return 0;this.setDragState(t,1);for(var i=[],n=0;n<e.length;n++){var r=e[n];r.input.draggable&&0===r.input.dragState&&i.push(r)}return 0===i.length?(this.setDragState(t,0),0):(i.length>1&&(this.sortGameObjects(i,t),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0))},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;for(var e=this._tempZones,i=this._drag[t.id],n=0;n<i.length;n++){var r,s,o=i[n],a=o.input,h=a.target;if(h){var u=e.indexOf(h);0===u?(o.emit(f.GAMEOBJECT_DRAG_OVER,t,h),this.emit(f.DRAG_OVER,t,o,h)):u>0?(o.emit(f.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(f.DRAG_LEAVE,t,o,h),a.target=e[0],h=a.target,o.emit(f.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(f.DRAG_ENTER,t,o,h)):(o.emit(f.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(f.DRAG_LEAVE,t,o,h),e[0]?(a.target=e[0],h=a.target,o.emit(f.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(f.DRAG_ENTER,t,o,h)):a.target=null)}else!h&&e[0]&&(a.target=e[0],h=a.target,o.emit(f.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(f.DRAG_ENTER,t,o,h));if(o.parentContainer){var l=t.worldX-a.dragStartXGlobal,c=t.worldY-a.dragStartYGlobal,d=o.getParentRotation(),p=l*Math.cos(d)+c*Math.sin(d),v=c*Math.cos(d)-l*Math.sin(d);p*=1/o.parentContainer.scaleX,v*=1/o.parentContainer.scaleY,r=p+a.dragStartX,s=v+a.dragStartY}else r=t.worldX-a.dragX,s=t.worldY-a.dragY;o.emit(f.GAMEOBJECT_DRAG,t,r,s),this.emit(f.DRAG,t,o,r,s)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i<e.length;i++){var n=e[i],r=n.input;if(r&&2===r.dragState){r.dragState=0,r.dragX=r.localX-n.displayOriginX,r.dragY=r.localY-n.displayOriginY;var s=!1,o=r.target;o&&(n.emit(f.GAMEOBJECT_DROP,t,o),this.emit(f.DROP,t,n,o),r.target=null,s=!0),n.input&&(n.emit(f.GAMEOBJECT_DRAG_END,t,r.dragX,r.dragY,s),this.emit(f.DRAG_END,t,n,s))}}return this.setDragState(t,0),e.splice(0),0},processMoveEvents:function(t){var e=0,i=this._temp,n=this._eventData,r=this._eventContainer;n.cancelled=!1;for(var s=!1,o=0;o<i.length;o++){var a=i[o];if(a.input){if(e++,a.emit(f.GAMEOBJECT_POINTER_MOVE,t,a.input.localX,a.input.localY,r),n.cancelled||!a.input){s=!0;break}
5812if(this.emit(f.GAMEOBJECT_MOVE,t,a,r),n.cancelled||!a.input){s=!0;break}if(this.topOnly)break}}return s||this.emit(f.POINTER_MOVE,t,i),e},processWheelEvent:function(t){var e=0,i=this._temp,n=this._eventData,r=this._eventContainer;n.cancelled=!1;for(var s=!1,o=t.deltaX,a=t.deltaY,h=t.deltaZ,u=0;u<i.length;u++){var l=i[u];if(l.input){if(e++,l.emit(f.GAMEOBJECT_POINTER_WHEEL,t,o,a,h,r),n.cancelled||!l.input){s=!0;break}if(this.emit(f.GAMEOBJECT_WHEEL,t,l,o,a,h,r),n.cancelled||!l.input){s=!0;break}}}return s||this.emit(f.POINTER_WHEEL,t,i,o,a,h),e},processOverEvents:function(t){var e=this._temp,i=0,n=e.length,r=[];if(n>0){var s=this.manager,o=this._eventData,a=this._eventContainer;o.cancelled=!1;for(var h=!1,u=0;u<n;u++){var l=e[u];if(l.input){if(r.push(l),s.setCursor(l.input),l.emit(f.GAMEOBJECT_POINTER_OVER,t,l.input.localX,l.input.localY,a),i++,o.cancelled||!l.input){h=!0;break}if(this.emit(f.GAMEOBJECT_OVER,t,l,a),o.cancelled||!l.input){h=!0;break}}}h||this.emit(f.POINTER_OVER,t,r)}return this._over[t.id]=r,i},processOutEvents:function(t){var e=this._over[t.id],i=0,n=e.length;if(n>0){var r=this.manager,s=this._eventData,o=this._eventContainer;s.cancelled=!1;var a=!1;this.sortGameObjects(e,t);for(var h=0;h<n;h++){var u=e[h];if((u=e[h]).input){if(r.resetCursor(u.input),u.emit(f.GAMEOBJECT_POINTER_OUT,t,o),i++,s.cancelled||!u.input){a=!0;break}
5812if(this.emit(f.GAMEOBJECT_OUT,t,u,o),s.cancelled||!u.input){a=!0;break}a||this.emit(f.POINTER_OUT,t,e)}}this._over[t.id]=[]}return i},processOverOutEvents:function(t){var e,i,n=this._temp,r=[],s=[],o=[],a=this._over[t.id],h=this._drag[t.id],u=this.manager;for(e=0;e<a.length;e++)i=a[e],-1===n.indexOf(i)&&-1===h.indexOf(i)?r.push(i):o.push(i);for(e=0;e<n.length;e++)i=n[e],-1===a.indexOf(i)&&s.push(i);var l=r.length,c=0,d=this._eventData,p=this._eventContainer;d.cancelled=!1;var v=!1;if(l>0){for(this.sortGameObjects(r,t),e=0;e<l;e++)if((i=r[e]).input){if(u.resetCursor(i.input),i.emit(f.GAMEOBJECT_POINTER_OUT,t,p),c++,d.cancelled||!i.input){v=!0;break}if(this.emit(f.GAMEOBJECT_OUT,t,i,p),d.cancelled||!i.input){v=!0;break}}v||this.emit(f.POINTER_OUT,t,r)}if(l=s.length,d.cancelled=!1,v=!1,l>0){for(this.sortGameObjects(s,t),e=0;e<l;e++)if((i=s[e]).input){if(u.setCursor(i.input),i.emit(f.GAMEOBJECT_POINTER_OVER,t,i.input.localX,i.input.localY,p),c++,d.cancelled||!i.input){v=!0;break}if(this.emit(f.GAMEOBJECT_OVER,t,i,p),d.cancelled||!i.input){v=!0;break}}v||this.emit(f.POINTER_OVER,t,s)}return a=o.concat(s),this._over[t.id]=this.sortGameObjects(a,t),c},processUpEvents:function(t){var e=this._temp,i=this._eventData,n=this._eventContainer;i.cancelled=!1;for(var r=!1,s=0;s<e.length;s++){var o=e[s];if(o.input){if(o.emit(f.GAMEOBJECT_POINTER_UP,t,o.input.localX,o.input.localY,n),i.cancelled||!o.input){r=!0;break}
vendor: 24,576 bytes, lines 5812-5944
5812if(this.emit(f.GAMEOBJECT_UP,t,o,n),i.cancelled||!o.input){r=!0;break}}}return!r&&this.manager&&(t.upElement===this.manager.game.canvas?this.emit(f.POINTER_UP,t,e):this.emit(f.POINTER_UP_OUTSIDE,t)),e.length},queueForInsertion:function(t){return-1===this._pendingInsertion.indexOf(t)&&-1===this._list.indexOf(t)&&this._pendingInsertion.push(t),this},queueForRemoval:function(t){return this._pendingRemoval.push(t),this},setDraggable:function(t,e){void 0===e&&(e=!0),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i];n.input.draggable=e;var r=this._draggable.indexOf(n);e&&-1===r?this._draggable.push(n):!e&&r>-1&&this._draggable.splice(r,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return h(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var n=!1,r=!1,s=!1,o=!1,h=!1,u=!0;if(m(e)){var l=e;e=p(l,"hitArea",null),i=p(l,"hitAreaCallback",null),n=p(l,"draggable",!1),r=p(l,"dropZone",!1),s=p(l,"cursor",!1),o=p(l,"useHandCursor",!1),h=p(l,"pixelPerfect",!1);var c=p(l,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(c)),e&&i||(this.setHitAreaFromTexture(t),u=!1)}else"function"!=typeof e||i||(i=e,e={});for(var f=0;f<t.length;f++){var d=t[f];if(h&&"Container"===d.type)console.warn("Cannot pixelPerfect test a Container. Use a custom callback.");else{var v=d.input?d.input:a(d,e,i);v.customHitArea=u,v.dropZone=r,v.cursor=o?"pointer":s,d.input=v,n&&this.setDraggable(d),this.queueForInsertion(d)}}return this},setHitAreaCircle:function(t,e,i,s,o){void 0===o&&(o=r);var a=new n(e,i,s);return this.setHitArea(t,a,o)},setHitAreaEllipse:function(t,e,i,n,r,s){void 0===s&&(s=c);var o=new l(e,i,n,r);return this.setHitArea(t,o,s)},setHitAreaFromTexture:function(t,e){void 0===e&&(e=w),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i],r=n.frame,s=0,o=0;n.width?(s=n.width,o=n.height):r&&(s=r.realWidth,o=r.realHeight),"Container"!==n.type||0!==s&&0!==o?0!==s&&0!==o&&(n.input=a(n,new x(0,0,s,o),e),this.queueForInsertion(n)):console.warn("Container.setInteractive must specify a Shape or call setSize() first")}return this},setHitAreaRectangle:function(t,e,i,n,r,s){void 0===s&&(s=w);var o=new x(e,i,n,r);return this.setHitArea(t,o,s)},setHitAreaTriangle:function(t,e,i,n,r,s,o,a){void 0===a&&(a=T);var h=new b(e,i,n,r,s,o);return this.setHitArea(t,h,a)},enableDebug:function(t,e){void 0===e&&(e=65280);var i=t.input;if(!i||!i.hitArea)return this;var n=i.hitArea,r=n.type,s=i.hitAreaDebug,o=this.systems.add,a=this.systems.updateList;s&&(a.remove(s),s.destroy(),s=null);var h=0,u=0;switch(r){case v.CIRCLE:s=o.arc(0,0,n.radius),h=n.x-n.radius,u=n.y-n.radius;break;case v.ELLIPSE:s=o.ellipse(0,0,n.width,n.height),h=n.x-n.width/2,u=n.y-n.height/2;break;case v.LINE:s=o.line(0,0,n.x1,n.y1,n.x2,n.y2);break;case v.POLYGON:s=o.polygon(0,0,n.points);break;case v.RECTANGLE:s=o.rectangle(0,0,n.width,n.height),h=n.x,u=n.y;break;case v.TRIANGLE:s=o.triangle(0,0,n.x1,n.y1,n.x2,n.y2,n.x3,n.y3)}return s&&(s.isFilled=!1,s.preUpdate=function(){s.setStrokeStyle(1/t.scale,e),s.setDisplayOrigin(t.displayOriginX,t.displayOriginY);var i=t.x,n=t.y,r=t.rotation,o=t.scaleX,a=t.scaleY;if(t.parentContainer){var l=t.getWorldTransformMatrix();i=l.tx,n=l.ty,r=l.rotation,o=l.scaleX,a=l.scaleY}s.setRotation(r),s.setScale(o,a),s.setPosition(i+h,n+u),s.setScrollFactor(t.scrollFactorX,t.scrollFactorY),s.setDepth(t.depth)},a.add(s),i.hitAreaDebug=s),this},removeDebug:function(t){var e=t.input;if(e&&e.hitAreaDebug){var i=e.hitAreaDebug;this.systems.updateList.remove(i),i.destroy(),e.hitAreaDebug=null}return this},setPollAlways:function(){return this.setPollRate(0)},setPollOnMove:function(){return this.setPollRate(-1)},setPollRate:function(t){return this.pollRate=t,this._pollTimer=0,this},setGlobalTopOnly:function(t){return this.manager.globalTopOnly=t,this},setTopOnly:function(t){return this.topOnly=t,this},sortGameObjects:function(t,e){if(t.length<2)return t;var i=e.camera.renderList;return t.sort((function(t,e){return i.indexOf(e)-i.indexOf(t)}))},sortDropZones:function(t){return t.length<2?t:(this.scene.sys.depthSort(),t.sort(this.sortDropZoneHandler.bind(this)))},sortDropZoneHandler:function(t,e){if(t.parentContainer||e.parentContainer){if(t.parentContainer===e.parentContainer)return e.parentContainer.getIndex(e)-t.parentContainer.getIndex(t);if(t.parentContainer===e)return-1;if(e.parentContainer===t)return 1;for(var i=t.getIndexList(),n=e.getIndexList(),r=Math.min(i.length,n.length),s=0;s<r;s++){var o=i[s],a=n[s];if(o!==a)return a-o}return n.length-i.length}return this.displayList.getIndex(e)-this.displayList.getIndex(t)},stopPropagation:function(){return this.manager._tempSkip=!0,this},addPointer:function(t){return this.manager.addPointer(t)},setDefaultCursor:function(t){return this.manager.setDefaultCursor(t),this},transitionIn:function(){this.enabled=this.settings.transitionAllowInput},transitionComplete:function(){this.settings.transitionAllowInput||(this.enabled=!0)},transitionOut:function(){this.enabled=this.settings.transitionAllowInput},shutdown:function(){this.pluginEvents.emit(f.SHUTDOWN),this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0,this._dragState.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners();var e=this.manager;e.canvas.style.cursor=e.defaultCursor;var i=this.systems.events;i.off(_.TRANSITION_START,this.transitionIn,this),i.off(_.TRANSITION_OUT,this.transitionOut,this),i.off(_.TRANSITION_COMPLETE,this.transitionComplete,this),i.off(_.PRE_UPDATE,this.preUpdate,this),e.events.off(f.GAME_OUT,this.onGameOut,this),e.events.off(f.GAME_OVER,this.onGameOver,this),i.off(_.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.pluginEvents.emit(f.DESTROY),this.pluginEvents.removeAllListeners(),this.scene.sys.events.off(_.START,this.start,this),this.scene=null,this.cameras=null,this.manager=null,this.events=null,this.mouse=null},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}},isOver:{get:function(){return this.manager.isOver}},mousePointer:{get:function(){return this.manager.mousePointer}},activePointer:{get:function(){return this.manager.activePointer}},pointer1:{get:function(){return this.manager.pointers[1]}},pointer2:{get:function(){return this.manager.pointers[2]}},pointer3:{get:function(){return this.manager.pointers[3]}},pointer4:{get:function(){return this.manager.pointers[4]}},pointer5:{get:function(){return this.manager.pointers[5]}},pointer6:{get:function(){return this.manager.pointers[6]}},pointer7:{get:function(){return this.manager.pointers[7]}},pointer8:{get:function(){return this.manager.pointers[8]}},pointer9:{get:function(){return this.manager.pointers[9]}},pointer10:{get:function(){return this.manager.pointers[10]}}});y.register("InputPlugin",E,"input"),t.exports=E},function(t,e,i){ 5813/** 5814 * @author Richard Davey <[email protected]> 5815 * @copyright 2020 Photon Storm Ltd. 5816 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5817 */ 5818t.exports={Events:i(152),KeyboardManager:i(404),KeyboardPlugin:i(1324),Key:i(506),KeyCodes:i(141),KeyCombo:i(507),AdvanceKeyCombo:i(509),ProcessKeyCombo:i(508),ResetKeyCombo:i(510),JustDown:i(1326),JustUp:i(1327),DownDuration:i(1328),UpDuration:i(1329)}},function(t,e){ 5819/** 5820 * @author Richard Davey <[email protected]> 5821 * @copyright 2020 Photon Storm Ltd. 5822 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5823 */ 5824t.exports="keydown"},function(t,e){ 5825/** 5826 * @author Richard Davey <[email protected]> 5827 * @copyright 2020 Photon Storm Ltd. 5828 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5829 */ 5830t.exports="keyup"},function(t,e){ 5831/** 5832 * @author Richard Davey <[email protected]> 5833 * @copyright 2020 Photon Storm Ltd. 5834 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5835 */ 5836t.exports="keycombomatch"},function(t,e){ 5837/** 5838 * @author Richard Davey <[email protected]> 5839 * @copyright 2020 Photon Storm Ltd. 5840 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5841 */ 5842t.exports="down"},function(t,e){ 5843/** 5844 * @author Richard Davey <[email protected]> 5845 * @copyright 2020 Photon Storm Ltd. 5846 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5847 */ 5848t.exports="keydown-"},function(t,e){ 5849/** 5850 * @author Richard Davey <[email protected]> 5851 * @copyright 2020 Photon Storm Ltd. 5852 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5853 */ 5854t.exports="keyup-"},function(t,e){ 5855/** 5856 * @author Richard Davey <[email protected]> 5857 * @copyright 2020 Photon Storm Ltd. 5858 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5859 */ 5860t.exports="up"},function(t,e,i){ 5861/** 5862 * @author Richard Davey <[email protected]> 5863 * @copyright 2020 Photon Storm Ltd. 5864 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5865 */ 5866var n=i(0),r=i(9),s=i(152),o=i(22),a=i(6),h=i(49),u=i(151),l=i(506),c=i(141),f=i(507),d=i(1325),p=i(21),v=i(76),g=new n({Extends:r,initialize:function(t){r.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,t.pluginEvents.once(h.BOOT,this.boot,this),t.pluginEvents.on(h.START,this.start,this)},boot:function(){var t=this.settings.input;this.enabled=a(t,"keyboard",!0);var e=a(t,"keyboard.capture",null);e&&this.addCaptures(e),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(h.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this),this.game.events.on(o.BLUR,this.resetKeys,this),this.scene.sys.events.on(p.PAUSE,this.resetKeys,this),this.scene.sys.events.on(p.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var n={};if("string"==typeof t){t=t.split(",");for(var r=0;r<t.length;r++){var s=t[r].trim();s&&(n[s]=this.addKey(s,e,i))}}else for(var o in t)n[o]=this.addKey(t[o],e,i);return n},addKey:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var n=this.keys;if(t instanceof l){var r=n.indexOf(t);return r>-1?n[r]=t:n[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),n[t]||(n[t]=new l(this,t),e&&this.addCapture(t),n[t].setEmitOnRepeat(i)),n[t]},removeKey:function(t,e){void 0===e&&(e=!1);var i,n=this.keys;if(t instanceof l){var r=n.indexOf(t);r>-1&&(i=this.keys[r],this.keys[r]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return n[t]&&(i=n[t],n[t]=void 0),i&&(i.plugin=null,e&&i.destroy()),this},removeAllKeys:function(t){for(var e=this.keys,i=0;i<e.length;i++){var n=e[i];n&&(e[i]=void 0,t&&n.destroy())}return this},createCombo:function(t,e){return new f(this,t,e)},checkDown:function(t,e){if(void 0===e&&(e=0),this.enabled&&t.isDown){var i=v(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,n=0;n<e;n++){var r=t[n],o=r.keyCode,a=i[o],h=!1;void 0===r.cancelled&&(r.cancelled=0,r.stopImmediatePropagation=function(){r.cancelled=1},r.stopPropagation=function(){r.cancelled=-1}),-1!==r.cancelled&&(o===this.prevCode&&r.timeStamp===this.prevTime&&r.type===this.prevType||(this.prevCode=o,this.prevTime=r.timeStamp,this.prevType=r.type,"keydown"===r.type?(a&&(h=a.isDown,a.onDown(r)),r.cancelled||a&&h||(d[o]&&this.emit(s.KEY_DOWN+d[o],r),r.cancelled||this.emit(s.ANY_KEY_DOWN,r))):(a&&a.onUp(r),r.cancelled||(d[o]&&this.emit(s.KEY_UP+d[o],r),r.cancelled||this.emit(s.ANY_KEY_UP,r))),1===r.cancelled&&(r.cancelled=0)))}},resetKeys:function(){for(var t=this.keys,e=0;e<t.length;e++)t[e]&&t[e].reset();return this},shutdown:function(){this.resetKeys(),this.sceneInputPlugin.manager.events.off(h.MANAGER_PROCESS,this.update,this),this.game.events.off(o.BLUR,this.resetKeys),this.scene.sys.events.off(p.PAUSE,this.resetKeys,this),this.scene.sys.events.off(p.SLEEP,this.resetKeys,this),this.removeAllListeners(),this.queue=[]},destroy:function(){this.shutdown();for(var t=this.keys,e=0;e<t.length;e++)t[e]&&t[e].destroy();this.keys=[],this.combos=[],this.queue=[],this.scene=null,this.settings=null,this.sceneInputPlugin=null,this.manager=null},time:{get:function(){return this.sceneInputPlugin.manager.time}}});u.register("KeyboardPlugin",g,"keyboard","keyboard","inputKeyboard"),t.exports=g},function(t,e,i){ 5867/** 5868 * @author Richard Davey <[email protected]> 5869 * @copyright 2020 Photon Storm Ltd. 5870 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5871 */ 5872var n=i(141),r={};for(var s in n)r[n[s]]=s;t.exports=r},function(t,e){t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},function(t,e){t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i<e}},function(t,e){t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeUp;return t.isUp&&i<e}},function(t,e,i){ 5873/** 5874 * @author Richard Davey <[email protected]> 5875 * @copyright 2020 Photon Storm Ltd. 5876 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5877 */ 5878t.exports={MouseManager:i(405)}},function(t,e,i){ 5879/** 5880 * @author Richard Davey <[email protected]> 5881 * @copyright 2020 Photon Storm Ltd. 5882 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5883 */ 5884t.exports={TouchManager:i(407)}},function(t,e,i){ 5885/** 5886 * @author Richard Davey <[email protected]> 5887 * @copyright 2020 Photon Storm Ltd. 5888 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5889 */ 5890var n=i(20),r=i(17),s={Events:i(91),FileTypes:i(1333),File:i(23),FileTypesManager:i(8),GetURL:i(153),LoaderPlugin:i(1359),MergeXHRSettings:i(237),MultiFile:i(47),XHRLoader:i(511),XHRSettings:i(154)};s=r(!1,s,n),t.exports=s},function(t,e,i){ 5891/** 5892 * @author Richard Davey <[email protected]> 5893 * @copyright 2020 Photon Storm Ltd. 5894 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5895 */ 5896t.exports={AnimationJSONFile:i(1334),AsepriteFile:i(1335),AtlasJSONFile:i(1336),AtlasXMLFile:i(1337),AudioFile:i(512),AudioSpriteFile:i(1338),BinaryFile:i(1339),BitmapFontFile:i(1340),CSSFile:i(1341),GLSLFile:i(1342),HTML5AudioFile:i(513),HTMLFile:i(1343),HTMLTextureFile:i(1344),ImageFile:i(70),JSONFile:i(59),MultiAtlasFile:i(1345),MultiScriptFile:i(1346),OBJFile:i(1347),PackFile:i(1348),PluginFile:i(1349),SceneFile:i(1350),ScenePluginFile:i(1351),ScriptFile:i(514),SpriteSheetFile:i(1352),SVGFile:i(1353),TextFile:i(239),TilemapCSVFile:i(1354),TilemapImpactFile:i(1355),TilemapJSONFile:i(1356),UnityAtlasFile:i(1357),VideoFile:i(1358),XMLFile:i(238)}},function(t,e,i){ 5897/** 5898 * @author Richard Davey <[email protected]> 5899 * @copyright 2020 Photon Storm Ltd. 5900 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5901 */ 5902var n=i(0),r=i(8),s=i(59),o=i(91),a=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,n,r),this.type="animationJSON"},onProcess:function(){this.loader.once(o.POST_PROCESS,this.onLoadComplete,this),s.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});r.register("animation",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new a(this,t[r]));else this.addFile(new a(this,t,e,n,i));return this})),t.exports=a},function(t,e,i){ 5903/** 5904 * @author Richard Davey <[email protected]> 5905 * @copyright 2020 Photon Storm Ltd. 5906 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5907 */ 5908var n=i(0),r=i(8),s=i(2),o=i(70),a=i(7),h=i(59),u=i(47),l=new n({Extends:u,initialize:function(t,e,i,n,r,l){var c,f;if(a(e)){var d=e;e=s(d,"key"),c=new o(t,{key:e,url:s(d,"textureURL"),extension:s(d,"textureExtension","png"),normalMap:s(d,"normalMap"),xhrSettings:s(d,"textureXhrSettings")}),f=new h(t,{key:e,url:s(d,"atlasURL"),extension:s(d,"atlasExtension","json"),xhrSettings:s(d,"atlasXhrSettings")})}else c=new o(t,e,i,r),f=new h(t,e,n,l);c.linkFile?u.call(this,t,"atlasjson",e,[c,f,c.linkFile]):u.call(this,t,"atlasjson",e,[c,f])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),e.addToCache(),this.complete=!0}}});r.register("aseprite",(function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new l(this,t[o]),this.addFile(s.files);else s=new l(this,t,e,i,n,r),this.addFile(s.files);return this})),t.exports=l},function(t,e,i){ 5909/** 5910 * @author Richard Davey <[email protected]> 5911 * @copyright 2020 Photon Storm Ltd. 5912 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5913 */ 5914var n=i(0),r=i(8),s=i(2),o=i(70),a=i(7),h=i(59),u=i(47),l=new n({Extends:u,initialize:function(t,e,i,n,r,l){var c,f;if(a(e)){var d=e;e=s(d,"key"),c=new o(t,{key:e,url:s(d,"textureURL"),extension:s(d,"textureExtension","png"),normalMap:s(d,"normalMap"),xhrSettings:s(d,"textureXhrSettings")}),f=new h(t,{key:e,url:s(d,"atlasURL"),extension:s(d,"atlasExtension","json"),xhrSettings:s(d,"atlasXhrSettings")})}else c=new o(t,e,i,r),f=new h(t,e,n,l);c.linkFile?u.call(this,t,"atlasjson",e,[c,f,c.linkFile]):u.call(this,t,"atlasjson",e,[c,f])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),e.pendingDestroy(),this.complete=!0}}});r.register("atlas",(function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new l(this,t[o]),this.addFile(s.files);else s=new l(this,t,e,i,n,r),this.addFile(s.files);return this})),t.exports=l},function(t,e,i){ 5915/** 5916 * @author Richard Davey <[email protected]> 5917 * @copyright 2020 Photon Storm Ltd. 5918 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5919 */ 5920var n=i(0),r=i(8),s=i(2),o=i(70),a=i(7),h=i(47),u=i(238),l=new n({Extends:h,initialize:function(t,e,i,n,r,l){var c,f;if(a(e)){var d=e;e=s(d,"key"),c=new o(t,{key:e,url:s(d,"textureURL"),extension:s(d,"textureExtension","png"),normalMap:s(d,"normalMap"),xhrSettings:s(d,"textureXhrSettings")}),f=new u(t,{key:e,url:s(d,"atlasURL"),extension:s(d,"atlasExtension","xml"),xhrSettings:s(d,"atlasXhrSettings")})}else c=new o(t,e,i,r),f=new u(t,e,n,l);c.linkFile?h.call(this,t,"atlasxml",e,[c,f,c.linkFile]):h.call(this,t,"atlasxml",e,[c,f])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(t.key,t.data,e.data,i),e.pendingDestroy(),this.complete=!0}}});r.register("atlasXML",(function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new l(this,t[o]),this.addFile(s.files);else s=new l(this,t,e,i,n,r),this.addFile(s.files);return this})),t.exports=l},function(t,e,i){ 5921/** 5922 * @author Richard Davey <[email protected]> 5923 * @copyright 2020 Photon Storm Ltd. 5924 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5925 */ 5926var n=i(512),r=i(0),s=i(8),o=i(2),a=i(7),h=i(59),u=i(47),l=new r({Extends:u,initialize:function(t,e,i,r,s,l,c){if(a(e)){var f=e;e=o(f,"key"),i=o(f,"jsonURL"),r=o(f,"audioURL"),s=o(f,"audioConfig"),l=o(f,"audioXhrSettings"),c=o(f,"jsonXhrSettings")}var d;if(r){var p=n.create(t,e,r,s,l);p&&(d=new h(t,e,i,c),u.call(this,t,"audiosprite",e,[p,d]),this.config.resourceLoad=!1)}else d=new h(t,e,i,c),u.call(this,t,"audiosprite",e,[d]),this.config.resourceLoad=!0,this.config.audioConfig=s,this.config.audioXhrSettings=l},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,this.config.resourceLoad&&"json"===t.type&&t.data.hasOwnProperty("resources"))){var e=t.data.resources,i=o(this.config,"audioConfig"),r=o(this.config,"audioXhrSettings"),s=n.create(this.loader,t.key,e,i,r);s&&(this.addToMultiFile(s),this.loader.addFile(s))}},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache(),e.addToCache(),this.complete=!0}}});s.register("audioSprite",(function(t,e,i,n,r,s){var o,a=this.systems.game,h=a.config.audio,u=a.device.audio;if(h&&h.noAudio||!u.webAudio&&!u.audioData)return this;if(Array.isArray(t))for(var c=0;c<t.length;c++)(o=new l(this,t[c])).files&&this.addFile(o.files);else(o=new l(this,t,e,i,n,r,s)).files&&this.addFile(o.files);return this}))},function(t,e,i){ 5927/** 5928 * @author Richard Davey <[email protected]> 5929 * @copyright 2020 Photon Storm Ltd. 5930 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5931 */ 5932var n=i(0),r=i(20),s=i(23),o=i(8),a=i(2),h=i(7),u=new n({Extends:s,initialize:function(t,e,i,n,r){var o="bin";if(h(e)){var u=e;e=a(u,"key"),i=a(u,"url"),n=a(u,"xhrSettings"),o=a(u,"extension",o),r=a(u,"dataType",r)}var l={type:"binary",cache:t.cacheManager.binary,extension:o,responseType:"arraybuffer",key:e,url:i,xhrSettings:n,config:{dataType:r}};s.call(this,t,l)},onProcess:function(){this.state=r.FILE_PROCESSING;var t=this.config.dataType;this.data=t?new t(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});o.register("binary",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new u(this,t[r]));else this.addFile(new u(this,t,e,n,i));return this})),t.exports=u},function(t,e,i){ 5933/** 5934 * @author Richard Davey <[email protected]> 5935 * @copyright 2020 Photon Storm Ltd. 5936 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5937 */ 5938var n=i(0),r=i(8),s=i(2),o=i(70),a=i(7),h=i(47),u=i(209),l=i(238),c=new n({Extends:h,initialize:function(t,e,i,n,r,u){var c,f;if(a(e)){var d=e;e=s(d,"key"),c=new o(t,{key:e,url:s(d,"textureURL"),extension:s(d,"textureExtension","png"),normalMap:s(d,"normalMap"),xhrSettings:s(d,"textureXhrSettings")}),f=new l(t,{key:e,url:s(d,"fontDataURL"),extension:s(d,"fontDataExtension","xml"),xhrSettings:s(d,"fontDataXhrSettings")})}else c=new o(t,e,i,r),f=new l(t,e,n,u);c.linkFile?h.call(this,t,"bitmapfont",e,[c,f,c.linkFile]):h.call(this,t,"bitmapfont",e,[c,f])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache(),e.pendingDestroy();var i=t.cache.get(t.key),n=u(e.data,t.cache.getFrame(t.key),0,0,i);this.loader.cacheManager.bitmapFont.add(t.key,{data:n,texture:t.key,frame:null}),this.complete=!0}}});r.register("bitmapFont",(function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new c(this,t[o]),this.addFile(s.files);else s=new c(this,t,e,i,n,r),this.addFile(s.files);return this})),t.exports=c},function(t,e,i){ 5939/** 5940 * @author Richard Davey <[email protected]> 5941 * @copyright 2020 Photon Storm Ltd. 5942 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5943 */ 5944var n=i(0),r=i(20),s=i(23),o=i(8),a=i(2),h=i(7),u=new n({Extends:s,initialize:function(t,e,
5944i,n){var r="css";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),r=a(o,"extension",r)}var u={type:"script",cache:!1,extension:r,responseType:"text",key:e,url:i,xhrSettings:n};s.call(this,t,u)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});o.register("css",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new u(this,t[n]));else this.addFile(new u(this,t,e,i));return this})),t.exports=u},function(t,e,i){ 5945/** 5946 * @author Richard Davey <[email protected]> 5947 * @copyright 2020 Photon Storm Ltd. 5948 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5949 */ 5950var n=i(0),r=i(20),s=i(23),o=i(8),a=i(2),h=i(7),u=i(390),l=new n({Extends:s,initialize:function(t,e,i,n,r){var o="glsl";if(h(e)){var u=e;e=a(u,"key"),i=a(u,"url"),n=a(u,"shaderType","fragment"),r=a(u,"xhrSettings"),o=a(u,"extension",o)}else void 0===n&&(n="fragment");var l={type:"glsl",cache:t.cacheManager.shader,extension:o,responseType:"text",key:e,url:i,config:{shaderType:n},xhrSettings:r};s.call(this,t,l)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.split("\n"),e=this.extractBlock(t,0);if(e)for(;e;){var i=this.getShaderName(e.header),n=this.getShaderType(e.header),r=this.getShaderUniforms(e.header),s=e.shader;if(this.cache.has(i)){var o=this.cache.get(i);"fragment"===n?o.fragmentSrc=s:o.vertexSrc=s,o.uniforms||(o.uniforms=r)}else"fragment"===n?this.cache.add(i,new u(i,s,"",r)):this.cache.add(i,new u(i,"",s,r));e=this.extractBlock(t,e.offset)}else"fragment"===this.config.shaderType?this.cache.add(this.key,new u(this.key,this.data)):this.cache.add(this.key,new u(this.key,"",this.data));this.pendingDestroy()},getShaderName:function(t){for(var e=0;e<t.length;e++){var i=t[e].trim();if("name:"===i.substring(0,5))return i.substring(5).trim()}return this.key},getShaderType:function(t){for(var e=0;e<t.length;e++){var i=t[e].trim();if("type:"===i.substring(0,5))return i.substring(5).trim()}return this.config.shaderType},getShaderUniforms:function(t){for(var e={},i=0;i<t.length;i++){var n=t[i].trim();if("uniform."===n.substring(0,8)){var r=n.indexOf(":");if(r){var s=n.substring(8,r);try{e[s]=JSON.parse(n.substring(r+1))}catch(lC){console.warn("Invalid uniform JSON: "+s)}}}}return e},extractBlock:function(t,e){for(var i=-1,n=-1,r=-1,s=!1,o=!1,a=[],h=[],u=e;u<t.length;u++){var l=t[u].trim();if("---"===l)if(-1===i)i=u,s=!0;else{if(!s){o=!1;break}n=u,s=!1,o=!0}else s?a.push(l):o&&(h.push(l),r=u)}return s||-1===n?null:{header:a,shader:h.join("\n"),offset:r}}});o.register("glsl",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new l(this,t[r]));else this.addFile(new l(this,t,e,i,n));return this})),t.exports=l},function(t,e,i){ 5951/** 5952 * @author Richard Davey <[email protected]> 5953 * @copyright 2020 Photon Storm Ltd. 5954 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5955 */ 5956var n=i(0),r=i(20),s=i(23),o=i(8),a=i(2),h=i(7),u=new n({Extends:s,initialize:function(t,e,i,n){var r="html";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),r=a(o,"extension",r)}var u={type:"text",cache:t.cacheManager.html,extension:r,responseType:"text",key:e,url:i,xhrSettings:n};s.call(this,t,u)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("html",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new u(this,t[n]));else this.addFile(new u(this,t,e,i));return this})),t.exports=u},function(t,e,i){ 5957/** 5958 * @author Richard Davey <[email protected]> 5959 * @copyright 2020 Photon Storm Ltd. 5960 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5961 */ 5962var n=i(0),r=i(20),s=i(23),o=i(8),a=i(2),h=i(7),u=new n({Extends:s,initialize:function(t,e,
vendor: 4,428 bytes, lines 5962-5974
5962i,n,r,o){void 0===n&&(n=512),void 0===r&&(r=512);var u="html";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),o=a(l,"xhrSettings"),u=a(l,"extension",u),n=a(l,"width",n),r=a(l,"height",r)}var c={type:"html",cache:t.textureManager,extension:u,responseType:"text",key:e,url:i,xhrSettings:o,config:{width:n,height:r}};s.call(this,t,c)},onProcess:function(){this.state=r.FILE_PROCESSING;var t=this.config.width,e=this.config.height,i=[];i.push('<svg width="'+t+'px" height="'+e+'px" viewBox="0 0 '+t+" "+e+'" xmlns="http://www.w3.org/2000/svg">'),i.push('<foreignObject width="100%" height="100%">'),i.push('<body xmlns="http://www.w3.org/1999/xhtml">'),i.push(this.xhrLoader.responseText),i.push("</body>"),i.push("</foreignObject>"),i.push("</svg>");var n=[i.join("\n")],o=this;try{var a=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(lC){return o.state=r.FILE_ERRORED,void o.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){s.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){s.revokeObjectURL(o.data),o.onProcessError()},s.createObjectURL(this.data,a,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});o.register("htmlTexture",(function(t,e,i,n,r){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new u(this,t[s]));else this.addFile(new u(this,t,e,i,n,r));return this})),t.exports=u},function(t,e,i){ 5963/** 5964 * @author Richard Davey <[email protected]> 5965 * @copyright 2020 Photon Storm Ltd. 5966 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5967 */ 5968var n=i(0),r=i(8),s=i(2),o=i(70),a=i(7),h=i(59),u=i(47),l=new n({Extends:u,initialize:function(t,e,i,n,r,o,l){if(a(e)){var c=e;e=s(c,"key"),i=s(c,"url",!1)?s(c,"url"):s(c,"atlasURL"),o=s(c,"xhrSettings"),n=s(c,"path"),r=s(c,"baseURL"),l=s(c,"textureXhrSettings")}var f=new h(t,e,i,o);u.call(this,t,"multiatlas",e,[f]),this.config.path=n,this.config.baseURL=r,this.config.textureXhrSettings=l},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"json"===t.type&&t.data.hasOwnProperty("textures"))){var e=t.data.textures,i=this.config,n=this.loader,r=n.baseURL,a=n.path,h=n.prefix,u=s(i,"baseURL",this.baseURL),l=s(i,"path",this.path),c=s(i,"prefix",this.prefix),f=s(i,"textureXhrSettings");n.setBaseURL(u),n.setPath(l),n.setPrefix(c);for(var d=0;d<e.length;d++){var p=e[d].image,v="MA"+this.multiKeyIndex+"_"+p,g=new o(n,v,p,f);if(this.addToMultiFile(g),n.addFile(g),e[d].normalMap){var m=new o(n,v,e[d].normalMap,f);m.type="normalMap",g.setLink(m),this.addToMultiFile(m),n.addFile(m)}}n.setBaseURL(r),n.setPath(a),n.setPrefix(h)}},addToCache:function(){if(this.isReadyToProcess()){for(var t=this.files[0],e=[],i=[],n=[],r=1;r<this.files.length;r++){var s=this.files[r];if("normalMap"!==s.type)for(var o=s.key.indexOf("_"),a=s.key.substr(o+1),h=s.data,u=0;u<t.data.textures.length;u++){var l=t.data.textures[u];if(l.image===a){i.push(h),e.push(l),s.linkFile&&n.push(s.linkFile.data);break}}}for(0===n.length&&(n=void 0),this.loader.textureManager.addAtlasJSONArray(this.key,i,e,n),this.complete=!0,r=0;r<this.files.length;r++)this.files[r].pendingDestroy()}}});r.register("multiatlas",(function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new l(this,t[o]),this.addFile(s.files);else s=new l(this,t,e,i,n,r),this.addFile(s.files);return this})),t.exports=l},function(t,e,i){ 5969/** 5970 * @author Richard Davey <[email protected]> 5971 * @copyright 2020 Photon Storm Ltd. 5972 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5973 */ 5974var n=i(0),r=i(8),s=i(2),o=i(7),a=i(47),h=i(514),u=new n({Extends:a,initialize:function(t,e,i,n){var r="js",u=[];if(o(e)){var l=e;e=s(l,"key"),i=s(l,"url"),n=s(l,"xhrSettings"),r=s(l,"extension",r)}Array.isArray(i)||(i=[i]);for(var c=0;c<i.length;c++){var f=new h(t,{key:e+"_"+c.toString(),url:i[c],extension:r,xhrSettings:n});f.onProcess=function(){this.onProcessComplete()},u.push(f)}a.call(this,t,"scripts",e,u)},addToCache:function(){if(this.isReadyToProcess()){for(var t=0;t<this.files.length;t++){var e=this.files[t];e.data=document.createElement("script"),e.data.language="javascript",e.data.type="text/javascript",e.data.defer=!1,e.data.text=e.xhrLoader.responseText,document.head.appendChild(e.data)}this.complete=!0}}});
5974r.register("scripts",(function(t,e,i){var n;if(Array.isArray(t))for(var r=0;r<t.length;r++)n=new u(this,t[r]),this.addFile(n.files);else n=new u(this,t,e,i),this.addFile(n.files);return this})),t.exports=u},function(t,e,i){ 5975/** 5976 * @author Richard Davey <[email protected]> 5977 * @copyright 2020 Photon Storm Ltd. 5978 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5979 */ 5980var n=i(0),r=i(8),s=i(2),o=i(7),a=i(47),h=i(492),u=i(493),l=i(239),c=new n({Extends:a,initialize:function(t,e,i,n,r,h){var u,c,f=t.cacheManager.obj;if(o(e)){var d=e;e=s(d,"key"),u=new l(t,{key:e,type:"obj",cache:f,url:s(d,"url"),extension:s(d,"extension","obj"),xhrSettings:s(d,"xhrSettings"),config:{flipUV:s(d,"flipUV",r)}}),(n=s(d,"matURL"))&&(c=new l(t,{key:e,type:"mat",cache:f,url:n,extension:s(d,"matExtension","mat"),xhrSettings:s(d,"xhrSettings")}))}else u=new l(t,{key:e,url:i,type:"obj",cache:f,extension:"obj",xhrSettings:h,config:{flipUV:r}}),n&&(c=new l(t,{key:e,url:n,type:"mat",cache:f,extension:"mat",xhrSettings:h}));a.call(this,t,"obj",e,[u,c])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=h(t.data,t.config.flipUV);e&&(i.materials=u(e.data)),t.cache.add(t.key,i),this.complete=!0}}});r.register("obj",(function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new c(this,t[o]),this.addFile(s.files);else s=new c(this,t,e,i,n,r),this.addFile(s.files);return this})),t.exports=c},function(t,e,i){ 5981/** 5982 * @author Richard Davey <[email protected]> 5983 * @copyright 2020 Photon Storm Ltd. 5984 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5985 */ 5986var n=i(0),r=i(20),s=i(8),o=i(59),a=new n({Extends:o,initialize:function(t,e,i,n,r){o.call(this,t,e,i,n,r),this.type="packfile"},onProcess:function(){this.state!==r.FILE_POPULATED&&(this.state=r.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.loader.addPack(this.data,this.config),this.onProcessComplete()}});s.register("pack",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new a(this,t[r]));else this.addFile(new a(this,t,e,n,i));return this})),t.exports=a},function(t,e,i){ 5987/** 5988 * @author Richard Davey <[email protected]> 5989 * @copyright 2020 Photon Storm Ltd. 5990 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5991 */ 5992var n=i(0),r=i(20),s=i(23),o=i(8),a=i(2),h=i(7),u=new n({Extends:s,initialize:function(t,e,i,n,o,u){var l="js";if(h(e)){var c=e;e=a(c,"key"),i=a(c,"url"),u=a(c,"xhrSettings"),l=a(c,"extension",l),n=a(c,"start"),o=a(c,"mapping")}var f={type:"plugin",cache:!1,extension:l,responseType:"text",key:e,url:i,xhrSettings:u,config:{start:n,mapping:o}};s.call(this,t,f),"function"==typeof i&&(this.data=i,this.state=r.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=a(e,"start",!1),n=a(e,"mapping",null);if(this.state===r.FILE_POPULATED)t.install(this.key,this.data,i,n);else{this.state=r.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var s=t.install(this.key,window[this.key],i,n);(i||n)&&(this.loader.systems[n]=s,this.loader.scene[n]=s)}this.onProcessComplete()}});o.register("plugin",(function(t,e,i,n,r){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new u(this,t[s]));else this.addFile(new u(this,t,e,i,n,r));return this})),t.exports=u},function(t,e,i){ 5993/** 5994 * @author Richard Davey <[email protected]> 5995 * @copyright 2020 Photon Storm Ltd. 5996 * @license {@link https://opensource.org/licenses/MIT|MIT License} 5997 */ 5998var n=i(0),r=i(20),s=i(23),o=i(8),a=i(2),h=i(7),u=new n({Extends:s,initialize:function(t,e,i,n){var r="js";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),r=a(o,"extension",r)}var u={type:"text",extension:r,responseType:"text",key:e,url:i,xhrSettings:n};s.call(this,t,u)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLo
vendor: 8,389 bytes, lines 5998-6046
5998ader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.concat("(function(){\nreturn new "+this.key+"();\n}).call(this);"),e=eval;this.loader.sceneManager.add(this.key,e(t)),this.complete=!0}});o.register("sceneFile",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new u(this,t[n]));else this.addFile(new u(this,t,e,i));return this})),t.exports=u},function(t,e,i){ 5999/** 6000 * @author Richard Davey <[email protected]> 6001 * @copyright 2020 Photon Storm Ltd. 6002 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6003 */ 6004var n=i(0),r=i(20),s=i(23),o=i(8),a=i(2),h=i(7),u=new n({Extends:s,initialize:function(t,e,i,n,o,u){var l="js";if(h(e)){var c=e;e=a(c,"key"),i=a(c,"url"),u=a(c,"xhrSettings"),l=a(c,"extension",l),n=a(c,"systemKey"),o=a(c,"sceneKey")}var f={type:"scenePlugin",cache:!1,extension:l,responseType:"text",key:e,url:i,xhrSettings:u,config:{systemKey:n,sceneKey:o}};s.call(this,t,f),"function"==typeof i&&(this.data=i,this.state=r.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=this.key,n=a(e,"systemKey",i),s=a(e,"sceneKey",i);this.state===r.FILE_POPULATED?t.installScenePlugin(n,this.data,s,this.loader.scene,!0):(this.state=r.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),t.installScenePlugin(n,window[this.key],s,this.loader.scene,!0)),this.onProcessComplete()}});o.register("scenePlugin",(function(t,e,i,n,r){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new u(this,t[s]));else this.addFile(new u(this,t,e,i,n,r));return this})),t.exports=u},function(t,e,i){ 6005/** 6006 * @author Richard Davey <[email protected]> 6007 * @copyright 2020 Photon Storm Ltd. 6008 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6009 */ 6010var n=i(0),r=i(8),s=i(70),o=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,r,n),this.type="spritesheet"},addToCache:function(){var t=this.cache.addSpriteSheet(this.key,this.data,this.config);this.pendingDestroy(t)}});r.register("spritesheet",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new o(this,t[r]));else this.addFile(new o(this,t,e,i,n));return this})),t.exports=o},function(t,e,i){ 6011/** 6012 * @author Richard Davey <[email protected]> 6013 * @copyright 2020 Photon Storm Ltd. 6014 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6015 */ 6016var n=i(0),r=i(20),s=i(23),o=i(8),a=i(2),h=i(7),u=new n({Extends:s,initialize:function(t,e,i,n,r){var o="svg";if(h(e)){var u=e;e=a(u,"key"),i=a(u,"url"),n=a(u,"svgConfig",{}),r=a(u,"xhrSettings"),o=a(u,"extension",o)}var l={type:"svg",cache:t.textureManager,extension:o,responseType:"text",key:e,url:i,xhrSettings:r,config:{width:a(n,"width"),height:a(n,"height"),scale:a(n,"scale")}};s.call(this,t,l)},onProcess:function(){this.state=r.FILE_PROCESSING;var t=this.xhrLoader.responseText,e=[t],i=this.config.width,n=this.config.height,o=this.config.scale;t:if(i&&n||o){var a=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("svg")[0],h=a.hasAttribute("viewBox"),u=parseFloat(a.getAttribute("width")),l=parseFloat(a.getAttribute("height"));if(!h&&u&&l)a.setAttribute("viewBox","0 0 "+u+" "+l);else if(h&&!u&&!l){var c=a.getAttribute("viewBox").split(/\s+|,/);u=c[2],l=c[3]}if(o){if(!u||!l)break t;i=u*o,n=l*o}a.setAttribute("width",i.toString()+"px"),a.setAttribute("height",n.toString()+"px"),e=[(new XMLSerializer).serializeToString(a)]}try{var f=new window.Blob(e,{type:"image/svg+xml;charset=utf-8"})}catch(lC){return void this.onProcessError()}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var d=this,p=!1;this.data.onload=function(){p||s.revokeObjectURL(d.data),d.onProcessComplete()},this.data.onerror=function(){p?d.onProcessError():(p=!0,s.revokeObjectURL(d.data),d.data.src="data:image/svg+xml,"+encodeURIComponent(e.join("")))},s.createObjectURL(this.data,f,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});o.register("svg",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new u(this,t[r]));else this.addFile(new u(this,t,e,i,n));return this})),t.exports=u},function(t,e,i){ 6017/** 6018 * @author Richard Davey <[email protected]> 6019 * @copyright 2020 Photon Storm Ltd. 6020 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6021 */ 6022var n=i(0),r=i(20),s=i(23),o=i(8),a=i(2),h=i(7),u=i(39),l=new n({Extends:s,initialize:function(t,e,i,n){var r="csv";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),r=a(o,"extension",r)}var l={type:"tilemapCSV",cache:t.cacheManager.tilemap,extension:r,responseType:"text",key:e,url:i,xhrSettings:n};s.call(this,t,l),this.tilemapFormat=u.CSV},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,t),this.pendingDestroy(t)}});o.register("tilemapCSV",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new l(this,t[n]));else this.addFile(new l(this,t,e,i));return this})),t.exports=l},function(t,e,i){ 6023/** 6024 * @author Richard Davey <[email protected]> 6025 * @copyright 2020 Photon Storm Ltd. 6026 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6027 */ 6028var n=i(0),r=i(8),s=i(59),o=i(39),a=new n({Extends:s,initialize:function(t,e,i,n){s.call(this,t,e,i,n),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.WELTMEISTER,data:this.data};this.cache.add(this.key,t),this.pendingDestroy(t)}});r.register("tilemapImpact",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new a(this,t[n]));else this.addFile(new a(this,t,e,i));return this})),t.exports=a},function(t,e,i){ 6029/** 6030 * @author Richard Davey <[email protected]> 6031 * @copyright 2020 Photon Storm Ltd. 6032 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6033 */ 6034var n=i(0),r=i(8),s=i(59),o=i(39),a=new n({Extends:s,initialize:function(t,e,i,n){s.call(this,t,e,i,n),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.TILED_JSON,data:this.data};this.cache.add(this.key,t),this.pendingDestroy(t)}});r.register("tilemapTiledJSON",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new a(this,t[n]));else this.addFile(new a(this,t,e,i));return this})),t.exports=a},function(t,e,i){ 6035/** 6036 * @author Richard Davey <[email protected]> 6037 * @copyright 2020 Photon Storm Ltd. 6038 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6039 */ 6040var n=i(0),r=i(8),s=i(2),o=i(70),a=i(7),h=i(47),u=i(239),l=new n({Extends:h,initialize:function(t,e,i,n,r,l){var c,f;if(a(e)){var d=e;e=s(d,"key"),c=new o(t,{key:e,url:s(d,"textureURL"),extension:s(d,"textureExtension","png"),normalMap:s(d,"normalMap"),xhrSettings:s(d,"textureXhrSettings")}),f=new u(t,{key:e,url:s(d,"atlasURL"),extension:s(d,"atlasExtension","txt"),xhrSettings:s(d,"atlasXhrSettings")})}else c=new o(t,e,i,r),f=new u(t,e,n,l);c.linkFile?h.call(this,t,"unityatlas",e,[c,f,c.linkFile]):h.call(this,t,"unityatlas",e,[c,f])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(t.key,t.data,e.data,i),e.pendingDestroy(),this.complete=!0}}});r.register("unityAtlas",(function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new l(this,t[o]),this.addFile(s.files);else s=new l(this,t,e,i,n,r),this.addFile(s.files);return this})),t.exports=l},function(t,e,i){ 6041/** 6042 * @author Richard Davey <[email protected]> 6043 * @copyright 2020 Photon Storm Ltd. 6044 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6045 */ 6046var n=i(0),r=i(20),s=i(23),o=i(8),a=i(153),h=i(2),u=i(7),l=new n({Extends:s,initialize:function(t,e,
6046i,n,r,o,a){void 0===n&&(n="loadeddata"),void 0===r&&(r=!1),void 0===o&&(o=!1),"loadeddata"!==n&&"canplay"!==n&&"canplaythrough"!==n&&(n="loadeddata");var h={type:"video",cache:t.cacheManager.video,extension:i.type,responseType:"blob",key:e,url:i.url,xhrSettings:a,config:{loadEvent:n,asBlob:r,noAudio:o}};this.onLoadCallback=this.onVideoLoadHandler.bind(this),this.onErrorCallback=this.onVideoErrorHandler.bind(this),s.call(this,t,h)},onProcess:function(){if(this.state=r.FILE_PROCESSING,this.config.asBlob){var t=this.createVideoElement();this.data=t;var e=this;this.data.onloadeddata=function(){e.onProcessComplete()},this.data.onerror=function(){s.revokeObjectURL(e.data),e.onProcessError()},s.createObjectURL(t,this.xhrLoader.response,""),t.load()}else this.onProcessComplete()},createVideoElement:function(){var t=document.createElement("video");return t.controls=!1,t.crossOrigin=this.loader.crossOrigin,this.config.noAudio&&(t.muted=!0,t.defaultMuted=!0,t.setAttribute("autoplay","autoplay")),t.setAttribute("playsinline","playsinline"),t.setAttribute("preload","auto"),t},onVideoLoadHandler:function(t){var e=t.target;e.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),e.removeEventListener("error",this.onErrorCallback,!0),this.data=e,this.resetXHR(),this.loader.nextFile(this,!0)},onVideoErrorHandler:function(t){var e=t.target;e&&(e.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),e.removeEventListener("error",this.onErrorCallback,!0)),this.resetXHR(),this.loader.nextFile(this,!1)},load:function(){var t=this.config.loadEvent;if(this.config.asBlob)s.prototype.load.call(this);else{this.percentComplete=0;var e=this.createVideoElement();e.addEventListener(t,this.onLoadCallback,!0),e.addEventListener("error",this.onErrorCallback,!0),e.src=a(this,this.loader.baseURL),e.load()}}});l.create=function(t,e,i,n,r,s,o){var a=t.systems.game;u(e)&&(i=h(e,"url",[]),n=h(e,"loadEvent","loadeddata"),r=h(e,"asBlob",!1),s=h(e,"noAudio",!1),o=h(e,"xhrSettings"));var c=l.getVideoURL(a,i);if(c)return new l(t,e,c,n,r,s,o)},l.getVideoURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++){var n,r=h(e[i],"url",e[i]);if(0===r.indexOf("blob:"))return{url:r,type:""};if(n=0===r.indexOf("data:")?r.split(",")[0].match(/\/(.*?);/):r.match(/\.([a-zA-Z0-9]+)($|\?)/),n=h(e[i],"type",n?n[1]:"").toLowerCase(),t.device.video[n])return{url:r,type:n}}return null},o.register("video",(function(t,e,i,n,r,s){var o;if(Array.isArray(t))for(var a=0;a<t.length;a++)(o=l.create(this,t[a]))&&this.addFile(o);else(o=l.create(this,t,e,i,n,r,s))&&this.addFile(o);return this})),t.exports=l},function(t,e,i){ 6047/** 6048 * @author Richard Davey <[email protected]> 6049 * @copyright 2020 Photon Storm Ltd. 6050 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6051 */ 6052var n=i(0),r=i(20),s=i(148),o=i(9),a=i(91),h=i(8),u=i(2),l=i(24),c=i(21),f=i(154),d=new n({Extends:o,initialize:function(t){o.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,this.sceneManager=t.sys.game.scene,h.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(u(i,"baseURL",e.loaderBaseURL)),this.setPath(u(i,"path",e.loaderPath)),this.setPrefix(u(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=u(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=f(u(i,"responseType",e.loaderResponseType),u(i,"async",e.loaderAsync),u(i,"user",e.loaderUser),u(i,"password",e.loaderPassword),u(i,"timeout",e.loaderTimeout),u(i,"withCredentials",e.loaderWithCredentials)),this.crossOrigin=u(i,"crossOrigin",e.loaderCrossOrigin),this.totalToLoad=0,this.progress=0,this.list=new s,this.inflight=new s,this.queue=new s,this._deleteQueue=new s,this.totalFailed=0,this.totalComplete=0,this.state=r.LOADER_IDLE,this.multiKeyIndex=0,t.sys.events.once(c.BOOT,this.boot,this),t.sys.events.on(c.START,this.pluginStart,this)},boot:function(){this.systems.events.once(c.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(c.SHUTDOWN,this.shutdown,this)},setBaseURL:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return void 0===t&&(t=""),this.prefix=t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];
vendor: 18,200 bytes, lines 6052-6124
6052this.keyExists(i)||(this.list.set(i),this.emit(a.ADD,i.key,i.type,this,i),this.isLoading()&&(this.totalToLoad++,this.updateProgress()))}},keyExists:function(t){var e=t.hasCacheConflict();return e||this.list.iterate((function(i){if(i.type===t.type&&i.key===t.key)return e=!0,!1})),!e&&this.isLoading()&&(this.inflight.iterate((function(i){if(i.type===t.type&&i.key===t.key)return e=!0,!1})),this.queue.iterate((function(i){if(i.type===t.type&&i.key===t.key)return e=!0,!1}))),e},addPack:function(t,e){e&&t.hasOwnProperty(e)&&(t={packKey:t[e]});var i=0,n=this.baseURL,r=this.path,s=this.prefix;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var a=t[o],h=u(a,"baseURL",n),l=u(a,"path",r),c=u(a,"prefix",s),f=u(a,"files",null),d=u(a,"defaultType","void");if(Array.isArray(f)){this.setBaseURL(h),this.setPath(l),this.setPrefix(c);for(var p=0;p<f.length;p++){var v=f[p],g=v.hasOwnProperty("type")?v.type:d;this[g]&&(this[g](v),i++)}}}return this.setBaseURL(n),this.setPath(r),this.setPrefix(s),i>0},isLoading:function(){return this.state===r.LOADER_LOADING||this.state===r.LOADER_PROCESSING},isReady:function(){return this.state===r.LOADER_IDLE||this.state===r.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(a.START,this),0===this.list.size?this.loadComplete():(this.state=r.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(c.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(a.PROGRESS,this.progress)},update:function(){this.state===r.LOADER_LOADING&&this.list.size>0&&this.inflight.size<this.maxParallelDownloads&&this.checkLoadQueue()},checkLoadQueue:function(){this.list.each((function(t){if((t.state===r.FILE_POPULATED||t.state===r.FILE_PENDING&&this.inflight.size<this.maxParallelDownloads)&&(this.inflight.set(t),this.list.delete(t),t.crossOrigin||(t.crossOrigin=this.crossOrigin),t.load()),this.inflight.size===this.maxParallelDownloads)return!1}),this)},nextFile:function(t,e){this.inflight&&(this.inflight.delete(t),this.updateProgress(),e?(this.totalComplete++,this.queue.set(t),this.emit(a.FILE_LOAD,t),t.onProcess()):(this.totalFailed++,this._deleteQueue.set(t),this.emit(a.FILE_LOAD_ERROR,t),this.fileProcessComplete(t)))},fileProcessComplete:function(t){this.scene&&this.systems&&this.systems.game&&!this.systems.game.pendingDestroy&&(t.state===r.FILE_ERRORED?t.multiFile&&t.multiFile.onFileFailed(t):t.state===r.FILE_COMPLETE&&(t.multiFile?t.multiFile.isReadyToProcess()&&t.multiFile.addToCache():t.addToCache()),this.queue.delete(t),0===this.list.size&&0===this.inflight.size&&0===this.queue.size&&this.loadComplete())},loadComplete:function(){this.emit(a.POST_PROCESS,this),this.list.clear(),this.inflight.clear(),this.queue.clear(),this.progress=1,this.state=r.LOADER_COMPLETE,this.systems.events.off(c.UPDATE,this.update,this),this._deleteQueue.iterateLocal("destroy"),this._deleteQueue.clear(),this.emit(a.COMPLETE,this,this.totalComplete,this.totalFailed)},flagForRemoval:function(t){this._deleteQueue.set(t)},saveJSON:function(t,e){return this.save(JSON.stringify(t),e)},save:function(t,e,i){void 0===e&&(e="file.json"),void 0===i&&(i="application/json");var n=new Blob([t],{type:i}),r=URL.createObjectURL(n),s=document.createElement("a");return s.download=e,s.textContent="Download "+e,s.href=r,s.click(),this},reset:function(){this.list.clear(),this.inflight.clear(),this.queue.clear();var t=this.systems.game.config,e=this.systems.settings.loader;this.setBaseURL(u(e,"baseURL",t.loaderBaseURL)),this.setPath(u(e,"path",t.loaderPath)),this.setPrefix(u(e,"prefix",t.loaderPrefix)),this.state=r.LOADER_IDLE},shutdown:function(){this.reset(),this.state=r.LOADER_SHUTDOWN,this.systems.events.off(c.UPDATE,this.update,this),this.systems.events.off(c.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.state=r.LOADER_DESTROYED,this.systems.events.off(c.UPDATE,this.update,this),this.systems.events.off(c.START,this.pluginStart,this),this.list=null,this.inflight=null,this.queue=null,this.scene=null,this.systems=null,this.textureManager=null,this.cacheManager=null,this.sceneManager=null}});l.register("Loader",d,"load"),t.exports=d},function(t,e,i){ 6053/** 6054 * @author Richard Davey <[email protected]> 6055 * @copyright 2020 Photon Storm Ltd. 6056 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6057 */ 6058var n=i(60),r=i(17),s={ArcadePhysics:i(1361),Body:i(521),Collider:i(522),Components:i(240),Events:i(242),Factory:i(515),GetOverlapX:i(243),GetOverlapY:i(244),SeparateX:i(531),SeparateY:i(532),Group:i(518),Image:i(516),Sprite:i(155),StaticBody:i(533),StaticGroup:i(519),Tilemap:i(1385),World:i(520)};s=r(!1,s,n),t.exports=s},function(t,e,i){ 6059/** 6060 * @author Richard Davey <[email protected]> 6061 * @copyright 2020 Photon Storm Ltd. 6062 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6063 */ 6064var n=i(0),r=i(35),s=i(48),o=i(347),a=i(515),h=i(2),u=i(143),l=i(517),c=i(241),f=i(24),d=i(21),p=i(3),v=i(520),g=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,t.sys.events.once(d.BOOT,this.boot,this),t.sys.events.on(d.START,this.start,this)},boot:function(){this.world=new v(this.scene,this.config),this.add=new a(this.world),this.systems.events.once(d.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new v(this.scene,this.config),this.add=new a(this.world));var t=this.systems.events;h(this.config,"customUpdate",!1)||t.on(d.UPDATE,this.world.update,this.world),t.on(d.POST_UPDATE,this.world.postUpdate,this.world),t.once(d.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(d.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(d.UPDATE,this.world.update,this.world)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return u(h(e,"arcade",{}),h(t,"arcade",{}))},overlap:function(t,e,i,n,r){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=i),this.world.collideObjects(t,e,i,n,r,!0)},collide:function(t,e,i,n,r){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=i),this.world.collideObjects(t,e,i,n,r,!1)},collideTiles:function(t,e,i,n,r){return this.world.collideTiles(t,e,i,n,r)},overlapTiles:function(t,e,i,n,r){return this.world.overlapTiles(t,e,i,n,r)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(t,e,i,n,r,s){void 0===n&&(n=60);var o=Math.atan2(i-t.y,e-t.x);return t.body.acceleration.setToPolar(o,n),void 0!==r&&void 0!==s&&t.body.maxVelocity.set(r,s),o},accelerateToObject:function(t,e,i,n,r){return this.accelerateTo(t,e.x,e.y,i,n,r)},closest:function(t,e){e||(e=this.world.bodies.entries);for(var i=Number.MAX_VALUE,n=null,r=t.x,s=t.y,a=e.length,h=0;h<a;h++){var u=e[h],l=u.body||u;if(t!==u&&t!==l&&t!==l.gameObject&&t!==l.center){var c=o(r,s,l.center.x,l.center.y);c<i&&(n=u,i=c)}}return n},furthest:function(t,e){e||(e=this.world.bodies.entries);for(var i=-1,n=null,r=t.x,s=t.y,a=e.length,h=0;h<a;h++){var u=e[h],l=u.body||u;if(t!==u&&t!==l&&t!==l.gameObject&&t!==l.center){var c=o(r,s,l.center.x,l.center.y);c>i&&(n=u,i=c)}}return n},moveTo:function(t,e,i,n,r){void 0===n&&(n=60),void 0===r&&(r=0);var o=Math.atan2(i-t.y,e-t.x);return r>0&&(n=s(t.x,t.y,e,i)/(r/1e3)),t.body.velocity.setToPolar(o,n),o},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(r(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(t,e)},overlapRect:function(t,e,i,n,r,s){return c(this.world,t,e,i,n,r,s)},overlapCirc:function(t,e,i,n,r){return l(this.world,t,e,i,n,r)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(d.UPDATE,this.world.update,this.world),t.off(d.POST_UPDATE,this.world.postUpdate,this.world),t.off(d.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(d.START,this.start,this),this.scene=null,this.systems=null}});f.register("ArcadePhysics",g,"arcadePhysics"),t.exports=g},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i){return this.body.setCollideWorldBounds(t,e,i),this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},function(t,e){t.exports={enableBody:function(t,e,i,n,r){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),r&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}}},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){t.exports={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}}},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setPushable:function(t){return void 0===t&&(t=!0),this.body.pushable=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setBodySize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},function(t,e){ 6065/** 6066 * @author Richard Davey <[email protected]> 6067 * @copyright 2020 Photon Storm Ltd. 6068 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6069 */ 6070t.exports="collide"},function(t,e){ 6071/** 6072 * @author Richard Davey <[email protected]> 6073 * @copyright 2020 Photon Storm Ltd. 6074 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6075 */ 6076t.exports="overlap"},function(t,e){ 6077/** 6078 * @author Richard Davey <[email protected]> 6079 * @copyright 2020 Photon Storm Ltd. 6080 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6081 */ 6082t.exports="pause"},function(t,e){ 6083/** 6084 * @author Richard Davey <[email protected]> 6085 * @copyright 2020 Photon Storm Ltd. 6086 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6087 */ 6088t.exports="resume"},function(t,e){ 6089/** 6090 * @author Richard Davey <[email protected]> 6091 * @copyright 2020 Photon Storm Ltd. 6092 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6093 */ 6094t.exports="tilecollide"},function(t,e){ 6095/** 6096 * @author Richard Davey <[email protected]> 6097 * @copyright 2020 Photon Storm Ltd. 6098 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6099 */ 6100t.exports="tileoverlap"},function(t,e){ 6101/** 6102 * @author Richard Davey <[email protected]> 6103 * @copyright 2020 Photon Storm Ltd. 6104 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6105 */ 6106t.exports="worldbounds"},function(t,e){ 6107/** 6108 * @author Richard Davey <[email protected]> 6109 * @copyright 2020 Photon Storm Ltd. 6110 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6111 */ 6112t.exports="worldstep"},function(t,e){ 6113/** 6114 * @author Richard Davey <[email protected]> 6115 * @copyright 2020 Photon Storm Ltd. 6116 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6117 */ 6118var i,n,r,s,o,a,h,u,l,c,f,d,p,v,g,m,y,x=function(){return c&&g&&n.blocked.right?(i.processX(-y,h,!1,!0),1):l&&m&&n.blocked.left?(i.processX(y,h,!0),1):p&&m&&i.blocked.right?(n.processX(-y,u,!1,!0),2):d&&g&&i.blocked.left?(n.processX(y,u,!0),2):0},w=function(t){if(r&&s)y*=.5,0===t||3===t?(i.processX(y,o),n.processX(-y,a)):(i.processX(-y,o),n.processX(y,a));else if(r&&!s)0===t||3===t?i.processX(y,h,!0):i.processX(-y,h,!1,!0);else if(!r&&s)0===t||3===t?n.processX(-y,u,!1,!0):n.processX(y,u,!0);else{var e=.5*y;0===t?v?(i.processX(y,0,!0),n.processX(0,null,!1,!0)):p?(i.processX(e,0,!0),n.processX(-e,0,!1,!0)):(i.processX(e,n.velocity.x,!0),n.processX(-e,null,!1,!0)):1===t?f?(i.processX(0,null,!1,!0),n.processX(y,0,!0)):c?(i.processX(-e,0,!1,!0),n.processX(e,0,!0)):(i.processX(-e,null,!1,!0),n.processX(e,i.velocity.x,!0)):2===t?v?(i.processX(-y,0,!1,!0),n.processX(0,null,!0)):d?(i.processX(-e,0,!1,!0),n.processX(e,0,!0)):(i.processX(-e,n.velocity.x,!1,!0),n.processX(e,null,!0)):3===t&&(f?(i.processX(0,null,!0),n.processX(-y,0,!1,!0)):l?(i.processX(e,0,!0),n.processX(-e,0,!1,!0)):(i.processX(e,n.velocity.y,!0),n.processX(-e,null,!1,!0)))}return!0};t.exports={BlockCheck:x,Check:function(){var t=i.velocity.x,e=n.velocity.x,r=Math.sqrt(e*e*n.mass/i.mass)*(e>0?1:-1),s=Math.sqrt(t*t*i.mass/n.mass)*(t>0?1:-1),h=.5*(r+s);return s-=h,o=h+(r-=h)*i.bounce.x,a=h+s*n.bounce.x,l&&m?w(0):d&&g?w(1):c&&g?w(2):!(!p||!m)&&w(3)},Set:function(t,e,o){n=e;var a=(i=t).velocity.x,w=n.velocity.x;return r=i.pushable,l=i._dx<0,c=i._dx>0,f=0===i._dx,g=Math.abs(i.right-n.x)<=Math.abs(n.right-i.x),h=w-a*i.bounce.x,s=n.pushable,d=n._dx<0,p=n._dx>0,v=0===n._dx,m=!g,u=a-w*n.bounce.x,y=Math.abs(o),x()},Run:w,RunImmovableBody1:function(t){1===t?n.velocity.x=0:g?n.processX(y,u,!0):n.processX(-y,u,!1,!0),i.moves&&(n.y+=(i.y-i.prev.y)*i.friction.y,n._dy=n.y-n.prev.y)},RunImmovableBody2:function(t){2===t&&(i.velocity.x=0),m?i.processX(y,h,!0):i.processX(-y,h,!1,!0),n.moves&&(i.y+=(n.y-n.prev.y)*n.friction.y,i._dy=i.y-i.prev.y)}}},function(t,e){ 6119/** 6120 * @author Richard Davey <[email protected]> 6121 * @copyright 2020 Photon Storm Ltd. 6122 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6123 */ 6124var i,n,r,s,o,a,h,u,l,c,f,d,p,v,g,m,y,x=function(){return c&&g&&n.blocked.down?(i.processY(-y,h,!1,!0),1):l&&m&&n.blocked.up?(i.processY(y,h,!0),1):p&&m&&i.blocked.down?(n.processY(-y,u,!1,!0),2):d&&g&&i.blocked.up?(n.processY(y,u,!0),2):0},w=function(t){if(r&&s)y*=.5,0===t||3===t?(i.processY(y,o),n.processY(-y,a)):(i.processY(-y,o),n.processY(y,a));else if(r&&!s)0===t||3===t?i.processY(y,h,!0):i.processY(-y,h,!1,!0);else if(!r&&s)0===t||3===t?n.processY(-y,u,!1,!0):n.processY(y,u,!0);else{var e=.5*y;0===t?v?(i.processY(y,0,!0),n.processY(0,null,!1,!0)):p?(i.processY(e,0,!0),n.processY(-e,0,!1,!0)):(i.processY(e,n.velocity.y,!0),n.processY(-e,null,!1,!0)):1===t?f?(i.processY(0,null,!1,!0),n.processY(y,0,!0)):c?(i.processY(-e,0,!1,!0),n.processY(e,0,!0)):(i.processY(-e,null,!1,!0),n.processY(e,i.velocity.y,!0)):2===t?v?(i.processY(-y,0,!1,!0),n.processY(0,null,!0)):d?(i.processY(-e,0,!1,!0),n.processY(e,0,!0)):(i.processY(-e,n.velocity.y,!1,!0),n.processY(e,null,!0)):3===t&&(f?(i.processY(0,null,!0),n.processY(-y,0,!1,!0)):l?(i.processY(e,0,!0),n.processY(-e,0,!1,!0)):(i.processY(e,n.velocity.y,!0),n.processY(-e,null,!1,!0)))}return!0};t.exports={BlockCheck:x,Check:function(){var t=i.velocity.y,e=n.velocity.y,r=Math.sqrt(e*e*n.mass/i.mass)*(e>0?1:-1),s=Math.sqrt(t*t*i.mass/n.mass)*(t>0?1:-1),h=.5*(r+s);return s-=h,o=h+(r-=h)*i.bounce.y,a=h+s*n.bounce.y,l&&m?w(0):d&&g?w(1):c&&g?w(2):!(!p||!m)&&w(3)},Set:function(t,e,o){n=e;var a=(i=t).velocity.y,w=n.velocity.y;return r=i.pushable,l=i._dy<0,c=i._dy>0,f=0===i._dy,g=Math.abs(i.bottom-n.y)<=Math.abs(n.bottom-i.y),h=w-a*i.bounce.y,s=n.pushable,d=n._dy<0,p=n._dy>0,v=0===n._dy,m=!g,u=a-w*n.bounce.y,y=Math.abs(o),x()},Run:w,RunImmovableBody1:function(t){1===t?n.velocity.y=0:g?n.processY(y,u,!0):n.processY(-y,u,!1,!0),i.moves&&(n.x+=(i.x-i.prev.x)*i.friction.x,n._dx=n.x-n.prev.x)},RunImmovableBody2:function(t){2===t?i.velocity.y=0:m?i.processY(y,h,!0):i.processY(-y,h,!1,!0),n.moves&&(i.x+=(n.x-n.prev.x)*n.friction.x,i._dx=i.x-i.prev.x)}}}
vendor: 9,020 bytes, lines 6124-6150
6124,function(t,e,i){ 6125/** 6126 * @author Richard Davey <[email protected]> 6127 * @copyright 2020 Photon Storm Ltd. 6128 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6129 */ 6130var n={ProcessTileCallbacks:i(524),ProcessTileSeparationX:i(528),ProcessTileSeparationY:i(530),SeparateTile:i(526),TileCheckX:i(527),TileCheckY:i(529),TileIntersectsBody:i(245)};t.exports=n},function(t,e,i){ 6131/** 6132 * @author Joachim Grill <[email protected]> 6133 * @author Richard Davey <[email protected]> 6134 * @copyright 2018 CodeAndWeb GmbH 6135 * @copyright 2020 Photon Storm Ltd. 6136 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6137 */ 6138var n=i(126),r=i(71),s=i(50),o=i(2),a=i(94),h={parseBody:function(t,e,i,n){void 0===n&&(n={});for(var a=o(i,"fixtures",[]),h=[],u=0;u<a.length;u++)for(var l=this.parseFixture(a[u]),c=0;c<l.length;c++)h.push(l[c]);var f=s.clone(i,!0);s.extend(f,n,!0),delete f.fixtures,delete f.type;var d=r.create(f);return r.setParts(d,h),r.setPosition(d,{x:t,y:e}),d},parseFixture:function(t){var e,i=s.extend({},!1,t);if(delete i.circle,delete i.vertices,t.circle){var r=o(t.circle,"x"),a=o(t.circle,"y"),h=o(t.circle,"radius");e=[n.circle(r,a,h,i)]}else t.vertices&&(e=this.parseVertices(t.vertices,i));return e},parseVertices:function(t,e){void 0===e&&(e={});for(var i=[],o=0;o<t.length;o++)a.clockwiseSort(t[o]),i.push(r.create(s.extend({position:a.centre(t[o]),vertices:t[o]},e)));return n.flagCoincidentParts(i)}};t.exports=h},function(t,e,i){ 6139/** 6140 * @author Richard Davey <[email protected]> 6141 * @copyright 2020 Photon Storm Ltd. 6142 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6143 */ 6144var n=i(126),r=i(71),s={parseBody:function(t,e,i,s){var o;void 0===s&&(s={});var a=i.vertices;if(1===a.length)s.vertices=a[0],o=r.create(s),n.flagCoincidentParts(o.parts);else{for(var h=[],u=0;u<a.length;u++){var l=r.create({vertices:a[u]});h.push(l)}n.flagCoincidentParts(h),s.parts=h,o=r.create(s)}return o.label=i.label,r.setPosition(o,{x:t,y:e}),o}};t.exports=s},function(t,e,i){var n={};t.exports=n;var r=i(163),s=i(246),o=i(50),a=i(71),h=i(126);n.stack=function(t,e,i,n,s,o,h){for(var u,l=r.create({label:"Stack"}),c=t,f=e,d=0,p=0;p<n;p++){for(var v=0,g=0;g<i;g++){var m=h(c,f,g,p,u,d);if(m){var y=m.bounds.max.y-m.bounds.min.y,x=m.bounds.max.x-m.bounds.min.x;y>v&&(v=y),a.translate(m,{x:.5*x,y:.5*y}),c=m.bounds.max.x+s,r.addBody(l,m),u=m,d+=1}else c+=s}f+=v+o,c=t}return l},n.chain=function(t,e,i,n,a,h){for(var u=t.bodies,l=1;l<u.length;l++){var c=u[l-1],f=u[l],d=c.bounds.max.y-c.bounds.min.y,p=c.bounds.max.x-c.bounds.min.x,v=f.bounds.max.y-f.bounds.min.y,g={bodyA:c,pointA:{x:p*e,y:d*i},bodyB:f,pointB:{x:(f.bounds.max.x-f.bounds.min.x)*n,y:v*a}},m=o.extend(g,h);r.addConstraint(t,s.create(m))}return t.label+=" Chain",t},n.mesh=function(t,e,i,n,a){var h,u,l,c,f,d=t.bodies;for(h=0;h<i;h++){for(u=1;u<e;u++)l=d[u-1+h*e],c=d[u+h*e],r.addConstraint(t,s.create(o.extend({bodyA:l,bodyB:c},a)));if(h>0)for(u=0;u<e;u++)l=d[u+(h-1)*e],c=d[u+h*e],r.addConstraint(t,s.create(o.extend({bodyA:l,bodyB:c},a))),n&&u>0&&(f=d[u-1+(h-1)*e],r.addConstraint(t,s.create(o.extend({bodyA:f,bodyB:c},a)))),n&&u<e-1&&(f=d[u+1+(h-1)*e],r.addConstraint(t,s.create(o.extend({bodyA:f,bodyB:c},a))))}return t.label+=" Mesh",t},n.pyramid=function(t,e,i,r,s,o,h){return n.stack(t,e,i,r,s,o,(function(e,n,o,u,l,c){var f=Math.min(r,Math.ceil(i/2)),d=l?l.bounds.max.x-l.bounds.min.x:0;if(!(u>f||o<(u=f-u)||o>i-1-u))return 1===c&&a.translate(l,{x:(o+(i%2==1?1:-1))*d,y:0}),h(t+(l?o*d:0)+o*s,n,o,u,l,c)}))},n.newtonsCradle=function(t,e,i,n,o){for(var a=r.create({label:"Newtons Cradle"}),u=0;u<i;u++){var l=h.circle(t+u*(1.9*n),e+o,n,{inertia:1/0,restitution:1,friction:0,frictionAir:1e-4,slop:1}),c=s.create({pointA:{x:t+u*(1.9*n),y:e},bodyB:l});r.addBody(a,l),r.addConstraint(a,c)}return a},n.car=function(t,e,i,n,o){var u=a.nextGroup(!0),l=.5*-i+20,c=.5*i-20,f=r.create({label:"Car"}),d=h.rectangle(t,e,i,n,{collisionFilter:{group:u},chamfer:{radius:.5*n},density:2e-4}),p=h.circle(t+l,e+0,o,{collisionFilter:{group:u},friction:.8}),v=h.circle(t+c,e+0,o,{collisionFilter:{group:u},friction:.8}),g=s.create({bodyB:d,pointB:{x:l,y:0},bodyA:p,stiffness:1,length:0}),m=s.create({bodyB:d,pointB:{x:c,y:0},bodyA:v,stiffness:1,length:0});return r.addBody(f,d),r.addBody(f,p),r.addBody(f,v),r.addConstraint(f,g),r.addConstraint(f,m),f},n.softBody=function(t,e,i,r,s,a,u,l,c,f){c=o.extend({inertia:1/0},c),f=o.extend({stiffness:.2,render:{type:"line",anchors:!1}},f);var d=n.stack(t,e,i,r,s,a,(function(t,e){return h.circle(t,e,l,c)}));return n.mesh(d,i,r,u,f),d.label="Soft Body",d}},function(t,e,i){var n={};t.exports=n,i(117);var r=i(50);n.pathToVertices=function(t,e){"undefined"==typeof window||"SVGPathSeg"in window||r.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var i,s,o,a,h,u,l,c,f,d,p,v=[],g=0,m=0,y=0;e=e||15;var x=function(t,e,i){var n=i%2==1&&i>1;if(!f||t!=f.x||e!=f.y){f&&n?(d=f.x,p=f.y):(d=0,p=0);var r={x:d+t,y:p+e};!n&&f||(f=r),v.push(r),m=d+t,y=p+e}},w=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":m=t.x,y=t.y;break;case"H":m=t.x;break;case"V":y=t.y}x(m,y,t.pathSegType)}};for(n._svgPathToAbsolute(t),o=t.getTotalLength(),u=[],i=0;i<t.pathSegList.numberOfItems;i+=1)u.push(t.pathSegList.getItem(i));for(l=u.concat();g<o;){if((h=u[t.getPathSegAtLength(g)])!=c){for(;l.length&&l[0]!=h;)w(l.shift());c=h}switch(h.pathSegTypeAsLetter.toUpperCase()){case"C":case"T":case"S":case"Q":case"A":a=t.getPointAtLength(g),x(a.x,a.y,0)}g+=e}for(i=0,s=l.length;i<s;++i)w(l[i]);return v},n._svgPathToAbsolute=function(t){for(var e,i,n,r,s,o,a=t.pathSegList,h=0,u=0,l=a.numberOfItems,c=0;c<l;++c){var f=a.getItem(c),d=f.pathSegTypeAsLetter;if(/[MLHVCSQTA]/.test(d))"x"in f&&(h=f.x),"y"in f&&(u=f.y);else switch("x1"in f&&(n=h+f.x1),"x2"in f&&(s=h+f.x2),"y1"in f&&(r=u+f.y1),"y2"in f&&(o=u+f.y2),"x"in f&&(h+=f.x),"y"in f&&(u+=f.y),d){case"m":a.replaceItem(t.createSVGPathSegMovetoAbs(h,u),c);break;case"l":a.replaceItem(t.createSVGPathSegLinetoAbs(h,u),c);break;case"h":a.replaceItem(t.createSVGPathSegLinetoHorizontalAbs(h),c);break;case"v":a.replaceItem(t.createSVGPathSegLinetoVerticalAbs(u),c);break;case"c":a.replaceItem(t.createSVGPathSegCurvetoCubicAbs(h,u,n,r,s,o),c);break;case"s":a.replaceItem(t.createSVGPathSegCurvetoCubicSmoothAbs(h,u,s,o),c);break;case"q":a.replaceItem(t.createSVGPathSegCurvetoQuadraticAbs(h,u,n,r),c);break;case"t":a.replaceItem(t.createSVGPathSegCurvetoQuadraticSmoothAbs(h,u),c);break;case"a":a.replaceItem(t.createSVGPathSegArcAbs(h,u,f.r1,f.r2,f.angle,f.largeArcFlag,f.sweepFlag),c);break;case"z":case"Z":h=e,u=i}"M"!=d&&"m"!=d||(e=h,i=u)}}},function(t,e,i){ 6145/** 6146 * @author Richard Davey <[email protected]> 6147 * @copyright 2020 Photon Storm Ltd. 6148 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6149 */ 6150var n=i(126),r=i(71),s=i(0),o=i(534),a=i(9),h=i(2),u=i(125),l=i(94),c=new s({Extends:a,Mixins:[o.Bounce,o.Collision,o.Friction,o.Gravity,o.Mass,o.Sensor,o.Sleep,o.Static],initialize:function(t,e,i){a.call(this),this.tile=e,this.world=t,e.physics.matterBody&&e.physics.matterBody.destroy(),e.physics.matterBody=this;var n=h(i,"body",null),r=h(i,"addToWorld",!0);if(n)this.setBody(n,r);else{var s=e.getCollisionGroup();h(s,"objects",[]).length>0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),u(t,"isStatic")||(t.isStatic=!0),u(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,r=e.y+e.height/2,s=n.rectangle(i,r,e.width,e.height,t);return this.setBody(s,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),u(t,"isStatic")||(t.isStatic=!0),u(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,s=this.tile.getLeft(),o=this.tile.getTop(),a=this.tile.getCollisionGroup(),c=h(a,"objects",[]),f=[],d=0;d<c.length;d++){var p=c[d],v=s+p.x*e,g=o+p.y*i,m=p.width*e,y=p.height*i,x=null;if(p.rectangle)x=n.rectangle(v+m/2,g+y/2,m,y,t);else if(p.ellipse)x=n.circle(v+m/2,g+y/2,m/2,t);else if(p.polygon||p.polyline){var w=(p.polygon?p.polygon:p.polyline).map((function(t){return{x:t.x*e,y:t.y*i}})),_=l.create(w),b=l.centre(_);v+=b.x,g+=b.y,x=n.fromVertices(v,g,_,t)}x&&f.push(x)}return 1===f.length?this.setBody(f[0],t.addToWorld):f.length>1&&(t.parts=f,this.setBody(r.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});t.exports=c}
6150,function(t,e,i){ 6151/** 6152 * @author Richard Davey <[email protected]> 6153 * @copyright 2020 Photon Storm Ltd. 6154 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6155 */ 6156var n=i(1493);n.Body=i(71),n.Composite=i(163),n.World=i(1393),n.Detector=i(587),n.Grid=i(1394),n.Pairs=i(1395),n.Pair=i(535),n.Query=i(1494),n.Resolver=i(1396),n.SAT=i(588),n.Constraint=i(246),n.Common=i(50),n.Engine=i(1495),n.Events=i(268),n.Sleeping=i(267),n.Plugin=i(1392),n.Bodies=i(126),n.Composites=i(1388),n.Axes=i(585),n.Bounds=i(117),n.Svg=i(1389),n.Vector=i(116),n.Vertices=i(94),n.World.add=n.Composite.add,n.World.remove=n.Composite.remove,n.World.addComposite=n.Composite.addComposite,n.World.addBody=n.Composite.addBody,n.World.addConstraint=n.Composite.addConstraint,n.World.clear=n.Composite.clear,t.exports=n},function(t,e,i){var n={};t.exports=n;var r=i(50);n._registry={},n.register=function(t){if(n.isPlugin(t)||r.warn("Plugin.register:",n.toString(t),"does not implement all required fields."),t.name in n._registry){var e=n._registry[t.name],i=n.versionParse(t.version).number,s=n.versionParse(e.version).number;i>s?(r.warn("Plugin.register:",n.toString(e),"was upgraded to",n.toString(t)),n._registry[t.name]=t):i<s?r.warn("Plugin.register:",n.toString(e),"can not be downgraded to",n.toString(t)):t!==e&&r.warn("Plugin.register:",n.toString(t),"is already registered to different plugin object")}else n._registry[t.name]=t;return t},n.resolve=function(t){return n._registry[n.dependencyParse(t).name]},n.toString=function(t){return"string"==typeof t?t:(t.name||"anonymous")+"@"+(t.version||t.range||"0.0.0")},n.isPlugin=function(t){return t&&t.name&&t.version&&t.install},n.isUsed=function(t,e){return t.used.indexOf(e)>-1},n.isFor=function(t,e){var i=t.for&&n.dependencyParse(t.for);return!t.for||e.name===i.name&&n.versionSatisfies(e.version,i.range)},n.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=n.dependencies(t),s=r.topologicalSort(i),o=[],a=0;a<s.length;a+=1)if(s[a]!==t.name){var h=n.resolve(s[a]);h?n.isUsed(t,h.name)||(n.isFor(h,t)||(r.warn("Plugin.use:",n.toString(h),"is for",h.for,"but installed on",n.toString(t)+"."),h._warned=!0),h.install?h.install(t):(r.warn("Plugin.use:",n.toString(h),"does not specify an install function."),h._warned=!0),h._warned?(o.push("ð¶ "+n.toString(h)),delete h._warned):o.push("â "+n.toString(h)),t.used.push(h.name)):o.push("â "+s[a])}o.length>0&&!h.silent&&r.info(o.join(" "))}else r.warn("Plugin.use:",n.toString(t),"does not specify any dependencies to install.")},n.dependencies=function(t,e){var i=n.dependencyParse(t),s=i.name;if(!(s in(e=e||{}))){t=n.resolve(t)||t,e[s]=r.map(t.uses||[],(function(e){n.isPlugin(e)&&n.register(e);var s=n.dependencyParse(e),o=n.resolve(e);return o&&!n.versionSatisfies(o.version,s.range)?(r.warn("Plugin.dependencies:",n.toString(o),"does not satisfy",n.toString(s),"used by",n.toString(i)+"."),o._warned=!0,t._warned=!0):o||(r.warn("Plugin.dependencies:",n.toString(e),"used by",n.toString(i),"could not be resolved."),t._warned=!0),s.name}));for(var o=0;o<e[s].length;o+=1)n.dependencies(e[s][o],e);return e}},n.dependencyParse=function(t){return r.isString(t)?(/^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-]+)?))?$/.test(t)||r.warn("Plugin.dependencyParse:",t,"is not a valid dependency string."),{name:t.split("@")[0],range:t.split("@")[1]||"*"}):{name:t.name,range:t.range||t.version}},n.versionParse=function(t){/^\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-]+)?$/.test(t)||r.warn("Plugin.versionParse:",t,"is not a valid version or range.");var e=t.split("-");t=e[0];var i=isNaN(Number(t[0])),n=i?t.substr(1):t,s=r.map(n.split("."),(function(t){return Number(t)}));return{isRange:i,version:n,range:t,operator:i?t[0]:"",parts:s,prerelease:e[1],number:1e8*s[0]+1e4*s[1]+s[2]}},n.versionSatisfies=function(t,e){e=e||"*";var i=n.versionParse(e),r=i.parts,s=n.versionParse(t),o=s.parts;if(i.isRange){if("*"===i.operator||"*"===t)return!0;if("~"===i.operator)return o[0]===r[0]&&o[1]===r[1]&&o[2]>=r[2];if("^"===i.operator)return r[0]>0?o[0]===r[0]&&s.number>=i.number:r[1]>0?o[1]===r[1]&&o[2]>=r[2]:o[2]===r[2]}return t===e||"*"===t}}
6156,function(t,e,i){var n={};t.exports=n;var r=i(163);i(246);var s=i(50);n.create=function(t){var e=r.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return s.extend(e,i,t)}},function(t,e,i){var n={};t.exports=n;var r=i(535),s=i(587),o=i(50);n.create=function(t){var e={controller:n,detector:s.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return o.extend(e,t)},n.update=function(t,e,i,r){var s,o,a,h,u,l=i.world,c=t.buckets,f=!1,d=i.metrics;for(d.broadphaseTests=0,s=0;s<e.length;s++){var p=e[s];if((!p.isSleeping||r)&&!(p.bounds.max.x<l.bounds.min.x||p.bounds.min.x>l.bounds.max.x||p.bounds.max.y<l.bounds.min.y||p.bounds.min.y>l.bounds.max.y)){var v=n._getRegion(t,p);if(!p.region||v.id!==p.region.id||r){d.broadphaseTests+=1,p.region&&!r||(p.region=v);var g=n._regionUnion(v,p.region);for(o=g.startCol;o<=g.endCol;o++)for(a=g.startRow;a<=g.endRow;a++){h=c[u=n._getBucketId(o,a)];var m=o>=v.startCol&&o<=v.endCol&&a>=v.startRow&&a<=v.endRow,y=o>=p.region.startCol&&o<=p.region.endCol&&a>=p.region.startRow&&a<=p.region.endRow;!m&&y&&y&&h&&n._bucketRemoveBody(t,h,p),(p.region===v||m&&!y||r)&&(h||(h=n._createBucket(c,u)),n._bucketAddBody(t,h,p))}p.region=v,f=!0}}}f&&(t.pairsList=n._createActivePairsList(t))},n.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]},n._regionUnion=function(t,e){var i=Math.min(t.startCol,e.startCol),r=Math.max(t.endCol,e.endCol),s=Math.min(t.startRow,e.startRow),o=Math.max(t.endRow,e.endRow);return n._createRegion(i,r,s,o)},n._getRegion=function(t,e){var i=e.bounds,r=Math.floor(i.min.x/t.bucketWidth),s=Math.floor(i.max.x/t.bucketWidth),o=Math.floor(i.min.y/t.bucketHeight),a=Math.floor(i.max.y/t.bucketHeight);return n._createRegion(r,s,o,a)},n._createRegion=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},n._getBucketId=function(t,e){return"C"+t+"R"+e},n._createBucket=function(t,e){return t[e]=[]},n._bucketAddBody=function(t,e,i){for(var n=0;n<e.length;n++){var s=e[n];if(!(i.id===s.id||i.isStatic&&s.isStatic)){var o=r.id(i,s),a=t.pairs[o];a?a[2]+=1:t.pairs[o]=[i,s,1]}}e.push(i)},n._bucketRemoveBody=function(t,e,i){e.splice(e.indexOf(i),1);for(var n=0;n<e.length;n++){var s=e[n],o=r.id(i,s),a=t.pairs[o];a&&(a[2]-=1)}},n._createActivePairsList=function(t){var e,i,n=[];e=o.keys(t.pairs);for(var r=0;r<e.length;r++)(i=t.pairs[e[r]])[2]>0?n.push(i):delete t.pairs[e[r]];return n}},function(t,e,i){var n={};t.exports=n;var r=i(535),s=i(50);n._pairMaxIdleLife=1e3,n.create=function(t){return s.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},n.update=function(t,e,i){var n,s,o,a,h=t.list,u=t.table,l=t.collisionStart,c=t.collisionEnd,f=t.collisionActive;for(l.length=0,c.length=0,f.length=0,a=0;a<h.length;a++)h[a].confirmedActive=!1;for(a=0;a<e.length;a++)(n=e[a]).collided&&((o=u[s=r.id(n.bodyA,n.bodyB)])?(o.isActive?f.push(o):l.push(o),r.update(o,n,i),o.confirmedActive=!0):(o=r.create(n,i),u[s]=o,l.push(o),h.push(o)));for(a=0;a<h.length;a++)(o=h[a]).isActive&&!o.confirmedActive&&(r.setActive(o,!1,i),c.push(o))},n.removeOld=function(t,e){var i,r,s,o,a=t.list,h=t.table,u=[];for(o=0;o<a.length;o++)(r=(i=a[o]).collision).bodyA.isSleeping||r.bodyB.isSleeping?i.timeUpdated=e:e-i.timeUpdated>n._pairMaxIdleLife&&u.push(o);for(o=0;o<u.length;o++)delete h[(i=a[s=u[o]-o]).id],a.splice(s,1)},n.clear=function(t){return t.table={},t.list.length=0,t.collisionStart.length=0,t.collisionActive.length=0,t.collisionEnd.length=0,t}},function(t,e,i){var n={};t.exports=n;var r=i(94),s=i(116),o=i(50),a=i(117);n._restingThresh=4,n._restingThreshTangent=6,n._positionDampen=.9,n._positionWarming=.8,n._frictionNormalMultiplier=5,n.preSolvePosition=function(t){var e,i,n;for(e=0;e<t.length;e++)(i=t[e]).isActive&&(n=i.activeContacts.length,i.collision.parentA.totalContacts+=n,i.collision.parentB.totalContacts+=n)},n.solvePosition=function(t,e,i){var r,s,o,a,h,u,l,c,f,d,p,v,g,m,y,x,w=i*n._positionDampen;for(r=0;r<e.length;r++){var _=e[r];_.previousPositionImpulse.x=_.positionImpulse.x,_.previousPositionImpulse.y=_.positionImpulse.y}for(r=0;r<t.length;r++)(a=t[r]).isActive&&!a.isSensor&&(u=(h=a.collision).parentA,l=h.parentB,c=h.normal,p=u.previousPositionImpulse,v=l.previousPositionImpulse,d=h.penetration,m=v.x-p.x+d.x,y=v.y-p.y+d.y,f=(s=c.x)*m+(o=c.y)*y,a.separation=f,x=(f-a.slop)*w,(u.isStatic||l.isStatic)&&(x*=2),u.isStatic||u.isSleeping||(g=x/u.totalContacts,u.positionImpulse.x+=s*g,u.positionImpulse.y+=o*g),l.isStatic||l.isSleeping||(g=x/l.totalContacts,l.positionImpulse.x-=s*g,l.positionImpulse.y-=o*g))},n.postSolvePosition=function(t){for(var e=0;e<t.length;e++){var i=t[e];if(i.totalContacts=0,0!==i.positionImpulse.x||0!==i.positionImpulse.y){for(var o=0;o<i.parts.length;o++){var h=i.parts[o];r.translate(h.vertices,i.positionImpulse),a.update(h.bounds,h.vertices,i.velocity),h.position.x+=i.positionImpulse.x,h.position.y+=i.positionImpulse.y}i.positionPrev.x+=i.positionImpulse.x,i.positionPrev.y+=i.positionImpulse.y,s.dot(i.positionImpulse,i.velocity)<0?(i.positionImpulse.x=0,i.positionImpulse.y=0):(i.positionImpulse.x*=n._positionWarming,i.positionImpulse.y*=n._positionWarming)}}},n.preSolveVelocity=function(t){var e,i,n,r,o,a,h,u,l,c,f,d,p,v,g=s._temp[0],m=s._temp[1];for(e=0;e<t.length;e++)if((n=t[e]).isActive&&!n.isSensor)for(r=n.activeContacts,a=(o=n.collision).parentA,h=o.parentB,u=o.normal,l=o.tangent,i=0;i<r.length;i++)f=(c=r[i]).vertex,d=c.normalImpulse,p=c.tangentImpulse,0===d&&0===p||(g.x=u.x*d+l.x*p,g.y=u.y*d+l.y*p,a.isStatic||a.isSleeping||(v=s.sub(f,a.position,m),a.positionPrev.x+=g.x*a.inverseMass,a.positionPrev.y+=g.y*a.inverseMass,a.anglePrev+=s.cross(v,g)*a.inverseInertia),h.isStatic||h.isSleeping||(v=s.sub(f,h.position,m),h.positionPrev.x-=g.x*h.inverseMass,h.positionPrev.y-=g.y*h.inverseMass,h.anglePrev-=s.cross(v,g)*h.inverseInertia))},n.solveVelocity=function(t,e){for(var i=e*e,r=s._temp[0],a=s._temp[1],h=s._temp[2],u=s._temp[3],l=s._temp[4],c=s._temp[5],f=0;f<t.length;f++){var d=t[f];if(d.isActive&&!d.isSensor){var p=d.collision,v=p.parentA,g=p.parentB,m=p.normal,y=p.tangent,x=d.activeContacts,w=1/x.length;v.velocity.x=v.position.x-v.positionPrev.x,v.velocity.y=v.position.y-v.positionPrev.y,g.velocity.x=g.position.x-g.positionPrev.x,g.velocity.y=g.position.y-g.positionPrev.y,v.angularVelocity=v.angle-v.anglePrev,g.angularVelocity=g.angle-g.anglePrev;for(var _=0;_<x.length;_++){var b=x[_],T=b.vertex,E=s.sub(T,v.position,a),S=s.sub(T,g.position,h),A=s.add(v.velocity,s.mult(s.perp(E),v.angularVelocity),u),C=s.add(g.velocity,s.mult(s.perp(S),g.angularVelocity),l),O=s.sub(A,C,c),R=s.dot(m,O),M=s.dot(y,O),P=Math.abs(M),I=o.sign(M),k=(1+d.restitution)*R,L=o.clamp(d.separation+R,0,1)*n._frictionNormalMultiplier,D=M,F=1/0;P>d.friction*d.frictionStatic*L*i&&(F=P,D=o.clamp(d.friction*I*i,-F,F));var N=s.cross(E,m),B=s.cross(S,m),U=w/(v.inverseMass+g.inverseMass+v.inverseInertia*N*N+g.inverseInertia*B*B);if(k*=U,D*=U,R<0&&R*R>n._restingThresh*i)b.normalImpulse=0;else{var V=b.normalImpulse;b.normalImpulse=Math.min(b.normalImpulse+k,0),k=b.normalImpulse-V}if(M*M>n._restingThreshTangent*i)b.tangentImpulse=0;else{var Y=b.tangentImpulse;b.tangentImpulse=o.clamp(b.tangentImpulse+D,-F,F),D=b.tangentImpulse-Y}r.x=m.x*k+y.x*D,r.y=m.y*k+y.y*D,v.isStatic||v.isSleeping||(v.positionPrev.x+=r.x*v.inverseMass,v.positionPrev.y+=r.y*v.inverseMass,v.anglePrev+=s.cross(E,r)*v.inverseInertia),g.isStatic||g.isSleeping||(g.positionPrev.x-=r.x*g.inverseMass,g.positionPrev.y-=r.y*g.inverseMass,g.anglePrev-=s.cross(S,r)*g.inverseInertia)}}}}}
6156,function(t,e,i){ 6157/** 6158 * @author Richard Davey <[email protected]> 6159 * @copyright 2020 Photon Storm Ltd. 6160 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6161 */ 6162t.exports={BasePlugin:i(536),DefaultPlugins:i(194),PluginCache:i(24),PluginManager:i(408),ScenePlugin:i(1398)}},function(t,e,i){ 6163/** 6164 * @author Richard Davey <[email protected]> 6165 * @copyright 2020 Photon Storm Ltd. 6166 * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} 6167 */ 6168var n=i(536),r=i(0),s=i(21),o=new r({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(s.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},function(t,e,i){ 6169/** 6170 * @author Richard Davey <[email protected]> 6171 * @copyright 2020 Photon Storm Ltd. 6172 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6173 */ 6174t.exports={Canvas:i(1400),Events:i(88),Snapshot:i(1401),WebGL:i(1402)}},function(t,e,i){ 6175/** 6176 * @author Richard Davey <[email protected]> 6177 * @copyright 2020 Photon Storm Ltd. 6178 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6179 */ 6180t.exports={CanvasRenderer:i(362),GetBlendModes:i(364),SetTransform:i(30)}},function(t,e,i){ 6181/** 6182 * @author Richard Davey <[email protected]> 6183 * @copyright 2020 Photon Storm Ltd. 6184 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6185 */ 6186t.exports={Canvas:i(363),WebGL:i(377)}},function(t,e,i){ 6187/** 6188 * @author Richard Davey <[email protected]> 6189 * @copyright 2020 Photon Storm Ltd. 6190 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6191 */ 6192var n=i(104),r=i(17),s={PipelineManager:i(366),Pipelines:i(1403),RenderTarget:i(139),Utils:i(12),WebGLPipeline:i(57),WebGLRenderer:i(365),WebGLShader:i(369)};s=r(!1,s,n),t.exports=s},function(t,e,i){ 6193/** 6194 * @author Richard Davey <[email protected]> 6195 * @copyright 2020 Photon Storm Ltd. 6196 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6197 */ 6198var n=i(65),r=i(17),s={BitmapMaskPipeline:i(367),Events:i(368),GraphicsPipeline:i(370),LightPipeline:i(371),MultiPipeline:i(105),PointLightPipeline:i(372),PostFXPipeline:i(1404),RopePipeline:i(373),SinglePipeline:i(374),UtilityPipeline:i(375)};s=r(!1,s,n),t.exports=s},function(t,e,i){ 6199/** 6200 * @author Richard Davey <[email protected]> 6201 * @copyright 2020 Photon Storm Ltd. 6202 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6203 */ 6204var n=i(0),r=i(195),s=i(2),o=i(1405),a=i(376),h=i(57),u=new n({Extends:h,initialize:function(t){t.renderTarget=s(t,"renderTarget",1),t.fragShader=s(t,"fragShader",o),t.vertShader=s(t,"vertShader",a),t.attributes=s(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.batchSize=1,t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],h.call(this,t),this.isPostFX=!0,this.gameObject,this.colorMatrix=new r,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){h.prototype.boot.call(this);var t=this.manager.UTILITY_PIPELINE;this.fullFrame1=t.fullFrame1,this.fullFrame2=t.fullFrame2,this.halfFrame1=t.halfFrame1,this.halfFrame2=t.halfFrame2,this.set1i("uMainSampler",0)},onDraw:function(t){this.bindAndDraw(t)},copyFrame:function(t,e,i,n,r){this.manager.copyFrame(t,e,i,n,r)},copyToGame:function(t){this.manager.copyToGame(t)},drawFrame:function(t,e,i){this.manager.drawFrame(t,e,i,this.colorMatrix)},blendFrames:function(t,e,i,n,r){this.manager.blendFrames(t,e,i,n,r)},blendFramesAdditive:function(t,e,i,n,r){this.manager.blendFramesAdditive(t,e,i,n,r)},clearFrame:function(t,e){this.manager.clearFrame(t,e)}
6204,blitFrame:function(t,e,i,n,r,s){this.manager.blitFrame(t,e,i,n,r,s)},copyFrameRect:function(t,e,i,n,r,s,o,a){this.manager.copyFrameRect(t,e,i,n,r,s,o,a)},bindAndDraw:function(t,e,i,n,r){void 0===i&&(i=!0),void 0===n&&(n=!0);var s=this.gl,o=this.renderer;this.bind(r),this.set1i("uMainSampler",0),e?(s.viewport(0,0,e.width,e.height),s.bindFramebuffer(s.FRAMEBUFFER,e.framebuffer),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,e.texture,0),i&&(n?s.clearColor(0,0,0,0):s.clearColor(0,0,0,1),s.clear(s.COLOR_BUFFER_BIT))):(o.popFramebuffer(!1,!1,!1),o.currentFramebuffer||s.viewport(0,0,o.width,o.height)),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,t.texture),s.bufferData(s.ARRAY_BUFFER,this.vertexData,s.STATIC_DRAW),s.drawArrays(s.TRIANGLES,0,6),e?(s.bindTexture(s.TEXTURE_2D,null),s.bindFramebuffer(s.FRAMEBUFFER,null)):o.resetTextures()}});t.exports=u},function(t,e){t.exports=["#define SHADER_NAME PHASER_POSTFX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}",""].join("\n")},function(t,e,i){ 6205/** 6206 * @author Richard Davey <[email protected]> 6207 * @copyright 2020 Photon Storm Ltd. 6208 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6209 */ 6210var n=i(17),r=i(198),s={Center:i(397),Events:i(101),Orientation:i(398),ScaleManager:i(409),ScaleModes:i(399),Zoom:i(400)};s=n(!1,s,r.CENTER),s=n(!1,s,r.ORIENTATION),s=n(!1,s,r.SCALE_MODE),s=n(!1,s,r.ZOOM),t.exports=s},function(t,e,i){ 6211/** 6212 * @author Richard Davey <[email protected]> 6213 * @copyright 2020 Photon Storm Ltd. 6214 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6215 */ 6216var n=i(142),r=i(17),s={Events:i(21),GetPhysicsPlugins:i(413),GetScenePlugins:i(414),SceneManager:i(411),ScenePlugin:i(1408),Settings:i(415),Systems:i(201)};s=r(!1,s,n),t.exports=s},function(t,e,i){ 6217/** 6218 * @author Richard Davey <[email protected]> 6219 * @copyright 2020 Photon Storm Ltd. 6220 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6221 */ 6222var n=i(18),r=i(0),s=i(21),o=i(2),a=i(24),h=new r({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,t.sys.events.once(s.BOOT,this.boot,this),t.sys.events.on(s.START,this.pluginStart,this)},boot:function(){this.systems.events.once(s.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(s.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=o(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=o(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=o(t,"sleep",!1),this._willRemove=o(t,"remove",!1);var r=o(t,"onUpdate",null);r&&(this._onUpdate=r,this._onUpdateScope=o(t,"onUpdateScope",this.scene));var a=o(t,"allowInput",!1);this.settings.transitionAllowInput=a;var h=i.sys.settings;return h.isTransition=!0,h.transitionFrom=this.scene,h.transitionDuration=n,h.transitionAllowInput=a,o(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):o(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(o(t,"data")):this.manager.start(e,o(t,"data")),this.systems.events.emit(s.TRANSITION_OUT,i,n),this.systems.events.on(s.UPDATE,this.step,this),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=n(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(s.UPDATE,this.step,this),t.events.emit(s.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)}
vendor: 4,132 bytes, lines 6222-6246
6222,add:function(t,e,i,n){return this.manager.add(t,e,i,n)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var n=this.manager.getScene(e);return n&&n.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(s.SHUTDOWN,this.shutdown,this),t.off(s.POST_UPDATE,this.step,this),t.off(s.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(s.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},function(t,e,i){ 6223/** 6224 * @author Richard Davey <[email protected]> 6225 * @copyright 2020 Photon Storm Ltd. 6226 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6227 */ 6228t.exports={Events:i(432),List:i(107),Map:i(99),ProcessQueue:i(208),RTree:i(525),Set:i(148),Size:i(410)}},function(t,e,i){ 6229/** 6230 * @author Richard Davey <[email protected]> 6231 * @copyright 2020 Photon Storm Ltd. 6232 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6233 */ 6234var n=i(17),r=i(1411),s={CanvasTexture:i(417),Events:i(103),FilterMode:r,Frame:i(106),Parsers:i(419),Texture:i(203),TextureManager:i(416),TextureSource:i(418)};s=n(!1,s,r),t.exports=s},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){ 6235/** 6236 * @author Richard Davey <[email protected]> 6237 * @copyright 2020 Photon Storm Ltd. 6238 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6239 */ 6240var n=i(17),r=i(1413),s={Components:i(247),Parsers:i(1446),Formats:i(39),ImageCollection:i(572),ParseToTilemap:i(258),Tile:i(83),Tilemap:i(576),TilemapCreator:i(1452),TilemapFactory:i(1453),Tileset:i(121),TilemapLayer:i(577),Orientation:i(29),LayerData:i(119),MapData:i(120),ObjectLayer:i(568)};s=n(!1,s,r.ORIENTATION),t.exports=s},function(t,e,i){ 6241/** 6242 * @author Richard Davey <[email protected]> 6243 * @copyright 2020 Photon Storm Ltd. 6244 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6245 */ 6246var n={ORIENTATION:i(29)};t.exports=n}
6246,function(t,e,i){ 6247/** 6248 * @author Richard Davey <[email protected]> 6249 * @copyright 2020 Photon Storm Ltd. 6250 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6251 */ 6252var n=i(26),r=i(61);t.exports=function(t,e,i,s,o,a,h,u){void 0===h&&(h=!0),t<0&&(t=0),e<0&&(e=0);for(var l=n(t,e,i,s,null,u),c=o-t,f=a-e,d=0;d<l.length;d++){var p=l[d].x+c,v=l[d].y+f;p>=0&&p<u.width&&v>=0&&v<u.height&&u.data[v][p]&&u.data[v][p].copy(l[d])}h&&r(o-1,a-1,i+2,s+2,u)}},function(t,e,i){ 6253/** 6254 * @author Richard Davey <[email protected]> 6255 * @copyright 2020 Photon Storm Ltd. 6256 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6257 */ 6258var n=i(26),r=i(538);t.exports=function(t,e,i,s,o,a){i||(i={}),Array.isArray(t)||(t=[t]);var h=a.tilemapLayer;s||(s=h.scene),o||(o=s.cameras.main);var u,l=n(0,0,a.width,a.height,null,a),c=[];for(u=0;u<l.length;u++){var f=l[u];if(-1!==t.indexOf(f.index)){var d=h.tileToWorldXY(f.x,f.y,void 0,o,a);i.x=d.x,i.y=d.y,c.push(s.make.sprite(i))}}if("number"==typeof e)for(u=0;u<t.length;u++)r(t[u],e,0,0,a.width,a.height,a);else if(Array.isArray(e))for(u=0;u<t.length;u++)r(t[u],e[u],0,0,a.width,a.height,a);return c}},function(t,e,i){ 6259/** 6260 * @author Richard Davey <[email protected]> 6261 * @copyright 2020 Photon Storm Ltd. 6262 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6263 */ 6264var n=i(26),r=i(61),s=i(72);t.exports=function(t,e,i,o,a,h,u){for(var l=-1!==u.collideIndexes.indexOf(t),c=n(e,i,o,a,null,u),f=0;f<c.length;f++)c[f].index=t,s(c[f],l);h&&r(e-1,i-1,o+2,a+2,u)}},function(t,e,i){ 6265/** 6266 * @author Richard Davey <[email protected]> 6267 * @copyright 2020 Photon Storm Ltd. 6268 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6269 */ 6270var n=i(26);t.exports=function(t,e,i,r,s,o,a,h){return n(i,r,s,o,a,h).filter(t,e)}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=0),void 0===i&&(i=!1);var r,s,o,a=0;if(i){for(s=n.height-1;s>=0;s--)for(r=n.width-1;r>=0;r--)if((o=n.data[s][r])&&o.index===t){if(a===e)return o;a+=1}}else for(s=0;s<n.height;s++)for(r=0;r<n.width;r++)if((o=n.data[s][r])&&o.index===t){if(a===e)return o;a+=1}return null}},function(t,e,i){ 6271/** 6272 * @author Richard Davey <[email protected]> 6273 * @copyright 2020 Photon Storm Ltd. 6274 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6275 */ 6276var n=i(26);t.exports=function(t,e,i,r,s,o,a,h){return n(i,r,s,o,a,h).find(t,e)||null}},function(t,e,i){ 6277/** 6278 * @author Richard Davey <[email protected]> 6279 * @copyright 2020 Photon Storm Ltd. 6280 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6281 */ 6282var n=i(26);
vendor: 10,358 bytes, lines 6282-6414
6282t.exports=function(t,e,i,r,s,o,a,h){n(i,r,s,o,a,h).forEach(t,e)}},function(t,e,i){ 6283/** 6284 * @author Richard Davey <[email protected]> 6285 * @copyright 2020 Photon Storm Ltd. 6286 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6287 */ 6288var n=i(29),r=i(540),s=i(541),o=i(543),a=i(1),h=i(544);t.exports=function(t){return t===n.ORTHOGONAL?r:t===n.HEXAGONAL?s:t===n.STAGGERED?h:t===n.ISOMETRIC?o:a}},function(t,e,i){ 6289/** 6290 * @author Richard Davey <[email protected]> 6291 * @copyright 2020 Photon Storm Ltd. 6292 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6293 */ 6294var n=i(156),r=new(i(3));t.exports=function(t,e,i,s,o){return o.tilemapLayer.worldToTileXY(t,e,!0,r,s),n(r.x,r.y,i,o)}},function(t,e,i){ 6295/** 6296 * @author Richard Davey <[email protected]> 6297 * @copyright 2020 Photon Storm Ltd. 6298 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6299 */ 6300var n=i(477),r=i(26),s=i(478),o=i(1),a=i(3),h=function(t,e){return s.RectangleToTriangle(e,t)},u=new a,l=new a,c=new a;t.exports=function(t,e,i,a){if(void 0===t)return[];var f=o;t instanceof n.Circle?f=s.CircleToRectangle:t instanceof n.Rectangle?f=s.RectangleToRectangle:t instanceof n.Triangle?f=h:t instanceof n.Line&&(f=s.LineToRectangle),a.tilemapLayer.worldToTileXY(t.left,t.top,!0,l,i);var d=l.x,p=l.y;a.tilemapLayer.worldToTileXY(t.right,t.bottom,!0,c,i);var v=Math.ceil(c.x),g=Math.ceil(c.y),m=Math.max(v-d,1),y=Math.max(g-p,1),x=r(d,p,m,y,e,a),w=a.tileWidth,_=a.tileHeight;a.tilemapLayer&&(w*=a.tilemapLayer.scaleX,_*=a.tilemapLayer.scaleY);for(var b=[],T=new n.Rectangle(0,0,w,_),E=0;E<x.length;E++){var S=x[E];a.tilemapLayer.tileToWorldXY(S.x,S.y,u,i),T.x=u.x,T.y=u.y,f(t,T)&&b.push(S)}return b}},function(t,e,i){ 6301/** 6302 * @author Richard Davey <[email protected]> 6303 * @copyright 2020 Photon Storm Ltd. 6304 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6305 */ 6306var n=i(29),r=i(1),s=i(249);t.exports=function(t){return t===n.ORTHOGONAL?s:r}},function(t,e,i){ 6307/** 6308 * @author Richard Davey <[email protected]> 6309 * @copyright 2020 Photon Storm Ltd. 6310 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6311 */ 6312var n=i(29),r=i(546),s=i(547),o=i(1),a=i(548),h=i(549);t.exports=function(t){return t===n.ORTHOGONAL?h:t===n.ISOMETRIC?s:t===n.HEXAGONAL?r:t===n.STAGGERED?a:o}},function(t,e,i){ 6313/** 6314 * @author Richard Davey <[email protected]> 6315 * @copyright 2020 Photon Storm Ltd. 6316 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6317 */ 6318var n=i(29),r=i(550),s=i(1),o=i(551),a=i(250);t.exports=function(t){return t===n.ORTHOGONAL?a:t===n.HEXAGONAL?r:t===n.STAGGERED?o:s}},function(t,e,i){ 6319/** 6320 * @author Richard Davey <[email protected]> 6321 * @copyright 2020 Photon Storm Ltd. 6322 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6323 */ 6324var n=i(29),r=i(1),s=i(251);t.exports=function(t){return t===n.ORTHOGONAL?s:r}},function(t,e,i){ 6325/** 6326 * @author Richard Davey <[email protected]> 6327 * @copyright 2020 Photon Storm Ltd. 6328 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6329 */ 6330var n=i(29),r=i(552),s=i(553),o=i(1),a=i(554),h=i(555);t.exports=function(t){return t===n.ORTHOGONAL?h:t===n.ISOMETRIC?s:t===n.HEXAGONAL?r:t===n.STAGGERED?a:o}},function(t,e,i){ 6331/** 6332 * @author Richard Davey <[email protected]> 6333 * @copyright 2020 Photon Storm Ltd. 6334 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6335 */ 6336var n=i(29),r=i(556),s=i(1),o=i(557),a=i(252);t.exports=function(t){return t===n.ORTHOGONAL?a:t===n.HEXAGONAL?r:t===n.STAGGERED?o:s}},function(t,e,i){ 6337/** 6338 * @author Richard Davey <[email protected]> 6339 * @copyright 2020 Photon Storm Ltd. 6340 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6341 */ 6342var n=i(558),r=new(i(3));t.exports=function(t,e,i,s){s.tilemapLayer.worldToTileXY(t,e,!0,r,i);var o=r.x,a=r.y;return n(o,a,s)}},function(t,e,i){ 6343/** 6344 * @author Richard Davey <[email protected]> 6345 * @copyright 2020 Photon Storm Ltd. 6346 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6347 */ 6348var n=i(253),r=new(i(3));t.exports=function(t,e,i,s,o,a){return a.tilemapLayer.worldToTileXY(e,i,!0,r,o,a),n(t,r.x,r.y,s,a)}},function(t,e,i){ 6349/** 6350 * @author Richard Davey <[email protected]> 6351 * @copyright 2020 Photon Storm Ltd. 6352 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6353 */ 6354var n=i(61),r=i(253);t.exports=function(t,e,i,s,o){if(void 0===s&&(s=!0),!Array.isArray(t))return null;Array.isArray(t[0])||(t=[t]);for(var a=t.length,h=t[0].length,u=0;u<a;u++)for(var l=0;l<h;l++){var c=t[u][l];r(c,e+l,i+u,!1,o)}s&&n(e-1,i-1,h+2,a+2,o)}},function(t,e,i){ 6355/** 6356 * @author Richard Davey <[email protected]> 6357 * @copyright 2020 Photon Storm Ltd. 6358 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6359 */ 6360var n=i(26),r=i(207);t.exports=function(t,e,i,s,o,a){var h,u=n(t,e,i,s,{},a);if(!o)for(o=[],h=0;h<u.length;h++)-1===o.indexOf(u[h].index)&&o.push(u[h].index);for(h=0;h<u.length;h++)u[h].index=r(o)}},function(t,e,i){ 6361/** 6362 * @author Richard Davey <[email protected]> 6363 * @copyright 2020 Photon Storm Ltd. 6364 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6365 */ 6366var n=i(559),r=new(i(3));t.exports=function(t,e,i,s,o,a){return a.tilemapLayer.worldToTileXY(t,e,!0,r,o,a),n(r.x,r.y,i,s,a)}},function(t,e,i){ 6367/** 6368 * @author Richard Davey <[email protected]> 6369 * @copyright 2020 Photon Storm Ltd. 6370 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6371 */ 6372var n=i(26),r=i(391),s=new r(105,210,231,150),o=new r(243,134,48,200),a=new r(40,39,37,150);t.exports=function(t,e,i){void 0===e&&(e={});var r=void 0!==e.tileColor?e.tileColor:s,h=void 0!==e.collidingTileColor?e.collidingTileColor:o,u=void 0!==e.faceColor?e.faceColor:a,l=n(0,0,i.width,i.height,null,i);t.translateCanvas(i.tilemapLayer.x,i.tilemapLayer.y),t.scaleCanvas(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var c=0;c<l.length;c++){var f=l[c],d=f.width,p=f.height,v=f.pixelX,g=f.pixelY,m=f.collides?h:r;null!==m&&(t.fillStyle(m.color,m.alpha/255),t.fillRect(v,g,d,p)),v+=1,g+=1,d-=2,p-=2,null!==u&&(t.lineStyle(1,u.color,u.alpha/255),f.faceTop&&t.lineBetween(v,g,v+d,g),f.faceRight&&t.lineBetween(v+d,g,v+d,g+p),f.faceBottom&&t.lineBetween(v,g+p,v+d,g+p),f.faceLeft&&t.lineBetween(v,g,v,g+p))}}},function(t,e,i){ 6373/** 6374 * @author Richard Davey <[email protected]> 6375 * @copyright 2020 Photon Storm Ltd. 6376 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6377 */ 6378var n=i(72),r=i(61),s=i(158);t.exports=function(t,e,i,o,a){void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===a&&(a=!0),Array.isArray(t)||(t=[t]);for(var h=0;h<t.length;h++)s(t[h],e,o);if(a)for(var u=0;u<o.height;u++)for(var l=0;l<o.width;l++){var c=o.data[u][l];c&&-1!==t.indexOf(c.index)&&n(c,e)}i&&r(0,0,o.width,o.height,o)}},function(t,e,i){ 6379/** 6380 * @author Richard Davey <[email protected]> 6381 * @copyright 2020 Photon Storm Ltd. 6382 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6383 */ 6384var n=i(72),r=i(61),s=i(158);t.exports=function(t,e,i,o,a,h){if(void 0===i&&(i=!0),void 0===o&&(o=!0),void 0===h&&(h=!0),!(t>e)){for(var u=t;u<=e;u++)s(u,i,a);if(h)for(var l=0;l<a.height;l++)for(var c=0;c<a.width;c++){var f=a.data[l][c];f&&f.index>=t&&f.index<=e&&n(f,i)}o&&r(0,0,a.width,a.height,a)}}},function(t,e,i){ 6385/** 6386 * @author Richard Davey <[email protected]> 6387 * @copyright 2020 Photon Storm Ltd. 6388 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6389 */ 6390var n=i(72),r=i(61),s=i(158);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a<o.height;a++)for(var h=0;h<o.width;h++){var u=o.data[a][h];u&&-1===t.indexOf(u.index)&&(n(u,e),s(u.index,e,o))}i&&r(0,0,o.width,o.height,o)}},function(t,e,i){ 6391/** 6392 * @author Richard Davey <[email protected]> 6393 * @copyright 2020 Photon Storm Ltd. 6394 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6395 */ 6396var n=i(72),r=i(61),s=i(125);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0);for(var a=0;a<o.height;a++)for(var h=0;h<o.width;h++){var u=o.data[a][h];if(u)for(var l in t)if(s(u.properties,l)){var c=t[l];Array.isArray(c)||(c=[c]);for(var f=0;f<c.length;f++)u.properties[l]===c[f]&&n(u,e)}}i&&r(0,0,o.width,o.height,o)}},function(t,e,i){ 6397/** 6398 * @author Richard Davey <[email protected]> 6399 * @copyright 2020 Photon Storm Ltd. 6400 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6401 */ 6402var n=i(72),r=i(61);t.exports=function(t,e,i){void 0===t&&(t=!0),void 0===e&&(e=!0);for(var s=0;s<i.height;s++)for(var o=0;o<i.width;o++){var a=i.data[s][o];if(a){var h=a.getCollisionGroup();h&&h.objects&&h.objects.length>0&&n(a,t)}}e&&r(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var r=0,s=t.length;r<s;r++)n.callbacks[t[r]]=null!==e?{callback:e,callbackContext:i}:void 0}},function(t,e,i){ 6403/** 6404 * @author Richard Davey <[email protected]> 6405 * @copyright 2020 Photon Storm Ltd. 6406 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6407 */ 6408var n=i(26);t.exports=function(t,e,i,r,s,o,a){for(var h=n(t,e,i,r,null,a),u=0;u<h.length;u++)h[u].setCollisionCallback(s,o)}},function(t,e,i){ 6409/** 6410 * @author Richard Davey <[email protected]> 6411 * @copyright 2020 Photon Storm Ltd. 6412 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6413 */ 6414var n=i(26),r=i(129);
6414t.exports=function(t,e,i,s,o){var a=n(t,e,i,s,null,o),h=a.map((function(t){return t.index}));r(h);for(var u=0;u<a.length;u++)a[u].index=h[u]}},function(t,e,i){ 6415/** 6416 * @author Richard Davey <[email protected]> 6417 * @copyright 2020 Photon Storm Ltd. 6418 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6419 */ 6420var n=i(26);t.exports=function(t,e,i,r,s,o,a){for(var h=n(i,r,s,o,null,a),u=0;u<h.length;u++)h[u]&&(h[u].index===t?h[u].index=e:h[u].index===e&&(h[u].index=t))}},function(t,e,i){ 6421/** 6422 * @author Richard Davey <[email protected]> 6423 * @copyright 2020 Photon Storm Ltd. 6424 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6425 */ 6426var n=i(26);t.exports=function(t,e,i,r,s,o){if(s){var a,h=n(t,e,i,r,null,o),u=0;for(a=0;a<s.length;a++)u+=s[a].weight;if(!(u<=0))for(a=0;a<h.length;a++){for(var l=Math.random()*u,c=0,f=-1,d=0;d<s.length;d++)if(l<=(c+=s[d].weight)){var p=s[d].index;f=Array.isArray(p)?p[Math.floor(Math.random()*p.length)]:p;break}h[a].index=f}}}},function(t,e,i){ 6427/** 6428 * @author Richard Davey <[email protected]> 6429 * @copyright 2020 Photon Storm Ltd. 6430 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6431 */ 6432t.exports={FromOrientationString:i(254),Parse:i(560),Parse2DArray:i(255),ParseCSV:i(561),Impact:i(1447),Tiled:i(1448)}},function(t,e,i){ 6433/** 6434 * @author Richard Davey <[email protected]> 6435 * @copyright 2020 Photon Storm Ltd. 6436 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6437 */ 6438t.exports={ParseTileLayers:i(574),ParseTilesets:i(575),ParseWeltmeister:i(573)}},function(t,e,i){ 6439/** 6440 * @author Richard Davey <[email protected]> 6441 * @copyright 2020 Photon Storm Ltd. 6442 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6443 */ 6444t.exports={AssignTileProperties:i(563),Base64Decode:i(570),BuildTilesetIndex:i(564),CreateGroupLayer:i(159),ParseGID:i(257),ParseImageLayers:i(565),ParseJSONTiled:i(562),ParseObject:i(256),ParseObjectLayers:i(566),ParseTileLayers:i(569),ParseTilesets:i(571)}},function(t,e,i){ 6445/** 6446 * @author Richard Davey <[email protected]> 6447 * @copyright 2020 Photon Storm Ltd. 6448 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6449 */ 6450var n=i(1),r=i(1);n=i(1450),r=i(1451),t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){ 6451/** 6452 * @author Richard Davey <[email protected]> 6453 * @copyright 2020 Photon Storm Ltd. 6454 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6455 */ 6456var n=i(12);t.exports=function(t,e,i){var r=e.cull(i),s=r.length,o=i.alpha*e.alpha;if(!(0===s||o<=0)){var a=e.gidMap,h=t.pipelines.set(e.pipeline,e),u=n.getTintAppendFloatAlpha,l=e.scrollFactorX,c=e.scrollFactorY,f=e.x,d=e.y,p=e.scaleX,v=e.scaleY;t.pipelines.preBatch(e);for(var g=0;g<s;g++){var m=r[g],y=a[m.index];if(y){var x=y.getTileTextureCoordinates(m.index);if(null!==x){var w=y.glTexture,_=h.setTexture2D(w,e),b=y.tileWidth,T=y.tileHeight,E=x.x,S=x.y,A=.5*y.tileWidth,C=.5*y.tileHeight,O=u(m.tint,o*m.alpha);h.batchTexture(e,w,w.width,w.height,f+(A+m.pixelX)*p,d+(C+m.pixelY)*v,m.width,m.height,p,v,m.rotation,m.flipX,m.flipY,l,c,A,C,E,S,b,T,O,O,O,O,!1,0,0,i,null,!0,_)}}}t.pipelines.postBatch(e)}}},function(t,e,i){ 6457/** 6458 * @author Richard Davey <[email protected]> 6459 * @copyright 2020 Photon Storm Ltd. 6460 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6461 */ 6462var n=i(25),r=new n,s=new n,o=new n;t.exports=function(t,e,i,n){var a=e.cull(i),h=a.length,u=i.alpha*e.alpha;if(!(0===h||u<=0)){var l=r,c=s,f=o;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),l.copyFrom(i.matrix);var d=t.currentContext,p=e.gidMap;d.save(),n?(l.multiplyWithOffset(n,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,l.multiply(c,f),f.copyToContext(d)):(c.e-=i.scrollX*e.scrollFactorX,c.f-=i.scrollY*e.scrollFactorY,c.copyToContext(d)),(!t.antialias||e.scaleX>1||e.scaleY>1)&&(d.imageSmoothingEnabled=!1);for(var v=0;v<h;v++){var g=a[v],m=p[g.index];if(m){var y=m.image.getSourceImage(),x=m.getTileTextureCoordinates(g.index);if(null!==x){var w=m.tileWidth,_=m.tileHeight,b=.5*w,T=.5*_;d.save(),d.translate(g.pixelX+b,g.pixelY+T),0!==g.rotation&&d.rotate(g.rotation),(g.flipX||g.flipY)&&d.scale(g.flipX?-1:1,g.flipY?-1:1),d.globalAlpha=u*g.alpha,d.drawImage(y,x.x,x.y,w,_,-b,-T,w,_),d.restore(
6462)}}}d.restore()}}},function(t,e,i){ 6463/** 6464 * @author Richard Davey <[email protected]> 6465 * @copyright 2020 Photon Storm Ltd. 6466 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6467 */ 6468var n=i(16),r=i(258);n.register("tilemap",(function(t){var e=void 0!==t?t:{};return r(this.scene,e.key,e.tileWidth,e.tileHeight,e.width,e.height,e.data,e.insertNull)}))},function(t,e,i){ 6469/** 6470 * @author Richard Davey <[email protected]> 6471 * @copyright 2020 Photon Storm Ltd. 6472 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6473 */ 6474var n=i(5),r=i(258);n.register("tilemap",(function(t,e,i,n,s,o,a){return null===t&&(t=void 0),null===e&&(e=void 0),null===i&&(i=void 0),null===n&&(n=void 0),null===s&&(s=void 0),r(this.scene,t,e,i,n,s,o,a)}))},function(t,e,i){ 6475/** 6476 * @author Richard Davey <[email protected]> 6477 * @copyright 2020 Photon Storm Ltd. 6478 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6479 */ 6480t.exports={Clock:i(1455),TimerEvent:i(578)}},function(t,e,i){ 6481/** 6482 * @author Richard Davey <[email protected]> 6483 * @copyright 2020 Photon Storm Ltd. 6484 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6485 */ 6486var n=i(0),r=i(24),s=i(21),o=i(578),a=i(89),h=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.now=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],t.sys.events.once(s.BOOT,this.boot,this),t.sys.events.on(s.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(s.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(s.PRE_UPDATE,this.preUpdate,this),t.on(s.UPDATE,this.update,this),t.once(s.SHUTDOWN,this.shutdown,this)},addEvent:function(t){var e;return t instanceof o?(e=t,this.removeEvent(e),e.elapsed=e.startAt,e.hasDispatched=!1,e.repeatCount=-1===e.repeat||e.loop?999999999999:e.repeat):e=new o(t),this._pendingInsertion.push(e),e},delayedCall:function(t,e,i,n){return this.addEvent({delay:t,callback:e,args:i,callbackScope:n})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];a(this._pendingRemoval,i),a(this._pendingInsertion,i),a(this._active,i)}return this},removeAllEvents:function(){return this._pendingRemoval=this._pendingRemoval.concat(this._active),this},preUpdate:function(){var t=this._pendingRemoval.length,e=this._pendingInsertion.length;if(0!==t||0!==e){var i,n;for(i=0;i<t;i++){n=this._pendingRemoval[i];var r=this._active.indexOf(n);r>-1&&this._active.splice(r,1),n.destroy()}for(i=0;i<e;i++)n=this._pendingInsertion[i],this._active.push(n);this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){if(this.now=t,!this.paused){e*=this.timeScale;for(var i=0;i<this._active.length;i++){var n=this._active[i];if(!n.paused&&(n.elapsed+=e*n.timeScale,n.elapsed>=n.delay)){var r=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=r,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;
6486t<this._pendingInsertion.length;t++)this._pendingInsertion[t].destroy();for(t=0;t<this._active.length;t++)this._active[t].destroy();for(t=0;t<this._pendingRemoval.length;t++)this._pendingRemoval[t].destroy();this._active.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;var e=this.systems.events;e.off(s.PRE_UPDATE,this.preUpdate,this),e.off(s.UPDATE,this.update,this),e.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(s.START,this.start,this),this.scene=null,this.systems=null}});r.register("Clock",h,"time"),t.exports=h},function(t,e,i){ 6487/** 6488 * @author Richard Davey <[email protected]> 6489 * @copyright 2020 Photon Storm Ltd. 6490 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6491 */ 6492var n=i(97),r=i(17),s={Builders:i(1457),Events:i(263),TweenManager:i(1473),Tween:i(262),TweenData:i(264),Timeline:i(584)};s=r(!1,s,n),t.exports=s},function(t,e,i){ 6493/** 6494 * @author Richard Davey <[email protected]> 6495 * @copyright 2020 Photon Storm Ltd. 6496 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6497 */ 6498t.exports={GetBoolean:i(96),GetEaseFunction:i(80),GetNewValue:i(160),GetProps:i(579),GetTargets:i(259),GetTweens:i(580),GetValueOp:i(260),NumberTweenBuilder:i(581),StaggerBuilder:i(582),TimelineBuilder:i(583),TweenBuilder:i(161)}},function(t,e){ 6499/** 6500 * @author Richard Davey <[email protected]> 6501 * @copyright 2020 Photon Storm Ltd. 6502 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6503 */ 6504t.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","loop","loopDelay","offset","onActive","onActiveParams","onActiveScope","onComplete","onCompleteParams","onCompleteScope","onLoop","onLoopParams","onLoopScope","onRepeat","onRepeatParams","onRepeatScope","onStart","onStartParams","onStartScope","onStop","onStopParams","onStopScope","onUpdate","onUpdateParams","onUpdateScope","onYoyo","onYoyoParams","onYoyoScope","paused","props","repeat","repeatDelay","targets","useFrames","yoyo"]},function(t,e){ 6505/** 6506 * @author Richard Davey <[email protected]> 6507 * @copyright 2020 Photon Storm Ltd. 6508 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6509 */ 6510t.exports="complete"},function(t,e){ 6511/** 6512 * @author Richard Davey <[email protected]> 6513 * @copyright 2020 Photon Storm Ltd. 6514 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6515 */ 6516t.exports="loop"},function(t,e){ 6517/** 6518 * @author Richard Davey <[email protected]> 6519 * @copyright 2020 Photon Storm Ltd. 6520 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6521 */ 6522t.exports="pause"},function(t,e){ 6523/** 6524 * @author Richard Davey <[email protected]> 6525 * @copyright 2020 Photon Storm Ltd. 6526 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6527 */ 6528t.exports="resume"},function(t,e){ 6529/** 6530 * @author Richard Davey <[email protected]> 6531 * @copyright 2020 Photon Storm Ltd. 6532 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6533 */ 6534t.exports="start"},function(t,e){ 6535/** 6536 * @author Richard Davey <[email protected]> 6537 * @copyright 2020 Photon Storm Ltd. 6538 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6539 */ 6540t.exports="update"},function(t,e){ 6541/** 6542 * @author Richard Davey <[email protected]> 6543 * @copyright 2020 Photon Storm Ltd. 6544 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6545 */ 6546t.exports="active"},function(t,e){ 6547/** 6548 * @author Richard Davey <[email protected]> 6549 * @copyright 2020 Photon Storm Ltd. 6550 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6551 */ 6552t.exports="complete"},function(t,e){ 6553/** 6554 * @author Richard Davey <[email protected]> 6555 * @copyright 2020 Photon Storm Ltd. 6556 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6557 */ 6558t.exports="loop"},function(t,e){ 6559/** 6560 * @author Richard Davey <[email protected]> 6561 * @copyright 2020 Photon Storm Ltd. 6562 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6563 */ 6564t.exports="repeat"},function(t,e){ 6565/** 6566 * @author Richard Davey <[email protected]> 6567 * @copyright 2020 Photon Storm Ltd. 6568 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6569 */ 6570t.exports="start"},function(t,e){ 6571/** 6572 * @author samme 6573 * @copyright 2020 Photon Storm Ltd. 6574 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6575 */ 6576t.exports="stop"},function(t,e){ 6577/** 6578 * @author Richard Davey <[email protected]> 6579 * @copyright 2020 Photon Storm Ltd. 6580 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6581 */ 6582t.exports="update"},function(t,e){ 6583/** 6584 * @author Richard Davey <[email protected]> 6585 * @copyright 2020 Photon Storm Ltd. 6586 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6587 */ 6588t.exports="yoyo"}
6588,function(t,e,i){ 6589/** 6590 * @author Richard Davey <[email protected]> 6591 * @copyright 2020 Photon Storm Ltd. 6592 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6593 */ 6594var n=i(89),r=i(0),s=i(581),o=i(24),a=i(21),h=i(582),u=i(583),l=i(97),c=i(161),f=new r({initialize:function(t){this.scene=t,this.systems=t.sys,this.timeScale=1,this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,t.sys.events.once(a.BOOT,this.boot,this),t.sys.events.on(a.START,this.start,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(a.PRE_UPDATE,this.preUpdate,this),t.on(a.UPDATE,this.update,this),t.once(a.SHUTDOWN,this.shutdown,this),this.timeScale=1},createTimeline:function(t){return u(this,t)},timeline:function(t){var e=u(this,t);return e.paused||(this._add.push(e),this._toProcess++),e},create:function(t){return c(this,t)},add:function(t){var e=c(this,t);return this._add.push(e),this._toProcess++,e},existing:function(t){return this._add.push(t),this._toProcess++,this},addCounter:function(t){var e=s(this,t);return this._add.push(e),this._toProcess++,e},stagger:function(t,e){return h(t,e)},preUpdate:function(){if(0!==this._toProcess){var t,e,i=this._destroy,n=this._active,r=this._pending;for(t=0;t<i.length;t++){e=i[t];var s=n.indexOf(e);-1===s?(s=r.indexOf(e))>-1&&(e.state=l.REMOVED,r.splice(s,1)):(e.state=l.REMOVED,n.splice(s,1))}for(i.length=0,i=this._add,t=0;t<i.length;t++)(e=i[t]).state===l.PENDING_ADD&&(e.init()?(e.play(),this._active.push(e)):this._pending.push(e));i.length=0,this._toProcess=0}},update:function(t,e){var i,n=this._active;e*=this.timeScale;for(var r=0;r<n.length;r++)(i=n[r]).update(t,e)&&(this._destroy.push(i),this._toProcess++)},remove:function(t){return n(this._add,t),n(this._pending,t),n(this._active,t),n(this._destroy,t),t.state=l.REMOVED,this},makeActive:function(t){if(-1!==this._add.indexOf(t)||-1!==this._active.indexOf(t))return this;
6594var e=this._pending.indexOf(t);return-1!==e&&this._pending.splice(e,1),this._add.push(t),t.state=l.PENDING_ADD,this._toProcess++,this},each:function(t,e){for(var i=[null],n=1;n<arguments.length;n++)i.push(arguments[n]);for(var r in this.list)i[0]=this.list[r],t.apply(e,i)},getAllTweens:function(){for(var t=this._active,e=[],i=0;i<t.length;i++)e.push(t[i]);return e},getGlobalTimeScale:function(){return this.timeScale},getTweensOf:function(t,e){void 0===e&&(e=!1);var i,n,r,s=this._active,o=[];for(Array.isArray(t)||(t=[t]),n=0;n<s.length;n++)for(i=s[n],r=0;r<t.length;r++)i.hasTarget(t[r])&&o.push(i);if(e)for(s=this._pending,n=0;n<s.length;n++)for(i=s[n],r=0;r<t.length;r++)i.hasTarget(t[r])&&o.push(i);return o},isTweening:function(t){for(var e,i=this._active,n=0;n<i.length;n++)if((e=i[n]).hasTarget(t)&&e.isPlaying())return!0;return!1},killAll:function(){for(var t=this.getAllTweens(),e=0;e<t.length;e++)t[e].stop();return this},killTweensOf:function(t){for(var e=this.getTweensOf(t),i=0;i<e.length;i++)e[i].stop();return this},pauseAll:function(){for(var t=this._active,e=0;e<t.length;e++)t[e].pause();return this},resumeAll:function(){for(var t=this._active,e=0;e<t.length;e++)t[e].resume();return this},setGlobalTimeScale:function(t){return this.timeScale=t,this},shutdown:function(){this.killAll(),this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0;var t=this.systems.events;t.off(a.PRE_UPDATE,this.preUpdate,this),t.off(a.UPDATE,this.update,this),t.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.START,this.start,this),this.scene=null,this.systems=null}});o.register("TweenManager",f,"tweens"),t.exports=f},function(t,e,i){ 6595/** 6596 * @author Richard Davey <[email protected]> 6597 * @copyright 2020 Photon Storm Ltd. 6598 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6599 */ 6600t.exports={Array:i(205),Base64:i(1475),Objects:i(1477),String:i(1481),NOOP:i(1)}},function(t,e,i){ 6601/** 6602 * @author Richard Davey <[email protected]> 6603 * @copyright 2020 Photon Storm Ltd. 6604 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6605 */ 6606t.exports={ArrayBufferToBase64:i(1476),Base64ToArrayBuffer:i(427)}},function(t,e){ 6607/** 6608 * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) 6609 * @author Richard Davey <[email protected]> 6610 * @copyright 2020 Photon Storm Ltd. 6611 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6612 */ 6613var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";t.exports=function(t,e){for(var n=new Uint8Array(t),r=n.length,s=e?"data:"+e+";base64,":"",o=0;o<r;o+=3)s+=i[n[o]>>2],s+=i[(3&n[o])<<4|n[o+1]>>4],s+=i[(15&n[o+1])<<2|n[o+2]>>6],s+=i[63&n[o+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s}},function(t,e,i){ 6614/** 6615 * @author Richard Davey <[email protected]> 6616 * @copyright 2020 Photon Storm Ltd. 6617 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6618 */ 6619t.exports={Clone:i(77),DeepCopy:i(172),Extend:i(17),GetAdvancedValue:i(13),GetFastValue:i(2),GetMinMaxValue:i(1478),GetValue:i(6),HasAll:i(1479),HasAny:i(449),HasValue:i(125),IsPlainObject:i(7),Merge:i(143),MergeRight:i(1480),Pick:i(567),SetValue:i(472)}},function(t,e,i){ 6620/** 6621 * @author Richard Davey <[email protected]> 6622 * @copyright 2020 Photon Storm Ltd. 6623 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6624 */ 6625var n=i(6),r=i(18);t.exports=function(t,e,i,s,o){void 0===o&&(o=i);var a=n(t,e,o);return r(a,i,s)}},function(t,e){t.exports=function(t,e){for(var i=0;i<e.length;i++)if(!t.hasOwnProperty(e[i]))return!1;return!0}},function(t,e,i){ 6626/** 6627 * @author Richard Davey <[email protected]> 6628 * @copyright 2020 Photon Storm Ltd. 6629 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6630 */ 6631var n=i(77);t.exports=function(t,e){var i=n(t);for(var r in e)i.hasOwnProperty(r)&&(i[r]=e[r]);return i}}
vendor: 9,677 bytes, lines 6631-6661
6631,function(t,e,i){ 6632/** 6633 * @author Richard Davey <[email protected]> 6634 * @copyright 2020 Photon Storm Ltd. 6635 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6636 */ 6637t.exports={Format:i(1482),Pad:i(183),RemoveAt:i(1483),Reverse:i(1484),UppercaseFirst:i(202),UUID:i(219)}},function(t,e){t.exports=function(t,e){return t.replace(/%([0-9]+)/g,(function(t,i){return e[Number(i)-1]}))}},function(t,e){t.exports=function(t,e){return 0===e?t.slice(1):t.slice(0,e-1)+t.slice(e)}},function(t,e){t.exports=function(t){return t.split("").reverse().join("")}},function(t,e,i){ 6638/** 6639 * @author Richard Davey <[email protected]> 6640 * @author Pavle Goloskokovic <[email protected]> (http://prunegames.com) 6641 * @copyright 2020 Photon Storm Ltd. 6642 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6643 */ 6644t.exports={SoundManagerCreator:i(420),Events:i(69),BaseSound:i(145),BaseSoundManager:i(144),WebAudioSound:i(428),WebAudioSoundManager:i(426),HTML5AudioSound:i(423),HTML5AudioSoundManager:i(421),NoAudioSound:i(425),NoAudioSoundManager:i(424)}},function(t,e,i){ 6645/** 6646 * @author Richard Davey <[email protected]> 6647 * @copyright 2020 Photon Storm Ltd. 6648 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6649 */ 6650var n=i(0),r=i(3),s=new n({initialize:function(){this.boundsCenter=new r,this.centerDiff=new r},parseBody:function(t){if(!(t=t.hasOwnProperty("body")?t.body:t).hasOwnProperty("bounds")||!t.hasOwnProperty("centerOfMass"))return!1;var e=this.boundsCenter,i=this.centerDiff,n=t.bounds.max.x-t.bounds.min.x,r=t.bounds.max.y-t.bounds.min.y,s=n*t.centerOfMass.x,o=r*t.centerOfMass.y;return e.set(n/2,r/2),i.set(s-e.x,o-e.y),!0},getTopLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,s=this.centerDiff;return new r(e+n.x+s.x,i+n.y+s.y)}return!1},getTopCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,s=this.centerDiff;return new r(e+s.x,i+n.y+s.y)}return!1},getTopRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,s=this.centerDiff;return new r(e-(n.x-s.x),i+n.y+s.y)}return!1},getLeftCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,s=this.centerDiff;return new r(e+n.x+s.x,i+s.y)}return!1},getCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.centerDiff;return new r(e+n.x,i+n.y)}return!1},getRightCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,s=this.centerDiff;return new r(e-(n.x-s.x),i+s.y)}return!1},getBottomLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,s=this.centerDiff;return new r(e+n.x+s.x,i-(n.y-s.y))}return!1},getBottomCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,s=this.centerDiff;return new r(e+s.x,i-(n.y-s.y))}return!1},getBottomRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,s=this.centerDiff;return new r(e-(n.x-s.x),i-(n.y-s.y))}return!1}});t.exports=s},function(t,e){function i(t,e,i){i=i||0;var n,r,s,o,a,h,u,l=[0,0];return n=t[1][1]-t[0][1],r=t[0][0]-t[1][0],s=n*t[0][0]+r*t[0][1],o=e[1][1]-e[0][1],a=e[0][0]-e[1][0],h=o*e[0][0]+a*e[0][1],E(u=n*a-o*r,0,i)||(l[0]=(a*s-r*h)/u,l[1]=(n*h-o*s)/u),l}function n(t,e,i,n){var r=e[0]-t[0],s=e[1]-t[1],o=n[0]-i[0],a=n[1]-i[1];if(o*s-a*r==0)return!1;var h=(r*(i[1]-t[1])+s*(t[0]-i[0]))/(o*s-a*r),u=(o*(t[1]-i[1])+a*(i[0]-t[0]))/(a*r-o*s);return h>=0&&h<=1&&u>=0&&u<=1}function r(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function s(t,e,i){return r(t,e,i)>0}function o(t,e,i){return r(t,e,i)>=0}function a(t,e,i){return r(t,e,i)<0}function h(t,e,i){return r(t,e,i)<=0} 6651/** 6652 * @author Stefan Hedman <[email protected]> (http://steffe.se) 6653 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6654 */ 6655t.exports={decomp:function(t){var e=_(t);return e.length>0?b(t,e):[t]},quickDecomp:function t(e,i,n,r,u,l,c){l=l||100,c=c||0,u=u||25,i=void 0!==i?i:[],n=n||[],r=r||[];var g=[0,0],m=[0,0],y=[0,0],w=0,_=0,b=0,E=0,S=0,A=0,C=0,O=[],R=[],M=e,P=e;if(P.length<3)return i;if(++c>l)return console.warn("quickDecomp: max level ("+l+") reached."),i;for(var I=0;I<e.length;++I)if(v(M,I)){n.push(M[I]),w=_=Number.MAX_VALUE;for(var k=0;k<e.length;++k)s(d(M,I-1),d(M,I),d(M,k))&&h(d(M,I-1),d(M,I),d(M,k-1))&&(y=T(d(M,I-1),d(M,I),d(M,k),d(M,k-1)),a(d(M,I+1),d(M,I),y)&&(b=f(M[I],y))<_&&(_=b,m=y,A=k)),s(d(M,I+1),d(M,I),d(M,k+1))&&h(d(M,I+1),d(M,I),d(M,k))&&(y=T(d(M,I+1),d(M,I),d(M,k),d(M,k+1)),s(d(M,I-1),d(M,I),y)&&(b=f(M[I],y))<w&&(w=b,g=y,S=k));if(A===(S+1)%e.length)y[0]=(m[0]+g[0])/2,y[1]=(m[1]+g[1])/2,r.push(y),I<S?(p(O,M,I,S+1),O.push(y),R.push(y),0!==A&&p(R,M,A,M.length),p(R,M,0,I+1)):(0!==I&&p(O,M,I,M.length),p(O,M,0,S+1),O.push(y),R.push(y),p(R,M,A,I+1));else{if(A>S&&(S+=e.length),E=Number.MAX_VALUE,S<A)return i;for(k=A;k<=S;++k)o(d(M,I-1),d(M,I),d(M,k))&&h(d(M,I+1),d(M,I),d(M,k))&&(b=f(d(M,I),d(M,k)))<E&&x(M,I,k)&&(E=b,C=k%e.length);I<C?(p(O,M,I,C+1),0!==C&&p(R,M,C,P.length),p(R,M,0,I+1)):(0!==I&&p(O,M,I,P.length),p(O,M,0,C+1),p(R,M,C,I+1))}return O.length<R.length?(t(O,i,n,r,u,l,c),t(R,i,n,r,u,l,c)):(t(R,i,n,r,u,l,c),t(O,i,n,r,u,l,c)),i}return i.push(e),i},isSimple:function(t){var e,i=t;for(e=0;e<i.length-1;e++)for(var r=0;r<e-1;r++)if(n(i[e],i[e+1],i[r],i[r+1]))return!1;for(e=1;e<i.length-2;e++)if(n(i[0],i[i.length-1],i[e],i[e+1]))return!1;return!0},removeCollinearPoints:function(t,e){for(var i=0,n=t.length-1;t.length>3&&n>=0;--n)c(d(t,n-1),d(t,n),d(t,n+1),e)&&(t.splice(n%t.length,1),i++);return i},removeDuplicatePoints:function(t,e){for(var i=t.length-1;i>=1;--i)for(var n=t[i],r=i-1;r>=0;--r)S(n,t[r],e)&&t.splice(i,1)},makeCCW:function(t){for(var e=0,i=t,n=1;n<t.length;++n)(i[n][1]<i[e][1]||i[n][1]===i[e][1]&&i[n][0]>i[e][0])&&(e=n);return!s(d(t,e-1),d(t,e),d(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var u=[],l=[];function c(t,e,i,n){if(n){var s=u,o=l;s[0]=e[0]-t[0],s[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=s[0]*o[0]+s[1]*o[1],h=Math.sqrt(s[0]*s[0]+s[1]*s[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(h*c))<n}return 0===r(t,e,i)}function f(t,e){var i=e[0]-t[0],n=e[1]-t[1];return i*i+n*n}function d(t,e){var i=t.length;return t[e<0?e%i+i:e%i]}function p(t,e,i,n){for(var r=i;r<n;r++)t.push(e[r])}function v(t,e){return a(d(t,e-1),d(t,e),d(t,e+1))}var g=[],m=[];function y(t,e,n){var r,s,a=g,u=m;if(o(d(t,e+1),d(t,e),d(t,n))&&h(d(t,e-1),d(t,e),d(t,n)))return!1;s=f(d(t,e),d(t,n));for(var l=0;l!==t.length;++l)if((l+1)%t.length!==e&&l!==e&&o(d(t,e),d(t,n),d(t,l+1))&&h(d(t,e),d(t,n),d(t,l))&&(a[0]=d(t,e),a[1]=d(t,n),u[0]=d(t,l),u[1]=d(t,l+1),r=i(a,u),f(d(t,e),r)<s))return!1;return!0}function x(t,e,i){for(var r=0;r!==t.length;++r)if(r!==e&&r!==i&&(r+1)%t.length!==e&&(r+1)%t.length!==i&&n(d(t,e),d(t,i),d(t,r),d(t,r+1)))return!1;return!0}function w(t,e,i,n){var r=n||[];if(function(t){t.length=0}(r),e<i)for(var s=e;s<=i;s++)r.push(t[s]);else{for(s=0;s<=i;s++)r.push(t[s]);for(s=e;s<t.length;s++)r.push(t[s])}return r}function _(t){for(var e=[],i=[],n=[],r=[],s=Number.MAX_VALUE,o=0;o<t.length;++o)if(v(t,o))for(var a=0;a<t.length;++a)if(y(t,o,a)){i=_(w(t,o,a,r)),n=_(w(t,a,o,r));for(var h=0;h<n.length;h++)i.push(n[h]);i.length<s&&(e=i,s=i.length,e.push([d(t,o),d(t,a)]))}return e}function b(t,e){if(0===e.length)return[t];if(e instanceof Array&&e.length&&e[0]instanceof Array&&2===e[0].length&&e[0][0]instanceof Array){for(var i=[t],n=0;n<e.length;n++)for(var r=e[n],s=0;s<i.length;s++){var o=b(i[s],r);if(o){i.splice(s,1),i.push(o[0],o[1]);break}}return i}return r=e,n=t.indexOf(r[0]),s=t.indexOf(r[1]),-1!==n&&-1!==s&&[w(t,n,s),w(t,s,n)]}function T(t,e,i,n,r){r=r||0;var s=e[1]-t[1],o=t[0]-e[0],a=s*t[0]+o*t[1],h=n[1]-i[1],u=i[0]-n[0],l=h*i[0]+u*i[1],c=s*u-h*o;return E(c,0,r)?[0,0]:[(u*a-o*l)/c,(s*l-h*a)/c]}function E(t,e,i){return i=i||0,Math.abs(t-e)<=i}function S(t,e,i){return E(t[0],e[0],i)&&E(t[1],e[1],i)}},function(t,e,i){ 6656/** 6657 * @author Richard Davey <[email protected]> 6658 * @copyright 2020 Photon Storm Ltd. 6659 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6660 */ 6661var n=i(126),r=i(0),s=i(1388),o=i(246),a=i(1389),h=i(1489),u=i(1490),l=i(1491),c=i(1390),f=i(1386),d=i(1387),p=i(1492),v=i(94),g=new r({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},rectangle:function(t,e,i,r,s){var o=n.rectangle(t,e,i,r,s);return this.world.add(o),o},trapezoid:function(t,e,i,r,s,o){var a=n.trapezoid(t,e,i,r,s,o);return this.world.add(a),a},circle:function(t,e,i,r,s){var o=n.circle(t,e,i,r,s);return this.world.add(o),o},polygon:function(t,e,i,r,s){var o=n.polygon(t,e,i,r,s);return this.world.add(o),o},fromVertices:function(t,e,i,r,s,o,a){"string"==typeof i&&(i=v.fromPath(i));var h=n.fromVertices(t,e,i,r,s,o,a);return this.world.add(h),h},fromPhysicsEditor:function(t,e,i,n,r){void 0===r&&(r=!0);var s=f.parseBody(t,e,i,n);return r&&!this.world.has(s)&&this.world.add(s),s},fromSVG:function(t,e,i,r,s,o){void 0===r&&(r=1),void 0===s&&(s={}),void 0===o&&(o=!0);for(var h=i.getElementsByTagName("path"),u=[],l=0;l<h.length;l++){var c=a.pathToVertices(h[l],30);1!==r&&v.scale(c,r,r),u.push(c)}var f=n.fromVertices(t,e,u,s);return o&&this.world.add(f),f}
6661,fromJSON:function(t,e,i,n,r){void 0===n&&(n={}),void 0===r&&(r=!0);var s=d.parseBody(t,e,i,n);return s&&r&&this.world.add(s),s},imageStack:function(t,e,i,n,r,o,a,h,l){void 0===a&&(a=0),void 0===h&&(h=0),void 0===l&&(l={});var c=this.world,f=this.sys.displayList;l.addToWorld=!1;var d=s.stack(i,n,r,o,a,h,(function(i,n){var r=new u(c,i,n,t,e,l);return f.add(r),r.body}));return c.add(d),d},stack:function(t,e,i,n,r,o,a){var h=s.stack(t,e,i,n,r,o,a);return this.world.add(h),h},pyramid:function(t,e,i,n,r,o,a){var h=s.pyramid(t,e,i,n,r,o,a);return this.world.add(h),h},chain:function(t,e,i,n,r,o){return s.chain(t,e,i,n,r,o)},mesh:function(t,e,i,n,r){return s.mesh(t,e,i,n,r)},newtonsCradle:function(t,e,i,n,r){var o=s.newtonsCradle(t,e,i,n,r);return this.world.add(o),o},car:function(t,e,i,n,r){var o=s.car(t,e,i,n,r);return this.world.add(o),o},softBody:function(t,e,i,n,r,o,a,h,u,l){var c=s.softBody(t,e,i,n,r,o,a,h,u,l);return this.world.add(c),c},joint:function(t,e,i,n,r){return this.constraint(t,e,i,n,r)},spring:function(t,e,i,n,r){return this.constraint(t,e,i,n,r)},constraint:function(t,e,i,n,r){void 0===n&&(n=1),void 0===r&&(r={}),r.bodyA="body"===t.type?t:t.body,r.bodyB="body"===e.type?e:e.body,isNaN(i)||(r.length=i),r.stiffness=n;var s=o.create(r);return this.world.add(s),s},worldConstraint:function(t,e,i,n){void 0===i&&(i=1),void 0===n&&(n={}),n.bodyB="body"===t.type?t:t.body,isNaN(e)||(n.length=e),n.stiffness=i;var r=o.create(n);return this.world.add(r),r},mouseSpring:function(t){return this.pointerConstraint(t)},pointerConstraint:function(t){void 0===t&&(t={}),t.hasOwnProperty("render")||(t.render={visible:!1});var e=new p(this.scene,this.world,t);return this.world.add(e.constraint),e},image:function(t,e,i,n,r){var s=new u(this.world,t,e,i,n,r);return this.sys.displayList.add(s),s},tileBody:function(t,e){return new c(this.world,t,e)},sprite:function(t,e,i,n,r){var s=new l(this.world,t,e,i,n,r);return this.sys.displayList.add(s),this.sys.updateList.add(s),s},gameObject:function(t,e,i){return h(this.world,t,e,i)},destroy:function(){this.world=null,this.scene=null,this.sys=null}});t.exports=g},function(t,e,i){ 6662/** 6663 * @author Richard Davey <[email protected]> 6664 * @copyright 2020 Photon Storm Ltd. 6665 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6666 */ 6667var n=i(534),r=i(2),s=i(3);t.exports=function(t,e,i,o){void 0===i&&(i={}),void 0===o&&(o=!0);var a=e.x,h=e.y;if(e.body={temp:!0,position:{x:a,y:h}},[n.Bounce,n.Collision,n.Force,n.Friction,n.Gravity,n.Mass,n.Sensor,n.SetBody,n.Sleep,n.Static,n.Transform,n.Velocity].forEach((function(t){for(var i in t)(n=t[i]).get&&"function"==typeof n.get||n.set&&"function"==typeof n.set?Object.defineProperty(e,i,{get:t[i].get,set:t[i].set}):Object.defineProperty(e,i,{value:t[i]});var n})),e.world=t,e._tempVec2=new s(a,h),i.hasOwnProperty("type")&&"body"===i.type)e.setExistingBody(i,o);else{var u=r(i,"shape",null);u||(u="rectangle"),i.addToWorld=o,e.setBody(u,i)}return e}},function(t,e,i){ 6668/** 6669 * @author Richard Davey <[email protected]> 6670 * @copyright 2020 Photon Storm Ltd. 6671 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6672 */ 6673var n=i(0),r=i(534),s=i(15),o=i(2),a=i(124),h=i(171),u=i(3),l=new n({Extends:a,Mixins:[r.Bounce,r.Collision,r.Force,r.Friction,r.Gravity,r.Mass,r.Sensor,r.SetBody,r.Sleep,r.Static,r.Transform,r.Velocity,h],initialize:function(t,e,i,n,r,a){s.call(this,t.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(n,r),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new u(e,i);var h=o(a,"shape",null);h?this.setBody(h,a):this.setRectangle(this.width,this.height,a),this.setPosition(e,i),this.initPipeline()}});t.exports=l},function(t,e,i){ 6674/** 6675 * @author Richard Davey <[email protected]> 6676 * @copyright 2020 Photon Storm Ltd. 6677 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6678 */ 6679var n=i(162),r=i(0),s=i(534),o=i(15),a=i(2),h=i(171),u=i(73),l=i(3),c=new r({Extends:u,Mixins:[s.Bounce,s.Collision,s.Force,s.Friction,s.Gravity,s.Mass,s.Sensor,s.SetBody,s.Sleep,s.Static,s.Transform,s.Velocity,h],initialize:function(t,e,
vendor: 2,223 bytes, lines 6679-6685
6679i,r,s,h){o.call(this,t.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new n(this),this.setTexture(r,s),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new l(e,i);var u=a(h,"shape",null);u?this.setBody(u,h):this.setRectangle(this.width,this.height,h),this.setPosition(e,i),this.initPipeline()}});t.exports=c},function(t,e,i){ 6680/** 6681 * @author Richard Davey <[email protected]> 6682 * @copyright 2020 Photon Storm Ltd. 6683 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6684 */ 6685var n=i(117),r=i(0),s=i(163),o=i(246),a=i(587),h=i(586),u=i(49),l=i(143),c=i(267),f=i(3),d=i(94),p=new r({initialize:function(t,e,i){void 0===i&&(i={}),this.scene=t,this.world=e,this.camera=null,this.pointer=null,this.active=!0,this.position=new f,this.body=null,this.part=null,this.constraint=o.create(l(i,{label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}})),this.world.on(h.BEFORE_UPDATE,this.update,this),t.sys.input.on(u.POINTER_DOWN,this.onDown,this),t.sys.input.on(u.POINTER_UP,this.onUp,this)},onDown:function(t){this.pointer||(this.pointer=t,this.camera=t.camera)},onUp:function(t){t===this.pointer&&(this.pointer=null)},getBody:function(t){var e=this.position,i=this.constraint;this.camera.getWorldPoint(t.x,t.y,e);for(var r=s.allBodies(this.world.localWorld),o=0;o<r.length;o++){var u=r[o];if(!u.ignorePointer&&n.contains(u.bounds,e)&&a.canCollide(u.collisionFilter,i.collisionFilter)&&this.hitTestBody(u,e))return this.world.emit(h.DRAG_START,u,this.part,this),!0}return!1},hitTestBody:function(t,e){for(var i=this.constraint,n=t.parts.length,r=n>1?1:0;r<n;r++){var s=t.parts[r];if(d.contains(s.vertices,e))return i.pointA=e,i.pointB={x:e.x-t.position.x,y:e.y-t.position.y},i.bodyB=t,i.angleB=t.angle,c.set(t,!1),this.part=s,this.body=t,!0}return!1},update:function(){var t=this.pointer,e=this.body;if(this.active&&t)if(t.isDown||!e){if(t.isDown){if(!e&&!this.getBody(t))return;e=this.body;var i=this.position,n=this.constraint;this.camera.getWorldPoint(t.x,t.y,i),n.pointA.x=i.x,n.pointA.y=i.y,c.set(e,!1),this.world.emit(h.DRAG,e,this)}}
6685else this.stopDrag();else e&&this.stopDrag()},stopDrag:function(){var t=this.body,e=this.constraint;e.bodyB=null,e.pointB=null,this.pointer=null,this.body=null,this.part=null,t&&this.world.emit(h.DRAG_END,t,this)},destroy:function(){this.world.removeConstraint(this.constraint),this.pointer=null,this.constraint=null,this.body=null,this.part=null,this.world.off(h.BEFORE_UPDATE,this.update),this.scene.sys.input.off(u.POINTER_DOWN,this.onDown,this),this.scene.sys.input.off(u.POINTER_UP,this.onUp,this)}});t.exports=p},function(t,e,i){var n={};t.exports=n;var r=i(1392),s=i(50);n.name="matter-js",n.version="0.14.2",n.uses=[],n.used=[],n.use=function(){r.use(n,Array.prototype.slice.call(arguments))},n.before=function(t,e){return t=t.replace(/^Matter./,""),s.chainPathBefore(n,t,e)},n.after=function(t,e){return t=t.replace(/^Matter./,""),s.chainPathAfter(n,t,e)}},function(t,e,i){var n={};t.exports=n;var r=i(116),s=i(588),o=i(117),a=i(126),h=i(94);n.collides=function(t,e){for(var i=[],n=0;n<e.length;n++){var r=e[n];if(t!==r&&o.overlaps(r.bounds,t.bounds))for(var a=1===r.parts.length?0:1;a<r.parts.length;a++){var h=r.parts[a];if(o.overlaps(h.bounds,t.bounds)){var u=s.collides(h,t);if(u.collided){i.push(u);break}}}}return i},n.ray=function(t,e,i,s){s=s||1e-100;for(var o=r.angle(e,i),h=r.magnitude(r.sub(e,i)),u=.5*(i.x+e.x),l=.5*(i.y+e.y),c=a.rectangle(u,l,h,s,{angle:o}),f=n.collides(c,t),d=0;d<f.length;d+=1){var p=f[d];p.body=p.bodyB=p.bodyA}return f},n.region=function(t,e,i){for(var n=[],r=0;r<t.length;r++){var s=t[r],a=o.overlaps(s.bounds,e);(a&&!i||!a&&i)&&n.push(s)}return n},n.point=function(t,e){for(var i=[],n=0;n<t.length;n++){var r=t[n];if(o.contains(r.bounds,e))for(var s=1===r.parts.length?0:1;s<r.parts.length;s++){var a=r.parts[s];if(o.contains(a.bounds,e)&&h.contains(a.vertices,e)){i.push(r);break}}}return i}},function(t,e,i){var n={};t.exports=n;var r=i(1393),s=i(267),o=i(1396),a=i(1395),h=i(1528),u=i(1394),l=i(268),c=i(163),f=i(246),d=i(50),p=i(71);n.create=function(t,e){e=(e=d.isElement(t)?e:t)||{},((t=d.isElement(t)?t:null)||e.render)&&d.warn("Engine.create: engine.render is deprecated (see docs)");var i={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},timing:{timestamp:0,timeScale:1},broadphase:{controller:u}},n=d.extend(i,e);return n.world=e.world||r.create(n.world),n.pairs=a.create(),n.broadphase=n.broadphase.controller.create(n.broadphase),n.metrics=n.metrics||{extended:!1},n.metrics=h.create(n.metrics),n},n.update=function(t,e,i){e=e||1e3/60,i=i||1;var r,u=t.world,d=t.timing,p=t.broadphase,v=[];d.timestamp+=e*d.timeScale;var g={timestamp:d.timestamp};l.trigger(t,"beforeUpdate",g);var m=c.allBodies(u),y=c.allConstraints(u);for(h.reset(t.metrics),t.enableSleeping&&s.update(m,d.timeScale),n._bodiesApplyGravity(m,u.gravity),n._bodiesUpdate(m,e,d.timeScale,i,u.bounds),f.preSolveAll(m),r=0;r<t.constraintIterations;r++)f.solveAll(y,d.timeScale);f.postSolveAll(m),p.controller?(u.isModified&&p.controller.clear(p),p.controller.update(p,m,t,u.isModified),v=p.pairsList):v=m,u.isModified&&c.setModified(u,!1,!1,!0);var x=p.detector(v,t),w=t.pairs,_=d.timestamp;for(a.update(w,x,_),a.removeOld(w,_),t.enableSleeping&&s.afterCollisions(w.list,d.timeScale),w.collisionStart.length>0&&l.trigger(t,"collisionStart",{pairs:w.collisionStart}),o.preSolvePosition(w.list),r=0;r<t.positionIterations;r++)o.solvePosition(w.list,m,d.timeScale);for(o.postSolvePosition(m),f.preSolveAll(m),r=0;r<t.constraintIterations;r++)f.solveAll(y,d.timeScale);for(f.postSolveAll(m),o.preSolveVelocity(w.list),r=0;r<t.velocityIterations;r++)o.solveVelocity(w.list,d.timeScale);return w.collisionActive.length>0&&l.trigger(t,"collisionActive",{pairs:w.collisionActive}),w.collisionEnd.length>0&&l.trigger(t,"collisionEnd",{pairs:w.collisionEnd}),h.update(t.metrics,t),n._bodiesClearForces(m),l.trigger(t,"afterUpdate",g),t},n.merge=function(t,e){if(d.extend(t,e),e.world){t.world=e.world,n.clear(t);for(var i=c.allBodies(t.world),r=0;r<i.length;r++){var o=i[r];s.set(o,!1),o.id=d.nextId()}}},n.clear=function(t){var e=t.world;a.clear(t.pairs);var i=t.broadphase;if(i.controller){var n=c.allBodies(e);i.controller.clear(i),i.controller.update(i,n,t,!0)}},n._bodiesClearForces=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.force.x=0,i.force.y=0,i.torque=0}},n._bodiesApplyGravity=function(t,e){var i=void 0!==e.scale?e.scale:.001;if((0!==e.x||0!==e.y)&&0!==i)for(var n=0;n<t.length;n++){var r=t[n];r.ignoreGravity||r.isStatic||r.isSleeping||(r.force.x+=r.mass*e.x*i*r.gravityScale.x,r.force.y+=r.mass*e.y*i*r.gravityScale.y)}}
vendor: 4,438 bytes, lines 6685-6691
6685,n._bodiesUpdate=function(t,e,i,n,r){for(var s=0;s<t.length;s++){var o=t[s];o.isStatic||o.isSleeping||p.update(o,e,i,n)}}},function(t,e,i){ 6686/** 6687 * @author Richard Davey <[email protected]> 6688 * @copyright 2020 Photon Storm Ltd. 6689 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6690 */ 6691var n=i(126),r=i(71),s=i(0),o=i(50),a=i(163),h=i(1495),u=i(9),l=i(586),c=i(2),f=i(6),d=i(71),p=i(268),v=i(1390),g=i(1393),m=i(116),y=new s({Extends:u,initialize:function(t,e){u.call(this),this.scene=t,this.engine=h.create(e),this.localWorld=this.engine.world;var i=f(e,"gravity",null);i?this.setGravity(i.x,i.y,i.scale):!1===i&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=f(e,"enabled",!0),this.correction=f(e,"correction",1),this.getDelta=f(e,"getDelta",this.update60Hz);var n=c(e,"runner",{}),r=c(n,"fps",!1),s=c(n,"fps",60),o=c(n,"delta",1e3/s),a=c(n,"deltaMin",1e3/s),l=c(n,"deltaMax",1e3/(.5*s));r||(s=1e3/o),this.runner={fps:s,correction:c(n,"correction",1),deltaSampleSize:c(n,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:c(n,"isFixed",!1),delta:o,deltaMin:a,deltaMax:l},this.autoUpdate=f(e,"autoUpdate",!0);var d=f(e,"debug",!1);if(this.drawDebug="object"==typeof d||d,this.debugGraphic,this.debugConfig={showAxes:c(d,"showAxes",!1),showAngleIndicator:c(d,"showAngleIndicator",!1),angleColor:c(d,"angleColor",15208787),showBroadphase:c(d,"showBroadphase",!1),broadphaseColor:c(d,"broadphaseColor",16757760),showBounds:c(d,"showBounds",!1),boundsColor:c(d,"boundsColor",16777215),showVelocity:c(d,"showVelocity",!1),velocityColor:c(d,"velocityColor",44783),showCollisions:c(d,"showCollisions",!1),collisionColor:c(d,"collisionColor",16094476),showSeparations:c(d,"showSeparations",!1),separationColor:c(d,"separationColor",16753920),showBody:c(d,"showBody",!0),showStaticBody:c(d,"showStaticBody",!0),showInternalEdges:c(d,"showInternalEdges",!1),renderFill:c(d,"renderFill",!1),renderLine:c(d,"renderLine",!0),fillColor:c(d,"fillColor",1075465),fillOpacity:c(d,"fillOpacity",1),lineColor:c(d,"lineColor",2678297),lineOpacity:c(d,"lineOpacity",1),lineThickness:c(d,"lineThickness",1),staticFillColor:c(d,"staticFillColor",857979),staticLineColor:c(d,"staticLineColor",1255396),showSleeping:c(d,"showSleeping",!1),staticBodySleepOpacity:c(d,"staticBodySleepOpacity",.7),sleepFillColor:c(d,"sleepFillColor",4605510),sleepLineColor:c(d,"sleepLineColor",10066585),showSensors:c(d,"showSensors",!0),sensorFillColor:c(d,"sensorFillColor",857979),sensorLineColor:c(d,"sensorLineColor",1255396),showPositions:c(d,"showPositions",!0),positionSize:c(d,"positionSize",4),positionColor:c(d,"positionColor",14697178),showJoint:c(d,"showJoint",!0),jointColor:c(d,"jointColor",14737474),jointLineOpacity:c(d,"jointLineOpacity",1),jointLineThickness:c(d,"jointLineThickness",2),pinSize:c(d,"pinSize",4),pinColor:c(d,"pinColor",4382944),springColor:c(d,"springColor",14697184),anchorColor:c(d,"anchorColor",15724527),anchorSize:c(d,"anchorSize",4),showConvexHulls:c(d,"showConvexHulls",!1),hullColor:c(d,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),c(e,"setBounds",!1)){var p=e.setBounds;if("boolean"==typeof p)this.setBounds();else{var v=c(p,"x",0),g=c(p,"y",0),m=c(p,"width",t.sys.scale.width),y=c(p,"height",t.sys.scale.height),x=c(p,"thickness",64),w=c(p,"left",!0),_=c(p,"right",!0),b=c(p,"top",!0),T=c(p,"bottom",!0);this.setBounds(v,g,m,y,x,w,_,b,T)}}},setCompositeRenderStyle:function(t){var e,i,n,r=t.bodies,s=t.constraints,o=t.composites;for(e=0;e<r.length;e++)n=(i=r[e]).render,this.setBodyRenderStyle(i,n.lineColor,n.lineOpacity,n.lineThickness,n.fillColor,n.fillOpacity);for(e=0;e<s.length;e++)n=(i=s[e]).render,this.setConstraintRenderStyle(i,n.lineColor,n.lineOpacity,n.lineThickness,n.pinSize,n.anchorColor,n.anchorSize);for(e=0;e<o.length;e++)i=o[e],this.setCompositeRenderStyle(i);return this},setBodyRenderStyle:function(t,e,i,n,r,s){var o=t.render,a=this.debugConfig;return o?(null==e&&(e=t.isStatic?a.staticLineColor:a.lineColor),null==i&&(i=a.lineOpacity),null==n&&(n=a.lineThickness),null==r&&(r=t.isStatic?a.staticFillColor:a.fillColor),null==s&&(s=a.fillOpacity),!1!==e&&(o.lineColor=e),!1!==i&&(o.lineOpacity=i),!1!==n&&(o.lineThickness=n),!1!==r&&(o.fillColor=r),!1!==s&&(o.fillOpacity=s),this):this}
6691,setConstraintRenderStyle:function(t,e,i,n,r,s,o){var a=t.render,h=this.debugConfig;if(!a)return this;if(null==e){var u=a.type;"line"===u?e=h.jointColor:"pin"===u?e=h.pinColor:"spring"===u&&(e=h.springColor)}return null==i&&(i=h.jointLineOpacity),null==n&&(n=h.jointLineThickness),null==r&&(r=h.pinSize),null==s&&(s=h.anchorColor),null==o&&(o=h.anchorSize),!1!==e&&(a.lineColor=e),!1!==i&&(a.lineOpacity=i),!1!==n&&(a.lineThickness=n),!1!==r&&(a.pinSize=r),!1!==s&&(a.anchorColor=s),!1!==o&&(a.anchorSize=o),this},setEventsProxy:function(){var t=this,e=this.engine,i=this.localWorld;this.drawDebug&&(p.on(i,"compositeModified",(function(e){t.setCompositeRenderStyle(e)})),p.on(i,"beforeAdd",(function(e){for(var i=[].concat(e.object),n=0;n<i.length;n++){var r=i[n],s=r.render;"body"===r.type?t.setBodyRenderStyle(r,s.lineColor,s.lineOpacity,s.lineThickness,s.fillColor,s.fillOpacity):"composite"===r.type?t.setCompositeRenderStyle(r):"constraint"===r.type&&t.setConstraintRenderStyle(r,s.lineColor,s.lineOpacity,s.lineThickness,s.pinSize,s.anchorColor,s.anchorSize)}}))),p.on(i,"beforeAdd",(function(e){t.emit(l.BEFORE_ADD,e)})),p.on(i,"afterAdd",(function(e){t.emit(l.AFTER_ADD,e)})),p.on(i,"beforeRemove",(function(e){t.emit(l.BEFORE_REMOVE,e)})),p.on(i,"afterRemove",(function(e){t.emit(l.AFTER_REMOVE,e)})),p.on(e,"beforeUpdate",(function(e){t.emit(l.BEFORE_UPDATE,e)})),p.on(e,"afterUpdate",(function(e){t.emit(l.AFTER_UPDATE,e)})),p.on(e,"collisionStart",(function(e){var i,n,r=e.pairs;r.length>0&&(i=r[0].bodyA,n=r[0].bodyB),t.emit(l.COLLISION_START,e,i,n)})),p.on(e,"collisionActive",(function(e){var i,n,r=e.pairs;r.length>0&&(i=r[0].bodyA,n=r[0].bodyB),t.emit(l.COLLISION_ACTIVE,e,i,n)})),p.on(e,"collisionEnd",(function(e){var i,n,r=e.pairs;r.length>0&&(i=r[0].bodyA,n=r[0].bodyB),t.emit(l.COLLISION_END,e,i,n)}))},setBounds:function(t,e,i,n,r,s,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===r&&(r=64),void 0===s&&(s=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(s,"left",t-r,e-r,r,n+2*r),this.updateWall(o,"right",t+i,e-r,r,n+2*r),this.updateWall(a,"top",t,e-r,i,r),this.updateWall(h,"bottom",t,e+n,i,r),this},updateWall:function(t,e,i,n,r,s){var o=this.walls[e];t?(o&&g.remove(this.localWorld,o),i+=r/2,n+=s/2,this.walls[e]=this.create(i,n,r,s,{isStatic:!0,friction:0,frictionStatic:0})):(o&&g.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,r,s){var o=n.rectangle(t,e,i,r,s);return g.add(this.localWorld,o),o},add:function(t){return g.add(this.localWorld,t),this},remove:function(t,e){Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i],r=n.body?n.body:n;a.remove(this.localWorld,r,e)}return this},removeConstraint:function(t,e){return a.remove(this.localWorld,t,e),this},convertTilemapLayer:function(t,e){var i=t.layer,n=t.getTilesWithin(0,0,i.width,i.height,{isColliding:!0});return this.convertTiles(n,e),this},convertTiles:function(t,e){if(0===t.length)return this;for(var i=0;i<t.length;i++)new v(this,t[i],e);return this},nextGroup:function(t){return d.nextGroup(t)},nextCategory:function(){return d.nextCategory()},pause:function(){return this.enabled=!1,this.emit(l.PAUSE),this},resume:function(){return this.enabled=!0,this.emit(l.RESUME),this},update:function(t,e){if(this.enabled&&this.autoUpdate){var i=this.engine,n=this.runner,r=i.timing,s=this.correction;n.isFixed?e=this.getDelta(t,e):(e=t-n.timePrev||n.delta,n.timePrev=t,n.deltaHistory.push(e),n.deltaHistory=n.deltaHistory.slice(-n.deltaSampleSize),s=(e=(e=(e=Math.min.apply(null,n.deltaHistory)
vendor: 4,565 bytes, line 6691
6691)<n.deltaMin?n.deltaMin:e)>n.deltaMax?n.deltaMax:e)/n.delta,n.delta=e),0!==n.timeScalePrev&&(s*=r.timeScale/n.timeScalePrev),0===r.timeScale&&(s=0),n.timeScalePrev=r.timeScale,n.correction=s,n.frameCounter+=1,t-n.counterTimestamp>=1e3&&(n.fps=n.frameCounter*((t-n.counterTimestamp)/1e3),n.counterTimestamp=t,n.frameCounter=0),h.update(i,e,s)}},step:function(t,e){h.update(this.engine,t,e)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(t){var e=t.hasOwnProperty("body")?t.body:t;return null!==a.get(this.localWorld,e.id,e.type)},getAllBodies:function(){return a.allBodies(this.localWorld)},getAllConstraints:function(){return a.allConstraints(this.localWorld)},getAllComposites:function(){return a.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var t=this.debugConfig,e=this.engine,i=this.debugGraphic,n=a.allBodies(this.localWorld);this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(n,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(n),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(n,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(n,i,t.velocityColor,1,2),t.showSeparations&&this.renderSeparations(e.pairs.list,i,t.separationColor),t.showCollisions&&this.renderCollisions(e.pairs.list,i,t.collisionColor)}},renderGrid:function(t,e,i,n){e.lineStyle(1,i,n);for(var r=o.keys(t.buckets),s=0;s<r.length;s++){var a=r[s];if(!(t.buckets[a].length<2)){var h=a.split(/C|R/);e.strokeRect(parseInt(h[1],10)*t.bucketWidth,parseInt(h[2],10)*t.bucketHeight,t.bucketWidth,t.bucketHeight)}}return this},renderSeparations:function(t,e,i){e.lineStyle(1,i,1);for(var n=0;n<t.length;n++){var r=t[n];if(r.isActive){var s=r.collision,o=s.bodyA,a=s.bodyB,h=o.position,u=a.position,l=s.penetration,c=o.isStatic||a.isStatic?1:4;a.isStatic&&(c=0),e.lineBetween(u.x,u.y,u.x-l.x*c,u.y-l.y*c),c=o.isStatic||a.isStatic?1:4,o.isStatic&&(c=0),e.lineBetween(h.x,h.y,h.x-l.x*c,h.y-l.y*c)}}return this},renderCollisions:function(t,e,i){var n,r;for(e.lineStyle(1,i,.5),e.fillStyle(i,1),n=0;n<t.length;n++)if((r=t[n]).isActive)for(var s=0;s<r.activeContacts.length;s++){var o=r.activeContacts[s].vertex;e.fillRect(o.x-2,o.y-2,5,5)}for(n=0;n<t.length;n++)if((r=t[n]).isActive){var a=r.collision,h=r.activeContacts;if(h.length>0){var u=h[0].vertex.x,l=h[0].vertex.y;2===h.length&&(u=(h[0].vertex.x+h[1].vertex.x)/2,l=(h[0].vertex.y+h[1].vertex.y)/2),a.bodyB===a.supports[0].body||a.bodyA.isStatic?e.lineBetween(u-8*a.normal.x,l-8*a.normal.y,u,l):e.lineBetween(u+8*a.normal.x,l+8*a.normal.y,u,l)}}return this},renderBodyBounds:function(t,e,i,n){e.lineStyle(1,i,n);for(var r=0;r<t.length;r++){var s=t[r];if(s.render.visible){var o=s.bounds;if(o)e.strokeRect(o.min.x,o.min.y,o.max.x-o.min.x,o.max.y-o.min.y);else for(var a=s.parts,h=a.length>1?1:0;h<a.length;h++){var u=a[h];e.strokeRect(u.bounds.min.x,u.bounds.min.y,u.bounds.max.x-u.bounds.min.x,u.bounds.max.y-u.bounds.min.y)}}}return this},renderBodyAxes:function(t,e,i,n,r){e.lineStyle(1,n,r);for(var s=0;s<t.length;s++){var o,a,h,u=t[s],l=u.parts;if(u.render.visible)if(i)for(a=l.length>1?1:0;a<l.length;a++)for(o=l[a],h=0;h<o.axes.length;h++){var c=o.axes[h];e.lineBetween(o.position.x,o.position.y,o.position.x+20*c.x,o.position.y+20*c.y)}else for(a=l.length>1?1:0;a<l.length;a++)for(o=l[a],h=0;h<o.axes.length;h++)e.lineBetween(o.position.x,o.position.y,(o.vertices[0].x+o.vertices[o.vertices.length-1].x)/2,(o.vertices[0].y+o.vertices[o.vertices.length-1].y)/2)}return this},renderBodyVelocity:function(t,e,i,n,r){e.lineStyle(r,i,n);for(var s=0;s<t.length;s++){var o=t[s];o.render.visible&&e.lineBetween(o.position.x,o.position.y,o.position.x+2*(o.position.x-o.positionPrev.x),o.position.y+2*(o.position.y-o.positionPrev.y))}return this},renderBodies:function(t){for(var e=this.debugGraphic,i=this.debugConfig,n=i.showBody,r=i.showStaticBody,s=i.showSleeping,o=i.showInternalEdges,a=i.showConvexHulls,h=i.renderFill,u=i.renderLine,l=i.staticBodySleepOpacity,c=i.sleepFillColor,f=i.sleepLineColor,d=i.hullColor,p=0;p<t.length;p++){var v=t[p];if(v.render.visible&&(r||!v.isStatic)&&(n||v.isStatic)){var g=v.render.lineColor,m=v.render.lineOpacity,y=v.render.lineThickness,x=v.render.fillColor,w=v.render.fillOpacity;s&&v.isSleeping&&(v.isStatic?(m*=l,w*=l):(g=f,x=c)),h||(x=null),u||(g=null),this.renderBody(v,e,o,g,m,y,x,w);var _=v.parts.length;a&&_>1&&this.renderConvexHull(v,e,d,y)}}}
vendor: 5,124 bytes, lines 6691-6715
6691,renderBody:function(t,e,i,n,r,s,o,a){void 0===n&&(n=null),void 0===r&&(r=null),void 0===s&&(s=1),void 0===o&&(o=null),void 0===a&&(a=null);for(var h=this.debugConfig,u=h.sensorFillColor,l=h.sensorLineColor,c=t.parts,f=c.length,d=f>1?1:0;d<f;d++){var p=c[d],v=p.render,g=v.opacity;if(v.visible&&0!==g&&(!p.isSensor||h.showSensors)){var m=p.circleRadius;if(e.beginPath(),p.isSensor?(null!==o&&e.fillStyle(u,a*g),null!==n&&e.lineStyle(s,l,r*g)):(null!==o&&e.fillStyle(o,a*g),null!==n&&e.lineStyle(s,n,r*g)),m)e.arc(p.position.x,p.position.y,m,0,2*Math.PI);else{var y=p.vertices,x=y.length;e.moveTo(y[0].x,y[0].y);for(var w=1;w<x;w++){var _=y[w];if(!y[w-1].isInternal||i?e.lineTo(_.x,_.y):e.moveTo(_.x,_.y),w<x&&_.isInternal&&!i){var b=(w+1)%x;e.moveTo(y[b].x,y[b].y)}}e.closePath()}null!==o&&e.fillPath(),null!==n&&e.strokePath()}}if(h.showPositions&&!t.isStatic){var T=t.position.x,E=t.position.y,S=Math.ceil(h.positionSize/2);e.fillStyle(h.positionColor,1),e.fillRect(T-S,E-S,h.positionSize,h.positionSize)}return this},renderConvexHull:function(t,e,i,n){if(void 0===n&&(n=1),t.parts.length>1){var r=t.vertices;e.lineStyle(n,i),e.beginPath(),e.moveTo(r[0].x,r[0].y);for(var s=1;s<r.length;s++)e.lineTo(r[s].x,r[s].y);e.lineTo(r[0].x,r[0].y),e.strokePath()}return this},renderJoints:function(){for(var t=this.debugGraphic,e=a.allConstraints(this.localWorld),i=0;i<e.length;i++){var n=e[i].render,r=n.lineColor,s=n.lineOpacity,o=n.lineThickness,h=n.pinSize,u=n.anchorColor,l=n.anchorSize;this.renderConstraint(e[i],t,r,s,o,h,u,l)}},renderConstraint:function(t,e,i,n,r,s,a,h){var u=t.render;if(!u.visible||!t.pointA||!t.pointB)return this;e.lineStyle(r,i,n);var l,c,f=t.bodyA,d=t.bodyB;if(l=f?m.add(f.position,t.pointA):t.pointA,"pin"===u.type)e.strokeCircle(l.x,l.y,s);else{if(c=d?m.add(d.position,t.pointB):t.pointB,e.beginPath(),e.moveTo(l.x,l.y),"spring"===u.type)for(var p,v=m.sub(c,l),g=m.perp(m.normalise(v)),y=Math.ceil(o.clamp(t.length/5,12,20)),x=1;x<y;x+=1)p=x%2==0?1:-1,e.lineTo(l.x+v.x*(x/y)+g.x*p*4,l.y+v.y*(x/y)+g.y*p*4);e.lineTo(c.x,c.y)}return e.strokePath(),u.anchors&&h>0&&(e.fillStyle(a),e.fillCircle(l.x,l.y,h),e.fillCircle(c.x,c.y,h)),this},resetCollisionIDs:function(){return r._nextCollidingGroupId=1,r._nextNonCollidingGroupId=-1,r._nextCategory=1,this},shutdown:function(){p.off(this.engine),this.removeAllListeners(),g.clear(this.localWorld,!1),h.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});t.exports=y},function(t,e,i){(function(e){ 6692/** 6693 * @author Richard Davey <[email protected]> 6694 * @copyright 2020 Photon Storm Ltd. 6695 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6696 */ 6697i(590);var n=i(32),r=i(17),s={Actions:i(269),Animations:i(699),BlendModes:i(34),Cache:i(711),Cameras:i(714),Core:i(803),Class:i(0),Create:i(884),Curves:i(890),Data:i(892),Display:i(894),DOM:i(913),Events:i(914),Game:i(916),GameObjects:i(1007),Geom:i(477),Input:i(1302),Loader:i(1332),Math:i(190),Physics:i(1498),Plugins:i(1397),Renderer:i(1399),Scale:i(1406),ScaleModes:i(164),Scene:i(412),Scenes:i(1407),Structs:i(1409),Textures:i(1410),Tilemaps:i(1412),Time:i(1454),Tweens:i(1456),Utils:i(1474)};s.Sound=i(1485),s=r(!1,s,n),t.exports=s,e.Phaser=s}).call(this,i(589))},function(t,e,i){ 6698/** 6699 * @author Richard Davey <[email protected]> 6700 * @copyright 2020 Photon Storm Ltd. 6701 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6702 */ 6703t.exports={Arcade:i(1360),Matter:i(1499)}},function(t,e,i){ 6704/** 6705 * @author Richard Davey <[email protected]> 6706 * @copyright 2020 Photon Storm Ltd. 6707 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6708 */ 6709t.exports={BodyBounds:i(1486),Components:i(534),Events:i(586),Factory:i(1488),MatterGameObject:i(1489),Image:i(1490),Matter:i(1391),MatterPhysics:i(1529),PolyDecomp:i(1487),Sprite:i(1491),TileBody:i(1390),PhysicsEditorParser:i(1386),PhysicsJSONParser:i(1387),PointerConstraint:i(1492),World:i(1496)}},function(t,e){t.exports={setBounce:function(t){return this.body.restitution=t,this}}},function(t,e){ 6710/** 6711 * @author Richard Davey <[email protected]> 6712 * @copyright 2020 Photon Storm Ltd. 6713 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6714 */ 6715var i={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i<t.length;i++)e|=t[i];else e=t;return this.body.collisionFilter.mask=e,this},setOnCollide:function(t){return this.body.onCollideCallback=t,this},setOnCollideEnd:function(t){return this.body.onCollideEndCallback=t,this},setOnCollideActive:function(t){return this.body.onCollideActiveCallback=t,this},setOnCollideWith:function(t,e){Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i].hasOwnProperty("body")?t[i].body:t[i];this.body.setOnCollideWith(n,e)}return this}};t.exports=i}
vendor: 4,519 bytes, lines 6715-6733
6715,function(t,e,i){ 6716/** 6717 * @author Richard Davey <[email protected]> 6718 * @copyright 2020 Photon Storm Ltd. 6719 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6720 */ 6721var n=i(71),r={applyForce:function(t){return this._tempVec2.set(this.body.position.x,this.body.position.y),n.applyForce(this.body,this._tempVec2,t),this},applyForceFrom:function(t,e){return n.applyForce(this.body,t,e),this},thrust:function(t){var e=this.body.angle;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(t){var e=this.body.angle-Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(t){var e=this.body.angle+Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(t){var e=this.body.angle-Math.PI;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};t.exports=r},function(t,e){t.exports={setFriction:function(t,e,i){return this.body.friction=t,void 0!==e&&(this.body.frictionAir=e),void 0!==i&&(this.body.frictionStatic=i),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}}},function(t,e){t.exports={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}}},function(t,e,i){ 6722/** 6723 * @author Richard Davey <[email protected]> 6724 * @copyright 2020 Photon Storm Ltd. 6725 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6726 */ 6727var n=i(71),r=i(3),s={setMass:function(t){return n.setMass(this.body,t),this},setDensity:function(t){return n.setDensity(this.body,t),this},centerOfMass:{get:function(){return new r(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};t.exports=s},function(t,e){t.exports={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}}},function(t,e,i){ 6728/** 6729 * @author Richard Davey <[email protected]> 6730 * @copyright 2020 Photon Storm Ltd. 6731 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6732 */ 6733var n=i(126),r=i(71),s=i(123),o=i(2),a=i(1386),h=i(1387),u=i(94),l={setRectangle:function(t,e,i){return this.setBody({type:"rectangle",width:t,height:e},i)},setCircle:function(t,e){return this.setBody({type:"circle",radius:t},e)},setPolygon:function(t,e,i){return this.setBody({type:"polygon",sides:e,radius:t},i)},setTrapezoid:function(t,e,i,n){return this.setBody({type:"trapezoid",width:t,height:e,slope:i},n)},setExistingBody:function(t,e){void 0===e&&(e=!0),this.body&&this.world.remove(this.body,!0),this.body=t;for(var i=0;i<t.parts.length;i++)t.parts[i].gameObject=this;var n=this;if(t.destroy=function(){n.world.remove(n.body,!0),n.body.gameObject=null},e&&(this.world.has(t)&&this.world.remove(t,!0),this.world.add(t)),this._originComponent){var r=t.render.sprite.xOffset,o=t.render.sprite.yOffset,a=t.centerOfMass.x,h=t.centerOfMass.y;if(s(a,.5)&&s(h,.5))this.setOrigin(r+.5,o+.5);else{var u=t.centerOffset.x,l=t.centerOffset.y;this.setOrigin(r+u/this.displayWidth,o+l/this.displayHeight)}}return this},setBody:function(t,e){if(!t)return this;var i;"string"==typeof t&&(t={type:t});var s=o(t,"type","rectangle"),l=o(t,"x",this._tempVec2.x),c=o(t,"y",this._tempVec2.y),f=o(t,"width",this.width),d=o(t,"height",this.height);switch(s){case"rectangle":i=n.rectangle(l,c,f,d,e);break;case"circle":var p=o(t,"radius",Math.max(f,d)/2),v=o(t,"maxSides",25);i=n.circle(l,c,p,e,v);break;case"trapezoid":var g=o(t,"slope",.5);i=n.trapezoid(l,c,f,d,g,e);break;case"polygon":var m=o(t,"sides",5),y=o(t,"radius",Math.max(f,d)/2);i=n.polygon(l,c,m,y,e);break;case"fromVertices":case"fromVerts":var x=o(t,"verts",null);if(x)if("string"==typeof x&&(x=u.fromPath(x)),this.body&&!this.body.hasOwnProperty("temp"))r.setVertices(this.body,x),i=this.body;else{var w=o(t,"flagInternal",!1),_=o(t,"removeCollinear",.01),b=o(t,"minimumArea",10);i=n.fromVertices(l,c,x,e,w,_,b)}break;case"fromPhysicsEditor":i=a.parseBody(l,c,t,e);break;case"fromPhysicsTracer":i=h.parseBody(l,c,t,e)}return i&&this.setExistingBody(i,t.addToWorld),this}};t.exports=l}
6733,function(t,e,i){ 6734/** 6735 * @author Richard Davey <[email protected]> 6736 * @copyright 2020 Photon Storm Ltd. 6737 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6738 */ 6739var n=i(586),r=i(267),s=i(268),o={setToSleep:function(){r.set(this.body,!0)},setAwake:function(){r.set(this.body,!1)},setSleepThreshold:function(t){return void 0===t&&(t=60),this.body.sleepThreshold=t,this},setSleepEvents:function(t,e){return this.setSleepStartEvent(t),this.setSleepEndEvent(e),this},setSleepStartEvent:function(t){if(t){var e=this.world;s.on(this.body,"sleepStart",(function(t){e.emit(n.SLEEP_START,t,this)}))}else s.off(this.body,"sleepStart");return this},setSleepEndEvent:function(t){if(t){var e=this.world;s.on(this.body,"sleepEnd",(function(t){e.emit(n.SLEEP_END,t,this)}))}else s.off(this.body,"sleepEnd");return this}};t.exports=o},function(t,e){ 6740/** 6741 * @author Richard Davey <[email protected]> 6742 * @copyright 2020 Photon Storm Ltd. 6743 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6744 */ 6745t.exports="afteradd"},function(t,e){ 6746/** 6747 * @author Richard Davey <[email protected]> 6748 * @copyright 2020 Photon Storm Ltd. 6749 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6750 */ 6751t.exports="afterremove"},function(t,e){ 6752/** 6753 * @author Richard Davey <[email protected]> 6754 * @copyright 2020 Photon Storm Ltd. 6755 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6756 */ 6757t.exports="afterupdate"},function(t,e){ 6758/** 6759 * @author Richard Davey <[email protected]> 6760 * @copyright 2020 Photon Storm Ltd. 6761 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6762 */ 6763t.exports="beforeadd"},function(t,e){ 6764/** 6765 * @author Richard Davey <[email protected]> 6766 * @copyright 2020 Photon Storm Ltd. 6767 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6768 */ 6769t.exports="beforeremove"},function(t,e){ 6770/** 6771 * @author Richard Davey <[email protected]> 6772 * @copyright 2020 Photon Storm Ltd. 6773 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6774 */ 6775t.exports="beforeupdate"},function(t,e){ 6776/** 6777 * @author Richard Davey <[email protected]> 6778 * @copyright 2020 Photon Storm Ltd. 6779 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6780 */ 6781t.exports="collisionactive"},function(t,e){ 6782/** 6783 * @author Richard Davey <[email protected]> 6784 * @copyright 2020 Photon Storm Ltd. 6785 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6786 */ 6787t.exports="collisionend"},function(t,e){ 6788/** 6789 * @author Richard Davey <[email protected]> 6790 * @copyright 2020 Photon Storm Ltd. 6791 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6792 */ 6793t.exports="collisionstart"},function(t,e){ 6794/** 6795 * @author Richard Davey <[email protected]> 6796 * @copyright 2020 Photon Storm Ltd. 6797 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6798 */ 6799t.exports="dragend"},function(t,e){ 6800/** 6801 * @author Richard Davey <[email protected]> 6802 * @copyright 2020 Photon Storm Ltd. 6803 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6804 */ 6805t.exports="drag"},function(t,e){ 6806/** 6807 * @author Richard Davey <[email protected]> 6808 * @copyright 2020 Photon Storm Ltd. 6809 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6810 */ 6811t.exports="dragstart"},function(t,e){ 6812/** 6813 * @author Richard Davey <[email protected]> 6814 * @copyright 2020 Photon Storm Ltd. 6815 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6816 */ 6817t.exports="pause"},function(t,e){ 6818/** 6819 * @author Richard Davey <[email protected]> 6820 * @copyright 2020 Photon Storm Ltd. 6821 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6822 */ 6823t.exports="resume"},function(t,e){ 6824/** 6825 * @author Richard Davey <[email protected]> 6826 * @copyright 2020 Photon Storm Ltd. 6827 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6828 */
vendor: 8,548 bytes, lines 6829-6859
6829t.exports="sleepend"},function(t,e){ 6830/** 6831 * @author Richard Davey <[email protected]> 6832 * @copyright 2020 Photon Storm Ltd. 6833 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6834 */ 6835t.exports="sleepstart"},function(t,e,i){ 6836/** 6837 * @author Richard Davey <[email protected]> 6838 * @copyright 2020 Photon Storm Ltd. 6839 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6840 */ 6841var n=i(71),r={setStatic:function(t){return n.setStatic(this.body,t),this},isStatic:function(){return this.body.isStatic}};t.exports=r},function(t,e,i){ 6842/** 6843 * @author Richard Davey <[email protected]> 6844 * @copyright 2020 Photon Storm Ltd. 6845 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6846 */ 6847var n=i(71),r=i(14),s=i(265),o=i(266),a={x:{get:function(){return this.body.position.x},set:function(t){this._tempVec2.set(t,this.y),n.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(t){this._tempVec2.set(this.x,t),n.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4,n.scale(this.body,e,i),n.scale(this.body,t,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4,n.scale(this.body,e,i),n.scale(this.body,this._scaleX,t)}},angle:{get:function(){return o(this.body.angle*r.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*r.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(t){this._rotation=s(t),n.setAngle(this.body,this._rotation)}},setPosition:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this._tempVec2.set(t,e),n.setPosition(this.body,this._tempVec2),this},setRotation:function(t){return void 0===t&&(t=0),this._rotation=s(t),n.setAngle(this.body,t),this},setFixedRotation:function(){return n.setInertia(this.body,1/0),this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,n.setAngle(this.body,this.rotation),this},setScale:function(t,e,i){void 0===t&&(t=1),void 0===e&&(e=t);var r=1/this._scaleX,s=1/this._scaleY;return this._scaleX=t,this._scaleY=e,n.scale(this.body,r,s,i),n.scale(this.body,t,e,i),this}};t.exports=a},function(t,e,i){ 6848/** 6849 * @author Richard Davey <[email protected]> 6850 * @copyright 2020 Photon Storm Ltd. 6851 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6852 */ 6853var n=i(71),r={setAngularVelocity:function(t){return n.setAngularVelocity(this.body,t),this},setVelocityX:function(t){return this._tempVec2.set(t,this.body.velocity.y),n.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(t){return this._tempVec2.set(this.body.velocity.x,t),n.setVelocity(this.body,this._tempVec2),this},setVelocity:function(t,e){return this._tempVec2.set(t,e),n.setVelocity(this.body,this._tempVec2),this}};t.exports=r},function(t,e,i){var n={};t.exports=n;var r=i(163),s=i(50);n.create=function(t){return s.extend({extended:!1,narrowDetections:0,narrowphaseTests:0,narrowReuse:0,narrowReuseCount:0,midphaseTests:0,broadphaseTests:0,narrowEff:1e-4,midEff:1e-4,broadEff:1e-4,collisions:0,buckets:0,bodies:0,pairs:0},!1,t)},n.reset=function(t){t.extended&&(t.narrowDetections=0,t.narrowphaseTests=0,t.narrowReuse=0,t.narrowReuseCount=0,t.midphaseTests=0,t.broadphaseTests=0,t.narrowEff=0,t.midEff=0,t.broadEff=0,t.collisions=0,t.buckets=0,t.pairs=0,t.bodies=0)},n.update=function(t,e){if(t.extended){var i=e.world,n=r.allBodies(i);t.collisions=t.narrowDetections,t.pairs=e.pairs.list.length,t.bodies=n.length,t.midEff=(t.narrowDetections/(t.midphaseTests||1)).toFixed(2),t.narrowEff=(t.narrowDetections/(t.narrowphaseTests||1)).toFixed(2),t.broadEff=(1-t.broadphaseTests/(n.length||1)).toFixed(2),t.narrowReuse=(t.narrowReuseCount/(t.narrowphaseTests||1)).toFixed(2)}}},function(t,e,i){ 6854/** 6855 * @author Richard Davey <[email protected]> 6856 * @copyright 2020 Photon Storm Ltd. 6857 * @license {@link https://opensource.org/licenses/MIT|MIT License} 6858 */ 6859var n=i(122),r=i(585),s=i(126),o=i(71),a=i(1486),h=i(117),u=i(0),l=i(163),c=i(1388),f=i(246),d=i(587),p=i(48),v=i(1488),g=i(2),m=i(6),y=i(1394),x=i(1530),w=i(1531),_=i(1493),b=i(1532),T=i(143),E=i(535),S=i(1395),A=i(1392),C=i(24),O=i(1494),R=i(1396),M=i(588),P=i(21),I=i(1389),k=i(116),L=i(94),D=i(1496),F=new u({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=o,this.composite=l,this.detector=d,this.grid=y,this.pair=E,this.pairs=S,this.query=O,this.resolver=R,this.sat=M,this.constraint=f,this.bodies=s,this.composites=c,this.axes=r,this.bounds=h,this.svg=I,this.vector=k,this.vertices=L,this.verts=L,this._tempVec2=k.create(),m(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),m(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),m(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),R._restingThresh=m(this.config,"restingThresh",4),R._restingThreshTangent=m(this.config,"restingThreshTangent",6),R._positionDampen=m(this.config,"positionDampen",.9),R._positionWarming=m(this.config,"positionWarming",.8),R._frictionNormalMultiplier=m(this.config,"frictionNormalMultiplier",5),t.sys.events.once(P.BOOT,this.boot,this),t.sys.events.on(P.START,this.start,this)},boot:function(){this.world=new D(this.scene,this.config),this.add=new v(this.world),this.bodyBounds=new a,this.systems.events.once(P.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new D(this.scene,this.config),this.add=new v(this.world));var t=this.systems.events;t.on(P.UPDATE,this.world.update,this.world),t.on(P.POST_UPDATE,this.world.postUpdate,this.world),t.once(P.SHUTDOWN,this.shutdown,this)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return T(g(e,"matter",{}),g(t,"matter",{}))},enableAttractorPlugin:function(){return A.register(x),A.use(_,x),this},enableWrapPlugin:function(){return A.register(b),A.use(_,b),this},enableCollisionEventsPlugin:function(){return A.register(w),A.use(_,w),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(t,e){this.world.step(t,e)},containsPoint:function(t,e,i){t=this.getMatterBodies(t);var n=k.create(e,i);return O.point(t,n).length>0},intersectPoint:function(t,e,i){i=this.getMatterBodies(i);var n=k.create(t,e),r=[];return O.point(i,n).forEach((function(t){-1===r.indexOf(t)&&r.push(t)})),r},intersectRect:function(t,e,i,n,r,s){void 0===r&&(r=!1),s=this.getMatterBodies(s);var o={min:{x:t,y:e},max:{x:t+i,y:e+n}},a=[];return O.region(s,o,r).forEach((function(t){-1===a.indexOf(t)&&a.push(t)})),a},intersectRay:function(t,e,i,n,r,s){void 0===r&&(r=1),s=this.getMatterBodies(s);for(var o=[],a=O.ray(s,k.create(t,e),k.create(i,n),r),h=0;h<a.length;h++)o.push(a[h].body);return o},intersectBody:function(t,e){e=this.getMatterBodies(e);for(var i=[],n=O.collides(t,e),r=0;r<n.length;r++){var s=n[r];s.bodyA===t?i.push(s.bodyB):i.push(s.bodyA)}return i},overlap:function(t,e,i,n,r){void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=i),Array.isArray(t)||(t=[t]),t=this.getMatterBodies(t),e=this.getMatterBodies(e);for(var s=!1,o=0;o<t.length;o++)for(var a=t[o],h=O.collides(a,e),u=0;u<h.length;u++){var l=h[u],c=l.bodyA.id===a.id?l.bodyB:l.bodyA;if(!n||n.call(r,a,c,l))if(s=!0,i)i.call(r,a,c,l);else if(!n)return!0}return s},setCollisionCategory:function(t,e){return(t=this.getMatterBodies(t)).forEach((function(t){t.collisionFilter.category=e})),this},setCollisionGroup:function(t,e){return(t=this.getMatterBodies(t)).forEach((function(t){t.collisionFilter.group=e})),this},setCollidesWith:function(t,e){t=this.getMatterBodies(t);var i=0;if(Array.isArray(e))for(var n=0;n<e.length;n++)i|=e[n];else i=e;return t.forEach((function(t){t.collisionFilter.mask=i})),this},getMatterBodies:function(t){if(!t)return this.world.getAllBodies();Array.isArray(t)||(t=[t]);for(var e=[],i=0;i<t.length;i++){var n=t[i].hasOwnProperty("body")?t[i].body:t[i];e.push(n)}return e}
6859,setVelocity:function(t,e,i){t=this.getMatterBodies(t);var n=this._tempVec2;return n.x=e,n.y=i,t.forEach((function(t){o.setVelocity(t,n)})),this},setVelocityX:function(t,e){t=this.getMatterBodies(t);var i=this._tempVec2;return i.x=e,t.forEach((function(t){i.y=t.velocity.y,o.setVelocity(t,i)})),this},setVelocityY:function(t,e){t=this.getMatterBodies(t);var i=this._tempVec2;return i.y=e,t.forEach((function(t){i.x=t.velocity.x,o.setVelocity(t,i)})),this},setAngularVelocity:function(t,e){return(t=this.getMatterBodies(t)).forEach((function(t){o.setAngularVelocity(t,e)})),this},applyForce:function(t,e){t=this.getMatterBodies(t);var i=this._tempVec2;return t.forEach((function(t){i.x=t.position.x,i.y=t.position.y,o.applyForce(t,i,e)})),this},applyForceFromPosition:function(t,e,i,n){t=this.getMatterBodies(t);var r=this._tempVec2;return t.forEach((function(t){void 0===n&&(n=t.angle),r.x=i*Math.cos(n),r.y=i*Math.sin(n),o.applyForce(t,e,r)})),this},applyForceFromAngle:function(t,e,i){t=this.getMatterBodies(t);var n=this._tempVec2;return t.forEach((function(t){void 0===i&&(i=t.angle),n.x=e*Math.cos(i),n.y=e*Math.sin(i),o.applyForce(t,{x:t.position.x,y:t.position.y},n)})),this},getConstraintLength:function(t){var e=t.pointA.x,i=t.pointA.y,n=t.pointB.x,r=t.pointB.y;return t.bodyA&&(e+=t.bodyA.position.x,i+=t.bodyA.position.y),t.bodyB&&(n+=t.bodyB.position.x,r+=t.bodyB.position.y),p(e,i,n,r)},alignBody:function(t,e,i,r){var s;switch(t=t.hasOwnProperty("body")?t.body:t,r){case n.TOP_LEFT:case n.LEFT_TOP:s=this.bodyBounds.getTopLeft(t,e,i);break;case n.TOP_CENTER:s=this.bodyBounds.getTopCenter(t,e,i);break;case n.TOP_RIGHT:case n.RIGHT_TOP:s=this.bodyBounds.getTopRight(t,e,i);break;case n.LEFT_CENTER:s=this.bodyBounds.getLeftCenter(t,e,i);break;case n.CENTER:s=this.bodyBounds.getCenter(t,e,i);break;case n.RIGHT_CENTER:s=this.bodyBounds.getRightCenter(t,e,i);break;case n.LEFT_BOTTOM:case n.BOTTOM_LEFT:s=this.bodyBounds.getBottomLeft(t,e,i);break;case n.BOTTOM_CENTER:s=this.bodyBounds.getBottomCenter(t,e,i);break;case n.BOTTOM_RIGHT:case n.RIGHT_BOTTOM:s=this.bodyBounds.getBottomRight(t,e,i)}return s&&o.setPosition(t,s),this},shutdown:function(){var t=this.systems.events;this.world&&(t.off(P.UPDATE,this.world.update,this.world),t.off(P.POST_UPDATE,this.world.postUpdate,this.world)),t.off(P.SHUTDOWN,this.shutdown,this),this.add&&this.add.destroy(),this.world&&this.world.destroy(),this.add=null,this.world=null},destroy:function(){this.shutdown(),this.scene.sys.events.off(P.START,this.start,this),this.scene=null,this.systems=null}});C.register("MatterPhysics",F,"matterPhysics"),t.exports=F},function(t,e,i){var n=i(1391),r={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.14.2",silent:!0,install:function(t){t.after("Body.create",(function(){r.Body.init(this)})),t.before("Engine.update",(function(t){r.Engine.update(t)}))},Body:{init:function(t){t.plugin.attractors=t.plugin.attractors||[]}},Engine:{update:function(t){for(var e=n.Composite.allBodies(t.world),i=0;i<e.length;i++){var r=e[i],s=r.plugin.attractors;if(s&&s.length>0)for(var o=0;o<e.length;o++){var a=e[o];if(i!==o)for(var h=0;h<s.length;h++){var u=s[h],l=u;n.Common.isFunction(u)&&(l=u(r,a)),l&&n.Body.applyForce(a,a.position,l)}}}}},Attractors:{gravityConstant:.001,gravity:function(t,e){var i=n.Vector.sub(e.position,t.position),s=n.Vector.magnitudeSquared(i)||1e-4,o=n.Vector.normalise(i),a=-r.Attractors.gravityConstant*(t.mass*e.mass/s),h=n.Vector.mult(o,a);n.Body.applyForce(t,t.position,n.Vector.neg(h)),n.Body.applyForce(e,e.position,h)}}};t.exports=r},function(t,e){t.exports={name:"matter-collision-events",version:"0.1.6",for:"matter-js@^0.14.2",silent:!0,install:function(t){t.after("Engine.create",(function(){t.Events.on(this,"collisionStart",(function(e){e.pairs.map((function(e){var i=e.bodyA,n=e.bodyB;i.gameObject&&i.gameObject.emit("collide",i,n,e),n.gameObject&&n.gameObject.emit("collide",n,i,e),t.Events.trigger(i,"onCollide",{pair:e}),t.Events.trigger(n,"onCollide",{pair:e}),i.onCollideCallback&&i.onCollideCallback(e),n.onCollideCallback&&n.onCollideCallback(e),i.onCollideWith[n.id]&&i.onCollideWith[n.id](n,e),n.onCollideWith[i.id]&&n.onCollideWith[i.id](i,e)}))})),t.Events.on(this,"collisionActive",(function(e){e.pairs.map((function(e){var i=e.bodyA,n=e.bodyB;i.gameObject&&i.gameObject.emit("collideActive",i,n,e),n.gameObject&&n.gameObject.emit("collideActive",n,i,e),t.Events.trigger(i,"onCollideActive",{pair:e}),t.Events.trigger(n,"onCollideActive",{pair:e}),i.onCollideActiveCallback&&i.onCollideActiveCallback(e),n.onCollideActiveCallback&&n.onCollideActiveCallback(e)}))})),t.Events.on(this,"collisionEnd",(function(e){e.pairs.map((function(e){var i=e.bodyA,n=e.bodyB;i.gameObject&&i.gameObject.emit("collideEnd",i,n,e),n.gameObject&&n.gameObject.emit("collideEnd",n,i,e),t.Events.trigger(i,"onCollideEnd",{pair:e}),t.Events.trigger(n,"onCollideEnd",{pair:e}),i.onCollideEndCallback&&i.onCollideEndCallback(e),n.onCollideEndCallback&&n.onCollideEndCallback(e)}))}))}))}}}
vendor: 16,305 bytes, line 6859
6859,function(t,e,i){var n=i(1391),r={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.14.2",silent:!0,install:function(t){t.after("Engine.update",(function(){r.Engine.update(this)}))},Engine:{update:function(t){for(var e=t.world,i=n.Composite.allBodies(e),s=n.Composite.allComposites(e),o=0;o<i.length;o+=1){var a=i[o];a.plugin.wrap&&r.Body.wrap(a,a.plugin.wrap)}for(o=0;o<s.length;o+=1){var h=s[o];h.plugin.wrap&&r.Composite.wrap(h,h.plugin.wrap)}}},Bounds:{wrap:function(t,e){var i=null,n=null;if(void 0!==e.min.x&&void 0!==e.max.x&&(t.min.x>e.max.x?i=e.min.x-t.max.x:t.max.x<e.min.x&&(i=e.max.x-t.min.x)),void 0!==e.min.y&&void 0!==e.max.y&&(t.min.y>e.max.y?n=e.min.y-t.max.y:t.max.y<e.min.y&&(n=e.max.y-t.min.y)),null!==i||null!==n)return{x:i||0,y:n||0}}},Body:{wrap:function(t,e){var i=r.Bounds.wrap(t.bounds,e);return i&&n.Body.translate(t,i),i}},Composite:{bounds:function(t){for(var e=n.Composite.allBodies(t),i=[],r=0;r<e.length;r+=1){var s=e[r];i.push(s.bounds.min,s.bounds.max)}return n.Bounds.create(i)},wrap:function(t,e){var i=r.Bounds.wrap(r.Composite.bounds(t),e);return i&&n.Composite.translate(t,i),i}}};t.exports=r}])},t.exports=i()})));const cr=(t,e,i)=>({endTime:e,insertTime:i,type:"exponentialRampToValue",value:t}),fr=(t,e,i)=>({endTime:e,insertTime:i,type:"linearRampToValue",value:t}),dr=(t,e)=>({startTime:e,type:"setValue",value:t}),pr=(t,e,i)=>({duration:i,startTime:e,type:"setValueCurve",values:t}),vr=(t,e,{startTime:i,target:n,timeConstant:r})=>n+(e-n)*Math.exp((i-t)/r),gr=t=>"exponentialRampToValue"===t.type,mr=t=>"linearRampToValue"===t.type,yr=t=>gr(t)||mr(t),xr=t=>"setValue"===t.type,wr=t=>"setValueCurve"===t.type,_r=(t,e,i,n)=>{const r=t[e];return void 0===r?n:yr(r)||xr(r)?r.value:wr(r)?r.values[r.values.length-1]:vr(i,_r(t,e-1,r.startTime,n),r)},br=(t,e,i,n,r)=>void 0===i?[n.insertTime,r]:yr(i)?[i.endTime,i.value]:xr(i)?[i.startTime,i.value]:wr(i)?[i.startTime+i.duration,i.values[i.values.length-1]]:[i.startTime,_r(t,e-1,i.startTime,r)],Tr=t=>"cancelAndHold"===t.type,Er=t=>"cancelScheduledValues"===t.type,Sr=t=>Tr(t)||Er(t)?t.cancelTime:gr(t)||mr(t)?t.endTime:t.startTime,Ar=(t,e,i,{endTime:n,value:r})=>i===r?r:0<i&&0<r||i<0&&r<0?i*(r/i)**((t-e)/(n-e)):0,Cr=(t,e,i,{endTime:n,value:r})=>i+(t-e)/(n-e)*(r-i),Or=(t,{duration:e,startTime:i,values:n})=>((t,e)=>{const i=Math.floor(e),n=Math.ceil(e);return i===n?t[i]:(1-(e-i))*t[i]+(1-(n-e))*t[n]})(n,(t-i)/e*(n.length-1)),Rr=t=>"setTarget"===t.type;class Mr{constructor(t){this._automationEvents=[],this._currenTime=0,this._defaultValue=t}[Symbol.iterator](){return this._automationEvents[Symbol.iterator]()}add(t){const e=Sr(t);if(Tr(t)||Er(t)){const i=this._automationEvents.findIndex((i=>Er(t)&&wr(i)?i.startTime+i.duration>=e:Sr(i)>=e)),n=this._automationEvents[i];if(-1!==i&&(this._automationEvents=this._automationEvents.slice(0,i)),Tr(t)){const t=this._automationEvents[this._automationEvents.length-1];if(void 0!==n&&yr(n)){if(Rr(t))throw new Error("The internal list is malformed.");const i=wr(t)?t.startTime+t.duration:Sr(t),r=wr(t)?t.values[t.values.length-1]:t.value,s=gr(n)?Ar(e,i,r,n):Cr(e,i,r,n),o=gr(n)?cr(s,e,this._currenTime):fr(s,e,this._currenTime);this._automationEvents.push(o)}void 0!==t&&Rr(t)&&this._automationEvents.push(dr(this.getValue(e),e)),void 0!==t&&wr(t)&&t.startTime+t.duration>e&&(this._automationEvents[this._automationEvents.length-1]=pr(new Float32Array([6,7]),t.startTime,e-t.startTime))}}else{const i=this._automationEvents.findIndex((t=>Sr(t)>e)),n=-1===i?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[i-1];if(void 0!==n&&wr(n)&&Sr(n)+n.duration>e)return!1;const r=gr(t)?cr(t.value,t.endTime,this._currenTime):mr(t)?fr(t.value,e,this._currenTime):t;if(-1===i)this._automationEvents.push(r);else{if(wr(t)&&e+t.duration>Sr(this._automationEvents[i]))return!1;this._automationEvents.splice(i,0,r)}}return!0}flush(t){const e=this._automationEvents.findIndex((e=>Sr(e)>t));if(e>1){const t=this._automationEvents.slice(e-1),i=t[0];Rr(i)&&t.unshift(dr(_r(this._automationEvents,e-2,i.startTime,this._defaultValue),i.startTime)),this._automationEvents=t}}getValue(t){if(0===this._automationEvents.length)return this._defaultValue;const e=this._automationEvents[this._automationEvents.length-1],i=this._automationEvents.findIndex((e=>Sr(e)>t)),n=this._automationEvents[i],r=Sr(e)<=t?e:this._automationEvents[i-1];if(void 0!==r&&Rr(r)&&(void 0===n||!yr(n)||n.insertTime>t))return vr(t,_r(this._automationEvents,i-2,r.startTime,this._defaultValue),r);if(void 0!==r&&xr(r)&&(void 0===n||!yr(n)))return r.value;if(void 0!==r&&wr(r)&&(void 0===n||!yr(n)||r.startTime+r.duration>t))return t<r.startTime+r.duration?Or(t,r):r.values[r.values.length-1];if(void 0!==r&&yr(r)&&(void 0===n||!yr(n)))return r.value;if(void 0!==n&&gr(n)){const[e,s]=br(this._automationEvents,i-1,r,n,this._defaultValue);return Ar(t,e,s,n)}if(void 0!==n&&mr(n)){const[e,s]=br(this._automationEvents,i-1,r,n,this._defaultValue);return Cr(t,e,s,n)}return this._defaultValue}}const Pr=new WeakSet,Ir=new WeakMap,kr=new WeakMap,Lr=new WeakMap,Dr=new WeakMap,Fr=new WeakMap,Nr=new WeakMap,Br=new WeakMap,Ur=new WeakMap,Vr=new WeakMap,Yr={construct:()=>Yr},zr=/^import(?:(?:[\s]+[\w]+|(?:[\s]+[\w]+[\s]*,)?[\s]*\{[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?(?:[\s]*,[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?)*[\s]*}|(?:[\s]+[\w]+[\s]*,)?[\s]*\*[\s]+as[\s]+[\w]+)[\s]+from)?(?:[\s]*)("([^"\\]|\\.)+"|'([^'\\]|\\.)+')(?:[\s]*);?/,Xr=(t,e)=>{const i=[];let n=t.replace(/^[\s]+/,""),r=n.match(zr);for(;null!==r;){const t=r[1].slice(1,-1),s=r[0].replace(/([\s]+)?;?$/,"").replace(t,new URL(t,e).toString());i.push(s),n=n.slice(r[0].length).replace(/^[\s]+/,""),r=n.match(zr)}return[i.join(";"),n]},Gr=t=>{if(void 0!==t&&!Array.isArray(t))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},Wr=t=>{if(!(t=>{try{new new Proxy(t,Yr)}catch(lC){return!1}return!0})(t))throw new TypeError("The given value for processorCtor should be a constructor.");if(null===t.prototype||"object"!=typeof t.prototype)throw new TypeError("The given value for processorCtor should have a prototype.")},jr=(t,e)=>{const i=t.get(e);if(void 0===i)throw new Error("A value with the given key could not be found.");return i},Hr=(t,e)=>{const i=Array.from(t).filter(e);if(i.length>1)throw Error("More than one element was found.");if(0===i.length)throw Error("No element was found.");const[n]=i;return t.delete(n),n},qr=(t,e,i,n)=>{const r=jr(t,e),s=Hr(r,(t=>t[0]===i&&t[1]===n));return 0===r.size&&t.delete(e),s},Kr=t=>jr(Nr,t),Zr=t=>{if(Pr.has(t))throw new Error("The AudioNode is already stored.");Pr.add(t),Kr(t).forEach((t=>t(!0)))},Qr=t=>"port"in t,Jr=t=>{if(!Pr.has(t))throw new Error("The AudioNode is not stored.");Pr.delete(t),Kr(t).forEach((t=>t(!1)))},$r=(t,e)=>{!Qr(t)&&e.every((t=>0===t.size))&&Jr(t)},ts={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},es=(t,e)=>t.context===e,is=t=>{try{t.copyToChannel(new Float32Array(1),0,-1)}catch(lC){return!1}return!0},ns=()=>new DOMException("","IndexSizeError"),rs=t=>{var e;t.getChannelData=(e=t.getChannelData,i=>{try{return e.call(t,i)}catch(n){if(12===n.code)throw ns();throw n}})},ss={numberOfChannels:1},os=-34028234663852886e22,as=-os,hs=t=>Pr.has(t),us={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},ls=t=>jr(Ir,t),cs=t=>jr(Lr,t),fs=(t,e)=>{const{activeInputs:i}=ls(t);i.forEach((i=>i.forEach((([i])=>{e.includes(t)||fs(i,[...e,t])}))));const n=(t=>"playbackRate"in t)(t)?[t.playbackRate]:Qr(t)?Array.from(t.parameters.values()):(t=>"frequency"in t&&"gain"in t)(t)?[t.Q,t.detune,t.frequency,t.gain]:(t=>"offset"in t)(t)?[t.offset]:(t=>!("frequency"in t)&&"gain"in t)(t)?[t.gain]:(t=>"detune"in t&&"frequency"in t)(t)?[t.detune,t.frequency]:(t=>"pan"in t)(t)?[t.pan]:[];for(const r of n){const t=cs(r);void 0!==t&&t.activeInputs.forEach((([t])=>fs(t,e)))}hs(t)&&Jr(t)},ds=t=>{fs(t.destination,[])},ps=t=>"context"in t,vs=t=>ps(t[0]),gs=(t,e,i,n)=>{for(const r of t)if(i(r)){if(n)return!1;throw Error("The set contains at least one similar element.")}return t.add(e),!0},ms=(t,e,[i,n],r)=>{gs(t,[e,i,n],(t=>t[0]===e&&t[1]===i),r)},ys=(t,[e,i,n],r)=>{const s=t.get(e);void 0===s?t.set(e,new Set([[i,n]])):gs(s,[i,n],(t=>t[0]===i),r)},xs=t=>"inputs"in t,ws=(t,e,i,n)=>{if(xs(e)){const r=e.inputs[n];return t.connect(r,i,0),[r,i,0]}return t.connect(e,i,n),[e,i,n]},_s=(t,e,i)=>{for(const n of t)if(n[0]===e&&n[1]===i)return t.delete(n),n;return null},bs=(t,e)=>{if(!Kr(t).delete(e))throw new Error("Missing the expected event listener.")},Ts=(t,e,i)=>{const n=jr(t,e),r=Hr(n,(t=>t[0]===i));return 0===n.size&&t.delete(e),r},Es=(t,e,i,n)=>{xs(e)?t.disconnect(e.inputs[n],i,0):t.disconnect(e,i,n)},Ss=t=>jr(kr,t),As=t=>jr(Dr,t),Cs=t=>Br.has(t),Os=t=>!Pr.has(t),Rs=t=>new Promise((e=>{const i=t.createScriptProcessor(256,1,1),n=t.createGain(),r=t.createBuffer(1,2,44100),s=r.getChannelData(0);s[0]=1,s[1]=1;const o=t.createBufferSource();o.buffer=r,o.loop=!0,o.connect(i).connect(t.destination),o.connect(n),o.disconnect(n),i.onaudioprocess=n=>{const r=n.inputBuffer.getChannelData(0);Array.prototype.some.call(r,(t=>1===t))?e(!0):e(!1),o.stop(),i.onaudioprocess=null,o.disconnect(i),i.disconnect(t.destination)},o.start()})),Ms=(t,e)=>{const i=new Map;for(const n of t)for(const t of n){const e=i.get(t);i.set(t,void 0===e?1:e+1)}i.forEach(((t,i)=>e(i,t)))},Ps=t=>"context"in t,Is=(t,e,i,n)=>{const{activeInputs:r,passiveInputs:s}=cs(e),{outputs:o}=ls(t),a=Kr(t),h=o=>{const a=Ss(t),h=As(e);if(o){const e=Ts(s,t,i);ms(r,t,e,!1),n||Cs(t)||a.connect(h,i)}else{const e=((t,e,i)=>Hr(t,(t=>t[0]===e&&t[1]===i)))(r,t,i);ys(s,e,!1),n||Cs(t)||a.disconnect(h,i)}};return!!gs(o,[e,i],(t=>t[0]===e&&t[1]===i),!0)&&(a.add(h),hs(t)?ms(r,t,[i,h],!0):ys(s,[t,i,h],!0),!0)},ks=(t,e,i,n,r)=>{const[s,o]=((t,e,i,n)=>{const{activeInputs:r,passiveInputs:s}=ls(e),o=_s(r[n],t,i);if(null===o)return[qr(s,t,i,n)[2],!1];return[o[2],!0]})(t,i,n,r);if(null!==s&&(bs(t,s),!o||e||Cs(t)||Es(Ss(t),Ss(i),n,r)),hs(i)){const{activeInputs:t}=ls(i);$r(i,t)}},Ls=(t,e,i,n)=>{const[r,s]=((t,e,i)=>{const{activeInputs:n,passiveInputs:r}=cs(e),s=_s(n,t,i);if(null===s)return[Ts(r,t,i)[1],!1];return[s[2],!0]})(t,i,n);null!==r&&(bs(t,r),!s||e||Cs(t)||Ss(t).disconnect(As(i),n))};class Ds{constructor(t){this._map=new Map(t)}get size(){return this._map.size}entries(){return this._map.entries()}forEach(t,e=null){return this._map.forEach(((i,n)=>t.call(e,i,n,this)))}get(t){return this._map.get(t)}has(t){return this._map.has(t)}keys(){return this._map.keys()}values(){return this._map.values()}}const Fs={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}};function Ns(t,e,i,n,r){if("function"==typeof t.copyFromChannel)0===e[i].byteLength&&(e[i]=new Float32Array(128)),t.copyFromChannel(e[i],n,r);else{const s=t.getChannelData(n);if(0===e[i].byteLength)e[i]=s.slice(r,r+128);else{const t=new Float32Array(s.buffer,r*Float32Array.BYTES_PER_ELEMENT,128);e[i].set(t)}}}const Bs=(t,e,i,n,r)=>{"function"==typeof t.copyToChannel?0!==e[i].byteLength&&t.copyToChannel(e[i],n,r):0!==e[i].byteLength&&t.getChannelData(n).set(e[i],r)},Us=(t,e)=>{const i=[];for(let n=0;n<t;n+=1){const t=[],r="number"==typeof e?e:e[n];for(let e=0;e<r;e+=1)t.push(new Float32Array(128));i.push(t)}return i},Vs=async(t,e,i,r,s,o,a)=>{const h=null===e?128*Math.ceil(t.context.length/128):e.length,u=r.channelCount*r.numberOfInputs,l=s.reduce(((t,e)=>t+e),0),c=0===l?null:i.createBuffer(l,h,i.sampleRate);if(void 0===o)throw new Error("Missing the processor constructor.");const f=ls(t),d=await((t,e)=>{const i=jr(Vr,t),n=Ss(e);return jr(i,n)})(i,t),p=Us(r.numberOfInputs,r.channelCount),v=Us(r.numberOfOutputs,s),g=Array.from(t.parameters.keys()).reduce(((t,e)=>n(n({},t),{[e]:new Float32Array(128)})),{});for(let n=0;n<h;n+=128){if(r.numberOfInputs>0&&null!==e)for(let t=0;t<r.numberOfInputs;t+=1)for(let i=0;i<r.channelCount;i+=1)Ns(e,p[t],i,i,n);void 0!==o.parameterDescriptors&&null!==e&&o.parameterDescriptors.forEach((({name:t},i)=>{Ns(e,g,t,u+i,n)}));for(let t=0;t<r.numberOfInputs;t+=1)for(let e=0;e<s[t];e+=1)0===v[t][e].byteLength&&(v[t][e]=new Float32Array(128));try{const t=p.map(((t,e)=>0===f.activeInputs[e].size?[]:t)),e=a(n/i.sampleRate,i.sampleRate,(()=>d.process(t,v,g)));if(null!==c)for(let i=0,o=0;i<r.numberOfOutputs;i+=1){for(let t=0;t<s[i];t+=1)Bs(c,v[i],t,o+t,n);o+=s[i]}if(!e)break}catch(m){t.dispatchEvent(new ErrorEvent("processorerror",{colno:m.colno,filename:m.filename,lineno:m.lineno,message:m.message}));break}}return c},Ys={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},zs={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},Xs={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},Gs={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},Ws={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},js={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},Hs=(t,e,i)=>{const n=e[i];if(void 0===n)throw t();return n},qs={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},Ks={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},Zs=()=>new DOMException("","InvalidStateError"),Qs=()=>new DOMException("","InvalidAccessError"),Js={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},$s=(t,e,i,n,r,s,o,a,h,u,l)=>{const c=u.length;let f=a;for(let d=0;d<c;d+=1){let a=i[0]*u[d];for(let e=1;e<r;e+=1){const n=f-e&h-1;a+=i[e]*s[n],a-=t[e]*o[n]}for(let t=r;t<n;t+=1)a+=i[t]*s[f-t&h-1];for(let i=r;i<e;i+=1)a-=t[i]*o[f-i&h-1];s[f]=u[d],o[f]=a,f=f+1&h-1,l[d]=a}return f},to={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers"},eo=t=>{const e=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const i=t.decodeAudioData(e.buffer,(()=>{}));return void 0!==i&&(i.catch((()=>{})),!0)}catch(lC){}return!1},io=(t,e,i)=>{const n=e[i];void 0!==n&&n!==t[i]&&(t[i]=n)},no=(t,e)=>{io(t,e,"channelCount"),io(t,e,"channelCountMode"),io(t,e,"channelInterpretation")},ro=t=>"function"==typeof t.getFloatTimeDomainData,so=(t,e,i)=>{const n=e[i];void 0!==n&&n!==t[i].value&&(t[i].value=n)},oo=t=>{var e;t.start=(e=t.start,(i=0,n=0,r)=>{if("number"==typeof r&&r<0||n<0||i<0)throw new RangeError("The parameters can't be negative.");e.call(t,i,n,r)})},ao=t=>{var e;t.stop=(e=t.stop,(i=0)=>{if(i<0)throw new RangeError("The parameter can't be negative.");e.call(t,i)})},ho=(t,e)=>null===t?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(t*e))))),uo=async(t,e)=>new t(await(t=>new Promise(((e,i)=>{const{port1:n,port2:r}=new MessageChannel;n.onmessage=({data:t})=>{n.close(),r.close(),e(t)},n.onmessageerror=({data:t})=>{n.close(),r.close(),i(t)},r.postMessage(t)})))(e)),lo=(t,e)=>{const i=t.createBiquadFilter();return no(i,e),so(i,e,"Q"),so(i,e,"detune"),so(i,e,"frequency"),so(i,e,"gain"),io(i,e,"type"),i},co=(t,e)=>{const i=t.createChannelSplitter(e.numberOfOutputs);return no(i,e),(t=>{const e=t.numberOfOutputs;Object.defineProperty(t,"channelCount",{get:()=>e,set:t=>{if(t!==e)throw Zs()}}),Object.defineProperty(t,"channelCountMode",{get:()=>"explicit",set:t=>{if("explicit"!==t)throw Zs()}}),Object.defineProperty(t,"channelInterpretation",{get:()=>"discrete",set:t=>{if("discrete"!==t)throw Zs()}})})(i),i},fo=(t,e)=>(t.connect=e.connect.bind(e),t.disconnect=e.disconnect.bind(e),t),po=(t,e)=>{const i=t.createDelay(e.maxDelayTime);return no(i,e),so(i,e,"delayTime"),i},vo=(t,e)=>{const i=t.createGain();return no(i,e),so(i,e,"gain"),i};function go(t,e){const i=e[0]*e[0]+e[1]*e[1];return[(t[0]*e[0]+t[1]*e[1])/i,(t[1]*e[0]-t[0]*e[1])/i]}function mo(t,e){let i=[0,0];for(let s=t.length-1;s>=0;s-=1)r=e,i=[(n=i)[0]*r[0]-n[1]*r[1],n[0]*r[1]+n[1]*r[0]],i[0]+=t[s];var n,r;return i}
vendor: 7,723 bytes, line 6859
6859const yo=(t,e,i,n)=>t.createScriptProcessor(e,i,n),xo=()=>new DOMException("","NotSupportedError"),wo={numberOfChannels:1},_o={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},bo={channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0,distanceModel:"inverse",maxDistance:1e4,orientationX:1,orientationY:0,orientationZ:0,panningModel:"equalpower",positionX:0,positionY:0,positionZ:0,refDistance:1,rolloffFactor:1},To={disableNormalization:!1},Eo={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},So={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},Ao=t=>{if(null===t)return!1;const e=t.length;return e%2!=0?0!==t[Math.floor(e/2)]:t[e/2-1]+t[e/2]!==0},Co=(t,e,i,n)=>{let r=Object.getPrototypeOf(t);for(;!r.hasOwnProperty(e);)r=Object.getPrototypeOf(r);const{get:s,set:o}=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,{get:i(s),set:n(o)})},Oo=(t,e,i)=>{try{t.setValueAtTime(e,i)}catch(n){if(9!==n.code)throw n;Oo(t,e,i+1e-7)}},Ro=t=>{const e=t.createOscillator();try{e.start(-1)}catch(i){return i instanceof RangeError}return!1},Mo=t=>{const e=t.createBuffer(1,1,44100),i=t.createBufferSource();i.buffer=e,i.start(),i.stop();try{return i.stop(),!0}catch(lC){return!1}},Po=t=>{const e=t.createOscillator();try{e.stop(-1)}catch(i){return i instanceof RangeError}return!1},Io=(t,e)=>{const i=e.createGain();t.connect(i);const n=(r=t.disconnect,()=>{r.call(t,i),t.removeEventListener("ended",n)});var r;t.addEventListener("ended",n),fo(t,i),t.stop=(e=>{let n=!1;return(r=0)=>{if(n)try{e.call(t,r)}catch(lC){i.gain.setValueAtTime(0,r)}else e.call(t,r),n=!0}})(t.stop)},ko=(t,e)=>i=>{const n={value:t};return Object.defineProperties(i,{currentTarget:n,target:n}),"function"==typeof e?e.call(t,i):e.handleEvent.call(t,i)},Lo=(Do=gs,(t,e,[i,n,r],s)=>{Do(t[n],[e,i,r],(t=>t[0]===e&&t[1]===i),s)});var Do;const Fo=(t=>(e,i,[n,r,s],o)=>{const a=e.get(n);void 0===a?e.set(n,new Set([[r,i,s]])):t(a,[r,i,s],(t=>t[0]===r&&t[1]===i),o)})(gs),No=(Bo=Hr,(t,e,i,n)=>Bo(t[n],(t=>t[0]===e&&t[1]===i)));var Bo;const Uo=new WeakMap,Vo=(Yo=Uo,t=>{var e;return null!==(e=Yo.get(t))&&void 0!==e?e:0});var Yo;const zo=(Xo=new Map,Go=new WeakMap,(t,e)=>{const i=Go.get(t);if(void 0!==i)return i;const n=Xo.get(t);if(void 0!==n)return n;try{const i=e();return i instanceof Promise?(Xo.set(t,i),i.catch((()=>!1)).then((e=>(Xo.delete(t),Go.set(t,e),e)))):(Go.set(t,i),i)}catch(lC){return Go.set(t,!1),!1}});var Xo,Go;const Wo="undefined"==typeof window?null:window,jo=(Ho=zo,qo=ns,(t,e)=>{const i=t.createAnalyser();if(no(i,e),!(e.maxDecibels>e.minDecibels))throw qo();return io(i,e,"fftSize"),io(i,e,"maxDecibels"),io(i,e,"minDecibels"),io(i,e,"smoothingTimeConstant"),Ho(ro,(()=>ro(i)))||(t=>{t.getFloatTimeDomainData=e=>{const i=new Uint8Array(e.length);t.getByteTimeDomainData(i);const n=Math.max(i.length,t.fftSize);for(let t=0;t<n;t+=1)e[t]=.0078125*(i[t]-128);return e}})(i),i});var Ho,qo;const Ko=(Zo=ls,t=>{const e=Zo(t);if(null===e.renderer)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return e.renderer});var Zo;const Qo=((t,e,i)=>async(n,r,s,o)=>{const a=t(n),h=[...o,n];await Promise.all(a.activeInputs.map(((t,o)=>Array.from(t).filter((([t])=>!h.includes(t))).map((async([t,a])=>{const u=e(t),l=await u.render(t,r,h),c=n.context.destination;i(t)||n===c&&i(n)||l.connect(s,a,o)})))).reduce(((t,e)=>[...t,...e]),[]))})(ls,Ko,Cs),Jo=($o=jo,ta=Ss,ea=Qo,()=>{const t=new WeakMap;return{render(e,i,n){const r=t.get(i);return void 0!==r?Promise.resolve(r):(async(e,i,n)=>{let r=ta(e);if(!es(r,i)){const t={channelCount:r.channelCount,channelCountMode:r.channelCountMode,channelInterpretation:r.channelInterpretation,fftSize:r.fftSize,maxDecibels:r.maxDecibels,minDecibels:r.minDecibels,smoothingTimeConstant:r.smoothingTimeConstant};r=$o(i,t)}return t.set(i,r),await ea(e,i,r,n),r})(e,i,n)}}});var $o,ta,ea;const ia=(na=Fr,t=>{const e=na.get(t);if(void 0===e)throw Zs();return e});var na;const ra=null===(sa=Wo)?null:sa.hasOwnProperty("OfflineAudioContext")?sa.OfflineAudioContext:sa.hasOwnProperty("webkitOfflineAudioContext")?sa.webkitOfflineAudioContext:null;var sa;const oa=(aa=ra,t=>null!==aa&&t instanceof aa);var aa;const ha=new WeakMap,ua=(la=ko,class{constructor(t){this._nativeEventTarget=t,this._listeners=new WeakMap}addEventListener(t,e,i){if(null!==e){let n=this._listeners.get(e);void 0===n&&(n=la(this,e),"function"==typeof e&&this._listeners.set(e,n)),this._nativeEventTarget.addEventListener(t,n,i)}}dispatchEvent(t){return this._nativeEventTarget.dispatchEvent(t)}removeEventListener(t,e,i){const n=null===e?void 0:this._listeners.get(e);this._nativeEventTarget.removeEventListener(t,void 0===n?null:n,i)}});var la;const ca=(t=>null===t?null:t.hasOwnProperty("AudioContext")?t.AudioContext:t.hasOwnProperty("webkitAudioContext")?t.webkitAudioContext:null)(Wo),fa=(da=ca,t=>null!==da&&t instanceof da);var da;const pa=(t=>e=>null!==t&&"function"==typeof t.AudioNode&&e instanceof t.AudioNode)(Wo),va=(t=>e=>null!==t&&"function"==typeof t.AudioParam&&e instanceof t.AudioParam)(Wo),ga=((t,e,i,n,r,s,o,a,h,u,l,c,f,d,p)=>class extends u{constructor(e,n,r,s){super(r),this._context=e,this._nativeAudioNode=r;const o=l(e);c(o)&&!0!==i(Rs,(()=>Rs(o)))&&(t=>{const e=new Map;var i,n;t.connect=(i=t.connect.bind(t),(t,n=0,r=0)=>{const s=Ps(t)?i(t,n,r):i(t,n),o=e.get(t);return void 0===o?e.set(t,[{input:r,output:n}]):o.every((t=>t.input!==r||t.output!==n))&&o.push({input:r,output:n}),s}),t.disconnect=(n=t.disconnect,(i,r,s)=>{if(n.apply(t),void 0===i)e.clear();else if("number"==typeof i)for(const[t,n]of e){const r=n.filter((t=>t.output!==i));0===r.length?e.delete(t):e.set(t,r)}else if(e.has(i))if(void 0===r)e.delete(i);else{const t=e.get(i);if(void 0!==t){const n=t.filter((t=>t.output!==r&&(t.input!==s||void 0===s)));0===n.length?e.delete(i):e.set(i,n)}}for(const[n,o]of e)o.forEach((e=>{Ps(n)?t.connect(n,e.output,e.input):t.connect(n,e.output)}))})})(r),kr.set(this,r),Nr.set(this,new Set),"closed"!==e.state&&n&&Zr(this),t(this,s,r)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(t){this._nativeAudioNode.channelCount=t}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(t){this._nativeAudioNode.channelCountMode=t}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(t){this._nativeAudioNode.channelInterpretation=t}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(t,i=0,a=0){if(i<0||i>=this._nativeAudioNode.numberOfOutputs)throw r();const u=l(this._context),c=p(u);if(f(t)||d(t))throw s();if(ps(t)){const r=Ss(t);try{const e=ws(this._nativeAudioNode,r,i,a),n=Os(this);(c||n)&&this._nativeAudioNode.disconnect(...e),"closed"!==this.context.state&&!n&&Os(t)&&Zr(t)}catch(g){if(12===g.code)throw s();throw g}if(e(this,t,i,a,c)){const e=h([this],t);Ms(e,n(c))}return t}const v=As(t);if("playbackRate"===v.name)throw o();try{this._nativeAudioNode.connect(v,i),(c||Os(this))&&this._nativeAudioNode.disconnect(v,i)}catch(g){if(12===g.code)throw s();throw g}if(Is(this,t,i,c)){const e=h([this],t);Ms(e,n(c))}}disconnect(t,e,i){let n;const o=l(this._context),u=p(o);if(void 0===t)n=((t,e)=>{const i=ls(t),n=[];for(const r of i.outputs)vs(r)?ks(t,e,...r):Ls(t,e,...r),n.push(r[0]);return i.outputs.clear(),n})(this,u);else if("number"==typeof t){if(t<0||t>=this.numberOfOutputs)throw r();
vendor: 4,538 bytes, line 6859
6859n=((t,e,i)=>{const n=ls(t),r=[];for(const s of n.outputs)s[1]===i&&(vs(s)?ks(t,e,...s):Ls(t,e,...s),r.push(s[0]),n.outputs.delete(s));return r})(this,u,t)}else{if(void 0!==e&&(e<0||e>=this.numberOfOutputs))throw r();if(ps(t)&&void 0!==i&&(i<0||i>=t.numberOfInputs))throw r();if(n=((t,e,i,n,r)=>{const s=ls(t);return Array.from(s.outputs).filter((t=>!(t[0]!==i||void 0!==n&&t[1]!==n||void 0!==r&&t[2]!==r))).map((i=>(vs(i)?ks(t,e,...i):Ls(t,e,...i),s.outputs.delete(i),i[0])))})(this,u,t,e,i),0===n.length)throw s()}for(const r of n){const t=h([this],r);Ms(t,a)}}})((ma=Ir,(t,e,i)=>{const n=[];for(let r=0;r<i.numberOfInputs;r+=1)n.push(new Set);ma.set(t,{activeInputs:n,outputs:new Set,passiveInputs:new WeakMap,renderer:e})}),((t,e,i,n,r,s,o,a,h,u,l,c,f)=>{const d=new WeakMap;return(p,v,g,m,y)=>{const{activeInputs:x,passiveInputs:w}=s(v),{outputs:_}=s(p),b=a(p),T=s=>{const a=h(v),u=h(p);if(s){const e=qr(w,p,g,m);t(x,p,e,!1),y||c(p)||i(u,a,g,m),f(v)&&Zr(v)}else{const t=n(x,p,g,m);e(w,m,t,!1),y||c(p)||r(u,a,g,m);const i=o(v);if(0===i)l(v)&&$r(v,x);else{const t=d.get(v);void 0!==t&&clearTimeout(t),d.set(v,setTimeout((()=>{l(v)&&$r(v,x)}),1e3*i))}}};return!!u(_,[v,g,m],(t=>t[0]===v&&t[1]===g&&t[2]===m),!0)&&(b.add(T),l(p)?t(x,p,[g,m,T],!0):e(w,m,[p,g,T],!0),!0)}})(Lo,Fo,ws,No,Es,ls,Vo,Kr,Ss,gs,hs,Cs,Os),zo,((t,e,i,n,r,s)=>o=>(a,h)=>{const u=t.get(a);if(void 0===u){if(!o&&s(a)){const t=n(a),{outputs:s}=i(a);for(const i of s)if(vs(i)){const r=n(i[0]);e(t,r,i[1],i[2])}else{const e=r(i[0]);t.disconnect(e,i[1])}}t.set(a,h)}else t.set(a,u+h)})(Br,Es,ls,Ss,As,hs),ns,Qs,xo,((t,e,i,n,r,s,o,a)=>(h,u)=>{const l=e.get(h);if(void 0===l)throw new Error("Missing the expected cycle count.");const c=s(h.context),f=a(c);if(l===u){if(e.delete(h),!f&&o(h)){const e=n(h),{outputs:s}=i(h);for(const i of s)if(vs(i)){const r=n(i[0]);t(e,r,i[1],i[2])}else{const t=r(i[0]);e.connect(t,i[1])}}}else e.set(h,l-u)})(ws,Br,ls,Ss,As,ia,hs,oa),((t,e,i)=>function n(r,s){const o=ps(s)?s:i(t,s);if((t=>"delayTime"in t)(o))return[];if(r[0]===o)return[r];if(r.includes(o))return[];const{outputs:a}=e(o);return Array.from(a).map((t=>n([...r,o],t[0]))).reduce(((t,e)=>t.concat(e)),[])})(ha,ls,jr),ua,ia,fa,pa,va,oa);var ma;const ya=((t,e,i,r,s,o)=>class extends t{constructor(t,i){const a=s(t),h=n(n({},ts),i),u=r(a,h);super(t,!1,u,o(a)?e():null),this._nativeAnalyserNode=u}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(t){this._nativeAnalyserNode.fftSize=t}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(t){const e=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=t,!(t>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=e,i()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(t){const e=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=t,!(this._nativeAnalyserNode.maxDecibels>t))throw this._nativeAnalyserNode.minDecibels=e,i()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(t){this._nativeAnalyserNode.smoothingTimeConstant=t}getByteFrequencyData(t){this._nativeAnalyserNode.getByteFrequencyData(t)}getByteTimeDomainData(t){this._nativeAnalyserNode.getByteTimeDomainData(t)}getFloatFrequencyData(t){this._nativeAnalyserNode.getFloatFrequencyData(t)}getFloatTimeDomainData(t){this._nativeAnalyserNode.getFloatTimeDomainData(t)}})(ga,Jo,ns,jo,ia,oa),xa=new WeakSet,wa=(t=>null===t?null:t.hasOwnProperty("AudioBuffer")?t.AudioBuffer:null)(Wo),_a=(ba=new Uint32Array(1),t=>(ba[0]=t,ba[0]));var ba;const Ta=((t,e)=>i=>{i.copyFromChannel=(n,r,s=0)=>{const o=t(s),a=t(r);if(a>=i.numberOfChannels)throw e();const h=i.length,u=i.getChannelData(a),l=n.length;for(let t=o<0?-o:0;t+o<h&&t<l;t+=1)n[t]=u[t+o]},i.copyToChannel=(n,r,s=0)=>{const o=t(s),a=t(r);if(a>=i.numberOfChannels)throw e();const h=i.length,u=i.getChannelData(a),l=n.length;for(let t=o<0?-o:0;t+o<h&&t<l;t+=1)u[t+o]=n[t]}})(_a,ns),Ea=(Sa=_a,t=>{var e,i;t.copyFromChannel=(e=t.copyFromChannel,(i,n,r=0)=>{const s=Sa(r),o=Sa(n);if(s<t.length)return e.call(t,i,o,s)}),t.copyToChannel=(i=t.copyToChannel,(e,n,r=0)=>{const s=Sa(r),o=Sa(n);if(s<t.length)return i.call(t,e,o,s)})});var Sa;const Aa=((t,e,i,r,s,o,a,h)=>{let u=null;return class l{constructor(l){if(null===s)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:c,numberOfChannels:f,sampleRate:d}=n(n({},ss),l);
vendor: 6,302 bytes, line 6859
6859null===u&&(u=new s(1,1,44100));const p=null!==r&&e(o,o)?new r({length:c,numberOfChannels:f,sampleRate:d}):u.createBuffer(f,c,d);if(0===p.numberOfChannels)throw i();return"function"!=typeof p.copyFromChannel?(a(p),rs(p)):e(is,(()=>is(p)))||h(p),t.add(p),p}static[Symbol.hasInstance](e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===l.prototype||t.has(e)}}})(xa,zo,xo,wa,ra,(Ca=wa,()=>{if(null===Ca)return!1;try{new Ca({length:1,sampleRate:44100})}catch(lC){return!1}return!0}),Ta,Ea);var Ca;const Oa=(Ra=vo,(t,e)=>{const i=Ra(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});e.connect(i).connect(t.destination);const n=()=>{e.removeEventListener("ended",n),e.disconnect(i),i.disconnect()};e.addEventListener("ended",n)});var Ra;const Ma=(Pa=Ko,Ia=cs,ka=Cs,async(t,e,i,n)=>{const r=Ia(t);await Promise.all(Array.from(r.activeInputs).map((async([t,r])=>{const s=Pa(t),o=await s.render(t,e,n);ka(t)||o.connect(i,r)})))});var Pa,Ia,ka;const La=(Da=Ma,(t,e,i,n)=>Da(e,t,i,n));var Da;const Fa=((t,e,i,n,r,s,o,a,h,u,l)=>(c,f)=>{const d=c.createBufferSource();return no(d,f),so(d,f,"playbackRate"),io(d,f,"buffer"),io(d,f,"loop"),io(d,f,"loopEnd"),io(d,f,"loopStart"),e(i,(()=>i(c)))||(t=>{t.start=(e=>{let i=!1;return(n=0,r=0,s)=>{if(i)throw Zs();e.call(t,n,r,s),i=!0}})(t.start)})(d),e(n,(()=>n(c)))||h(d),e(r,(()=>r(c)))||u(d,c),e(s,(()=>s(c)))||oo(d),e(o,(()=>o(c)))||l(d,c),e(a,(()=>a(c)))||ao(d),t(c,d),d})(Oa,zo,(t=>{const e=t.createBufferSource();e.start();try{e.start()}catch(lC){return!0}return!1}),(t=>{const e=t.createBufferSource(),i=t.createBuffer(1,1,44100);e.buffer=i;try{e.start(0,1)}catch(lC){return!1}return!0}),(t=>{const e=t.createBufferSource();e.start();try{e.stop()}catch(lC){return!1}return!0}),Ro,Mo,Po,(t=>{var e;t.start=(e=t.start,(i=0,n=0,r)=>{const s=t.buffer,o=null===s?n:Math.min(s.duration,n);null!==s&&o>s.duration-.5/t.context.sampleRate?e.call(t,i,0,0):e.call(t,i,o,r)})}),(Na=Co,(t,e)=>{const i=e.createBuffer(1,1,44100);null===t.buffer&&(t.buffer=i),Na(t,"buffer",(e=>()=>{const n=e.call(t);return n===i?null:n}),(e=>n=>e.call(t,null===n?i:n)))}),Io);var Na;const Ba=((t,e)=>(i,n,r,s)=>(t(n).replay(r),e(n,i,r,s)))((t=>e=>{const i=t(e);if(null===i.renderer)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return i.renderer})(cs),Ma),Ua=((t,e,i,n,r)=>()=>{const s=new WeakMap;let o=null,a=null;return{set start(t){o=t},set stop(t){a=t},render(h,u,l){const c=s.get(u);return void 0!==c?Promise.resolve(c):(async(h,u,l)=>{let c=i(h);const f=es(c,u);if(!f){const t={buffer:c.buffer,channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,loop:c.loop,loopEnd:c.loopEnd,loopStart:c.loopStart,playbackRate:c.playbackRate.value};c=e(u,t),null!==o&&c.start(...o),null!==a&&c.stop(a)}return s.set(u,c),f?await t(u,h.playbackRate,c.playbackRate,l):await n(u,h.playbackRate,c.playbackRate,l),await r(h,u,c,l),c})(h,u,l)}}})(La,Fa,Ss,Ba,Qo),Va=((t,e,i,n,r,s,o,a,h,u,l,c,f)=>(d,p,v,g=null,m=null)=>{const y=new Mr(v.defaultValue),x=p?n(y):null,w={get defaultValue(){return v.defaultValue},get maxValue(){return null===g?v.maxValue:g},get minValue(){return null===m?v.minValue:m},get value(){return v.value},set value(t){v.value=t,w.setValueAtTime(t,d.context.currentTime)},cancelAndHoldAtTime(t){if("function"==typeof v.cancelAndHoldAtTime)null===x&&y.flush(d.context.currentTime),y.add(r(t)),v.cancelAndHoldAtTime(t);else{const e=Array.from(y).pop();null===x&&y.flush(d.context.currentTime),y.add(r(t));const i=Array.from(y).pop();v.cancelScheduledValues(t),e!==i&&void 0!==i&&("exponentialRampToValue"===i.type?v.exponentialRampToValueAtTime(i.value,i.endTime):"linearRampToValue"===i.type?v.linearRampToValueAtTime(i.value,i.endTime):"setValue"===i.type?v.setValueAtTime(i.value,i.startTime):"setValueCurve"===i.type&&v.setValueCurveAtTime(i.values,i.startTime,i.duration))}return w},cancelScheduledValues:t=>(null===x&&y.flush(d.context.currentTime),y.add(s(t)),v.cancelScheduledValues(t),w),exponentialRampToValueAtTime(t,e){if(0===t)throw new RangeError;if(!Number.isFinite(e)||e<0)throw new RangeError;return null===x&&y.flush(d.context.currentTime),y.add(o(t,e)),v.exponentialRampToValueAtTime(t,e),w},linearRampToValueAtTime:(t,e)=>(null===x&&y.flush(d.context.currentTime),y.add(a(t,e)),v.linearRampToValueAtTime(t,e),w),setTargetAtTime:(t,e,i)=>(null===x&&y.flush(d.context.currentTime),y.add(h(t,e,i)),v.setTargetAtTime(t,e,i),w),setValueAtTime:(t,e)=>(null===x&&y.flush(d.context.currentTime),y.add(u(t,e)),v.setValueAtTime(t,e),w),setValueCurveAtTime(t,e,i){const n=t instanceof Float32Array?t:new Float32Array(t);if(null!==c&&"webkitAudioContext"===c.name){const t=e+i,r=d.context.sampleRate,s=Math.ceil(e*r),o=Math.floor(t*r),a=o-s,h=new Float32Array(a);for(let l=0;l<a;l+=1){const t=(n.length-1)/i*((s+l)/r-e),o=Math.floor(t),a=Math.ceil(t);h[l]=o===a?n[o]:(1-(t-o))*n[o]+(1-(a-t))*n[a]}null===x&&y.flush(d.context.currentTime),y.add(l(h,e,i)),v.setValueCurveAtTime(h,e,i);const u=o/r;u<t&&f(w,h[h.length-1],u),f(w,n[n.length-1],t)}else null===x&&y.flush(d.context.currentTime),y.add(l(n,e,i)),v.setValueCurveAtTime(n,e,i);return w}};return i.set(w,v),e.set(w,d),t(w,x),w})((Ya=Lr,(t,e)=>{Ya.set(t,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:e})}),ha,Dr,(t=>({replay(e){for(const i of t)if("exponentialRampToValue"===i.type){const{endTime:t,value:n}=i;e.exponentialRampToValueAtTime(n,t)}else if("linearRampToValue"===i.type){const{endTime:t,value:n}=i;e.linearRampToValueAtTime(n,t)}else if("setTarget"===i.type){const{startTime:t,target:n,timeConstant:r}=i;e.setTargetAtTime(n,t,r)}else if("setValue"===i.type){const{startTime:t,value:n}=i;e.setValueAtTime(n,t)}else{if("setValueCurve"!==i.type)throw new Error("Can't apply an unknown automation.");{const{duration:t,startTime:n,values:r}=i;e.setValueCurveAtTime(r,n,t)}}}})),(t=>({cancelTime:t,type:"cancelAndHold"})),(t=>({cancelTime:t,type:"cancelScheduledValues"})),((t,e)=>({endTime:e,type:"exponentialRampToValue",value:t})),((t,e)=>({endTime:e,type:"linearRampToValue",value:t})),((t,e,i)=>({startTime:e,target:t,timeConstant:i,type:"setTarget"})),dr,pr,ca,Oo);var Ya;const za=((t,e,i,r,s,o,a,h)=>class extends t{constructor(t,r){const h=o(t),u=n(n({}
vendor: 4,901 bytes, line 6859
6859,us),r),l=s(h,u),c=a(h),f=c?e():null;super(t,!1,l,f),this._audioBufferSourceNodeRenderer=f,this._isBufferNullified=!1,this._isBufferSet=null!==u.buffer,this._nativeAudioBufferSourceNode=l,this._onended=null,this._playbackRate=i(this,c,l.playbackRate,as,os)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(t){if(this._nativeAudioBufferSourceNode.buffer=t,null!==t){if(this._isBufferSet)throw r();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(t){this._nativeAudioBufferSourceNode.loop=t}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(t){this._nativeAudioBufferSourceNode.loopEnd=t}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(t){this._nativeAudioBufferSourceNode.loopStart=t}get onended(){return this._onended}set onended(t){const e="function"==typeof t?h(this,t):null;this._nativeAudioBufferSourceNode.onended=e;const i=this._nativeAudioBufferSourceNode.onended;this._onended=null!==i&&i===e?t:i}get playbackRate(){return this._playbackRate}start(t=0,e=0,i){if(this._nativeAudioBufferSourceNode.start(t,e,i),null!==this._audioBufferSourceNodeRenderer&&(this._audioBufferSourceNodeRenderer.start=void 0===i?[t,e]:[t,e,i]),"closed"!==this.context.state){Zr(this);const t=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",t),hs(this)&&Jr(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",t)}}stop(t=0){this._nativeAudioBufferSourceNode.stop(t),null!==this._audioBufferSourceNodeRenderer&&(this._audioBufferSourceNodeRenderer.stop=t)}})(ga,Ua,Va,Zs,Fa,ia,oa,ko),Xa=((t,e,i,n,r,s,o,a)=>class extends t{constructor(t,i){const n=s(t),h=o(n),u=r(n,i,h);super(t,!1,u,h?e(a):null),this._isNodeOfNativeOfflineAudioContext=h,this._nativeAudioDestinationNode=u}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(t){if(this._isNodeOfNativeOfflineAudioContext)throw n();if(t>this._nativeAudioDestinationNode.maxChannelCount)throw i();this._nativeAudioDestinationNode.channelCount=t}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(t){if(this._isNodeOfNativeOfflineAudioContext)throw n();this._nativeAudioDestinationNode.channelCountMode=t}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}})(ga,(t=>{let e=null;return{render:(i,n,r)=>(null===e&&(e=(async(e,i,n)=>{const r=i.destination;return await t(e,i,r,n),r})(i,n,r)),e)}}),ns,Zs,((t,e)=>(i,n,r)=>{const s=i.destination;if(s.channelCount!==n)try{s.channelCount=n}catch(lC){}r&&"explicit"!==s.channelCountMode&&(s.channelCountMode="explicit"),0===s.maxChannelCount&&Object.defineProperty(s,"maxChannelCount",{value:n});const o=t(i,{channelCount:n,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,gain:1});return e(o,"channelCount",(t=>()=>t.call(o)),(t=>e=>{t.call(o,e);try{s.channelCount=e}catch(i){if(e>s.maxChannelCount)throw i}})),e(o,"channelCountMode",(t=>()=>t.call(o)),(t=>e=>{t.call(o,e),s.channelCountMode=e})),e(o,"channelInterpretation",(t=>()=>t.call(o)),(t=>e=>{t.call(o,e),s.channelInterpretation=e})),Object.defineProperty(o,"maxChannelCount",{get:()=>s.maxChannelCount}),o.connect(s),o})(vo,Co),ia,oa,Qo),Ga=((t,e,i,n,r)=>()=>{const s=new WeakMap;return{render(o,a,h){const u=s.get(a);return void 0!==u?Promise.resolve(u):(async(o,a,h)=>{let u=i(o);const l=es(u,a);if(!l){const t={Q:u.Q.value,channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,detune:u.detune.value,frequency:u.frequency.value,gain:u.gain.value,type:u.type};u=e(a,t)}return s.set(a,u),l?(await t(a,o.Q,u.Q,h),await t(a,o.detune,u.detune,h),await t(a,o.frequency,u.frequency,h),await t(a,o.gain,u.gain,h)):(await n(a,o.Q,u.Q,h),await n(a,o.detune,u.detune,h),await n(a,o.frequency,u.frequency,h),await n(a,o.gain,u.gain,h)),await r(o,a,u,h),u})(o,a,h)}}})(La,lo,Ss,Ba,Qo),Wa=(t=>(e,i)=>t.set(e,i))(Uo),ja=(Ha=ga,qa=Va,Ka=Ga,Za=Qs,Qa=lo,Ja=ia,$a=oa,th=Wa,class extends Ha{constructor(t,e){const i=Ja(t),r=n(n({},Ys),e),s=Qa(i,r),o=$a(i);super(t,!1,s,o?Ka():null),this._Q=qa(this,o,s.Q,as,os),this._detune=qa(this,o,s.detune,1200*Math.log2(as),-1200*Math.log2(as)),this._frequency=qa(this,o,s.frequency,t.sampleRate/2,0),this._gain=qa(this,o,s.gain,40*Math.log10(as),os),this._nativeBiquadFilterNode=s,th(this,1)}get detune(){return this._detune}get frequency(){return this._frequency}get gain(){return this._gain}get Q(){return this._Q}get type(){return this._nativeBiquadFilterNode.type}set type(t){this._nativeBiquadFilterNode.type=t}getFrequencyResponse(t,e,i){try{this._nativeBiquadFilterNode.getFrequencyResponse(t,e,i)}catch(n){if(11===n.code)throw Za();throw n}if(t.length!==e.length||e.length!==i.length)throw Za()}});var Ha,qa,Ka,Za,Qa,Ja,$a,th;const eh=((t,e)=>(i,n,r)=>
6859{const s=new Set;var o,a;return i.connect=(o=i.connect,(r,a=0,h=0)=>{const u=0===s.size;if(e(r))return o.call(i,r,a,h),t(s,[r,a,h],(t=>t[0]===r&&t[1]===a&&t[2]===h),!0),u&&n(),r;o.call(i,r,a),t(s,[r,a],(t=>t[0]===r&&t[1]===a),!0),u&&n()}),i.disconnect=(a=i.disconnect,(t,n,o)=>{const h=s.size>0;if(void 0===t)a.apply(i),s.clear();else if("number"==typeof t){a.call(i,t);for(const e of s)e[1]===t&&s.delete(e)}else{e(t)?a.call(i,t,n,o):a.call(i,t,n);for(const e of s)e[0]!==t||void 0!==n&&e[1]!==n||void 0!==o&&e[2]!==o||s.delete(e)}const u=0===s.size;h&&u&&r()}),i})(gs,pa);var ih,nh;const rh=((t,e)=>(i,n)=>{const r=i.createChannelMerger(n.numberOfInputs);return null!==t&&"webkitAudioContext"===t.name&&e(i,r),no(r,n),r})(ca,(ih=Zs,nh=eh,(t,e)=>{e.channelCount=1,e.channelCountMode="explicit",Object.defineProperty(e,"channelCount",{get:()=>1,set:()=>{throw ih()}}),Object.defineProperty(e,"channelCountMode",{get:()=>"explicit",set:()=>{throw ih()}});const i=t.createBufferSource();nh(e,(()=>{const t=e.numberOfInputs;for(let n=0;n<t;n+=1)i.connect(e,0,n)}),(()=>i.disconnect(e)))})),sh=((t,e,i,r,s)=>class extends t{constructor(t,o){const a=r(t),h=n(n({},zs),o);super(t,!1,i(a,h),s(a)?e():null)}})(ga,((t,e,i)=>()=>{const n=new WeakMap;return{render(r,s,o){const a=n.get(s);return void 0!==a?Promise.resolve(a):(async(r,s,o)=>{let a=e(r);if(!es(a,s)){const e={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfInputs:a.numberOfInputs};a=t(s,e)}return n.set(s,a),await i(r,s,a,o),a})(r,s,o)}}})(rh,Ss,Qo),rh,ia,oa),oh=((t,e,i,r,s,o)=>class extends t{constructor(t,a){const h=r(t),u=o(n(n({},Xs),a));super(t,!1,i(h,u),s(h)?e():null)}})(ga,((t,e,i)=>()=>{const n=new WeakMap;return{render(r,s,o){const a=n.get(s);return void 0!==a?Promise.resolve(a):(async(r,s,o)=>{let a=e(r);if(!es(a,s)){const e={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfOutputs:a.numberOfOutputs};a=t(s,e)}return n.set(s,a),await i(r,s,a,o),a})(r,s,o)}}})(co,Ss,Qo),co,ia,oa,(t=>n(n({},t),{channelCount:t.numberOfOutputs}))),ah=((t,e,i,n,r)=>(s,o)=>
vendor: 4,498 bytes, line 6859
6859{if(void 0===s.createConstantSource)return i(s,o);const a=s.createConstantSource();return no(a,o),so(a,o,"offset"),e(n,(()=>n(s)))||oo(a),e(r,(()=>r(s)))||ao(a),t(s,a),a})(Oa,zo,((t,e,i,s)=>(o,a)=>{var{offset:h}=a,u=r(a,["offset"]);const l=o.createBuffer(1,2,44100),c=e(o,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),f=i(o,n(n({},u),{gain:h})),d=l.getChannelData(0);d[0]=1,d[1]=1,c.buffer=l,c.loop=!0;const p={get bufferSize(){},get channelCount(){return f.channelCount},set channelCount(t){f.channelCount=t},get channelCountMode(){return f.channelCountMode},set channelCountMode(t){f.channelCountMode=t},get channelInterpretation(){return f.channelInterpretation},set channelInterpretation(t){f.channelInterpretation=t},get context(){return f.context},get inputs(){return[]},get numberOfInputs(){return c.numberOfInputs},get numberOfOutputs(){return f.numberOfOutputs},get offset(){return f.gain},get onended(){return c.onended},set onended(t){c.onended=t},addEventListener:(...t)=>c.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>c.dispatchEvent(t[0]),removeEventListener:(...t)=>c.removeEventListener(t[0],t[1],t[2]),start(t=0){c.start.call(c,t)},stop(t=0){c.stop.call(c,t)}};return t(o,c),s(fo(p,f),(()=>c.connect(f)),(()=>c.disconnect(f)))})(Oa,Fa,vo,eh),Ro,Po),hh=((t,e,i,r,s,o,a)=>class extends t{constructor(t,a){const h=s(t),u=n(n({},Gs),a),l=r(h,u),c=o(h),f=c?i():null;super(t,!1,l,f),this._constantSourceNodeRenderer=f,this._nativeConstantSourceNode=l,this._offset=e(this,c,l.offset,as,os),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(t){const e="function"==typeof t?a(this,t):null;this._nativeConstantSourceNode.onended=e;const i=this._nativeConstantSourceNode.onended;this._onended=null!==i&&i===e?t:i}start(t=0){if(this._nativeConstantSourceNode.start(t),null!==this._constantSourceNodeRenderer&&(this._constantSourceNodeRenderer.start=t),"closed"!==this.context.state){Zr(this);const t=()=>{this._nativeConstantSourceNode.removeEventListener("ended",t),hs(this)&&Jr(this)};this._nativeConstantSourceNode.addEventListener("ended",t)}}stop(t=0){this._nativeConstantSourceNode.stop(t),null!==this._constantSourceNodeRenderer&&(this._constantSourceNodeRenderer.stop=t)}})(ga,Va,((t,e,i,n,r)=>()=>{const s=new WeakMap;let o=null,a=null;return{set start(t){o=t},set stop(t){a=t},render(h,u,l){const c=s.get(u);return void 0!==c?Promise.resolve(c):(async(h,u,l)=>{let c=i(h);const f=es(c,u);if(!f){const t={channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,offset:c.offset.value};c=e(u,t),null!==o&&c.start(o),null!==a&&c.stop(a)}return s.set(u,c),f?await t(u,h.offset,c.offset,l):await n(u,h.offset,c.offset,l),await r(h,u,c,l),c})(h,u,l)}}})(La,ah,Ss,Ba,Qo),ah,ia,oa,ko),uh=((t,e)=>(i,n)=>{const r=i.createConvolver();if(no(r,n),n.disableNormalization===r.normalize&&(r.normalize=!n.disableNormalization),io(r,n,"buffer"),n.channelCount>2)throw t();if(e(r,"channelCount",(t=>()=>t.call(r)),(e=>i=>{if(i>2)throw t();return e.call(r,i)})),"max"===n.channelCountMode)throw t();return e(r,"channelCountMode",(t=>()=>t.call(r)),(e=>i=>{if("max"===i)throw t();return e.call(r,i)})),r})(xo,Co),lh=((t,e,i,r,s,o)=>class extends t{constructor(t,a){const h=r(t),u=n(n({},Ws),a),l=i(h,u);super(t,!1,l,s(h)?e():null),this._isBufferNullified=!1,this._nativeConvolverNode=l,null!==u.buffer&&o(this,u.buffer.duration)}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(t){if(this._nativeConvolverNode.buffer=t,null===t&&null!==this._nativeConvolverNode.buffer){const t=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=t.createBuffer(1,1,44100),this._isBufferNullified=!0,o(this,0)}else this._isBufferNullified=!1,o(this,null===this._nativeConvolverNode.buffer?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(t){this._nativeConvolverNode.normalize=t}})(ga,((t,e,i)=>()=>{const n=new WeakMap;return{render(r,s,o){const a=n.get(s);return void 0!==a?Promise.resolve(a):(async(r,s,o)=>{let a=e(r);if(!es(a,s)){const e={buffer:a.buffer,channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,disableNormalization:!a.normalize};a=t(s,e)}return n.set(s,a),xs(a)?await i(r,s,a.inputs[0],o):await i(r,s,a,o),a})(r,s,o)}}}
vendor: 15,207 bytes, line 6859
6859)(uh,Ss,Qo),uh,ia,oa,Wa),ch=((t,e,i,r,s,o,a)=>class extends t{constructor(t,h){const u=s(t),l=n(n({},js),h),c=r(u,l),f=o(u);super(t,!1,c,f?i(l.maxDelayTime):null),this._delayTime=e(this,f,c.delayTime),a(this,l.maxDelayTime)}get delayTime(){return this._delayTime}})(ga,Va,((t,e,i,n,r)=>s=>{const o=new WeakMap;return{render(a,h,u){const l=o.get(h);return void 0!==l?Promise.resolve(l):(async(a,h,u)=>{let l=i(a);const c=es(l,h);if(!c){const t={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,delayTime:l.delayTime.value,maxDelayTime:s};l=e(h,t)}return o.set(h,l),c?await t(h,a.delayTime,l.delayTime,u):await n(h,a.delayTime,l.delayTime,u),await r(a,h,l,u),l})(a,h,u)}}})(La,po,Ss,Ba,Qo),po,ia,oa,Wa),fh=(dh=xo,(t,e)=>{const i=t.createDynamicsCompressor();if(no(i,e),e.channelCount>2)throw dh();if("max"===e.channelCountMode)throw dh();return so(i,e,"attack"),so(i,e,"knee"),so(i,e,"ratio"),so(i,e,"release"),so(i,e,"threshold"),i});var dh;const ph=((t,e,i,r,s,o,a,h)=>class extends t{constructor(t,s){const u=o(t),l=n(n({},qs),s),c=r(u,l),f=a(u);super(t,!1,c,f?i():null),this._attack=e(this,f,c.attack),this._knee=e(this,f,c.knee),this._nativeDynamicsCompressorNode=c,this._ratio=e(this,f,c.ratio),this._release=e(this,f,c.release),this._threshold=e(this,f,c.threshold),h(this,.006)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(t){const e=this._nativeDynamicsCompressorNode.channelCount;if(this._nativeDynamicsCompressorNode.channelCount=t,t>2)throw this._nativeDynamicsCompressorNode.channelCount=e,s()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(t){const e=this._nativeDynamicsCompressorNode.channelCountMode;if(this._nativeDynamicsCompressorNode.channelCountMode=t,"max"===t)throw this._nativeDynamicsCompressorNode.channelCountMode=e,s()}get knee(){return this._knee}get ratio(){return this._ratio}get reduction(){return"number"==typeof this._nativeDynamicsCompressorNode.reduction.value?this._nativeDynamicsCompressorNode.reduction.value:this._nativeDynamicsCompressorNode.reduction}get release(){return this._release}get threshold(){return this._threshold}})(ga,Va,((t,e,i,n,r)=>()=>{const s=new WeakMap;return{render(o,a,h){const u=s.get(a);return void 0!==u?Promise.resolve(u):(async(o,a,h)=>{let u=i(o);const l=es(u,a);if(!l){const t={attack:u.attack.value,channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,knee:u.knee.value,ratio:u.ratio.value,release:u.release.value,threshold:u.threshold.value};u=e(a,t)}return s.set(a,u),l?(await t(a,o.attack,u.attack,h),await t(a,o.knee,u.knee,h),await t(a,o.ratio,u.ratio,h),await t(a,o.release,u.release,h),await t(a,o.threshold,u.threshold,h)):(await n(a,o.attack,u.attack,h),await n(a,o.knee,u.knee,h),await n(a,o.ratio,u.ratio,h),await n(a,o.release,u.release,h),await n(a,o.threshold,u.threshold,h)),await r(o,a,u,h),u})(o,a,h)}}})(La,fh,Ss,Ba,Qo),fh,xo,ia,oa,Wa),vh=((t,e,i,r,s,o)=>class extends t{constructor(t,a){const h=s(t),u=n(n({},Ks),a),l=r(h,u),c=o(h);super(t,!1,l,c?i():null),this._gain=e(this,c,l.gain,as,os)}get gain(){return this._gain}})(ga,Va,((t,e,i,n,r)=>()=>{const s=new WeakMap;return{render(o,a,h){const u=s.get(a);return void 0!==u?Promise.resolve(u):(async(o,a,h)=>{let u=i(o);const l=es(u,a);if(!l){const t={channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,gain:u.gain.value};u=e(a,t)}return s.set(a,u),l?await t(a,o.gain,u.gain,h):await n(a,o.gain,u.gain,h),await r(o,a,u,h),u})(o,a,h)}}})(La,vo,Ss,Ba,Qo),vo,ia,oa),gh=((t,e,i,n)=>(r,s,{channelCount:o,channelCountMode:a,channelInterpretation:h,feedback:u,feedforward:l})=>{const c=ho(s,r.sampleRate),f=u instanceof Float64Array?u:new Float64Array(u),d=l instanceof Float64Array?l:new Float64Array(l),p=f.length,v=d.length,g=Math.min(p,v);if(0===p||p>20)throw n();if(0===f[0])throw e();if(0===v||v>20)throw n();if(0===d[0])throw e();if(1!==f[0]){for(let t=0;t<v;t+=1)d[t]/=f[0];for(let t=1;t<p;t+=1)f[t]/=f[0]}const m=i(r,c,o,o);m.channelCount=o,m.channelCountMode=a,m.channelInterpretation=h;const y=[],x=[],w=[];for(let t=0;t<o;t+=1){y.push(0);const t=new Float32Array(32),e=new Float32Array(32);t.fill(0),e.fill(0),x.push(t),w.push(e)}m.onaudioprocess=t=>{const e=t.inputBuffer,i=t.outputBuffer,n=e.numberOfChannels;for(let r=0;r<n;r+=1){const t=e.getChannelData(r),n=i.getChannelData(r);y[r]=$s(f,p,d,v,g,x[r],w[r],y[r],32,t,n)}};const _=r.sampleRate/2;return fo({get bufferSize(){return c},get channelCount(){return m.channelCount},set channelCount(t){m.channelCount=t},get channelCountMode(){return m.channelCountMode},set channelCountMode(t){m.channelCountMode=t},get channelInterpretation(){return m.channelInterpretation},set channelInterpretation(t){m.channelInterpretation=t},get context(){return m.context},get inputs(){return[m]},get numberOfInputs(){return m.numberOfInputs},get numberOfOutputs(){return m.numberOfOutputs},addEventListener:(...t)=>m.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>m.dispatchEvent(t[0]),getFrequencyResponse(e,i,n){if(e.length!==i.length||i.length!==n.length)throw t();const r=e.length;for(let t=0;t<r;t+=1){const r=-Math.PI*(e[t]/_),s=[Math.cos(r),Math.sin(r)],o=go(mo(d,s),mo(f,s));i[t]=Math.sqrt(o[0]*o[0]+o[1]*o[1]),n[t]=Math.atan2(o[1],o[0])}},removeEventListener:(...t)=>m.removeEventListener(t[0],t[1],t[2])},m)})(Qs,Zs,yo,xo),mh=((t,e,i,n)=>r=>t(eo,(()=>eo(r)))?Promise.resolve(t(n,n)).then((t=>{if(!t){const t=i(r,512,0,1);r.oncomplete=()=>{t.onaudioprocess=null,t.disconnect()},t.onaudioprocess=()=>r.currentTime,t.connect(r.destination)}return r.startRendering()})):new Promise((t=>{const i=e(r,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});r.oncomplete=e=>{i.disconnect(),t(e.renderedBuffer)},i.connect(r.destination),r.startRendering()})))(zo,vo,yo,((t,e)=>()=>{if(null===e)return Promise.resolve(!1);const i=new e(1,1,44100),n=t(i,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise((t=>{i.oncomplete=()=>{n.disconnect(),t(0!==i.currentTime)},i.startRendering()}))})(vo,ra)),yh=((t,e,i,n,r)=>(s,o)=>{const a=new WeakMap;let h=null;const u=async(u,l,c)=>{let f=null,d=e(u);const p=es(d,l);if(void 0===l.createIIRFilter?f=t(l,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):p||(d=l.createIIRFilter(o,s)),a.set(l,null===f?d:f),null!==f){if(null===h){if(null===i)throw new Error("Missing the native OfflineAudioContext constructor.");const t=new i(u.context.destination.channelCount,u.context.length,l.sampleRate);h=(async()=>{await n(u,t,t.destination,c);return((t,e,i,n)=>{const r=i instanceof Float64Array?i:new Float64Array(i),s=n instanceof Float64Array?n:new Float64Array(n),o=r.length,a=s.length,h=Math.min(o,a);if(1!==r[0]){for(let t=0;t<o;t+=1)s[t]/=r[0];for(let t=1;t<a;t+=1)r[t]/=r[0]}const u=new Float32Array(32),l=new Float32Array(32),c=e.createBuffer(t.numberOfChannels,t.length,t.sampleRate),f=t.numberOfChannels;for(let d=0;d<f;d+=1){const e=t.getChannelData(d),i=c.getChannelData(d);u.fill(0),l.fill(0),$s(r,o,s,a,h,u,l,0,32,e,i)}return c})(await r(t),l,s,o)})()}const t=await h;return f.buffer=t,f.start(0),f}return await n(u,l,d,c),d};return{render(t,e,i){const n=a.get(e);return void 0!==n?Promise.resolve(n):u(t,e,i)}}})(Fa,Ss,ra,Qo,mh);var xh;const wh=((t,e,i,r,s,o)=>class extends t{constructor(t,a){const h=r(t),u=s(h),l=n(n({},Js),a),c=e(h,u?null:t.baseLatency,l);super(t,!1,c,u?i(l.feedback,l.feedforward):null),(t=>{var e;t.getFrequencyResponse=(e=t.getFrequencyResponse,(i,n,r)=>{if(i.length!==n.length||n.length!==r.length)throw Qs();return e.call(t,i,n,r)})})(c),this._nativeIIRFilterNode=c,o(this,1)}getFrequencyResponse(t,e,i){return this._nativeIIRFilterNode.getFrequencyResponse(t,e,i)}})(ga,(xh=gh,(t,e,i)=>{if(void 0===t.createIIRFilter)return xh(t,e,i);const n=t.createIIRFilter(i.feedforward,i.feedback);return no(n,i),n}),yh,ia,oa,Wa),_h=((t,e,i,n,r)=>(s,o)=>{const a=o.listener,{forwardX:h,forwardY:u,forwardZ:l,positionX:c,positionY:f,positionZ:d,upX:p,upY:v,upZ:g}=void 0===a.forwardX?(()=>{const h=e(o,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),u=r(o),l=n(o,256,9,0),c=(e,n)=>{const r=i(o,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:n});return r.connect(h,0,e),r.start(),Object.defineProperty(r.offset,"defaultValue",{get:()=>n}),t({context:s},u,r.offset,as,os)};let f=[0,0,-1,0,1,0],d=[0,0,0];return l.onaudioprocess=({inputBuffer:t})=>{const e=[t.getChannelData(0)[0],t.getChannelData(1)[0],t.getChannelData(2)[0],t.getChannelData(3)[0],t.getChannelData(4)[0],t.getChannelData(5)[0]];e.some(((t,e)=>t!==f[e]))&&(a.setOrientation(...e),f=e);const i=[t.getChannelData(6)[0],t.getChannelData(7)[0],t.getChannelData(8)[0]];i.some(((t,e)=>t!==d[e]))&&(a.setPosition(...i),d=i)},h.connect(l),{forwardX:c(0,0),forwardY:c(1,0),forwardZ:c(2,-1),positionX:c(6,0),positionY:c(7,0),positionZ:c(8,0),upX:c(3,0),upY:c(4,1),upZ:c(5,0)}})():a;return{get forwardX(){return h},get forwardY(){return u},get forwardZ(){return l},get positionX(){return c},get positionY(){return f},get positionZ(){return d},get upX(){return p},get upY(){return v},get upZ(){return g}}})(Va,rh,ah,yo,oa),bh=new WeakMap,Th=((t,e,i,n,r,s)=>class extends i{constructor(i,s){super(i),this._nativeContext=i,Fr.set(this,i),n(i)&&r.set(i,new Set),this._destination=new t(this,s),this._listener=e(this,i),this._onstatechange=null}get currentTime(){return this._nativeContext.currentTime}get destination(){return this._destination}get listener(){return this._listener}get onstatechange(){return this._onstatechange}set onstatechange(t){const e="function"==typeof t?s(this,t):null;this._nativeContext.onstatechange=e;const i=this._nativeContext.onstatechange;this._onstatechange=null!==i&&i===e?t:i}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}})(Xa,_h,ua,oa,bh,ko),Eh=((t,e,i,n,r,s)=>(o,a)=>{const h=o.createOscillator();return no(h,a),so(h,a,"detune"),so(h,a,"frequency"),void 0!==a.periodicWave?h.setPeriodicWave(a.periodicWave):io(h,a,"type"),e(i,(()=>i(o)))||oo(h),e(n,(()=>n(o)))||s(h,o),e(r,(()=>r(o)))||ao(h),t(o,h),h})(Oa,zo,Ro,Mo,Po,Io),Sh=((t,e,i,r,s,o,a)=>class extends t{constructor(t,a){const h=s(t),u=n(n({},_o),a),l=i(h,u),c=o(h),f=c?r():null,d=t.sampleRate/2;super(t,!1,l,f),this._detune=e(this,c,l.detune,153600,-153600),this._frequency=e(this,c,l.frequency,d,-d),this._nativeOscillatorNode=l,this._onended=null,this._oscillatorNodeRenderer=f,null!==this._oscillatorNodeRenderer&&void 0!==u.periodicWave&&(this._oscillatorNodeRenderer.periodicWave=u.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(t){const e="function"==typeof t?a(this,t):null;this._nativeOscillatorNode.onended=e;const i=this._nativeOscillatorNode.onended;this._onended=null!==i&&i===e?t:i}get type(){return this._nativeOscillatorNode.type}set type(t){this._nativeOscillatorNode.type=t,null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(t){this._nativeOscillatorNode.setPeriodicWave(t),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.periodicWave=t)}start(t=0){if(this._nativeOscillatorNode.start(t),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.start=t),"closed"!==this.context.state){Zr(this);const t=()=>{this._nativeOscillatorNode.removeEventListener("ended",t),hs(this)&&Jr(this)};this._nativeOscillatorNode.addEventListener("ended",t)}}stop(t=0){this._nativeOscillatorNode.stop(t),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.stop=t)}})(ga,Va,Eh,((t,e,i,n,r)=>()=>{const s=new WeakMap;let o=null,a=null,h=null;return{set periodicWave(t){o=t},set start(t){a=t},set stop(t){h=t},render(u,l,c){const f=s.get(l);return void 0!==f?Promise.resolve(f):(async(u,l,c)=>{let f=i(u);const d=es(f,l);if(!d){const t={channelCount:f.channelCount,channelCountMode:f.channelCountMode,channelInterpretation:f.channelInterpretation,detune:f.detune.value,frequency:f.frequency.value,periodicWave:null===o?void 0:o,type:f.type};f=e(l,t),null!==a&&f.start(a),null!==h&&f.stop(h)}return s.set(l,f),d?(await t(l,u.detune,f.detune,c),await t(l,u.frequency,f.frequency,c)):(await n(l,u.detune,f.detune,c),await n(l,u.frequency,f.frequency,c)),await r(u,l,f,c),f})(u,l,c)}}})(La,Eh,Ss,Ba,Qo),ia,oa,ko),Ah=(Ch=Fa,(t,e)=>{const i=Ch(t,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),n=t.createBuffer(1,2,44100);return i.buffer=n,i.loop=!0,i.connect(e),i.start(),()=>{i.stop(),i.disconnect(e)}});var Ch;const Oh=((t,e,i,s,o)=>(a,h)=>{var{curve:u,oversample:l}=h,c=r(h,["curve","oversample"]);const f=a.createWaveShaper(),d=a.createWaveShaper();no(f,c),no(d,c);const p=i(a,n(n({},c),{gain:1})),v=i(a,n(n({},c),{gain:-1})),g=i(a,n(n({},c),{gain:1})),m=i(a,n(n({},c),{gain:-1}));let y=null,x=!1,w=null;const _={get bufferSize(){},get channelCount(){return f.channelCount},set channelCount(t){p.channelCount=t,v.channelCount=t,f.channelCount=t,g.channelCount=t,d.channelCount=t,m.channelCount=t},get channelCountMode(){return f.channelCountMode},set channelCountMode(t){p.channelCountMode=t,v.channelCountMode=t,f.channelCountMode=t,g.channelCountMode=t,d.channelCountMode=t,m.channelCountMode=t},get channelInterpretation(){return f.channelInterpretation},set channelInterpretation(t){p.channelInterpretation=t,v.channelInterpretation=t,f.channelInterpretation=t,g.channelInterpretation=t,d.channelInterpretation=t,m.channelInterpretation=t},get context(){return f.context},get curve(){return w},set curve(i){if(null!==i&&i.length<2)throw e();if(null===i)f.curve=i,d.curve=i;else{const t=i.length,e=new Float32Array(t+2-t%2),n=new Float32Array(t+2-t%2);e[0]=i[0],n[0]=-i[t-1];const r=Math.ceil((t+1)/2),s=(t+1)/2-1;for(let o=1;o<r;o+=1){const a=o/r*s,h=Math.floor(a),u=Math.ceil(a);e[o]=h===u?i[h]:(1-(a-h))*i[h]+(1-(u-a))*i[u],n[o]=h===u?-i[t-1-h]:-(1-(a-h))*i[t-1-h]-(1-(u-a))*i[t-1-u]}e[r]=t%2==1?i[r-1]:(i[r-2]+i[r-1])/2,f.curve=e,d.curve=n}w=i,x&&(s(w)&&null===y?y=t(a,p):null!==y&&(y(),y=null))},get inputs(){return[p]},get numberOfInputs(){return f.numberOfInputs},get numberOfOutputs(){return f.numberOfOutputs},get oversample(){return f.oversample},set oversample(t){f.oversample=t,d.oversample=t},addEventListener:(...t)=>p.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>p.dispatchEvent(t[0]),removeEventListener:(...t)=>p.removeEventListener(t[0],t[1],t[2])};null!==u&&(_.curve=u instanceof Float32Array?u:new Float32Array(u)),l!==_.oversample&&(_.oversample=l);return o(fo(_,g),(()=>{p.connect(f).connect(g),p.connect(v).connect(d).connect(m).connect(g),x=!0,s(w)&&(y=t(a,p))}),(()=>{p.disconnect(f),f.disconnect(g),p.disconnect(v),v.disconnect(d),d.disconnect(m),m.disconnect(g),x=!1,null!==y&&(y(),y=null)}))}
vendor: 5,594 bytes, line 6859
6859)(Ah,Zs,vo,Ao,eh),Rh=((t,e,i,n,r,s,o)=>(a,h)=>{const u=a.createWaveShaper();if(null!==s&&"webkitAudioContext"===s.name&&void 0===a.createGain().gain.automationRate)return i(a,h);no(u,h);const l=null===h.curve||h.curve instanceof Float32Array?h.curve:new Float32Array(h.curve);if(null!==l&&l.length<2)throw e();io(u,{curve:l},"curve"),io(u,h,"oversample");let c=null,f=!1;o(u,"curve",(t=>()=>t.call(u)),(e=>i=>(e.call(u,i),f&&(n(i)&&null===c?c=t(a,u):n(i)||null===c||(c(),c=null)),i)));return r(u,(()=>{f=!0,n(u.curve)&&(c=t(a,u))}),(()=>{f=!1,null!==c&&(c(),c=null)}))})(Ah,Zs,Oh,Ao,eh,ca,Co),Mh=((t,e,i,s,o,a,h,u,l)=>(c,f)=>{var{coneInnerAngle:d,coneOuterAngle:p,coneOuterGain:v,distanceModel:g,maxDistance:m,orientationX:y,orientationY:x,orientationZ:w,panningModel:_,positionX:b,positionY:T,positionZ:E,refDistance:S,rolloffFactor:A}=f,C=r(f,["coneInnerAngle","coneOuterAngle","coneOuterGain","distanceModel","maxDistance","orientationX","orientationY","orientationZ","panningModel","positionX","positionY","positionZ","refDistance","rolloffFactor"]);const O=c.createPanner();if(C.channelCount>2)throw h();if("max"===C.channelCountMode)throw h();no(O,C);const R={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},M=i(c,n(n({},R),{channelInterpretation:"speakers",numberOfInputs:6})),P=s(c,n(n({},C),{gain:1})),I=s(c,n(n({},R),{gain:1})),k=s(c,n(n({},R),{gain:0})),L=s(c,n(n({},R),{gain:0})),D=s(c,n(n({},R),{gain:0})),F=s(c,n(n({},R),{gain:0})),N=s(c,n(n({},R),{gain:0})),B=o(c,256,6,1),U=a(c,n(n({},R),{curve:new Float32Array([1,1]),oversample:"none"}));let V=[y,x,w],Y=[b,T,E];B.onaudioprocess=({inputBuffer:t})=>{const e=[t.getChannelData(0)[0],t.getChannelData(1)[0],t.getChannelData(2)[0]];e.some(((t,e)=>t!==V[e]))&&(O.setOrientation(...e),V=e);const i=[t.getChannelData(3)[0],t.getChannelData(4)[0],t.getChannelData(5)[0]];i.some(((t,e)=>t!==Y[e]))&&(O.setPosition(...i),Y=i)},Object.defineProperty(k.gain,"defaultValue",{get:()=>0}),Object.defineProperty(L.gain,"defaultValue",{get:()=>0}),Object.defineProperty(D.gain,"defaultValue",{get:()=>0}),Object.defineProperty(F.gain,"defaultValue",{get:()=>0}),Object.defineProperty(N.gain,"defaultValue",{get:()=>0});const z={get bufferSize(){},get channelCount(){return O.channelCount},set channelCount(t){if(t>2)throw h();P.channelCount=t,O.channelCount=t},get channelCountMode(){return O.channelCountMode},set channelCountMode(t){if("max"===t)throw h();P.channelCountMode=t,O.channelCountMode=t},get channelInterpretation(){return O.channelInterpretation},set channelInterpretation(t){P.channelInterpretation=t,O.channelInterpretation=t},get coneInnerAngle(){return O.coneInnerAngle},set coneInnerAngle(t){O.coneInnerAngle=t},get coneOuterAngle(){return O.coneOuterAngle},set coneOuterAngle(t){O.coneOuterAngle=t},get coneOuterGain(){return O.coneOuterGain},set coneOuterGain(t){if(t<0||t>1)throw e();O.coneOuterGain=t},get context(){return O.context},get distanceModel(){return O.distanceModel},set distanceModel(t){O.distanceModel=t},get inputs(){return[P]},get maxDistance(){return O.maxDistance},set maxDistance(t){if(t<0)throw new RangeError;O.maxDistance=t},get numberOfInputs(){return O.numberOfInputs},get numberOfOutputs(){return O.numberOfOutputs},get orientationX(){return I.gain},get orientationY(){return k.gain},get orientationZ(){return L.gain},get panningModel(){return O.panningModel},set panningModel(t){O.panningModel=t},get positionX(){return D.gain},get positionY(){return F.gain},get positionZ(){return N.gain},get refDistance(){return O.refDistance},set refDistance(t){if(t<0)throw new RangeError;O.refDistance=t},get rolloffFactor(){return O.rolloffFactor},set rolloffFactor(t){if(t<0)throw new RangeError;O.rolloffFactor=t},addEventListener:(...t)=>P.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>P.dispatchEvent(t[0]),removeEventListener:(...t)=>P.removeEventListener(t[0],t[1],t[2])};d!==z.coneInnerAngle&&(z.coneInnerAngle=d),p!==z.coneOuterAngle&&(z.coneOuterAngle=p),v!==z.coneOuterGain&&(z.coneOuterGain=v),g!==z.distanceModel&&(z.distanceModel=g),m!==z.maxDistance&&(z.maxDistance=m),y!==z.orientationX.value&&(z.orientationX.value=y),x!==z.orientationY.value&&(z.orientationY.value=x),w!==z.orientationZ.value&&(z.orientationZ.value=w),_!==z.panningModel&&(z.panningModel=_),b!==z.positionX.value&&(z.positionX.value=b),T!==z.positionY.value&&(z.positionY.value=T),E!==z.positionZ.value&&(z.positionZ.value=E),S!==z.refDistance&&(z.refDistance=S),A!==z.rolloffFactor&&(z.rolloffFactor=A),1===V[0]&&0===V[1]&&0===V[2]||O.setOrientation(...V),0===Y[0]&&0===Y[1]&&0===Y[2]||O.setPosition(...Y);return l(fo(z,O),(()=>{P.connect(O),t(P,U,0,0),U.connect(I).connect(M,0,0),U.connect(k).connect(M,0,1),U.connect(L).connect(M,0,2),U.connect(D).connect(M,0,3),U.connect(F).connect(M,0,4),U.connect(N).connect(M,0,5),M.connect(B).connect(c.destination)}),(()=>{P.disconnect(O),u(P,U,0,0),U.disconnect(I),I.disconnect(M),U.disconnect(k),k.disconnect(M),U.disconnect(L),L.disconnect(M),U.disconnect(D),D.disconnect(M),U.disconnect(F),F.disconnect(M),U.disconnect(N),N.disconnect(M),M.disconnect(B),B.disconnect(c.destination)}))})(ws,Zs,rh,vo,yo,Rh,xo,Es,eh),Ph=(Ih=Mh,(t,e)=>{const i=t.createPanner();return void 0===i.orientationX?Ih(t,e):(no(i,e),so(i,e,"orientationX"),so(i,e,"orientationY"),so(i,e,"orientationZ"),so(i,e,"positionX"),so(i,e,"positionY"),so(i,e,"positionZ"),io(i,e,"coneInnerAngle"),io(i,e,"coneOuterAngle"),io(i,e,"coneOuterGain"),io(i,e,"distanceModel"),io(i,e,"maxDistance"),io(i,e,"panningModel"),io(i,e,"refDistance"),io(i,e,"rolloffFactor"),i)});var Ih;
6859const kh=((t,e,i,r,s,o,a)=>class extends t{constructor(t,h){const u=s(t),l=n(n({},bo),h),c=i(u,l),f=o(u);super(t,!1,c,f?r():null),this._nativePannerNode=c,this._orientationX=e(this,f,c.orientationX,as,os),this._orientationY=e(this,f,c.orientationY,as,os),this._orientationZ=e(this,f,c.orientationZ,as,os),this._positionX=e(this,f,c.positionX,as,os),this._positionY=e(this,f,c.positionY,as,os),this._positionZ=e(this,f,c.positionZ,as,os),a(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(t){this._nativePannerNode.coneInnerAngle=t}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(t){this._nativePannerNode.coneOuterAngle=t}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(t){this._nativePannerNode.coneOuterGain=t}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(t){this._nativePannerNode.distanceModel=t}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(t){this._nativePannerNode.maxDistance=t}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(t){this._nativePannerNode.panningModel=t}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(t){this._nativePannerNode.refDistance=t}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(t){this._nativePannerNode.rolloffFactor=t}})(ga,Va,Ph,((t,e,i,r,s,o,a,h,u,l)=>()=>{const c=new WeakMap;let f=null;return{render(d,p,v){const g=c.get(p);return void 0!==g?Promise.resolve(g):(async(d,p,v)=>{let g=null,m=o(d);const y={channelCount:m.channelCount,channelCountMode:m.channelCountMode,channelInterpretation:m.channelInterpretation},x=n(n({},y),{coneInnerAngle:m.coneInnerAngle,coneOuterAngle:m.coneOuterAngle,coneOuterGain:m.coneOuterGain,distanceModel:m.distanceModel,maxDistance:m.maxDistance,panningModel:m.panningModel,refDistance:m.refDistance,rolloffFactor:m.rolloffFactor}),w=es(m,p);if("bufferSize"in m)g=r(p,n(n({},y),{gain:1}));else if(!w){const t=n(n({},x),{orientationX:m.orientationX.value,orientationY:m.orientationY.value,orientationZ:m.orientationZ.value,positionX:m.positionX.value,positionY:m.positionY.value,positionZ:m.positionZ.value});m=s(p,t)}if(c.set(p,null===g?m:g),null!==g){if(null===f){if(null===a)throw new Error("Missing the native OfflineAudioContext constructor.");const t=new a(6,d.context.length,p.sampleRate),n=e(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});n.connect(t.destination),f=(async()=>{const e=await Promise.all([d.orientationX,d.orientationY,d.orientationZ,d.positionX,d.positionY,d.positionZ].map((async(e,n)=>{const r=i(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:0===n?1:0});return await h(t,e,r.offset,v),r})));for(let t=0;t<6;t+=1)e[t].connect(n,0,t),e[t].start(0);return l(t)})()}const t=await f,o=r(p,n(n({},y),{gain:1}));await u(d,p,o,v);const c=[];for(let e=0;e<t.numberOfChannels;e+=1)c.push(t.getChannelData(e));let m=[c[0][0],c[1][0],c[2][0]],w=[c[3][0],c[4][0],c[5][0]],_=r(p,n(n({},y),{gain:1})),b=s(p,n(n({},x),{orientationX:m[0],orientationY:m[1],orientationZ:m[2],positionX:w[0],positionY:w[1],positionZ:w[2]}));o.connect(_).connect(b.inputs[0]),b.connect(g);for(let e=128;e<t.length;e+=128){const t=[c[0][e],c[1][e],c[2][e]],i=[c[3][e],c[4][e],c[5][e]];if(t.some(((t,e)=>t!==m[e]))||i.some(((t,e)=>t!==w[e]))){m=t,w=i;const a=e/p.sampleRate;_.gain.setValueAtTime(0,a),_=r(p,n(n({},y),{gain:0})),b=s(p,n(n({},x),{orientationX:m[0],orientationY:m[1],orientationZ:m[2],positionX:w[0],positionY:w[1],positionZ:w[2]})),_.gain.setValueAtTime(1,a),o.connect(_).connect(b.inputs[0]),b.connect(g)}}return g}return w?(await t(p,d.orientationX,m.orientationX,v),await t(p,d.orientationY,m.orientationY,v),await t(p,d.orientationZ,m.orientationZ,v),await t(p,d.positionX,m.positionX,v),await t(p,d.positionY,m.positionY,v),await t(p,d.positionZ,m.positionZ,v)):(await h(p,d.orientationX,m.orientationX,v),await h(p,d.orientationY,m.orientationY,v),await h(p,d.orientationZ,m.orientationZ,v),await h(p,d.positionX,m.positionX,v),await h(p,d.positionY,m.positionY,v),await h(p,d.positionZ,m.positionZ,v)),xs(m)?await u(d,p,m.inputs[0],v):await u(d,p,m,v),m})(d,p,v)}}}
6859)(La,rh,ah,vo,Ph,Ss,ra,Ba,Qo,mh),ia,oa,Wa),Lh=((t,e,i,r)=>class s{constructor(s,o){const a=e(s),h=r(n(n({},To),o)),u=t(a,h);return i.add(u),u}static[Symbol.hasInstance](t){return null!==t&&"object"==typeof t&&Object.getPrototypeOf(t)===s.prototype||i.has(t)}})((t=>(e,{disableNormalization:i,imag:n,real:r})=>{const s=n instanceof Float32Array?n:new Float32Array(n),o=r instanceof Float32Array?r:new Float32Array(r),a=e.createPeriodicWave(o,s,{disableNormalization:i});if(Array.from(n).length<2)throw t();return a})(ns),ia,new WeakSet,(t=>{const{imag:e,real:i}=t;return n(n({},t),void 0===e?void 0===i?{imag:[0,0],real:[0,0]}:{imag:Array.from(i,(()=>0)),real:i}:void 0===i?{imag:e,real:Array.from(e,(()=>0))}:{imag:e,real:i})})),Dh=((t,e)=>(i,n)=>{const r=n.channelCountMode;if("clamped-max"===r)throw e();if(void 0===i.createStereoPanner)return t(i,n);const s=i.createStereoPanner();return no(s,n),so(s,n,"pan"),Object.defineProperty(s,"channelCountMode",{get:()=>r,set:t=>{if(t!==r)throw e()}}),s})(((t,e,i,s,o,a)=>{const h=16385,u=new Float32Array([1,1]),l=Math.PI/2,c={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},f=n(n({},c),{oversample:"none"}),d=(t,r,a,d,p)=>{if(1===r)return((t,e,r,o)=>{const a=new Float32Array(h),d=new Float32Array(h);for(let i=0;i<h;i+=1){const t=i/16384*l;a[i]=Math.cos(t),d[i]=Math.sin(t)}const p=i(t,n(n({},c),{gain:0})),v=s(t,n(n({},f),{curve:a})),g=s(t,n(n({},f),{curve:u})),m=i(t,n(n({},c),{gain:0})),y=s(t,n(n({},f),{curve:d}));return{connectGraph(){e.connect(p),e.connect(void 0===g.inputs?g:g.inputs[0]),e.connect(m),g.connect(r),r.connect(void 0===v.inputs?v:v.inputs[0]),r.connect(void 0===y.inputs?y:y.inputs[0]),v.connect(p.gain),y.connect(m.gain),p.connect(o,0,0),m.connect(o,0,1)},disconnectGraph(){e.disconnect(p),e.disconnect(void 0===g.inputs?g:g.inputs[0]),e.disconnect(m),g.disconnect(r),r.disconnect(void 0===v.inputs?v:v.inputs[0]),r.disconnect(void 0===y.inputs?y:y.inputs[0]),v.disconnect(p.gain),y.disconnect(m.gain),p.disconnect(o,0,0),m.disconnect(o,0,1)}}})(t,a,d,p);if(2===r)return((t,r,o,a)=>{const d=new Float32Array(h),p=new Float32Array(h),v=new Float32Array(h),g=new Float32Array(h),m=Math.floor(8192.5);for(let e=0;e<h;e+=1)if(e>m){const t=(e-m)/(16384-m)*l;d[e]=Math.cos(t),p[e]=Math.sin(t),v[e]=0,g[e]=1}else{const t=e/(16384-m)*l;d[e]=1,p[e]=0,v[e]=Math.cos(t),g[e]=Math.sin(t)}const y=e(t,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),x=i(t,n(n({},c),{gain:0})),w=s(t,n(n({},f),{curve:d})),_=i(t,n(n({},c),{gain:0})),b=s(t,n(n({},f),{curve:p})),T=s(t,n(n({},f),{curve:u})),E=i(t,n(n({},c),{gain:0})),S=s(t,n(n({},f),{curve:v})),A=i(t,n(n({},c),{gain:0})),C=s(t,n(n({},f),{curve:g}));return{connectGraph(){r.connect(y),r.connect(void 0===T.inputs?T:T.inputs[0]),y.connect(x,0),y.connect(_,0),y.connect(E,1),y.connect(A,1),T.connect(o),o.connect(void 0===w.inputs?w:w.inputs[0]),o.connect(void 0===b.inputs?b:b.inputs[0]),o.connect(void 0===S.inputs?S:S.inputs[0]),o.connect(void 0===C.inputs?C:C.inputs[0]),w.connect(x.gain),b.connect(_.gain),S.connect(E.gain),C.connect(A.gain),x.connect(a,0,0),E.connect(a,0,0),_.connect(a,0,1),A.connect(a,0,1)},disconnectGraph(){r.disconnect(y),r.disconnect(void 0===T.inputs?T:T.inputs[0]),y.disconnect(x,0),y.disconnect(_,0),y.disconnect(E,1),y.disconnect(A,1),T.disconnect(o),o.disconnect(void 0===w.inputs?w:w.inputs[0]),o.disconnect(void 0===b.inputs?b:b.inputs[0]),o.disconnect(void 0===S.inputs?S:S.inputs[0]),o.disconnect(void 0===C.inputs?C:C.inputs[0]),w.disconnect(x.gain),b.disconnect(_.gain),S.disconnect(E.gain),C.disconnect(A.gain),x.disconnect(a,0,0),E.disconnect(a,0,0),_.disconnect(a,0,1),A.disconnect(a,0,1)}}})(t,a,d,p);throw o()};return(e,s)=>{var{channelCount:h,channelCountMode:u,pan:l}=s,c=r(s,["channelCount","channelCountMode","pan"]);if("max"===u)throw o();const f=t(e,n(n({},c),{channelCount:1,channelCountMode:u,numberOfInputs:2})),p=i(e,n(n({},c),{channelCount:h,channelCountMode:u,gain:1})),v=i(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:l});
vendor: 4,205 bytes, line 6859
6859let{connectGraph:g,disconnectGraph:m}=d(e,h,p,v,f);Object.defineProperty(v.gain,"defaultValue",{get:()=>0}),Object.defineProperty(v.gain,"maxValue",{get:()=>1}),Object.defineProperty(v.gain,"minValue",{get:()=>-1});const y={get bufferSize(){},get channelCount(){return p.channelCount},set channelCount(t){p.channelCount!==t&&(x&&m(),({connectGraph:g,disconnectGraph:m}=d(e,t,p,v,f)),x&&g()),p.channelCount=t},get channelCountMode(){return p.channelCountMode},set channelCountMode(t){if("clamped-max"===t||"max"===t)throw o();p.channelCountMode=t},get channelInterpretation(){return p.channelInterpretation},set channelInterpretation(t){p.channelInterpretation=t},get context(){return p.context},get inputs(){return[p]},get numberOfInputs(){return p.numberOfInputs},get numberOfOutputs(){return p.numberOfOutputs},get pan(){return v.gain},addEventListener:(...t)=>p.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>p.dispatchEvent(t[0]),removeEventListener:(...t)=>p.removeEventListener(t[0],t[1],t[2])};let x=!1;return a(fo(y,f),(()=>{g(),x=!0}),(()=>{m(),x=!1}))}})(rh,co,vo,Rh,xo,eh),xo),Fh=((t,e,i,r,s,o)=>class extends t{constructor(t,a){const h=s(t),u=n(n({},Eo),a),l=i(h,u),c=o(h);super(t,!1,l,c?r():null),this._pan=e(this,c,l.pan)}get pan(){return this._pan}})(ga,Va,Dh,((t,e,i,n,r)=>()=>{const s=new WeakMap;return{render(o,a,h){const u=s.get(a);return void 0!==u?Promise.resolve(u):(async(o,a,h)=>{let u=i(o);const l=es(u,a);if(!l){const t={channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,pan:u.pan.value};u=e(a,t)}return s.set(a,u),l?await t(a,o.pan,u.pan,h):await n(a,o.pan,u.pan,h),xs(u)?await r(o,a,u.inputs[0],h):await r(o,a,u,h),u})(o,a,h)}}})(La,Dh,Ss,Ba,Qo),ia,oa),Nh=((t,e,i)=>()=>{const n=new WeakMap;return{render(r,s,o){const a=n.get(s);return void 0!==a?Promise.resolve(a):(async(r,s,o)=>{let a=e(r);if(!es(a,s)){const e={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,curve:a.curve,oversample:a.oversample};a=t(s,e)}return n.set(s,a),xs(a)?await i(r,s,a.inputs[0],o):await i(r,s,a,o),a})(r,s,o)}}})(Rh,Ss,Qo),Bh=((t,e,i,r,s,o,a)=>class extends t{constructor(t,e){const h=s(t),u=n(n({},So),e),l=i(h,u);super(t,!0,l,o(h)?r():null),this._isCurveNullified=!1,this._nativeWaveShaperNode=l,a(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(t){if(null===t)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(t.length<2)throw e();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=t}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(t){this._nativeWaveShaperNode.oversample=t}})(ga,Zs,Rh,Nh,ia,oa,Wa),Uh=(t=>null!==t&&t.isSecureContext)(Wo),Vh=(t=>(e,i,n)=>{Object.defineProperties(t,{currentFrame:{configurable:!0,get:()=>Math.round(e*i)},currentTime:{configurable:!0,get:()=>e}});try{return n()}finally{null!==t&&(delete t.currentFrame,delete t.currentTime)}})(Wo),Yh=new WeakMap,zh=((t,e)=>i=>{let n=t.get(i);if(void 0!==n)return n;if(null===e)throw new Error("Missing the native OfflineAudioContext constructor.");return n=new e(1,1,8e3),t.set(i,n),n})(Yh,ra),Xh=(t=>null===t?null:t.hasOwnProperty("AudioWorkletNode")?t.AudioWorkletNode:null)(Wo),Gh=Uh?((t,e,i,n,r,s,o,a,h,u,l,c)=>(f,d,p={credentials:"omit"})=>{const v=s(f);if(void 0!==v.audioWorklet)return Promise.all([r(d),Promise.resolve(t(l,l))]).then((([[t,e],i])=>{const[n,r]=Xr(t,e),s=i?r:r.replace(/\s+extends\s+AudioWorkletProcessor\s*{/," extends (class extends AudioWorkletProcessor {__b=new WeakSet();constructor(){super();(p=>p.postMessage=(q=>(m,t)=>q.call(p,m,t?t.filter(u=>!this.__b.has(u)):t))(p.postMessage))(this.port)}}){"),h=new Blob([`${n};(registerProcessor=>{${s}\n})((n,p)=>registerProcessor(n,class extends p{${i?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${i?"":"i.forEach(this.__c);o.forEach(this.__c);this.__c(Object.values(p));"}return super.process(i.map(j=>j.some(k=>k.length===0)?[]:j),o,p)}}))`],{type:"application/javascript; charset=utf-8"}),u=URL.createObjectURL(h);return v.audioWorklet.addModule(u,p).then((()=>
6859{if(a(v))return;return o(v).audioWorklet.addModule(u,p)})).finally((()=>URL.revokeObjectURL(u)))}));const g=u.get(f);if(void 0!==g&&g.has(d))return Promise.resolve();const m=h.get(f);if(void 0!==m){const t=m.get(d);if(void 0!==t)return t}const y=r(d).then((([t,e])=>{const[n,r]=Xr(t,e);return i(`${n};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${r}\n})})(window,'_AWGS')`)})).then((()=>{const t=c._AWGS.pop();if(void 0===t)throw new SyntaxError;n(v.currentTime,v.sampleRate,(()=>t(class{},void 0,((t,i)=>{if(""===t.trim())throw e();const n=Ur.get(v);if(void 0!==n){if(n.has(t))throw e();Wr(i),Gr(i.parameterDescriptors),n.set(t,i)}else Wr(i),Gr(i.parameterDescriptors),Ur.set(v,new Map([[t,i]]))}),v.sampleRate,void 0,void 0)))}));return void 0===m?h.set(f,new Map([[d,y]])):m.set(d,y),y.then((()=>{const t=u.get(f);void 0===t?u.set(f,new Set([d])):t.add(d)})).finally((()=>{const t=h.get(f);void 0!==t&&t.delete(d)})),y})(zo,xo,(t=>e=>new Promise(((i,n)=>{if(null===t)return void n(new SyntaxError);const r=t.document.head;if(null===r)n(new SyntaxError);else{const s=t.document.createElement("script"),o=new Blob([e],{type:"application/javascript"}),a=URL.createObjectURL(o),h=t.onerror,u=()=>{t.onerror=h,URL.revokeObjectURL(a)};t.onerror=(e,i,r,s,o)=>i===a||i===t.location.href&&1===r&&1===s?(u(),n(o),!1):null!==h?h(e,i,r,s,o):void 0,s.onerror=()=>{u(),n(new SyntaxError)},s.onload=()=>{u(),i()},s.src=a,s.type="module",r.appendChild(s)}})))(Wo),Vh,(Wh=()=>new DOMException("","AbortError"),async t=>{try{const e=await fetch(t);if(e.ok)return[await e.text(),e.url]}catch(lC){}throw Wh()}),ia,zh,oa,new WeakMap,new WeakMap,((t,e)=>async()=>{if(null===t)return!0;if(null===e)return!1;const i=new Blob(['class A extends AudioWorkletProcessor{process(i){this.port.postMessage(i,[i[0][0].buffer])}}registerProcessor("a",A)'],{type:"application/javascript; charset=utf-8"}),n=new e(1,128,8e3),r=URL.createObjectURL(i);let s=!1,o=!1;try{await n.audioWorklet.addModule(r);const e=new t(n,"a",{numberOfOutputs:0}),i=n.createOscillator();e.port.onmessage=()=>s=!0,e.onprocessorerror=()=>o=!0,i.connect(e),await n.startRendering()}catch(lC){}finally{URL.revokeObjectURL(r)}return s&&!o})(Xh,ra),Wo):void 0;var Wh;const jh=((t,e)=>i=>t(i)||e(i))(fa,oa),Hh=((t,e,i,n,r,s,o,a,h,u,l)=>(c,f)=>{const d=o(c)?c:s(c);if(r.has(f)){const t=i();return Promise.reject(t)}try{r.add(f)}catch(lC){}return e(h,(()=>h(d)))?d.decodeAudioData(f).then((i=>(e(a,(()=>a(i)))||l(i),t.add(i),i))):new Promise(((e,i)=>{const r=()=>{try{(t=>{const{port1:e}=new MessageChannel;e.postMessage(t,[t])})(f)}catch(lC){}},s=t=>{i(t),r()};try{d.decodeAudioData(f,(i=>{"function"!=typeof i.copyFromChannel&&(u(i),rs(i)),t.add(i),r(),e(i)}),(t=>{s(null===t?n():t)}))}catch(o){s(o)}}))})(xa,zo,(()=>new DOMException("","DataCloneError")),(()=>new DOMException("","EncodingError")),new WeakSet,ia,jh,is,eo,Ta,Ea),qh=(Kh=Gh,Zh=ya,Qh=Aa,Jh=za,$h=ja,tu=sh,eu=oh,iu=hh,nu=lh,ru=Hh,su=ch,ou=ph,au=vh,hu=wh,uu=Th,lu=Sh,cu=kh,fu=Lh,du=Fh,pu=Bh,class extends uu{constructor(t,e){super(t,e),this._nativeContext=t,this._audioWorklet=void 0===Kh?void 0:{addModule:(t,e)=>Kh(this,t,e)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new Zh(this)}createBiquadFilter(){return new $h(this)}createBuffer(t,e,i){return new Qh({length:e,numberOfChannels:t,sampleRate:i})}createBufferSource(){return new Jh(this)}createChannelMerger(t=6){return new tu(this,{numberOfInputs:t})}createChannelSplitter(t=6){return new eu(this,{numberOfOutputs:t})}createConstantSource(){return new iu(this)}createConvolver(){return new nu(this)}createDelay(t=1){return new su(this,{maxDelayTime:t})}createDynamicsCompressor(){return new ou(this)}createGain(){return new au(this)}createIIRFilter(t,e){return new hu(this,{feedback:e,feedforward:t})}createOscillator(){return new lu(this)}createPanner(){return new cu(this)}createPeriodicWave(t,e,i={disableNormalization:!1}){return new fu(this,n(n({},i),{imag:e,real:t}))}createStereoPanner(){return new du(this)}createWaveShaper(){return new pu(this)}
vendor: 6,385 bytes, line 6859
6859decodeAudioData(t,e,i){return ru(this._nativeContext,t).then((t=>("function"==typeof e&&e(t),t))).catch((t=>{throw"function"==typeof i&&i(t),t}))}});var Kh,Zh,Qh,Jh,$h,tu,eu,iu,nu,ru,su,ou,au,hu,uu,lu,cu,fu,du,pu;const vu=((t,e,i,n)=>class extends t{constructor(t,r){const s=i(t),o=e(s,r);if(n(s))throw TypeError();super(t,!0,o,null),this._nativeMediaElementAudioSourceNode=o}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}})(ga,((t,e)=>t.createMediaElementSource(e.mediaElement)),ia,oa),gu=((t,e,i,r)=>class extends t{constructor(t,s){const o=i(t);if(r(o))throw new TypeError;const a=n(n({},to),s),h=e(o,a);super(t,!1,h,null),this._nativeMediaStreamAudioDestinationNode=h}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}})(ga,((t,e)=>{const i=t.createMediaStreamDestination();return no(i,e),1===i.numberOfOutputs&&Object.defineProperty(i,"numberOfOutputs",{get:()=>0}),i}),ia,oa),mu=((t,e,i,n)=>class extends t{constructor(t,r){const s=i(t),o=e(s,r);if(n(s))throw new TypeError;super(t,!0,o,null),this._nativeMediaStreamAudioSourceNode=o}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}})(ga,((t,{mediaStream:e})=>{const i=e.getAudioTracks();i.sort(((t,e)=>t.id<e.id?-1:t.id>e.id?1:0));const n=i.slice(0,1),r=t.createMediaStreamSource(new MediaStream(n));return Object.defineProperty(r,"mediaStream",{value:e}),r}),ia,oa),yu=((t,e,i)=>class extends t{constructor(t,n){const r=i(t);super(t,!0,e(r,n),null)}})(ga,((t,e)=>(i,{mediaStreamTrack:n})=>{if("function"==typeof i.createMediaStreamTrackSource)return i.createMediaStreamTrackSource(n);const r=new MediaStream([n]),s=i.createMediaStreamSource(r);if("audio"!==n.kind)throw t();if(e(i))throw new TypeError;return s})(Zs,oa),ia),xu=((t,e,i,n,r,s,o,a,h)=>class extends t{constructor(t={}){if(null===h)throw new Error("Missing the native AudioContext constructor.");const e=new h(t);if(null===e)throw n();if(!(t=>void 0===t||"number"==typeof t||"string"==typeof t&&("balanced"===t||"interactive"===t||"playback"===t))(t.latencyHint))throw new TypeError(`The provided value '${t.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(void 0!==t.sampleRate&&e.sampleRate!==t.sampleRate)throw i();super(e,2);const{latencyHint:r}=t,{sampleRate:s}=e;if(this._baseLatency="number"==typeof e.baseLatency?e.baseLatency:"balanced"===r?512/s:"interactive"===r||void 0===r?256/s:"playback"===r?1024/s:128*Math.max(2,Math.min(128,Math.round(r*s/128)))/s,this._nativeAudioContext=e,"webkitAudioContext"===h.name?(this._nativeGainNode=e.createGain(),this._nativeOscillatorNode=e.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(e.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),this._state=null,"running"===e.state){this._state="suspended";const t=()=>{"suspended"===this._state&&(this._state=null),e.removeEventListener("statechange",t)};e.addEventListener("statechange",t)}}get baseLatency(){return this._baseLatency}get state(){return null!==this._state?this._state:this._nativeAudioContext.state}close(){return"closed"===this.state?this._nativeAudioContext.close().then((()=>{throw e()})):("suspended"===this._state&&(this._state=null),this._nativeAudioContext.close().then((()=>{null!==this._nativeGainNode&&null!==this._nativeOscillatorNode&&(this._nativeOscillatorNode.stop(),this._nativeGainNode.disconnect(),this._nativeOscillatorNode.disconnect()),ds(this)})))}createMediaElementSource(t){return new r(this,{mediaElement:t})}createMediaStreamDestination(){return new s(this)}createMediaStreamSource(t){return new o(this,{mediaStream:t})}createMediaStreamTrackSource(t){return new a(this,{mediaStreamTrack:t})}resume(){return"suspended"===this._state?new Promise(((t,e)=>{const i=()=>{this._nativeAudioContext.removeEventListener("statechange",i),"running"===this._nativeAudioContext.state?t():this.resume().then(t,e)};this._nativeAudioContext.addEventListener("statechange",i)})):this._nativeAudioContext.resume().catch((t=>{if(void 0===t||15===t.code)throw e();throw t}))}suspend(){return this._nativeAudioContext.suspend().catch((t=>{if(void 0===t)throw e();throw t}))}})(qh,Zs,xo,(()=>new DOMException("","UnknownError")),vu,gu,mu,yu,ca),wu=(_u=bh,t=>{const e=_u.get(t);if(void 0===e)throw new Error("The context has no set of AudioWorkletNodes.");return e});var _u;const bu=(Tu=wu,(t,e)=>{Tu(t).add(e)});var Tu;const Eu=(t=>(e,i,n=0,r=0)=>{const s=e[n];if(void 0===s)throw t();return Ps(i)?s.connect(i,0,r):s.connect(i,0)})(ns),Su=(t=>(e,i)=>{t(e).delete(i)})(wu),Au=(t=>(e,i,n,r=0)=>void 0===i?e.forEach((t=>t.disconnect())):"number"==typeof i?Hs(t,e,i).disconnect():Ps(i)?void 0===n?e.forEach((t=>t.disconnect(i))):void 0===r?Hs(t,e,n).disconnect(i,0):Hs(t,e,n).disconnect(i,0,r):void 0===n?e.forEach((t=>t.disconnect(i))):Hs(t,e,n).disconnect(i,0))(ns),Cu=new WeakMap,Ou=(Ru=Cu,Mu=jr,t=>Mu(Ru,t));var Ru,Mu;const Pu=((t,e,i,r,s,o,a,h,u,l,c,f,d)=>(p,v,g,m)=>{if(0===m.numberOfInputs&&0===m.numberOfOutputs)throw u();const y=Array.isArray(m.outputChannelCount)?m.outputChannelCount:Array.from(m.outputChannelCount);if(y.some((t=>t<1)))throw u();if(y.length!==m.numberOfOutputs)throw e();if("explicit"!==m.channelCountMode)throw u();const x=m.channelCount*m.numberOfInputs,w=y.reduce(((t,e)=>t+e),0),_=void 0===g.parameterDescriptors?0:g.parameterDescriptors.length;if(x+_>6||w>6)throw u();const b=new MessageChannel,T=[],E=[];for(let t=0;t<m.numberOfInputs;t+=1)T.push(a(p,{channelCount:m.channelCount,channelCountMode:m.channelCountMode,channelInterpretation:m.channelInterpretation,gain:1})),E.push(s(p,{channelCount:m.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:m.channelCount}));const S=[];if(void 0!==g.parameterDescriptors)for(const{defaultValue:t,maxValue:e,minValue:i,name:n}of g.parameterDescriptors){const r=o(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:void 0!==m.parameterData[n]?m.parameterData[n]:void 0===t?0:t});Object.defineProperties(r.offset,{defaultValue:{get:()=>void 0===t?0:t},maxValue:{get:()=>void 0===e?as:e},minValue:{get:()=>void 0===i?os:i}}),S.push(r)}const A=r(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,x+_)}
vendor: 4,622 bytes, line 6859
6859),C=ho(v,p.sampleRate),O=h(p,C,x+_,Math.max(1,w)),R=s(p,{channelCount:Math.max(1,w),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,w)}),M=[];for(let t=0;t<m.numberOfOutputs;t+=1)M.push(r(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:y[t]}));for(let t=0;t<m.numberOfInputs;t+=1){T[t].connect(E[t]);for(let e=0;e<m.channelCount;e+=1)E[t].connect(A,e,t*m.channelCount+e)}const P=new Ds(void 0===g.parameterDescriptors?[]:g.parameterDescriptors.map((({name:t},e)=>{const i=S[e];return i.connect(A,0,x+e),i.start(0),[t,i.offset]})));A.connect(O);let I=m.channelInterpretation,k=null;const L=0===m.numberOfOutputs?[O]:M,D={get bufferSize(){return C},get channelCount(){return m.channelCount},set channelCount(t){throw i()},get channelCountMode(){return m.channelCountMode},set channelCountMode(t){throw i()},get channelInterpretation(){return I},set channelInterpretation(t){for(const e of T)e.channelInterpretation=t;I=t},get context(){return O.context},get inputs(){return T},get numberOfInputs(){return m.numberOfInputs},get numberOfOutputs(){return m.numberOfOutputs},get onprocessorerror(){return k},set onprocessorerror(t){"function"==typeof k&&D.removeEventListener("processorerror",k),k="function"==typeof t?t:null,"function"==typeof k&&D.addEventListener("processorerror",k)},get parameters(){return P},get port(){return b.port2},addEventListener:(...t)=>O.addEventListener(t[0],t[1],t[2]),connect:t.bind(null,L),disconnect:l.bind(null,L),dispatchEvent:(...t)=>O.dispatchEvent(t[0]),removeEventListener:(...t)=>O.removeEventListener(t[0],t[1],t[2])},F=new Map;var N,B;b.port1.addEventListener=(N=b.port1.addEventListener,(...t)=>{if("message"===t[0]){const e="function"==typeof t[1]?t[1]:"object"==typeof t[1]&&null!==t[1]&&"function"==typeof t[1].handleEvent?t[1].handleEvent:null;if(null!==e){const i=F.get(t[1]);void 0!==i?t[1]=i:(t[1]=t=>{c(p.currentTime,p.sampleRate,(()=>e(t)))},F.set(e,t[1]))}}return N.call(b.port1,t[0],t[1],t[2])}),b.port1.removeEventListener=(B=b.port1.removeEventListener,(...t)=>{if("message"===t[0]){const e=F.get(t[1]);void 0!==e&&(F.delete(t[1]),t[1]=e)}return B.call(b.port1,t[0],t[1],t[2])});let U=null;Object.defineProperty(b.port1,"onmessage",{get:()=>U,set:t=>{"function"==typeof U&&b.port1.removeEventListener("message",U),U="function"==typeof t?t:null,"function"==typeof U&&(b.port1.addEventListener("message",U),b.port1.start())}}),g.prototype.port=b.port1;let V=null;((t,e,i,n)=>{let r=Vr.get(t);void 0===r&&(r=new WeakMap,Vr.set(t,r));const s=uo(i,n);return r.set(e,s),s})(p,D,g,m).then((t=>V=t));const Y=Us(m.numberOfInputs,m.channelCount),z=Us(m.numberOfOutputs,y),X=void 0===g.parameterDescriptors?[]:g.parameterDescriptors.reduce(((t,{name:e})=>n(n({},t),{[e]:new Float32Array(128)})),{});let G=!0;const W=()=>{m.numberOfOutputs>0&&O.disconnect(R);for(let t=0,e=0;t<m.numberOfOutputs;t+=1){const i=M[t];for(let n=0;n<y[t];n+=1)R.disconnect(i,e+n,n);e+=y[t]}},j=new Map;O.onaudioprocess=({inputBuffer:t,outputBuffer:e})=>{if(null!==V){const n=f(D);for(let r=0;r<C;r+=128){for(let e=0;e<m.numberOfInputs;e+=1)for(let i=0;i<m.channelCount;i+=1)Ns(t,Y[e],i,i,r);void 0!==g.parameterDescriptors&&g.parameterDescriptors.forEach((({name:e},i)=>{Ns(t,X,e,x+i,r)}));for(let t=0;t<m.numberOfInputs;t+=1)for(let e=0;e<y[t];e+=1)0===z[t][e].byteLength&&(z[t][e]=new Float32Array(128));try{const t=Y.map(((t,e)=>{if(n[e].size>0)return j.set(e,C/128),t;const i=j.get(e);return void 0===i?[]:(t.every((t=>t.every((t=>0===t))))&&(1===i?j.delete(e):j.set(e,i-1)),t)})),i=c(p.currentTime+r/p.sampleRate,p.sampleRate,(()=>V.process(t,z,X)));G=i;for(let n=0,s=0;n<m.numberOfOutputs;n+=1){for(let t=0;t<y[n];t+=1)Bs(e,z[n],t,s+t,r);s+=y[n]}}catch(i){G=!1,D.dispatchEvent(new ErrorEvent("processorerror",{colno:i.colno,filename:i.filename,lineno:i.lineno,message:i.message}))}if(!G){for(let t=0;t<m.numberOfInputs;t+=1){T[t].disconnect(E[t]);for(let e=0;e<m.channelCount;e+=1)E[r].disconnect(A,e,t*m.channelCount+e)}if(void 0!==g.parameterDescriptors){const t=g.parameterDescriptors.length;for(let e=0;e<t;e+=1){const t=S[e];t.disconnect(A,0,x+e),t.stop()}}A.disconnect(O),O.onaudioprocess=null,H?W():Z();break}}}};let H=!1;const q=a(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0}),K=()=>O.connect(q).connect(p.destination),Z=()=>{O.disconnect(q),q.disconnect()};return K(),d(D,(()=>{if(G){Z(),m.numberOfOutputs>0&&O.connect(R);for(let t=0,e=0;t<m.numberOfOutputs;t+=1){const i=M[t];for(let n=0;n<y[t];n+=1)R.connect(i,e+n,n);e+=y[t]}}H=!0}),(()=>{G&&(K(),W()),H=!1}
vendor: 4,073 bytes, line 6859
6859))})(Eu,ns,Zs,rh,co,ah,vo,yo,xo,Au,Vh,Ou,eh),Iu=((t,e,i,r,s)=>(o,a,h,u,l,c)=>{if(null!==h)try{const e=new h(o,u,c),r=new Map;let a=null;if(Object.defineProperties(e,{channelCount:{get:()=>c.channelCount,set:()=>{throw t()}},channelCountMode:{get:()=>"explicit",set:()=>{throw t()}},onprocessorerror:{get:()=>a,set:t=>{"function"==typeof a&&e.removeEventListener("processorerror",a),a="function"==typeof t?t:null,"function"==typeof a&&e.addEventListener("processorerror",a)}}}),e.addEventListener=(d=e.addEventListener,(...t)=>{if("processorerror"===t[0]){const e="function"==typeof t[1]?t[1]:"object"==typeof t[1]&&null!==t[1]&&"function"==typeof t[1].handleEvent?t[1].handleEvent:null;if(null!==e){const i=r.get(t[1]);void 0!==i?t[1]=i:(t[1]=i=>{"error"===i.type?(Object.defineProperties(i,{type:{value:"processorerror"}}),e(i)):e(new ErrorEvent(t[0],n({},i)))},r.set(e,t[1]))}}return d.call(e,"error",t[1],t[2]),d.call(e,...t)}),e.removeEventListener=(f=e.removeEventListener,(...t)=>{if("processorerror"===t[0]){const e=r.get(t[1]);void 0!==e&&(r.delete(t[1]),t[1]=e)}return f.call(e,"error",t[1],t[2]),f.call(e,t[0],t[1],t[2])}),0!==c.numberOfOutputs){const t=i(o,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});e.connect(t).connect(o.destination);return s(e,(()=>t.disconnect()),(()=>t.connect(o.destination)))}return e}catch(p){if(11===p.code)throw r();throw p}var f,d;if(void 0===l)throw r();return(t=>{const{port1:e}=new MessageChannel;try{e.postMessage(t)}finally{e.close()}})(c),e(o,a,l,c)})(Zs,Pu,vo,xo,eh),ku=((t,e,i,n,r,s,o,a,h,u,l,c,f,d,p,v)=>(g,m,y)=>{const x=new WeakMap;let w=null;return{render(_,b,T){a(b,_);const E=x.get(b);return void 0!==E?Promise.resolve(E):(async(a,_,b)=>{let T=l(a),E=null;const S=es(T,_),A=Array.isArray(m.outputChannelCount)?m.outputChannelCount:Array.from(m.outputChannelCount);if(null===c){const t=A.reduce(((t,e)=>t+e),0),i=r(_,{channelCount:Math.max(1,t),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,t)}),s=[];for(let e=0;e<a.numberOfOutputs;e+=1)s.push(n(_,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:A[e]}));const u=o(_,{channelCount:m.channelCount,channelCountMode:m.channelCountMode,channelInterpretation:m.channelInterpretation,gain:1});u.connect=e.bind(null,s),u.disconnect=h.bind(null,s),E=[i,s,u]}else S||(T=new c(_,g));if(x.set(_,null===E?T:E[2]),null!==E){if(null===w){if(void 0===y)throw new Error("Missing the processor constructor.");if(null===f)throw new Error("Missing the native OfflineAudioContext constructor.");const t=a.channelCount*a.numberOfInputs,e=void 0===y.parameterDescriptors?0:y.parameterDescriptors.length,i=t+e,h=async()=>{const h=new f(i,128*Math.ceil(a.context.length/128),_.sampleRate),u=[],l=[];for(let t=0;t<m.numberOfInputs;t+=1)u.push(o(h,{channelCount:m.channelCount,channelCountMode:m.channelCountMode,channelInterpretation:m.channelInterpretation,gain:1})),l.push(r(h,{channelCount:m.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:m.channelCount}));const c=await Promise.all(Array.from(a.parameters.values()).map((async t=>{const e=s(h,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:t.value});return await d(h,t,e.offset,b),e}))),g=n(h,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,t+e)});for(let t=0;t<m.numberOfInputs;t+=1){u[t].connect(l[t]);for(let e=0;e<m.channelCount;e+=1)l[t].connect(g,e,t*m.channelCount+e)}for(const[e,i]of c.entries())i.connect(g,0,t+e),i.start(0);return g.connect(h.destination),await Promise.all(u.map((t=>p(a,h,t,b)))),v(h)};w=Vs(a,0===i?null:await h(),_,m,A,y,u)}const t=await w,e=i(_,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),[h,l,c]=E;null!==t&&(e.buffer=t,e.start(0)),e.connect(h);for(let i=0,n=0;i<a.numberOfOutputs;i+=1){const t=l[i];for(let e=0;e<A[i];e+=1)h.connect(t,n+e,e);n+=A[i]}return c}
6859if(S)for(const[e,i]of a.parameters.entries())await t(_,i,T.parameters.get(e),b);else for(const[t,e]of a.parameters.entries())await d(_,e,T.parameters.get(t),b);return await p(a,_,T,b),T})(_,b,T)}}})(La,Eu,Fa,rh,co,ah,vo,Su,Au,Vh,Ss,Xh,ra,Ba,Qo,mh),Lu=(Du=Yh,t=>Du.get(t));var Du;const Fu=(t=>(e,i)=>{t.set(e,i)})(Cu),Nu=Uh?((t,e,i,r,s,o,a,h,u,l,c,f,d)=>class extends e{constructor(e,d,p){var v;const g=h(e),m=u(g),y=c(n(n({},Fs),p)),x=Ur.get(g),w=null==x?void 0:x.get(d),_=m||"closed"!==g.state?g:null!==(v=a(g))&&void 0!==v?v:g,b=s(_,m?null:e.baseLatency,l,d,w,y);super(e,!0,b,m?r(d,y,w):null);const T=[];b.parameters.forEach(((t,e)=>{const n=i(this,m,t);T.push([e,n])})),this._nativeAudioWorkletNode=b,this._onprocessorerror=null,this._parameters=new Ds(T),m&&t(g,this);const{activeInputs:E}=o(this);f(b,E)}get onprocessorerror(){return this._onprocessorerror}set onprocessorerror(t){const e="function"==typeof t?d(this,t):null;this._nativeAudioWorkletNode.onprocessorerror=e;const i=this._nativeAudioWorkletNode.onprocessorerror;this._onprocessorerror=null!==i&&i===e?t:i}get parameters(){return null===this._parameters?this._nativeAudioWorkletNode.parameters:this._parameters}get port(){return this._nativeAudioWorkletNode.port}})(bu,ga,Va,ku,Iu,ls,Lu,ia,oa,Xh,(t=>n(n({},t),{outputChannelCount:void 0!==t.outputChannelCount?t.outputChannelCount:1===t.numberOfInputs&&1===t.numberOfOutputs?[t.channelCount]:Array.from({length:t.numberOfOutputs},(()=>1))})),Fu,ko):void 0,Bu=((t,e)=>(i,n,r)=>{if(null===e)throw new Error("Missing the native OfflineAudioContext constructor.");try{return new e(i,n,r)}catch(s){if("SyntaxError"===s.name)throw t();throw s}})(xo,ra),Uu=((t,e,i,n,r,s,o,a)=>{const h=[];return(u,l)=>i(u).render(u,l,h).then((()=>Promise.all(Array.from(n(l)).map((t=>i(t).render(t,l,h)))))).then((()=>r(l))).then((i=>("function"!=typeof i.copyFromChannel?(o(i),rs(i)):e(s,(()=>
vendor: 4,678 bytes, lines 6859-6874
6859s(i)))||a(i),t.add(i),i)))})(xa,zo,Ko,wu,mh,is,Ta,Ea),Vu=((t,e,i,r,s)=>class extends t{constructor(t,i,s){let o;if("number"==typeof t&&void 0!==i&&void 0!==s)o={length:i,numberOfChannels:t,sampleRate:s};else{if("object"!=typeof t)throw new Error("The given parameters are not valid.");o=t}const{length:a,numberOfChannels:h,sampleRate:u}=n(n({},wo),o),l=r(h,a,u);e(eo,(()=>eo(l)))||l.addEventListener("statechange",(()=>{let t=0;const e=i=>{"running"===this._state&&(t>0?(l.removeEventListener("statechange",e),i.stopImmediatePropagation(),this._waitForThePromiseToSettle(i)):t+=1)};return e})()),super(l,h),this._length=a,this._nativeOfflineAudioContext=l,this._state=null}get length(){return void 0===this._nativeOfflineAudioContext.length?this._length:this._nativeOfflineAudioContext.length}get state(){return null===this._state?this._nativeOfflineAudioContext.state:this._state}startRendering(){return"running"===this._state?Promise.reject(i()):(this._state="running",s(this.destination,this._nativeOfflineAudioContext).finally((()=>{this._state=null,ds(this)})))}_waitForThePromiseToSettle(t){null===this._state?this._nativeOfflineAudioContext.dispatchEvent(t):setTimeout((()=>this._waitForThePromiseToSettle(t)))}})(qh,zo,Zs,Bu,Uu),Yu=((t,e)=>i=>{const n=t.get(i);return e(n)||e(i)})(Fr,fa),zu=(Xu=kr,Gu=pa,t=>Xu.has(t)||Gu(t));var Xu,Gu;const Wu=(ju=Dr,Hu=va,t=>ju.has(t)||Hu(t));var ju,Hu;const qu=((t,e)=>i=>{const n=t.get(i);return e(n)||e(i)})(Fr,oa);function Ku(t,e){if(!t)throw new Error(e)}function Zu(t,e,i=1/0){if(!(e<=t&&t<=i))throw new RangeError(`Value must be within [${e}, ${i}], got: ${t}`)}function Qu(t){t.isOffline||"running"===t.state||$u('The AudioContext is "suspended". Invoke Tone.start() from a user action to start the audio.')}let Ju=console;function $u(...t){Ju.warn(...t)}function tl(t){return void 0===t}function el(t){return!tl(t)}function il(t){return"number"==typeof t}function nl(t){return"[object Object]"===Object.prototype.toString.call(t)&&t.constructor===Object}function rl(t){return Array.isArray(t)}function sl(t){return"string"==typeof t}function ol(t){return sl(t)&&/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(t)}const al="object"==typeof self?self:null,hl=al&&(al.hasOwnProperty("AudioContext")||al.hasOwnProperty("webkitAudioContext")); 6860/*! ***************************************************************************** 6861Copyright (c) Microsoft Corporation. 6862 6863Permission to use, copy, modify, and/or distribute this software for any 6864purpose with or without fee is hereby granted. 6865 6866THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 6867REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 6868AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 6869INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 6870LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 6871OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 6872PERFORMANCE OF THIS SOFTWARE. 6873***************************************************************************** */ 6874function ul(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o}function ll(t,e,i,n){return new(i||(i=Promise))((function(r,s){function o(t){try{h(n.next(t))}catch(lC){s(lC)}}function a(t){try{h(n.throw(t))}catch(lC){s(lC)}}function h(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}h((n=n.apply(t,e||[])).next())}))}class cl{constructor(t,e,i){this._callback=t,this._type=e,this._updateInterval=i,this._createClock()}_createWorker(){const t=new Blob([`\n\t\t\t// the initial timeout time\n\t\t\tlet timeoutTime = ${(1e3*this._updateInterval).toFixed(1)};\n\t\t\t// onmessage callback\n\t\t\tself.onmessage = function(msg){\n\t\t\t\ttimeoutTime = parseInt(msg.data);\n\t\t\t};\n\t\t\t// the tick function which posts a message\n\t\t\t// and schedules a new tick\n\t\t\tfunction tick(){\n\t\t\t\tsetTimeout(tick, timeoutTime);\n\t\t\t\tself.postMessage('tick');\n\t\t\t}\n\t\t\t// call tick initially\n\t\t\ttick();\n\t\t\t`],{type:"text/javascript"}),e=URL.createObjectURL(t),i=new Worker(e);i.onmessage=this._callback.bind(this),this._worker=i}_createTimeout(){this._timeout=setTimeout((()=>{this._createTimeout(),this._callback()}),1e3*this._updateInterval)}_createClock(){if("worker"===this._type)try{this._createWorker()}catch(lC){this._type="timeout",this._createClock()}
vendor: 4,087 bytes, lines 6874-6880
6874else"timeout"===this._type&&this._createTimeout()}_disposeClock(){this._timeout&&(clearTimeout(this._timeout),this._timeout=0),this._worker&&(this._worker.terminate(),this._worker.onmessage=null)}get updateInterval(){return this._updateInterval}set updateInterval(t){this._updateInterval=Math.max(t,128/44100),"worker"===this._type&&this._worker.postMessage(Math.max(1e3*t,1))}get type(){return this._type}set type(t){this._disposeClock(),this._type=t,this._createClock()}dispose(){this._disposeClock()}}function fl(t){return Wu(t)}function dl(t){return zu(t)}function pl(t){return qu(t)}function vl(t){return Yu(t)}function gl(t){return t instanceof AudioBuffer}function ml(t,e){return"value"===t||fl(e)||dl(e)||gl(e)}function yl(t,...e){if(!e.length)return t;const i=e.shift();if(nl(t)&&nl(i))for(const n in i)ml(n,i[n])?t[n]=i[n]:nl(i[n])?(t[n]||Object.assign(t,{[n]:{}}),yl(t[n],i[n])):Object.assign(t,{[n]:i[n]});return yl(t,...e)}function xl(t,e,i=[],n){const r={},s=Array.from(e);if(nl(s[0])&&n&&!Reflect.has(s[0],n)){Object.keys(s[0]).some((e=>Reflect.has(t,e)))||(yl(r,{[n]:s[0]}),i.splice(i.indexOf(n),1),s.shift())}if(1===s.length&&nl(s[0]))yl(r,s[0]);else for(let o=0;o<i.length;o++)el(s[o])&&(r[i[o]]=s[o]);return yl(t,r)}function wl(t,e){return tl(t)?e:t}function _l(t,e){return e.forEach((e=>{Reflect.has(t,e)&&delete t[e]})),t} 6875/** 6876 * Tone.js 6877 * @author Yotam Mann 6878 * @license http://opensource.org/licenses/MIT MIT License 6879 * @copyright 2014-2019 Yotam Mann 6880 */class bl{constructor(){this.debug=!1,this._wasDisposed=!1}static getDefaults(){return{}}log(...t){(this.debug||al&&this.toString()===al.TONE_DEBUG_CLASS)&&function(...t){Ju.log(...t)}(this,...t)}dispose(){return this._wasDisposed=!0,this}get disposed(){return this._wasDisposed}toString(){return this.name}}bl.version="14.7.77";function Tl(t,e){return t>e+1e-6}function El(t,e){return Tl(t,e)||Al(t,e)}function Sl(t,e){return t+1e-6<e}function Al(t,e){return Math.abs(t-e)<1e-6}class Cl extends bl{constructor(){super(),this.name="Timeline",this._timeline=[];const t=xl(Cl.getDefaults(),arguments,["memory"]);this.memory=t.memory,this.increasing=t.increasing}static getDefaults(){return{memory:1/0,increasing:!1}}get length(){return this._timeline.length}add(t){if(Ku(Reflect.has(t,"time"),"Timeline: events must have a time attribute"),t.time=t.time.valueOf(),this.increasing&&this.length){const e=this._timeline[this.length-1];Ku(El(t.time,e.time),"The time must be greater than or equal to the last scheduled time"),this._timeline.push(t)}else{const e=this._search(t.time);this._timeline.splice(e+1,0,t)}if(this.length>this.memory){const t=this.length-this.memory;this._timeline.splice(0,t)}return this}remove(t){const e=this._timeline.indexOf(t);return-1!==e&&this._timeline.splice(e,1),this}get(t,e="time"){const i=this._search(t,e);return-1!==i?this._timeline[i]:null}peek(){return this._timeline[0]}shift(){return this._timeline.shift()}getAfter(t,e="time"){const i=this._search(t,e);return i+1<this._timeline.length?this._timeline[i+1]:null}getBefore(t){const e=this._timeline.length;if(e>0&&this._timeline[e-1].time<t)return this._timeline[e-1];const i=this._search(t);return i-1>=0?this._timeline[i-1]:null}cancel(t){if(this._timeline.length>1){let e=this._search(t);if(e>=0)if(Al(this._timeline[e].time,t)){for(let i=e;i>=0&&Al(this._timeline[i].time,t);i--)e=i;this._timeline=this._timeline.slice(0,e)}else this._timeline=this._timeline.slice(0,e+1);else this._timeline=[]}else 1===this._timeline.length&&El(this._timeline[0].time,t)&&(this._timeline=[]);return this}cancelBefore(t){const e=this._search(t);return e>=0&&(this._timeline=this._timeline.slice(e+1)),this}previousEvent(t){const e=this._timeline.indexOf(t);return e>0?this._timeline[e-1]:null}_search(t,e="time"){if(0===this._timeline.length)return-1;let i=0;const n=this._timeline.length;let r=n;if(n>0&&this._timeline[n-1][e]<=t)return n-1;for(;i<r;){let n=Math.floor(i+(r-i)/2);const s=this._timeline[n],o=this._timeline[n+1];if(Al(s[e],t)){for(let i=n;i<this._timeline.length;i++){if(!Al(this._timeline[i][e],t))break;n=i}return n}
vendor: 4,139 bytes, line 6880
6880if(Sl(s[e],t)&&Tl(o[e],t))return n;Tl(s[e],t)?r=n:i=n+1}return-1}_iterate(t,e=0,i=this._timeline.length-1){this._timeline.slice(e,i+1).forEach(t)}forEach(t){return this._iterate(t),this}forEachBefore(t,e){const i=this._search(t);return-1!==i&&this._iterate(e,0,i),this}forEachAfter(t,e){const i=this._search(t);return this._iterate(e,i+1),this}forEachBetween(t,e,i){let n=this._search(t),r=this._search(e);return-1!==n&&-1!==r?(this._timeline[n].time!==t&&(n+=1),this._timeline[r].time===e&&(r-=1),this._iterate(i,n,r)):-1===n&&this._iterate(i,0,r),this}forEachFrom(t,e){let i=this._search(t);for(;i>=0&&this._timeline[i].time>=t;)i--;return this._iterate(e,i+1),this}forEachAtTime(t,e){const i=this._search(t);if(-1!==i&&Al(this._timeline[i].time,t)){let n=i;for(let e=i;e>=0&&Al(this._timeline[e].time,t);e--)n=e;this._iterate((t=>{e(t)}),n,i)}return this}dispose(){return super.dispose(),this._timeline=[],this}}const Ol=[];function Rl(t){Ol.push(t)}const Ml=[];function Pl(t){Ml.push(t)}class Il extends bl{constructor(){super(...arguments),this.name="Emitter"}on(t,e){return t.split(/\W+/).forEach((t=>{tl(this._events)&&(this._events={}),this._events.hasOwnProperty(t)||(this._events[t]=[]),this._events[t].push(e)})),this}once(t,e){const i=(...n)=>{e(...n),this.off(t,i)};return this.on(t,i),this}off(t,e){return t.split(/\W+/).forEach((i=>{if(tl(this._events)&&(this._events={}),this._events.hasOwnProperty(t))if(tl(e))this._events[t]=[];else{const i=this._events[t];for(let t=i.length-1;t>=0;t--)i[t]===e&&i.splice(t,1)}})),this}emit(t,...e){if(this._events&&this._events.hasOwnProperty(t)){const i=this._events[t].slice(0);for(let t=0,n=i.length;t<n;t++)i[t].apply(this,e)}return this}static mixin(t){["on","once","off","emit"].forEach((e=>{const i=Object.getOwnPropertyDescriptor(Il.prototype,e);Object.defineProperty(t.prototype,e,i)}))}dispose(){return super.dispose(),this._events=void 0,this}}class kl extends Il{constructor(){super(...arguments),this.isOffline=!1}toJSON(){return{}}}class Ll extends kl{constructor(){super(),this.name="Context",this._constants=new Map,this._timeouts=new Cl,this._timeoutIds=0,this._initialized=!1,this.isOffline=!1,this._workletModules=new Map;const t=xl(Ll.getDefaults(),arguments,["context"]);t.context?this._context=t.context:this._context=function(t){return new xu(t)}({latencyHint:t.latencyHint}),this._ticker=new cl(this.emit.bind(this,"tick"),t.clockSource,t.updateInterval),this.on("tick",this._timeoutLoop.bind(this)),this._context.onstatechange=()=>{this.emit("statechange",this.state)},this._setLatencyHint(t.latencyHint),this.lookAhead=t.lookAhead}static getDefaults(){return{clockSource:"worker",latencyHint:"interactive",lookAhead:.1,updateInterval:.05}}initialize(){var t;return this._initialized||(t=this,Ol.forEach((e=>e(t))),this._initialized=!0),this}createAnalyser(){return this._context.createAnalyser()}createOscillator(){return this._context.createOscillator()}createBufferSource(){return this._context.createBufferSource()}createBiquadFilter(){return this._context.createBiquadFilter()}createBuffer(t,e,i){return this._context.createBuffer(t,e,i)}createChannelMerger(t){return this._context.createChannelMerger(t)}createChannelSplitter(t){return this._context.createChannelSplitter(t)}createConstantSource(){return this._context.createConstantSource()}createConvolver(){return this._context.createConvolver()}createDelay(t){return this._context.createDelay(t)}createDynamicsCompressor(){return this._context.createDynamicsCompressor()}createGain(){return this._context.createGain()}createIIRFilter(t,e){return this._context.createIIRFilter(t,e)}createPanner(){return this._context.createPanner()}createPeriodicWave(t,e,i){return this._context.createPeriodicWave(t,e,i)}createStereoPanner(){return this._context.createStereoPanner()}createWaveShaper(){return this._context.createWaveShaper()}createMediaStreamSource(t){Ku(vl(this._context),"Not available if OfflineAudioContext");return this._context.createMediaStreamSource(t)}createMediaElementSource(t){Ku(vl(this._context),"Not available if OfflineAudioContext");return this._context.createMediaElementSource(t)}
vendor: 10,629 bytes, line 6880
6880createMediaStreamDestination(){Ku(vl(this._context),"Not available if OfflineAudioContext");return this._context.createMediaStreamDestination()}decodeAudioData(t){return this._context.decodeAudioData(t)}get currentTime(){return this._context.currentTime}get state(){return this._context.state}get sampleRate(){return this._context.sampleRate}get listener(){return this.initialize(),this._listener}set listener(t){Ku(!this._initialized,"The listener cannot be set after initialization."),this._listener=t}get transport(){return this.initialize(),this._transport}set transport(t){Ku(!this._initialized,"The transport cannot be set after initialization."),this._transport=t}get draw(){return this.initialize(),this._draw}set draw(t){Ku(!this._initialized,"Draw cannot be set after initialization."),this._draw=t}get destination(){return this.initialize(),this._destination}set destination(t){Ku(!this._initialized,"The destination cannot be set after initialization."),this._destination=t}createAudioWorkletNode(t,e){return function(t,e,i){return Ku(el(Nu),"This node only works in a secure context (https or localhost)"),new Nu(t,e,i)}(this.rawContext,t,e)}addAudioWorkletModule(t,e){return ll(this,void 0,void 0,(function*(){Ku(el(this.rawContext.audioWorklet),"AudioWorkletNode is only available in a secure context (https or localhost)"),this._workletModules.has(e)||this._workletModules.set(e,this.rawContext.audioWorklet.addModule(t)),yield this._workletModules.get(e)}))}workletsAreReady(){return ll(this,void 0,void 0,(function*(){const t=[];this._workletModules.forEach((e=>t.push(e))),yield Promise.all(t)}))}get updateInterval(){return this._ticker.updateInterval}set updateInterval(t){this._ticker.updateInterval=t}get clockSource(){return this._ticker.type}set clockSource(t){this._ticker.type=t}get latencyHint(){return this._latencyHint}_setLatencyHint(t){let e=0;if(this._latencyHint=t,sl(t))switch(t){case"interactive":e=.1;break;case"playback":e=.5;break;case"balanced":e=.25}this.lookAhead=e,this.updateInterval=e/2}get rawContext(){return this._context}now(){return this._context.currentTime+this.lookAhead}immediate(){return this._context.currentTime}resume(){return vl(this._context)?this._context.resume():Promise.resolve()}close(){return ll(this,void 0,void 0,(function*(){var t;vl(this._context)&&(yield this._context.close()),this._initialized&&(t=this,Ml.forEach((e=>e(t))))}))}getConstant(t){if(this._constants.has(t))return this._constants.get(t);{const e=this._context.createBuffer(1,128,this._context.sampleRate),i=e.getChannelData(0);for(let r=0;r<i.length;r++)i[r]=t;const n=this._context.createBufferSource();return n.channelCount=1,n.channelCountMode="explicit",n.buffer=e,n.loop=!0,n.start(0),this._constants.set(t,n),n}}dispose(){return super.dispose(),this._ticker.dispose(),this._timeouts.dispose(),Object.keys(this._constants).map((t=>this._constants[t].disconnect())),this}_timeoutLoop(){const t=this.now();let e=this._timeouts.peek();for(;this._timeouts.length&&e&&e.time<=t;)e.callback(),this._timeouts.shift(),e=this._timeouts.peek()}setTimeout(t,e){this._timeoutIds++;const i=this.now();return this._timeouts.add({callback:t,id:this._timeoutIds,time:i+e}),this._timeoutIds}clearTimeout(t){return this._timeouts.forEach((e=>{e.id===t&&this._timeouts.remove(e)})),this}clearInterval(t){return this.clearTimeout(t)}setInterval(t,e){const i=++this._timeoutIds,n=()=>{const r=this.now();this._timeouts.add({callback:()=>{t(),n()},id:i,time:r+e})};return n(),i}}function Dl(t,e){rl(e)?e.forEach((e=>Dl(t,e))):Object.defineProperty(t,e,{enumerable:!0,writable:!1})}function Fl(t,e){rl(e)?e.forEach((e=>Fl(t,e))):Object.defineProperty(t,e,{writable:!0})}const Nl=()=>{};class Bl extends bl{constructor(){super(),this.name="ToneAudioBuffer",this.onload=Nl;const t=xl(Bl.getDefaults(),arguments,["url","onload","onerror"]);this.reverse=t.reverse,this.onload=t.onload,t.url&&gl(t.url)||t.url instanceof Bl?this.set(t.url):sl(t.url)&&this.load(t.url).catch(t.onerror)}static getDefaults(){return{onerror:Nl,onload:Nl,reverse:!1}}get sampleRate(){return this._buffer?this._buffer.sampleRate:zl().sampleRate}set(t){return t instanceof Bl?t.loaded?this._buffer=t.get():t.onload=()=>{this.set(t),this.onload(this)}:this._buffer=t,this._reversed&&this._reverse(),this}get(){return this._buffer}load(t){return ll(this,void 0,void 0,(function*(){const e=Bl.load(t).then((t=>{this.set(t),this.onload(this)}));Bl.downloads.push(e);try{yield e}finally{const t=Bl.downloads.indexOf(e);Bl.downloads.splice(t,1)}return this}))}dispose(){return super.dispose(),this._buffer=void 0,this}fromArray(t){const e=rl(t)&&t[0].length>0,i=e?t.length:1,n=e?t[0].length:t.length,r=zl(),s=r.createBuffer(i,n,r.sampleRate),o=e||1!==i?t:[t];for(let a=0;a<i;a++)s.copyToChannel(o[a],a);return this._buffer=s,this}toMono(t){if(il(t))this.fromArray(this.toArray(t));else{let t=new Float32Array(this.length);const e=this.numberOfChannels;for(let i=0;i<e;i++){const e=this.toArray(i);for(let i=0;i<e.length;i++)t[i]+=e[i]}t=t.map((t=>t/e)),this.fromArray(t)}return this}toArray(t){if(il(t))return this.getChannelData(t);if(1===this.numberOfChannels)return this.toArray(0);{const t=[];for(let e=0;e<this.numberOfChannels;e++)t[e]=this.getChannelData(e);return t}}getChannelData(t){return this._buffer?this._buffer.getChannelData(t):new Float32Array(0)}slice(t,e=this.duration){const i=Math.floor(t*this.sampleRate),n=Math.floor(e*this.sampleRate);Ku(i<n,"The start time must be less than the end time");const r=n-i,s=zl().createBuffer(this.numberOfChannels,r,this.sampleRate);for(let o=0;o<this.numberOfChannels;o++)s.copyToChannel(this.getChannelData(o).subarray(i,n),o);return new Bl(s)}_reverse(){if(this.loaded)for(let t=0;t<this.numberOfChannels;t++)this.getChannelData(t).reverse();return this}get loaded(){return this.length>0}get duration(){return this._buffer?this._buffer.duration:0}get length(){return this._buffer?this._buffer.length:0}get numberOfChannels(){return this._buffer?this._buffer.numberOfChannels:0}get reverse(){return this._reversed}set reverse(t){this._reversed!==t&&(this._reversed=t,this._reverse())}static fromArray(t){return(new Bl).fromArray(t)}static fromUrl(t){return ll(this,void 0,void 0,(function*(){const e=new Bl;return yield e.load(t)}))}static load(t){return ll(this,void 0,void 0,(function*(){const e=t.match(/\[([^\]\[]+\|.+)\]$/);if(e){const i=e[1].split("|");let n=i[0];for(const t of i)if(Bl.supportsType(t)){n=t;break}t=t.replace(e[0],n)}const i=""===Bl.baseUrl||Bl.baseUrl.endsWith("/")?Bl.baseUrl:Bl.baseUrl+"/",n=yield fetch(i+t);if(!n.ok)throw new Error(`could not load url: ${t}`);const r=yield n.arrayBuffer();return yield zl().decodeAudioData(r)}))}static supportsType(t){const e=t.split("."),i=e[e.length-1];return""!==document.createElement("audio").canPlayType("audio/"+i)}static loaded(){return ll(this,void 0,void 0,(function*(){for(yield Promise.resolve();Bl.downloads.length;)yield Bl.downloads[0]}))}}Bl.baseUrl="",Bl.downloads=[];class Ul extends Ll{constructor(){var t,e,i;super({clockSource:"offline",context:pl(arguments[0])?arguments[0]:(t=arguments[0],e=arguments[1]*arguments[2],i=arguments[2],new Vu(t,e,i)),lookAhead:0,updateInterval:pl(arguments[0])?128/arguments[0].sampleRate:128/arguments[2]}),this.name="OfflineContext",this._currentTime=0,this.isOffline=!0,this._duration=pl(arguments[0])?arguments[0].length/arguments[0].sampleRate:arguments[1]}now(){return this._currentTime}get currentTime(){return this._currentTime}_renderClock(t){return ll(this,void 0,void 0,(function*(){let e=0;for(;this._duration-this._currentTime>=0;){this.emit("tick"),this._currentTime+=128/this.sampleRate,e++;const i=Math.floor(this.sampleRate/128);t&&e%i==0&&(yield new Promise((t=>setTimeout(t,1))))}}))}render(t=!0){return ll(this,void 0,void 0,(function*(){yield this.workletsAreReady(),yield this._renderClock(t);const e=yield this._context.startRendering();return new Bl(e)}))}close(){return Promise.resolve()}}const Vl=new class extends kl{constructor(){super(...arguments),this.lookAhead=0,this.latencyHint=0,this.isOffline=!1}createAnalyser(){return{}}createOscillator(){return{}}createBufferSource(){return{}}createBiquadFilter(){return{}}createBuffer(t,e,i){return{}}createChannelMerger(t){return{}}createChannelSplitter(t){return{}}createConstantSource(){return{}}createConvolver(){return{}}createDelay(t){return{}}createDynamicsCompressor(){return{}}createGain(){return{}}createIIRFilter(t,e){return{}}createPanner(){return{}}createPeriodicWave(t,e,i){return{}}createStereoPanner(){return{}}createWaveShaper(){return{}}createMediaStreamSource(t){return{}}createMediaElementSource(t){return{}}createMediaStreamDestination(){return{}}decodeAudioData(t){return Promise.resolve({})}createAudioWorkletNode(t,e){return{}}get rawContext(){return{}}addAudioWorkletModule(t,e){return ll(this,void 0,void 0,(function*(){return Promise.resolve()}))}resume(){return Promise.resolve()}setTimeout(t,e){return 0}clearTimeout(t){return this}setInterval(t,e){return 0}clearInterval(t){return this}getConstant(t){return{}}get currentTime(){return 0}get state(){return{}}get sampleRate(){return 0}get listener(){return{}}get transport(){return{}}get draw(){return{}}set draw(t){}get destination(){return{}}set destination(t){}now(){return 0}immediate(){return 0}};let Yl=Vl;function zl(){var t;return Yl===Vl&&hl&&(t=new Ll,Yl=vl(t)?new Ll(t):pl(t)?new Ul(t):t),Yl}if(al&&!al.TONE_SILENCE_LOGGING){const t=` * Tone.js ${"v"}14.7.77 * `;console.log(`%c${t}`,"background: #000; color: #fff")}function Xl(t){return Math.pow(2,t/12)}let Gl=440;function Wl(t){return Math.round(jl(t))}function jl(t){return 69+12*Math.log2(t/Gl)}class Hl extends bl{constructor(t,e,i){super(),this.defaultUnits="s",this._val=e,this._units=i,this.context=t,this._expressions=this._getExpressions()}_getExpressions(){return{hz:{method:t=>this._frequencyToUnits(parseFloat(t)),regexp:/^(\d+(?:\.\d+)?)hz$/i},i:{method:t=>this._ticksToUnits(parseInt(t,10)),regexp:/^(\d+)i$/i},m:{method:t=>this._beatsToUnits(parseInt(t,10)*this._getTimeSignature()),regexp:/^(\d+)m$/i},n:{method:(t,e)=>{const i=parseInt(t,10),n="."===e?1.5:1;return 1===i?this._beatsToUnits(this._getTimeSignature())*n:this._beatsToUnits(4/i)*n},regexp:/^(\d+)n(\.?)$/i},number:{method:t=>this._expressions[this.defaultUnits].method.call(this,t),regexp:/^(\d+(?:\.\d+)?)$/},s:{method:t=>this._secondsToUnits(parseFloat(t)),regexp:/^(\d+(?:\.\d+)?)s$/},samples:{method:t=>parseInt(t,10)/this.context.sampleRate,regexp:/^(\d+)samples$/},t:{method:t=>{const e=parseInt(t,10);return this._beatsToUnits(8/(3*Math.floor(e)))},regexp:/^(\d+)t$/i}
vendor: 4,769 bytes, line 6880
6880,tr:{method:(t,e,i)=>{let n=0;return t&&"0"!==t&&(n+=this._beatsToUnits(this._getTimeSignature()*parseFloat(t))),e&&"0"!==e&&(n+=this._beatsToUnits(parseFloat(e))),i&&"0"!==i&&(n+=this._beatsToUnits(parseFloat(i)/4)),n},regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?$/}}}valueOf(){if(this._val instanceof Hl&&this.fromType(this._val),tl(this._val))return this._noArg();if(sl(this._val)&&tl(this._units)){for(const t in this._expressions)if(this._expressions[t].regexp.test(this._val.trim())){this._units=t;break}}else if(nl(this._val)){let t=0;for(const e in this._val)if(el(this._val[e])){const i=this._val[e];t+=new this.constructor(this.context,e).valueOf()*i}return t}if(el(this._units)){const t=this._expressions[this._units],e=this._val.toString().trim().match(t.regexp);return e?t.method.apply(this,e.slice(1)):t.method.call(this,this._val)}return sl(this._val)?parseFloat(this._val):this._val}_frequencyToUnits(t){return 1/t}_beatsToUnits(t){return 60/this._getBpm()*t}_secondsToUnits(t){return t}_ticksToUnits(t){return t*this._beatsToUnits(1)/this._getPPQ()}_noArg(){return this._now()}_getBpm(){return this.context.transport.bpm.value}_getTimeSignature(){return this.context.transport.timeSignature}_getPPQ(){return this.context.transport.PPQ}fromType(t){switch(this._units=void 0,this.defaultUnits){case"s":this._val=t.toSeconds();break;case"i":this._val=t.toTicks();break;case"hz":this._val=t.toFrequency();break;case"midi":this._val=t.toMidi()}return this}toFrequency(){return 1/this.toSeconds()}toSamples(){return this.toSeconds()*this.context.sampleRate}toMilliseconds(){return 1e3*this.toSeconds()}}class ql extends Hl{constructor(){super(...arguments),this.name="TimeClass"}_getExpressions(){return Object.assign(super._getExpressions(),{now:{method:t=>this._now()+new this.constructor(this.context,t).valueOf(),regexp:/^\+(.+)/},quantize:{method:t=>{const e=new ql(this.context,t).valueOf();return this._secondsToUnits(this.context.transport.nextSubdivision(e))},regexp:/^@(.+)/}})}quantize(t,e=1){const i=new this.constructor(this.context,t).valueOf(),n=this.valueOf();return n+(Math.round(n/i)*i-n)*e}toNotation(){const t=this.toSeconds(),e=["1m"];for(let r=1;r<9;r++){const t=Math.pow(2,r);e.push(t+"n."),e.push(t+"n"),e.push(t+"t")}e.push("0");let i=e[0],n=new ql(this.context,e[0]).toSeconds();return e.forEach((e=>{const r=new ql(this.context,e).toSeconds();Math.abs(r-t)<Math.abs(n-t)&&(i=e,n=r)})),i}toBarsBeatsSixteenths(){const t=this._beatsToUnits(1);let e=this.valueOf()/t;e=parseFloat(e.toFixed(4));const i=Math.floor(e/this._getTimeSignature());let n=e%1*4;e=Math.floor(e)%this._getTimeSignature();const r=n.toString();r.length>3&&(n=parseFloat(parseFloat(r).toFixed(3)));return[i,e,n].join(":")}toTicks(){const t=this._beatsToUnits(1),e=this.valueOf()/t;return Math.round(e*this._getPPQ())}toSeconds(){return this.valueOf()}toMidi(){return Wl(this.toFrequency())}_now(){return this.context.now()}}class Kl extends ql{constructor(){super(...arguments),this.name="Frequency",this.defaultUnits="hz"}static get A4(){return Gl}static set A4(t){!function(t){Gl=t}(t)}_getExpressions(){return Object.assign({},super._getExpressions(),{midi:{regexp:/^(\d+(?:\.\d+)?midi)/,method(t){return"midi"===this.defaultUnits?t:Kl.mtof(t)}},note:{regexp:/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i,method(t,e){const i=Zl[t.toLowerCase()]+12*(parseInt(e,10)+1);return"midi"===this.defaultUnits?i:Kl.mtof(i)}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method(t,e,i){let n=1;return t&&"0"!==t&&(n*=this._beatsToUnits(this._getTimeSignature()*parseFloat(t))),e&&"0"!==e&&(n*=this._beatsToUnits(parseFloat(e))),i&&"0"!==i&&(n*=this._beatsToUnits(parseFloat(i)/4)),n}}})}transpose(t){return new Kl(this.context,this.valueOf()*Xl(t))}harmonize(t){return t.map((t=>this.transpose(t)))}toMidi(){return Wl(this.valueOf())}toNote(){const t=this.toFrequency(),e=Math.log2(t/Kl.A4);let i=Math.round(12*e)+57;const n=Math.floor(i/12);n<0&&(i+=-12*n);return Ql[i%12]+n.toString()}toSeconds(){return 1/super.toSeconds()}toTicks(){const t=this._beatsToUnits(1),e=this.valueOf()/t;return Math.floor(e*this._getPPQ())}_noArg(){return 0}_frequencyToUnits(t){return t}_ticksToUnits(t){return 1/(60*t/(this._getBpm()*this._getPPQ()))}_beatsToUnits(t){return 1/super._beatsToUnits(t)}_secondsToUnits(t){return 1/t}static mtof(t){return function(t){return Gl*Math.pow(2,(t-69)/12)}(t)}static ftom(t){return Wl(t)}}const Zl={cbb:-2,cb:-1,c:0,"c#":1,cx:2,dbb:0,db:1,d:2,"d#":3,dx:4,ebb:2,eb:3,e:4,"e#":5,ex:6,fbb:3,fb:4,f:5,"f#":6,fx:7,gbb:5,gb:6,g:7,"g#":8,gx:9,abb:7,ab:8,a:9,"a#":10,ax:11,bbb:9,bb:10,b:11,"b#":12,bx:13},Ql=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"];class Jl extends ql{constructor(){super(...arguments),this.name="Trans
6880portTime"}_now(){return this.context.transport.seconds}}class $l extends bl{constructor(){super();const t=xl($l.getDefaults(),arguments,["context"]);this.defaultContext?this.context=this.defaultContext:this.context=t.context}static getDefaults(){return{context:zl()}}now(){return this.context.currentTime+this.context.lookAhead}immediate(){return this.context.currentTime}get sampleTime(){return 1/this.context.sampleRate}get blockTime(){return 128/this.context.sampleRate}toSeconds(t){return new ql(this.context,t).toSeconds()}toFrequency(t){return new Kl(this.context,t).toFrequency()}toTicks(t){return new Jl(this.context,t).toTicks()}_getPartialProperties(t){const e=this.get();return Object.keys(e).forEach((i=>{tl(t[i])&&delete e[i]})),e}get(){const t=this.constructor.getDefaults();return Object.keys(t).forEach((e=>{if(Reflect.has(this,e)){const i=this[e];el(i)&&el(i.value)&&el(i.setValueAtTime)?t[e]=i.value:i instanceof $l?t[e]=i._getPartialProperties(t[e]):rl(i)||il(i)||sl(i)||"boolean"==typeof i?t[e]=i:delete t[e]}})),t}set(t){return Object.keys(t).forEach((e=>{Reflect.has(this,e)&&el(this[e])&&(this[e]&&el(this[e].value)&&el(this[e].setValueAtTime)?this[e].value!==t[e]&&(this[e].value=t[e]):this[e]instanceof $l?this[e].set(t[e]):this[e]=t[e])})),this}}class tc extends Cl{constructor(t="stopped"){super(),this.name="StateTimeline",this._initial=t,this.setStateAtTime(this._initial,0)}getValueAtTime(t){const e=this.get(t);return null!==e?e.state:this._initial}setStateAtTime(t,e,i){return Zu(e,0),this.add(Object.assign({},i,{state:t,time:e})),this}getLastState(t,e){for(let i=this._search(e);i>=0;i--){const e=this._timeline[i];if(e.state===t)return e}}getNextState(t,e){const i=this._search(e);if(-1!==i)for(let n=i;n<this._timeline.length;n++){const e=this._timeline[n];if(e.state===t)return e}}}class ec extends $l{constructor(){super(xl(ec.getDefaults(),arguments,["param","units","convert"])),this.name="Param",this.overridden=!1,this._minOutput=1e-7;const t=xl(ec.getDefaults(),arguments,["param","units","convert"]);for(Ku(el(t.param)&&(fl(t.param)||t.param instanceof ec),"param must be an AudioParam");!fl(t.param);)t.param=t.param._param;this._swappable=!!el(t.swappable)&&t.swappable,this._swappable?(this.input=this.context.createGain(),this._param=t.param,this.input.connect(this._param)):this._param=this.input=t.param,this._events=new Cl(1e3),this._initialValue=this._param.defaultValue,this.units=t.units,this.convert=t.convert,this._minValue=t.minValue,this._maxValue=t.maxValue,el(t.value)&&t.value!==this._toType(this._initialValue)&&this.setValueAtTime(t.value,0)}static getDefaults(){return Object.assign($l.getDefaults(),{convert:!0,units:"number"})}get value(){const t=this.now();return this.getValueAtTime(t)}set value(t){this.cancelScheduledValues(this.now()),this.setValueAtTime(t,this.now())}get minValue(){return el(this._minValue)?this._minValue:"time"===this.units||"frequency"===this.units||"normalRange"===this.units||"positive"===this.units||"transportTime"===this.units||"ticks"===this.units||"bpm"===this.units||"hertz"===this.units||"samples"===this.units?0:"audioRange"===this.units?-1:"decibels"===this.units?-1/0:this._param.minValue}get maxValue(){return el(this._maxValue)?this._maxValue:"normalRange"===this.units||"audioRange"===this.units?1:this._param.maxValue}_is(t,e){return this.units===e}_assertRange(t){return el(this.maxValue)&&el(this.minValue)&&Zu(t,this._fromType(this.minValue),this._fromType(this.maxValue)),t}_fromType(t){return this.convert&&!this.overridden?this._is(t,"time")?this.toSeconds(t):this._is(t,"decibels")?(e=t,Math.pow(10,e/20)):this._is(t,"frequency")?this.toFrequency(t):t:this.overridden?0:t;var e}_toType(t){return this.convert&&"decibels"===this.units?(e=t,Math.log(e)/Math.LN10*20):t;var e}setValueAtTime(t,e){const i=this.toSeconds(e),n=this._fromType(t);return Ku(isFinite(n)&&isFinite(i),`Invalid argument(s) to setValueAtTime: ${JSON.stringify(t)}, ${JSON.stringify(e)}`),this._assertRange(n),this.log(this.units,"setValueAtTime",t,i),this._events.add({time:i,type:"setValueAtTime",value:n}),this._param.setValueAtTime(n,i),this}getValueAtTime(t){const e=Math.max(this.toSeconds(t),0),i=this._events.getAfter(e),n=this._events.get(e);let r=this._initialValue;if(null===n)r=this._initialValue;else if("setTargetAtTime"!==n.type||null!==i&&"setValueAtTime"!==i.type)if(null===i)r=n.value;else if("linearRampToValueAtTime"===i.type||"exponentialRampToValueAtTime"===i.type){let t=n.value;if("setTargetAtTime"===n.type){const e=this._events.getBefore(n.time);t=null===e?this._initialValue:e.value}r="linearRampToValueAtTime"===i.type?this._linearInterpolate(n.time,t,i.time,i.value,e):this._exponentialInterpolate(n.time,t,i.time,i.value,e)}else r=n.value;else{const t=this._events.getBefore(n.time);let i;i=null===t?this._initialValue:t.value,"setTargetAtTime"===n.type&&(r=this._exponentialApproach(n.time,i,n.value,n.constant,e))}return this._toType(r)}setRampPoint(t){t=this.toSeconds(t);let e=this.getValueAtTime(t);return this.cancelAndHoldAtTime(t),0===this._fromType(e)&&(e=this._toType(this._minOutput)),this.setValueAtTime(e,t),this}linearRampToValueAtTime(t,e){const i=this._fromType(t),n=this.toSeconds(e);return Ku(isFinite(i)&&isFinite(n),`Invalid argument(s) to linearRampToValueAtTime: ${JSON.stringify(t)}, ${JSON.stringify(e)}`),this._assertRange(i),this._events.add({time:n,type:"linearRampToValueAtTime",value:i}),this.log(this.units,"linearRampToValueAtTime",t,n),this._param.linearRampToValueAtTime(i,n),this}exponentialRampToValueAtTime(t,e){let i=this._fromType(t);i=Al(i,0)?this._minOutput:i,this._assertRange(i);const n=this.toSeconds(e);return Ku(isFinite(i)&&isFinite(n),`Invalid argument(s) to exponentialRampToValueAtTime: ${JSON.stringify(t)}, ${JSON.stringify(e)}`),this._events.add({time:n,type:"exponentialRampToValueAtTime",value:i}),this.log(this.units,"exponentialRampToValueAtTime",t,n),this._param.exponentialRampToValueAtTime(i,n),this}exponentialRampTo(t,e,i){return i=this.toSeconds(i),this.setRampPoint(i),this.exponentialRampToValueAtTime(t,i+this.toSeconds(e)),this}linearRampTo(t,e,i){return i=this.toSeconds(i),this.setRampPoint(i),this.linearRampToValueAtTime(t,i+this.toSeconds(e)),this}targetRampTo(t,e,i){return i=this.toSeconds(i),this.setRampPoint(i),this.exponentialApproachValueAtTime(t,i,e),this}exponentialApproachValueAtTime(t,e,i){e=this.toSeconds(e),i=this.toSeconds(i);const n=Math.log(i+1)/Math.log(200);return this.setTargetAtTime(t,e,n),this.cancelAndHoldAtTime(e+.9*i),this.linearRampToValueAtTime(t,e+i),this}setTargetAtTime(t,e,i){const n=this._fromType(t);Ku(isFinite(i)&&i>0,"timeConstant must be a number greater than 0");const r=this.toSeconds(e);return this._assertRange(n),Ku(isFinite(n)&&isFinite(r),`Invalid argument(s) to setTargetAtTime: ${JSON.stringify(t)}, ${JSON.stringify(e)}`),this._events.add({constant:i,time:r,type:"setTargetAtTime",value:n}
vendor: 4,416 bytes, line 6880
6880),this.log(this.units,"setTargetAtTime",t,r,i),this._param.setTargetAtTime(n,r,i),this}setValueCurveAtTime(t,e,i,n=1){i=this.toSeconds(i),e=this.toSeconds(e);const r=this._fromType(t[0])*n;this.setValueAtTime(this._toType(r),e);const s=i/(t.length-1);for(let o=1;o<t.length;o++){const i=this._fromType(t[o])*n;this.linearRampToValueAtTime(this._toType(i),e+o*s)}return this}cancelScheduledValues(t){const e=this.toSeconds(t);return Ku(isFinite(e),`Invalid argument to cancelScheduledValues: ${JSON.stringify(t)}`),this._events.cancel(e),this._param.cancelScheduledValues(e),this.log(this.units,"cancelScheduledValues",e),this}cancelAndHoldAtTime(t){const e=this.toSeconds(t),i=this._fromType(this.getValueAtTime(e));Ku(isFinite(e),`Invalid argument to cancelAndHoldAtTime: ${JSON.stringify(t)}`),this.log(this.units,"cancelAndHoldAtTime",e,"value="+i);const n=this._events.get(e),r=this._events.getAfter(e);return n&&Al(n.time,e)?r?(this._param.cancelScheduledValues(r.time),this._events.cancel(r.time)):(this._param.cancelAndHoldAtTime(e),this._events.cancel(e+this.sampleTime)):r&&(this._param.cancelScheduledValues(r.time),this._events.cancel(r.time),"linearRampToValueAtTime"===r.type?this.linearRampToValueAtTime(this._toType(i),e):"exponentialRampToValueAtTime"===r.type&&this.exponentialRampToValueAtTime(this._toType(i),e)),this._events.add({time:e,type:"setValueAtTime",value:i}),this._param.setValueAtTime(i,e),this}rampTo(t,e=.1,i){return"frequency"===this.units||"bpm"===this.units||"decibels"===this.units?this.exponentialRampTo(t,e,i):this.linearRampTo(t,e,i),this}apply(t){const e=this.context.currentTime;t.setValueAtTime(this.getValueAtTime(e),e);const i=this._events.get(e);if(i&&"setTargetAtTime"===i.type){const n=this._events.getAfter(i.time),r=n?n.time:e+2,s=(r-e)/10;for(let i=e;i<r;i+=s)t.linearRampToValueAtTime(this.getValueAtTime(i),i)}return this._events.forEachAfter(this.context.currentTime,(e=>{"cancelScheduledValues"===e.type?t.cancelScheduledValues(e.time):"setTargetAtTime"===e.type?t.setTargetAtTime(e.value,e.time,e.constant):t[e.type](e.value,e.time)})),this}setParam(t){Ku(this._swappable,"The Param must be assigned as 'swappable' in the constructor");const e=this.input;return e.disconnect(this._param),this.apply(t),this._param=t,e.connect(this._param),this}dispose(){return super.dispose(),this._events.dispose(),this}get defaultValue(){return this._toType(this._param.defaultValue)}_exponentialApproach(t,e,i,n,r){return i+(e-i)*Math.exp(-(r-t)/n)}_linearInterpolate(t,e,i,n,r){return e+(r-t)/(i-t)*(n-e)}_exponentialInterpolate(t,e,i,n,r){return e*Math.pow(n/e,(r-t)/(i-t))}}class ic extends $l{constructor(){super(...arguments),this.name="ToneAudioNode",this._internalChannels=[]}get numberOfInputs(){return el(this.input)?fl(this.input)||this.input instanceof ec?1:this.input.numberOfInputs:0}get numberOfOutputs(){return el(this.output)?this.output.numberOfOutputs:0}_isAudioNode(t){return el(t)&&(t instanceof ic||dl(t))}_getInternalNodes(){const t=this._internalChannels.slice(0);return this._isAudioNode(this.input)&&t.push(this.input),this._isAudioNode(this.output)&&this.input!==this.output&&t.push(this.output),t}_setChannelProperties(t){this._getInternalNodes().forEach((e=>{e.channelCount=t.channelCount,e.channelCountMode=t.channelCountMode,e.channelInterpretation=t.channelInterpretation}))}_getChannelProperties(){const t=this._getInternalNodes();Ku(t.length>0,"ToneAudioNode does not have any internal nodes");const e=t[0];return{channelCount:e.channelCount,channelCountMode:e.channelCountMode,channelInterpretation:e.channelInterpretation}}get channelCount(){return this._getChannelProperties().channelCount}set channelCount(t){const e=this._getChannelProperties();this._setChannelProperties(Object.assign(e,{channelCount:t}))}get channelCountMode(){return this._getChannelProperties().channelCountMode}set channelCountMode(t){const e=this._getChannelProperties();this._setChannelProperties(Object.assign(e,{channelCountMode:t}))}get channelInterpretation(){return this._getChannelProperties().channelInterpretation}set channelInterpretation(t){const e=this._getChannelProperties();this._setChannelProperties(Object.assign(e,{channelInterpretation:t}))}connect(t,e=0,i=0){return rc(this,t,e,i),this}toDestination(){return this.connect(this.context.destination),this}toMaster(){return $u("toMaster() has been renamed toDestination()"),this.toDestination()}
vendor: 15,644 bytes, line 6880
6880disconnect(t,e=0,i=0){return function(t,e,i=0,n=0){if(el(e))for(;e instanceof ic;)e=e.input;for(;!dl(t);)el(t.output)&&(t=t.output);fl(e)?t.disconnect(e,i):dl(e)?t.disconnect(e,i,n):t.disconnect()}(this,t,e,i),this}chain(...t){return nc(this,...t),this}fan(...t){return t.forEach((t=>this.connect(t))),this}dispose(){return super.dispose(),el(this.input)&&(this.input instanceof ic?this.input.dispose():dl(this.input)&&this.input.disconnect()),el(this.output)&&(this.output instanceof ic?this.output.dispose():dl(this.output)&&this.output.disconnect()),this._internalChannels=[],this}}function nc(...t){const e=t.shift();t.reduce(((t,e)=>(t instanceof ic?t.connect(e):dl(t)&&rc(t,e),e)),e)}function rc(t,e,i=0,n=0){for(Ku(el(t),"Cannot connect from undefined node"),Ku(el(e),"Cannot connect to undefined node"),(e instanceof ic||dl(e))&&Ku(e.numberOfInputs>0,"Cannot connect to node with no inputs"),Ku(t.numberOfOutputs>0,"Cannot connect from node with no outputs");e instanceof ic||e instanceof ec;)el(e.input)&&(e=e.input);for(;t instanceof ic;)el(t.output)&&(t=t.output);fl(e)?t.connect(e,i):t.connect(e,i,n)}class sc extends ic{constructor(){super(xl(sc.getDefaults(),arguments,["gain","units"])),this.name="Gain",this._gainNode=this.context.createGain(),this.input=this._gainNode,this.output=this._gainNode;const t=xl(sc.getDefaults(),arguments,["gain","units"]);this.gain=new ec({context:this.context,convert:t.convert,param:this._gainNode.gain,units:t.units,value:t.gain,minValue:t.minValue,maxValue:t.maxValue}),Dl(this,"gain")}static getDefaults(){return Object.assign(ic.getDefaults(),{convert:!0,gain:1,units:"gain"})}dispose(){return super.dispose(),this._gainNode.disconnect(),this.gain.dispose(),this}}class oc extends ic{constructor(t){super(t),this.onended=Nl,this._startTime=-1,this._stopTime=-1,this._timeout=-1,this.output=new sc({context:this.context,gain:0}),this._gainNode=this.output,this.getStateAtTime=function(t){const e=this.toSeconds(t);return-1!==this._startTime&&e>=this._startTime&&(-1===this._stopTime||e<=this._stopTime)?"started":"stopped"},this._fadeIn=t.fadeIn,this._fadeOut=t.fadeOut,this._curve=t.curve,this.onended=t.onended}static getDefaults(){return Object.assign(ic.getDefaults(),{curve:"linear",fadeIn:0,fadeOut:0,onended:Nl})}_startGain(t,e=1){Ku(-1===this._startTime,"Source cannot be started more than once");const i=this.toSeconds(this._fadeIn);return this._startTime=t+i,this._startTime=Math.max(this._startTime,this.context.currentTime),i>0?(this._gainNode.gain.setValueAtTime(0,t),"linear"===this._curve?this._gainNode.gain.linearRampToValueAtTime(e,t+i):this._gainNode.gain.exponentialApproachValueAtTime(e,t,i)):this._gainNode.gain.setValueAtTime(e,t),this}stop(t){return this.log("stop",t),this._stopGain(this.toSeconds(t)),this}_stopGain(t){Ku(-1!==this._startTime,"'start' must be called before 'stop'"),this.cancelStop();const e=this.toSeconds(this._fadeOut);return this._stopTime=this.toSeconds(t)+e,this._stopTime=Math.max(this._stopTime,this.context.currentTime),e>0?"linear"===this._curve?this._gainNode.gain.linearRampTo(0,e,t):this._gainNode.gain.targetRampTo(0,e,t):(this._gainNode.gain.cancelAndHoldAtTime(t),this._gainNode.gain.setValueAtTime(0,t)),this.context.clearTimeout(this._timeout),this._timeout=this.context.setTimeout((()=>{const t="exponential"===this._curve?2*e:0;this._stopSource(this.now()+t),this._onended()}),this._stopTime-this.context.currentTime),this}_onended(){if(this.onended!==Nl&&(this.onended(this),this.onended=Nl,!this.context.isOffline)){const t=()=>this.dispose();void 0!==window.requestIdleCallback?window.requestIdleCallback(t):setTimeout(t,1e3)}}get state(){return this.getStateAtTime(this.now())}cancelStop(){return this.log("cancelStop"),Ku(-1!==this._startTime,"Source is not started"),this._gainNode.gain.cancelScheduledValues(this._startTime+this.sampleTime),this.context.clearTimeout(this._timeout),this._stopTime=-1,this}dispose(){return super.dispose(),this._gainNode.disconnect(),this}}class ac extends oc{constructor(){super(xl(ac.getDefaults(),arguments,["offset"])),this.name="ToneConstantSource",this._source=this.context.createConstantSource();const t=xl(ac.getDefaults(),arguments,["offset"]);rc(this._source,this._gainNode),this.offset=new ec({context:this.context,convert:t.convert,param:this._source.offset,units:t.units,value:t.offset,minValue:t.minValue,maxValue:t.maxValue})}static getDefaults(){return Object.assign(oc.getDefaults(),{convert:!0,offset:1,units:"number"})}start(t){const e=this.toSeconds(t);return this.log("start",e),this._startGain(e),this._source.start(e),this}_stopSource(t){this._source.stop(t)}dispose(){return super.dispose(),"started"===this.state&&this.stop(),this._source.disconnect(),this.offset.dispose(),this}}class hc extends ic{constructor(){super(xl(hc.getDefaults(),arguments,["value","units"])),this.name="Signal",this.override=!0;const t=xl(hc.getDefaults(),arguments,["value","units"]);this.output=this._constantSource=new ac({context:this.context,convert:t.convert,offset:t.value,units:t.units,minValue:t.minValue,maxValue:t.maxValue}),this._constantSource.start(0),this.input=this._param=this._constantSource.offset}static getDefaults(){return Object.assign(ic.getDefaults(),{convert:!0,units:"number",value:0})}connect(t,e=0,i=0){return uc(this,t,e,i),this}dispose(){return super.dispose(),this._param.dispose(),this._constantSource.dispose(),this}setValueAtTime(t,e){return this._param.setValueAtTime(t,e),this}getValueAtTime(t){return this._param.getValueAtTime(t)}setRampPoint(t){return this._param.setRampPoint(t),this}linearRampToValueAtTime(t,e){return this._param.linearRampToValueAtTime(t,e),this}exponentialRampToValueAtTime(t,e){return this._param.exponentialRampToValueAtTime(t,e),this}exponentialRampTo(t,e,i){return this._param.exponentialRampTo(t,e,i),this}linearRampTo(t,e,i){return this._param.linearRampTo(t,e,i),this}targetRampTo(t,e,i){return this._param.targetRampTo(t,e,i),this}exponentialApproachValueAtTime(t,e,i){return this._param.exponentialApproachValueAtTime(t,e,i),this}setTargetAtTime(t,e,i){return this._param.setTargetAtTime(t,e,i),this}setValueCurveAtTime(t,e,i,n){return this._param.setValueCurveAtTime(t,e,i,n),this}cancelScheduledValues(t){return this._param.cancelScheduledValues(t),this}cancelAndHoldAtTime(t){return this._param.cancelAndHoldAtTime(t),this}rampTo(t,e,i){return this._param.rampTo(t,e,i),this}get value(){return this._param.value}set value(t){this._param.value=t}get convert(){return this._param.convert}set convert(t){this._param.convert=t}get units(){return this._param.units}get overridden(){return this._param.overridden}set overridden(t){this._param.overridden=t}get maxValue(){return this._param.maxValue}get minValue(){return this._param.minValue}apply(t){return this._param.apply(t),this}}function uc(t,e,i,n){(e instanceof ec||fl(e)||e instanceof hc&&e.override)&&(e.cancelScheduledValues(0),e.setValueAtTime(0,0),e instanceof hc&&(e.overridden=!0)),rc(t,e,i,n)}class lc extends ec{constructor(){super(xl(lc.getDefaults(),arguments,["value"])),this.name="TickParam",this._events=new Cl(1/0),this._multiplier=1;const t=xl(lc.getDefaults(),arguments,["value"]);this._multiplier=t.multiplier,this._events.cancel(0),this._events.add({ticks:0,time:0,type:"setValueAtTime",value:this._fromType(t.value)}),this.setValueAtTime(t.value,0)}static getDefaults(){return Object.assign(ec.getDefaults(),{multiplier:1,units:"hertz",value:1})}setTargetAtTime(t,e,i){e=this.toSeconds(e),this.setRampPoint(e);const n=this._fromType(t),r=this._events.get(e),s=Math.round(Math.max(1/i,1));for(let o=0;o<=s;o++){const t=i*o+e,s=this._exponentialApproach(r.time,r.value,n,i,t);this.linearRampToValueAtTime(this._toType(s),t)}return this}setValueAtTime(t,e){const i=this.toSeconds(e);super.setValueAtTime(t,e);const n=this._events.get(i),r=this._events.previousEvent(n),s=this._getTicksUntilEvent(r,i);return n.ticks=Math.max(s,0),this}linearRampToValueAtTime(t,e){const i=this.toSeconds(e);super.linearRampToValueAtTime(t,e);const n=this._events.get(i),r=this._events.previousEvent(n),s=this._getTicksUntilEvent(r,i);return n.ticks=Math.max(s,0),this}exponentialRampToValueAtTime(t,e){e=this.toSeconds(e);const i=this._fromType(t),n=this._events.get(e),r=Math.round(Math.max(10*(e-n.time),1)),s=(e-n.time)/r;for(let o=0;o<=r;o++){const t=s*o+n.time,r=this._exponentialInterpolate(n.time,n.value,e,i,t);this.linearRampToValueAtTime(this._toType(r),t)}return this}_getTicksUntilEvent(t,e){if(null===t)t={ticks:0,time:0,type:"setValueAtTime",value:0};else if(tl(t.ticks)){const e=this._events.previousEvent(t);t.ticks=this._getTicksUntilEvent(e,t.time)}const i=this._fromType(this.getValueAtTime(t.time));let n=this._fromType(this.getValueAtTime(e));const r=this._events.get(e);return r&&r.time===e&&"setValueAtTime"===r.type&&(n=this._fromType(this.getValueAtTime(e-this.sampleTime))),.5*(e-t.time)*(i+n)+t.ticks}getTicksAtTime(t){const e=this.toSeconds(t),i=this._events.get(e);return Math.max(this._getTicksUntilEvent(i,e),0)}getDurationOfTicks(t,e){const i=this.toSeconds(e),n=this.getTicksAtTime(e);return this.getTimeOfTick(n+t)-i}getTimeOfTick(t){const e=this._events.get(t,"ticks"),i=this._events.getAfter(t,"ticks");if(e&&e.ticks===t)return e.time;if(e&&i&&"linearRampToValueAtTime"===i.type&&e.value!==i.value){const n=this._fromType(this.getValueAtTime(e.time)),r=(this._fromType(this.getValueAtTime(i.time))-n)/(i.time-e.time),s=Math.sqrt(Math.pow(n,2)-2*r*(e.ticks-t)),o=(-n+s)/r,a=(-n-s)/r;return(o>0?o:a)+e.time}return e?0===e.value?1/0:e.time+(t-e.ticks)/e.value:t/this._initialValue}ticksToTime(t,e){return this.getDurationOfTicks(t,e)}timeToTicks(t,e){const i=this.toSeconds(e),n=this.toSeconds(t),r=this.getTicksAtTime(i);return this.getTicksAtTime(i+n)-r}_fromType(t){return"bpm"===this.units&&this.multiplier?1/(60/t/this.multiplier):super._fromType(t)}_toType(t){return"bpm"===this.units&&this.multiplier?t/this.multiplier*60:super._toType(t)}get multiplier(){return this._multiplier}set multiplier(t){const e=this.value;this._multiplier=t,this.cancelScheduledValues(0),this.setValueAtTime(e,0)}}class cc extends hc{constructor(){super(xl(cc.getDefaults(),arguments,["value"])),this.name="TickSignal";const t=xl(cc.getDefaults(),arguments,["value"]);this.input=this._param=new lc({context:this.context,convert:t.convert,multiplier:t.multiplier,param:this._constantSource.offset,units:t.units,value:t.value})}static getDefaults(){return Object.assign(hc.getDefaults(),{multiplier:1,units:"hertz",value:1})}ticksToTime(t,e){return this._param.ticksToTime(t,e)}timeToTicks(t,e){return this._param.timeToTicks(t,e)}getTimeOfTick(t){return this._param.getTimeOfTick(t)}getDurationOfTicks(t,e){return this._param.getDurationOfTicks(t,e)}getTicksAtTime(t){return this._param.getTicksAtTime(t)}get multiplier(){return this._param.multiplier}set multiplier(t){this._param.multiplier=t}dispose(){return super.dispose(),this._param.dispose(),this}}class fc extends $l{constructor(){super(xl(fc.getDefaults(),arguments,["frequency"])),this.name="TickSource",this._state=new tc,this._tickOffset=new Cl;const t=xl(fc.getDefaults(),arguments,["frequency"]);this.frequency=new cc({context:this.context,units:t.units,value:t.frequency}),Dl(this,"frequency"),this._state.setStateAtTime("stopped",0),this.setTicksAtTime(0,0)}static getDefaults(){return Object.assign({frequency:1,units:"hertz"},$l.getDefaults())}get state(){return this.getStateAtTime(this.now())}start(t,e){const i=this.toSeconds(t);return"started"!==this._state.getValueAtTime(i)&&(this._state.setStateAtTime("started",i),el(e)&&this.setTicksAtTime(e,i)),this}stop(t){const e=this.toSeconds(t);if("stopped"===this._state.getValueAtTime(e)){const t=this._state.get(e);t&&t.time>0&&(this._tickOffset.cancel(t.time),this._state.cancel(t.time))}return this._state.cancel(e),this._state.setStateAtTime("stopped",e),this.setTicksAtTime(0,e),this}pause(t){const e=this.toSeconds(t);return"started"===this._state.getValueAtTime(e)&&this._state.setStateAtTime("paused",e),this}cancel(t){return t=this.toSeconds(t),this._state.cancel(t),this._tickOffset.cancel(t),this}getTicksAtTime(t){const e=this.toSeconds(t),i=this._state.getLastState("stopped",e),n={state:"paused",time:e};this._state.add(n);let r=i,s=0;return this._state.forEachBetween(i.time,e+this.sampleTime,(t=>{let e=r.time;const i=this._tickOffset.get(t.time);i&&i.time>=r.time&&(s=i.ticks,e=i.time),"started"===r.state&&"started"!==t.state&&(s+=this.frequency.getTicksAtTime(t.time)-this.frequency.getTicksAtTime(e)),r=t})),this._state.remove(n),s}get ticks(){return this.getTicksAtTime(this.now())}set ticks(t){this.setTicksAtTime(t,this.now())}get seconds(){return this.getSecondsAtTime(this.now())}set seconds(t){const e=this.now(),i=this.frequency.timeToTicks(t,e);this.setTicksAtTime(i,e)}getSecondsAtTime(t){t=this.toSeconds(t);const e=this._state.getLastState("stopped",t),i={state:"paused",time:t};this._state.add(i);let n=e,r=0;return this._state.forEachBetween(e.time,t+this.sampleTime,(t=>{let e=n.time;const i=this._tickOffset.get(t.time);i&&i.time>=n.time&&(r=i.seconds,e=i.time),"started"===n.state&&"started"!==t.state&&(r+=t.time-e),n=t})),this._state.remove(i),r}setTicksAtTime(t,e){return e=this.toSeconds(e),this._tickOffset.cancel(e),this._tickOffset.add({seconds:this.frequency.getDurationOfTicks(t,e),ticks:t,time:e}),this}getStateAtTime(t){return t=this.toSeconds(t),this._state.getValueAtTime(t)}getTimeOfTick(t,e=this.now()){const i=this._tickOffset.get(e),n=this._state.get(e),r=Math.max(i.time,n.time),s=this.frequency.getTicksAtTime(r)+t-i.ticks;return this.frequency.getTimeOfTick(s)}forEachTickBetween(t,e,i){let n=this._state.get(t);this._state.forEachBetween(t,e,(e=>{n&&"started"===n.state&&"started"!==e.state&&this.forEachTickBetween(Math.max(n.time,t),e.time-this.sampleTime,i),n=e}));let r=null;if(n&&"started"===n.state){const s=Math.max(n.time,t),o=this.frequency.getTicksAtTime(s),a=o-this.frequency.getTicksAtTime(n.time);let h=Math.ceil(a)-a;h=Al(h,1)?0:h;let u=this.frequency.getTimeOfTick(o+h);for(;u<e;){try{i(u,Math.round(this.getTicksAtTime(u)))}catch(lC){r=lC;break}u+=this.frequency.getDurationOfTicks(1,u)}}if(r)throw r;return this}dispose(){return super.dispose(),this._state.dispose(),this._tickOffset.dispose(),this.frequency.dispose(),this}}class dc extends $l{constructor(){super(xl(dc.getDefaults(),arguments,["callback","frequency"])),this.name="Clock",this.callback=Nl,this._lastUpdate=0,this._state=new tc("stopped"),this._boundLoop=this._loop.bind(this);const t=xl(dc.getDefaults(),arguments,["callback","frequency"]);this.callback=t.callback,this._tickSource=new fc({context:this.context,frequency:t.frequency,units:t.units}),this._lastUpdate=0,this.frequency=this._tickSource.frequency,Dl(this,"frequency"),this._state.setStateAtTime("stopped",0),this.context.on("tick",this._boundLoop)}static getDefaults(){return Object.assign($l.getDefaults(),{callback:Nl,frequency:1,units:"hertz"})}get state(){return this._state.getValueAtTime(this.now())}start(t,e){Qu(this.context);const i=this.toSeconds(t);return this.log("start",i),"started"!==this._state.getValueAtTime(i)&&(this._state.setStateAtTime("started",i),this._tickSource.start(i,e),i<this._lastUpdate&&this.emit("start",i,e)),this}stop(t){const e=this.toSeconds(t);return this.log("stop",e),this._state.cancel(e),this._state.setStateAtTime("stopped",e),this._tickSource.stop(e),e<this._lastUpdate&&this.emit("stop",e),this}pause(t){const e=this.toSeconds(t);return"started"===this._state.getValueAtTime(e)&&(this._state.setStateAtTime("paused",e),this._tickSource.pause(e),e<this._lastUpdate&&this.emit
vendor: 9,942 bytes, line 6880
6880("pause",e)),this}get ticks(){return Math.ceil(this.getTicksAtTime(this.now()))}set ticks(t){this._tickSource.ticks=t}get seconds(){return this._tickSource.seconds}set seconds(t){this._tickSource.seconds=t}getSecondsAtTime(t){return this._tickSource.getSecondsAtTime(t)}setTicksAtTime(t,e){return this._tickSource.setTicksAtTime(t,e),this}getTimeOfTick(t,e=this.now()){return this._tickSource.getTimeOfTick(t,e)}getTicksAtTime(t){return this._tickSource.getTicksAtTime(t)}nextTickTime(t,e){const i=this.toSeconds(e),n=this.getTicksAtTime(i);return this._tickSource.getTimeOfTick(n+t,i)}_loop(){const t=this._lastUpdate,e=this.now();this._lastUpdate=e,this.log("loop",t,e),t!==e&&(this._state.forEachBetween(t,e,(t=>{switch(t.state){case"started":const e=this._tickSource.getTicksAtTime(t.time);this.emit("start",t.time,e);break;case"stopped":0!==t.time&&this.emit("stop",t.time);break;case"paused":this.emit("pause",t.time)}})),this._tickSource.forEachTickBetween(t,e,((t,e)=>{this.callback(t,e)})))}getStateAtTime(t){const e=this.toSeconds(t);return this._state.getValueAtTime(e)}dispose(){return super.dispose(),this.context.off("tick",this._boundLoop),this._tickSource.dispose(),this._state.dispose(),this}}Il.mixin(dc);class pc extends bl{constructor(){super(),this.name="ToneAudioBuffers",this._buffers=new Map,this._loadingCount=0;const t=xl(pc.getDefaults(),arguments,["urls","onload","baseUrl"],"urls");this.baseUrl=t.baseUrl,Object.keys(t.urls).forEach((e=>{this._loadingCount++;const i=t.urls[e];this.add(e,i,this._bufferLoaded.bind(this,t.onload),t.onerror)}))}static getDefaults(){return{baseUrl:"",onerror:Nl,onload:Nl,urls:{}}}has(t){return this._buffers.has(t.toString())}get(t){return Ku(this.has(t),`ToneAudioBuffers has no buffer named: ${t}`),this._buffers.get(t.toString())}_bufferLoaded(t){this._loadingCount--,0===this._loadingCount&&t&&t()}get loaded(){return Array.from(this._buffers).every((([t,e])=>e.loaded))}add(t,e,i=Nl,n=Nl){return sl(e)?this._buffers.set(t.toString(),new Bl(this.baseUrl+e,i,n)):this._buffers.set(t.toString(),new Bl(e,i,n)),this}dispose(){return super.dispose(),this._buffers.forEach((t=>t.dispose())),this._buffers.clear(),this}}class vc extends Jl{constructor(){super(...arguments),this.name="Ticks",this.defaultUnits="i"}_now(){return this.context.transport.ticks}_beatsToUnits(t){return this._getPPQ()*t}_secondsToUnits(t){return Math.floor(t/(60/this._getBpm())*this._getPPQ())}_ticksToUnits(t){return t}toTicks(){return this.valueOf()}toSeconds(){return this.valueOf()/this._getPPQ()*(60/this._getBpm())}}class gc extends $l{constructor(){super(...arguments),this.name="Draw",this.expiration=.25,this.anticipation=.008,this._events=new Cl,this._boundDrawLoop=this._drawLoop.bind(this),this._animationFrame=-1}schedule(t,e){return this._events.add({callback:t,time:this.toSeconds(e)}),1===this._events.length&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop)),this}cancel(t){return this._events.cancel(this.toSeconds(t)),this}_drawLoop(){const t=this.context.currentTime;for(;this._events.length&&this._events.peek().time-this.anticipation<=t;){const e=this._events.shift();e&&t-e.time<=this.expiration&&e.callback()}this._events.length>0&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop))}dispose(){return super.dispose(),this._events.dispose(),cancelAnimationFrame(this._animationFrame),this}}Rl((t=>{t.draw=new gc({context:t})})),Pl((t=>{t.draw.dispose()}));class mc extends bl{constructor(){super(...arguments),this.name="IntervalTimeline",this._root=null,this._length=0}add(t){Ku(el(t.time),"Events must have a time property"),Ku(el(t.duration),"Events must have a duration parameter"),t.time=t.time.valueOf();let e=new yc(t.time,t.time+t.duration,t);for(null===this._root?this._root=e:this._root.insert(e),this._length++;null!==e;)e.updateHeight(),e.updateMax(),this._rebalance(e),e=e.parent;return this}remove(t){if(null!==this._root){const e=[];this._root.search(t.time,e);for(const i of e)if(i.event===t){this._removeNode(i),this._length--;break}}return this}get length(){return this._length}cancel(t){return this.forEachFrom(t,(t=>this.remove(t))),this}_setRoot(t){this._root=t,null!==this._root&&(this._root.parent=null)}_replaceNodeInParent(t,e){null!==t.parent?(t.isLeftChild()?t.parent.left=e:t.parent.right=e,this._rebalance(t.parent)):this._setRoot(e)}_removeNode(t){if(null===t.left&&null===t.right)this._replaceNodeInParent(t,null);else if(null===t.right)this._replaceNodeInParent(t,t.left);else if(null===t.left)this._replaceNodeInParent(t,t.right);else{let e,i=null;if(t.getBalance()>0)if(null===t.left.right)e=t.left,e.right=t.right,i=e;else{for(e=t.left.right;null!==e.right;)e=e.right;e.parent&&(e.parent.right=e.left,i=e.parent,e.left=t.left,e.right=t.right)}else if(null===t.right.left)e=t.right,e.left=t.left,i=e;else{for(e=t.right.left;null!==e.left;)e=e.left;e.parent&&(e.parent.left=e.right,i=e.parent,e.left=t.left,e.right=t.right)}null!==t.parent?t.isLeftChild()?t.parent.left=e:t.parent.right=e:this._setRoot(e),i&&this._rebalance(i)}t.dispose()}_rotateLeft(t){const e=t.parent,i=t.isLeftChild(),n=t.right;n&&(t.right=n.left,n.left=t),null!==e?i?e.left=n:e.right=n:this._setRoot(n)}_rotateRight(t){const e=t.parent,i=t.isLeftChild(),n=t.left;n&&(t.left=n.right,n.right=t),null!==e?i?e.left=n:e.right=n:this._setRoot(n)}_rebalance(t){const e=t.getBalance();e>1&&t.left?t.left.getBalance()<0?this._rotateLeft(t.left):this._rotateRight(t):e<-1&&t.right&&(t.right.getBalance()>0?this._rotateRight(t.right):this._rotateLeft(t))}get(t){if(null!==this._root){const e=[];if(this._root.search(t,e),e.length>0){let t=e[0];for(let i=1;i<e.length;i++)e[i].low>t.low&&(t=e[i]);return t.event}}return null}forEach(t){if(null!==this._root){const e=[];this._root.traverse((t=>e.push(t))),e.forEach((e=>{e.event&&t(e.event)}))}return this}forEachAtTime(t,e){if(null!==this._root){const i=[];this._root.search(t,i),i.forEach((t=>{t.event&&e(t.event)}))}return this}forEachFrom(t,e){if(null!==this._root){const i=[];this._root.searchAfter(t,i),i.forEach((t=>{t.event&&e(t.event)}))}return this}dispose(){return super.dispose(),null!==this._root&&this._root.traverse((t=>t.dispose())),this._root=null,this}}class yc{constructor(t,e,i){this._left=null,this._right=null,this.parent=null,this.height=0,this.event=i,this.low=t,this.high=e,this.max=this.high}insert(t){t.low<=this.low?null===this.left?this.left=t:this.left.insert(t):null===this.right?this.right=t:this.right.insert(t)}search(t,e){t>this.max||(null!==this.left&&this.left.search(t,e),this.low<=t&&this.high>t&&e.push(this),this.low>t||null!==this.right&&this.right.search(t,e))}searchAfter(t,e){this.low>=t&&(e.push(this),null!==this.left&&this.left.searchAfter(t,e)),null!==this.right&&this.right.searchAfter(t,e)}traverse(t){t(this),null!==this.left&&this.left.traverse(t),null!==this.right&&this.right.traverse(t)}updateHeight(){null!==this.left&&null!==this.right?this.height=Math.max(this.left.height,this.right.height)+1:null!==this.right?this.height=this.right.height+1:null!==this.left?this.height=this.left.height+1:this.height=0}updateMax(){this.max=this.high,null!==this.left&&(this.max=Math.max(this.max,this.left.max)),null!==this.right&&(this.max=Math.max(this.max,this.right.max))}getBalance(){let t=0;return null!==this.left&&null!==this.right?t=this.left.height-this.right.height:null!==this.left?t=this.left.height+1:null!==this.right&&(t=-(this.right.height+1)),t}isLeftChild(){return null!==this.parent&&this.parent.left===this}get left(){return this._left}set left(t){this._left=t,null!==t&&(t.parent=this),this.updateHeight(),this.updateMax()}get right(){return this._right}set right(t){this._right=t,null!==t&&(t.parent=this),this.updateHeight(),this.updateMax()}dispose(){this.parent=null,this._left=null,this._right=null,this.event=null}}class xc extends ic{constructor(){super(xl(xc.getDefaults(),arguments,["volume"])),this.name="Volume";const t=xl(xc.getDefaults(),arguments,["volume"]);this.input=this.output=new sc({context:this.context,gain:t.volume,units:"decibels"}),this.volume=this.output.gain,Dl(this,"volume"),this._unmutedVolume=t.volume,this.mute=t.mute}static getDefaults(){return Object.assign(ic.getDefaults(),{mute:!1,volume:0})}get mute(){return this.volume.value===-1/0}set mute(t){!this.mute&&t?(this._unmutedVolume=this.volume.value,this.volume.value=-1/0):this.mute&&!t&&(this.volume.value=this._unmutedVolume)}dispose(){return super.dispose(),this.input.dispose(),this.volume.dispose(),this}}class wc extends ic{constructor(){super(xl(wc.getDefaults(),arguments)),this.name="Destination",this.input=new xc({context:this.context}),this.output=new sc({context:this.context}),this.volume=this.input.volume;const t=xl(wc.getDefaults(),arguments);nc(this.input,this.output,this.context.rawContext.destination),this.mute=t.mute,this._internalChannels=[this.input,this.context.rawContext.destination,this.output]}static getDefaults(){return Object.assign(ic.getDefaults(),{mute:!1,volume:0})}get mute(){return this.input.mute}set mute(t){this.input.mute=t}chain(...t){return this.input.disconnect(),t.unshift(this.input),t.push(this.output),nc(...t),this}get maxChannelCount(){return this.context.rawContext.destination.maxChannelCount}dispose(){return super.dispose(),this.volume.dispose(),this}}Rl((t=>{t.destination=new wc({context:t})})),Pl((t=>{t.destination.dispose()}));class _c extends bl{constructor(t){super(),this.name="TimelineValue",this._timeline=new Cl({memory:10}),this._initialValue=t}set(t,e){return this._timeline.add({value:t,time:e}),this}get(t){const e=this._timeline.get(t);return e?e.value:this._initialValue}}class bc{constructor(t,e){this.id=bc._eventId++;const i=Object.assign(bc.getDefaults(),e);this.transport=t,this.callback=i.callback,this._once=i.once,this.time=i.time}static getDefaults(){return{callback:Nl,once:!1,time:0}}invoke(t){this.callback&&(this.callback(t),this._once&&this.transport.clear(this.id
vendor: 1,977 bytes, line 6880
6880))}dispose(){return this.callback=void 0,this}}bc._eventId=0;class Tc extends bc{constructor(t,e){super(t,e),this._currentId=-1,this._nextId=-1,this._nextTick=this.time,this._boundRestart=this._restart.bind(this);const i=Object.assign(Tc.getDefaults(),e);this.duration=new vc(t.context,i.duration).valueOf(),this._interval=new vc(t.context,i.interval).valueOf(),this._nextTick=i.time,this.transport.on("start",this._boundRestart),this.transport.on("loopStart",this._boundRestart),this.context=this.transport.context,this._restart()}static getDefaults(){return Object.assign({},bc.getDefaults(),{duration:1/0,interval:1,once:!1})}invoke(t){this._createEvents(t),super.invoke(t)}_createEvents(t){const e=this.transport.getTicksAtTime(t);e>=this.time&&e>=this._nextTick&&this._nextTick+this._interval<this.time+this.duration&&(this._nextTick+=this._interval,this._currentId=this._nextId,this._nextId=this.transport.scheduleOnce(this.invoke.bind(this),new vc(this.context,this._nextTick).toSeconds()))}_restart(t){this.transport.clear(this._currentId),this.transport.clear(this._nextId),this._nextTick=this.time;const e=this.transport.getTicksAtTime(t);e>this.time&&(this._nextTick=this.time+Math.ceil((e-this.time)/this._interval)*this._interval),this._currentId=this.transport.scheduleOnce(this.invoke.bind(this),new vc(this.context,this._nextTick).toSeconds()),this._nextTick+=this._interval,this._nextId=this.transport.scheduleOnce(this.invoke.bind(this),new vc(this.context,this._nextTick).toSeconds())}dispose(){return super.dispose(),this.transport.clear(this._currentId),this.transport.clear(this._nextId),this.transport.off("start",this._boundRestart),this.transport.off("loopStart",this._boundRestart),this}}class Ec extends $l{constructor(){super(xl(Ec.getDefaults(),arguments)),this.name="Transport",this._loop=new _c(!1),this._loopStart=0,this._loopEnd=0,this._scheduledEvents={},this._timeline=new Cl,this._repeatedEvents=new mc,this._syncedSignals=[],this._swingAmou
vendor: 3,000 bytes, line 6880
6880nt=0;const t=xl(Ec.getDefaults(),arguments);this._ppq=t.ppq,this._clock=new dc({callback:this._processTick.bind(this),context:this.context,frequency:0,units:"bpm"}),this._bindClockEvents(),this.bpm=this._clock.frequency,this._clock.frequency.multiplier=t.ppq,this.bpm.setValueAtTime(t.bpm,0),Dl(this,"bpm"),this._timeSignature=t.timeSignature,this._swingTicks=t.ppq/2}static getDefaults(){return Object.assign($l.getDefaults(),{bpm:120,loopEnd:"4m",loopStart:0,ppq:192,swing:0,swingSubdivision:"8n",timeSignature:4})}_processTick(t,e){if(this._loop.get(t)&&e>=this._loopEnd&&(this.emit("loopEnd",t),this._clock.setTicksAtTime(this._loopStart,t),e=this._loopStart,this.emit("loopStart",t,this._clock.getSecondsAtTime(t)),this.emit("loop",t)),this._swingAmount>0&&e%this._ppq!=0&&e%(2*this._swingTicks)!=0){const i=e%(2*this._swingTicks)/(2*this._swingTicks),n=Math.sin(i*Math.PI)*this._swingAmount;t+=new vc(this.context,2*this._swingTicks/3).toSeconds()*n}this._timeline.forEachAtTime(e,(e=>e.invoke(t)))}schedule(t,e){const i=new bc(this,{callback:t,time:new Jl(this.context,e).toTicks()});return this._addEvent(i,this._timeline)}scheduleRepeat(t,e,i,n=1/0){const r=new Tc(this,{callback:t,duration:new ql(this.context,n).toTicks(),interval:new ql(this.context,e).toTicks(),time:new Jl(this.context,i).toTicks()});return this._addEvent(r,this._repeatedEvents)}scheduleOnce(t,e){const i=new bc(this,{callback:t,once:!0,time:new Jl(this.context,e).toTicks()});return this._addEvent(i,this._timeline)}clear(t){if(this._scheduledEvents.hasOwnProperty(t)){const e=this._scheduledEvents[t.toString()];e.timeline.remove(e.event),e.event.dispose(),delete this._scheduledEvents[t.toString()]}return this}_addEvent(t,e){return this._scheduledEvents[t.id.toString()]={event:t,timeline:e},e.add(t),t.id}cancel(t=0){const e=this.toTicks(t);return this._timeline.forEachFrom(e,(t=>this.clear(t.id))),this._repeatedEvents.forEachFrom(e,(t=>this.clear(t.id))),this}_bindClockEvents(){this._clock.on("start",((t,e)=>{e=new vc(this.context,e).toSeconds(),this.emit("start",t,e)})),this._clock.on("stop",(t=>{this.emit("stop",t)})),this._clock.on("pause",(t=>{this.emit("pause",t)}))}get state(){return this._clock.getStateAtTime(this.now())}start(t,e){let i;return el(e)&&(i=this.toTicks(e)),this._clock.start(t,i),this}stop(t){return this._clock.stop(t),this}pause(t){return this._clock.pause(t),this}toggle(t){return t=this.toSeconds(t),"started"!==this._clock.getStateAtTime(t)?this.start(t):this.stop(t),this}get timeSignature(){return this._timeSignature}set timeSignature(t){rl(t)&&(t=t[0]/t[1]*4),this._timeSignature=t}get loopStart(){return new ql(this.context,this._loopStart,"i").toSeconds()}set loopStart(t){this._loopStart=this.toTicks(t)}get loopEnd(){return new ql(this.context,this._loopEnd,"i").toSeconds()}set loopEnd(t){this._loopEnd=this.toTicks(t)}get loop(){return this._loop.get(this.now())}set loop(t){this._loop.set(t,this.now())}setLoopPoints(t,e){return this.loopStart=t,this.loopEnd=e,this}
vendor: 22,700 bytes, line 6880
6880get swing(){return this._swingAmount}set swing(t){this._swingAmount=t}get swingSubdivision(){return new vc(this.context,this._swingTicks).toNotation()}set swingSubdivision(t){this._swingTicks=this.toTicks(t)}get position(){const t=this.now(),e=this._clock.getTicksAtTime(t);return new vc(this.context,e).toBarsBeatsSixteenths()}set position(t){const e=this.toTicks(t);this.ticks=e}get seconds(){return this._clock.seconds}set seconds(t){const e=this.now(),i=this._clock.frequency.timeToTicks(t,e);this.ticks=i}get progress(){if(this.loop){const t=this.now();return(this._clock.getTicksAtTime(t)-this._loopStart)/(this._loopEnd-this._loopStart)}return 0}get ticks(){return this._clock.ticks}set ticks(t){if(this._clock.ticks!==t){const e=this.now();if("started"===this.state){const i=this._clock.getTicksAtTime(e),n=e+this._clock.frequency.getDurationOfTicks(Math.ceil(i)-i,e);this.emit("stop",n),this._clock.setTicksAtTime(t,n),this.emit("start",n,this._clock.getSecondsAtTime(n))}else this._clock.setTicksAtTime(t,e)}}getTicksAtTime(t){return Math.round(this._clock.getTicksAtTime(t))}getSecondsAtTime(t){return this._clock.getSecondsAtTime(t)}get PPQ(){return this._clock.frequency.multiplier}set PPQ(t){this._clock.frequency.multiplier=t}nextSubdivision(t){if(t=this.toTicks(t),"started"!==this.state)return 0;{const e=this.now(),i=t-this.getTicksAtTime(e)%t;return this._clock.nextTickTime(i,e)}}syncSignal(t,e){if(!e){const i=this.now();if(0!==t.getValueAtTime(i)){const n=1/(60/this.bpm.getValueAtTime(i)/this.PPQ);e=t.getValueAtTime(i)/n}else e=0}const i=new sc(e);return this.bpm.connect(i),i.connect(t._param),this._syncedSignals.push({initial:t.value,ratio:i,signal:t}),t.value=0,this}unsyncSignal(t){for(let e=this._syncedSignals.length-1;e>=0;e--){const i=this._syncedSignals[e];i.signal===t&&(i.ratio.dispose(),i.signal.value=i.initial,this._syncedSignals.splice(e,1))}return this}dispose(){return super.dispose(),this._clock.dispose(),Fl(this,"bpm"),this._timeline.dispose(),this._repeatedEvents.dispose(),this}}Il.mixin(Ec),Rl((t=>{t.transport=new Ec({context:t})})),Pl((t=>{t.transport.dispose()}));class Sc extends ic{constructor(t){super(t),this.input=void 0,this._state=new tc("stopped"),this._synced=!1,this._scheduled=[],this._syncedStart=Nl,this._syncedStop=Nl,this._state.memory=100,this._state.increasing=!0,this._volume=this.output=new xc({context:this.context,mute:t.mute,volume:t.volume}),this.volume=this._volume.volume,Dl(this,"volume"),this.onstop=t.onstop}static getDefaults(){return Object.assign(ic.getDefaults(),{mute:!1,onstop:Nl,volume:0})}get state(){return this._synced?"started"===this.context.transport.state?this._state.getValueAtTime(this.context.transport.seconds):"stopped":this._state.getValueAtTime(this.now())}get mute(){return this._volume.mute}set mute(t){this._volume.mute=t}_clampToCurrentTime(t){return this._synced?t:Math.max(t,this.context.currentTime)}start(t,e,i){let n=tl(t)&&this._synced?this.context.transport.seconds:this.toSeconds(t);if(n=this._clampToCurrentTime(n),this._synced||"started"!==this._state.getValueAtTime(n))if(this.log("start",n),this._state.setStateAtTime("started",n),this._synced){const t=this._state.get(n);t&&(t.offset=this.toSeconds(wl(e,0)),t.duration=i?this.toSeconds(i):void 0);const r=this.context.transport.schedule((t=>{this._start(t,e,i)}),n);this._scheduled.push(r),"started"===this.context.transport.state&&this.context.transport.getSecondsAtTime(this.immediate())>n&&this._syncedStart(this.now(),this.context.transport.seconds)}else Qu(this.context),this._start(n,e,i);else Ku(Tl(n,this._state.get(n).time),"Start time must be strictly greater than previous start time"),this._state.cancel(n),this._state.setStateAtTime("started",n),this.log("restart",n),this.restart(n,e,i);return this}stop(t){let e=tl(t)&&this._synced?this.context.transport.seconds:this.toSeconds(t);if(e=this._clampToCurrentTime(e),"started"===this._state.getValueAtTime(e)||el(this._state.getNextState("started",e))){if(this.log("stop",e),this._synced){const t=this.context.transport.schedule(this._stop.bind(this),e);this._scheduled.push(t)}else this._stop(e);this._state.cancel(e),this._state.setStateAtTime("stopped",e)}return this}restart(t,e,i){return t=this.toSeconds(t),"started"===this._state.getValueAtTime(t)&&(this._state.cancel(t),this._restart(t,e,i)),this}sync(){return this._synced||(this._synced=!0,this._syncedStart=(t,e)=>{if(e>0){const i=this._state.get(e);if(i&&"started"===i.state&&i.time!==e){const n=e-this.toSeconds(i.time);let r;i.duration&&(r=this.toSeconds(i.duration)-n),this._start(t,this.toSeconds(i.offset)+n,r)}}},this._syncedStop=t=>{const e=this.context.transport.getSecondsAtTime(Math.max(t-this.sampleTime,0));"started"===this._state.getValueAtTime(e)&&this._stop(t)},this.context.transport.on("start",this._syncedStart),this.context.transport.on("loopStart",this._syncedStart),this.context.transport.on("stop",this._syncedStop),this.context.transport.on("pause",this._syncedStop),this.context.transport.on("loopEnd",this._syncedStop)),this}unsync(){return this._synced&&(this.context.transport.off("stop",this._syncedStop),this.context.transport.off("pause",this._syncedStop),this.context.transport.off("loopEnd",this._syncedStop),this.context.transport.off("start",this._syncedStart),this.context.transport.off("loopStart",this._syncedStart)),this._synced=!1,this._scheduled.forEach((t=>this.context.transport.clear(t))),this._scheduled=[],this._state.cancel(0),this._stop(0),this}dispose(){return super.dispose(),this.onstop=Nl,this.unsync(),this._volume.dispose(),this._state.dispose(),this}}class Ac extends oc{constructor(){super(xl(Ac.getDefaults(),arguments,["url","onload"])),this.name="ToneBufferSource",this._source=this.context.createBufferSource(),this._internalChannels=[this._source],this._sourceStarted=!1,this._sourceStopped=!1;const t=xl(Ac.getDefaults(),arguments,["url","onload"]);rc(this._source,this._gainNode),this._source.onended=()=>this._stopSource(),this.playbackRate=new ec({context:this.context,param:this._source.playbackRate,units:"positive",value:t.playbackRate}),this.loop=t.loop,this.loopStart=t.loopStart,this.loopEnd=t.loopEnd,this._buffer=new Bl(t.url,t.onload,t.onerror),this._internalChannels.push(this._source)}static getDefaults(){return Object.assign(oc.getDefaults(),{url:new Bl,loop:!1,loopEnd:0,loopStart:0,onload:Nl,onerror:Nl,playbackRate:1})}get fadeIn(){return this._fadeIn}set fadeIn(t){this._fadeIn=t}get fadeOut(){return this._fadeOut}set fadeOut(t){this._fadeOut=t}get curve(){return this._curve}set curve(t){this._curve=t}start(t,e,i,n=1){Ku(this.buffer.loaded,"buffer is either not set or not loaded");const r=this.toSeconds(t);this._startGain(r,n),e=this.loop?wl(e,this.loopStart):wl(e,0);let s=Math.max(this.toSeconds(e),0);if(this.loop){const t=this.toSeconds(this.loopEnd)||this.buffer.duration,e=this.toSeconds(this.loopStart),i=t-e;El(s,t)&&(s=(s-e)%i+e),Al(s,this.buffer.duration)&&(s=0)}if(this._source.buffer=this.buffer.get(),this._source.loopEnd=this.toSeconds(this.loopEnd)||this.buffer.duration,Sl(s,this.buffer.duration)&&(this._sourceStarted=!0,this._source.start(r,s)),el(i)){let t=this.toSeconds(i);t=Math.max(t,0),this.stop(r+t)}return this}_stopSource(t){!this._sourceStopped&&this._sourceStarted&&(this._sourceStopped=!0,this._source.stop(this.toSeconds(t)),this._onended())}get loopStart(){return this._source.loopStart}set loopStart(t){this._source.loopStart=this.toSeconds(t)}get loopEnd(){return this._source.loopEnd}set loopEnd(t){this._source.loopEnd=this.toSeconds(t)}get buffer(){return this._buffer}set buffer(t){this._buffer.set(t)}get loop(){return this._source.loop}set loop(t){this._source.loop=t,this._sourceStarted&&this.cancelStop()}dispose(){return super.dispose(),this._source.onended=null,this._source.disconnect(),this._buffer.dispose(),this.playbackRate.dispose(),this}}function Cc(t,e){return ll(this,void 0,void 0,(function*(){const i=e/t.context.sampleRate,n=new Ul(1,i,t.context.sampleRate);new t.constructor(Object.assign(t.get(),{frequency:2/i,detune:0,context:n})).toDestination().start(0);return(yield n.render()).getChannelData(0)}))}class Oc extends oc{constructor(){super(xl(Oc.getDefaults(),arguments,["frequency","type"])),this.name="ToneOscillatorNode",this._oscillator=this.context.createOscillator(),this._internalChannels=[this._oscillator];const t=xl(Oc.getDefaults(),arguments,["frequency","type"]);rc(this._oscillator,this._gainNode),this.type=t.type,this.frequency=new ec({context:this.context,param:this._oscillator.frequency,units:"frequency",value:t.frequency}),this.detune=new ec({context:this.context,param:this._oscillator.detune,units:"cents",value:t.detune}),Dl(this,["frequency","detune"])}static getDefaults(){return Object.assign(oc.getDefaults(),{detune:0,frequency:440,type:"sine"})}start(t){const e=this.toSeconds(t);return this.log("start",e),this._startGain(e),this._oscillator.start(e),this}_stopSource(t){this._oscillator.stop(t)}setPeriodicWave(t){return this._oscillator.setPeriodicWave(t),this}get type(){return this._oscillator.type}set type(t){this._oscillator.type=t}dispose(){return super.dispose(),"started"===this.state&&this.stop(),this._oscillator.disconnect(),this.frequency.dispose(),this.detune.dispose(),this}}class Rc extends Sc{constructor(){super(xl(Rc.getDefaults(),arguments,["frequency","type"])),this.name="Oscillator",this._oscillator=null;const t=xl(Rc.getDefaults(),arguments,["frequency","type"]);this.frequency=new hc({context:this.context,units:"frequency",value:t.frequency}),Dl(this,"frequency"),this.detune=new hc({context:this.context,units:"cents",value:t.detune}),Dl(this,"detune"),this._partials=t.partials,this._partialCount=t.partialCount,this._type=t.type,t.partialCount&&"custom"!==t.type&&(this._type=this.baseType+t.partialCount.toString()),this.phase=t.phase}static getDefaults(){return Object.assign(Sc.getDefaults(),{detune:0,frequency:440,partialCount:0,partials:[],phase:0,type:"sine"})}_start(t){const e=this.toSeconds(t),i=new Oc({context:this.context,onended:()=>this.onstop(this)});this._oscillator=i,this._wave?this._oscillator.setPeriodicWave(this._wave):this._oscillator.type=this._type,this._oscillator.connect(this.output),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.start(e)}_stop(t){const e=this.toSeconds(t);this._oscillator&&this._oscillator.stop(e)}_restart(t){const e=this.toSeconds(t);return this.log("restart",e),this._oscillator&&this._oscillator.cancelStop(),this._state.cancel(e),this}syncFrequency(){return this.context.transport.syncSignal(this.frequency),this}unsyncFrequency(){return this.context.transport.unsyncSignal(this.frequency),this}_getCachedPeriodicWave(){if("custom"===this._type){return Rc._periodicWaveCache.find((t=>{return t.phase===this._phase&&(e=t.partials,i=this._partials,e.length===i.length&&e.every(((t,e)=>i[e]===t)));var e,i}))}{const t=Rc._periodicWaveCache.find((t=>t.type===this._type&&t.phase===this._phase));return this._partialCount=t?t.partialCount:this._partialCount,t}}get type(){return this._type}set type(t){this._type=t;const e=-1!==["sine","square","sawtooth","triangle"].indexOf(t);if(0===this._phase&&e)this._wave=void 0,this._partialCount=0,null!==this._oscillator&&(this._oscillator.type=t);else{const e=this._getCachedPeriodicWave();if(el(e)){const{partials:t,wave:i}=e;this._wave=i,this._partials=t,null!==this._oscillator&&this._oscillator.setPeriodicWave(this._wave)}else{const[e,i]=this._getRealImaginary(t,this._phase),n=this.context.createPeriodicWave(e,i);this._wave=n,null!==this._oscillator&&this._oscillator.setPeriodicWave(this._wave),Rc._periodicWaveCache.push({imag:i,partialCount:this._partialCount,partials:this._partials,phase:this._phase,real:e,type:this._type,wave:this._wave}),Rc._periodicWaveCache.length>100&&Rc._periodicWaveCache.shift()}}}get baseType(){return this._type.replace(this.partialCount.toString(),"")}set baseType(t){this.partialCount&&"custom"!==this._type&&"custom"!==t?this.type=t+this.partialCount:this.type=t}get partialCount(){return this._partialCount}set partialCount(t){Zu(t,0);let e=this._type;const i=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(this._type);if(i&&(e=i[1]),"custom"!==this._type)this.type=0===t?e:e+t.toString();else{const e=new Float32Array(t);this._partials.forEach(((t,i)=>e[i]=t)),this._partials=Array.from(e),this.type=this._type}}_getRealImaginary(t,e){let i=2048;const n=new Float32Array(i),r=new Float32Array(i);let s=1;if("custom"===t){if(s=this._partials.length+1,this._partialCount=this._partials.length,i=s,0===this._partials.length)return[n,r]}else{const e=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(t);e?(s=parseInt(e[2],10)+1,this._partialCount=parseInt(e[2],10),t=e[1],s=Math.max(s,2),i=s):this._partialCount=0,this._partials=[]}for(let o=1;o<i;++o){const i=2/(o*Math.PI);let a;switch(t){case"sine":a=o<=s?1:0,this._partials[o-1]=a;break;case"square":a=1&o?2*i:0,this._partials[o-1]=a;break;case"sawtooth":a=i*(1&o?1:-1),this._partials[o-1]=a;break;case"triangle":a=1&o?i*i*2*(o-1>>1&1?-1:1):0,this._partials[o-1]=a;break;case"custom":a=this._partials[o-1];break;default:throw new TypeError("Oscillator: invalid type: "+t)}0!==a?(n[o]=-a*Math.sin(e*o),r[o]=a*Math.cos(e*o)):(n[o]=0,r[o]=0)}return[n,r]}_inverseFFT(t,e,i){let n=0;const r=t.length;for(let s=0;s<r;s++)n+=t[s]*Math.cos(s*i)+e[s]*Math.sin(s*i);return n}getInitialValue(){const[t,e]=this._getRealImaginary(this._type,0);let i=0;const n=2*Math.PI;for(let a=0;a<32;a++)i=Math.max(this._inverseFFT(t,e,a/32*n),i);return r=-this._inverseFFT(t,e,this._phase)/i,s=-1,o=1,Math.max(Math.min(r,o),s);var r,s,o}get partials(){return this._partials.slice(0,this.partialCount)}set partials(t){this._partials=t,this._partialCount=this._partials.length,t.length&&(this.type="custom")}get phase(){return this._phase*(180/Math.PI)}set phase(t){this._phase=t*Math.PI/180,this.type=this._type}asArray(t=1024){return ll(this,void 0,void 0,(function*(){return Cc(this,t)}))}dispose(){return super.dispose(),null!==this._oscillator&&this._oscillator.dispose(),this._wave=void 0,this.frequency.dispose(),this.detune.dispose(),this}}Rc._periodicWaveCache=[];class Mc extends ic{constructor(){super(Object.assign(xl(Mc.getDefaults(),arguments,["context"])))}connect(t,e=0,i=0){return uc(this,t,e,i),this}}class Pc extends Mc{constructor(){super(Object.assign(xl(Pc.getDefaults(),arguments,["mapping","length"]))),this.name="WaveShaper",this._shaper=this.context.createWaveShaper(),this.input=this._shaper,this.output=this._shaper;const t=xl(Pc.getDefaults(),arguments,["mapping","length"]);rl(t.mapping)||t.mapping instanceof Float32Array?this.curve=Float32Array.from(t.mapping):"function"==typeof t.mapping&&this.setMap(t.mapping,t.length)}static getDefaults(){return Object.assign(hc.getDefaults(),{length:1024})}setMap(t,e=1024){const i=new Float32Array(e);for(let n=0,r=e;n<r;n++){const e=n/(r-1)*2-1;i[n]=t(e,n)}return this.curve=i,this}get curve(){return this._shaper.curve}set curve(t){this._shaper.curve=t}get oversample(){return this._shaper.oversample}set oversample(t){Ku(["none","2x","4x"].some((e=>e.includes(t))),"oversampling must be either 'none', '2x', or '4x'"),this._shaper.oversample=t}dispose(){return super.dispose(),this._shaper.disconnect(),this}}class Ic extends Mc{constructor(){super(...arguments),this.name="AudioToGain",this._norm=new Pc({context:this.context,mapping:t=>(t+1)/2}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class kc extends hc{constructor(){super(Object.assign(xl(kc.getDefaults(),arguments,["value"]))),this.name="Multiply",this.override=!1;const t=xl(kc.getDefaults(),arguments,["value"]);this._mult=this.input=this.output=new sc({context:this.context,minValue:t.minValue,maxValue:t.maxValue}),this.factor=this._param=this._mult.gain,this.factor.setValueAtTime(t.value,0)}static getDefaults(){return Object.assign(hc.getDefaults(),{value:0})}dispose(){return super.dispose(),this._mult.dispose(),this}}class Lc extends Sc{constructor(){super(xl(Lc.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="AMOscillator",this._modulationScale=new Ic({context:this.context}),this._modulationNode=new sc({context:this.context});const t=xl(Lc.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new Rc({context:this.context,detune:t.detune,frequency:t.frequency,onstop:()=>this.onstop(this),phase:t.phase,type:t.type}),this.frequency=this._carrier.frequency,this.detune=this._carrier.detune,this._modulator=new Rc({context:this.context,phase:t.phase,type:t.modulationType}),this.harmonicity=new kc({context:this.context,units:"positive",value:t.harmonicity}),this.frequency.chain(this.harmonicity,this._modulator.frequency),this._modulator.chain(this._modulationScale,this._modulationNode.gain),this._carrier.chain(this._modulationNode,this.output),Dl(this,["frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(Rc.getDefaults(),{harmonicity:1,modulationType:"square"})}_start(t){this._modulator.start(t),this._carrier.start(t)}_stop(t){this._modulator.stop(t),this._carrier.stop(t)}_restart(t){this._modulator.restart(t),this._carrier.restart(t)}get type(){return this._carrier.type}set type(t){this._carrier.type=t}get baseType(){return this._carrier.baseType}set baseType(t){this._carrier.baseType=t}get partialCount(){return this._carrier.partialCount}set partialCount(t){this._carrier.partialCount=t}get modulationType(){return this._modulator.type}set modulationType(t){this._modulator.type=t}get phase(){return this._carrier.phase}set phase(t){this._carrier.phase=t,this._modulator.phase=t}get partials(){return this._carrier.partials}set partials(t){this._carrier.partials=t}asArray(t=1024){return ll(this,void 0,void 0,(function*(){return Cc(this,t)}))}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this._modulationScale.dispose(),this}}class Dc extends Sc{constructor(){super(xl(Dc.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="FMOscillator",this._modulationNode=new sc({context:this.context,gain:0});const t=xl(Dc.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new Rc({context:this.context,detune:t.detune,frequency:0,onstop:()=>this.onstop(this),phase:t.phase,type:t.type}),this.detune=this._carrier.detune,this.frequency=new hc({context:this.context,units:"frequency",value:t.frequency}),this._modulator=new Rc({context:this.context,phase:t.phase,type:t.modulationType}),this.harmonicity=new kc({context:this.context,units:"positive",value:t.harmonicity}),this.modulationIndex=new kc({context:this.context,units:"positive",value:t.modulationIndex}),this.frequency.connect(this._carrier.frequency),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.frequency.chain(this.modulationIndex,this._modulationNode),this._modulator.connect(this._modulationNode.gain),this._modulationNode.connect(this._carrier.frequency),this._carrier.connect(this.output),this.detune.connect(this._modulator.detune),Dl(this,["modulationIndex","frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(Rc.getDefaults(),{harmonicity:1,modulationIndex:2,modulationType:"square"})}_start(t){this._modulator.start(t),this._carrier.start(t)}_stop(t){this._modulator.stop(t),this._carrier.stop(t)}_restart(t){return this._modulator.restart(t),this._carrier.restart(t),this}get type(){return this._carrier.type}set type(t){this._carrier.type=t}get baseType(){return this._carrier.baseType}set baseType(t){this._carrier.baseType=t}get partialCount(){return this._carrier.partialCount}set partialCount(t){this._carrier.partialCount=t}get modulationType(){return this._modulator.type}set modulationType(t){this._modulator.type=t}get phase(){return this._carrier.phase}set phase(t){this._carrier.phase=t,this._modulator.phase=t}get partials(){return this._carrier.partials}set partials(t){this._carrier.partials=t}asArray(t=1024){return ll(this,void 0,void 0,(function*(){return Cc(this,t)}))}dispose(){return super.dispose(),this.frequency.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this.modulationIndex.dispose(),this}}class Fc extends Sc{constructor(){super(xl(Fc.getDefaults(),arguments,["frequency","width"])),this.name="PulseOscillator",this._widthGate=new sc({context:this.context,gain:0}),this._thresh=new Pc({context:this.context,mapping:t=>t<=0?-1:1});const t=xl(Fc.getDefaults(),arguments,["frequency","width"]);this.width=new hc({context:this.context,units:"audioRange",value:t.width}),this._triangle=new Rc({context:this.context,detune:t.detune,frequency:t.frequency,onstop:()=>this.onstop(this),phase:t.phase,type:"triangle"}),this.frequency=this._triangle.frequency,this.detune=this._triangle.detune,this._triangle.chain(this._thresh,this.output),this.width.chain(this._widthGate,this._thresh),Dl(this,["width","frequency","detune"])}static getDefaults(){return Object.assign(Sc.getDefaults(),{detune:0,frequency:440,phase:0,type:"pulse",width:.2})}_start(t){t=this.toSeconds(t),this._triangle.start(t),this._widthGate.gain.setValueAtTime(1,t)}_stop(t){t=this.toSeconds(t),this._triangle.stop(t),this._widthGate.gain.cancelScheduledValues(t),this._widthGate.gain.setValueAtTime(0,t)}_restart(t){this._triangle.restart(t),this._widthGate.gain.cancelScheduledValues(t),this._widthGate.gain.setValueAtTime(1,t)}get phase(){return this._triangle.phase}set phase(t){this._triangle.phase=t}get type(){return"pulse"}get baseType(){return"pulse"}get partials(){return[]}get partialCount(){return 0}set carrierType(t){this._triangle.type=t}asArray(t=1024){return ll(this,void 0,void 0,(function*(){return Cc(this,t)}))}dispose(){return super.dispose(),this._triangle.dispose(),this.width.dispose(),this._widthGate.dispose(),this._thresh.dispose(),this}}class Nc extends Sc{constructor(){super(xl(Nc.getDefaults(),arguments,["frequency","type","spread"])),this.name="FatOscillator",this._oscillators=[];const t=xl(Nc.getDefaults(),arguments,["frequency","type","spread"]);this.frequency=new hc({context:this.context,units:"frequency",value:t.frequency}),this.detune=new hc({context:this.context,units:"cents",value:t.detune}),this._spread=t.spread,this._type=t.type,this._phase=t.phase,this._partials=t.partials,this._partialCount=t.partialCount,this.count=t.count,Dl(this,["frequency","detune"])}static getDefaults(){return Object.assign(Rc.getDefaults(),{count:3,spread:20,type:"sawtooth"})}
vendor: 5,235 bytes, line 6880
6880_start(t){t=this.toSeconds(t),this._forEach((e=>e.start(t)))}_stop(t){t=this.toSeconds(t),this._forEach((e=>e.stop(t)))}_restart(t){this._forEach((e=>e.restart(t)))}_forEach(t){for(let e=0;e<this._oscillators.length;e++)t(this._oscillators[e],e)}get type(){return this._type}set type(t){this._type=t,this._forEach((e=>e.type=t))}get spread(){return this._spread}set spread(t){if(this._spread=t,this._oscillators.length>1){const e=-t/2,i=t/(this._oscillators.length-1);this._forEach(((t,n)=>t.detune.value=e+i*n))}}get count(){return this._oscillators.length}set count(t){if(Zu(t,1),this._oscillators.length!==t){this._forEach((t=>t.dispose())),this._oscillators=[];for(let e=0;e<t;e++){const i=new Rc({context:this.context,volume:-6-1.1*t,type:this._type,phase:this._phase+e/t*360,partialCount:this._partialCount,onstop:0===e?()=>this.onstop(this):Nl});"custom"===this.type&&(i.partials=this._partials),this.frequency.connect(i.frequency),this.detune.connect(i.detune),i.detune.overridden=!1,i.connect(this.output),this._oscillators[e]=i}this.spread=this._spread,"started"===this.state&&this._forEach((t=>t.start()))}}get phase(){return this._phase}set phase(t){this._phase=t,this._forEach(((t,e)=>t.phase=this._phase+e/this.count*360))}get baseType(){return this._oscillators[0].baseType}set baseType(t){this._forEach((e=>e.baseType=t)),this._type=this._oscillators[0].type}get partials(){return this._oscillators[0].partials}set partials(t){this._partials=t,this._partialCount=this._partials.length,t.length&&(this._type="custom",this._forEach((e=>e.partials=t)))}get partialCount(){return this._oscillators[0].partialCount}set partialCount(t){this._partialCount=t,this._forEach((e=>e.partialCount=t)),this._type=this._oscillators[0].type}asArray(t=1024){return ll(this,void 0,void 0,(function*(){return Cc(this,t)}))}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this._forEach((t=>t.dispose())),this}}class Bc extends Sc{constructor(){super(xl(Bc.getDefaults(),arguments,["frequency","modulationFrequency"])),this.name="PWMOscillator",this.sourceType="pwm",this._scale=new kc({context:this.context,value:2});const t=xl(Bc.getDefaults(),arguments,["frequency","modulationFrequency"]);this._pulse=new Fc({context:this.context,frequency:t.modulationFrequency}),this._pulse.carrierType="sine",this.modulationFrequency=this._pulse.frequency,this._modulator=new Rc({context:this.context,detune:t.detune,frequency:t.frequency,onstop:()=>this.onstop(this),phase:t.phase}),this.frequency=this._modulator.frequency,this.detune=this._modulator.detune,this._modulator.chain(this._scale,this._pulse.width),this._pulse.connect(this.output),Dl(this,["modulationFrequency","frequency","detune"])}static getDefaults(){return Object.assign(Sc.getDefaults(),{detune:0,frequency:440,modulationFrequency:.4,phase:0,type:"pwm"})}_start(t){t=this.toSeconds(t),this._modulator.start(t),this._pulse.start(t)}_stop(t){t=this.toSeconds(t),this._modulator.stop(t),this._pulse.stop(t)}_restart(t){this._modulator.restart(t),this._pulse.restart(t)}get type(){return"pwm"}get baseType(){return"pwm"}get partials(){return[]}get partialCount(){return 0}get phase(){return this._modulator.phase}set phase(t){this._modulator.phase=t}asArray(t=1024){return ll(this,void 0,void 0,(function*(){return Cc(this,t)}))}dispose(){return super.dispose(),this._pulse.dispose(),this._scale.dispose(),this._modulator.dispose(),this}}const Uc={am:Lc,fat:Nc,fm:Dc,oscillator:Rc,pulse:Fc,pwm:Bc};class Vc extends Sc{constructor(){super(xl(Vc.getDefaults(),arguments,["frequency","type"])),this.name="OmniOscillator";const t=xl(Vc.getDefaults(),arguments,["frequency","type"]);this.frequency=new hc({context:this.context,units:"frequency",value:t.frequency}),this.detune=new hc({context:this.context,units:"cents",value:t.detune}),Dl(this,["frequency","detune"]),this.set(t)}static getDefaults(){return Object.assign(Rc.getDefaults(),Dc.getDefaults(),Lc.getDefaults(),Nc.getDefaults(),Fc.getDefaults(),Bc.getDefaults())}_start(t){this._oscillator.start(t)}_stop(t){this._oscillator.stop(t)}_restart(t){return this._oscillator.restart(t),this}get type(){let t="";return["am","fm","fat"].some((t=>this._sourceType===t))&&(t=this._sourceType),t+this._oscillator.type}set type(t){"fm"===t.substr(0,2)?(this._createNewOscillator("fm"),this._oscillator=this._oscillator,this._oscillator.type=t.substr(2)):"am"===t.substr(0,2)?(this._createNewOscillator("am"),this._oscillator=this._oscillator,this._oscillator.type=t.substr(2)):"fat"===t.substr(0,3)?(this._createNewOscillator("fat"),this._oscillator=this._oscillator,this._oscillator.type=t.substr(3)):"pwm"===t?(this._createNewOscillator("pwm"),this._oscillator=this._oscillator):"pulse"===t?this._createNewOscillator("pulse"):(this._createNewOscillator("oscillator"),this._oscillator=this._oscillator,this._oscillator.type=t)}get partials(){return this._oscillator.partials}set partials(t){this._getOscType(this._oscillator,"pulse")||this._getOscType(this._oscillator,"pwm")||(this._oscillator.partials=t)}get partialCount(){return this._oscillator.partialCount}set partialCount(t){this._getOscType(this._oscillator,"pulse")||this._getOscType(this._oscillator,"pwm")||(this._oscillator.partialCount=t)}
vendor: 4,734 bytes, line 6880
6880set(t){return Reflect.has(t,"type")&&t.type&&(this.type=t.type),super.set(t),this}_createNewOscillator(t){if(t!==this._sourceType){this._sourceType=t;const e=Uc[t],i=this.now();if(this._oscillator){const t=this._oscillator;t.stop(i),this.context.setTimeout((()=>t.dispose()),this.blockTime)}this._oscillator=new e({context:this.context}),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.connect(this.output),this._oscillator.onstop=()=>this.onstop(this),"started"===this.state&&this._oscillator.start(i)}}get phase(){return this._oscillator.phase}set phase(t){this._oscillator.phase=t}get sourceType(){return this._sourceType}set sourceType(t){let e="sine";"pwm"!==this._oscillator.type&&"pulse"!==this._oscillator.type&&(e=this._oscillator.type),"fm"===t?this.type="fm"+e:"am"===t?this.type="am"+e:"fat"===t?this.type="fat"+e:"oscillator"===t?this.type=e:"pulse"===t?this.type="pulse":"pwm"===t&&(this.type="pwm")}_getOscType(t,e){return t instanceof Uc[e]}get baseType(){return this._oscillator.baseType}set baseType(t){this._getOscType(this._oscillator,"pulse")||this._getOscType(this._oscillator,"pwm")||"pulse"===t||"pwm"===t||(this._oscillator.baseType=t)}get width(){return this._getOscType(this._oscillator,"pulse")?this._oscillator.width:void 0}get count(){return this._getOscType(this._oscillator,"fat")?this._oscillator.count:void 0}set count(t){this._getOscType(this._oscillator,"fat")&&il(t)&&(this._oscillator.count=t)}get spread(){return this._getOscType(this._oscillator,"fat")?this._oscillator.spread:void 0}set spread(t){this._getOscType(this._oscillator,"fat")&&il(t)&&(this._oscillator.spread=t)}get modulationType(){return this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am")?this._oscillator.modulationType:void 0}set modulationType(t){(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))&&sl(t)&&(this._oscillator.modulationType=t)}get modulationIndex(){return this._getOscType(this._oscillator,"fm")?this._oscillator.modulationIndex:void 0}get harmonicity(){return this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am")?this._oscillator.harmonicity:void 0}get modulationFrequency(){return this._getOscType(this._oscillator,"pwm")?this._oscillator.modulationFrequency:void 0}asArray(t=1024){return ll(this,void 0,void 0,(function*(){return Cc(this,t)}))}dispose(){return super.dispose(),this.detune.dispose(),this.frequency.dispose(),this._oscillator.dispose(),this}}function Yc(t,e=1/0){const i=new WeakMap;return function(n,r){Reflect.defineProperty(n,r,{configurable:!0,enumerable:!0,get:function(){return i.get(this)},set:function(n){Zu(n,t,e),i.set(this,n)}})}}function zc(t,e=1/0){const i=new WeakMap;return function(n,r){Reflect.defineProperty(n,r,{configurable:!0,enumerable:!0,get:function(){return i.get(this)},set:function(n){Zu(this.toSeconds(n),t,e),i.set(this,n)}})}}class Xc extends Sc{constructor(){super(xl(Xc.getDefaults(),arguments,["url","onload"])),this.name="Player",this._activeSources=new Set;const t=xl(Xc.getDefaults(),arguments,["url","onload"]);this._buffer=new Bl({onload:this._onload.bind(this,t.onload),onerror:t.onerror,reverse:t.reverse,url:t.url}),this.autostart=t.autostart,this._loop=t.loop,this._loopStart=t.loopStart,this._loopEnd=t.loopEnd,this._playbackRate=t.playbackRate,this.fadeIn=t.fadeIn,this.fadeOut=t.fadeOut}static getDefaults(){return Object.assign(Sc.getDefaults(),{autostart:!1,fadeIn:0,fadeOut:0,loop:!1,loopEnd:0,loopStart:0,onload:Nl,onerror:Nl,playbackRate:1,reverse:!1})}load(t){return ll(this,void 0,void 0,(function*(){return yield this._buffer.load(t),this._onload(),this}))}_onload(t=Nl){t(),this.autostart&&this.start()}_onSourceEnd(t){this.onstop(this),this._activeSources.delete(t),0!==this._activeSources.size||this._synced||"started"!==this._state.getValueAtTime(this.now())||(this._state.cancel(this.now()),this._state.setStateAtTime("stopped",this.now()))}start(t,e,i){return super.start(t,e,i),this}_start(t,e,i){e=this._loop?wl(e,this._loopStart):wl(e,0);const n=this.toSeconds(e),r=i;i=wl(i,Math.max(this._buffer.duration-n,0));let s=this.toSeconds(i);s/=this._playbackRate,t=this.toSeconds(t);const o=new Ac({url:this._buffer,context:this.context,fadeIn:this.fadeIn,fadeOut:this.fadeOut,loop:this._loop,loopEnd:this._loopEnd,loopStart:this._loopStart,onended:this._onSourceEnd.bind(this),playbackRate:this._playbackRate}).connect(this.output);this._loop||this._synced||(this._state.cancel(t+s),this._state.setStateAtTime("stopped",t+s,{implicitEnd:!0})),this._activeSources.add(o),this._loop&&tl(r)?o.start(t,n):o.start(t,n,s-this.toSeconds(this.fadeOut))}_stop(t){const e=this.toSeconds(t);
vendor: 6,127 bytes, line 6880
6880this._activeSources.forEach((t=>t.stop(e)))}restart(t,e,i){return super.restart(t,e,i),this}_restart(t,e,i){this._stop(t),this._start(t,e,i)}seek(t,e){const i=this.toSeconds(e);if("started"===this._state.getValueAtTime(i)){const e=this.toSeconds(t);this._stop(i),this._start(i,e)}return this}setLoopPoints(t,e){return this.loopStart=t,this.loopEnd=e,this}get loopStart(){return this._loopStart}set loopStart(t){this._loopStart=t,this.buffer.loaded&&Zu(this.toSeconds(t),0,this.buffer.duration),this._activeSources.forEach((e=>{e.loopStart=t}))}get loopEnd(){return this._loopEnd}set loopEnd(t){this._loopEnd=t,this.buffer.loaded&&Zu(this.toSeconds(t),0,this.buffer.duration),this._activeSources.forEach((e=>{e.loopEnd=t}))}get buffer(){return this._buffer}set buffer(t){this._buffer.set(t)}get loop(){return this._loop}set loop(t){if(this._loop!==t&&(this._loop=t,this._activeSources.forEach((e=>{e.loop=t})),t)){const t=this._state.getNextState("stopped",this.now());t&&this._state.cancel(t.time)}}get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate=t;const e=this.now(),i=this._state.getNextState("stopped",e);i&&i.implicitEnd&&(this._state.cancel(i.time),this._activeSources.forEach((t=>t.cancelStop()))),this._activeSources.forEach((i=>{i.playbackRate.setValueAtTime(t,e)}))}get reverse(){return this._buffer.reverse}set reverse(t){this._buffer.reverse=t}get loaded(){return this._buffer.loaded}dispose(){return super.dispose(),this._activeSources.forEach((t=>t.dispose())),this._activeSources.clear(),this._buffer.dispose(),this}}ul([zc(0)],Xc.prototype,"fadeIn",void 0),ul([zc(0)],Xc.prototype,"fadeOut",void 0);class Gc extends ic{constructor(){super(xl(Gc.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="Envelope",this._sig=new hc({context:this.context,value:0}),this.output=this._sig,this.input=void 0;const t=xl(Gc.getDefaults(),arguments,["attack","decay","sustain","release"]);this.attack=t.attack,this.decay=t.decay,this.sustain=t.sustain,this.release=t.release,this.attackCurve=t.attackCurve,this.releaseCurve=t.releaseCurve,this.decayCurve=t.decayCurve}static getDefaults(){return Object.assign(ic.getDefaults(),{attack:.01,attackCurve:"linear",decay:.1,decayCurve:"exponential",release:1,releaseCurve:"exponential",sustain:.5})}get value(){return this.getValueAtTime(this.now())}_getCurve(t,e){if(sl(t))return t;{let i;for(i in Wc)if(Wc[i][e]===t)return i;return t}}_setCurve(t,e,i){if(sl(i)&&Reflect.has(Wc,i)){const n=Wc[i];nl(n)?"_decayCurve"!==t&&(this[t]=n[e]):this[t]=n}else{if(!rl(i)||"_decayCurve"===t)throw new Error("Envelope: invalid curve: "+i);this[t]=i}}get attackCurve(){return this._getCurve(this._attackCurve,"In")}set attackCurve(t){this._setCurve("_attackCurve","In",t)}get releaseCurve(){return this._getCurve(this._releaseCurve,"Out")}set releaseCurve(t){this._setCurve("_releaseCurve","Out",t)}get decayCurve(){return this._decayCurve}set decayCurve(t){Ku(["linear","exponential"].some((e=>e===t)),`Invalid envelope curve: ${t}`),this._decayCurve=t}triggerAttack(t,e=1){this.log("triggerAttack",t,e),t=this.toSeconds(t);let i=this.toSeconds(this.attack);const n=this.toSeconds(this.decay),r=this.getValueAtTime(t);if(r>0){i=(1-r)/(1/i)}if(i<this.sampleTime)this._sig.cancelScheduledValues(t),this._sig.setValueAtTime(e,t);else if("linear"===this._attackCurve)this._sig.linearRampTo(e,i,t);else if("exponential"===this._attackCurve)this._sig.targetRampTo(e,i,t);else{this._sig.cancelAndHoldAtTime(t);let n=this._attackCurve;for(let t=1;t<n.length;t++)if(n[t-1]<=r&&r<=n[t]){n=this._attackCurve.slice(t),n[0]=r;break}this._sig.setValueCurveAtTime(n,t,i,e)}if(n&&this.sustain<1){const r=e*this.sustain,s=t+i;this.log("decay",s),"linear"===this._decayCurve?this._sig.linearRampToValueAtTime(r,n+s):this._sig.exponentialApproachValueAtTime(r,s,n)}return this}triggerRelease(t){this.log("triggerRelease",t),t=this.toSeconds(t);const e=this.getValueAtTime(t);if(e>0){const i=this.toSeconds(this.release);i<this.sampleTime?this._sig.setValueAtTime(0,t):"linear"===this._releaseCurve?this._sig.linearRampTo(0,i,t):"exponential"===this._releaseCurve?this._sig.targetRampTo(0,i,t):(Ku(rl(this._releaseCurve),"releaseCurve must be either 'linear', 'exponential' or an array"),this._sig.cancelAndHoldAtTime(t),this._sig.setValueCurveAtTime(this._releaseCurve,t,i,e))}return this}getValueAtTime(t){return this._sig.getValueAtTime(t)}triggerAttackRelease(t,e,i=1){return e=this.toSeconds(e),this.triggerAttack(e,i),this.triggerRelease(e+this.toSeconds(t)),this}cancel(t){return this._sig.cancelScheduledValues(this.toSeconds(t)),this}connect(t,e=0,i=0){return uc(this,t,e,i),this}asArray(t=1024){return ll(this,void 0,void 0,(function*(){const e=t/this.context.sampleRate,i=new Ul(1,e,this.context.sampleRate),n=this.toSeconds(this.attack)+this.toSeconds(this.decay),r=n+this.toSeconds(this.release),s=.1*r,o=r+s,a=new this.constructor(Object.assign(this.get(),{attack:e*this.toSeconds(this.attack)/o,decay:e*this.toSeconds(this.decay)/o,release:e*this.toSeconds(this.release)/o,context:i}));a._sig.toDestination(),a.triggerAttackRelease(e*(n+s)/o,0);return(yield i.render()).getChannelData(0)}))}dispose(){return super.dispose(),this._sig.dispose(),this}}ul([zc(0)],Gc.prototype,"attack",void 0),ul([zc(0)],Gc.prototype,"decay",void 0),ul([Yc(0,1)],Gc.prototype,"sustain",void 0),ul([zc(0)],Gc.prototype,"release",void 0);const Wc=(()=>{const t=128;let e,i;const n=[];for(e=0;e<t;e++)n[e]=Math.sin(e/127*(Math.PI/2));const r=[];for(e=0;e<127;e++){i=e/127;const t=Math.sin(i*(2*Math.PI)*6.4-Math.PI/2)+1;r[e]=t/10+.83*i}r[127]=1;const s=[];for(e=0;e<t;e++)s[e]=Math.ceil(e/127*5)/5;const o=[];for(e=0;e<t;e++)i=e/127,o[e]=.5*(1-Math.cos(Math.PI*i));const a=[];for(e=0;e<t;e++){i=e/127;const t=4*Math.pow(i,3)+.2,n=Math.cos(t*Math.PI*2*i);a[e]=Math.abs(n*(1-i))}function h(t){const e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=1-t[i];return e}return{bounce:{In:h(a),Out:a},cosine:{In:n,Out:(u=n,u.slice(0).reverse())},exponential:"exponential",linear:"linear",ripple:{In:r,Out:h(r)},sine:{In:o,Out:h(o)},step:{In:s,Out:h(s)}};var u})();
vendor: 8,013 bytes, line 6880
6880class jc extends ic{constructor(){super(xl(jc.getDefaults(),arguments)),this._scheduledEvents=[],this._synced=!1,this._original_triggerAttack=this.triggerAttack,this._original_triggerRelease=this.triggerRelease;const t=xl(jc.getDefaults(),arguments);this._volume=this.output=new xc({context:this.context,volume:t.volume}),this.volume=this._volume.volume,Dl(this,"volume")}static getDefaults(){return Object.assign(ic.getDefaults(),{volume:0})}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",0)),this}_syncState(){let t=!1;return this._synced||(this._synced=!0,t=!0),t}_syncMethod(t,e){const i=this["_original_"+t]=this[t];this[t]=(...t)=>{const n=t[e],r=this.context.transport.schedule((n=>{t[e]=n,i.apply(this,t)}),n);this._scheduledEvents.push(r)}}unsync(){return this._scheduledEvents.forEach((t=>this.context.transport.clear(t))),this._scheduledEvents=[],this._synced&&(this._synced=!1,this.triggerAttack=this._original_triggerAttack,this.triggerRelease=this._original_triggerRelease),this}triggerAttackRelease(t,e,i,n){const r=this.toSeconds(i),s=this.toSeconds(e);return this.triggerAttack(t,r,n),this.triggerRelease(r+s),this}dispose(){return super.dispose(),this._volume.dispose(),this.unsync(),this._scheduledEvents=[],this}}class Hc extends jc{constructor(){super(xl(Hc.getDefaults(),arguments));const t=xl(Hc.getDefaults(),arguments);this.portamento=t.portamento,this.onsilence=t.onsilence}static getDefaults(){return Object.assign(jc.getDefaults(),{detune:0,onsilence:Nl,portamento:0})}triggerAttack(t,e,i=1){this.log("triggerAttack",t,e,i);const n=this.toSeconds(e);return this._triggerEnvelopeAttack(n,i),this.setNote(t,n),this}triggerRelease(t){this.log("triggerRelease",t);const e=this.toSeconds(t);return this._triggerEnvelopeRelease(e),this}setNote(t,e){const i=this.toSeconds(e),n=t instanceof Kl?t.toFrequency():t;if(this.portamento>0&&this.getLevelAtTime(i)>.05){const t=this.toSeconds(this.portamento);this.frequency.exponentialRampTo(n,t,i)}else this.frequency.setValueAtTime(n,i);return this}}ul([zc(0)],Hc.prototype,"portamento",void 0);class qc extends Gc{constructor(){super(xl(qc.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="AmplitudeEnvelope",this._gainNode=new sc({context:this.context,gain:0}),this.output=this._gainNode,this.input=this._gainNode,this._sig.connect(this._gainNode.gain),this.output=this._gainNode,this.input=this._gainNode}dispose(){return super.dispose(),this._gainNode.dispose(),this}}class Kc extends Hc{constructor(){super(xl(Kc.getDefaults(),arguments)),this.name="Synth";const t=xl(Kc.getDefaults(),arguments);this.oscillator=new Vc(Object.assign({context:this.context,detune:t.detune,onstop:()=>this.onsilence(this)},t.oscillator)),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.envelope=new qc(Object.assign({context:this.context},t.envelope)),this.oscillator.chain(this.envelope,this.output),Dl(this,["oscillator","frequency","detune","envelope"])}static getDefaults(){return Object.assign(Hc.getDefaults(),{envelope:Object.assign(_l(Gc.getDefaults(),Object.keys(ic.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.3}),oscillator:Object.assign(_l(Vc.getDefaults(),[...Object.keys(Sc.getDefaults()),"frequency","detune"]),{type:"triangle"})})}_triggerEnvelopeAttack(t,e){if(this.envelope.triggerAttack(t,e),this.oscillator.start(t),0===this.envelope.sustain){const e=this.toSeconds(this.envelope.attack),i=this.toSeconds(this.envelope.decay);this.oscillator.stop(t+e+i)}}_triggerEnvelopeRelease(t){this.envelope.triggerRelease(t),this.oscillator.stop(t+this.toSeconds(this.envelope.release))}getLevelAtTime(t){return t=this.toSeconds(t),this.envelope.getValueAtTime(t)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this}}class Zc extends Kc{constructor(){super(xl(Zc.getDefaults(),arguments)),this.name="MembraneSynth",this.portamento=0;const t=xl(Zc.getDefaults(),arguments);this.pitchDecay=t.pitchDecay,this.octaves=t.octaves,Dl(this,["oscillator","envelope"])}static getDefaults(){return yl(Hc.getDefaults(),Kc.getDefaults(),{envelope:{attack:.001,attackCurve:"exponential",decay:.4,release:1.4,sustain:.01},octaves:10,oscillator:{type:"sine"},pitchDecay:.05})}setNote(t,e){const i=this.toSeconds(e),n=this.toFrequency(t instanceof Kl?t.toFrequency():t),r=n*this.octaves;return this.oscillator.frequency.setValueAtTime(r,i),this.oscillator.frequency.exponentialRampToValueAtTime(n,i+this.toSeconds(this.pitchDecay)),this}dispose(){return super.dispose(),this}}ul([Yc(0)],Zc.prototype,"octaves",void 0),ul([zc(0)],Zc.prototype,"pitchDecay",void 0);const Qc=new Set;function Jc(t){Qc.add(t)}function $c(t,e){const i=`registerProcessor("${t}", ${e})`;Qc.add(i)}Jc('\n\t/**\n\t * The base AudioWorkletProcessor for use in Tone.js. Works with the [[ToneAudioWorklet]]. \n\t */\n\tclass ToneAudioWorkletProcessor extends AudioWorkletProcessor {\n\n\t\tconstructor(options) {\n\t\t\t\n\t\t\tsuper(options);\n\t\t\t/**\n\t\t\t * If the processor was disposed or not. Keep alive until it\'s disposed.\n\t\t\t */\n\t\t\tthis.disposed = false;\n\t\t \t/** \n\t\t\t * The number of samples in the processing block\n\t\t\t */\n\t\t\tthis.blockSize = 128;\n\t\t\t/**\n\t\t\t * the sample rate\n\t\t\t */\n\t\t\tthis.sampleRate = sampleRate;\n\n\t\t\tthis.port.onmessage = (event) => {\n\t\t\t\t// when it receives a dispose \n\t\t\t\tif (event.data === "dispose") {\n\t\t\t\t\tthis.disposed = true;\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t}\n');Jc("\n\t/**\n\t * Abstract class for a single input/output processor. \n\t * has a 'generate' function which processes one sample at a time\n\t */\n\tclass SingleIOProcessor extends ToneAudioWorkletProcessor {\n\n\t\tconstructor(options) {\n\t\t\tsuper(Object.assign(options, {\n\t\t\t\tnumberOfInputs: 1,\n\t\t\t\tnumberOfOutputs: 1\n\t\t\t}));\n\t\t\t/**\n\t\t\t * Holds the name of the parameter and a single value of that\n\t\t\t * parameter at the current sample\n\t\t\t * @type { [name: string]: number }\n\t\t\t */\n\t\t\tthis.params = {}\n\t\t}\n\n\t\t/**\n\t\t * Generate an output sample from the input sample and parameters\n\t\t * @abstract\n\t\t * @param input number\n\t\t * @param channel number\n\t\t * @param parameters { [name: string]: number }\n\t\t * @returns number\n\t\t */\n\t\tgenerate(){}\n\n\t\t/**\n\t\t * Update the private params object with the \n\t\t * values of the parameters at the given index\n\t\t * @param parameters { [name: string]: Float32Array },\n\t\t * @param index number\n\t\t */\n\t\tupdateParams(parameters, index) {\n\t\t\tfor (const paramName in parameters) {\n\t\t\t\tconst param = parameters[paramName];\n\t\t\t\tif (param.length > 1) {\n\t\t\t\t\tthis.params[paramName] = parameters[paramName][index];\n\t\t\t\t} else {\n\t\t\t\t\tthis.params[paramName] = parameters[paramName][0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Process a single frame of the audio\n\t\t * @param inputs Float32Array[][]\n\t\t * @param outputs Float32Array[][]\n\t\t */\n\t\tprocess(inputs, outputs, parameters) {\n\t\t\tconst input = inputs[0];\n\t\t\tconst output = outputs[0];\n\t\t\t// get the parameter values\n\t\t\tconst channelCount = Math.max(input && input.length || 0, output.length);\n\t\t\tfor (let sample = 0; sample < this.blockSize; sample++) {\n\t\t\t\tthis.updateParams(parameters, sample);\n\t\t\t\tfor (let channel = 0; channel < channelCount; channel++) {\n\t\t\t\t\tconst inputSample = input && input.length ? input[channel][sample] : 0;\n\t\t\t\t\toutput[channel][sample] = this.generate(inputSample, channel, this.params);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn !this.disposed;\n\t\t}\n\t};\n");Jc("\n\t/**\n\t * A multichannel buffer for use within an AudioWorkletProcessor as a delay line\n\t */\n\tclass DelayLine {\n\t\t\n\t\tconstructor(size, channels) {\n\t\t\tthis.buffer = [];\n\t\t\tthis.writeHead = []\n\t\t\tthis.size = size;\n\n\t\t\t// create the empty channels\n\t\t\tfor (let i = 0; i < channels;
6880 i++) {\n\t\t\t\tthis.buffer[i] = new Float32Array(this.size);\n\t\t\t\tthis.writeHead[i] = 0;\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Push a value onto the end\n\t\t * @param channel number\n\t\t * @param value number\n\t\t */\n\t\tpush(channel, value) {\n\t\t\tthis.writeHead[channel] += 1;\n\t\t\tif (this.writeHead[channel] > this.size) {\n\t\t\t\tthis.writeHead[channel] = 0;\n\t\t\t}\n\t\t\tthis.buffer[channel][this.writeHead[channel]] = value;\n\t\t}\n\n\t\t/**\n\t\t * Get the recorded value of the channel given the delay\n\t\t * @param channel number\n\t\t * @param delay number delay samples\n\t\t */\n\t\tget(channel, delay) {\n\t\t\tlet readHead = this.writeHead[channel] - Math.floor(delay);\n\t\t\tif (readHead < 0) {\n\t\t\t\treadHead += this.size;\n\t\t\t}\n\t\t\treturn this.buffer[channel][readHead];\n\t\t}\n\t}\n");$c("feedback-comb-filter",'\n\tclass FeedbackCombFilterWorklet extends SingleIOProcessor {\n\n\t\tconstructor(options) {\n\t\t\tsuper(options);\n\t\t\tthis.delayLine = new DelayLine(this.sampleRate, options.channelCount || 2);\n\t\t}\n\n\t\tstatic get parameterDescriptors() {\n\t\t\treturn [{\n\t\t\t\tname: "delayTime",\n\t\t\t\tdefaultValue: 0.1,\n\t\t\t\tminValue: 0,\n\t\t\t\tmaxValue: 1,\n\t\t\t\tautomationRate: "k-rate"\n\t\t\t}, {\n\t\t\t\tname: "feedback",\n\t\t\t\tdefaultValue: 0.5,\n\t\t\t\tminValue: 0,\n\t\t\t\tmaxValue: 0.9999,\n\t\t\t\tautomationRate: "k-rate"\n\t\t\t}];\n\t\t}\n\n\t\tgenerate(input, channel, parameters) {\n\t\t\tconst delayedSample = this.delayLine.get(channel, parameters.delayTime * this.sampleRate);\n\t\t\tthis.delayLine.push(channel, input + delayedSample * parameters.feedback);\n\t\t\treturn delayedSample;\n\t\t}\n\t}\n');class tf extends jc{constructor(){super(xl(tf.getDefaults(),arguments,["urls","onload","baseUrl"],"urls")),this.name="Sampler",this._activeSources=new Map;const t=xl(tf.getDefaults(),arguments,["urls","onload","baseUrl"],"urls"),e={};Object.keys(t.urls).forEach((i=>{const n=parseInt(i,10);if(Ku(ol(i)||il(n)&&isFinite(n),`url key is neither a note or midi pitch: ${i}`),ol(i)){const n=new Kl(this.context,i).toMidi();e[n]=t.urls[i]}else il(n)&&isFinite(n)&&(e[n]=t.urls[n])})),this._buffers=new pc({urls:e,onload:t.onload,baseUrl:t.baseUrl,onerror:t.onerror}),this.attack=t.attack,this.release=t.release,this.curve=t.curve,this._buffers.loaded&&Promise.resolve().then(t.onload)}static getDefaults(){return Object.assign(jc.getDefaults(),{attack:0,baseUrl:"",curve:"exponential",onload:Nl,onerror:Nl,release:.1,urls:{}})}_findClosest(t){let e=0;for(;e<96;){if(this._buffers.has(t+e))return-e;if(this._buffers.has(t-e))return e;e++}throw new Error(`No available buffers for note: ${t}`)}triggerAttack(t,e,i=1){return this.log("triggerAttack",t,e,i),Array.isArray(t)||(t=[t]),t.forEach((t=>{const n=jl(new Kl(this.context,t).toFrequency()),r=Math.round(n),s=n-r,o=this._findClosest(r),a=r-o,h=this._buffers.get(a),u=Xl(o+s),l=new Ac({url:h,context:this.context,curve:this.curve,fadeIn:this.attack,fadeOut:this.release,playbackRate:u}).connect(this.output);l.start(e,0,h.duration/u,i),rl(this._activeSources.get(r))||this._activeSources.set(r,[]),this._activeSources.get(r).push(l),l.onended=()=>{if(this._activeSources&&this._activeSources.has(r)){const t=this._activeSources.get(r),e=t.indexOf(l);-1!==e&&t.splice(e,1)}}})),this}triggerRelease(t,e){return this.log("triggerRelease",t,e),Array.isArray(t)||(t=[t]),t.forEach((t=>{const i=new Kl(this.context,t).toMidi();if(this._activeSources.has(i)&&this._activeSources.get(i).length){const t=this._activeSources.get(i);e=this.toSeconds(e),t.forEach((t=>{t.stop(e)})),this._activeSources.set(i,[])}})),this}releaseAll(t){const e=this.toSeconds(t);return this._activeSources.forEach((t=>{for(;t.length;){t.shift().stop(e)}})),this}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",1)),this}triggerAttackRelease(t,e,i,n=1){const r=this.toSeconds(i);return this.triggerAttack(t,r,n),rl(e)?(Ku(rl(t),"notes must be an array when duration is array"),t.forEach(((t,i)=>{const n=e[Math.min(i,e.length-1)];this.triggerRelease(t,r+this.toSeconds(n))}))):this.triggerRelease(t,r+this.toSeconds(e)),this}add(t,e,i){if(Ku(ol(t)||isFinite(t),`note must be a pitch or midi: ${t}`),ol(t)){const n=new Kl(this.context,t).toMidi();this._buffers.add(n,e,i)}else this._buffers.add(t,e,i);return this}get loaded(){return this._buffers.loaded}dispose(){return super.dispose(),this._buffers.dispose(),this._activeSources.forEac
6880h((t=>{t.forEach((t=>t.dispose()))})),this._activeSources.clear(),this}}ul([zc(0)],tf.prototype,"attack",void 0),ul([zc(0)],tf.prototype,"release",void 0);$c("bit-crusher","\n\tclass BitCrusherWorklet extends SingleIOProcessor {\n\n\t\tstatic get parameterDescriptors() {\n\t\t\treturn [{\n\t\t\t\tname: \"bits\",\n\t\t\t\tdefaultValue: 12,\n\t\t\t\tminValue: 1,\n\t\t\t\tmaxValue: 16,\n\t\t\t\tautomationRate: 'k-rate'\n\t\t\t}];\n\t\t}\n\n\t\tgenerate(input, _channel, parameters) {\n\t\t\tconst step = Math.pow(0.5, parameters.bits - 1);\n\t\t\tconst val = step * Math.floor(input / step + 0.5);\n\t\t\treturn val;\n\t\t}\n\t}\n");class ef extends ic{constructor(){super(...arguments),this.name="Listener",this.positionX=new ec({context:this.context,param:this.context.rawContext.listener.positionX}),this.positionY=new ec({context:this.context,param:this.context.rawContext.listener.positionY}),this.positionZ=new ec({context:this.context,param:this.context.rawContext.listener.positionZ}),this.forwardX=new ec({context:this.context,param:this.context.rawContext.listener.forwardX}),this.forwardY=new ec({context:this.context,param:this.context.rawContext.listener.forwardY}),this.forwardZ=new ec({context:this.context,param:this.context.rawContext.listener.forwardZ}),this.upX=new ec({context:this.context,param:this.context.rawContext.listener.upX}),this.upY=new ec({context:this.context,param:this.context.rawContext.listener.upY}),this.upZ=new ec({context:this.context,param:this.context.rawContext.listener.upZ})}static getDefaults(){return Object.assign(ic.getDefaults(),{positionX:0,positionY:0,positionZ:0,forwardX:0,forwardY:0,forwardZ:-1,upX:0,upY:1,upZ:0})}dispose(){return super.dispose(),this.positionX.dispose(),this.positionY.dispose(),this.positionZ.dispose(),this.forwardX.dispose(),this.forwardY.dispose(),this.forwardZ.dispose(),this.upX.dispose(),this.upY.dispose(),this.upZ.dispose(),this}}function nf(){return zl().now()}Rl((t=>{t.listener=new ef({context:t})})),Pl((t=>{t.listener.dispose()})),zl().transport,zl().destination,zl().destination,zl().listener,zl().draw,zl(); 6881/*! ***************************************************************************** 6882Copyright (c) Microsoft Corporation. 6883 6884Permission to use, copy, modify, and/or distribute this software for any 6885purpose with or without fee is hereby granted. 6886 6887THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 6888REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 6889AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 6890INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 6891LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 6892OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 6893PERFORMANCE OF THIS SOFTWARE. 6894***************************************************************************** */ 6895var rf=function(t,e){return(rf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function sf(t,e){function i(){this.constructor=t}rf(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var of=function(){return(of=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function af(t,e,i,n){return new(i||(i=Promise))((function(r,s){function o(t){try{h(n.next(t))}catch(lC){s(lC)}}function a(t){try{h(n.throw(t))}catch(lC){s(lC)}}function h(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}h((n=n.apply(t,e||[])).next())}))}function hf(t,e){var i,n,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(lC){s=[6,lC],n=0}finally{i=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function uf(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,s=i.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(a){r={error:a}}finally{try{n&&!n.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}function lf(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(uf(arguments[e]));return t}function cf(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),r=0;for(e=0;e<i;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,r++)n[r]=s[o];return n} 6896/** 6897 * @license 6898 * Copyright 2017 Google LLC 6899 * 6900 * Licensed under the Apache License, Version 2.0 (the "License");
6901 * you may not use this file except in compliance with the License. 6902 * You may obtain a copy of the License at 6903 * 6904 * http://www.apache.org/licenses/LICENSE-2.0 6905 * 6906 * Unless required by applicable law or agreed to in writing, software 6907 * distributed under the License is distributed on an "AS IS" BASIS, 6908 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6909 * See the License for the specific language governing permissions and 6910 * limitations under the License. 6911 */function ff(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:return new Date(e.getTime());case Object:void 0===t&&(t={});break;case Array:t=[];break;default:return e}for(var i in e)e.hasOwnProperty(i)&&"__proto__"!==i&&(t[i]=ff(t[i],e[i]));return t} 6912/** 6913 * @license 6914 * Copyright 2017 Google LLC 6915 * 6916 * Licensed under the Apache License, Version 2.0 (the "License"); 6917 * you may not use this file except in compliance with the License. 6918 * You may obtain a copy of the License at 6919 * 6920 * http://www.apache.org/licenses/LICENSE-2.0 6921 * 6922 * Unless required by applicable law or agreed to in writing, software 6923 * distributed under the License is distributed on an "AS IS" BASIS, 6924 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6925 * See the License for the specific language governing permissions and 6926 * limitations under the License. 6927 */ 6928var df=function(){function t(){var t=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(e,i){t.resolve=e,t.reject=i}))}return t.prototype.wrapCallback=function(t){var e=this;return function(i,n){i?e.reject(i):e.resolve(n),"function"==typeof t&&(e.promise.catch((function(){})),1===t.length?t(i):t(i,n))}},t}(); 6929/** 6930 * @license 6931 * Copyright 2017 Google LLC 6932 * 6933 * Licensed under the Apache License, Version 2.0 (the "License"); 6934 * you may not use this file except in compliance with the License. 6935 * You may obtain a copy of the License at 6936 * 6937 * http://www.apache.org/licenses/LICENSE-2.0 6938 * 6939 * Unless required by applicable law or agreed to in writing, software 6940 * distributed under the License is distributed on an "AS IS" BASIS, 6941 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6942 * See the License for the specific language governing permissions and 6943 * limitations under the License. 6944 */function pf(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function vf(){try{return"[object process]"===Object.prototype.toString.call(global.process)}catch(lC){return!1}} 6945/** 6946 * @license 6947 * Copyright 2017 Google LLC 6948 * 6949 * Licensed under the Apache License, Version 2.0 (the "License"); 6950 * you may not use this file except in compliance with the License. 6951 * You may obtain a copy of the License at 6952 * 6953 * http://www.apache.org/licenses/LICENSE-2.0 6954 * 6955 * Unless required by applicable law or agreed to in writing, software 6956 * distributed under the License is distributed on an "AS IS" BASIS, 6957 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6958 * See the License for the specific language governing permissions and 6959 * limitations under the License. 6960 */ 6961var gf=function(t){function e(i,n,r){var s=t.call(this,n)||this;return s.code=i,s.customData=r,s.name="FirebaseError",Object.setPrototypeOf(s,e.prototype),Error.captureStackTrace&&Error.captureStackTrace(s,mf.prototype.create),s}return sf(e,t),e}(Error),mf=function(){function t(t,e,i){this.service=t,this.serviceName=e,this.errors=i}return t.prototype.create=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var n=e[0]||{},r=this.service+"/"+t,s=this.errors[t],o=s?yf(s,n):"Error",a=this.serviceName+": "+o+" ("+r+").",h=new gf(r,a,n);return h},t}();function yf(t,e){return t.replace(xf,(function(t,i){var n=e[i];return null!=n?String(n):"<"+i+"?>"}))}var xf=/\{\$([^}]+)}/g; 6962/** 6963 * @license 6964 * Copyright 2017 Google LLC 6965 * 6966 * Licensed under the Apache License, Version 2.0 (the "License"); 6967 * you may not use this file except in compliance with the License. 6968 * You may obtain a copy of the License at 6969 * 6970 * http://www.apache.org/licenses/LICENSE-2.0 6971 * 6972 * Unless required by applicable law or agreed to in writing, softw
6972are 6973 * distributed under the License is distributed on an "AS IS" BASIS, 6974 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6975 * See the License for the specific language governing permissions and 6976 * limitations under the License. 6977 */function wf(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function _f(t,e){var i=new bf(t,e);return i.subscribe.bind(i)}var bf=function(){function t(t,e){var i=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then((function(){t(i)})).catch((function(t){i.error(t)}))}return t.prototype.next=function(t){this.forEachObserver((function(e){e.next(t)}))},t.prototype.error=function(t){this.forEachObserver((function(e){e.error(t)})),this.close(t)},t.prototype.complete=function(){this.forEachObserver((function(t){t.complete()})),this.close()},t.prototype.subscribe=function(t,e,i){var n,r=this;if(void 0===t&&void 0===e&&void 0===i)throw new Error("Missing Observer.");void 0===(n=function(t,e){if("object"!=typeof t||null===t)return!1;for(var i=0,n=e;i<n.length;i++){var r=n[i];if(r in t&&"function"==typeof t[r])return!0}return!1}(t,["next","error","complete"])?t:{next:t,error:e,complete:i}).next&&(n.next=Tf),void 0===n.error&&(n.error=Tf),void 0===n.complete&&(n.complete=Tf);var s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((function(){try{r.finalError?n.error(r.finalError):n.complete()}catch(lC){}})),this.observers.push(n),s},t.prototype.unsubscribeOne=function(t){void 0!==this.observers&&void 0!==this.observers[t]&&(delete this.observers[t],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},t.prototype.forEachObserver=function(t){if(!this.finalized)for(var e=0;e<this.observers.length;e++)this.sendOne(e,t)},t.prototype.sendOne=function(t,e){var i=this;this.task.then((function(){if(void 0!==i.observers&&void 0!==i.observers[t])try{e(i.observers[t])}catch(lC){"undefined"!=typeof console&&console.error&&console.error(lC)}}))},t.prototype.close=function(t){var e=this;this.finalized||(this.finalized=!0,void 0!==t&&(this.finalError=t),this.task.then((function(){e.observers=void 0,e.onNoObservers=void 0})))},t}();function Tf(){}var Ef=function(){function t(t,e,i){this.name=t,this.instanceFactory=e,this.type=i,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY"}return t.prototype.setInstantiationMode=function(t){return this.instantiationMode=t,this},t.prototype.setMultipleInstances=function(t){return this.multipleInstances=t,this},t.prototype.setServiceProps=function(t){return this.serviceProps=t,this},t}(),Sf=function(){function t(t,e){this.name=t,this.container=e,this.component=null,this.instances=new Map,this.instancesDeferred=new Map}return t.prototype.get=function(t){void 0===t&&(t="[DEFAULT]");var e=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(e)){var i=new df;this.instancesDeferred.set(e,i);try{var n=this.getOrInitializeService(e);n&&i.resolve(n)}catch(lC){}}return this.instancesDeferred.get(e).promise},t.prototype.getImmediate=function(t){var e=of({identifier:"[DEFAULT]",optional:!1},t),i=e.identifier,n=e.optional,r=this.normalizeInstanceIdentifier(i);try{var s=this.getOrInitializeService(r);if(!s){if(n)return null;throw Error("Service "+this.name+" is not available")}return s}catch(lC){if(n)return null;throw lC}},t.prototype.getComponent=function(){return this.component},t.prototype.setComponent=function(t){var e,i;if(t.name!==this.name)throw Error("Mismatching Component "+t.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");if(this.component=t,function(t){return"EAGER"===t.instantiationMode} 6978/** 6979 * @license 6980 * Copyright 2019 Google LLC 6981 * 6982 * Licensed under the Apache License, Version 2.0 (the "License"); 6983 * you may not use this file except in compliance with the License. 6984 * You may obtain a copy of the License at 6985 * 6986 * http://www.apache.org/licenses/LICENSE-2.0 6987 * 6988 * Unless required by applicable law or agreed to in writing, softw
6988are 6989 * distributed under the License is distributed on an "AS IS" BASIS, 6990 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6991 * See the License for the specific language governing permissions and 6992 * limitations under the License. 6993 */(t))try{this.getOrInitializeService("[DEFAULT]")}catch(lC){}try{for(var n=function(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.instancesDeferred.entries()),r=n.next();!r.done;r=n.next()){var s=uf(r.value,2),o=s[0],a=s[1],h=this.normalizeInstanceIdentifier(o);try{var u=this.getOrInitializeService(h);a.resolve(u)}catch(lC){}}}catch(l){e={error:l}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(e)throw e.error}}},t.prototype.clearInstance=function(t){void 0===t&&(t="[DEFAULT]"),this.instancesDeferred.delete(t),this.instances.delete(t)},t.prototype.delete=function(){return af(this,void 0,void 0,(function(){var t;return hf(this,(function(e){switch(e.label){case 0:return t=Array.from(this.instances.values()),[4,Promise.all(lf(t.filter((function(t){return"INTERNAL"in t})).map((function(t){return t.INTERNAL.delete()})),t.filter((function(t){return"_delete"in t})).map((function(t){return t._delete()}))))];case 1:return e.sent(),[2]}}))}))},t.prototype.isComponentSet=function(){return null!=this.component},t.prototype.isInitialized=function(t){return void 0===t&&(t="[DEFAULT]"),this.instances.has(t)},t.prototype.getOrInitializeService=function(t){var e=this.instances.get(t);return!e&&this.component&&(e=this.component.instanceFactory(this.container,function(t){return"[DEFAULT]"===t?void 0:t}(t)),this.instances.set(t,e)),e||null},t.prototype.normalizeInstanceIdentifier=function(t){return this.component?this.component.multipleInstances?t:"[DEFAULT]":t},t}(); 6994/** 6995 * @license 6996 * Copyright 2019 Google LLC 6997 * 6998 * Licensed under the Apache License, Version 2.0 (the "License"); 6999 * you may not use this file except in compliance with the License. 7000 * You may obtain a copy of the License at 7001 * 7002 * http://www.apache.org/licenses/LICENSE-2.0 7003 * 7004 * Unless required by applicable law or agreed to in writing, software 7005 * distributed under the License is distributed on an "AS IS" BASIS, 7006 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7007 * See the License for the specific language governing permissions and 7008 * limitations under the License. 7009 */var Af,Cf=function(){function t(t){this.name=t,this.providers=new Map}return t.prototype.addComponent=function(t){var e=this.getProvider(t.name);if(e.isComponentSet())throw new Error("Component "+t.name+" has already been registered with "+this.name);e.setComponent(t)},t.prototype.addOrOverwriteComponent=function(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)},t.prototype.getProvider=function(t){if(this.providers.has(t))return this.providers.get(t);var e=new Sf(t,this);return this.providers.set(t,e),e},t.prototype.getProviders=function(){return Array.from(this.providers.values())},t}(); 7010/*! ***************************************************************************** 7011Copyright (c) Microsoft Corporation. All rights reserved. 7012Licensed under the Apache License, Version 2.0 (the "License"); you may not use 7013this file except in compliance with the License. You may obtain a copy of the 7014License at http://www.apache.org/licenses/LICENSE-2.0 7015 7016THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 7017KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED 7018WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 7019MERCHANTABLITY OR NON-INFRINGEMENT. 7020 7021See the Apache Version 2.0 License for specific language governing permissions 7022and limitations under the License. 7023***************************************************************************** */function Of(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),r=0;for(e=0;e<i;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,r++)n[r]=s[o];return n} 7024/** 7025 * @license 7026 * Copyright 2017 Google LLC 7027 * 7028 * Licensed under the Apache License, Version 2.0 (the "License");
7029 * you may not use this file except in compliance with the License. 7030 * You may obtain a copy of the License at 7031 * 7032 * http://www.apache.org/licenses/LICENSE-2.0 7033 * 7034 * Unless required by applicable law or agreed to in writing, software 7035 * distributed under the License is distributed on an "AS IS" BASIS, 7036 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7037 * See the License for the specific language governing permissions and 7038 * limitations under the License. 7039 */var Rf,Mf,Pf=[];(Mf=Rf||(Rf={}))[Mf.DEBUG=0]="DEBUG",Mf[Mf.VERBOSE=1]="VERBOSE",Mf[Mf.INFO=2]="INFO",Mf[Mf.WARN=3]="WARN",Mf[Mf.ERROR=4]="ERROR",Mf[Mf.SILENT=5]="SILENT";var If,kf={debug:Rf.DEBUG,verbose:Rf.VERBOSE,info:Rf.INFO,warn:Rf.WARN,error:Rf.ERROR,silent:Rf.SILENT},Lf=Rf.INFO,Df=((Af={})[Rf.DEBUG]="log",Af[Rf.VERBOSE]="log",Af[Rf.INFO]="info",Af[Rf.WARN]="warn",Af[Rf.ERROR]="error",Af),Ff=function(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];if(!(e<t.logLevel)){var r=(new Date).toISOString(),s=Df[e];if(!s)throw new Error("Attempted to log a message with an invalid logType (value: "+e+")");console[s].apply(console,Of(["["+r+"] "+t.name+":"],i))}},Nf=function(){function t(t){this.name=t,this._logLevel=Lf,this._logHandler=Ff,this._userLogHandler=null,Pf.push(this)}return Object.defineProperty(t.prototype,"logLevel",{get:function(){return this._logLevel},set:function(t){if(!(t in Rf))throw new TypeError('Invalid value "'+t+'" assigned to `logLevel`');this._logLevel=t},enumerable:!1,configurable:!0}),t.prototype.setLogLevel=function(t){this._logLevel="string"==typeof t?kf[t]:t},Object.defineProperty(t.prototype,"logHandler",{get:function(){return this._logHandler},set:function(t){if("function"!=typeof t)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(t){this._userLogHandler=t},enumerable:!1,configurable:!0}),t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,Of([this,Rf.DEBUG],t)),this._logHandler.apply(this,Of([this,Rf.DEBUG],t))},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,Of([this,Rf.VERBOSE],t)),this._logHandler.apply(this,Of([this,Rf.VERBOSE],t))},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,Of([this,Rf.INFO],t)),this._logHandler.apply(this,Of([this,Rf.INFO],t))},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,Of([this,Rf.WARN],t)),this._logHandler.apply(this,Of([this,Rf.WARN],t))},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,Of([this,Rf.ERROR],t)),this._logHandler.apply(this,Of([this,Rf.ERROR],t))},t}();function Bf(t){Pf.forEach((function(e){e.setLogLevel(t)}))}var Uf,Vf=((If={})["no-app"]="No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",If["bad-app-name"]="Illegal App name: '{$appName}",If["duplicate-app"]="Firebase App named '{$appName}' already exists",If["app-deleted"]="Firebase App named '{$appName}' already deleted",If["invalid-app-argument"]="firebase.{$appName}() takes either no argument or a Firebase App instance.",If["invalid-log-argument"]="First argument to `onLog` must be null or a function.",If),Yf=new mf("app","Firebase",Vf),zf="@firebase/app",Xf=((Uf={})[zf]="fire-core",Uf["@firebase/analytics"]="fire-analytics",Uf["@firebase/auth"]="fire-auth",Uf["@firebase/database"]="fire-rtdb",Uf["@firebase/functions"]="fire-fn",Uf["@firebase/installations"]="fire-iid",Uf["@firebase/messaging"]="fire-fcm",Uf["@firebase/performance"]="fire-perf",Uf["@firebase/remote-config"]="fire-rc",Uf["@firebase/storage"]="fire-gcs",Uf["@firebase/firestore"]="fire-fst",Uf["fire-js"]="fire-js",Uf["firebase-wrapper"]="fire-js-all",Uf),Gf=new Nf("@firebase/app"),Wf=function(){function t(t,e,i){var n=this;this.firebase_=i,this.isDeleted_=!1,this.name_=e.name,this.automaticDataCollectionEnabled_=e.automaticDataCollectionEnabled||!1,this.options_=ff(void 0,t),this.container=new Cf(e.name),this._addComponent(new Ef("app",(function(){return n}
7039),"PUBLIC")),this.firebase_.INTERNAL.components.forEach((function(t){return n._addComponent(t)}))}return Object.defineProperty(t.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(t){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!1,configurable:!0}),t.prototype.delete=function(){var t=this;return new Promise((function(e){t.checkDestroyed_(),e()})).then((function(){return t.firebase_.INTERNAL.removeApp(t.name_),Promise.all(t.container.getProviders().map((function(t){return t.delete()})))})).then((function(){t.isDeleted_=!0}))},t.prototype._getService=function(t,e){return void 0===e&&(e="[DEFAULT]"),this.checkDestroyed_(),this.container.getProvider(t).getImmediate({identifier:e})},t.prototype._removeServiceInstance=function(t,e){void 0===e&&(e="[DEFAULT]"),this.container.getProvider(t).clearInstance(e)},t.prototype._addComponent=function(t){try{this.container.addComponent(t)}catch(lC){Gf.debug("Component "+t.name+" failed to register with FirebaseApp "+this.name,lC)}},t.prototype._addOrOverwriteComponent=function(t){this.container.addOrOverwriteComponent(t)},t.prototype.toJSON=function(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}},t.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw Yf.create("app-deleted",{appName:this.name_})},t}();Wf.prototype.name&&Wf.prototype.options||Wf.prototype.delete||console.log("dc"); 7040/** 7041 * @license 7042 * Copyright 2019 Google LLC 7043 * 7044 * Licensed under the Apache License, Version 2.0 (the "License"); 7045 * you may not use this file except in compliance with the License. 7046 * You may obtain a copy of the License at 7047 * 7048 * http://www.apache.org/licenses/LICENSE-2.0 7049 * 7050 * Unless required by applicable law or agreed to in writing, software 7051 * distributed under the License is distributed on an "AS IS" BASIS, 7052 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7053 * See the License for the specific language governing permissions and 7054 * limitations under the License. 7055 */ 7056function jf(t){var e={},i=new Map,n={__esModule:!0,initializeApp:function(i,r){void 0===r&&(r={});if("object"!=typeof r||null===r){r={name:r}}var s=r;void 0===s.name&&(s.name="[DEFAULT]");var o=s.name;if("string"!=typeof o||!o)throw Yf.create("bad-app-name",{appName:String(o)});if(wf(e,o))throw Yf.create("duplicate-app",{appName:o});var a=new t(i,s,n);return e[o]=a,a},app:r,registerVersion:function(t,e,i){var n,r=null!==(n=Xf[t])&&void 0!==n?n:t;i&&(r+="-"+i);var o=r.match(/\s|\//),a=e.match(/\s|\//);if(o||a){var h=['Unable to register library "'+r+'" with version "'+e+'":'];return o&&h.push('library name "'+r+'" contains illegal characters (whitespace or "/")'),o&&a&&h.push("and"),a&&h.push('version name "'+e+'" contains illegal characters (whitespace or "/")'),void Gf.warn(h.join(" "))}s(new Ef(r+"-version",(function(){return{library:r,version:e}}),"VERSION"))},setLogLevel:Bf,onLog:function(t,e){if(null!==t&&"function"!=typeof t)throw Yf.create("invalid-log-argument");!function(t,e){for(var i=function(i){var n=null;e&&e.level&&(n=kf[e.level]),i.userLogHandler=null===t?null:function(e,i){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];var o=r.map((function(t){if(null==t)return null;if("string"==typeof t)return t;if("number"==typeof t||"boolean"==typeof t)return t.toString();if(t instanceof Error)return t.message;try{return JSON.stringify(t)}catch(e){return null}})).filter((function(t){return t})).join(" ");i>=(null!=n?n:e.logLevel)&&t({level:Rf[i].toLowerCase(),message:o,args:r,type:e.name})}},n=0,r=Pf;n<r.length;n++)i(r[n])} 7057/** 7058 * @license 7059 * Copyright 2019 Google LLC 7060 * 7061 * Licensed under the Apache License, Version 2.0 (the "License"); 7062 * you may not use this file except in compliance with the License. 7063 * You may obtain a copy of the License at 7064 * 7065 * http://www.apache.org/licenses/LICENSE-2.0 7066 * 7067 * Unless required by applicable law or agreed to in writing, softw
7067are 7068 * distributed under the License is distributed on an "AS IS" BASIS, 7069 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7070 * See the License for the specific language governing permissions and 7071 * limitations under the License. 7072 */(t,e)},apps:null,SDK_VERSION:"8.2.9",INTERNAL:{registerComponent:s,removeApp:function(t){delete e[t]},components:i,useAsService:function(t,e){if("serverAuth"===e)return null;return e}}};function r(t){if(!wf(e,t=t||"[DEFAULT]"))throw Yf.create("no-app",{appName:t});return e[t]}function s(s){var o=s.name;if(i.has(o))return Gf.debug("There were multiple attempts to register component "+o+"."),"PUBLIC"===s.type?n[o]:null;if(i.set(o,s),"PUBLIC"===s.type){var a=function(t){if(void 0===t&&(t=r()),"function"!=typeof t[o])throw Yf.create("invalid-app-argument",{appName:o});return t[o]()};void 0!==s.serviceProps&&ff(a,s.serviceProps),n[o]=a,t.prototype[o]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=this._getService.bind(this,o);return i.apply(this,s.multipleInstances?t:[])}}for(var h=0,u=Object.keys(e);h<u.length;h++){var l=u[h];e[l]._addComponent(s)}return"PUBLIC"===s.type?n[o]:null}return n.default=n,Object.defineProperty(n,"apps",{get:function(){return Object.keys(e).map((function(t){return e[t]}))}}),r.App=t,n} 7073/** 7074 * @license 7075 * Copyright 2019 Google LLC 7076 * 7077 * Licensed under the Apache License, Version 2.0 (the "License"); 7078 * you may not use this file except in compliance with the License. 7079 * You may obtain a copy of the License at 7080 * 7081 * http://www.apache.org/licenses/LICENSE-2.0 7082 * 7083 * Unless required by applicable law or agreed to in writing, software 7084 * distributed under the License is distributed on an "AS IS" BASIS, 7085 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7086 * See the License for the specific language governing permissions and 7087 * limitations under the License. 7088 */var Hf=function t(){var e=jf(Wf);return e.INTERNAL=of(of({},e.INTERNAL),{createFirebaseNamespace:t,extendNamespace:function(t){ff(e,t)},createSubscribe:_f,ErrorFactory:mf,deepExtend:ff}),e}(),qf=function(){function t(t){this.container=t}return t.prototype.getPlatformInfoString=function(){return this.container.getProviders().map((function(t){if(function(t){var e=t.getComponent();return"VERSION"===(null==e?void 0:e.type)} 7089/** 7090 * @license 7091 * Copyright 2019 Google LLC 7092 * 7093 * Licensed under the Apache License, Version 2.0 (the "License"); 7094 * you may not use this file except in compliance with the License. 7095 * You may obtain a copy of the License at 7096 * 7097 * http://www.apache.org/licenses/LICENSE-2.0 7098 * 7099 * Unless required by applicable law or agreed to in writing, software 7100 * distributed under the License is distributed on an "AS IS" BASIS, 7101 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7102 * See the License for the specific language governing permissions and 7103 * limitations under the License. 7104 */(t)){var e=t.getImmediate();return e.library+"/"+e.version}return null})).filter((function(t){return t})).join(" ")},t}(); 7105/** 7106 * @license 7107 * Copyright 2019 Google LLC 7108 * 7109 * Licensed under the Apache License, Version 2.0 (the "License"); 7110 * you may not use this file except in compliance with the License. 7111 * You may obtain a copy of the License at 7112 * 7113 * http://www.apache.org/licenses/LICENSE-2.0 7114 * 7115 * Unless required by applicable law or agreed to in writing, software 7116 * distributed under the License is distributed on an "AS IS" BASIS, 7117 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7118 * See the License for the specific language governing permissions and 7119 * limitations under the License. 7120 */ 7121/** 7122 * @license 7123 * Copyright 2017 Google LLC 7124 * 7125 * Licensed under the Apache License, Version 2.0 (the "License"); 7126 * you may not use this file except in compliance with the License. 7127 * You may obtain a copy of the License at 7128 * 7129 * http://www.apache.org/licenses/LICENSE-2.0 7130 * 7131 * Unless required by applicable law or agreed to in writing, software 7132 * distributed under the License is distributed on an "AS IS" BASIS, 7133 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7134 * See the License for the specific language governing permissions and 7135 * limitations under the License. 7136 */ 7137if("object"==typeof self&&self.self===self&&void 0!==self.firebase){Gf.warn("\n Warning: Firebase is already defined in the global scope. Please make sure\n Firebase library is only loaded once.\n ");var Kf=self.firebase.SDK_VERSION;Kf&&Kf.indexOf("LITE")>=0&&Gf.warn("\n Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n ")}var Zf=Hf.initializeApp;Hf.initializeApp=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return vf()&&Gf.warn('\n Warning: This is a browser-targeted Firebase bundle but it appears it is being\n run in a Node environment. If running in a Node environment, make sure you\n are using the bundle specified by the "main" field in package.json.\n \n If you are using Webpack, you can specify "main" as the first item in\n "resolve.mainFields":\n https://webpack.js.org/configuration/resolve/#resolvemainfields\n \n If using Rollup, use the @rollup/plugin-node-resolve plugin and specify "main"\n as the first item in "mainFields", e.g. [\'main\', \'module\'].\n https://github.com/rollup/@rollup/plugin-node-resolve\n '),Zf.apply(void 0,t)};var Qf,Jf,$f=Hf;(Qf=$f).INTERNAL.registerComponent(new Ef("platform-logger",(function(t){return new qf(t)}),"PRIVATE")),Qf.registerVersion(zf,"0.6.15",Jf),Qf.registerVersion("fire-js","");var td=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:$f,firebase:$f}); 7138/** 7139 * @license 7140 * Copyright 2018 Google LLC 7141 * 7142 * Licensed under the Apache License, Version 2.0 (the "License");
7143 * you may not use this file except in compliance with the License. 7144 * You may obtain a copy of the License at 7145 * 7146 * http://www.apache.org/licenses/LICENSE-2.0 7147 * 7148 * Unless required by applicable law or agreed to in writing, software 7149 * distributed under the License is distributed on an "AS IS" BASIS, 7150 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7151 * See the License for the specific language governing permissions and 7152 * limitations under the License. 7153 */ 7154$f.registerVersion("firebase","8.2.9","app"); 7155/*! ***************************************************************************** 7156Copyright (c) Microsoft Corporation. 7157 7158Permission to use, copy, modify, and/or distribute this software for any 7159purpose with or without fee is hereby granted. 7160 7161THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 7162REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 7163AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 7164INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 7165LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 7166OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 7167PERFORMANCE OF THIS SOFTWARE. 7168***************************************************************************** */ 7169var ed=function(t,e){return(ed=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function id(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var nd,rd="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},sd=sd||{},od=rd||self;function ad(){}function hd(t){var e=typeof t;return"array"==(e="object"!=e?e:t?Array.isArray(t)?"array":e:"null")||"object"==e&&"number"==typeof t.length}function ud(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}var ld="closure_uid_"+(1e9*Math.random()>>>0),cd=0;function fd(t,e,i){return t.call.apply(t.bind,arguments)}function dd(t,e,i){if(!t)throw Error();if(2<arguments.length){var n=Array.prototype.slice.call(arguments,2);return function(){var i=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(i,n),t.apply(e,i)}}return function(){return t.apply(e,arguments)}}function pd(t,e,i){return(pd=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?fd:dd).apply(null,arguments)}function vd(t,e){var i=Array.prototype.slice.call(arguments,1);return function(){var e=i.slice();return e.push.apply(e,arguments),t.apply(this,e)}}function gd(){return Date.now()}function md(t,e){function i(){}i.prototype=e.prototype,t.X=e.prototype,t.prototype=new i,t.prototype.constructor=t,t.Kb=function(t,i,n){for(var r=Array(arguments.length-2),s=2;s<arguments.length;s++)r[s-2]=arguments[s];return e.prototype[i].apply(t,r)}}function yd(){this.j=this.j,this.i=this.i}yd.prototype.j=!1,yd.prototype.ja=function(){var t;!this.j&&(this.j=!0,this.G(),0)&&(t=this,Object.prototype.hasOwnProperty.call(t,ld)&&t[ld]||(t[ld]=++cd))},yd.prototype.G=function(){if(this.i)for(;this.i.length;)this.i.shift()()};var xd=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if("string"==typeof t)return"string"!=typeof e||1!=e.length?-1:t.indexOf(e,0);for(var i=0;i<t.length;i++)if(i in t&&t[i]===e)return i;return-1},wd=Array.prototype.forEach?function(t,e,i){Array.prototype.forEach.call(t,e,i)}:function(t,e,i){for(var n=t.length,r="string"==typeof t?t.split(""):t,s=0;s<n;s++)s in r&&e.call(i,r[s],s,t)};function _d(t){return Array.prototype.concat.apply([],arguments)}function bd(t){var e=t.length;if(0<e){for(var i=Array(e),n=0;n<e;n++)i[n]=t[n];return i}return[]}function Td(t){return/^[\s\xa0]*$/.test(t)}var Ed,Sd=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]};function Ad(t,e){return-1!=t.indexOf(e)}function Cd(t,e){return t<e?-1:t>e?1:0}t:{var Od=od.navigator;if(Od){var Rd=Od.userAgent;if(Rd){Ed=Rd;break t}}Ed=""}function Md(t,e,i){for(var n in t)e.call(i,t[n],n,t)}function Pd(t){var e={};for(var i in t)e[i]=t[i];return e}var Id="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleStr
7169ing toString valueOf".split(" ");function kd(t,e){for(var i,n,r=1;r<arguments.length;r++){for(i in n=arguments[r])t[i]=n[i];for(var s=0;s<Id.length;s++)i=Id[s],Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}}function Ld(t){return Ld[" "](t),t}Ld[" "]=ad;var Dd,Fd,Nd=Ad(Ed,"Opera"),Bd=Ad(Ed,"Trident")||Ad(Ed,"MSIE"),Ud=Ad(Ed,"Edge"),Vd=Ud||Bd,Yd=Ad(Ed,"Gecko")&&!(Ad(Ed.toLowerCase(),"webkit")&&!Ad(Ed,"Edge"))&&!(Ad(Ed,"Trident")||Ad(Ed,"MSIE"))&&!Ad(Ed,"Edge"),zd=Ad(Ed.toLowerCase(),"webkit")&&!Ad(Ed,"Edge");function Xd(){var t=od.document;return t?t.documentMode:void 0}t:{var Gd="",Wd=(Fd=Ed,Yd?/rv:([^\);]+)(\)|;)/.exec(Fd):Ud?/Edge\/([\d\.]+)/.exec(Fd):Bd?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(Fd):zd?/WebKit\/(\S+)/.exec(Fd):Nd?/(?:Version)[ \/]?(\S+)/.exec(Fd):void 0);if(Wd&&(Gd=Wd?Wd[1]:""),Bd){var jd=Xd();if(null!=jd&&jd>parseFloat(Gd)){Dd=String(jd);break t}}Dd=Gd}var Hd,qd={};function Kd(t){return function(t,e){var i=qd;return Object.prototype.hasOwnProperty.call(i,t)?i[t]:i[t]=e(t)}(t,(function(){for(var e=0,i=Sd(String(Dd)).split("."),n=Sd(String(t)).split("."),r=Math.max(i.length,n.length),s=0;0==e&&s<r;s++){var o=i[s]||"",a=n[s]||"";do{if(o=/(\d*)(\D*)(.*)/.exec(o)||["","","",""],a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],0==o[0].length&&0==a[0].length)break;e=Cd(0==o[1].length?0:parseInt(o[1],10),0==a[1].length?0:parseInt(a[1],10))||Cd(0==o[2].length,0==a[2].length)||Cd(o[2],a[2]),o=o[3],a=a[3]}while(0==e)}return 0<=e}))}if(od.document&&Bd){var Zd=Xd();Hd=Zd||(parseInt(Dd,10)||void 0)}else Hd=void 0;var Qd=Hd,Jd=!Bd||9<=Number(Qd),$d=Bd&&!Kd("9"),tp=function(){if(!od.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});try{od.addEventListener("test",ad,e),od.removeEventListener("test",ad,e)}catch(i){}return t}();function ep(t,e){this.type=t,this.a=this.target=e,this.defaultPrevented=!1}function ip(t,e){if(ep.call(this,t?t.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,t){var i=this.type=t.type,n=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.a=e,e=t.relatedTarget){if(Yd){t:{try{Ld(e.nodeName);var r=!0;break t}catch(s){}r=!1}r||(e=null)}}else"mouseover"==i?e=t.fromElement:"mouseout"==i&&(e=t.toElement);this.relatedTarget=e,n?(this.clientX=void 0!==n.clientX?n.clientX:n.pageX,this.clientY=void 0!==n.clientY?n.clientY:n.pageY,this.screenX=n.screenX||0,this.screenY=n.screenY||0):(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType="string"==typeof t.pointerType?t.pointerType:np[t.pointerType]||"",this.c=t,t.defaultPrevented&&this.b()}}ep.prototype.b=function(){this.defaultPrevented=!0},md(ip,ep);var np={2:"touch",3:"pen",4:"mouse"};ip.prototype.b=function(){ip.X.b.call(this);var t=this.c;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,$d)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(e){}};var rp="closure_listenable_"+(1e6*Math.random()|0),sp=0;function op(t,e,i,n,r){this.listener=t,this.proxy=null,this.src=e,this.type=i,this.capture=!!n,this.ca=r,this.key=++sp,this.Y=this.Z=!1}function ap(t){t.Y=!0,t.listener=null,t.proxy=null,t.src=null,t.ca=null}function hp(t){this.src=t,this.a={},this.b=0}function up(t,e){var i=e.type;if(i in t.a){var n,r=t.a[i],s=xd(r,e);(n=0<=s)&&Array.prototype.splice.call(r,s,1),n&&(ap(e),0==t.a[i].length&&(delete t.a[i],t.b--))}}function lp(t,e,i,n){for(var r=0;r<t.length;++r){var s=t[r];if(!s.Y&&s.listener==e&&s.capture==!!i&&s.ca==n)return r}return-1}hp.prototype.add=function(t,e,i,n,r){var s=t.toString();(t=this.a[s])||(t=this.a[s]=[],this.b++);var o=lp(t,e,n,r);return-1<o?(e=t[o],i||(e.Z=!1)):((e=new op(e,this.src,s,!!n,r)).Z=i,t.push(e)),e};var cp="closure_lm_"+(1e6*Math.random()|0),fp={};function dp(t,e,i,n,r){if(n&&n.once)return vp(t,e,i,n,r);if(Array.isArray(e)){for(var s=0;s<e.length;s++)dp(t,e[s],i,n,r);return null}return i=Tp(i),t&&t[rp]?t.va(e,i,ud(n)?!!n.capture:!!n,r):pp(t,e,i,!1,n,r)}function pp(t,e,i,n,r,s){if(!e)throw Error("Invalid event type");var o=ud(r)?!!r.capture:!!r;if(o&&!Jd)return null;var a=_p(t);if(a||(t[cp]=a=new hp(t)),(i=a.add(e,i,n,o,s)).proxy)return i;if(n=function(){var t=wp,e=Jd?function(i){return t.call(e.src,e.listener,i)}:function(i){if(!(i=t.call(e.src,e.listener,i)))return i};return e}
vendor: 33,740 bytes, lines 7169-7190
7169(),i.proxy=n,n.src=t,n.listener=i,t.addEventListener)tp||(r=o),void 0===r&&(r=!1),t.addEventListener(e.toString(),n,r);else if(t.attachEvent)t.attachEvent(yp(e.toString()),n);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(n)}return i}function vp(t,e,i,n,r){if(Array.isArray(e)){for(var s=0;s<e.length;s++)vp(t,e[s],i,n,r);return null}return i=Tp(i),t&&t[rp]?t.wa(e,i,ud(n)?!!n.capture:!!n,r):pp(t,e,i,!0,n,r)}function gp(t,e,i,n,r){if(Array.isArray(e))for(var s=0;s<e.length;s++)gp(t,e[s],i,n,r);else n=ud(n)?!!n.capture:!!n,i=Tp(i),t&&t[rp]?(t=t.c,(e=String(e).toString())in t.a&&(-1<(i=lp(s=t.a[e],i,n,r))&&(ap(s[i]),Array.prototype.splice.call(s,i,1),0==s.length&&(delete t.a[e],t.b--)))):t&&(t=_p(t))&&(e=t.a[e.toString()],t=-1,e&&(t=lp(e,i,n,r)),(i=-1<t?e[t]:null)&&mp(i))}function mp(t){if("number"!=typeof t&&t&&!t.Y){var e=t.src;if(e&&e[rp])up(e.c,t);else{var i=t.type,n=t.proxy;e.removeEventListener?e.removeEventListener(i,n,t.capture):e.detachEvent?e.detachEvent(yp(i),n):e.addListener&&e.removeListener&&e.removeListener(n),(i=_p(e))?(up(i,t),0==i.b&&(i.src=null,e[cp]=null)):ap(t)}}}function yp(t){return t in fp?fp[t]:fp[t]="on"+t}function xp(t,e){var i=t.listener,n=t.ca||t.src;return t.Z&&mp(t),i.call(n,e)}function wp(t,e){if(t.Y)return!0;if(!Jd){if(!e)t:{e=["window","event"];for(var i=od,n=0;n<e.length;n++)if(null==(i=i[e[n]])){e=null;break t}e=i}return xp(t,e=new ip(e,this))}return xp(t,new ip(e,this))}function _p(t){return(t=t[cp])instanceof hp?t:null}var bp="__closure_events_fn_"+(1e9*Math.random()>>>0);function Tp(t){return"function"==typeof t?t:(t[bp]||(t[bp]=function(e){return t.handleEvent(e)}),t[bp])}function Ep(){yd.call(this),this.c=new hp(this),this.J=this,this.C=null}function Sp(t,e){var i,n=t.C;if(n)for(i=[];n;n=n.C)i.push(n);if(t=t.J,n=e.type||e,"string"==typeof e)e=new ep(e,t);else if(e instanceof ep)e.target=e.target||t;else{var r=e;kd(e=new ep(n,t),r)}if(r=!0,i)for(var s=i.length-1;0<=s;s--){var o=e.a=i[s];r=Ap(o,n,!0,e)&&r}if(r=Ap(o=e.a=t,n,!0,e)&&r,r=Ap(o,n,!1,e)&&r,i)for(s=0;s<i.length;s++)r=Ap(o=e.a=i[s],n,!1,e)&&r}function Ap(t,e,i,n){if(!(e=t.c.a[String(e)]))return!0;e=e.concat();for(var r=!0,s=0;s<e.length;++s){var o=e[s];if(o&&!o.Y&&o.capture==i){var a=o.listener,h=o.ca||o.src;o.Z&&up(t.c,o),r=!1!==a.call(h,n)&&r}}return r&&!n.defaultPrevented}md(Ep,yd),Ep.prototype[rp]=!0,(nd=Ep.prototype).addEventListener=function(t,e,i,n){dp(this,t,e,i,n)},nd.removeEventListener=function(t,e,i,n){gp(this,t,e,i,n)},nd.G=function(){if(Ep.X.G.call(this),this.c){var t,e=this.c;for(t in e.a){for(var i=e.a[t],n=0;n<i.length;n++)ap(i[n]);delete e.a[t],e.b--}}this.C=null},nd.va=function(t,e,i,n){return this.c.add(String(t),e,!1,i,n)},nd.wa=function(t,e,i,n){return this.c.add(String(t),e,!0,i,n)};var Cp=od.JSON.stringify;function Op(){this.b=this.a=null}var Rp,Mp=new(function(){function t(t,e){this.c=t,this.f=e,this.b=0,this.a=null}return t.prototype.get=function(){var t;return 0<this.b?(this.b--,t=this.a,this.a=t.next,t.next=null):t=this.c(),t},t}())((function(){return new Ip}),(function(t){t.reset()}));function Pp(){var t=Fp,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function Ip(){this.next=this.b=this.a=null}function kp(t){od.setTimeout((function(){throw t}),0)}function Lp(t,e){Rp||function(){var t=od.Promise.resolve(void 0);Rp=function(){t.then(Np)}}(),Dp||(Rp(),Dp=!0),Fp.add(t,e)}Op.prototype.add=function(t,e){var i=Mp.get();i.set(t,e),this.b?this.b.next=i:this.a=i,this.b=i},Ip.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},Ip.prototype.reset=function(){this.next=this.b=this.a=null};var Dp=!1,Fp=new Op;function Np(){for(var t;t=Pp();){try{t.a.call(t.b)}catch(i){kp(i)}var e=Mp;e.f(t),100>e.b&&(e.b++,t.next=e.a,e.a=t)}Dp=!1}function Bp(t,e){Ep.call(this),this.b=t||1,this.a=e||od,this.f=pd(this.Za,this),this.g=gd()}function Up(t){t.aa=!1,t.M&&(t.a.clearTimeout(t.M),t.M=null)}function Vp(t,e,i){if("function"==typeof t)i&&(t=pd(t,i));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=pd(t.handleEvent,t)}return 2147483647<Number(e)?-1:od.setTimeout(t,e||0)}function Yp(t){t.a=Vp((function(){t.a=null,t.c&&(t.c=!1,Yp(t))}),t.h);var e=t.b;t.b=null,t.g.apply(null,e)}md(Bp,Ep),(nd=Bp.prototype).aa=!1,nd.M=null,nd.Za=function(){if(this.aa){var t=gd()-this.g;0<t&&t<.8*this.b?this.M=this.a.setTimeout(this.f,this.b-t):(this.M&&(this.a.clearTimeout(this.M),this.M=null),Sp(this,"tick"),this.aa&&(Up(this),this.start()))}},nd.start=function(){this.aa=!0,this.M||(this.M=this.a.setTimeout(this.f,this.b),this.g=gd())},nd.G=function(){Bp.X.G.call(this),Up(this),delete this.a};var zp=function(t){function e(e,i){var n=t.call(this)||this;return n.g=e,n.h=i,n.b=null,n.c=!1,n.a=null,n}return function(t,e){function i(){this.constructor=t}ed(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}(e,t),e.prototype.f=function(t){this.b=arguments,this.a?this.c=!0:Yp(this)},e.prototype.G=function(){t.prototype.G.call(this),this.a&&(od.clearTimeout(this.a),this.a=null,this.c=!1,this.b=null)},e}(yd);function Xp(t){yd.call(this),this.b=t,this.a={}}md(Xp,yd);var Gp=[];function Wp(t,e,i,n){Array.isArray(i)||(i&&(Gp[0]=i.toString()),i=Gp);for(var r=0;r<i.length;r++){var s=dp(e,i[r],n||t.handleEvent,!1,t.b||t);if(!s)break;t.a[s.key]=s}}function jp(t){Md(t.a,(function(t,e){this.a.hasOwnProperty(e)&&mp(t)}),t),t.a={}}function Hp(){this.a=!0}function qp(t,e,i,n){t.info((function(){return"XMLHTTP TEXT ("+e+"): "+function(t,e){if(!t.a)return e;if(!e)return null;try{var i=JSON.parse(e);if(i)for(t=0;t<i.length;t++)if(Array.isArray(i[t])){var n=i[t];if(!(2>n.length)){var r=n[1];if(Array.isArray(r)&&!(1>r.length)){var s=r[0];if("noop"!=s&&"stop"!=s&&"close"!=s)for(var o=1;o<r.length;o++)r[o]=""}}}return Cp(i)}catch(a){return e}}(t,i)+(n?" "+n:"")}))}Xp.prototype.G=function(){Xp.X.G.call(this),jp(this)},Xp.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},Hp.prototype.info=function(){};var Kp={},Zp=null;function Qp(){return Zp=Zp||new Ep}function Jp(t){ep.call(this,Kp.Fa,t)}function $p(t){var e=Qp();Sp(e,new Jp(e,t))}function tv(t,e){ep.call(this,Kp.STAT_EVENT,t),this.stat=e}function ev(t){var e=Qp();Sp(e,new tv(e,t))}function iv(t){ep.call(this,Kp.Ga,t)}function nv(t,e){if("function"!=typeof t)throw Error("Fn must not be null and must be a function");return od.setTimeout((function(){t()}),e)}Kp.Fa="serverreachability",md(Jp,ep),Kp.STAT_EVENT="statevent",md(tv,ep),Kp.Ga="timingevent",md(iv,ep);var rv={NO_ERROR:0,$a:1,nb:2,mb:3,hb:4,lb:5,ob:6,Da:7,TIMEOUT:8,rb:9},sv={fb:"complete",Bb:"success",Ea:"error",Da:"abort",tb:"ready",ub:"readystatechange",TIMEOUT:"timeout",pb:"incrementaldata",sb:"progress",ib:"downloadprogress",Jb:"uploadprogress"};function ov(){}function av(t){var e;return(e=t.a)||(e=t.a={}),e}function hv(){}ov.prototype.a=null;var uv,lv={OPEN:"a",eb:"b",Ea:"c",qb:"d"};function cv(){ep.call(this,"d")}function fv(){ep.call(this,"c")}function dv(){}function pv(t,e,i,n){this.g=t,this.c=e,this.f=i,this.S=n||1,this.J=new Xp(this),this.P=vv,t=Vd?125:void 0,this.R=new Bp(t),this.B=null,this.b=!1,this.j=this.l=this.i=this.H=this.u=this.T=this.o=null,this.s=[],this.a=null,this.D=0,this.h=this.m=null,this.N=-1,this.A=!1,this.O=0,this.F=null,this.V=this.C=this.U=this.I=!1}md(cv,ep),md(fv,ep),md(dv,ov),uv=new dv;var vv=45e3,gv={},mv={};function yv(t,e,i){t.H=1,t.i=Vv(Lv(e)),t.j=i,t.I=!0,xv(t,null)}function xv(t,e){t.u=gd(),bv(t),t.l=Lv(t.i);var i=t.l,n=t.S;Array.isArray(n)||(n=[String(n)]),$v(i.b,"t",n),t.D=0,t.a=Hg(t.g,t.g.C?e:null),0<t.O&&(t.F=new zp(pd(t.Ca,t,t.a),t.O)),Wp(t.J,t.a,"readystatechange",t.Xa),e=t.B?Pd(t.B):{},t.j?(t.m||(t.m="POST"),e["Content-Type"]="application/x-www-form-urlencoded",t.a.ba(t.l,t.m,t.j,e)):(t.m="GET",t.a.ba(t.l,t.m,null,e)),$p(1),function(t,e,i,n,r,s){t.info((function(){if(t.a)if(s)for(var o="",a=s.split("&"),h=0;h<a.length;h++){var u=a[h].split("=");if(1<u.length){var l=u[0];u=u[1];var c=l.split("_");o=2<=c.length&&"type"==c[1]?o+(l+"=")+u+"&":o+(l+"=redacted&")}}else o=null;else o=s;return"XMLHTTP REQ ("+n+") [attempt "+r+"]: "+e+"\n"+i+"\n"+o}))}(t.c,t.m,t.l,t.f,t.S,t.j)}function wv(t,e,i){for(var n=!0;!t.A&&t.D<i.length;){var r=_v(t,i);if(r==mv){4==e&&(t.h=4,ev(14),n=!1),qp(t.c,t.f,null,"[Incomplete Response]");break}if(r==gv){t.h=4,ev(15),qp(t.c,t.f,i,"[Invalid Chunk]"),n=!1;break}qp(t.c,t.f,r,null),Cv(t,r)}4==e&&0==i.length&&(t.h=1,ev(16),n=!1),t.b=t.b&&n,n?0<i.length&&!t.V&&(t.V=!0,(e=t.g).a==t&&e.U&&!e.F&&(e.c.info("Great, no buffering proxy detected. Bytes received: "+i.length),Ug(e),e.F=!0,ev(11))):(qp(t.c,t.f,i,"[Invalid Chunked Response]"),Av(t),Sv(t))}function _v(t,e){var i=t.D,n=e.indexOf("\n",i);return-1==n?mv:(i=Number(e.substring(i,n)),isNaN(i)?gv:(n+=1)+i>e.length?mv:(e=e.substr(n,i),t.D=n+i,e))}function bv(t){t.T=gd()+t.P,Tv(t,t.P)}function Tv(t,e){if(null!=t.o)throw Error("WatchDog timer not null");t.o=nv(pd(t.Va,t),e)}function Ev(t){t.o&&(od.clearTimeout(t.o),t.o=null)}function Sv(t){0==t.g.v||t.A||zg(t.g,t)}function Av(t){Ev(t);var e=t.F;e&&"function"==typeof e.ja&&e.ja(),t.F=null,Up(t.R),jp(t.J),t.a&&(e=t.a,t.a=null,e.abort(),e.ja())}function Cv(t,e){try{var i=t.g;if(0!=i.v&&(i.a==t||og(i.b,t)))if(i.I=t.N,!t.C&&og(i.b,t)&&3==i.v){try{var n=i.ka.a.parse(e)}catch(g){n=null}if(Array.isArray(n)&&3==n.length){var r=n;if(0==r[0]){t:if(!i.j){if(i.a){if(!(i.a.u+3e3<t.u))break t;Yg(i),Mg(i)}Bg(i),ev(18)}}else i.oa=r[1],0<i.oa-i.P&&37500>r[2]&&i.H&&0==i.o&&!i.m&&(i.m=nv(pd(i.Sa,i),6e3));if(1>=sg(i.b)&&i.ea){try{i.ea()}catch(g){}i.ea=void 0}}else Gg(i,11)}else if((t.C||i.a==t)&&Yg(i),!Td(e))for(e=n=i.ka.a.parse(e),n=0;n<e.length;n++)if(r=e[n],i.P=r[0],r=r[1],2==i.v)if("c"==r[0]){i.J=r[1],i.ga=r[2];var s=r[3];null!=s&&(i.ha=s,i.c.info("VER="+i.ha));var o=r[4];null!=o&&(i.pa=o,i.c.info("SVER="+i.pa));var a=r[5];if(null!=a&&"number"==typeof a&&0<a){var h=1.5*a;i.D=h,i.c.info("backChannelRequestTimeoutMs_="+h)}h=i;var u=t.a;if(u){var l=u.a?u.a.getResponseHeader("X-Client-Wire-Protocol"):null;if(l){var c=h.b;!c.a&&(Ad(l,"spdy")||Ad(l,"quic")||Ad(l,"h2"))&&(c.f=c.g,c.a=new Set,c.b&&(ag(c,c.b),c.b=null))}if(h.A){var f=u.a?u.a.getResponseHeader("X-HTTP-Session-Id"):null;f&&(h.na=f,Uv(h.B,h.A,f))}}i.v=3,i.f&&i.f.ta(),i.U&&(i.N=gd()-t.u,i.c.info("Handshake RTT: "+i.N+"ms"));var d=t;if((h=i).la=jg(h,h.C?h.ga:null,h.fa),d.C){hg(h.b,d);var p=d,v=h.D;v&&p.setTimeout(v),p.o&&(Ev(p),bv(p)),h.a=d}else Ng(h);0<i.g.length&&kg(i)}else"stop"!=r[0]&&"close"!=r[0]||Gg(i,7);else 3==i.v&&("stop"==r[0]||"close"==r[0]?"stop"==r[0]?Gg(i,7):Rg(i):"noop"!=r[0]&&i.f&&i.f.sa(r),i.o=0);$p(4)}catch(g){}}function Ov(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(hd(t)||"string"==typeof t)wd(t,e,void 0);else{if(t.L&&"function"==typeof t.L)var i=t.L();else if(t.K&&"function"==typeof t.K)i=void 0;else if(hd(t)||"string"==typeof t){i=[];for(var n=t.length,r=0;r<n;r++)i.push(r)}else for(r in i=[],n=0,t)i[n++]=r;r=(n=function(t){if(t.K&&"function"==typeof t.K)return t.K();if("string"==typeof t)return t.split("");if(hd(t)){for(var e=[],i=t.length,n=0;n<i;n++)e.push(t[n]);return e}for(n in e=[],i=0,t)e[i++]=t[n];return e}(t)).length;for(var s=0;s<r;s++)e.call(void 0,n[s],i&&i[s],t)}}function Rv(t,e){this.b={},this.a=[],this.c=0;var i=arguments.length;if(1<i){if(i%2)throw Error("Uneven number of arguments");for(var n=0;n<i;n+=2)this.set(arguments[n],arguments[n+1])}else if(t)if(t instanceof Rv)for(i=t.L(),n=0;n<i.length;n++)this.set(i[n],t.get(i[n]));else for(n in t)this.set(n,t[n])}function Mv(t){if(t.c!=t.a.length){for(var e=0,i=0;e<t.a.length;){var n=t.a[e];Pv(t.b,n)&&(t.a[i++]=n),e++}t.a.length=i}if(t.c!=t.a.length){var r={};for(i=e=0;e<t.a.length;)Pv(r,n=t.a[e])||(t.a[i++]=n,r[n]=1),e++;t.a.length=i}}function Pv(t,e){return Object.prototype.hasOwnProperty.call(t,e)}(nd=pv.prototype).setTimeout=function(t){this.P=t},nd.Xa=function(t){t=t.target;var e=this.F;e&&3==Sg(t)?e.f():this.Ca(t)},nd.Ca=function(t){try{if(t==this.a)t:{var e=Sg(this.a),i=this.a.ua(),n=this.a.W();if(!(3>e||3==e&&!Vd&&!this.a.$())){this.A||4!=e||7==i||$p(8==i||0>=n?3:2),Ev(this);var r=this.a.W();this.N=r;var s=this.a.$();if(this.b=200==r,function(t,e,i,n,r,s,o){t.info((function(){return"XMLHTTP RESP ("+n+") [ attempt "+r+"]: "+e+"\n"+i+"\n"+s+" "+o}))}(this.c,this.m,this.l,this.f,this.S,e,r),this.b){if(this.U&&!this.C){e:{if(this.a){var o,a=this.a;if((o=a.a?a.a.getResponseHeader("X-HTTP-Initial-Response"):null)&&!Td(o)){var h=o;break e}}h=null}if(!h){this.b=!1,this.h=3,ev(12),Av(this),Sv(this);break t}qp(this.c,this.f,h,"Initial handshake response via X-HTTP-Initial-Response"),this.C=!0,Cv(this,h)}this.I?(wv(this,e,s),Vd&&this.b&&3==e&&(Wp(this.J,this.R,"tick",this.Wa),this.R.start())):(qp(this.c,this.f,s,null),Cv(this,s)),4==e&&Av(this),this.b&&!this.A&&(4==e?zg(this.g,this):(this.b=!1,bv(this)))}else 400==r&&0<s.indexOf("Unknown SID")?(this.h=3,ev(12)):(this.h=0,ev(13)),Av(this),Sv(this)}}}catch(u){}},nd.Wa=function(){if(this.a){var t=Sg(this.a),e=this.a.$();this.D<e.length&&(Ev(this),wv(this,t,e),this.b&&4!=t&&bv(this))}},nd.cancel=function(){this.A=!0,Av(this)},nd.Va=function(){this.o=null;var t=gd();0<=t-this.T?(function(t,e){t.info((function(){return"TIMEOUT: "+e}))}(this.c,this.l),2!=this.H&&($p(3),ev(17)),Av(this),this.h=2,Sv(this)):Tv(this,this.T-t)},(nd=Rv.prototype).K=function(){Mv(this);for(var t=[],e=0;e<this.a.length;e++)t.push(this.b[this.a[e]]);return t},nd.L=function(){return Mv(this),this.a.concat()},nd.get=function(t,e){return Pv(this.b,t)?this.b[t]:e},nd.set=function(t,e){Pv(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},nd.forEach=function(t,e){for(var i=this.L(),n=0;n<i.length;n++){var r=i[n],s=this.get(r);t.call(e,s,r,this)}};var Iv=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function kv(t,e){if(this.c=this.j=this.f="",this.h=null,this.i=this.g="",this.a=!1,t instanceof kv){this.a=void 0!==e?e:t.a,Dv(this,t.f),this.j=t.j,Fv(this,t.c),Nv(this,t.h),this.g=t.g,e=t.b;var i=new Kv;i.c=e.c,e.a&&(i.a=new Rv(e.a),i.b=e.b),Bv(this,i),this.i=t.i}else t&&(i=String(t).match(Iv))?(this.a=!!e,Dv(this,i[1]||"",!0),this.j=Yv(i[2]||""),Fv(this,i[3]||"",!0),Nv(this,i[4]),this.g=Yv(i[5]||"",!0),Bv(this,i[6]||"",!0),this.i=Yv(i[7]||"")):(this.a=!!e,this.b=new Kv(null,this.a))}function Lv(t){return new kv(t)}function Dv(t,e,i){t.f=i?Yv(e,!0):e,t.f&&(t.f=t.f.replace(/:$/,""))}function Fv(t,e,i){t.c=i?Yv(e,!0):e}function Nv(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.h=e}else t.h=null}function Bv(t,e,i){e instanceof Kv?(t.b=e,function(t,e){e&&!t.f&&(Zv(t),t.c=null,t.a.forEach((function(t,e){var i=e.toLowerCase();e!=i&&(Qv(this,e),$v(this,i,t))}),t)),t.f=e}(t.b,t.a)):(i||(e=zv(e,Hv)),t.b=new Kv(e,t.a))}function Uv(t,e,i){t.b.set(e,i)}function Vv(t){return Uv(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^gd()).toString(36)),t}function Yv(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function zv(t,e,i){return"string"==typeof t?(t=encodeURI(t).replace(e,Xv),i&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function Xv(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}kv.prototype.toString=function(){var t=[],e=this.f;e&&t.push(zv(e,Gv,!0),":");var i=this.c;return(i||"file"==e)&&(t.push("//"),(e=this.j)&&t.push(zv(e,Gv,!0),"@"),t.push(encodeURIComponent(String(i)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(i=this.h)&&t.push(":",String(i))),(i=this.g)&&(this.c&&"/"!=i.charAt(0)&&t.push("/"),t.push(zv(i,"/"==i.charAt(0)?jv:Wv,!0))),(i=this.b.toString())&&t.push("?",i),(i=this.i)&&t.push("#",zv(i,qv)),t.join("")};var Gv=/[#\/\?@]/g,Wv=/[#\?:]/g,jv=/[#\?]/g,Hv=/[#\?@]/g,qv=/#/g;function Kv(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function Zv(t){t.a||(t.a=new Rv,t.b=0,t.c&&function(t,e){if(t){t=t.split("&");for(var i=0;i<t.length;i++){var n=t[i].indexOf("="),r=null;if(0<=n){var s=t[i].substring(0,n);r=t[i].substring(n+1)}else s=t[i];e(s,r?decodeURIComponent(r.replace(/\+/g," ")):"")}}}(t.c,(function(e,i){t.add(decodeURIComponent(e.replace(/\+/g," ")),i)})))}function Qv(t,e){Zv(t),e=tg(t,e),Pv(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,Pv((t=t.a).b,e)&&(delete t.b[e],t.c--,t.a.length>2*t.c&&Mv(t)))}function Jv(t,e){return Zv(t),e=tg(t,e),Pv(t.a.b,e)}function $v(t,e,i){Qv(t,e),0<i.length&&(t.c=null,t.a.set(tg(t,e),bd(i)),t.b+=i.length)}function tg(t,e){return e=String(e),t.f&&(e=e.toLowerCase()),e}(nd=Kv.prototype).add=function(t,e){Zv(this),this.c=null,t=tg(this,t);var i=this.a.get(t);return i||this.a.set(t,i=[]),i.push(e),this.b+=1,this},nd.forEach=function(t,e){Zv(this),this.a.forEach((function(i,n){wd(i,(function(i){t.call(e,i,n,this)}),this)}),this)},nd.L=function(){Zv(this);for(var t=this.a.K(),e=this.a.L(),i=[],n=0;n<e.length;n++)for(var r=t[n],s=0;s<r.length;s++)i.push(e[n]);return i},nd.K=function(t){Zv(this);var e=[];if("string"==typeof t)Jv(this,t)&&(e=_d(e,this.a.get(tg(this,t))));else{t=this.a.K();for(var i=0;i<t.length;i++)e=_d(e,t[i])}return e},nd.set=function(t,e){return Zv(this),this.c=null,Jv(this,t=tg(this,t))&&(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},nd.get=function(t,e){return t&&0<(t=this.K(t)).length?String(t[0]):e},nd.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.L(),i=0;i<e.length;i++){var n=e[i],r=encodeURIComponent(String(n));n=this.K(n);for(var s=0;s<n.length;s++){var o=r;""!==n[s]&&(o+="="+encodeURIComponent(String(n[s]))),t.push(o)}}return this.c=t.join("&")};var eg=function(t,e){this.b=t,this.a=e};function ig(t){this.g=t||ng,od.PerformanceNavigationTiming?t=0<(t=od.performance.getEntriesByType("navigation")).length&&("hq"==t[0].nextHopProtocol||"h2"==t[0].nextHopProtocol):t=!!(od.ia&&od.ia.ya&&od.ia.ya()&&od.ia.ya().Lb),this.f=t?this.g:1,this.a=null,1<this.f&&(this.a=new Set),this.b=null,this.c=[]}var ng=10;function rg(t){return!!t.b||!!t.a&&t.a.size>=t.f}function sg(t){return t.b?1:t.a?t.a.size:0}function og(t,e){return t.b?t.b==e:!!t.a&&t.a.has(e)}function ag(t,e){t.a?t.a.add(e):t.b=e}function hg(t,e){t.b&&t.b==e?t.b=null:t.a&&t.a.has(e)&&t.a.delete(e)}function ug(t){var e,i;if(null!=t.b)return t.c.concat(t.b.s);if(null!=t.a&&0!==t.a.size){var n=t.c;try{for(var r=id(t.a.values()),s=r.next();!s.done;s=r.next()){var o=s.value;n=n.concat(o.s)}}catch(a){e={error:a}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error}}return n}return bd(t.c)}function lg(){}function cg(){this.a=new lg}function fg(t,e,i){var n=i||"";try{Ov(t,(function(t,i){var r=t;ud(t)&&(r=Cp(t)),e.push(n+i+"="+encodeURIComponent(r))}))}catch(lC){throw e.push(n+"type="+encodeURIComponent("_badmap")),lC}}function dg(t,e,i,n,r){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,r(n)}catch(s){}}ig.prototype.cancel=function(){var t,e;if(this.c=ug(this),this.b)this.b.cancel(),this.b=null;else if(this.a&&0!==this.a.size){try{for(var i=id(this.a.values()),n=i.next();!n.done;n=i.next()){n.value.cancel()}}catch(r){t={error:r}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.a.clear()}},lg.prototype.stringify=function(t){return od.JSON.stringify(t,void 0)},lg.prototype.parse=function(t){return od.JSON.parse(t,void 0)};var pg=od.JSON.parse;function vg(t){Ep.call(this),this.headers=new Rv,this.H=t||null,this.b=!1,this.s=this.a=null,this.B="",this.h=0,this.f="",this.g=this.A=this.l=this.u=!1,this.o=0,this.m=null,this.I=gg,this.D=this.F=!1}md(vg,Ep);var gg="",mg=/^https?$/i,yg=["POST","PUT"];function xg(t){return"content-type"==t.toLowerCase()}function wg(t,e){t.b=!1,t.a&&(t.g=!0,t.a.abort(),t.g=!1),t.f=e,t.h=5,_g(t),Tg(t)}function _g(t){t.u||(t.u=!0,Sp(t,"complete"),Sp(t,"error"))}function bg(t){if(t.b&&void 0!==sd&&(!t.s[1]||4!=Sg(t)||2!=t.W()))if(t.l&&4==Sg(t))Vp(t.za,0,t);else if(Sp(t,"readystatechange"),4==Sg(t)){t.b=!1;try{var e,i=t.W();t:switch(i){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var n=!0;break t;default:n=!1}if(!(e=n)){var r;if(r=0===i){var s=String(t.B).match(Iv)[1]||null;if(!s&&od.self&&od.self.location){var o=od.self.location.protocol;s=o.substr(0,o.length-1)}r=!mg.test(s?s.toLowerCase():"")}e=r}if(e)Sp(t,"complete"),Sp(t,"success");else{t.h=6;try{var a=2<Sg(t)?t.a.statusText:""}catch(h){a=""}t.f=a+" ["+t.W()+"]",_g(t)}}finally{Tg(t)}}}function Tg(t,e){if(t.a){Eg(t);var i=t.a,n=t.s[0]?ad:null;t.a=null,t.s=null,e||Sp(t,"ready");try{i.onreadystatechange=n}catch(lC){}}}function Eg(t){t.a&&t.D&&(t.a.ontimeout=null),t.m&&(od.clearTimeout(t.m),t.m=null)}function Sg(t){return t.a?t.a.readyState:0}function Ag(t,e,i){t:{for(n in i){var n=!1;break t}n=!0}n||(i=function(t){var e="";return Md(t,(function(t,i){e+=i,e+=":",e+=t,e+="\r\n"})),e}(i),"string"==typeof t?null!=i&&encodeURIComponent(String(i)):Uv(t,e,i))}function Cg(t,e,i){return i&&i.internalChannelParams&&i.internalChannelParams[t]||e}function Og(t){this.pa=0,this.g=[],this.c=new Hp,this.ga=this.la=this.B=this.fa=this.a=this.na=this.A=this.V=this.i=this.O=this.l=null,this.Oa=this.R=0,this.La=Cg("failFast",!1,t),this.H=this.m=this.j=this.h=this.f=null,this.S=!0,this.I=this.oa=this.P=-1,this.T=this.o=this.u=0,this.Ha=Cg("baseRetryDelayMs",5e3,t),this.Ra=Cg("retryDelaySeedMs",1e4,t),this.Ma=Cg("forwardChannelMaxRetries",2,t),this.ma=Cg("forwardChannelRequestTimeoutMs",2e4,t),this.Na=t&&t.g||void 0,this.D=void 0,this.C=t&&t.supportsCrossDomainXhr||!1,this.J="",this.b=new ig(t&&t.concurrentRequestLimit),this.ka=new cg,this.da=t&&t.fastHandshake||!1,this.Ia=t&&t.b||!1,t&&t.f&&(this.c.a=!1),t&&t.forceLongPolling&&(this.S=!1),this.U=!this.da&&this.S&&t&&t.detectBufferingProxy||!1,this.ea=void 0,this.N=0,this.F=!1,this.s=null,(this.Ka=t&&t.c||!1)&&this.c.info("Opt-in to enable Chrome Origin Trials.")}function Rg(t){if(Pg(t),3==t.v){var e=t.R++,i=Lv(t.B);Uv(i,"SID",t.J),Uv(i,"RID",e),Uv(i,"TYPE","terminate"),Dg(t,i),(e=new pv(t,t.c,e,void 0)).H=2,e.i=Vv(Lv(i)),i=!1,od.navigator&&od.navigator.sendBeacon&&(i=od.navigator.sendBeacon(e.i.toString(),"")),!i&&od.Image&&((new Image).src=e.i,i=!0),i||(e.a=Hg(e.g,null),e.a.ba(e.i)),e.u=gd(),bv(e)}Wg(t)}function Mg(t){t.a&&(Ug(t),t.a.cancel(),t.a=null)}function Pg(t){Mg(t),t.j&&(od.clearTimeout(t.j),t.j=null),Yg(t),t.b.cancel(),t.h&&("number"==typeof t.h&&od.clearTimeout(t.h),t.h=null)}function Ig(t,e){t.g.push(new eg(t.Oa++,e)),3==t.v&&kg(t)}function kg(t){rg(t.b)||t.h||(t.h=!0,Lp(t.Ba,t),t.u=0)}function Lg(t,e){var i;i=e?e.f:t.R++;var n=Lv(t.B);Uv(n,"SID",t.J),Uv(n,"RID",i),Uv(n,"AID",t.P),Dg(t,n),t.i&&t.l&&Ag(n,t.i,t.l),i=new pv(t,t.c,i,t.u+1),null===t.i&&(i.B=t.l),e&&(t.g=e.s.concat(t.g)),e=Fg(t,i,1e3),i.setTimeout(Math.round(.5*t.ma)+Math.round(.5*t.ma*Math.random())),ag(t.b,i),yv(i,n,e)}function Dg(t,e){t.f&&Ov({},(function(t,i){Uv(e,i,t)}))}function Fg(t,e,i){i=Math.min(t.g.length,i);var n=t.f?pd(t.f.Ja,t.f,t):null;t:for(var r=t.g,s=-1;;){var o=["count="+i];-1==s?0<i?(s=r[0].b,o.push("ofs="+s)):s=0:o.push("ofs="+s);for(var a=!0,h=0;h<i;h++){var u=r[h].b,l=r[h].a;if(0>(u-=s))s=Math.max(0,r[h].b-100),a=!1;else try{fg(l,o,"req"+u+"_")}catch(c){n&&n(l)}}if(a){n=o.join("&");break t}}return t=t.g.splice(0,i),e.s=t,n}function Ng(t){t.a||t.j||(t.T=1,Lp(t.Aa,t),t.o=0)}function Bg(t){return!(t.a||t.j||3<=t.o)&&(t.T++,t.j=nv(pd(t.Aa,t),Xg(t,t.o)),t.o++,!0)}function Ug(t){null!=t.s&&(od.clearTimeout(t.s),t.s=null)}function Vg(t){t.a=new pv(t,t.c,"rpc",t.T),null===t.i&&(t.a.B=t.l),t.a.O=0;var e=Lv(t.la);Uv(e,"RID","rpc"),Uv(e,"SID",t.J),Uv(e,"CI",t.H?"0":"1"),Uv(e,"AID",t.P),Dg(t,e),Uv(e,"TYPE","xmlhttp"),t.i&&t.l&&Ag(e,t.i,t.l),t.D&&t.a.setTimeout(t.D);var i=t.a;t=t.ga,i.H=1,i.i=Vv(Lv(e)),i.j=null,i.I=!0,xv(i,t)}function Yg(t){null!=t.m&&(od.clearTimeout(t.m),t.m=null)}function zg(t,e){var i=null;if(t.a==e){Yg(t),Ug(t),t.a=null;var n=2}else{if(!og(t.b,e))return;i=e.s,hg(t.b,e),n=1}if(t.I=e.N,0!=t.v)if(e.b)if(1==n){i=e.j?e.j.length:0,e=gd()-e.u;var r=t.u;Sp(n=Qp(),new iv(n,i,e,r)),kg(t)}else Ng(t);else if(3==(r=e.h)||0==r&&0<t.I||!(1==n&&function(t,e){return!(sg(t.b)>=t.b.f-(t.h?1:0)||(t.h?(t.g=e.s.concat(t.g),0):1==t.v||2==t.v||t.u>=(t.La?0:t.Ma)||(t.h=nv(pd(t.Ba,t,e),Xg(t,t.u)),t.u++,0)))}(t,e)||2==n&&Bg(t)))switch(i&&0<i.length&&(e=t.b,e.c=e.c.concat(i)),r){case 1:Gg(t,5);break;case 4:Gg(t,10);break;case 3:Gg(t,6);break;default:Gg(t,2)}}function Xg(t,e){var i=t.Ha+Math.floor(Math.random()*t.Ra);return t.f||(i*=2),i*e}function Gg(t,e){if(t.c.info("Error code "+e),2==e){var i=null;t.f&&(i=null);var n=pd(t.Ya,t);i||(i=new kv("//www.google.com/images/cleardot.gif"),od.location&&"http"==od.location.protocol||Dv(i,"https"),Vv(i)),function(t,e){var i=new Hp;if(od.Image){var n=new Image;n.onload=vd(dg,i,n,"TestLoadImage: loaded",!0,e),n.onerror=vd(dg,i,n,"TestLoadImage: error",!1,e),n.onabort=vd(dg,i,n,"TestLoadImage: abort",!1,e),n.ontimeout=vd(dg,i,n,"TestLoadImage: timeout",!1,e),od.setTimeout((function(){n.ontimeout&&n.ontimeout()}),1e4),n.src=t}else e(!1)}(i.toString(),n)}else ev(2);t.v=0,t.f&&t.f.ra(e),Wg(t),Pg(t)}function Wg(t){t.v=0,t.I=-1,t.f&&(0==ug(t.b).length&&0==t.g.length||(t.b.c.length=0,bd(t.g),t.g.length=0),t.f.qa())}function jg(t,e,i){var n=function(t){return t instanceof kv?Lv(t):new kv(t,void 0)}(i);if(""!=n.c)e&&Fv(n,e+"."+n.c),Nv(n,n.h);else{var r=od.location;n=function(t,e,i,n){var r=new kv(null,void 0);return t&&Dv(r,t),e&&Fv(r,e),i&&Nv(r,i),n&&(r.g=n),r}(r.protocol,e?e+"."+r.hostname:r.hostname,+r.port,i)}return t.V&&Md(t.V,(function(t,e){Uv(n,e,t)})),e=t.A,i=t.na,e&&i&&Uv(n,e,i),Uv(n,"VER",t.ha),Dg(t,n),n}function Hg(t,e){if(e&&!t.C)throw Error("Can't create secondary domain capable XhrIo object.");return(e=new vg(t.Na)).F=t.C,e}function qg(){}function Kg(){if(Bd&&!(10<=Number(Qd)))throw Error("Environmental error: no available transport.")}function Zg(t,e){Ep.call(this),this.a=new Og(e),this.o=t,this.b=e&&e.messageUrlParams||null,t=e&&e.messageHeaders||null,e&&e.clientProtocolHeaderRequired&&(t?t["X-Client-Protocol"]="webchannel":t={"X-Client-Protocol":"webchannel"}),this.a.l=t,t=e&&e.initMessageHeaders||null,e&&e.messageContentType&&(t?t["X-WebChannel-Content-Type"]=e.messageContentType:t={"X-WebChannel-Content-Type":e.messageContentType}),e&&e.a&&(t?t["X-WebChannel-Client-Profile"]=e.a:t={"X-WebChannel-Client-Profile":e.a}),this.a.O=t,(t=e&&e.httpHeadersOverwriteParam)&&!Td(t)&&(this.a.i=t),this.m=e&&e.supportsCrossDomainXhr||!1,this.l=e&&e.sendRawJson||!1,(e=e&&e.httpSessionIdParam)&&!Td(e)&&(this.a.A=e,null!==(t=this.b)&&e in t&&(e in(t=this.b)&&delete t[e])),this.f=new $g(this)}function Qg(t){cv.call(this);var e=t.__sm__;if(e){t:{for(var i in e){t=i;break t}t=void 0}(this.c=t)?(t=this.c,this.data=null!==e&&t in e?e[t]:void 0):this.data=e}else this.data=t}function Jg(){fv.call(this),this.status=1}function $g(t){this.a=t}(nd=vg.prototype).ba=function(t,e,i,n){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.B+"; newUri="+t);e=e?e.toUpperCase():"GET",this.B=t,this.f="",this.h=0,this.u=!1,this.b=!0,this.a=new XMLHttpRequest,this.s=this.H?av(this.H):av(uv),this.a.onreadystatechange=pd(this.za,this);try{this.A=!0,this.a.open(e,String(t),!0),this.A=!1}catch(s){return void wg(this,s)}t=i||"";var r=new Rv(this.headers);n&&Ov(n,(function(t,e){r.set(e,t)})),n=function(t){t:{for(var e=xg,i=t.length,n="string"==typeof t?t.split(""):t,r=0;r<i;r++)if(r in n&&e.call(void 0,n[r],r,t)){e=r;break t}e=-1}return 0>e?null:"string"==typeof t?t.charAt(e):t[e]}(r.L()),i=od.FormData&&t instanceof od.FormData,!(0<=xd(yg,e))||n||i||r.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),r.forEach((function(t,e){this.a.setRequestHeader(e,t)}),this),this.I&&(this.a.responseType=this.I),"withCredentials"in this.a&&this.a.withCredentials!==this.F&&(this.a.withCredentials=this.F);try{Eg(this),0<this.o&&((this.D=function(t){return Bd&&Kd(9)&&"number"==typeof t.timeout&&void 0!==t.ontimeout}(this.a))?(this.a.timeout=this.o,this.a.ontimeout=pd(this.xa,this)):this.m=Vp(this.xa,this.o,this)),this.l=!0,this.a.send(t),this.l=!1}catch(s){wg(this,s)}},nd.xa=function(){void 0!==sd&&this.a&&(this.f="Timed out after "+this.o+"ms, aborting",this.h=8,Sp(this,"timeout"),this.abort(8))},nd.abort=function(t){this.a&&this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1,this.h=t||7,Sp(this,"complete"),Sp(this,"abort"),Tg(this))},nd.G=function(){this.a&&(this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1),Tg(this,!0)),vg.X.G.call(this)},nd.za=function(){this.j||(this.A||this.l||this.g?bg(this):this.Ua())},nd.Ua=function(){bg(this)},nd.W=function(){try{return 2<Sg(this)?this.a.status:-1}catch(Fd){return-1}},nd.$=function(){try{return this.a?this.a.responseText:""}catch(Fd){return""}},nd.Pa=function(t){if(this.a){var e=this.a.responseText;return t&&0==e.indexOf(t)&&(e=e.substring(t.length)),pg(e)}},nd.ua=function(){return this.h},nd.Qa=function(){return"string"==typeof this.f?this.f:String(this.f)},(nd=Og.prototype).ha=8,nd.v=1,nd.Ba=function(t){if(this.h)if(this.h=null,1==this.v){if(!t){this.R=Math.floor(1e5*Math.random()),t=this.R++;var e,i=new pv(this,this.c,t,void 0),n=this.l;if(this.O&&(n?kd(n=Pd(n),this.O):n=this.O),null===this.i&&(i.B=n),this.da)t:{for(var r=e=0;r<this.g.length;r++){var s=this.g[r];if(void 0===(s="__data__"in s.a&&"string"==typeof(s=s.a.__data__)?s.length:void 0))break;if(4096<(e+=s)){e=r;break t}if(4096===e||r===this.g.length-1){e=r+1;break t}}e=1e3}else e=1e3;e=Fg(this,i,e),Uv(r=Lv(this.B),"RID",t),Uv(r,"CVER",22),this.A&&Uv(r,"X-HTTP-Session-Id",this.A),Dg(this,r),this.i&&n&&Ag(r,this.i,n),ag(this.b,i),this.Ia&&Uv(r,"TYPE","init"),this.da?(Uv(r,"$req",e),Uv(r,"SID","null"),i.U=!0,yv(i,r,null)):yv(i,r,e),this.v=2}}else 3==this.v&&(t?Lg(this,t):0==this.g.length||rg(this.b)||Lg(this))},nd.Aa=function(){if(this.j=null,Vg(this),this.U&&!(this.F||null==this.a||0>=this.N)){var t=2*this.N;this.c.info("BP detection timer enabled: "+t),this.s=nv(pd(this.Ta,this),t)}},nd.Ta=function(){this.s&&(this.s=null,this.c.info("BP detection timeout reached."),this.c.info("Buffering proxy detected and switch to long-polling!"),this.H=!1,this.F=!0,ev(10),Mg(this),Vg(this))},nd.Sa=function(){null!=this.m&&(this.m=null,Mg(this),Bg(this),ev(19))},nd.Ya=function(t){t?(this.c.info("Successfully pinged google.com"),ev(2)):(this.c.info("Failed to ping google.com"),ev(1))},(nd=qg.prototype).ta=function(){},nd.sa=function(){},nd.ra=function(){},nd.qa=function(){},nd.Ja=function(){},Kg.prototype.a=function(t,e){return new Zg(t,e)},md(Zg,Ep),Zg.prototype.g=function(){this.a.f=this.f,this.m&&(this.a.C=!0);var t=this.a,e=this.o,i=this.b||void 0;ev(0),t.fa=e,t.V=i||{},t.H=t.S,t.B=jg(t,null,t.fa),kg(t)},Zg.prototype.close=function(){Rg(this.a)},Zg.prototype.h=function(t){if("string"==typeof t){var e={};e.__data__=t,Ig(this.a,e)}else this.l?((e={}).__data__=Cp(t),Ig(this.a,e)):Ig(this.a,t)},Zg.prototype.G=function(){this.a.f=null,delete this.f,Rg(this.a),delete this.a,Zg.X.G.call(this)},md(Qg,cv),md(Jg,fv),md($g,qg),$g.prototype.ta=function(){Sp(this.a,"a")},$g.prototype.sa=function(t){Sp(this.a,new Qg(t))},$g.prototype.ra=function(t){Sp(this.a,new Jg(t))},$g.prototype.qa=function(){Sp(this.a,"b")},Kg.prototype.createWebChannel=Kg.prototype.a,Zg.prototype.send=Zg.prototype.h,Zg.prototype.open=Zg.prototype.g,Zg.prototype.close=Zg.prototype.close,rv.NO_ERROR=0,rv.TIMEOUT=8,rv.HTTP_ERROR=6,sv.COMPLETE="complete",hv.EventType=lv,lv.OPEN="a",lv.CLOSE="b",lv.ERROR="c",lv.MESSAGE="d",Ep.prototype.listen=Ep.prototype.va,vg.prototype.listenOnce=vg.prototype.wa,vg.prototype.getLastError=vg.prototype.Qa,vg.prototype.getLastErrorCode=vg.prototype.ua,vg.prototype.getStatus=vg.prototype.W,vg.prototype.getResponseJson=vg.prototype.Pa,vg.prototype.getResponseText=vg.prototype.$,vg.prototype.send=vg.prototype.ba;var tm=rv,em=sv,im=Kp,nm=10,rm=11,sm=hv,om=vg,am=function(t,e,i,n,r,s){this.t=t,this.persistenceKey=e,this.host=i,this.ssl=n,this.forceLongPolling=r,this.i=s},hm=function(){function t(t,e){this.projectId=t,this.database=e||"(default)"}return Object.defineProperty(t.prototype,"o",{get:function(){return"(default)"===this.database},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){return e instanceof t&&e.projectId===this.projectId&&e.database===this.database},t}(),um=new Nf("@firebase/firestore");function lm(){return um.logLevel}function cm(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(um.logLevel<=Rf.DEBUG){var n=e.map(pm);um.debug.apply(um,cf(["Firestore (8.2.9): "+t],n))}}function fm(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(um.logLevel<=Rf.ERROR){var n=e.map(pm);um.error.apply(um,cf(["Firestore (8.2.9): "+t],n))}}function dm(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(um.logLevel<=Rf.WARN){var n=e.map(pm);um.warn.apply(um,cf(["Firestore (8.2.9): "+t],n))}}function pm(t){if("string"==typeof t)return t;try{return e=t,JSON.stringify(e)}catch(i){return t} 7170/** 7171 * @license 7172 * Copyright 2020 Google LLC 7173 * 7174 * Licensed under the Apache License, Version 2.0 (the "License"); 7175 * you may not use this file except in compliance with the License. 7176 * You may obtain a copy of the License at 7177 * 7178 * http://www.apache.org/licenses/LICENSE-2.0 7179 * 7180 * Unless required by applicable law or agreed to in writing, software 7181 * distributed under the License is distributed on an "AS IS" BASIS, 7182 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7183 * See the License for the specific language governing permissions and 7184 * limitations under the License. 7185 */var e} 7186/** 7187 * @license 7188 * Copyright 2017 Google LLC 7189 * 7190 * Licensed under the Apache License, Version 2.0 (the "License");
7191 * you may not use this file except in compliance with the License. 7192 * You may obtain a copy of the License at 7193 * 7194 * http://www.apache.org/licenses/LICENSE-2.0 7195 * 7196 * Unless required by applicable law or agreed to in writing, software 7197 * distributed under the License is distributed on an "AS IS" BASIS, 7198 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7199 * See the License for the specific language governing permissions and 7200 * limitations under the License. 7201 */function vm(t){void 0===t&&(t="Unexpected state");var e="FIRESTORE (8.2.9) INTERNAL ASSERTION FAILED: "+t;throw fm(e),new Error(e)}function gm(t,e){t||vm()}function mm(t,e){return t} 7202/** 7203 * @license 7204 * Copyright 2020 Google LLC 7205 * 7206 * Licensed under the Apache License, Version 2.0 (the "License"); 7207 * you may not use this file except in compliance with the License. 7208 * You may obtain a copy of the License at 7209 * 7210 * http://www.apache.org/licenses/LICENSE-2.0 7211 * 7212 * Unless required by applicable law or agreed to in writing, software 7213 * distributed under the License is distributed on an "AS IS" BASIS, 7214 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7215 * See the License for the specific language governing permissions and 7216 * limitations under the License. 7217 */function ym(t){var e="undefined"!=typeof self&&(self.crypto||self.msCrypto),i=new Uint8Array(t);if(e&&"function"==typeof e.getRandomValues)e.getRandomValues(i);else for(var n=0;n<t;n++)i[n]=Math.floor(256*Math.random());return i} 7218/** 7219 * @license 7220 * Copyright 2017 Google LLC 7221 * 7222 * Licensed under the Apache License, Version 2.0 (the "License"); 7223 * you may not use this file except in compliance with the License. 7224 * You may obtain a copy of the License at 7225 * 7226 * http://www.apache.org/licenses/LICENSE-2.0 7227 * 7228 * Unless required by applicable law or agreed to in writing, software 7229 * distributed under the License is distributed on an "AS IS" BASIS, 7230 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7231 * See the License for the specific language governing permissions and 7232 * limitations under the License. 7233 */var xm=function(){function t(){}return t.u=function(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e=Math.floor(256/t.length)*t.length,i="";i.length<20;)for(var n=ym(40),r=0;r<n.length;++r)i.length<20&&n[r]<e&&(i+=t.charAt(n[r]%t.length));return i},t}();function wm(t,e){return t<e?-1:t>e?1:0}function _m(t,e,i){return t.length===e.length&&t.every((function(t,n){return i(t,e[n])}))}function bm(t){return t+"\0"} 7234/** 7235 * @license 7236 * Copyright 2020 Google LLC 7237 * 7238 * Licensed under the Apache License, Version 2.0 (the "License"); 7239 * you may not use this file except in compliance with the License. 7240 * You may obtain a copy of the License at 7241 * 7242 * http://www.apache.org/licenses/LICENSE-2.0 7243 * 7244 * Unless required by applicable law or agreed to in writing, software 7245 * distributed under the License is distributed on an "AS IS" BASIS, 7246 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7247 * See the License for the specific language governing permissions and 7248 * limitations under the License. 7249 */var Tm=function(){function t(t){this.h=t}return t.fromBase64String=function(e){return new t(atob(e))},t.fromUint8Array=function(e){return new t(function(t){for(var e="",i=0;i<t.length;++i)e+=String.fromCharCode(t[i]);return e}(e))},t.prototype.toBase64=function(){return t=this.h,btoa(t);var t},t.prototype.toUint8Array=function(){return function(t){for(var e=new Uint8Array(t.length),i=0;i<t.length;i++)e[i]=t.charCodeAt(i);return e}(this.h)},t.prototype.l=function(){return 2*this.h.length},t.prototype._=function(t){return wm(this.h,t.h)},t.prototype.isEqual=function(t){return this.h===t.h},t}();Tm.T=new Tm("");var Em={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENT
7249ED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},Sm=function(t){function e(e,i){var n=this;return(n=t.call(this,i)||this).code=e,n.message=i,n.name="FirebaseError",n.toString=function(){return n.name+": [code="+n.code+"]: "+n.message},n}return sf(e,t),e}(Error),Am=function(){function t(t){this.I=t}return t.fromBase64String=function(e){try{return new t(Tm.fromBase64String(e))}catch(i){throw new Sm(Em.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+i)}},t.fromUint8Array=function(e){return new t(Tm.fromUint8Array(e))},t.prototype.toBase64=function(){return this.I.toBase64()},t.prototype.toUint8Array=function(){return this.I.toUint8Array()},t.prototype.toString=function(){return"Bytes(base64: "+this.toBase64()+")"},t.prototype.isEqual=function(t){return this.I.isEqual(t.I)},t}(),Cm=function(){function t(t){this.uid=t}return t.prototype.m=function(){return null!=this.uid},t.prototype.A=function(){return this.m()?"uid:"+this.uid:"anonymous-user"},t.prototype.isEqual=function(t){return t.uid===this.uid},t}();Cm.UNAUTHENTICATED=new Cm(null),Cm.R=new Cm("google-credentials-uid"),Cm.P=new Cm("first-party-uid"); 7250/** 7251 * @license 7252 * Copyright 2017 Google LLC 7253 * 7254 * Licensed under the Apache License, Version 2.0 (the "License"); 7255 * you may not use this file except in compliance with the License. 7256 * You may obtain a copy of the License at 7257 * 7258 * http://www.apache.org/licenses/LICENSE-2.0 7259 * 7260 * Unless required by applicable law or agreed to in writing, software 7261 * distributed under the License is distributed on an "AS IS" BASIS, 7262 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7263 * See the License for the specific language governing permissions and 7264 * limitations under the License. 7265 */ 7266var Om=function(t,e){this.user=e,this.type="OAuth",this.g={},this.g.Authorization="Bearer "+t},Rm=function(){function t(){this.V=null}return t.prototype.getToken=function(){return Promise.resolve(null)},t.prototype.p=function(){},t.prototype.v=function(t){this.V=t,t(Cm.UNAUTHENTICATED)},t.prototype.S=function(){this.V=null},t}(),Mm=function(){function t(t){var e=this;this.D=null,this.currentUser=Cm.UNAUTHENTICATED,this.C=!1,this.N=0,this.V=null,this.forceRefresh=!1,this.D=function(){e.N++,e.currentUser=e.$(),e.C=!0,e.V&&e.V(e.currentUser)},this.N=0,this.auth=t.getImmediate({optional:!0}),this.auth?this.auth.addAuthTokenListener(this.D):(this.D(null),t.get().then((function(t){e.auth=t,e.D&&e.auth.addAuthTokenListener(e.D)}),(function(){})))}return t.prototype.getToken=function(){var t=this,e=this.N,i=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(i).then((function(i){return t.N!==e?(cm("FirebaseCredentialsProvider","getToken aborted due to token change."),t.getToken()):i?(gm("string"==typeof i.accessToken),new Om(i.accessToken,t.currentUser)):null})):Promise.resolve(null)},t.prototype.p=function(){this.forceRefresh=!0},t.prototype.v=function(t){this.V=t,this.C&&t(this.currentUser)},t.prototype.S=function(){this.auth&&this.auth.removeAuthTokenListener(this.D),this.D=null,this.V=null},t.prototype.$=function(){var t=this.auth&&this.auth.getUid();return gm(null===t||"string"==typeof t),new Cm(t)},t}(),Pm=function(){function t(t,e){this.F=t,this.O=e,this.type="FirstParty",this.user=Cm.P}return Object.defineProperty(t.prototype,"g",{get:function(){var t={"X-Goog-AuthUser":this.O},e=this.F.auth.getAuthHeaderValueForFirstParty([]);return e&&(t.Authorization=e),t},enumerable:!1,configurable:!0}),t}(),Im=function(){function t(t,e){this.F=t,this.O=e}return t.prototype.getToken=function(){return Promise.resolve(new Pm(this.F,this.O))},t.prototype.v=function(t){t(Cm.P)},t.prototype.S=function(){},t.prototype.p=function(){},t}(),km=function(){function t(t,e){var i=this;this.previousValue=t,e&&(e.k=function(t){return i.M(t)},this.L=function(t){return e.B(t)})}return t.prototype.M=function(t){return this.previousValue=Math.max(t,this.previousValue),this.previousValue},t.prototype.next=function(){var t=++this.previousValue;return this.L&&this.L(t),t},t}();km.q=-1;var Lm=function(){function t(t,e){if(this.seconds=t,this.nanoseconds=e,e<0)throw new Sm(Em.INVA
7266LID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(e>=1e9)throw new Sm(Em.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(t<-62135596800)throw new Sm(Em.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new Sm(Em.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return t.now=function(){return t.fromMillis(Date.now())},t.fromDate=function(e){return t.fromMillis(e.getTime())},t.fromMillis=function(e){var i=Math.floor(e/1e3);return new t(i,1e6*(e-1e3*i))},t.prototype.toDate=function(){return new Date(this.toMillis())},t.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},t.prototype.U=function(t){return this.seconds===t.seconds?wm(this.nanoseconds,t.nanoseconds):wm(this.seconds,t.seconds)},t.prototype.isEqual=function(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds},t.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},t.prototype.toJSON=function(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}},t.prototype.valueOf=function(){var t=this.seconds- -62135596800;return String(t).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")},t}(),Dm=function(){function t(t){this.timestamp=t}return t.K=function(e){return new t(e)},t.min=function(){return new t(new Lm(0,0))},t.prototype._=function(t){return this.timestamp.U(t.timestamp)},t.prototype.isEqual=function(t){return this.timestamp.isEqual(t.timestamp)},t.prototype.W=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},t.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},t.prototype.j=function(){return this.timestamp},t}(),Fm=function(){function t(t,e,i){void 0===e?e=0:e>t.length&&vm(),void 0===i?i=t.length-e:i>t.length-e&&vm(),this.segments=t,this.offset=e,this.G=i}return Object.defineProperty(t.prototype,"length",{get:function(){return this.G},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){return 0===t.H(this,e)},t.prototype.child=function(e){var i=this.segments.slice(this.offset,this.limit());return e instanceof t?e.forEach((function(t){i.push(t)})):i.push(e),this.J(i)},t.prototype.limit=function(){return this.offset+this.length},t.prototype.Y=function(t){return t=void 0===t?1:t,this.J(this.segments,this.offset+t,this.length-t)},t.prototype.X=function(){return this.J(this.segments,this.offset,this.length-1)},t.prototype.Z=function(){return this.segments[this.offset]},t.prototype.tt=function(){return this.get(this.length-1)},t.prototype.get=function(t){return this.segments[this.offset+t]},t.prototype.et=function(){return 0===this.length},t.prototype.nt=function(t){if(t.length<this.length)return!1;for(var e=0;e<this.length;e++)if(this.get(e)!==t.get(e))return!1;return!0},t.prototype.st=function(t){if(this.length+1!==t.length)return!1;for(var e=0;e<this.length;e++)if(this.get(e)!==t.get(e))return!1;return!0},t.prototype.forEach=function(t){for(var e=this.offset,i=this.limit();e<i;e++)t(this.segments[e])},t.prototype.it=function(){return this.segments.slice(this.offset,this.limit())},t.H=function(t,e){for(var i=Math.min(t.length,e.length),n=0;n<i;n++){var r=t.get(n),s=e.get(n);if(r<s)return-1;if(r>s)return 1}return t.length<e.length?-1:t.length>e.length?1:0},t}(),Nm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return sf(e,t),e.prototype.J=function(t,i,n){return new e(t,i,n)},e.prototype.rt=function(){return this.it().join("/")},e.prototype.toString=function(){return this.rt()},e.ot=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];for(var n=[],r=0,s=t;r<s.length;r++){var o=s[r];if(o.indexOf("//")>=0)throw new Sm(Em.INVALID_ARGUMENT,"Invalid segment ("+o+"). Paths must not contain // in them.");n.push.apply(n,o.split("/").filter((function(t){return t.length>0})))}return new e(n)},e.ct=function(){return new e([])},e}(Fm),Bm=/^[_a-zA-Z][_a-zA-Z0-9]*$/,Um=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return sf(e,t),e.prototype.J=function(t,i,n){return new e(t,i,n)},e.at=function(t){return Bm.test(t)},e.prototype.rt=function(){return this.it().map((function(t){return t=t.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),e.at(t)||(t="`"+t+"`"),t})).join(".")},e.prototype.toString=function(){return this.rt()},e.prototype.ut=function(){return 1===this.length&&"__name__"===this.get(0)},e.ht=function(){return new e(["__name__"])},e.lt=function(t){for(var i=[],n="",r=0,s=function(){if(0===n.length)throw new Sm(Em.INVA
7266LID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");i.push(n),n=""},o=!1;r<t.length;){var a=t[r];if("\\"===a){if(r+1===t.length)throw new Sm(Em.INVALID_ARGUMENT,"Path has trailing escape character: "+t);var h=t[r+1];if("\\"!==h&&"."!==h&&"`"!==h)throw new Sm(Em.INVALID_ARGUMENT,"Path has invalid escape sequence: "+t);n+=h,r+=2}else"`"===a?(o=!o,r++):"."!==a||o?(n+=a,r++):(s(),r++)}if(s(),o)throw new Sm(Em.INVALID_ARGUMENT,"Unterminated ` in path: "+t);return new e(i)},e.ct=function(){return new e([])},e}(Fm),Vm=function(){function t(t){this.path=t}return t._t=function(e){return new t(Nm.ot(e))},t.ft=function(e){return new t(Nm.ot(e).Y(5))},t.prototype.dt=function(t){return this.path.length>=2&&this.path.get(this.path.length-2)===t},t.prototype.isEqual=function(t){return null!==t&&0===Nm.H(this.path,t.path)},t.prototype.toString=function(){return this.path.toString()},t.H=function(t,e){return Nm.H(t.path,e.path)},t.wt=function(t){return t.length%2==0},t.Et=function(e){return new t(new Nm(e.slice()))},t}(); 7267/** 7268 * @license 7269 * Copyright 2017 Google LLC 7270 * 7271 * Licensed under the Apache License, Version 2.0 (the "License"); 7272 * you may not use this file except in compliance with the License. 7273 * You may obtain a copy of the License at 7274 * 7275 * http://www.apache.org/licenses/LICENSE-2.0 7276 * 7277 * Unless required by applicable law or agreed to in writing, software 7278 * distributed under the License is distributed on an "AS IS" BASIS, 7279 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7280 * See the License for the specific language governing permissions and 7281 * limitations under the License. 7282 */ 7283/** 7284 * @license 7285 * Copyright 2017 Google LLC 7286 * 7287 * Licensed under the Apache License, Version 2.0 (the "License"); 7288 * you may not use this file except in compliance with the License. 7289 * You may obtain a copy of the License at 7290 * 7291 * http://www.apache.org/licenses/LICENSE-2.0 7292 * 7293 * Unless required by applicable law or agreed to in writing, software 7294 * distributed under the License is distributed on an "AS IS" BASIS, 7295 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7296 * See the License for the specific language governing permissions and 7297 * limitations under the License. 7298 */function Ym(t){var e=0;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e++;return e}function zm(t,e){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e(i,t[i])}function Xm(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0} 7299/** 7300 * @license 7301 * Copyright 2020 Google LLC 7302 * 7303 * Licensed under the Apache License, Version 2.0 (the "License"); 7304 * you may not use this file except in compliance with the License. 7305 * You may obtain a copy of the License at 7306 * 7307 * http://www.apache.org/licenses/LICENSE-2.0 7308 * 7309 * Unless required by applicable law or agreed to in writing, software 7310 * distributed under the License is distributed on an "AS IS" BASIS, 7311 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7312 * See the License for the specific language governing permissions and 7313 * limitations under the License. 7314 */var Gm=function(){function t(t){this.fields=t,t.sort(Um.H)}return t.prototype.Tt=function(t){for(var e=0,i=this.fields;e<i.length;e++)if(i[e].nt(t))return!0;return!1},t.prototype.isEqual=function(t){return _m(this.fields,t.fields,(function(t,e){return t.isEqual(e)}))},t}(),Wm=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/); 7315/** 7316 * @license 7317 * Copyright 2020 Google LLC 7318 * 7319 * Licensed under the Apache License, Version 2.0 (the "License"); 7320 * you may not use this file except in compliance with the License. 7321 * You may obtain a copy of the License at 7322 * 7323 * http://www.apache.org/licenses/LICENSE-2.0 7324 * 7325 * Unless required by applicable law or agreed to in writing, software 7326 * distributed under the License is distributed on an "AS IS" BASIS, 7327 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7328 * See the License for the specific language governing permissions and 7329 * limitations under the License. 7330 */function jm(t){if(gm(!!t),"string"==typeof t){var e=0,i=Wm.exec(t);if(gm(!!i),i[1]){var n=i[1];n=(n+"000000000").substr(0,9),e=Number(n)}
7330var r=new Date(t);return{seconds:Math.floor(r.getTime()/1e3),nanos:e}}return{seconds:Hm(t.seconds),nanos:Hm(t.nanos)}}function Hm(t){return"number"==typeof t?t:"string"==typeof t?Number(t):0}function qm(t){return"string"==typeof t?Tm.fromBase64String(t):Tm.fromUint8Array(t)} 7331/** 7332 * @license 7333 * Copyright 2020 Google LLC 7334 * 7335 * Licensed under the Apache License, Version 2.0 (the "License"); 7336 * you may not use this file except in compliance with the License. 7337 * You may obtain a copy of the License at 7338 * 7339 * http://www.apache.org/licenses/LICENSE-2.0 7340 * 7341 * Unless required by applicable law or agreed to in writing, software 7342 * distributed under the License is distributed on an "AS IS" BASIS, 7343 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7344 * See the License for the specific language governing permissions and 7345 * limitations under the License. 7346 */function Km(t){var e,i;return"server_timestamp"===(null===(i=((null===(e=null==t?void 0:t.mapValue)||void 0===e?void 0:e.fields)||{}).__type__)||void 0===i?void 0:i.stringValue)}function Zm(t){var e=t.mapValue.fields.__previous_value__;return Km(e)?Zm(e):e}function Qm(t){var e=jm(t.mapValue.fields.__local_write_time__.timestampValue);return new Lm(e.seconds,e.nanos)} 7347/** 7348 * @license 7349 * Copyright 2017 Google LLC 7350 * 7351 * Licensed under the Apache License, Version 2.0 (the "License"); 7352 * you may not use this file except in compliance with the License. 7353 * You may obtain a copy of the License at 7354 * 7355 * http://www.apache.org/licenses/LICENSE-2.0 7356 * 7357 * Unless required by applicable law or agreed to in writing, software 7358 * distributed under the License is distributed on an "AS IS" BASIS, 7359 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7360 * See the License for the specific language governing permissions and 7361 * limitations under the License. 7362 */function Jm(t){return null==t}function $m(t){return 0===t&&1/t==-1/0}function ty(t){return"number"==typeof t&&Number.isInteger(t)&&!$m(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER} 7363/** 7364 * @license 7365 * Copyright 2020 Google LLC 7366 * 7367 * Licensed under the Apache License, Version 2.0 (the "License"); 7368 * you may not use this file except in compliance with the License. 7369 * You may obtain a copy of the License at 7370 * 7371 * http://www.apache.org/licenses/LICENSE-2.0 7372 * 7373 * Unless required by applicable law or agreed to in writing, software 7374 * distributed under the License is distributed on an "AS IS" BASIS, 7375 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7376 * See the License for the specific language governing permissions and 7377 * limitations under the License. 7378 */function ey(t){return"nullValue"in t?0:"booleanValue"in t?1:"integerValue"in t||"doubleValue"in t?2:"timestampValue"in t?3:"stringValue"in t?5:"bytesValue"in t?6:"referenceValue"in t?7:"geoPointValue"in t?8:"arrayValue"in t?9:"mapValue"in t?Km(t)?4:10:vm()}function iy(t,e){var i,n=ey(t);if(n!==ey(e))return!1;switch(n){case 0:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return Qm(t).isEqual(Qm(e));case 3:return function(t,e){if("string"==typeof t.timestampValue&&"string"==typeof e.timestampValue&&t.timestampValue.length===e.timestampValue.length)return t.timestampValue===e.timestampValue;var i=jm(t.timestampValue),n=jm(e.timestampValue);return i.seconds===n.seconds&&i.nanos===n.nanos}(t,e);case 5:return t.stringValue===e.stringValue;case 6:return i=e,qm(t.bytesValue).isEqual(qm(i.bytesValue));case 7:return t.referenceValue===e.referenceValue;case 8:return function(t,e){return Hm(t.geoPointValue.latitude)===Hm(e.geoPointValue.latitude)&&Hm(t.geoPointValue.longitude)===Hm(e.geoPointValue.longitude)}(t,e);case 2:return function(t,e){if("integerValue"in t&&"integerValue"in e)return Hm(t.integerValue)===Hm(e.integerValue);if("doubleValue"in t&&"doubleValue"in e){var i=Hm(t.doubleValue),n=Hm(e.doubleValue);return i===n?$m(i)===$m(n):isNaN(i)&&isNaN(n)}return!1}(t,e);case 9:return _m(t.arrayValue.values||[],e.arrayValue.values||[],iy);case 10:return function(t,e){var i=t.mapValue.fields||{},n=e.mapValue.fields||{};if(Ym(i)!==Ym(n))return!1;for(var r in i)if(i.hasOwnProperty(r)&&(void 0===n[r]||!iy(i[r],n[r])))return!1;return!0}(t,e);default:return vm()}}function ny(t,e){return void 0!==(t.values||[]).find((function(t){return iy(t,e)}))}function ry(t,e){var i,n,r,s,o=ey(t),a=ey(e);if(o!==a)return wm(o,a);switch(o){case 0:return 0;case 1:return wm(t.booleanValue,e.booleanValue);case 2:return n=e,r=Hm((i=t).integerValue||i.doubleValue),s=Hm(n.integerValue||n.doubleValue),r<s?-1:r>s?1:r===s?0:isNaN(r)?isNaN(s)?0:-1:1;case 3:return sy(t.timestampValue,e.timestampValue);case 4:return sy(Qm(t),Qm(e));case 5:return wm(t.stringValue,e.stringValue);case 6:return function(t,e){var i=qm(t),n=qm(e);return i._(n)}(t.bytesValue,e.bytesValue);case 7:return function(t,e){for(var i=t.split("/"),n=e.split("/"),r=0;r<i.length&&r<n.length;r++){var s=wm(i[r],n[r]);if(0!==s)return s}return wm(i.length,n.length)}(t.referenceValue,e.referenceValue);case 8:return function(t,e){var i=wm(Hm(t.latitude),Hm(e.latitude));return 0!==i?i:wm(Hm(t.longitude),Hm(e.longitude))}(t.geoPointValue,e.geoPointValue);case 9:return function(t,e){for(var i=t.values||[],n=e.values||[],r=0;r<i.length&&r<n.length;++r){var s=ry(i[r],n[r]);if(s)return s}return wm(i.length,n.length)}(t.arrayValue,e.arrayValue);case 10:return function(t,e){var i=t.fields||{},n=Object.keys(i),r=e.fields||{},s=Object.keys(r);n.sort(),s.sort();for(var o=0;o<n.length&&o<s.length;++o){var a=wm(n[o],s[o]);if(0!==a)return a;var h=ry(i[n[o]],r[s[o]]);if(0!==h)return h}return wm(n.length,s.length)}(t.mapValue,e.mapValue);default:throw vm()}}function sy(t,e){if("string"==typeof t&&"string"==typeof e&&t.length===e.length)return wm(t,e);var i=jm(t),n=jm(e),r=wm(i.seconds,n.seconds);return 0!==r?r:wm(i.nanos,n.nanos)}function oy(t){return ay(t)}function ay(t){return"nullValue"in t?"null":"booleanValue"in t?""+t.booleanValue:"integerValue"in t?""+t.integerValue:"doubleValue"in t?""+t.doubleValue:"timestampValue"in t?(e=t.timestampValue,"time("+(i=jm(e)).seconds+","+i.nanos+")"):"stringValue"in t?t.stringValue:"bytesValue"in t?qm(t.bytesValue).toBase64():"referenceValue"in t?(r=t.referenceValue,Vm.ft(r).toString()):"geoPointValue"in t?"geo("+(n=t.geoPointValue).latitude+","+n.longitude+")":"arrayValue"in t?function(t){for(var e="[",i=!0,n=0,r=t.values||[];n<r.length;n++)i?i=!1:e+=",",e+=ay(r[n]);return e+"]"}(t.arrayValue):"mapValue"in t?function(t){for(var e="{",i=!0,n=0,r=Object.keys(t.fields||{}).sort();n<r.length;n++){var s=r[n];i?i=!1:e+=",",e+=s+":"+ay(t.fields[s])}return e+"}"}(t.mapValue):vm();var e,i,n,r}function hy(t,e){return{referenceValue:"projects/"+t.projectId+"/databases/"+t.database+"/documents/"+e.path.rt()}}function uy(t){return!!t&&"integerValue"in t}function ly(t){return!!t&&"arrayValue"in t}function cy(t){return!!t&&"nullValue"in t}function fy(t){return!!t&&"doubleValue"in t&&isNaN(Number(t.doubleValue))}function dy(t){return!!t&&"mapValue"in t} 7379/** 7380 * @license 7381 * Copyright 2017 Google LLC 7382 * 7383 * Licensed under the Apache License, Version 2.0 (the "License");
7384 * you may not use this file except in compliance with the License. 7385 * You may obtain a copy of the License at 7386 * 7387 * http://www.apache.org/licenses/LICENSE-2.0 7388 * 7389 * Unless required by applicable law or agreed to in writing, software 7390 * distributed under the License is distributed on an "AS IS" BASIS, 7391 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7392 * See the License for the specific language governing permissions and 7393 * limitations under the License. 7394 */var py=function(){function t(t){this.proto=t}return t.empty=function(){return new t({mapValue:{}})},t.prototype.field=function(t){if(t.et())return this.proto;for(var e=this.proto,i=0;i<t.length-1;++i){if(!e.mapValue.fields)return null;if(!dy(e=e.mapValue.fields[t.get(i)]))return null}return(e=(e.mapValue.fields||{})[t.tt()])||null},t.prototype.isEqual=function(t){return iy(this.proto,t.proto)},t}(),vy=function(){function t(t){void 0===t&&(t=py.empty()),this.It=t,this.At=new Map}return t.prototype.set=function(t,e){return this.Rt(t,e),this},t.prototype.delete=function(t){return this.Rt(t,null),this},t.prototype.Rt=function(t,e){for(var i=this.At,n=0;n<t.length-1;++n){var r=t.get(n),s=i.get(r);s instanceof Map?i=s:s&&10===ey(s)?(s=new Map(Object.entries(s.mapValue.fields||{})),i.set(r,s),i=s):(s=new Map,i.set(r,s),i=s)}i.set(t.tt(),e)},t.prototype.Pt=function(){var t=this.yt(Um.ct(),this.At);return null!=t?new py(t):this.It},t.prototype.yt=function(t,e){var i=this,n=!1,r=this.It.field(t),s=dy(r)?Object.assign({},r.mapValue.fields):{};return e.forEach((function(e,r){if(e instanceof Map){var o=i.yt(t.child(r),e);null!=o&&(s[r]=o,n=!0)}else null!==e?(s[r]=e,n=!0):s.hasOwnProperty(r)&&(delete s[r],n=!0)})),n?{mapValue:{fields:s}}:null},t}();function gy(t){var e=[];return zm(t.fields||{},(function(t,i){var n=new Um([t]);if(dy(i)){var r=gy(i.mapValue).fields;if(0===r.length)e.push(n);else for(var s=0,o=r;s<o.length;s++){var a=o[s];e.push(n.child(a))}}else e.push(n)})),new Gm(e)}var my=function(t,e){this.key=t,this.version=e},yy=function(t){function e(e,i,n,r){var s=this;return(s=t.call(this,e,i)||this).gt=n,s.Vt=!!r.Vt,s.hasCommittedMutations=!!r.hasCommittedMutations,s}return sf(e,t),e.prototype.field=function(t){return this.gt.field(t)},e.prototype.data=function(){return this.gt},e.prototype.bt=function(){return this.gt.proto},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.Vt===t.Vt&&this.hasCommittedMutations===t.hasCommittedMutations&&this.gt.isEqual(t.gt)},e.prototype.toString=function(){return"Document("+this.key+", "+this.version+", "+this.gt.toString()+", {hasLocalMutations: "+this.Vt+"}), {hasCommittedMutations: "+this.hasCommittedMutations+"})"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return this.Vt||this.hasCommittedMutations},enumerable:!1,configurable:!0}),e}(my),xy=function(t){function e(e,i,n){var r=this;return(r=t.call(this,e,i)||this).hasCommittedMutations=!(!n||!n.hasCommittedMutations),r}return sf(e,t),e.prototype.toString=function(){return"NoDocument("+this.key+", "+this.version+")"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return this.hasCommittedMutations},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.hasCommittedMutations===this.hasCommittedMutations&&t.version.isEqual(this.version)&&t.key.isEqual(this.key)},e}(my),wy=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return sf(e,t),e.prototype.toString=function(){return"UnknownDocument("+this.key+", "+this.version+")"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.version.isEqual(this.version)&&t.key.isEqual(this.key)},e}(my),_y=function(t,e,i,n,r,s,o){void 0===e&&(e=null),void 0===i&&(i=[]),void 0===n&&(n=[]),void 0===r&&(r=null),void 0===s&&(s=null),void 0===o&&(o=null),this.path=t,this.collectionGroup=e,this.orderBy=i,this.filters=n,this.limit=r,this.startAt=s,this.endAt=o,this.vt=null};function by(t,e,i,n,r,s,o){return void 0===e&&(e=null),void 0===i&&(i=[]),void 0===n&&(n=[]),void 0===r&&(r=null),void 0===s&&(s=null),void 0===o&&(o=null),new _y(t,e,i,n,r,s,o)}
7394function Ty(t){var e=mm(t);if(null===e.vt){var i=e.path.rt();null!==e.collectionGroup&&(i+="|cg:"+e.collectionGroup),i+="|f:",i+=e.filters.map((function(t){return(e=t).field.rt()+e.op.toString()+oy(e.value);var e})).join(","),i+="|ob:",i+=e.orderBy.map((function(t){return(e=t).field.rt()+e.dir;var e})).join(","),Jm(e.limit)||(i+="|l:",i+=e.limit),e.startAt&&(i+="|lb:",i+=Fy(e.startAt)),e.endAt&&(i+="|ub:",i+=Fy(e.endAt)),e.vt=i}return e.vt}function Ey(t,e){if(t.limit!==e.limit)return!1;if(t.orderBy.length!==e.orderBy.length)return!1;for(var i=0;i<t.orderBy.length;i++)if(!By(t.orderBy[i],e.orderBy[i]))return!1;if(t.filters.length!==e.filters.length)return!1;for(var n=0;n<t.filters.length;n++)if(r=t.filters[n],s=e.filters[n],r.op!==s.op||!r.field.isEqual(s.field)||!iy(r.value,s.value))return!1;var r,s;return t.collectionGroup===e.collectionGroup&&!!t.path.isEqual(e.path)&&!!Vy(t.startAt,e.startAt)&&Vy(t.endAt,e.endAt)}function Sy(t){return Vm.wt(t.path)&&null===t.collectionGroup&&0===t.filters.length}var Ay=function(t){function e(e,i,n){var r=this;return(r=t.call(this)||this).field=e,r.op=i,r.value=n,r}return sf(e,t),e.create=function(t,i,n){return t.ut()?"in"===i||"not-in"===i?this.St(t,i,n):new Cy(t,i,n):"array-contains"===i?new Py(t,n):"in"===i?new Iy(t,n):"not-in"===i?new ky(t,n):"array-contains-any"===i?new Ly(t,n):new e(t,i,n)},e.St=function(t,e,i){return"in"===e?new Oy(t,i):new Ry(t,i)},e.prototype.matches=function(t){var e=t.field(this.field);return"!="===this.op?null!==e&&this.Dt(ry(e,this.value)):null!==e&&ey(this.value)===ey(e)&&this.Dt(ry(e,this.value))},e.prototype.Dt=function(t){switch(this.op){case"<":return t<0;case"<=":return t<=0;case"==":return 0===t;case"!=":return 0!==t;case">":return t>0;case">=":return t>=0;default:return vm()}},e.prototype.Ct=function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0},e}((function(){})),Cy=function(t){function e(e,i,n){var r=this;return(r=t.call(this,e,i,n)||this).key=Vm.ft(n.referenceValue),r}return sf(e,t),e.prototype.matches=function(t){var e=Vm.H(t.key,this.key);return this.Dt(e)},e}(Ay),Oy=function(t){function e(e,i){var n=this;return(n=t.call(this,e,"in",i)||this).keys=My("in",i),n}return sf(e,t),e.prototype.matches=function(t){return this.keys.some((function(e){return e.isEqual(t.key)}))},e}(Ay),Ry=function(t){function e(e,i){var n=this;return(n=t.call(this,e,"not-in",i)||this).keys=My("not-in",i),n}return sf(e,t),e.prototype.matches=function(t){return!this.keys.some((function(e){return e.isEqual(t.key)}))},e}(Ay);function My(t,e){var i;return((null===(i=e.arrayValue)||void 0===i?void 0:i.values)||[]).map((function(t){return Vm.ft(t.referenceValue)}))}var Py=function(t){function e(e,i){return t.call(this,e,"array-contains",i)||this}return sf(e,t),e.prototype.matches=function(t){var e=t.field(this.field);return ly(e)&&ny(e.arrayValue,this.value)},e}(Ay),Iy=function(t){function e(e,i){return t.call(this,e,"in",i)||this}return sf(e,t),e.prototype.matches=function(t){var e=t.field(this.field);return null!==e&&ny(this.value.arrayValue,e)},e}(Ay),ky=function(t){function e(e,i){return t.call(this,e,"not-in",i)||this}return sf(e,t),e.prototype.matches=function(t){if(ny(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var e=t.field(this.field);return null!==e&&!ny(this.value.arrayValue,e)},e}(Ay),Ly=function(t){function e(e,i){return t.call(this,e,"array-contains-any",i)||this}return sf(e,t),e.prototype.matches=function(t){var e=this,i=t.field(this.field);return!(!ly(i)||!i.arrayValue.values)&&i.arrayValue.values.some((function(t){return ny(e.value.arrayValue,t)}))},e}(Ay),Dy=function(t,e){this.position=t,this.before=e};function Fy(t){return(t.before?"b":"a")+":"+t.position.map((function(t){return oy(t)})).join(",")}var Ny=function(t,e){void 0===e&&(e="asc"),this.field=t,this.dir=e};function By(t,e){return t.dir===e.dir&&t.field.isEqual(e.field)}function Uy(t,e,i){for(var n=0,r=0;r<t.position.length;r++){var s=e[r],o=t.position[r];if(n=s.field.ut()?Vm.H(Vm.ft(o.referenceValue),i.key):ry(o,i.field(s.field)),"desc"===s.dir&&(n*=-1),0!==n)break}return t.before?n<=0:n<0}function Vy(t,e){if(null===t)return null===e;if(null===e)return!1;if(t.before!==e.before||t.position.length!==e.position.length)return!1;for(var i=0;i<t.position.length;i++)if(!iy(t.position[i],e.position[i]))return!1;return!0} 7395/** 7396 * @license 7397 * Copyright 2017 Google LLC 7398 * 7399 * Licensed under the Apache License, Version 2.0 (the "License");
7400 * you may not use this file except in compliance with the License. 7401 * You may obtain a copy of the License at 7402 * 7403 * http://www.apache.org/licenses/LICENSE-2.0 7404 * 7405 * Unless required by applicable law or agreed to in writing, software 7406 * distributed under the License is distributed on an "AS IS" BASIS, 7407 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7408 * See the License for the specific language governing permissions and 7409 * limitations under the License. 7410 */var Yy=function(t,e,i,n,r,s,o,a){void 0===e&&(e=null),void 0===i&&(i=[]),void 0===n&&(n=[]),void 0===r&&(r=null),void 0===s&&(s="F"),void 0===o&&(o=null),void 0===a&&(a=null),this.path=t,this.collectionGroup=e,this.xt=i,this.filters=n,this.limit=r,this.limitType=s,this.startAt=o,this.endAt=a,this.Nt=null,this.$t=null,this.startAt,this.endAt};function zy(t,e,i,n,r,s,o,a){return new Yy(t,e,i,n,r,s,o,a)}function Xy(t){return new Yy(t)}function Gy(t){return!Jm(t.limit)&&"F"===t.limitType}function Wy(t){return!Jm(t.limit)&&"L"===t.limitType}function jy(t){return t.xt.length>0?t.xt[0].field:null}function Hy(t){for(var e=0,i=t.filters;e<i.length;e++){var n=i[e];if(n.Ct())return n.field}return null}function qy(t){return null!==t.collectionGroup}function Ky(t){var e=mm(t);if(null===e.Nt){e.Nt=[];var i=Hy(e),n=jy(e);if(null!==i&&null===n)i.ut()||e.Nt.push(new Ny(i)),e.Nt.push(new Ny(Um.ht(),"asc"));else{for(var r=!1,s=0,o=e.xt;s<o.length;s++){var a=o[s];e.Nt.push(a),a.field.ut()&&(r=!0)}if(!r){var h=e.xt.length>0?e.xt[e.xt.length-1].dir:"asc";e.Nt.push(new Ny(Um.ht(),h))}}}return e.Nt}function Zy(t){var e=mm(t);if(!e.$t)if("F"===e.limitType)e.$t=by(e.path,e.collectionGroup,Ky(e),e.filters,e.limit,e.startAt,e.endAt);else{for(var i=[],n=0,r=Ky(e);n<r.length;n++){var s=r[n],o="desc"===s.dir?"asc":"desc";i.push(new Ny(s.field,o))}var a=e.endAt?new Dy(e.endAt.position,!e.endAt.before):null,h=e.startAt?new Dy(e.startAt.position,!e.startAt.before):null;e.$t=by(e.path,e.collectionGroup,i,e.filters,e.limit,a,h)}return e.$t}function Qy(t,e,i){return new Yy(t.path,t.collectionGroup,t.xt.slice(),t.filters.slice(),e,i,t.startAt,t.endAt)}function Jy(t,e){return Ey(Zy(t),Zy(e))&&t.limitType===e.limitType}function $y(t){return Ty(Zy(t))+"|lt:"+t.limitType}function tx(t){return"Query(target="+(e=Zy(t),i=e.path.rt(),null!==e.collectionGroup&&(i+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(i+=", filters: ["+e.filters.map((function(t){return(e=t).field.rt()+" "+e.op+" "+oy(e.value);var e})).join(", ")+"]"),Jm(e.limit)||(i+=", limit: "+e.limit),e.orderBy.length>0&&(i+=", orderBy: ["+e.orderBy.map((function(t){return(e=t).field.rt()+" ("+e.dir+")";var e})).join(", ")+"]"),e.startAt&&(i+=", startAt: "+Fy(e.startAt)),e.endAt&&(i+=", endAt: "+Fy(e.endAt)),"Target("+i+"); limitType=")+t.limitType+")";var e,i}function ex(t,e){return i=t,r=(n=e).key.path,(null!==i.collectionGroup?n.key.dt(i.collectionGroup)&&i.path.nt(r):Vm.wt(i.path)?i.path.isEqual(r):i.path.st(r))&&function(t,e){for(var i=0,n=t.xt;i<n.length;i++){var r=n[i];if(!r.field.ut()&&null===e.field(r.field))return!1}return!0}(t,e)&&function(t,e){for(var i=0,n=t.filters;i<n.length;i++)if(!n[i].matches(e))return!1;return!0}(t,e)&&function(t,e){return!(t.startAt&&!Uy(t.startAt,Ky(t),e)||t.endAt&&Uy(t.endAt,Ky(t),e))}(t,e);var i,n,r}function ix(t){return function(e,i){for(var n=!1,r=0,s=Ky(t);r<s.length;r++){var o=s[r],a=nx(o,e,i);if(0!==a)return a;n=n||o.field.ut()}return 0}}function nx(t,e,i){var n,r,s,o,a=t.field.ut()?Vm.H(e.key,i.key):(n=t.field,r=i,s=e.field(n),o=r.field(n),null!==s&&null!==o?ry(s,o):vm());switch(t.dir){case"asc":return a;case"desc":return-1*a;default:return vm()}} 7411/** 7412 * @license 7413 * Copyright 2017 Google LLC 7414 * 7415 * Licensed under the Apache License, Version 2.0 (the "License"); 7416 * you may not use this file except in compliance with the License. 7417 * You may obtain a copy of the License at 7418 * 7419 * http://www.apache.org/licenses/LICENSE-2.0 7420 * 7421 * Unless required by applicable law or agreed to in writing, software 7422 * distributed under the License is distributed on an "AS IS" BASIS, 7423 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7424 * See the License for the specific language governing permissions and 7425 * limitations under the License. 7426 */var rx=function(){function t(t,e,i,n,r,s,o){void 0===r&&(r=Dm.min()),void 0===s&&(s=Dm.min()),void 0===o&&(o=Tm.T),this.target=t,this.targetId=e,this.Ft=i,this.sequenceNumber=n,this.Ot=r,this.lastLimboFreeSnapshotVersion=s,this.resumeToken=o}return t.prototype.kt=function(e){return new t(this.target,this.targetId,this.Ft,e,this.Ot,this.lastLimboFreeSnapshotVersion,this.resumeToken)},t.prototype.Mt=function(e,i){return new t(this.target,this.targetId,this.Ft,this.sequenceNumber,i,this.lastLimboFreeSnapshotVersion,e)},t.prototype.Lt=function(e){return new t(this.target,this.targetId,this.Ft,this.sequenceNumber,this.Ot,e,this.resumeToken)},t}(); 7427/** 7428 * @license 7429 * Copyright 2020 Google LLC 7430 * 7431 * Licensed under the Apache License, Version 2.0 (the "License");
7432 * you may not use this file except in compliance with the License. 7433 * You may obtain a copy of the License at 7434 * 7435 * http://www.apache.org/licenses/LICENSE-2.0 7436 * 7437 * Unless required by applicable law or agreed to in writing, software 7438 * distributed under the License is distributed on an "AS IS" BASIS, 7439 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7440 * See the License for the specific language governing permissions and 7441 * limitations under the License. 7442 */function sx(t,e){if(t.Bt){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:$m(e)?"-0":e}}function ox(t){return{integerValue:""+t}}function ax(t,e){return ty(e)?ox(e):sx(t,e)} 7443/** 7444 * @license 7445 * Copyright 2018 Google LLC 7446 * 7447 * Licensed under the Apache License, Version 2.0 (the "License"); 7448 * you may not use this file except in compliance with the License. 7449 * You may obtain a copy of the License at 7450 * 7451 * http://www.apache.org/licenses/LICENSE-2.0 7452 * 7453 * Unless required by applicable law or agreed to in writing, software 7454 * distributed under the License is distributed on an "AS IS" BASIS, 7455 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7456 * See the License for the specific language governing permissions and 7457 * limitations under the License. 7458 */var hx=function(){this.qt=void 0};function ux(t,e,i){return t instanceof fx?(r=e,s={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:(n=i).seconds,nanos:n.nanoseconds}}}},r&&(s.fields.__previous_value__=r),{mapValue:s}):t instanceof dx?px(t,e):t instanceof vx?gx(t,e):function(t,e){var i=cx(t,e),n=yx(i)+yx(t.Ut);return uy(i)&&uy(t.Ut)?ox(n):sx(t.Qt,n)}(t,e);var n,r,s}function lx(t,e,i){return t instanceof dx?px(t,e):t instanceof vx?gx(t,e):i}function cx(t,e){return t instanceof mx?uy(n=e)||(i=n)&&"doubleValue"in i?e:{integerValue:0}:null;var i,n}var fx=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return sf(e,t),e}(hx),dx=function(t){function e(e){var i=this;return(i=t.call(this)||this).elements=e,i}return sf(e,t),e}(hx);function px(t,e){for(var i=xx(e),n=function(t){i.some((function(e){return iy(e,t)}))||i.push(t)},r=0,s=t.elements;r<s.length;r++)n(s[r]);return{arrayValue:{values:i}}}var vx=function(t){function e(e){var i=this;return(i=t.call(this)||this).elements=e,i}return sf(e,t),e}(hx);function gx(t,e){for(var i=xx(e),n=function(t){i=i.filter((function(e){return!iy(e,t)}))},r=0,s=t.elements;r<s.length;r++)n(s[r]);return{arrayValue:{values:i}}}var mx=function(t){function e(e,i){var n=this;return(n=t.call(this)||this).Qt=e,n.Ut=i,n}return sf(e,t),e}(hx);function yx(t){return Hm(t.integerValue||t.doubleValue)}function xx(t){return ly(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]} 7459/** 7460 * @license 7461 * Copyright 2017 Google LLC 7462 * 7463 * Licensed under the Apache License, Version 2.0 (the "License"); 7464 * you may not use this file except in compliance with the License. 7465 * You may obtain a copy of the License at 7466 * 7467 * http://www.apache.org/licenses/LICENSE-2.0 7468 * 7469 * Unless required by applicable law or agreed to in writing, software 7470 * distributed under the License is distributed on an "AS IS" BASIS, 7471 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7472 * See the License for the specific language governing permissions and 7473 * limitations under the License. 7474 */var wx=function(t,e){this.field=t,this.transform=e},_x=function(t,e){this.version=t,this.transformResults=e},bx=function(){function t(t,e){this.updateTime=t,this.exists=e}return t.Kt=function(){return new t},t.exists=function(e){return new t(void 0,e)},t.updateTime=function(e){return new t(e)},Object.defineProperty(t.prototype,"Wt",{get:function(){return void 0===this.updateTime&&void 0===this.exists},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){return this.exists===t.exists&&(this.updateTime?!!t.updateTime&&this.updateTime.isEqual(t.updateTime):!t.updateTime)},t}();function Tx(t,e){return void 0!==t.updateTime?e instanceof yy&&e.version.isEqual(t.updateTime):void 0===t.exists||t.exists===e instanceof yy}var Ex=function(){};
7474function Sx(t,e,i){return t instanceof Mx?function(t,e,i){var n=t.value;if(i.transformResults){var r=kx(t.fieldTransforms,e,i.transformResults);n=Dx(t.fieldTransforms,n,r)}return new yy(t.key,i.version,n,{hasCommittedMutations:!0})}(t,e,i):t instanceof Px?function(t,e,i){if(!Tx(t.jt,e))return new wy(t.key,i.version);var n=Ix(t,e,i.transformResults?kx(t.fieldTransforms,e,i.transformResults):[]);return new yy(t.key,i.version,n,{hasCommittedMutations:!0})}(t,e,i):(n=i,new xy(t.key,n.version,{hasCommittedMutations:!0}));var n}function Ax(t,e,i){return t instanceof Mx?function(t,e,i){if(!Tx(t.jt,e))return e;var n=t.value,r=Lx(t.fieldTransforms,i,e);n=Dx(t.fieldTransforms,n,r);var s=Rx(e);return new yy(t.key,s,n,{Vt:!0})}(t,e,i):t instanceof Px?function(t,e,i){if(!Tx(t.jt,e))return e;var n=Rx(e),r=Ix(t,e,Lx(t.fieldTransforms,i,e));return new yy(t.key,n,r,{Vt:!0})}(t,e,i):(r=e,Tx((n=t).jt,r)?new xy(n.key,Dm.min()):r);var n,r}function Cx(t,e){return function(t,e){for(var i=null,n=0,r=t;n<r.length;n++){var s=r[n],o=e instanceof yy?e.field(s.field):void 0,a=cx(s.transform,o||null);null!=a&&(i=null==i?(new vy).set(s.field,a):i.set(s.field,a))}return i?i.Pt():null}(t.fieldTransforms,e)}function Ox(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.jt.isEqual(e.jt)&&(i=t.fieldTransforms,n=e.fieldTransforms,!!(void 0===i&&void 0===n||i&&n&&_m(i,n,(function(t,e){return n=e,(i=t).field.isEqual(n.field)&&(r=i.transform,s=n.transform,r instanceof dx&&s instanceof dx||r instanceof vx&&s instanceof vx?_m(r.elements,s.elements,iy):r instanceof mx&&s instanceof mx?iy(r.Ut,s.Ut):r instanceof fx&&s instanceof fx);var i,n,r,s}))))&&(0===t.type?t.value.isEqual(e.value):1!==t.type||t.data.isEqual(e.data)&&t.Gt.isEqual(e.Gt));var i,n}function Rx(t){return t instanceof yy?t.version:Dm.min()}var Mx=function(t){function e(e,i,n,r){void 0===r&&(r=[]);var s=this;return(s=t.call(this)||this).key=e,s.value=i,s.jt=n,s.fieldTransforms=r,s.type=0,s}return sf(e,t),e}(Ex),Px=function(t){function e(e,i,n,r,s){void 0===s&&(s=[]);var o=this;return(o=t.call(this)||this).key=e,o.data=i,o.Gt=n,o.jt=r,o.fieldTransforms=s,o.type=1,o}return sf(e,t),e}(Ex);function Ix(t,e,i){var n,r,s,o;return r=t,s=n=e instanceof yy?e.data():py.empty(),o=new vy(s),r.Gt.fields.forEach((function(t){if(!t.et()){var e=r.data.field(t);null!==e?o.set(t,e):o.delete(t)}})),n=o.Pt(),Dx(t.fieldTransforms,n,i)}function kx(t,e,i){var n=[];gm(t.length===i.length);for(var r=0;r<i.length;r++){var s=t[r],o=s.transform,a=null;e instanceof yy&&(a=e.field(s.field)),n.push(lx(o,a,i[r]))}return n}function Lx(t,e,i){for(var n=[],r=0,s=t;r<s.length;r++){var o=s[r],a=o.transform,h=null;i instanceof yy&&(h=i.field(o.field)),n.push(ux(a,h,e))}return n}function Dx(t,e,i){for(var n=new vy(e),r=0;r<t.length;r++){var s=t[r];n.set(s.field,i[r])}return n.Pt()}var Fx,Nx,Bx=function(t){function e(e,i){var n=this;return(n=t.call(this)||this).key=e,n.jt=i,n.type=2,n.fieldTransforms=[],n}return sf(e,t),e}(Ex),Ux=function(t){function e(e,i){var n=this;return(n=t.call(this)||this).key=e,n.jt=i,n.type=3,n.fieldTransforms=[],n}return sf(e,t),e}(Ex),Vx=function(t){this.count=t};function Yx(t){switch(t){case Em.OK:return vm();case Em.CANCELLED:case Em.UNKNOWN:case Em.DEADLINE_EXCEEDED:case Em.RESOURCE_EXHAUSTED:case Em.INTERNAL:case Em.UNAVAILABLE:case Em.UNAUTHENTICATED:return!1;case Em.INVALID_ARGUMENT:case Em.NOT_FOUND:case Em.ALREADY_EXISTS:case Em.PERMISSION_DENIED:case Em.FAILED_PRECONDITION:case Em.ABORTED:case Em.OUT_OF_RANGE:case Em.UNIMPLEMENTED:case Em.DATA_LOSS:return!0;default:return vm()}}function zx(t){if(void 0===t)return fm("GRPC error has no .code"),Em.UNKNOWN;switch(t){case Fx.OK:return Em.OK;case Fx.CANCELLED:return Em.CANCELLED;case Fx.UNKNOWN:return Em.UNKNOWN;case Fx.DEADLINE_EXCEEDED:return Em.DEADLINE_EXCEEDED;case Fx.RESOURCE_EXHAUSTED:return Em.RESOURCE_EXHAUSTED;case Fx.INTERNAL:return Em.INTERNAL;case Fx.UNAVAILABLE:return Em.UNAVAILABLE;case Fx.UNAUTHENTICATED:return Em.UNAUTHENTICATED;case Fx.INVALID_ARGUMENT:return Em.INVALID_ARGUMENT;case Fx.NOT_FOUND:return Em.NOT_FOUND;case Fx.ALREADY_EXISTS:return Em.ALREADY_EXISTS;case Fx.PERMISSION_DENIED:return Em.PERMISSION_DENIED;case Fx.FAILED_PRECONDITION:return Em.FAILED_PRECONDITION;case Fx.ABORTED:return Em.ABORTED;case Fx.OUT_OF_RANGE:return Em.OUT_OF_RANGE;
7474case Fx.UNIMPLEMENTED:return Em.UNIMPLEMENTED;case Fx.DATA_LOSS:return Em.DATA_LOSS;default:return vm()}}(Nx=Fx||(Fx={}))[Nx.OK=0]="OK",Nx[Nx.CANCELLED=1]="CANCELLED",Nx[Nx.UNKNOWN=2]="UNKNOWN",Nx[Nx.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Nx[Nx.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Nx[Nx.NOT_FOUND=5]="NOT_FOUND",Nx[Nx.ALREADY_EXISTS=6]="ALREADY_EXISTS",Nx[Nx.PERMISSION_DENIED=7]="PERMISSION_DENIED",Nx[Nx.UNAUTHENTICATED=16]="UNAUTHENTICATED",Nx[Nx.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Nx[Nx.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Nx[Nx.ABORTED=10]="ABORTED",Nx[Nx.OUT_OF_RANGE=11]="OUT_OF_RANGE",Nx[Nx.UNIMPLEMENTED=12]="UNIMPLEMENTED",Nx[Nx.INTERNAL=13]="INTERNAL",Nx[Nx.UNAVAILABLE=14]="UNAVAILABLE",Nx[Nx.DATA_LOSS=15]="DATA_LOSS"; 7475/** 7476 * @license 7477 * Copyright 2017 Google LLC 7478 * 7479 * Licensed under the Apache License, Version 2.0 (the "License"); 7480 * you may not use this file except in compliance with the License. 7481 * You may obtain a copy of the License at 7482 * 7483 * http://www.apache.org/licenses/LICENSE-2.0 7484 * 7485 * Unless required by applicable law or agreed to in writing, software 7486 * distributed under the License is distributed on an "AS IS" BASIS, 7487 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7488 * See the License for the specific language governing permissions and 7489 * limitations under the License. 7490 */ 7491var Xx=function(){function t(t,e){this.H=t,this.root=e||Wx.EMPTY}return t.prototype.zt=function(e,i){return new t(this.H,this.root.zt(e,i,this.H).copy(null,null,Wx.Ht,null,null))},t.prototype.remove=function(e){return new t(this.H,this.root.remove(e,this.H).copy(null,null,Wx.Ht,null,null))},t.prototype.get=function(t){for(var e=this.root;!e.et();){var i=this.H(t,e.key);if(0===i)return e.value;i<0?e=e.left:i>0&&(e=e.right)}return null},t.prototype.indexOf=function(t){for(var e=0,i=this.root;!i.et();){var n=this.H(t,i.key);if(0===n)return e+i.left.size;n<0?i=i.left:(e+=i.left.size+1,i=i.right)}return-1},t.prototype.et=function(){return this.root.et()},Object.defineProperty(t.prototype,"size",{get:function(){return this.root.size},enumerable:!1,configurable:!0}),t.prototype.Jt=function(){return this.root.Jt()},t.prototype.Yt=function(){return this.root.Yt()},t.prototype.Xt=function(t){return this.root.Xt(t)},t.prototype.forEach=function(t){this.Xt((function(e,i){return t(e,i),!1}))},t.prototype.toString=function(){var t=[];return this.Xt((function(e,i){return t.push(e+":"+i),!1})),"{"+t.join(", ")+"}"},t.prototype.Zt=function(t){return this.root.Zt(t)},t.prototype.te=function(){return new Gx(this.root,null,this.H,!1)},t.prototype.ee=function(t){return new Gx(this.root,t,this.H,!1)},t.prototype.ne=function(){return new Gx(this.root,null,this.H,!0)},t.prototype.se=function(t){return new Gx(this.root,t,this.H,!0)},t}(),Gx=function(){function t(t,e,i,n){this.ie=n,this.re=[];for(var r=1;!t.et();)if(r=e?i(t.key,e):1,n&&(r*=-1),r<0)t=this.ie?t.left:t.right;else{if(0===r){this.re.push(t);break}this.re.push(t),t=this.ie?t.right:t.left}}return t.prototype.oe=function(){var t=this.re.pop(),e={key:t.key,value:t.value};if(this.ie)for(t=t.left;!t.et();)this.re.push(t),t=t.right;else for(t=t.right;!t.et();)this.re.push(t),t=t.left;return e},t.prototype.ce=function(){return this.re.length>0},t.prototype.ae=function(){if(0===this.re.length)return null;var t=this.re[this.re.length-1];return{key:t.key,value:t.value}},t}(),Wx=function(){function t(e,i,n,r,s){this.key=e,this.value=i,this.color=null!=n?n:t.RED,this.left=null!=r?r:t.EMPTY,this.right=null!=s?s:t.EMPTY,this.size=this.left.size+1+this.right.size}return t.prototype.copy=function(e,i,n,r,s){return new t(null!=e?e:this.key,null!=i?i:this.value,null!=n?n:this.color,null!=r?r:this.left,null!=s?s:this.right)},t.prototype.et=function(){return!1},t.prototype.Xt=function(t){return this.left.Xt(t)||t(this.key,this.value)||this.right.Xt(t)},t.prototype.Zt=function(t){return this.right.Zt(t)||t(this.key,this.value)||this.left.Zt(t)},t.prototype.min=function(){return this.left.et()?this:this.left.min()},t.prototype.Jt=function(){return this.min().key},t.prototype.Yt=function(){return this.right.et()?this.key:this.right.Yt()}
7491,t.prototype.zt=function(t,e,i){var n=this,r=i(t,n.key);return(n=r<0?n.copy(null,null,null,n.left.zt(t,e,i),null):0===r?n.copy(null,e,null,null,null):n.copy(null,null,null,null,n.right.zt(t,e,i))).ue()},t.prototype.he=function(){if(this.left.et())return t.EMPTY;var e=this;return e.left.le()||e.left.left.le()||(e=e._e()),(e=e.copy(null,null,null,e.left.he(),null)).ue()},t.prototype.remove=function(e,i){var n,r=this;if(i(e,r.key)<0)r.left.et()||r.left.le()||r.left.left.le()||(r=r._e()),r=r.copy(null,null,null,r.left.remove(e,i),null);else{if(r.left.le()&&(r=r.fe()),r.right.et()||r.right.le()||r.right.left.le()||(r=r.de()),0===i(e,r.key)){if(r.right.et())return t.EMPTY;n=r.right.min(),r=r.copy(n.key,n.value,null,null,r.right.he())}r=r.copy(null,null,null,null,r.right.remove(e,i))}return r.ue()},t.prototype.le=function(){return this.color},t.prototype.ue=function(){var t=this;return t.right.le()&&!t.left.le()&&(t=t.we()),t.left.le()&&t.left.left.le()&&(t=t.fe()),t.left.le()&&t.right.le()&&(t=t.Ee()),t},t.prototype._e=function(){var t=this.Ee();return t.right.left.le()&&(t=(t=(t=t.copy(null,null,null,null,t.right.fe())).we()).Ee()),t},t.prototype.de=function(){var t=this.Ee();return t.left.left.le()&&(t=(t=t.fe()).Ee()),t},t.prototype.we=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.fe=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.Ee=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.Te=function(){var t=this.Ie();return Math.pow(2,t)<=this.size+1},t.prototype.Ie=function(){if(this.le()&&this.left.le())throw vm();if(this.right.le())throw vm();var t=this.left.Ie();if(t!==this.right.Ie())throw vm();return t+(this.le()?0:1)},t}();Wx.EMPTY=null,Wx.RED=!0,Wx.Ht=!1,Wx.EMPTY=new(function(){function t(){this.size=0}return Object.defineProperty(t.prototype,"key",{get:function(){throw vm()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){throw vm()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){throw vm()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){throw vm()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){throw vm()},enumerable:!1,configurable:!0}),t.prototype.copy=function(t,e,i,n,r){return this},t.prototype.zt=function(t,e,i){return new Wx(t,e)},t.prototype.remove=function(t,e){return this},t.prototype.et=function(){return!0},t.prototype.Xt=function(t){return!1},t.prototype.Zt=function(t){return!1},t.prototype.Jt=function(){return null},t.prototype.Yt=function(){return null},t.prototype.le=function(){return!1},t.prototype.Te=function(){return!0},t.prototype.Ie=function(){return 0},t}()); 7492/** 7493 * @license 7494 * Copyright 2017 Google LLC 7495 * 7496 * Licensed under the Apache License, Version 2.0 (the "License"); 7497 * you may not use this file except in compliance with the License. 7498 * You may obtain a copy of the License at 7499 * 7500 * http://www.apache.org/licenses/LICENSE-2.0 7501 * 7502 * Unless required by applicable law or agreed to in writing, software 7503 * distributed under the License is distributed on an "AS IS" BASIS, 7504 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7505 * See the License for the specific language governing permissions and 7506 * limitations under the License. 7507 */ 7508var jx=function(){function t(t){this.H=t,this.data=new Xx(this.H)}return t.prototype.has=function(t){return null!==this.data.get(t)},t.prototype.first=function(){return this.data.Jt()},t.prototype.last=function(){return this.data.Yt()},Object.defineProperty(t.prototype,"size",{get:function(){return this.data.size},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){return this.data.indexOf(t)},t.prototype.forEach=function(t){this.data.Xt((function(e,i){return t(e),!1}))},t.prototype.me=function(t,e){for(var i=this.data.ee(t[0]);i.ce();){var n=i.oe();if(this.H(n.key,t[1])>=0)return;e(n.key)}},t.prototype.Ae=function(t,e){var i;for(i=void 0!==e?this.data.ee(e):this.data.te();i.ce();)if(!t(i.oe().key))return},t.prototype.Re=function(t){var e=this.data.ee(t);return e.ce()?e.oe().key:null},t.prototype.te=function(){return new Hx(this.data.te())},t.prototype.ee=function(t){return new Hx(this.data.ee(t))},t.prototype.add=function(t){return this.copy(this.data.remove(t).zt(t,!0))},t.prototype.delete=function(t){return this.has(t)?this.copy(this.data.remove(t)):this},t.prototype.et=function(){return this.data.et()},t.prototype.Pe=function(t){var e=this;return e.size<t.size&&(e=t,t=this),t.forEach((function(t){e=e.add(t)})),e},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var i=this.data.te(),n=e.data.te();i.ce();){var r=i.oe().key,s=n.oe().key;if(0!==this.H(r,s))return!1}return!0},t.prototype.it=function(){var t=[];return this.forEach((function(e){t.push(e)})),t},t.prototype.toString=function(){var t=[];return this.forEach((function(e){return t.push(e)})),"SortedSet("+t.toString()+")"},t.prototype.copy=function(e){var i=new t(this.H);return i.data=e,i},t}(),Hx=function(){function t(t){this.ye=t}return t.prototype.oe=function(){return this.ye.oe().key},t.prototype.ce=function(){return this.ye.ce()},t}(),qx=new Xx(Vm.H);function Kx(){return qx}function Zx(){return Kx()}var Qx=new Xx(Vm.H);function Jx(){return Qx}var $x=new Xx(Vm.H);var tw=new jx(Vm.H);function ew(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=tw,n=0,r=t;n<r.length;n++){var s=r[n];i=i.add(s)}return i}var iw=new jx(wm);function nw(){return iw} 7509/** 7510 * @license 7511 * Copyright 2017 Google LLC 7512 * 7513 * Licensed under the Apache License, Version 2.0 (the "License");
7514 * you may not use this file except in compliance with the License. 7515 * You may obtain a copy of the License at 7516 * 7517 * http://www.apache.org/licenses/LICENSE-2.0 7518 * 7519 * Unless required by applicable law or agreed to in writing, software 7520 * distributed under the License is distributed on an "AS IS" BASIS, 7521 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7522 * See the License for the specific language governing permissions and 7523 * limitations under the License. 7524 */var rw=function(){function t(t){this.H=t?function(e,i){return t(e,i)||Vm.H(e.key,i.key)}:function(t,e){return Vm.H(t.key,e.key)},this.ge=Jx(),this.Ve=new Xx(this.H)}return t.pe=function(e){return new t(e.H)},t.prototype.has=function(t){return null!=this.ge.get(t)},t.prototype.get=function(t){return this.ge.get(t)},t.prototype.first=function(){return this.Ve.Jt()},t.prototype.last=function(){return this.Ve.Yt()},t.prototype.et=function(){return this.Ve.et()},t.prototype.indexOf=function(t){var e=this.ge.get(t);return e?this.Ve.indexOf(e):-1},Object.defineProperty(t.prototype,"size",{get:function(){return this.Ve.size},enumerable:!1,configurable:!0}),t.prototype.forEach=function(t){this.Ve.Xt((function(e,i){return t(e),!1}))},t.prototype.add=function(t){var e=this.delete(t.key);return e.copy(e.ge.zt(t.key,t),e.Ve.zt(t,null))},t.prototype.delete=function(t){var e=this.get(t);return e?this.copy(this.ge.remove(t),this.Ve.remove(e)):this},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var i=this.Ve.te(),n=e.Ve.te();i.ce();){var r=i.oe().key,s=n.oe().key;if(!r.isEqual(s))return!1}return!0},t.prototype.toString=function(){var t=[];return this.forEach((function(e){t.push(e.toString())})),0===t.length?"DocumentSet ()":"DocumentSet (\n "+t.join(" \n")+"\n)"},t.prototype.copy=function(e,i){var n=new t;return n.H=this.H,n.ge=e,n.Ve=i,n},t}(),sw=function(){function t(){this.be=new Xx(Vm.H)}return t.prototype.track=function(t){var e=t.doc.key,i=this.be.get(e);i?0!==t.type&&3===i.type?this.be=this.be.zt(e,t):3===t.type&&1!==i.type?this.be=this.be.zt(e,{type:i.type,doc:t.doc}):2===t.type&&2===i.type?this.be=this.be.zt(e,{type:2,doc:t.doc}):2===t.type&&0===i.type?this.be=this.be.zt(e,{type:0,doc:t.doc}):1===t.type&&0===i.type?this.be=this.be.remove(e):1===t.type&&2===i.type?this.be=this.be.zt(e,{type:1,doc:i.doc}):0===t.type&&1===i.type?this.be=this.be.zt(e,{type:2,doc:t.doc}):vm():this.be=this.be.zt(e,t)},t.prototype.ve=function(){var t=[];return this.be.Xt((function(e,i){t.push(i)})),t},t}(),ow=function(){function t(t,e,i,n,r,s,o,a){this.query=t,this.docs=e,this.Se=i,this.docChanges=n,this.De=r,this.fromCache=s,this.Ce=o,this.xe=a}return t.Ne=function(e,i,n,r){var s=[];return i.forEach((function(t){s.push({type:0,doc:t})})),new t(e,i,rw.pe(i),s,n,r,!0,!1)},Object.defineProperty(t.prototype,"hasPendingWrites",{get:function(){return!this.De.et()},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){if(!(this.fromCache===t.fromCache&&this.Ce===t.Ce&&this.De.isEqual(t.De)&&Jy(this.query,t.query)&&this.docs.isEqual(t.docs)&&this.Se.isEqual(t.Se)))return!1;var e=this.docChanges,i=t.docChanges;if(e.length!==i.length)return!1;for(var n=0;n<e.length;n++)if(e[n].type!==i[n].type||!e[n].doc.isEqual(i[n].doc))return!1;return!0},t}(),aw=function(){function t(t,e,i,n,r){this.Ot=t,this.$e=e,this.Fe=i,this.Oe=n,this.ke=r}return t.Me=function(e,i){var n=new Map;return n.set(e,hw.Le(e,i)),new t(Dm.min(),n,nw(),Kx(),ew())},t}(),hw=function(){function t(t,e,i,n,r){this.resumeToken=t,this.Be=e,this.qe=i,this.Ue=n,this.Qe=r}return t.Le=function(e,i){return new t(Tm.T,i,ew(),ew(),ew())},t}(),uw=function(t,e,i,n){this.Ke=t,this.removedTargetIds=e,this.key=i,this.We=n},lw=function(t,e){this.targetId=t,this.je=e},cw=function(t,e,i,n){void 0===i&&(i=Tm.T),void 0===n&&(n=null),this.state=t,this.targetIds=e,this.resumeToken=i,this.cause=n},fw=function(){function t(){this.Ge=0,this.ze=vw(),this.He=Tm.T,this.Je=!1,this.Ye=!0}return Object.defineProperty(t.prototype,"Be",{get:function(){return this.Je},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resumeToken",{get:function(){return this.He}
7524,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Xe",{get:function(){return 0!==this.Ge},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Ze",{get:function(){return this.Ye},enumerable:!1,configurable:!0}),t.prototype.tn=function(t){t.l()>0&&(this.Ye=!0,this.He=t)},t.prototype.en=function(){var t=ew(),e=ew(),i=ew();return this.ze.forEach((function(n,r){switch(r){case 0:t=t.add(n);break;case 2:e=e.add(n);break;case 1:i=i.add(n);break;default:vm()}})),new hw(this.He,this.Je,t,e,i)},t.prototype.nn=function(){this.Ye=!1,this.ze=vw()},t.prototype.sn=function(t,e){this.Ye=!0,this.ze=this.ze.zt(t,e)},t.prototype.rn=function(t){this.Ye=!0,this.ze=this.ze.remove(t)},t.prototype.on=function(){this.Ge+=1},t.prototype.cn=function(){this.Ge-=1},t.prototype.an=function(){this.Ye=!0,this.Je=!0},t}(),dw=function(){function t(t){this.un=t,this.hn=new Map,this.ln=Kx(),this._n=pw(),this.fn=new jx(wm)}return t.prototype.dn=function(t){for(var e=0,i=t.Ke;e<i.length;e++){var n=i[e];t.We instanceof yy?this.wn(n,t.We):t.We instanceof xy&&this.En(n,t.key,t.We)}for(var r=0,s=t.removedTargetIds;r<s.length;r++)n=s[r],this.En(n,t.key,t.We)},t.prototype.Tn=function(t){var e=this;this.In(t,(function(i){var n=e.mn(i);switch(t.state){case 0:e.An(i)&&n.tn(t.resumeToken);break;case 1:n.cn(),n.Xe||n.nn(),n.tn(t.resumeToken);break;case 2:n.cn(),n.Xe||e.removeTarget(i);break;case 3:e.An(i)&&(n.an(),n.tn(t.resumeToken));break;case 4:e.An(i)&&(e.Rn(i),n.tn(t.resumeToken));break;default:vm()}}))},t.prototype.In=function(t,e){var i=this;t.targetIds.length>0?t.targetIds.forEach(e):this.hn.forEach((function(t,n){i.An(n)&&e(n)}))},t.prototype.Pn=function(t){var e=t.targetId,i=t.je.count,n=this.yn(e);if(n){var r=n.target;if(Sy(r))if(0===i){var s=new Vm(r.path);this.En(e,s,new xy(s,Dm.min()))}else gm(1===i);else this.gn(e)!==i&&(this.Rn(e),this.fn=this.fn.add(e))}},t.prototype.Vn=function(t){var e=this,i=new Map;this.hn.forEach((function(n,r){var s=e.yn(r);if(s){if(n.Be&&Sy(s.target)){var o=new Vm(s.target.path);null!==e.ln.get(o)||e.pn(r,o)||e.En(r,o,new xy(o,t))}n.Ze&&(i.set(r,n.en()),n.nn())}}));var n=ew();this._n.forEach((function(t,i){var r=!0;i.Ae((function(t){var i=e.yn(t);return!i||2===i.Ft||(r=!1,!1)})),r&&(n=n.add(t))}));var r=new aw(t,i,this.fn,this.ln,n);return this.ln=Kx(),this._n=pw(),this.fn=new jx(wm),r},t.prototype.wn=function(t,e){if(this.An(t)){var i=this.pn(t,e.key)?2:0;this.mn(t).sn(e.key,i),this.ln=this.ln.zt(e.key,e),this._n=this._n.zt(e.key,this.bn(e.key).add(t))}},t.prototype.En=function(t,e,i){if(this.An(t)){var n=this.mn(t);this.pn(t,e)?n.sn(e,1):n.rn(e),this._n=this._n.zt(e,this.bn(e).delete(t)),i&&(this.ln=this.ln.zt(e,i))}},t.prototype.removeTarget=function(t){this.hn.delete(t)},t.prototype.gn=function(t){var e=this.mn(t).en();return this.un.vn(t).size+e.qe.size-e.Qe.size},t.prototype.on=function(t){this.mn(t).on()},t.prototype.mn=function(t){var e=this.hn.get(t);return e||(e=new fw,this.hn.set(t,e)),e},t.prototype.bn=function(t){var e=this._n.get(t);return e||(e=new jx(wm),this._n=this._n.zt(t,e)),e},t.prototype.An=function(t){var e=null!==this.yn(t);return e||cm("WatchChangeAggregator","Detected inactive target",t),e},t.prototype.yn=function(t){var e=this.hn.get(t);return e&&e.Xe?null:this.un.Sn(t)},t.prototype.Rn=function(t){var e=this;this.hn.set(t,new fw),this.un.vn(t).forEach((function(i){e.En(t,i,null)}))},t.prototype.pn=function(t,e){return this.un.vn(t).has(e)},t}(); 7525/** 7526 * @license 7527 * Copyright 2017 Google LLC 7528 * 7529 * Licensed under the Apache License, Version 2.0 (the "License"); 7530 * you may not use this file except in compliance with the License. 7531 * You may obtain a copy of the License at 7532 * 7533 * http://www.apache.org/licenses/LICENSE-2.0 7534 * 7535 * Unless required by applicable law or agreed to in writing, software 7536 * distributed under the License is distributed on an "AS IS" BASIS, 7537 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7538 * See the License for the specific language governing permissions and 7539 * limitations under the License. 7540 */function pw(){return new Xx(Vm.H)}function vw(){return new Xx(Vm.H)} 7541/** 7542 * @license 7543 * Copyright 2017 Google LLC 7544 * 7545 * Licensed under the Apache License, Version 2.0 (the "License");
7546 * you may not use this file except in compliance with the License. 7547 * You may obtain a copy of the License at 7548 * 7549 * http://www.apache.org/licenses/LICENSE-2.0 7550 * 7551 * Unless required by applicable law or agreed to in writing, software 7552 * distributed under the License is distributed on an "AS IS" BASIS, 7553 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7554 * See the License for the specific language governing permissions and 7555 * limitations under the License. 7556 */var gw={asc:"ASCENDING",desc:"DESCENDING"},mw={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},yw=function(t,e){this.t=t,this.Bt=e};function xw(t,e){return t.Bt?new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")+"."+("000000000"+e.nanoseconds).slice(-9)+"Z":{seconds:""+e.seconds,nanos:e.nanoseconds}}function ww(t,e){return t.Bt?e.toBase64():e.toUint8Array()}function _w(t,e){return xw(t,e.j())}function bw(t){return gm(!!t),Dm.K((e=jm(t),new Lm(e.seconds,e.nanos)));var e}function Tw(t,e){return(i=t,new Nm(["projects",i.projectId,"databases",i.database])).child("documents").child(e).rt();var i}function Ew(t){var e=Nm.ot(t);return gm(Hw(e)),e}function Sw(t,e){return Tw(t.t,e.path)}function Aw(t,e){var i=Ew(e);if(i.get(1)!==t.t.projectId)throw new Sm(Em.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+i.get(1)+" vs "+t.t.projectId);if(i.get(3)!==t.t.database)throw new Sm(Em.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+i.get(3)+" vs "+t.t.database);return new Vm(Mw(i))}function Cw(t,e){return Tw(t.t,e)}function Ow(t){var e=Ew(t);return 4===e.length?Nm.ct():Mw(e)}function Rw(t){return new Nm(["projects",t.t.projectId,"databases",t.t.database]).rt()}function Mw(t){return gm(t.length>4&&"documents"===t.get(4)),t.Y(5)}function Pw(t,e,i){return{name:Sw(t,e),fields:i.proto.mapValue.fields}}function Iw(t,e){var i,n,r;if(e instanceof Mx)i={update:Pw(t,e.key,e.value)};else if(e instanceof Bx)i={delete:Sw(t,e.key)};else if(e instanceof Px)i={update:Pw(t,e.key,e.data),updateMask:jw(e.Gt)};else{if(!(e instanceof Ux))return vm();i={verify:Sw(t,e.key)}}return e.fieldTransforms.length>0&&(i.updateTransforms=e.fieldTransforms.map((function(t){return function(t,e){var i=e.transform;if(i instanceof fx)return{fieldPath:e.field.rt(),setToServerValue:"REQUEST_TIME"};if(i instanceof dx)return{fieldPath:e.field.rt(),appendMissingElements:{values:i.elements}};if(i instanceof vx)return{fieldPath:e.field.rt(),removeAllFromArray:{values:i.elements}};if(i instanceof mx)return{fieldPath:e.field.rt(),increment:i.Ut};throw vm()}(0,t)}))),e.jt.Wt||(i.currentDocument=(n=t,void 0!==(r=e.jt).updateTime?{updateTime:_w(n,r.updateTime)}:void 0!==r.exists?{exists:r.exists}:vm())),i}function kw(t,e){var i,n=e.currentDocument?void 0!==(i=e.currentDocument).updateTime?bx.updateTime(bw(i.updateTime)):void 0!==i.exists?bx.exists(i.exists):bx.Kt():bx.Kt(),r=e.updateTransforms?e.updateTransforms.map((function(e){return function(t,e){var i=null;if("setToServerValue"in e)gm("REQUEST_TIME"===e.setToServerValue),i=new fx;else if("appendMissingElements"in e){var n=e.appendMissingElements.values||[];i=new dx(n)}else if("removeAllFromArray"in e){var r=e.removeAllFromArray.values||[];i=new vx(r)}else"increment"in e?i=new mx(t,e.increment):vm();var s=Um.lt(e.fieldPath);return new wx(s,i)}(t,e)})):[];if(e.update){e.update.name;var s=Aw(t,e.update.name),o=new py({mapValue:{fields:e.update.fields}});if(e.updateMask){var a=function(t){var e=t.fieldPaths||[];return new Gm(e.map((function(t){return Um.lt(t)})))}(e.updateMask);return new Px(s,o,a,n,r)}return new Mx(s,o,n,r)}if(e.delete){var h=Aw(t,e.delete);return new Bx(h,n)}if(e.verify){var u=Aw(t,e.verify);return new Ux(u,n)}return vm()}function Lw(t,e){return{documents:[Cw(t,e.path)]}}function Dw(t,e){var i={structuredQuery:{}},n=e.path;null!==e.collectionGroup?(i.parent=Cw(t,n),i.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(i.parent=Cw(t,n.X()),i.structuredQuery.from=[{collectionId:n.tt()}]);var r=function(t){if(0!==t.length){var e=t.map((function(t){return function(t){if("=="===t.op){if(fy(t.value))return{unaryFilter:{field:zw(t.field),op:"IS_NAN"}};if(cy(t.value))return{unaryFilter:{field:zw(t.field),op:"IS_NULL"}}}else if("!="===t.op){if(fy(t.value))return{unaryFilter:{field:zw(t.field),op:"IS_NOT_NA
7556N"}};if(cy(t.value))return{unaryFilter:{field:zw(t.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:zw(t.field),op:Yw(t.op),value:t.value}}}(t)}));return 1===e.length?e[0]:{compositeFilter:{op:"AND",filters:e}}}}(e.filters);r&&(i.structuredQuery.where=r);var s=function(t){if(0!==t.length)return t.map((function(t){return{field:zw((e=t).field),direction:Vw(e.dir)};var e}))}(e.orderBy);s&&(i.structuredQuery.orderBy=s);var o,a,h=(o=t,a=e.limit,o.Bt||Jm(a)?a:{value:a});return null!==h&&(i.structuredQuery.limit=h),e.startAt&&(i.structuredQuery.startAt=Bw(e.startAt)),e.endAt&&(i.structuredQuery.endAt=Bw(e.endAt)),i}function Fw(t){var e=Ow(t.parent),i=t.structuredQuery,n=i.from?i.from.length:0,r=null;if(n>0){gm(1===n);var s=i.from[0];s.allDescendants?r=s.collectionId:e=e.child(s.collectionId)}var o=[];i.where&&(o=Nw(i.where));var a=[];i.orderBy&&(a=i.orderBy.map((function(t){return new Ny(Xw((e=t).field),function(t){switch(t){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction));var e})));var h,u,l=null;i.limit&&(h=i.limit,l=Jm(u="object"==typeof h?h.value:h)?null:u);var c=null;i.startAt&&(c=Uw(i.startAt));var f=null;return i.endAt&&(f=Uw(i.endAt)),zy(e,r,a,o,l,"F",c,f)}function Nw(t){return t?void 0!==t.unaryFilter?[Ww(t)]:void 0!==t.fieldFilter?[Gw(t)]:void 0!==t.compositeFilter?t.compositeFilter.filters.map((function(t){return Nw(t)})).reduce((function(t,e){return t.concat(e)})):vm():[]}function Bw(t){return{before:t.before,values:t.position}}function Uw(t){var e=!!t.before,i=t.values||[];return new Dy(i,e)}function Vw(t){return gw[t]}function Yw(t){return mw[t]}function zw(t){return{fieldPath:t.rt()}}function Xw(t){return Um.lt(t.fieldPath)}function Gw(t){return Ay.create(Xw(t.fieldFilter.field),function(t){switch(t){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":default:return vm()}}(t.fieldFilter.op),t.fieldFilter.value)}function Ww(t){switch(t.unaryFilter.op){case"IS_NAN":var e=Xw(t.unaryFilter.field);return Ay.create(e,"==",{doubleValue:NaN});case"IS_NULL":var i=Xw(t.unaryFilter.field);return Ay.create(i,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":var n=Xw(t.unaryFilter.field);return Ay.create(n,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var r=Xw(t.unaryFilter.field);return Ay.create(r,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":default:return vm()}}function jw(t){var e=[];return t.fields.forEach((function(t){return e.push(t.rt())})),{fieldPaths:e}}function Hw(t){return t.length>=4&&"projects"===t.get(0)&&"databases"===t.get(2)} 7557/** 7558 * @license 7559 * Copyright 2017 Google LLC 7560 * 7561 * Licensed under the Apache License, Version 2.0 (the "License"); 7562 * you may not use this file except in compliance with the License. 7563 * You may obtain a copy of the License at 7564 * 7565 * http://www.apache.org/licenses/LICENSE-2.0 7566 * 7567 * Unless required by applicable law or agreed to in writing, software 7568 * distributed under the License is distributed on an "AS IS" BASIS, 7569 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7570 * See the License for the specific language governing permissions and 7571 * limitations under the License. 7572 */var qw=function(){var t=this;this.promise=new Promise((function(e,i){t.resolve=e,t.reject=i}))},Kw=function(){function t(t){var e=this;this.Dn=null,this.Cn=null,this.result=void 0,this.error=void 0,this.xn=!1,this.Nn=!1,t((function(t){e.xn=!0,e.result=t,e.Dn&&e.Dn(t)}),(function(t){e.xn=!0,e.error=t,e.Cn&&e.Cn(t)}))}return t.prototype.catch=function(t){return this.next(void 0,t)},t.prototype.next=function(e,i){var n=this;return this.Nn&&vm(),this.Nn=!0,this.xn?this.error?this.$n(i,this.error):this.Fn(e,this.result):new t((function(t,r){n.Dn=function(i){n.Fn(e,i).next(t,r)},n.Cn=function(e){n.$n(i,e).next(t,r)}}))},t.prototype.On=function(){var t=this;return new Promise((function(e,i){t.next(e,i)}))},t.prototype.kn=function(e){try{var i=e();return i instanceof t?i:t.resolve(i)}catch(n){return t.reject(n)}},t.prototype.Fn=function(e,i){return e?this.kn((function(){return e(i)})):t.resolve(i)},t.prototype.$n=function(e,i){return e?this.kn((function(){return e(i)})):t.reject(i)},t.resolve=function(e){return new t((function(t,i){t(e)}))},t.reject=function(e){return new t((function(t,i){i(e)}))},t.Mn=function(e){return new t((function(t,i){var n=0,r=0,s=!1;e.forEach((function(e){++n,e.next((function(){++r,s&&r===n&&t()}),(function(t){return i(t)}))})),s=!0,r===n&&t()}))},t.Ln=function(e){for(var i=t.resolve(!1),n=function(e){i=i.next((function(i){return i?t.resolve(i):e()}))},r=0,s=e;r<s.length;r++)n(s[r]);return i},t.forEach=function(t,e){var i=this,n=[];return t.forEach((function(t,r){n.push(e.call(i,t,r))})),this.Mn(n)},t}(),Zw=function(){function t(t,e){var i=this;this.action=t,this.transaction=e,this.aborted=!1,this.Bn=new qw,this.transaction.oncomplete=function(){i.Bn.resolve()},this.transaction.onabort=function(){e.error?i.Bn.reject(new $w(t,e.error)):i.Bn.resolve()},this.transaction.onerror=function(e){var n=r_(e.target.error);i.Bn.reject(new $w(t,n))}}return t.open=function(e,i,n,r){try{return new t(i,e.transaction(r,n))}catch(s){throw new $w(i,s)}},Object.defineProperty(t.prototype,"qn",{get:function(){return this.Bn.promise}
7572,enumerable:!1,configurable:!0}),t.prototype.abort=function(t){t&&this.Bn.reject(t),this.aborted||(cm("SimpleDb","Aborting transaction:",t?t.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())},t.prototype.store=function(t){var e=this.transaction.objectStore(t);return new e_(e)},t}(),Qw=function(){function t(e,i,n){this.name=e,this.version=i,this.Un=n,12.2===t.Qn(pf())&&fm("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}return t.delete=function(t){return cm("SimpleDb","Removing database:",t),i_(window.indexedDB.deleteDatabase(t)).On()},t.Kn=function(){if("undefined"==typeof indexedDB)return!1;if(t.Wn())return!0;var e=pf(),i=t.Qn(e),n=0<i&&i<10,r=t.jn(e),s=0<r&&r<4.5;return!(e.indexOf("MSIE ")>0||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0||n||s)},t.Wn=function(){var t;return"undefined"!=typeof process&&"YES"===(null===(t=process.env)||void 0===t?void 0:t.Gn)},t.zn=function(t,e){return t.store(e)},t.Qn=function(t){var e=t.match(/i(?:phone|pad|pod) os ([\d_]+)/i),i=e?e[1].split("_").slice(0,2).join("."):"-1";return Number(i)},t.jn=function(t){var e=t.match(/Android ([\d.]+)/i),i=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(i)},t.prototype.Hn=function(t){return af(this,void 0,void 0,(function(){var e,i=this;return hf(this,(function(n){switch(n.label){case 0:return this.db?[3,2]:(cm("SimpleDb","Opening database:",this.name),e=this,[4,new Promise((function(e,n){var r=indexedDB.open(i.name,i.version);r.onsuccess=function(t){var i=t.target.result;e(i)},r.onblocked=function(){n(new $w(t,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},r.onerror=function(e){var i=e.target.error;"VersionError"===i.name?n(new Sm(Em.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):n(new $w(t,i))},r.onupgradeneeded=function(t){cm("SimpleDb",'Database "'+i.name+'" requires upgrade from version:',t.oldVersion);var e=t.target.result;i.Un.Jn(e,r.transaction,t.oldVersion,i.version).next((function(){cm("SimpleDb","Database upgrade to version "+i.version+" complete")}))}}))]);case 1:e.db=n.sent(),n.label=2;case 2:return[2,(this.Yn&&(this.db.onversionchange=function(t){return i.Yn(t)}),this.db)]}}))}))},t.prototype.Xn=function(t){this.Yn=t,this.db&&(this.db.onversionchange=function(e){return t(e)})},t.prototype.runTransaction=function(t,e,i,n){return af(this,void 0,void 0,(function(){var r,s,o,a,h;return hf(this,(function(u){switch(u.label){case 0:r="readonly"===e,s=0,o=function(){var e,o,h,u,l;return hf(this,(function(c){switch(c.label){case 0:++s,c.label=1;case 1:return c.trys.push([1,4,,5]),[4,a.Hn(t)];case 2:return a.db=c.sent(),e=Zw.open(a.db,t,r?"readonly":"readwrite",i),o=n(e).catch((function(t){return e.abort(t),Kw.reject(t)})).On(),h={},o.catch((function(){})),[4,e.qn];case 3:return[2,(h.value=(c.sent(),o),h)];case 4:return u=c.sent(),l="FirebaseError"!==u.name&&s<3,cm("SimpleDb","Transaction failed with error:",u.message,"Retrying:",l),a.close(),l?[3,5]:[2,{value:Promise.reject(u)}];case 5:return[2]}}
7572))},a=this,u.label=1;case 1:return[5,o()];case 2:if("object"==typeof(h=u.sent()))return[2,h.value];u.label=3;case 3:return[3,1];case 4:return[2]}}))}))},t.prototype.close=function(){this.db&&this.db.close(),this.db=void 0},t}(),Jw=function(){function t(t){this.Zn=t,this.ts=!1,this.es=null}return Object.defineProperty(t.prototype,"xn",{get:function(){return this.ts},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ns",{get:function(){return this.es},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cursor",{set:function(t){this.Zn=t},enumerable:!1,configurable:!0}),t.prototype.done=function(){this.ts=!0},t.prototype.ss=function(t){this.es=t},t.prototype.delete=function(){return i_(this.Zn.delete())},t}(),$w=function(t){function e(e,i){var n=this;return(n=t.call(this,Em.UNAVAILABLE,"IndexedDB transaction '"+e+"' failed: "+i)||this).name="IndexedDbTransactionError",n}return sf(e,t),e}(Sm); 7573/** 7574 * @license 7575 * Copyright 2017 Google LLC 7576 * 7577 * Licensed under the Apache License, Version 2.0 (the "License"); 7578 * you may not use this file except in compliance with the License. 7579 * You may obtain a copy of the License at 7580 * 7581 * http://www.apache.org/licenses/LICENSE-2.0 7582 * 7583 * Unless required by applicable law or agreed to in writing, software 7584 * distributed under the License is distributed on an "AS IS" BASIS, 7585 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7586 * See the License for the specific language governing permissions and 7587 * limitations under the License. 7588 */function t_(t){return"IndexedDbTransactionError"===t.name}var e_=function(){function t(t){this.store=t}return t.prototype.put=function(t,e){var i;return void 0!==e?(cm("SimpleDb","PUT",this.store.name,t,e),i=this.store.put(e,t)):(cm("SimpleDb","PUT",this.store.name,"<auto-key>",t),i=this.store.put(t)),i_(i)},t.prototype.add=function(t){return cm("SimpleDb","ADD",this.store.name,t,t),i_(this.store.add(t))},t.prototype.get=function(t){var e=this;return i_(this.store.get(t)).next((function(i){return void 0===i&&(i=null),cm("SimpleDb","GET",e.store.name,t,i),i}))},t.prototype.delete=function(t){return cm("SimpleDb","DELETE",this.store.name,t),i_(this.store.delete(t))},t.prototype.count=function(){return cm("SimpleDb","COUNT",this.store.name),i_(this.store.count())},t.prototype.rs=function(t,e){var i=this.cursor(this.options(t,e)),n=[];return this.os(i,(function(t,e){n.push(e)})).next((function(){return n}))},t.prototype.cs=function(t,e){cm("SimpleDb","DELETE ALL",this.store.name);var i=this.options(t,e);i.us=!1;var n=this.cursor(i);return this.os(n,(function(t,e,i){return i.delete()}))},t.prototype.hs=function(t,e){var i;e?i=t:(i={},e=t);var n=this.cursor(i);return this.os(n,e)},t.prototype.ls=function(t){var e=this.cursor({});return new Kw((function(i,n){e.onerror=function(t){var e=r_(t.target.error);n(e)},e.onsuccess=function(e){var n=e.target.result;n?t(n.primaryKey,n.value).next((function(t){t?n.continue():i()})):i()}}))},t.prototype.os=function(t,e){var i=[];return new Kw((function(n,r){t.onerror=function(t){r(t.target.error)},t.onsuccess=function(t){var r=t.target.result;if(r){var s=new Jw(r),o=e(r.primaryKey,r.value,s);if(o instanceof Kw){var a=o.catch((function(t){return s.done(),Kw.reject(t)}));i.push(a)}s.xn?n():null===s.ns?r.continue():r.continue(s.ns)}else n()}})).next((function(){return Kw.Mn(i)}))},t.prototype.options=function(t,e){var i;return void 0!==t&&("string"==typeof t?i=t:e=t),{index:i,range:e}},t.prototype.cursor=function(t){var e="next";if(t.reverse&&(e="prev"),t.index){var i=this.store.index(t.index);return t.us?i.openKeyCursor(t.range,e):i.openCursor(t.range,e)}return this.store.openCursor(t.range,e)},t}();function i_(t){return new Kw((function(e,i){t.onsuccess=function(t){var i=t.target.result;e(i)},t.onerror=function(t){var e=r_(t.target.error);i(e)}}))}var n_=!1;function r_(t){var e=Qw.Qn(pf());if(e>=12.2&&e<13){var i="An internal error was encountered in the Indexed Database server";if(t.message.indexOf(i)>=0){var n=new Sm("internal","IOS_INDEXEDDB_BUG1: IndexedDb has thrown '"+i+"'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.");return n_||(n_=!0,setTimeout((function(){throw n}),0)),n}}return t} 7589/** 7590 * @license 7591 * Copyright 2017 Google LLC 7592 * 7593 * Licensed under the Apache License, Version 2.0 (the "License");
7594 * you may not use this file except in compliance with the License. 7595 * You may obtain a copy of the License at 7596 * 7597 * http://www.apache.org/licenses/LICENSE-2.0 7598 * 7599 * Unless required by applicable law or agreed to in writing, software 7600 * distributed under the License is distributed on an "AS IS" BASIS, 7601 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7602 * See the License for the specific language governing permissions and 7603 * limitations under the License. 7604 */var s_=function(){function t(t,e,i,n,r){this._s=t,this.fs=e,this.ds=i,this.op=n,this.ws=r,this.Es=new qw,this.then=this.Es.promise.then.bind(this.Es.promise),this.Es.promise.catch((function(t){}))}return t.Ts=function(e,i,n,r,s){var o=new t(e,i,Date.now()+n,r,s);return o.start(n),o},t.prototype.start=function(t){var e=this;this.Is=setTimeout((function(){return e.As()}),t)},t.prototype.Rs=function(){return this.As()},t.prototype.cancel=function(t){null!==this.Is&&(this.clearTimeout(),this.Es.reject(new Sm(Em.CANCELLED,"Operation cancelled"+(t?": "+t:"")))
7604)},t.prototype.As=function(){var t=this;this._s.Ps((function(){return null!==t.Is?(t.clearTimeout(),t.op().then((function(e){return t.Es.resolve(e)}))):Promise.resolve()}))},t.prototype.clearTimeout=function(){null!==this.Is&&(this.ws(this),clearTimeout(this.Is),this.Is=null)},t}();function o_(t,e){if(fm("AsyncQueue",e+": "+t),t_(t))return new Sm(Em.UNAVAILABLE,e+": "+t);throw t} 7605/** 7606 * @license 7607 * Copyright 2020 Google LLC 7608 * 7609 * Licensed under the Apache License, Version 2.0 (the "License"); 7610 * you may not use this file except in compliance with the License. 7611 * You may obtain a copy of the License at 7612 * 7613 * http://www.apache.org/licenses/LICENSE-2.0 7614 * 7615 * Unless required by applicable law or agreed to in writing, software 7616 * distributed under the License is distributed on an "AS IS" BASIS, 7617 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7618 * See the License for the specific language governing permissions and 7619 * limitations under the License. 7620 */var a_="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",h_=function(){function t(){this.ys=[]}return t.prototype.gs=function(t){this.ys.push(t)},t.prototype.Vs=function(){this.ys.forEach((function(t){return t()}))},t}(); 7621/** 7622 * @license 7623 * Copyright 2017 Google LLC 7624 * 7625 * Licensed under the Apache License, Version 2.0 (the "License"); 7626 * you may not use this file except in compliance with the License. 7627 * You may obtain a copy of the License at 7628 * 7629 * http://www.apache.org/licenses/LICENSE-2.0 7630 * 7631 * Unless required by applicable law or agreed to in writing, software 7632 * distributed under the License is distributed on an "AS IS" BASIS, 7633 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7634 * See the License for the specific language governing permissions and 7635 * limitations under the License. 7636 */function u_(t){for(var e="",i=0;i<t.length;i++)e.length>0&&(e=c_(e)),e=l_(t.get(i),e);return c_(e)}function l_(t,e){for(var i=e,n=t.length,r=0;r<n;r++){var s=t.charAt(r);switch(s){case"\0":i+="��";break;case"�":i+="��";break;default:i+=s}}return i}function c_(t){return t+"��"}function f_(t){var e=t.length;if(gm(e>=2),2===e)return gm("�"===t.charAt(0)&&"�"===t.charAt(1)),Nm.ct();for(var i=e-2,n=[],r="",s=0;s<e;){var o=t.indexOf("�",s);switch((o<0||o>i)&&vm(),t.charAt(o+1)){case"�":var a=t.substring(s,o),h=void 0;0===r.length?h=a:(h=r+=a,r=""),n.push(h);break;case"�":r+=t.substring(s,o),r+="\0";break;case"�":r+=t.substring(s,o+1);break;default:vm()}s=o+2}return new Nm(n)} 7637/** 7638 * @license 7639 * Copyright 2017 Google LLC 7640 * 7641 * Licensed under the Apache License, Version 2.0 (the "License"); 7642 * you may not use this file except in compliance with the License. 7643 * You may obtain a copy of the License at 7644 * 7645 * http://www.apache.org/licenses/LICENSE-2.0 7646 * 7647 * Unless required by applicable law or agreed to in writing, software 7648 * distributed under the License is distributed on an "AS IS" BASIS, 7649 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7650 * See the License for the specific language governing permissions and 7651 * limitations under the License. 7652 */var d_=function(t,e){this.seconds=t,this.nanoseconds=e},p_=function(t,e,i){this.ownerId=t,this.allowTabSynchronization=e,this.leaseTimestampMs=i};p_.store="owner",p_.key="owner";var v_=function(t,e,i){this.userId=t,this.lastAcknowledgedBatchId=e,this.lastStreamToken=i};v_.store="mutationQueues",v_.keyPath="userId";var g_=function(t,e,i,n,r){this.userId=t,this.batchId=e,this.localWriteTimeMs=i,this.baseMutations=n,this.mutations=r};g_.store="mutations",g_.keyPath="batchId",g_.userMutationsIndex="userMutationsIndex",g_.userMutationsKeyPath=["userId","batchId"];var m_=function(){function t(){}return t.prefixForUser=function(t){return[t]},t.prefixForPath=function(t,e){return[t,u_(e)]},t.key=function(t,e,i){return[t,u_(e),i]},t}();m_.store="documentMutations",m_.PLACEHOLDER=new m_;var y_=function(t,e){this.path=t,this.readTime=e},x_=function(t,e){this.path=t,this.version=e},w_=function(t,e,i,n,r,s){this.unknownDocument=t,this.noDocument=e,this.document=i,this.hasCommittedMutations=n,this.readTime=r,this.parentPath=s};w_.store="remoteDocuments",w_.readTimeIndex="readTimeIndex",w_.readTimeIndexPath="readTime",w_.collectionReadTimeIndex="collectionReadTimeIndex",w_.collectionReadTimeIndexPath=["parentPath","readTime"];var __=function(t){this.byteSize=t};__.store="remoteDocumentGlobal",__.key="remoteDocumentGlobalKey";
7652var b_=function(t,e,i,n,r,s,o){this.targetId=t,this.canonicalId=e,this.readTime=i,this.resumeToken=n,this.lastListenSequenceNumber=r,this.lastLimboFreeSnapshotVersion=s,this.query=o};b_.store="targets",b_.keyPath="targetId",b_.queryTargetsIndexName="queryTargetsIndex",b_.queryTargetsKeyPath=["canonicalId","targetId"];var T_=function(t,e,i){this.targetId=t,this.path=e,this.sequenceNumber=i};T_.store="targetDocuments",T_.keyPath=["targetId","path"],T_.documentTargetsIndex="documentTargetsIndex",T_.documentTargetsKeyPath=["path","targetId"];var E_=function(t,e,i,n){this.highestTargetId=t,this.highestListenSequenceNumber=e,this.lastRemoteSnapshotVersion=i,this.targetCount=n};E_.key="targetGlobalKey",E_.store="targetGlobal";var S_=function(t,e){this.collectionId=t,this.parent=e};S_.store="collectionParents",S_.keyPath=["collectionId","parent"];var A_=function(t,e,i,n){this.clientId=t,this.updateTimeMs=e,this.networkEnabled=i,this.inForeground=n};A_.store="clientMetadata",A_.keyPath="clientId";var C_=function(t,e,i){this.bundleId=t,this.createTime=e,this.version=i};C_.store="bundles",C_.keyPath="bundleId";var O_=function(t,e,i){this.name=t,this.readTime=e,this.bundledQuery=i};O_.store="namedQueries",O_.keyPath="name";var R_=cf(cf(cf(cf([v_.store,g_.store,m_.store,w_.store,b_.store,p_.store,E_.store,T_.store],[A_.store]),[__.store]),[S_.store]),[C_.store,O_.store]),M_=function(t){function e(e,i){var n=this;return(n=t.call(this)||this).ps=e,n.bs=i,n}return sf(e,t),e}(h_); 7653/** 7654 * @license 7655 * Copyright 2020 Google LLC 7656 * 7657 * Licensed under the Apache License, Version 2.0 (the "License"); 7658 * you may not use this file except in compliance with the License. 7659 * You may obtain a copy of the License at 7660 * 7661 * http://www.apache.org/licenses/LICENSE-2.0 7662 * 7663 * Unless required by applicable law or agreed to in writing, software 7664 * distributed under the License is distributed on an "AS IS" BASIS, 7665 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7666 * See the License for the specific language governing permissions and 7667 * limitations under the License. 7668 */function P_(t,e){var i=mm(t);return Qw.zn(i.ps,e)} 7669/** 7670 * @license 7671 * Copyright 2017 Google LLC 7672 * 7673 * Licensed under the Apache License, Version 2.0 (the "License"); 7674 * you may not use this file except in compliance with the License. 7675 * You may obtain a copy of the License at 7676 * 7677 * http://www.apache.org/licenses/LICENSE-2.0 7678 * 7679 * Unless required by applicable law or agreed to in writing, software 7680 * distributed under the License is distributed on an "AS IS" BASIS, 7681 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7682 * See the License for the specific language governing permissions and 7683 * limitations under the License. 7684 */var I_=function(){function t(t,e,i,n){this.batchId=t,this.vs=e,this.baseMutations=i,this.mutations=n}return t.prototype.Ss=function(t,e,i){for(var n=i.Ds,r=0;r<this.mutations.length;r++){var s=this.mutations[r];s.key.isEqual(t)&&(e=Sx(s,e,n[r]))}return e},t.prototype.Cs=function(t,e){for(var i=0,n=this.baseMutations;i<n.length;i++)(o=n[i]).key.isEqual(t)&&(e=Ax(o,e,this.vs));for(var r=0,s=this.mutations;r<s.length;r++){var o;(o=s[r]).key.isEqual(t)&&(e=Ax(o,e,this.vs))}return e},t.prototype.xs=function(t){var e=this,i=t;return this.mutations.forEach((function(n){var r=e.Cs(n.key,t.get(n.key));r&&(i=i.zt(n.key,r))})),i},t.prototype.keys=function(){return this.mutations.reduce((function(t,e){return t.add(e.key)}),ew())},t.prototype.isEqual=function(t){return this.batchId===t.batchId&&_m(this.mutations,t.mutations,(function(t,e){return Ox(t,e)}))&&_m(this.baseMutations,t.baseMutations,(function(t,e){return Ox(t,e)}))},t}(),k_=function(){function t(t,e,i,n){this.batch=t,this.Ns=e,this.Ds=i,this.$s=n}return t.from=function(e,i,n){gm(e.mutations.length===n.length);for(var r=$x,s=e.mutations,o=0;o<s.length;o++)r=r.zt(s[o].key,n[o].version);return new t(e,i,n,r)},t}(),L_=function(t){this.Fs=t};function D_(t,e){if(e.document)return function(t,e,i){var n=Aw(t,e.name),r=bw(e.updateTime),s=new py({mapValue:{fields:e.fields}});return new yy(n,r,s,{hasCommittedMutations:!!i})}(t.Fs,e.document,!!e.hasCommittedMutations);if(e.noDocument){var i=Vm.Et(e.noDocument.path),n=V_(e.noDocument.readTime);return new xy(i,n,{hasCommittedMutations:!!e.hasCommittedMutations})}if(e.unknownDocument){var r=Vm.Et(e.unknownDocument.path);return n=V_(e.unknownDocument.version),new wy(r,n)}return vm()}function F_(t,e,i){var n,r,s=N_(i),o=e.key.path.X().it();if(e instanceof yy){var a={name:Sw(n=t.Fs,(r=e).key),fields:r.bt().mapValue.fields,updateTime:xw(n,r.version.j())},h=e.hasCommittedMutations;return new w_(null,null,a,h,s,o)}if(e instanceof xy){var u=e.key.path.it(),l=U_(e.version);return h=e.hasCommittedMutations,new w_(null,new y_(u,l),null,h,s,o)}if(e instanceof wy){var c=e.key.path.it(),f=U_(e.version);
7684return new w_(new x_(c,f),null,null,!0,s,o)}return vm()}function N_(t){var e=t.j();return[e.seconds,e.nanoseconds]}function B_(t){var e=new Lm(t[0],t[1]);return Dm.K(e)}function U_(t){var e=t.j();return new d_(e.seconds,e.nanoseconds)}function V_(t){var e=new Lm(t.seconds,t.nanoseconds);return Dm.K(e)}function Y_(t,e){for(var i=(e.baseMutations||[]).map((function(e){return kw(t.Fs,e)})),n=0;n<e.mutations.length-1;++n){var r=e.mutations[n];if(n+1<e.mutations.length&&void 0!==e.mutations[n+1].transform){var s=e.mutations[n+1];r.updateTransforms=s.transform.fieldTransforms,e.mutations.splice(n+1,1),++n}}var o=e.mutations.map((function(e){return kw(t.Fs,e)})),a=Lm.fromMillis(e.localWriteTimeMs);return new I_(e.batchId,a,i,o)}function z_(t){var e,i,n=V_(t.readTime),r=void 0!==t.lastLimboFreeSnapshotVersion?V_(t.lastLimboFreeSnapshotVersion):Dm.min();return void 0!==t.query.documents?(gm(1===(i=t.query).documents.length),e=Zy(Xy(Ow(i.documents[0])))):e=Zy(Fw(t.query)),new rx(e,t.targetId,0,t.lastListenSequenceNumber,n,r,Tm.fromBase64String(t.resumeToken))}function X_(t,e){var i,n=U_(e.Ot),r=U_(e.lastLimboFreeSnapshotVersion);i=Sy(e.target)?Lw(t.Fs,e.target):Dw(t.Fs,e.target);var s=e.resumeToken.toBase64();return new b_(e.targetId,Ty(e.target),n,s,e.sequenceNumber,r,i)}function G_(t){var e=Fw({parent:t.parent,structuredQuery:t.structuredQuery});return"LAST"===t.limitType?Qy(e,e.limit,"L"):e} 7685/** 7686 * @license 7687 * Copyright 2020 Google LLC 7688 * 7689 * Licensed under the Apache License, Version 2.0 (the "License"); 7690 * you may not use this file except in compliance with the License. 7691 * You may obtain a copy of the License at 7692 * 7693 * http://www.apache.org/licenses/LICENSE-2.0 7694 * 7695 * Unless required by applicable law or agreed to in writing, software 7696 * distributed under the License is distributed on an "AS IS" BASIS, 7697 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7698 * See the License for the specific language governing permissions and 7699 * limitations under the License. 7700 */var W_=function(){function t(){}return t.prototype.Os=function(t,e){return j_(t).get(e).next((function(t){if(t)return{id:(e=t).bundleId,createTime:V_(e.createTime),version:e.version};var e}))},t.prototype.ks=function(t,e){return j_(t).put({bundleId:(i=e).id,createTime:U_(bw(i.createTime)),version:i.version});var i},t.prototype.Ms=function(t,e){return H_(t).get(e).next((function(t){if(t)return{name:(e=t).name,query:G_(e.bundledQuery),readTime:V_(e.readTime)};var e}))},t.prototype.Ls=function(t,e){return H_(t).put({name:(i=e).name,readTime:U_(bw(i.readTime)),bundledQuery:i.bundledQuery});var i},t}();function j_(t){return P_(t,C_.store)}function H_(t){return P_(t,O_.store)} 7701/** 7702 * @license 7703 * Copyright 2019 Google LLC 7704 * 7705 * Licensed under the Apache License, Version 2.0 (the "License"); 7706 * you may not use this file except in compliance with the License. 7707 * You may obtain a copy of the License at 7708 * 7709 * http://www.apache.org/licenses/LICENSE-2.0 7710 * 7711 * Unless required by applicable law or agreed to in writing, software 7712 * distributed under the License is distributed on an "AS IS" BASIS, 7713 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7714 * See the License for the specific language governing permissions and 7715 * limitations under the License. 7716 */var q_=function(){function t(){this.Bs=new K_}return t.prototype.qs=function(t,e){return this.Bs.add(e),Kw.resolve()},t.prototype.Us=function(t,e){return Kw.resolve(this.Bs.getEntries(e))},t}(),K_=function(){function t(){this.index={}}return t.prototype.add=function(t){var e=t.tt(),i=t.X(),n=this.index[e]||new jx(Nm.H),r=!n.has(i);return this.index[e]=n.add(i),r},t.prototype.has=function(t){var e=t.tt(),i=t.X(),n=this.index[e];return n&&n.has(i)},t.prototype.getEntries=function(t){return(this.index[t]||new jx(Nm.H)).it()},t}(),Z_=function(){function t(){this.Qs=new K_}return t.prototype.qs=function(t,e){var i=this;if(!this.Qs.has(e)){var n=e.tt(),r=e.X();t.gs((function(){i.Qs.add(e)}));var s={collectionId:n,parent:u_(r)};return Q_(t).put(s)}return Kw.resolve()},t.prototype.Us=function(t,e){var i=[],n=IDBKeyRange.bound([e,""],[bm(e),""],!1,!0);return Q_(t).rs(n).next((function(t){for(var n=0,r=t;n<r.length;n++){var s=r[n];if(s.collectionId!==e)break;i.push(f_(s.parent))}return i}))},t}();function Q_(t){return P_(t,S_.store)} 7717/** 7718 * @license 7719 * Copyright 2018 Google LLC 7720 * 7721 * Licensed under the Apache License, Version 2.0 (the "License");
7722 * you may not use this file except in compliance with the License. 7723 * You may obtain a copy of the License at 7724 * 7725 * http://www.apache.org/licenses/LICENSE-2.0 7726 * 7727 * Unless required by applicable law or agreed to in writing, software 7728 * distributed under the License is distributed on an "AS IS" BASIS, 7729 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7730 * See the License for the specific language governing permissions and 7731 * limitations under the License. 7732 */var J_={Ks:!1,Ws:0,js:0,Gs:0},$_=function(){function t(t,e,i){this.zs=t,this.Hs=e,this.Js=i}return t.Ys=function(e){return new t(e,t.Xs,t.Zs)},t}(); 7733/** 7734 * @license 7735 * Copyright 2017 Google LLC 7736 * 7737 * Licensed under the Apache License, Version 2.0 (the "License"); 7738 * you may not use this file except in compliance with the License. 7739 * You may obtain a copy of the License at 7740 * 7741 * http://www.apache.org/licenses/LICENSE-2.0 7742 * 7743 * Unless required by applicable law or agreed to in writing, software 7744 * distributed under the License is distributed on an "AS IS" BASIS, 7745 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7746 * See the License for the specific language governing permissions and 7747 * limitations under the License. 7748 */function tb(t){return af(this,void 0,void 0,(function(){return hf(this,(function(e){if(t.code!==Em.FAILED_PRECONDITION||t.message!==a_)throw t;return cm("LocalStore","Unexpectedly lost primary lease"),[2]}))}))} 7749/** 7750 * @license 7751 * Copyright 2017 Google LLC 7752 * 7753 * Licensed under the Apache License, Version 2.0 (the "License"); 7754 * you may not use this file except in compliance with the License. 7755 * You may obtain a copy of the License at 7756 * 7757 * http://www.apache.org/licenses/LICENSE-2.0 7758 * 7759 * Unless required by applicable law or agreed to in writing, software 7760 * distributed under the License is distributed on an "AS IS" BASIS, 7761 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7762 * See the License for the specific language governing permissions and 7763 * limitations under the License. 7764 */$_.Xs=10,$_.Zs=1e3,$_.ti=new $_(41943040,$_.Xs,$_.Zs),$_.ei=new $_(-1,0,0);var eb=function(){function t(t,e){this.ni=t,this.si=e,this.ii={}}return t.prototype.get=function(t){var e=this.ni(t),i=this.ii[e];if(void 0!==i)for(var n=0,r=i;n<r.length;n++){var s=r[n],o=s[0],a=s[1];if(this.si(o,t))return a}},t.prototype.has=function(t){return void 0!==this.get(t)},t.prototype.set=function(t,e){var i=this.ni(t),n=this.ii[i];if(void 0!==n){for(var r=0;r<n.length;r++)if(this.si(n[r][0],t))return void(n[r]=[t,e]);n.push([t,e])}else this.ii[i]=[[t,e]]},t.prototype.delete=function(t){var e=this.ni(t),i=this.ii[e];if(void 0===i)return!1;for(var n=0;n<i.length;n++)if(this.si(i[n][0],t))return 1===i.length?delete this.ii[e]:i.splice(n,1),!0;return!1},t.prototype.forEach=function(t){zm(this.ii,(function(e,i){for(var n=0,r=i;n<r.length;n++){var s=r[n],o=s[0],a=s[1];t(o,a)}}))},t.prototype.et=function(){return Xm(this.ii)},t}(),ib=function(){function t(){this.ri=new eb((function(t){return t.toString()}),(function(t,e){return t.isEqual(e)})),this.oi=!1}return t.prototype.ci=function(t){var e=this.ri.get(t);return e?e.readTime:Dm.min()},t.prototype.ai=function(t,e){this.ui(),this.ri.set(t.key,{hi:t,readTime:e})},t.prototype.li=function(t,e){void 0===e&&(e=null),this.ui(),this.ri.set(t,{hi:null,readTime:e})},t.prototype._i=function(t,e){this.ui();var i=this.ri.get(e);return void 0!==i?Kw.resolve(i.hi):this.fi(t,e)},t.prototype.getEntries=function(t,e){return this.di(t,e)},t.prototype.apply=function(t){return this.ui(),this.oi=!0,this.wi(t)},t.prototype.ui=function(){},t}(); 7765/** 7766 * @license 7767 * Copyright 2017 Google LLC 7768 * 7769 * Licensed under the Apache License, Version 2.0 (the "License"); 7770 * you may not use this file except in compliance with the License. 7771 * You may obtain a copy of the License at 7772 * 7773 * http://www.apache.org/licenses/LICENSE-2.0 7774 * 7775 * Unless required by applicable law or agreed to in writing, software 7776 * distributed under the License is distributed on an "AS IS" BASIS, 7777 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7778 * See the License for the specific language governing permissions and 7779 * limitations under the License. 7780 */ 7781/** 7782 * @license 7783 * Copyright 2020 Google LLC 7784 * 7785 * Licensed under the Apache License, Version 2.0 (the "License");
7786 * you may not use this file except in compliance with the License. 7787 * You may obtain a copy of the License at 7788 * 7789 * http://www.apache.org/licenses/LICENSE-2.0 7790 * 7791 * Unless required by applicable law or agreed to in writing, software 7792 * distributed under the License is distributed on an "AS IS" BASIS, 7793 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7794 * See the License for the specific language governing permissions and 7795 * limitations under the License. 7796 */function nb(t,e,i){var n=t.store(g_.store),r=t.store(m_.store),s=[],o=IDBKeyRange.only(i.batchId),a=0,h=n.hs({range:o},(function(t,e,i){return a++,i.delete()}));s.push(h.next((function(){gm(1===a)})));for(var u=[],l=0,c=i.mutations;l<c.length;l++){var f=c[l],d=m_.key(e,f.key.path,i.batchId);s.push(r.delete(d)),u.push(f.key)}return Kw.Mn(s).next((function(){return u}))}function rb(t){var e;if(t.document)e=t.document;else if(t.unknownDocument)e=t.unknownDocument;else{if(!t.noDocument)throw vm();e=t.noDocument}return JSON.stringify(e).length} 7797/** 7798 * @license 7799 * Copyright 2017 Google LLC 7800 * 7801 * Licensed under the Apache License, Version 2.0 (the "License"); 7802 * you may not use this file except in compliance with the License. 7803 * You may obtain a copy of the License at 7804 * 7805 * http://www.apache.org/licenses/LICENSE-2.0 7806 * 7807 * Unless required by applicable law or agreed to in writing, software 7808 * distributed under the License is distributed on an "AS IS" BASIS, 7809 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7810 * See the License for the specific language governing permissions and 7811 * limitations under the License. 7812 */var sb=function(){function t(t,e,i,n){this.userId=t,this.Qt=e,this.Ei=i,this.Ti=n,this.Ii={}}return t.mi=function(e,i,n,r){return gm(""!==e.uid),new t(e.m()?e.uid:"",i,n,r)},t.prototype.Ai=function(t){var e=!0,i=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return ab(t).hs({index:g_.userMutationsIndex,range:i},(function(t,i,n){e=!1,n.done()})).next((function(){return e}))},t.prototype.Ri=function(t,e,i,n){var r=this,s=hb(t),o=ab(t);return o.add({}).next((function(a){gm("number"==typeof a);for(var h=new I_(a,e,i,n),u=function(t,e,i){var n=i.baseMutations.map((function(e){return Iw(t.Fs,e)})),r=i.mutations.map((function(e){return Iw(t.Fs,e)}));return new g_(e,i.batchId,i.vs.toMillis(),n,r)}(r.Qt,r.userId,h),l=[],c=new jx((function(t,e){return wm(t.rt(),e.rt())})),f=0,d=n;f<d.length;f++){var p=d[f],v=m_.key(r.userId,p.key.path,a);c=c.add(p.key.path.X()),l.push(o.put(u)),l.push(s.put(v,m_.PLACEHOLDER))}return c.forEach((function(e){l.push(r.Ei.qs(t,e))})),t.gs((function(){r.Ii[a]=h.keys()})),Kw.Mn(l).next((function(){return h}))}))},t.prototype.Pi=function(t,e){var i=this;return ab(t).get(e).next((function(t){return t?(gm(t.userId===i.userId),Y_(i.Qt,t)):null}))},t.prototype.yi=function(t,e){var i=this;return this.Ii[e]?Kw.resolve(this.Ii[e]):this.Pi(t,e).next((function(t){if(t){var n=t.keys();return i.Ii[e]=n,n}return null}))},t.prototype.gi=function(t,e){var i=this,n=e+1,r=IDBKeyRange.lowerBound([this.userId,n]),s=null;return ab(t).hs({index:g_.userMutationsIndex,range:r},(function(t,e,r){e.userId===i.userId&&(gm(e.batchId>=n),s=Y_(i.Qt,e)),r.done()})).next((function(){return s}))},t.prototype.Vi=function(t){var e=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),i=-1;return ab(t).hs({index:g_.userMutationsIndex,range:e,reverse:!0},(function(t,e,n){i=e.batchId,n.done()})).next((function(){return i}))},t.prototype.pi=function(t){var e=this,i=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return ab(t).rs(g_.userMutationsIndex,i).next((function(t){return t.map((function(t){return Y_(e.Qt,t)}))}))},t.prototype.bi=function(t,e){var i=this,n=m_.prefixForPath(this.userId,e.path),r=IDBKeyRange.lowerBound(n),s=[];return hb(t).hs({range:r},(function(n,r,o){var a=n[0],h=n[1],u=n[2],l=f_(h);if(a===i.userId&&e.path.isEqual(l))return ab(t).get(u).next((function(t){if(!t)throw vm();gm(t.userId===i.userId),s.push(Y_(i.Qt,t))}));o.done()})).next((function(){return s}))},t.prototype.vi=function(t,e){var i=this,n=new jx(wm),r=[];return e.forEach((function(e){var s=m_.prefixForPath(i.userId,e.path),o=I
7812DBKeyRange.lowerBound(s),a=hb(t).hs({range:o},(function(t,r,s){var o=t[0],a=t[1],h=t[2],u=f_(a);o===i.userId&&e.path.isEqual(u)?n=n.add(h):s.done()}));r.push(a)})),Kw.Mn(r).next((function(){return i.Si(t,n)}))},t.prototype.Di=function(t,e){var i=this,n=e.path,r=n.length+1,s=m_.prefixForPath(this.userId,n),o=IDBKeyRange.lowerBound(s),a=new jx(wm);return hb(t).hs({range:o},(function(t,e,s){var o=t[0],h=t[1],u=t[2],l=f_(h);o===i.userId&&n.nt(l)?l.length===r&&(a=a.add(u)):s.done()})).next((function(){return i.Si(t,a)}))},t.prototype.Si=function(t,e){var i=this,n=[],r=[];return e.forEach((function(e){r.push(ab(t).get(e).next((function(t){if(null===t)throw vm();gm(t.userId===i.userId),n.push(Y_(i.Qt,t))})))})),Kw.Mn(r).next((function(){return n}))},t.prototype.Ci=function(t,e){var i=this;return nb(t.ps,this.userId,e).next((function(n){return t.gs((function(){i.xi(e.batchId)})),Kw.forEach(n,(function(e){return i.Ti.Ni(t,e)}))}))},t.prototype.xi=function(t){delete this.Ii[t]},t.prototype.$i=function(t){var e=this;return this.Ai(t).next((function(i){if(!i)return Kw.resolve();var n=IDBKeyRange.lowerBound(m_.prefixForUser(e.userId)),r=[];return hb(t).hs({range:n},(function(t,i,n){if(t[0]===e.userId){var s=f_(t[1]);r.push(s)}else n.done()})).next((function(){gm(0===r.length)}))}))},t.prototype.Fi=function(t,e){return ob(t,this.userId,e)},t.prototype.Oi=function(t){var e=this;return ub(t).get(this.userId).next((function(t){return t||new v_(e.userId,-1,"")}))},t}();function ob(t,e,i){var n=m_.prefixForPath(e,i.path),r=n[1],s=IDBKeyRange.lowerBound(n),o=!1;return hb(t).hs({range:s,us:!0},(function(t,i,n){var s=t[0],a=t[1];t[2],s===e&&a===r&&(o=!0),n.done()})).next((function(){return o}))}function ab(t){return P_(t,g_.store)}function hb(t){return P_(t,m_.store)}function ub(t){return P_(t,v_.store)} 7813/** 7814 * @license 7815 * Copyright 2017 Google LLC 7816 * 7817 * Licensed under the Apache License, Version 2.0 (the "License"); 7818 * you may not use this file except in compliance with the License. 7819 * You may obtain a copy of the License at 7820 * 7821 * http://www.apache.org/licenses/LICENSE-2.0 7822 * 7823 * Unless required by applicable law or agreed to in writing, software 7824 * distributed under the License is distributed on an "AS IS" BASIS, 7825 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7826 * See the License for the specific language governing permissions and 7827 * limitations under the License. 7828 */var lb=function(){function t(t){this.ki=t}return t.prototype.next=function(){return this.ki+=2,this.ki},t.Mi=function(){return new t(0)},t.Li=function(){return new t(-1)},t}(),cb=function(){function t(t,e){this.Ti=t,this.Qt=e}return t.prototype.Bi=function(t){var e=this;return this.qi(t).next((function(i){var n=new lb(i.highestTargetId);return i.highestTargetId=n.next(),e.Ui(t,i).next((function(){return i.highestTargetId}))}))},t.prototype.Qi=function(t){return this.qi(t).next((function(t){return Dm.K(new Lm(t.lastRemoteSnapshotVersion.seconds,t.lastRemoteSnapshotVersion.nanoseconds))}))},t.prototype.Ki=function(t){return this.qi(t).next((function(t){return t.highestListenSequenceNumber}))},t.prototype.Wi=function(t,e,i){var n=this;return this.qi(t).next((function(r){return r.highestListenSequenceNumber=e,i&&(r.lastRemoteSnapshotVersion=i.j()),e>r.highestListenSequenceNumber&&(r.highestListenSequenceNumber=e),n.Ui(t,r)}))},t.prototype.ji=function(t,e){var i=this;return this.Gi(t,e).next((function(){return i.qi(t).next((function(n){return n.targetCount+=1,i.zi(e,n),i.Ui(t,n)}))}))},t.prototype.Hi=function(t,e){return this.Gi(t,e)},t.prototype.Ji=function(t,e){var i=this;return this.Yi(t,e.targetId).next((function(){return fb(t).delete(e.targetId)})).next((function(){return i.qi(t)})).next((function(e){return gm(e.targetCount>0),e.targetCount-=1,i.Ui(t,e)}))},t.prototype.Xi=function(t,e,i){var n=this,r=0,s=[];return fb(t).hs((function(o,a){var h=z_(a);h.sequenceNumber<=e&&null===i.get(h.targetId)&&(r++,s.push(n.Ji(t,h)))})).next((function(){return Kw.Mn(s)})).next((function(){return r}))},t.prototype.In=function(t,e){return fb(t).hs((function(t,i){var n=z_(i);e(n)}))},t.prototype.qi=function(t){return db(t).get(E_.key).next((function(t){return gm(null!==t),t}))},t.prototype.Ui=function(t,e){return db(t).put(E_.key,e)},t.prototype.Gi=function(t,e){return fb(t).put(X_(this.Qt,e))},t.prototype.zi=function(t,e){var i=!1;return t.targetId>e.highestTargetId&&(e.highestTargetId=t.targetId,i=!0),t.sequenceNumber>e.highestListenSequenceNumber&&(e.highestListenSequenceNumber=t.sequenceNumber,i=!0),i},t.prototype.Zi=function(t){return this.qi(t).next((function(t){return t.targetCount}))},t.prototype.tr=function(t,e){var i=Ty(e),n=IDBKeyRange.bound([i,Number.NEGATIVE_INFINITY],[i,Number.POSITIVE_INFINITY]),r=null;return fb(t).hs({range:n,index:b_.queryTargetsIndexName},(function(t,i,n){var s=z_(i);Ey(e,s.target)&&(r=s,n.done())})).next((function(){return r}))}
7828,t.prototype.er=function(t,e,i){var n=this,r=[],s=pb(t);return e.forEach((function(e){var o=u_(e.path);r.push(s.put(new T_(i,o))),r.push(n.Ti.nr(t,i,e))})),Kw.Mn(r)},t.prototype.sr=function(t,e,i){var n=this,r=pb(t);return Kw.forEach(e,(function(e){var s=u_(e.path);return Kw.Mn([r.delete([i,s]),n.Ti.ir(t,i,e)])}))},t.prototype.Yi=function(t,e){var i=pb(t),n=IDBKeyRange.bound([e],[e+1],!1,!0);return i.delete(n)},t.prototype.rr=function(t,e){var i=IDBKeyRange.bound([e],[e+1],!1,!0),n=pb(t),r=ew();return n.hs({range:i,us:!0},(function(t,e,i){var n=f_(t[1]),s=new Vm(n);r=r.add(s)})).next((function(){return r}))},t.prototype.Fi=function(t,e){var i=u_(e.path),n=IDBKeyRange.bound([i],[bm(i)],!1,!0),r=0;return pb(t).hs({index:T_.documentTargetsIndex,us:!0,range:n},(function(t,e,i){var n=t[0];t[1],0!==n&&(r++,i.done())})).next((function(){return r>0}))},t.prototype.Sn=function(t,e){return fb(t).get(e).next((function(t){return t?z_(t):null}))},t}(); 7829/** 7830 * @license 7831 * Copyright 2017 Google LLC 7832 * 7833 * Licensed under the Apache License, Version 2.0 (the "License"); 7834 * you may not use this file except in compliance with the License. 7835 * You may obtain a copy of the License at 7836 * 7837 * http://www.apache.org/licenses/LICENSE-2.0 7838 * 7839 * Unless required by applicable law or agreed to in writing, software 7840 * distributed under the License is distributed on an "AS IS" BASIS, 7841 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7842 * See the License for the specific language governing permissions and 7843 * limitations under the License. 7844 */function fb(t){return P_(t,b_.store)}function db(t){return P_(t,E_.store)}function pb(t){return P_(t,T_.store)} 7845/** 7846 * @license 7847 * Copyright 2020 Google LLC 7848 * 7849 * Licensed under the Apache License, Version 2.0 (the "License"); 7850 * you may not use this file except in compliance with the License. 7851 * You may obtain a copy of the License at 7852 * 7853 * http://www.apache.org/licenses/LICENSE-2.0 7854 * 7855 * Unless required by applicable law or agreed to in writing, software 7856 * distributed under the License is distributed on an "AS IS" BASIS, 7857 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7858 * See the License for the specific language governing permissions and 7859 * limitations under the License. 7860 */function vb(t,e){var i=t[0],n=t[1],r=e[0],s=e[1],o=wm(i,r);return 0===o?wm(n,s):o}var gb=function(){function t(t){this.cr=t,this.buffer=new jx(vb),this.ar=0}return t.prototype.ur=function(){return++this.ar},t.prototype.hr=function(t){var e=[t,this.ur()];if(this.buffer.size<this.cr)this.buffer=this.buffer.add(e);else{var i=this.buffer.last();vb(e,i)<0&&(this.buffer=this.buffer.delete(i).add(e))}},Object.defineProperty(t.prototype,"maxValue",{get:function(){return this.buffer.last()[0]},enumerable:!1,configurable:!0}),t}(),mb=function(){function t(t,e){this.lr=t,this._s=e,this._r=!1,this.dr=null}return t.prototype.start=function(t){-1!==this.lr.params.zs&&this.wr(t)},t.prototype.stop=function(){this.dr&&(this.dr.cancel(),this.dr=null)},Object.defineProperty(t.prototype,"Er",{get:function(){return null!==this.dr},enumerable:!1,configurable:!0}),t.prototype.wr=function(t){var e=this,i=this._r?3e5:6e4;cm("LruGarbageCollector","Garbage collection scheduled in "+i+"ms"),this.dr=this._s.Tr("lru_garbage_collection",i,(function(){return af(e,void 0,void 0,(function(){var e;return hf(this,(function(i){switch(i.label){case 0:this.dr=null,this._r=!0,i.label=1;case 1:return i.trys.push([1,3,,7]),[4,t.Ir(this.lr)];case 2:return i.sent(),[3,7];case 3:return t_(e=i.sent())?(cm("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",e),[3,6]):[3,4];case 4:return[4,tb(e)];case 5:i.sent(),i.label=6;case 6:return[3,7];case 7:return[4,this.wr(t)];case 8:return i.sent(),[2]}}))}))}))},t}(),yb=function(){function t(t,e){this.mr=t,this.params=e}return t.prototype.Ar=function(t,e){return this.mr.Rr(t).next((function(t){return Math.floor(e/100*t)}))},t.prototype.Pr=function(t,e){var i=this;if(0===e)return Kw.resolve(km.q);var n=new gb(e);return this.mr.In(t,(function(t){return n.hr(t.sequenceNumber)})).next((function(){return i.mr.yr(t,(function(t){return n.hr(t)}))}
7860)).next((function(){return n.maxValue}))},t.prototype.Xi=function(t,e,i){return this.mr.Xi(t,e,i)},t.prototype.gr=function(t,e){return this.mr.gr(t,e)},t.prototype.Vr=function(t,e){var i=this;return-1===this.params.zs?(cm("LruGarbageCollector","Garbage collection skipped; disabled"),Kw.resolve(J_)):this.pr(t).next((function(n){return n<i.params.zs?(cm("LruGarbageCollector","Garbage collection skipped; Cache size "+n+" is lower than threshold "+i.params.zs),J_):i.br(t,e)}))},t.prototype.pr=function(t){return this.mr.pr(t)},t.prototype.br=function(t,e){var i,n,r,s,o,a,h,u=this,l=Date.now();return this.Ar(t,this.params.Hs).next((function(e){return e>u.params.Js?(cm("LruGarbageCollector","Capping sequence numbers to collect down to the maximum of "+u.params.Js+" from "+e),n=u.params.Js):n=e,s=Date.now(),u.Pr(t,n)})).next((function(n){return i=n,o=Date.now(),u.Xi(t,i,e)})).next((function(e){return r=e,a=Date.now(),u.gr(t,i)})).next((function(t){return h=Date.now(),lm()<=Rf.DEBUG&&cm("LruGarbageCollector","LRU Garbage Collection\n\tCounted targets in "+(s-l)+"ms\n\tDetermined least recently used "+n+" in "+(o-s)+"ms\n\tRemoved "+r+" targets in "+(a-o)+"ms\n\tRemoved "+t+" documents in "+(h-a)+"ms\nTotal Duration: "+(h-l)+"ms"),Kw.resolve({Ks:!0,Ws:n,js:r,Gs:t})}))},t}(),xb=function(){function t(t,e){this.db=t,this.lr=new yb(this,e)}return t.prototype.Rr=function(t){var e=this.vr(t);return this.db.Sr().Zi(t).next((function(t){return e.next((function(e){return t+e}))}))},t.prototype.vr=function(t){var e=0;return this.yr(t,(function(t){e++})).next((function(){return e}))},t.prototype.In=function(t,e){return this.db.Sr().In(t,e)},t.prototype.yr=function(t,e){return this.Dr(t,(function(t,i){return e(i)}))},t.prototype.nr=function(t,e,i){return wb(t,i)},t.prototype.ir=function(t,e,i){return wb(t,i)},t.prototype.Xi=function(t,e,i){return this.db.Sr().Xi(t,e,i)},t.prototype.Ni=function(t,e){return wb(t,e)},t.prototype.Cr=function(t,e){return n=e,r=!1,ub(i=t).ls((function(t){return ob(i,t,n).next((function(t){return t&&(r=!0),Kw.resolve(!t)}))})).next((function(){return r}));var i,n,r},t.prototype.gr=function(t,e){var i=this,n=this.db.$r().Nr(),r=[],s=0;return this.Dr(t,(function(o,a){if(a<=e){var h=i.Cr(t,o).next((function(e){if(!e)return s++,n._i(t,o).next((function(){return n.li(o),pb(t).delete([0,u_(o.path)])}))}));r.push(h)}})).next((function(){return Kw.Mn(r)})).next((function(){return n.apply(t)})).next((function(){return s}))},t.prototype.removeTarget=function(t,e){var i=e.kt(t.bs);return this.db.Sr().Hi(t,i)},t.prototype.Fr=function(t,e){return wb(t,e)},t.prototype.Dr=function(t,e){var i,n=pb(t),r=km.q;return n.hs({index:T_.documentTargetsIndex},(function(t,n){var s=t[0],o=(t[1],n.path),a=n.sequenceNumber;0===s?(r!==km.q&&e(new Vm(f_(i)),r),r=a,i=o):r=km.q})).next((function(){r!==km.q&&e(new Vm(f_(i)),r)}))},t.prototype.pr=function(t){return this.db.$r().Or(t)},t}();function wb(t,e){return pb(t).put((i=e,n=t.bs,new T_(0,u_(i.path),n)));var i,n} 7861/** 7862 * @license 7863 * Copyright 2017 Google LLC 7864 * 7865 * Licensed under the Apache License, Version 2.0 (the "License"); 7866 * you may not use this file except in compliance with the License. 7867 * You may obtain a copy of the License at 7868 * 7869 * http://www.apache.org/licenses/LICENSE-2.0 7870 * 7871 * Unless required by applicable law or agreed to in writing, software 7872 * distributed under the License is distributed on an "AS IS" BASIS, 7873 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7874 * See the License for the specific language governing permissions and 7875 * limitations under the License. 7876 */var _b=function(){function t(t,e){this.Qt=t,this.Ei=e}return t.prototype.ai=function(t,e,i){return Eb(t).put(Sb(e),i)},t.prototype.li=function(t,e){var i=Eb(t),n=Sb(e);return i.delete(n)},t.prototype.updateMetadata=function(t,e){var i=this;return this.getMetadata(t).next((function(n){return n.byteSize+=e,i.kr(t,n)}))},t.prototype._i=function(t,e){var i=this;return Eb(t).get(Sb(e)).next((function(t){return i.Mr(t)}))},t.prototype.Lr=function(t,e){var i=this;return Eb(t).get(Sb(e)).next((function(t){var e=i.Mr(t);return e?{hi:e,size:rb(t)}:null}))},t.prototype.getEntries=function(t,e){var i=this,n=Zx();return this.Br(t,e,(function(t,e){var r=i.Mr(e);n=n.zt(t,r)})).next((function(){return n}))},t.prototype.qr=function(t,e){var i=this,n=Zx(),r=new Xx(Vm.H);return this.Br(t,e,(function(t,e){var s=i.Mr(e);s?(n=n.zt(t,s),r=r.zt(t,rb(e))):(n=n.zt(t,null),r=r.zt(t,0))})).next((function(){return{Ur:n,Qr:r}}))}
7876,t.prototype.Br=function(t,e,i){if(e.et())return Kw.resolve();var n=IDBKeyRange.bound(e.first().path.it(),e.last().path.it()),r=e.te(),s=r.oe();return Eb(t).hs({range:n},(function(t,e,n){for(var o=Vm.Et(t);s&&Vm.H(s,o)<0;)i(s,null),s=r.oe();s&&s.isEqual(o)&&(i(s,e),s=r.ce()?r.oe():null),s?n.ss(s.path.it()):n.done()})).next((function(){for(;s;)i(s,null),s=r.ce()?r.oe():null}))},t.prototype.Kr=function(t,e,i){var n=this,r=Jx(),s=e.path.length+1,o={};if(i.isEqual(Dm.min())){var a=e.path.it();o.range=IDBKeyRange.lowerBound(a)}else{var h=e.path.it(),u=N_(i);o.range=IDBKeyRange.lowerBound([h,u],!0),o.index=w_.collectionReadTimeIndex}return Eb(t).hs(o,(function(t,i,o){if(t.length===s){var a=D_(n.Qt,i);e.path.nt(a.key.path)?a instanceof yy&&ex(e,a)&&(r=r.zt(a.key,a)):o.done()}})).next((function(){return r}))},t.prototype.Nr=function(t){return new bb(this,!!t&&t.Wr)},t.prototype.Or=function(t){return this.getMetadata(t).next((function(t){return t.byteSize}))},t.prototype.getMetadata=function(t){return Tb(t).get(__.key).next((function(t){return gm(!!t),t}))},t.prototype.kr=function(t,e){return Tb(t).put(__.key,e)},t.prototype.Mr=function(t){if(t){var e=D_(this.Qt,t);return e instanceof xy&&e.version.isEqual(Dm.min())?null:e}return null},t}(),bb=function(t){function e(e,i){var n=this;return(n=t.call(this)||this).jr=e,n.Wr=i,n.Gr=new eb((function(t){return t.toString()}),(function(t,e){return t.isEqual(e)})),n}return sf(e,t),e.prototype.wi=function(t){var e=this,i=[],n=0,r=new jx((function(t,e){return wm(t.rt(),e.rt())}));return this.ri.forEach((function(s,o){var a=e.Gr.get(s);if(o.hi){var h=F_(e.jr.Qt,o.hi,e.ci(s));r=r.add(s.path.X());var u=rb(h);n+=u-a,i.push(e.jr.ai(t,s,h))}else if(n-=a,e.Wr){var l=F_(e.jr.Qt,new xy(s,Dm.min()),e.ci(s));i.push(e.jr.ai(t,s,l))}else i.push(e.jr.li(t,s))})),r.forEach((function(n){i.push(e.jr.Ei.qs(t,n))})),i.push(this.jr.updateMetadata(t,n)),Kw.Mn(i)},e.prototype.fi=function(t,e){var i=this;return this.jr.Lr(t,e).next((function(t){return null===t?(i.Gr.set(e,0),null):(i.Gr.set(e,t.size),t.hi)}))},e.prototype.di=function(t,e){var i=this;return this.jr.qr(t,e).next((function(t){var e=t.Ur;return t.Qr.forEach((function(t,e){i.Gr.set(t,e)})),e}))},e}(ib);function Tb(t){return P_(t,__.store)}function Eb(t){return P_(t,w_.store)}function Sb(t){return t.path.it()} 7877/** 7878 * @license 7879 * Copyright 2020 Google LLC 7880 * 7881 * Licensed under the Apache License, Version 2.0 (the "License"); 7882 * you may not use this file except in compliance with the License. 7883 * You may obtain a copy of the License at 7884 * 7885 * http://www.apache.org/licenses/LICENSE-2.0 7886 * 7887 * Unless required by applicable law or agreed to in writing, software 7888 * distributed under the License is distributed on an "AS IS" BASIS, 7889 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7890 * See the License for the specific language governing permissions and 7891 * limitations under the License. 7892 */var Ab=function(){function t(t){this.Qt=t}return t.prototype.Jn=function(t,e,i,n){var r=this;gm(i<n&&i>=0&&n<=11);var s=new Zw("createOrUpgrade",e);i<1&&n>=1&&(t.createObjectStore(p_.store),function(t){t.createObjectStore(v_.store,{keyPath:v_.keyPath}),t.createObjectStore(g_.store,{keyPath:g_.keyPath,autoIncrement:!0}).createIndex(g_.userMutationsIndex,g_.userMutationsKeyPath,{unique:!0}),t.createObjectStore(m_.store)}(t),Cb(t),function(t){t.createObjectStore(w_.store)}(t));var o=Kw.resolve();return i<3&&n>=3&&(0!==i&&(function(t){t.deleteObjectStore(T_.store),t.deleteObjectStore(b_.store),t.deleteObjectStore(E_.store)}(t),Cb(t)),o=o.next((function(){return function(t){var e=t.store(E_.store),i=new E_(0,0,Dm.min().j(),0);return e.put(E_.key,i)}(s)}))),i<4&&n>=4&&(0!==i&&(o=o.next((function(){return function(t,e){return e.store(g_.store).rs().next((function(i){t.deleteObjectStore(g_.store),t.createObjectStore(g_.store,{keyPath:g_.keyPath,autoIncrement:!0}).createIndex(g_.userMutationsIndex,g_.userMutationsKeyPath,{unique:!0});var n=e.store(g_.store),r=i.map((function(t){return n.put(t)}));return Kw.Mn(r)}))}(t,s)}))),o=o.next((function(){!function(t){t.createObjectStore(A_.store,{keyPath:A_.keyPath})}(t)}))),i<5&&n>=5&&(o=o.next((function(){return r.zr(s)}))),i<6&&n>=6&&(o=o.next((function(){return function(t){t.createObjectStore(__.store)}(t),r.Hr(s)}))),i<7&&n>=7&&(o=o.next((function(){return r.Jr(s)}))),i<8&&n>=8&&(o=o.next((function(){return r.Yr(t,s)}
7892))),i<9&&n>=9&&(o=o.next((function(){!function(t){t.objectStoreNames.contains("remoteDocumentChanges")&&t.deleteObjectStore("remoteDocumentChanges")}(t),function(t){var e=t.objectStore(w_.store);e.createIndex(w_.readTimeIndex,w_.readTimeIndexPath,{unique:!1}),e.createIndex(w_.collectionReadTimeIndex,w_.collectionReadTimeIndexPath,{unique:!1})}(e)}))),i<10&&n>=10&&(o=o.next((function(){return r.Xr(s)}))),i<11&&n>=11&&(o=o.next((function(){!function(t){t.createObjectStore(C_.store,{keyPath:C_.keyPath})}(t),function(t){t.createObjectStore(O_.store,{keyPath:O_.keyPath})}(t)}))),o},t.prototype.Hr=function(t){var e=0;return t.store(w_.store).hs((function(t,i){e+=rb(i)})).next((function(){var i=new __(e);return t.store(__.store).put(__.key,i)}))},t.prototype.zr=function(t){var e=this,i=t.store(v_.store),n=t.store(g_.store);return i.rs().next((function(i){return Kw.forEach(i,(function(i){var r=IDBKeyRange.bound([i.userId,-1],[i.userId,i.lastAcknowledgedBatchId]);return n.rs(g_.userMutationsIndex,r).next((function(n){return Kw.forEach(n,(function(n){gm(n.userId===i.userId);var r=Y_(e.Qt,n);return nb(t,i.userId,r).next((function(){}))}))}))}))}))},t.prototype.Jr=function(t){var e=t.store(T_.store),i=t.store(w_.store);return t.store(E_.store).get(E_.key).next((function(t){var n=[];return i.hs((function(i,r){var s=new Nm(i),o=[0,u_(s)];n.push(e.get(o).next((function(i){return i?Kw.resolve():(n=s,e.put(new T_(0,u_(n),t.highestListenSequenceNumber)));var n})))})).next((function(){return Kw.Mn(n)}))}))},t.prototype.Yr=function(t,e){t.createObjectStore(S_.store,{keyPath:S_.keyPath});var i=e.store(S_.store),n=new K_,r=function(t){if(n.add(t)){var e=t.tt(),r=t.X();return i.put({collectionId:e,parent:u_(r)})}};return e.store(w_.store).hs({us:!0},(function(t,e){var i=new Nm(t);return r(i.X())})).next((function(){return e.store(m_.store).hs({us:!0},(function(t,e){t[0];var i=t[1],n=(t[2],f_(i));return r(n.X())}))}))},t.prototype.Xr=function(t){var e=this,i=t.store(b_.store);return i.hs((function(t,n){var r=z_(n),s=X_(e.Qt,r);return i.put(s)}))},t}();function Cb(t){t.createObjectStore(T_.store,{keyPath:T_.keyPath}).createIndex(T_.documentTargetsIndex,T_.documentTargetsKeyPath,{unique:!0}),t.createObjectStore(b_.store,{keyPath:b_.keyPath}).createIndex(b_.queryTargetsIndexName,b_.queryTargetsKeyPath,{unique:!0}),t.createObjectStore(E_.store)}var Ob="Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.",Rb=function(){function t(e,i,n,r,s,o,a,h,u,l){if(this.allowTabSynchronization=e,this.persistenceKey=i,this.clientId=n,this.Zr=s,this.window=o,this.document=a,this.eo=u,this.no=l,this.so=null,this.io=!1,this.isPrimary=!1,this.networkEnabled=!0,this.ro=null,this.inForeground=!1,this.oo=null,this.co=null,this.ao=Number.NEGATIVE_INFINITY,this.uo=function(t){return Promise.resolve()},!t.Kn())throw new Sm(Em.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");var c,f;this.Ti=new xb(this,r),this.ho=i+"main",this.Qt=new L_(h),this.lo=new Qw(this.ho,11,new Ab(this.Qt)),this._o=new cb(this.Ti,this.Qt),this.Ei=new Z_,this.fo=(c=this.Qt,f=this.Ei,new _b(c,f)),this.wo=new W_,this.window&&this.window.localStorage?this.Eo=this.window.localStorage:(this.Eo=null,!1===l&&fm("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}return t.prototype.start=function(){var t=this;return this.To().then((function(){if(!t.isPrimary&&!t.allowTabSynchronization)throw new Sm(Em.FAILED_PRECONDITION,Ob);return t.Io(),t.mo(),t.Ao(),t.runTransaction("getHighestListenSequenceNumber","readonly",(function(e){return t._o.Ki(e)}))})).then((function(e){t.so=new km(e,t.eo)})).then((function(){t.io=!0})).catch((function(e){return t.lo&&t.lo.close(),Promise.reject(e)}))},t.prototype.Ro=function(t){var e=this;return this.uo=function(i){return af(e,void 0,void 0,(function(){return hf(this,(function(e){return this.Er?[2,t(i)]:[2]}))}))},t(this.isPrimary)},t.prototype.Po=function(t){var e=this;this.lo.Xn((function(i){return af(e,void 0,void 0,(function(){return hf(this,(function(e){switch(e.label){case 0:return null===i.newVersion?[4,t()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}
7892))}))}))},t.prototype.yo=function(t){var e=this;this.networkEnabled!==t&&(this.networkEnabled=t,this.Zr.Ps((function(){return af(e,void 0,void 0,(function(){return hf(this,(function(t){switch(t.label){case 0:return this.Er?[4,this.To()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))})))},t.prototype.To=function(){var t=this;return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",(function(e){return Pb(e).put(new A_(t.clientId,Date.now(),t.networkEnabled,t.inForeground)).next((function(){if(t.isPrimary)return t.Vo(e).next((function(e){e||(t.isPrimary=!1,t.Zr.po((function(){return t.uo(!1)})))}))})).next((function(){return t.bo(e)})).next((function(i){return t.isPrimary&&!i?t.vo(e).next((function(){return!1})):!!i&&t.So(e).next((function(){return!0}))}))})).catch((function(e){if(t_(e))return cm("IndexedDbPersistence","Failed to extend owner lease: ",e),t.isPrimary;if(!t.allowTabSynchronization)throw e;return cm("IndexedDbPersistence","Releasing owner lease after error during lease refresh",e),!1})).then((function(e){t.isPrimary!==e&&t.Zr.po((function(){return t.uo(e)})),t.isPrimary=e}))},t.prototype.Vo=function(t){var e=this;return Mb(t).get(p_.key).next((function(t){return Kw.resolve(e.Do(t))}))},t.prototype.Co=function(t){return Pb(t).delete(this.clientId)},t.prototype.xo=function(){return af(this,void 0,void 0,(function(){var t,e,i,n,r=this;return hf(this,(function(s){switch(s.label){case 0:return!this.isPrimary||this.No(this.ao,18e5)?[3,2]:(this.ao=Date.now(),[4,this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",(function(t){var e=P_(t,A_.store);return e.rs().next((function(t){var i=r.$o(t,18e5),n=t.filter((function(t){return-1===i.indexOf(t)}));return Kw.forEach(n,(function(t){return e.delete(t.clientId)})).next((function(){return n}))}))})).catch((function(){return[]}))]);case 1:if(t=s.sent(),this.Eo)for(e=0,i=t;e<i.length;e++)n=i[e],this.Eo.removeItem(this.Fo(n.clientId));s.label=2;case 2:return[2]}}
7892))}))},t.prototype.Ao=function(){var t=this;this.co=this.Zr.Tr("client_metadata_refresh",4e3,(function(){return t.To().then((function(){return t.xo()})).then((function(){return t.Ao()}))}))},t.prototype.Do=function(t){return!!t&&t.ownerId===this.clientId},t.prototype.bo=function(t){var e=this;return this.no?Kw.resolve(!0):Mb(t).get(p_.key).next((function(i){if(null!==i&&e.No(i.leaseTimestampMs,5e3)&&!e.Oo(i.ownerId)){if(e.Do(i)&&e.networkEnabled)return!0;if(!e.Do(i)){if(!i.allowTabSynchronization)throw new Sm(Em.FAILED_PRECONDITION,Ob);return!1}}return!(!e.networkEnabled||!e.inForeground)||Pb(t).rs().next((function(t){return void 0===e.$o(t,5e3).find((function(t){if(e.clientId!==t.clientId){var i=!e.networkEnabled&&t.networkEnabled,n=!e.inForeground&&t.inForeground,r=e.networkEnabled===t.networkEnabled;if(i||n&&r)return!0}return!1}))}))})).next((function(t){return e.isPrimary!==t&&cm("IndexedDbPersistence","Client "+(t?"is":"is not")+" eligible for a primary lease."),t}))},t.prototype.ko=function(){return af(this,void 0,void 0,(function(){var t=this;return hf(this,(function(e){switch(e.label){case 0:return this.io=!1,this.Mo(),this.co&&(this.co.cancel(),this.co=null),this.Lo(),this.Bo(),[4,this.lo.runTransaction("shutdown","readwrite",[p_.store,A_.store],(function(e){var i=new M_(e,km.q);return t.vo(i).next((function(){return t.Co(i)}))}))];case 1:return e.sent(),this.lo.close(),this.qo(),[2]}}))}))},t.prototype.$o=function(t,e){var i=this;return t.filter((function(t){return i.No(t.updateTimeMs,e)&&!i.Oo(t.clientId)}))},t.prototype.Uo=function(){var t=this;return this.runTransaction("getActiveClients","readonly",(function(e){return Pb(e).rs().next((function(e){return t.$o(e,18e5).map((function(t){return t.clientId}))}))}))},Object.defineProperty(t.prototype,"Er",{get:function(){return this.io},enumerable:!1,configurable:!0}),t.prototype.Qo=function(t){return sb.mi(t,this.Qt,this.Ei,this.Ti)},t.prototype.Sr=function(){return this._o},t.prototype.$r=function(){return this.fo},t.prototype.Ko=function(){return this.Ei},t.prototype.Wo=function(){return this.wo},t.prototype.runTransaction=function(t,e,i){var n=this;cm("IndexedDbPersistence","Starting transaction:",t);var r,s="readonly"===e?"readonly":"readwrite";return this.lo.runTransaction(t,s,R_,(function(s){return r=new M_(s,n.so?n.so.next():km.q),"readwrite-primary"===e?n.Vo(r).next((function(t){return!!t||n.bo(r)})).next((function(e){if(!e)throw fm("Failed to obtain primary lease for action '"+t+"'."),n.isPrimary=!1,n.Zr.po((function(){return n.uo(!1)})),new Sm(Em.FAILED_PRECONDITION,a_);return i(r)})).next((function(t){return n.So(r).next((function(){return t}))})):n.jo(r).next((function(){return i(r)}))})).then((function(t){return r.Vs(),t}))},t.prototype.jo=function(t){var e=this;return Mb(t).get(p_.key).next((function(t){if(null!==t&&e.No(t.leaseTimestampMs,5e3)&&!e.Oo(t.ownerId)&&!e.Do(t)&&!(e.no||e.allowTabSynchronization&&t.allowTabSynchronization))throw new Sm(Em.FAILED_PRECONDITION,Ob)}))},t.prototype.So=function(t){var e=new p_(this.clientId,this.allowTabSynchronization,Date.now());return Mb(t).put(p_.key,e)},t.Kn=function(){return Qw.Kn()},t.prototype.vo=function(t){var e=this,i=Mb(t);return i.get(p_.key).next((function(t){return e.Do(t)?(cm("IndexedDbPersistence","Releasing primary lease."),i.delete(p_.key)):Kw.resolve()}))},t.prototype.No=function(t,e){var i=Date.now();return!(t<i-e||t>i&&(fm("Detected an update time that is in the future: "+t+" > "+i),1))},t.prototype.Io=function(){var t=this;null!==this.document&&"function"==typeof this.document.addEventListener&&(this.oo=function(){t.Zr.Ps((function(){return t.inForeground="visible"===t.document.visibilityState,t.To()}))},this.document.addEventListener("visibilitychange",this.oo),this.inForeground="visible"===this.document.visibilityState)},t.prototype.Lo=function(){this.oo&&(this.document.removeEventListener("visibilitychange",this.oo),this.oo=null)},t.prototype.mo=function(){var t,e=this;"function"==typeof(null===(t=this.window)||void 0===t?void 0:t.addEventListener)&&(this.ro=function(){e.Mo(),e.Zr.Ps((function(){return e.ko()}))},this.window.addEventListener("unload",this.ro))},t.prototype.Bo=function(){this.ro&&(this.window.removeEventListener("unload",this.ro),this.ro=null)},t.prototype.Oo=function(t){var e;try{var i=null!==(null===(e=this.Eo)||void 0===e?void 0:e.getItem(this.Fo(t)));return cm("IndexedDbPersistence","Client '"+t+"' "+(i?"is":"is not")+" zombied in LocalStorage"),i}catch(n){return fm("IndexedDbPersistence","Failed to get zombied client id.",n),!1}},t.prototype.Mo=function(){if(this.Eo)try{this.Eo.setItem(this.Fo(this.clientId),String(Date.now()))}catch(t){fm("Failed to set zombie client id.",t)}},t.prototype.qo=function(){if(this.Eo)try{this.Eo.removeItem(this.Fo(this.clientId))}catch(t){}},t.prototype.Fo=function(t){return"firestore_zombie_"+this.persistenceKey+"_"+t},t}();function Mb(t){return P_(t,p_.store)}function Pb(t){return P_(t,A_.store)}function Ib(t,e){var i=t.projectId;return t.o||(i+="."+t.database),"firestore/"+e+"/"+i+"/"}var kb=function(){function t(t,e,i){this.fo=t,this.zo=e,this.Ei=i}return t.prototype.Ho=function(t,e){var i=this;return this.zo.bi(t,e).next((function(n){return i.Jo(t,e,n)}
7892))},t.prototype.Jo=function(t,e,i){return this.fo._i(t,e).next((function(t){for(var n=0,r=i;n<r.length;n++)t=r[n].Cs(e,t);return t}))},t.prototype.Yo=function(t,e,i){var n=Zx();return e.forEach((function(t,e){for(var r=0,s=i;r<s.length;r++)e=s[r].Cs(t,e);n=n.zt(t,e)})),n},t.prototype.Xo=function(t,e){var i=this;return this.fo.getEntries(t,e).next((function(e){return i.Zo(t,e)}))},t.prototype.Zo=function(t,e){var i=this;return this.zo.vi(t,e).next((function(n){var r=i.Yo(t,e,n),s=Kx();return r.forEach((function(t,e){e||(e=new xy(t,Dm.min())),s=s.zt(t,e)})),s}))},t.prototype.Kr=function(t,e,i){return n=e,Vm.wt(n.path)&&null===n.collectionGroup&&0===n.filters.length?this.tc(t,e.path):qy(e)?this.ec(t,e,i):this.nc(t,e,i);var n},t.prototype.tc=function(t,e){return this.Ho(t,new Vm(e)).next((function(t){var e=Jx();return t instanceof yy&&(e=e.zt(t.key,t)),e}))},t.prototype.ec=function(t,e,i){var n=this,r=e.collectionGroup,s=Jx();return this.Ei.Us(t,r).next((function(o){return Kw.forEach(o,(function(o){var a,h,u=(a=e,h=o.child(r),new Yy(h,null,a.xt.slice(),a.filters.slice(),a.limit,a.limitType,a.startAt,a.endAt));return n.nc(t,u,i).next((function(t){t.forEach((function(t,e){s=s.zt(t,e)}))}))})).next((function(){return s}))}))},t.prototype.nc=function(t,e,i){var n,r,s=this;return this.fo.Kr(t,e,i).next((function(i){return n=i,s.zo.Di(t,e)})).next((function(e){return r=e,s.sc(t,r,n).next((function(t){n=t;for(var e=0,i=r;e<i.length;e++)for(var s=i[e],o=0,a=s.mutations;o<a.length;o++){var h=a[o],u=h.key,l=Ax(h,n.get(u),s.vs);n=l instanceof yy?n.zt(u,l):n.remove(u)}}))})).next((function(){return n.forEach((function(t,i){ex(e,i)||(n=n.remove(t))})),n}))},t.prototype.sc=function(t,e,i){for(var n=ew(),r=0,s=e;r<s.length;r++)for(var o=0,a=s[r].mutations;o<a.length;o++){var h=a[o];h instanceof Px&&null===i.get(h.key)&&(n=n.add(h.key))}var u=i;return this.fo.getEntries(t,n).next((function(t){return t.forEach((function(t,e){null!==e&&e instanceof yy&&(u=u.zt(t,e))})),u}))},t}(),Lb=function(){function t(t,e,i,n){this.targetId=t,this.fromCache=e,this.ic=i,this.rc=n}return t.oc=function(e,i){for(var n=ew(),r=ew(),s=0,o=i.docChanges;s<o.length;s++){var a=o[s];switch(a.type){case 0:n=n.add(a.doc.key);break;case 1:r=r.add(a.doc.key)}}return new t(e,i.fromCache,n,r)},t}(),Db=function(){function t(){}return t.prototype.cc=function(t){this.ac=t},t.prototype.Kr=function(t,e,i,n){var r,s=this;return 0===(r=e).filters.length&&null===r.limit&&null==r.startAt&&null==r.endAt&&(0===r.xt.length||1===r.xt.length&&r.xt[0].field.ut())||i.isEqual(Dm.min())?this.uc(t,e):this.ac.Xo(t,n).next((function(r){var o=s.hc(e,r);return(Gy(e)||Wy(e))&&s.lc(e.limitType,o,n,i)?s.uc(t,e):(lm()<=Rf.DEBUG&&cm("QueryEngine","Re-using previous result from %s to execute query: %s",i.toString(),tx(e)),s.ac.Kr(t,e,i).next((function(t){return o.forEach((function(e){t=t.zt(e.key,e)})),t})))}))},t.prototype.hc=function(t,e){var i=new jx(ix(t));
7892return e.forEach((function(e,n){n instanceof yy&&ex(t,n)&&(i=i.add(n))})),i},t.prototype.lc=function(t,e,i,n){if(i.size!==e.size)return!0;var r="F"===t?e.last():e.first();return!!r&&(r.hasPendingWrites||r.version._(n)>0)},t.prototype.uc=function(t,e){return lm()<=Rf.DEBUG&&cm("QueryEngine","Using full collection scan to execute query:",tx(e)),this.ac.Kr(t,e,Dm.min())},t}(),Fb=function(){function t(t,e,i,n){this.persistence=t,this._c=e,this.Qt=n,this.fc=new Xx(wm),this.dc=new eb((function(t){return Ty(t)}),Ey),this.wc=Dm.min(),this.zo=t.Qo(i),this.Ec=t.$r(),this._o=t.Sr(),this.Tc=new kb(this.Ec,this.zo,this.persistence.Ko()),this.wo=t.Wo(),this._c.cc(this.Tc)}return t.prototype.Ir=function(t){var e=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",(function(i){return t.Vr(i,e.fc)}))},t}(); 7893/** 7894 * @license 7895 * Copyright 2017 Google LLC 7896 * 7897 * Licensed under the Apache License, Version 2.0 (the "License"); 7898 * you may not use this file except in compliance with the License. 7899 * You may obtain a copy of the License at 7900 * 7901 * http://www.apache.org/licenses/LICENSE-2.0 7902 * 7903 * Unless required by applicable law or agreed to in writing, software 7904 * distributed under the License is distributed on an "AS IS" BASIS, 7905 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7906 * See the License for the specific language governing permissions and 7907 * limitations under the License. 7908 */function Nb(t,e,i,n){return new Fb(t,e,i,n)}function Bb(t,e){return af(this,void 0,void 0,(function(){var i,n,r,s;return hf(this,(function(o){switch(o.label){case 0:return i=mm(t),n=i.zo,r=i.Tc,[4,i.persistence.runTransaction("Handle user change","readonly",(function(t){var s;return i.zo.pi(t).next((function(o){return s=o,n=i.persistence.Qo(e),r=new kb(i.Ec,n,i.persistence.Ko()),n.pi(t)})).next((function(e){for(var i=[],n=[],o=ew(),a=0,h=s;a<h.length;a++){var u=h[a];i.push(u.batchId);for(var l=0,c=u.mutations;l<c.length;l++){var f=c[l];o=o.add(f.key)}}for(var d=0,p=e;d<p.length;d++){var v=p[d];n.push(v.batchId);for(var g=0,m=v.mutations;g<m.length;g++){var y=m[g];o=o.add(y.key)}}return r.Xo(t,o).next((function(t){return{Ic:t,mc:i,Ac:n}}))}))}))];case 1:return s=o.sent(),[2,(i.zo=n,i.Tc=r,i._c.cc(i.Tc),s)]}}))}))}function Ub(t,e){var i=mm(t);return i.persistence.runTransaction("Acknowledge batch","readwrite-primary",(function(t){var n,r,s,o,a,h,u,l=e.batch.keys(),c=i.Ec.Nr({Wr:!0});return(n=i,r=t,s=e,o=c,a=s.batch,h=a.keys(),u=Kw.resolve(),h.forEach((function(t){u=u.next((function(){return o._i(r,t)})).next((function(e){var i=e,n=s.$s.get(t);gm(null!==n),(!i||i.version._(n)<0)&&(i=a.Ss(t,i,s))&&o.ai(i,s.Ns)}))})),u.next((function(){return n.zo.Ci(r,a)}))).next((function(){return c.apply(t)})).next((function(){return i.zo.$i(t)})).next((function(){return i.Tc.Xo(t,l)}))}))}function Vb(t){var e=mm(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",(function(t){return e._o.Qi(t)}))}function Yb(t,e){var i=mm(t),n=e.Ot,r=i.fc;return i.persistence.runTransaction("Apply remote event","readwrite-primary",(function(t){var s=i.Ec.Nr({Wr:!0});r=i.fc;var o=[];e.$e.forEach((function(e,s){var a,h,u,l=r.get(s);if(l){o.push(i._o.sr(t,e.Qe,s).next((function(){return i._o.er(t,e.qe,s)})));var c=e.resumeToken;if(c.l()>0){var f=l.Mt(c,n).kt(t.bs);r=r.zt(s,f),a=l,u=e,gm((h=f).resumeToken.l()>0),(0===a.resumeToken.l()||h.Ot.W()-a.Ot.W()>=3e8||u.qe.size+u.Ue.size+u.Qe.size>0)&&o.push(i._o.Hi(t,f))}}}));var a=Kx();if(e.Oe.forEach((function(n,r){e.ke.has(n)&&o.push(i.persistence.Ti.Fr(t,n))})),o.push(function(t,e,i,n,r){var s=ew();return i.forEach((function(t){return s=s.add(t)})),e.getEntries(t,s).next((function(t){var s=Kx();return i.forEach((function(i,o){var a=t.get(i),h=(null==r?void 0:r.get(i))||n;o instanceof xy&&o.version.isEqual(Dm.min())?(e.li(i,h),s=s.zt(i,o)):null==a||o.version._(a.version)>0||0===o.version._(a.version)&&a.hasPendingWrites?(e.ai(o,h),s=s.zt(i,o)):cm("LocalStore","Ignoring outdated watch update for ",i,". Current version:",a.version," Watch version:",o.version)})),s}))}(t,s,e.Oe,n,void 0).next((function(t){a=t}))),!n.isEqual(Dm.min())){var h=i._o.Qi(t).next((function(e){return i._o.Wi(t,t.bs,n)}));o.push(h)}return Kw.Mn(o).next((function(){return s.apply(t)})).next((function(){return i.Tc.Zo(t,a)}))})).then((function(t){return i.fc=r,t}))}function zb(t,e){var i=mm(t);return i.persistence.runTransaction("Get next mutation batch","readonly",(function(t){return void 0===e&&(e=-1),i.zo.gi(t,e)}))}function Xb(t,e){var i=mm(t);return i.persistence.runTransaction("Allocate target","readwrite",(function(t){var n;return i._o.tr(t,e).next((function(r){return r?(n=r,Kw.resolve(n)):i._o.Bi(t).next((function(r){return n=new rx(e,r,0,t.bs),i._o.ji(t,n).next((function(){return n}))}))}))})).then((function(t){var n=i.fc.get(t.targetId);return(null===n||t.Ot._(n.Ot)>0)&&(i.fc=i.fc.zt(t.targetId,t),i.dc.set(e,t.targetId)),t}))}function Gb(t,e,i){return af(this,void 0,void 0,(function(){var n,r,s,o;return hf(this,(function(a){switch(a.label){case 0:n=mm(t),r=n.fc.get(e),s=i?"readwrite":"readwrite-primary",a.label=1;case 1:return a.trys.push([1,4,,5]),i?[3,3]:[4,n.persistence.runTransaction("Release target",s,(function(t){return n.persistence.Ti.removeTarget(t,r)}))];case 2:a.sent(),a.label=3;case 3:return[3,5];case 4:if(!t_(o=a.sent()))throw o;return cm("LocalStore","Failed to update sequence numbers for target "+e+": "+o),[3,5];case 5:return n.fc=n.fc.remove(e),n.dc.delete(r.target),[2]}}))}))}function Wb(t,e,i){var n=mm(t),r=Dm.min(),s=ew();
7908return n.persistence.runTransaction("Execute query","readonly",(function(t){return(o=n,a=t,h=Zy(e),u=mm(o),l=u.dc.get(h),void 0!==l?Kw.resolve(u.fc.get(l)):u._o.tr(a,h)).next((function(e){if(e)return r=e.lastLimboFreeSnapshotVersion,n._o.rr(t,e.targetId).next((function(t){s=t}))})).next((function(){return n._c.Kr(t,e,i?r:Dm.min(),i?s:ew())})).next((function(t){return{documents:t,Rc:s}}));var o,a,h,u,l}))}function jb(t,e){var i=mm(t),n=mm(i._o),r=i.fc.get(e);return r?Promise.resolve(r.target):i.persistence.runTransaction("Get target data","readonly",(function(t){return n.Sn(t,e).next((function(t){return t?t.target:null}))}))}function Hb(t){var e=mm(t);return e.persistence.runTransaction("Get new document changes","readonly",(function(t){return i=e.Ec,n=t,r=e.wc,s=mm(i),o=Kx(),a=N_(r),h=Eb(n),u=IDBKeyRange.lowerBound(a,!0),h.hs({index:w_.readTimeIndex,range:u},(function(t,e){var i=D_(s.Qt,e);o=o.zt(i.key,i),a=e.readTime})).next((function(){return{Go:o,readTime:B_(a)}}));var i,n,r,s,o,a,h,u})).then((function(t){var i=t.Go,n=t.readTime;return e.wc=n,i}))}function qb(t){return af(this,void 0,void 0,(function(){var e;return hf(this,(function(i){return[2,(e=mm(t)).persistence.runTransaction("Synchronize last document change read time","readonly",(function(t){return e=Eb(t),i=Dm.min(),e.hs({index:w_.readTimeIndex,reverse:!0},(function(t,e,n){e.readTime&&(i=B_(e.readTime)),n.done()})).next((function(){return i}));var e,i})).then((function(t){e.wc=t}))]}))}))} 7909/** 7910 * @license 7911 * Copyright 2020 Google LLC 7912 * 7913 * Licensed under the Apache License, Version 2.0 (the "License"); 7914 * you may not use this file except in compliance with the License. 7915 * You may obtain a copy of the License at 7916 * 7917 * http://www.apache.org/licenses/LICENSE-2.0 7918 * 7919 * Unless required by applicable law or agreed to in writing, software 7920 * distributed under the License is distributed on an "AS IS" BASIS, 7921 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7922 * See the License for the specific language governing permissions and 7923 * limitations under the License. 7924 */var Kb=function(){function t(t){this.Qt=t,this.Vc=new Map,this.bc=new Map}return t.prototype.Os=function(t,e){return Kw.resolve(this.Vc.get(e))},t.prototype.ks=function(t,e){var i;return this.Vc.set(e.id,{id:(i=e).id,version:i.version,createTime:bw(i.createTime)}),Kw.resolve()},t.prototype.Ms=function(t,e){return Kw.resolve(this.bc.get(e))},t.prototype.Ls=function(t,e){return this.bc.set(e.name,{name:(i=e).name,query:G_(i.bundledQuery),readTime:bw(i.readTime)}),Kw.resolve();var i},t}(),Zb=function(){function t(){this.vc=new jx(Qb.Sc),this.Dc=new jx(Qb.Cc)}return t.prototype.et=function(){return this.vc.et()},t.prototype.nr=function(t,e){var i=new Qb(t,e);this.vc=this.vc.add(i),this.Dc=this.Dc.add(i)},t.prototype.xc=function(t,e){var i=this;t.forEach((function(t){return i.nr(t,e)}))},t.prototype.ir=function(t,e){this.Nc(new Qb(t,e))},t.prototype.$c=function(t,e){var i=this;t.forEach((function(t){return i.ir(t,e)}))},t.prototype.Fc=function(t){var e=this,i=new Vm(new Nm([])),n=new Qb(i,t),r=new Qb(i,t+1),s=[];return this.Dc.me([n,r],(function(t){e.Nc(t),s.push(t.key)})),s},t.prototype.Oc=function(){var t=this;this.vc.forEach((function(e){return t.Nc(e)}))},t.prototype.Nc=function(t){this.vc=this.vc.delete(t),this.Dc=this.Dc.delete(t)},t.prototype.kc=function(t){var e=new Vm(new Nm([])),i=new Qb(e,t),n=new Qb(e,t+1),r=ew();return this.Dc.me([i,n],(function(t){r=r.add(t.key)})),r},t.prototype.Fi=function(t){var e=new Qb(t,0),i=this.vc.Re(e);return null!==i&&t.isEqual(i.key)},t}(),Qb=function(){function t(t,e){this.key=t,this.Mc=e}return t.Sc=function(t,e){return Vm.H(t.key,e.key)||wm(t.Mc,e.Mc)},t.Cc=function(t,e){return wm(t.Mc,e.Mc)||Vm.H(t.key,e.key)},t}(),Jb=function(){function t(t,e){this.Ei=t,this.Ti=e,this.zo=[],this.Lc=1,this.Bc=new jx(Qb.Sc)}return t.prototype.Ai=function(t){return Kw.resolve(0===this.zo.length)},t.prototype.Ri=function(t,e,i,n){var r=this.Lc;this.Lc++,this.zo.length>0&&this.zo[this.zo.length-1];var s=new I_(r,e,i,n);this.zo.push(s);for(var o=0,a=n;o<a.length;o++){var h=a[o];this.Bc=this.Bc.add(new Qb(h.key,r)),this.Ei.qs(t,h.key.path.X())}return Kw.resolve(s)},t.prototype.Pi=function(t,e){return Kw.resolve(this.qc(e))},t.prototype.gi=function(t,e){var i=e+1,n=this.Uc(i),r=n<0?0:n;return Kw.resolve(this.zo.length>r?this.zo[r]:null)},t.prototype.Vi=function(){return Kw.resolve(0===this.zo.length?-1:this.Lc-1)},t.prototype.pi=function(t){return Kw.resolve(this.zo.slice())},t.prototype.bi=function(t,e){var i=this,n=new Qb(e,0),r=new Qb(e,Number.POSITIVE_INFINITY),s=[];return this.Bc.me([n,r],(function(t){var e=i.qc(t.Mc);s.push(e)})),Kw.resolve(s)},t.prototype.vi=function(t,e){var i=this,n=new jx(wm);return e.forEach((function(t){var e=new Qb(t,0),r=new Qb(t,Number.POSITIVE_INFINITY);i.Bc.me([e,r],(function(t){n=n.add(t.Mc)}))})),Kw.resolve(this.Qc(n))},t.prototype.Di=function(t,e){var i=e.path,n=i.length+1,r=i;Vm.wt(r)||(r=r.child(""));var s=new Qb(new Vm(r),0),o=new jx(wm);return this.Bc.Ae((function(t){var e=t.key.path;return!!i.nt(e)&&(e.length===n&&(o=o.add(t.Mc)),!0)}),s),Kw.resolve(this.Qc(o))},t.prototype.Qc=function(t){var e=this,i=[];return t.forEach((function(t){var n=e.qc(t);null!==n&&i.push(n)})),i},t.prototype.Ci=function(t,e){var i=this;gm(0===this.Kc(e.batchId,"removed")),this.zo.shift();var n=this.Bc;return Kw.forEach(e.mutations,(function(r){var s=new Qb(r.key,e.batchId);return n=n.delete(s),i.Ti.Ni(t,r.key)})).next((function(){i.Bc=n}))},t.prototype.xi=function(t){},t.prototype.Fi=function(t,e){var i=new Qb(e,0),n=this.Bc.Re(i);return Kw.resolve(e.isEqual(n&&n.key))},t.prototype.$i=function(t){return this.zo.length,Kw.resolve()},t.prototype.Kc=function(t,e){return this.Uc(t)},t.prototype.Uc=function(t){return 0===this.zo.length?0:t-this.zo[0].batchId},t.prototype.qc=function(t){var e=this.Uc(t);return e<0||e>=this.zo.length?null:this.zo[e]},t}(),$b=function(){function t(t,e){this.Ei=t,this.Wc=e,this.docs=new Xx(Vm.H),this.size=0}
7924return t.prototype.ai=function(t,e,i){var n=e.key,r=this.docs.get(n),s=r?r.size:0,o=this.Wc(e);return this.docs=this.docs.zt(n,{hi:e,size:o,readTime:i}),this.size+=o-s,this.Ei.qs(t,n.path.X())},t.prototype.li=function(t){var e=this.docs.get(t);e&&(this.docs=this.docs.remove(t),this.size-=e.size)},t.prototype._i=function(t,e){var i=this.docs.get(e);return Kw.resolve(i?i.hi:null)},t.prototype.getEntries=function(t,e){var i=this,n=Zx();return e.forEach((function(t){var e=i.docs.get(t);n=n.zt(t,e?e.hi:null)})),Kw.resolve(n)},t.prototype.Kr=function(t,e,i){for(var n=Jx(),r=new Vm(e.path.child("")),s=this.docs.ee(r);s.ce();){var o=s.oe(),a=o.key,h=o.value,u=h.hi,l=h.readTime;if(!e.path.nt(a.path))break;l._(i)<=0||u instanceof yy&&ex(e,u)&&(n=n.zt(u.key,u))}return Kw.resolve(n)},t.prototype.jc=function(t,e){return Kw.forEach(this.docs,(function(t){return e(t)}))},t.prototype.Nr=function(t){return new tT(this)},t.prototype.Or=function(t){return Kw.resolve(this.size)},t}(),tT=function(t){function e(e){var i=this;return(i=t.call(this)||this).jr=e,i}return sf(e,t),e.prototype.wi=function(t){var e=this,i=[];return this.ri.forEach((function(n,r){r&&r.hi?i.push(e.jr.ai(t,r.hi,e.ci(n))):e.jr.li(n)})),Kw.Mn(i)},e.prototype.fi=function(t,e){return this.jr._i(t,e)},e.prototype.di=function(t,e){return this.jr.getEntries(t,e)},e}(ib),eT=function(){function t(t){this.persistence=t,this.Gc=new eb((function(t){return Ty(t)}),Ey),this.lastRemoteSnapshotVersion=Dm.min(),this.highestTargetId=0,this.zc=0,this.Hc=new Zb,this.targetCount=0,this.Jc=lb.Mi()}return t.prototype.In=function(t,e){return this.Gc.forEach((function(t,i){return e(i)})),Kw.resolve()},t.prototype.Qi=function(t){return Kw.resolve(this.lastRemoteSnapshotVersion)},t.prototype.Ki=function(t){return Kw.resolve(this.zc)},t.prototype.Bi=function(t){return this.highestTargetId=this.Jc.next(),Kw.resolve(this.highestTargetId)},t.prototype.Wi=function(t,e,i){return i&&(this.lastRemoteSnapshotVersion=i),e>this.zc&&(this.zc=e),Kw.resolve()},t.prototype.Gi=function(t){this.Gc.set(t.target,t);var e=t.targetId;e>this.highestTargetId&&(this.Jc=new lb(e),this.highestTargetId=e),t.sequenceNumber>this.zc&&(this.zc=t.sequenceNumber)},t.prototype.ji=function(t,e){return this.Gi(e),this.targetCount+=1,Kw.resolve()},t.prototype.Hi=function(t,e){return this.Gi(e),Kw.resolve()},t.prototype.Ji=function(t,e){return this.Gc.delete(e.target),this.Hc.Fc(e.targetId),this.targetCount-=1,Kw.resolve()},t.prototype.Xi=function(t,e,i){var n=this,r=0,s=[];return this.Gc.forEach((function(o,a){a.sequenceNumber<=e&&null===i.get(a.targetId)&&(n.Gc.delete(o),s.push(n.Yi(t,a.targetId)),r++)})),Kw.Mn(s).next((function(){return r}))},t.prototype.Zi=function(t){return Kw.resolve(this.targetCount)},t.prototype.tr=function(t,e){var i=this.Gc.get(e)||null;return Kw.resolve(i)},t.prototype.er=function(t,e,i){return this.Hc.xc(e,i),Kw.resolve()},t.prototype.sr=function(t,e,i){this.Hc.$c(e,i);var n=this.persistence.Ti,r=[];return n&&e.forEach((function(e){r.push(n.Ni(t,e))})),Kw.Mn(r)},t.prototype.Yi=function(t,e){return this.Hc.Fc(e),Kw.resolve()},t.prototype.rr=function(t,e){var i=this.Hc.kc(e);return Kw.resolve(i)},t.prototype.Fi=function(t,e){return Kw.resolve(this.Hc.Fi(e))},t}(),iT=function(){function t(t,e){var i,n=this;this.Yc={},this.so=new km(0),this.io=!1,this.io=!0,this.Ti=t(this),this._o=new eT(this),this.Ei=new q_,this.fo=(i=this.Ei,new $b(i,(function(t){return n.Ti.Xc(t)}))),this.Qt=new L_(e),this.wo=new Kb(this.Qt)}return t.prototype.start=function(){return Promise.resolve()},t.prototype.ko=function(){return this.io=!1,Promise.resolve()},Object.defineProperty(t.prototype,"Er",{get:function(){return this.io},enumerable:!1,configurable:!0}),t.prototype.Po=function(){},t.prototype.yo=function(){},t.prototype.Ko=function(){return this.Ei},t.prototype.Qo=function(t){var e=this.Yc[t.A()];return e||(e=new Jb(this.Ei,this.Ti),this.Yc[t.A()]=e),e},t.prototype.Sr=function(){return this._o},t.prototype.$r=function(){return this.fo},t.prototype.Wo=function(){return this.wo},t.prototype.runTransaction=function(t,e,i){var n=this;cm("MemoryPersistence","Starting transaction:",t);var r=new nT(this.so.next());return this.Ti.Zc(),i(r).next((function(t){return n.Ti.ta(r).next((function(){return t}))})).On().then((function(t){return r.Vs(),t}))},t.prototype.ea=function(t,e){return Kw.Ln(Object.values(this.Yc).map((function(i){return function(){return i.Fi(t,e)}})))},t}(),nT=function(t){function e(e){var i=this;return(i=t.call(this)||this).bs=e,i}return sf(e,t),e}(h_),rT=function(){function t(t){this.persistence=t,this.na=new Zb,this.sa=null}return t.ia=function(e){return new t(e)},Object.defineProperty(t.prototype,"ra",{get:function(){if(this.sa)return this.sa;throw vm()}
7924,enumerable:!1,configurable:!0}),t.prototype.nr=function(t,e,i){return this.na.nr(i,e),this.ra.delete(i.toString()),Kw.resolve()},t.prototype.ir=function(t,e,i){return this.na.ir(i,e),this.ra.add(i.toString()),Kw.resolve()},t.prototype.Ni=function(t,e){return this.ra.add(e.toString()),Kw.resolve()},t.prototype.removeTarget=function(t,e){var i=this;this.na.Fc(e.targetId).forEach((function(t){return i.ra.add(t.toString())}));var n=this.persistence.Sr();return n.rr(t,e.targetId).next((function(t){t.forEach((function(t){return i.ra.add(t.toString())}))})).next((function(){return n.Ji(t,e)}))},t.prototype.Zc=function(){this.sa=new Set},t.prototype.ta=function(t){var e=this,i=this.persistence.$r().Nr();return Kw.forEach(this.ra,(function(n){var r=Vm._t(n);return e.oa(t,r).next((function(t){t||i.li(r)}))})).next((function(){return e.sa=null,i.apply(t)}))},t.prototype.Fr=function(t,e){var i=this;return this.oa(t,e).next((function(t){t?i.ra.delete(e.toString()):i.ra.add(e.toString())}))},t.prototype.Xc=function(t){return 0},t.prototype.oa=function(t,e){var i=this;return Kw.Ln([function(){return Kw.resolve(i.na.Fi(e))},function(){return i.persistence.Sr().Fi(t,e)},function(){return i.persistence.ea(t,e)}])},t}(); 7925/** 7926 * @license 7927 * Copyright 2017 Google LLC 7928 * 7929 * Licensed under the Apache License, Version 2.0 (the "License"); 7930 * you may not use this file except in compliance with the License. 7931 * You may obtain a copy of the License at 7932 * 7933 * http://www.apache.org/licenses/LICENSE-2.0 7934 * 7935 * Unless required by applicable law or agreed to in writing, software 7936 * distributed under the License is distributed on an "AS IS" BASIS, 7937 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7938 * See the License for the specific language governing permissions and 7939 * limitations under the License. 7940 */ 7941/** 7942 * @license 7943 * Copyright 2019 Google LLC 7944 * 7945 * Licensed under the Apache License, Version 2.0 (the "License"); 7946 * you may not use this file except in compliance with the License. 7947 * You may obtain a copy of the License at 7948 * 7949 * http://www.apache.org/licenses/LICENSE-2.0 7950 * 7951 * Unless required by applicable law or agreed to in writing, software 7952 * distributed under the License is distributed on an "AS IS" BASIS, 7953 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7954 * See the License for the specific language governing permissions and 7955 * limitations under the License. 7956 */function sT(t,e){return"firestore_clients_"+t+"_"+e}function oT(t,e,i){var n="firestore_mutations_"+t+"_"+i;return e.m()&&(n+="_"+e.uid),n}function aT(t,e){return"firestore_targets_"+t+"_"+e}var hT=function(){function t(t,e,i,n){this.user=t,this.batchId=e,this.state=i,this.error=n}return t.ca=function(e,i,n){var r,s=JSON.parse(n),o="object"==typeof s&&-1!==["pending","acknowledged","rejected"].indexOf(s.state)&&(void 0===s.error||"object"==typeof s.error);return o&&s.error&&(o="string"==typeof s.error.message&&"string"==typeof s.error.code)&&(r=new Sm(s.error.code,s.error.message)),o?new t(e,i,s.state,r):(fm("SharedClientState","Failed to parse mutation state for ID '"+i+"': "+n),null)},t.prototype.aa=function(){var t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)},t}(),uT=function(){function t(t,e,i){this.targetId=t,this.state=e,this.error=i}return t.ca=function(e,i){var n,r=JSON.parse(i),s="object"==typeof r&&-1!==["not-current","current","rejected"].indexOf(r.state)&&(void 0===r.error||"object"==typeof r.error);return s&&r.error&&(s="string"==typeof r.error.message&&"string"==typeof r.error.code)&&(n=new Sm(r.error.code,r.error.message)),s?new t(e,r.state,n):(fm("SharedClientState","Failed to parse target state for ID '"+e+"': "+i),null)},t.prototype.aa=function(){var t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)},t}(),lT=function(){function t(t,e){this.clientId=t,this.activeTargetIds=e}return t.ca=function(e,i){for(var n=JSON.parse(i),r="object"==typeof n&&n.activeTargetIds instanceof Array,s=nw(),o=0;r&&o<n.activeTargetIds.length;++o)r=ty(n.activeTargetIds[o]),s=s.add(n.activeTargetIds[o]);
7956return r?new t(e,s):(fm("SharedClientState","Failed to parse client data for instance '"+e+"': "+i),null)},t}(),cT=function(){function t(t,e){this.clientId=t,this.onlineState=e}return t.ca=function(e){var i=JSON.parse(e);return"object"==typeof i&&-1!==["Unknown","Online","Offline"].indexOf(i.onlineState)&&"string"==typeof i.clientId?new t(i.clientId,i.onlineState):(fm("SharedClientState","Failed to parse online state: "+e),null)},t}(),fT=function(){function t(){this.activeTargetIds=nw()}return t.prototype.ua=function(t){this.activeTargetIds=this.activeTargetIds.add(t)},t.prototype.ha=function(t){this.activeTargetIds=this.activeTargetIds.delete(t)},t.prototype.aa=function(){var t={activeTargetIds:this.activeTargetIds.it(),updateTimeMs:Date.now()};return JSON.stringify(t)},t}(),dT=function(){function t(t,e,i,n,r){this.window=t,this.Zr=e,this.persistenceKey=i,this.la=n,this._a=null,this.fa=null,this.k=null,this.da=this.wa.bind(this),this.Ea=new Xx(wm),this.Er=!1,this.Ta=[];var s=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.storage=this.window.localStorage,this.currentUser=r,this.Ia=sT(this.persistenceKey,this.la),this.ma="firestore_sequence_number_"+this.persistenceKey,this.Ea=this.Ea.zt(this.la,new fT),this.Aa=new RegExp("^firestore_clients_"+s+"_([^_]*)$"),this.Ra=new RegExp("^firestore_mutations_"+s+"_(\\d+)(?:_(.*))?$"),this.Pa=new RegExp("^firestore_targets_"+s+"_(\\d+)$"),this.ya=function(t){return"firestore_online_state_"+t}(this.persistenceKey),this.ga=function(t){return"firestore_bundle_loaded_"+t}(this.persistenceKey),this.window.addEventListener("storage",this.da)}return t.Kn=function(t){return!(!t||!t.localStorage)},t.prototype.start=function(){return af(this,void 0,void 0,(function(){var t,e,i,n,r,s,o,a,h,u,l,c=this;return hf(this,(function(f){switch(f.label){case 0:return[4,this._a.Uo()];case 1:for(t=f.sent(),e=0,i=t;e<i.length;e++)(n=i[e])!==this.la&&(r=this.getItem(sT(this.persistenceKey,n)))&&
7956(s=lT.ca(n,r))&&(this.Ea=this.Ea.zt(s.clientId,s));for(this.Va(),(o=this.storage.getItem(this.ya))&&(a=this.pa(o))&&this.ba(a),h=0,u=this.Ta;h<u.length;h++)l=u[h],this.wa(l);return this.Ta=[],this.window.addEventListener("unload",(function(){return c.ko()})),this.Er=!0,[2]}}))}))},t.prototype.B=function(t){this.setItem(this.ma,JSON.stringify(t))},t.prototype.va=function(){return this.Sa(this.Ea)},t.prototype.Da=function(t){var e=!1;return this.Ea.forEach((function(i,n){n.activeTargetIds.has(t)&&(e=!0)})),e},t.prototype.Ca=function(t){this.xa(t,"pending")},t.prototype.Na=function(t,e,i){this.xa(t,e,i),this.$a(t)},t.prototype.Fa=function(t){var e="not-current";if(this.Da(t)){var i=this.storage.getItem(aT(this.persistenceKey,t));if(i){var n=uT.ca(t,i);n&&(e=n.state)}}return this.Oa.ua(t),this.Va(),e},t.prototype.ka=function(t){this.Oa.ha(t),this.Va()},t.prototype.Ma=function(t){return this.Oa.activeTargetIds.has(t)},t.prototype.La=function(t){this.removeItem(aT(this.persistenceKey,t))},t.prototype.Ba=function(t,e,i){this.qa(t,e,i)},t.prototype.Ua=function(t,e,i){var n=this;e.forEach((function(t){n.$a(t)})),this.currentUser=t,i.forEach((function(t){n.Ca(t)}))},t.prototype.Qa=function(t){this.Ka(t)},t.prototype.Wa=function(){this.ja()},t.prototype.ko=function(){this.Er&&(this.window.removeEventListener("storage",this.da),this.removeItem(this.Ia),this.Er=!1)},t.prototype.getItem=function(t){var e=this.storage.getItem(t);return cm("SharedClientState","READ",t,e),e},t.prototype.setItem=function(t,e){cm("SharedClientState","SET",t,e),this.storage.setItem(t,e)},t.prototype.removeItem=function(t){cm("SharedClientState","REMOVE",t),this.storage.removeItem(t)},t.prototype.wa=function(t){var e=this,i=t;if(i.storageArea===this.storage){if(cm("SharedClientState","EVENT",i.key,i.newValue),i.key===this.Ia)return void fm("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.Zr.po((function(){return af(e,void 0,void 0,(function(){var t,e,n,r,s,o;return hf(this,(function(a){if(this.Er){if(null!==i.key)if(this.Aa.test(i.key)){if(null==i.newValue)return t=this.Ga(i.key),[2,this.za(t,null)];if(e=this.Ha(i.key,i.newValue))return[2,this.za(e.clientId,e)]}else if(this.Ra.test(i.key)){if(null!==i.newValue&&(n=this.Ja(i.key,i.newValue)))return[2,this.Ya(n)]}else if(this.Pa.test(i.key)){if(null!==i.newValue&&(r=this.Xa(i.key,i.newValue)))return[2,this.Za(r)]}else if(i.key===this.ya){if(null!==i.newValue&&(s=this.pa(i.newValue)))return[2,this.ba(s)]}else if(i.key===this.ma)(o=function(t){var e=km.q;if(null!=t)try{var i=JSON.parse(t);gm("number"==typeof i),e=i}catch(n){fm("SharedClientState","Failed to read sequence number from WebStorage",n)}return e}(i.newValue))!==km.q&&this.k(o);else if(i.key===this.ga)return[2,this._a.tu()]}else this.Ta.push(i);return[2]}))}))}))}},Object.defineProperty(t.prototype,"Oa",{get:function(){return this.Ea.get(this.la)},enumerable:!1,configurable:!0}),t.prototype.Va=function(){this.setItem(this.Ia,this.Oa.aa())},t.prototype.xa=function(t,e,i){var n=new hT(this.currentUser,t,e,i),r=oT(this.persistenceKey,this.currentUser,t);this.setItem(r,n.aa())},t.prototype.$a=function(t){var e=oT(this.persistenceKey,this.currentUser,t);this.removeItem(e)},t.prototype.Ka=function(t){var e={clientId:this.la,onlineState:t};this.storage.setItem(this.ya,JSON.stringify(e))},t.prototype.qa=function(t,e,i){var n=aT(this.persistenceKey,t),r=new uT(t,e,i);this.setItem(n,r.aa())},t.prototype.ja=function(){this.setItem(this.ga,"value-not-used")},t.prototype.Ga=function(t){var e=this.Aa.exec(t);return e?e[1]:null},t.prototype.Ha=function(t,e){var i=this.Ga(t);return lT.ca(i,e)},t.prototype.Ja=function(t,e){var i=this.Ra.exec(t),n=Number(i[1]),r=void 0!==i[2]?i[2]:null;return hT.ca(new Cm(r),n,e)},t.prototype.Xa=function(t,e){var i=this.Pa.exec(t),n=Number(i[1]);return uT.ca(n,e)},t.prototype.pa=function(t){return cT.ca(t)},t.prototype.Ya=function(t){return af(this,void 0,void 0,(function(){return hf(this,(function(e){return t.user.uid===this.currentUser.uid?[2,this._a.eu(t.batchId,t.state,t.error)]:(cm("SharedCl
7956ientState","Ignoring mutation for non-active user "+t.user.uid),[2])}))}))},t.prototype.Za=function(t){return this._a.nu(t.targetId,t.state,t.error)},t.prototype.za=function(t,e){var i=this,n=e?this.Ea.zt(t,e):this.Ea.remove(t),r=this.Sa(this.Ea),s=this.Sa(n),o=[],a=[];return s.forEach((function(t){r.has(t)||o.push(t)})),r.forEach((function(t){s.has(t)||a.push(t)})),this._a.su(o,a).then((function(){i.Ea=n}))},t.prototype.ba=function(t){this.Ea.get(t.clientId)&&this.fa(t.onlineState)},t.prototype.Sa=function(t){var e=nw();return t.forEach((function(t,i){e=e.Pe(i.activeTargetIds)})),e},t}(),pT=function(){function t(){this.iu=new fT,this.ru={},this.fa=null,this.k=null}return t.prototype.Ca=function(t){},t.prototype.Na=function(t,e,i){},t.prototype.Fa=function(t){return this.iu.ua(t),this.ru[t]||"not-current"},t.prototype.Ba=function(t,e,i){this.ru[t]=e},t.prototype.ka=function(t){this.iu.ha(t)},t.prototype.Ma=function(t){return this.iu.activeTargetIds.has(t)},t.prototype.La=function(t){delete this.ru[t]},t.prototype.va=function(){return this.iu.activeTargetIds},t.prototype.Da=function(t){return this.iu.activeTargetIds.has(t)},t.prototype.start=function(){return this.iu=new fT,Promise.resolve()},t.prototype.Ua=function(t,e,i){},t.prototype.Qa=function(t){},t.prototype.ko=function(){},t.prototype.B=function(t){},t.prototype.Wa=function(){},t}(),vT=function(){function t(){}return t.prototype.ou=function(t){},t.prototype.ko=function(){},t}(),gT=function(){function t(){var t=this;this.cu=function(){return t.au()},this.uu=function(){return t.hu()},this.lu=[],this._u()}return t.prototype.ou=function(t){this.lu.push(t)},t.prototype.ko=function(){window.removeEventListener("online",this.cu),window.removeEventListener("offline",this.uu)},t.prototype._u=function(){window.addEventListener("online",this.cu),window.addEventListener("offline",this.uu)},t.prototype.au=function(){cm("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(var t=0,e=this.lu;t<e.length;t++)(0,e[t])(0)},t.prototype.hu=function(){cm("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(var t=0,e=this.lu;t<e.length;t++)(0,e[t])(1)},t.Kn=function(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener},t}(),mT={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"},yT=function(){function t(t){this.fu=t.fu,this.du=t.du}return t.prototype.wu=function(t){this.Eu=t},t.prototype.Tu=function(t){this.Iu=t},t.prototype.onMessage=function(t){this.mu=t},t.prototype.close=function(){this.du()},t.prototype.send=function(t){this.fu(t)},t.prototype.Au=function(){this.Eu()},t.prototype.Ru=function(t){this.Iu(t)},t.prototype.Pu=function(t){this.mu(t)},t}(),xT=function(t){function e(e){var i=this;return(i=t.call(this,e)||this).forceLongPolling=e.forceLongPolling,i.i=e.i,i}return sf(e,t),e.prototype.Su=function(t,e,i,n){return new Promise((function(r,s){var o=new om;o.listenOnce(em.COMPLETE,(function(){try{switch(o.getLastErrorCode()){case tm.NO_ERROR:var e=o.getResponseJson();cm("Connection","XHR received:",JSON.stringify(e)),r(e);break;case tm.TIMEOUT:cm("Connection",'RPC "'+t+'" timed out'),s(new Sm(Em.DEADLINE_EXCEEDED,"Request time out"));break;case tm.HTTP_ERROR:var i=o.getStatus();if(cm("Connection",'RPC "'+t+'" failed with status:',i,"response text:",o.getResponseText()),i>0){var n=o.getResponseJson().error;if(n&&n.status&&n.message){var a=(h=n.status,u=h.toLowerCase().replace(/_/g,"-"),Object.values(Em).indexOf(u)>=0?u:Em.UNKNOWN);s(new Sm(a,n.message))}else s(new Sm(Em.UNKNOWN,"Server responded with status "+o.getStatus()))}else s(new Sm(Em.UNAVAILABLE,"Connection failed."));break;default:vm()}}finally{cm("Connection",'RPC "'+t+'" completed.')}var h,u}));var a=JSON.stringify(n);o.send(e,"POST",a,i,15)}))},e.prototype.Cu=function(t,e){var i,n,r=[this.gu,"/","google.firestore.v1.Firestore","/",t,"/channel"],s=new Kg,o=Qp(),a={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/"+this.t.projectId+"/databases/"+this.t.database}
7956,sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.i};this.vu(a.initMessageHeaders,e),"undefined"!=typeof window&&(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(pf())||"object"==typeof navigator&&"ReactNative"===navigator.product||pf().indexOf("Electron/")>=0||((n=pf()).indexOf("MSIE ")>=0||n.indexOf("Trident/")>=0)||pf().indexOf("MSAppHost/")>=0||"object"==typeof(i="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0)&&void 0!==i.id||(a.httpHeadersOverwriteParam="$httpHeaders");var h=r.join("");cm("Connection","Creating WebChannel: "+h,a);var u=s.createWebChannel(h,a),l=!1,c=!1,f=new yT({fu:function(t){c?cm("Connection","Not sending because WebChannel is closed:",t):(l||(cm("Connection","Opening WebChannel transport."),u.open(),l=!0),cm("Connection","WebChannel sending:",t),u.send(t))},du:function(){return u.close()}}),d=function(t,e,i){t.listen(e,(function(t){try{i(t)}catch(e){setTimeout((function(){throw e}),0)}}))};return d(u,sm.EventType.OPEN,(function(){c||cm("Connection","WebChannel transport opened.")})),d(u,sm.EventType.CLOSE,(function(){c||(c=!0,cm("Connection","WebChannel transport closed"),f.Ru())})),d(u,sm.EventType.ERROR,(function(t){c||(c=!0,dm("Connection","WebChannel transport errored:",t),f.Ru(new Sm(Em.UNAVAILABLE,"The operation could not be completed")))})),d(u,sm.EventType.MESSAGE,(function(t){var e;if(!c){var i=t.data[0];gm(!!i);var n=i,r=n.error||(null===(e=n[0])||void 0===e?void 0:e.error);if(r){cm("Connection","WebChannel received error:",r);var s=r.status,o=function(t){var e=Fx[t];if(void 0!==e)return zx(e)}(s),a=r.message;void 0===o&&(o=Em.INTERNAL,a="Unknown error status: "+s+" with message "+r.message),c=!0,f.Ru(new Sm(o,a)),u.close()}else cm("Connection","WebChannel received:",i),f.Pu(i)}})),d(o,im.STAT_EVENT,(function(t){t.stat===nm?cm("Connection","Detected buffering proxy"):t.stat===rm&&cm("Connection","Detected no buffering proxy")})),setTimeout((function(){f.Au()}),0),f},e}(function(){function t(t){this.yu=t,this.t=t.t;var e=t.ssl?"https":"http";this.gu=e+"://"+t.host,this.Vu="projects/"+this.t.projectId+"/databases/"+this.t.database+"/documents"}return t.prototype.pu=function(t,e,i,n){var r=this.bu(t,e);cm("RestConnection","Sending: ",r,i);var s={};return this.vu(s,n),this.Su(t,r,s,i).then((function(t){return cm("RestConnection","Received: ",t),t}),(function(e){throw dm("RestConnection",t+" failed with error: ",e,"url: ",r,"request:",i),e}))},t.prototype.Du=function(t,e,i,n){return this.pu(t,e,i,n)},t.prototype.vu=function(t,e){if(t["X-Goog-Api-Client"]="gl-js/ fire/8.2.9",t["Content-Type"]="text/plain",e)for(var i in e.g)e.g.hasOwnProperty(i)&&(t[i]=e.g[i])},t.prototype.bu=function(t,e){var i=mT[t];return this.gu+"/v1/"+e+":"+i},t}()); 7957/** 7958 * @license 7959 * Copyright 2020 Google LLC 7960 * 7961 * Licensed under the Apache License, Version 2.0 (the "License"); 7962 * you may not use this file except in compliance with the License. 7963 * You may obtain a copy of the License at 7964 * 7965 * http://www.apache.org/licenses/LICENSE-2.0 7966 * 7967 * Unless required by applicable law or agreed to in writing, software 7968 * distributed under the License is distributed on an "AS IS" BASIS, 7969 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7970 * See the License for the specific language governing permissions and 7971 * limitations under the License. 7972 */ 7973/** 7974 * @license 7975 * Copyright 2020 Google LLC 7976 * 7977 * Licensed under the Apache License, Version 2.0 (the "License"); 7978 * you may not use this file except in compliance with the License. 7979 * You may obtain a copy of the License at 7980 * 7981 * http://www.apache.org/licenses/LICENSE-2.0 7982 * 7983 * Unless required by applicable law or agreed to in writing, software 7984 * distributed under the License is distributed on an "AS IS" BASIS, 7985 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 7986 * See the License for the specific language governing permissions and 7987 * limitations under the License. 7988 */function wT(){return"undefined"!=typeof window?window:null}function _T(){return"undefined"!=typeof document?document:null}
7989/** 7990 * @license 7991 * Copyright 2020 Google LLC 7992 * 7993 * Licensed under the Apache License, Version 2.0 (the "License"); 7994 * you may not use this file except in compliance with the License. 7995 * You may obtain a copy of the License at 7996 * 7997 * http://www.apache.org/licenses/LICENSE-2.0 7998 * 7999 * Unless required by applicable law or agreed to in writing, software 8000 * distributed under the License is distributed on an "AS IS" BASIS, 8001 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8002 * See the License for the specific language governing permissions and 8003 * limitations under the License. 8004 */function bT(t){return new yw(t,!0)}var TT=function(){function t(t,e,i,n,r){void 0===i&&(i=1e3),void 0===n&&(n=1.5),void 0===r&&(r=6e4),this.Zr=t,this.fs=e,this.xu=i,this.Nu=n,this.$u=r,this.Fu=0,this.Ou=null,this.ku=Date.now(),this.reset()}return t.prototype.reset=function(){this.Fu=0},t.prototype.Mu=function(){this.Fu=this.$u},t.prototype.Lu=function(t){var e=this;this.cancel();var i=Math.floor(this.Fu+this.Bu()),n=Math.max(0,Date.now()-this.ku),r=Math.max(0,i-n);r>0&&cm("ExponentialBackoff","Backing off for "+r+" ms (base delay: "+this.Fu+" ms, delay with jitter: "+i+" ms, last attempt: "+n+" ms ago)"),this.Ou=this.Zr.Tr(this.fs,r,(function(){return e.ku=Date.now(),t()})),this.Fu*=this.Nu,this.Fu<this.xu&&(this.Fu=this.xu),this.Fu>this.$u&&(this.Fu=this.$u)},t.prototype.qu=function(){null!==this.Ou&&(this.Ou.Rs(),this.Ou=null)},t.prototype.cancel=function(){null!==this.Ou&&(this.Ou.cancel(),this.Ou=null)},t.prototype.Bu=function(){return(Math.random()-.5)*this.Fu},t}(),ET=function(){function t(t,e,i,n,r,s){this.Zr=t,this.Uu=i,this.Qu=n,this.Ku=r,this.listener=s,this.state=0,this.Wu=0,this.ju=null,this.stream=null,this.Gu=new TT(t,e)}return t.prototype.zu=function(){return 1===this.state||2===this.state||4===this.state},t.prototype.Hu=function(){return 2===this.state},t.prototype.start=function(){3!==this.state?this.auth():this.Ju()},t.prototype.stop=function(){return af(this,void 0,void 0,(function(){return hf(this,(function(t){switch(t.label){case 0:return this.zu()?[4,this.close(0)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}
8004))}))},t.prototype.Yu=function(){this.state=0,this.Gu.reset()},t.prototype.Xu=function(){var t=this;this.Hu()&&null===this.ju&&(this.ju=this.Zr.Tr(this.Uu,6e4,(function(){return t.Zu()})))},t.prototype.th=function(t){this.eh(),this.stream.send(t)},t.prototype.Zu=function(){return af(this,void 0,void 0,(function(){return hf(this,(function(t){return this.Hu()?[2,this.close(0)]:[2]}))}))},t.prototype.eh=function(){this.ju&&(this.ju.cancel(),this.ju=null)},t.prototype.close=function(t,e){return af(this,void 0,void 0,(function(){return hf(this,(function(i){switch(i.label){case 0:return this.eh(),this.Gu.cancel(),this.Wu++,3!==t?this.Gu.reset():e&&e.code===Em.RESOURCE_EXHAUSTED?(fm(e.toString()),fm("Using maximum backoff delay to prevent overloading the backend."),this.Gu.Mu()):e&&e.code===Em.UNAUTHENTICATED&&this.Ku.p(),null!==this.stream&&(this.nh(),this.stream.close(),this.stream=null),this.state=t,[4,this.listener.Tu(e)];case 1:return i.sent(),[2]}}))}))},t.prototype.nh=function(){},t.prototype.auth=function(){var t=this;this.state=1;var e=this.sh(this.Wu),i=this.Wu;this.Ku.getToken().then((function(e){t.Wu===i&&t.ih(e)}),(function(i){e((function(){var e=new Sm(Em.UNKNOWN,"Fetching auth token failed: "+i.message);return t.rh(e)}))}))},t.prototype.ih=function(t){var e=this,i=this.sh(this.Wu);this.stream=this.oh(t),this.stream.wu((function(){i((function(){return e.state=2,e.listener.wu()}))})),this.stream.Tu((function(t){i((function(){return e.rh(t)}))})),this.stream.onMessage((function(t){i((function(){return e.onMessage(t)}))}))},t.prototype.Ju=function(){var t=this;this.state=4,this.Gu.Lu((function(){return af(t,void 0,void 0,(function(){return hf(this,(function(t){return this.state=0,this.start(),[2]}))}))}))},t.prototype.rh=function(t){return cm("PersistentStream","close with error: "+t),this.stream=null,this.close(3,t)},t.prototype.sh=function(t){var e=this;return function(i){e.Zr.Ps((function(){return e.Wu===t?i():(cm("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}},t}(),ST=function(t){function e(e,i,n,r,s){var o=this;return(o=t.call(this,e,"listen_stream_connection_backoff","listen_stream_idle",i,n,s)||this).Qt=r,o}return sf(e,t),e.prototype.oh=function(t){return this.Qu.Cu("Listen",t)},e.prototype.onMessage=function(t){this.Gu.reset();var e=function(t,e){var i,n;if("targetChange"in e){e.targetChange;var r="NO_CHANGE"===(n=e.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===n?1:"REMOVE"===n?2:"CURRENT"===n?3:"RESET"===n?4:vm(),s=e.targetChange.targetIds||[],o=function(t,e){return t.Bt?(gm(void 0===e||"string"==typeof e),Tm.fromBase64String(e||"")):(gm(void 0===e||e instanceof Uint8Array),Tm.fromUint8Array(e||new Uint8Array))}(t,e.targetChange.resumeToken),a=(h=e.targetChange.cause)&&function(t){var e=void 0===t.code?Em.UNKNOWN:zx(t.code);return new Sm(e,t.message||"")}(h);i=new cw(r,s,o,a||null)}else if("documentChange"in e){e.documentChange,(r=e.documentChange).document,r.document.name,r.document.updateTime,s=Aw(t,r.document.name),o=bw(r.document.updateTime);var h=new py({mapValue:{fields:r.document.fields}}),u=(a=new yy(s,o,h,{}),r.targetIds||[]),l=r.removedTargetIds||[];i=new uw(u,l,a.key,a)}else if("documentDelete"in e)e.documentDelete,(r=e.documentDelete).document,s=Aw(t,r.document),o=r.readTime?bw(r.readTime):Dm.min(),h=new xy(s,o),a=r.removedTargetIds||[],i=new uw([],a,h.key,h);else if("documentRemove"in e)e.documentRemove,(r=e.documentRemove).document,s=Aw(t,r.document),o=r.removedTargetIds||[],i=new uw([],o,s,null);else{if(!("filter"in e))return vm();e.filter;var c=e.filter;c.targetId,r=c.count||0,s=new Vx(r),o=c.targetId,i=new lw(o,s)}return i}(this.Qt,t),i=function(t){if(!("targetChange"in t))return Dm.min();var e=t.targetChange;return e.targetIds&&e.targetIds.length?Dm.min():e.readTime?bw(e.readTime):Dm.min()}(t);return this.listener.ah(e,i)},e.prototype.uh=function(t){var e,i,n,r,s={};s.database=Rw(this.Qt),s.addTarget=(e=this.Qt,r=(i=t).target,(n=Sy(r)?{documents:Lw(e,r)}:{query:Dw(e,r)}).targetId=i.targetId,i.resumeToken.l()>0?n.resumeToken=ww(e,i.resumeToken):i.Ot._(Dm.min())>0&&(n.readTime=xw(e,i.Ot.j())),n);var o=function(t,e){var i=function(t,e){switch(e){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return vm()}}(0,e.Ft);return null==i?null:{"goog-listen-tags":i}}(this.Qt,t);o&&(s.labels=o),this.th(s)},e.prototype.hh=function(t){var e={};e.database=Rw(this.Qt),e.removeTarget=t,this.th(e)},e}(ET),AT=function(t){function e(e,i,n,r,s){var o=this;return(o=t.call(this,e,"write_stream_connection_backoff","write_stream_idle",i,n,s)||this).Qt=r,o.lh=!1,o}return sf(e,t),Object.defineProperty(e.prototype,"_h",{get:function(){return this.lh}
8004,enumerable:!1,configurable:!0}),e.prototype.start=function(){this.lh=!1,this.lastStreamToken=void 0,t.prototype.start.call(this)},e.prototype.nh=function(){this.lh&&this.fh([])},e.prototype.oh=function(t){return this.Qu.Cu("Write",t)},e.prototype.onMessage=function(t){if(gm(!!t.streamToken),this.lastStreamToken=t.streamToken,this.lh){this.Gu.reset();var e=(n=t.writeResults,r=t.commitTime,n&&n.length>0?(gm(void 0!==r),n.map((function(t){return function(t,e){var i=t.updateTime?bw(t.updateTime):bw(e);i.isEqual(Dm.min())&&(i=bw(e));var n=null;return t.transformResults&&t.transformResults.length>0&&(n=t.transformResults),new _x(i,n)}(t,r)}))):[]),i=bw(t.commitTime);return this.listener.dh(i,e)}var n,r;return gm(!t.writeResults||0===t.writeResults.length),this.lh=!0,this.listener.wh()},e.prototype.Eh=function(){var t={};t.database=Rw(this.Qt),this.th(t)},e.prototype.fh=function(t){var e=this,i={streamToken:this.lastStreamToken,writes:t.map((function(t){return Iw(e.Qt,t)}))};this.th(i)},e}(ET),CT=function(t){function e(e,i,n){var r=this;return(r=t.call(this)||this).credentials=e,r.Qu=i,r.Qt=n,r.Th=!1,r}return sf(e,t),e.prototype.Ih=function(){if(this.Th)throw new Sm(Em.FAILED_PRECONDITION,"The client has already been terminated.")},e.prototype.pu=function(t,e,i){var n=this;return this.Ih(),this.credentials.getToken().then((function(r){return n.Qu.pu(t,e,i,r)})).catch((function(t){throw t.code===Em.UNAUTHENTICATED&&n.credentials.p(),t}))},e.prototype.Du=function(t,e,i){var n=this;return this.Ih(),this.credentials.getToken().then((function(r){return n.Qu.Du(t,e,i,r)})).catch((function(t){throw t.code===Em.UNAUTHENTICATED&&n.credentials.p(),t}))},e.prototype.terminate=function(){this.Th=!1},e}((function(){})),OT=function(){function t(t,e){this._s=t,this.fa=e,this.state="Unknown",this.mh=0,this.Ah=null,this.Rh=!0}return t.prototype.Ph=function(){var t=this;0===this.mh&&(this.yh("Unknown"),this.Ah=this._s.Tr("online_state_timeout",1e4,(function(){return t.Ah=null,t.gh("Backend didn't respond within 10 seconds."),t.yh("Offline"),Promise.resolve()})))},t.prototype.Vh=function(t){"Online"===this.state?this.yh("Unknown"):(this.mh++,this.mh>=1&&(this.ph(),this.gh("Connection failed 1 times. Most recent error: "+t.toString()),this.yh("Offline")))},t.prototype.set=function(t){this.ph(),this.mh=0,"Online"===t&&(this.Rh=!1),this.yh(t)},t.prototype.yh=function(t){t!==this.state&&(this.state=t,this.fa(t))},t.prototype.gh=function(t){var e="Could not reach Cloud Firestore backend. "+t+"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.";this.Rh?(fm(e),this.Rh=!1):cm("OnlineStateTracker",e)},t.prototype.ph=function(){null!==this.Ah&&(this.Ah.cancel(),this.Ah=null)},t}(),RT=function(t,e,i,n,r){var s=this;this.bh=t,this.Sh=e,this._s=i,this.Dh={},this.Ch=[],this.xh=new Map,this.Nh=new Set,this.$h=[],this.Fh=r,this.Fh.ou((function(t){i.Ps((function(){return af(s,void 0,void 0,(function(){return hf(this,(function(t){switch(t.label){case 0:return BT(this)?(cm("RemoteStore","Restarting streams for network reachability change."),[4,function(t){return af(this,void 0,void 0,(function(){var e;return hf(this,(function(i){switch(i.label){case 0:return(e=mm(t)).Nh.add(4),[4,PT(e)];case 1:return i.sent(),e.Oh.set("Unknown"),e.Nh.delete(4),[4,MT(e)];case 2:return i.sent(),[2]}}))}))}(this)]):[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}
8004))}))}))})),this.Oh=new OT(i,n)}; 8005/** 8006 * @license 8007 * Copyright 2017 Google LLC 8008 * 8009 * Licensed under the Apache License, Version 2.0 (the "License"); 8010 * you may not use this file except in compliance with the License. 8011 * You may obtain a copy of the License at 8012 * 8013 * http://www.apache.org/licenses/LICENSE-2.0 8014 * 8015 * Unless required by applicable law or agreed to in writing, software 8016 * distributed under the License is distributed on an "AS IS" BASIS, 8017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8018 * See the License for the specific language governing permissions and 8019 * limitations under the License. 8020 */function MT(t){return af(this,void 0,void 0,(function(){var e,i;return hf(this,(function(n){switch(n.label){case 0:if(!BT(t))return[3,4];e=0,i=t.$h,n.label=1;case 1:return e<i.length?[4,(0,i[e])(!0)]:[3,4];case 2:n.sent(),n.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))}function PT(t){return af(this,void 0,void 0,(function(){var e,i;return hf(this,(function(n){switch(n.label){case 0:e=0,i=t.$h,n.label=1;case 1:return e<i.length?[4,(0,i[e])(!1)]:[3,4];case 2:n.sent(),n.label=3;case 3:return e++,[3,1];case 4:return[2]}}
8020))}))}function IT(t,e){var i=mm(t);i.xh.has(e.targetId)||(i.xh.set(e.targetId,e),NT(i)?FT(i):$T(i).Hu()&<(i,e))}function kT(t,e){var i=mm(t),n=$T(i);i.xh.delete(e),n.Hu()&&DT(i,e),0===i.xh.size&&(n.Hu()?n.Xu():BT(i)&&i.Oh.set("Unknown"))}function LT(t,e){t.kh.on(e.targetId),$T(t).uh(e)}function DT(t,e){t.kh.on(e),$T(t).hh(e)}function FT(t){t.kh=new dw({vn:function(e){return t.Dh.vn(e)},Sn:function(e){return t.xh.get(e)||null}}),$T(t).start(),t.Oh.Ph()}function NT(t){return BT(t)&&!$T(t).zu()&&t.xh.size>0}function BT(t){return 0===mm(t).Nh.size}function UT(t){t.kh=void 0}function VT(t){return af(this,void 0,void 0,(function(){return hf(this,(function(e){return t.xh.forEach((function(e,i){LT(t,e)})),[2]}))}))}function YT(t,e){return af(this,void 0,void 0,(function(){return hf(this,(function(i){return UT(t),NT(t)?(t.Oh.Vh(e),FT(t)):t.Oh.set("Unknown"),[2]}))}))}function zT(t,e,i){return af(this,void 0,void 0,(function(){var n,r,s;return hf(this,(function(o){switch(o.label){case 0:if(t.Oh.set("Online"),!(e instanceof cw&&2===e.state&&e.cause))return[3,6];o.label=1;case 1:return o.trys.push([1,3,,5]),[4,function(t,e){return af(this,void 0,void 0,(function(){var i,n,r,s;return hf(this,(function(o){switch(o.label){case 0:i=e.cause,n=0,r=e.targetIds,o.label=1;case 1:return n<r.length?(s=r[n],t.xh.has(s)?[4,t.Dh.Mh(s,i)]:[3,3]):[3,5];case 2:o.sent(),t.xh.delete(s),t.kh.removeTarget(s),o.label=3;case 3:o.label=4;case 4:return n++,[3,1];case 5:return[2]}}
8020))}))}(t,e)];case 2:return o.sent(),[3,5];case 3:return n=o.sent(),cm("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),n),[4,XT(t,n)];case 4:return o.sent(),[3,5];case 5:return[3,13];case 6:if(e instanceof uw?t.kh.dn(e):e instanceof lw?t.kh.Pn(e):t.kh.Tn(e),i.isEqual(Dm.min()))return[3,13];o.label=7;case 7:return o.trys.push([7,11,,13]),[4,Vb(t.bh)];case 8:return r=o.sent(),i._(r)>=0?[4,(a=t,h=i,u=a.kh.Vn(h),u.$e.forEach((function(t,e){if(t.resumeToken.l()>0){var i=a.xh.get(e);i&&a.xh.set(e,i.Mt(t.resumeToken,h))}})),u.Fe.forEach((function(t){var e=a.xh.get(t);if(e){a.xh.set(t,e.Mt(Tm.T,e.Ot)),DT(a,t);var i=new rx(e.target,t,1,e.sequenceNumber);LT(a,i)}})),a.Dh.Lh(u))]:[3,10];case 9:o.sent(),o.label=10;case 10:return[3,13];case 11:return cm("RemoteStore","Failed to raise snapshot:",s=o.sent()),[4,XT(t,s)];case 12:return o.sent(),[3,13];case 13:return[2]}var a,h,u}))}))}function XT(t,e,i){return af(this,void 0,void 0,(function(){var n=this;return hf(this,(function(r){switch(r.label){case 0:if(!t_(e))throw e;return t.Nh.add(1),[4,PT(t)];case 1:return r.sent(),t.Oh.set("Offline"),i||(i=function(){return Vb(t.bh)}),t._s.po((function(){return af(n,void 0,void 0,(function(){return hf(this,(function(e){switch(e.label){case 0:return cm("RemoteStore","Retrying IndexedDB access"),[4,i()];case 1:return e.sent(),t.Nh.delete(1),[4,MT(t)];case 2:return e.sent(),[2]}}))}))})),[2]}}))}))}function GT(t,e){return e().catch((function(i){return XT(t,i,e)}))}function WT(t){return af(this,void 0,void 0,(function(){var e,i,n,r,s;return hf(this,(function(o){switch(o.label){case 0:e=mm(t),i=tE(e),n=e.Ch.length>0?e.Ch[e.Ch.length-1].batchId:-1,o.label=1;case 1:if(!(BT(a=e)&&a.Ch.length<10))return[3,7];o.label=2;case 2:return o.trys.push([2,4,,6]),[4,zb(e.bh,n)];case 3:return null===(r=o.sent())?(0===e.Ch.length&&i.Xu(),[3,7]):(n=r.batchId,function(t,e){t.Ch.push(e);var i=tE(t);i.Hu()&&i._h&&i.fh(e.mutations)}(e,r),[3,6]);case 4:return s=o.sent(),[4,XT(e,s)];case 5:return o.sent(),[3,6];case 6:return[3,1];case 7:return jT(e)&&HT(e),[2]}var a}))}))}function jT(t){return BT(t)&&!tE(t).zu()&&t.Ch.length>0}function HT(t){tE(t).start()}function qT(t){return af(this,void 0,void 0,(function(){return hf(this,(function(e){return tE(t).Eh(),[2]}))}
8020))}function KT(t){return af(this,void 0,void 0,(function(){var e,i,n,r;return hf(this,(function(s){for(e=tE(t),i=0,n=t.Ch;i<n.length;i++)r=n[i],e.fh(r.mutations);return[2]}))}))}function ZT(t,e,i){return af(this,void 0,void 0,(function(){var n,r;return hf(this,(function(s){switch(s.label){case 0:return n=t.Ch.shift(),r=k_.from(n,e,i),[4,GT(t,(function(){return t.Dh.Bh(r)}))];case 1:return s.sent(),[4,WT(t)];case 2:return s.sent(),[2]}}))}))}function QT(t,e){return af(this,void 0,void 0,(function(){return hf(this,(function(i){switch(i.label){case 0:return e&&tE(t)._h?[4,function(t,e){return af(this,void 0,void 0,(function(){var i,n;return hf(this,(function(r){switch(r.label){case 0:return Yx(n=e.code)&&n!==Em.ABORTED?(i=t.Ch.shift(),tE(t).Yu(),[4,GT(t,(function(){return t.Dh.qh(i.batchId,e)}))]):[3,3];case 1:return r.sent(),[4,WT(t)];case 2:r.sent(),r.label=3;case 3:return[2]}}))}))}(t,e)]:[3,2];case 1:i.sent(),i.label=2;case 2:return jT(t)&&HT(t),[2]}}))}))}function JT(t,e){return af(this,void 0,void 0,(function(){var i;return hf(this,(function(n){switch(n.label){case 0:return i=mm(t),e?(i.Nh.delete(2),[4,MT(i)]):[3,2];case 1:return n.sent(),[3,5];case 2:return e?[3,4]:(i.Nh.add(2),[4,PT(i)]);case 3:n.sent(),i.Oh.set("Unknown"),n.label=4;case 4:n.label=5;case 5:return[2]}}
8020))}))}function $T(t){var e,i,n,r,s=this;return t.Uh||(t.Uh=(e=t.Sh,i=t._s,n={wu:VT.bind(null,t),Tu:YT.bind(null,t),ah:zT.bind(null,t)},(r=mm(e)).Ih(),new ST(i,r.Qu,r.credentials,r.Qt,n)),t.$h.push((function(e){return af(s,void 0,void 0,(function(){return hf(this,(function(i){switch(i.label){case 0:return e?(t.Uh.Yu(),NT(t)?FT(t):t.Oh.set("Unknown"),[3,3]):[3,1];case 1:return[4,t.Uh.stop()];case 2:i.sent(),UT(t),i.label=3;case 3:return[2]}}))}))}))),t.Uh}function tE(t){var e,i,n,r,s=this;return t.Qh||(t.Qh=(e=t.Sh,i=t._s,n={wu:qT.bind(null,t),Tu:QT.bind(null,t),wh:KT.bind(null,t),dh:ZT.bind(null,t)},(r=mm(e)).Ih(),new AT(i,r.Qu,r.credentials,r.Qt,n)),t.$h.push((function(e){return af(s,void 0,void 0,(function(){return hf(this,(function(i){switch(i.label){case 0:return e?(t.Qh.Yu(),[4,WT(t)]):[3,2];case 1:return i.sent(),[3,4];case 2:return[4,t.Qh.stop()];case 3:i.sent(),t.Ch.length>0&&(cm("RemoteStore","Stopping write stream with "+t.Ch.length+" pending writes"),t.Ch=[]),i.label=4;case 4:return[2]}}))}))}))),t.Qh}var eE=function(){this.Kh=void 0,this.listeners=[]},iE=function(){this.queries=new eb((function(t){return $y(t)}),Jy),this.onlineState="Unknown",this.Wh=new Set};function nE(t,e){return af(this,void 0,void 0,(function(){var i,n,r,s,o,a,h;return hf(this,(function(u){switch(u.label){case 0:if(i=mm(t),n=e.query,r=!1,(s=i.queries.get(n))||(r=!0,s=new eE),!r)return[3,4];u.label=1;case 1:return u.trys.push([1,3,,4]),o=s,[4,i.jh(n)];case 2:return o.Kh=u.sent(),[3,4];case 3:return a=u.sent(),h=o_(a,"Initialization of query '"+tx(e.query)+"' failed"),[2,void e.onError(h)];case 4:return i.queries.set(n,s),s.listeners.push(e),e.Gh(i.onlineState),s.Kh&&e.zh(s.Kh)&&aE(i),[2]}}))}))}function rE(t,e){return af(this,void 0,void 0,(function(){var i,n,r,s,o;return hf(this,(function(a){return i=mm(t),n=e.query,r=!1,(s=i.queries.get(n))&&(o=s.listeners.indexOf(e))>=0&&(s.listeners.splice(o,1),r=0===s.listeners.length),r?[2,(i.queries.delete(n),i.Hh(n))]:[2]}))}))}function sE(t,e){for(var i=mm(t),n=!1,r=0,s=e;r<s.length;r++){var o=s[r],a=o.query,h=i.queries.get(a);if(h){for(var u=0,l=h.listeners;u<l.length;u++)l[u].zh(o)&&(n=!0);h.Kh=o}}n&&aE(i)}function oE(t,e,i){var n=mm(t),r=n.queries.get(e);if(r)for(var s=0,o=r.listeners;s<o.length;s++)o[s].onError(i);n.queries.delete(e)}function aE(t){t.Wh.forEach((function(t){t.next()}))}var hE=function(){function t(t,e,i){this.query=t,this.Jh=e,this.Yh=!1,this.Xh=null,this.onlineState="Unknown",this.options=i||{}}return t.prototype.zh=function(t){if(!this.options.includeMetadataChanges){for(var e=[],i=0,n=t.docChanges;i<n.length;i++){var r=n[i];3!==r.type&&e.push(r)}t=new ow(t.query,t.docs,t.Se,e,t.De,t.fromCache,t.Ce,!0)}var s=!1;return this.Yh?this.Zh(t)&&(this.Jh.next(t),s=!0):this.tl(t,this.onlineState)&&(this.el(t),s=!0),this.Xh=t,s},t.prototype.onError=function(t){this.Jh.error(t)},t.prototype.Gh=function(t){this.onlineState=t;var e=!1;return this.Xh&&!this.Yh&&this.tl(this.Xh,t)&&(this.el(this.Xh),e=!0),e},t.prototype.tl=function(t,e){if(!t.fromCache)return!0;var i="Offline"!==e;return!(this.options.nl&&i||t.docs.et()&&"Offline"!==e)},t.prototype.Zh=function(t){if(t.docChanges.length>0)return!0;var e=this.Xh&&this.Xh.hasPendingWrites!==t.hasPendingWrites;return!(!t.Ce&&!e)&&!0===this.options.includeMetadataChanges},t.prototype.el=function(t){t=ow.Ne(t.query,t.docs,t.De,t.fromCache),this.Yh=!0,this.Jh.next(t)},t}(),uE=function(t){this.key=t},lE=function(t){this.key=t},cE=function(){function t(t,e){this.query=t,this.cl=e,this.al=null,this.Be=!1,this.ul=ew(),this.De=ew(),this.hl=ix(t),this.ll=new rw(this.hl)}return Object.defineProperty(t.prototype,"_l",{get:function(){return this.cl},enumerable:!1,configurable:!0}),t.prototype.fl=function(t,e){var i=this,n=e?e.dl:new sw,r=e?e.ll:this.ll,s=e?e.De:this.De,o=r,a=!1,h=Gy(this.query)&&r.size===this.query.limit?r.last():null,u=Wy(this.query)&&r.size===this.query.limit?r.first():null;if(t.Xt((function(t,e){var l=r.get(t),c=e instanceof yy?e:null;c&&(c=ex(i.query,c)?c:null);var f=!!l&&i.De.has(l.key),d=!!c&&(c.Vt||i.De.has(c.key)&&c.hasCommittedMutations),p=!1;l&&c?l.data().isEqual(c.data())?f!==d&&(n.track({type:3,doc:c}),p=!0):i.wl(l,c)||(n.track({type:2,doc:c}),p=!0,(h&&i.hl(c,h)>0||u&&i.hl(c,u)<0)&&(a=!0)):!l&&c?(n.track({type:0,doc:c}),p=!0):l&&!c&&(n.track({type:1,doc:l}),p=!0,(h||u)&&(a=!0)),p&&(c?(o=o.add(c),s=d?s.add(t):s.delete(t)):(o=o.delete(t),s=s.delete(t)))})),Gy(this.query)||Wy(this.query))for(;o.size>this.query.limit;){var l=Gy(this.query)?o.last():o.first();o=o.delete(l.key),s=s.delete(l.key),n.track({type:1,doc:l})}return{ll:o,dl:n,lc:a,De:s}},t.prototype.wl=function(t,e){return t.Vt&&e.hasCommittedMutations&&!e.Vt}
8020,t.prototype.wi=function(t,e,i){var n=this,r=this.ll;this.ll=t.ll,this.De=t.De;var s=t.dl.ve();s.sort((function(t,e){return i=t.type,r=e.type,(s=function(t){switch(t){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return vm()}})(i)-s(r)||n.hl(t.doc,e.doc);var i,r,s})),this.El(i);var o=e?this.Tl():[],a=0===this.ul.size&&this.Be?1:0,h=a!==this.al;return this.al=a,0!==s.length||h?{snapshot:new ow(this.query,t.ll,r,s,t.De,0===a,h,!1),Il:o}:{Il:o}},t.prototype.Gh=function(t){return this.Be&&"Offline"===t?(this.Be=!1,this.wi({ll:this.ll,dl:new sw,De:this.De,lc:!1},!1)):{Il:[]}},t.prototype.ml=function(t){return!this.cl.has(t)&&!!this.ll.has(t)&&!this.ll.get(t).Vt},t.prototype.El=function(t){var e=this;t&&(t.qe.forEach((function(t){return e.cl=e.cl.add(t)})),t.Ue.forEach((function(t){})),t.Qe.forEach((function(t){return e.cl=e.cl.delete(t)})),this.Be=t.Be)},t.prototype.Tl=function(){var t=this;if(!this.Be)return[];var e=this.ul;this.ul=ew(),this.ll.forEach((function(e){t.ml(e.key)&&(t.ul=t.ul.add(e.key))}));var i=[];return e.forEach((function(e){t.ul.has(e)||i.push(new lE(e))})),this.ul.forEach((function(t){e.has(t)||i.push(new uE(t))})),i},t.prototype.Al=function(t){this.cl=t.Rc,this.ul=ew();var e=this.fl(t.documents);return this.wi(e,!0)},t.prototype.Rl=function(){return ow.Ne(this.query,this.ll,this.De,0===this.al)},t}(),fE=function(t,e,i){this.query=t,this.targetId=e,this.view=i},dE=function(t){this.key=t,this.Pl=!1},pE=function(){function t(t,e,i,n,r,s){this.bh=t,this.yl=e,this.gl=i,this.Vl=n,this.currentUser=r,this.pl=s,this.bl={},this.vl=new eb((function(t){return $y(t)}),Jy),this.Sl=new Map,this.Dl=new Set,this.Cl=new Xx(Vm.H),this.xl=new Map,this.Nl=new Zb,this.$l={},this.Fl=new Map,this.Ol=lb.Li(),this.onlineState="Unknown",this.kl=void 0}return Object.defineProperty(t.prototype,"Ml",{get:function(){return!0===this.kl},enumerable:!1,configurable:!0}),t}(); 8021/** 8022 * @license 8023 * Copyright 2017 Google LLC 8024 * 8025 * Licensed under the Apache License, Version 2.0 (the "License"); 8026 * you may not use this file except in compliance with the License. 8027 * You may obtain a copy of the License at 8028 * 8029 * http://www.apache.org/licenses/LICENSE-2.0 8030 * 8031 * Unless required by applicable law or agreed to in writing, software 8032 * distributed under the License is distributed on an "AS IS" BASIS, 8033 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8034 * See the License for the specific language governing permissions and 8035 * limitations under the License. 8036 */function vE(t,e){return af(this,void 0,void 0,(function(){var i,n,r,s,o,a;return hf(this,(function(h){switch(h.label){case 0:return i=GE(t),(s=i.vl.get(e))?(n=s.targetId,i.Vl.Fa(n),r=s.view.Rl(),[3,4]):[3,1];case 1:return[4,Xb(i.bh,Zy(e))];case 2:return o=h.sent(),a=i.Vl.Fa(o.targetId),n=o.targetId,[4,gE(i,e,n,"current"===a)];case 3:r=h.sent(),i.Ml&&IT(i.yl,o),h.label=4;case 4:return[2,r]}}))}))}function gE(t,e,i,n){return af(this,void 0,void 0,(function(){var r,s,o,a,h,u;return hf(this,(function(l){switch(l.label){case 0:return t.Ll=function(e,i,n){return function(t,e,i,n){return af(this,void 0,void 0,(function(){var r,s,o;return hf(this,(function(a){switch(a.label){case 0:return(r=e.view.fl(i)).lc?[4,Wb(t.bh,e.query,!1).then((function(t){var i=t.documents;return e.view.fl(i,r)}))]:[3,2];case 1:r=a.sent(),a.label=2;case 2:return s=n&&n.$e.get(e.targetId),o=e.view.wi(r,t.Ml,s),[2,(RE(t,e.targetId,o.Il),o.snapshot)]}}))}))}(t,e,i,n)},[4,Wb(t.bh,e,!0)];case 1:return r=l.sent(),s=new cE(e,r.Rc),o=s.fl(r.documents),a=hw.Le(i,n&&"Offline"!==t.onlineState),h=s.wi(o,t.Ml,a),RE(t,i,h.Il),u=new fE(e,i,s),[2,(t.vl.set(e,u),t.Sl.has(i)?t.Sl.get(i).push(e):t.Sl.set(i,[e]),h.snapshot)]}}))}))}function mE(t,e){return af(this,void 0,void 0,(function(){var i,n,r;return hf(this,(function(s){switch(s.label){case 0:return i=mm(t),n=i.vl.get(e),(r=i.Sl.get(n.targetId)).length>1?[2,(i.Sl.set(n.targetId,r.filter((function(t){return!Jy(t,e)}))),void i.vl.delete(e))]:i.Ml?(i.Vl.ka(n.targetId),i.Vl.Da(n.targetId)?[3,2]:[4,Gb(i.bh,n.targetId,!1).then((function(){i.Vl.La(n.targetId),kT(i.yl,n.targetId),CE(i,n.targetId)})).catch(tb)]):[3,3];case 1:s.sent(),s.label=2;case 2:return[3,5];case 3:return CE(i,n.targetId),[4,Gb(i.bh,n.targetId,!0)];case 4:s.sent(),s.label=5;case 5:return[2]}}
8036))}))}function yE(t,e,i){return af(this,void 0,void 0,(function(){var n,r,s,o;return hf(this,(function(a){switch(a.label){case 0:n=WE(t),a.label=1;case 1:return a.trys.push([1,5,,6]),[4,(h=n.bh,u=e,c=mm(h),f=Lm.now(),d=u.reduce((function(t,e){return t.add(e.key)}),ew()),c.persistence.runTransaction("Locally write mutations","readwrite",(function(t){return c.Tc.Xo(t,d).next((function(e){l=e;for(var i=[],n=0,r=u;n<r.length;n++){var s=r[n],o=Cx(s,l.get(s.key));null!=o&&i.push(new Px(s.key,o,gy(o.proto.mapValue),bx.exists(!0)))}return c.zo.Ri(t,f,i,u)}))})).then((function(t){var e=t.xs(l);return{batchId:t.batchId,ri:e}})))];case 2:return r=a.sent(),n.Vl.Ca(r.batchId),function(t,e,i){var n=t.$l[t.currentUser.A()];n||(n=new Xx(wm)),n=n.zt(e,i),t.$l[t.currentUser.A()]=n}(n,r.batchId,i),[4,IE(n,r.ri)];case 3:return a.sent(),[4,WT(n.yl)];case 4:return a.sent(),[3,6];case 5:return s=a.sent(),o=o_(s,"Failed to persist write"),i.reject(o),[3,6];case 6:return[2]}var h,u,l,c,f,d}))}))}function xE(t,e){return af(this,void 0,void 0,(function(){var i,n;return hf(this,(function(r){switch(r.label){case 0:i=mm(t),r.label=1;case 1:return r.trys.push([1,4,,6]),[4,Yb(i.bh,e)];case 2:return n=r.sent(),e.$e.forEach((function(t,e){var n=i.xl.get(e);n&&(gm(t.qe.size+t.Ue.size+t.Qe.size<=1),t.qe.size>0?n.Pl=!0:t.Ue.size>0?gm(n.Pl):t.Qe.size>0&&(gm(n.Pl),n.Pl=!1))})),[4,IE(i,n,e)];case 3:return r.sent(),[3,6];case 4:return[4,tb(r.sent())];case 5:return r.sent(),[3,6];case 6:return[2]}}
8036))}))}function wE(t,e,i){var n=mm(t);if(n.Ml&&0===i||!n.Ml&&1===i){var r=[];n.vl.forEach((function(t,i){var n=i.view.Gh(e);n.snapshot&&r.push(n.snapshot)})),function(t,e){var i=mm(t);i.onlineState=e;var n=!1;i.queries.forEach((function(t,i){for(var r=0,s=i.listeners;r<s.length;r++)s[r].Gh(e)&&(n=!0)})),n&&aE(i)}(n.gl,e),r.length&&n.bl.ah(r),n.onlineState=e,n.Ml&&n.Vl.Qa(e)}}function _E(t,e,i){return af(this,void 0,void 0,(function(){var n,r,s,o,a,h;return hf(this,(function(u){switch(u.label){case 0:return(n=mm(t)).Vl.Ba(e,"rejected",i),r=n.xl.get(e),(s=r&&r.key)?(o=(o=new Xx(Vm.H)).zt(s,new xy(s,Dm.min())),a=ew().add(s),h=new aw(Dm.min(),new Map,new jx(wm),o,a),[4,xE(n,h)]):[3,2];case 1:return u.sent(),n.Cl=n.Cl.remove(s),n.xl.delete(e),PE(n),[3,4];case 2:return[4,Gb(n.bh,e,!1).then((function(){return CE(n,e,i)})).catch(tb)];case 3:u.sent(),u.label=4;case 4:return[2]}}))}))}function bE(t,e){return af(this,void 0,void 0,(function(){var i,n,r;return hf(this,(function(s){switch(s.label){case 0:i=mm(t),n=e.batch.batchId,s.label=1;case 1:return s.trys.push([1,4,,6]),[4,Ub(i.bh,e)];case 2:return r=s.sent(),AE(i,n,null),SE(i,n),i.Vl.Na(n,"acknowledged"),[4,IE(i,r)];case 3:return s.sent(),[3,6];case 4:return[4,tb(s.sent())];case 5:return s.sent(),[3,6];case 6:return[2]}}
8036))}))}function TE(t,e,i){return af(this,void 0,void 0,(function(){var n,r;return hf(this,(function(s){switch(s.label){case 0:n=mm(t),s.label=1;case 1:return s.trys.push([1,4,,6]),[4,(o=n.bh,a=e,h=mm(o),h.persistence.runTransaction("Reject batch","readwrite-primary",(function(t){var e;return h.zo.Pi(t,a).next((function(i){return gm(null!==i),e=i.keys(),h.zo.Ci(t,i)})).next((function(){return h.zo.$i(t)})).next((function(){return h.Tc.Xo(t,e)}))})))];case 2:return r=s.sent(),AE(n,e,i),SE(n,e),n.Vl.Na(e,"rejected",i),[4,IE(n,r)];case 3:return s.sent(),[3,6];case 4:return[4,tb(s.sent())];case 5:return s.sent(),[3,6];case 6:return[2]}var o,a,h}))}))}function EE(t,e){return af(this,void 0,void 0,(function(){var i,n,r,s,o;return hf(this,(function(a){switch(a.label){case 0:BT((i=mm(t)).yl)||cm("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled."),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,(h=i.bh,u=mm(h),u.persistence.runTransaction("Get highest unacknowledged batch id","readonly",(function(t){return u.zo.Vi(t)})))];case 2:return-1===(n=a.sent())?[2,void e.resolve()]:((r=i.Fl.get(n)||[]).push(e),i.Fl.set(n,r),[3,4]);case 3:return s=a.sent(),o=o_(s,"Initialization of waitForPendingWrites() operation failed"),e.reject(o),[3,4];case 4:return[2]}var h,u}))}))}function SE(t,e){(t.Fl.get(e)||[]).forEach((function(t){t.resolve()})),t.Fl.delete(e)}function AE(t,e,i){var n=mm(t),r=n.$l[n.currentUser.A()];if(r){var s=r.get(e);s&&(i?s.reject(i):s.resolve(),r=r.remove(e)),n.$l[n.currentUser.A()]=r}}function CE(t,e,i){void 0===i&&(i=null),t.Vl.ka(e);for(var n=0,r=t.Sl.get(e);n<r.length;n++){var s=r[n];t.vl.delete(s),i&&t.bl.Bl(s,i)}t.Sl.delete(e),t.Ml&&t.Nl.Fc(e).forEach((function(e){t.Nl.Fi(e)||OE(t,e)}))}function OE(t,e){t.Dl.delete(e.path.rt());var i=t.Cl.get(e);null!==i&&(kT(t.yl,i),t.Cl=t.Cl.remove(e),t.xl.delete(i),PE(t))}function RE(t,e,i){for(var n=0,r=i;n<r.length;n++){var s=r[n];s instanceof uE?(t.Nl.nr(s.key,e),ME(t,s)):s instanceof lE?(cm("SyncEngine","Document no longer in limbo: "+s.key),t.Nl.ir(s.key,e),t.Nl.Fi(s.key)||OE(t,s.key)):vm()}}function ME(t,e){var i=e.key,n=i.path.rt();t.Cl.get(i)||t.Dl.has(n)||(cm("SyncEngine","New document in limbo: "+i),t.Dl.add(n),PE(t))}function PE(t){for(;t.Dl.size>0&&t.Cl.size<t.pl;){var e=t.Dl.values().next().value;t.Dl.delete(e);var i=new Vm(Nm.ot(e)),n=t.Ol.next();t.xl.set(n,new dE(i)),t.Cl=t.Cl.zt(i,n),IT(t.yl,new rx(Zy(Xy(i.path)),n,2,km.q))}}function IE(t,e,i){return af(this,void 0,void 0,(function(){var n,r,s,o;return hf(this,(function(a){switch(a.label){case 0:return n=mm(t),r=[],s=[],o=[],n.vl.et()?[3,3]:(n.vl.forEach((function(t,a){o.push(n.Ll(a,e,i).then((function(t){if(t){n.Ml&&n.Vl.Ba(a.targetId,t.fromCache?"not-current":"current"),r.push(t);var e=Lb.oc(a.targetId,t);s.push(e)}})))})),[4,Promise.all(o)]);case 1:return a.sent(),n.bl.ah(r),[4,function(t,e){return af(this,void 0,void 0,(function(){var i,n,r,s,o,a,h,u,l;return hf(this,(function(c){switch(c.label){case 0:i=mm(t),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,i.persistence.runTransaction("notifyLocalViewChanges","readwrite",(function(t){return Kw.forEach(e,(function(e){return Kw.forEach(e.ic,(function(n){return i.persistence.Ti.nr(t,e.targetId,n)})).next((function(){return Kw.forEach(e.rc,(function(n){return i.persistence.Ti.ir(t,e.targetId,n)}))}))}))}))];case 2:return c.sent(),[3,4];case 3:if(!t_(n=c.sent()))throw n;return cm("LocalStore","Failed to update sequence numbers: "+n),[3,4];case 4:for(r=0,s=e;r<s.length;r++)o=s[r],a=o.targetId,o.fromCache||(h=i.fc.get(a),u=h.Ot,l=h.Lt(u),i.fc=i.fc.zt(a,l));return[2]}}))}))}(n.bh,s)];case 2:a.sent(),a.label=3;case 3:return[2]}}
8036))}))}function kE(t,e){return af(this,void 0,void 0,(function(){var i,n;return hf(this,(function(r){switch(r.label){case 0:return(i=mm(t)).currentUser.isEqual(e)?[3,3]:(cm("SyncEngine","User change. New user:",e.A()),[4,Bb(i.bh,e)]);case 1:return n=r.sent(),i.currentUser=e,(s=i).Fl.forEach((function(t){t.forEach((function(t){t.reject(new Sm(Em.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),s.Fl.clear(),i.Vl.Ua(e,n.mc,n.Ac),[4,IE(i,n.Ic)];case 2:r.sent(),r.label=3;case 3:return[2]}var s}))}))}function LE(t,e){var i=mm(t),n=i.xl.get(e);if(n&&n.Pl)return ew().add(n.key);var r=ew(),s=i.Sl.get(e);if(!s)return r;for(var o=0,a=s;o<a.length;o++){var h=a[o],u=i.vl.get(h);r=r.Pe(u.view._l)}return r}function DE(t,e){return af(this,void 0,void 0,(function(){var i,n,r;return hf(this,(function(s){switch(s.label){case 0:return[4,Wb((i=mm(t)).bh,e.query,!0)];case 1:return n=s.sent(),r=e.view.Al(n),[2,(i.Ml&&RE(i,e.targetId,r.Il),r)]}}))}))}function FE(t){return af(this,void 0,void 0,(function(){var e;return hf(this,(function(i){return[2,Hb((e=mm(t)).bh).then((function(t){return IE(e,t)}))]}))}))}function NE(t,e,i,n){return af(this,void 0,void 0,(function(){var r,s;return hf(this,(function(o){switch(o.label){case 0:return[4,(a=(r=mm(t)).bh,h=e,u=mm(a),l=mm(u.zo),u.persistence.runTransaction("Lookup mutation documents","readonly",(function(t){return l.yi(t,h).next((function(e){return e?u.Tc.Xo(t,e):Kw.resolve(null)}))})))];case 1:return null===(s=o.sent())?[3,6]:"pending"!==i?[3,3]:[4,WT(r.yl)];case 2:return o.sent(),[3,4];case 3:"acknowledged"===i||"rejected"===i?(AE(r,e,n||null),SE(r,e),function(t,e){mm(mm(t).zo).xi(e)}(r.bh,e)):vm(),o.label=4;case 4:return[4,IE(r,s)];case 5:return o.sent(),[3,7];case 6:cm("SyncEngine","Cannot apply mutation batch with id: "+e),o.label=7;case 7:return[2]}var a,h,u,l}))}))}function BE(t,e){return af(this,void 0,void 0,(function(){var i,n,r,s,o,a,h,u;return hf(this,(function(l){switch(l.label){case 0:return GE(i=mm(t)),WE(i),!0!==e||!0===i.kl?[3,3]:(n=i.Vl.va(),[4,UE(i,n.it())]);case 1:return r=l.sent(),i.kl=!0,[4,JT(i.yl,!0)];case 2:for(l.sent(),s=0,o=r;s<o.length;s++)a=o[s],IT(i.yl,a);return[3,7];case 3:return!1!==e||!1===i.kl?[3,7]:(h=[],u=Promise.resolve(),i.Sl.forEach((function(t,e){i.Vl.Ma(e)?h.push(e):u=u.then((function(){return CE(i,e),Gb(i.bh,e,!0)})),kT(i.yl,e)})),[4,u]);case 4:return l.sent(),[4,UE(i,h)];case 5:return l.sent(),(c=mm(i)).xl.forEach((function(t,e){kT(c.yl,e)})),c.Nl.Oc(),c.xl=new Map,c.Cl=new Xx(Vm.H),i.kl=!1,[4,JT(i.yl,!1)];case 6:l.sent(),l.label=7;case 7:return[2]}var c}))}))}function UE(t,e,i){return af(this,void 0,void 0,(function(){var i,n,r,s,o,a,h,u,l,c,f,d,p,v;return hf(this,(function(g){switch(g.label){case 0:i=mm(t),n=[],r=[],s=0,o=e,g.label=1;case 1:return s<o.length?(a=o[s],h=void 0,(u=i.Sl.get(a))&&0!==u.length?[4,Xb(i.bh,Zy(u[0]))]:[3,7]):[3,13];case 2:h=g.sent(),l=0,c=u,g.label=3;case 3:return l<c.length?(f=c[l],d=i.vl.get(f),[4,DE(i,d)]):[3,6];case 4:(p=g.sent()).snapshot&&r.push(p.snapshot),g.label=5;case 5:return l++,[3,3];case 6:return[3,11];case 7:return[4,jb(i.bh,a)];case 8:return v=g.sent(),[4,Xb(i.bh,v)];case 9:return h=g.sent(),[4,gE(i,VE(v),a,!1)];case 10:g.sent(),g.label=11;case 11:n.push(h),g.label=12;case 12:return s++,[3,1];case 13:return[2,(i.bl.ah(r),n)]}}))}))}function VE(t){return zy(t.path,t.collectionGroup,t.orderBy,t.filters,t.limit,"F",t.startAt,t.endAt)}function YE(t){var e=mm(t);return mm(mm(e.bh).persistence).Uo()}function zE(t,e,i,n){return af(this,void 0,void 0,(function(){var r,s,o;return hf(this,(function(a){switch(a.label){case 0:return(r=mm(t)).kl?(cm("SyncEngine","Ignoring unexpected query state notification."),[3,8]):[3,1];case 1:if(!r.Sl.has(e))return[3,8];switch(i){case"current":case"not-current":return[3,2];case"rejected":return[3,5]}return[3,7];case 2:return[4,Hb(r.bh)];case 3:return s=a.sent(),o=aw.Me(e,"current"===i),[4,IE(r,s,o)];case 4:return a.sent(),[3,8];case 5:return[4,Gb(r.bh,e,!0)];case 6:return a.sent(),CE(r,e,n),[3,8];case 7:vm(),a.label=8;case 8:return[2]}}
8036))}))}function XE(t,e,i){return af(this,void 0,void 0,(function(){var n,r,s,o,a,h,u,l,c,f;return hf(this,(function(d){switch(d.label){case 0:if(!(n=GE(t)).kl)return[3,10];r=0,s=e,d.label=1;case 1:return r<s.length?(o=s[r],n.Sl.has(o)?(cm("SyncEngine","Adding an already active target "+o),[3,5]):[4,jb(n.bh,o)]):[3,6];case 2:return a=d.sent(),[4,Xb(n.bh,a)];case 3:return h=d.sent(),[4,gE(n,VE(a),h.targetId,!1)];case 4:d.sent(),IT(n.yl,h),d.label=5;case 5:return r++,[3,1];case 6:u=function(t){return hf(this,(function(e){switch(e.label){case 0:return n.Sl.has(t)?[4,Gb(n.bh,t,!1).then((function(){kT(n.yl,t),CE(n,t)})).catch(tb)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))},l=0,c=i,d.label=7;case 7:return l<c.length?(f=c[l],[5,u(f)]):[3,10];case 8:d.sent(),d.label=9;case 9:return l++,[3,7];case 10:return[2]}}))}))}function GE(t){var e=mm(t);return e.yl.Dh.Lh=xE.bind(null,e),e.yl.Dh.vn=LE.bind(null,e),e.yl.Dh.Mh=_E.bind(null,e),e.bl.ah=sE.bind(null,e.gl),e.bl.Bl=oE.bind(null,e.gl),e}function WE(t){var e=mm(t);return e.yl.Dh.Bh=bE.bind(null,e),e.yl.Dh.qh=TE.bind(null,e),e}var jE=function(){function t(){this.synchronizeTabs=!1}return t.prototype.initialize=function(t){return af(this,void 0,void 0,(function(){return hf(this,(function(e){switch(e.label){case 0:return this.Qt=bT(t.yu.t),this.Vl=this.Wl(t),this.persistence=this.jl(t),[4,this.persistence.start()];case 1:return e.sent(),this.Gl=this.zl(t),this.bh=this.Hl(t),[2]}}))}))},t.prototype.zl=function(t){return null},t.prototype.Hl=function(t){return Nb(this.persistence,new Db,t.Jl,this.Qt)},t.prototype.jl=function(t){return new iT(rT.ia,this.Qt)},t.prototype.Wl=function(t){return new pT},t.prototype.terminate=function(){return af(this,void 0,void 0,(function(){return hf(this,(function(t){switch(t.label){case 0:return this.Gl&&this.Gl.stop(),[4,this.Vl.ko()];case 1:return t.sent(),[4,this.persistence.ko()];case 2:return t.sent(),[2]}}))}))},t}(),HE=function(t){function e(e,i,n){var r=this;return(r=t.call(this)||this).Yl=e,r.cacheSizeBytes=i,r.forceOwnership=n,r.synchronizeTabs=!1,r}return sf(e,t),e.prototype.initialize=function(e){return af(this,void 0,void 0,(function(){return hf(this,(function(i){switch(i.label){case 0:return[4,t.prototype.initialize.call(this,e)];case 1:return i.sent(),[4,qb(this.bh)];case 2:return i.sent(),[4,this.Yl.initialize(this,e)];case 3:return i.sent(),[4,WE(this.Yl._a)];case 4:return i.sent(),[4,WT(this.Yl.yl)];case 5:return i.sent(),[2]}}))}))},e.prototype.Hl=function(t){return Nb(this.persistence,new Db,t.Jl,this.Qt)},e.prototype.zl=function(t){var e=this.persistence.Ti.lr;return new mb(e,t._s)},e.prototype.jl=function(t){var e=Ib(t.yu.t,t.yu.persistenceKey),i=void 0!==this.cacheSizeBytes?$_.Ys(this.cacheSizeBytes):$_.ti;return new Rb(this.synchronizeTabs,e,t.clientId,i,t._s,wT(),_T(),this.Qt,this.Vl,!!this.forceOwnership)},e.prototype.Wl=function(t){return new pT},e}(jE),qE=function(t){function e(e,i){var n=this;return(n=t.call(this,e,i,!1)||this).Yl=e,n.cacheSizeBytes=i,n.synchronizeTabs=!0,n}return sf(e,t),e.prototype.initialize=function(e){return af(this,void 0,void 0,(function(){var i,n=this;return hf(this,(function(r){switch(r.label){case 0:return[4,t.prototype.initialize.call(this,e)];case 1:return r.sent(),i=this.Yl._a,this.Vl instanceof dT?(this.Vl._a={eu:NE.bind(null,i),nu:zE.bind(null,i),su:XE.bind(null,i),Uo:YE.bind(null,i),tu:FE.bind(null,i)},[4,this.Vl.start()]):[3,3];case 2:r.sent(),r.label=3;case 3:return[4,this.persistence.Ro((function(t){return af(n,void 0,void 0,(function(){return hf(this,(function(e){switch(e.label){case 0:return[4,BE(this.Yl._a,t)];case 1:return e.sent(),this.Gl&&(t&&!this.Gl.Er?this.Gl.start(this.bh):t||this.Gl.stop()),[2]}}))}))}))];case 4:return r.sent(),[2]}}))}))},e.prototype.Wl=function(t){var e=wT();if(!dT.Kn(e))throw new Sm(Em.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");var i=Ib(t.yu.t,t.yu.persistenceKey);return new dT(e,t._s,i,t.clientId,t.Jl)},e}(HE),KE=function(){function t(){}return t.prototype.initialize=function(t,e){return af(this,void 0,void 0,(function(){var i=this;return hf(this,(function(n){switch(n.label){case 0:return this.bh?[3,2]:(this.bh=t.bh,this.Vl=t.Vl,this.Sh=this.Xl(e),this.yl=this.Zl(e),this.gl=this.t_(e),this._a=this.e_(e,!t.synchronizeTabs),this.Vl.fa=function(t){return wE(i._a,t,1)},this.yl.Dh.n_=kE.bind(null,this._a),[4,JT(this.yl,this._a.Ml)]);case 1:n.sent(),n.label=2;case 2:return[2]}}
8036))}))},t.prototype.t_=function(t){return new iE},t.prototype.Xl=function(t){var e,i,n=bT(t.yu.t),r=(e=t.yu,new xT(e));return i=t.credentials,new CT(i,r,n)},t.prototype.Zl=function(t){var e,i,n,r,s,o=this;return e=this.bh,i=this.Sh,n=t._s,r=function(t){return wE(o._a,t,0)},s=gT.Kn()?new gT:new vT,new RT(e,i,n,r,s)},t.prototype.e_=function(t,e){return i=this.bh,n=this.yl,r=this.gl,s=this.Vl,o=t.Jl,a=t.pl,h=e,u=new pE(i,n,r,s,o,a),h&&(u.kl=!0),u;var i,n,r,s,o,a,h,u},t.prototype.terminate=function(){return function(t){return af(this,void 0,void 0,(function(){var e;return hf(this,(function(i){switch(i.label){case 0:return e=mm(t),cm("RemoteStore","RemoteStore shutting down."),e.Nh.add(5),[4,PT(e)];case 1:return i.sent(),e.Fh.ko(),e.Oh.set("Unknown"),[2]}}))}))}(this.yl)},t}(),ZE=function(){function t(t){this.observer=t,this.muted=!1}return t.prototype.next=function(t){this.observer.next&&this.s_(this.observer.next,t)},t.prototype.error=function(t){this.observer.error?this.s_(this.observer.error,t):console.error("Uncaught Error in snapshot listener:",t)},t.prototype.i_=function(){this.muted=!0},t.prototype.s_=function(t,e){var i=this;this.muted||setTimeout((function(){i.muted||t(e)}),0)},t}(),QE=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=0;i<t.length;++i)if(0===t[i].length)throw new Sm(Em.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this.f_=new Um(t)}return t.prototype.isEqual=function(t){return this.f_.isEqual(t.f_)},t}(),JE=function(t){this._methodName=t},$E=function(t){this.d_=t}; 8037/** 8038 * @license 8039 * Copyright 2020 Google LLC 8040 * 8041 * Licensed under the Apache License, Version 2.0 (the "License"); 8042 * you may not use this file except in compliance with the License. 8043 * You may obtain a copy of the License at 8044 * 8045 * http://www.apache.org/licenses/LICENSE-2.0 8046 * 8047 * Unless required by applicable law or agreed to in writing, software 8048 * distributed under the License is distributed on an "AS IS" BASIS, 8049 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8050 * See the License for the specific language governing permissions and 8051 * limitations under the License. 8052 */ 8053/** 8054 * @license 8055 * Copyright 2017 Google LLC 8056 * 8057 * Licensed under the Apache License, Version 2.0 (the "License"); 8058 * you may not use this file except in compliance with the License. 8059 * You may obtain a copy of the License at 8060 * 8061 * http://www.apache.org/licenses/LICENSE-2.0 8062 * 8063 * Unless required by applicable law or agreed to in writing, software 8064 * distributed under the License is distributed on an "AS IS" BASIS, 8065 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8066 * See the License for the specific language governing permissions and 8067 * limitations under the License. 8068 */ 8069/** 8070 * @license 8071 * Copyright 2020 Google LLC 8072 * 8073 * Licensed under the Apache License, Version 2.0 (the "License"); 8074 * you may not use this file except in compliance with the License. 8075 * You may obtain a copy of the License at 8076 * 8077 * http://www.apache.org/licenses/LICENSE-2.0 8078 * 8079 * Unless required by applicable law or agreed to in writing, software 8080 * distributed under the License is distributed on an "AS IS" BASIS, 8081 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8082 * See the License for the specific language governing permissions and 8083 * limitations under the License. 8084 */ 8085/** 8086 * @license 8087 * Copyright 2017 Google LLC 8088 * 8089 * Licensed under the Apache License, Version 2.0 (the "License"); 8090 * you may not use this file except in compliance with the License. 8091 * You may obtain a copy of the License at 8092 * 8093 * http://www.apache.org/licenses/LICENSE-2.0 8094 * 8095 * Unless required by applicable law or agreed to in writing, software 8096 * distributed under the License is distributed on an "AS IS" BASIS, 8097 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8098 * See the License for the specific language governing permissions and 8099 * limitations under the License. 8100 */ 8101function tS(t,e,i){if(!i)throw new Sm(Em.INVALID_ARGUMENT,"Function "+t+"() cannot be called with an empty "+e+".")}function eS(t,e){if(void 0===e)return{merge:!1};if(void 0!==e.mergeFields&&void 0!==e.merge)throw new Sm(Em.INVA
8101LID_ARGUMENT,"Invalid options passed to function "+t+'(): You cannot specify both "merge" and "mergeFields".');return e}function iS(t,e,i,n){if(!0===e&&!0===n)throw new Sm(Em.INVALID_ARGUMENT,t+" and "+i+" cannot be used together.")}function nS(t){if(!Vm.wt(t))throw new Sm(Em.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+t+" has "+t.length+".")}function rS(t){if(Vm.wt(t))throw new Sm(Em.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+t+" has "+t.length+".")}function sS(t){if(void 0===t)return"undefined";if(null===t)return"null";if("string"==typeof t)return t.length>20&&(t=t.substring(0,20)+"..."),JSON.stringify(t);if("number"==typeof t||"boolean"==typeof t)return""+t;if("object"==typeof t){if(t instanceof Array)return"an array";var e=function(t){if(t.constructor){var e=/function\s+([^\s(]+)\s*\(/.exec(t.constructor.toString());if(e&&e.length>1)return e[1]}return null}(t);return e?"a custom "+e+" object":"an object"}return"function"==typeof t?"a function":vm()}function oS(t,e){if("_delegate"in t&&(t=t.d_),!(t instanceof e)){if(e.name===t.constructor.name)throw new Sm(Em.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");var i=sS(t);throw new Sm(Em.INVALID_ARGUMENT,"Expected type '"+e.name+"', but it was: "+i)}return t}function aS(t,e){if(e<=0)throw new Sm(Em.INVALID_ARGUMENT,"Function "+t+"() requires a positive number, but it was: "+e+".")} 8102/** 8103 * @license 8104 * Copyright 2020 Google LLC 8105 * 8106 * Licensed under the Apache License, Version 2.0 (the "License"); 8107 * you may not use this file except in compliance with the License. 8108 * You may obtain a copy of the License at 8109 * 8110 * http://www.apache.org/licenses/LICENSE-2.0 8111 * 8112 * Unless required by applicable law or agreed to in writing, software 8113 * distributed under the License is distributed on an "AS IS" BASIS, 8114 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8115 * See the License for the specific language governing permissions and 8116 * limitations under the License. 8117 */var hS=function(){function t(t){var e;if(void 0===t.host){if(void 0!==t.ssl)throw new Sm(Em.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=t.host,this.ssl=null===(e=t.ssl)||void 0===e||e;if(this.credentials=t.credentials,this.ignoreUndefinedProperties=!!t.ignoreUndefinedProperties,void 0===t.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==t.cacheSizeBytes&&t.cacheSizeBytes<1048576)throw new Sm(Em.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,iS("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling)}return t.prototype.isEqual=function(t){return this.host===t.host&&this.ssl===t.ssl&&this.credentials===t.credentials&&this.cacheSizeBytes===t.cacheSizeBytes&&this.experimentalForceLongPolling===t.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===t.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===t.ignoreUndefinedProperties},t}(),uS=new Map,lS=function(){function t(t,e){this.w_="(lite)",this.E_=new hS({}),this.T_=!1,t instanceof hm?(this.I_=t,this.m_=new Rm):(this.A_=t,this.I_=function(t){if(!Object.prototype.hasOwnProperty.apply(t.options,["projectId"]))throw new Sm(Em.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new hm(t.options.projectId)}(t),this.m_=new Mm(e))}return Object.defineProperty(t.prototype,"app",{get:function(){if(!this.A_)throw new Sm(Em.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this.A_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"R_",{get:function(){return this.T_}
8117,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"P_",{get:function(){return void 0!==this.y_},enumerable:!1,configurable:!0}),t.prototype.g_=function(t){if(this.T_)throw new Sm(Em.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this.E_=new hS(t),void 0!==t.credentials&&(this.m_=function(t){if(!t)return new Rm;switch(t.type){case"gapi":var e=t.client;return gm(!("object"!=typeof e||null===e||!e.auth||!e.auth.getAuthHeaderValueForFirstParty)),new Im(e,t.sessionIndex||"0");case"provider":return t.client;default:throw new Sm(Em.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(t.credentials))},t.prototype.V_=function(){return this.E_},t.prototype.p_=function(){return this.T_=!0,this.E_},t.prototype._delete=function(){return this.y_||(this.y_=this.b_()),this.y_},t.prototype.toJSON=function(){return{app:this.A_,t:this.I_,settings:this.E_}},t.prototype.b_=function(){return this,(t=uS.get(this))&&(cm("ComponentProvider","Removing Datastore"),uS.delete(this),t.terminate()),Promise.resolve();var t},t}(),cS=function(){function t(t,e,i){this.v_=e,this.S_=i,this.type="document",this.firestore=t}return Object.defineProperty(t.prototype,"D_",{get:function(){return this.S_.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this.S_.path.tt()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this.S_.path.rt()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return new dS(this.firestore,this.v_,this.S_.path.X())},enumerable:!1,configurable:!0}),t.prototype.withConverter=function(e){return new t(this.firestore,e,this.S_)},t}(),fS=function(){function t(t,e,i){this.v_=e,this.C_=i,this.type="query",this.firestore=t}return t.prototype.withConverter=function(e){return new t(this.firestore,e,this.C_)},t}(),dS=function(t){function e(e,i,n){var r=this;return(r=t.call(this,e,i,Xy(n))||this).firestore=e,r.D_=n,r.type="collection",r}return sf(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.C_.path.tt()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.C_.path.rt()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this.D_.X();return t.et()?null:new cS(this.firestore,null,new Vm(t))},enumerable:!1,configurable:!0}),e.prototype.withConverter=function(t){return new e(this.firestore,t,this.D_)},e}(fS); 8118/** 8119 * @license 8120 * Copyright 2020 Google LLC 8121 * 8122 * Licensed under the Apache License, Version 2.0 (the "License"); 8123 * you may not use this file except in compliance with the License. 8124 * You may obtain a copy of the License at 8125 * 8126 * http://www.apache.org/licenses/LICENSE-2.0 8127 * 8128 * Unless required by applicable law or agreed to in writing, software 8129 * distributed under the License is distributed on an "AS IS" BASIS, 8130 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8131 * See the License for the specific language governing permissions and 8132 * limitations under the License. 8133 */function pS(t,e){for(var i,n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(t instanceof $E&&(t=t.d_),tS("collection","path",e),t instanceof lS)return rS(i=Nm.ot.apply(Nm,cf([e],n))),new dS(t,null,i);if(!(t instanceof cS||t instanceof dS))throw new Sm(Em.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");return rS(i=Nm.ot.apply(Nm,cf([t.path],n)).child(Nm.ot(e))),new dS(t.firestore,null,i)}function vS(t,e){for(var i,n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(t instanceof $E&&(t=t.d_),1===arguments.length&&(e=xm.u()),tS("doc","path",e),t instanceof lS)return nS(i=Nm.ot.apply(Nm,cf([e],n))),new cS(t,null,new Vm(i));if(!(t instanceof cS||t instanceof dS))throw new Sm(Em.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");return nS(i=t.D_.child(Nm.ot.apply(Nm,cf([e],n)))),new cS(t.firestore,t instanceof dS?t.v_:null,new Vm(i))}function gS(t,e){return t instanceof $E&&(t=t.d_),e instanceof $E&&(e=e.d_),(t instanceof cS||t instanceof dS)&&(e instanceof cS||e instanceof dS)&&t.firestore===e.firestore&&t.path===e.path&&t.v_===e.v_}function mS(t,e){return t instanceof $E&&(t=t.d_),e instanceof $E&&(e=e.d_),t instanceof fS&&e instanceof fS&&t.firestore===e.firestore&&Jy(t.C_,e.C_)&&t.v_===e.v_}var yS=function(){function t(t,e){if(!isFinite(t)||t<-90||t>
813390)throw new Sm(Em.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(e)||e<-180||e>180)throw new Sm(Em.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+e);this.x_=t,this.N_=e}return Object.defineProperty(t.prototype,"latitude",{get:function(){return this.x_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"longitude",{get:function(){return this.N_},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){return this.x_===t.x_&&this.N_===t.N_},t.prototype.toJSON=function(){return{latitude:this.x_,longitude:this.N_}},t.prototype.U=function(t){return wm(this.x_,t.x_)||wm(this.N_,t.N_)},t}(),xS=/^__.*__$/,wS=function(){function t(t,e,i){this.data=t,this.Gt=e,this.fieldTransforms=i}return t.prototype.F_=function(t,e){return null!==this.Gt?new Px(t,this.data,this.Gt,e,this.fieldTransforms):new Mx(t,this.data,e,this.fieldTransforms)},t}(),_S=function(){function t(t,e,i){this.data=t,this.Gt=e,this.fieldTransforms=i}return t.prototype.F_=function(t,e){return new Px(t,this.data,this.Gt,e,this.fieldTransforms)},t}(); 8134/** 8135 * @license 8136 * Copyright 2017 Google LLC 8137 * 8138 * Licensed under the Apache License, Version 2.0 (the "License"); 8139 * you may not use this file except in compliance with the License. 8140 * You may obtain a copy of the License at 8141 * 8142 * http://www.apache.org/licenses/LICENSE-2.0 8143 * 8144 * Unless required by applicable law or agreed to in writing, software 8145 * distributed under the License is distributed on an "AS IS" BASIS, 8146 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8147 * See the License for the specific language governing permissions and 8148 * limitations under the License. 8149 */function bS(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw vm()}}var TS=function(){function t(t,e,i,n,r,s){this.settings=t,this.t=e,this.Qt=i,this.ignoreUndefinedProperties=n,void 0===r&&this.O_(),this.fieldTransforms=r||[],this.Gt=s||[]}return Object.defineProperty(t.prototype,"path",{get:function(){return this.settings.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"k_",{get:function(){return this.settings.k_},enumerable:!1,configurable:!0}),t.prototype.M_=function(e){return new t(Object.assign(Object.assign({},this.settings),e),this.t,this.Qt,this.ignoreUndefinedProperties,this.fieldTransforms,this.Gt)},t.prototype.L_=function(t){var e,i=null===(e=this.path)||void 0===e?void 0:e.child(t),n=this.M_({path:i,B_:!1});return n.q_(t),n},t.prototype.U_=function(t){var e,i=null===(e=this.path)||void 0===e?void 0:e.child(t),n=this.M_({path:i,B_:!1});return n.O_(),n},t.prototype.Q_=function(t){return this.M_({path:void 0,B_:!0})},t.prototype.K_=function(t){return XS(t,this.settings.methodName,this.settings.W_||!1,this.path,this.settings.j_)},t.prototype.contains=function(t){return void 0!==this.Gt.find((function(e){return t.nt(e)}))||void 0!==this.fieldTransforms.find((function(e){return t.nt(e.field)}))},t.prototype.O_=function(){if(this.path)for(var t=0;t<this.path.length;t++)this.q_(this.path.get(t))},t.prototype.q_=function(t){if(0===t.length)throw this.K_("Document fields must not be empty");if(bS(this.k_)&&xS.test(t))throw this.K_('Document fields cannot begin and end with "__"')},t}(),ES=function(){function t(t,e,i){this.t=t,this.ignoreUndefinedProperties=e,this.Qt=i||bT(t)}return t.prototype.G_=function(t,e,i,n){return void 0===n&&(n=!1),new TS({k_:t,methodName:e,j_:i,path:Um.ct(),B_:!1,W_:n},this.t,this.Qt,this.ignoreUndefinedProperties)},t}();function SS(t){var e=t.p_(),i=bT(t.I_);return new ES(t.I_,!!e.ignoreUndefinedProperties,i)}function AS(t,e,i,n,r,s){void 0===s&&(s={});var o=t.G_(s.merge||s.mergeFields?2:0,e,i,r);US("Data must be an object, but it was:",o,n);var a,h,u=NS(n,o);if(s.merge)a=new Gm(o.Gt),h=o.fieldTransforms;else if(s.mergeFields){for(var l=[],c=0,f=s.mergeFields;c<f.length;c++){var d=VS(e,f[c],i);if(!o.contains(d))throw new Sm(Em.INVALID_ARGUMENT,"Field '"+d+"' is specified in your field mask but missing from your input data.");GS(l,d)||l.push(d)}a=new Gm(l),h=o.fieldTransforms.filter((function(t){return a.Tt(t.field)}))}else a=null,h=o.fieldTransforms;return new wS(new py(u),a,h)}var CS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return sf(e,t),e.prototype.z_=function(t){if(2!==t.k_)throw 1===t.k_?t.K_(this._methodName+"() can only appear at the top level of your update data"):t.K_(this._methodName+"() cannot be used with set() unless you pass {merge:true}");return t.Gt.push(t.path),null},e.prototype.isEqual=function(t){return t instanceof e},e}(JE);function OS(t,e,i){return new TS({k_:3,j_:e.settings.j_,methodName:t._methodName,B_:i},e.t,e.Qt,e.ignoreUndefinedProperties)}var RS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return sf(e,t),e.prototype.z_=function(t){return new wx(t.path,new fx)},e.prototype.isEqual=function(t){return t instanceof e},e}(JE),MS=function(t){function e(e,i){var n=this;return(n=t.call(this,e)||this).H_=i,n}return sf(e,t),e.prototype.z_=function(t){var e=OS(this,t,!0),i=this.H_.map((function(t){return FS(t,e)})),n=new dx(i);return new wx(t.path,n)},e.prototype.isEqual=function(t){return this===t},e}(JE),PS=function(t){function e(e,i){var n=this;return(n=t.call(this,e)||this).H_=i,n}return sf(e,t),e.prototype.z_=function(t){var e=OS(this,t,!0),i=this.H_.map((function(t){return FS(t,e)})),n=new vx(i);return new wx(t.path,n)},e.prototype.isEqual=function(t){return this===t},e}(JE),IS=function(t){function e(e,i){var n=this;return(n=t.call(this,e)||this).J_=i,n}return sf(e,t),e.prototype.z_=function(t){var e=new mx(t.Qt,ax(t.Qt,this.J_));return new wx(t.path,e)},e.prototype.isEqual=function(t){return this===t},e}(JE);
8149function kS(t,e,i,n){var r=t.G_(1,e,i);US("Data must be an object, but it was:",r,n);var s=[],o=new vy;zm(n,(function(t,n){var a=zS(e,t,i);n instanceof $E&&(n=n.d_);var h=r.U_(a);if(n instanceof CS)s.push(a);else{var u=FS(n,h);null!=u&&(s.push(a),o.set(a,u))}}));var a=new Gm(s);return new _S(o.Pt(),a,r.fieldTransforms)}function LS(t,e,i,n,r,s){var o=t.G_(1,e,i),a=[VS(e,n,i)],h=[r];if(s.length%2!=0)throw new Sm(Em.INVALID_ARGUMENT,"Function "+e+"() needs to be called with an even number of arguments that alternate between field names and values.");for(var u=0;u<s.length;u+=2)a.push(VS(e,s[u])),h.push(s[u+1]);for(var l=[],c=new vy,f=a.length-1;f>=0;--f)if(!GS(l,a[f])){var d=a[f],p=h[f];p instanceof $E&&(p=p.d_);var v=o.U_(d);if(p instanceof CS)l.push(d);else{var g=FS(p,v);null!=g&&(l.push(d),c.set(d,g))}}var m=new Gm(l);return new _S(c.Pt(),m,o.fieldTransforms)}function DS(t,e,i,n){return void 0===n&&(n=!1),FS(i,t.G_(n?4:3,e))}function FS(t,e){if(t instanceof $E&&(t=t.d_),BS(t))return US("Unsupported field value:",e,t),NS(t,e);if(t instanceof JE)return function(t,e){if(!bS(e.k_))throw e.K_(t._methodName+"() can only be used with update() and set()");if(!e.path)throw e.K_(t._methodName+"() is not currently supported inside arrays");var i=t.z_(e);i&&e.fieldTransforms.push(i)}(t,e),null;if(void 0===t&&e.ignoreUndefinedProperties)return null;if(e.path&&e.Gt.push(e.path),t instanceof Array){if(e.settings.B_&&4!==e.k_)throw e.K_("Nested arrays are not supported");return function(t,e){for(var i=[],n=0,r=0,s=t;r<s.length;r++){var o=FS(s[r],e.Q_(n));null==o&&(o={nullValue:"NULL_VALUE"}),i.push(o),n++}return{arrayValue:{values:i}}}(t,e)}return function(t,e){if(t instanceof $E&&(t=t.d_),null===t)return{nullValue:"NULL_VALUE"};if("number"==typeof t)return ax(e.Qt,t);if("boolean"==typeof t)return{booleanValue:t};if("string"==typeof t)return{stringValue:t};if(t instanceof Date){var i=Lm.fromDate(t);return{timestampValue:xw(e.Qt,i)}}if(t instanceof Lm)return i=new Lm(t.seconds,1e3*Math.floor(t.nanoseconds/1e3)),{timestampValue:xw(e.Qt,i)};if(t instanceof yS)return{geoPointValue:{latitude:t.latitude,longitude:t.longitude}};if(t instanceof Am)return{bytesValue:ww(e.Qt,t.I)};if(t instanceof cS){i=e.t;var n=t.firestore.I_;if(!n.isEqual(i))throw e.K_("Document reference is for database "+n.projectId+"/"+n.database+" but should be for database "+i.projectId+"/"+i.database);return{referenceValue:Tw(t.firestore.I_||e.t,t.S_.path)}}throw e.K_("Unsupported field value: "+sS(t))}(t,e)}function NS(t,e){var i={};return Xm(t)?e.path&&e.path.length>0&&e.Gt.push(e.path):zm(t,(function(t,n){var r=FS(n,e.L_(t));null!=r&&(i[t]=r)})),{mapValue:{fields:i}}}function BS(t){return!("object"!=typeof t||null===t||t instanceof Array||t instanceof Date||t instanceof Lm||t instanceof yS||t instanceof Am||t instanceof cS||t instanceof JE)}function US(t,e,i){if(!BS(i)||("object"!=typeof(r=i)||null===r||Object.getPrototypeOf(r)!==Object.prototype&&null!==Object.getPrototypeOf(r))){var n=sS(i);throw"an object"===n?e.K_(t+" a custom object"):e.K_(t+" "+n)}var r}function VS(t,e,i){if(e instanceof $E&&(e=e.d_),e instanceof QE)return e.f_;if("string"==typeof e)return zS(t,e);throw XS("Field path arguments must be of type string or FieldPath.",t,!1,void 0,i)}var YS=new RegExp("[~\\*/\\[\\]]");function zS(t,e,i){if(e.search(YS)>=0)throw XS("Invalid field path ("+e+"). Paths must not contain '~', '*', '/', '[', or ']'",t,!1,void 0,i);try{return(new(QE.bind.apply(QE,cf([void 0],e.split("."))))).f_}catch(n){throw XS("Invalid field path ("+e+"). Paths must not be empty, begin with '.', end with '.', or contain '..'",t,!1,void 0,i)}}function XS(t,e,i,n,r){var s=n&&!n.et(),o=void 0!==r,a="Function "+e+"() called with invalid data";i&&(a+=" (via `toFirestore()`)");var h="";return(s||o)&&(h+=" (found",s&&(h+=" in field "+n),o&&(h+=" in document "+r),h+=")"),new Sm(Em.INVALID_ARGUMENT,(a+=". ")+t+h)}function GS(t,e){return t.some((function(t){return t.isEqual(e)}))} 8150/** 8151 * @license 8152 * Copyright 2017 Google LLC 8153 * 8154 * Licensed under the Apache License, Version 2.0 (the "License");
8155 * you may not use this file except in compliance with the License. 8156 * You may obtain a copy of the License at 8157 * 8158 * http://www.apache.org/licenses/LICENSE-2.0 8159 * 8160 * Unless required by applicable law or agreed to in writing, software 8161 * distributed under the License is distributed on an "AS IS" BASIS, 8162 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8163 * See the License for the specific language governing permissions and 8164 * limitations under the License. 8165 */var WS=function(){function t(t){this.Sh=t,this.Y_=new Map,this.mutations=[],this.X_=!1,this.Z_=null,this.tf=new Set}return t.prototype.ef=function(t){return af(this,void 0,void 0,(function(){var e,i=this;return hf(this,(function(n){switch(n.label){case 0:if(this.nf(),this.mutations.length>0)throw new Sm(Em.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");return[4,function(t,e){return af(this,void 0,void 0,(function(){var i,n,r,s,o,a;return hf(this,(function(h){switch(h.label){case 0:return i=mm(t),n=Rw(i.Qt)+"/documents",r={documents:e.map((function(t){return Sw(i.Qt,t)}))},[4,i.Du("BatchGetDocuments",n,r)];
8165case 1:return s=h.sent(),o=new Map,s.forEach((function(t){var e,n,r=(e=i.Qt,"found"in(n=t)?function(t,e){gm(!!e.found),e.found.name,e.found.updateTime;var i=Aw(t,e.found.name),n=bw(e.found.updateTime),r=new py({mapValue:{fields:e.found.fields}});return new yy(i,n,r,{})}(e,n):"missing"in n?function(t,e){gm(!!e.missing),gm(!!e.readTime);var i=Aw(t,e.missing),n=bw(e.readTime);return new xy(i,n)}(e,n):vm());o.set(r.key.toString(),r)})),a=[],[2,(e.forEach((function(t){var e=o.get(t.toString());gm(!!e),a.push(e)})),a)]}}))}))}(this.Sh,t)];case 1:return[2,((e=n.sent()).forEach((function(t){t instanceof xy||t instanceof yy?i.sf(t):vm()})),e)]}}))}))},t.prototype.set=function(t,e){this.write(e.F_(t,this.jt(t))),this.tf.add(t.toString())},t.prototype.update=function(t,e){try{this.write(e.F_(t,this.rf(t)))}catch(i){this.Z_=i}this.tf.add(t.toString())},t.prototype.delete=function(t){this.write(new Bx(t,this.jt(t))),this.tf.add(t.toString())},t.prototype.commit=function(){return af(this,void 0,void 0,(function(){var t,e=this;return hf(this,(function(i){switch(i.label){case 0:if(this.nf(),this.Z_)throw this.Z_;return t=this.Y_,this.mutations.forEach((function(e){t.delete(e.key.toString())})),t.forEach((function(t,i){var n=Vm._t(i);e.mutations.push(new Ux(n,e.jt(n)))})),[4,function(t,e){return af(this,void 0,void 0,(function(){var i,n,r;return hf(this,(function(s){switch(s.label){case 0:return i=mm(t),n=Rw(i.Qt)+"/documents",r={writes:e.map((function(t){return Iw(i.Qt,t)}))},[4,i.pu("Commit",n,r)];case 1:return s.sent(),[2]}}))}))}(this.Sh,this.mutations)];case 1:return i.sent(),this.X_=!0,[2]}}))}))},t.prototype.sf=function(t){var e;if(t instanceof yy)e=t.version;else{if(!(t instanceof xy))throw vm();e=Dm.min()}var i=this.Y_.get(t.key.toString());if(i){if(!e.isEqual(i))throw new Sm(Em.ABORTED,"Document version changed between two reads.")}else this.Y_.set(t.key.toString(),e)},t.prototype.jt=function(t){var e=this.Y_.get(t.toString());return!this.tf.has(t.toString())&&e?bx.updateTime(e):bx.Kt()},t.prototype.rf=function(t){var e=this.Y_.get(t.toString());if(!this.tf.has(t.toString())&&e){if(e.isEqual(Dm.min()))throw new Sm(Em.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return bx.updateTime(e)}return bx.exists(!0)},t.prototype.write=function(t){this.nf(),this.mutations.push(t)},t.prototype.nf=function(){},t}(),jS=function(){function t(t,e,i,n){this._s=t,this.Sh=e,this.updateFunction=i,this.Es=n,this.cf=5,this.Gu=new TT(this._s,"transaction_retry")}return t.prototype.run=function(){this.af()},t.prototype.af=function(){var t=this;this.Gu.Lu((function(){return af(t,void 0,void 0,(function(){var t,e,i=this;return hf(this,(function(n){return t=new WS(this.Sh),(e=this.uf(t))&&e.then((function(e){i._s.Ps((function(){return t.commit().then((function(){i.Es.resolve(e)})).catch((function(t){i.hf(t)}))}))})).catch((function(t){i.hf(t)})),[2]}))}))}))},t.prototype.uf=function(t){try{var e=this.updateFunction(t);return!Jm(e)&&e.catch&&e.then?e:(this.Es.reject(Error("Transaction callback must return a Promise")),null)}catch(i){return this.Es.reject(i),null}},t.prototype.hf=function(t){var e=this;this.cf>0&&this.lf(t)?(this.cf-=1,this._s.Ps((function(){return e.af(),Promise.resolve()}))):this.Es.reject(t)},t.prototype.lf=function(t){if("FirebaseError"===t.name){var e=t.code;return"aborted"===e||"failed-precondition"===e||!Yx(e)}return!1},t}(),HS=function(){function t(t,e,i){var n=this;this.credentials=t,this._s=e,this.yu=i,this.user=Cm.UNAUTHENTICATED,this.clientId=xm.u(),this._f=function(){},this.C=new qw,this.credentials.v((function(t){cm("FirestoreClient","Received user=",t.uid),n.user=t,n._f(t),n.C.resolve()}))}return t.prototype.getConfiguration=function(){return af(this,void 0,void 0,(function(){return hf(this,(function(t){switch(t.label){case 0:return[4,this.C.promise];case 1:return[2,(t.sent(),{_s:this._s,yu:this.yu,clientId:this.clientId,credentials:this.credentials,Jl:this.user,pl:100})]}}))}))},t.prototype.ff=function(t){var e=this;this._f=t,this.C.promise.then((function(){return e._f(e.user)}))},t.prototype.df=function(){if(this._s.wf)throw new Sm(Em.FAILED_PRECONDITION,"The client has already been terminated.")},t.prototype.terminate=function(){var t=this;this._s.Ef();var e=new qw;return this._s.Tf((function(){return af(t,void 0,void 0,(function(){var t,i;return hf(this,(function(n){switch(n.label){case 0:return n.trys.push([0,5,,6]),this.If?[4,this.If.terminate()]:[3,2];case 1:n.sent(),n.label=2;case 2:return this.mf?[4,this.mf.terminate()]:[3,4];case 3:n.sent(),n.label=4;case 4:return this.credentials.S(),e.resolve(),[3,6];case 5:return t=n.sent(),i=o_(t,"Failed to shutdown persistence"),e.reject(i),[3,6];case 6:return[2]}}
8165))}))})),e.promise},t}(); 8166/** 8167 * @license 8168 * Copyright 2019 Google LLC 8169 * 8170 * Licensed under the Apache License, Version 2.0 (the "License"); 8171 * you may not use this file except in compliance with the License. 8172 * You may obtain a copy of the License at 8173 * 8174 * http://www.apache.org/licenses/LICENSE-2.0 8175 * 8176 * Unless required by applicable law or agreed to in writing, software 8177 * distributed under the License is distributed on an "AS IS" BASIS, 8178 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8179 * See the License for the specific language governing permissions and 8180 * limitations under the License. 8181 */function qS(t,e){return af(this,void 0,void 0,(function(){var i,n,r=this;return hf(this,(function(s){switch(s.label){case 0:return t._s.Af(),cm("FirestoreClient","Initializing OfflineComponentProvider"),[4,t.getConfiguration()];case 1:return i=s.sent(),[4,e.initialize(i)];case 2:return s.sent(),n=i.Jl,t.ff((function(i){n.isEqual(i)||(n=i,t._s.po((function(){return af(r,void 0,void 0,(function(){return hf(this,(function(t){switch(t.label){case 0:return[4,Bb(e.bh,i)];case 1:return t.sent(),[2]}}))}))})))})),e.persistence.Po((function(){return t.terminate()})),t.mf=e,[2]}}))}))}function KS(t,e){return af(this,void 0,void 0,(function(){var i,n;return hf(this,(function(r){switch(r.label){case 0:return t._s.Af(),[4,ZS(t)];case 1:return i=r.sent(),cm("FirestoreClient","Initializing OnlineComponentProvider"),[4,t.getConfiguration()];case 2:return n=r.sent(),[4,e.initialize(i,n)];case 3:return r.sent(),t.ff((function(i){return t._s.po((function(){return function(t,e){return af(this,void 0,void 0,(function(){var i,n;return hf(this,(function(r){switch(r.label){case 0:return(i=mm(t))._s.Af(),cm("RemoteStore","RemoteStore received new credentials"),n=BT(i),i.Nh.add(3),[4,PT(i)];case 1:return r.sent(),n&&i.Oh.set("Unknown"),[4,i.Dh.n_(e)];case 2:return r.sent(),i.Nh.delete(3),[4,MT(i)];case 3:return r.sent(),[2]}}))}))}(e.yl,i)}))})),t.If=e,[2]}}))}))}function ZS(t){return af(this,void 0,void 0,(function(){return hf(this,(function(e){switch(e.label){case 0:return t.mf?[3,2]:(cm("FirestoreClient","Using default OfflineComponentProvider"),[4,qS(t,new jE)]);case 1:e.sent(),e.label=2;case 2:return[2,t.mf]}}))}))}function QS(t){return af(this,void 0,void 0,(function(){return hf(this,(function(e){switch(e.label){case 0:return t.If?[3,2]:(cm("FirestoreClient","Using default OnlineComponentProvider"),[4,KS(t,new KE)]);case 1:e.sent(),e.label=2;case 2:return[2,t.If]}}))}))}function JS(t){return ZS(t).then((function(t){return t.persistence}))}function $S(t){return ZS(t).then((function(t){return t.bh}))}function tA(t){return QS(t).then((function(t){return t.yl}))}function eA(t){return QS(t).then((function(t){return t._a}))}function iA(t){return af(this,void 0,void 0,(function(){var e,i;return hf(this,(function(n){switch(n.label){case 0:return[4,QS(t)];case 1:return e=n.sent(),[2,((i=e.gl).jh=vE.bind(null,e._a),i.Hh=mE.bind(null,e._a),i)]}}))}))}function nA(t,e,i){var n=this;void 0===i&&(i={});var r=new qw;return t._s.Ps((function(){return af(n,void 0,void 0,(function(){var n;return hf(this,(function(s){switch(s.label){case 0:return n=function(t,e,i,n,r){var s=new ZE({next:function(s){e.Ps((function(){return rE(t,o)}));var a=s.docs.has(i);!a&&s.fromCache?r.reject(new Sm(Em.UNAVAILABLE,"Failed to get document because the client is offline.")):a&&s.fromCache&&n&&"server"===n.source?r.reject(new Sm(Em.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):r.resolve(s)},error:function(t){return r.reject(t)}}),o=new hE(Xy(i.path),s,{includeMetadataChanges:!0,nl:!0});return nE(t,o)},[4,iA(t)];case 1:return[2,n.apply(void 0,[s.sent(),t._s,e,i,r])]}}))}))})),r.promise}function rA(t,e,i){var n=this;void 0===i&&(i={});var r=new qw;return t._s.Ps((function(){return af(n,void 0,void 0,(function(){var n;return hf(this,(function(s){switch(s.label){case 0:return n=function(t,e,i,n,r){var s=new ZE({next:function(i){e.Ps((function(){return rE(t,o)})),i.fromCache&&"server"===n.source?r.reject(new Sm(Em.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):r.resolve(i)},error:function(t){return r.reject(t)}}),o=new hE(i,s,{includeMetadataChanges:!0,nl:!0});return nE(t,o)},[4,iA(t)];case 1:return[2,n.apply(void 0,[s.sent(),t._s,e,i,r])]}}))}))})),r.promise}var sA=function(){function t(){var t=this;this.Rf=Promise.resolve(),this.Pf=[],this.yf=!1,this.gf=[],this.Vf=null,this.pf=!1,this.bf=[],this.Gu=new TT(this,"async_queue_retry"),this.vf=function(){var e=_T();e&&cm("AsyncQueue","Visibility state changed to "+e.visibilityState),t.Gu.qu()};var e=_T();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this.vf)}return Object.defineProperty(t.prototype,"wf",{get:function(){return this.yf}
8181,enumerable:!1,configurable:!0}),t.prototype.Ps=function(t){this.enqueue(t)},t.prototype.Tf=function(t){this.Sf(),this.Df(t)},t.prototype.Ef=function(){if(!this.yf){this.yf=!0;var t=_T();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.vf)}},t.prototype.enqueue=function(t){return this.Sf(),this.yf?new Promise((function(t){})):this.Df(t)},t.prototype.po=function(t){var e=this;this.Ps((function(){return e.Pf.push(t),e.Cf()}))},t.prototype.Cf=function(){return af(this,void 0,void 0,(function(){var t,e=this;return hf(this,(function(i){switch(i.label){case 0:if(0===this.Pf.length)return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.Pf[0]()];case 2:return i.sent(),this.Pf.shift(),this.Gu.reset(),[3,4];case 3:if(!t_(t=i.sent()))throw t;return cm("AsyncQueue","Operation failed with retryable error: "+t),[3,4];case 4:this.Pf.length>0&&this.Gu.Lu((function(){return e.Cf()})),i.label=5;case 5:return[2]}}))}))},t.prototype.Df=function(t){var e=this,i=this.Rf.then((function(){return e.pf=!0,t().catch((function(t){throw e.Vf=t,e.pf=!1,fm("INTERNAL UNHANDLED ERROR: ",(n=(i=t).message||"",i.stack&&(n=i.stack.includes(i.message)?i.stack:i.message+"\n"+i.stack),n)),t;var i,n})).then((function(t){return e.pf=!1,t}))}));return this.Rf=i,i},t.prototype.Tr=function(t,e,i){var n=this;this.Sf(),this.bf.indexOf(t)>-1&&(e=0);var r=s_.Ts(this,t,e,i,(function(t){return n.xf(t)}));return this.gf.push(r),r},t.prototype.Sf=function(){this.Vf&&vm()},t.prototype.Af=function(){},t.prototype.Nf=function(){return af(this,void 0,void 0,(function(){var t;return hf(this,(function(e){switch(e.label){case 0:return[4,t=this.Rf];case 1:e.sent(),e.label=2;case 2:if(t!==this.Rf)return[3,0];e.label=3;case 3:return[2]}}
8181))}))},t.prototype.$f=function(t){for(var e=0,i=this.gf;e<i.length;e++)if(i[e].fs===t)return!0;return!1},t.prototype.Ff=function(t){var e=this;return this.Nf().then((function(){e.gf.sort((function(t,e){return t.ds-e.ds}));for(var i=0,n=e.gf;i<n.length;i++){var r=n[i];if(r.Rs(),"all"!==t&&r.fs===t)break}return e.Nf()}))},t.prototype.Of=function(t){this.bf.push(t)},t.prototype.xf=function(t){var e=this.gf.indexOf(t);this.gf.splice(e,1)},t}();function oA(t){return function(t,e){if("object"!=typeof t||null===t)return!1;for(var i=t,n=0,r=["next","error","complete"];n<r.length;n++){var s=r[n];if(s in i&&"function"==typeof i[s])return!0}return!1}(t)}var aA=function(t){function e(e,i){var n=this;return(n=t.call(this,e,i)||this).Bf=new sA,n.w_="name"in e?e.name:"[DEFAULT]",n}return sf(e,t),e.prototype.b_=function(){return this.qf||uA(this),this.qf.terminate()},e}(lS); 8182/** 8183 * @license 8184 * Copyright 2020 Google LLC 8185 * 8186 * Licensed under the Apache License, Version 2.0 (the "License"); 8187 * you may not use this file except in compliance with the License. 8188 * You may obtain a copy of the License at 8189 * 8190 * http://www.apache.org/licenses/LICENSE-2.0 8191 * 8192 * Unless required by applicable law or agreed to in writing, software 8193 * distributed under the License is distributed on an "AS IS" BASIS, 8194 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8195 * See the License for the specific language governing permissions and 8196 * limitations under the License. 8197 */function hA(t){return t.qf||uA(t),t.qf.df(),t.qf}function uA(t){var e,i,n,r=t.p_(),s=(e=t.I_,i=t.w_,new am(e,i,(n=r).host,n.ssl,n.experimentalForceLongPolling,n.experimentalAutoDetectLongPolling));t.qf=new HS(t.m_,t.Bf,s)}function lA(t,e,i){var n=this,r=new qw;return t._s.enqueue((function(){return af(n,void 0,void 0,(function(){var n;return hf(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),[4,qS(t,i)];case 1:return s.sent(),[4,KS(t,e)];case 2:return s.sent(),r.resolve(),[3,4];case 3:if(!("FirebaseError"===(o=n=s.sent()).name?o.code===Em.FAILED_PRECONDITION||o.code===Em.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&o instanceof DOMException)||22===o.code||20===o.code||11===o.code))throw n;return console.warn("Error enabling offline persistence. Falling back to persistence disabled: "+n),r.reject(n),[3,4];case 4:return[2]}var o}))}))})).then((function(){return r.promise}))}function cA(t){if(t.R_||t.P_)throw new Sm(Em.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.")} 8198/** 8199 * @license 8200 * Copyright 2020 Google LLC 8201 * 8202 * Licensed under the Apache License, Version 2.0 (the "License"); 8203 * you may not use this file except in compliance with the License. 8204 * You may obtain a copy of the License at 8205 * 8206 * http://www.apache.org/licenses/LICENSE-2.0 8207 * 8208 * Unless required by applicable law or agreed to in writing, software 8209 * distributed under the License is distributed on an "AS IS" BASIS, 8210 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8211 * See the License for the specific language governing permissions and 8212 * limitations under the License. 8213 */var fA=function(){function t(){}return t.prototype.Uf=function(t,e){switch(void 0===e&&(e="none"),ey(t)){case 0:return null;case 1:return t.booleanValue;case 2:return Hm(t.integerValue||t.doubleValue);case 3:return this.Qf(t.timestampValue);case 4:return this.Kf(t,e);case 5:return t.stringValue;case 6:return this.Wf(qm(t.bytesValue));case 7:return this.jf(t.referenceValue);case 8:return this.Gf(t.geoPointValue);case 9:return this.zf(t.arrayValue,e);case 10:return this.Hf(t.mapValue,e);default:throw vm()}},t.prototype.Hf=function(t,e){var i=this,n={};return zm(t.fields||{},(function(t,r){n[t]=i.Uf(r,e)})),n},t.prototype.Gf=function(t){return new yS(Hm(t.latitude),Hm(t.longitude))},t.prototype.zf=function(t,e){var i=this;return(t.values||[]).map((function(t){return i.Uf(t,e)}))},t.prototype.Kf=function(t,e){switch(e){case"previous":var i=Zm(t);return null==i?null:this.Uf(i,e);case"estimate":return this.Qf(Qm(t));default:return null}},t.prototype.Qf=function(t){var e=jm(t);return new Lm(e.seconds,e.nanos)},t.prototype.Jf=function(t,e){var i=Nm.ot(t);gm(Hw(i));var n=new hm(i.get(1),i.get(3)),r=new Vm(i.Y(5));return n.isEqual(e)||fm("Document "+r+" contains a document reference within a different database ("+n.projectId+"/"+n.database+") which is not supported. It will be treated as a reference in the current database ("+e.projectId+"/"+e.database+") instead."),r},t}(),dA=function(){function t(t,e,i,n,r){this.Yf=t,this.Xf=e,this.S_=i,this.Zf=n,this.v_=r}return Object.defineProperty(t.prototype,"id",{get:function(){return this.S_.path.tt()}
8213,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ref",{get:function(){return new cS(this.Yf,this.v_,this.S_)},enumerable:!1,configurable:!0}),t.prototype.exists=function(){return null!==this.Zf},t.prototype.data=function(){if(this.Zf){if(this.v_){var t=new pA(this.Yf,this.Xf,this.S_,this.Zf,null);return this.v_.fromFirestore(t)}return this.Xf.Uf(this.Zf.bt())}},t.prototype.get=function(t){if(this.Zf){var e=this.Zf.data().field(vA("DocumentSnapshot.get",t));if(null!==e)return this.Xf.Uf(e)}},t}(),pA=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return sf(e,t),e.prototype.data=function(){return t.prototype.data.call(this)},e}(dA); 8214/** 8215 * @license 8216 * Copyright 2020 Google LLC 8217 * 8218 * Licensed under the Apache License, Version 2.0 (the "License"); 8219 * you may not use this file except in compliance with the License. 8220 * You may obtain a copy of the License at 8221 * 8222 * http://www.apache.org/licenses/LICENSE-2.0 8223 * 8224 * Unless required by applicable law or agreed to in writing, software 8225 * distributed under the License is distributed on an "AS IS" BASIS, 8226 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8227 * See the License for the specific language governing permissions and 8228 * limitations under the License. 8229 */function vA(t,e){return"string"==typeof e?zS(t,e):e instanceof $E?e.d_.f_:e.f_} 8230/** 8231 * @license 8232 * Copyright 2020 Google LLC 8233 * 8234 * Licensed under the Apache License, Version 2.0 (the "License"); 8235 * you may not use this file except in compliance with the License. 8236 * You may obtain a copy of the License at 8237 * 8238 * http://www.apache.org/licenses/LICENSE-2.0 8239 * 8240 * Unless required by applicable law or agreed to in writing, software 8241 * distributed under the License is distributed on an "AS IS" BASIS, 8242 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8243 * See the License for the specific language governing permissions and 8244 * limitations under the License. 8245 */function gA(t){if(Wy(t)&&0===t.xt.length)throw new Sm(Em.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}var mA=function(){};function yA(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];for(var n=0,r=e;n<r.length;n++){var s=r[n];t=s.td(t)}return t}var xA=function(t){function e(e,i,n){var r=this;return(r=t.call(this)||this).ed=e,r.nd=i,r.sd=n,r.type="where",r}return sf(e,t),e.prototype.td=function(t){var e,i,n,r=SS(t.firestore),s=function(t,e,i,n,r,s,o){var a;if(r.ut()){if("array-contains"===s||"array-contains-any"===s)throw new Sm(Em.INVALID_ARGUMENT,"Invalid Query. You can't perform '"+s+"' queries on FieldPath.documentId().");
8245if("in"===s||"not-in"===s){AA(o,s);for(var h=[],u=0,l=o;u<l.length;u++){var c=l[u];h.push(SA(n,t,c))}a={arrayValue:{values:h}}}else a=SA(n,t,o)}else"in"!==s&&"not-in"!==s&&"array-contains-any"!==s||AA(o,s),a=DS(i,"where",o,"in"===s||"not-in"===s);var f=Ay.create(r,s,a);return function(t,e){if(e.Ct()){var i=Hy(t);if(null!==i&&!i.isEqual(e.field))throw new Sm(Em.INVALID_ARGUMENT,"Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '"+i.toString()+"' and '"+e.field.toString()+"'");var n=jy(t);null!==n&&CA(t,e.field,n)}var r=function(t,e){for(var i=0,n=t.filters;i<n.length;i++){var r=n[i];if(e.indexOf(r.op)>=0)return r.op}return null}(t,function(t){switch(t){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","not-in"];case"in":return["array-contains-any","in","not-in"];case"array-contains-any":return["array-contains","array-contains-any","in","not-in"];case"not-in":return["array-contains","array-contains-any","in","not-in","!="];default:return[]}}(e.op));if(null!==r)throw r===e.op?new Sm(Em.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '"+e.op.toString()+"' filter."):new Sm(Em.INVALID_ARGUMENT,"Invalid query. You cannot use '"+e.op.toString()+"' filters with '"+r.toString()+"' filters.")}(t,f),f}(t.C_,0,r,t.firestore.I_,this.ed,this.nd,this.sd);return new fS(t.firestore,t.v_,(e=t.C_,i=s,n=e.filters.concat([i]),new Yy(e.path,e.collectionGroup,e.xt.slice(),n,e.limit,e.limitType,e.startAt,e.endAt)))},e}(mA),wA=function(t){function e(e,i){var n=this;return(n=t.call(this)||this).ed=e,n.rd=i,n.type="orderBy",n}return sf(e,t),e.prototype.td=function(t){var e,i,n,r=function(t,e,i){if(null!==t.startAt)throw new Sm(Em.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==t.endAt)throw new Sm(Em.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");var n=new Ny(e,i);return function(t,e){if(null===jy(t)){var i=Hy(t);null!==i&&CA(t,i,e.field)}}(t,n),n}(t.C_,this.ed,this.rd);return new fS(t.firestore,t.v_,(e=t.C_,i=r,n=e.xt.concat([i]),new Yy(e.path,e.collectionGroup,n,e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)))},e}(mA),_A=function(t){function e(e,i,n){var r=this;return(r=t.call(this)||this).type=e,r.od=i,r.ad=n,r}return sf(e,t),e.prototype.td=function(t){return new fS(t.firestore,t.v_,Qy(t.C_,this.od,this.ad))},e}(mA),bA=function(t){function e(e,i,n){var r=this;return(r=t.call(this)||this).type=e,r.ud=i,r.hd=n,r}return sf(e,t),e.prototype.td=function(t){var e,i,n=EA(t,this.type,this.ud,this.hd);return new fS(t.firestore,t.v_,(e=t.C_,i=n,new Yy(e.path,e.collectionGroup,e.xt.slice(),e.filters.slice(),e.limit,e.limitType,i,e.endAt)))},e}(mA),TA=function(t){function e(e,i,n){var r=this;return(r=t.call(this)||this).type=e,r.ud=i,r.hd=n,r}return sf(e,t),e.prototype.td=function(t){var e,i,n=EA(t,this.type,this.ud,this.hd);return new fS(t.firestore,t.v_,(e=t.C_,i=n,new Yy(e.path,e.collectionGroup,e.xt.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,i)))},e}(mA);function EA(t,e,i,n){if(i[0]instanceof $E&&(i[0]=i[0].d_),i[0]instanceof dA)return function(t,e,i,n,r){if(!n)throw new Sm(Em.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+i+"().");for(var s=[],o=0,a=Ky(t);o<a.length;o++){var h=a[o];if(h.field.ut())s.push(hy(e,n.key));else{var u=n.field(h.field);if(Km(u))throw new Sm(Em.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+h.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===u){var l=h.field.rt();throw new Sm(Em.INVALID_ARGUMENT,"Invalid query. You are trying to start or end a query using a document for which the field '"+l+"' (used as the orderBy) does not exist.")}s.push(u)}}return new Dy(s,r)}(t.C_,t.firestore.I_,e,i[0].Zf,n);var r=SS(t.firestore);return function(t,e,i,n,r,s){var o=t.xt;if(r.length>
8245o.length)throw new Sm(Em.INVALID_ARGUMENT,"Too many arguments provided to "+n+"(). The number of arguments must be less than or equal to the number of orderBy() clauses");for(var a=[],h=0;h<r.length;h++){var u=r[h];if(o[h].field.ut()){if("string"!=typeof u)throw new Sm(Em.INVALID_ARGUMENT,"Invalid query. Expected a string for document ID in "+n+"(), but got a "+typeof u);if(!qy(t)&&-1!==u.indexOf("/"))throw new Sm(Em.INVALID_ARGUMENT,"Invalid query. When querying a collection and ordering by FieldPath.documentId(), the value passed to "+n+"() must be a plain document ID, but '"+u+"' contains a slash.");var l=t.path.child(Nm.ot(u));if(!Vm.wt(l))throw new Sm(Em.INVALID_ARGUMENT,"Invalid query. When querying a collection group and ordering by FieldPath.documentId(), the value passed to "+n+"() must result in a valid document path, but '"+l+"' is not because it contains an odd number of segments.");var c=new Vm(l);a.push(hy(e,c))}else{var f=DS(i,n,u);a.push(f)}}return new Dy(a,s)}(t.C_,t.firestore.I_,r,e,i,n)}function SA(t,e,i){if(i instanceof $E&&(i=i.d_),"string"==typeof i){if(""===i)throw new Sm(Em.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid document ID, but it was an empty string.");if(!qy(e)&&-1!==i.indexOf("/"))throw new Sm(Em.INVALID_ARGUMENT,"Invalid query. When querying a collection by FieldPath.documentId(), you must provide a plain document ID, but '"+i+"' contains a '/' character.");var n=e.path.child(Nm.ot(i));if(!Vm.wt(n))throw new Sm(Em.INVALID_ARGUMENT,"Invalid query. When querying a collection group by FieldPath.documentId(), the value provided must result in a valid document path, but '"+n+"' is not because it has an odd number of segments ("+n.length+").");return hy(t,new Vm(n))}if(i instanceof cS)return hy(t,i.S_);throw new Sm(Em.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid string or a DocumentReference, but it was: "+sS(i)+".")}function AA(t,e){if(!Array.isArray(t)||0===t.length)throw new Sm(Em.INVALID_ARGUMENT,"Invalid Query. A non-empty array is required for '"+e.toString()+"' filters.");if(t.length>10)throw new Sm(Em.INVALID_ARGUMENT,"Invalid Query. '"+e.toString()+"' filters support a maximum of 10 elements in the value array.")}function CA(t,e,i){if(!i.isEqual(e))throw new Sm(Em.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '"+e.toString()+"' and so you must also use '"+e.toString()+"' as your first argument to orderBy(), but your first orderBy() is on field '"+i.toString()+"' instead.")} 8246/** 8247 * @license 8248 * Copyright 2020 Google LLC 8249 * 8250 * Licensed under the Apache License, Version 2.0 (the "License"); 8251 * you may not use this file except in compliance with the License. 8252 * You may obtain a copy of the License at 8253 * 8254 * http://www.apache.org/licenses/LICENSE-2.0 8255 * 8256 * Unless required by applicable law or agreed to in writing, software 8257 * distributed under the License is distributed on an "AS IS" BASIS, 8258 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8259 * See the License for the specific language governing permissions and 8260 * limitations under the License. 8261 */function OA(t,e,i){return t?i&&(i.merge||i.mergeFields)?t.toFirestore(e,i):t.toFirestore(e):e}var RA=function(t){function e(e){var i=this;return(i=t.call(this)||this).firestore=e,i}return sf(e,t),e.prototype.Wf=function(t){return new Am(t)},e.prototype.jf=function(t){var e=this.Jf(t,this.firestore.I_);return new cS(this.firestore,null,e)},e}(fA),MA=function(){function t(t,e){this.hasPendingWrites=t,this.fromCache=e}return t.prototype.isEqual=function(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache},t}(),PA=function(t){function e(e,i,n,r,s,o){var a=this;return(a=t.call(this,e,i,n,r,o)||this).Yf=e,a.ld=e,a.metadata=s,a}return sf(e,t),e.prototype.exists=function(){return t.prototype.exists.call(this)},e.prototype.data=function(t){if(void 0===t&&(t={}),this.Zf){if(this.v_){var e=new IA(this.Yf,this.Xf,this.S_,this.Zf,this.metadata,null);return this.v_.fromFirestore(e,t)}return this.Xf.Uf(this.Zf.bt(),t.serverTimestamps)}},e.prototype.get=function(t,e){if(void 0===e&&(e={}),this.Zf){var i=this.Zf.data().field(vA("DocumentSnapshot.get",t));if(null!==i)return this.Xf.Uf(i,e.serverTimestamps)}},e}(dA),IA=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return sf(e,t),e.prototype.data=function(e){return void 0===e&&(e={}),t.prototype.data.call(this,e)},e}(PA),kA=function(){function t(t,e,i,n){this.Yf=t,this.Xf=e,this._d=n,this.metadata=new MA(n.hasPendingWrites,n.fromCache),this.query=i}return Object.defineProperty(t.prototype,"docs",{get:function(){var t=[];return this.forEach((function(e){return t.push(e)})),t}
8261,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this._d.docs.size},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){return 0===this.size},enumerable:!1,configurable:!0}),t.prototype.forEach=function(t,e){var i=this;this._d.docs.forEach((function(n){t.call(e,new IA(i.Yf,i.Xf,n.key,n,new MA(i._d.De.has(n.key),i._d.fromCache),i.query.v_))}))},t.prototype.docChanges=function(t){void 0===t&&(t={});var e=!!t.includeMetadataChanges;if(e&&this._d.xe)throw new Sm(Em.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this.fd&&this.dd===e||(this.fd=function(t,e){if(t._d.Se.et()){var i=0;return t._d.docChanges.map((function(e){var n=new IA(t.Yf,t.Xf,e.doc.key,e.doc,new MA(t._d.De.has(e.doc.key),t._d.fromCache),t.query.v_);return e.doc,{type:"added",doc:n,oldIndex:-1,newIndex:i++}}))}var n=t._d.Se;return t._d.docChanges.filter((function(t){return e||3!==t.type})).map((function(e){var i=new IA(t.Yf,t.Xf,e.doc.key,e.doc,new MA(t._d.De.has(e.doc.key),t._d.fromCache),t.query.v_),r=-1,s=-1;return 0!==e.type&&(r=n.indexOf(e.doc.key),n=n.delete(e.doc.key)),1!==e.type&&(s=(n=n.add(e.doc)).indexOf(e.doc.key)),{type:LA(e.type),doc:i,oldIndex:r,newIndex:s}}))}(this,e),this.dd=e),this.fd},t}(); 8262/** 8263 * @license 8264 * Copyright 2020 Google LLC 8265 * 8266 * Licensed under the Apache License, Version 2.0 (the "License"); 8267 * you may not use this file except in compliance with the License. 8268 * You may obtain a copy of the License at 8269 * 8270 * http://www.apache.org/licenses/LICENSE-2.0 8271 * 8272 * Unless required by applicable law or agreed to in writing, software 8273 * distributed under the License is distributed on an "AS IS" BASIS, 8274 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8275 * See the License for the specific language governing permissions and 8276 * limitations under the License. 8277 */function LA(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return vm()}}function DA(t,e){return t instanceof PA&&e instanceof PA?t.Yf===e.Yf&&t.S_.isEqual(e.S_)&&(null===t.Zf?null===e.Zf:t.Zf.isEqual(e.Zf))&&t.v_===e.v_:t instanceof kA&&e instanceof kA&&t.Yf===e.Yf&&mS(t.query,e.query)&&t.metadata.isEqual(e.metadata)&&t._d.isEqual(e._d)} 8278/** 8279 * @license 8280 * Copyright 2020 Google LLC 8281 * 8282 * Licensed under the Apache License, Version 2.0 (the "License"); 8283 * you may not use this file except in compliance with the License. 8284 * You may obtain a copy of the License at 8285 * 8286 * http://www.apache.org/licenses/LICENSE-2.0 8287 * 8288 * Unless required by applicable law or agreed to in writing, software 8289 * distributed under the License is distributed on an "AS IS" BASIS, 8290 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8291 * See the License for the specific language governing permissions and 8292 * limitations under the License. 8293 */var FA=function(t){function e(e){var i=this;return(i=t.call(this)||this).firestore=e,i}return sf(e,t),e.prototype.Wf=function(t){return new Am(t)},e.prototype.jf=function(t){var e=this.Jf(t,this.firestore.I_);return new cS(this.firestore,null,e)},e}(fA);function NA(t,e,i){for(var n=[],r=3;r<arguments.length;r++)n[r-3]=arguments[r];t=oS(t,cS);var s=oS(t.firestore,aA),o=SS(s);return e instanceof $E&&(e=e.d_),UA(s,[("string"==typeof e||e instanceof QE?LS(o,"updateDoc",t.S_,e,i,n):kS(o,"updateDoc",t.S_,e)).F_(t.S_,bx.exists(!0))])}function BA(t){for(var e,i,n,r=[],s=1;s<arguments.length;s++)r[s-1]=arguments[s];t instanceof $E&&(t=t.d_);var o={includeMetadataChanges:!1},a=0;"object"!=typeof r[a]||oA(r[a])||(o=r[a],a++);var h,u,l,c={includeMetadataChanges:o.includeMetadataChanges};if(oA(r[a])){var f=r[a];r[a]=null===(e=f.next)||void 0===e?void 0:e.bind(f),r[a+1]=null===(i=f.error)||void 0===i?void 0:i.bind(f),r[a+2]=null===(n=f.complete)||void 0===n?void 0:n.bind(f)}if(t instanceof cS)u=oS(t.firestore,aA),l=Xy(t.S_.path),h={next:function(e){r[a]&&r[a](VA(u,t,e))},error:r[a+1],complete:r[a+2]};else{var d=oS(t,fS);u=oS(d.firestore,aA),l=d.C_;var p=new FA(u);h={next:function(t){r[a]&&r[a](new kA(u,p,d,t))},error:r[a+1],complete:r[a+2]},gA(t.C_)}
8293return function(t,e,i,n){var r=this,s=new ZE(n),o=new hE(e,s,i);return t._s.Ps((function(){return af(r,void 0,void 0,(function(){var e;return hf(this,(function(i){switch(i.label){case 0:return e=nE,[4,iA(t)];case 1:return[2,e.apply(void 0,[i.sent(),o])]}}))}))})),function(){s.i_(),t._s.Ps((function(){return af(r,void 0,void 0,(function(){var e;return hf(this,(function(i){switch(i.label){case 0:return e=rE,[4,iA(t)];case 1:return[2,e.apply(void 0,[i.sent(),o])]}}))}))}))}}(hA(u),l,c,h)}function UA(t,e){return function(t,e){var i=this,n=new qw;return t._s.Ps((function(){return af(i,void 0,void 0,(function(){var i;return hf(this,(function(r){switch(r.label){case 0:return i=yE,[4,eA(t)];case 1:return[2,i.apply(void 0,[r.sent(),e,n])]}}))}))})),n.promise}(hA(t),e)}function VA(t,e,i){var n=i.docs.get(e.S_),r=new FA(t);return new PA(t,r,e.S_,n,new MA(i.hasPendingWrites,i.fromCache),e.v_)} 8294/** 8295 * @license 8296 * Copyright 2020 Google LLC 8297 * 8298 * Licensed under the Apache License, Version 2.0 (the "License"); 8299 * you may not use this file except in compliance with the License. 8300 * You may obtain a copy of the License at 8301 * 8302 * http://www.apache.org/licenses/LICENSE-2.0 8303 * 8304 * Unless required by applicable law or agreed to in writing, software 8305 * distributed under the License is distributed on an "AS IS" BASIS, 8306 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8307 * See the License for the specific language governing permissions and 8308 * limitations under the License. 8309 */var YA=function(){function t(t,e){this.Yf=t,this.wd=e,this.Ed=[],this.Td=!1,this.Id=SS(t)}return t.prototype.set=function(t,e,i){this.md();var n=zA(t,this.Yf),r=OA(n.v_,e,i),s=AS(this.Id,"WriteBatch.set",n.S_,r,null!==n.v_,i);return this.Ed.push(s.F_(n.S_,bx.Kt())),this},t.prototype.update=function(t,e,i){for(var n=[],r=3;r<arguments.length;r++)n[r-3]=arguments[r];this.md();var s,o=zA(t,this.Yf);return e instanceof $E&&(e=e.d_),s="string"==typeof e||e instanceof QE?LS(this.Id,"WriteBatch.update",o.S_,e,i,n):kS(this.Id,"WriteBatch.update",o.S_,e),this.Ed.push(s.F_(o.S_,bx.exists(!0))),this},t.prototype.delete=function(t){this.md();var e=zA(t,this.Yf);return this.Ed=this.Ed.concat(new Bx(e.S_,bx.Kt())),this},t.prototype.commit=function(){return this.md(),this.Td=!0,this.Ed.length>0?this.wd(this.Ed):Promise.resolve()},t.prototype.md=function(){if(this.Td)throw new Sm(Em.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},t}();function zA(t,e){if(t instanceof $E&&(t=t.d_),t.firestore!==e)throw new Sm(Em.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return t} 8310/** 8311 * @license 8312 * Copyright 2020 Google LLC 8313 * 8314 * Licensed under the Apache License, Version 2.0 (the "License"); 8315 * you may not use this file except in compliance with the License. 8316 * You may obtain a copy of the License at 8317 * 8318 * http://www.apache.org/licenses/LICENSE-2.0 8319 * 8320 * Unless required by applicable law or agreed to in writing, software 8321 * distributed under the License is distributed on an "AS IS" BASIS, 8322 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8323 * See the License for the specific language governing permissions and 8324 * limitations under the License. 8325 */ 8326/** 8327 * @license 8328 * Copyright 2020 Google LLC 8329 * 8330 * Licensed under the Apache License, Version 2.0 (the "License"); 8331 * you may not use this file except in compliance with the License. 8332 * You may obtain a copy of the License at 8333 * 8334 * http://www.apache.org/licenses/LICENSE-2.0 8335 * 8336 * Unless required by applicable law or agreed to in writing, software 8337 * distributed under the License is distributed on an "AS IS" BASIS, 8338 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8339 * See the License for the specific language governing permissions and 8340 * limitations under the License. 8341 */var XA=function(t){function e(e,i){var n=this;return(n=t.call(this,e,i)||this).Yf=e,n}return sf(e,t),e.prototype.get=function(e){var i=this,n=zA(e,this.Yf),r=new FA(this.Yf);return t.prototype.get.call(this,e).then((function(t){return new PA(i.Yf,r,n.S_,t.Zf,new MA(!1,!1),n.v_)}))},e}(function(){function t(t,e){this.Yf=t,this.Ad=e,this.Id=SS(t)}return t.prototype.get=function(t){var e=this,i=zA(t,this.Yf),n=new RA(this.Yf);return this.Ad.ef([i.S_]).then((function(t){if(!t||1!==t.length)return vm();var r=t[0];if(r instanceof xy)return new dA(e.Yf,n,i.S_,null,i.v_);
8341if(r instanceof yy)return new dA(e.Yf,n,r.key,r,i.v_);throw vm()}))},t.prototype.set=function(t,e,i){var n=zA(t,this.Yf),r=OA(n.v_,e,i),s=AS(this.Id,"Transaction.set",n.S_,r,null!==n.v_,i);return this.Ad.set(n.S_,s),this},t.prototype.update=function(t,e,i){for(var n=[],r=3;r<arguments.length;r++)n[r-3]=arguments[r];var s,o=zA(t,this.Yf);return e instanceof $E&&(e=e.d_),s="string"==typeof e||e instanceof QE?LS(this.Id,"Transaction.update",o.S_,e,i,n):kS(this.Id,"Transaction.update",o.S_,e),this.Ad.update(o.S_,s),this},t.prototype.delete=function(t){var e=zA(t,this.Yf);return this.Ad.delete(e.S_),this},t}()); 8342/** 8343 * @license 8344 * Copyright 2017 Google LLC 8345 * 8346 * Licensed under the Apache License, Version 2.0 (the "License"); 8347 * you may not use this file except in compliance with the License. 8348 * You may obtain a copy of the License at 8349 * 8350 * http://www.apache.org/licenses/LICENSE-2.0 8351 * 8352 * Unless required by applicable law or agreed to in writing, software 8353 * distributed under the License is distributed on an "AS IS" BASIS, 8354 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8355 * See the License for the specific language governing permissions and 8356 * limitations under the License. 8357 */function GA(){if("undefined"==typeof Uint8Array)throw new Sm(Em.UNIMPLEMENTED,"Uint8Arrays are not available in this environment.")}function WA(){if("undefined"==typeof atob)throw new Sm(Em.UNIMPLEMENTED,"Blobs are unavailable in Firestore in this environment.")}var jA=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return sf(e,t),e.fromBase64String=function(t){return WA(),new e(Am.fromBase64String(t))},e.fromUint8Array=function(t){return GA(),new e(Am.fromUint8Array(t))},e.prototype.toBase64=function(){return WA(),this.d_.toBase64()},e.prototype.toUint8Array=function(){return GA(),this.d_.toUint8Array()},e.prototype.isEqual=function(t){return this.d_.isEqual(t.d_)},e.prototype.toString=function(){return"Blob(base64: "+this.toBase64()+")"},e}($E),HA=function(){function t(){}return t.prototype.enableIndexedDbPersistence=function(t,e){return function(t,e){cA(t=oS(t,aA));var i=hA(t),n=t.p_(),r=new KE;return lA(i,r,new HE(r,n.cacheSizeBytes,null==e?void 0:e.forceOwnership))}(t.d_,{forceOwnership:e})},t.prototype.enableMultiTabIndexedDbPersistence=function(t){return function(t){cA(t=oS(t,aA));var e=hA(t),i=t.p_(),n=new KE;return lA(e,n,new qE(n,i.cacheSizeBytes))}(t.d_)},t.prototype.clearIndexedDbPersistence=function(t){return function(t){var e=this;if(t.R_&&!t.P_)throw new Sm(Em.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");var i=new qw;return t.Bf.Tf((function(){return af(e,void 0,void 0,(function(){var e;return hf(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,function(t){return af(this,void 0,void 0,(function(){var e;return hf(this,(function(i){switch(i.label){case 0:return Qw.Kn()?(e=t+"main",[4,Qw.delete(e)]):[2,Promise.resolve()];case 1:return i.sent(),[2]}}))}))}(Ib(t.I_,t.w_))];case 1:return n.sent(),i.resolve(),[3,3];case 2:return e=n.sent(),i.reject(e),[3,3];case 3:return[2]}}
8357))}))})),i.promise}(t.d_)},t}(),qA=function(t){function e(e,i,n){var r=this;return(r=t.call(this,i)||this).Rd=n,r.INTERNAL={delete:function(){return r.terminate()}},e instanceof hm||(r.Pd=e),r}return sf(e,t),Object.defineProperty(e.prototype,"I_",{get:function(){return this.d_.I_},enumerable:!1,configurable:!0}),e.prototype.settings=function(t){t.merge&&delete(t=Object.assign(Object.assign({},this.d_.V_()),t)).merge,this.d_.g_(t)},e.prototype.useEmulator=function(t,e){var i,n,r,s;i=this.d_,n=t,r=e,"firestore.googleapis.com"!==(s=(i=oS(i,lS)).V_()).host&&s.host!==n&&dm("Host has been set in both settings() and useEmulator(), emulator host will be used"),i.g_(Object.assign(Object.assign({},s),{host:n+":"+r,ssl:!1}))},e.prototype.enableNetwork=function(){return function(t){var e=this;return t._s.enqueue((function(){return af(e,void 0,void 0,(function(){var e,i;return hf(this,(function(n){switch(n.label){case 0:return[4,JS(t)];case 1:return e=n.sent(),[4,tA(t)];case 2:return i=n.sent(),[2,(e.yo(!0),r=i,s=mm(r),s.Nh.delete(0),MT(s))]}var r,s}))}))}))}(hA(oS(this.d_,aA)))},e.prototype.disableNetwork=function(){return function(t){var e=this;return t._s.enqueue((function(){return af(e,void 0,void 0,(function(){var e,i;return hf(this,(function(n){switch(n.label){case 0:return[4,JS(t)];case 1:return e=n.sent(),[4,tA(t)];case 2:return i=n.sent(),[2,(e.yo(!1),function(t){return af(this,void 0,void 0,(function(){var e;return hf(this,(function(i){switch(i.label){case 0:return(e=mm(t)).Nh.add(0),[4,PT(e)];case 1:return i.sent(),e.Oh.set("Offline"),[2]}}))}))}(i))]}}))}))}))}(hA(oS(this.d_,aA)))},e.prototype.enablePersistence=function(t){var e=!1,i=!1;return t&&iS("synchronizeTabs",e=!!t.synchronizeTabs,"experimentalForceOwningTab",i=!!t.experimentalForceOwningTab),e?this.Rd.enableMultiTabIndexedDbPersistence(this):this.Rd.enableIndexedDbPersistence(this,i)},e.prototype.clearPersistence=function(){return this.Rd.clearIndexedDbPersistence(this)},e.prototype.terminate=function(){return this.Pd&&(this.Pd._removeServiceInstance("firestore"),this.Pd._removeServiceInstance("firestore-exp")),this.d_._delete()},e.prototype.waitForPendingWrites=function(){return function(t){var e=this,i=new qw;return t._s.Ps((function(){return af(e,void 0,void 0,(function(){var e;return hf(this,(function(n){switch(n.label){case 0:return e=EE,[4,eA(t)];case 1:return[2,e.apply(void 0,[n.sent(),i])]}}))}))})),i.promise}(hA(oS(this.d_,aA)))},e.prototype.onSnapshotsInSync=function(t){return e=this.d_,i=t,function(t,e){var i=this,n=new ZE(e);return t._s.Ps((function(){return af(i,void 0,void 0,(function(){var e;return hf(this,(function(i){switch(i.label){case 0:return e=function(t,e){mm(t).Wh.add(e),e.next()},[4,iA(t)];case 1:return[2,e.apply(void 0,[i.sent(),n])]}}))}))})),function(){n.i_(),t._s.Ps((function(){return af(i,void 0,void 0,(function(){var e;return hf(this,(function(i){switch(i.label){case 0:return e=function(t,e){mm(t).Wh.delete(e)},[4,iA(t)];case 1:return[2,e.apply(void 0,[i.sent(),n])]}}))}))}))}}(hA(e=oS(e,aA)),oA(i)?i:{next:i});var e,i},Object.defineProperty(e.prototype,"app",{get:function(){if(!this.Pd)throw new Sm(Em.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this.Pd},enumerable:!1,configurable:!0}),e.prototype.collection=function(t){try{return new hC(this,pS(this.d_,t))}catch(e){throw tC(e,"collection()","Firestore.collection()")}},e.prototype.doc=function(t){try{return new $A(this,vS(this.d_,t))}catch(e){throw tC(e,"doc()","Firestore.doc()")}},e.prototype.collectionGroup=function(t){try{return new sC(this,function(t,e){if(t=oS(t,lS),tS("collectionGroup","collection id",e),e.indexOf("/")>=0)throw new Sm(Em.INVALID_ARGUMENT,"Invalid collection ID '"+e+"' passed to function collectionGroup(). Collection IDs must not contain '/'.");return new fS(t,null,(i=e,new Yy(Nm.ct(),i)));var i}(this.d_,t))}catch(e){throw tC(e,"collectionGroup()","Firestore.collectionGroup()")}},e.prototype.runTransaction=function(t){var e,i=this;return function(t,e){var i=this,n=new qw;return t._s.Ps((function(){return af(i,void 0,void 0,(function(){var i;return hf(this,(function(r){switch(r.label){case 0:return[4,(s=t,QS(s).then((function(t){return t.Sh})))];case 1:return i=r.sent(),new jS(t._s,i,e,n).run(),[2]}var s}))}))})),n.promise}(hA(e=this.d_),(function(n){return function(e){return t(new ZA(i,e))}(new XA(e,n))}))},e.prototype.batch=function(){var t=this;return hA(this.d_),new QA(new YA(this.d_,(function(e){return UA(t.d_,e)})))},e.prototype.loadBundle=function(t){throw new Sm(Em.FAILED_PRECONDITION,'"loadBundle()" does not exist, have you imported "firebase/firestore/bundle"?')},e.prototype.namedQuery=function(t){throw new Sm(Em.FAILED_PRECONDITION,'"named
8357Query()" does not exist, have you imported "firebase/firestore/bundle"?')},e}($E),KA=function(t){function e(e){var i=this;return(i=t.call(this)||this).firestore=e,i}return sf(e,t),e.prototype.Wf=function(t){return new jA(new Am(t))},e.prototype.jf=function(t){var e=this.Jf(t,this.firestore.I_);return $A.yd(e,this.firestore,null)},e}(fA);var ZA=function(t){function e(e,i){var n=this;return(n=t.call(this,i)||this).Yf=e,n.Xf=new KA(e),n}return sf(e,t),e.prototype.get=function(t){var e=this,i=uC(t);return this.d_.get(i).then((function(t){return new nC(e.Yf,new PA(e.Yf.d_,e.Xf,t.S_,t.Zf,t.metadata,i.v_))}))},e.prototype.set=function(t,e,i){var n=uC(t);return i?(eS("Transaction.set",i),this.d_.set(n,e,i)):this.d_.set(n,e),this},e.prototype.update=function(t,e,i){for(var n,r=[],s=3;s<arguments.length;s++)r[s-3]=arguments[s];var o=uC(t);return 2===arguments.length?this.d_.update(o,e):(n=this.d_).update.apply(n,cf([o,e,i],r)),this},e.prototype.delete=function(t){var e=uC(t);return this.d_.delete(e),this},e}($E),QA=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return sf(e,t),e.prototype.set=function(t,e,i){var n=uC(t);return i?(eS("WriteBatch.set",i),this.d_.set(n,e,i)):this.d_.set(n,e),this},e.prototype.update=function(t,e,i){for(var n,r=[],s=3;s<arguments.length;s++)r[s-3]=arguments[s];var o=uC(t);return 2===arguments.length?this.d_.update(o,e):(n=this.d_).update.apply(n,cf([o,e,i],r)),this},e.prototype.delete=function(t){var e=uC(t);return this.d_.delete(e),this},e.prototype.commit=function(){return this.d_.commit()},e}($E),JA=function(t){function e(e,i,n){var r=this;return(r=t.call(this,n)||this).Yf=e,r.Xf=i,r}return sf(e,t),e.prototype.fromFirestore=function(t,e){var i=new IA(this.Yf.d_,this.Xf,t.S_,t.Zf,t.metadata,null);return this.d_.fromFirestore(new rC(this.Yf,i),null!=e?e:{})},e.prototype.toFirestore=function(t,e){return e?this.d_.toFirestore(t,e):this.d_.toFirestore(t)},e.gd=function(t,i){var n=e.Vd,r=n.get(t);r||(r=new WeakMap,n.set(t,r));var s=r.get(i);return s||(s=new e(t,new KA(t),i),r.set(i,s)),s},e}($E);JA.Vd=new WeakMap;var $A=function(t){function e(e,i){var n=this;return(n=t.call(this,i)||this).firestore=e,n.Xf=new KA(e),n}return sf(e,t),e.pd=function(t,i,n){if(t.length%2!=0)throw new Sm(Em.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+t.rt()+" has "+t.length);return new e(i,new cS(i.d_,n,new Vm(t)))},e.yd=function(t,i,n){return new e(i,new cS(i.d_,n,t))},Object.defineProperty(e.prototype,"id",{get:function(){return this.d_.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return new hC(this.firestore,this.d_.parent)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.d_.path},enumerable:!1,configurable:!0}),e.prototype.collection=function(t){try{return new hC(this.firestore,pS(this.d_,t))}catch(e){throw tC(e,"collection()","DocumentReference.collection()")}},e.prototype.isEqual=function(t){return t instanceof $E&&(t=t.d_),t instanceof cS&&gS(this.d_,t)},e.prototype.set=function(t,e){e=eS("DocumentReference.set",e);try{return function(t,e,i){t=oS(t,cS);var n=oS(t.firestore,aA),r=OA(t.v_,e,i);return UA(n,[AS(SS(n),"setDoc",t.S_,r,null!==t.v_,i).F_(t.S_,bx.Kt())])}(this.d_,t,e)}catch(i){throw tC(i,"setDoc()","DocumentReference.set()")}},e.prototype.update=function(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];try{return 1===arguments.length?NA(this.d_,t):NA.apply(void 0,cf([this.d_,t,e],i))}catch(r){throw tC(r,"updateDoc()","DocumentReference.update()")}},e.prototype.delete=function(){return UA(oS((t=this.d_).firestore,aA),[new Bx(t.S_,bx.Kt())]);var t},e.prototype.onSnapshot=function(){for(var t=this,e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n=eC(e),r=iC(e,(function(e){return new nC(t.firestore,new PA(t.firestore.d_,t.Xf,e.S_,e.Zf,e.metadata,t.d_.v_))}));return BA(this.d_,n,r)},e.prototype.get=function(t){var e=this;return("cache"===(null==t?void 0:t.source)?function(t){t=oS(t,cS);var e=oS(t.firestore,aA),i=hA(e),n=new FA(e);return function(t,e){var i=this,n=new qw;return t._s.Ps((function(){return af(i,void 0,void 0,(function(){var i;return hf(this,(function(r){switch(r.label){case 0:return i=function(t,e,
8357i){return af(this,void 0,void 0,(function(){var n,r;return hf(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,(o=t,a=e,h=mm(o),h.persistence.runTransaction("read document","readonly",(function(t){return h.Tc.Ho(t,a)})))];case 1:return(r=s.sent())instanceof yy?i.resolve(r):r instanceof xy?i.resolve(null):i.reject(new Sm(Em.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)")),[3,3];case 2:return n=s.sent(),r=o_(n,"Failed to get document '"+e+" from cache"),i.reject(r),[3,3];case 3:return[2]}var o,a,h}))}))},[4,$S(t)];case 1:return[2,i.apply(void 0,[r.sent(),e,n])]}}))}))})),n.promise}(i,t.S_).then((function(i){return new PA(e,n,t.S_,i,new MA(i instanceof yy&&i.Vt,!0),t.v_)}))}(this.d_):"server"===(null==t?void 0:t.source)?function(t){t=oS(t,cS);var e=oS(t.firestore,aA);return nA(hA(e),t.S_,{source:"server"}).then((function(i){return VA(e,t,i)}))}(this.d_):function(t){t=oS(t,cS);var e=oS(t.firestore,aA);return nA(hA(e),t.S_).then((function(i){return VA(e,t,i)}))}(this.d_)).then((function(t){return new nC(e.firestore,new PA(e.firestore.d_,e.Xf,t.S_,t.Zf,t.metadata,e.d_.v_))}))},e.prototype.withConverter=function(t){return new e(this.firestore,this.d_.withConverter(JA.gd(this.firestore,t)))},e}($E);function tC(t,e,i){return t.message=t.message.replace(e,i),t}function eC(t){for(var e=0,i=t;e<i.length;e++){var n=i[e];if("object"==typeof n&&!oA(n))return n}return{}}function iC(t,e){var i,n,r;return{next:function(t){r.next&&r.next(e(t))},error:null===(i=(r=oA(t[0])?t[0]:oA(t[1])?t[1]:"function"==typeof t[0]?{next:t[0],error:t[1],complete:t[2]}:{next:t[1],error:t[2],complete:t[3]}).error)||void 0===i?void 0:i.bind(r),complete:null===(n=r.complete)||void 0===n?void 0:n.bind(r)}}var nC=function(t){function e(e,i){var n=this;return(n=t.call(this,i)||this).Yf=e,n}return sf(e,t),Object.defineProperty(e.prototype,"ref",{get:function(){return new $A(this.Yf,this.d_.ref)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this.d_.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return this.d_.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"exists",{get:function(){return this.d_.exists()},enumerable:!1,configurable:!0}),e.prototype.data=function(t){return this.d_.data(t)},e.prototype.get=function(t,e){return this.d_.get(t,e)},e.prototype.isEqual=function(t){return DA(this.d_,t.d_)},e}($E),rC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return sf(e,t),e.prototype.data=function(t){return this.d_.data(t)},e}(nC),sC=function(t){function e(e,i){var n=this;return(n=t.call(this,i)||this).firestore=e,n.Xf=new KA(e),n}return sf(e,t),e.prototype.where=function(t,i,n){try{return new e(this.firestore,yA(this.d_,(s=n,o=i,a=vA("where",r=t),new xA(a,o,s))))}catch(r){throw tC(r,/(orderBy|where)\(\)/,"Query.$1()")}var r,s,o,a},e.prototype.orderBy=function(t,i){try{return new e(this.firestore,yA(this.d_,function(t,e){void 0===e&&(e="asc");var i=e,n=vA("orderBy",t);return new wA(n,i)}(t,i)))}catch(n){throw tC(n,/(orderBy|where)\(\)/,"Query.$1()")}},e.prototype.limit=function(t){try{return new e(this.firestore,yA(this.d_,(aS("limit",i=t),new _A("limit",i,"F"))))}catch(i){throw tC(i,"limit()","Query.limit()")}var i},e.prototype.limitToLast=function(t){try{return new e(this.firestore,yA(this.d_,(aS("limitToLast",i=t),new _A("limitToLast",i,"L"))))}catch(i){throw tC(i,"limitToLast()","Query.limitToLast()")}var i},e.prototype.startAt=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];try{return new e(this.firestore,yA(this.d_,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new bA("startAt",t,!0)}.apply(void 0,t)))}catch(n){throw tC(n,"startAt()","Query.startAt()")}},e.prototype.startAfter=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];try{return new e(this.firestore,yA(this.d_,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new bA("startAfter",t,!1)}.apply(void 0,t)))}catch(n){throw tC(n,"startAfter()","Query.startAfter()")}},e.prototype.endBefore=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];try{return new e(this.firestore,yA(this.d_,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new TA("endBefore",t,!0)}.apply(void 0,t)))}catch(n){throw tC(n,"endBefore()","Query.endBefore()")}},e.prototype.endAt=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];try{return new e(this.firestore,yA(this.d_,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new TA("endAt",t,!1)}.apply(void 0,t)))}catch(n){throw tC(n,"endAt()","Query.endAt()")}},e.prototype.isEqual=function(t){return mS(this.d_,t.d_)},e.prototype.get=function(t){var e=this;
8357return("cache"===(null==t?void 0:t.source)?function(t){t=oS(t,fS);var e=oS(t.firestore,aA),i=hA(e),n=new FA(e);return function(t,e){var i=this,n=new qw;return t._s.Ps((function(){return af(i,void 0,void 0,(function(){var i;return hf(this,(function(r){switch(r.label){case 0:return i=function(t,e,i){return af(this,void 0,void 0,(function(){var n,r,s,o,a;return hf(this,(function(h){switch(h.label){case 0:return h.trys.push([0,2,,3]),[4,Wb(t,e,!0)];case 1:return a=h.sent(),n=new cE(e,a.Rc),r=n.fl(a.documents),s=n.wi(r,!1),i.resolve(s.snapshot),[3,3];case 2:return o=h.sent(),a=o_(o,"Failed to execute query '"+e+" against cache"),i.reject(a),[3,3];case 3:return[2]}}))}))},[4,$S(t)];case 1:return[2,i.apply(void 0,[r.sent(),e,n])]}}))}))})),n.promise}(i,t.C_).then((function(i){return new kA(e,n,t,i)}))}(this.d_):"server"===(null==t?void 0:t.source)?function(t){t=oS(t,fS);var e=oS(t.firestore,aA),i=hA(e),n=new FA(e);return rA(i,t.C_,{source:"server"}).then((function(i){return new kA(e,n,t,i)}))}(this.d_):function(t){t=oS(t,fS);var e=oS(t.firestore,aA),i=hA(e),n=new FA(e);return gA(t.C_),rA(i,t.C_).then((function(i){return new kA(e,n,t,i)}))}(this.d_)).then((function(t){return new aC(e.firestore,new kA(e.firestore.d_,e.Xf,e.d_,t._d))}))},e.prototype.onSnapshot=function(){for(var t=this,e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n=eC(e),r=iC(e,(function(e){return new aC(t.firestore,new kA(t.firestore.d_,t.Xf,t.d_,e._d))}));return BA(this.d_,n,r)},e.prototype.withConverter=function(t){return new e(this.firestore,this.d_.withConverter(JA.gd(this.firestore,t)))},e}($E),oC=function(t){function e(e,i){var n=this;return(n=t.call(this,i)||this).Yf=e,n}return sf(e,t),Object.defineProperty(e.prototype,"type",{get:function(){return this.d_.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doc",{get:function(){return new rC(this.Yf,this.d_.doc)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"oldIndex",{get:function(){return this.d_.oldIndex},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"newIndex",{get:function(){return this.d_.newIndex},enumerable:!1,configurable:!0}),e}($E),aC=function(t){function e(e,i){var n=this;return(n=t.call(this,i)||this).Yf=e,n}return sf(e,t),Object.defineProperty(e.prototype,"query",{get:function(){return new sC(this.Yf,this.d_.query)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return this.d_.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.d_.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return this.d_.empty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"docs",{get:function(){var t=this;return this.d_.docs.map((function(e){return new rC(t.Yf,e)}))},enumerable:!1,configurable:!0}),e.prototype.docChanges=function(t){var e=this;return this.d_.docChanges(t).map((function(t){return new oC(e.Yf,t)}))},e.prototype.forEach=function(t,e){var i=this;this.d_.forEach((function(n){t.call(e,new rC(i.Yf,n))}))},e.prototype.isEqual=function(t){return DA(this.d_,t.d_)},e}($E),hC=function(t){function e(e,i){var n=this;return(n=t.call(this,e,i)||this).firestore=e,n.d_=i,n}return sf(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.d_.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.d_.path},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this.d_.parent;return t?new $A(this.firestore,t):null},enumerable:!1,configurable:!0}),e.prototype.doc=function(t){try{return new $A(this.firestore,void 0===t?vS(this.d_):vS(this.d_,t))}catch(e){throw tC(e,"doc()","CollectionReference.doc()")}},e.prototype.add=function(t){var e,i,n,r,s,o=this;return(e=this.d_,i=t,n=oS(e.firestore,aA),r=vS(e),s=OA(e.v_,i),UA(n,[AS(SS(e.firestore),"addDoc",r.S_,s,null!==e.v_,{}).F_(r.S_,bx.exists(!1))]).then((function(){return r}))).then((function(t){return new $A(o.firestore,t)}))},e.prototype.isEqual=function(t){return gS(this.d_,t.d_)},e.prototype.withConverter=function(t){return new e(this.firestore,this.d_.withConverter(JA.gd(this.firestore,t)))},e}(sC);function uC(t){return t instanceof $E&&(t=t.d_),oS(t,cS) 8358/** 8359 * @license 8360 * Copyright 2017 Google LLC 8361 * 8362 * Licensed under the Apache License, Version 2.0 (the "License");
8363 * you may not use this file except in compliance with the License. 8364 * You may obtain a copy of the License at 8365 * 8366 * http://www.apache.org/licenses/LICENSE-2.0 8367 * 8368 * Unless required by applicable law or agreed to in writing, software 8369 * distributed under the License is distributed on an "AS IS" BASIS, 8370 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8371 * See the License for the specific language governing permissions and 8372 * limitations under the License. 8373 */}var lC,cC=function(t){function e(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.call(this,new(QE.bind.apply(QE,cf([void 0],e))))||this}return sf(e,t),e.documentId=function(){return new e(Um.ht().rt())},e.prototype.isEqual=function(t){return t instanceof $E&&(t=t.d_),t instanceof QE&&this.d_.f_.isEqual(t.f_)},e}($E),fC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return sf(e,t),e.serverTimestamp=function(){var t=new RS("serverTimestamp");return t._methodName="FieldValue.serverTimestamp",new e(t)},e.delete=function(){var t=new CS("deleteField");return t._methodName="FieldValue.delete",new e(t)},e.arrayUnion=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new MS("arrayUnion",t)}.apply(void 0,t);return n._methodName="FieldValue.arrayUnion",new e(n)},e.arrayRemove=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new PS("arrayRemove",t)}.apply(void 0,t);return n._methodName="FieldValue.arrayRemove",new e(n)},e.increment=function(t){var i=new IS("increment",t);return i._methodName="FieldValue.increment",new e(i)},e.prototype.isEqual=function(t){return this.d_.isEqual(t.d_)},e}($E),dC={Firestore:qA,GeoPoint:yS,Timestamp:Lm,Blob:jA,Transaction:ZA,WriteBatch:QA,DocumentReference:$A,DocumentSnapshot:nC,Query:sC,QueryDocumentSnapshot:rC,QuerySnapshot:aC,CollectionReference:hC,FieldPath:cC,FieldValue:fC,setLogLevel:function(t){var e;e=t,um.setLogLevel(e)},CACHE_SIZE_UNLIMITED:-1};(lC=$f).INTERNAL.registerComponent(new Ef("firestore",(function(t){return function(t,e){return new qA(t,new aA(t,e),new HA)}(t.getProvider("app").getImmediate(),t.getProvider("auth-internal"))}),"PUBLIC").setServiceProps(Object.assign({},dC))),lC.registerVersion("@firebase/firestore","2.1.7"); 8374/** 8375 * @license 8376 * Copyright 2017 Google LLC 8377 * 8378 * Licensed under the Apache License, Version 2.0 (the "License"); 8379 * you may not use this file except in compliance with the License. 8380 * You may obtain a copy of the License at 8381 * 8382 * http://www.apache.org/licenses/LICENSE-2.0 8383 * 8384 * Unless required by applicable law or agreed to in writing, software 8385 * distributed under the License is distributed on an "AS IS" BASIS, 8386 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8387 * See the License for the specific language governing permissions and 8388 * limitations under the License. 8389 */ 8390var pC=function(t){function e(i,n){var r=t.call(this,vC(i),"Firebase Storage: "+n+" ("+vC(i)+")")||this;return r.customData={serverResponse:null},Object.setPrototypeOf(r,e.prototype),r}return sf(e,t),e.prototype._codeEquals=function(t){return vC(t)===this.code},Object.defineProperty(e.prototype,"message",{get:function(){return this.customData.serverResponse?this.message+"\n"+this.customData.serverResponse:this.message},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"serverResponse",{get:function(){return this.customData.serverResponse},set:function(t){this.customData.serverResponse=t},enumerable:!1,configurable:!0}),e}(gf);function vC(t){return"storage/"+t}function gC(){return new pC("unknown","An unknown error occurred, please check the error payload for server response.")}function mC(){return new pC("canceled","User canceled the upload/download.")}function yC(){return new pC("cannot-slice-blob","Cannot slice blob for upload. Please retry the upload.")}function xC(t){return new pC("invalid-argument",t)}function wC(){return new pC("app-deleted","The Firebase app was deleted.")}function _C(t){return new pC("invalid-root-operation","The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function bC(t,e){return new pC("invalid-format","String does not match format '"+t+"': "+e)}function TC(t){throw new pC("internal-error","Internal error: "+t)} 8391/** 8392 * @license 8393 * Copyright 2017 Google LLC 8394 * 8395 * Licensed under the Apache License, Version 2.0 (the "License");
8396 * you may not use this file except in compliance with the License. 8397 * You may obtain a copy of the License at 8398 * 8399 * http://www.apache.org/licenses/LICENSE-2.0 8400 * 8401 * Unless required by applicable law or agreed to in writing, software 8402 * distributed under the License is distributed on an "AS IS" BASIS, 8403 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8404 * See the License for the specific language governing permissions and 8405 * limitations under the License. 8406 */var EC={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},SC=function(t,e){this.data=t,this.contentType=e||null};function AC(t,e){switch(t){case EC.RAW:return new SC(CC(e));case EC.BASE64:case EC.BASE64URL:return new SC(OC(t,e));case EC.DATA_URL:return new SC((i=new RC(e)).base64?OC(EC.BASE64,i.rest):function(t){var e;try{e=decodeURIComponent(t)}catch(lC){throw bC(EC.DATA_URL,"Malformed data URL.")}return CC(e)}(i.rest),function(t){return new RC(t).contentType}(e))}var i;throw gC()}function CC(t){for(var e=[],i=0;i<t.length;i++){var n=t.charCodeAt(i);if(n<=127)e.push(n);else if(n<=2047)e.push(192|n>>6,128|63&n);else if(55296==(64512&n))if(i<t.length-1&&56320==(64512&t.charCodeAt(i+1)))n=65536|(1023&n)<<10|1023&t.charCodeAt(++i),e.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n);else e.push(239,191,189);else 56320==(64512&n)?e.push(239,191,189):e.push(224|n>>12,128|n>>6&63,128|63&n)}return new Uint8Array(e)}function OC(t,e){switch(t){case EC.BASE64:var i=-1!==e.indexOf("-"),n=-1!==e.indexOf("_");if(i||n)throw bC(t,"Invalid character '"+(i?"-":"_")+"' found: is it base64url encoded?");break;case EC.BASE64URL:var r=-1!==e.indexOf("+"),s=-1!==e.indexOf("/");if(r||s)throw bC(t,"Invalid character '"+(r?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/")}var o;try{o=atob(e)}catch(lC){throw bC(t,"Invalid character found")}for(var a=new Uint8Array(o.length),h=0;h<o.length;h++)a[h]=o.charCodeAt(h);return a}var RC=function(t){this.base64=!1,this.contentType=null;var e=t.match(/^data:([^,]+)?,/);if(null===e)throw bC(EC.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");var i=e[1]||null;null!=i&&(this.base64=(n=i,r=";base64",n.length>=r.length&&n.substring(n.length-r.length)===r),this.contentType=this.base64?i.substring(0,i.length-";base64".length):i),this.rest=t.substring(t.indexOf(",")+1);var n,r; 8407/** 8408 * @license 8409 * Copyright 2017 Google LLC 8410 * 8411 * Licensed under the Apache License, Version 2.0 (the "License"); 8412 * you may not use this file except in compliance with the License. 8413 * You may obtain a copy of the License at 8414 * 8415 * http://www.apache.org/licenses/LICENSE-2.0 8416 * 8417 * Unless required by applicable law or agreed to in writing, software 8418 * distributed under the License is distributed on an "AS IS" BASIS, 8419 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8420 * See the License for the specific language governing permissions and 8421 * limitations under the License. 8422 */};var MC,PC,IC={STATE_CHANGED:"state_changed"},kC={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function LC(t){switch(t){case"running":case"pausing":case"canceling":return kC.RUNNING;case"paused":return kC.PAUSED;case"success":return kC.SUCCESS;case"canceled":return kC.CANCELED;case"error":default:return kC.ERROR}} 8423/** 8424 * @license 8425 * Copyright 2017 Google LLC 8426 * 8427 * Licensed under the Apache License, Version 2.0 (the "License"); 8428 * you may not use this file except in compliance with the License. 8429 * You may obtain a copy of the License at 8430 * 8431 * http://www.apache.org/licenses/LICENSE-2.0 8432 * 8433 * Unless required by applicable law or agreed to in writing, software 8434 * distributed under the License is distributed on an "AS IS" BASIS, 8435 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8436 * See the License for the specific language governing permissions and 8437 * limitations under the License. 8438 */(PC=MC||(MC={}))[PC.NO_ERROR=0]="NO_ERROR",PC[PC.NETWORK_ERROR=1]="NETWORK_ERROR",PC[PC.ABORT=2]="ABORT"; 8439/** 8440 * @license 8441 * Copyright 2017 Google LLC 8442 * 8443 * Licensed under the Apache License, Version 2.0 (the "License");
8444 * you may not use this file except in compliance with the License. 8445 * You may obtain a copy of the License at 8446 * 8447 * http://www.apache.org/licenses/LICENSE-2.0 8448 * 8449 * Unless required by applicable law or agreed to in writing, software 8450 * distributed under the License is distributed on an "AS IS" BASIS, 8451 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8452 * See the License for the specific language governing permissions and 8453 * limitations under the License. 8454 */ 8455var DC=function(){function t(){var t=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=MC.NO_ERROR,this.sendPromise_=new Promise((function(e){t.xhr_.addEventListener("abort",(function(){t.errorCode_=MC.ABORT,e(t)})),t.xhr_.addEventListener("error",(function(){t.errorCode_=MC.NETWORK_ERROR,e(t)})),t.xhr_.addEventListener("load",(function(){e(t)}))}))}return t.prototype.send=function(t,e,i,n){if(this.sent_)throw TC("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(e,t,!0),void 0!==n)for(var r in n)n.hasOwnProperty(r)&&this.xhr_.setRequestHeader(r,n[r].toString());return void 0!==i?this.xhr_.send(i):this.xhr_.send(),this.sendPromise_},t.prototype.getErrorCode=function(){if(!this.sent_)throw TC("cannot .getErrorCode() before sending");return this.errorCode_},t.prototype.getStatus=function(){if(!this.sent_)throw TC("cannot .getStatus() before sending");try{return this.xhr_.status}catch(lC){return-1}},t.prototype.getResponseText=function(){if(!this.sent_)throw TC("cannot .getResponseText() before sending");return this.xhr_.responseText},t.prototype.abort=function(){this.xhr_.abort()},t.prototype.getResponseHeader=function(t){return this.xhr_.getResponseHeader(t)},t.prototype.addUploadProgressListener=function(t){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",t)},t.prototype.removeUploadProgressListener=function(t){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",t)},t}(),FC=function(){function t(){}return t.prototype.createXhrIo=function(){return new DC},t}(); 8456/** 8457 * @license 8458 * Copyright 2017 Google LLC 8459 * 8460 * Licensed under the Apache License, Version 2.0 (the "License"); 8461 * you may not use this file except in compliance with the License. 8462 * You may obtain a copy of the License at 8463 * 8464 * http://www.apache.org/licenses/LICENSE-2.0 8465 * 8466 * Unless required by applicable law or agreed to in writing, software 8467 * distributed under the License is distributed on an "AS IS" BASIS, 8468 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8469 * See the License for the specific language governing permissions and 8470 * limitations under the License. 8471 */function NC(t){return"string"==typeof t||t instanceof String}function BC(t){return UC()&&t instanceof Blob}function UC(){return"undefined"!=typeof Blob}function VC(t,e,i,n){if(n<e)throw xC("Invalid value for '"+t+"'. Expected "+e+" or greater.");if(n>i)throw xC("Invalid value for '"+t+"'. Expected "+i+" or less.")} 8472/** 8473 * @license 8474 * Copyright 2017 Google LLC 8475 * 8476 * Licensed under the Apache License, Version 2.0 (the "License"); 8477 * you may not use this file except in compliance with the License. 8478 * You may obtain a copy of the License at 8479 * 8480 * http://www.apache.org/licenses/LICENSE-2.0 8481 * 8482 * Unless required by applicable law or agreed to in writing, software 8483 * distributed under the License is distributed on an "AS IS" BASIS, 8484 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8485 * See the License for the specific language governing permissions and 8486 * limitations under the License. 8487 */function YC(){return"undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function zC(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=YC();if(void 0!==i){for(var n=new i,r=0;r<t.length;r++)n.append(t[r]);return n.getBlob()}if(UC())return new Blob(t);throw new pC("unsupported-environment","This browser doesn't seem to support creating Blobs")} 8488/** 8489 * @license 8490 * Copyright 2017 Google LLC 8491 * 8492 * Licensed under the Apache License, Version 2.0 (the "License");
8493 * you may not use this file except in compliance with the License. 8494 * You may obtain a copy of the License at 8495 * 8496 * http://www.apache.org/licenses/LICENSE-2.0 8497 * 8498 * Unless required by applicable law or agreed to in writing, software 8499 * distributed under the License is distributed on an "AS IS" BASIS, 8500 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8501 * See the License for the specific language governing permissions and 8502 * limitations under the License. 8503 */ 8504var XC=function(){function t(t,e){var i=0,n="";BC(t)?(this.data_=t,i=t.size,n=t.type):t instanceof ArrayBuffer?(e?this.data_=new Uint8Array(t):(this.data_=new Uint8Array(t.byteLength),this.data_.set(new Uint8Array(t))),i=this.data_.length):t instanceof Uint8Array&&(e?this.data_=t:(this.data_=new Uint8Array(t.length),this.data_.set(t)),i=t.length),this.size_=i,this.type_=n}return t.prototype.size=function(){return this.size_},t.prototype.type=function(){return this.type_},t.prototype.slice=function(e,i){if(BC(this.data_)){var n=this.data_,r=(o=e,a=i,(s=n).webkitSlice?s.webkitSlice(o,a):s.mozSlice?s.mozSlice(o,a):s.slice?s.slice(o,a):null);return null===r?null:new t(r)}var s,o,a;return new t(new Uint8Array(this.data_.buffer,e,i-e),!0)},t.getBlob=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];if(UC()){var n=e.map((function(e){return e instanceof t?e.data_:e}));return new t(zC.apply(null,n))}var r=e.map((function(t){return NC(t)?AC(EC.RAW,t).data:t.data_})),s=0;r.forEach((function(t){s+=t.byteLength}));var o=new Uint8Array(s),a=0;return r.forEach((function(t){for(var e=0;e<t.length;e++)o[a++]=t[e]})),new t(o,!0)},t.prototype.uploadData=function(){return this.data_},t}(),GC=function(){function t(t,e){this.bucket=t,this.path_=e}return Object.defineProperty(t.prototype,"path",{get:function(){return this.path_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRoot",{get:function(){return 0===this.path.length},enumerable:!1,configurable:!0}),t.prototype.fullServerUrl=function(){var t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)},t.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},t.makeFromBucketSpec=function(e){var i;try{i=t.makeFromUrl(e)}catch(lC){return new t(e,"")}if(""===i.path)return i;throw new pC("invalid-default-bucket","Invalid default bucket '"+e+"'.")},t.makeFromUrl=function(e){var i=null,n="([A-Za-z0-9.\\-_]+)";var r=new RegExp("^gs://"+n+"(/(.*))?$","i");function s(t){t.path_=decodeURIComponent(t.path)}for(var o="firebasestorage.googleapis.com".replace(/[.]/g,"\\."),a=[{regex:r,indices:{bucket:1,path:3},postModify:function(t){"/"===t.path.charAt(t.path.length-1)&&(t.path_=t.path_.slice(0,-1))}},{regex:new RegExp("^https?://"+o+"/v[A-Za-z0-9_]+/b/"+n+"/o(/([^?#]*).*)?$","i"),indices:{bucket:1,path:3},postModify:s},{regex:new RegExp("^https?://(?:storage.googleapis.com|storage.cloud.google.com)/"+n+"/([^?#]*)","i"),indices:{bucket:1,path:2},postModify:s}],h=0;h<a.length;h++){var u=a[h],l=u.regex.exec(e);if(l){var c=l[u.indices.bucket],f=l[u.indices.path];f||(f=""),i=new t(c,f),u.postModify(i);break}}if(null==i)throw function(t){return new pC("invalid-url","Invalid URL '"+t+"'.")}(e);return i},t}(); 8505/** 8506 * @license 8507 * Copyright 2017 Google LLC 8508 * 8509 * Licensed under the Apache License, Version 2.0 (the "License"); 8510 * you may not use this file except in compliance with the License. 8511 * You may obtain a copy of the License at 8512 * 8513 * http://www.apache.org/licenses/LICENSE-2.0 8514 * 8515 * Unless required by applicable law or agreed to in writing, software 8516 * distributed under the License is distributed on an "AS IS" BASIS, 8517 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8518 * See the License for the specific language governing permissions and 8519 * limitations under the License. 8520 */ 8521/** 8522 * @license 8523 * Copyright 2017 Google LLC 8524 * 8525 * Licensed under the Apache License, Version 2.0 (the "License"); 8526 * you may not use this file except in compliance with the License. 8527 * You may obtain a copy of the License at 8528 * 8529 * http://www.apache.org/licenses/LICENSE-2.0 8530 * 8531 * Unless required by applicable law or agreed to in writing, softw
8531are 8532 * distributed under the License is distributed on an "AS IS" BASIS, 8533 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8534 * See the License for the specific language governing permissions and 8535 * limitations under the License. 8536 */ 8537function WC(t){var e,i;try{e=JSON.parse(t)}catch(lC){return null}return"object"!=typeof(i=e)||Array.isArray(i)?null:e} 8538/** 8539 * @license 8540 * Copyright 2017 Google LLC 8541 * 8542 * Licensed under the Apache License, Version 2.0 (the "License"); 8543 * you may not use this file except in compliance with the License. 8544 * You may obtain a copy of the License at 8545 * 8546 * http://www.apache.org/licenses/LICENSE-2.0 8547 * 8548 * Unless required by applicable law or agreed to in writing, software 8549 * distributed under the License is distributed on an "AS IS" BASIS, 8550 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8551 * See the License for the specific language governing permissions and 8552 * limitations under the License. 8553 */function jC(t){var e=t.lastIndexOf("/",t.length-2);return-1===e?t:t.slice(e+1)} 8554/** 8555 * @license 8556 * Copyright 2017 Google LLC 8557 * 8558 * Licensed under the Apache License, Version 2.0 (the "License"); 8559 * you may not use this file except in compliance with the License. 8560 * You may obtain a copy of the License at 8561 * 8562 * http://www.apache.org/licenses/LICENSE-2.0 8563 * 8564 * Unless required by applicable law or agreed to in writing, software 8565 * distributed under the License is distributed on an "AS IS" BASIS, 8566 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8567 * See the License for the specific language governing permissions and 8568 * limitations under the License. 8569 */function HC(t){return"https://firebasestorage.googleapis.com/v0"+t}function qC(t){var e=encodeURIComponent,i="?";for(var n in t){if(t.hasOwnProperty(n))i=i+(e(n)+"="+e(t[n]))+"&"}return i=i.slice(0,-1)} 8570/** 8571 * @license 8572 * Copyright 2017 Google LLC 8573 * 8574 * Licensed under the Apache License, Version 2.0 (the "License"); 8575 * you may not use this file except in compliance with the License. 8576 * You may obtain a copy of the License at 8577 * 8578 * http://www.apache.org/licenses/LICENSE-2.0 8579 * 8580 * Unless required by applicable law or agreed to in writing, software 8581 * distributed under the License is distributed on an "AS IS" BASIS, 8582 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8583 * See the License for the specific language governing permissions and 8584 * limitations under the License. 8585 */function KC(t,e){return e}var ZC=function(t,e,i,n){this.server=t,this.local=e||t,this.writable=!!i,this.xform=n||KC},QC=null;function JC(){if(QC)return QC;var t=[];t.push(new ZC("bucket")),t.push(new ZC("generation")),t.push(new ZC("metageneration")),t.push(new ZC("name","fullPath",!0));var e=new ZC("name");e.xform=function(t,e){return function(t){return!NC(t)||t.length<2?t:jC(t)}(e)},t.push(e);var i=new ZC("size");return i.xform=function(t,e){return void 0!==e?Number(e):e},t.push(i),t.push(new ZC("timeCreated")),t.push(new ZC("updated")),t.push(new ZC("md5Hash",null,!0)),t.push(new ZC("cacheControl",null,!0)),t.push(new ZC("contentDisposition",null,!0)),t.push(new ZC("contentEncoding",null,!0)),t.push(new ZC("contentLanguage",null,!0)),t.push(new ZC("contentType",null,!0)),t.push(new ZC("metadata","customMetadata",!0)),QC=t}function $C(t,e,i){for(var n={type:"file"},r=i.length,s=0;s<r;s++){var o=i[s];n[o.local]=o.xform(n,e[o.server])}return function(t,e){Object.defineProperty(t,"ref",{get:function(){var i=t.bucket,n=t.fullPath,r=new GC(i,n);return e._makeStorageReference(r)}})}(n,t),n}function tO(t,e,i){var n=WC(e);return null===n?null:$C(t,n,i)}function eO(t,e){for(var i={},n=e.length,r=0;r<n;r++){var s=e[r];s.writable&&(i[s.server]=t[s.local])}return JSON.stringify(i)} 8586/** 8587 * @license 8588 * Copyright 2019 Google LLC 8589 * 8590 * Licensed under the Apache License, Version 2.0 (the "License"); 8591 * you may not use this file except in compliance with the License. 8592 * You may obtain a copy of the License at 8593 * 8594 * http://www.apache.org/licenses/LICENSE-2.0 8595 * 8596 * Unless required by applicable law or agreed to in writing, softw
8596are 8597 * distributed under the License is distributed on an "AS IS" BASIS, 8598 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8599 * See the License for the specific language governing permissions and 8600 * limitations under the License. 8601 */function iO(t,e,i){var n=WC(i);return null===n?null:function(t,e,i){var n={prefixes:[],items:[],nextPageToken:i.nextPageToken};if(i.prefixes)for(var r=0,s=i.prefixes;r<s.length;r++){var o=s[r].replace(/\/$/,""),a=t._makeStorageReference(new GC(e,o));n.prefixes.push(a)}if(i.items)for(var h=0,u=i.items;h<u.length;h++){var l=u[h];a=t._makeStorageReference(new GC(e,l.name)),n.items.push(a)}return n}(t,e,n)}var nO=function(t,e,i,n){this.url=t,this.method=e,this.handler=i,this.timeout=n,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}; 8602/** 8603 * @license 8604 * Copyright 2017 Google LLC 8605 * 8606 * Licensed under the Apache License, Version 2.0 (the "License"); 8607 * you may not use this file except in compliance with the License. 8608 * You may obtain a copy of the License at 8609 * 8610 * http://www.apache.org/licenses/LICENSE-2.0 8611 * 8612 * Unless required by applicable law or agreed to in writing, software 8613 * distributed under the License is distributed on an "AS IS" BASIS, 8614 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8615 * See the License for the specific language governing permissions and 8616 * limitations under the License. 8617 */function rO(t){if(!t)throw gC()}function sO(t,e){return function(i,n){var r=tO(t,n,e);return rO(null!==r),r}}function oO(t,e){return function(i,n){var r=tO(t,n,e);return rO(null!==r),function(t,e){var i=WC(e);if(null===i)return null;if(!NC(i.downloadTokens))return null;var n=i.downloadTokens;if(0===n.length)return null;var r=encodeURIComponent;return n.split(",").map((function(e){var i=t.bucket,n=t.fullPath;return HC("/b/"+r(i)+"/o/"+r(n))+qC({alt:"media",token:e})}))[0]}(r,n)}}function aO(t){return function(e,i){var n,r,s;return 401===e.getStatus()?n=new pC("unauthenticated","User is not authenticated, please authenticate using Firebase Authentication and try again."):402===e.getStatus()?(s=t.bucket,n=new pC("quota-exceeded","Quota for bucket '"+s+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===e.getStatus()?(r=t.path,n=new pC("unauthorized","User does not have permission to access '"+r+"'.")):n=i,n.serverResponse=i.serverResponse,n}}function hO(t){var e=aO(t);return function(i,n){var r,s=e(i,n);return 404===i.getStatus()&&(r=t.path,s=new pC("object-not-found","Object '"+r+"' does not exist.")),s.serverResponse=n.serverResponse,s}}function uO(t,e,i){var n=HC(e.fullServerUrl()),r=t.maxOperationRetryTime,s=new nO(n,"GET",sO(t,i),r);return s.errorHandler=hO(e),s}function lO(t,e,i,n,r){var s={};e.isRoot?s.prefix="":s.prefix=e.path+"/",i&&i.length>0&&(s.delimiter=i),n&&(s.pageToken=n),r&&(s.maxResults=r);var o=HC(e.bucketOnlyServerUrl()),a=t.maxOperationRetryTime,h=new nO(o,"GET",function(t,e){return function(i,n){var r=iO(t,e,n);return rO(null!==r),r}}(t,e.bucket),a);return h.urlParams=s,h.errorHandler=aO(e),h}function cO(t,e,i){var n=Object.assign({},i);return n.fullPath=t.path,n.size=e.size(),n.contentType||(n.contentType=function(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}(null,e)),n}var fO=function(t,e,i,n){this.current=t,this.total=e,this.finalized=!!i,this.metadata=n||null};function dO(t,e){var i=null;try{i=t.getResponseHeader("X-Goog-Upload-Status")}catch(lC){rO(!1)}return rO(!!i&&-1!==(e||["active"]).indexOf(i)),i}function pO(t,e,i,n,r,s,o,a){var h=new fO(0,0);if(o?(h.current=o.current,h.total=o.total):(h.current=0,h.total=n.size()),n.size()!==h.total)throw new pC("server-file-wrong-size","Server recorded incorrect upload file size, please retry the upload.");var u=h.total-h.current,l=u;r>0&&(l=Math.min(l,r));var c=h.current,f=c+l,d={"X-Goog-Upload-Command":l===u?"upload, finalize":"upload","X-Goog-Upload-Offset":h.current},p=n.slice(c,f);if(null===p)throw yC();var v=e.maxUploadRetryTime,g=new nO(i,"POST",(function(t,i){var r,o=dO(t,["active","final"]),a=h.current+l,u=n.size();return r="final"===o?sO(e,s)(t,i):null,new fO(a,u,"final"===o,r)}),v);return g.headers=d,g.body=p.uploadData(),g.progressCallback=a||null,g.errorHandler=aO(t),g} 8618/** 8619 * @license 8620 * Copyright 2017 Google LLC 8621 * 8622 * Licensed under the Apache License, Version 2.0 (the "License");
8623 * you may not use this file except in compliance with the License. 8624 * You may obtain a copy of the License at 8625 * 8626 * http://www.apache.org/licenses/LICENSE-2.0 8627 * 8628 * Unless required by applicable law or agreed to in writing, software 8629 * distributed under the License is distributed on an "AS IS" BASIS, 8630 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8631 * See the License for the specific language governing permissions and 8632 * limitations under the License. 8633 */var vO=function(t,e,i){if("function"==typeof t||null!=e||null!=i)this.next=t,this.error=e,this.complete=i;else{var n=t;this.next=n.next,this.error=n.error,this.complete=n.complete}}; 8634/** 8635 * @license 8636 * Copyright 2017 Google LLC 8637 * 8638 * Licensed under the Apache License, Version 2.0 (the "License"); 8639 * you may not use this file except in compliance with the License. 8640 * You may obtain a copy of the License at 8641 * 8642 * http://www.apache.org/licenses/LICENSE-2.0 8643 * 8644 * Unless required by applicable law or agreed to in writing, software 8645 * distributed under the License is distributed on an "AS IS" BASIS, 8646 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8647 * See the License for the specific language governing permissions and 8648 * limitations under the License. 8649 */function gO(t){return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];Promise.resolve().then((function(){return t.apply(void 0,e)}))}} 8650/** 8651 * @license 8652 * Copyright 2017 Google LLC 8653 * 8654 * Licensed under the Apache License, Version 2.0 (the "License"); 8655 * you may not use this file except in compliance with the License. 8656 * You may obtain a copy of the License at 8657 * 8658 * http://www.apache.org/licenses/LICENSE-2.0 8659 * 8660 * Unless required by applicable law or agreed to in writing, software 8661 * distributed under the License is distributed on an "AS IS" BASIS, 8662 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8663 * See the License for the specific language governing permissions and 8664 * limitations under the License. 8665 */var mO=function(){function t(t,e,i){var n=this;void 0===i&&(i=null),this._transferred=0,this._needToFetchStatus=!1,this._needToFetchMetadata=!1,this._observers=[],this._error=void 0,this._uploadUrl=void 0,this._request=void 0,this._chunkMultiplier=1,this._resolve=void 0,this._reject=void 0,this._ref=t,this._blob=e,this._metadata=i,this._mappings=JC(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=function(t){n._request=void 0,n._chunkMultiplier=1,t._codeEquals("canceled")?(n._needToFetchStatus=!0,n.completeTransitions_()):(n._error=t,n._transition("error"))},this._metadataErrorHandler=function(t){n._request=void 0,t._codeEquals("canceled")?n.completeTransitions_():(n._error=t,n._transition("error"))},this._promise=new Promise((function(t,e){n._resolve=t,n._reject=e,n._start()})),this._promise.then(null,(function(){}))}return t.prototype._makeProgressCallback=function(){var t=this,e=this._transferred;return function(i){return t._updateProgress(e+i)}},t.prototype._shouldDoResumable=function(t){return t.size()>262144},t.prototype._start=function(){"running"===this._state&&void 0===this._request&&(this._resumable?void 0===this._uploadUrl?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this._continueUpload():this._oneShotUpload())},t.prototype._resolveToken=function(t){var e=this;this._ref.storage._getAuthToken().then((function(i){switch(e._state){case"running":t(i);break;case"canceling":e._transition("canceled");break;case"pausing":e._transition("paused")}}))},t.prototype._createResumable=function(){var t=this;this._resolveToken((function(e){var i=function(t,e,i,n,r){var s=e.bucketOnlyServerUrl(),o=cO(e,n,r),a={name:o.fullPath},h=HC(s),u={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":n.size(),"X-Goog-Upload-Header-Content-Type":o.contentType,"Content-Type":"application/json; charset=utf-8"},l=eO(o,i),c=t.maxUploadRetryTime,f=new nO(h,"POST",(function(t){var e;dO(t);try{e=t.getResponseHeader("X-Goog-Upload-URL")}catch(lC){rO(!1)}return rO(NC(e)),e}),c);
8665return f.urlParams=a,f.headers=u,f.body=l,f.errorHandler=aO(e),f}(t._ref.storage,t._ref._location,t._mappings,t._blob,t._metadata),n=t._ref.storage._makeRequest(i,e);t._request=n,n.getPromise().then((function(e){t._request=void 0,t._uploadUrl=e,t._needToFetchStatus=!1,t.completeTransitions_()}),t._errorHandler)}))},t.prototype._fetchStatus=function(){var t=this,e=this._uploadUrl;this._resolveToken((function(i){var n=function(t,e,i,n){var r=t.maxUploadRetryTime,s=new nO(i,"POST",(function(t){var e=dO(t,["active","final"]),i=null;try{i=t.getResponseHeader("X-Goog-Upload-Size-Received")}catch(lC){rO(!1)}i||rO(!1);var r=Number(i);return rO(!isNaN(r)),new fO(r,n.size(),"final"===e)}),r);return s.headers={"X-Goog-Upload-Command":"query"},s.errorHandler=aO(e),s}(t._ref.storage,t._ref._location,e,t._blob),r=t._ref.storage._makeRequest(n,i);t._request=r,r.getPromise().then((function(e){e=e,t._request=void 0,t._updateProgress(e.current),t._needToFetchStatus=!1,e.finalized&&(t._needToFetchMetadata=!0),t.completeTransitions_()}),t._errorHandler)}))},t.prototype._continueUpload=function(){var t=this,e=262144*this._chunkMultiplier,i=new fO(this._transferred,this._blob.size()),n=this._uploadUrl;this._resolveToken((function(r){var s;try{s=pO(t._ref._location,t._ref.storage,n,t._blob,e,t._mappings,i,t._makeProgressCallback())}catch(lC){return t._error=lC,void t._transition("error")}var o=t._ref.storage._makeRequest(s,r);t._request=o,o.getPromise().then((function(e){t._increaseMultiplier(),t._request=void 0,t._updateProgress(e.current),e.finalized?(t._metadata=e.metadata,t._transition("success")):t.completeTransitions_()}),t._errorHandler)}))},t.prototype._increaseMultiplier=function(){262144*this._chunkMultiplier<33554432&&(this._chunkMultiplier*=2)},t.prototype._fetchMetadata=function(){var t=this;this._resolveToken((function(e){var i=uO(t._ref.storage,t._ref._location,t._mappings),n=t._ref.storage._makeRequest(i,e);t._request=n,n.getPromise().then((function(e){t._request=void 0,t._metadata=e,t._transition("success")}),t._metadataErrorHandler)}))},t.prototype._oneShotUpload=function(){var t=this;this._resolveToken((function(e){var i=function(t,e,i,n,r){var s=e.bucketOnlyServerUrl(),o={"X-Goog-Upload-Protocol":"multipart"},a=function(){for(var t="",e=0;e<2;e++)t+=Math.random().toString().slice(2);return t}();o["Content-Type"]="multipart/related; boundary="+a;var h=cO(e,n,r),u="--"+a+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+eO(h,i)+"\r\n--"+a+"\r\nContent-Type: "+h.contentType+"\r\n\r\n",l="\r\n--"+a+"--",c=XC.getBlob(u,n,l);if(null===c)throw yC();var f={name:h.fullPath},d=HC(s),p=t.maxUploadRetryTime,v=new nO(d,"POST",sO(t,i),p);return v.urlParams=f,v.headers=o,v.body=c.uploadData(),v.errorHandler=aO(e),v}(t._ref.storage,t._ref._location,t._mappings,t._blob,t._metadata),n=t._ref.storage._makeRequest(i,e);t._request=n,n.getPromise().then((function(e){t._request=void 0,t._metadata=e,t._updateProgress(t._blob.size()),t._transition("success")}),t._errorHandler)}))},t.prototype._updateProgress=function(t){var e=this._transferred;this._transferred=t,this._transferred!==e&&this._notifyObservers()},t.prototype._transition=function(t){if(this._state!==t)switch(t){case"canceling":case"pausing":this._state=t,void 0!==this._request&&this._request.cancel();break;case"running":var e="paused"===this._state;this._state=t,e&&(this._notifyObservers(),this._start());break;case"paused":this._state=t,this._notifyObservers();break;case"canceled":this._error=mC(),this._state=t,this._notifyObservers();break;case"error":case"success":this._state=t,this._notifyObservers()}},t.prototype.completeTransitions_=function(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start()}},Object.defineProperty(t.prototype,"snapshot",{get:function(){var t=LC(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:t,metadata:this._metadata,task:this,ref:this._ref}},enumerable:!1,configurable:!0}),t.prototype.on=function(t,e,i,n){var r=this,s=new vO(e,i,n);return this._addObserver(s),function(){r._removeObserver(s)}},t.prototype.then=function(t,e){return this._promise.then(t,e)},t.prototype.catch=function(t){return this.then(null,t)},t.prototype._addObserver=function(t){this._observers.push(t),this._notifyObserver(t)},t.prototype._removeObserver=function(t){var e=this._observers.indexOf(t);-1!==e&&this._observers.splice(e,1)},t.prototype._notifyObservers=function(){var t=this;
8665this._finishPromise(),this._observers.slice().forEach((function(e){t._notifyObserver(e)}))},t.prototype._finishPromise=function(){if(void 0!==this._resolve){var t=!0;switch(LC(this._state)){case kC.SUCCESS:gO(this._resolve.bind(null,this.snapshot))();break;case kC.CANCELED:case kC.ERROR:gO(this._reject.bind(null,this._error))();break;default:t=!1}t&&(this._resolve=void 0,this._reject=void 0)}},t.prototype._notifyObserver=function(t){switch(LC(this._state)){case kC.RUNNING:case kC.PAUSED:t.next&&gO(t.next.bind(t,this.snapshot))();break;case kC.SUCCESS:t.complete&&gO(t.complete.bind(t))();break;case kC.CANCELED:case kC.ERROR:t.error&&gO(t.error.bind(t,this._error))();break;default:t.error&&gO(t.error.bind(t,this._error))()}},t.prototype.resume=function(){var t="paused"===this._state||"pausing"===this._state;return t&&this._transition("running"),t},t.prototype.pause=function(){var t="running"===this._state;return t&&this._transition("pausing"),t},t.prototype.cancel=function(){var t="running"===this._state||"pausing"===this._state;return t&&this._transition("canceling"),t},t}(),yO=function(){function t(t,e){this._service=t,this._location=e instanceof GC?e:GC.makeFromUrl(e)}return t.prototype.toString=function(){return"gs://"+this._location.bucket+"/"+this._location.path},t.prototype._newRef=function(e,i){return new t(e,i)},Object.defineProperty(t.prototype,"root",{get:function(){var t=new GC(this._location.bucket,"");return this._newRef(this._service,t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bucket",{get:function(){return this._location.bucket},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fullPath",{get:function(){return this._location.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return jC(this._location.path)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storage",{get:function(){return this._service},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var e=function(t){if(0===t.length)return null;var e=t.lastIndexOf("/");return-1===e?"":t.slice(0,e)}(this._location.path);if(null===e)return null;var i=new GC(this._location.bucket,e);return new t(this._service,i)},enumerable:!1,configurable:!0}),t.prototype._throwIfRoot=function(t){if(""===this._location.path)throw _C(t)},t}(); 8666/** 8667 * @license 8668 * Copyright 2019 Google LLC 8669 * 8670 * Licensed under the Apache License, Version 2.0 (the "License"); 8671 * you may not use this file except in compliance with the License. 8672 * You may obtain a copy of the License at 8673 * 8674 * http://www.apache.org/licenses/LICENSE-2.0 8675 * 8676 * Unless required by applicable law or agreed to in writing, software 8677 * distributed under the License is distributed on an "AS IS" BASIS, 8678 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8679 * See the License for the specific language governing permissions and 8680 * limitations under the License. 8681 */function xO(t){var e={prefixes:[],items:[]};return wO(t,e).then((function(){return e}))}function wO(t,e,i){return af(this,void 0,void 0,(function(){var n,r,s;return hf(this,(function(o){switch(o.label){case 0:return[4,_O(t,{pageToken:i})];case 1:return n=o.sent(),(r=e.prefixes).push.apply(r,n.prefixes),(s=e.items).push.apply(s,n.items),null==n.nextPageToken?[3,3]:[4,wO(t,e,n.nextPageToken)];case 2:o.sent(),o.label=3;case 3:return[2]}}
8681))}))}function _O(t,e){return af(this,void 0,void 0,(function(){var i,n,r;return hf(this,(function(s){switch(s.label){case 0:return null!=e&&"number"==typeof e.maxResults&&VC("options.maxResults",1,1e3,e.maxResults),[4,t.storage._getAuthToken()];case 1:return i=s.sent(),n=e||{},r=lO(t.storage,t._location,"/",n.pageToken,n.maxResults),[2,t.storage._makeRequest(r,i).getPromise()]}}))}))}function bO(t,e){return af(this,void 0,void 0,(function(){var i,n;return hf(this,(function(r){switch(r.label){case 0:return t._throwIfRoot("updateMetadata"),[4,t.storage._getAuthToken()];case 1:return i=r.sent(),n=function(t,e,i,n){var r=HC(e.fullServerUrl()),s=eO(i,n),o=t.maxOperationRetryTime,a=new nO(r,"PATCH",sO(t,n),o);return a.headers={"Content-Type":"application/json; charset=utf-8"},a.body=s,a.errorHandler=hO(e),a}(t.storage,t._location,e,JC()),[2,t.storage._makeRequest(n,i).getPromise()]}}))}))}function TO(t){return af(this,void 0,void 0,(function(){var e,i;return hf(this,(function(n){switch(n.label){case 0:return t._throwIfRoot("getDownloadURL"),[4,t.storage._getAuthToken()];case 1:return e=n.sent(),i=function(t,e,i){var n=HC(e.fullServerUrl()),r=t.maxOperationRetryTime,s=new nO(n,"GET",oO(t,i),r);return s.errorHandler=hO(e),s}(t.storage,t._location,JC()),[2,t.storage._makeRequest(i,e).getPromise().then((function(t){if(null===t)throw new pC("no-download-url","The given file does not have any download URLs.");return t}))]}}))}))}function EO(t){return af(this,void 0,void 0,(function(){var e,i;return hf(this,(function(n){switch(n.label){case 0:return t._throwIfRoot("deleteObject"),[4,t.storage._getAuthToken()];case 1:return e=n.sent(),i=function(t,e){var i=HC(e.fullServerUrl()),n=t.maxOperationRetryTime,r=new nO(i,"DELETE",(function(t,e){}),n);return r.successCodes=[200,204],r.errorHandler=hO(e),r}(t.storage,t._location),[2,t.storage._makeRequest(i,e).getPromise()]}}))}))}function SO(t,e){var i=function(t,e){var i=e.split("/").filter((function(t){return t.length>0})).join("/");return 0===t.length?i:t+"/"+i}(t._location.path,e),n=new GC(t._location.bucket,i);return new yO(t.storage,n)} 8682/** 8683 * @license 8684 * Copyright 2020 Google LLC 8685 * 8686 * Licensed under the Apache License, Version 2.0 (the "License"); 8687 * you may not use this file except in compliance with the License. 8688 * You may obtain a copy of the License at 8689 * 8690 * http://www.apache.org/licenses/LICENSE-2.0 8691 * 8692 * Unless required by applicable law or agreed to in writing, software 8693 * distributed under the License is distributed on an "AS IS" BASIS, 8694 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8695 * See the License for the specific language governing permissions and 8696 * limitations under the License. 8697 */var AO=function(){function t(t,e,i){this._delegate=t,this.task=e,this.ref=i}return Object.defineProperty(t.prototype,"bytesTransferred",{get:function(){return this._delegate.bytesTransferred},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"metadata",{get:function(){return this._delegate.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._delegate.state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalBytes",{get:function(){return this._delegate.totalBytes},enumerable:!1,configurable:!0}),t}(),CO=function(){function t(t,e){this._delegate=t,this._ref=e,this.cancel=this._delegate.cancel.bind(this._delegate),this.catch=this._delegate.catch.bind(this._delegate),this.pause=this._delegate.pause.bind(this._delegate),this.resume=this._delegate.resume.bind(this._delegate)}return Object.defineProperty(t.prototype,"snapshot",{get:function(){return new AO(this._delegate.snapshot,this,this._ref)},enumerable:!1,configurable:!0}),t.prototype.then=function(t,e){var i=this;return this._delegate.then((function(e){if(t)return t(new AO(e,i,i._ref))}),e)},t.prototype.on=function(t,e,i,n){var r=this,s=void 0;return e&&(s="function"==typeof e?function(t){return e(new AO(t,r,r._ref))}:{next:e.next?function(t){return e.next(new AO(t,r,r._ref))}:void 0,complete:e.complete||void 0,error:e.error||void 0}),this._delegate.on(t,s,i||void 0,n||void 0)},t}(),OO=function(){function t(t,e){this._delegate=t,this._service=e}return Object.defineProperty(t.prototype,"prefixes",{get:function(){var t=this;return this._delegate.prefixes.map((function(e){return new RO(e,t._service)}))}
8697,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){var t=this;return this._delegate.items.map((function(e){return new RO(e,t._service)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextPageToken",{get:function(){return this._delegate.nextPageToken||null},enumerable:!1,configurable:!0}),t}(),RO=function(){function t(t,e){this._delegate=t,this.storage=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this._delegate.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bucket",{get:function(){return this._delegate.bucket},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fullPath",{get:function(){return this._delegate.fullPath},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return this._delegate.toString()},t.prototype.child=function(e){return new t(SO(this._delegate,e),this.storage)},Object.defineProperty(t.prototype,"root",{get:function(){return new t(this._delegate.root,this.storage)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var e=this._delegate.parent;return null==e?null:new t(e,this.storage)},enumerable:!1,configurable:!0}),t.prototype.put=function(t,e){return this._throwIfRoot("put"),new CO(function(t,e,i){return t._throwIfRoot("uploadBytesResumable"),new mO(t,new XC(e),i)}(this._delegate,t,e),this)},t.prototype.putString=function(t,e,i){void 0===e&&(e=EC.RAW),this._throwIfRoot("putString");var n=AC(e,t),r=of({},i);return null==r.contentType&&null!=n.contentType&&(r.contentType=n.contentType),new CO(new mO(this._delegate,new XC(n.data,!0),r),this)},t.prototype.listAll=function(){var t=this;return xO(this._delegate).then((function(e){return new OO(e,t.storage)}))},t.prototype.list=function(t){var e=this;return _O(this._delegate,t).then((function(t){return new OO(t,e.storage)}))},t.prototype.getMetadata=function(){return function(t){return af(this,void 0,void 0,(function(){var e,i;return hf(this,(function(n){switch(n.label){case 0:return t._throwIfRoot("getMetadata"),[4,t.storage._getAuthToken()];case 1:return e=n.sent(),i=uO(t.storage,t._location,JC()),[2,t.storage._makeRequest(i,e).getPromise()]}}))}))}(this._delegate)},t.prototype.updateMetadata=function(t){return bO(this._delegate,t)},t.prototype.getDownloadURL=function(){return TO(this._delegate)},t.prototype.delete=function(){return this._throwIfRoot("delete"),EO(this._delegate)},t.prototype._throwIfRoot=function(t){if(""===this._delegate._location.path)throw _C(t)},t}(),MO=function(){function t(t){this.promise_=Promise.reject(t)}return t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){},t}(); 8698/** 8699 * @license 8700 * Copyright 2020 Google LLC 8701 * 8702 * Licensed under the Apache License, Version 2.0 (the "License"); 8703 * you may not use this file except in compliance with the License. 8704 * You may obtain a copy of the License at 8705 * 8706 * http://www.apache.org/licenses/LICENSE-2.0 8707 * 8708 * Unless required by applicable law or agreed to in writing, software 8709 * distributed under the License is distributed on an "AS IS" BASIS, 8710 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8711 * See the License for the specific language governing permissions and 8712 * limitations under the License. 8713 */ 8714/** 8715 * @license 8716 * Copyright 2017 Google LLC 8717 * 8718 * Licensed under the Apache License, Version 2.0 (the "License"); 8719 * you may not use this file except in compliance with the License. 8720 * You may obtain a copy of the License at 8721 * 8722 * http://www.apache.org/licenses/LICENSE-2.0 8723 * 8724 * Unless required by applicable law or agreed to in writing, software 8725 * distributed under the License is distributed on an "AS IS" BASIS, 8726 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8727 * See the License for the specific language governing permissions and 8728 * limitations under the License. 8729 */ 8730var PO=function(){function t(t,e,i,n,r,s,o,a,h,u,l){var c=this;this.pendingXhr_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.url_=t,this.method_=e,this.headers_=i,this.body_=n,this.successCodes_=r.slice(),this.additionalRetryCodes_=s.slice(),this.callback_=o,this.errorCallback_=a,this.progressCallback_=u,this.timeout_=h,this.pool_=l,this.promise_=new Promise((function(t,e){c.resolve_=t,c.reject_=e,c.start_()}
8730))}return t.prototype.start_=function(){var t=this;function e(e,i){var n,r=t.resolve_,s=t.reject_,o=i.xhr;if(i.wasSuccessCode)try{var a=t.callback_(o,o.getResponseText());void 0!==a?r(a):r()}catch(lC){s(lC)}else null!==o?((n=gC()).serverResponse=o.getResponseText(),t.errorCallback_?s(t.errorCallback_(o,n)):s(n)):i.canceled?s(n=t.appDelete_?wC():mC()):s(n=new pC("retry-limit-exceeded","Max retry time for operation exceeded, please try again."))}this.canceled_?e(0,new IO(!1,null,!0)):this.backoffId_= 8731/** 8732 * @license 8733 * Copyright 2017 Google LLC 8734 * 8735 * Licensed under the Apache License, Version 2.0 (the "License"); 8736 * you may not use this file except in compliance with the License. 8737 * You may obtain a copy of the License at 8738 * 8739 * http://www.apache.org/licenses/LICENSE-2.0 8740 * 8741 * Unless required by applicable law or agreed to in writing, software 8742 * distributed under the License is distributed on an "AS IS" BASIS, 8743 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8744 * See the License for the specific language governing permissions and 8745 * limitations under the License. 8746 */ 8747function(t,e,i){var n=1,r=null,s=!1,o=0;function a(){return 2===o}var h=!1;function u(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];h||(h=!0,e.apply(null,t))}function l(e){r=setTimeout((function(){r=null,t(c,a())}),e)}function c(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!h)if(t)u.call.apply(u,cf([null,t],e));else{var r;a()||s?u.call.apply(u,cf([null,t],e)):(n<64&&(n*=2),1===o?(o=2,r=0):r=1e3*(n+Math.random()),l(r))}}var f=!1;function d(t){f||(f=!0,h||(null!==r?(t||(o=2),clearTimeout(r),l(0)):t||(o=1)))}return l(0),setTimeout((function(){s=!0,d(!0)}),i),d}((function(e,i){if(i)e(!1,new IO(!1,null,!0));else{var n=t.pool_.createXhrIo();t.pendingXhr_=n,null!==t.progressCallback_&&n.addUploadProgressListener(r),n.send(t.url_,t.method_,t.body_,t.headers_).then((function(i){null!==t.progressCallback_&&i.removeUploadProgressListener(r),t.pendingXhr_=null;var n=(i=i).getErrorCode()===MC.NO_ERROR,s=i.getStatus();if(n&&!t.isRetryStatusCode_(s)){var o=-1!==t.successCodes_.indexOf(s);e(!0,new IO(o,i))}else{var a=i.getErrorCode()===MC.ABORT;e(!1,new IO(!1,null,a))}}))}function r(e){var i=e.loaded,n=e.lengthComputable?e.total:-1;null!==t.progressCallback_&&t.progressCallback_(i,n)}}),e,this.timeout_)},t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){this.canceled_=!0,this.appDelete_=t||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingXhr_&&this.pendingXhr_.abort()},t.prototype.isRetryStatusCode_=function(t){var e=t>=500&&t<600,i=-1!==[408,429].indexOf(t),n=-1!==this.additionalRetryCodes_.indexOf(t);return e||i||n},t}(),IO=function(t,e,i){this.wasSuccessCode=t,this.xhr=e,this.canceled=!!i}; 8748/** 8749 * @license 8750 * Copyright 2017 Google LLC 8751 * 8752 * Licensed under the Apache License, Version 2.0 (the "License"); 8753 * you may not use this file except in compliance with the License. 8754 * You may obtain a copy of the License at 8755 * 8756 * http://www.apache.org/licenses/LICENSE-2.0 8757 * 8758 * Unless required by applicable law or agreed to in writing, software 8759 * distributed under the License is distributed on an "AS IS" BASIS, 8760 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8761 * See the License for the specific language governing permissions and 8762 * limitations under the License. 8763 */ 8764function kO(t){return/^[A-Za-z]+:\/\//.test(t)}function LO(t,e){if(t instanceof BO){var i=t;if(null==i._bucket)throw new pC("no-default-bucket","No default bucket found. Did you set the 'storageBucket' property when initializing the app?");var n=new yO(i,i._bucket);return null!=e?LO(n,e):n}if(void 0!==e){if(e.includes(".."))throw xC('`path` param cannot contain ".."');return SO(t,e)}return t}function DO(t,e){if(e&&kO(e)){if(t instanceof BO)return new yO(t,e);throw xC("To use ref(service, url), the first argument must be a Storage instance.")}return LO(t,e)}var FO,NO,BO=function(){function t(t,e,i,n,r){var s,o;this.app=t,this._authProvider=e,this._pool=i,this._url=n,this._firebaseVersion=r,this._bucket=null,this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=n?GC.makeFromBucketSpec(n):(s=this.app.options,null==(o=null==s?void 0:s.storageBucket)?null:GC.makeFromBucketSpec(o))}return Object.defineProperty(t.prototype,"maxUploadRetryTime",{get:function(){return this._maxUploadRetryTime},set:function(t){VC("time",0,Number.POSITIVE_INFINITY,t),this._maxUploadRetryTime=t}
8764,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxOperationRetryTime",{get:function(){return this._maxOperationRetryTime},set:function(t){VC("time",0,Number.POSITIVE_INFINITY,t),this._maxOperationRetryTime=t},enumerable:!1,configurable:!0}),t.prototype._getAuthToken=function(){return af(this,void 0,void 0,(function(){var t,e;return hf(this,(function(i){switch(i.label){case 0:return(t=this._authProvider.getImmediate({optional:!0}))?[4,t.getToken()]:[3,2];case 1:if(null!==(e=i.sent()))return[2,e.accessToken];i.label=2;case 2:return[2,null]}}))}))},t.prototype._delete=function(){return this._deleted=!0,this._requests.forEach((function(t){return t.cancel()})),this._requests.clear(),Promise.resolve()},t.prototype._makeStorageReference=function(t){return new yO(this,t)},t.prototype._makeRequest=function(t,e){var i=this;if(this._deleted)return new MO(wC());var n=function(t,e,i,n,r){var s=qC(t.urlParams),o=t.url+s,a=Object.assign({},t.headers);return function(t,e){e&&(t["X-Firebase-GMPID"]=e)}(a,e),function(t,e){null!==e&&e.length>0&&(t.Authorization="Firebase "+e)}(a,i),function(t,e){t["X-Firebase-Storage-Version"]="webjs/"+(null!=e?e:"AppManager")}(a,r),new PO(o,t.method,a,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,n)}(t,this._appId,e,this._pool,this._firebaseVersion);return this._requests.add(n),n.getPromise().then((function(){return i._requests.delete(n)}),(function(){return i._requests.delete(n)})),n},t}(),UO=function(){function t(t,e){var i=this;this.app=t,this._delegate=e,this.INTERNAL={delete:function(){return i._delegate._delete()}}}return Object.defineProperty(t.prototype,"maxOperationRetryTime",{get:function(){return this._delegate.maxOperationRetryTime},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxUploadRetryTime",{get:function(){return this._delegate.maxUploadRetryTime},enumerable:!1,configurable:!0}),t.prototype.ref=function(t){if(kO(t))throw xC("ref() expected a child path but got a URL, use refFromURL instead.");return new RO(DO(this._delegate,t),this)},t.prototype.refFromURL=function(t){if(!kO(t))throw xC("refFromURL() expected a full URL but got a child path, use ref() instead.");try{GC.makeFromUrl(t)}catch(lC){throw xC("refFromUrl() expected a valid full URL but got an invalid one.")}return new RO(DO(this._delegate,t),this)},t.prototype.setMaxUploadRetryTime=function(t){this._delegate.maxUploadRetryTime=t},t.prototype.setMaxOperationRetryTime=function(t){this._delegate.maxOperationRetryTime=t},t}(); 8765/** 8766 * @license 8767 * Copyright 2020 Google LLC 8768 * 8769 * Licensed under the Apache License, Version 2.0 (the "License"); 8770 * you may not use this file except in compliance with the License. 8771 * You may obtain a copy of the License at 8772 * 8773 * http://www.apache.org/licenses/LICENSE-2.0 8774 * 8775 * Unless required by applicable law or agreed to in writing, software 8776 * distributed under the License is distributed on an "AS IS" BASIS, 8777 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8778 * See the License for the specific language governing permissions and 8779 * limitations under the License. 8780 */function VO(t,e){var i=t.getProvider("app").getImmediate(),n=t.getProvider("auth-internal");return new UO(i,new BO(i,n,new FC,e,$f.SDK_VERSION))}NO={TaskState:kC,TaskEvent:IC,StringFormat:EC,Storage:BO,Reference:RO},(FO=$f).INTERNAL.registerComponent(new Ef("storage",VO,"PUBLIC").setServiceProps(NO).setMultipleInstances(!0)),FO.registerVersion("@firebase/storage","0.4.3");let YO=t=>crypto.getRandomValues(new Uint8Array(t)),zO=(t,e)=>((t,e,i)=>{let n=(2<<Math.log(t.length-1)/Math.LN2)-1,r=-~(1.6*n*e/t.length);return()=>{let s="";for(;;){let o=i(r),a=r;for(;a--;)if(s+=t[o[a]&n]||"",s.length===e)return s}}})(t,e,YO) 8781/*! 8782 * vue-router v4.0.3 8783 * (c) 2021 Eduardo San Martin Morote 8784 * @license MIT 8785 */;const XO="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,GO=t=>XO?Symbol(t):"_vr_"+t,WO=GO("rvlm"),jO=GO("rvd"),HO=GO("r"),qO=GO("rl"),KO=GO("rvl"),ZO="undefined"!=typeof window;const QO=Object.assign;function JO(t,e){const i={};for(const n in e){const r=e[n];i[n]=Array.isArray(r)?r.map(t):t(r)}return i}let $O=()=>{};const tR=/\/$/;
8785function eR(t,e,i="/"){let n,r={},s="",o="";const a=e.indexOf("?"),h=e.indexOf("#",a>-1?a:0);return a>-1&&(n=e.slice(0,a),s=e.slice(a+1,h>-1?h:e.length),r=t(s)),h>-1&&(n=n||e.slice(0,h),o=e.slice(h,e.length)),n=function(t,e){if(t.startsWith("/"))return t;if(!t)return e;const i=e.split("/"),n=t.split("/");let r,s,o=i.length-1;for(r=0;r<n.length;r++)if(s=n[r],1!==o&&"."!==s){if(".."!==s)break;o--}return i.slice(0,o).join("/")+"/"+n.slice(r-(r===n.length?1:0)).join("/")}(null!=n?n:e,i),{fullPath:n+(s&&"?")+s+o,path:n,query:r,hash:o}}function iR(t,e){return!e||t.toLowerCase().indexOf(e.toLowerCase())?t:t.slice(e.length)||"/"}function nR(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function rR(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(let i in t)if(!sR(t[i],e[i]))return!1;return!0}function sR(t,e){return Array.isArray(t)?oR(t,e):Array.isArray(e)?oR(e,t):t===e}function oR(t,e){return Array.isArray(e)?t.length===e.length&&t.every(((t,i)=>t===e[i])):1===t.length&&t[0]===e}var aR,hR,uR,lR;function cR(t){if(!t)if(ZO){const e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return"/"!==t[0]&&"#"!==t[0]&&(t="/"+t),t.replace(tR,"")}(hR=aR||(aR={})).pop="pop",hR.push="push",(lR=uR||(uR={})).back="back",lR.forward="forward",lR.unknown="";const fR=/^[^#]+#/;function dR(t,e){return t.replace(fR,"#")+e}const pR=()=>({left:window.pageXOffset,top:window.pageYOffset});function vR(t){let e;if("el"in t){let i=t.el;const n="string"==typeof i&&i.startsWith("#"),r="string"==typeof i?n?document.getElementById(i.slice(1)):document.querySelector(i):i;if(!r)return;e=function(t,e){const i=document.documentElement.getBoundingClientRect(),n=t.getBoundingClientRect();return{behavior:e.behavior,left:n.left-i.left-(e.left||0),top:n.top-i.top-(e.top||0)}}(r,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(null!=e.left?e.left:window.pageXOffset,null!=e.top?e.top:window.pageYOffset)}
8785function gR(t,e){return(history.state?history.state.position-e:-1)+t}const mR=new Map;function yR(t,e){const{pathname:i,search:n,hash:r}=e;if(t.indexOf("#")>-1){let t=r.slice(1);return"/"!==t[0]&&(t="/"+t),iR(t,"")}return iR(i,t)+n+r}function xR(t,e,i,n=!1,r=!1){return{back:t,current:e,forward:i,replaced:n,position:window.history.length,scroll:r?pR():null}}function wR(t){const{history:e,location:i}=window;let n={value:yR(t,i)},r={value:e.state};function s(n,s,o){const a=t.indexOf("#"),h=a>-1?(i.host&&document.querySelector("base")?t:t.slice(a))+n:location.protocol+"//"+location.host+t+n;try{e[o?"replaceState":"pushState"](s,"",h),r.value=s}catch(u){console.error(u),i[o?"replace":"assign"](h)}}return r.value||s(n.value,{back:null,current:n.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0),{location:n,state:r,push:function(t,i){const o=QO({},r.value,e.state,{forward:t,scroll:pR()});s(o.current,o,!0),s(t,QO({},xR(n.value,t,null),{position:o.position+1},i),!1),n.value=t},replace:function(t,i){s(t,QO({},e.state,xR(r.value.back,t,r.value.forward,!0),i,{position:r.value.position}),!0),n.value=t}}}function _R(t){const e=wR(t=cR(t)),i=function(t,e,i,n){let r=[],s=[],o=null;const a=({state:s})=>{const a=yR(t,location),h=i.value,u=e.value;let l=0;if(s){if(i.value=a,e.value=s,o&&o===h)return void(o=null);l=u?s.position-u.position:0}else n(a);r.forEach((t=>{t(i.value,h,{delta:l,type:aR.pop,direction:l?l>0?uR.forward:uR.back:uR.unknown})}))};function h(){const{history:t}=window;t.state&&t.replaceState(QO({},t.state,{scroll:pR()}),"")}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",h),{pauseListeners:function(){o=i.value},listen:function(t){r.push(t);const e=()=>{const e=r.indexOf(t);e>-1&&r.splice(e,1)};return s.push(e),e},destroy:function(){for(const t of s)t();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",h)}}}(t,e.state,e.location,e.replace);const n=QO({location:"",base:t,go:function(t,e=!0){e||i.pauseListeners(),history.go(t)},createHref:dR.bind(null,t)},e,i);return Object.defineProperty(n,"location",{get:()=>e.location.value}),Object.defineProperty(n,"state",{get:()=>e.state.value}),n}function bR(t){return"string"==typeof t||"symbol"==typeof t}const TR={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},ER=GO("nf");var SR,AR;function CR(t,e){return QO(new Error,{type:t,[ER]:!0},e)}function OR(t,e){return t instanceof Error&&ER in t&&(null==e||!!(t.type&e))}(AR=SR||(SR={}))[AR.aborted=4]="aborted",AR[AR.cancelled=8]="cancelled",AR[AR.duplicated=16]="duplicated";const RR={sensitive:!1,strict:!1,start:!0,end:!0},MR=/[.+*?^${}()[\]/\\]/g;function PR(t,e){let i=0;for(;i<t.length&&i<e.length;){const n=e[i]-t[i];if(n)return n;i++}return t.length<e.length?1===t.length&&80===t[0]?-1:1:t.length>e.length?1===e.length&&80===e[0]?1:-1:0}function IR(t,e){let i=0;const n=t.score,r=e.score;for(;i<n.length&&i<r.length;){const t=PR(n[i],r[i]);if(t)return t;i++}return r.length-n.length}const kR={type:0,value:""},LR=/[a-zA-Z0-9_]/;function DR(t,e,i){const n=function(t,e){const i=QO({},RR,e);let n=[],r=i.start?"^":"";const s=[];for(const h of t){const t=h.length?[]:[90];i.strict&&!h.length&&(r+="/");for(let e=0;e<h.length;e++){const n=h[e];let o=40+(i.sensitive?.25:0);if(0===n.type)e||(r+="/"),r+=n.value.replace(MR,"\\$&"),o+=40;else if(1===n.type){const{value:t,repeatable:i,optional:h,regexp:u}=n;s.push({name:t,repeatable:i,optional:h});const l=u||"[^/]+?";if("[^/]+?"!==l){o+=10;try{new RegExp(`(${l})`)}catch(a){throw new Error(`Invalid custom RegExp for param "${t}" (${l}): `+a.message)}}let c=i?`((?:${l})(?:/(?:${l}))*)`:`(${l})`;e||(c=h?`(?:/${c})`:"/"+c),h&&(c+="?"),r+=c,o+=20,h&&(o+=-8),i&&(o+=-20),".*"===l&&(o+=-50)}t.push(o)}n.push(t)}if(i.strict&&i.end){const t=n.length-1;n[t][n[t].length-1]+=.7000000000000001}i.strict||(r+="/?"),i.end?r+="$":i.strict&&(r+="(?:/|$)");const o=new RegExp(r,i.sensitive?"":"i");return{re:o,score:n,keys:s,parse:function(t){const e=t.match(o),i={};if(!e)return null;for(let n=1;n<e.length;
8785n++){const t=e[n]||"",r=s[n-1];i[r.name]=t&&r.repeatable?t.split("/"):t}return i},stringify:function(e){let i="",n=!1;for(const r of t){n&&i.endsWith("/")||(i+="/"),n=!1;for(const t of r)if(0===t.type)i+=t.value;else if(1===t.type){const{value:r,repeatable:s,optional:o}=t,a=r in e?e[r]:"";if(Array.isArray(a)&&!s)throw new Error(`Provided param "${r}" is an array but it is not repeatable (* or + modifiers)`);const h=Array.isArray(a)?a.join("/"):a;if(!h){if(!o)throw new Error(`Missing required param "${r}"`);i.endsWith("/")?i=i.slice(0,-1):n=!0}i+=h}}return i}}}(function(t){if(!t)return[[]];if("/"===t)return[[kR]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(t){throw new Error(`ERR (${i})/"${u}": ${t}`)}let i=0,n=i;const r=[];let s;function o(){s&&r.push(s),s=[]}let a,h=0,u="",l="";function c(){u&&(0===i?s.push({type:0,value:u}):1===i||2===i||3===i?(s.length>1&&("*"===a||"+"===a)&&e(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:u,regexp:l,repeatable:"*"===a||"+"===a,optional:"*"===a||"?"===a})):e("Invalid state to consume buffer"),u="")}function f(){u+=a}for(;h<t.length;)if(a=t[h++],"\\"!==a||2===i)switch(i){case 0:"/"===a?(u&&c(),o()):":"===a?(c(),i=1):f();break;case 4:f(),i=n;break;case 1:"("===a?i=2:LR.test(a)?f():(c(),i=0,"*"!==a&&"?"!==a&&"+"!==a&&h--);break;case 2:")"===a?"\\"==l[l.length-1]?l=l.slice(0,-1)+a:i=3:l+=a;break;case 3:c(),i=0,"*"!==a&&"?"!==a&&"+"!==a&&h--,l="";break;default:e("Unknown state")}else n=i,i=4;return 2===i&&e(`Unfinished custom RegExp for param "${u}"`),c(),o(),r}(t.path),i),r=QO(n,{record:t,parent:e,children:[],alias:[]});return e&&!r.record.aliasOf==!e.record.aliasOf&&e.children.push(r),r}function FR(t,e){const i=[],n=new Map;function r(t,i,n){let a=!n,h=function(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:NR(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||{}:{default:t.component}}}(t);h.aliasOf=n&&n.record;const u=VR(e,t),l=[h];if("alias"in t){const e="string"==typeof t.alias?[t.alias]:t.alias;for(const t of e)l.push(QO({},h,{components:n?n.record.components:h.components,path:t,aliasOf:n?n.record:h}))}let c,f;for(const e of l){let{path:l}=e;if(i&&"/"!==l[0]){let t=i.record.path,n="/"===t[t.length-1]?"":"/";e.path=i.record.path+(l&&n+l)}if(c=DR(e,i,u),n?n.alias.push(c):(f=f||c,f!==c&&f.alias.push(c),a&&t.name&&!BR(c)&&s(t.name)),"children"in h){let t=h.children;for(let e=0;e<t.length;e++)r(t[e],c,n&&n.children[e])}n=n||c,o(c)}return f?()=>{s(f)}:$O}function s(t){if(bR(t)){const e=n.get(t);e&&(n.delete(t),i.splice(i.indexOf(e),1),e.children.forEach(s),e.alias.forEach(s))}else{let e=i.indexOf(t);e>-1&&(i.splice(e,1),t.record.name&&n.delete(t.record.name),t.children.forEach(s),t.alias.forEach(s))}}function o(t){let e=0;for(;e<i.length&&IR(t,i[e])>=0;)e++;i.splice(e,0,t),t.record.name&&!BR(t)&&n.set(t.record.name,t)}return e=VR({strict:!1,end:!0,sensitive:!1},e),t.forEach((t=>r(t))),{addRoute:r,resolve:function(t,e){let r,s,o,a={};if("name"in t&&t.name){if(r=n.get(t.name),!r)throw CR(1,{location:t});o=r.record.name,a=QO(function(t,e){let i={};for(let n of e)n in t&&(i[n]=t[n]);return i}(e.params,r.keys.filter((t=>!t.optional)).map((t=>t.name))),t.params),s=r.stringify(a)}else if("path"in t)s=t.path,r=i.find((t=>t.re.test(s))),r&&(a=r.parse(s),o=r.record.name);else{if(r=e.name?n.get(e.name):i.find((t=>t.re.test(e.path))),!r)throw CR(1,{location:t,currentLocation:e});o=r.record.name,a=QO({},e.params,t.params),s=r.stringify(a)}const h=[];let u=r;for(;u;)h.unshift(u.record),u=u.parent;return{name:o,path:s,params:a,matched:h,meta:UR(h)}},removeRoute:s,getRoutes:function(){return i},getRecordMatcher:function(t){return n.get(t)}}}function NR(t){const e={},i=t.props||!1;if("component"in t)e.default=i;else for(let n in t.components)e[n]="boolean"==typeof i?i:i[n];return e}function BR(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function UR(t){return t.reduce(((t,e)=>QO(t,e.meta)),{})}function VR(t,e){let i={};for(let n in t)i[n]=n in e?e[n]:t[n];return i}const YR=/#/g,zR=/&/g,XR=/\//g,GR=/=/g,WR=/\?/g,jR=/\+/g,HR=/%5B/g,qR=/%5D/g,KR=/%5E/g,ZR=/%60/g,QR=/%7B/g,JR=/%7C/g,$R=/%7D/g,tM=/%20/g;function eM(t){return encodeURI(""+t).replace(JR,"|").replace(HR,"[").replace(qR,"]")}function iM(t){return eM(t).replace(jR,"%2B").replace(tM,"+").replace(YR,"%23").replace(zR,"%26").replace(ZR,"`").replace(QR,"{").replace($R,"}").replace(KR,"^")}function nM(t){return function(t){return eM(t).replace(YR,"%23").replace(WR,"%3F")}(t).replace(XR,"%2F")}function rM(t){try{return decodeURIComponent(""+t)}catch(e){}return""+t}function sM(t){const e={};if(""===t||"?"===t)return e;const i=("?"===t[0]?t.slice(1):t).split("&");for(let n=0;n<i.length;++n){const t=i[n].replace(jR," ");let r=t.indexOf("="),s=rM(r<0?t:t.slice(0,r)),o=r<0?null:rM(t.slice(r+1));if(s in e){let t=e[s];Array.isArray(t)||(t=e[s]=[t]),t.push(o)}else e[s]=o}return e}function oM(t){let e="";for(let i in t){e.length&&(e+="&");const n=t[i];if(i=iM(i).replace(GR,"%3D"),null==n){void 0!==n&&(e+=i);continue}let r=Array.isArray(n)?n.map((t=>t&&iM(t))):[n&&iM(n)];for(let t=0;t<r.length;t++)e+=(t?"&":"")+i,null!=r[t]&&(e+="="+r[t])}return e}function aM(t){const e={};for(let i in t){let n=t[i];void 0!==n&&(e[i]=Array.isArray(n)?n.map((t=>null==t?null:""+t)):null==n?n:""+n)}return e}function hM(){let t=[];return{add:function(e){return t.push(e),()=>{const i=t.indexOf(e);i>-1&&t.splice(i,1)}},list:()=>t,reset:function(){t=[]}}}function uM(t,e,i,n,r){const s=n&&(n.enterCallbacks[r]=n.enterCallbacks[r]||[]);return()=>new Promise(((o,a)=>{const h=t=>{var h;!1===t?a(CR(4,{from:i,to:e})):t instanceof Error?a(t):"string"==typeof(h=t)||h&&"object"==typeof h?a(CR(2,{from:e,to:t})):(s&&n.enterCallbacks[r]===s&&"function"==typeof t&&s.push(t),o())},u=t.call(n&&n.instances[r],e,i,h);let l=Promise.resolve(u);t.length<3&&(l=l.then(h)),l.catch((t=>a(t)))}))}function lM(t,e,i,n){const r=[];for(const o of t)for(const t in o.components){let a=o.components[t];if("beforeRouteEnter"===e||o.instances[t])if("object"==typeof(s=a)||"dis
8785playName"in s||"props"in s||"__vccOpts"in s){const s=(a.__vccOpts||a)[e];s&&r.push(uM(s,i,n,o,t))}else{let s=a();s=s.catch(console.error),r.push((()=>s.then((r=>{if(!r)return Promise.reject(new Error(`Couldn't resolve component "${t}" at "${o.path}"`));const s=(a=r).__esModule||XO&&"Module"===a[Symbol.toStringTag]?r.default:r;var a;o.components[t]=s;const h=s[e];return h&&uM(h,i,n,o,t)()}))))}}var s;return r}function cM(t){const e=hn(HO),i=hn(qO),n=Pn((()=>e.resolve(ne(t.to)))),r=Pn((()=>{let{matched:t}=n.value,{length:e}=t;const r=t[e-1];let s=i.matched;if(!r||!s.length)return-1;let o=s.findIndex(nR.bind(null,r));if(o>-1)return o;let a=dM(t[e-2]);return e>1&&dM(r)===a&&s[s.length-1].path!==a?s.findIndex(nR.bind(null,t[e-2])):o})),s=Pn((()=>r.value>-1&&function(t,e){for(let i in e){let n=e[i],r=t[i];if("string"==typeof n){if(n!==r)return!1}else if(!Array.isArray(r)||r.length!==n.length||n.some(((t,e)=>t!==r[e])))return!1}return!0}(i.params,n.value.params))),o=Pn((()=>r.value>-1&&r.value===i.matched.length-1&&rR(i.params,n.value.params)));return{route:n,href:Pn((()=>n.value.href)),isActive:s,isExactActive:o,navigate:function(i={}){return function(t){if(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)return;if(t.defaultPrevented)return;if(void 0!==t.button&&0!==t.button)return;if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}t.preventDefault&&t.preventDefault();return!0}(i)?e[ne(t.replace)?"replace":"push"](ne(t.to)):Promise.resolve()}}}const fM=Oi({name:"RouterLink",props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},setup(t,{slots:e,attrs:i}){const n=jt(cM(t)),{options:r}=hn(HO),s=Pn((()=>({[pM(t.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[pM(t.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive})));return()=>{const r=e.default&&e.default(n);return t.custom?r:In("a",QO({"aria-current":n.isExactActive?t.ariaCurrentValue:null,onClick:n.navigate,href:n.href},i,{class:s.value}),r)}}});function dM(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const pM=(t,e,i)=>null!=t?t:null!=e?e:i;function vM(t,e){if(!t)return null;const i=t(e);return 1===i.length?i[0]:i}const gM=Oi({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},setup(t,{attrs:e,slots:i}){const n=hn(KO),r=Pn((()=>t.route||n.value)),s=hn(jO,0),o=Pn((()=>r.value.matched[s]));an(jO,s+1),an(WO,o),an(KO,r);const a=ie(h);var h;return ci((()=>[a.value,o.value,t.name]),(([t,e,i],[n,r,s])=>{e&&(e.instances[i]=t,r&&r!==e&&t&&t===n&&(e.leaveGuards=r.leaveGuards,e.updateGuards=r.updateGuards)),!t||!e||r&&nR(e,r)&&n||(e.enterCallbacks[i]||[]).forEach((e=>e(t)))}),{flush:"post"}),()=>{const n=r.value,s=o.value,h=s&&s.components[t.name],u=t.name;if(!h)return vM(i.default,{Component:h,route:n});const l=s.props[t.name],c=l?!0===l?n.params:"function"==typeof l?l(n):l:null,f=In(h,QO({},c,e,{onVnodeUnmounted:t=>{t.component.isUnmounted&&(s.instances[u]=null)},ref:a}));return vM(i.default,{Component:f,route:n})||f}}});function mM(t){const e=FR(t.routes,t);let i=t.parseQuery||sM,n=t.stringifyQuery||oM,r=t.history;const s=hM(),o=hM(),a=hM(),h=ie(TR,!0);let u=TR;ZO&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const l=JO.bind(null,(t=>""+t)),c=JO.bind(null,nM),f=JO.bind(null,rM);function d(t,s){if(s=QO({},s||h.value),"string"==typeof t){let n=eR(i,t,s.path),o=e.resolve({path:n.path},s),a=r.createHref(n.fullPath);return QO(n,o,{params:f(o.params),hash:rM(n.hash),redirectedFrom:void 0,href:a})}let o;"path"in t?o=QO({},t,{path:eR(i,t.path,s.path).path}):(o=QO({},t,{params:c(t.params)}),s.params=c(s.params));let a=e.resolve(o,s);const u=t.hash||"";a.params=l(f(a.params));const d=function(t,e){let i=e.query?t(e.query):"";return e.path+(i&&"?")+i+(e.hash||"")}(n,QO({},t,{hash:(p=u,eM(p).replace(QR,"{").replace($R,"}").replace(KR,"^")),path:a.path}));var p;let v=r.createHref(d);return QO({fullPath:d,hash:u,query:n===oM?aM(t.query):t.query},a,{redirectedFrom:void 0,href:v})}function p(t){return"string"==typeof t?eR(i,t,h.value.path):QO({},t)}function v(t,e){if(u!==t)return CR(8,{from:e,to:t})}function g(t){return y(t)}function m(t){const e=t.matched[t.matched.length-1];if(e&&e.redirect){const{redirect:i}=e;let n="function"==typeof i?i(t):i;return"string"==typeof n&&(n=n.indexOf("?")>-1||n.indexOf("#")>-1?n=p(n):{path:n}),QO({query:t.query,hash:t.hash,params:t.params},n)}}function y(t,e){const i=u=d(t),r=h.value,s=t.state,o=t.force,a=!0===t.replace,l=m(i);if(l)return y(QO(p(l),{state:s,force:o,replace:a}),e||i);const c=i;let f;
8785return c.redirectedFrom=e,!o&&function(t,e,i){let n=e.matched.length-1,r=i.matched.length-1;return n>-1&&n===r&&nR(e.matched[n],i.matched[r])&&rR(e.params,i.params)&&t(e.query)===t(i.query)&&e.hash===i.hash}(n,r,i)&&(f=CR(16,{to:c,from:r}),M(r,r,!0,!1)),(f?Promise.resolve(f):w(c,r)).catch((t=>OR(t)?t:O(t))).then((t=>{if(t){if(OR(t,2))return y(QO(p(t.to),{state:s,force:o,replace:a}),e||c)}else t=b(c,r,!0,a,s);return _(c,r,t),t}))}function x(t,e){const i=v(t,e);return i?Promise.reject(i):Promise.resolve()}function w(t,e){let i;const[n,r,a]=function(t,e){const i=[],n=[],r=[],s=Math.max(e.matched.length,t.matched.length);for(let o=0;o<s;o++){const s=e.matched[o];s&&(t.matched.indexOf(s)<0?i.push(s):n.push(s));const a=t.matched[o];a&&e.matched.indexOf(a)<0&&r.push(a)}return[i,n,r]}(t,e);i=lM(n.reverse(),"beforeRouteLeave",t,e);for(const s of n)s.leaveGuards.forEach((n=>{i.push(uM(n,t,e))}));const h=x.bind(null,t,e);return i.push(h),yM(i).then((()=>{i=[];for(const n of s.list())i.push(uM(n,t,e));return i.push(h),yM(i)})).then((()=>{i=lM(r,"beforeRouteUpdate",t,e);for(const n of r)n.updateGuards.forEach((n=>{i.push(uM(n,t,e))}));return i.push(h),yM(i)})).then((()=>{i=[];for(const n of t.matched)if(n.beforeEnter&&e.matched.indexOf(n)<0)if(Array.isArray(n.beforeEnter))for(const r of n.beforeEnter)i.push(uM(r,t,e));else i.push(uM(n.beforeEnter,t,e));return i.push(h),yM(i)})).then((()=>(t.matched.forEach((t=>t.enterCallbacks={})),i=lM(a,"beforeRouteEnter",t,e),i.push(h),yM(i)))).then((()=>{i=[];for(const n of o.list())i.push(uM(n,t,e));return i.push(h),yM(i)})).catch((t=>OR(t,8)?t:Promise.reject(t)))}
8785function _(t,e,i){for(const n of a.list())n(t,e,i)}function b(t,e,i,n,s){const o=v(t,e);if(o)return o;const a=e===TR,u=ZO?history.state:{};i&&(n||a?r.replace(t.fullPath,QO({scroll:a&&u&&u.scroll},s)):r.push(t.fullPath,s)),h.value=t,M(t,e,i,a),R()}let T;function E(){T=r.listen(((t,e,i)=>{let n=d(t);const s=m(n);if(s)return void y(QO(s,{replace:!0}),n).catch($O);u=n;const o=h.value;var a,l;ZO&&(a=gR(o.fullPath,i.delta),l=pR(),mR.set(a,l)),w(n,o).catch((t=>OR(t,12)?t:OR(t,2)?(y(t.to,n).catch($O),Promise.reject()):(i.delta&&r.go(-i.delta,!1),O(t)))).then((t=>{(t=t||b(n,o,!1))&&i.delta&&r.go(-i.delta,!1),_(n,o,t)})).catch($O)}))}let S,A=hM(),C=hM();function O(t){return R(t),C.list().forEach((e=>e(t))),Promise.reject(t)}function R(t){S||(S=!0,E(),A.list().forEach((([e,i])=>t?i(t):e())),A.reset())}function M(e,i,n,r){const{scrollBehavior:s}=t;if(!ZO||!s)return Promise.resolve();let o=!n&&function(t){const e=mR.get(t);return mR.delete(t),e}(gR(e.fullPath,0))||(r||!n)&&history.state&&history.state.scroll||null;return Ee().then((()=>s(e,i,o))).then((t=>t&&vR(t))).catch(O)}const P=t=>r.go(t);let I;const k=new Set;return{currentRoute:h,addRoute:function(t,i){let n,r;return bR(t)?(n=e.getRecordMatcher(t),r=i):r=t,e.addRoute(r,n)},removeRoute:function(t){let i=e.getRecordMatcher(t);i&&e.removeRoute(i)},hasRoute:function(t){return!!e.getRecordMatcher(t)},getRoutes:function(){return e.getRoutes().map((t=>t.record))},resolve:d,options:t,push:g,replace:function(t){return g(QO(p(t),{replace:!0}))},go:P,back:()=>P(-1),forward:()=>P(1),beforeEach:s.add,beforeResolve:o.add,afterEach:a.add,onError:C.add,isReady:function(){return S&&h.value!==TR?Promise.resolve():new Promise(((t,e)=>{A.add([t,e])}))},install(t){t.component("RouterLink",fM),t.component("RouterView",gM),t.config.globalProperties.$router=this,Object.defineProperty(t.config.globalProperties,"$route",{get:()=>ne(h)}),ZO&&!I&&h.value===TR&&(I=!0,g(r.location).catch((t=>{})));const e={};for(let n in TR)e[n]=Pn((()=>h.value[n]));t.provide(HO,this),t.provide(qO,jt(e)),t.provide(KO,h);let i=t.unmount;k.add(t),t.unmount=function(){k.delete(t),k.size<1&&(T(),h.value=TR,I=!1,S=!1),i.call(this,arguments)}}}}function yM(t){return t.reduce(((t,e)=>t.then((()=>e()))),Promise.resolve())}export{Ui as F,lr as P,tf as S,kn as a,$i as b,Hi as c,en as d,zO as e,$f as f,Ti as g,nn as h,mM as i,_R as j,sr as k,hr as l,td as m,nf as n,Wi as o,ur as p,or as q,Fi as r,d as t,ir as v,We as w};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.