颜色显示修正
This commit is contained in:
1 parent
9c2421110c
commit
535f8d7558
9 files changed
+2197
-48
No files matched your search
+40
-40
@@ -1,37 +1,37 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-ocq-7Y4s.js","assets/index-ChCXw-xh.js"])))=>i.map(i=>d[i]);
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CTL5QUHS.js","assets/index-CX6BjU37.js"])))=>i.map(i=>d[i]);
|
||||
var Bw=Object.defineProperty;var Lw=(n,e,t)=>e in n?Bw(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var b=(n,e,t)=>Lw(n,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function t(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=t(s);fetch(s.href,r)}})();/**
|
||||
* @vue/shared v3.5.41
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/function gm(n){const e=Object.create(null);for(const t of n.split(","))e[t]=1;return t=>t in e}const Gt={},Wa=[],pn=()=>{},Fv=()=>!1,Ah=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&(n.charCodeAt(2)>122||n.charCodeAt(2)<97),Ch=n=>n.startsWith("onUpdate:"),Fi=Object.assign,vm=(n,e)=>{const t=n.indexOf(e);t>-1&&n.splice(t,1)},Dw=Object.prototype.hasOwnProperty,Ut=(n,e)=>Dw.call(n,e),at=Array.isArray,za=n=>Sl(n)==="[object Map]",go=n=>Sl(n)==="[object Set]",fp=n=>Sl(n)==="[object Date]",ft=n=>typeof n=="function",ci=n=>typeof n=="string",us=n=>typeof n=="symbol",$t=n=>n!==null&&typeof n=="object",Ov=n=>($t(n)||ft(n))&&ft(n.then)&&ft(n.catch),Bv=Object.prototype.toString,Sl=n=>Bv.call(n),Nw=n=>Sl(n).slice(8,-1),Lv=n=>Sl(n)==="[object Object]",Ih=n=>ci(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n,Wo=gm(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Rh=n=>{const e=Object.create(null);return(t=>e[t]||(e[t]=n(t)))},Uw=/-\w/g,Bs=Rh(n=>n.replace(Uw,e=>e.slice(1).toUpperCase())),Xw=/\B([A-Z])/g,kr=Rh(n=>n.replace(Xw,"-$1").toLowerCase()),Dv=Rh(n=>n.charAt(0).toUpperCase()+n.slice(1)),ou=Rh(n=>n?`on${Dv(n)}`:""),hn=(n,e)=>!Object.is(n,e),yc=(n,...e)=>{for(let t=0;t<n.length;t++)n[t](...e)},Nv=(n,e,t,i=!1)=>{Object.defineProperty(n,e,{configurable:!0,enumerable:!1,writable:i,value:t})},Ph=n=>{const e=parseFloat(n);return isNaN(e)?n:e};let mp;const kh=()=>mp||(mp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ii(n){if(at(n)){const e={};for(let t=0;t<n.length;t++){const i=n[t],s=ci(i)?Gw(i):Ii(i);if(s)for(const r in s)e[r]=s[r]}return e}else if(ci(n)||$t(n))return n}const Yw=/;(?![^(]*\))/g,Vw=/:([^]+)/,$w=/\/\*[^]*?\*\//g;function Gw(n){const e={};return n.replace($w,"").split(Yw).forEach(t=>{if(t){const i=t.split(Vw);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function it(n){let e="";if(ci(n))e=n;else if(at(n))for(let t=0;t<n.length;t++){const i=it(n[t]);i&&(e+=i+" ")}else if($t(n))for(const t in n)n[t]&&(e+=t+" ");return e.trim()}const Hw="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",jw=gm(Hw);function Uv(n){return!!n||n===""}function Ww(n,e){if(n.length!==e.length)return!1;let t=!0;for(let i=0;t&&i<n.length;i++)t=vo(n[i],e[i]);return t}function vo(n,e){if(n===e)return!0;let t=fp(n),i=fp(e);if(t||i)return t&&i?n.getTime()===e.getTime():!1;if(t=us(n),i=us(e),t||i)return n===e;if(t=at(n),i=at(e),t||i)return t&&i?Ww(n,e):!1;if(t=$t(n),i=$t(e),t||i){if(!t||!i)return!1;const s=Object.keys(n).length,r=Object.keys(e).length;if(s!==r)return!1;for(const a in n){const o=n.hasOwnProperty(a),h=e.hasOwnProperty(a);if(o&&!h||!o&&h||!vo(n[a],e[a]))return!1}}return String(n)===String(e)}function ym(n,e){return n.findIndex(t=>vo(t,e))}const Xv=n=>!!(n&&n.__v_isRef===!0),He=n=>ci(n)?n:n==null?"":at(n)||$t(n)&&(n.toString===Bv||!ft(n.toString))?Xv(n)?He(n.value):JSON.stringify(n,Yv,2):String(n),Yv=(n,e)=>Xv(e)?Yv(n,e.value):za(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,s],r)=>(t[lu(i,r)+" =>"]=s,t),{})}:go(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>lu(t))}:us(e)?lu(e):$t(e)&&!at(e)&&!Lv(e)?String(e):e,lu=(n,e="")=>{var t;return us(n)?`Symbol(${(t=n.description)!=null?t:e})`:n};/**
|
||||
**/function vm(n){const e=Object.create(null);for(const t of n.split(","))e[t]=1;return t=>t in e}const Gt={},Wa=[],pn=()=>{},Fv=()=>!1,Ah=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&(n.charCodeAt(2)>122||n.charCodeAt(2)<97),Ch=n=>n.startsWith("onUpdate:"),Fi=Object.assign,ym=(n,e)=>{const t=n.indexOf(e);t>-1&&n.splice(t,1)},Dw=Object.prototype.hasOwnProperty,Ut=(n,e)=>Dw.call(n,e),at=Array.isArray,za=n=>Sl(n)==="[object Map]",go=n=>Sl(n)==="[object Set]",mp=n=>Sl(n)==="[object Date]",ft=n=>typeof n=="function",ci=n=>typeof n=="string",us=n=>typeof n=="symbol",$t=n=>n!==null&&typeof n=="object",Ov=n=>($t(n)||ft(n))&&ft(n.then)&&ft(n.catch),Bv=Object.prototype.toString,Sl=n=>Bv.call(n),Nw=n=>Sl(n).slice(8,-1),Lv=n=>Sl(n)==="[object Object]",Ih=n=>ci(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n,Wo=vm(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Rh=n=>{const e=Object.create(null);return(t=>e[t]||(e[t]=n(t)))},Uw=/-\w/g,Bs=Rh(n=>n.replace(Uw,e=>e.slice(1).toUpperCase())),Xw=/\B([A-Z])/g,kr=Rh(n=>n.replace(Xw,"-$1").toLowerCase()),Dv=Rh(n=>n.charAt(0).toUpperCase()+n.slice(1)),ou=Rh(n=>n?`on${Dv(n)}`:""),hn=(n,e)=>!Object.is(n,e),yc=(n,...e)=>{for(let t=0;t<n.length;t++)n[t](...e)},Nv=(n,e,t,i=!1)=>{Object.defineProperty(n,e,{configurable:!0,enumerable:!1,writable:i,value:t})},Ph=n=>{const e=parseFloat(n);return isNaN(e)?n:e};let pp;const kh=()=>pp||(pp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ii(n){if(at(n)){const e={};for(let t=0;t<n.length;t++){const i=n[t],s=ci(i)?Gw(i):Ii(i);if(s)for(const r in s)e[r]=s[r]}return e}else if(ci(n)||$t(n))return n}const Yw=/;(?![^(]*\))/g,Vw=/:([^]+)/,$w=/\/\*[^]*?\*\//g;function Gw(n){const e={};return n.replace($w,"").split(Yw).forEach(t=>{if(t){const i=t.split(Vw);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function it(n){let e="";if(ci(n))e=n;else if(at(n))for(let t=0;t<n.length;t++){const i=it(n[t]);i&&(e+=i+" ")}else if($t(n))for(const t in n)n[t]&&(e+=t+" ");return e.trim()}const Hw="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",jw=vm(Hw);function Uv(n){return!!n||n===""}function Ww(n,e){if(n.length!==e.length)return!1;let t=!0;for(let i=0;t&&i<n.length;i++)t=vo(n[i],e[i]);return t}function vo(n,e){if(n===e)return!0;let t=mp(n),i=mp(e);if(t||i)return t&&i?n.getTime()===e.getTime():!1;if(t=us(n),i=us(e),t||i)return n===e;if(t=at(n),i=at(e),t||i)return t&&i?Ww(n,e):!1;if(t=$t(n),i=$t(e),t||i){if(!t||!i)return!1;const s=Object.keys(n).length,r=Object.keys(e).length;if(s!==r)return!1;for(const a in n){const o=n.hasOwnProperty(a),h=e.hasOwnProperty(a);if(o&&!h||!o&&h||!vo(n[a],e[a]))return!1}}return String(n)===String(e)}function xm(n,e){return n.findIndex(t=>vo(t,e))}const Xv=n=>!!(n&&n.__v_isRef===!0),He=n=>ci(n)?n:n==null?"":at(n)||$t(n)&&(n.toString===Bv||!ft(n.toString))?Xv(n)?He(n.value):JSON.stringify(n,Yv,2):String(n),Yv=(n,e)=>Xv(e)?Yv(n,e.value):za(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,s],r)=>(t[lu(i,r)+" =>"]=s,t),{})}:go(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>lu(t))}:us(e)?lu(e):$t(e)&&!at(e)&&!Lv(e)?String(e):e,lu=(n,e="")=>{var t;return us(n)?`Symbol(${(t=n.description)!=null?t:e})`:n};/**
|
||||
* @vue/reactivity v3.5.41
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/let wi;class Vv{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&wi&&(wi.active?(this.parent=wi,this.index=(wi.scopes||(wi.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){const i=this.scopes.slice();for(e=0,t=i.length;e<t;e++)i[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){const s=this.scopes.slice();for(e=0,t=s.length;e<t;e++)s[e].resume()}const i=this.effects.slice();for(e=0,t=i.length;e<t;e++)i[e].resume()}}run(e){if(this._active){const t=wi;try{return wi=this,e()}finally{wi=t}}}on(){++this._on===1&&(this.prevScope=wi,wi=this)}off(){if(this._on>0&&--this._on===0){if(wi===this)wi=this.prevScope;else{let e=wi;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,i;for(t=0,i=this.effects.length;t<i;t++)this.effects[t].stop();for(this.effects.length=0,t=0,i=this.cleanups.length;t<i;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){const s=this.scopes.slice();for(t=0,i=s.length;t<i;t++)s[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function $v(n){return new Vv(n)}function Gv(){return wi}function zw(n,e=!1){wi&&wi.cleanups.push(n)}let zt;const cu=new WeakSet;class Hv{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,wi&&(wi.active?wi.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,cu.has(this)&&(cu.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Wv(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,pp(this),zv(this);const e=zt,t=Ls;zt=this,Ls=!0;try{return this.fn()}finally{qv(this),zt=e,Ls=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)wm(e);this.deps=this.depsTail=void 0,pp(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?cu.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Kd(this)&&this.run()}get dirty(){return Kd(this)}}let jv=0,zo,qo;function Wv(n,e=!1){if(n.flags|=8,e){n.next=qo,qo=n;return}n.next=zo,zo=n}function xm(){jv++}function bm(){if(--jv>0)return;if(qo){let e=qo;for(qo=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let n;for(;zo;){let e=zo;for(zo=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){n||(n=i)}e=t}}if(n)throw n}function zv(n){for(let e=n.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function qv(n){let e,t=n.depsTail,i=t;for(;i;){const s=i.prevDep;i.version===-1?(i===t&&(t=s),wm(i),qw(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}n.deps=e,n.depsTail=t}function Kd(n){for(let e=n.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Kv(e.dep.computed)||e.dep.version!==e.version))return!0;return!!n._dirty}function Kv(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===ll)||(n.globalVersion=ll,!n.isSSR&&n.flags&128&&(!n.deps&&!n._dirty||!Kd(n))))return;n.flags|=2;const e=n.dep,t=zt,i=Ls;zt=n,Ls=!0;try{zv(n);const s=n.fn(n._value);(e.version===0||hn(s,n._value))&&(n.flags|=128,n._value=s,e.version++)}catch(s){throw e.version++,s}finally{zt=t,Ls=i,qv(n),n.flags&=-3}}function wm(n,e=!1){const{dep:t,prevSub:i,nextSub:s}=n;if(i&&(i.nextSub=s,n.prevSub=void 0),s&&(s.prevSub=i,n.nextSub=void 0),t.subs===n&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let r=t.computed.deps;r;r=r.nextDep)wm(r,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function qw(n){const{prevDep:e,nextDep:t}=n;e&&(e.nextDep=t,n.prevDep=void 0),t&&(t.prevDep=e,n.nextDep=void 0)}let Ls=!0;const Zv=[];function Kn(){Zv.push(Ls),Ls=!1}function Zn(){const n=Zv.pop();Ls=n===void 0?!0:n}function pp(n){const{cleanup:e}=n;if(n.cleanup=void 0,e){const t=zt;zt=void 0;try{e()}finally{zt=t}}}let ll=0;class Kw{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Sm{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!zt||!Ls||zt===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==zt)t=this.activeLink=new Kw(zt,this),zt.deps?(t.prevDep=zt.depsTail,zt.depsTail.nextDep=t,zt.depsTail=t):zt.deps=zt.depsTail=t,Jv(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const i=t.nextDep;i.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=i),t.prevDep=zt.depsTailLine truncated
|
||||
**/let wi;class Vv{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&wi&&(wi.active?(this.parent=wi,this.index=(wi.scopes||(wi.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){const i=this.scopes.slice();for(e=0,t=i.length;e<t;e++)i[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){const s=this.scopes.slice();for(e=0,t=s.length;e<t;e++)s[e].resume()}const i=this.effects.slice();for(e=0,t=i.length;e<t;e++)i[e].resume()}}run(e){if(this._active){const t=wi;try{return wi=this,e()}finally{wi=t}}}on(){++this._on===1&&(this.prevScope=wi,wi=this)}off(){if(this._on>0&&--this._on===0){if(wi===this)wi=this.prevScope;else{let e=wi;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,i;for(t=0,i=this.effects.length;t<i;t++)this.effects[t].stop();for(this.effects.length=0,t=0,i=this.cleanups.length;t<i;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){const s=this.scopes.slice();for(t=0,i=s.length;t<i;t++)s[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function $v(n){return new Vv(n)}function Gv(){return wi}function zw(n,e=!1){wi&&wi.cleanups.push(n)}let zt;const cu=new WeakSet;class Hv{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,wi&&(wi.active?wi.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,cu.has(this)&&(cu.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Wv(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,gp(this),zv(this);const e=zt,t=Ls;zt=this,Ls=!0;try{return this.fn()}finally{qv(this),zt=e,Ls=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Sm(e);this.deps=this.depsTail=void 0,gp(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?cu.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Zd(this)&&this.run()}get dirty(){return Zd(this)}}let jv=0,zo,qo;function Wv(n,e=!1){if(n.flags|=8,e){n.next=qo,qo=n;return}n.next=zo,zo=n}function bm(){jv++}function wm(){if(--jv>0)return;if(qo){let e=qo;for(qo=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let n;for(;zo;){let e=zo;for(zo=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){n||(n=i)}e=t}}if(n)throw n}function zv(n){for(let e=n.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function qv(n){let e,t=n.depsTail,i=t;for(;i;){const s=i.prevDep;i.version===-1?(i===t&&(t=s),Sm(i),qw(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}n.deps=e,n.depsTail=t}function Zd(n){for(let e=n.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Kv(e.dep.computed)||e.dep.version!==e.version))return!0;return!!n._dirty}function Kv(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===ll)||(n.globalVersion=ll,!n.isSSR&&n.flags&128&&(!n.deps&&!n._dirty||!Zd(n))))return;n.flags|=2;const e=n.dep,t=zt,i=Ls;zt=n,Ls=!0;try{zv(n);const s=n.fn(n._value);(e.version===0||hn(s,n._value))&&(n.flags|=128,n._value=s,e.version++)}catch(s){throw e.version++,s}finally{zt=t,Ls=i,qv(n),n.flags&=-3}}function Sm(n,e=!1){const{dep:t,prevSub:i,nextSub:s}=n;if(i&&(i.nextSub=s,n.prevSub=void 0),s&&(s.prevSub=i,n.nextSub=void 0),t.subs===n&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let r=t.computed.deps;r;r=r.nextDep)Sm(r,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function qw(n){const{prevDep:e,nextDep:t}=n;e&&(e.nextDep=t,n.prevDep=void 0),t&&(t.prevDep=e,n.nextDep=void 0)}let Ls=!0;const Zv=[];function Kn(){Zv.push(Ls),Ls=!1}function Zn(){const n=Zv.pop();Ls=n===void 0?!0:n}function gp(n){const{cleanup:e}=n;if(n.cleanup=void 0,e){const t=zt;zt=void 0;try{e()}finally{zt=t}}}let ll=0;class Kw{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class _m{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!zt||!Ls||zt===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==zt)t=this.activeLink=new Kw(zt,this),zt.deps?(t.prevDep=zt.depsTail,zt.depsTail.nextDep=t,zt.depsTail=t):zt.deps=zt.depsTail=t,Jv(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const i=t.nextDep;i.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=i),t.prevDep=zt.depsTailLine truncated
|
||||
* @vue/runtime-core v3.5.41
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/function _l(n,e,t,i){try{return i?n(...i):n()}catch(s){Bh(s,e,t)}}function Vs(n,e,t,i){if(ft(n)){const s=_l(n,e,t,i);return s&&Ov(s)&&s.catch(r=>{Bh(r,e,t)}),s}if(at(n)){const s=[];for(let r=0;r<n.length;r++)s.push(Vs(n[r],e,t,i));return s}}function Bh(n,e,t,i=!0){const s=e?e.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:a}=e&&e.appContext.config||Gt;if(e){let o=e.parent;const h=e.proxy,l=`https://vuejs.org/error-reference/#runtime-${t}`;for(;o;){const c=o.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](n,h,l)===!1)return}o=o.parent}if(r){Kn(),_l(r,null,10,[n,h,l]),Zn();return}}TS(n,t,s,i,a)}function TS(n,e,t,i=!0,s=!1){if(s)throw n;console.error(n)}const ji=[];let en=-1;const qa=[];let dr=null,Ba=0;const ay=Promise.resolve();let Dc=null;function Mm(n){const e=Dc||ay;return n?e.then(this?n.bind(this):n):e}function MS(n){let e=en+1,t=ji.length;for(;e<t;){const i=e+t>>>1,s=ji[i],r=hl(s);r<n||r===n&&s.flags&2?e=i+1:t=i}return e}function Em(n){if(!(n.flags&1)){const e=hl(n),t=ji[ji.length-1];!t||!(n.flags&2)&&e>=hl(t)?ji.push(n):ji.splice(MS(e),0,n),n.flags|=1,oy()}}function oy(){Dc||(Dc=ay.then(cy))}function ES(n){if(!at(n))dr&&n.id===-1?dr.splice(Ba+1,0,n):n.flags&1||(qa.push(n),n.flags|=1);else for(let e=0;e<n.length;e++)qa.push(n[e]);oy()}function vp(n,e,t=en+1){for(;t<ji.length;t++){const i=ji[t];if(i&&i.flags&2){if(n&&i.id!==n.uid)continue;ji.splice(t,1),t--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function ly(n){if(qa.length){const e=[...new Set(qa)].sort((t,i)=>hl(t)-hl(i));if(qa.length=0,dr){for(let t=0;t<e.length;t++)dr.push(e[t]);return}for(dr=e,Ba=0;Ba<dr.length;Ba++){const t=dr[Ba];t.flags&4&&(t.flags&=-2),t.flags&8||t(),t.flags&=-2}dr=null,Ba=0}}const hl=n=>n.id==null?n.flags&2?-1:1/0:n.id;function cy(n){try{for(en=0;en<ji.length;en++){const e=ji[en];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),_l(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;en<ji.length;en++){const e=ji[en];e&&(e.flags&=-2)}en=-1,ji.length=0,ly(),Dc=null,(ji.length||qa.length)&&cy()}}let Vi=null,hy=null;function Nc(n){const e=Vi;return Vi=n,hy=n&&n.type.__scopeId||null,e}function ef(n,e=Vi,t){if(!e||n._n)return n;const i=(...s)=>{i._d&&Cp(-1);const r=Nc(e),a=zn.length;let o;try{o=n(...s)}finally{for(let h=zn.length;h>a;h--)km();Nc(r),i._d&&Cp(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function _e(n,e){if(Vi===null)return n;const t=Xh(Vi),i=n.dirs||(n.dirs=[]);for(let s=0;s<e.length;s++){let[r,a,o,h=Gt]=e[s];r&&(ft(r)&&(r={mounted:r,updated:r}),r.deep&&Nn(a),i.push({dir:r,instance:t,value:a,oldValue:void 0,arg:o,modifiers:h}))}return n}function Nr(n,e,t,i){const s=n.dirs,r=e&&e.dirs;for(let a=0;a<s.length;a++){const o=s[a];r&&(o.oldValue=r[a].value);let h=o.dir[i];h&&(Kn(),Vs(h,t,8,[n.el,o,n,e]),Zn())}}function AS(n,e){if(Wi){let t=Wi.provides;const i=Wi.parent&&Wi.parent.provides;i===t&&(t=Wi.provides=Object.create(i)),t[n]=e}}function Ko(n,e,t=!1){const i=Ly();if(i||na){let s=na?na._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(s&&n in s)return s[n];if(arguments.length>1)return t&&ft(e)?e.call(i&&i.proxy):e}}function CS(){return!!(Ly()||na)}const IS=Symbol.for("v-scx"),RS=()=>Ko(IS);function Lo(n,e){return Am(n,null,e)}function hs(n,e,t){return Am(n,e,t)}function Am(n,e,t=Gt){const{immediate:i,deep:s,flush:r,once:a}=t,o=Fi({},t),h=e&&i||!e&&r!=="post";let l;if(fl){if(r==="sync"){const f=RS();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!h){const f=()=>{};return f.stop=pn,f.resume=pn,f.pause=pn,f}}const c=Wi;o.call=(f,p,m)=>Vs(f,c,p,m);let u=!1;r==="post"?o.scheduler=f=>{Ji(f,c&&c.suspense)}:r!=="sync"&&(u=!0,o.scheduler=(f,p)=>{p?f():Em(f)}),o.augmentJob=f=>{e&&(f.flags|=4),u&&(f.flags|=2,c&&(f.id=c.uid,f.i=c))};const d=_S(n,e,o);return fl&&(l?l.push(d):h&&d()),d}function PS(n,e,t){const i=this.proxy,s=ci(n)?n.includes(".")?uy(i,n):()=>i[n]:n.bind(i,i);let r;ft(e)?r=e:(r=e.handler,t=e);const a=Ml(this),o=Am(s,r.bind(i),t);return a(),o}function uy(n,e){const t=e.split(".");return()=>{let i=n;for(let s=0;s<t.length&&i;s++)i=i[t[s]];return i}}const kS=Symbol("_vte"),Lh=n=>n.__isTeleport,du=Symbol("_leaveCb");function FS(n){let e=n[0];if(n.length>1){for(const t of n)if(t.type!==xn){e=t;break}}return e}function dy(n){if(!Im(n))return Lh(n.type)&&n.children?FS(n.children):n;if(n.component)return n.component.subTree;const{shapeFlag:e,children:t}=n;if(t){if(e&16)return t[0];if(e&32&&ft(t.default))return t.default()}}function Cm(n,e){if(n.shapeFlag&6&&n.component){n.transition=e;const t=n.component.subTree;Cm(Lh(t.type)&&dy(t)||t,e)}else n.shapeFlag&128?(n.ssContent.transition=e.clone(n.ssContent),n.ssFallback.transition=e.clone(n.ssFallback)):n.transition=e}function wn(n,e){return ft(n)?Fi({name:n.name},e,{setup:n}):n}function fy(n){n.ids=[n.ids[0]+n.ids[2]+++"-",0,0]}function yp(n,e){let t;return!!((t=Object.getOwnPropertyDescriptor(n,e))&&!t.configurable)}const Uc=new WeakMap;function Zo(n,e,t,i,s=!1){if(at(n)){n.for
Line truncated
|
||||
**/function _l(n,e,t,i){try{return i?n(...i):n()}catch(s){Bh(s,e,t)}}function Vs(n,e,t,i){if(ft(n)){const s=_l(n,e,t,i);return s&&Ov(s)&&s.catch(r=>{Bh(r,e,t)}),s}if(at(n)){const s=[];for(let r=0;r<n.length;r++)s.push(Vs(n[r],e,t,i));return s}}function Bh(n,e,t,i=!0){const s=e?e.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:a}=e&&e.appContext.config||Gt;if(e){let o=e.parent;const h=e.proxy,l=`https://vuejs.org/error-reference/#runtime-${t}`;for(;o;){const c=o.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](n,h,l)===!1)return}o=o.parent}if(r){Kn(),_l(r,null,10,[n,h,l]),Zn();return}}TS(n,t,s,i,a)}function TS(n,e,t,i=!0,s=!1){if(s)throw n;console.error(n)}const ji=[];let en=-1;const qa=[];let dr=null,Ba=0;const ay=Promise.resolve();let Dc=null;function Em(n){const e=Dc||ay;return n?e.then(this?n.bind(this):n):e}function MS(n){let e=en+1,t=ji.length;for(;e<t;){const i=e+t>>>1,s=ji[i],r=hl(s);r<n||r===n&&s.flags&2?e=i+1:t=i}return e}function Am(n){if(!(n.flags&1)){const e=hl(n),t=ji[ji.length-1];!t||!(n.flags&2)&&e>=hl(t)?ji.push(n):ji.splice(MS(e),0,n),n.flags|=1,oy()}}function oy(){Dc||(Dc=ay.then(cy))}function ES(n){if(!at(n))dr&&n.id===-1?dr.splice(Ba+1,0,n):n.flags&1||(qa.push(n),n.flags|=1);else for(let e=0;e<n.length;e++)qa.push(n[e]);oy()}function yp(n,e,t=en+1){for(;t<ji.length;t++){const i=ji[t];if(i&&i.flags&2){if(n&&i.id!==n.uid)continue;ji.splice(t,1),t--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function ly(n){if(qa.length){const e=[...new Set(qa)].sort((t,i)=>hl(t)-hl(i));if(qa.length=0,dr){for(let t=0;t<e.length;t++)dr.push(e[t]);return}for(dr=e,Ba=0;Ba<dr.length;Ba++){const t=dr[Ba];t.flags&4&&(t.flags&=-2),t.flags&8||t(),t.flags&=-2}dr=null,Ba=0}}const hl=n=>n.id==null?n.flags&2?-1:1/0:n.id;function cy(n){try{for(en=0;en<ji.length;en++){const e=ji[en];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),_l(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;en<ji.length;en++){const e=ji[en];e&&(e.flags&=-2)}en=-1,ji.length=0,ly(),Dc=null,(ji.length||qa.length)&&cy()}}let Vi=null,hy=null;function Nc(n){const e=Vi;return Vi=n,hy=n&&n.type.__scopeId||null,e}function tf(n,e=Vi,t){if(!e||n._n)return n;const i=(...s)=>{i._d&&Ip(-1);const r=Nc(e),a=zn.length;let o;try{o=n(...s)}finally{for(let h=zn.length;h>a;h--)Fm();Nc(r),i._d&&Ip(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function _e(n,e){if(Vi===null)return n;const t=Xh(Vi),i=n.dirs||(n.dirs=[]);for(let s=0;s<e.length;s++){let[r,a,o,h=Gt]=e[s];r&&(ft(r)&&(r={mounted:r,updated:r}),r.deep&&Nn(a),i.push({dir:r,instance:t,value:a,oldValue:void 0,arg:o,modifiers:h}))}return n}function Nr(n,e,t,i){const s=n.dirs,r=e&&e.dirs;for(let a=0;a<s.length;a++){const o=s[a];r&&(o.oldValue=r[a].value);let h=o.dir[i];h&&(Kn(),Vs(h,t,8,[n.el,o,n,e]),Zn())}}function AS(n,e){if(Wi){let t=Wi.provides;const i=Wi.parent&&Wi.parent.provides;i===t&&(t=Wi.provides=Object.create(i)),t[n]=e}}function Ko(n,e,t=!1){const i=Ly();if(i||ra){let s=ra?ra._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(s&&n in s)return s[n];if(arguments.length>1)return t&&ft(e)?e.call(i&&i.proxy):e}}function CS(){return!!(Ly()||ra)}const IS=Symbol.for("v-scx"),RS=()=>Ko(IS);function Lo(n,e){return Cm(n,null,e)}function hs(n,e,t){return Cm(n,e,t)}function Cm(n,e,t=Gt){const{immediate:i,deep:s,flush:r,once:a}=t,o=Fi({},t),h=e&&i||!e&&r!=="post";let l;if(fl){if(r==="sync"){const f=RS();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!h){const f=()=>{};return f.stop=pn,f.resume=pn,f.pause=pn,f}}const c=Wi;o.call=(f,p,m)=>Vs(f,c,p,m);let u=!1;r==="post"?o.scheduler=f=>{Ji(f,c&&c.suspense)}:r!=="sync"&&(u=!0,o.scheduler=(f,p)=>{p?f():Am(f)}),o.augmentJob=f=>{e&&(f.flags|=4),u&&(f.flags|=2,c&&(f.id=c.uid,f.i=c))};const d=_S(n,e,o);return fl&&(l?l.push(d):h&&d()),d}function PS(n,e,t){const i=this.proxy,s=ci(n)?n.includes(".")?uy(i,n):()=>i[n]:n.bind(i,i);let r;ft(e)?r=e:(r=e.handler,t=e);const a=Ml(this),o=Cm(s,r.bind(i),t);return a(),o}function uy(n,e){const t=e.split(".");return()=>{let i=n;for(let s=0;s<t.length&&i;s++)i=i[t[s]];return i}}const kS=Symbol("_vte"),Lh=n=>n.__isTeleport,du=Symbol("_leaveCb");function FS(n){let e=n[0];if(n.length>1){for(const t of n)if(t.type!==xn){e=t;break}}return e}function dy(n){if(!Rm(n))return Lh(n.type)&&n.children?FS(n.children):n;if(n.component)return n.component.subTree;const{shapeFlag:e,children:t}=n;if(t){if(e&16)return t[0];if(e&32&&ft(t.default))return t.default()}}function Im(n,e){if(n.shapeFlag&6&&n.component){n.transition=e;const t=n.component.subTree;Im(Lh(t.type)&&dy(t)||t,e)}else n.shapeFlag&128?(n.ssContent.transition=e.clone(n.ssContent),n.ssFallback.transition=e.clone(n.ssFallback)):n.transition=e}function wn(n,e){return ft(n)?Fi({name:n.name},e,{setup:n}):n}function fy(n){n.ids=[n.ids[0]+n.ids[2]+++"-",0,0]}function xp(n,e){let t;return!!((t=Object.getOwnPropertyDescriptor(n,e))&&!t.configurable)}const Uc=new WeakMap;function Zo(n,e,t,i,s=!1){if(at(n)){n.for
Line truncated
|
||||
* @vue/runtime-dom v3.5.41
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/let af;const Pp=typeof window<"u"&&window.trustedTypes;if(Pp)try{af=Pp.createPolicy("vue",{createHTML:n=>n})}catch{}const Uy=af?n=>af.createHTML(n):n=>n,R_="http://www.w3.org/2000/svg",P_="http://www.w3.org/1998/Math/MathML",Pn=typeof document<"u"?document:null,kp=Pn&&Pn.createElement("template"),k_={insert:(n,e,t)=>{e.insertBefore(n,t||null)},remove:n=>{const e=n.parentNode;e&&e.removeChild(n)},createElement:(n,e,t,i)=>{const s=e==="svg"?Pn.createElementNS(R_,n):e==="mathml"?Pn.createElementNS(P_,n):t?Pn.createElement(n,{is:t}):Pn.createElement(n);return n==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:n=>Pn.createTextNode(n),createComment:n=>Pn.createComment(n),setText:(n,e)=>{n.nodeValue=e},setElementText:(n,e)=>{n.textContent=e},parentNode:n=>n.parentNode,nextSibling:n=>n.nextSibling,querySelector:n=>Pn.querySelector(n),setScopeId(n,e){n.setAttribute(e,"")},insertStaticContent(n,e,t,i,s,r){const a=t?t.previousSibling:e.lastChild;if(s&&(s===r||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),t),!(s===r||!(s=s.nextSibling)););else{kp.innerHTML=Uy(i==="svg"?`<svg>${n}</svg>`:i==="mathml"?`<math>${n}</math>`:n);const o=kp.content;if(i==="svg"||i==="mathml"){const h=o.firstChild;for(;h.firstChild;)o.appendChild(h.firstChild);o.removeChild(h)}e.insertBefore(o,t)}return[a?a.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},F_=Symbol("_vtc");function O_(n,e,t){const i=n[F_];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?n.removeAttribute("class"):t?n.setAttribute("class",e):n.className=e}const $c=Symbol("_vod"),Xy=Symbol("_vsh"),ar={name:"show",beforeMount(n,{value:e},{transition:t}){n[$c]=n.style.display==="none"?"":n.style.display,t&&e?t.beforeEnter(n):Io(n,e)},mounted(n,{value:e},{transition:t}){t&&e&&t.enter(n)},updated(n,{value:e,oldValue:t},{transition:i}){!e!=!t&&(i?e?(i.beforeEnter(n),Io(n,!0),i.enter(n)):i.leave(n,()=>{Io(n,!1)}):Io(n,e))},beforeUnmount(n,{value:e}){Io(n,e)}};function Io(n,e){n.style.display=e?n[$c]:"none",n[Xy]=!e}const B_=Symbol(""),L_=/(?:^|;)\s*display\s*:/;function D_(n,e,t){const i=n.style,s=ci(t);let r=!1;if(t&&!s){if(e)if(ci(e))for(const a of e.split(";")){const o=a.slice(0,a.indexOf(":")).trim();t[o]==null&&No(i,o,"")}else for(const a in e)t[a]==null&&No(i,a,"");for(const a in t){a==="display"&&(r=!0);const o=t[a];o!=null?U_(n,a,!ci(e)&&e?e[a]:void 0,o)||No(i,a,o):No(i,a,"")}}else if(s){if(e!==t){const a=i[B_];a&&(t+=";"+a),i.cssText=t,r=L_.test(t)}}else e&&n.removeAttribute("style");$c in n&&(n[$c]=r?i.display:"",n[Xy]&&(i.display="none"))}const Fp=/\s*!important$/;function No(n,e,t){if(at(t))t.forEach(i=>No(n,e,i));else if(t==null&&(t=""),e.startsWith("--"))n.setProperty(e,t);else{const i=N_(n,e);Fp.test(t)?n.setProperty(kr(i),t.replace(Fp,""),"important"):n[i]=t}}const Op=["Webkit","Moz","ms"],pu={};function N_(n,e){const t=pu[e];if(t)return t;let i=Bs(e);if(i!=="filter"&&i in n)return pu[e]=i;i=Dv(i);for(let s=0;s<Op.length;s++){const r=Op[s]+i;if(r in n)return pu[e]=r}return e}function U_(n,e,t,i){return n.tagName==="TEXTAREA"&&(e==="width"||e==="height")&&ci(i)&&t===i}const Bp="http://www.w3.org/1999/xlink";function Lp(n,e,t,i,s,r=jw(e)){i&&e.startsWith("xlink:")?t==null?n.removeAttributeNS(Bp,e.slice(6,e.length)):n.setAttributeNS(Bp,e,t):t==null||r&&!Uv(t)?n.removeAttribute(e):n.setAttribute(e,r?"":us(t)?String(t):t)}function Dp(n,e,t,i,s){if(e==="innerHTML"||e==="textContent"){t!=null&&(n[e]=e==="innerHTML"?Uy(t):t);return}const r=n.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){const o=r==="OPTION"?n.getAttribute("value")||"":n.value,h=t==null?n.type==="checkbox"?"on":"":String(t);(o!==h||!("_value"in n))&&(n.value=h),t==null&&n.removeAttribute(e),n._value=t;return}let a=!1;if(t===""||t==null){const o=typeof n[e];o==="boolean"?t=Uv(t):t==null&&o==="string"?(t="",a=!0):o==="number"&&(t=0,a=!0)}try{n[e]=t}catch{}a&&n.removeAttribute(s||e)}function yr(n,e,t,i){n.addEventListener(e,t,i)}function X_(n,e,t,i){n.removeEventListener(e,t,i)}const Np=Symbol("_vei");function Y_(n,e,t,i,s=null){const r=n[Np]||(n[Np]={}),a=r[e];if(i&&a)a.value=i;else{const[o,h]=G_(e);if(i){const l=r[e]=W_(i,s);yr(n,o,l,h)}else a&&(X_(n,o,a,h),r[e]=void 0)}}const V_=/(Once|Passive|Capture)$/,$_=/^on:?(?:Once|Passive|Capture)$/;function G_(n){let e,t;for(;(t=n.match(V_))&&!$_.test(n);)e||(e={}),n=n.slice(0,n.length-t[1].length),e[t[1].toLowerCase()]=!0;return[n[2]===":"?n.slice(3):kr(n.slice(2)),e]}let gu=0;const H_=Promise.resolve(),j_=()=>gu||(H_.then(()=>gu=0),gu=Date.now());function W_(n,e){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;const s=t.value;if(at(s)){const r=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{r.call(i),i._stopped=!0};const a=s.slice(),o=[i];for(let h=0;h<a.length&&!i._stopped;h++){const l=a[h];l&&Vs(l,e,5,o)}}else Vs(s,e,5,[i])};return t.value=n,t.attached=j_(),t}const Up=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)>96&&n.charCodeAt(2)<123,z_=(n,e,t,i
Line truncated
|
||||
`))),n[un]=lo(s);const r=i||s.props&&s.props.type==="number";yr(n,e?"change":"input",a=>{a.target.composing||n[un](vu(n.value,t,r))}),(t||r)&&yr(n,"change",()=>{n.value=vu(n.value,t,r)}),e||(yr(n,"compositionstart",Z_),yr(n,"compositionend",Xp),yr(n,"change",Xp))},mounted(n,{value:e,modifiers:{trim:t,number:i}}){const s=e??"",r=n[Ul];delete n[Ul],r!==void 0&&(n.type==="text"||n.type==="textarea")&&n.value!==r?n[un](vu(n.value,t,i)):n.value=s},beforeUpdate(n,{value:e,oldValue:t,modifiers:{lazy:i,trim:s,number:r}},a){if(n[un]=lo(a),n.composing)return;const o=(r||n.type==="number")&&!/^0\d/.test(n.value)?Ph(n.value):n.value,h=e??"";if(o===h)return;const l=n.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===n&&n.type!=="range"&&(i&&e===t||s&&n.value.trim()===h)||(n.value=h)}},Wt={deep:!0,created(n,e,t){n[un]=lo(t),yr(n,"change",()=>{const i=n._modelValue,s=ml(n),r=n.checked,a=n[un];if(at(i)){const o=ym(i,s),h=o!==-1;if(r&&!h)a(i.concat(s));else if(!r&&h){const l=[...i];l.splice(o,1),a(l)}}else if(go(i)){const o=new Set(i);r?o.add(s):o.delete(s),a(o)}else a(Yy(n,r))})},mounted:Yp,beforeUpdate(n,e,t){n[un]=lo(t),Yp(n,e,t)}};function Yp(n,{value:e,oldValue:t},i){n._modelValue=e;let s;if(at(e))s=ym(e,i.props.value)>-1;else if(go(e))s=e.has(i.props.value);else{if(e===t)return;s=vo(e,Yy(n,!0))}n.checked!==s&&(n.checked=s)}const Vt={deep:!0,created(n,{value:e,modifiers:{number:t}},i){n._modelValue=e,yr(n,"change",()=>{const s=Array.prototype.filter.call(n.options,r=>r.selected).map(r=>t?Ph(ml(r)):ml(r));n[un](n.multiple?go(n._modelValue)?new Set(s):s:s[0]),n._assigning=!0,Mm(()=>{n._assigning=!1})}),n[un]=lo(i)},mounted(n,{value:e}){Vp(n,e)},beforeUpdate(n,{value:e},t){n._modelValue=e,n[un]=lo(t)},updated(n,{value:e}){n._assigning||Vp(n,e)}};function Vp(n,e){const t=n.multiple,i=at(e);if(!(t&&!i&&!go(e))){for(let s=0,r=n.options.length;s<r;s++){const a=n.options[s],o=ml(a);if(t)if(i){const h=typeof o;h==="string"||h==="number"?a.selected=e.some(l=>String(l)===String(o)):a.selected=ym(e,o)>-1}else a.selected=e.has(o);else if(vo(ml(a),e)){n.selectedIndex!==s&&(n.selectedIndex=s);return}}!t&&n.selectedIndex!==-1&&(n.selectedIndex=-1)}}function ml(n){return"_value"in n?n._value:n.value}function Yy(n,e){const t=e?"_trueValue":"_falseValue";return t in n?n[t]:e}const J_=["ctrl","shift","alt","meta"],Q_={stop:n=>n.stopPropagation(),prevent:n=>n.preventDefault(),self:n=>n.target!==n.currentTarget,ctrl:n=>!n.ctrlKey,shift:n=>!n.shiftKey,alt:n=>!n.altKey,meta:n=>!n.metaKey,left:n=>"button"in n&&n.button!==0,middle:n=>"button"in n&&n.button!==1,right:n=>"button"in n&&n.button!==2,exact:(n,e)=>J_.some(t=>n[`${t}Key`]&&!e.includes(t))},Tt=(n,e)=>{if(!n)return n;const t=n._withMods||(n._withMods={}),i=e.join(".");return t[i]||(t[i]=((s,...r)=>{for(let a=0;a<e.length;a++){const o=Q_[e[a]];if(o&&o(s,e))return}return n(s,...r)}))},eT={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ra=(n,e)=>{const t=n._withKeys||(n._withKeys={}),i=e.join(".");return t[i]||(t[i]=(s=>{if(!("key"in s))return;const r=kr(s.key);if(e.some(a=>a===r||eT[a]===r))return n(s)}))},tT=Fi({patchProp:z_},k_);let $p;function iT(){return $p||($p=f_(tT))}const sT=((...n)=>{const e=iT().createApp(...n),{mount:t}=e;return e.mount=i=>{const s=rT(i);if(!s)return;const r=e._component;!ft(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const a=t(s,!1,nT(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),a},e});function nT(n){if(n instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&n instanceof MathMLElement)return"mathml"}function rT(n){return ci(n)?document.querySelector(n):n}/*!
|
||||
**/let of;const kp=typeof window<"u"&&window.trustedTypes;if(kp)try{of=kp.createPolicy("vue",{createHTML:n=>n})}catch{}const Uy=of?n=>of.createHTML(n):n=>n,R_="http://www.w3.org/2000/svg",P_="http://www.w3.org/1998/Math/MathML",Pn=typeof document<"u"?document:null,Fp=Pn&&Pn.createElement("template"),k_={insert:(n,e,t)=>{e.insertBefore(n,t||null)},remove:n=>{const e=n.parentNode;e&&e.removeChild(n)},createElement:(n,e,t,i)=>{const s=e==="svg"?Pn.createElementNS(R_,n):e==="mathml"?Pn.createElementNS(P_,n):t?Pn.createElement(n,{is:t}):Pn.createElement(n);return n==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:n=>Pn.createTextNode(n),createComment:n=>Pn.createComment(n),setText:(n,e)=>{n.nodeValue=e},setElementText:(n,e)=>{n.textContent=e},parentNode:n=>n.parentNode,nextSibling:n=>n.nextSibling,querySelector:n=>Pn.querySelector(n),setScopeId(n,e){n.setAttribute(e,"")},insertStaticContent(n,e,t,i,s,r){const a=t?t.previousSibling:e.lastChild;if(s&&(s===r||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),t),!(s===r||!(s=s.nextSibling)););else{Fp.innerHTML=Uy(i==="svg"?`<svg>${n}</svg>`:i==="mathml"?`<math>${n}</math>`:n);const o=Fp.content;if(i==="svg"||i==="mathml"){const h=o.firstChild;for(;h.firstChild;)o.appendChild(h.firstChild);o.removeChild(h)}e.insertBefore(o,t)}return[a?a.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},F_=Symbol("_vtc");function O_(n,e,t){const i=n[F_];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?n.removeAttribute("class"):t?n.setAttribute("class",e):n.className=e}const $c=Symbol("_vod"),Xy=Symbol("_vsh"),ar={name:"show",beforeMount(n,{value:e},{transition:t}){n[$c]=n.style.display==="none"?"":n.style.display,t&&e?t.beforeEnter(n):Io(n,e)},mounted(n,{value:e},{transition:t}){t&&e&&t.enter(n)},updated(n,{value:e,oldValue:t},{transition:i}){!e!=!t&&(i?e?(i.beforeEnter(n),Io(n,!0),i.enter(n)):i.leave(n,()=>{Io(n,!1)}):Io(n,e))},beforeUnmount(n,{value:e}){Io(n,e)}};function Io(n,e){n.style.display=e?n[$c]:"none",n[Xy]=!e}const B_=Symbol(""),L_=/(?:^|;)\s*display\s*:/;function D_(n,e,t){const i=n.style,s=ci(t);let r=!1;if(t&&!s){if(e)if(ci(e))for(const a of e.split(";")){const o=a.slice(0,a.indexOf(":")).trim();t[o]==null&&No(i,o,"")}else for(const a in e)t[a]==null&&No(i,a,"");for(const a in t){a==="display"&&(r=!0);const o=t[a];o!=null?U_(n,a,!ci(e)&&e?e[a]:void 0,o)||No(i,a,o):No(i,a,"")}}else if(s){if(e!==t){const a=i[B_];a&&(t+=";"+a),i.cssText=t,r=L_.test(t)}}else e&&n.removeAttribute("style");$c in n&&(n[$c]=r?i.display:"",n[Xy]&&(i.display="none"))}const Op=/\s*!important$/;function No(n,e,t){if(at(t))t.forEach(i=>No(n,e,i));else if(t==null&&(t=""),e.startsWith("--"))n.setProperty(e,t);else{const i=N_(n,e);Op.test(t)?n.setProperty(kr(i),t.replace(Op,""),"important"):n[i]=t}}const Bp=["Webkit","Moz","ms"],pu={};function N_(n,e){const t=pu[e];if(t)return t;let i=Bs(e);if(i!=="filter"&&i in n)return pu[e]=i;i=Dv(i);for(let s=0;s<Bp.length;s++){const r=Bp[s]+i;if(r in n)return pu[e]=r}return e}function U_(n,e,t,i){return n.tagName==="TEXTAREA"&&(e==="width"||e==="height")&&ci(i)&&t===i}const Lp="http://www.w3.org/1999/xlink";function Dp(n,e,t,i,s,r=jw(e)){i&&e.startsWith("xlink:")?t==null?n.removeAttributeNS(Lp,e.slice(6,e.length)):n.setAttributeNS(Lp,e,t):t==null||r&&!Uv(t)?n.removeAttribute(e):n.setAttribute(e,r?"":us(t)?String(t):t)}function Np(n,e,t,i,s){if(e==="innerHTML"||e==="textContent"){t!=null&&(n[e]=e==="innerHTML"?Uy(t):t);return}const r=n.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){const o=r==="OPTION"?n.getAttribute("value")||"":n.value,h=t==null?n.type==="checkbox"?"on":"":String(t);(o!==h||!("_value"in n))&&(n.value=h),t==null&&n.removeAttribute(e),n._value=t;return}let a=!1;if(t===""||t==null){const o=typeof n[e];o==="boolean"?t=Uv(t):t==null&&o==="string"?(t="",a=!0):o==="number"&&(t=0,a=!0)}try{n[e]=t}catch{}a&&n.removeAttribute(s||e)}function yr(n,e,t,i){n.addEventListener(e,t,i)}function X_(n,e,t,i){n.removeEventListener(e,t,i)}const Up=Symbol("_vei");function Y_(n,e,t,i,s=null){const r=n[Up]||(n[Up]={}),a=r[e];if(i&&a)a.value=i;else{const[o,h]=G_(e);if(i){const l=r[e]=W_(i,s);yr(n,o,l,h)}else a&&(X_(n,o,a,h),r[e]=void 0)}}const V_=/(Once|Passive|Capture)$/,$_=/^on:?(?:Once|Passive|Capture)$/;function G_(n){let e,t;for(;(t=n.match(V_))&&!$_.test(n);)e||(e={}),n=n.slice(0,n.length-t[1].length),e[t[1].toLowerCase()]=!0;return[n[2]===":"?n.slice(3):kr(n.slice(2)),e]}let gu=0;const H_=Promise.resolve(),j_=()=>gu||(H_.then(()=>gu=0),gu=Date.now());function W_(n,e){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;const s=t.value;if(at(s)){const r=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{r.call(i),i._stopped=!0};const a=s.slice(),o=[i];for(let h=0;h<a.length&&!i._stopped;h++){const l=a[h];l&&Vs(l,e,5,o)}}else Vs(s,e,5,[i])};return t.value=n,t.attached=j_(),t}const Xp=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)>96&&n.charCodeAt(2)<123,z_=(n,e,t,i
Line truncated
|
||||
`))),n[un]=lo(s);const r=i||s.props&&s.props.type==="number";yr(n,e?"change":"input",a=>{a.target.composing||n[un](vu(n.value,t,r))}),(t||r)&&yr(n,"change",()=>{n.value=vu(n.value,t,r)}),e||(yr(n,"compositionstart",Z_),yr(n,"compositionend",Yp),yr(n,"change",Yp))},mounted(n,{value:e,modifiers:{trim:t,number:i}}){const s=e??"",r=n[Ul];delete n[Ul],r!==void 0&&(n.type==="text"||n.type==="textarea")&&n.value!==r?n[un](vu(n.value,t,i)):n.value=s},beforeUpdate(n,{value:e,oldValue:t,modifiers:{lazy:i,trim:s,number:r}},a){if(n[un]=lo(a),n.composing)return;const o=(r||n.type==="number")&&!/^0\d/.test(n.value)?Ph(n.value):n.value,h=e??"";if(o===h)return;const l=n.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===n&&n.type!=="range"&&(i&&e===t||s&&n.value.trim()===h)||(n.value=h)}},Wt={deep:!0,created(n,e,t){n[un]=lo(t),yr(n,"change",()=>{const i=n._modelValue,s=ml(n),r=n.checked,a=n[un];if(at(i)){const o=xm(i,s),h=o!==-1;if(r&&!h)a(i.concat(s));else if(!r&&h){const l=[...i];l.splice(o,1),a(l)}}else if(go(i)){const o=new Set(i);r?o.add(s):o.delete(s),a(o)}else a(Yy(n,r))})},mounted:Vp,beforeUpdate(n,e,t){n[un]=lo(t),Vp(n,e,t)}};function Vp(n,{value:e,oldValue:t},i){n._modelValue=e;let s;if(at(e))s=xm(e,i.props.value)>-1;else if(go(e))s=e.has(i.props.value);else{if(e===t)return;s=vo(e,Yy(n,!0))}n.checked!==s&&(n.checked=s)}const Vt={deep:!0,created(n,{value:e,modifiers:{number:t}},i){n._modelValue=e,yr(n,"change",()=>{const s=Array.prototype.filter.call(n.options,r=>r.selected).map(r=>t?Ph(ml(r)):ml(r));n[un](n.multiple?go(n._modelValue)?new Set(s):s:s[0]),n._assigning=!0,Em(()=>{n._assigning=!1})}),n[un]=lo(i)},mounted(n,{value:e}){$p(n,e)},beforeUpdate(n,{value:e},t){n._modelValue=e,n[un]=lo(t)},updated(n,{value:e}){n._assigning||$p(n,e)}};function $p(n,e){const t=n.multiple,i=at(e);if(!(t&&!i&&!go(e))){for(let s=0,r=n.options.length;s<r;s++){const a=n.options[s],o=ml(a);if(t)if(i){const h=typeof o;h==="string"||h==="number"?a.selected=e.some(l=>String(l)===String(o)):a.selected=xm(e,o)>-1}else a.selected=e.has(o);else if(vo(ml(a),e)){n.selectedIndex!==s&&(n.selectedIndex=s);return}}!t&&n.selectedIndex!==-1&&(n.selectedIndex=-1)}}function ml(n){return"_value"in n?n._value:n.value}function Yy(n,e){const t=e?"_trueValue":"_falseValue";return t in n?n[t]:e}const J_=["ctrl","shift","alt","meta"],Q_={stop:n=>n.stopPropagation(),prevent:n=>n.preventDefault(),self:n=>n.target!==n.currentTarget,ctrl:n=>!n.ctrlKey,shift:n=>!n.shiftKey,alt:n=>!n.altKey,meta:n=>!n.metaKey,left:n=>"button"in n&&n.button!==0,middle:n=>"button"in n&&n.button!==1,right:n=>"button"in n&&n.button!==2,exact:(n,e)=>J_.some(t=>n[`${t}Key`]&&!e.includes(t))},Tt=(n,e)=>{if(!n)return n;const t=n._withMods||(n._withMods={}),i=e.join(".");return t[i]||(t[i]=((s,...r)=>{for(let a=0;a<e.length;a++){const o=Q_[e[a]];if(o&&o(s,e))return}return n(s,...r)}))},eT={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},aa=(n,e)=>{const t=n._withKeys||(n._withKeys={}),i=e.join(".");return t[i]||(t[i]=(s=>{if(!("key"in s))return;const r=kr(s.key);if(e.some(a=>a===r||eT[a]===r))return n(s)}))},tT=Fi({patchProp:z_},k_);let Gp;function iT(){return Gp||(Gp=f_(tT))}const sT=((...n)=>{const e=iT().createApp(...n),{mount:t}=e;return e.mount=i=>{const s=rT(i);if(!s)return;const r=e._component;!ft(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const a=t(s,!1,nT(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),a},e});function nT(n){if(n instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&n instanceof MathMLElement)return"mathml"}function rT(n){return ci(n)?document.querySelector(n):n}/*!
|
||||
* pinia v4.0.3
|
||||
* (c) 2026 Eduardo San Martin Morote
|
||||
* @license MIT
|
||||
*/let Vy;const Yh=n=>Vy=n,$y=Symbol();function Gp(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}function aT(){const n=$v(!0),e=n.run(()=>nt({}));let t=[],i=[];const s=Sr({install(r){Yh(s),s._a=r,r.provide($y,s),r.config.globalProperties.$pinia=s,i.forEach(a=>t.push(a)),i=[]},use(r){return this._a?t.push(r):i.push(r),this},_p:t,_a:null,_e:n,_s:new Map,state:e});return s}const of=()=>{};function Hp(n,e,t,i=of){n.add(e);const s=()=>{n.delete(e)&&i()};return!t&&Gv()&&zw(s),s}function Ea(n,...e){n.forEach(t=>{t(...e)})}const oT=n=>n(),jp=Symbol(),yu=Symbol();function lf(n,e){n instanceof Map&&e instanceof Map?e.forEach((t,i)=>n.set(i,t)):n instanceof Set&&e instanceof Set&&e.forEach(n.add,n);for(const t in e){if(!Object.hasOwn(e,t))continue;const i=e[t],s=n[t];Gp(s)&&Gp(i)&&Object.hasOwn(n,t)&&!hi(i)&&!Wn(i)?n[t]=lf(s,i):n[t]=i}return n}const lT=Symbol();function cT(n){return!n||typeof n!="object"||!Object.hasOwn(n,lT)}const{assign:cr}=Object;function hT(n){return!!(hi(n)&&n.effect)}function uT(n,e,t,i){const{state:s,actions:r,getters:a}=e,o=t.state.value[n];let h;function l(){o||(t.state.value[n]=s?s():{});const c=vS(t.state.value[n]);return cr(c,r,Object.keys(a||{}).reduce((u,d)=>(u[d]=Sr(yt(()=>{Yh(t);const f=t._s.get(n);return a[d].call(f,f)})),u),{}))}return h=Gy(n,l,e,t,i,!0),h}function Gy(n,e,t={},i,s,r){let a;const o=cr({actions:{}},t),h={deep:!0};let l,c,u=new Set,d=new Set,f;const p=i.state.value[n];!r&&!p&&(i.state.value[n]={});let m;function g(T){let C;l=c=!1,typeof T=="function"?(T(i.state.value[n]),C={type:"patch function",storeId:n,events:f}):(lf(i.state.value[n],T),C={type:"patch object",payload:T,storeId:n,events:f});const I=m=Symbol();Mm().then(()=>{m===I&&(l=!0)}),c=!0,Ea(u,C,i.state.value[n])}const y=r?function(){const{state:C}=t,I=C?C():{};this.$patch(k=>{cr(k,I)})}:of;function w(){a.stop(),u.clear(),d.clear(),i._s.delete(n)}const v=(T,C="")=>{if(jp in T)return T[yu]=C,T;const I=function(){Yh(i);const k=Array.from(arguments),R=new Set,F=new Set;function B(O){R.add(O)}function L(O){F.add(O)}Ea(d,{args:k,name:I[yu],store:x,after:B,onError:L});let Y;try{Y=T.apply(this&&this.$id===n?this:x,k)}catch(O){throw Ea(F,O),O}return Y instanceof Promise?Y.then(O=>(Ea(R,O),O)).catch(O=>(Ea(F,O),Promise.reject(O))):(Ea(R,Y),Y)};return I[jp]=!0,I[yu]=C,I},_={_p:i,$id:n,$onAction:Hp.bind(null,d),$patch:g,$reset:y,$subscribe(T,C={}){if(u.has(T))return of;const I=Hp(u,T,C.detached,()=>k()),k=a.run(()=>hs(()=>i.state.value[n],R=>{(C.flush==="sync"?c:l)&&T({storeId:n,type:"direct",events:f},R)},cr({},h,C)));return I},$dispose:w},x=yo(_);i._s.set(n,x);const M=(i._a&&i._a.runWithContext||oT)(()=>i._e.run(()=>(a=$v()).run(()=>e({action:v}))));for(const T in M){const C=M[T];hi(C)&&!hT(C)||Wn(C)?r||(p&&cT(C)&&(hi(C)?C.value=p[T]:((C instanceof Set||C instanceof Map)&&C.clear(),lf(C,p[T]))),i.state.value[n][T]=C):typeof C=="function"&&(M[T]=v(C,T),o.actions[T]=C)}return cr(x,M),cr(Bt(x),M),Object.defineProperty(x,"$state",{get:()=>i.state.value[n],set:T=>{g(C=>{cr(C,T)})}}),i._p.forEach(T=>{const C=a.run(()=>T({store:x,app:i._a,pinia:i,options:o}));cr(x,C)}),p&&r&&t.hydrate&&t.hydrate(x.$state,p),l=!0,c=!0,x}/*! #__NO_SIDE_EFFECTS__ */function dT(n,e,t){let i;const s=typeof e=="function";i=s?t:e;function r(a,o){const h=CS();return a=a||(h?Ko($y,null):null),a&&Yh(a),a=Vy,a._s.has(n)||(s?Gy(n,e,i,a):uT(n,i,a)),a._s.get(n)}return r.$id=n,r}var ga=(n=>(n[n.WEBGL_LEGACY=0]="WEBGL_LEGACY",n[n.WEBGL=1]="WEBGL",n[n.WEBGL2=2]="WEBGL2",n))(ga||{}),Hy=(n=>(n[n.UNKNOWN=0]="UNKNOWN",n[n.WEBGL=1]="WEBGL",n[n.CANVAS=2]="CANVAS",n))(Hy||{}),cf=(n=>(n[n.COLOR=16384]="COLOR",n[n.DEPTH=256]="DEPTH",n[n.STENCIL=1024]="STENCIL",n))(cf||{}),st=(n=>(n[n.NORMAL=0]="NORMAL",n[n.ADD=1]="ADD",n[n.MULTIPLY=2]="MULTIPLY",n[n.SCREEN=3]="SCREEN",n[n.OVERLAY=4]="OVERLAY",n[n.DARKEN=5]="DARKEN",n[n.LIGHTEN=6]="LIGHTEN",n[n.COLOR_DODGE=7]="COLOR_DODGE",n[n.COLOR_BURN=8]="COLOR_BURN",n[n.HARD_LIGHT=9]="HARD_LIGHT",n[n.SOFT_LIGHT=10]="SOFT_LIGHT",n[n.DIFFERENCE=11]="DIFFERENCE",n[n.EXCLUSION=12]="EXCLUSION",n[n.HUE=13]="HUE",n[n.SATURATION=14]="SATURATION",n[n.COLOR=15]="COLOR",n[n.LUMINOSITY=16]="LUMINOSITY",n[n.NORMAL_NPM=17]="NORMAL_NPM",n[n.ADD_NPM=18]="ADD_NPM",n[n.SCREEN_NPM=19]="SCREEN_NPM",n[n.NONE=20]="NONE",n[n.SRC_OVER=0]="SRC_OVER",n[n.SRC_IN=21]="SRC_IN",n[n.SRC_OUT=22]="SRC_OUT",n[n.SRC_ATOP=23]="SRC_ATOP",n[n.DST_OVER=24]="DST_OVER",n[n.DST_IN=25]="DST_IN",n[n.DST_OUT=26]="DST_OUT",n[n.DST_ATOP=27]="DST_ATOP",n[n.ERASE=26]="ERASE",n[n.SUBTRACT=28]="SUBTRACT",n[n.XOR=29]="XOR",n))(st||{}),dn=(n=>(n[n.POINTS=0]="POINTS",n[n.LINES=1]="LINES",n[n.LINE_LOOP=2]="LINE_LOOP",n[n.LINE_STRIP=3]="LINE_STRIP",n[n.TRIANGLES=4]="TRIANGLES",n[n.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",n[n.TRIANGLE_FAN=6]="TRIANGLE_FAN",n))(dn||{}),Oe=(n=>(n[n.RGBA=6408]="RGBA",n[n.RGB=6407]="RGB",n[n.RG=33319]="RG",n[n.RED=6403]="RED",n[n.RGBA_INTEGER=36249]="RGBA_INTEGER",n[n.RGB_INTEGER=36248]="RGB_INTELine truncated
|
||||
*/let Vy;const Yh=n=>Vy=n,$y=Symbol();function Hp(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}function aT(){const n=$v(!0),e=n.run(()=>nt({}));let t=[],i=[];const s=Sr({install(r){Yh(s),s._a=r,r.provide($y,s),r.config.globalProperties.$pinia=s,i.forEach(a=>t.push(a)),i=[]},use(r){return this._a?t.push(r):i.push(r),this},_p:t,_a:null,_e:n,_s:new Map,state:e});return s}const lf=()=>{};function jp(n,e,t,i=lf){n.add(e);const s=()=>{n.delete(e)&&i()};return!t&&Gv()&&zw(s),s}function Aa(n,...e){n.forEach(t=>{t(...e)})}const oT=n=>n(),Wp=Symbol(),yu=Symbol();function cf(n,e){n instanceof Map&&e instanceof Map?e.forEach((t,i)=>n.set(i,t)):n instanceof Set&&e instanceof Set&&e.forEach(n.add,n);for(const t in e){if(!Object.hasOwn(e,t))continue;const i=e[t],s=n[t];Hp(s)&&Hp(i)&&Object.hasOwn(n,t)&&!hi(i)&&!Wn(i)?n[t]=cf(s,i):n[t]=i}return n}const lT=Symbol();function cT(n){return!n||typeof n!="object"||!Object.hasOwn(n,lT)}const{assign:cr}=Object;function hT(n){return!!(hi(n)&&n.effect)}function uT(n,e,t,i){const{state:s,actions:r,getters:a}=e,o=t.state.value[n];let h;function l(){o||(t.state.value[n]=s?s():{});const c=vS(t.state.value[n]);return cr(c,r,Object.keys(a||{}).reduce((u,d)=>(u[d]=Sr(yt(()=>{Yh(t);const f=t._s.get(n);return a[d].call(f,f)})),u),{}))}return h=Gy(n,l,e,t,i,!0),h}function Gy(n,e,t={},i,s,r){let a;const o=cr({actions:{}},t),h={deep:!0};let l,c,u=new Set,d=new Set,f;const p=i.state.value[n];!r&&!p&&(i.state.value[n]={});let m;function g(T){let C;l=c=!1,typeof T=="function"?(T(i.state.value[n]),C={type:"patch function",storeId:n,events:f}):(cf(i.state.value[n],T),C={type:"patch object",payload:T,storeId:n,events:f});const I=m=Symbol();Em().then(()=>{m===I&&(l=!0)}),c=!0,Aa(u,C,i.state.value[n])}const y=r?function(){const{state:C}=t,I=C?C():{};this.$patch(k=>{cr(k,I)})}:lf;function w(){a.stop(),u.clear(),d.clear(),i._s.delete(n)}const v=(T,C="")=>{if(Wp in T)return T[yu]=C,T;const I=function(){Yh(i);const k=Array.from(arguments),R=new Set,F=new Set;function B(O){R.add(O)}function L(O){F.add(O)}Aa(d,{args:k,name:I[yu],store:x,after:B,onError:L});let Y;try{Y=T.apply(this&&this.$id===n?this:x,k)}catch(O){throw Aa(F,O),O}return Y instanceof Promise?Y.then(O=>(Aa(R,O),O)).catch(O=>(Aa(F,O),Promise.reject(O))):(Aa(R,Y),Y)};return I[Wp]=!0,I[yu]=C,I},_={_p:i,$id:n,$onAction:jp.bind(null,d),$patch:g,$reset:y,$subscribe(T,C={}){if(u.has(T))return lf;const I=jp(u,T,C.detached,()=>k()),k=a.run(()=>hs(()=>i.state.value[n],R=>{(C.flush==="sync"?c:l)&&T({storeId:n,type:"direct",events:f},R)},cr({},h,C)));return I},$dispose:w},x=yo(_);i._s.set(n,x);const M=(i._a&&i._a.runWithContext||oT)(()=>i._e.run(()=>(a=$v()).run(()=>e({action:v}))));for(const T in M){const C=M[T];hi(C)&&!hT(C)||Wn(C)?r||(p&&cT(C)&&(hi(C)?C.value=p[T]:((C instanceof Set||C instanceof Map)&&C.clear(),cf(C,p[T]))),i.state.value[n][T]=C):typeof C=="function"&&(M[T]=v(C,T),o.actions[T]=C)}return cr(x,M),cr(Bt(x),M),Object.defineProperty(x,"$state",{get:()=>i.state.value[n],set:T=>{g(C=>{cr(C,T)})}}),i._p.forEach(T=>{const C=a.run(()=>T({store:x,app:i._a,pinia:i,options:o}));cr(x,C)}),p&&r&&t.hydrate&&t.hydrate(x.$state,p),l=!0,c=!0,x}/*! #__NO_SIDE_EFFECTS__ */function dT(n,e,t){let i;const s=typeof e=="function";i=s?t:e;function r(a,o){const h=CS();return a=a||(h?Ko($y,null):null),a&&Yh(a),a=Vy,a._s.has(n)||(s?Gy(n,e,i,a):uT(n,i,a)),a._s.get(n)}return r.$id=n,r}var va=(n=>(n[n.WEBGL_LEGACY=0]="WEBGL_LEGACY",n[n.WEBGL=1]="WEBGL",n[n.WEBGL2=2]="WEBGL2",n))(va||{}),Hy=(n=>(n[n.UNKNOWN=0]="UNKNOWN",n[n.WEBGL=1]="WEBGL",n[n.CANVAS=2]="CANVAS",n))(Hy||{}),hf=(n=>(n[n.COLOR=16384]="COLOR",n[n.DEPTH=256]="DEPTH",n[n.STENCIL=1024]="STENCIL",n))(hf||{}),st=(n=>(n[n.NORMAL=0]="NORMAL",n[n.ADD=1]="ADD",n[n.MULTIPLY=2]="MULTIPLY",n[n.SCREEN=3]="SCREEN",n[n.OVERLAY=4]="OVERLAY",n[n.DARKEN=5]="DARKEN",n[n.LIGHTEN=6]="LIGHTEN",n[n.COLOR_DODGE=7]="COLOR_DODGE",n[n.COLOR_BURN=8]="COLOR_BURN",n[n.HARD_LIGHT=9]="HARD_LIGHT",n[n.SOFT_LIGHT=10]="SOFT_LIGHT",n[n.DIFFERENCE=11]="DIFFERENCE",n[n.EXCLUSION=12]="EXCLUSION",n[n.HUE=13]="HUE",n[n.SATURATION=14]="SATURATION",n[n.COLOR=15]="COLOR",n[n.LUMINOSITY=16]="LUMINOSITY",n[n.NORMAL_NPM=17]="NORMAL_NPM",n[n.ADD_NPM=18]="ADD_NPM",n[n.SCREEN_NPM=19]="SCREEN_NPM",n[n.NONE=20]="NONE",n[n.SRC_OVER=0]="SRC_OVER",n[n.SRC_IN=21]="SRC_IN",n[n.SRC_OUT=22]="SRC_OUT",n[n.SRC_ATOP=23]="SRC_ATOP",n[n.DST_OVER=24]="DST_OVER",n[n.DST_IN=25]="DST_IN",n[n.DST_OUT=26]="DST_OUT",n[n.DST_ATOP=27]="DST_ATOP",n[n.ERASE=26]="ERASE",n[n.SUBTRACT=28]="SUBTRACT",n[n.XOR=29]="XOR",n))(st||{}),dn=(n=>(n[n.POINTS=0]="POINTS",n[n.LINES=1]="LINES",n[n.LINE_LOOP=2]="LINE_LOOP",n[n.LINE_STRIP=3]="LINE_STRIP",n[n.TRIANGLES=4]="TRIANGLES",n[n.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",n[n.TRIANGLE_FAN=6]="TRIANGLE_FAN",n))(dn||{}),Oe=(n=>(n[n.RGBA=6408]="RGBA",n[n.RGB=6407]="RGB",n[n.RG=33319]="RG",n[n.RED=6403]="RED",n[n.RGBA_INTEGER=36249]="RGBA_INTEGER",n[n.RGB_INTEGER=36248]="RGB_INTELine truncated
|
||||
`)>=0)return!1;return!0}function Bi(le,fe){var bt;if(le.indent===" ")bt=" ";else if(typeof le.indent=="number"&&le.indent>0)bt=C.call(Array(le.indent+1)," ");else return null;return{base:bt,prev:C.call(Array(fe+1),bt)}}function Ss(le,fe){if(le.length===0)return"";var bt=`
|
||||
`+fe.prev+fe.base;return bt+C.call(le,","+bt)+`
|
||||
`+fe.prev}function Qt(le,fe){var bt=pe(le),Nt=[];if(bt){Nt.length=le.length;for(var Yt=0;Yt<le.length;Yt++)Nt[Yt]=ce(le,Yt)?fe(le[Yt],le):""}var ut=typeof F=="function"?F(le):[],fs;if(L){fs={};for(var _s=0;_s<ut.length;_s++)fs["$"+ut[_s]]=ut[_s]}for(var gi in le)ce(le,gi)&&(bt&&String(Number(gi))===gi&&gi<le.length||L&&fs["$"+gi]instanceof Symbol||(M.call(/[^\w$]/,gi)?Nt.push(fe(gi,le)+": "+fe(le[gi],le)):Nt.push(gi+": "+fe(le[gi],le))));if(typeof F=="function")for(var ms=0;ms<ut.length;ms++)O.call(le,ut[ms])&&Nt.push("["+fe(ut[ms])+"]: "+fe(le[ut[ms]],le));return Nt}return _u}var Tu,hg;function AT(){if(hg)return Tu;hg=1;var n=Vh(),e=bo(),t=function(o,h,l){for(var c=o,u;(u=c.next)!=null;c=u)if(u.key===h)return c.next=u.next,l||(u.next=o.next,o.next=u),u},i=function(o,h){if(o){var l=t(o,h);return l&&l.value}},s=function(o,h,l){var c=t(o,h);c?c.value=l:o.next={key:h,next:o.next,value:l}},r=function(o,h){return o?!!t(o,h):!1},a=function(o,h){if(o)return t(o,h,!0)};return Tu=function(){var h,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+n(c))},delete:function(c){var u=a(h,c);return u&&h&&!h.next&&(h=void 0),!!u},get:function(c){return i(h,c)},has:function(c){return r(h,c)},set:function(c,u){h||(h={next:void 0}),s(h,c,u)}};return l},Tu}var Mu,ug;function Wy(){return ug||(ug=1,Mu=Object),Mu}var Eu,dg;function CT(){return dg||(dg=1,Eu=Error),Eu}var Au,fg;function IT(){return fg||(fg=1,Au=EvalError),Au}var Cu,mg;function RT(){return mg||(mg=1,Cu=RangeError),Cu}var Iu,pg;function PT(){return pg||(pg=1,Iu=ReferenceError),Iu}var Ru,gg;function kT(){return gg||(gg=1,Ru=SyntaxError),Ru}var Pu,vg;function FT(){return vg||(vg=1,Pu=URIError),Pu}var ku,yg;function OT(){return yg||(yg=1,ku=Math.abs),ku}var Fu,xg;function BT(){return xg||(xg=1,Fu=Math.floor),Fu}var Ou,bg;function LT(){return bg||(bg=1,Ou=Math.max),Ou}var Bu,wg;function DT(){return wg||(wg=1,Bu=Math.min),Bu}var Lu,Sg;function NT(){return Sg||(Sg=1,Lu=Math.pow),Lu}var Du,_g;function UT(){return _g||(_g=1,Du=Math.round),Du}var Nu,Tg;function XT(){return Tg||(Tg=1,Nu=Number.isNaN||function(e){return e!==e}),Nu}var Uu,Mg;function YT(){if(Mg)return Uu;Mg=1;var n=XT();return Uu=function(t){return n(t)||t===0?t:t<0?-1:1},Uu}var Xu,Eg;function VT(){return Eg||(Eg=1,Xu=Object.getOwnPropertyDescriptor),Xu}var Yu,Ag;function zy(){if(Ag)return Yu;Ag=1;var n=VT();if(n)try{n([],"length")}catch{n=null}return Yu=n,Yu}var Vu,Cg;function qy(){if(Cg)return Vu;Cg=1;var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}return Vu=n,Vu}var $u,Ig;function $T(){return Ig||(Ig=1,$u=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var s=42;e[t]=s;for(var r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==s||o.enumerable!==!0)return!1}return!0}),$u}var Gu,Rg;function GT(){if(Rg)return Gu;Rg=1;var n=typeof Symbol<"u"&&Symbol,e=$T();return Gu=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Gu}var Hu,Pg;function Ky(){return Pg||(Pg=1,Hu=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Hu}var ju,kg;function Zy(){if(kg)return ju;kg=1;var n=Wy();return ju=n.getPrototypeOf||null,ju}var Wu,Fg;function HT(){if(Fg)return Wu;Fg=1;var n="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,i="[object Function]",s=function(h,l){for(var c=[],u=0;u<h.length;u+=1)c[u]=h[u];for(var d=0;d<l.length;d+=1)c[d+h.length]=l[d];return c},r=function(h,l){for(var c=[],u=l,d=0;u<h.length;u+=1,d+=1)c[d]=h[u];return c},a=function(o,h){for(var l="",c=0;c<o.length;c+=1)l+=o[c],c+1<o.length&&(l+=h);return l};return Wu=function(h){var l=this;if(typeof l!="function"||e.apply(l)!==i)throw new TypeError(n+l);for(var c=r(arguments,1),u,d=function(){if(this instanceof u){var y=l.apply(this,s(c,arguments));return Object(y)===y?y:this}return l.apply(h,s(c,arguments))},f=t(0,l.length-c.length),p=[],m=0;m<f;m++)p[m]="$"+m;if(u=Function("binder","return function ("+a(p,",")+"){ return binder.apply(this,arguments); }")(d),l.prototype){var g=function(){};g.prototype=l.prototype,u.prototype=new g,g.prototype=null}return u},Wu}var zu,Og;function $h(){if(Og)return zu;Og=1;var n=HT();return zu=Function.prototype.bind||n,zu}var qu,Bg;function Bm(){return Bg||(Bg=1,qu=Function.prototype.call),qu}var Ku,Lg;function Jy(){return Lg||(Lg=1,Ku=Function.p
Line truncated
|
||||
`," "],a=["{","}","|","\\","^","`"].concat(r),o=["'"].concat(a),h=["%","/","?",";","#"].concat(o),l=["/","?","#"],c=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},p={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=eM();function y(x,M,T){if(x&&typeof x=="object"&&x instanceof e)return x;var C=new e;return C.parse(x,M,T),C}e.prototype.parse=function(x,M,T){if(typeof x!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof x);var C=x.indexOf("?"),I=C!==-1&&C<x.indexOf("#")?"?":"#",k=x.split(I),R=/\\/g;k[0]=k[0].replace(R,"/"),x=k.join(I);var F=x;if(F=F.trim(),!T&&x.split("#").length===1){var B=s.exec(F);if(B)return this.path=F,this.href=F,this.pathname=B[1],B[2]?(this.search=B[2],M?this.query=g.parse(this.search.substr(1)):this.query=this.search.substr(1)):M&&(this.search="",this.query={}),this}var L=t.exec(F);if(L){L=L[0];var Y=L.toLowerCase();this.protocol=Y,F=F.substr(L.length)}if(T||L||F.match(/^\/\/[^@/]+@[^@/]+/)){var O=F.substr(0,2)==="//";O&&!(L&&p[L])&&(F=F.substr(2),this.slashes=!0)}if(!p[L]&&(O||L&&!m[L])){for(var D=-1,P=0;P<l.length;P++){var U=F.indexOf(l[P]);U!==-1&&(D===-1||U<D)&&(D=U)}var N,X;D===-1?X=F.lastIndexOf("@"):X=F.lastIndexOf("@",D),X!==-1&&(N=F.slice(0,X),F=F.slice(X+1),this.auth=decodeURIComponent(N)),D=-1;for(var P=0;P<h.length;P++){var U=F.indexOf(h[P]);U!==-1&&(D===-1||U<D)&&(D=U)}D===-1&&(D=F.length),this.host=F.slice(0,D),F=F.slice(D),this.parseHost(),this.hostname=this.hostname||"";var K=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!K)for(var z=this.hostname.split(/\./),P=0,se=z.length;P<se;P++){var Q=z[P];if(Q&&!Q.match(u)){for(var me="",pe=0,Me=Q.length;pe<Me;pe++)Q.charCodeAt(pe)>127?me+="x":me+=Q[pe];if(!me.match(u)){var Ie=z.slice(0,P),ge=z.slice(P+1),Ee=Q.match(d);Ee&&(Ie.push(Ee[1]),ge.unshift(Ee[2])),ge.length&&(F="/"+ge.join(".")+F),this.hostname=Ie.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),K||(this.hostname=n.toASCII(this.hostname));var H=this.port?":"+this.port:"",Z=this.hostname||"";this.host=Z+H,this.href+=this.host,K&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),F[0]!=="/"&&(F="/"+F))}if(!f[Y])for(var P=0,se=o.length;P<se;P++){var q=o[P];if(F.indexOf(q)!==-1){var W=encodeURIComponent(q);W===q&&(W=escape(q)),F=F.split(q).join(W)}}var ee=F.indexOf("#");ee!==-1&&(this.hash=F.substr(ee),F=F.slice(0,ee));var ce=F.indexOf("?");if(ce!==-1?(this.search=F.substr(ce),this.query=F.substr(ce+1),M&&(this.query=g.parse(this.query)),F=F.slice(0,ce)):M&&(this.search="",this.query={}),F&&(this.pathname=F),m[Y]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var H=this.pathname||"",xe=this.search||"";this.path=H+xe}return this.href=this.format(),this};function w(x){return typeof x=="string"&&(x=y(x)),x instanceof e?x.format():e.prototype.format.call(x)}e.prototype.format=function(){var x=this.auth||"";x&&(x=encodeURIComponent(x),x=x.replace(/%3A/i,":"),x+="@");var M=this.protocol||"",T=this.pathname||"",C=this.hash||"",I=!1,k="";this.host?I=x+this.host:this.hostname&&(I=x+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(I+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(k=g.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var R=this.search||k&&"?"+k||"";return M&&M.substr(-1)!==":"&&(M+=":"),this.slashes||(!M||m[M])&&I!==!1?(I="//"+(I||""),T&&T.charAt(0)!=="/"&&(T="/"+T)):I||(I=""),C&&C.charAt(0)!=="#"&&(C="#"+C),R&&R.charAt(0)!=="?"&&(R="?"+R),T=T.replace(/[?#]/g,function(F){return encodeURIComponent(F)}),R=R.replace("#","%23"),M+I+T+R+C};function v(x,M){return y(x,!1,!0).resolve(M)}e.prototype.resolve=function(x){return this.resolveObject(y(x,!1,!0)).format()};function _(x,M){return x?y(x,!1,!0).resolveObject(M):M}return e.prototype.resolveObject=function(x){if(typeof x=="string"){var M=new e;M.parse(x,!1,!0),x=M}for(var T=new e,C=Object.keys(this),I=0;I<C.length;I++){var k=C[I];T[k]=this[k]}if(T.hash=x.hash,x.href==="")return T.href=T.format(),T;if(x.slashes&&!x.protocol){for(var R=Object.keys(x),F=0;F<R.length;F++){var B=R[F];B!=="protocol"&&(T[B]=x[B])}return m[T.protocol]&&T.hostname&&!T.pathname&&(T.pathname="/",T.path=T.pathname),T.href=T.format(),T}if(x.protocol&&x.protocol!==T.protocol){if(!m[x.protocol]){for(var L=Object.keys(x),Y=0;Y<L.length;Y++){var O=L[Y];T[O]=x[O]}return T.href=T.format(),T}if(T.protocol=x.protocol,!x.host&&!p[x.protocol]){for(var se=(x.pathname||"").split("/");se.length&&!(x.host=se.shift()););x.host||(x.host=""),x.hostname||(x.hostname=""),se[0]!==""&&se.unshift(""),se.length<2&&se.unshift(""),T.pathname=se.join("/")}else T.pathname=x.pathname;if(T.search=x.search,T.query=x.query,T.host=x.host||"",T.auth=x.auth,T.hostname=x.hostname||x.host,T.port=x.port,T.pathname||
Line truncated
|
||||
`+fe.prev}function Qt(le,fe){var bt=pe(le),Dt=[];if(bt){Dt.length=le.length;for(var Yt=0;Yt<le.length;Yt++)Dt[Yt]=ce(le,Yt)?fe(le[Yt],le):""}var ut=typeof F=="function"?F(le):[],fs;if(L){fs={};for(var _s=0;_s<ut.length;_s++)fs["$"+ut[_s]]=ut[_s]}for(var gi in le)ce(le,gi)&&(bt&&String(Number(gi))===gi&&gi<le.length||L&&fs["$"+gi]instanceof Symbol||(M.call(/[^\w$]/,gi)?Dt.push(fe(gi,le)+": "+fe(le[gi],le)):Dt.push(gi+": "+fe(le[gi],le))));if(typeof F=="function")for(var ms=0;ms<ut.length;ms++)O.call(le,ut[ms])&&Dt.push("["+fe(ut[ms])+"]: "+fe(le[ut[ms]],le));return Dt}return _u}var Tu,ug;function AT(){if(ug)return Tu;ug=1;var n=Vh(),e=bo(),t=function(o,h,l){for(var c=o,u;(u=c.next)!=null;c=u)if(u.key===h)return c.next=u.next,l||(u.next=o.next,o.next=u),u},i=function(o,h){if(o){var l=t(o,h);return l&&l.value}},s=function(o,h,l){var c=t(o,h);c?c.value=l:o.next={key:h,next:o.next,value:l}},r=function(o,h){return o?!!t(o,h):!1},a=function(o,h){if(o)return t(o,h,!0)};return Tu=function(){var h,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+n(c))},delete:function(c){var u=a(h,c);return u&&h&&!h.next&&(h=void 0),!!u},get:function(c){return i(h,c)},has:function(c){return r(h,c)},set:function(c,u){h||(h={next:void 0}),s(h,c,u)}};return l},Tu}var Mu,dg;function Wy(){return dg||(dg=1,Mu=Object),Mu}var Eu,fg;function CT(){return fg||(fg=1,Eu=Error),Eu}var Au,mg;function IT(){return mg||(mg=1,Au=EvalError),Au}var Cu,pg;function RT(){return pg||(pg=1,Cu=RangeError),Cu}var Iu,gg;function PT(){return gg||(gg=1,Iu=ReferenceError),Iu}var Ru,vg;function kT(){return vg||(vg=1,Ru=SyntaxError),Ru}var Pu,yg;function FT(){return yg||(yg=1,Pu=URIError),Pu}var ku,xg;function OT(){return xg||(xg=1,ku=Math.abs),ku}var Fu,bg;function BT(){return bg||(bg=1,Fu=Math.floor),Fu}var Ou,wg;function LT(){return wg||(wg=1,Ou=Math.max),Ou}var Bu,Sg;function DT(){return Sg||(Sg=1,Bu=Math.min),Bu}var Lu,_g;function NT(){return _g||(_g=1,Lu=Math.pow),Lu}var Du,Tg;function UT(){return Tg||(Tg=1,Du=Math.round),Du}var Nu,Mg;function XT(){return Mg||(Mg=1,Nu=Number.isNaN||function(e){return e!==e}),Nu}var Uu,Eg;function YT(){if(Eg)return Uu;Eg=1;var n=XT();return Uu=function(t){return n(t)||t===0?t:t<0?-1:1},Uu}var Xu,Ag;function VT(){return Ag||(Ag=1,Xu=Object.getOwnPropertyDescriptor),Xu}var Yu,Cg;function zy(){if(Cg)return Yu;Cg=1;var n=VT();if(n)try{n([],"length")}catch{n=null}return Yu=n,Yu}var Vu,Ig;function qy(){if(Ig)return Vu;Ig=1;var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}return Vu=n,Vu}var $u,Rg;function $T(){return Rg||(Rg=1,$u=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var s=42;e[t]=s;for(var r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==s||o.enumerable!==!0)return!1}return!0}),$u}var Gu,Pg;function GT(){if(Pg)return Gu;Pg=1;var n=typeof Symbol<"u"&&Symbol,e=$T();return Gu=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Gu}var Hu,kg;function Ky(){return kg||(kg=1,Hu=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Hu}var ju,Fg;function Zy(){if(Fg)return ju;Fg=1;var n=Wy();return ju=n.getPrototypeOf||null,ju}var Wu,Og;function HT(){if(Og)return Wu;Og=1;var n="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,i="[object Function]",s=function(h,l){for(var c=[],u=0;u<h.length;u+=1)c[u]=h[u];for(var d=0;d<l.length;d+=1)c[d+h.length]=l[d];return c},r=function(h,l){for(var c=[],u=l,d=0;u<h.length;u+=1,d+=1)c[d]=h[u];return c},a=function(o,h){for(var l="",c=0;c<o.length;c+=1)l+=o[c],c+1<o.length&&(l+=h);return l};return Wu=function(h){var l=this;if(typeof l!="function"||e.apply(l)!==i)throw new TypeError(n+l);for(var c=r(arguments,1),u,d=function(){if(this instanceof u){var y=l.apply(this,s(c,arguments));return Object(y)===y?y:this}return l.apply(h,s(c,arguments))},f=t(0,l.length-c.length),p=[],m=0;m<f;m++)p[m]="$"+m;if(u=Function("binder","return function ("+a(p,",")+"){ return binder.apply(this,arguments); }")(d),l.prototype){var g=function(){};g.prototype=l.prototype,u.prototype=new g,g.prototype=null}return u},Wu}var zu,Bg;function $h(){if(Bg)return zu;Bg=1;var n=HT();return zu=Function.prototype.bind||n,zu}var qu,Lg;function Lm(){return Lg||(Lg=1,qu=Function.prototype.call),qu}var Ku,Dg;function Jy(){return Dg||(Dg=1,Ku=Function.p
Line truncated
|
||||
`," "],a=["{","}","|","\\","^","`"].concat(r),o=["'"].concat(a),h=["%","/","?",";","#"].concat(o),l=["/","?","#"],c=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},p={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=eM();function y(x,M,T){if(x&&typeof x=="object"&&x instanceof e)return x;var C=new e;return C.parse(x,M,T),C}e.prototype.parse=function(x,M,T){if(typeof x!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof x);var C=x.indexOf("?"),I=C!==-1&&C<x.indexOf("#")?"?":"#",k=x.split(I),R=/\\/g;k[0]=k[0].replace(R,"/"),x=k.join(I);var F=x;if(F=F.trim(),!T&&x.split("#").length===1){var B=s.exec(F);if(B)return this.path=F,this.href=F,this.pathname=B[1],B[2]?(this.search=B[2],M?this.query=g.parse(this.search.substr(1)):this.query=this.search.substr(1)):M&&(this.search="",this.query={}),this}var L=t.exec(F);if(L){L=L[0];var Y=L.toLowerCase();this.protocol=Y,F=F.substr(L.length)}if(T||L||F.match(/^\/\/[^@/]+@[^@/]+/)){var O=F.substr(0,2)==="//";O&&!(L&&p[L])&&(F=F.substr(2),this.slashes=!0)}if(!p[L]&&(O||L&&!m[L])){for(var D=-1,P=0;P<l.length;P++){var U=F.indexOf(l[P]);U!==-1&&(D===-1||U<D)&&(D=U)}var N,X;D===-1?X=F.lastIndexOf("@"):X=F.lastIndexOf("@",D),X!==-1&&(N=F.slice(0,X),F=F.slice(X+1),this.auth=decodeURIComponent(N)),D=-1;for(var P=0;P<h.length;P++){var U=F.indexOf(h[P]);U!==-1&&(D===-1||U<D)&&(D=U)}D===-1&&(D=F.length),this.host=F.slice(0,D),F=F.slice(D),this.parseHost(),this.hostname=this.hostname||"";var K=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!K)for(var z=this.hostname.split(/\./),P=0,se=z.length;P<se;P++){var Q=z[P];if(Q&&!Q.match(u)){for(var me="",pe=0,Me=Q.length;pe<Me;pe++)Q.charCodeAt(pe)>127?me+="x":me+=Q[pe];if(!me.match(u)){var Ie=z.slice(0,P),ge=z.slice(P+1),Ee=Q.match(d);Ee&&(Ie.push(Ee[1]),ge.unshift(Ee[2])),ge.length&&(F="/"+ge.join(".")+F),this.hostname=Ie.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),K||(this.hostname=n.toASCII(this.hostname));var H=this.port?":"+this.port:"",Z=this.hostname||"";this.host=Z+H,this.href+=this.host,K&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),F[0]!=="/"&&(F="/"+F))}if(!f[Y])for(var P=0,se=o.length;P<se;P++){var q=o[P];if(F.indexOf(q)!==-1){var W=encodeURIComponent(q);W===q&&(W=escape(q)),F=F.split(q).join(W)}}var ee=F.indexOf("#");ee!==-1&&(this.hash=F.substr(ee),F=F.slice(0,ee));var ce=F.indexOf("?");if(ce!==-1?(this.search=F.substr(ce),this.query=F.substr(ce+1),M&&(this.query=g.parse(this.query)),F=F.slice(0,ce)):M&&(this.search="",this.query={}),F&&(this.pathname=F),m[Y]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var H=this.pathname||"",xe=this.search||"";this.path=H+xe}return this.href=this.format(),this};function w(x){return typeof x=="string"&&(x=y(x)),x instanceof e?x.format():e.prototype.format.call(x)}e.prototype.format=function(){var x=this.auth||"";x&&(x=encodeURIComponent(x),x=x.replace(/%3A/i,":"),x+="@");var M=this.protocol||"",T=this.pathname||"",C=this.hash||"",I=!1,k="";this.host?I=x+this.host:this.hostname&&(I=x+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(I+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(k=g.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var R=this.search||k&&"?"+k||"";return M&&M.substr(-1)!==":"&&(M+=":"),this.slashes||(!M||m[M])&&I!==!1?(I="//"+(I||""),T&&T.charAt(0)!=="/"&&(T="/"+T)):I||(I=""),C&&C.charAt(0)!=="#"&&(C="#"+C),R&&R.charAt(0)!=="?"&&(R="?"+R),T=T.replace(/[?#]/g,function(F){return encodeURIComponent(F)}),R=R.replace("#","%23"),M+I+T+R+C};function v(x,M){return y(x,!1,!0).resolve(M)}e.prototype.resolve=function(x){return this.resolveObject(y(x,!1,!0)).format()};function _(x,M){return x?y(x,!1,!0).resolveObject(M):M}return e.prototype.resolveObject=function(x){if(typeof x=="string"){var M=new e;M.parse(x,!1,!0),x=M}for(var T=new e,C=Object.keys(this),I=0;I<C.length;I++){var k=C[I];T[k]=this[k]}if(T.hash=x.hash,x.href==="")return T.href=T.format(),T;if(x.slashes&&!x.protocol){for(var R=Object.keys(x),F=0;F<R.length;F++){var B=R[F];B!=="protocol"&&(T[B]=x[B])}return m[T.protocol]&&T.hostname&&!T.pathname&&(T.pathname="/",T.path=T.pathname),T.href=T.format(),T}if(x.protocol&&x.protocol!==T.protocol){if(!m[x.protocol]){for(var L=Object.keys(x),Y=0;Y<L.length;Y++){var O=L[Y];T[O]=x[O]}return T.href=T.format(),T}if(T.protocol=x.protocol,!x.host&&!p[x.protocol]){for(var se=(x.pathname||"").split("/");se.length&&!(x.host=se.shift()););x.host||(x.host=""),x.hostname||(x.hostname=""),se[0]!==""&&se.unshift(""),se.length<2&&se.unshift(""),T.pathname=se.join("/")}else T.pathname=x.pathname;if(T.search=x.search,T.query=x.query,T.host=x.host||"",T.auth=x.auth,T.hostname=x.hostname||x.host,T.port=x.port,T.pathname||
Line truncated
|
||||
Deprecated since v${n}`):(i=i.split(`
|
||||
`).splice(t).join(`
|
||||
`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${e}
|
||||
Deprecated since v${n}`),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${e}
|
||||
Deprecated since v${n}`),console.warn(i))),e0[e]=!0}function Es(n){if(typeof n!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(n)}`)}function Ro(n){return n.split("?")[0].split("#")[0]}function iM(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function sM(n,e,t){return n.replace(new RegExp(iM(e),"g"),t)}function nM(n,e){let t="",i=0,s=-1,r=0,a=-1;for(let o=0;o<=n.length;++o){if(o<n.length)a=n.charCodeAt(o);else{if(a===47)break;a=47}if(a===47){if(!(s===o-1||r===1))if(s!==o-1&&r===2){if(t.length<2||i!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){const h=t.lastIndexOf("/");if(h!==t.length-1){h===-1?(t="",i=0):(t=t.slice(0,h),i=t.length-1-t.lastIndexOf("/")),s=o,r=0;continue}}else if(t.length===2||t.length===1){t="",i=0,s=o,r=0;continue}}}else t.length>0?t+=`/${n.slice(s+1,o)}`:t=n.slice(s+1,o),i=o-s-1;s=o,r=0}else a===46&&r!==-1?++r:r=-1}return t}const li={toPosix(n){return sM(n,"\\","/")},isUrl(n){return/^https?:/.test(this.toPosix(n))},isDataUrl(n){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(n)},isBlobUrl(n){return n.startsWith("blob:")},hasProtocol(n){return/^[^/:]+:/.test(this.toPosix(n))},getProtocol(n){Es(n),n=this.toPosix(n);const e=/^file:\/\/\//.exec(n);if(e)return e[0];const t=/^[^/:]+:\/{0,2}/.exec(n);return t?t[0]:""},toAbsolute(n,e,t){if(Es(n),this.isDataUrl(n)||this.isBlobUrl(n))return n;const i=Ro(this.toPosix(e??$e.ADAPTER.getBaseUrl())),s=Ro(this.toPosix(t??this.rootname(i)));return n=this.toPosix(n),n.startsWith("/")?li.join(s,n.slice(1)):this.isAbsolute(n)?n:this.join(i,n)},normalize(n){if(Es(n),n.length===0)return".";if(this.isDataUrl(n)||this.isBlobUrl(n))return n;n=this.toPosix(n);let e="";const t=n.startsWith("/");this.hasProtocol(n)&&(e=this.rootname(n),n=n.slice(e.length));const i=n.endsWith("/");return n=nM(n),n.length>0&&i&&(n+="/"),t?`/${n}`:e+n},isAbsolute(n){return Es(n),n=this.toPosix(n),this.hasProtocol(n)?!0:n.startsWith("/")},join(...n){if(n.length===0)return".";let e;for(let t=0;t<n.length;++t){const i=n[t];if(Es(i),i.length>0)if(e===void 0)e=i;else{const s=n[t-1]??"";this.joinExtensions.includes(this.extname(s).toLowerCase())?e+=`/../${i}`:e+=`/${i}`}}return e===void 0?".":this.normalize(e)},dirname(n){if(Es(n),n.length===0)return".";n=this.toPosix(n);let e=n.charCodeAt(0);const t=e===47;let i=-1,s=!0;const r=this.getProtocol(n),a=n;n=n.slice(r.length);for(let o=n.length-1;o>=1;--o)if(e=n.charCodeAt(o),e===47){if(!s){i=o;break}}else s=!1;return i===-1?t?"/":this.isUrl(a)?r+n:r:t&&i===1?"//":r+n.slice(0,i)},rootname(n){Es(n),n=this.toPosix(n);let e="";if(n.startsWith("/")?e="/":e=this.getProtocol(n),this.isUrl(n)){const t=n.indexOf("/",e.length);t!==-1?e=n.slice(0,t):e=n,e.endsWith("/")||(e+="/")}return e},basename(n,e){Es(n),e&&Es(e),n=Ro(this.toPosix(n));let t=0,i=-1,s=!0,r;if(e!==void 0&&e.length>0&&e.length<=n.length){if(e.length===n.length&&e===n)return"";let a=e.length-1,o=-1;for(r=n.length-1;r>=0;--r){const h=n.charCodeAt(r);if(h===47){if(!s){t=r+1;break}}else o===-1&&(s=!1,o=r+1),a>=0&&(h===e.charCodeAt(a)?--a===-1&&(i=r):(a=-1,i=o))}return t===i?i=o:i===-1&&(i=n.length),n.slice(t,i)}for(r=n.length-1;r>=0;--r)if(n.charCodeAt(r)===47){if(!s){t=r+1;break}}else i===-1&&(s=!1,i=r+1);return i===-1?"":n.slice(t,i)},extname(n){Es(n),n=Ro(this.toPosix(n));let e=-1,t=0,i=-1,s=!0,r=0;for(let a=n.length-1;a>=0;--a){const o=n.charCodeAt(a);if(o===47){if(!s){t=a+1;break}continue}i===-1&&(s=!1,i=a+1),o===46?e===-1?e=a:r!==1&&(r=1):e!==-1&&(r=-1)}return e===-1||i===-1||r===0||r===1&&e===i-1&&e===t+1?"":n.slice(e,i)},parse(n){Es(n);const e={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return e;n=Ro(this.toPosix(n));let t=n.charCodeAt(0);const i=this.isAbsolute(n);let s;e.root=this.rootname(n),i||this.hasProtocol(n)?s=1:s=0;let r=-1,a=0,o=-1,h=!0,l=n.length-1,c=0;for(;l>=s;--l){if(t=n.charCodeAt(l),t===47){if(!h){a=l+1;break}continue}o===-1&&(h=!1,o=l+1),t===46?r===-1?r=l:c!==1&&(c=1):r!==-1&&(c=-1)}return r===-1||o===-1||c===0||c===1&&r===o-1&&r===a+1?o!==-1&&(a===0&&i?e.base=e.name=n.slice(1,o):e.base=e.name=n.slice(a,o)):(a===0&&i?(e.name=n.slice(1,r),e.base=n.slice(1,o)):(e.name=n.slice(a,r),e.base=n.slice(a,o)),e.ext=n.slice(r,o)),e.dir=this.dirname(n),e},sep:"/",delimiter:":",joinExtensions:[".html"]};let fd;async function rM(){return fd??(fd=(async()=>{var r;const n=document.createElement("canvas").getContext("webgl");if(!n)return Ai.UNPACK;const e=await new Promise(a=>{const o=document.createElement("video");o.onloadeddata=()=>a(o),o.onerror=()=>a(null),o.autoplay=!1,o.crossOrigin="anonymous",o.preload="auto",o.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Line truncated
|
||||
Deprecated since v${n}`),console.warn(i))),t0[e]=!0}function Es(n){if(typeof n!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(n)}`)}function Ro(n){return n.split("?")[0].split("#")[0]}function iM(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function sM(n,e,t){return n.replace(new RegExp(iM(e),"g"),t)}function nM(n,e){let t="",i=0,s=-1,r=0,a=-1;for(let o=0;o<=n.length;++o){if(o<n.length)a=n.charCodeAt(o);else{if(a===47)break;a=47}if(a===47){if(!(s===o-1||r===1))if(s!==o-1&&r===2){if(t.length<2||i!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){const h=t.lastIndexOf("/");if(h!==t.length-1){h===-1?(t="",i=0):(t=t.slice(0,h),i=t.length-1-t.lastIndexOf("/")),s=o,r=0;continue}}else if(t.length===2||t.length===1){t="",i=0,s=o,r=0;continue}}}else t.length>0?t+=`/${n.slice(s+1,o)}`:t=n.slice(s+1,o),i=o-s-1;s=o,r=0}else a===46&&r!==-1?++r:r=-1}return t}const li={toPosix(n){return sM(n,"\\","/")},isUrl(n){return/^https?:/.test(this.toPosix(n))},isDataUrl(n){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(n)},isBlobUrl(n){return n.startsWith("blob:")},hasProtocol(n){return/^[^/:]+:/.test(this.toPosix(n))},getProtocol(n){Es(n),n=this.toPosix(n);const e=/^file:\/\/\//.exec(n);if(e)return e[0];const t=/^[^/:]+:\/{0,2}/.exec(n);return t?t[0]:""},toAbsolute(n,e,t){if(Es(n),this.isDataUrl(n)||this.isBlobUrl(n))return n;const i=Ro(this.toPosix(e??$e.ADAPTER.getBaseUrl())),s=Ro(this.toPosix(t??this.rootname(i)));return n=this.toPosix(n),n.startsWith("/")?li.join(s,n.slice(1)):this.isAbsolute(n)?n:this.join(i,n)},normalize(n){if(Es(n),n.length===0)return".";if(this.isDataUrl(n)||this.isBlobUrl(n))return n;n=this.toPosix(n);let e="";const t=n.startsWith("/");this.hasProtocol(n)&&(e=this.rootname(n),n=n.slice(e.length));const i=n.endsWith("/");return n=nM(n),n.length>0&&i&&(n+="/"),t?`/${n}`:e+n},isAbsolute(n){return Es(n),n=this.toPosix(n),this.hasProtocol(n)?!0:n.startsWith("/")},join(...n){if(n.length===0)return".";let e;for(let t=0;t<n.length;++t){const i=n[t];if(Es(i),i.length>0)if(e===void 0)e=i;else{const s=n[t-1]??"";this.joinExtensions.includes(this.extname(s).toLowerCase())?e+=`/../${i}`:e+=`/${i}`}}return e===void 0?".":this.normalize(e)},dirname(n){if(Es(n),n.length===0)return".";n=this.toPosix(n);let e=n.charCodeAt(0);const t=e===47;let i=-1,s=!0;const r=this.getProtocol(n),a=n;n=n.slice(r.length);for(let o=n.length-1;o>=1;--o)if(e=n.charCodeAt(o),e===47){if(!s){i=o;break}}else s=!1;return i===-1?t?"/":this.isUrl(a)?r+n:r:t&&i===1?"//":r+n.slice(0,i)},rootname(n){Es(n),n=this.toPosix(n);let e="";if(n.startsWith("/")?e="/":e=this.getProtocol(n),this.isUrl(n)){const t=n.indexOf("/",e.length);t!==-1?e=n.slice(0,t):e=n,e.endsWith("/")||(e+="/")}return e},basename(n,e){Es(n),e&&Es(e),n=Ro(this.toPosix(n));let t=0,i=-1,s=!0,r;if(e!==void 0&&e.length>0&&e.length<=n.length){if(e.length===n.length&&e===n)return"";let a=e.length-1,o=-1;for(r=n.length-1;r>=0;--r){const h=n.charCodeAt(r);if(h===47){if(!s){t=r+1;break}}else o===-1&&(s=!1,o=r+1),a>=0&&(h===e.charCodeAt(a)?--a===-1&&(i=r):(a=-1,i=o))}return t===i?i=o:i===-1&&(i=n.length),n.slice(t,i)}for(r=n.length-1;r>=0;--r)if(n.charCodeAt(r)===47){if(!s){t=r+1;break}}else i===-1&&(s=!1,i=r+1);return i===-1?"":n.slice(t,i)},extname(n){Es(n),n=Ro(this.toPosix(n));let e=-1,t=0,i=-1,s=!0,r=0;for(let a=n.length-1;a>=0;--a){const o=n.charCodeAt(a);if(o===47){if(!s){t=a+1;break}continue}i===-1&&(s=!1,i=a+1),o===46?e===-1?e=a:r!==1&&(r=1):e!==-1&&(r=-1)}return e===-1||i===-1||r===0||r===1&&e===i-1&&e===t+1?"":n.slice(e,i)},parse(n){Es(n);const e={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return e;n=Ro(this.toPosix(n));let t=n.charCodeAt(0);const i=this.isAbsolute(n);let s;e.root=this.rootname(n),i||this.hasProtocol(n)?s=1:s=0;let r=-1,a=0,o=-1,h=!0,l=n.length-1,c=0;for(;l>=s;--l){if(t=n.charCodeAt(l),t===47){if(!h){a=l+1;break}continue}o===-1&&(h=!1,o=l+1),t===46?r===-1?r=l:c!==1&&(c=1):r!==-1&&(c=-1)}return r===-1||o===-1||c===0||c===1&&r===o-1&&r===a+1?o!==-1&&(a===0&&i?e.base=e.name=n.slice(1,o):e.base=e.name=n.slice(a,o)):(a===0&&i?(e.name=n.slice(1,r),e.base=n.slice(1,o)):(e.name=n.slice(a,r),e.base=n.slice(a,o)),e.ext=n.slice(r,o)),e.dir=this.dirname(n),e},sep:"/",delimiter:":",joinExtensions:[".html"]};let fd;async function rM(){return fd??(fd=(async()=>{var r;const n=document.createElement("canvas").getContext("webgl");if(!n)return Ai.UNPACK;const e=await new Promise(a=>{const o=document.createElement("video");o.onloadeddata=()=>a(o),o.onerror=()=>a(null),o.autoplay=!1,o.crossOrigin="anonymous",o.preload="auto",o.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Line truncated
|
||||
`);function EM(n){let e="";for(let t=0;t<n;++t)t>0&&(e+=`
|
||||
else `),t<n-1&&(e+=`if(test == ${t}.0){}`);return e}function AM(n,e){if(n===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const t=e.createShader(e.FRAGMENT_SHADER);for(;;){const i=MM.replace(/%forloop%/gi,EM(n));if(e.shaderSource(t,i),e.compileShader(t),!e.getShaderParameter(t,e.COMPILE_STATUS))n=n/2|0;else break}return n}const yd=0,xd=1,bd=2,wd=3,Sd=4,_d=5;class Sn{constructor(){this.data=0,this.blendMode=st.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<yd)}set blend(e){!!(this.data&1<<yd)!==e&&(this.data^=1<<yd)}get offsets(){return!!(this.data&1<<xd)}set offsets(e){!!(this.data&1<<xd)!==e&&(this.data^=1<<xd)}get culling(){return!!(this.data&1<<bd)}set culling(e){!!(this.data&1<<bd)!==e&&(this.data^=1<<bd)}get depthTest(){return!!(this.data&1<<wd)}set depthTest(e){!!(this.data&1<<wd)!==e&&(this.data^=1<<wd)}get depthMask(){return!!(this.data&1<<_d)}set depthMask(e){!!(this.data&1<<_d)!==e&&(this.data^=1<<_d)}get clockwiseFrontFace(){return!!(this.data&1<<Sd)}set clockwiseFrontFace(e){!!(this.data&1<<Sd)!==e&&(this.data^=1<<Sd)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==st.NONE,this._blendMode=e}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}static for2d(){const e=new Sn;return e.depthTest=!1,e.blend=!0,e}}Sn.prototype.toString=function(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`};const pf=[];function hx(n,e){if(!n)return null;let t="";if(typeof n=="string"){const i=/\.(\w{3,4})(?:$|\?|#)/i.exec(n);i&&(t=i[1].toLowerCase())}for(let i=pf.length-1;i>=0;--i){const s=pf[i];if(s.test&&s.test(n,t))return new s(n,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class Ns{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,t,i,s,r,a,o,h){if(arguments.length>8)throw new Error("max arguments reached");const{name:l,items:c}=this;this._aliasCount++;for(let u=0,d=c.length;u<d;u++)c[u][l](e,t,i,s,r,a,o,h);return c===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){const t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(Ns.prototype,{dispatch:{value:Ns.prototype.emit},run:{value:Ns.prototype.emit}});class pl{constructor(e=0,t=0){this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new Ns("setRealSize"),this.onUpdate=new Ns("update"),this.onError=new Ns("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,t){(e!==this._width||t!==this._height)&&(this._width=e,this._height=t,this.onResize.emit(e,t))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,t,i){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(e,t){return!1}}class Gh extends pl{constructor(e,t){const{width:i,height:s}=t||{};if(!i||!s)throw new Error("BufferResource width or height invalid");super(i,s),this.data=e,this.unpackAlignment=t.unpackAlignment??4}upload(e,t,i){const s=e.gl;s.pixelStorei(s.UNPACK_ALIGNMENT,this.unpackAlignment),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===Ai.UNPACK);const r=t.realWidth,a=t.realHeight;return i.width===r&&i.height===a?s.texSubImage2D(t.target,0,0,0,r,a,t.format,i.type,this.data):(i.width=r,i.height=a,s.texImage2D(t.target,0,i.internalFormat,r,a,0,t.format,i.type,this.data)),!0}dispose(){this.data=null}static test(e){return e===null||e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}const CM={scaleMode:Os.NEAREST,alphaMode:Ai.NPM},gf=class Na extends El{constructor(e=null,t=null){super(),t=Object.assign({},Na.defaultOptions,t);const{alphaMode:i,mipmap:s,anisotropicLevel:r,scaleMode:a,width:o,height:h,wrapMode:l,format:c,type:u,target:d,resolution:
Line truncated
|
||||
else `),t<n-1&&(e+=`if(test == ${t}.0){}`);return e}function AM(n,e){if(n===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const t=e.createShader(e.FRAGMENT_SHADER);for(;;){const i=MM.replace(/%forloop%/gi,EM(n));if(e.shaderSource(t,i),e.compileShader(t),!e.getShaderParameter(t,e.COMPILE_STATUS))n=n/2|0;else break}return n}const yd=0,xd=1,bd=2,wd=3,Sd=4,_d=5;class Sn{constructor(){this.data=0,this.blendMode=st.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<yd)}set blend(e){!!(this.data&1<<yd)!==e&&(this.data^=1<<yd)}get offsets(){return!!(this.data&1<<xd)}set offsets(e){!!(this.data&1<<xd)!==e&&(this.data^=1<<xd)}get culling(){return!!(this.data&1<<bd)}set culling(e){!!(this.data&1<<bd)!==e&&(this.data^=1<<bd)}get depthTest(){return!!(this.data&1<<wd)}set depthTest(e){!!(this.data&1<<wd)!==e&&(this.data^=1<<wd)}get depthMask(){return!!(this.data&1<<_d)}set depthMask(e){!!(this.data&1<<_d)!==e&&(this.data^=1<<_d)}get clockwiseFrontFace(){return!!(this.data&1<<Sd)}set clockwiseFrontFace(e){!!(this.data&1<<Sd)!==e&&(this.data^=1<<Sd)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==st.NONE,this._blendMode=e}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}static for2d(){const e=new Sn;return e.depthTest=!1,e.blend=!0,e}}Sn.prototype.toString=function(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`};const gf=[];function hx(n,e){if(!n)return null;let t="";if(typeof n=="string"){const i=/\.(\w{3,4})(?:$|\?|#)/i.exec(n);i&&(t=i[1].toLowerCase())}for(let i=gf.length-1;i>=0;--i){const s=gf[i];if(s.test&&s.test(n,t))return new s(n,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class Ns{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,t,i,s,r,a,o,h){if(arguments.length>8)throw new Error("max arguments reached");const{name:l,items:c}=this;this._aliasCount++;for(let u=0,d=c.length;u<d;u++)c[u][l](e,t,i,s,r,a,o,h);return c===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){const t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(Ns.prototype,{dispatch:{value:Ns.prototype.emit},run:{value:Ns.prototype.emit}});class pl{constructor(e=0,t=0){this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new Ns("setRealSize"),this.onUpdate=new Ns("update"),this.onError=new Ns("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,t){(e!==this._width||t!==this._height)&&(this._width=e,this._height=t,this.onResize.emit(e,t))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,t,i){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(e,t){return!1}}class Gh extends pl{constructor(e,t){const{width:i,height:s}=t||{};if(!i||!s)throw new Error("BufferResource width or height invalid");super(i,s),this.data=e,this.unpackAlignment=t.unpackAlignment??4}upload(e,t,i){const s=e.gl;s.pixelStorei(s.UNPACK_ALIGNMENT,this.unpackAlignment),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===Ai.UNPACK);const r=t.realWidth,a=t.realHeight;return i.width===r&&i.height===a?s.texSubImage2D(t.target,0,0,0,r,a,t.format,i.type,this.data):(i.width=r,i.height=a,s.texImage2D(t.target,0,i.internalFormat,r,a,0,t.format,i.type,this.data)),!0}dispose(){this.data=null}static test(e){return e===null||e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}const CM={scaleMode:Os.NEAREST,alphaMode:Ai.NPM},vf=class Na extends El{constructor(e=null,t=null){super(),t=Object.assign({},Na.defaultOptions,t);const{alphaMode:i,mipmap:s,anisotropicLevel:r,scaleMode:a,width:o,height:h,wrapMode:l,format:c,type:u,target:d,resolution:
Line truncated
|
||||
|
||||
uniform sampler2D uSampler;
|
||||
|
||||
@@ -48,7 +48,7 @@ void main(void){
|
||||
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
||||
vTextureCoord = aTextureCoord;
|
||||
}
|
||||
`;function g0(n,e,t){const i=n.createShader(e);return n.shaderSource(i,t),n.compileShader(i),i}function Td(n){const e=new Array(n);for(let t=0;t<e.length;t++)e[t]=!1;return e}function fx(n,e){switch(n){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"uvec2":return new Uint32Array(2*e);case"uvec3":return new Uint32Array(3*e);case"uvec4":return new Uint32Array(4*e);case"bool":return!1;case"bvec2":return Td(2*e);case"bvec3":return Td(3*e);case"bvec4":return Td(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const Qa=[{test:n=>n.type==="float"&&n.size===1&&!n.isArray,code:n=>`
|
||||
`;function v0(n,e,t){const i=n.createShader(e);return n.shaderSource(i,t),n.compileShader(i),i}function Td(n){const e=new Array(n);for(let t=0;t<e.length;t++)e[t]=!1;return e}function fx(n,e){switch(n){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"uvec2":return new Uint32Array(2*e);case"uvec3":return new Uint32Array(3*e);case"uvec4":return new Uint32Array(4*e);case"bool":return!1;case"bvec2":return Td(2*e);case"bvec3":return Td(3*e);case"bvec4":return Td(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const Qa=[{test:n=>n.type==="float"&&n.size===1&&!n.isArray,code:n=>`
|
||||
if(uv["${n}"] !== ud["${n}"].value)
|
||||
{
|
||||
ud["${n}"].value = uv["${n}"]
|
||||
@@ -319,13 +319,13 @@ void main(void){
|
||||
cv = cu.value;
|
||||
v = uv["${s}"];
|
||||
${h};`)}}return new Function("ud","uv","renderer","syncData",t.join(`
|
||||
`))}const mx={};let Ca=mx;function VM(){if(Ca===mx||Ca!=null&&Ca.isContextLost()){const n=$e.ADAPTER.createCanvas();let e;$e.PREFER_ENV>=ga.WEBGL2&&(e=n.getContext("webgl2",{})),e||(e=n.getContext("webgl",{})||n.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),Ca=e}return Ca}let Hl;function $M(){if(!Hl){Hl=xs.MEDIUM;const n=VM();if(n&&n.getShaderPrecisionFormat){const e=n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT);e&&(Hl=e.precision?xs.HIGH:xs.MEDIUM)}}return Hl}function v0(n,e){const t=n.getShaderSource(e).split(`
|
||||
`))}const mx={};let Ia=mx;function VM(){if(Ia===mx||Ia!=null&&Ia.isContextLost()){const n=$e.ADAPTER.createCanvas();let e;$e.PREFER_ENV>=va.WEBGL2&&(e=n.getContext("webgl2",{})),e||(e=n.getContext("webgl",{})||n.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),Ia=e}return Ia}let Hl;function $M(){if(!Hl){Hl=xs.MEDIUM;const n=VM();if(n&&n.getShaderPrecisionFormat){const e=n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT);e&&(Hl=e.precision?xs.HIGH:xs.MEDIUM)}}return Hl}function y0(n,e){const t=n.getShaderSource(e).split(`
|
||||
`).map((l,c)=>`${c}: ${l}`),i=n.getShaderInfoLog(e),s=i.split(`
|
||||
`),r={},a=s.map(l=>parseFloat(l.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(l=>l&&!r[l]?(r[l]=!0,!0):!1),o=[""];a.forEach(l=>{t[l-1]=`%c${t[l-1]}%c`,o.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const h=t.join(`
|
||||
`);o[0]=h,console.error(i),console.groupCollapsed("click to view full shader code"),console.warn(...o),console.groupEnd()}function GM(n,e,t,i){n.getProgramParameter(e,n.LINK_STATUS)||(n.getShaderParameter(t,n.COMPILE_STATUS)||v0(n,t),n.getShaderParameter(i,n.COMPILE_STATUS)||v0(n,i),console.error("PixiJS Error: Could not initialize shader."),n.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",n.getProgramInfoLog(e)))}const HM={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function px(n){return HM[n]}let jl=null;const y0={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function gx(n,e){if(!jl){const t=Object.keys(y0);jl={};for(let i=0;i<t.length;++i){const s=t[i];jl[n[s]]=y0[s]}}return jl[e]}function x0(n,e,t){if(n.substring(0,9)!=="precision"){let i=e;return e===xs.HIGH&&t!==xs.HIGH&&(i=xs.MEDIUM),`precision ${i} float;
|
||||
${n}`}else if(t!==xs.HIGH&&n.substring(0,15)==="precision highp")return n.replace("precision highp","precision mediump");return n}let Po;function jM(){if(typeof Po=="boolean")return Po;try{Po=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{Po=!1}return Po}let WM=0;const Wl={},bf=class Ua{constructor(e,t,i="pixi-shader",s={}){this.extra={},this.id=WM++,this.vertexSrc=e||Ua.defaultVertexSrc,this.fragmentSrc=t||Ua.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=s,this.vertexSrc.substring(0,8)!=="#version"&&(i=i.replace(/\s+/g,"-"),Wl[i]?(Wl[i]++,i+=`-${Wl[i]}`):Wl[i]=1,this.vertexSrc=`#define SHADER_NAME ${i}
|
||||
`);o[0]=h,console.error(i),console.groupCollapsed("click to view full shader code"),console.warn(...o),console.groupEnd()}function GM(n,e,t,i){n.getProgramParameter(e,n.LINK_STATUS)||(n.getShaderParameter(t,n.COMPILE_STATUS)||y0(n,t),n.getShaderParameter(i,n.COMPILE_STATUS)||y0(n,i),console.error("PixiJS Error: Could not initialize shader."),n.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",n.getProgramInfoLog(e)))}const HM={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function px(n){return HM[n]}let jl=null;const x0={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function gx(n,e){if(!jl){const t=Object.keys(x0);jl={};for(let i=0;i<t.length;++i){const s=t[i];jl[n[s]]=x0[s]}}return jl[e]}function b0(n,e,t){if(n.substring(0,9)!=="precision"){let i=e;return e===xs.HIGH&&t!==xs.HIGH&&(i=xs.MEDIUM),`precision ${i} float;
|
||||
${n}`}else if(t!==xs.HIGH&&n.substring(0,15)==="precision highp")return n.replace("precision highp","precision mediump");return n}let Po;function jM(){if(typeof Po=="boolean")return Po;try{Po=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{Po=!1}return Po}let WM=0;const Wl={},wf=class Ua{constructor(e,t,i="pixi-shader",s={}){this.extra={},this.id=WM++,this.vertexSrc=e||Ua.defaultVertexSrc,this.fragmentSrc=t||Ua.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=s,this.vertexSrc.substring(0,8)!=="#version"&&(i=i.replace(/\s+/g,"-"),Wl[i]?(Wl[i]++,i+=`-${Wl[i]}`):Wl[i]=1,this.vertexSrc=`#define SHADER_NAME ${i}
|
||||
${this.vertexSrc}`,this.fragmentSrc=`#define SHADER_NAME ${i}
|
||||
${this.fragmentSrc}`,this.vertexSrc=x0(this.vertexSrc,Ua.defaultVertexPrecision,xs.HIGH),this.fragmentSrc=x0(this.fragmentSrc,Ua.defaultFragmentPrecision,$M())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return NM}static get defaultFragmentSrc(){return DM}static from(e,t,i){const s=e+t;let r=u0[s];return r||(u0[s]=r=new Ua(e,t,i)),r}};bf.defaultVertexPrecision=xs.HIGH,bf.defaultFragmentPrecision=Xn.apple.device?xs.HIGH:xs.MEDIUM;let fn=bf,zM=0;class Us{constructor(e,t,i){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=zM++,this.static=!!t,this.ubo=!!i,e instanceof qt?(this.buffer=e,this.buffer.type=gn.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=e,this.ubo&&(this.buffer=new qt(new Float32Array(1)),this.buffer.type=gn.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(e,t,i){if(!this.ubo)this.uniforms[e]=new Us(t,i);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(e,t,i){return new Us(e,t,i)}static uboFrom(e,t){return new Us(e,t??!0,!0)}}class Xs{constructor(e,t){this.uniformBindCount=0,this.program=e,t?t instanceof Us?this.uniformGroup=t:this.uniformGroup=new Us(t):this.uniformGroup=new Us({}),this.disposeRunner=new Ns("disposeShader")}checkUniformExists(e,t){if(t.uniforms[e])return!0;for(const i in t.uniforms){const s=t.uniforms[i];if(s.group===!0&&this.checkUniformExists(e,s))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(e,t,i){const s=fn.from(e,t);return new Xs(s,i)}}class vx{constructor(e,t){if(this.vertexSrc=e,this.fragTemplate=t,this.programCache={},this.defaultGroupCache={},!t.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!t.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(e){if(!this.programCache[e]){const i=new Int32Array(e);for(let r=0;r<e;r++)i[r]=r;this.defaultGroupCache[e]=Us.from({uSamplers:i},!0);let s=this.fragTemplate;s=s.replace(/%count%/gi,`${e}`),s=s.replace(/%forloop%/gi,this.generateSampleSrc(e)),this.programCache[e]=new fn(this.vertexSrc,s)}const t={tint:new Float32Array([1,1,1,1]),translationMatrix:new Zt,default:this.defaultGroupCache[e]};return new Xs(this.programCache[e],t)}generateSampleSrc(e){let t="";t+=`
|
||||
${this.fragmentSrc}`,this.vertexSrc=b0(this.vertexSrc,Ua.defaultVertexPrecision,xs.HIGH),this.fragmentSrc=b0(this.fragmentSrc,Ua.defaultFragmentPrecision,$M())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return NM}static get defaultFragmentSrc(){return DM}static from(e,t,i){const s=e+t;let r=d0[s];return r||(d0[s]=r=new Ua(e,t,i)),r}};wf.defaultVertexPrecision=xs.HIGH,wf.defaultFragmentPrecision=Xn.apple.device?xs.HIGH:xs.MEDIUM;let fn=wf,zM=0;class Us{constructor(e,t,i){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=zM++,this.static=!!t,this.ubo=!!i,e instanceof qt?(this.buffer=e,this.buffer.type=gn.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=e,this.ubo&&(this.buffer=new qt(new Float32Array(1)),this.buffer.type=gn.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(e,t,i){if(!this.ubo)this.uniforms[e]=new Us(t,i);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(e,t,i){return new Us(e,t,i)}static uboFrom(e,t){return new Us(e,t??!0,!0)}}class Xs{constructor(e,t){this.uniformBindCount=0,this.program=e,t?t instanceof Us?this.uniformGroup=t:this.uniformGroup=new Us(t):this.uniformGroup=new Us({}),this.disposeRunner=new Ns("disposeShader")}checkUniformExists(e,t){if(t.uniforms[e])return!0;for(const i in t.uniforms){const s=t.uniforms[i];if(s.group===!0&&this.checkUniformExists(e,s))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(e,t,i){const s=fn.from(e,t);return new Xs(s,i)}}class vx{constructor(e,t){if(this.vertexSrc=e,this.fragTemplate=t,this.programCache={},this.defaultGroupCache={},!t.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!t.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(e){if(!this.programCache[e]){const i=new Int32Array(e);for(let r=0;r<e;r++)i[r]=r;this.defaultGroupCache[e]=Us.from({uSamplers:i},!0);let s=this.fragTemplate;s=s.replace(/%count%/gi,`${e}`),s=s.replace(/%forloop%/gi,this.generateSampleSrc(e)),this.programCache[e]=new fn(this.vertexSrc,s)}const t={tint:new Float32Array([1,1,1,1]),translationMatrix:new Zt,default:this.defaultGroupCache[e]};return new Xs(this.programCache[e],t)}generateSampleSrc(e){let t="";t+=`
|
||||
`,t+=`
|
||||
`;for(let i=0;i<e;i++)i>0&&(t+=`
|
||||
else `),i<e-1&&(t+=`if(vTextureId < ${i}.5)`),t+=`
|
||||
@@ -333,7 +333,7 @@ else `),i<e-1&&(t+=`if(vTextureId < ${i}.5)`),t+=`
|
||||
color = texture2D(uSamplers[${i}], vTextureCoord);`,t+=`
|
||||
}`;return t+=`
|
||||
`,t+=`
|
||||
`,t}}class wf{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let e=0;e<this.count;e++)this.elements[e]=null;this.count=0}}function qM(){return!Xn.apple.device}function KM(n){let e=!0;const t=$e.ADAPTER.getNavigator();if(Xn.tablet||Xn.phone){if(Xn.apple.device){const i=t.userAgent.match(/OS (\d+)_(\d+)?/);i&&parseInt(i[1],10)<11&&(e=!1)}if(Xn.android.device){const i=t.userAgent.match(/Android\s([0-9.]*)/);i&&parseInt(i[1],10)<7&&(e=!1)}}return e?n:4}class zh{constructor(e){this.renderer=e}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(e){}}var ZM=`varying vec2 vTextureCoord;
|
||||
`,t}}class Sf{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let e=0;e<this.count;e++)this.elements[e]=null;this.count=0}}function qM(){return!Xn.apple.device}function KM(n){let e=!0;const t=$e.ADAPTER.getNavigator();if(Xn.tablet||Xn.phone){if(Xn.apple.device){const i=t.userAgent.match(/OS (\d+)_(\d+)?/);i&&parseInt(i[1],10)<11&&(e=!1)}if(Xn.android.device){const i=t.userAgent.match(/Android\s([0-9.]*)/);i&&parseInt(i[1],10)<7&&(e=!1)}}return e?n:4}class zh{constructor(e){this.renderer=e}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(e){}}var ZM=`varying vec2 vTextureCoord;
|
||||
varying vec4 vColor;
|
||||
varying float vTextureId;
|
||||
uniform sampler2D uSamplers[%count%];
|
||||
@@ -364,7 +364,7 @@ void main(void){
|
||||
vTextureId = aTextureId;
|
||||
vColor = aColor * tint;
|
||||
}
|
||||
`;const Xo=class Is extends zh{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=ux,this.vertexSize=6,this.state=Sn.for2d(),this.size=Is.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??KM(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??qM(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return Mt("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return JM}static get defaultFragmentTemplate(){return ZM}setShaderGenerator({vertex:e=Is.defaultVertexSrc,fragment:t=Is.defaultFragmentTemplate}={}){this.shaderGenerator=new vx(e,t)}contextChange(){const e=this.renderer.gl;$e.PREFER_ENV===ga.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),Is.defaultMaxTextures),this.maxTextures=AM(this.maxTextures,e)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:e,_textureArrayPool:t}=Is,i=this.size/4,s=Math.floor(i/this.maxTextures)+1;for(;e.length<i;)e.push(new vf);for(;t.length<s;)t.push(new wf);for(let r=0;r<this.maxTextures;r++)this._tempBoundTextures[r]=null}onPrerender(){this._flushId=0}render(e){e._texture.valid&&(this._vertexCount+e.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,i=Is._textureArrayPool,s=this.renderer.batch,r=this._tempBoundTextures,a=this.renderer.textureGC.count;let o=++ot._globalBatch,h=0,l=i[0],c=0;s.copyBoundTextures(r,t);for(let u=0;u<this._bufferSize;++u){const d=e[u];e[u]=null,d._batchEnabled!==o&&(l.count>=t&&(s.boundArray(l,r,o,t),this.buildDrawCalls(l,c,u),c=u,l=i[++h],++o),d._batchEnabled=o,d.touched=a,l.elements[l.count++]=d)}l.count>0&&(s.boundArray(l,r,o,t),this.buildDrawCalls(l,c,this._bufferSize),++h,++o);for(let u=0;u<r.length;u++)r[u]=null;ot._globalBatch=o}buildDrawCalls(e,t,i){const{_bufferedElements:s,_attributeBuffer:r,_indexBuffer:a,vertexSize:o}=this,h=Is._drawCallPool;let l=this._dcIndex,c=this._aIndex,u=this._iIndex,d=h[l];d.start=this._iIndex,d.texArray=e;for(let f=t;f<i;++f){const p=s[f],m=p._texture.baseTexture,g=ox[m.alphaMode?1:0][p.blendMode];s[f]=null,t<f&&d.blend!==g&&(d.size=u-d.start,t=f,d=h[++l],d.texArray=e,d.start=u),this.packInterleavedGeometry(p,r,a,c,u),c+=p.vertexData.length/2*o,u+=p.indices.length,d.blend=g}t<i&&(d.size=u-d.start,++l),this._dcIndex=l,this._aIndex=c,this._iIndex=u}bindAndClearTexArray(e){const t=this.renderer.texture;for(let i=0;i<e.count;i++)t.bind(e.elements[i],e.ids[i]),e.elements[i]=null;e.count=0}updateGeometry(){const{_packedGeometries:e,_attributeBuffer:t,_indexBuffer:i}=this;Is.canUploadSameBuffer?(e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const e=this._dcIndex,{gl:t,state:i}=this.renderer,s=Is._drawCallPool;let r=null;for(let a=0;a<e;a++){const{texArray:o,type:h,size:l,start:c,blend:u}=s[a];r!==o&&(r=o,this.bindAndClearTexArray(o)),this.state.blendMode=u,i.set(this.state),t.drawElements(h,l,t.UNSIGNED_SHORT,c*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),Is.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._f
Line truncated
|
||||
`;const Xo=class Is extends zh{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=ux,this.vertexSize=6,this.state=Sn.for2d(),this.size=Is.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??KM(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??qM(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return Mt("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return JM}static get defaultFragmentTemplate(){return ZM}setShaderGenerator({vertex:e=Is.defaultVertexSrc,fragment:t=Is.defaultFragmentTemplate}={}){this.shaderGenerator=new vx(e,t)}contextChange(){const e=this.renderer.gl;$e.PREFER_ENV===va.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),Is.defaultMaxTextures),this.maxTextures=AM(this.maxTextures,e)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:e,_textureArrayPool:t}=Is,i=this.size/4,s=Math.floor(i/this.maxTextures)+1;for(;e.length<i;)e.push(new yf);for(;t.length<s;)t.push(new Sf);for(let r=0;r<this.maxTextures;r++)this._tempBoundTextures[r]=null}onPrerender(){this._flushId=0}render(e){e._texture.valid&&(this._vertexCount+e.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,i=Is._textureArrayPool,s=this.renderer.batch,r=this._tempBoundTextures,a=this.renderer.textureGC.count;let o=++ot._globalBatch,h=0,l=i[0],c=0;s.copyBoundTextures(r,t);for(let u=0;u<this._bufferSize;++u){const d=e[u];e[u]=null,d._batchEnabled!==o&&(l.count>=t&&(s.boundArray(l,r,o,t),this.buildDrawCalls(l,c,u),c=u,l=i[++h],++o),d._batchEnabled=o,d.touched=a,l.elements[l.count++]=d)}l.count>0&&(s.boundArray(l,r,o,t),this.buildDrawCalls(l,c,this._bufferSize),++h,++o);for(let u=0;u<r.length;u++)r[u]=null;ot._globalBatch=o}buildDrawCalls(e,t,i){const{_bufferedElements:s,_attributeBuffer:r,_indexBuffer:a,vertexSize:o}=this,h=Is._drawCallPool;let l=this._dcIndex,c=this._aIndex,u=this._iIndex,d=h[l];d.start=this._iIndex,d.texArray=e;for(let f=t;f<i;++f){const p=s[f],m=p._texture.baseTexture,g=ox[m.alphaMode?1:0][p.blendMode];s[f]=null,t<f&&d.blend!==g&&(d.size=u-d.start,t=f,d=h[++l],d.texArray=e,d.start=u),this.packInterleavedGeometry(p,r,a,c,u),c+=p.vertexData.length/2*o,u+=p.indices.length,d.blend=g}t<i&&(d.size=u-d.start,++l),this._dcIndex=l,this._aIndex=c,this._iIndex=u}bindAndClearTexArray(e){const t=this.renderer.texture;for(let i=0;i<e.count;i++)t.bind(e.elements[i],e.ids[i]),e.elements[i]=null;e.count=0}updateGeometry(){const{_packedGeometries:e,_attributeBuffer:t,_indexBuffer:i}=this;Is.canUploadSameBuffer?(e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const e=this._dcIndex,{gl:t,state:i}=this.renderer,s=Is._drawCallPool;let r=null;for(let a=0;a<e;a++){const{texArray:o,type:h,size:l,start:c,blend:u}=s[a];r!==o&&(r=o,this.bindAndClearTexArray(o)),this.state.blendMode=u,i.set(this.state),t.drawElements(h,l,t.UNSIGNED_SHORT,c*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),Is.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._f
Line truncated
|
||||
|
||||
uniform sampler2D uSampler;
|
||||
|
||||
@@ -397,7 +397,7 @@ void main(void)
|
||||
gl_Position = filterVertexPosition();
|
||||
vTextureCoord = filterTextureCoord();
|
||||
}
|
||||
`;const Sf=class Yo extends Xs{constructor(e,t,i){const s=fn.from(e||Yo.defaultVertexSrc,t||Yo.defaultFragmentSrc);super(s,i),this.padding=0,this.resolution=Yo.defaultResolution,this.multisample=Yo.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new Sn}apply(e,t,i,s,r){e.applyFilter(this,t,i,s)}get blendMode(){return this.state.blendMode}set blendMode(e){this.state.blendMode=e}get resolution(){return this._resolution}set resolution(e){this._resolution=e}static get defaultVertexSrc(){return eE}static get defaultFragmentSrc(){return QM}};Sf.defaultResolution=1,Sf.defaultMultisample=mi.NONE;let qi=Sf;class zc{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Dt(0),this.alpha=1}init(e){this.clearBeforeRender=e.clearBeforeRender;const{backgroundColor:t,background:i,backgroundAlpha:s}=e,r=i??t;r!==void 0&&(this.color=r),this.alpha=s}get color(){return this._backgroundColor.value}set color(e){this._backgroundColor.setValue(e)}get alpha(){return this._backgroundColor.alpha}set alpha(e){this._backgroundColor.setAlpha(e)}get backgroundColor(){return this._backgroundColor}destroy(){}}zc.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},zc.extension={type:[Xe.RendererSystem,Xe.CanvasRendererSystem],name:"background"};ze.add(zc);class yx{constructor(e){this.renderer=e,this.emptyRenderer=new zh(e),this.currentRenderer=this.emptyRenderer}setObjectRenderer(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(e,t){const{boundTextures:i}=this.renderer.texture;for(let s=t-1;s>=0;--s)e[s]=i[s]||null,e[s]&&(e[s]._batchLocation=s)}boundArray(e,t,i,s){const{elements:r,ids:a,count:o}=e;let h=0;for(let l=0;l<o;l++){const c=r[l],u=c._batchLocation;if(u>=0&&u<s&&t[u]===c){a[l]=u;continue}for(;h<s;){const d=t[h];if(d&&d._batchEnabled===i&&d._batchLocation===h){h++;continue}a[l]=h,c._batchLocation=h,t[h]=c;break}}}destroy(){this.renderer=null}}yx.extension={type:Xe.RendererSystem,name:"batch"};ze.add(yx);let b0=0;class qc{constructor(e){this.renderer=e,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(e){this.gl=e,this.renderer.gl=e,this.renderer.CONTEXT_UID=b0++}init(e){if(e.context)this.initFromContext(e.context);else{const t=this.renderer.background.alpha<1,i=e.premultipliedAlpha;this.preserveDrawingBuffer=e.preserveDrawingBuffer,this.useContextAlpha=e.useContextAlpha,this.powerPreference=e.powerPreference,this.initFromOptions({alpha:t,premultipliedAlpha:i,antialias:e.antialias,stencil:!0,preserveDrawingBuffer:e.preserveDrawingBuffer,powerPreference:e.powerPreference})}}initFromContext(e){this.gl=e,this.validateContext(e),this.renderer.gl=e,this.renderer.CONTEXT_UID=b0++,this.renderer.runners.contextChange.emit(e);const t=this.renderer.view;t.addEventListener!==void 0&&(t.addEventListener("webglcontextlost",this.handleContextLost,!1),t.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(e){const t=this.createContext(this.renderer.view,e);this.initFromContext(t)}createContext(e,t){let i;if($e.PREFER_ENV>=ga.WEBGL2&&(i=e.getContext("webgl2",t)),i)this.webGLVersion=2;else if(this.webGLVersion=1,i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!i)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),this.gl}getExtensions(){const{gl:e}=this,t={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc"),bptc:e.getExtension("EXT_texture_compression_bptc")};this.webGLVersion===1?Object.assign(this.extensions,t,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_ha
Line truncated
|
||||
`;const _f=class Yo extends Xs{constructor(e,t,i){const s=fn.from(e||Yo.defaultVertexSrc,t||Yo.defaultFragmentSrc);super(s,i),this.padding=0,this.resolution=Yo.defaultResolution,this.multisample=Yo.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new Sn}apply(e,t,i,s,r){e.applyFilter(this,t,i,s)}get blendMode(){return this.state.blendMode}set blendMode(e){this.state.blendMode=e}get resolution(){return this._resolution}set resolution(e){this._resolution=e}static get defaultVertexSrc(){return eE}static get defaultFragmentSrc(){return QM}};_f.defaultResolution=1,_f.defaultMultisample=mi.NONE;let qi=_f;class zc{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Lt(0),this.alpha=1}init(e){this.clearBeforeRender=e.clearBeforeRender;const{backgroundColor:t,background:i,backgroundAlpha:s}=e,r=i??t;r!==void 0&&(this.color=r),this.alpha=s}get color(){return this._backgroundColor.value}set color(e){this._backgroundColor.setValue(e)}get alpha(){return this._backgroundColor.alpha}set alpha(e){this._backgroundColor.setAlpha(e)}get backgroundColor(){return this._backgroundColor}destroy(){}}zc.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},zc.extension={type:[Xe.RendererSystem,Xe.CanvasRendererSystem],name:"background"};ze.add(zc);class yx{constructor(e){this.renderer=e,this.emptyRenderer=new zh(e),this.currentRenderer=this.emptyRenderer}setObjectRenderer(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(e,t){const{boundTextures:i}=this.renderer.texture;for(let s=t-1;s>=0;--s)e[s]=i[s]||null,e[s]&&(e[s]._batchLocation=s)}boundArray(e,t,i,s){const{elements:r,ids:a,count:o}=e;let h=0;for(let l=0;l<o;l++){const c=r[l],u=c._batchLocation;if(u>=0&&u<s&&t[u]===c){a[l]=u;continue}for(;h<s;){const d=t[h];if(d&&d._batchEnabled===i&&d._batchLocation===h){h++;continue}a[l]=h,c._batchLocation=h,t[h]=c;break}}}destroy(){this.renderer=null}}yx.extension={type:Xe.RendererSystem,name:"batch"};ze.add(yx);let w0=0;class qc{constructor(e){this.renderer=e,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(e){this.gl=e,this.renderer.gl=e,this.renderer.CONTEXT_UID=w0++}init(e){if(e.context)this.initFromContext(e.context);else{const t=this.renderer.background.alpha<1,i=e.premultipliedAlpha;this.preserveDrawingBuffer=e.preserveDrawingBuffer,this.useContextAlpha=e.useContextAlpha,this.powerPreference=e.powerPreference,this.initFromOptions({alpha:t,premultipliedAlpha:i,antialias:e.antialias,stencil:!0,preserveDrawingBuffer:e.preserveDrawingBuffer,powerPreference:e.powerPreference})}}initFromContext(e){this.gl=e,this.validateContext(e),this.renderer.gl=e,this.renderer.CONTEXT_UID=w0++,this.renderer.runners.contextChange.emit(e);const t=this.renderer.view;t.addEventListener!==void 0&&(t.addEventListener("webglcontextlost",this.handleContextLost,!1),t.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(e){const t=this.createContext(this.renderer.view,e);this.initFromContext(t)}createContext(e,t){let i;if($e.PREFER_ENV>=va.WEBGL2&&(i=e.getContext("webgl2",t)),i)this.webGLVersion=2;else if(this.webGLVersion=1,i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!i)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),this.gl}getExtensions(){const{gl:e}=this,t={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc"),bptc:e.getExtension("EXT_texture_compression_bptc")};this.webGLVersion===1?Object.assign(this.extensions,t,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_ha
Line truncated
|
||||
varying vec2 vTextureCoord;
|
||||
|
||||
uniform sampler2D uSampler;
|
||||
@@ -438,7 +438,7 @@ void main(void)
|
||||
vTextureCoord = aTextureCoord;
|
||||
vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
|
||||
}
|
||||
`;class oE extends qi{constructor(e,t,i){let s=null;typeof e!="string"&&t===void 0&&i===void 0&&(s=e,e=void 0,t=void 0,i=void 0),super(e||aE,t||rE,i),this.maskSprite=s,this.maskMatrix=new Zt}get maskSprite(){return this._maskSprite}set maskSprite(e){this._maskSprite=e,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(e,t,i,s){const r=this._maskSprite,a=r._texture;a.valid&&(a.uvMatrix||(a.uvMatrix=new Xm(a,0)),a.uvMatrix.update(),this.uniforms.npmAlpha=a.baseTexture.alphaMode?0:1,this.uniforms.mask=a,this.uniforms.otherMatrix=e.calculateSpriteMatrix(this.maskMatrix,r).prepend(a.uvMatrix.mapCoord),this.uniforms.alpha=r.worldAlpha,this.uniforms.maskClamp=a.uvMatrix.uClampFrame,e.applyFilter(this,t,i,s))}}class lE{constructor(e=null){this.type=xi.NONE,this.autoDetect=!0,this.maskObject=e||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=qi.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(e){e?this._filters?this._filters[0]=e:this._filters=[e]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=xi.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(e){e?(this._stencilCounter=e._stencilCounter,this._scissorCounter=e._scissorCounter,this._scissorRect=e._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class Ex{constructor(e){this.renderer=e,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(e){this.maskStack=e,this.renderer.scissor.setMaskStack(e),this.renderer.stencil.setMaskStack(e)}push(e,t){let i=t;if(!i.isMaskData){const r=this.maskDataPool.pop()||new lE;r.pooled=!0,r.maskObject=t,i=r}const s=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(i.copyCountersOrReset(s),i._colorMask=s?s._colorMask:15,i.autoDetect&&this.detect(i),i._target=e,i.type!==xi.SPRITE&&this.maskStack.push(i),i.enabled)switch(i.type){case xi.SCISSOR:this.renderer.scissor.push(i);break;case xi.STENCIL:this.renderer.stencil.push(i);break;case xi.SPRITE:i.copyCountersOrReset(null),this.pushSpriteMask(i);break;case xi.COLOR:this.pushColorMask(i);break}i.type===xi.SPRITE&&this.maskStack.push(i)}pop(e){const t=this.maskStack.pop();if(!(!t||t._target!==e)){if(t.enabled)switch(t.type){case xi.SCISSOR:this.renderer.scissor.pop(t);break;case xi.STENCIL:this.renderer.stencil.pop(t.maskObject);break;case xi.SPRITE:this.popSpriteMask(t);break;case xi.COLOR:this.popColorMask(t);break}if(t.reset(),t.pooled&&this.maskDataPool.push(t),this.maskStack.length!==0){const i=this.maskStack[this.maskStack.length-1];i.type===xi.SPRITE&&i._filters&&(i._filters[0].maskSprite=i.maskObject)}}}detect(e){const t=e.maskObject;t?t.isSprite?e.type=xi.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(e)?e.type=xi.SCISSOR:e.type=xi.STENCIL:e.type=xi.COLOR}pushSpriteMask(e){const{maskObject:t}=e,i=e._target;let s=e._filters;s||(s=this.alphaMaskPool[this.alphaMaskIndex],s||(s=this.alphaMaskPool[this.alphaMaskIndex]=[new oE])),s[0].resolution=e.resolution,s[0].multisample=e.multisample,s[0].maskSprite=t;const r=i.filterArea;i.filterArea=t.getBounds(!0),this.renderer.filter.push(i,s),i.filterArea=r,e._filters||this.alphaMaskIndex++}popSpriteMask(e){this.renderer.filter.pop(),e._filters?e._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(e){const t=e._colorMask,i=e._colorMask=t&e.colorMask;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}popColorMask(e){const t=e._colorMask,i=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}destroy(){this.renderer=null}}Ex.extension={type:Xe.RendererSystem,name:"mask"};ze.add(Ex);class Ax{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:t}=this.renderer,i=this.getStackLength();this.maskStack=e;const s=this.getStackLength();s!==i&&(s===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const _0=new Zt,T0=[],Cx=class Sc extends Ax{constructor(e){super(e),this.glConst=$e.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:i}=e,{renderer:s}=this,r=s.renderTexture,a=i.getBounds(!0,T0.pop()??new vt);this.roundFrameToPixels(a,r.current?r.current.resolution:s.resolution,r.sourceFrame,r.destinationFrame,s.projection.transform),t&&a.fit(t),e._scissorRectLocal=a}static
Line truncated
|
||||
`;class oE extends qi{constructor(e,t,i){let s=null;typeof e!="string"&&t===void 0&&i===void 0&&(s=e,e=void 0,t=void 0,i=void 0),super(e||aE,t||rE,i),this.maskSprite=s,this.maskMatrix=new Zt}get maskSprite(){return this._maskSprite}set maskSprite(e){this._maskSprite=e,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(e,t,i,s){const r=this._maskSprite,a=r._texture;a.valid&&(a.uvMatrix||(a.uvMatrix=new Ym(a,0)),a.uvMatrix.update(),this.uniforms.npmAlpha=a.baseTexture.alphaMode?0:1,this.uniforms.mask=a,this.uniforms.otherMatrix=e.calculateSpriteMatrix(this.maskMatrix,r).prepend(a.uvMatrix.mapCoord),this.uniforms.alpha=r.worldAlpha,this.uniforms.maskClamp=a.uvMatrix.uClampFrame,e.applyFilter(this,t,i,s))}}class lE{constructor(e=null){this.type=xi.NONE,this.autoDetect=!0,this.maskObject=e||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=qi.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(e){e?this._filters?this._filters[0]=e:this._filters=[e]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=xi.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(e){e?(this._stencilCounter=e._stencilCounter,this._scissorCounter=e._scissorCounter,this._scissorRect=e._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class Ex{constructor(e){this.renderer=e,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(e){this.maskStack=e,this.renderer.scissor.setMaskStack(e),this.renderer.stencil.setMaskStack(e)}push(e,t){let i=t;if(!i.isMaskData){const r=this.maskDataPool.pop()||new lE;r.pooled=!0,r.maskObject=t,i=r}const s=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(i.copyCountersOrReset(s),i._colorMask=s?s._colorMask:15,i.autoDetect&&this.detect(i),i._target=e,i.type!==xi.SPRITE&&this.maskStack.push(i),i.enabled)switch(i.type){case xi.SCISSOR:this.renderer.scissor.push(i);break;case xi.STENCIL:this.renderer.stencil.push(i);break;case xi.SPRITE:i.copyCountersOrReset(null),this.pushSpriteMask(i);break;case xi.COLOR:this.pushColorMask(i);break}i.type===xi.SPRITE&&this.maskStack.push(i)}pop(e){const t=this.maskStack.pop();if(!(!t||t._target!==e)){if(t.enabled)switch(t.type){case xi.SCISSOR:this.renderer.scissor.pop(t);break;case xi.STENCIL:this.renderer.stencil.pop(t.maskObject);break;case xi.SPRITE:this.popSpriteMask(t);break;case xi.COLOR:this.popColorMask(t);break}if(t.reset(),t.pooled&&this.maskDataPool.push(t),this.maskStack.length!==0){const i=this.maskStack[this.maskStack.length-1];i.type===xi.SPRITE&&i._filters&&(i._filters[0].maskSprite=i.maskObject)}}}detect(e){const t=e.maskObject;t?t.isSprite?e.type=xi.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(e)?e.type=xi.SCISSOR:e.type=xi.STENCIL:e.type=xi.COLOR}pushSpriteMask(e){const{maskObject:t}=e,i=e._target;let s=e._filters;s||(s=this.alphaMaskPool[this.alphaMaskIndex],s||(s=this.alphaMaskPool[this.alphaMaskIndex]=[new oE])),s[0].resolution=e.resolution,s[0].multisample=e.multisample,s[0].maskSprite=t;const r=i.filterArea;i.filterArea=t.getBounds(!0),this.renderer.filter.push(i,s),i.filterArea=r,e._filters||this.alphaMaskIndex++}popSpriteMask(e){this.renderer.filter.pop(),e._filters?e._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(e){const t=e._colorMask,i=e._colorMask=t&e.colorMask;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}popColorMask(e){const t=e._colorMask,i=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}destroy(){this.renderer=null}}Ex.extension={type:Xe.RendererSystem,name:"mask"};ze.add(Ex);class Ax{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:t}=this.renderer,i=this.getStackLength();this.maskStack=e;const s=this.getStackLength();s!==i&&(s===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const T0=new Zt,M0=[],Cx=class Sc extends Ax{constructor(e){super(e),this.glConst=$e.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:i}=e,{renderer:s}=this,r=s.renderTexture,a=i.getBounds(!0,M0.pop()??new vt);this.roundFrameToPixels(a,r.current?r.current.resolution:s.resolution,r.sourceFrame,r.destinationFrame,s.projection.transform),t&&a.fit(t),e._scissorRectLocal=a}static
Line truncated
|
||||
data[offset] = v;
|
||||
`,vec2:`
|
||||
data[offset] = v[0];
|
||||
@@ -508,7 +508,7 @@ void main(void)
|
||||
`)}}return r.push(`
|
||||
renderer.buffer.update(buffer);
|
||||
`),{size:s,syncFunc:new Function("ud","uv","renderer","syncData","buffer",r.join(`
|
||||
`))}}let bE=0;const Kl={textureCount:0,uboCount:0};class Bx{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=bE++}systemCheck(){if(!jM())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,t){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const i=e.program,s=i.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==i&&(this.program=i,this.gl.useProgram(s.program)),t||(Kl.textureCount=0,Kl.uboCount=0,this.syncUniformGroup(e.uniformGroup,Kl)),s}setUniforms(e){const t=this.shader.program,i=t.glPrograms[this.renderer.CONTEXT_UID];t.syncUniforms(i.uniformData,e,this.renderer)}syncUniformGroup(e,t){const i=this.getGlProgram();(!e.static||e.dirtyId!==i.uniformDirtyGroups[e.id])&&(i.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,i,t))}syncUniforms(e,t,i){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(t.uniformData,e.uniforms,this.renderer,i)}createSyncGroups(e){const t=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[t]||(this.cache[t]=YM(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[t],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,t){const i=this.getGlProgram();if(!e.static||e.dirtyId!==0||!i.uniformGroups[e.id]){e.dirtyId=0;const s=i.uniformGroups[e.id]||this.createSyncBufferGroup(e,i,t);e.buffer.update(),s(i.uniformData,e.uniforms,this.renderer,Kl,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,i.uniformBufferBindings[t])}createSyncBufferGroup(e,t,i){const{gl:s}=this.renderer;this.renderer.buffer.bind(e.buffer);const r=this.gl.getUniformBlockIndex(t.program,i);t.uniformBufferBindings[i]=this.shader.uniformBindCount,s.uniformBlockBinding(t.program,r,this.shader.uniformBindCount),this.shader.uniformBindCount++;const a=this.getSignature(e,this.shader.program.uniformData,"ubo");let o=this._uboCache[a];if(o||(o=this._uboCache[a]=xE(e,this.shader.program.uniformData)),e.autoManage){const h=new Float32Array(o.size/4);e.buffer.update(h)}return t.uniformGroups[e.id]=o.syncFunc,t.uniformGroups[e.id]}getSignature(e,t,i){const s=e.uniforms,r=[`${i}-`];for(const a in s)r.push(a),t[a]&&r.push(t[a].type);return r.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const t=this.gl,i=e.program,s=mE(t,i);return i.glPrograms[this.renderer.CONTEXT_UID]=s,s}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Bx.extension={type:Xe.RendererSystem,name:"shader"};ze.add(Bx);class Kc{constructor(e){this.renderer=e}run(e){const{renderer:t}=this;t.runners.init.emit(t.options),e.hello&&console.log(`PixiJS 7.4.3 - ${t.rendererLogId} - https://pixijs.com`),t.resize(t.screen.width,t.screen.height)}destroy(){}}Kc.defaultOptions={hello:!1},Kc.extension={type:[Xe.RendererSystem,Xe.CanvasRendererSystem],name:"startup"};ze.add(Kc);function wE(n,e=[]){return e[st.NORMAL]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.ADD]=[n.ONE,n.ONE],e[st.MULTIPLY]=[n.DST_COLOR,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.SCREEN]=[n.ONE,n.ONE_MINUS_SRC_COLOR,n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.OVERLAY]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.DARKEN]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.LIGHTEN]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.COLOR_DODGE]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.COLOR_BURN]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.HARD_LIGHT]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.SOFT_LIGHT]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.DIFFERENCE]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.EXCLUSION]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.HUE]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.SATURATION]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.COLOR]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.LUMINOSITY]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.NONE]=[0,0],e[st.NORMAL_NPM]=[n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.ADD_NPM]=[n.SRC_ALPHA,n.ONE,n.ONE,n.ONE],e[st.SCREEN_NPM]=[n.SRC_ALPHA,n.ONE_MINUS_SRC_COLOR,n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.SRC_IN]=[n.DST_ALPHA,n.ZERO],e[st.SRC_OUT]=[n.ONE_MINUS_DST_ALPHA,n.ZERO],e[st.SRC_ATOP]=[n.DST_ALPHA,n.ONE_MINUS_SRC_ALPHA],e[st.DST_OVER]=[n.ONE_MINUS_DST_ALPHA,n.ONE],e[st.DST_IN]=[n.ZERO,n.SRC_ALPHA],e[st.DST_OUT]=[n.ZERO,n.ONE_MINUS_SRC_ALPHA],e[st.DST_ATOP]=[n.ONE_MINUS_DST_ALPHA,n.SRC_ALPHA],e[st.XOR]=[n.ONE_MINUS_DST_ALPHA,n.ONE_MINUS_SRC_ALPHA],e[st.SUBTRACT]=[n.ONE,n.ONE,n.ONE,n.ONE,n.FUNC_REVERSE_SUBTRACT,n.FUNC_ADD],e}const SE=0,_E=1,TE=2,ME=3,EE=4,AE=5,Lx=class Tf{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=st.NONE,this._blendEq=!1,this.map=[],this.map[SE]=this.setBlend,this.map[_E]=this.setOffset,this.map[TE]=this.setCullFace,this.map[ME]=this.setDepthTest,this.ma
Line truncated
|
||||
`))}}let bE=0;const Kl={textureCount:0,uboCount:0};class Bx{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=bE++}systemCheck(){if(!jM())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,t){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const i=e.program,s=i.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==i&&(this.program=i,this.gl.useProgram(s.program)),t||(Kl.textureCount=0,Kl.uboCount=0,this.syncUniformGroup(e.uniformGroup,Kl)),s}setUniforms(e){const t=this.shader.program,i=t.glPrograms[this.renderer.CONTEXT_UID];t.syncUniforms(i.uniformData,e,this.renderer)}syncUniformGroup(e,t){const i=this.getGlProgram();(!e.static||e.dirtyId!==i.uniformDirtyGroups[e.id])&&(i.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,i,t))}syncUniforms(e,t,i){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(t.uniformData,e.uniforms,this.renderer,i)}createSyncGroups(e){const t=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[t]||(this.cache[t]=YM(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[t],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,t){const i=this.getGlProgram();if(!e.static||e.dirtyId!==0||!i.uniformGroups[e.id]){e.dirtyId=0;const s=i.uniformGroups[e.id]||this.createSyncBufferGroup(e,i,t);e.buffer.update(),s(i.uniformData,e.uniforms,this.renderer,Kl,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,i.uniformBufferBindings[t])}createSyncBufferGroup(e,t,i){const{gl:s}=this.renderer;this.renderer.buffer.bind(e.buffer);const r=this.gl.getUniformBlockIndex(t.program,i);t.uniformBufferBindings[i]=this.shader.uniformBindCount,s.uniformBlockBinding(t.program,r,this.shader.uniformBindCount),this.shader.uniformBindCount++;const a=this.getSignature(e,this.shader.program.uniformData,"ubo");let o=this._uboCache[a];if(o||(o=this._uboCache[a]=xE(e,this.shader.program.uniformData)),e.autoManage){const h=new Float32Array(o.size/4);e.buffer.update(h)}return t.uniformGroups[e.id]=o.syncFunc,t.uniformGroups[e.id]}getSignature(e,t,i){const s=e.uniforms,r=[`${i}-`];for(const a in s)r.push(a),t[a]&&r.push(t[a].type);return r.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const t=this.gl,i=e.program,s=mE(t,i);return i.glPrograms[this.renderer.CONTEXT_UID]=s,s}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Bx.extension={type:Xe.RendererSystem,name:"shader"};ze.add(Bx);class Kc{constructor(e){this.renderer=e}run(e){const{renderer:t}=this;t.runners.init.emit(t.options),e.hello&&console.log(`PixiJS 7.4.3 - ${t.rendererLogId} - https://pixijs.com`),t.resize(t.screen.width,t.screen.height)}destroy(){}}Kc.defaultOptions={hello:!1},Kc.extension={type:[Xe.RendererSystem,Xe.CanvasRendererSystem],name:"startup"};ze.add(Kc);function wE(n,e=[]){return e[st.NORMAL]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.ADD]=[n.ONE,n.ONE],e[st.MULTIPLY]=[n.DST_COLOR,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.SCREEN]=[n.ONE,n.ONE_MINUS_SRC_COLOR,n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.OVERLAY]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.DARKEN]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.LIGHTEN]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.COLOR_DODGE]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.COLOR_BURN]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.HARD_LIGHT]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.SOFT_LIGHT]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.DIFFERENCE]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.EXCLUSION]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.HUE]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.SATURATION]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.COLOR]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.LUMINOSITY]=[n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.NONE]=[0,0],e[st.NORMAL_NPM]=[n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.ADD_NPM]=[n.SRC_ALPHA,n.ONE,n.ONE,n.ONE],e[st.SCREEN_NPM]=[n.SRC_ALPHA,n.ONE_MINUS_SRC_COLOR,n.ONE,n.ONE_MINUS_SRC_ALPHA],e[st.SRC_IN]=[n.DST_ALPHA,n.ZERO],e[st.SRC_OUT]=[n.ONE_MINUS_DST_ALPHA,n.ZERO],e[st.SRC_ATOP]=[n.DST_ALPHA,n.ONE_MINUS_SRC_ALPHA],e[st.DST_OVER]=[n.ONE_MINUS_DST_ALPHA,n.ONE],e[st.DST_IN]=[n.ZERO,n.SRC_ALPHA],e[st.DST_OUT]=[n.ZERO,n.ONE_MINUS_SRC_ALPHA],e[st.DST_ATOP]=[n.ONE_MINUS_DST_ALPHA,n.SRC_ALPHA],e[st.XOR]=[n.ONE_MINUS_DST_ALPHA,n.ONE_MINUS_SRC_ALPHA],e[st.SUBTRACT]=[n.ONE,n.ONE,n.ONE,n.ONE,n.FUNC_REVERSE_SUBTRACT,n.FUNC_ADD],e}const SE=0,_E=1,TE=2,ME=3,EE=4,AE=5,Lx=class Mf{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=st.NONE,this._blendEq=!1,this.map=[],this.map[SE]=this.setBlend,this.map[_E]=this.setOffset,this.map[TE]=this.setCullFace,this.map[ME]=this.setDepthTest,this.ma
Line truncated
|
||||
attribute vec2 aTextureCoord;
|
||||
|
||||
uniform mat3 projectionMatrix;
|
||||
@@ -545,7 +545,7 @@ void main(void)
|
||||
gl_Position = filterVertexPosition();
|
||||
vTextureCoord = filterTextureCoord();
|
||||
}
|
||||
`;const BE=FE,Vx=OE;class $x{constructor(e){this.renderer=e}contextChange(e){let t;if(this.renderer.context.webGLVersion===1){const i=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,i)}else{const i=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,i)}t>=mi.HIGH?this.multisample=mi.HIGH:t>=mi.MEDIUM?this.multisample=mi.MEDIUM:t>=mi.LOW?this.multisample=mi.LOW:this.multisample=mi.NONE}destroy(){}}$x.extension={type:Xe.RendererSystem,name:"_multisample"};ze.add($x);class LE{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Gx{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:i}=this,s=e._glBuffers[i]||this.createGLBuffer(e);t.bindBuffer(e.type,s.buffer)}unbind(e){const{gl:t}=this;t.bindBuffer(e,null)}bindBufferBase(e,t){const{gl:i,CONTEXT_UID:s}=this;if(this.boundBufferBases[t]!==e){const r=e._glBuffers[s]||this.createGLBuffer(e);this.boundBufferBases[t]=e,i.bindBufferBase(i.UNIFORM_BUFFER,t,r.buffer)}}bindBufferRange(e,t,i){const{gl:s,CONTEXT_UID:r}=this;i=i||0;const a=e._glBuffers[r]||this.createGLBuffer(e);s.bindBufferRange(s.UNIFORM_BUFFER,t||0,a.buffer,i*256,256)}update(e){const{gl:t,CONTEXT_UID:i}=this,s=e._glBuffers[i]||this.createGLBuffer(e);if(e._updateID!==s.updateID)if(s.updateID=e._updateID,t.bindBuffer(e.type,s.buffer),s.byteLength>=e.data.byteLength)t.bufferSubData(e.type,0,e.data);else{const r=e.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;s.byteLength=e.data.byteLength,t.bufferData(e.type,e.data,r)}}dispose(e,t){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const i=e._glBuffers[this.CONTEXT_UID],s=this.gl;e.disposeRunner.remove(this),i&&(t||s.deleteBuffer(i.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const t=Object.keys(this.managedBuffers);for(let i=0;i<t.length;i++)this.dispose(this.managedBuffers[t[i]],e)}createGLBuffer(e){const{CONTEXT_UID:t,gl:i}=this;return e._glBuffers[t]=new LE(i.createBuffer()),this.managedBuffers[e.id]=e,e.disposeRunner.add(this),e._glBuffers[t]}}Gx.extension={type:Xe.RendererSystem,name:"buffer"};ze.add(Gx);class Hx{constructor(e){this.renderer=e}render(e,t){const i=this.renderer;let s,r,a,o;if(t&&(s=t.renderTexture,r=t.clear,a=t.transform,o=t.skipUpdateTransform),this.renderingToScreen=!s,i.runners.prerender.emit(),i.emit("prerender"),i.projection.transform=a,!i.context.isLost){if(s||(this.lastObjectRendered=e),!o){const h=e.enableTempParent();e.updateTransform(),e.disableTempParent(h)}i.renderTexture.bind(s),i.batch.currentRenderer.start(),(r??i.background.clearBeforeRender)&&i.renderTexture.clear(),e.render(i),i.batch.currentRenderer.flush(),s&&(t.blit&&i.framebuffer.blit(),s.baseTexture.update()),i.runners.postrender.emit(),i.projection.transform=null,i.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}Hx.extension={type:Xe.RendererSystem,name:"objectRenderer"};ze.add(Hx);const Tc=class Mf extends IE{constructor(e){super(),this.type=Hy.WEBGL,e=Object.assign({},$e.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new Us({projectionMatrix:new Zt},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:Mf.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(t),"useContextAlpha"in e&&(Mt("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=Mf.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:aM()}render(e,t){this.objectRenderer.render(e,t)}resize(e,t){this._view.resizeView(e,t)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}get autoDensity(){return this._view.autoDensity}get view(){return
Line truncated
|
||||
`;const BE=FE,Vx=OE;class $x{constructor(e){this.renderer=e}contextChange(e){let t;if(this.renderer.context.webGLVersion===1){const i=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,i)}else{const i=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,i)}t>=mi.HIGH?this.multisample=mi.HIGH:t>=mi.MEDIUM?this.multisample=mi.MEDIUM:t>=mi.LOW?this.multisample=mi.LOW:this.multisample=mi.NONE}destroy(){}}$x.extension={type:Xe.RendererSystem,name:"_multisample"};ze.add($x);class LE{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Gx{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:i}=this,s=e._glBuffers[i]||this.createGLBuffer(e);t.bindBuffer(e.type,s.buffer)}unbind(e){const{gl:t}=this;t.bindBuffer(e,null)}bindBufferBase(e,t){const{gl:i,CONTEXT_UID:s}=this;if(this.boundBufferBases[t]!==e){const r=e._glBuffers[s]||this.createGLBuffer(e);this.boundBufferBases[t]=e,i.bindBufferBase(i.UNIFORM_BUFFER,t,r.buffer)}}bindBufferRange(e,t,i){const{gl:s,CONTEXT_UID:r}=this;i=i||0;const a=e._glBuffers[r]||this.createGLBuffer(e);s.bindBufferRange(s.UNIFORM_BUFFER,t||0,a.buffer,i*256,256)}update(e){const{gl:t,CONTEXT_UID:i}=this,s=e._glBuffers[i]||this.createGLBuffer(e);if(e._updateID!==s.updateID)if(s.updateID=e._updateID,t.bindBuffer(e.type,s.buffer),s.byteLength>=e.data.byteLength)t.bufferSubData(e.type,0,e.data);else{const r=e.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;s.byteLength=e.data.byteLength,t.bufferData(e.type,e.data,r)}}dispose(e,t){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const i=e._glBuffers[this.CONTEXT_UID],s=this.gl;e.disposeRunner.remove(this),i&&(t||s.deleteBuffer(i.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const t=Object.keys(this.managedBuffers);for(let i=0;i<t.length;i++)this.dispose(this.managedBuffers[t[i]],e)}createGLBuffer(e){const{CONTEXT_UID:t,gl:i}=this;return e._glBuffers[t]=new LE(i.createBuffer()),this.managedBuffers[e.id]=e,e.disposeRunner.add(this),e._glBuffers[t]}}Gx.extension={type:Xe.RendererSystem,name:"buffer"};ze.add(Gx);class Hx{constructor(e){this.renderer=e}render(e,t){const i=this.renderer;let s,r,a,o;if(t&&(s=t.renderTexture,r=t.clear,a=t.transform,o=t.skipUpdateTransform),this.renderingToScreen=!s,i.runners.prerender.emit(),i.emit("prerender"),i.projection.transform=a,!i.context.isLost){if(s||(this.lastObjectRendered=e),!o){const h=e.enableTempParent();e.updateTransform(),e.disableTempParent(h)}i.renderTexture.bind(s),i.batch.currentRenderer.start(),(r??i.background.clearBeforeRender)&&i.renderTexture.clear(),e.render(i),i.batch.currentRenderer.flush(),s&&(t.blit&&i.framebuffer.blit(),s.baseTexture.update()),i.runners.postrender.emit(),i.projection.transform=null,i.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}Hx.extension={type:Xe.RendererSystem,name:"objectRenderer"};ze.add(Hx);const Tc=class Ef extends IE{constructor(e){super(),this.type=Hy.WEBGL,e=Object.assign({},$e.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new Us({projectionMatrix:new Zt},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:Ef.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(t),"useContextAlpha"in e&&(Mt("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=Ef.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:aM()}render(e,t){this.objectRenderer.render(e,t)}resize(e,t){this._view.resizeView(e,t)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}get autoDensity(){return this._view.autoDensity}get view(){return
Line truncated
|
||||
|
||||
uniform sampler2D uSampler;
|
||||
uniform float uAlpha;
|
||||
@@ -587,7 +587,7 @@ void main(void)
|
||||
vec2 textureCoord = filterTextureCoord();
|
||||
%blur%
|
||||
}`;function JE(n,e){const t=Math.ceil(n/2);let i=ZE,s="",r;e?r="vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":r="vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(let a=0;a<n;a++){let o=r.replace("%index%",a.toString());o=o.replace("%sampleIndex%",`${a-(t-1)}.0`),s+=o,s+=`
|
||||
`}return i=i.replace("%blur%",s),i=i.replace("%size%",n.toString()),i}class Pf extends qi{constructor(e,t=8,i=4,s=qi.defaultResolution,r=5){const a=JE(r,e),o=KE(r);super(a,o),this.horizontal=e,this.resolution=s,this._quality=0,this.quality=i,this.blur=t}apply(e,t,i,s){if(i?this.horizontal?this.uniforms.strength=1/i.width*(i.width/t.width):this.uniforms.strength=1/i.height*(i.height/t.height):this.horizontal?this.uniforms.strength=1/e.renderer.width*(e.renderer.width/t.width):this.uniforms.strength=1/e.renderer.height*(e.renderer.height/t.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)e.applyFilter(this,t,i,s);else{const r=e.getFilterTexture(),a=e.renderer;let o=t,h=r;this.state.blend=!1,e.applyFilter(this,o,h,cn.CLEAR);for(let l=1;l<this.passes-1;l++){e.bindAndClear(o,cn.BLIT),this.uniforms.uSampler=h;const c=h;h=o,o=c,a.shader.bind(this),a.geometry.draw(5)}this.state.blend=!0,e.applyFilter(this,h,i,s),e.returnFilterTexture(r)}}get blur(){return this.strength}set blur(e){this.padding=1+Math.abs(e)*2,this.strength=e}get quality(){return this._quality}set quality(e){this._quality=e,this.passes=e}}class QE extends qi{constructor(e=8,t=4,i=qi.defaultResolution,s=5){super(),this._repeatEdgePixels=!1,this.blurXFilter=new Pf(!0,e,t,i,s),this.blurYFilter=new Pf(!1,e,t,i,s),this.resolution=i,this.quality=t,this.blur=e,this.repeatEdgePixels=!1}apply(e,t,i,s){const r=Math.abs(this.blurXFilter.strength),a=Math.abs(this.blurYFilter.strength);if(r&&a){const o=e.getFilterTexture();this.blurXFilter.apply(e,t,o,cn.CLEAR),this.blurYFilter.apply(e,o,i,s),e.returnFilterTexture(o)}else a?this.blurYFilter.apply(e,t,i,s):this.blurXFilter.apply(e,t,i,s)}updatePadding(){this._repeatEdgePixels?this.padding=0:this.padding=Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))*2}get blur(){return this.blurXFilter.blur}set blur(e){this.blurXFilter.blur=this.blurYFilter.blur=e,this.updatePadding()}get quality(){return this.blurXFilter.quality}set quality(e){this.blurXFilter.quality=this.blurYFilter.quality=e}get blurX(){return this.blurXFilter.blur}set blurX(e){this.blurXFilter.blur=e,this.updatePadding()}get blurY(){return this.blurYFilter.blur}set blurY(e){this.blurYFilter.blur=e,this.updatePadding()}get blendMode(){return this.blurYFilter.blendMode}set blendMode(e){this.blurYFilter.blendMode=e}get repeatEdgePixels(){return this._repeatEdgePixels}set repeatEdgePixels(e){this._repeatEdgePixels=e,this.updatePadding()}}var eA=`varying vec2 vTextureCoord;
|
||||
`}return i=i.replace("%blur%",s),i=i.replace("%size%",n.toString()),i}class kf extends qi{constructor(e,t=8,i=4,s=qi.defaultResolution,r=5){const a=JE(r,e),o=KE(r);super(a,o),this.horizontal=e,this.resolution=s,this._quality=0,this.quality=i,this.blur=t}apply(e,t,i,s){if(i?this.horizontal?this.uniforms.strength=1/i.width*(i.width/t.width):this.uniforms.strength=1/i.height*(i.height/t.height):this.horizontal?this.uniforms.strength=1/e.renderer.width*(e.renderer.width/t.width):this.uniforms.strength=1/e.renderer.height*(e.renderer.height/t.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)e.applyFilter(this,t,i,s);else{const r=e.getFilterTexture(),a=e.renderer;let o=t,h=r;this.state.blend=!1,e.applyFilter(this,o,h,cn.CLEAR);for(let l=1;l<this.passes-1;l++){e.bindAndClear(o,cn.BLIT),this.uniforms.uSampler=h;const c=h;h=o,o=c,a.shader.bind(this),a.geometry.draw(5)}this.state.blend=!0,e.applyFilter(this,h,i,s),e.returnFilterTexture(r)}}get blur(){return this.strength}set blur(e){this.padding=1+Math.abs(e)*2,this.strength=e}get quality(){return this._quality}set quality(e){this._quality=e,this.passes=e}}class QE extends qi{constructor(e=8,t=4,i=qi.defaultResolution,s=5){super(),this._repeatEdgePixels=!1,this.blurXFilter=new kf(!0,e,t,i,s),this.blurYFilter=new kf(!1,e,t,i,s),this.resolution=i,this.quality=t,this.blur=e,this.repeatEdgePixels=!1}apply(e,t,i,s){const r=Math.abs(this.blurXFilter.strength),a=Math.abs(this.blurYFilter.strength);if(r&&a){const o=e.getFilterTexture();this.blurXFilter.apply(e,t,o,cn.CLEAR),this.blurYFilter.apply(e,o,i,s),e.returnFilterTexture(o)}else a?this.blurYFilter.apply(e,t,i,s):this.blurXFilter.apply(e,t,i,s)}updatePadding(){this._repeatEdgePixels?this.padding=0:this.padding=Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))*2}get blur(){return this.blurXFilter.blur}set blur(e){this.blurXFilter.blur=this.blurYFilter.blur=e,this.updatePadding()}get quality(){return this.blurXFilter.quality}set quality(e){this.blurXFilter.quality=this.blurYFilter.quality=e}get blurX(){return this.blurXFilter.blur}set blurX(e){this.blurXFilter.blur=e,this.updatePadding()}get blurY(){return this.blurYFilter.blur}set blurY(e){this.blurYFilter.blur=e,this.updatePadding()}get blendMode(){return this.blurYFilter.blendMode}set blendMode(e){this.blurYFilter.blendMode=e}get repeatEdgePixels(){return this._repeatEdgePixels}set repeatEdgePixels(e){this._repeatEdgePixels=e,this.updatePadding()}}var eA=`varying vec2 vTextureCoord;
|
||||
uniform sampler2D uSampler;
|
||||
uniform float m[20];
|
||||
uniform float uAlpha;
|
||||
@@ -639,7 +639,7 @@ void main(void)
|
||||
|
||||
gl_FragColor = vec4(rgb, result.a);
|
||||
}
|
||||
`;class kf extends qi{constructor(){const e={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};super(Vx,eA,e),this.alpha=1}_loadMatrix(e,t=!1){let i=e;t&&(this._multiply(i,this.uniforms.m,e),i=this._colorMatrix(i)),this.uniforms.m=i}_multiply(e,t,i){return e[0]=t[0]*i[0]+t[1]*i[5]+t[2]*i[10]+t[3]*i[15],e[1]=t[0]*i[1]+t[1]*i[6]+t[2]*i[11]+t[3]*i[16],e[2]=t[0]*i[2]+t[1]*i[7]+t[2]*i[12]+t[3]*i[17],e[3]=t[0]*i[3]+t[1]*i[8]+t[2]*i[13]+t[3]*i[18],e[4]=t[0]*i[4]+t[1]*i[9]+t[2]*i[14]+t[3]*i[19]+t[4],e[5]=t[5]*i[0]+t[6]*i[5]+t[7]*i[10]+t[8]*i[15],e[6]=t[5]*i[1]+t[6]*i[6]+t[7]*i[11]+t[8]*i[16],e[7]=t[5]*i[2]+t[6]*i[7]+t[7]*i[12]+t[8]*i[17],e[8]=t[5]*i[3]+t[6]*i[8]+t[7]*i[13]+t[8]*i[18],e[9]=t[5]*i[4]+t[6]*i[9]+t[7]*i[14]+t[8]*i[19]+t[9],e[10]=t[10]*i[0]+t[11]*i[5]+t[12]*i[10]+t[13]*i[15],e[11]=t[10]*i[1]+t[11]*i[6]+t[12]*i[11]+t[13]*i[16],e[12]=t[10]*i[2]+t[11]*i[7]+t[12]*i[12]+t[13]*i[17],e[13]=t[10]*i[3]+t[11]*i[8]+t[12]*i[13]+t[13]*i[18],e[14]=t[10]*i[4]+t[11]*i[9]+t[12]*i[14]+t[13]*i[19]+t[14],e[15]=t[15]*i[0]+t[16]*i[5]+t[17]*i[10]+t[18]*i[15],e[16]=t[15]*i[1]+t[16]*i[6]+t[17]*i[11]+t[18]*i[16],e[17]=t[15]*i[2]+t[16]*i[7]+t[17]*i[12]+t[18]*i[17],e[18]=t[15]*i[3]+t[16]*i[8]+t[17]*i[13]+t[18]*i[18],e[19]=t[15]*i[4]+t[16]*i[9]+t[17]*i[14]+t[18]*i[19]+t[19],e}_colorMatrix(e){const t=new Float32Array(e);return t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,t}brightness(e,t){const i=[e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}tint(e,t){const[i,s,r]=Dt.shared.setValue(e).toArray(),a=[i,0,0,0,0,0,s,0,0,0,0,0,r,0,0,0,0,0,1,0];this._loadMatrix(a,t)}greyscale(e,t){const i=[e,e,e,0,0,e,e,e,0,0,e,e,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}blackAndWhite(e){const t=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(t,e)}hue(e,t){e=(e||0)/180*Math.PI;const i=Math.cos(e),s=Math.sin(e),r=Math.sqrt,a=1/3,o=r(a),h=i+(1-i)*a,l=a*(1-i)-o*s,c=a*(1-i)+o*s,u=a*(1-i)+o*s,d=i+a*(1-i),f=a*(1-i)-o*s,p=a*(1-i)-o*s,m=a*(1-i)+o*s,g=i+a*(1-i),y=[h,l,c,0,0,u,d,f,0,0,p,m,g,0,0,0,0,0,1,0];this._loadMatrix(y,t)}contrast(e,t){const i=(e||0)+1,s=-.5*(i-1),r=[i,0,0,0,s,0,i,0,0,s,0,0,i,0,s,0,0,0,1,0];this._loadMatrix(r,t)}saturate(e=0,t){const i=e*2/3+1,s=(i-1)*-.5,r=[i,s,s,0,0,s,i,s,0,0,s,s,i,0,0,0,0,0,1,0];this._loadMatrix(r,t)}desaturate(){this.saturate(-1)}negative(e){const t=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(t,e)}sepia(e){const t=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(t,e)}technicolor(e){const t=[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];this._loadMatrix(t,e)}polaroid(e){const t=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(t,e)}toBGR(e){const t=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(t,e)}kodachrome(e){const t=[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];this._loadMatrix(t,e)}browni(e){const t=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(t,e)}vintage(e){const t=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(t,e)}colorTone(e,t,i,s,r){e=e||.2,t=t||.15,i=i||16770432,s=s||3375104;const a=Dt.shared,[o,h,l]=a.setValue(i).toArray(),[c,u,d]=a.setValue(s).toArray(),f=[.3,.59,.11,0,0,o,h,l,e,0,c,u,d,t,0,o-c,h-u,l-d,0,0];this._loadMatrix(f,r)}night(e,t){e=e||.1;const i=[e*-2,-e,0,0,0,-e,0,e,0,0,0,e,e*2,0,0,0,0,0,1,0];this._loadMatrix(i,t)}predator(e,t){const i=[11.224130630493164*e,-4.794486999511719*e,-2.8746118545532227*e,0*e,.40342438220977783*e,-3.6330697536468506*e,9.193157196044922*e,-2.951810836791992*e,0*e,-1.316135048866272*e,-3.2184197902679443*e,-4.2375030517578125*e,7.476448059082031*e,0*e,.8044459223747253*e,0,0,0,1,0];this._loadMatrix(i,t)}lsd(e){const t=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(t,e)}reset(){const e=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(e,!1)}get matrix(){return this.uniforms.m}set matrix(e){this.uniforms.m=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}}kf.prototype.grayscale=kf.prototype.greyscale;var tA=`varying vec2 vFilterCoord;
|
||||
`;class Ff extends qi{constructor(){const e={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};super(Vx,eA,e),this.alpha=1}_loadMatrix(e,t=!1){let i=e;t&&(this._multiply(i,this.uniforms.m,e),i=this._colorMatrix(i)),this.uniforms.m=i}_multiply(e,t,i){return e[0]=t[0]*i[0]+t[1]*i[5]+t[2]*i[10]+t[3]*i[15],e[1]=t[0]*i[1]+t[1]*i[6]+t[2]*i[11]+t[3]*i[16],e[2]=t[0]*i[2]+t[1]*i[7]+t[2]*i[12]+t[3]*i[17],e[3]=t[0]*i[3]+t[1]*i[8]+t[2]*i[13]+t[3]*i[18],e[4]=t[0]*i[4]+t[1]*i[9]+t[2]*i[14]+t[3]*i[19]+t[4],e[5]=t[5]*i[0]+t[6]*i[5]+t[7]*i[10]+t[8]*i[15],e[6]=t[5]*i[1]+t[6]*i[6]+t[7]*i[11]+t[8]*i[16],e[7]=t[5]*i[2]+t[6]*i[7]+t[7]*i[12]+t[8]*i[17],e[8]=t[5]*i[3]+t[6]*i[8]+t[7]*i[13]+t[8]*i[18],e[9]=t[5]*i[4]+t[6]*i[9]+t[7]*i[14]+t[8]*i[19]+t[9],e[10]=t[10]*i[0]+t[11]*i[5]+t[12]*i[10]+t[13]*i[15],e[11]=t[10]*i[1]+t[11]*i[6]+t[12]*i[11]+t[13]*i[16],e[12]=t[10]*i[2]+t[11]*i[7]+t[12]*i[12]+t[13]*i[17],e[13]=t[10]*i[3]+t[11]*i[8]+t[12]*i[13]+t[13]*i[18],e[14]=t[10]*i[4]+t[11]*i[9]+t[12]*i[14]+t[13]*i[19]+t[14],e[15]=t[15]*i[0]+t[16]*i[5]+t[17]*i[10]+t[18]*i[15],e[16]=t[15]*i[1]+t[16]*i[6]+t[17]*i[11]+t[18]*i[16],e[17]=t[15]*i[2]+t[16]*i[7]+t[17]*i[12]+t[18]*i[17],e[18]=t[15]*i[3]+t[16]*i[8]+t[17]*i[13]+t[18]*i[18],e[19]=t[15]*i[4]+t[16]*i[9]+t[17]*i[14]+t[18]*i[19]+t[19],e}_colorMatrix(e){const t=new Float32Array(e);return t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,t}brightness(e,t){const i=[e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}tint(e,t){const[i,s,r]=Lt.shared.setValue(e).toArray(),a=[i,0,0,0,0,0,s,0,0,0,0,0,r,0,0,0,0,0,1,0];this._loadMatrix(a,t)}greyscale(e,t){const i=[e,e,e,0,0,e,e,e,0,0,e,e,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}blackAndWhite(e){const t=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(t,e)}hue(e,t){e=(e||0)/180*Math.PI;const i=Math.cos(e),s=Math.sin(e),r=Math.sqrt,a=1/3,o=r(a),h=i+(1-i)*a,l=a*(1-i)-o*s,c=a*(1-i)+o*s,u=a*(1-i)+o*s,d=i+a*(1-i),f=a*(1-i)-o*s,p=a*(1-i)-o*s,m=a*(1-i)+o*s,g=i+a*(1-i),y=[h,l,c,0,0,u,d,f,0,0,p,m,g,0,0,0,0,0,1,0];this._loadMatrix(y,t)}contrast(e,t){const i=(e||0)+1,s=-.5*(i-1),r=[i,0,0,0,s,0,i,0,0,s,0,0,i,0,s,0,0,0,1,0];this._loadMatrix(r,t)}saturate(e=0,t){const i=e*2/3+1,s=(i-1)*-.5,r=[i,s,s,0,0,s,i,s,0,0,s,s,i,0,0,0,0,0,1,0];this._loadMatrix(r,t)}desaturate(){this.saturate(-1)}negative(e){const t=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(t,e)}sepia(e){const t=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(t,e)}technicolor(e){const t=[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];this._loadMatrix(t,e)}polaroid(e){const t=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(t,e)}toBGR(e){const t=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(t,e)}kodachrome(e){const t=[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];this._loadMatrix(t,e)}browni(e){const t=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(t,e)}vintage(e){const t=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(t,e)}colorTone(e,t,i,s,r){e=e||.2,t=t||.15,i=i||16770432,s=s||3375104;const a=Lt.shared,[o,h,l]=a.setValue(i).toArray(),[c,u,d]=a.setValue(s).toArray(),f=[.3,.59,.11,0,0,o,h,l,e,0,c,u,d,t,0,o-c,h-u,l-d,0,0];this._loadMatrix(f,r)}night(e,t){e=e||.1;const i=[e*-2,-e,0,0,0,-e,0,e,0,0,0,e,e*2,0,0,0,0,0,1,0];this._loadMatrix(i,t)}predator(e,t){const i=[11.224130630493164*e,-4.794486999511719*e,-2.8746118545532227*e,0*e,.40342438220977783*e,-3.6330697536468506*e,9.193157196044922*e,-2.951810836791992*e,0*e,-1.316135048866272*e,-3.2184197902679443*e,-4.2375030517578125*e,7.476448059082031*e,0*e,.8044459223747253*e,0,0,0,1,0];this._loadMatrix(i,t)}lsd(e){const t=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(t,e)}reset(){const e=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(e,!1)}get matrix(){return this.uniforms.m}set matrix(e){this.uniforms.m=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}}Ff.prototype.grayscale=Ff.prototype.greyscale;var tA=`varying vec2 vFilterCoord;
|
||||
varying vec2 vTextureCoord;
|
||||
|
||||
uniform vec2 scale;
|
||||
@@ -885,7 +885,7 @@ void main()
|
||||
|
||||
gl_FragColor = color;
|
||||
}
|
||||
`;class lA extends qi{constructor(e=.5,t=Math.random()){super(Vx,oA,{uNoise:0,uSeed:0}),this.noise=e,this.seed=t}get noise(){return this.uniforms.uNoise}set noise(e){this.uniforms.uNoise=e}get seed(){return this.uniforms.uSeed}set seed(e){this.uniforms.uSeed=e}}const E0={AlphaFilter:WE,BlurFilter:QE,BlurFilterPass:Pf,ColorMatrixFilter:kf,DisplacementFilter:sA,FXAAFilter:aA,NoiseFilter:lA};Object.entries(E0).forEach(([n,e])=>{Object.defineProperty(E0,n,{get(){return Mt("7.1.0",`filters.${n} has moved to ${n}`),e}})});class cA{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this.tickerAdded||!this.domElement||(Ki.system.add(this.tickerUpdate,this,da.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(Ki.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const e=this.events.rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:e.clientX,clientY:e.clientY}))}tickerUpdate(e){this._deltaTime+=e,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.update())}}const xr=new cA;class Al{constructor(e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=Al.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new kt,this.page=new kt,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(e,t,i){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(e,t,i,s,r){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}}class Jc extends Al{constructor(){super(...arguments),this.client=new kt,this.movement=new kt,this.offset=new kt,this.global=new kt,this.screen=new kt}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(e,t,i){return e.worldTransform.applyInverse(i||this.global,t)}getModifierState(e){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,t,i,s,r,a,o,h,l,c,u,d,f,p,m){throw new Error("Method not implemented.")}}class Rs extends Jc{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}}class eo extends Jc{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}}eo.DOM_DELTA_PIXEL=0,eo.DOM_DELTA_LINE=1,eo.DOM_DELTA_PAGE=2;const hA=2048,uA=new kt,Id=new kt;class dA{constructor(e){this.dispatch=new El,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=e,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping("pointerdown",this.mapPointerDown),this.addEventMapping("pointermove",this.mapPointerMove),this.addEventMapping("pointerout",this.mapPointerOut),this.addEventMapping("pointerle
Line truncated
|
||||
`;class lA extends qi{constructor(e=.5,t=Math.random()){super(Vx,oA,{uNoise:0,uSeed:0}),this.noise=e,this.seed=t}get noise(){return this.uniforms.uNoise}set noise(e){this.uniforms.uNoise=e}get seed(){return this.uniforms.uSeed}set seed(e){this.uniforms.uSeed=e}}const A0={AlphaFilter:WE,BlurFilter:QE,BlurFilterPass:kf,ColorMatrixFilter:Ff,DisplacementFilter:sA,FXAAFilter:aA,NoiseFilter:lA};Object.entries(A0).forEach(([n,e])=>{Object.defineProperty(A0,n,{get(){return Mt("7.1.0",`filters.${n} has moved to ${n}`),e}})});class cA{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this.tickerAdded||!this.domElement||(Ki.system.add(this.tickerUpdate,this,fa.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(Ki.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const e=this.events.rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:e.clientX,clientY:e.clientY}))}tickerUpdate(e){this._deltaTime+=e,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.update())}}const xr=new cA;class Al{constructor(e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=Al.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new kt,this.page=new kt,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(e,t,i){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(e,t,i,s,r){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}}class Jc extends Al{constructor(){super(...arguments),this.client=new kt,this.movement=new kt,this.offset=new kt,this.global=new kt,this.screen=new kt}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(e,t,i){return e.worldTransform.applyInverse(i||this.global,t)}getModifierState(e){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,t,i,s,r,a,o,h,l,c,u,d,f,p,m){throw new Error("Method not implemented.")}}class Rs extends Jc{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}}class eo extends Jc{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}}eo.DOM_DELTA_PIXEL=0,eo.DOM_DELTA_LINE=1,eo.DOM_DELTA_PAGE=2;const hA=2048,uA=new kt,Id=new kt;class dA{constructor(e){this.dispatch=new El,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=e,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping("pointerdown",this.mapPointerDown),this.addEventMapping("pointermove",this.mapPointerMove),this.addEventMapping("pointerout",this.mapPointerOut),this.addEventMapping("pointerle
Line truncated
|
||||
${u}`)}});return await Promise.all(h),r?s[a[0].src]:s}async unload(e){const t=ks(e,i=>({alias:[i],src:i})).map(async i=>{var a,o;const s=li.toAbsolute(i.src),r=this.promiseCache[s];if(r){const h=await r.promise;delete this.promiseCache[s],(o=(a=r.parser)==null?void 0:a.unload)==null||o.call(a,h,i,this)}});await Promise.all(t)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(e=>e.name).reduce((e,t)=>(e[t.name]&&console.warn(`[Assets] loadParser name conflict "${t.name}"`),{...e,[t.name]:t}),{})}}var ds=(n=>(n[n.Low=0]="Low",n[n.Normal=1]="Normal",n[n.High=2]="High",n))(ds||{});const AA=".json",CA="application/json",IA={extension:{type:Xe.LoadParser,priority:ds.Low},name:"loadJson",test(n){return wo(n,CA)||ns(n,AA)},async load(n){return await(await $e.ADAPTER.fetch(n)).json()}};ze.add(IA);const RA=".txt",PA="text/plain",kA={name:"loadTxt",extension:{type:Xe.LoadParser,priority:ds.Low},test(n){return wo(n,PA)||ns(n,RA)},async load(n){return await(await $e.ADAPTER.fetch(n)).text()}};ze.add(kA);const FA=["normal","bold","100","200","300","400","500","600","700","800","900"],OA=[".ttf",".otf",".woff",".woff2"],BA=["font/ttf","font/otf","font/woff","font/woff2"],LA=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function DA(n){const e=li.extname(n),t=li.basename(n,e).replace(/(-|_)/g," ").toLowerCase().split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1));let i=t.length>0;for(const r of t)if(!r.match(LA)){i=!1;break}let s=t.join(" ");return i||(s=`"${s.replace(/[\\"]/g,"\\$&")}"`),s}const NA=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;function UA(n){return NA.test(n)?n:encodeURI(n)}const XA={extension:{type:Xe.LoadParser,priority:ds.Low},name:"loadWebFont",test(n){return wo(n,BA)||ns(n,OA)},async load(n,e){var i,s,r;const t=$e.ADAPTER.getFontFaceSet();if(t){const a=[],o=((i=e.data)==null?void 0:i.family)??DA(n),h=((r=(s=e.data)==null?void 0:s.weights)==null?void 0:r.filter(c=>FA.includes(c)))??["normal"],l=e.data??{};for(let c=0;c<h.length;c++){const u=h[c],d=new FontFace(o,`url(${UA(n)})`,{...l,weight:u});await d.load(),t.add(d),a.push(d)}return a.length===1?a[0]:a}return console.warn("[loadWebFont] FontFace API is not supported. Skipping loading font"),null},unload(n){(Array.isArray(n)?n:[n]).forEach(e=>$e.ADAPTER.getFontFaceSet().delete(e))}};ze.add(XA);const YA=`(function() {
|
||||
"use strict";
|
||||
const WHITE_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=";
|
||||
@@ -903,7 +903,7 @@ ${u}`)}});return await Promise.all(h),r?s[a[0].src]:s}async unload(e){const t=ks
|
||||
self.postMessage(result);
|
||||
});
|
||||
})();
|
||||
`;let to=null,Df=class{constructor(){to||(to=URL.createObjectURL(new Blob([YA],{type:"application/javascript"}))),this.worker=new Worker(to)}};Df.revokeObjectURL=function(){to&&(URL.revokeObjectURL(to),to=null)};const VA=`(function() {
|
||||
`;let to=null,Nf=class{constructor(){to||(to=URL.createObjectURL(new Blob([YA],{type:"application/javascript"}))),this.worker=new Worker(to)}};Nf.revokeObjectURL=function(){to&&(URL.revokeObjectURL(to),to=null)};const VA=`(function() {
|
||||
"use strict";
|
||||
async function loadImageBitmap(url) {
|
||||
const response = await fetch(url);
|
||||
@@ -929,8 +929,8 @@ ${u}`)}});return await Promise.all(h),r?s[a[0].src]:s}async unload(e){const t=ks
|
||||
}
|
||||
};
|
||||
})();
|
||||
`;let io=null;class i1{constructor(){io||(io=URL.createObjectURL(new Blob([VA],{type:"application/javascript"}))),this.worker=new Worker(io)}}i1.revokeObjectURL=function(){io&&(URL.revokeObjectURL(io),io=null)};let P0=0,Rd;class $A{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(e=>{const{worker:t}=new Df;t.addEventListener("message",i=>{t.terminate(),Df.revokeObjectURL(),e(i.data)})}),this._isImageBitmapSupported)}loadImageBitmap(e){return this._run("loadImageBitmap",[e])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){Rd===void 0&&(Rd=navigator.hardwareConcurrency||4);let e=this.workerPool.pop();return!e&&this._createdWorkers<Rd&&(this._createdWorkers++,e=new i1().worker,e.addEventListener("message",t=>{this.complete(t.data),this.returnWorker(t.target),this.next()})),e}returnWorker(e){this.workerPool.push(e)}complete(e){e.error!==void 0?this.resolveHash[e.uuid].reject(e.error):this.resolveHash[e.uuid].resolve(e.data),this.resolveHash[e.uuid]=null}async _run(e,t){await this._initWorkers();const i=new Promise((s,r)=>{this.queue.push({id:e,arguments:t,resolve:s,reject:r})});return this.next(),i}next(){if(!this.queue.length)return;const e=this.getWorker();if(!e)return;const t=this.queue.pop(),i=t.id;this.resolveHash[P0]={resolve:t.resolve,reject:t.reject},e.postMessage({data:t.arguments,uuid:P0++,id:i})}}const k0=new $A;function Cl(n,e,t){n.resource.internal=!0;const i=new rt(n),s=()=>{delete e.promiseCache[t],qr.has(t)&&qr.remove(t)};return i.baseTexture.once("destroyed",()=>{t in e.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),s())}),i.once("destroyed",()=>{n.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),s())}),i}const GA=[".jpeg",".jpg",".png",".webp",".avif"],HA=["image/jpeg","image/png","image/webp","image/avif"];async function jA(n){const e=await $e.ADAPTER.fetch(n);if(!e.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${n}: ${e.status} ${e.statusText}`);const t=await e.blob();return await createImageBitmap(t)}const qh={name:"loadTextures",extension:{type:Xe.LoadParser,priority:ds.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(n){return wo(n,HA)||ns(n,GA)},async load(n,e,t){var o;const i=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let s;i?this.config.preferWorkers&&await k0.isImageBitmapSupported()?s=await k0.loadImageBitmap(n):s=await jA(n):s=await new Promise((h,l)=>{const c=new Image;c.crossOrigin=this.config.crossOrigin,c.src=n,c.complete?h(c):(c.onload=()=>h(c),c.onerror=u=>l(u))});const r={...e.data};r.resolution??(r.resolution=Qn(n)),i&&((o=r.resourceOptions)==null?void 0:o.ownsImageBitmap)===void 0&&(r.resourceOptions={...r.resourceOptions},r.resourceOptions.ownsImageBitmap=!0);const a=new ot(s,r);return a.resource.src=n,Cl(a,t,n)},unload(n){n.destroy(!0)}};ze.add(qh);const WA=".svg",zA="image/svg+xml",qA={extension:{type:Xe.LoadParser,priority:ds.High},name:"loadSVG",test(n){return wo(n,zA)||ns(n,WA)},async testParse(n){return Af.test(n)},async parse(n,e,t){var r;const i=new Af(n,(r=e==null?void 0:e.data)==null?void 0:r.resourceOptions);await i.load();const s=new ot(i,{resolution:Qn(n),...e==null?void 0:e.data});return s.resource.src=e.src,Cl(s,t,e.src)},async load(n,e){return(await $e.ADAPTER.fetch(n)).text()},unload:qh.unload};ze.add(qA);const KA=[".mp4",".m4v",".webm",".ogv"],ZA=["video/mp4","video/webm","video/ogg"],JA={name:"loadVideo",extension:{type:Xe.LoadParser,priority:ds.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test(n){return wo(n,ZA)||ns(n,KA)},async load(n,e,t){var a;let i;const s=await(await $e.ADAPTER.fetch(n)).blob(),r=URL.createObjectURL(s);try{const o={autoPlay:this.config.defaultAutoPlay,updateFPS:this.config.defaultUpdateFPS,loop:this.config.defaultLoop,muted:this.config.defaultMuted,playsinline:this.config.defaultPlaysinline,...(a=e==null?void 0:e.data)==null?void 0:a.resourceOptions,autoLoad:!0},h=new zx(r,o);await h.load();const l=new ot(h,{alphaMode:await rM(),resolution:Qn(n),...e==null?void 0:e.data});l.resource.src=n,i=Cl(l,t,n),i.baseTexture.once("destroyed",()=>{URL.revokeObjectURL(r)})}catch(o){throw URL.revokeObjectURL(r),o}return i},unload(n){n.destroy(!0)}};ze.add(JA);class QA{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=
Line truncated
|
||||
Please use Assets.add({ alias, src, data, format, loadParser }) instead.`),a.push({alias:e,src:t,data:i,format:s,loadParser:r})):Array.isArray(e)?a.push(...e):a.push(e);let o;o=h=>{this.hasKey(h)&&console.warn(`[Resolver] already has key: ${h} overwriting`)},ks(a).forEach(h=>{const{src:l,srcs:c}=h;let{data:u,format:d,loadParser:f}=h;const p=ks(l||c).map(y=>typeof y=="string"?TA(y):Array.isArray(y)?y:[y]),m=this.getAlias(h);Array.isArray(m)?m.forEach(o):o(m);const g=[];p.forEach(y=>{y.forEach(w=>{let v={};if(typeof w!="object"){v.src=w;for(let _=0;_<this._parsers.length;_++){const x=this._parsers[_];if(x.test(w)){v=x.parse(w);break}}}else u=w.data??u,d=w.format??d,f=w.loadParser??f,v={...v,...w};if(!m)throw new Error(`[Resolver] alias is undefined for this asset: ${v.src}`);v=this.buildResolvedAsset(v,{aliases:m,data:u,format:d,loadParser:f}),g.push(v)})}),m.forEach(y=>{this._assetMap[y]=g})})}resolveBundle(e){const t=eh(e);e=ks(e);const i={};return e.forEach(s=>{const r=this._bundles[s];if(r){const a=this.resolve(r),o={};for(const h in a){const l=a[h];o[this._extractAssetIdFromBundle(s,h)]=l}i[s]=o}}),t?i[e[0]]:i}resolveUrl(e){const t=this.resolve(e);if(typeof e!="string"){const i={};for(const s in t)i[s]=t[s].src;return i}return t.src}resolve(e){const t=eh(e);e=ks(e);const i={};return e.forEach(s=>{if(!this._resolverHash[s])if(this._assetMap[s]){let r=this._assetMap[s];const a=r[0],o=this._getPreferredOrder(r);o==null||o.priority.forEach(h=>{o.params[h].forEach(l=>{const c=r.filter(u=>u[h]?u[h]===l:!1);c.length&&(r=c)})}),this._resolverHash[s]=r[0]??a}else this._resolverHash[s]=this.buildResolvedAsset({alias:[s],src:s},{});i[s]=this._resolverHash[s]}),t?i[e[0]]:i}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;t<e.length;t++){const i=e[0],s=this._preferredOrder.find(r=>r.params.format.includes(i.format));if(s)return s}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;const t=/\?/.test(e)?"&":"?";return`${e}${t}${this._defaultSearchParams}`}buildResolvedAsset(e,t){const{aliases:i,data:s,loadParser:r,format:a}=t;return(this._basePath||this._rootPath)&&(e.src=li.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=i??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...s||{},...e.data},e.loadParser=r??e.loadParser,e.format=a??e.format??li.extname(e.src).slice(1),e.srcs=e.src,e.name=e.alias,e}}class eC{constructor(){this._detections=[],this._initialized=!1,this.resolver=new QA,this.loader=new EA,this.cache=qr,this._backgroundLoader=new _A(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(e={}){var r,a;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");return}if(this._initialized=!0,e.defaultSearchParams&&this.resolver.setDefaultSearchParams(e.defaultSearchParams),e.basePath&&(this.resolver.basePath=e.basePath),e.bundleIdentifier&&this.resolver.setBundleIdentifier(e.bundleIdentifier),e.manifest){let o=e.manifest;typeof o=="string"&&(o=await this.load(o)),this.resolver.addManifest(o)}const t=((r=e.texturePreference)==null?void 0:r.resolution)??1,i=typeof t=="number"?[t]:t,s=await this._detectFormats({preferredFormats:(a=e.texturePreference)==null?void 0:a.format,skipDetections:e.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:s,resolution:i}}),e.preferences&&this.setPreferences(e.preferences)}add(e,t,i,s,r){this.resolver.add(e,t,i,s,r)}async load(e,t){this._initialized||await this.init();const i=eh(e),s=ks(e).map(o=>{if(typeof o!="string"){const h=this.resolver.getAlias(o);return h.some(l=>!this.resolver.hasKey(l))&&this.add(o),Array.isArray(h)?h[0]:h}return this.resolver.hasKey(o)||this.add({alias:o,src:o}),o}),r=this.resolver.resolve(s),a=await this._mapLoadToResolve(r,t);return i?a[s[0]]:a}addBundle(e,t){this.resolver.addBundle(e,t)}async loadBundle(e,t){this._initialized||await this.init();let i=!1;typeof e=="string"&&(i=!0,e=[e]);const s=this.resolver.resolveBundle(e),r={},a=Object.keys(s);let o=0,h=0;const l=()=>{t==null||t(++o/h)},c=a.map(u=>{const d=s[u];return h+=Object.keys(d).length,this._mapLoadToResolve(d,l).then(f=>{r[u]=f})});return await Promise.all(c),i?r[e[0]]:r}async backgroundLoad(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolve(e);this._backgroundLoader.add(Object.values(t))}async backgroundLoadBundle(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolveBundle(e);Object.values(t).forEach(i=>{this._backgroundLoader.add(Object.values(i))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(typeof e=="string")return qr.get(e);const t={};for(let i=0;i<e.length;i++)t[i]=qr.get(e[i]);return t}async _mapLoadToResolve(e,t){const i=Object.values(e),s=Object.keys(e);this._backgroundLoader.active=!1;co
Line truncated
|
||||
`;let io=null;class i1{constructor(){io||(io=URL.createObjectURL(new Blob([VA],{type:"application/javascript"}))),this.worker=new Worker(io)}}i1.revokeObjectURL=function(){io&&(URL.revokeObjectURL(io),io=null)};let k0=0,Rd;class $A{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(e=>{const{worker:t}=new Nf;t.addEventListener("message",i=>{t.terminate(),Nf.revokeObjectURL(),e(i.data)})}),this._isImageBitmapSupported)}loadImageBitmap(e){return this._run("loadImageBitmap",[e])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){Rd===void 0&&(Rd=navigator.hardwareConcurrency||4);let e=this.workerPool.pop();return!e&&this._createdWorkers<Rd&&(this._createdWorkers++,e=new i1().worker,e.addEventListener("message",t=>{this.complete(t.data),this.returnWorker(t.target),this.next()})),e}returnWorker(e){this.workerPool.push(e)}complete(e){e.error!==void 0?this.resolveHash[e.uuid].reject(e.error):this.resolveHash[e.uuid].resolve(e.data),this.resolveHash[e.uuid]=null}async _run(e,t){await this._initWorkers();const i=new Promise((s,r)=>{this.queue.push({id:e,arguments:t,resolve:s,reject:r})});return this.next(),i}next(){if(!this.queue.length)return;const e=this.getWorker();if(!e)return;const t=this.queue.pop(),i=t.id;this.resolveHash[k0]={resolve:t.resolve,reject:t.reject},e.postMessage({data:t.arguments,uuid:k0++,id:i})}}const F0=new $A;function Cl(n,e,t){n.resource.internal=!0;const i=new rt(n),s=()=>{delete e.promiseCache[t],Kr.has(t)&&Kr.remove(t)};return i.baseTexture.once("destroyed",()=>{t in e.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),s())}),i.once("destroyed",()=>{n.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),s())}),i}const GA=[".jpeg",".jpg",".png",".webp",".avif"],HA=["image/jpeg","image/png","image/webp","image/avif"];async function jA(n){const e=await $e.ADAPTER.fetch(n);if(!e.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${n}: ${e.status} ${e.statusText}`);const t=await e.blob();return await createImageBitmap(t)}const qh={name:"loadTextures",extension:{type:Xe.LoadParser,priority:ds.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(n){return wo(n,HA)||ns(n,GA)},async load(n,e,t){var o;const i=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let s;i?this.config.preferWorkers&&await F0.isImageBitmapSupported()?s=await F0.loadImageBitmap(n):s=await jA(n):s=await new Promise((h,l)=>{const c=new Image;c.crossOrigin=this.config.crossOrigin,c.src=n,c.complete?h(c):(c.onload=()=>h(c),c.onerror=u=>l(u))});const r={...e.data};r.resolution??(r.resolution=Qn(n)),i&&((o=r.resourceOptions)==null?void 0:o.ownsImageBitmap)===void 0&&(r.resourceOptions={...r.resourceOptions},r.resourceOptions.ownsImageBitmap=!0);const a=new ot(s,r);return a.resource.src=n,Cl(a,t,n)},unload(n){n.destroy(!0)}};ze.add(qh);const WA=".svg",zA="image/svg+xml",qA={extension:{type:Xe.LoadParser,priority:ds.High},name:"loadSVG",test(n){return wo(n,zA)||ns(n,WA)},async testParse(n){return Cf.test(n)},async parse(n,e,t){var r;const i=new Cf(n,(r=e==null?void 0:e.data)==null?void 0:r.resourceOptions);await i.load();const s=new ot(i,{resolution:Qn(n),...e==null?void 0:e.data});return s.resource.src=e.src,Cl(s,t,e.src)},async load(n,e){return(await $e.ADAPTER.fetch(n)).text()},unload:qh.unload};ze.add(qA);const KA=[".mp4",".m4v",".webm",".ogv"],ZA=["video/mp4","video/webm","video/ogg"],JA={name:"loadVideo",extension:{type:Xe.LoadParser,priority:ds.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test(n){return wo(n,ZA)||ns(n,KA)},async load(n,e,t){var a;let i;const s=await(await $e.ADAPTER.fetch(n)).blob(),r=URL.createObjectURL(s);try{const o={autoPlay:this.config.defaultAutoPlay,updateFPS:this.config.defaultUpdateFPS,loop:this.config.defaultLoop,muted:this.config.defaultMuted,playsinline:this.config.defaultPlaysinline,...(a=e==null?void 0:e.data)==null?void 0:a.resourceOptions,autoLoad:!0},h=new zx(r,o);await h.load();const l=new ot(h,{alphaMode:await rM(),resolution:Qn(n),...e==null?void 0:e.data});l.resource.src=n,i=Cl(l,t,n),i.baseTexture.once("destroyed",()=>{URL.revokeObjectURL(r)})}catch(o){throw URL.revokeObjectURL(r),o}return i},unload(n){n.destroy(!0)}};ze.add(JA);class QA{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=
Line truncated
|
||||
Please use Assets.add({ alias, src, data, format, loadParser }) instead.`),a.push({alias:e,src:t,data:i,format:s,loadParser:r})):Array.isArray(e)?a.push(...e):a.push(e);let o;o=h=>{this.hasKey(h)&&console.warn(`[Resolver] already has key: ${h} overwriting`)},ks(a).forEach(h=>{const{src:l,srcs:c}=h;let{data:u,format:d,loadParser:f}=h;const p=ks(l||c).map(y=>typeof y=="string"?TA(y):Array.isArray(y)?y:[y]),m=this.getAlias(h);Array.isArray(m)?m.forEach(o):o(m);const g=[];p.forEach(y=>{y.forEach(w=>{let v={};if(typeof w!="object"){v.src=w;for(let _=0;_<this._parsers.length;_++){const x=this._parsers[_];if(x.test(w)){v=x.parse(w);break}}}else u=w.data??u,d=w.format??d,f=w.loadParser??f,v={...v,...w};if(!m)throw new Error(`[Resolver] alias is undefined for this asset: ${v.src}`);v=this.buildResolvedAsset(v,{aliases:m,data:u,format:d,loadParser:f}),g.push(v)})}),m.forEach(y=>{this._assetMap[y]=g})})}resolveBundle(e){const t=eh(e);e=ks(e);const i={};return e.forEach(s=>{const r=this._bundles[s];if(r){const a=this.resolve(r),o={};for(const h in a){const l=a[h];o[this._extractAssetIdFromBundle(s,h)]=l}i[s]=o}}),t?i[e[0]]:i}resolveUrl(e){const t=this.resolve(e);if(typeof e!="string"){const i={};for(const s in t)i[s]=t[s].src;return i}return t.src}resolve(e){const t=eh(e);e=ks(e);const i={};return e.forEach(s=>{if(!this._resolverHash[s])if(this._assetMap[s]){let r=this._assetMap[s];const a=r[0],o=this._getPreferredOrder(r);o==null||o.priority.forEach(h=>{o.params[h].forEach(l=>{const c=r.filter(u=>u[h]?u[h]===l:!1);c.length&&(r=c)})}),this._resolverHash[s]=r[0]??a}else this._resolverHash[s]=this.buildResolvedAsset({alias:[s],src:s},{});i[s]=this._resolverHash[s]}),t?i[e[0]]:i}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;t<e.length;t++){const i=e[0],s=this._preferredOrder.find(r=>r.params.format.includes(i.format));if(s)return s}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;const t=/\?/.test(e)?"&":"?";return`${e}${t}${this._defaultSearchParams}`}buildResolvedAsset(e,t){const{aliases:i,data:s,loadParser:r,format:a}=t;return(this._basePath||this._rootPath)&&(e.src=li.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=i??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...s||{},...e.data},e.loadParser=r??e.loadParser,e.format=a??e.format??li.extname(e.src).slice(1),e.srcs=e.src,e.name=e.alias,e}}class eC{constructor(){this._detections=[],this._initialized=!1,this.resolver=new QA,this.loader=new EA,this.cache=Kr,this._backgroundLoader=new _A(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(e={}){var r,a;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");return}if(this._initialized=!0,e.defaultSearchParams&&this.resolver.setDefaultSearchParams(e.defaultSearchParams),e.basePath&&(this.resolver.basePath=e.basePath),e.bundleIdentifier&&this.resolver.setBundleIdentifier(e.bundleIdentifier),e.manifest){let o=e.manifest;typeof o=="string"&&(o=await this.load(o)),this.resolver.addManifest(o)}const t=((r=e.texturePreference)==null?void 0:r.resolution)??1,i=typeof t=="number"?[t]:t,s=await this._detectFormats({preferredFormats:(a=e.texturePreference)==null?void 0:a.format,skipDetections:e.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:s,resolution:i}}),e.preferences&&this.setPreferences(e.preferences)}add(e,t,i,s,r){this.resolver.add(e,t,i,s,r)}async load(e,t){this._initialized||await this.init();const i=eh(e),s=ks(e).map(o=>{if(typeof o!="string"){const h=this.resolver.getAlias(o);return h.some(l=>!this.resolver.hasKey(l))&&this.add(o),Array.isArray(h)?h[0]:h}return this.resolver.hasKey(o)||this.add({alias:o,src:o}),o}),r=this.resolver.resolve(s),a=await this._mapLoadToResolve(r,t);return i?a[s[0]]:a}addBundle(e,t){this.resolver.addBundle(e,t)}async loadBundle(e,t){this._initialized||await this.init();let i=!1;typeof e=="string"&&(i=!0,e=[e]);const s=this.resolver.resolveBundle(e),r={},a=Object.keys(s);let o=0,h=0;const l=()=>{t==null||t(++o/h)},c=a.map(u=>{const d=s[u];return h+=Object.keys(d).length,this._mapLoadToResolve(d,l).then(f=>{r[u]=f})});return await Promise.all(c),i?r[e[0]]:r}async backgroundLoad(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolve(e);this._backgroundLoader.add(Object.values(t))}async backgroundLoadBundle(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolveBundle(e);Object.values(t).forEach(i=>{this._backgroundLoader.add(Object.values(i))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(typeof e=="string")return Kr.get(e);const t={};for(let i=0;i<e.length;i++)t[i]=Kr.get(e[i]);return t}async _mapLoadToResolve(e,t){const i=Object.values(e),s=Object.keys(e);this._backgroundLoader.active=!1;co
Line truncated
|
||||
uniform vec4 uColor;
|
||||
|
||||
uniform sampler2D uSampler;
|
||||
@@ -954,7 +954,7 @@ void main(void)
|
||||
|
||||
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;
|
||||
}
|
||||
`;class nh extends Xs{constructor(e,t){const i={uSampler:e,alpha:1,uTextureMatrix:Zt.IDENTITY,uColor:new Float32Array([1,1,1,1])};t=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},t),t.uniforms&&Object.assign(i,t.uniforms),super(t.program||fn.from(KC,qC),i),this._colorDirty=!1,this.uvMatrix=new Xm(e),this.batchable=t.program===void 0,this.pluginName=t.pluginName,this._tintColor=new Dt(t.tint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0,this.alpha=t.alpha}get texture(){return this.uniforms.uSampler}set texture(e){this.uniforms.uSampler!==e&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!e.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=e,this.uvMatrix.texture=e)}set alpha(e){e!==this._alpha&&(this._alpha=e,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(e){e!==this.tint&&(this._tintColor.setValue(e),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}get tintValue(){return this._tintColor.toNumber()}update(){if(this._colorDirty){this._colorDirty=!1;const e=this.texture.baseTexture.alphaMode;Dt.shared.setValue(this._tintColor).premultiply(this._alpha,e).toArray(this.uniforms.uColor)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class ZC extends vl{constructor(e=rt.EMPTY,t,i,s,r){const a=new jm(t,i,s);a.getBuffer("aVertexPosition").static=!1;const o=new nh(e);super(a,o,null,r),this.autoUpdate=!0}get vertices(){return this.geometry.getBuffer("aVertexPosition").data}set vertices(e){this.geometry.getBuffer("aVertexPosition").data=e}_render(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),super._render(e)}}class G0{constructor(e,t,i){this.geometry=new bn,this.indexBuffer=null,this.size=i,this.dynamicProperties=[],this.staticProperties=[];for(let s=0;s<e.length;++s){let r=e[s];r={attributeName:r.attributeName,size:r.size,uploadFunction:r.uploadFunction,type:r.type||We.FLOAT,offset:r.offset},t[s]?this.dynamicProperties.push(r):this.staticProperties.push(r)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}initBuffers(){const e=this.geometry;let t=0;this.indexBuffer=new qt(xM(this.size),!0,!0),e.addIndex(this.indexBuffer),this.dynamicStride=0;for(let a=0;a<this.dynamicProperties.length;++a){const o=this.dynamicProperties[a];o.offset=t,t+=o.size,this.dynamicStride+=o.size}const i=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(i),this.dynamicDataUint32=new Uint32Array(i),this.dynamicBuffer=new qt(this.dynamicData,!1,!1);let s=0;this.staticStride=0;for(let a=0;a<this.staticProperties.length;++a){const o=this.staticProperties[a];o.offset=s,s+=o.size,this.staticStride+=o.size}const r=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(r),this.staticDataUint32=new Uint32Array(r),this.staticBuffer=new qt(this.staticData,!0,!1);for(let a=0;a<this.dynamicProperties.length;++a){const o=this.dynamicProperties[a];e.addAttribute(o.attributeName,this.dynamicBuffer,0,o.type===We.UNSIGNED_BYTE,o.type,this.dynamicStride*4,o.offset*4)}for(let a=0;a<this.staticProperties.length;++a){const o=this.staticProperties[a];e.addAttribute(o.attributeName,this.staticBuffer,0,o.type===We.UNSIGNED_BYTE,o.type,this.staticStride*4,o.offset*4)}}uploadDynamic(e,t,i){for(let s=0;s<this.dynamicProperties.length;s++){const r=this.dynamicProperties[s];r.uploadFunction(e,t,i,r.type===We.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,r.offset)}this.dynamicBuffer._updateID++}uploadStatic(e,t,i){for(let s=0;s<this.staticProperties.length;s++){const r=this.staticProperties[s];r.uploadFunction(e,t,i,r.type===We.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,r.offset)}this.staticBuffer._updateID++}destroy(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()}}var JC=`varying vec2 vTextureCoord;
|
||||
`;class nh extends Xs{constructor(e,t){const i={uSampler:e,alpha:1,uTextureMatrix:Zt.IDENTITY,uColor:new Float32Array([1,1,1,1])};t=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},t),t.uniforms&&Object.assign(i,t.uniforms),super(t.program||fn.from(KC,qC),i),this._colorDirty=!1,this.uvMatrix=new Ym(e),this.batchable=t.program===void 0,this.pluginName=t.pluginName,this._tintColor=new Lt(t.tint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0,this.alpha=t.alpha}get texture(){return this.uniforms.uSampler}set texture(e){this.uniforms.uSampler!==e&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!e.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=e,this.uvMatrix.texture=e)}set alpha(e){e!==this._alpha&&(this._alpha=e,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(e){e!==this.tint&&(this._tintColor.setValue(e),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}get tintValue(){return this._tintColor.toNumber()}update(){if(this._colorDirty){this._colorDirty=!1;const e=this.texture.baseTexture.alphaMode;Lt.shared.setValue(this._tintColor).premultiply(this._alpha,e).toArray(this.uniforms.uColor)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class ZC extends vl{constructor(e=rt.EMPTY,t,i,s,r){const a=new Wm(t,i,s);a.getBuffer("aVertexPosition").static=!1;const o=new nh(e);super(a,o,null,r),this.autoUpdate=!0}get vertices(){return this.geometry.getBuffer("aVertexPosition").data}set vertices(e){this.geometry.getBuffer("aVertexPosition").data=e}_render(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),super._render(e)}}class H0{constructor(e,t,i){this.geometry=new bn,this.indexBuffer=null,this.size=i,this.dynamicProperties=[],this.staticProperties=[];for(let s=0;s<e.length;++s){let r=e[s];r={attributeName:r.attributeName,size:r.size,uploadFunction:r.uploadFunction,type:r.type||We.FLOAT,offset:r.offset},t[s]?this.dynamicProperties.push(r):this.staticProperties.push(r)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}initBuffers(){const e=this.geometry;let t=0;this.indexBuffer=new qt(xM(this.size),!0,!0),e.addIndex(this.indexBuffer),this.dynamicStride=0;for(let a=0;a<this.dynamicProperties.length;++a){const o=this.dynamicProperties[a];o.offset=t,t+=o.size,this.dynamicStride+=o.size}const i=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(i),this.dynamicDataUint32=new Uint32Array(i),this.dynamicBuffer=new qt(this.dynamicData,!1,!1);let s=0;this.staticStride=0;for(let a=0;a<this.staticProperties.length;++a){const o=this.staticProperties[a];o.offset=s,s+=o.size,this.staticStride+=o.size}const r=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(r),this.staticDataUint32=new Uint32Array(r),this.staticBuffer=new qt(this.staticData,!0,!1);for(let a=0;a<this.dynamicProperties.length;++a){const o=this.dynamicProperties[a];e.addAttribute(o.attributeName,this.dynamicBuffer,0,o.type===We.UNSIGNED_BYTE,o.type,this.dynamicStride*4,o.offset*4)}for(let a=0;a<this.staticProperties.length;++a){const o=this.staticProperties[a];e.addAttribute(o.attributeName,this.staticBuffer,0,o.type===We.UNSIGNED_BYTE,o.type,this.staticStride*4,o.offset*4)}}uploadDynamic(e,t,i){for(let s=0;s<this.dynamicProperties.length;s++){const r=this.dynamicProperties[s];r.uploadFunction(e,t,i,r.type===We.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,r.offset)}this.dynamicBuffer._updateID++}uploadStatic(e,t,i){for(let s=0;s<this.staticProperties.length;s++){const r=this.staticProperties[s];r.uploadFunction(e,t,i,r.type===We.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,r.offset)}this.staticBuffer._updateID++}destroy(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()}}var JC=`varying vec2 vTextureCoord;
|
||||
varying vec4 vColor;
|
||||
|
||||
uniform sampler2D uSampler;
|
||||
@@ -987,8 +987,8 @@ void main(void){
|
||||
vTextureCoord = aTextureCoord;
|
||||
vColor = aColor * uColor;
|
||||
}
|
||||
`;class h1 extends zh{constructor(e){super(e),this.shader=null,this.properties=null,this.tempMatrix=new Zt,this.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:this.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:this.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:this.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:this.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:We.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=Xs.from(QC,JC,{}),this.state=Sn.for2d()}render(e){const t=e.children,i=e._maxSize,s=e._batchSize,r=this.renderer;let a=t.length;if(a===0)return;a>i&&!e.autoResize&&(a=i);let o=e._buffers;o||(o=e._buffers=this.generateBuffers(e));const h=t[0]._texture.baseTexture,l=h.alphaMode>0;this.state.blendMode=lx(e.blendMode,l),r.state.set(this.state);const c=r.gl,u=e.worldTransform.copyTo(this.tempMatrix);u.prepend(r.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=u.toArray(!0),this.shader.uniforms.uColor=Dt.shared.setValue(e.tintRgb).premultiply(e.worldAlpha,l).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=h,this.renderer.shader.bind(this.shader);let d=!1;for(let f=0,p=0;f<a;f+=s,p+=1){let m=a-f;m>s&&(m=s),p>=o.length&&o.push(this._generateOneMoreBuffer(e));const g=o[p];g.uploadDynamic(t,f,m);const y=e._bufferUpdateIDs[p]||0;d=d||g._updateID<y,d&&(g._updateID=e._updateID,g.uploadStatic(t,f,m)),r.geometry.bind(g.geometry),c.drawElements(c.TRIANGLES,m*6,c.UNSIGNED_SHORT,0)}}generateBuffers(e){const t=[],i=e._maxSize,s=e._batchSize,r=e._properties;for(let a=0;a<i;a+=s)t.push(new G0(this.properties,r,s));return t}_generateOneMoreBuffer(e){const t=e._batchSize,i=e._properties;return new G0(this.properties,i,t)}uploadVertices(e,t,i,s,r,a){let o=0,h=0,l=0,c=0;for(let u=0;u<i;++u){const d=e[t+u],f=d._texture,p=d.scale.x,m=d.scale.y,g=f.trim,y=f.orig;g?(h=g.x-d.anchor.x*y.width,o=h+g.width,c=g.y-d.anchor.y*y.height,l=c+g.height):(o=y.width*(1-d.anchor.x),h=y.width*-d.anchor.x,l=y.height*(1-d.anchor.y),c=y.height*-d.anchor.y),s[a]=h*p,s[a+1]=c*m,s[a+r]=o*p,s[a+r+1]=c*m,s[a+r*2]=o*p,s[a+r*2+1]=l*m,s[a+r*3]=h*p,s[a+r*3+1]=l*m,a+=r*4}}uploadPosition(e,t,i,s,r,a){for(let o=0;o<i;o++){const h=e[t+o].position;s[a]=h.x,s[a+1]=h.y,s[a+r]=h.x,s[a+r+1]=h.y,s[a+r*2]=h.x,s[a+r*2+1]=h.y,s[a+r*3]=h.x,s[a+r*3+1]=h.y,a+=r*4}}uploadRotation(e,t,i,s,r,a){for(let o=0;o<i;o++){const h=e[t+o].rotation;s[a]=h,s[a+r]=h,s[a+r*2]=h,s[a+r*3]=h,a+=r*4}}uploadUvs(e,t,i,s,r,a){for(let o=0;o<i;++o){const h=e[t+o]._texture._uvs;h?(s[a]=h.x0,s[a+1]=h.y0,s[a+r]=h.x1,s[a+r+1]=h.y1,s[a+r*2]=h.x2,s[a+r*2+1]=h.y2,s[a+r*3]=h.x3,s[a+r*3+1]=h.y3,a+=r*4):(s[a]=0,s[a+1]=0,s[a+r]=0,s[a+r+1]=0,s[a+r*2]=0,s[a+r*2+1]=0,s[a+r*3]=0,s[a+r*3+1]=0,a+=r*4)}}uploadTint(e,t,i,s,r,a){for(let o=0;o<i;++o){const h=e[t+o],l=Dt.shared.setValue(h._tintRGB).toPremultiplied(h.alpha,h.texture.baseTexture.alphaMode>0);s[a]=l,s[a+r]=l,s[a+r*2]=l,s[a+r*3]=l,a+=r*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}h1.extension={name:"particle",type:Xe.RendererPlugin};ze.add(h1);var Zh=(n=>(n[n.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",n[n.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",n))(Zh||{});const sc={willReadFrequently:!0},Zs=class Qe{static get experimentalLetterSpacingSupported(){let e=Qe._experimentalLetterSpacingSupported;if(e!==void 0){const t=$e.ADAPTER.getCanvasRenderingContext2D().prototype;e=Qe._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,i,s,r,a,o,h,l){this.text=e,this.style=t,this.width=i,this.height=s,this.lines=r,this.lineWidths=a,this.lineHeight=o,this.maxLineWidth=h,this.fontProperties=l}static measureText(e,t,i,s=Qe._canvas){i=i??t.wordWrap;const r=t.toFontString(),a=Qe.measureFont(r);a.fontSize===0&&(a.fontSize=t.fontSize,a.ascent=t.fontSize);const o=s.getContext("2d",sc);o.font=r;const h=(i?Qe.wordWrap(e,t,s):e).split(/(?:\r\n|\r|\n)/),l=new Array(h.length);let c=0;for(let p=0;p<h.length;p++){const m=Qe._measureText(h[p],t.letterSpacing,o);l[p]=m,c=Math.max(c,m)}let u=c+t.strokeThickness;t.dropShadow&&(u+=t.dropShadowDistance);const d=t.lineHeight||a.fontSize+t.strokeThickness;let f=Math.max(d,a.fontSize+t.strokeThickness*2)+t.leading+(h.length-1)*(d+t.leading);return t.dropShadow&&(f+=t.dropShadowDistance),new Qe(e,t,u,f,h,l,d+t.leading,c,a)}static _measureText(e,t,i){let s=!1;Qe.experimentalLetterSpacingSupported&&(Qe.experimentalLetterSpacing?(i.letterSpacing=`${t}px`,i.textLetterSpacing=`${t}px`,s=!0):(i.letterSpacing="0px",i.textLetterSpacing="0px"));let r=i.measureText(e).width;return r>0&&(s?r-=t:r+=(Qe.graphemeSegmenter(e).length-1)*t),r}static wordWrap(e,t,i=Qe._canvas){const s=i.getContext("2d",sc);let r=0,a="",o="";const h=Object.create(null),{letterSpacing:l,whiteSpace:c}=t,u=Qe.collapseSpaces(c),d=Qe.collapseNewlines(c);let f=!u;const p=t.wordWrapWidth+l,
Line truncated
|
||||
`:e,e}static getFromCache(e,t,i,s){let r=i[e];return typeof r!="number"&&(r=Qe._measureText(e,t,s)+t,i[e]=r),r}static collapseSpaces(e){return e==="normal"||e==="pre-line"}static collapseNewlines(e){return e==="normal"}static trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const i=e[t];if(!Qe.isBreakingSpace(i))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:Qe._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:Qe._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let i="";if(typeof e!="string")return t;for(let s=0;s<e.length;s++){const r=e[s],a=e[s+1];if(Qe.isBreakingSpace(r,a)||Qe.isNewline(r)){i!==""&&(t.push(i),i=""),t.push(r);continue}i+=r}return i!==""&&t.push(i),t}static canBreakWords(e,t){return t}static canBreakChars(e,t,i,s,r){return!0}static wordWrapSplit(e){return Qe.graphemeSegmenter(e)}static measureFont(e){if(Qe._fonts[e])return Qe._fonts[e];const t={ascent:0,descent:0,fontSize:0},i=Qe._canvas,s=Qe._context;s.font=e;const r=Qe.METRICS_STRING+Qe.BASELINE_SYMBOL,a=Math.ceil(s.measureText(r).width);let o=Math.ceil(s.measureText(Qe.BASELINE_SYMBOL).width);const h=Math.ceil(Qe.HEIGHT_MULTIPLIER*o);if(o=o*Qe.BASELINE_MULTIPLIER|0,a===0||h===0)return Qe._fonts[e]=t,t;i.width=a,i.height=h,s.fillStyle="#f00",s.fillRect(0,0,a,h),s.font=e,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText(r,0,o);const l=s.getImageData(0,0,a,h).data,c=l.length,u=a*4;let d=0,f=0,p=!1;for(d=0;d<o;++d){for(let m=0;m<u;m+=4)if(l[f+m]!==255){p=!0;break}if(!p)f+=u;else break}for(t.ascent=o-d,f=c-u,p=!1,d=h;d>o;--d){for(let m=0;m<u;m+=4)if(l[f+m]!==255){p=!0;break}if(!p)f-=u;else break}return t.descent=d-o,t.fontSize=t.ascent+t.descent,Qe._fonts[e]=t,t}static clearMetrics(e=""){e?delete Qe._fonts[e]:Qe._fonts={}}static get _canvas(){var e;if(!Qe.__canvas){let t;try{const i=new OffscreenCanvas(0,0);if((e=i.getContext("2d",sc))!=null&&e.measureText)return Qe.__canvas=i,i;t=$e.ADAPTER.createCanvas()}catch{t=$e.ADAPTER.createCanvas()}t.width=t.height=10,Qe.__canvas=t}return Qe.__canvas}static get _context(){return Qe.__context||(Qe.__context=Qe._canvas.getContext("2d",sc)),Qe.__context}};Zs.METRICS_STRING="|ÉqÅ",Zs.BASELINE_SYMBOL="M",Zs.BASELINE_MULTIPLIER=1.4,Zs.HEIGHT_MULTIPLIER=2,Zs.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const n=new Intl.Segmenter;return e=>[...n.segment(e)].map(t=>t.segment)}return n=>[...n]})(),Zs.experimentalLetterSpacing=!1,Zs._fonts={},Zs._newlines=[10,13],Zs._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];let mr=Zs;const e2=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],u1=class Ho{constructor(e){this.styleID=0,this.reset(),Ld(this,e,e)}clone(){const e={};return Ld(e,this,Ho.defaultStyle),new Ho(e)}reset(){Ld(this,Ho.defaultStyle,Ho.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const t=Bd(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const t=Bd(e);this._fill!==t&&(this._fill=t,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){t2(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._lett
Line truncated
|
||||
`;class h1 extends zh{constructor(e){super(e),this.shader=null,this.properties=null,this.tempMatrix=new Zt,this.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:this.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:this.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:this.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:this.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:We.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=Xs.from(QC,JC,{}),this.state=Sn.for2d()}render(e){const t=e.children,i=e._maxSize,s=e._batchSize,r=this.renderer;let a=t.length;if(a===0)return;a>i&&!e.autoResize&&(a=i);let o=e._buffers;o||(o=e._buffers=this.generateBuffers(e));const h=t[0]._texture.baseTexture,l=h.alphaMode>0;this.state.blendMode=lx(e.blendMode,l),r.state.set(this.state);const c=r.gl,u=e.worldTransform.copyTo(this.tempMatrix);u.prepend(r.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=u.toArray(!0),this.shader.uniforms.uColor=Lt.shared.setValue(e.tintRgb).premultiply(e.worldAlpha,l).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=h,this.renderer.shader.bind(this.shader);let d=!1;for(let f=0,p=0;f<a;f+=s,p+=1){let m=a-f;m>s&&(m=s),p>=o.length&&o.push(this._generateOneMoreBuffer(e));const g=o[p];g.uploadDynamic(t,f,m);const y=e._bufferUpdateIDs[p]||0;d=d||g._updateID<y,d&&(g._updateID=e._updateID,g.uploadStatic(t,f,m)),r.geometry.bind(g.geometry),c.drawElements(c.TRIANGLES,m*6,c.UNSIGNED_SHORT,0)}}generateBuffers(e){const t=[],i=e._maxSize,s=e._batchSize,r=e._properties;for(let a=0;a<i;a+=s)t.push(new H0(this.properties,r,s));return t}_generateOneMoreBuffer(e){const t=e._batchSize,i=e._properties;return new H0(this.properties,i,t)}uploadVertices(e,t,i,s,r,a){let o=0,h=0,l=0,c=0;for(let u=0;u<i;++u){const d=e[t+u],f=d._texture,p=d.scale.x,m=d.scale.y,g=f.trim,y=f.orig;g?(h=g.x-d.anchor.x*y.width,o=h+g.width,c=g.y-d.anchor.y*y.height,l=c+g.height):(o=y.width*(1-d.anchor.x),h=y.width*-d.anchor.x,l=y.height*(1-d.anchor.y),c=y.height*-d.anchor.y),s[a]=h*p,s[a+1]=c*m,s[a+r]=o*p,s[a+r+1]=c*m,s[a+r*2]=o*p,s[a+r*2+1]=l*m,s[a+r*3]=h*p,s[a+r*3+1]=l*m,a+=r*4}}uploadPosition(e,t,i,s,r,a){for(let o=0;o<i;o++){const h=e[t+o].position;s[a]=h.x,s[a+1]=h.y,s[a+r]=h.x,s[a+r+1]=h.y,s[a+r*2]=h.x,s[a+r*2+1]=h.y,s[a+r*3]=h.x,s[a+r*3+1]=h.y,a+=r*4}}uploadRotation(e,t,i,s,r,a){for(let o=0;o<i;o++){const h=e[t+o].rotation;s[a]=h,s[a+r]=h,s[a+r*2]=h,s[a+r*3]=h,a+=r*4}}uploadUvs(e,t,i,s,r,a){for(let o=0;o<i;++o){const h=e[t+o]._texture._uvs;h?(s[a]=h.x0,s[a+1]=h.y0,s[a+r]=h.x1,s[a+r+1]=h.y1,s[a+r*2]=h.x2,s[a+r*2+1]=h.y2,s[a+r*3]=h.x3,s[a+r*3+1]=h.y3,a+=r*4):(s[a]=0,s[a+1]=0,s[a+r]=0,s[a+r+1]=0,s[a+r*2]=0,s[a+r*2+1]=0,s[a+r*3]=0,s[a+r*3+1]=0,a+=r*4)}}uploadTint(e,t,i,s,r,a){for(let o=0;o<i;++o){const h=e[t+o],l=Lt.shared.setValue(h._tintRGB).toPremultiplied(h.alpha,h.texture.baseTexture.alphaMode>0);s[a]=l,s[a+r]=l,s[a+r*2]=l,s[a+r*3]=l,a+=r*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}h1.extension={name:"particle",type:Xe.RendererPlugin};ze.add(h1);var Zh=(n=>(n[n.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",n[n.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",n))(Zh||{});const sc={willReadFrequently:!0},Zs=class Qe{static get experimentalLetterSpacingSupported(){let e=Qe._experimentalLetterSpacingSupported;if(e!==void 0){const t=$e.ADAPTER.getCanvasRenderingContext2D().prototype;e=Qe._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,i,s,r,a,o,h,l){this.text=e,this.style=t,this.width=i,this.height=s,this.lines=r,this.lineWidths=a,this.lineHeight=o,this.maxLineWidth=h,this.fontProperties=l}static measureText(e,t,i,s=Qe._canvas){i=i??t.wordWrap;const r=t.toFontString(),a=Qe.measureFont(r);a.fontSize===0&&(a.fontSize=t.fontSize,a.ascent=t.fontSize);const o=s.getContext("2d",sc);o.font=r;const h=(i?Qe.wordWrap(e,t,s):e).split(/(?:\r\n|\r|\n)/),l=new Array(h.length);let c=0;for(let p=0;p<h.length;p++){const m=Qe._measureText(h[p],t.letterSpacing,o);l[p]=m,c=Math.max(c,m)}let u=c+t.strokeThickness;t.dropShadow&&(u+=t.dropShadowDistance);const d=t.lineHeight||a.fontSize+t.strokeThickness;let f=Math.max(d,a.fontSize+t.strokeThickness*2)+t.leading+(h.length-1)*(d+t.leading);return t.dropShadow&&(f+=t.dropShadowDistance),new Qe(e,t,u,f,h,l,d+t.leading,c,a)}static _measureText(e,t,i){let s=!1;Qe.experimentalLetterSpacingSupported&&(Qe.experimentalLetterSpacing?(i.letterSpacing=`${t}px`,i.textLetterSpacing=`${t}px`,s=!0):(i.letterSpacing="0px",i.textLetterSpacing="0px"));let r=i.measureText(e).width;return r>0&&(s?r-=t:r+=(Qe.graphemeSegmenter(e).length-1)*t),r}static wordWrap(e,t,i=Qe._canvas){const s=i.getContext("2d",sc);let r=0,a="",o="";const h=Object.create(null),{letterSpacing:l,whiteSpace:c}=t,u=Qe.collapseSpaces(c),d=Qe.collapseNewlines(c);let f=!u;const p=t.wordWrapWidth+l,
Line truncated
|
||||
`:e,e}static getFromCache(e,t,i,s){let r=i[e];return typeof r!="number"&&(r=Qe._measureText(e,t,s)+t,i[e]=r),r}static collapseSpaces(e){return e==="normal"||e==="pre-line"}static collapseNewlines(e){return e==="normal"}static trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const i=e[t];if(!Qe.isBreakingSpace(i))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:Qe._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:Qe._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let i="";if(typeof e!="string")return t;for(let s=0;s<e.length;s++){const r=e[s],a=e[s+1];if(Qe.isBreakingSpace(r,a)||Qe.isNewline(r)){i!==""&&(t.push(i),i=""),t.push(r);continue}i+=r}return i!==""&&t.push(i),t}static canBreakWords(e,t){return t}static canBreakChars(e,t,i,s,r){return!0}static wordWrapSplit(e){return Qe.graphemeSegmenter(e)}static measureFont(e){if(Qe._fonts[e])return Qe._fonts[e];const t={ascent:0,descent:0,fontSize:0},i=Qe._canvas,s=Qe._context;s.font=e;const r=Qe.METRICS_STRING+Qe.BASELINE_SYMBOL,a=Math.ceil(s.measureText(r).width);let o=Math.ceil(s.measureText(Qe.BASELINE_SYMBOL).width);const h=Math.ceil(Qe.HEIGHT_MULTIPLIER*o);if(o=o*Qe.BASELINE_MULTIPLIER|0,a===0||h===0)return Qe._fonts[e]=t,t;i.width=a,i.height=h,s.fillStyle="#f00",s.fillRect(0,0,a,h),s.font=e,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText(r,0,o);const l=s.getImageData(0,0,a,h).data,c=l.length,u=a*4;let d=0,f=0,p=!1;for(d=0;d<o;++d){for(let m=0;m<u;m+=4)if(l[f+m]!==255){p=!0;break}if(!p)f+=u;else break}for(t.ascent=o-d,f=c-u,p=!1,d=h;d>o;--d){for(let m=0;m<u;m+=4)if(l[f+m]!==255){p=!0;break}if(!p)f-=u;else break}return t.descent=d-o,t.fontSize=t.ascent+t.descent,Qe._fonts[e]=t,t}static clearMetrics(e=""){e?delete Qe._fonts[e]:Qe._fonts={}}static get _canvas(){var e;if(!Qe.__canvas){let t;try{const i=new OffscreenCanvas(0,0);if((e=i.getContext("2d",sc))!=null&&e.measureText)return Qe.__canvas=i,i;t=$e.ADAPTER.createCanvas()}catch{t=$e.ADAPTER.createCanvas()}t.width=t.height=10,Qe.__canvas=t}return Qe.__canvas}static get _context(){return Qe.__context||(Qe.__context=Qe._canvas.getContext("2d",sc)),Qe.__context}};Zs.METRICS_STRING="|ÉqÅ",Zs.BASELINE_SYMBOL="M",Zs.BASELINE_MULTIPLIER=1.4,Zs.HEIGHT_MULTIPLIER=2,Zs.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const n=new Intl.Segmenter;return e=>[...n.segment(e)].map(t=>t.segment)}return n=>[...n]})(),Zs.experimentalLetterSpacing=!1,Zs._fonts={},Zs._newlines=[10,13],Zs._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];let mr=Zs;const e2=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],u1=class Ho{constructor(e){this.styleID=0,this.reset(),Ld(this,e,e)}clone(){const e={};return Ld(e,this,Ho.defaultStyle),new Ho(e)}reset(){Ld(this,Ho.defaultStyle,Ho.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const t=Bd(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const t=Bd(e);this._fill!==t&&(this._fill=t,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){t2(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._lett
Line truncated
|
||||
#define SHADER_NAME Tiling-Sprite-100
|
||||
|
||||
precision lowp float;
|
||||
@@ -1067,7 +1067,7 @@ void main(void)
|
||||
|
||||
gl_FragColor = texSample * uColor;
|
||||
}
|
||||
`,H0=`#version 100
|
||||
`,j0=`#version 100
|
||||
#define SHADER_NAME Tiling-Sprite-100
|
||||
|
||||
precision lowp float;
|
||||
@@ -1102,7 +1102,7 @@ void main(void)
|
||||
vec4 texSample = texture2D(uSampler, vTextureCoord);
|
||||
gl_FragColor = texSample * uColor;
|
||||
}
|
||||
`;const nc=new Zt;class v1 extends zh{constructor(e){super(e),e.runners.contextChange.add(this),this.quad=new Sx,this.state=Sn.for2d()}contextChange(){const e=this.renderer,t={globals:e.globalUniforms};this.simpleShader=Xs.from(H0,g2,t),this.shader=e.context.webGLVersion>1?Xs.from(m2,f2,t):Xs.from(H0,p2,t)}render(e){const t=this.renderer,i=this.quad;let s=i.vertices;s[0]=s[6]=e._width*-e.anchor.x,s[1]=s[3]=e._height*-e.anchor.y,s[2]=s[4]=e._width*(1-e.anchor.x),s[5]=s[7]=e._height*(1-e.anchor.y);const r=e.uvRespectAnchor?e.anchor.x:0,a=e.uvRespectAnchor?e.anchor.y:0;s=i.uvs,s[0]=s[6]=-r,s[1]=s[3]=-a,s[2]=s[4]=1-r,s[5]=s[7]=1-a,i.invalidate();const o=e._texture,h=o.baseTexture,l=h.alphaMode>0,c=e.tileTransform.localTransform,u=e.uvMatrix;let d=h.isPowerOfTwo&&o.frame.width===h.width&&o.frame.height===h.height;d&&(h._glTextures[t.CONTEXT_UID]?d=h.wrapMode!==Ds.CLAMP:h.wrapMode===Ds.CLAMP&&(h.wrapMode=Ds.REPEAT));const f=d?this.simpleShader:this.shader,p=o.width,m=o.height,g=e._width,y=e._height;nc.set(c.a*p/g,c.b*p/y,c.c*m/g,c.d*m/y,c.tx/g,c.ty/y),nc.invert(),d?nc.prepend(u.mapCoord):(f.uniforms.uMapCoord=u.mapCoord.toArray(!0),f.uniforms.uClampFrame=u.uClampFrame,f.uniforms.uClampOffset=u.uClampOffset),f.uniforms.uTransform=nc.toArray(!0),f.uniforms.uColor=Dt.shared.setValue(e.tint).premultiply(e.worldAlpha,l).toArray(f.uniforms.uColor),f.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),f.uniforms.uSampler=o,t.shader.bind(f),t.geometry.bind(i),this.state.blendMode=lx(e.blendMode,l),t.state.set(this.state),t.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}v1.extension={name:"tilingSprite",type:Xe.RendererPlugin};ze.add(v1);const y1=class jo{constructor(e,t,i){this.linkedSheets=[],(e instanceof ot||e instanceof rt)&&(e={texture:e,data:t,resolutionFilename:i});const{texture:s,data:r,resolutionFilename:a=null,cachePrefix:o=""}=e;this.cachePrefix=o,this._texture=s instanceof rt?s:null,this.baseTexture=s instanceof ot?s:this._texture.baseTexture,this.textures={},this.animations={},this.data=r;const h=this.baseTexture.resource;this.resolution=this._updateResolution(a||(h?h.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:t}=this.data.meta;let i=Qn(e,null);return i===null&&(i=typeof t=="number"?t:parseFloat(t??"1")),i!==1&&this.baseTexture.setResolution(i),i}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=jo.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const i=jo.BATCH_SIZE;for(;t-e<i&&t<this._frameKeys.length;){const s=this._frameKeys[t],r=this._frames[s],a=r.frame;if(a){let o=null,h=null;const l=r.trimmed!==!1&&r.sourceSize?r.sourceSize:r.frame,c=new vt(0,0,Math.floor(l.w)/this.resolution,Math.floor(l.h)/this.resolution);r.rotated?o=new vt(Math.floor(a.x)/this.resolution,Math.floor(a.y)/this.resolution,Math.floor(a.h)/this.resolution,Math.floor(a.w)/this.resolution):o=new vt(Math.floor(a.x)/this.resolution,Math.floor(a.y)/this.resolution,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution),r.trimmed!==!1&&r.spriteSourceSize&&(h=new vt(Math.floor(r.spriteSourceSize.x)/this.resolution,Math.floor(r.spriteSourceSize.y)/this.resolution,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution)),this.textures[s]=new rt(this.baseTexture,o,c,h,r.rotated?2:0,r.anchor,r.borders),rt.addToCache(this.textures[s],this.cachePrefix+s.toString())}t++}}_processAnimations(){const e=this.data.animations||{};for(const t in e){this.animations[t]=[];for(let i=0;i<e[t].length;i++){const s=e[t][i];this.animations[t].push(this.textures[s])}}}_parseComplete(){const e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*jo.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*jo.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){var t;for(const i in this.textures)this.textures[i].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&((t=this._texture)==null||t.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null,this.linkedSheets=[]}};y1.BATCH_SIZE=1e3;let j0=y1;const v2=["jpg","png","jpeg","avif","webp","s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"];function x1(n,e,t){const i={};if(n.forEach(s=>{i[s]=e}),Object.keys(e.textures).forEach(s=>{i[`${e.cachePrefix}${s}`]=e.textures[s]}),!t){const s=li.dirname(n[0]);e.linkedSheets.forEach((r,a)=>{Object.assign(i,x1([`${s}/${e.data.meta.related_multi_packs[a]}`],r,!0))})}return i}const y2={extension:Xe.Asset,cache:{test:n=>n instanceof j0,getCacheableAssets:(n,e)=>x1(n,e,!1)},resolver:{test:n=>{const e=n.split("?")[0].split("."),t=e.pop(),i=e.pop();return t==="json"&&v2.includes(i)},parse:n=>{var t;const
Line truncated
|
||||
`;const nc=new Zt;class v1 extends zh{constructor(e){super(e),e.runners.contextChange.add(this),this.quad=new Sx,this.state=Sn.for2d()}contextChange(){const e=this.renderer,t={globals:e.globalUniforms};this.simpleShader=Xs.from(j0,g2,t),this.shader=e.context.webGLVersion>1?Xs.from(m2,f2,t):Xs.from(j0,p2,t)}render(e){const t=this.renderer,i=this.quad;let s=i.vertices;s[0]=s[6]=e._width*-e.anchor.x,s[1]=s[3]=e._height*-e.anchor.y,s[2]=s[4]=e._width*(1-e.anchor.x),s[5]=s[7]=e._height*(1-e.anchor.y);const r=e.uvRespectAnchor?e.anchor.x:0,a=e.uvRespectAnchor?e.anchor.y:0;s=i.uvs,s[0]=s[6]=-r,s[1]=s[3]=-a,s[2]=s[4]=1-r,s[5]=s[7]=1-a,i.invalidate();const o=e._texture,h=o.baseTexture,l=h.alphaMode>0,c=e.tileTransform.localTransform,u=e.uvMatrix;let d=h.isPowerOfTwo&&o.frame.width===h.width&&o.frame.height===h.height;d&&(h._glTextures[t.CONTEXT_UID]?d=h.wrapMode!==Ds.CLAMP:h.wrapMode===Ds.CLAMP&&(h.wrapMode=Ds.REPEAT));const f=d?this.simpleShader:this.shader,p=o.width,m=o.height,g=e._width,y=e._height;nc.set(c.a*p/g,c.b*p/y,c.c*m/g,c.d*m/y,c.tx/g,c.ty/y),nc.invert(),d?nc.prepend(u.mapCoord):(f.uniforms.uMapCoord=u.mapCoord.toArray(!0),f.uniforms.uClampFrame=u.uClampFrame,f.uniforms.uClampOffset=u.uClampOffset),f.uniforms.uTransform=nc.toArray(!0),f.uniforms.uColor=Lt.shared.setValue(e.tint).premultiply(e.worldAlpha,l).toArray(f.uniforms.uColor),f.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),f.uniforms.uSampler=o,t.shader.bind(f),t.geometry.bind(i),this.state.blendMode=lx(e.blendMode,l),t.state.set(this.state),t.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}v1.extension={name:"tilingSprite",type:Xe.RendererPlugin};ze.add(v1);const y1=class jo{constructor(e,t,i){this.linkedSheets=[],(e instanceof ot||e instanceof rt)&&(e={texture:e,data:t,resolutionFilename:i});const{texture:s,data:r,resolutionFilename:a=null,cachePrefix:o=""}=e;this.cachePrefix=o,this._texture=s instanceof rt?s:null,this.baseTexture=s instanceof ot?s:this._texture.baseTexture,this.textures={},this.animations={},this.data=r;const h=this.baseTexture.resource;this.resolution=this._updateResolution(a||(h?h.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:t}=this.data.meta;let i=Qn(e,null);return i===null&&(i=typeof t=="number"?t:parseFloat(t??"1")),i!==1&&this.baseTexture.setResolution(i),i}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=jo.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const i=jo.BATCH_SIZE;for(;t-e<i&&t<this._frameKeys.length;){const s=this._frameKeys[t],r=this._frames[s],a=r.frame;if(a){let o=null,h=null;const l=r.trimmed!==!1&&r.sourceSize?r.sourceSize:r.frame,c=new vt(0,0,Math.floor(l.w)/this.resolution,Math.floor(l.h)/this.resolution);r.rotated?o=new vt(Math.floor(a.x)/this.resolution,Math.floor(a.y)/this.resolution,Math.floor(a.h)/this.resolution,Math.floor(a.w)/this.resolution):o=new vt(Math.floor(a.x)/this.resolution,Math.floor(a.y)/this.resolution,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution),r.trimmed!==!1&&r.spriteSourceSize&&(h=new vt(Math.floor(r.spriteSourceSize.x)/this.resolution,Math.floor(r.spriteSourceSize.y)/this.resolution,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution)),this.textures[s]=new rt(this.baseTexture,o,c,h,r.rotated?2:0,r.anchor,r.borders),rt.addToCache(this.textures[s],this.cachePrefix+s.toString())}t++}}_processAnimations(){const e=this.data.animations||{};for(const t in e){this.animations[t]=[];for(let i=0;i<e[t].length;i++){const s=e[t][i];this.animations[t].push(this.textures[s])}}}_parseComplete(){const e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*jo.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*jo.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){var t;for(const i in this.textures)this.textures[i].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&((t=this._texture)==null||t.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null,this.linkedSheets=[]}};y1.BATCH_SIZE=1e3;let W0=y1;const v2=["jpg","png","jpeg","avif","webp","s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"];function x1(n,e,t){const i={};if(n.forEach(s=>{i[s]=e}),Object.keys(e.textures).forEach(s=>{i[`${e.cachePrefix}${s}`]=e.textures[s]}),!t){const s=li.dirname(n[0]);e.linkedSheets.forEach((r,a)=>{Object.assign(i,x1([`${s}/${e.data.meta.related_multi_packs[a]}`],r,!0))})}return i}const y2={extension:Xe.Asset,cache:{test:n=>n instanceof W0,getCacheableAssets:(n,e)=>x1(n,e,!1)},resolver:{test:n=>{const e=n.split("?")[0].split("."),t=e.pop(),i=e.pop();return t==="json"&&v2.includes(i)},parse:n=>{var t;const
Line truncated
|
||||
varying vec2 vTextureCoord;\r
|
||||
uniform sampler2D uSampler;\r
|
||||
\r
|
||||
@@ -1156,17 +1156,17 @@ void main(void)\r
|
||||
\r
|
||||
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r
|
||||
}\r
|
||||
`;const W0=[],z0=[],q0=[],M2=class w1 extends Oi{constructor(e,t={}){super();const{align:i,tint:s,maxWidth:r,letterSpacing:a,fontName:o,fontSize:h}=Object.assign({},w1.styleDefaults,t);if(!ur.available[o])throw new Error(`Missing BitmapFont "${o}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=i,this._tintColor=new Dt(s),this._font=void 0,this._fontName=o,this._fontSize=h,this.text=e,this._maxWidth=r,this._maxLineHeight=0,this._letterSpacing=a,this._anchor=new Yn(()=>{this.dirty=!0},this,0,0),this._roundPixels=$e.ROUND_PIXELS,this.dirty=!0,this._resolution=$e.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var R;const e=ur.available[this._fontName],t=this.fontSize,i=t/e.size,s=new kt,r=[],a=[],o=[],h=this._text.replace(/(?:\r\n|\r)/g,`
|
||||
`)||" ",l=b1(h),c=this._maxWidth*e.size/t,u=e.distanceFieldType==="none"?W0:z0;let d=null,f=0,p=0,m=0,g=-1,y=0,w=0,v=0,_=0;for(let F=0;F<l.length;F++){const B=l[F],L=Cc(B);if(/(?:\s)/.test(B)&&(g=F,y=f,_++),B==="\r"||B===`
|
||||
`){a.push(f),o.push(-1),p=Math.max(p,f),++m,++w,s.x=0,s.y+=e.lineHeight,d=null,_=0;continue}const Y=e.chars[L];if(!Y)continue;d&&Y.kerning[d]&&(s.x+=Y.kerning[d]);const O=q0.pop()||{texture:rt.EMPTY,line:0,charCode:0,prevSpaces:0,position:new kt};O.texture=Y.texture,O.line=m,O.charCode=L,O.position.x=Math.round(s.x+Y.xOffset+this._letterSpacing/2),O.position.y=Math.round(s.y+Y.yOffset),O.prevSpaces=_,r.push(O),f=O.position.x+Math.max(Y.xAdvance-Y.xOffset,Y.texture.orig.width),s.x+=Y.xAdvance+this._letterSpacing,v=Math.max(v,Y.yOffset+Y.texture.height),d=L,g!==-1&&c>0&&s.x>c&&(++w,Ja(r,1+g-w,1+F-g),F=g,g=-1,a.push(y),o.push(r.length>0?r[r.length-1].prevSpaces:0),p=Math.max(p,y),m++,s.x=0,s.y+=e.lineHeight,d=null,_=0)}const x=l[l.length-1];x!=="\r"&&x!==`
|
||||
`&&(/(?:\s)/.test(x)&&(f=y),a.push(f),p=Math.max(p,f),o.push(-1));const M=[];for(let F=0;F<=m;F++){let B=0;this._align==="right"?B=p-a[F]:this._align==="center"?B=(p-a[F])/2:this._align==="justify"&&(B=o[F]<0?0:(p-a[F])/o[F]),M.push(B)}const T=r.length,C={},I=[],k=this._activePagesMeshData;u.push(...k);for(let F=0;F<T;F++){const B=r[F].texture,L=B.baseTexture.uid;if(!C[L]){let Y=u.pop();if(!Y){const D=new jm;let P,U;e.distanceFieldType==="none"?(P=new nh(rt.EMPTY),U=st.NORMAL):(P=new nh(rt.EMPTY,{program:fn.from(T2,_2),uniforms:{uFWidth:0}}),U=st.NORMAL_NPM);const N=new vl(D,P);N.blendMode=U,Y={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:N,vertices:null,uvs:null,indices:null}}Y.index=0,Y.indexCount=0,Y.vertexCount=0,Y.uvsCount=0,Y.total=0;const{_textureCache:O}=this;O[L]=O[L]||new rt(B.baseTexture),Y.mesh.texture=O[L],Y.mesh.tint=this._tintColor.value,I.push(Y),C[L]=Y}C[L].total++}for(let F=0;F<k.length;F++)I.includes(k[F])||this.removeChild(k[F].mesh);for(let F=0;F<I.length;F++)I[F].mesh.parent!==this&&this.addChild(I[F].mesh);this._activePagesMeshData=I;for(const F in C){const B=C[F],L=B.total;if(!(((R=B.indices)==null?void 0:R.length)>6*L)||B.vertices.length<vl.BATCHABLE_SIZE*2)B.vertices=new Float32Array(8*L),B.uvs=new Float32Array(8*L),B.indices=new Uint16Array(6*L);else{const Y=B.total,O=B.vertices;for(let D=Y*4*2;D<O.length;D++)O[D]=0}B.mesh.size=6*L}for(let F=0;F<T;F++){const B=r[F];let L=B.position.x+M[B.line]*(this._align==="justify"?B.prevSpaces:1);this._roundPixels&&(L=Math.round(L));const Y=L*i,O=B.position.y*i,D=B.texture,P=C[D.baseTexture.uid],U=D.frame,N=D._uvs,X=P.index++;P.indices[X*6+0]=0+X*4,P.indices[X*6+1]=1+X*4,P.indices[X*6+2]=2+X*4,P.indices[X*6+3]=0+X*4,P.indices[X*6+4]=2+X*4,P.indices[X*6+5]=3+X*4,P.vertices[X*8+0]=Y,P.vertices[X*8+1]=O,P.vertices[X*8+2]=Y+U.width*i,P.vertices[X*8+3]=O,P.vertices[X*8+4]=Y+U.width*i,P.vertices[X*8+5]=O+U.height*i,P.vertices[X*8+6]=Y,P.vertices[X*8+7]=O+U.height*i,P.uvs[X*8+0]=N.x0,P.uvs[X*8+1]=N.y0,P.uvs[X*8+2]=N.x1,P.uvs[X*8+3]=N.y1,P.uvs[X*8+4]=N.x2,P.uvs[X*8+5]=N.y2,P.uvs[X*8+6]=N.x3,P.uvs[X*8+7]=N.y3}this._textWidth=p*i,this._textHeight=(s.y+e.lineHeight)*i;for(const F in C){const B=C[F];if(this.anchor.x!==0||this.anchor.y!==0){let D=0;const P=this._textWidth*this.anchor.x,U=this._textHeight*this.anchor.y;for(let N=0;N<B.total;N++)B.vertices[D++]-=P,B.vertices[D++]-=U,B.vertices[D++]-=P,B.vertices[D++]-=U,B.vertices[D++]-=P,B.vertices[D++]-=U,B.vertices[D++]-=P,B.vertices[D++]-=U}this._maxLineHeight=v*i;const L=B.mesh.geometry.getBuffer("aVertexPosition"),Y=B.mesh.geometry.getBuffer("aTextureCoord"),O=B.mesh.geometry.getIndex();L.data=B.vertices,Y.data=B.uvs,O.data=B.indices,L.update(),Y.update(),O.update()}for(let F=0;F<r.length;F++)q0.push(r[F]);this._font=e,this.dirty=!1}updateTransform(){this.validate(),this.containerUpdateTransform()}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0);const{distanceFieldRange:t,distanceFieldType:i,size:s}=ur.available[this._fontName];if(i!=="none"){const{a:r,b:a,c:o,d:h}=this.worldTransform,l=Math.sqrt(r*r+a*a),c=Math.sqrt(o*o+h*h),u=(Math.abs(l)+Math.abs(c))/2,d=this.fontSize/s,f=e._view.resolution;for(const p of this._activePagesMeshData)p.mesh.shader.uniforms.uFWidth=u*t*d*f}super._render(e)}getLocalBounds(){return this.validate(),super.getLocalBounds()}validate(){const e=ur.available[this._fontName];if(!e)throw new Error(`Missing BitmapFont "${this._fontName}"`);this._font!==e&&(this.dirty=!0),this.dirty&&this.updateText()}get tint(){return this._tintColor.value}set tint(e){if(this.tint!==e){this._tintColor.setValue(e);for(let t=0;t<this._activePagesMeshData.length;t++)this._activePagesMeshData[t].mesh.tint=e}}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.dirty=!0)}get fontName(){return this._fontName}set fontName(e){if(!ur.available[e])throw new Error(`Missing BitmapFont "${e}"`);this._fontName!==e&&(this._fontName=e,this.dirty=!0)}get fontSize(){return this._fontSize??ur.available[this._fontName].size}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.dirty=!0)}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e)}get text(){return this._text}set text(e){e=String(e??""),this._text!==e&&(this._text=e,this.dirty=!0)}get maxWidth(){return this._maxWidth}set maxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.dirty=!0)}get maxLineHeight(){return this.validate(),this._maxLineHeight}get textWidth(){return this.validate(),this._textWidth}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.dirty=!0)}get roundPixels(){return this._roundPixels}set roundPixels(e){e!==this._roundPixels&&(this._roundPixels=e,this.dirty=!0)}get textHeight(){return this.validate(),this._textHeight}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._res
Line truncated
|
||||
`;const z0=[],q0=[],K0=[],M2=class w1 extends Oi{constructor(e,t={}){super();const{align:i,tint:s,maxWidth:r,letterSpacing:a,fontName:o,fontSize:h}=Object.assign({},w1.styleDefaults,t);if(!ur.available[o])throw new Error(`Missing BitmapFont "${o}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=i,this._tintColor=new Lt(s),this._font=void 0,this._fontName=o,this._fontSize=h,this.text=e,this._maxWidth=r,this._maxLineHeight=0,this._letterSpacing=a,this._anchor=new Yn(()=>{this.dirty=!0},this,0,0),this._roundPixels=$e.ROUND_PIXELS,this.dirty=!0,this._resolution=$e.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var R;const e=ur.available[this._fontName],t=this.fontSize,i=t/e.size,s=new kt,r=[],a=[],o=[],h=this._text.replace(/(?:\r\n|\r)/g,`
|
||||
`)||" ",l=b1(h),c=this._maxWidth*e.size/t,u=e.distanceFieldType==="none"?z0:q0;let d=null,f=0,p=0,m=0,g=-1,y=0,w=0,v=0,_=0;for(let F=0;F<l.length;F++){const B=l[F],L=Cc(B);if(/(?:\s)/.test(B)&&(g=F,y=f,_++),B==="\r"||B===`
|
||||
`){a.push(f),o.push(-1),p=Math.max(p,f),++m,++w,s.x=0,s.y+=e.lineHeight,d=null,_=0;continue}const Y=e.chars[L];if(!Y)continue;d&&Y.kerning[d]&&(s.x+=Y.kerning[d]);const O=K0.pop()||{texture:rt.EMPTY,line:0,charCode:0,prevSpaces:0,position:new kt};O.texture=Y.texture,O.line=m,O.charCode=L,O.position.x=Math.round(s.x+Y.xOffset+this._letterSpacing/2),O.position.y=Math.round(s.y+Y.yOffset),O.prevSpaces=_,r.push(O),f=O.position.x+Math.max(Y.xAdvance-Y.xOffset,Y.texture.orig.width),s.x+=Y.xAdvance+this._letterSpacing,v=Math.max(v,Y.yOffset+Y.texture.height),d=L,g!==-1&&c>0&&s.x>c&&(++w,Ja(r,1+g-w,1+F-g),F=g,g=-1,a.push(y),o.push(r.length>0?r[r.length-1].prevSpaces:0),p=Math.max(p,y),m++,s.x=0,s.y+=e.lineHeight,d=null,_=0)}const x=l[l.length-1];x!=="\r"&&x!==`
|
||||
`&&(/(?:\s)/.test(x)&&(f=y),a.push(f),p=Math.max(p,f),o.push(-1));const M=[];for(let F=0;F<=m;F++){let B=0;this._align==="right"?B=p-a[F]:this._align==="center"?B=(p-a[F])/2:this._align==="justify"&&(B=o[F]<0?0:(p-a[F])/o[F]),M.push(B)}const T=r.length,C={},I=[],k=this._activePagesMeshData;u.push(...k);for(let F=0;F<T;F++){const B=r[F].texture,L=B.baseTexture.uid;if(!C[L]){let Y=u.pop();if(!Y){const D=new Wm;let P,U;e.distanceFieldType==="none"?(P=new nh(rt.EMPTY),U=st.NORMAL):(P=new nh(rt.EMPTY,{program:fn.from(T2,_2),uniforms:{uFWidth:0}}),U=st.NORMAL_NPM);const N=new vl(D,P);N.blendMode=U,Y={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:N,vertices:null,uvs:null,indices:null}}Y.index=0,Y.indexCount=0,Y.vertexCount=0,Y.uvsCount=0,Y.total=0;const{_textureCache:O}=this;O[L]=O[L]||new rt(B.baseTexture),Y.mesh.texture=O[L],Y.mesh.tint=this._tintColor.value,I.push(Y),C[L]=Y}C[L].total++}for(let F=0;F<k.length;F++)I.includes(k[F])||this.removeChild(k[F].mesh);for(let F=0;F<I.length;F++)I[F].mesh.parent!==this&&this.addChild(I[F].mesh);this._activePagesMeshData=I;for(const F in C){const B=C[F],L=B.total;if(!(((R=B.indices)==null?void 0:R.length)>6*L)||B.vertices.length<vl.BATCHABLE_SIZE*2)B.vertices=new Float32Array(8*L),B.uvs=new Float32Array(8*L),B.indices=new Uint16Array(6*L);else{const Y=B.total,O=B.vertices;for(let D=Y*4*2;D<O.length;D++)O[D]=0}B.mesh.size=6*L}for(let F=0;F<T;F++){const B=r[F];let L=B.position.x+M[B.line]*(this._align==="justify"?B.prevSpaces:1);this._roundPixels&&(L=Math.round(L));const Y=L*i,O=B.position.y*i,D=B.texture,P=C[D.baseTexture.uid],U=D.frame,N=D._uvs,X=P.index++;P.indices[X*6+0]=0+X*4,P.indices[X*6+1]=1+X*4,P.indices[X*6+2]=2+X*4,P.indices[X*6+3]=0+X*4,P.indices[X*6+4]=2+X*4,P.indices[X*6+5]=3+X*4,P.vertices[X*8+0]=Y,P.vertices[X*8+1]=O,P.vertices[X*8+2]=Y+U.width*i,P.vertices[X*8+3]=O,P.vertices[X*8+4]=Y+U.width*i,P.vertices[X*8+5]=O+U.height*i,P.vertices[X*8+6]=Y,P.vertices[X*8+7]=O+U.height*i,P.uvs[X*8+0]=N.x0,P.uvs[X*8+1]=N.y0,P.uvs[X*8+2]=N.x1,P.uvs[X*8+3]=N.y1,P.uvs[X*8+4]=N.x2,P.uvs[X*8+5]=N.y2,P.uvs[X*8+6]=N.x3,P.uvs[X*8+7]=N.y3}this._textWidth=p*i,this._textHeight=(s.y+e.lineHeight)*i;for(const F in C){const B=C[F];if(this.anchor.x!==0||this.anchor.y!==0){let D=0;const P=this._textWidth*this.anchor.x,U=this._textHeight*this.anchor.y;for(let N=0;N<B.total;N++)B.vertices[D++]-=P,B.vertices[D++]-=U,B.vertices[D++]-=P,B.vertices[D++]-=U,B.vertices[D++]-=P,B.vertices[D++]-=U,B.vertices[D++]-=P,B.vertices[D++]-=U}this._maxLineHeight=v*i;const L=B.mesh.geometry.getBuffer("aVertexPosition"),Y=B.mesh.geometry.getBuffer("aTextureCoord"),O=B.mesh.geometry.getIndex();L.data=B.vertices,Y.data=B.uvs,O.data=B.indices,L.update(),Y.update(),O.update()}for(let F=0;F<r.length;F++)K0.push(r[F]);this._font=e,this.dirty=!1}updateTransform(){this.validate(),this.containerUpdateTransform()}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0);const{distanceFieldRange:t,distanceFieldType:i,size:s}=ur.available[this._fontName];if(i!=="none"){const{a:r,b:a,c:o,d:h}=this.worldTransform,l=Math.sqrt(r*r+a*a),c=Math.sqrt(o*o+h*h),u=(Math.abs(l)+Math.abs(c))/2,d=this.fontSize/s,f=e._view.resolution;for(const p of this._activePagesMeshData)p.mesh.shader.uniforms.uFWidth=u*t*d*f}super._render(e)}getLocalBounds(){return this.validate(),super.getLocalBounds()}validate(){const e=ur.available[this._fontName];if(!e)throw new Error(`Missing BitmapFont "${this._fontName}"`);this._font!==e&&(this.dirty=!0),this.dirty&&this.updateText()}get tint(){return this._tintColor.value}set tint(e){if(this.tint!==e){this._tintColor.setValue(e);for(let t=0;t<this._activePagesMeshData.length;t++)this._activePagesMeshData[t].mesh.tint=e}}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.dirty=!0)}get fontName(){return this._fontName}set fontName(e){if(!ur.available[e])throw new Error(`Missing BitmapFont "${e}"`);this._fontName!==e&&(this._fontName=e,this.dirty=!0)}get fontSize(){return this._fontSize??ur.available[this._fontName].size}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.dirty=!0)}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e)}get text(){return this._text}set text(e){e=String(e??""),this._text!==e&&(this._text=e,this.dirty=!0)}get maxWidth(){return this._maxWidth}set maxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.dirty=!0)}get maxLineHeight(){return this.validate(),this._maxLineHeight}get textWidth(){return this.validate(),this._textWidth}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.dirty=!0)}get roundPixels(){return this._roundPixels}set roundPixels(e){e!==this._roundPixels&&(this._roundPixels=e,this.dirty=!0)}get textHeight(){return this.validate(),this._textHeight}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._res
Line truncated
|
||||
@font-face {
|
||||
font-family: "${t.family}";
|
||||
src: url('${t.dataSrc}');
|
||||
font-weight: ${t.weight};
|
||||
font-style: ${t.style};
|
||||
font-display: ${t.display};
|
||||
}`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(e){this._stylesheet!==e&&(this._stylesheet=e,this.styleID++)}normalizeColor(e){return Array.isArray(e)&&(e=vM(e)),typeof e=="number"?gM(e):e}dropShadowToCSS(){let e=this.normalizeColor(this.dropShadowColor);const t=this.dropShadowAlpha,i=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),s=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);e.startsWith("#")&&t<1&&(e+=(t*255|0).toString(16).padStart(2,"0"));const r=`${i}px ${s}px`;return this.dropShadowBlur>0?`text-shadow: ${r} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${r} ${e}`}reset(){Object.assign(this,Ya.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(t=>setTimeout(t,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=$e.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};Gf.availableFonts={},Gf.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};let Nd=Gf;const rc=class Va extends Fr{constructor(e="",t={}){super(rt.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this.localStyleID=-1,this.dirty=!1,this._updateID=0,this.ownsStyle=!1;const i=new Image,s=rt.from(i,{scaleMode:$e.SCALE_MODE,resourceOptions:{autoLoad:!1}});s.orig=new vt,s.trim=new vt,this.texture=s;const r="http://www.w3.org/2000/svg",a="http://www.w3.org/1999/xhtml",o=document.createElementNS(r,"svg"),h=document.createElementNS(r,"foreignObject"),l=document.createElementNS(a,"div"),c=document.createElementNS(a,"style");h.setAttribute("width","10000"),h.setAttribute("height","10000"),h.style.overflow="hidden",o.appendChild(h),this.maxWidth=Va.defaultMaxWidth,this.maxHeight=Va.defaultMaxHeight,this._domElement=l,this._styleElement=c,this._svgRoot=o,this._foreignObject=h,this._foreignObject.appendChild(c),this._foreignObject.appendChild(l),this._image=i,this._loadImage=new Image,this._autoResolution=Va.defaultAutoResolution,this._resolution=Va.defaultResolution??$e.RESOLUTION,this.text=e,this.style=t}measureText(e){var c,u;const{text:t,style:i,resolution:s}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:i.toCSS(s)}),this._styleElement.textContent=i.toGlobalCSS(),document.body.appendChild(this._svgRoot);const r=this._domElement.getBoundingClientRect();this._svgRoot.remove();const{width:a,height:o}=r;(a>this.maxWidth||o>this.maxHeight)&&console.warn("[HTMLText] Large expanse of text, increase HTMLText.maxWidth or HTMLText.maxHeight property.");const h=Math.min(this.maxWidth,Math.ceil(a)),l=Math.min(this.maxHeight,Math.ceil(o));return this._svgRoot.setAttribute("width",h.toString()),this._svgRoot.setAttribute("height",l.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),i!==this._style&&(Object.assign(this._domElement,{style:(c=this._style)==null?void 0:c.toCSS(s)}),this._styleElement.textContent=(u=this._style)==null?void 0:u.toGlobalCSS()),{width:h+i.padding*2,height:l+i.padding*2}}async updateText(e=!0){const{style:t,_image:i,_loadImage:s}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:r,height:a}=this.measureText();i.width=s.width=Math.ceil(Math.max(1,r)),i.height=s.height=Math.ceil(Math.max(1,a)),this._updateID++;const o=this._updateID;await new Promise(h=>{s.onload=async()=>{if(o<this._updateID){h();return}await t.onBeforeDraw(),i.src=s.src,s.onload=null,s.src="",this.updateTexture(),h()};const l=new XMLSerializer().serializeToString(this._svgRoot);s.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(l)}`})}get source(){ret
Line truncated
|
||||
}`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(e){this._stylesheet!==e&&(this._stylesheet=e,this.styleID++)}normalizeColor(e){return Array.isArray(e)&&(e=vM(e)),typeof e=="number"?gM(e):e}dropShadowToCSS(){let e=this.normalizeColor(this.dropShadowColor);const t=this.dropShadowAlpha,i=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),s=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);e.startsWith("#")&&t<1&&(e+=(t*255|0).toString(16).padStart(2,"0"));const r=`${i}px ${s}px`;return this.dropShadowBlur>0?`text-shadow: ${r} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${r} ${e}`}reset(){Object.assign(this,Ya.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(t=>setTimeout(t,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=$e.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};Hf.availableFonts={},Hf.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};let Nd=Hf;const rc=class Va extends Fr{constructor(e="",t={}){super(rt.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this.localStyleID=-1,this.dirty=!1,this._updateID=0,this.ownsStyle=!1;const i=new Image,s=rt.from(i,{scaleMode:$e.SCALE_MODE,resourceOptions:{autoLoad:!1}});s.orig=new vt,s.trim=new vt,this.texture=s;const r="http://www.w3.org/2000/svg",a="http://www.w3.org/1999/xhtml",o=document.createElementNS(r,"svg"),h=document.createElementNS(r,"foreignObject"),l=document.createElementNS(a,"div"),c=document.createElementNS(a,"style");h.setAttribute("width","10000"),h.setAttribute("height","10000"),h.style.overflow="hidden",o.appendChild(h),this.maxWidth=Va.defaultMaxWidth,this.maxHeight=Va.defaultMaxHeight,this._domElement=l,this._styleElement=c,this._svgRoot=o,this._foreignObject=h,this._foreignObject.appendChild(c),this._foreignObject.appendChild(l),this._image=i,this._loadImage=new Image,this._autoResolution=Va.defaultAutoResolution,this._resolution=Va.defaultResolution??$e.RESOLUTION,this.text=e,this.style=t}measureText(e){var c,u;const{text:t,style:i,resolution:s}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:i.toCSS(s)}),this._styleElement.textContent=i.toGlobalCSS(),document.body.appendChild(this._svgRoot);const r=this._domElement.getBoundingClientRect();this._svgRoot.remove();const{width:a,height:o}=r;(a>this.maxWidth||o>this.maxHeight)&&console.warn("[HTMLText] Large expanse of text, increase HTMLText.maxWidth or HTMLText.maxHeight property.");const h=Math.min(this.maxWidth,Math.ceil(a)),l=Math.min(this.maxHeight,Math.ceil(o));return this._svgRoot.setAttribute("width",h.toString()),this._svgRoot.setAttribute("height",l.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),i!==this._style&&(Object.assign(this._domElement,{style:(c=this._style)==null?void 0:c.toCSS(s)}),this._styleElement.textContent=(u=this._style)==null?void 0:u.toGlobalCSS()),{width:h+i.padding*2,height:l+i.padding*2}}async updateText(e=!0){const{style:t,_image:i,_loadImage:s}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:r,height:a}=this.measureText();i.width=s.width=Math.ceil(Math.max(1,r)),i.height=s.height=Math.ceil(Math.max(1,a)),this._updateID++;const o=this._updateID;await new Promise(h=>{s.onload=async()=>{if(o<this._updateID){h();return}await t.onBeforeDraw(),i.src=s.src,s.onload=null,s.src="",this.updateTexture(),h()};const l=new XMLSerializer().serializeToString(this._svgRoot);s.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(l)}`})}get source(){ret
Line truncated
|
||||
attribute vec2 aVertexPosition;
|
||||
attribute vec2 aTextureCoord;
|
||||
|
||||
@@ -1195,7 +1195,7 @@ void main(void)
|
||||
gl_FragColor.a = texColor.a * uColor.a;
|
||||
gl_FragColor.rgb = ((texColor.a - 1.0) * uDarkColor.a + 1.0 - texColor.rgb) * uDarkColor.rgb + texColor.rgb * uColor.rgb;
|
||||
}
|
||||
`;class ZI extends Xs{constructor(t){const i={uSampler:t??rt.EMPTY,alpha:1,uTextureMatrix:Zt.IDENTITY,uColor:new Float32Array([1,1,1,1]),uDarkColor:new Float32Array([0,0,0,0])},s={tint:16777215,darkTint:0,alpha:1,pluginName:"darkTintBatch"};super(fn.from(qI,KI),i);b(this,"uvMatrix");b(this,"batchable");b(this,"pluginName");b(this,"_tintRGB");b(this,"_darkTintRGB");b(this,"_colorDirty");b(this,"_alpha");b(this,"_tintColor");b(this,"_darkTintColor");this._colorDirty=!1,this.uvMatrix=new Xm(i.uSampler),this.batchable=!0,this.pluginName=s.pluginName,this._tintColor=new Dt(s.tint),this._darkTintColor=new Dt(s.darkTint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._alpha=s.alpha,this._colorDirty=!0}get texture(){return this.uniforms.uSampler}set texture(t){this.uniforms.uSampler!==t&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!t.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=t,this.uvMatrix.texture=t)}set alpha(t){t!==this._alpha&&(this._alpha=t,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(t){t!==this.tint&&(this._tintColor.setValue(t),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}set darkTint(t){t!==this.darkTint&&(this._darkTintColor.setValue(t),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._colorDirty=!0)}get darkTint(){return this._darkTintColor.value}get tintValue(){return this._tintColor.toNumber()}get darkTintValue(){return this._darkTintColor.toNumber()}update(){this._colorDirty&&(this._colorDirty=!1,Dt.shared.setValue(this._tintColor).premultiply(this._alpha,!0).toArray(this.uniforms.uColor),Dt.shared.setValue(this._darkTintColor).premultiply(this._alpha,!0).premultiply(1,!1).toArray(this.uniforms.uDarkColor)),this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class JI extends vl{constructor(t){super(new zI,new ZI(t),void 0,void 0);b(this,"_darkTintRGB",0)}get darkTint(){return"darkTint"in this.shader?this.shader.darkTint:null}set darkTint(t){this.shader.darkTint=t}get darkTintValue(){return this.shader.darkTintValue}_renderToBatch(t){const i=this.geometry,s=this.shader;s.uvMatrix&&(s.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=i.indexBuffer.data,this._tintRGB=s._tintRGB,this._darkTintRGB=s._darkTintRGB,this._texture=s.texture;const r=this.material.pluginName;t.batch.setObjectRenderer(t.plugins[r]),t.plugins[r].render(this)}}const yi=class yi extends JI{constructor(){super();b(this,"name","")}updateFromSpineData(t,i,s,r,a,o,h,l){var y,w;this.texture=t.texture;const c=a/(l?12:8)*2,u=this.geometry.getBuffer("aTextureCoord");((y=u.data)==null?void 0:y.length)!==c&&(u.data=new Float32Array(c));const d=this.geometry.getBuffer("aVertexPosition");((w=d.data)==null?void 0:w.length)!==c&&(d.data=new Float32Array(c));let f=0,p=u.data,m=d.data;for(let v=0;v<a;v+=l?12:8){let _=v;m[f]=r[_++],m[f+1]=r[_++],_+=4,p[f]=r[_++],p[f+1]=r[_++],f+=2}l?(yi.auxColor[0]=r[8],yi.auxColor[1]=r[9],yi.auxColor[2]=r[10],yi.auxColor[3]=r[11],this.darkTint=yi.auxColor,yi.auxColor[0]=r[2],yi.auxColor[1]=r[3],yi.auxColor[2]=r[4],yi.auxColor[3]=r[5],this.tint=yi.auxColor):(yi.auxColor[0]=r[2],yi.auxColor[1]=r[3],yi.auxColor[2]=r[4],yi.auxColor[3]=r[5],this.tint=yi.auxColor),this.blendMode=pa.toPixiBlending(i),this.alpha=yi.auxColor[3];const g=this.geometry.indexBuffer;if(g.data.length!==o.length)g.data=new Uint32Array(o);else{const v=g.data;for(let _=0;_<h;_++)v[_]=o[_]}this.name=s,u.update(),d.update(),g.update()}};b(yi,"auxColor",[0,0,0,0]);let tl=yi;const Ft=class Ft extends Oi{constructor(t,i){if(t instanceof hh)t={...i,skeletonData:t};else if(i)throw new Error("You cannot use options and oldOptions together.");super();b(this,"skeleton");b(this,"state");b(this,"darkTint",!1);b(this,"hasNeverUpdated",!0);b(this,"_debug");b(this,"slotMeshFactory",()=>new Zf);b(this,"beforeUpdateWorldTransforms",()=>{});b(this,"afterUpdateWorldTransforms",()=>{});b(this,"_autoUpdate",!1);b(this,"_ticker",Ki.shared);b(this,"meshesCache",new Map);b(this,"lightColor",new gt);b(this,"darkColor",new gt);b(this,"_boundsProvider");b(this,"_boundsPoint",new kt);b(this,"_boundsSpineID",-1);b(this,"_boundsSpineDirty",!0);b(this,"slotsObject",new Map);b(this,"verticesCache",Ue.newFloatArray(1024));b(this,"clippingSlotToPixiMasks",{});b(this,"currentClippingSlot");const s=t instanceof hh?t:t.skeletonData;this.skeleton=new Jm(s);const r=new nI(s);this.state=new Q2(r),(t==null?void 0:t.darkTint)!==void 0||(i==null?void 0:i.slotMeshFactory)===void 0?(this.darkTint=(t==null?void 0:t.darkTint)===void 0?this.skeleton.slots.some(a=>!!a.data.darkColor):t==null?void 0:t.darkTint,this.darkTint&&(this.slotMeshFactory=()=>new tl)):this.initializeMeshFactory(i==null?void 0:i.slotMeshFactory),t!=null&&t.ticker&&(this._ticker=t.ticker),this.autoUpdate=(t==null?void 0:t.autoUpdate)??!0,this.boundsProvider=t.boundsProvide
Line truncated
|
||||
`;class ZI extends Xs{constructor(t){const i={uSampler:t??rt.EMPTY,alpha:1,uTextureMatrix:Zt.IDENTITY,uColor:new Float32Array([1,1,1,1]),uDarkColor:new Float32Array([0,0,0,0])},s={tint:16777215,darkTint:0,alpha:1,pluginName:"darkTintBatch"};super(fn.from(qI,KI),i);b(this,"uvMatrix");b(this,"batchable");b(this,"pluginName");b(this,"_tintRGB");b(this,"_darkTintRGB");b(this,"_colorDirty");b(this,"_alpha");b(this,"_tintColor");b(this,"_darkTintColor");this._colorDirty=!1,this.uvMatrix=new Ym(i.uSampler),this.batchable=!0,this.pluginName=s.pluginName,this._tintColor=new Lt(s.tint),this._darkTintColor=new Lt(s.darkTint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._alpha=s.alpha,this._colorDirty=!0}get texture(){return this.uniforms.uSampler}set texture(t){this.uniforms.uSampler!==t&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!t.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=t,this.uvMatrix.texture=t)}set alpha(t){t!==this._alpha&&(this._alpha=t,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(t){t!==this.tint&&(this._tintColor.setValue(t),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}set darkTint(t){t!==this.darkTint&&(this._darkTintColor.setValue(t),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._colorDirty=!0)}get darkTint(){return this._darkTintColor.value}get tintValue(){return this._tintColor.toNumber()}get darkTintValue(){return this._darkTintColor.toNumber()}update(){this._colorDirty&&(this._colorDirty=!1,Lt.shared.setValue(this._tintColor).premultiply(this._alpha,!0).toArray(this.uniforms.uColor),Lt.shared.setValue(this._darkTintColor).premultiply(this._alpha,!0).premultiply(1,!1).toArray(this.uniforms.uDarkColor)),this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class JI extends vl{constructor(t){super(new zI,new ZI(t),void 0,void 0);b(this,"_darkTintRGB",0)}get darkTint(){return"darkTint"in this.shader?this.shader.darkTint:null}set darkTint(t){this.shader.darkTint=t}get darkTintValue(){return this.shader.darkTintValue}_renderToBatch(t){const i=this.geometry,s=this.shader;s.uvMatrix&&(s.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=i.indexBuffer.data,this._tintRGB=s._tintRGB,this._darkTintRGB=s._darkTintRGB,this._texture=s.texture;const r=this.material.pluginName;t.batch.setObjectRenderer(t.plugins[r]),t.plugins[r].render(this)}}const yi=class yi extends JI{constructor(){super();b(this,"name","")}updateFromSpineData(t,i,s,r,a,o,h,l){var y,w;this.texture=t.texture;const c=a/(l?12:8)*2,u=this.geometry.getBuffer("aTextureCoord");((y=u.data)==null?void 0:y.length)!==c&&(u.data=new Float32Array(c));const d=this.geometry.getBuffer("aVertexPosition");((w=d.data)==null?void 0:w.length)!==c&&(d.data=new Float32Array(c));let f=0,p=u.data,m=d.data;for(let v=0;v<a;v+=l?12:8){let _=v;m[f]=r[_++],m[f+1]=r[_++],_+=4,p[f]=r[_++],p[f+1]=r[_++],f+=2}l?(yi.auxColor[0]=r[8],yi.auxColor[1]=r[9],yi.auxColor[2]=r[10],yi.auxColor[3]=r[11],this.darkTint=yi.auxColor,yi.auxColor[0]=r[2],yi.auxColor[1]=r[3],yi.auxColor[2]=r[4],yi.auxColor[3]=r[5],this.tint=yi.auxColor):(yi.auxColor[0]=r[2],yi.auxColor[1]=r[3],yi.auxColor[2]=r[4],yi.auxColor[3]=r[5],this.tint=yi.auxColor),this.blendMode=ga.toPixiBlending(i),this.alpha=yi.auxColor[3];const g=this.geometry.indexBuffer;if(g.data.length!==o.length)g.data=new Uint32Array(o);else{const v=g.data;for(let _=0;_<h;_++)v[_]=o[_]}this.name=s,u.update(),d.update(),g.update()}};b(yi,"auxColor",[0,0,0,0]);let tl=yi;const Ft=class Ft extends Oi{constructor(t,i){if(t instanceof hh)t={...i,skeletonData:t};else if(i)throw new Error("You cannot use options and oldOptions together.");super();b(this,"skeleton");b(this,"state");b(this,"darkTint",!1);b(this,"hasNeverUpdated",!0);b(this,"_debug");b(this,"slotMeshFactory",()=>new Jf);b(this,"beforeUpdateWorldTransforms",()=>{});b(this,"afterUpdateWorldTransforms",()=>{});b(this,"_autoUpdate",!1);b(this,"_ticker",Ki.shared);b(this,"meshesCache",new Map);b(this,"lightColor",new gt);b(this,"darkColor",new gt);b(this,"_boundsProvider");b(this,"_boundsPoint",new kt);b(this,"_boundsSpineID",-1);b(this,"_boundsSpineDirty",!0);b(this,"slotsObject",new Map);b(this,"verticesCache",Ue.newFloatArray(1024));b(this,"clippingSlotToPixiMasks",{});b(this,"currentClippingSlot");const s=t instanceof hh?t:t.skeletonData;this.skeleton=new Qm(s);const r=new nI(s);this.state=new Q2(r),(t==null?void 0:t.darkTint)!==void 0||(i==null?void 0:i.slotMeshFactory)===void 0?(this.darkTint=(t==null?void 0:t.darkTint)===void 0?this.skeleton.slots.some(a=>!!a.data.darkColor):t==null?void 0:t.darkTint,this.darkTint&&(this.slotMeshFactory=()=>new tl)):this.initializeMeshFactory(i==null?void 0:i.slotMeshFactory),t!=null&&t.ticker&&(this._ticker=t.ticker),this.autoUpdate=(t==null?void 0:t.autoUpdate)??!0,this.boundsProvider=t.boundsProvide
Line truncated
|
||||
precision highp float;
|
||||
attribute vec2 aVertexPosition;
|
||||
attribute vec2 aTextureCoord;
|
||||
@@ -1236,4 +1236,4 @@ void main(void){
|
||||
gl_FragColor.a = color.a * vColor.a;
|
||||
gl_FragColor.rgb = ((color.a - 1.0) * vDarkColor.a + 1.0 - color.rgb) * vDarkColor.rgb + color.rgb * vColor.rgb;
|
||||
}
|
||||
`;class Mb extends fr{constructor(e){super(e),this.shaderGenerator=new vx(nR,rR),this.geometryClass=sR,this.vertexSize=7}packInterleavedGeometry(e,t,i,s,r){const{uint32View:a,float32View:o}=t,h=s/this.vertexSize,l=e.uvs,c=e.indices,u=e.vertexData,d=e._texture.baseTexture._batchLocation,f=Math.min(e.worldAlpha,1),p=Dt.shared.setValue(e._tintRGB).toPremultiplied(f,!0),m=Dt.shared.setValue(e._darkTintRGB).premultiply(f,!0).toPremultiplied(1,!1);for(let g=0;g<u.length;g+=2)o[s++]=u[g],o[s++]=u[g+1],o[s++]=l[g],o[s++]=l[g+1],a[s++]=p,a[s++]=m,o[s++]=d;for(let g=0;g<c.length;g++)i[r++]=h+c[g]}}b(Mb,"extension",{name:"darkTintBatch",type:Xe.RendererPlugin});ze.add(Mb);function aR(n){return n.replace(/\\/g,"/").split("/").pop()||n}function Qm(n,e,t){for(const i of n.pages){const s=e.get(aR(i.name).toLowerCase());if(!s)throw new Error(`Atlas 引用的纹理未选择:${i.name}`);s.baseTexture.alphaMode=i.pma?Ai.PMA:Ai.UNPACK,i.setTexture(t.from(s.baseTexture))}}function Eb(n,e){const t=new db(n);return Qm(t,e,pa),new zf(t)}function oR(n,e,t){return{skeletonData:new dh(Eb(e,t)).readSkeletonData(n),SpineClass:fh}}function lR(n,e,t){return{skeletonData:new Kf(Eb(e,t)).readSkeletonData(n),SpineClass:fh}}const cR="modulepreload",hR=function(n){return"/"+n},lv={},cv=function(e,t,i){let s=Promise.resolve();if(t&&t.length>0){let a=function(l){return Promise.all(l.map(c=>Promise.resolve(c).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),h=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=a(t.map(l=>{if(l=hR(l),l in lv)return;lv[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":cR,c||(d.as="script"),d.crossOrigin="",d.href=l,h&&d.setAttribute("nonce",h),document.head.appendChild(d),c)return new Promise((f,p)=>{d.addEventListener("load",f),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function r(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return s.then(a=>{for(const o of a||[])o.status==="rejected"&&r(o.reason);return e().catch(r)})};async function Ab(){const[n,e]=await Promise.all([cv(()=>import("./index-ChCXw-xh.js"),[]),cv(()=>import("./index-ocq-7Y4s.js"),__vite__mapDeps([0,1]))]);return{core:n,pixi:e}}async function uR(n,e,t){const{core:i,pixi:s}=await Ab(),r=new i.TextureAtlas(e);return Qm(r,t,s.SpineTexture),{skeletonData:new i.SkeletonJson(new i.AtlasAttachmentLoader(r)).readSkeletonData(n),SpineClass:s.Spine}}async function dR(n,e,t){const{core:i,pixi:s}=await Ab(),r=new i.TextureAtlas(e);return Qm(r,t,s.SpineTexture),{skeletonData:new i.SkeletonBinary(new i.AtlasAttachmentLoader(r)).readSkeletonData(n),SpineClass:s.Spine}}function wr(n,e,t){const i=Number(n[e]);return Number.isFinite(i)?i:t}function ss(n,e,t,i){n[e]==null&&(n[e]=wr(n,t,i))}function ep(n,e,t){if(typeof n.curve!="number")return;const i=wr(n,"time",0),r=wr(e,"time",0)-i,a=n.curve,o=wr(n,"c2",0),h=wr(n,"c3",1),l=wr(n,"c4",1);n.curve=t.flatMap(([c,u])=>[i+r*a,c+(u-c)*o,i+r*h,c+(u-c)*l]),delete n.c2,delete n.c3,delete n.c4}function Ar(n,e){if(Array.isArray(n))for(let t=0;t<n.length-1;t++){const i=n[t],s=n[t+1];ep(i,s,e.map(({key:r,fallback:a})=>[wr(i,r,a),wr(s,r,a)]))}}function fR(n){if(Array.isArray(n))for(let e=0;e<n.length-1;e++)ep(n[e],n[e+1],[[0,1]])}function Fa(n,e){const t=typeof n=="string"?n.replace(/^#/,""):"",i=t.length===6?`${t}ff`:t.padEnd(8,"f").slice(0,8),s=[0,2,4,6].map(r=>Number.parseInt(i.slice(r,r+2),16)/255);return e?s:s.slice(0,3)}function hv(n,e){if(Array.isArray(n))for(let t=0;t<n.length-1;t++){const i=n[t],s=n[t+1],r=e?[...Fa(i.light,!0),...Fa(i.dark,!1)]:Fa(i.color,!0),a=e?[...Fa(s.light,!0),...Fa(s.dark,!1)]:Fa(s.color,!0);ep(i,s,r.map((o,h)=>[o,a[h]]))}}function mR(n){for(const e of n.bones||[])e.inherit==null&&e.transform!=null&&(e.inherit=e.transform);for(const e of n.transform||[])ss(e,"mixRotate","rotateMix",1),ss(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX),ss(e,"mixScaleX","scaleMix",1),e.mixScaleY==null&&(e.mixScaleY=e.mixScaleX),ss(e,"mixShearY","shearMix",1);for(const e of n.path||[])ss(e,"mixRotate","rotateMix",1),ss(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX)}function pR(n){for(const e of n.skins||[])for(const t of Object.values(e.attachments||{}))for(const i of Object.values(t||{}))i.parent!=null&&i.timelines==null&&i.deform!=null&&(i.timelines=i.deform)}function gR(n){for(const e of Object.values(n.slots||{}))e.color&&!e.rgba&&(e.rgba=e.color,delete e.color),e.twoColor&&!e.rgba2&&(e.rgba2=e.twoColor,delete e.twoColor),hv(e.rgba,!1),hv(e.rgba2,!0)}function vR(n){for(const e of Object.values(n.bones||{})){for(const t of e.rotate||[])ss(t,"value","angle",0);Ar(e.rotate,[{key:"value",fallback:0}]),Ar(e.tra
Line truncated
|
||||
`;class Mb extends fr{constructor(e){super(e),this.shaderGenerator=new vx(nR,rR),this.geometryClass=sR,this.vertexSize=7}packInterleavedGeometry(e,t,i,s,r){const{uint32View:a,float32View:o}=t,h=s/this.vertexSize,l=e.uvs,c=e.indices,u=e.vertexData,d=e._texture.baseTexture._batchLocation,f=Math.min(e.worldAlpha,1),p=Lt.shared.setValue(e._tintRGB).toPremultiplied(f,!0),m=Lt.shared.setValue(e._darkTintRGB).premultiply(f,!0).toPremultiplied(1,!1);for(let g=0;g<u.length;g+=2)o[s++]=u[g],o[s++]=u[g+1],o[s++]=l[g],o[s++]=l[g+1],a[s++]=p,a[s++]=m,o[s++]=d;for(let g=0;g<c.length;g++)i[r++]=h+c[g]}}b(Mb,"extension",{name:"darkTintBatch",type:Xe.RendererPlugin});ze.add(Mb);function aR(n){return n.replace(/\\/g,"/").split("/").pop()||n}function ep(n,e,t){for(const i of n.pages){const s=e.get(aR(i.name).toLowerCase());if(!s)throw new Error(`Atlas 引用的纹理未选择:${i.name}`);s.baseTexture.alphaMode=i.pma?Ai.PMA:Ai.UNPACK,i.setTexture(t.from(s.baseTexture))}}function Eb(n,e){const t=new db(n);return ep(t,e,ga),new qf(t)}function oR(n,e,t){return{skeletonData:new dh(Eb(e,t)).readSkeletonData(n),SpineClass:fh}}function lR(n,e,t){return{skeletonData:new Zf(Eb(e,t)).readSkeletonData(n),SpineClass:fh}}const cR="modulepreload",hR=function(n){return"/"+n},lv={},cv=function(e,t,i){let s=Promise.resolve();if(t&&t.length>0){let a=function(l){return Promise.all(l.map(c=>Promise.resolve(c).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),h=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=a(t.map(l=>{if(l=hR(l),l in lv)return;lv[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":cR,c||(d.as="script"),d.crossOrigin="",d.href=l,h&&d.setAttribute("nonce",h),document.head.appendChild(d),c)return new Promise((f,p)=>{d.addEventListener("load",f),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function r(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return s.then(a=>{for(const o of a||[])o.status==="rejected"&&r(o.reason);return e().catch(r)})};async function Ab(){const[n,e]=await Promise.all([cv(()=>import("./index-CX6BjU37.js"),[]),cv(()=>import("./index-CTL5QUHS.js"),__vite__mapDeps([0,1]))]);return{core:n,pixi:e}}async function uR(n,e,t){const{core:i,pixi:s}=await Ab(),r=new i.TextureAtlas(e);return ep(r,t,s.SpineTexture),{skeletonData:new i.SkeletonJson(new i.AtlasAttachmentLoader(r)).readSkeletonData(n),SpineClass:s.Spine}}async function dR(n,e,t){const{core:i,pixi:s}=await Ab(),r=new i.TextureAtlas(e);return ep(r,t,s.SpineTexture),{skeletonData:new i.SkeletonBinary(new i.AtlasAttachmentLoader(r)).readSkeletonData(n),SpineClass:s.Spine}}function wr(n,e,t){const i=Number(n[e]);return Number.isFinite(i)?i:t}function ss(n,e,t,i){n[e]==null&&(n[e]=wr(n,t,i))}function tp(n,e,t){if(typeof n.curve!="number")return;const i=wr(n,"time",0),r=wr(e,"time",0)-i,a=n.curve,o=wr(n,"c2",0),h=wr(n,"c3",1),l=wr(n,"c4",1);n.curve=t.flatMap(([c,u])=>[i+r*a,c+(u-c)*o,i+r*h,c+(u-c)*l]),delete n.c2,delete n.c3,delete n.c4}function Ar(n,e){if(Array.isArray(n))for(let t=0;t<n.length-1;t++){const i=n[t],s=n[t+1];tp(i,s,e.map(({key:r,fallback:a})=>[wr(i,r,a),wr(s,r,a)]))}}function fR(n){if(Array.isArray(n))for(let e=0;e<n.length-1;e++)tp(n[e],n[e+1],[[0,1]])}function Fa(n,e){const t=typeof n=="string"?n.replace(/^#/,""):"",i=t.length===6?`${t}ff`:t.padEnd(8,"f").slice(0,8),s=[0,2,4,6].map(r=>Number.parseInt(i.slice(r,r+2),16)/255);return e?s:s.slice(0,3)}function hv(n,e){if(Array.isArray(n))for(let t=0;t<n.length-1;t++){const i=n[t],s=n[t+1],r=e?[...Fa(i.light,!0),...Fa(i.dark,!1)]:Fa(i.color,!0),a=e?[...Fa(s.light,!0),...Fa(s.dark,!1)]:Fa(s.color,!0);tp(i,s,r.map((o,h)=>[o,a[h]]))}}function mR(n){for(const e of n.bones||[])e.inherit==null&&e.transform!=null&&(e.inherit=e.transform);for(const e of n.transform||[])ss(e,"mixRotate","rotateMix",1),ss(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX),ss(e,"mixScaleX","scaleMix",1),e.mixScaleY==null&&(e.mixScaleY=e.mixScaleX),ss(e,"mixShearY","shearMix",1);for(const e of n.path||[])ss(e,"mixRotate","rotateMix",1),ss(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX)}function pR(n){for(const e of n.skins||[])for(const t of Object.values(e.attachments||{}))for(const i of Object.values(t||{}))i.parent!=null&&i.timelines==null&&i.deform!=null&&(i.timelines=i.deform)}function gR(n){for(const e of Object.values(n.slots||{}))e.color&&!e.rgba&&(e.rgba=e.color,delete e.color),e.twoColor&&!e.rgba2&&(e.rgba2=e.twoColor,delete e.twoColor),hv(e.rgba,!1),hv(e.rgba2,!0)}function vR(n){for(const e of Object.values(n.bones||{})){for(const t of e.rotate||[])ss(t,"value","angle",0);Ar(e.rotate,[{key:"value",fallback:0}]),Ar(e.tra
Line truncated
|
||||
@@ -1,4 +1,4 @@
|
||||
var Ae=Object.defineProperty;var Be=(m,o,e)=>o in m?Ae(m,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):m[o]=e;var a=(m,o,e)=>Be(m,typeof o!="symbol"?o+"":o,e);import{T as Fe,a as he,b as F,S as ue,M as pe,c as oe,W as ne,B as H,d as z,L as Te,E as O,e as ce,p as q,f as Ee,g as fe,A as Q,h as me,i as De,j as V,s as re,G as we,k as $,l as Y,m as Le,P as Ie,n as Re,o as Ne,C as X,q as be,r as _e,t as Ue,u as Ye,v as Xe,w as ee,x as j,y as ke,z as Ve,D as J,F as ge,V as Ge,H as ae,I as We,J as $e,U as xe,K as E,R as ve,N as ye,O as Pe,Q as Oe,X as He,Y as ze,Z as qe,_ as Ke}from"./index-F1tWOWFT.js";import{$ as bt,a0 as kt,a1 as vt,a2 as yt,a3 as Pt,a4 as St,a5 as Mt,a6 as At,a7 as Bt,a8 as Ft,a9 as Et,aa as Dt,ab as Lt,ac as It,ad as Rt,ae as Nt,af as _t,ag as Ut,ah as Yt,ai as Xt,aj as Vt,ak as Gt,al as Wt,am as $t,an as Ot,ao as Ht,ap as zt,aq as qt,ar as Kt,as as Zt,at as Jt,au as Qt,av as jt,aw as es,ax as ts,ay as ss,az as os,aA as ns,aB as as,aC as rs,aD as is,aE as ls,aF as hs,aG as cs,aH as ds,aI as us,aJ as ps,aK as fs,aL as ms,aM as gs,aN as xs,aO as Cs,aP as Ts,aQ as ws,aR as bs,aS as ks,aT as vs,aU as ys,aV as Ps,aW as Ss,aX as Ms,aY as As,aZ as Bs,a_ as Fs,a$ as Es,b0 as Ds,b1 as Ls,b2 as Is,b3 as Rs,b4 as Ns,b5 as _s,b6 as Us,b7 as Ys,b8 as Xs,b9 as Vs,ba as Gs,bb as Ws,bc as $s,bd as Os,be as Hs,bf as zs,bg as qs,bh as Ks,bi as Zs,bj as Js,bk as Qs,bl as js,bm as eo,bn as to,bo as so,bp as oo,bq as no,br as ao,bs as ro,bt as io,bu as lo,bv as ho,bw as co,bx as uo,by as po,bz as fo,bA as mo,bB as go,bC as xo,bD as Co,bE as To,bF as wo,bG as bo,bH as ko,bI as vo,bJ as yo,bK as Po,bL as So,bM as Mo,bN as Ao,bO as Bo,bP as Fo,bQ as Eo,bR as Do,bS as Lo,bT as Io,bU as Ro,bV as No,bW as _o,bX as Uo,bY as Yo,bZ as Xo,b_ as Vo,b$ as Go,c0 as Wo,c1 as $o,c2 as Oo,c3 as Ho}from"./index-F1tWOWFT.js";import{SkeletonClipping as de,SkeletonPhysicsMovement as Ze,AnimationStateData as Je,AtlasAttachmentLoader as Qe,SkeletonBounds as je}from"./index-ChCXw-xh.js";import{AssetCache as qo,AssetManagerBase as Ko,Downloader as Zo,SkeletonRendererCore as Jo,Triangulator as Qo}from"./index-ChCXw-xh.js";if(typeof window<"u"&&window.PIXI){const m=window.require;window.require=o=>{if(m)return m(o);if(o.startsWith("@pixi/"))return window.PIXI}}const _=class _ extends Fe{constructor(e){super(e.resource.source);a(this,"texture");this.texture=he.from(e)}static from(e){return _.textureMap.has(e)?_.textureMap.get(e):new _(e)}setFilters(e,t){this.texture.baseTexture.scaleMode=_.toPixiTextureFilter(e),this.texture.baseTexture.mipmap=_.toPixiMipMap(e)}setWraps(e,t){this.texture.baseTexture.wrapMode=_.toPixiTextureWrap(e)}dispose(){this.texture.destroy()}static toPixiTextureFilter(e){switch(e){case F.Nearest:case F.MipMapNearestLinear:case F.MipMapNearestNearest:return ue.NEAREST;case F.Linear:case F.MipMapLinearLinear:case F.MipMapLinearNearest:return ue.LINEAR;default:throw new Error(`Unknown texture filter: ${String(e)}`)}}static toPixiMipMap(e){switch(e){case F.Nearest:case F.Linear:return pe.OFF;case F.MipMapNearestLinear:case F.MipMapNearestNearest:case F.MipMapLinearLinear:case F.MipMapLinearNearest:return pe.ON;default:throw new Error(`Unknown texture filter: ${String(e)}`)}}static toPixiTextureWrap(e){switch(e){case oe.ClampToEdge:return ne.CLAMP;case oe.MirroredRepeat:return ne.MIRRORED_REPEAT;case oe.Repeat:return ne.REPEAT;default:throw new Error(`Unknown texture wrap: ${String(e)}`)}}static toPixiBlending(e){switch(e){case H.Normal:return z.NORMAL;case H.Additive:return z.ADD;case H.Multiply:return z.MULTIPLY;case H.Screen:return z.SCREEN;default:throw new Error(`Unknown blendMode: ${String(e)}`)}}};a(_,"textureMap",new Map);let G=_;const K="spineTextureAtlasLoader",et={extension:O.Asset,resolver:{test:m=>V(m,".atlas"),parse:m=>{var e,t;const o=m.split(".");return{resolution:parseFloat(((t=(e=re.RETINA_PREFIX)==null?void 0:e.exec(m))==null?void 0:t[1])??"1"),format:o[o.length-2],src:m}}},loader:{name:K,extension:{type:O.LoadParser,priority:Te.Normal,name:K},test(m){return V(m,".atlas")},async load(m){const o=await re.ADAPTER.fetch(m);if(!o.ok)throw new Error(`[${K}] Failed to fetch ${m}: ${o.status} ${o.statusText}`);return await o.text()},testParse(m,o){const e=V(o.src,".atlas"),t=typeof m=="string",s=o.loadParser===K;return Promise.resolve((e||s)&&t)},unload(m){m.dispose()},async parse(m,o,e){var p;const t=o.data||{};let s=q.dirname(o.src);s&&s.lastIndexOf("/")!==s.length-1&&(s+="/");const n=new Ee(m);if(t.images instanceof fe||typeof t.images=="string"){const h=t.images;t.images={},t.images[n.pages[0].name]=h}const r=[];let l=!0;for(const h of e.parsers)if(h.name==="loadTextures"){l=(p=h.config)==null?void 0:p.preferCreateImageBitmap;break}Q.setPreferences({preferCreateImageBitmap:!1});for(const h of n.pages){const u=h.name,c=t!=null&&t.images?t.images[u]:void 0;if(c instanceof fe)h.setTexture(G.from(c));else{const i=c??q.normalize([...s.split(q.sep),u].join(q.sep)),g={src:De(i,o.src),data:{...t.imageMetadLine truncated
|
||||
var Ae=Object.defineProperty;var Be=(m,o,e)=>o in m?Ae(m,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):m[o]=e;var a=(m,o,e)=>Be(m,typeof o!="symbol"?o+"":o,e);import{T as Fe,a as he,b as F,S as ue,M as pe,c as oe,W as ne,B as H,d as z,L as Te,E as O,e as ce,p as q,f as Ee,g as fe,A as Q,h as me,i as De,j as V,s as re,G as we,k as $,l as Y,m as Le,P as Ie,n as Re,o as Ne,C as X,q as be,r as _e,t as Ue,u as Ye,v as Xe,w as ee,x as j,y as ke,z as Ve,D as J,F as ge,V as Ge,H as ae,I as We,J as $e,U as xe,K as E,R as ve,N as ye,O as Pe,Q as Oe,X as He,Y as ze,Z as qe,_ as Ke}from"./index-CPFl-YCv.js";import{$ as bt,a0 as kt,a1 as vt,a2 as yt,a3 as Pt,a4 as St,a5 as Mt,a6 as At,a7 as Bt,a8 as Ft,a9 as Et,aa as Dt,ab as Lt,ac as It,ad as Rt,ae as Nt,af as _t,ag as Ut,ah as Yt,ai as Xt,aj as Vt,ak as Gt,al as Wt,am as $t,an as Ot,ao as Ht,ap as zt,aq as qt,ar as Kt,as as Zt,at as Jt,au as Qt,av as jt,aw as es,ax as ts,ay as ss,az as os,aA as ns,aB as as,aC as rs,aD as is,aE as ls,aF as hs,aG as cs,aH as ds,aI as us,aJ as ps,aK as fs,aL as ms,aM as gs,aN as xs,aO as Cs,aP as Ts,aQ as ws,aR as bs,aS as ks,aT as vs,aU as ys,aV as Ps,aW as Ss,aX as Ms,aY as As,aZ as Bs,a_ as Fs,a$ as Es,b0 as Ds,b1 as Ls,b2 as Is,b3 as Rs,b4 as Ns,b5 as _s,b6 as Us,b7 as Ys,b8 as Xs,b9 as Vs,ba as Gs,bb as Ws,bc as $s,bd as Os,be as Hs,bf as zs,bg as qs,bh as Ks,bi as Zs,bj as Js,bk as Qs,bl as js,bm as eo,bn as to,bo as so,bp as oo,bq as no,br as ao,bs as ro,bt as io,bu as lo,bv as ho,bw as co,bx as uo,by as po,bz as fo,bA as mo,bB as go,bC as xo,bD as Co,bE as To,bF as wo,bG as bo,bH as ko,bI as vo,bJ as yo,bK as Po,bL as So,bM as Mo,bN as Ao,bO as Bo,bP as Fo,bQ as Eo,bR as Do,bS as Lo,bT as Io,bU as Ro,bV as No,bW as _o,bX as Uo,bY as Yo,bZ as Xo,b_ as Vo,b$ as Go,c0 as Wo,c1 as $o,c2 as Oo,c3 as Ho}from"./index-CPFl-YCv.js";import{SkeletonClipping as de,SkeletonPhysicsMovement as Ze,AnimationStateData as Je,AtlasAttachmentLoader as Qe,SkeletonBounds as je}from"./index-CX6BjU37.js";import{AssetCache as qo,AssetManagerBase as Ko,Downloader as Zo,SkeletonRendererCore as Jo,Triangulator as Qo}from"./index-CX6BjU37.js";if(typeof window<"u"&&window.PIXI){const m=window.require;window.require=o=>{if(m)return m(o);if(o.startsWith("@pixi/"))return window.PIXI}}const _=class _ extends Fe{constructor(e){super(e.resource.source);a(this,"texture");this.texture=he.from(e)}static from(e){return _.textureMap.has(e)?_.textureMap.get(e):new _(e)}setFilters(e,t){this.texture.baseTexture.scaleMode=_.toPixiTextureFilter(e),this.texture.baseTexture.mipmap=_.toPixiMipMap(e)}setWraps(e,t){this.texture.baseTexture.wrapMode=_.toPixiTextureWrap(e)}dispose(){this.texture.destroy()}static toPixiTextureFilter(e){switch(e){case F.Nearest:case F.MipMapNearestLinear:case F.MipMapNearestNearest:return ue.NEAREST;case F.Linear:case F.MipMapLinearLinear:case F.MipMapLinearNearest:return ue.LINEAR;default:throw new Error(`Unknown texture filter: ${String(e)}`)}}static toPixiMipMap(e){switch(e){case F.Nearest:case F.Linear:return pe.OFF;case F.MipMapNearestLinear:case F.MipMapNearestNearest:case F.MipMapLinearLinear:case F.MipMapLinearNearest:return pe.ON;default:throw new Error(`Unknown texture filter: ${String(e)}`)}}static toPixiTextureWrap(e){switch(e){case oe.ClampToEdge:return ne.CLAMP;case oe.MirroredRepeat:return ne.MIRRORED_REPEAT;case oe.Repeat:return ne.REPEAT;default:throw new Error(`Unknown texture wrap: ${String(e)}`)}}static toPixiBlending(e){switch(e){case H.Normal:return z.NORMAL;case H.Additive:return z.ADD;case H.Multiply:return z.MULTIPLY;case H.Screen:return z.SCREEN;default:throw new Error(`Unknown blendMode: ${String(e)}`)}}};a(_,"textureMap",new Map);let G=_;const K="spineTextureAtlasLoader",et={extension:O.Asset,resolver:{test:m=>V(m,".atlas"),parse:m=>{var e,t;const o=m.split(".");return{resolution:parseFloat(((t=(e=re.RETINA_PREFIX)==null?void 0:e.exec(m))==null?void 0:t[1])??"1"),format:o[o.length-2],src:m}}},loader:{name:K,extension:{type:O.LoadParser,priority:Te.Normal,name:K},test(m){return V(m,".atlas")},async load(m){const o=await re.ADAPTER.fetch(m);if(!o.ok)throw new Error(`[${K}] Failed to fetch ${m}: ${o.status} ${o.statusText}`);return await o.text()},testParse(m,o){const e=V(o.src,".atlas"),t=typeof m=="string",s=o.loadParser===K;return Promise.resolve((e||s)&&t)},unload(m){m.dispose()},async parse(m,o,e){var p;const t=o.data||{};let s=q.dirname(o.src);s&&s.lastIndexOf("/")!==s.length-1&&(s+="/");const n=new Ee(m);if(t.images instanceof fe||typeof t.images=="string"){const h=t.images;t.images={},t.images[n.pages[0].name]=h}const r=[];let l=!0;for(const h of e.parsers)if(h.name==="loadTextures"){l=(p=h.config)==null?void 0:p.preferCreateImageBitmap;break}Q.setPreferences({preferCreateImageBitmap:!1});for(const h of n.pages){const u=h.name,c=t!=null&&t.images?t.images[u]:void 0;if(c instanceof fe)h.setTexture(G.from(c));else{const i=c??q.normalize([...s.split(q.sep),u].join(q.sep)),g={src:De(i,o.src),data:{...t.imageMetadLine truncated
|
||||
attribute vec2 aVertexPosition;
|
||||
attribute vec2 aTextureCoord;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
var ft=Object.defineProperty;var gt=(W,t,e)=>t in W?ft(W,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):W[t]=e;var T=(W,t,e)=>gt(W,typeof t!="symbol"?t+"":t,e);import{f as ht,R as pt,N as dt,ac as ut,Z as mt,b4 as yt,O as rt,b5 as at,U as D,B as Tt}from"./index-F1tWOWFT.js";import{$ as Rt,a0 as Yt,a1 as Ft,a2 as Et,y as _t,a3 as Ot,a4 as kt,a5 as Xt,a6 as Bt,a7 as Nt,a8 as Dt,a9 as $t,aa as zt,ab as Wt,ad as qt,H as Gt,ae as Jt,af as Ht,ag as Zt,ah as Kt,ai as Qt,aj as jt,ak as te,al as ee,am as se,an as ne,ao as ie,ap as oe,aq as re,ar as ae,as as le,at as ce,au as he,av as pe,aw as de,ax as ue,ay as fe,az as ge,aA as me,aB as ye,aC as Te,aD as be,aE as we,aF as xe,aG as Ae,aH as Pe,aI as Ie,aJ as Ce,aK as Ve,aL as Le,aM as Se,aN as Me,aO as ve,aP as Ue,aQ as Re,aR as Ye,aS as Fe,aT as Ee,x as _e,aU as Oe,aV as ke,aW as Xe,aX as Be,aY as Ne,aZ as De,a_ as $e,a$ as ze,b0 as We,b1 as qe,b2 as Ge,b3 as Je,b6 as He,b7 as Ze,b8 as Ke,b9 as Qe,ba as je,bb as ts,bc as es,bd as ss,be as ns,bf as is,bg as os,bh as rs,bi as as,bj as ls,bk as cs,bl as hs,bm as ps,bn as ds,bo as us,bp as fs,bq as gs,br as ms,bs as ys,bt as Ts,bu as bs,w as ws,X as xs,J as As,Y as Ps,z as Is,bv as Cs,bw as Vs,bx as Ls,by as Ss,bz as Ms,bA as vs,bB as Us,bC as Rs,bD as Ys,bE as Fs,bF as Es,bG as _s,T as Os,bH as ks,bI as Xs,b as Bs,bJ as Ns,c as Ds,bK as $s,bL as zs,bM as Ws,bN as qs,bO as Gs,bP as Js,bQ as Hs,bR as Zs,bS as Ks,bT as Qs,bU as js,bV as tn,bW as en,bX as sn,bY as nn,bZ as on,b_ as rn,V as an,b$ as ln,c0 as cn,c1 as hn,c2 as pn,c3 as dn}from"./index-F1tWOWFT.js";class It{constructor(t){T(this,"skeletonData");T(this,"animationToMixTime",{});T(this,"defaultMix",0);if(!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}setMix(t,e,n){return typeof t=="string"?this.setMix1(t,e,n):this.setMix2(t,e,n)}setMix1(t,e,n){const s=this.skeletonData.findAnimation(t);if(!s)throw new Error(`Animation not found: ${t}`);const i=this.skeletonData.findAnimation(e);if(!i)throw new Error(`Animation not found: ${e}`);this.setMix2(s,i,n)}setMix2(t,e,n){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");const s=`${t.name}.${e.name}`;this.animationToMixTime[s]=n}getMix(t,e){const n=`${t.name}.${e.name}`,s=this.animationToMixTime[n];return s===void 0?this.defaultMix:s}}class Ct{constructor(t,e="",n=new bt,s=new lt){T(this,"textureLoader");T(this,"pathPrefix");T(this,"downloader");T(this,"cache");T(this,"errors",{});T(this,"toLoad",0);T(this,"loaded",0);T(this,"texturePmaInfo",{});this.textureLoader=t,this.pathPrefix=e,this.downloader=n,this.cache=s}start(t){return this.toLoad++,this.pathPrefix+t}success(t,e,n){this.toLoad--,this.loaded++,this.cache.assets[e]=n,this.cache.assetsRefCount[e]=(this.cache.assetsRefCount[e]||0)+1,t&&t(e,n)}error(t,e,n){this.toLoad--,this.loaded++,this.errors[e]=n,t&&t(e,n)}loadAll(){return new Promise((e,n)=>{const s=()=>{if(this.isLoadingComplete()){this.hasErrors()?n(this.errors):e(this);return}requestAnimationFrame(s)};requestAnimationFrame(s)})}setRawDataURI(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}loadBinary(t,e=()=>{},n=()=>{}){t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((s,i)=>{this.downloader.downloadBinary(t,o=>{this.success(e,t,o),s(o)},(o,r)=>{const l=`Couldn't load binary ${t}: status ${o}, ${r}`;this.error(n,t,l),i(l)})}))}loadText(t,e=()=>{},n=()=>{}){t=this.start(t),this.downloader.downloadText(t,s=>{this.success(e,t,s)},(s,i)=>{this.error(n,t,`Couldn't load text ${t}: status ${s}, ${i}`)})}loadJson(t,e=()=>{},n=()=>{}){t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((s,i)=>{this.downloader.downloadJson(t,o=>{this.success(e,t,o),s(o)},(o,r)=>{const l=`Couldn't load JSON ${t}: status ${o}, ${r}`;this.error(n,t,l),i(l)})}))}reuseAssets(t,e=()=>{},n=()=>{}){const s=this.cache.getAsset(t),i=s!==void 0;return i&&(this.cache.assetsLoaded[t]=s.then(o=>(o=o instanceof Image||o instanceof ImageBitmap?this.textureLoader(o):o,this.success(e,t,o),o)).catch(o=>{this.error(n,t,o)})),i}loadTexture(t,e=()=>{},n=()=>{}){if(t=this.start(t),this.reuseAssets(t,e,n))return;const s=this.texturePmaInfo[t];this.cache.assetsLoaded[t]=new Promise((i,o)=>{if(!!!(typeof window<"u"&&typeof navigator<"u"&&window.document))fetch(t,{mode:"cors"}).then(c=>{if(c.ok)return c.blob();const a=`Couldn't load image: ${t}`;this.error(n,t,`Couldn't load image: ${t}`),o(a)}).then(c=>c?createImageBitmap(c,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null).then(c=>{if(c){const a=this.createTexture(t,s,c);this.success(e,t,a),i(a)}});else{const c=new Image;c.crossOrigin="anonymous",c.onload=()=>{const a=this.createTexture(t,s,c);this.success(e,t,a),i(a)},c.onerror=()=>{const a=`Couldn't load image: ${t}`;this.error(n,t,a),o(a)},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),c.src=t}})}loadTextureAtlas(t,e=()=>{},n=()=>{},s){const i=t.lastIndexOf("/"),o=i>=0?t.substring(0,i+1)Line truncated
|
||||
var ft=Object.defineProperty;var gt=(W,t,e)=>t in W?ft(W,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):W[t]=e;var T=(W,t,e)=>gt(W,typeof t!="symbol"?t+"":t,e);import{f as ht,R as pt,N as dt,ac as ut,Z as mt,b4 as yt,O as rt,b5 as at,U as D,B as Tt}from"./index-CPFl-YCv.js";import{$ as Rt,a0 as Yt,a1 as Ft,a2 as Et,y as _t,a3 as Ot,a4 as kt,a5 as Xt,a6 as Bt,a7 as Nt,a8 as Dt,a9 as $t,aa as zt,ab as Wt,ad as qt,H as Gt,ae as Jt,af as Ht,ag as Zt,ah as Kt,ai as Qt,aj as jt,ak as te,al as ee,am as se,an as ne,ao as ie,ap as oe,aq as re,ar as ae,as as le,at as ce,au as he,av as pe,aw as de,ax as ue,ay as fe,az as ge,aA as me,aB as ye,aC as Te,aD as be,aE as we,aF as xe,aG as Ae,aH as Pe,aI as Ie,aJ as Ce,aK as Ve,aL as Le,aM as Se,aN as Me,aO as ve,aP as Ue,aQ as Re,aR as Ye,aS as Fe,aT as Ee,x as _e,aU as Oe,aV as ke,aW as Xe,aX as Be,aY as Ne,aZ as De,a_ as $e,a$ as ze,b0 as We,b1 as qe,b2 as Ge,b3 as Je,b6 as He,b7 as Ze,b8 as Ke,b9 as Qe,ba as je,bb as ts,bc as es,bd as ss,be as ns,bf as is,bg as os,bh as rs,bi as as,bj as ls,bk as cs,bl as hs,bm as ps,bn as ds,bo as us,bp as fs,bq as gs,br as ms,bs as ys,bt as Ts,bu as bs,w as ws,X as xs,J as As,Y as Ps,z as Is,bv as Cs,bw as Vs,bx as Ls,by as Ss,bz as Ms,bA as vs,bB as Us,bC as Rs,bD as Ys,bE as Fs,bF as Es,bG as _s,T as Os,bH as ks,bI as Xs,b as Bs,bJ as Ns,c as Ds,bK as $s,bL as zs,bM as Ws,bN as qs,bO as Gs,bP as Js,bQ as Hs,bR as Zs,bS as Ks,bT as Qs,bU as js,bV as tn,bW as en,bX as sn,bY as nn,bZ as on,b_ as rn,V as an,b$ as ln,c0 as cn,c1 as hn,c2 as pn,c3 as dn}from"./index-CPFl-YCv.js";class It{constructor(t){T(this,"skeletonData");T(this,"animationToMixTime",{});T(this,"defaultMix",0);if(!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}setMix(t,e,n){return typeof t=="string"?this.setMix1(t,e,n):this.setMix2(t,e,n)}setMix1(t,e,n){const s=this.skeletonData.findAnimation(t);if(!s)throw new Error(`Animation not found: ${t}`);const i=this.skeletonData.findAnimation(e);if(!i)throw new Error(`Animation not found: ${e}`);this.setMix2(s,i,n)}setMix2(t,e,n){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");const s=`${t.name}.${e.name}`;this.animationToMixTime[s]=n}getMix(t,e){const n=`${t.name}.${e.name}`,s=this.animationToMixTime[n];return s===void 0?this.defaultMix:s}}class Ct{constructor(t,e="",n=new bt,s=new lt){T(this,"textureLoader");T(this,"pathPrefix");T(this,"downloader");T(this,"cache");T(this,"errors",{});T(this,"toLoad",0);T(this,"loaded",0);T(this,"texturePmaInfo",{});this.textureLoader=t,this.pathPrefix=e,this.downloader=n,this.cache=s}start(t){return this.toLoad++,this.pathPrefix+t}success(t,e,n){this.toLoad--,this.loaded++,this.cache.assets[e]=n,this.cache.assetsRefCount[e]=(this.cache.assetsRefCount[e]||0)+1,t&&t(e,n)}error(t,e,n){this.toLoad--,this.loaded++,this.errors[e]=n,t&&t(e,n)}loadAll(){return new Promise((e,n)=>{const s=()=>{if(this.isLoadingComplete()){this.hasErrors()?n(this.errors):e(this);return}requestAnimationFrame(s)};requestAnimationFrame(s)})}setRawDataURI(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}loadBinary(t,e=()=>{},n=()=>{}){t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((s,i)=>{this.downloader.downloadBinary(t,o=>{this.success(e,t,o),s(o)},(o,r)=>{const l=`Couldn't load binary ${t}: status ${o}, ${r}`;this.error(n,t,l),i(l)})}))}loadText(t,e=()=>{},n=()=>{}){t=this.start(t),this.downloader.downloadText(t,s=>{this.success(e,t,s)},(s,i)=>{this.error(n,t,`Couldn't load text ${t}: status ${s}, ${i}`)})}loadJson(t,e=()=>{},n=()=>{}){t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((s,i)=>{this.downloader.downloadJson(t,o=>{this.success(e,t,o),s(o)},(o,r)=>{const l=`Couldn't load JSON ${t}: status ${o}, ${r}`;this.error(n,t,l),i(l)})}))}reuseAssets(t,e=()=>{},n=()=>{}){const s=this.cache.getAsset(t),i=s!==void 0;return i&&(this.cache.assetsLoaded[t]=s.then(o=>(o=o instanceof Image||o instanceof ImageBitmap?this.textureLoader(o):o,this.success(e,t,o),o)).catch(o=>{this.error(n,t,o)})),i}loadTexture(t,e=()=>{},n=()=>{}){if(t=this.start(t),this.reuseAssets(t,e,n))return;const s=this.texturePmaInfo[t];this.cache.assetsLoaded[t]=new Promise((i,o)=>{if(!!!(typeof window<"u"&&typeof navigator<"u"&&window.document))fetch(t,{mode:"cors"}).then(c=>{if(c.ok)return c.blob();const a=`Couldn't load image: ${t}`;this.error(n,t,`Couldn't load image: ${t}`),o(a)}).then(c=>c?createImageBitmap(c,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null).then(c=>{if(c){const a=this.createTexture(t,s,c);this.success(e,t,a),i(a)}});else{const c=new Image;c.crossOrigin="anonymous",c.onload=()=>{const a=this.createTexture(t,s,c);this.success(e,t,a),i(a)},c.onerror=()=>{const a=`Couldn't load image: ${t}`;this.error(n,t,a),o(a)},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),c.src=t}})}loadTextureAtlas(t,e=()=>{},n=()=>{},s){const i=t.lastIndexOf("/"),o=i>=0?t.substring(0,i+1)Line truncated
|
||||
${n}`:""}`)}remove(t){t=this.pathPrefix+t;const e=this.cache.assets[t];return e.dispose&&e.dispose(),delete this.cache.assets[t],delete this.cache.assetsRefCount[t],delete this.cache.assetsLoaded[t],e}removeAll(){for(const t in this.cache.assets){const e=this.cache.assets[t];e.dispose&&e.dispose()}this.cache.assets={},this.cache.assetsLoaded={},this.cache.assetsRefCount={}}isLoadingComplete(){return this.toLoad===0}getToLoad(){return this.toLoad}getLoaded(){return this.loaded}dispose(){this.removeAll()}disposeAsset(t){const e=this.cache.assets[t];if(e instanceof ht){e.dispose();return}this.disposeAssetInternal(t)}hasErrors(){return Object.keys(this.errors).length>0}getErrors(){return this.errors}disposeAssetInternal(t){if(this.cache.assetsRefCount[t]>0&&--this.cache.assetsRefCount[t]===0)return this.remove(t)}createTextureAtlas(t,e,n,s){const i=new ht(t);i.dispose=()=>{var o;if(!(this.cache.assetsRefCount[n]<=0)){this.disposeAssetInternal(n);for(const r of i.pages)(o=r.texture)==null||o.dispose()}};for(const o of i.pages){const r=this.texturePath(e,o.name,s);this.texturePmaInfo[this.pathPrefix+r]=o.pma}return i}createTexture(t,e,n){const s=this.textureLoader(n,e),i=s.dispose.bind(s);return s.dispose=()=>{this.disposeAssetInternal(t)&&i()},s}texturePath(t,e,n){return n?n[e]:t+e}}const nt=class nt{constructor(){T(this,"assets",{});T(this,"assetsRefCount",{});T(this,"assetsLoaded",{})}static getCache(t){const e=nt.AVAILABLE_CACHES.get(t);if(e)return e;const n=new nt;return nt.AVAILABLE_CACHES.set(t,n),n}async addAsset(t,e){return this.assetsLoaded[t]=Promise.resolve(e),this.assets[t]=e,e}getAsset(t){return this.assetsLoaded[t]}};T(nt,"AVAILABLE_CACHES",new Map);let lt=nt;class bt{constructor(){T(this,"callbacks",{});T(this,"rawDataUris",{})}dataUriToString(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");return e!==-1?(e+=7,atob(t.substr(e))):t.substr(t.indexOf(",")+1)}base64ToUint8Array(t){var e=window.atob(t),n=e.length,s=new Uint8Array(n);for(let i=0;i<n;i++)s[i]=e.charCodeAt(i);return s}dataUriToUint8Array(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");if(e===-1)throw new Error("Not a binary data URI.");return e+=7,this.base64ToUint8Array(t.substr(e))}downloadText(t,e,n){if(this.start(t,e,n))return;const s=this.rawDataUris[t];if(s&&!s.includes(".")){try{this.finish(t,200,this.dataUriToString(s))}catch(r){this.finish(t,400,JSON.stringify(r))}return}const i=new XMLHttpRequest;i.overrideMimeType("text/html"),i.open("GET",s||t,!0);const o=()=>{this.finish(t,i.status,i.responseText)};i.onload=o,i.onerror=o,i.send()}downloadJson(t,e,n){this.downloadText(t,s=>{e(JSON.parse(s))},n)}downloadBinary(t,e,n){if(this.start(t,e,n))return;const s=this.rawDataUris[t];if(s&&!s.includes(".")){try{this.finish(t,200,this.dataUriToUint8Array(s))}catch(r){this.finish(t,400,JSON.stringify(r))}return}const i=new XMLHttpRequest;i.open("GET",s||t,!0),i.responseType="arraybuffer";const o=()=>{this.finish(t,i.status,i.response)};i.onload=()=>{i.status===200||i.status===0?this.finish(t,200,new Uint8Array(i.response)):o()},i.onerror=o,i.send()}start(t,e,n){let s=this.callbacks[t];try{if(s)return!0;this.callbacks[t]=s=[]}finally{s.push(e,n)}}finish(t,e,n){const s=this.callbacks[t];if(delete this.callbacks[t],e===200||e===0)for(let i=0,o=s.length;i<o;i+=2)s[i](n);else for(let i=1,o=s.length;i<o;i+=2)s[i](e,n)}}class Vt{constructor(t,e=!1){T(this,"atlas");T(this,"allowMissingRegions");this.atlas=t,this.allowMissingRegions=e}findRegions(t,e,n){const s=n.regions;for(let i=0,o=s.length;i<o;i++)s[i]=this.findRegion(t,n.getPath(e,i))}findRegion(t,e){const n=this.atlas.findRegion(e);if(!n&&!this.allowMissingRegions)throw new Error(`Region not found in atlas: ${e} (attachment: ${t})`);return n}newRegionAttachment(t,e,n,s,i){return this.findRegions(n,s,i),new pt(n,i)}newMeshAttachment(t,e,n,s,i){return this.findRegions(n,s,i),new dt(n,i)}newBoundingBoxAttachment(t,e,n){return new ut(n)}newPathAttachment(t,e,n){return new mt(n)}newPointAttachment(t,e,n){return new yt(n)}newClippingAttachment(t,e,n){return new rt(n)}}class Lt{constructor(){T(this,"minX",0);T(this,"minY",0);T(this,"maxX",0);T(this,"maxY",0);T(this,"boundingBoxes",[]);T(this,"polygons",[]);T(this,"polygonPool",new at(()=>D.newFloatArray(16)))}update(t,e){if(!t)throw new Error("skeleton cannot be null.");const n=this.boundingBoxes,s=this.polygons,i=this.polygonPool,o=t.slots,r=o.length;n.length=0,i.freeAll(s),s.length=0;for(let l=0;l<r;l++){const c=o[l];if(!c.bone.active)continue;const a=c.appliedPose.attachment;if(a instanceof ut){n.push(a);let h=i.obtain();h.length!==a.worldVerticesLength&&(h=D.newFloatArray(a.worldVerticesLength)),s.push(h),a.computeWorldVertices(t,c,0,a.worldVerticesLength,h,0,2)}}e?this.aabbCompute():(this.minX=Number.POSITIVE_INFINITY,this.minY=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.maxY=Number.NEGATIVE_INFINITY)}aabbCompute(){let t=Number.POSITIVE_INFLine truncated
|
||||
@@ -1 +1 @@
|
||||
.stage-wrap[data-v-6a919d1f]{position:relative;width:100%;height:100%;overflow:hidden}.stage-holder[data-v-6a919d1f]{width:100%;height:100%;cursor:grab;touch-action:none;background-color:#0e1219;outline:none}.stage-holder.grid[data-v-6a919d1f]{background:conic-gradient(#141a26 90deg,transparent 90deg 180deg,#141a26 180deg 270deg,transparent 270deg);background-size:28px 28px}.stage-holder[data-v-6a919d1f]:active{cursor:grabbing}.topbar[data-v-6a919d1f]{position:absolute;top:10px;left:10px;right:10px;display:flex;align-items:center;gap:10px;padding:8px 12px;background:#141420d9;border-radius:10px;border:1px solid rgba(255,255,255,.08);font-size:12px;color:#aab;z-index:5;flex-wrap:wrap}.topbar input[type=range][data-v-6a919d1f]{background:#1a1a28;border:1px solid #2e2e44;color:#dde;border-radius:5px}.tool-group[data-v-6a919d1f]{display:flex;gap:6px;margin-left:6px;padding-left:12px;border-left:1px solid #2a2a3c}.tool-btn[data-v-6a919d1f]{width:30px;height:26px;background:#1e1e2e;border:1px solid #2e2e44;border-radius:6px;color:#aab;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center}.tool-btn[data-v-6a919d1f]:hover{background:#2b3a5c;color:#fff}.tool-btn.on[data-v-6a919d1f]{background:#3a5a8c;color:#fff;border-color:#5a7ab8}.background-menu[data-v-6a919d1f]{position:relative;flex:0 0 auto}.background-btn[data-v-6a919d1f]{height:28px;padding:0 11px;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cbd7ed;font-size:12px;cursor:pointer}.background-btn[data-v-6a919d1f]:hover,.background-btn.on[data-v-6a919d1f]{border-color:#7774ff;background:#343b63;color:#fff}.background-panel[data-v-6a919d1f]{position:absolute;top:calc(100% + 9px);right:0;width:248px;box-sizing:border-box;padding:10px;border:1px solid #343b50;border-radius:9px;background:#141420fa;color:#aeb8cc;box-shadow:0 8px 24px #0000007a;z-index:12}.background-upload[data-v-6a919d1f]{width:100%;height:30px;border:1px solid #5652b5;border-radius:6px;background:#4540a0;color:#fff;cursor:pointer}.background-upload[data-v-6a919d1f]:hover{border-color:#8982ff;background:#554dc2}.background-clear[data-v-6a919d1f]{width:100%;height:28px;margin-top:6px;border:1px solid #70404a;border-radius:6px;background:#512a33;color:#efb5bd;cursor:pointer}.background-clear[data-v-6a919d1f]:hover:not(:disabled){border-color:#b65b6a;background:#6a303b;color:#fff}.background-clear[data-v-6a919d1f]:disabled{opacity:.42;cursor:not-allowed}.background-file-input[data-v-6a919d1f]{display:none}.background-file-name[data-v-6a919d1f]{margin:7px 2px 9px;overflow:hidden;color:#737f98;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.background-position-row[data-v-6a919d1f]{display:grid;grid-template-columns:1fr 1fr;gap:8px}.background-position-row label[data-v-6a919d1f]{display:flex;align-items:center;gap:5px;color:#8995ad;font-size:11px}.background-position-row input[data-v-6a919d1f]{width:0;min-width:0;flex:1;box-sizing:border-box;height:28px;padding:0 6px;border:1px solid #343e55;border-radius:5px;background:#101522;color:#e1e6f2}.background-opacity-row[data-v-6a919d1f]{display:grid;grid-template-columns:46px 1fr 34px;align-items:center;gap:7px;margin-top:10px;font-size:11px}.background-opacity-row input[data-v-6a919d1f]{min-width:0;accent-color:#675de0}.background-opacity-row b[data-v-6a919d1f]{color:#aeb8cc;font-size:10px;text-align:right;font-variant-numeric:tabular-nums}.help-btn[data-v-6a919d1f]{height:28px;margin-left:auto;padding:0 11px;flex:0 0 auto;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cbd7ed;font-size:12px;font-weight:700;cursor:pointer}.help-btn[data-v-6a919d1f]:hover,.help-btn.on[data-v-6a919d1f]{border-color:#7774ff;background:#343b63;color:#fff}.zoom-pct[data-v-6a919d1f]{margin-left:0;font-variant-numeric:tabular-nums;color:#9aa;min-width:44px;text-align:center}.help-overlay[data-v-6a919d1f]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:72px 24px 28px;box-sizing:border-box;background:#05080fb8;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.help-dialog[data-v-6a919d1f]{width:min(820px,100%);max-height:100%;display:flex;flex-direction:column;overflow:hidden;border:1px solid #3a4864;border-radius:14px;background:#141a27;color:#b8c3d8;box-shadow:0 22px 70px #0000009e}.help-head[data-v-6a919d1f]{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px 15px;border-bottom:1px solid #2b354a;background:linear-gradient(135deg,#202942,#181e2d)}.help-head h2[data-v-6a919d1f]{margin:0;color:#eef2ff;font-size:19px}.help-head p[data-v-6a919d1f]{margin:5px 0 0;color:#7786a3;font-size:11px}.help-close[data-v-6a919d1f]{width:28px;height:28px;flex:0 0 28px;border:1px solid #43516b;border-radius:6px;background:#273249;color:#ccd7ed;cursor:pointer}.help-close[data-v-6a919d1f]:hover{border-color:#7774ff;background:#3b4670;color:#fff}.help-body[data-v-6a919d1f]{min-height:0;overflowLine truncated
|
||||
.stage-wrap[data-v-6a919d1f]{position:relative;width:100%;height:100%;overflow:hidden}.stage-holder[data-v-6a919d1f]{width:100%;height:100%;cursor:grab;touch-action:none;background-color:#0e1219;outline:none}.stage-holder.grid[data-v-6a919d1f]{background:conic-gradient(#141a26 90deg,transparent 90deg 180deg,#141a26 180deg 270deg,transparent 270deg);background-size:28px 28px}.stage-holder[data-v-6a919d1f]:active{cursor:grabbing}.topbar[data-v-6a919d1f]{position:absolute;top:10px;left:10px;right:10px;display:flex;align-items:center;gap:10px;padding:8px 12px;background:#141420d9;border-radius:10px;border:1px solid rgba(255,255,255,.08);font-size:12px;color:#aab;z-index:5;flex-wrap:wrap}.topbar input[type=range][data-v-6a919d1f]{background:#1a1a28;border:1px solid #2e2e44;color:#dde;border-radius:5px}.tool-group[data-v-6a919d1f]{display:flex;gap:6px;margin-left:6px;padding-left:12px;border-left:1px solid #2a2a3c}.tool-btn[data-v-6a919d1f]{width:30px;height:26px;background:#1e1e2e;border:1px solid #2e2e44;border-radius:6px;color:#aab;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center}.tool-btn[data-v-6a919d1f]:hover{background:#2b3a5c;color:#fff}.tool-btn.on[data-v-6a919d1f]{background:#3a5a8c;color:#fff;border-color:#5a7ab8}.background-menu[data-v-6a919d1f]{position:relative;flex:0 0 auto}.background-btn[data-v-6a919d1f]{height:28px;padding:0 11px;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cbd7ed;font-size:12px;cursor:pointer}.background-btn[data-v-6a919d1f]:hover,.background-btn.on[data-v-6a919d1f]{border-color:#7774ff;background:#343b63;color:#fff}.background-panel[data-v-6a919d1f]{position:absolute;top:calc(100% + 9px);right:0;width:248px;box-sizing:border-box;padding:10px;border:1px solid #343b50;border-radius:9px;background:#141420fa;color:#aeb8cc;box-shadow:0 8px 24px #0000007a;z-index:12}.background-upload[data-v-6a919d1f]{width:100%;height:30px;border:1px solid #5652b5;border-radius:6px;background:#4540a0;color:#fff;cursor:pointer}.background-upload[data-v-6a919d1f]:hover{border-color:#8982ff;background:#554dc2}.background-clear[data-v-6a919d1f]{width:100%;height:28px;margin-top:6px;border:1px solid #70404a;border-radius:6px;background:#512a33;color:#efb5bd;cursor:pointer}.background-clear[data-v-6a919d1f]:hover:not(:disabled){border-color:#b65b6a;background:#6a303b;color:#fff}.background-clear[data-v-6a919d1f]:disabled{opacity:.42;cursor:not-allowed}.background-file-input[data-v-6a919d1f]{display:none}.background-file-name[data-v-6a919d1f]{margin:7px 2px 9px;overflow:hidden;color:#737f98;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.background-position-row[data-v-6a919d1f]{display:grid;grid-template-columns:1fr 1fr;gap:8px}.background-position-row label[data-v-6a919d1f]{display:flex;align-items:center;gap:5px;color:#8995ad;font-size:11px}.background-position-row input[data-v-6a919d1f]{width:0;min-width:0;flex:1;box-sizing:border-box;height:28px;padding:0 6px;border:1px solid #343e55;border-radius:5px;background:#101522;color:#e1e6f2}.background-opacity-row[data-v-6a919d1f]{display:grid;grid-template-columns:46px 1fr 34px;align-items:center;gap:7px;margin-top:10px;font-size:11px}.background-opacity-row input[data-v-6a919d1f]{min-width:0;accent-color:#675de0}.background-opacity-row b[data-v-6a919d1f]{color:#aeb8cc;font-size:10px;text-align:right;font-variant-numeric:tabular-nums}.help-btn[data-v-6a919d1f]{height:28px;margin-left:auto;padding:0 11px;flex:0 0 auto;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cbd7ed;font-size:12px;font-weight:700;cursor:pointer}.help-btn[data-v-6a919d1f]:hover,.help-btn.on[data-v-6a919d1f]{border-color:#7774ff;background:#343b63;color:#fff}.zoom-pct[data-v-6a919d1f]{margin-left:0;font-variant-numeric:tabular-nums;color:#9aa;min-width:44px;text-align:center}.help-overlay[data-v-6a919d1f]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:72px 24px 28px;box-sizing:border-box;background:#05080fb8;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.help-dialog[data-v-6a919d1f]{width:min(820px,100%);max-height:100%;display:flex;flex-direction:column;overflow:hidden;border:1px solid #3a4864;border-radius:14px;background:#141a27;color:#b8c3d8;box-shadow:0 22px 70px #0000009e}.help-head[data-v-6a919d1f]{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px 15px;border-bottom:1px solid #2b354a;background:linear-gradient(135deg,#202942,#181e2d)}.help-head h2[data-v-6a919d1f]{margin:0;color:#eef2ff;font-size:19px}.help-head p[data-v-6a919d1f]{margin:5px 0 0;color:#7786a3;font-size:11px}.help-close[data-v-6a919d1f]{width:28px;height:28px;flex:0 0 28px;border:1px solid #43516b;border-radius:6px;background:#273249;color:#ccd7ed;cursor:pointer}.help-close[data-v-6a919d1f]:hover{border-color:#7774ff;background:#3b4670;color:#fff}.help-body[data-v-6a919d1f]{min-height:0;overflowLine truncated
|
||||
Vendored
+2
-2
@@ -8,8 +8,8 @@
|
||||
html, body { margin: 0; padding: 0; background: #111; color: #eee; font-family: system-ui, -apple-system, sans-serif; }
|
||||
#app { display: flex; flex-direction: column; height: 100vh; }
|
||||
</style>
|
||||
<script type="module" crossorigin src="/assets/index-F1tWOWFT.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-qxv07JSp.css">
|
||||
<script type="module" crossorigin src="/assets/index-CPFl-YCv.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-n3FHecj5.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
Reference in new issue
Block a user