handler-playable-sdk 0.4.57 → 0.4.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-A3OUQG23.js → chunk-DI4XTNYK.js} +1 -1
- package/dist/cli/brand-dna.mjs +1 -1
- package/dist/cli/canva-import.mjs +1 -1
- package/dist/cli/cleanup-assets.mjs +1 -1
- package/dist/cli/fix-scales.mjs +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/screen-helper.mjs +1 -1
- package/dist/cli/setup-library.mjs +1 -1
- package/dist/cli/student-helper.mjs +1 -1
- package/dist/cli/sync-screens.mjs +1 -1
- package/dist/cli/validate-assets.mjs +1 -1
- package/dist/cli/validate.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.css +17 -2
- package/dist/index.js +1 -1
- package/dist/pixi/index.cjs +1 -1
- package/dist/pixi/index.css +17 -2
- package/dist/pixi/index.js +1 -1
- package/dist/three/index.cjs +1 -1
- package/dist/three/index.css +17 -2
- package/dist/three/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
<button class="debug-btn primary" data-modal-apply>Apply</button>
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
|
-
`,this.modal=i}attachModalListeners(){if(!this.modal)return;this.modal.querySelectorAll("[data-modal-close]").forEach(o=>{o.addEventListener("click",()=>this.close())}),this.modal.querySelectorAll("[data-tab]").forEach(o=>{o.addEventListener("click",s=>{let c=s.target.dataset.tab;c&&this.switchTab(c)})});let i=this.modal.querySelector("[data-ai-generate]");i==null||i.addEventListener("click",()=>{this.openAiEditor("generate")});let a=this.modal.querySelector("[data-ai-edit]");a==null||a.addEventListener("click",()=>{this.openAiEditor("edit")});let r=this.modal.querySelector("[data-modal-apply]");r==null||r.addEventListener("click",()=>{this.apply()}),this.modal.addEventListener("click",o=>{o.target===this.modal&&this.close()})}switchTab(e){if(!this.modal)return;this.modal.querySelectorAll("[data-tab]").forEach(a=>{a.classList.toggle("active",a.getAttribute("data-tab")===e)}),this.modal.querySelectorAll("[data-tab-panel]").forEach(a=>{a.classList.toggle("active",a.getAttribute("data-tab-panel")===e)})}openAiEditor(e){let t=window.__openAiEditor;if(typeof t!="function"){alert("AI Editor not available. Please check your setup.");return}let i="";e==="edit"&&this.currentAsset?i=`Edit this image: ${this.currentObjectId}`:i=`Create an image for: ${this.currentObjectId}`,t(this.currentObjectId||"unknown",i,this.currentAsset,{path:this.currentPath,onApply:a=>{this.onApplyCallback&&this.onApplyCallback(a),this.close()}})}apply(){this.onApplyCallback&&this.onApplyCallback("library/placeholder.png"),this.close()}close(){this.modal&&this.modal.parentNode&&this.modal.parentNode.removeChild(this.modal),this.modal=null,this.currentObjectId=null,this.currentPath=null,this.onApplyCallback=null}}});var pl={};ht(pl,{COLORS:()=>ce,ConfigWatcher:()=>ze,DebugPanel:()=>Ot,DefaultReloadStrategy:()=>St,Handler:()=>ie,PlayableLoadingScreen:()=>Ui,PreviewShell:()=>Hi,STROKE_WIDTH:()=>mo,THEME:()=>bo,applyConfigOverride:()=>Se,applyConfigOverrides:()=>Ce,applyConfigsToDisk:()=>ri,applyDefaults:()=>$e,baseLottie:()=>rn,bootstrap:()=>el,clearConfigOverrides:()=>se,clearConfigOverridesForObject:()=>vr,configOverrideManager:()=>xr,createPreviewShell:()=>da,deepClone:()=>G,default:()=>Oe,defaultPreset:()=>ui,deviceGroups:()=>Mn,devicePresets:()=>Pn,diffConfigs:()=>Sn,exportConfigsAsJSON:()=>De,getConfigOverrides:()=>Y,getConfigStateSummary:()=>ai,getOverrideMode:()=>wt,getPresetById:()=>Ne,getPresetsByCategory:()=>Os,loadAllObjectConfigs:()=>li,loadComponentSchemas:()=>si,loadEngineConfig:()=>ci,loadGamePromptConfig:()=>wn,loadObjectCentricConfig:()=>be,loadObjectConfig:()=>Le,loadSceneConfig:()=>di,rehydrateObject:()=>Cn,removeConfigOverride:()=>ni,resetToApplied:()=>Et,resetToOriginal:()=>oi,setBootstrapDependencies:()=>Zs,setOverrideMode:()=>yn,setupHotReload:()=>kn,setupLiveEditBridge:()=>Bi,toLegacyFormat:()=>En,validateObjectConfig:()=>Je});module.exports=zo(pl);var we={};function Ut(n,e,t=!1){we[n]||(we[n]=[]),we[n].push({fn:e,once:t})}function en(n,e){if(we[n]){if(!e){delete we[n];return}we[n]=we[n].filter(t=>t.fn!==e)}}function Gt(n,...e){let t=we[n];if(t)for(let i of[...t])i.fn(...e),i.once&&en(n,i.fn)}function X(n,e){Ut(n,e,!0)}var F=null,ee=[],Ve=null;function _a(n){F=n,ee=[],Ve!==null&&(clearTimeout(Ve),Ve=null)}function Pa(){var n,e,t;return{endpoint:(F==null?void 0:F.endpoint)||"",transport:(F==null?void 0:F.transport)||"beacon",batchSize:(n=F==null?void 0:F.batchSize)!=null?n:10,flushIntervalMs:(e=F==null?void 0:F.flushIntervalMs)!=null?e:300,maxQueue:(t=F==null?void 0:F.maxQueue)!=null?t:200,debug:!!(F!=null&&F.debug)}}async function Ta(n,e,t,i){let a=JSON.stringify(e);if(t==="beacon"&&typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function")try{let r=navigator.sendBeacon(n,new Blob([a],{type:"application/json"}));i&&console.log("[handler.telemetry] beacon",r,e);return}catch(r){i&&console.warn("[handler.telemetry] beacon failed, fallback to fetch",r)}try{await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:a,keepalive:!0}),i&&console.log("[handler.telemetry] fetch",e)}catch(r){i&&console.warn("[handler.telemetry] fetch failed",r)}}function tn(n,e){let t=Pa();if(e&&t.endpoint){if(ee.push(n),ee.length>t.maxQueue&&(ee=ee.slice(ee.length-t.maxQueue)),ee.length>=t.batchSize){ka();return}Ve===null&&(Ve=window.setTimeout(()=>{Ve=null,ka()},t.flushIntervalMs))}}async function ka(){let n=Pa();if(!n.endpoint||ee.length===0)return;let e=ee.splice(0,n.batchSize);await Ta(n.endpoint,{events:e},n.transport,n.debug),ee.length>0&&await Ta(n.endpoint,{events:ee.splice(0,n.batchSize)},n.transport,n.debug)}function Ma(n){return Math.max(0,Math.min(1,n))}function No(n){let e=String(n!=null?n:"power2.out");if(e==="linear")return t=>t;if(e==="sine.inOut")return t=>.5-Math.cos(Math.PI*t)/2;if(e==="power2.out"||e==="easeOutQuad")return t=>1-(1-t)*(1-t);if(e.startsWith("back.out")){let t=e.match(/back\.out\(([\d.]+)\)/),i=t?Number(t[1]):1.8;return a=>1+(i+1)*Math.pow(a-1,3)+i*Math.pow(a-1,2)}return t=>1-(1-t)*(1-t)}function ft(){return typeof performance!="undefined"&&performance.now?performance.now():Date.now()}function Ho(n,e){let t=n==null?void 0:n[e];return typeof t=="number"?t:0}function Oa(n,e,t){try{n[e]=t}catch{}}function Bo(n){let e=n==null?void 0:n.scale;if(!e)return null;let t=typeof e.x=="number"?e.x:1,i=typeof e.y=="number"?e.y:1;return{x:t,y:i}}function Ia(n,e){let t=n==null?void 0:n.scale;if(t)try{typeof t.set=="function"?t.set(e.x,e.y):(typeof t.x=="number"&&(t.x=e.x),typeof t.y=="number"&&(t.y=e.y))}catch{}}function ja(n,e){let t=Bo(n);if(!t)return{from:null,to:null};let i=null,a=null;return typeof e.scale=="number"?(i=e.scale,a=e.scale):e.scale&&typeof e.scale=="object"&&(typeof e.scale.x=="number"&&(i=e.scale.x),typeof e.scale.y=="number"&&(a=e.scale.y)),typeof e.scaleX=="number"&&(i=e.scaleX),typeof e.scaleY=="number"&&(a=e.scaleY),i===null&&a===null?{from:null,to:null}:{from:{x:t.x,y:t.y},to:{x:i!=null?i:t.x,y:a!=null?a:t.y}}}function Ra(){let n=new Set,e=new WeakMap,t=null,i=()=>{if(t!=null)return;t=requestAnimationFrame(()=>{t=null,s(),n.size>0&&i()})},a=p=>{var u;n.add(p);let d=(u=e.get(p.target))!=null?u:new Set;d.add(p),e.set(p.target,d),i()},r=p=>{n.delete(p);let d=e.get(p.target);d&&(d.delete(p),d.size===0&&e.delete(p.target))},o=p=>{p.killed||(p.killed=!0,r(p))},s=()=>{var d,u;let p=ft();for(let g of Array.from(n)){if(g.killed||g.paused)continue;let m=p-g.startMs-g.delayMs;if(m<0)continue;let h=g.durationMs>0?m/g.durationMs:1,f=Ma(h),b=g.repeat>=0?g.repeat+1:1,y=g.repeat>0?Math.min(Math.floor(h),b-1):0;if(g.repeat>0&&h>=1){let w=h-y;f=Ma(w)}let v=g.ease(f);g.yoyo&&y%2===1&&(v=1-v);for(let w of g.props)Oa(g.target,w.key,w.from+(w.to-w.from)*v);g.scaleFrom&&g.scaleTo&&Ia(g.target,{x:g.scaleFrom.x+(g.scaleTo.x-g.scaleFrom.x)*v,y:g.scaleFrom.y+(g.scaleTo.y-g.scaleFrom.y)*v});try{(d=g.onUpdate)==null||d.call(g)}catch{}if(h>=b){o(g);try{(u=g.onComplete)==null||u.call(g)}catch{}}}},l=(p,d,u)=>{var w;let g=Math.max(0,(typeof d.duration=="number"?d.duration:.5)*1e3),m=Math.max(0,(typeof d.delay=="number"?d.delay:0)*1e3+((w=u==null?void 0:u.delayMsOverride)!=null?w:0)),h=No(d.ease),f=typeof d.repeat=="number"?Math.max(0,d.repeat|0):0,b=d.yoyo===!0,y=new Set(["duration","delay","ease","repeat","yoyo","onUpdate","onComplete","scale","scaleX","scaleY"]),v=[];for(let E of Object.keys(d)){if(y.has(E))continue;let C=d[E];typeof C=="number"&&v.push({key:E,from:Ho(p,E),to:C})}let x=ja(p,d);return{target:p,startMs:ft(),delayMs:m,durationMs:g,ease:h,props:v,scaleFrom:x.from,scaleTo:x.to,repeat:f,yoyo:b,onUpdate:typeof d.onUpdate=="function"?d.onUpdate:void 0,onComplete:typeof d.onComplete=="function"?d.onComplete:void 0,killed:!1,paused:!1,pauseAtMs:null}},c={to(p,d){let u=l(p,d);return a(u),{kill:()=>o(u),pause:()=>{u.paused||(u.paused=!0,u.pauseAtMs=ft())},resume:()=>{var h;if(!u.paused)return;let g=(h=u.pauseAtMs)!=null?h:ft(),m=ft()-g;u.startMs+=m,u.paused=!1,u.pauseAtMs=null},isActive:()=>!u.killed&&!u.paused}},fromTo(p,d,u){return c.set(p,d),c.to(p,u)},set(p,d){if(!p||!d)return;for(let g of Object.keys(d)){let m=d[g];g==="scale"||g==="scaleX"||g==="scaleY"||typeof m=="number"&&Oa(p,g,m)}let u=ja(p,d);u.to&&Ia(p,u.to)},killTweensOf(p){let d=e.get(p);if(d)for(let u of Array.from(d))o(u)},timeline(p={}){let d=[],u=0,g=!1,m=[],h=y=>{if(typeof y=="number")return Math.max(0,y*1e3);let v=typeof y=="string"?y.trim():"";return v.startsWith("+=")?u+Math.max(0,Number(v.slice(2))*1e3||0):v?Math.max(0,Number(v)*1e3||0):u},f=y=>{d.push(y);let v=Math.max(0,(typeof y.vars.duration=="number"?y.vars.duration:.5)*1e3);u=Math.max(u,y.atMs+v)},b={to(y,v,x){return f({kind:"to",target:y,vars:v,atMs:h(x)}),b},fromTo(y,v,x,w){return f({kind:"fromTo",target:y,vars:x,from:v,atMs:h(w)}),b},play(){var y,v;if(g)return b;g=!0,m=[];for(let x of d)x.kind==="fromTo"&&c.set(x.target,(y=x.from)!=null?y:{}),m.push(c.to(x.target,{...x.vars,delay:x.atMs/1e3+((v=x.vars.delay)!=null?v:0)}));return b},pause(){for(let y of m)y.pause();return b},kill(){for(let y of m)y.kill();m=[],g=!1}};return p.paused||b.play(),b}};return c}function Da(){if(typeof window=="undefined")return;let n=window;if(!n.gsap)try{n.gsap=Ra()}catch{}}var $a={name:"handler-playable-sdk",version:"0.4.57",type:"module",description:"Handler Playable SDK v0.1 with contract-aligned surface (root sandbox, canonical event envelope).",main:"dist/index.cjs",module:"dist/index.js",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs"},"./pixi":{types:"./dist/pixi/index.d.ts",import:"./dist/pixi/index.js",require:"./dist/pixi/index.cjs"},"./pixi/index.css":{import:"./dist/pixi/index.css",require:"./dist/pixi/index.css"},"./three":{types:"./dist/three/index.d.ts",import:"./dist/three/index.js",require:"./dist/three/index.cjs"},"./cli":{types:"./dist/cli/index.d.ts",import:"./dist/cli/index.js",require:"./dist/cli/index.cjs"}},bin:{"handler-student-helper":"./bin/student-helper.mjs","handler-validate":"./bin/validate.mjs","handler-sync-screens":"./bin/sync-screens.mjs","handler-brand-dna":"./bin/brand-dna.mjs","handler-setup-library":"./bin/setup-library.mjs","handler-screen-helper":"./bin/screen-helper.mjs"},scripts:{prebuild:"python3 src/preview/build-css.py",build:"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --minify --external lottie-web && npm run create-mjs-symlinks && npm run postbuild-cli && npm run obfuscate && npm run postbuild",postbuild:"python3 src/preview/copy-css-to-dist.py","postbuild-cli":"cp src/cli/*.mjs dist/cli/ && chmod +x dist/cli/*.mjs && chmod +x bin/*.mjs","create-mjs-symlinks":"cd dist && ln -sf index.js index.mjs && cd pixi && ln -sf index.js index.mjs && cd ../three && ln -sf index.js index.mjs","build:dev":"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --external lottie-web && npm run create-mjs-symlinks && npm run postbuild-cli",obfuscate:"javascript-obfuscator dist/pixi/index.js --output dist/pixi/index.js --config obfuscator.config.json && javascript-obfuscator dist/three/index.js --output dist/three/index.js --config obfuscator.config.json && javascript-obfuscator dist/cli/index.js --output dist/cli/index.js --config obfuscator.config.json && npm run obfuscate-cli","obfuscate-cli":'for file in dist/cli/*.mjs; do javascript-obfuscator "$file" --output "$file" --config obfuscator.config.json; done',lint:"eslint 'src/**/*.{ts,tsx}'",typecheck:"tsc --noEmit",prepublishOnly:"npm run build","publish:update":"node scripts/publish-and-update.cjs patch","publish:update:minor":"node scripts/publish-and-update.cjs minor","publish:update:major":"node scripts/publish-and-update.cjs major"},author:"Handler",license:"MIT",publishConfig:{access:"public"},repository:{type:"git",url:"https://github.com/HandlerAIGames/handler-playable-sdk.git"},files:["dist","bin","LICENSE","README.md"],peerDependencies:{"lottie-web":"^5.0.0","pixi.js":"^8.0.0",three:"^0.182.0"},peerDependenciesMeta:{"pixi.js":{optional:!0},three:{optional:!0},"lottie-web":{optional:!0}},devDependencies:{"@types/three":"^0.182.0",eslint:"^9.39.2","javascript-obfuscator":"^5.1.0","pixi.js":"8.8.1",three:"^0.182.0","ts-node":"^10.9.2",tsup:"^8.4.0",typescript:"^5.7.2","typescript-eslint":"^8.53.0"},dependencies:{"@google/genai":"^1.35.0","@google/generative-ai":"^0.24.1",jszip:"^3.10.1",sharp:"^0.34.5"}};var J=0,Uo=J++,za=J++,Na=J++,Ha=J++,Ba=J++,Fa=J++,Ua=J++,Ga=J++,qa=J++,Va=J++,Wa=J++,Ya=J++,H=Uo;function Ka(){return H===za}function Xa(){return H===Na}function Ja(){return H===Ha}function Za(){return H===Ba}function We(){return H===Fa}function Ye(){return H===Ua}function Qa(){return H===Ga}function er(){return H===qa}function tr(){return H===Va}function nn(){return H===Wa}function an(){return H===Ya}function ir(){let n=typeof AD_PROTOCOL!="undefined"?AD_PROTOCOL:"none",e=typeof AD_NETWORK!="undefined"?AD_NETWORK:"web_embed";if(n==="mraid")try{mraid.getState(),H=za;return}catch{}else if(n==="dapi")try{dapi.isReady(),H=Na;return}catch{}if(e==="facebook")try{typeof FbPlayableAd!="undefined"&&(H=Ha)}catch{}else if(e==="google")try{typeof ExitApi!="undefined"&&(H=Ba)}catch{}else if(e==="mintegral")window.gameReady&&(H=Fa);else if(e==="tapjoy")window.TJ_API&&(H=Ua);else if(e==="tiktok")window.openAppStore&&(H=Ga);else if(e==="smadex")try{window.smxTracking&&(H=qa)}catch{}else if(e==="snapchat")try{window.ScPlayableAd&&(H=Va)}catch{}else e==="vungle"?H=Wa:(n==="nucleo"||e==="nucleo")&&(H=Ya)}var qt=qe(require("lottie-web"),1),rn=qt.default;typeof window!="undefined"&&(window.lottie=qt.default,window.__baseLottie=qt.default);var Go=require("pixi.js");var on=require("pixi.js");var qo=null;function sn(n){qo=n}Vt();ln();var mt=require("pixi.js");Vt();var Jo=typeof __BUILD_MODE__!="undefined"?__BUILD_MODE__:"undefined",un=Jo;if(typeof window!="undefined")try{let n=new XMLHttpRequest;if(n.open("GET","./build-settings.json",!1),n.send(),n.status===200&&n.responseText){let e=JSON.parse(n.responseText);e!=null&&e.buildMode&&(un=e.buildMode,console.log(`[ObjectFactory] Build mode overridden by settings: ${un}`))}}catch{}function Zo(n){var t,i,a,r,o;if(typeof window!="undefined"&&window.resolveAnchorVec2)return window.resolveAnchorVec2(n);let e={center:{x:.5,y:.5},"top-left":{x:0,y:0},"top-center":{x:.5,y:0},"top-right":{x:1,y:0},"center-left":{x:0,y:.5},"center-right":{x:1,y:.5},"bottom-left":{x:0,y:1},"bottom-center":{x:.5,y:1},"bottom-right":{x:1,y:1},left:{x:0,y:.5},right:{x:1,y:.5},top:{x:.5,y:0},bottom:{x:.5,y:1}};if(Array.isArray(n))return{x:(t=n[0])!=null?t:.5,y:(i=n[1])!=null?i:.5};if(n&&typeof n=="object"&&"x"in n&&"y"in n)return{x:(a=n.x)!=null?a:.5,y:(r=n.y)!=null?r:.5};if(typeof n=="string"){let s=n.trim().toLowerCase();return(o=e[s])!=null?o:{x:.5,y:.5}}return null}var Ae=class{static async create(e,t,i){var l,c,p,d,u,g,m;console.log(`[ObjectFactory] create() called for: ${e}, __BUILD_MODE__: ${un}`);let a=(l=t==null?void 0:t.render)==null?void 0:l.asset;if(!a){console.log(`[ObjectFactory] No asset definition for: ${e}, returning empty container`);let h=new mt.Container;return this.applyTransform(h,t==null?void 0:t.transform,t),h}let r=(c=t==null?void 0:t.identity)==null?void 0:c.id;console.log(`[ObjectFactory] Calling AssetLoader.load() for: ${e}, configId: ${r}, type: ${a.type}, path: ${a.path}`);let o=await je.load(e,a,i,r);console.log(`[ObjectFactory] AssetLoader.load() completed for: ${e}, rawAsset type: ${(p=o==null?void 0:o.constructor)==null?void 0:p.name}`);let s;if(a.type==="image")console.log("[ObjectFactory] Creating Sprite from texture:",o,"for object:",e),s=new mt.Sprite(o),console.log("[ObjectFactory] Created object:",s,"type:",(d=s==null?void 0:s.constructor)==null?void 0:d.name),this.applyTransform(s,t==null?void 0:t.transform,t);else if(a.type==="json")if(console.log("[ObjectFactory] JSON asset for",e,"rawAsset type:",(u=o==null?void 0:o.constructor)==null?void 0:u.name,o),o&&(((g=o.constructor)==null?void 0:g.name)==="Container"||o instanceof mt.Container)){console.warn("[ObjectFactory] JSON asset is Container (from cache), reloading JSON directly");let h=[a.path,`/assets/${a.path}`,`assets/${a.path}`,`../assets/${a.path}`],f=!1;for(let b of h)try{let y=await fetch(b);if(y.ok){s=await y.json(),console.log("[ObjectFactory] Reloaded JSON directly from:",b,"type:",(m=s==null?void 0:s.constructor)==null?void 0:m.name),f=!0;break}}catch{continue}f||(console.error("[ObjectFactory] Failed to reload JSON from any path"),s=o)}else s=o;else s=o,s&&typeof s=="object"&&("x"in s||"position"in s)&&this.applyTransform(s,t==null?void 0:t.transform,t);return s}static applyTransform(e,t,i){var a,r,o,s;if(!(!t||!e)&&(t.position&&("x"in e&&"y"in e?(e.x=(a=t.position.x)!=null?a:0,e.y=(r=t.position.y)!=null?r:0):"position"in e&&e.position&&e.position.set((o=t.position.x)!=null?o:0,(s=t.position.y)!=null?s:0)),t.scale!==void 0&&"scale"in e&&e.scale&&(typeof e.scale=="object"&&"set"in e.scale?e.scale.set(t.scale):e.scale=t.scale),t.rotation!==void 0&&"rotation"in e&&(e.rotation=t.rotation),t.anchor&&"anchor"in e&&e.anchor)){let l=Zo(t.anchor);l&&("set"in e.anchor?e.anchor.set(l.x,l.y):(e.anchor.x=l.x,e.anchor.y=l.y))}}};var bt=class{constructor(){this.config=null}init(e){this.config=e}get(e){if(!this.config)throw new Error("RuntimeObjectRegistry not initialized. Call init() first.");return this.config.objects.get(e)}getAllIds(){if(!this.config)throw new Error("RuntimeObjectRegistry not initialized. Call init() first.");return Array.from(this.config.objects.keys())}has(e){return this.config?this.config.objects.has(e):!1}};var ts=qe(require("pixi.js"),1);typeof window!="undefined"&&(window.__basePixi=ts);Ke();var Wt=require("pixi.js");Ke();var fn=class{constructor(){this.instanceCache=new Map;this.readyPromise=null;this.app=null;this.registry=new bt}init(e,t){this.registry.init(e),this.app=t}updateConfig(e){this.registry.init(e),this.instanceCache.clear(),this.readyPromise=null}async ready(){this.readyPromise&&await this.readyPromise;let t=this.registry.getAllIds().filter(a=>!this.instanceCache.has(a));if(t.length===0)return;let i=async a=>{a.length&&(console.log("[Assets] Loading objects:",a),await Promise.all(a.map(async r=>{var s;let o=this.registry.get(r);if(!o){console.warn("[Assets] No config found for object:",r);return}try{let l=await Ae.create(r,o,this.app);this.instanceCache.set(r,l),console.log("[Assets] Loaded object:",r,(s=l==null?void 0:l.constructor)==null?void 0:s.name)}catch(l){console.error("[Assets] Failed to load object:",r,l)}})))};return this.readyPromise=(async()=>{await i(t);let a=this.registry.getAllIds().filter(r=>!this.instanceCache.has(r));a.length>0&&(console.warn("[Assets] Retrying missing assets:",a),await i(a)),console.log("[Assets] Ready. Cached objects:",Array.from(this.instanceCache.keys()))})(),this.readyPromise}resetScene(){this.instanceCache.clear(),this.readyPromise=null}async reloadObject(e){let t=this.registry.get(e);if(t){let i=await Ae.create(e,t,this.app);this.instanceCache.set(e,i)}}get(e){return this.instanceCache.get(e)}},is=new fn,ns=new Proxy(is,{get(n,e){if(e in n&&typeof n[e]=="function")return n[e].bind(n);if(n.get(e))return n.get(e)}});Ke();var lr=require("pixi.js"),he={width:400,height:600,designWidth:400,scaleFactor:1},Kt={scale:1,position:1},bn=[];function rs(n,e,t,i,a,r,o){bn.push({element:n,originalScale:r,positionHelper:e,heightPercent:a}),e(n,t,i,a,r,o,!1)}function os(){bn.forEach(({element:n,originalScale:e,positionHelper:t,heightPercent:i})=>{let a=e*he.scaleFactor;t(n,he.width,he.height,i,a,!0,!1)})}function mn(n,e){console.log(`[SCREEN] updateScreenState called: ${n}x${e}`),he.width=n,he.height=e,he.scaleFactor=Math.min(n/he.designWidth,1.15),Kt.scale=he.scaleFactor,Kt.position=1,console.log(`[SCREEN] Global multipliers - scale: ${Kt.scale.toFixed(3)}`),os()}var vt={layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:1,screen_scale_y:1},engine:{scale:1,background_scale:1.05,background_offset_y:0,background_alpha:.98,label_pulse_speed:3,label_pulse_intensity:.03}};function ss(n,e,t){let i=vt[n];i&&i[e]!==void 0&&(i[e]=t,console.log(`Updated ${n}.${e} = ${t}`))}function ls(){return vt}var cs={center:{x:.5,y:.5},"center-center":{x:.5,y:.5},middle:{x:.5,y:.5},"middle-center":{x:.5,y:.5},"top-left":{x:0,y:0},"top-center":{x:.5,y:0},"top-right":{x:1,y:0},"bottom-left":{x:0,y:1},"bottom-center":{x:.5,y:1},"bottom-right":{x:1,y:1},"left-center":{x:0,y:.5},"right-center":{x:1,y:.5},"center-left":{x:0,y:.5},"center-right":{x:1,y:.5},left:{x:0,y:.5},right:{x:1,y:.5},top:{x:.5,y:0},bottom:{x:.5,y:1}};function Yt(n,e){return typeof n=="number"&&Number.isFinite(n)?n:e}function Xt(n,e={x:.5,y:.5}){var t;if(Array.isArray(n))return{x:Yt(n[0],e.x),y:Yt(n[1],e.y)};if(n&&typeof n=="object"){let i=n;return{x:Yt(i.x,e.x),y:Yt(i.y,e.y)}}if(typeof n=="string"){let i=n.trim().toLowerCase();return(t=cs[i])!=null?t:e}return e}function cr(n,e,t,i={}){var g,m,h,f,b,y;let a=Xt(t),r=(g=i.inset)!=null?g:{},o=(m=i.padding)!=null?m:{x:0,y:0},s=((h=r.left)!=null?h:0)+o.x,l=((f=r.right)!=null?f:0)+o.x,c=((b=r.top)!=null?b:0)+o.y,p=((y=r.bottom)!=null?y:0)+o.y,d=Math.max(0,n-s-l),u=Math.max(0,e-c-p);return{x:s+d*a.x,y:c+u*a.y}}function dr(n,e,t,i={}){var h,f,b,y,v,x;let a=(h=i.inset)!=null?h:{},r=(f=i.padding)!=null?f:{x:0,y:0},o=((b=a.left)!=null?b:0)+r.x,s=((y=a.right)!=null?y:0)+r.x,l=((v=a.top)!=null?v:0)+r.y,c=((x=a.bottom)!=null?x:0)+r.y,p=Math.max(0,n-o-s),d=Math.max(0,e-l-c),u=Xt(t,{x:.5,y:.5}),g=Math.min(Math.max(u.x,0),1),m=Math.min(Math.max(u.y,0),1);return{x:o+p*g,y:l+d*m}}if(typeof window!="undefined"){let n=window.innerWidth,e=window.innerHeight,t=()=>{let i=window.innerWidth,a=window.innerHeight;(i!==n||a!==e)&&(n=i,e=a,mn(i,a))};window.addEventListener("resize",t),window.addEventListener("orientationchange",()=>{setTimeout(t,100)}),window.mraid&&(window.mraid.addEventListener("viewableChange",t),window.mraid.addEventListener("sizeChange",t)),mn(window.innerWidth,window.innerHeight),window.updateDebugConfig=ss,window.getDebugConfig=ls,window.copyConfig=xs,window.applyConfig=yt,window.applyConfigForRatio=ws,window.positionAtBottom=pr,window.positionAtTop=us,window.positionAtCenter=gs,window.positionAtLeft=hs,window.positionAtRight=fs,window.positionAtBottomLeft=ms,window.positionAtBottomRight=bs,window.positionAtTopLeft=ys,window.positionAtTopRight=vs,window.applyPositionContract=ps,console.log("\u{1F3AE} Debug Config Functions Available:"),console.log("\u2022 updateDebugConfig(category, key, value)"),console.log("\u2022 getDebugConfig()"),console.log("\u2022 copyConfig(presetName)"),console.log("\u2022 applyConfig(config)"),console.log("\u2022 applyConfigForRatio(width, height)"),console.log("\u{1F4CD} Positioning Helpers Available (with scale):"),console.log("\u2022 positionAtBottom(element, w, h, percent, scale)"),console.log("\u2022 positionAtTop(element, w, h, percent, scale)"),console.log("\u2022 positionAtCenter(element, w, h, offsetX, offsetY, scale)"),console.log("\u2022 positionAtLeft/Right(element, w, h, percent, scale)"),console.log("\u2022 Corner positions: BottomLeft/Right, TopLeft/Right (all with scale)"),console.log("\u2022 applyPositionContract(element, w, h, contract)"),console.log("Example: positionAtCenter(mySprite, 400, 600, 0, -50, 1.2)")}function Jt(n,e,t=0){return n*e+t}function Zt(n,e,t=0){return n*(1-e)+t}function Qt(n,e,t=0){return n*e+t}function ei(n,e,t=0){return n*(1-e)+t}function Z(n,e=0){return n/2+e}function ds(n,e){return n*e}function ps(n,e,t,i){var o,s,l,c,p,d,u,g,m,h,f,b,y,v,x,w,E,C,A,M;let a=0,r=0;switch(i.type){case"top":a=Z(e,(s=(o=i.offset)==null?void 0:o.x)!=null?s:0),r=Jt(t,i.percent,(c=(l=i.offset)==null?void 0:l.y)!=null?c:0);break;case"bottom":a=Z(e,(d=(p=i.offset)==null?void 0:p.x)!=null?d:0),r=Zt(t,i.percent,(g=(u=i.offset)==null?void 0:u.y)!=null?g:0);break;case"left":a=Qt(e,i.percent,(h=(m=i.offset)==null?void 0:m.x)!=null?h:0),r=Z(t,(b=(f=i.offset)==null?void 0:f.y)!=null?b:0);break;case"right":a=ei(e,i.percent,(v=(y=i.offset)==null?void 0:y.x)!=null?v:0),r=Z(t,(w=(x=i.offset)==null?void 0:x.y)!=null?w:0);break;case"center":a=Z(e,(C=(E=i.offset)==null?void 0:E.x)!=null?C:0),r=Z(t,(M=(A=i.offset)==null?void 0:A.y)!=null?M:0);break}n.position?n.position.set(a,r):(n.x=a,n.y=r),i.scale!==void 0&&i.scale!==1&&n.scale&&(typeof n.scale.set=="function"?n.scale.set(i.scale,i.scale):(n.scale.x=i.scale,n.scale.y=i.scale))}function pr(n,e,t,i=.2,a=1,r=!0,o=!1){let s=ds(t,i),l=Zt(t,i/2);fe(n,Z(e),l);let c=r?a*he.scaleFactor:a;me(n,c),o&&!bn.find(p=>p.element===n)&&rs(n,pr,e,t,i,a,r)}function us(n,e,t,i=.1,a=1){fe(n,Z(e),Jt(t,i)),me(n,a)}function gs(n,e,t,i=0,a=0,r=1){fe(n,Z(e,i),Z(t,a)),me(n,r)}function hs(n,e,t,i=.1,a=1){fe(n,Qt(e,i),Z(t)),me(n,a)}function fs(n,e,t,i=.1,a=1){fe(n,ei(e,i),Z(t)),me(n,a)}function ms(n,e,t,i=.05,a=.05,r=1){fe(n,Qt(e,a),Zt(t,i)),me(n,r)}function bs(n,e,t,i=.05,a=.05,r=1){fe(n,ei(e,a),Zt(t,i)),me(n,r)}function ys(n,e,t,i=.05,a=.05,r=1){fe(n,Qt(e,a),Jt(t,i)),me(n,r)}function vs(n,e,t,i=.05,a=.05,r=1){fe(n,ei(e,a),Jt(t,i)),me(n,r)}function fe(n,e,t){n&&n.position?typeof n.position.set=="function"?n.position.set(e,t):(n.position.x=e,n.position.y=t):n&&(n.x=e,n.y=t)}function me(n,e){e!==1&&n&&n.scale&&(typeof n.scale.set=="function"?n.scale.set(e,e):n.scale.x!==void 0&&n.scale.y!==void 0&&(n.scale.x=e,n.scale.y=e))}var Re={default:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:1,screen_scale_y:1},engine:{scale:1,background_scale:1.05,background_offset_y:0,background_alpha:.98,label_pulse_speed:3,label_pulse_intensity:.03}},wide:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:.9,screen_scale_y:1.1},engine:{scale:1,background_scale:1.1,background_offset_y:0,background_alpha:.95,label_pulse_speed:3,label_pulse_intensity:.03}},square:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:.85,screen_scale_y:.85},engine:{scale:1,background_scale:1,background_offset_y:0,background_alpha:1,label_pulse_speed:3,label_pulse_intensity:.03}},tall:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:1.1,screen_scale_y:.9},engine:{scale:1,background_scale:.95,background_offset_y:0,background_alpha:1,label_pulse_speed:3,label_pulse_intensity:.03}}};function xs(n){return n&&Re[n]?JSON.parse(JSON.stringify(Re[n])):JSON.parse(JSON.stringify(vt))}function yt(n){Object.keys(n).forEach(e=>{let t=e;vt[t]&&n[t]&&Object.assign(vt[t],n[t])}),console.log("Config applied:",n)}function ws(n,e){let t=n/e;t>1.6?(yt(Re.wide),console.log("Applied WIDE config for ratio:",t)):t<.7?(yt(Re.tall),console.log("Applied TALL config for ratio:",t)):t>.8&&t<1.2?(yt(Re.square),console.log("Applied SQUARE config for ratio:",t)):(yt(Re.default),console.log("Applied DEFAULT config for ratio:",t))}if(typeof window!="undefined"){let n=window;n.configPresets=Re,n.resolveAnchorVec2=n.resolveAnchorVec2||Xt,n.resolveScreenAnchorPoint=n.resolveScreenAnchorPoint||cr,n.resolveScreenRatioPoint=n.resolveScreenRatioPoint||dr}pi();function U(n,e){let t=(a,r)=>r===0?a:t(r,a%r),i=t(n,e);return`${n/i}:${e/i}`}var Nc=[{id:"iphone-15-pro-max",label:"iPhone 15 Pro Max",width:430,height:932,category:"iphone",ratio:U(430,932)},{id:"iphone-15-pro",label:"iPhone 15 Pro",width:393,height:852,category:"iphone",ratio:U(393,852)},{id:"iphone-15",label:"iPhone 15",width:393,height:852,category:"iphone",ratio:U(393,852)},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"iphone",ratio:U(390,844)},{id:"iphone-se",label:"iPhone SE",width:375,height:667,category:"iphone",ratio:U(375,667)},{id:"iphone-12-mini",label:"iPhone 12 Mini",width:360,height:780,category:"iphone",ratio:U(360,780)}],Hc=[{id:"pixel-8-pro",label:"Pixel 8 Pro",width:448,height:998,category:"android",ratio:U(448,998)},{id:"pixel-8",label:"Pixel 8",width:412,height:915,category:"android",ratio:U(412,915)},{id:"samsung-s24-ultra",label:"Samsung S24 Ultra",width:412,height:915,category:"android",ratio:U(412,915)},{id:"samsung-s24",label:"Samsung S24",width:360,height:780,category:"android",ratio:U(360,780)},{id:"samsung-a54",label:"Samsung A54",width:412,height:915,category:"android",ratio:U(412,915)},{id:"oneplus-12",label:"OnePlus 12",width:412,height:915,category:"android",ratio:U(412,915)}],Bc=[{id:"ipad-pro-12",label:'iPad Pro 12.9"',width:1024,height:1366,category:"tablet",ratio:U(1024,1366)},{id:"ipad-pro-11",label:'iPad Pro 11"',width:834,height:1194,category:"tablet",ratio:U(834,1194)},{id:"ipad-air",label:"iPad Air",width:820,height:1180,category:"tablet",ratio:U(820,1180)},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"tablet",ratio:U(768,1024)},{id:"samsung-tab-s9",label:"Samsung Tab S9",width:800,height:1280,category:"tablet",ratio:U(800,1280)}],_n=[{id:"playable-portrait",label:"Playable Portrait",width:320,height:480,category:"playable",ratio:"2:3",mraidScale:1},{id:"mraid-320x480",label:"MRAID 320\xD7480",width:320,height:480,category:"playable",ratio:"2:3",mraidScale:1},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"playable",ratio:U(390,844),mraidScale:.7},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"playable",ratio:U(768,1024),mraidScale:.7}];var Pn=[..._n],Mn=[{category:"playable",label:"Playable Ad",devices:_n}],ui=_n[0];function Ne(n){return Pn.find(e=>e.id===n)||ui}function Os(n){return Pn.filter(e=>e.category===n)}var gi=class{constructor(){this.root=null;this.listContainer=null;this.searchInput=null;this.selectedId=null;this.options=null;this.retryTimer=null;this.screenFilter="all"}getScreenFilterStorageKey(){return`handler_preview_screen_filter::${typeof window!="undefined"&&window.__HANDLER_PROJECT_ID||"default"}`}render(){return`
|
|
46
|
+
`,this.modal=i}attachModalListeners(){if(!this.modal)return;this.modal.querySelectorAll("[data-modal-close]").forEach(o=>{o.addEventListener("click",()=>this.close())}),this.modal.querySelectorAll("[data-tab]").forEach(o=>{o.addEventListener("click",s=>{let c=s.target.dataset.tab;c&&this.switchTab(c)})});let i=this.modal.querySelector("[data-ai-generate]");i==null||i.addEventListener("click",()=>{this.openAiEditor("generate")});let a=this.modal.querySelector("[data-ai-edit]");a==null||a.addEventListener("click",()=>{this.openAiEditor("edit")});let r=this.modal.querySelector("[data-modal-apply]");r==null||r.addEventListener("click",()=>{this.apply()}),this.modal.addEventListener("click",o=>{o.target===this.modal&&this.close()})}switchTab(e){if(!this.modal)return;this.modal.querySelectorAll("[data-tab]").forEach(a=>{a.classList.toggle("active",a.getAttribute("data-tab")===e)}),this.modal.querySelectorAll("[data-tab-panel]").forEach(a=>{a.classList.toggle("active",a.getAttribute("data-tab-panel")===e)})}openAiEditor(e){let t=window.__openAiEditor;if(typeof t!="function"){alert("AI Editor not available. Please check your setup.");return}let i="";e==="edit"&&this.currentAsset?i=`Edit this image: ${this.currentObjectId}`:i=`Create an image for: ${this.currentObjectId}`,t(this.currentObjectId||"unknown",i,this.currentAsset,{path:this.currentPath,onApply:a=>{this.onApplyCallback&&this.onApplyCallback(a),this.close()}})}apply(){this.onApplyCallback&&this.onApplyCallback("library/placeholder.png"),this.close()}close(){this.modal&&this.modal.parentNode&&this.modal.parentNode.removeChild(this.modal),this.modal=null,this.currentObjectId=null,this.currentPath=null,this.onApplyCallback=null}}});var pl={};ht(pl,{COLORS:()=>ce,ConfigWatcher:()=>ze,DebugPanel:()=>Ot,DefaultReloadStrategy:()=>St,Handler:()=>ie,PlayableLoadingScreen:()=>Ui,PreviewShell:()=>Hi,STROKE_WIDTH:()=>mo,THEME:()=>bo,applyConfigOverride:()=>Se,applyConfigOverrides:()=>Ce,applyConfigsToDisk:()=>ri,applyDefaults:()=>$e,baseLottie:()=>rn,bootstrap:()=>el,clearConfigOverrides:()=>se,clearConfigOverridesForObject:()=>vr,configOverrideManager:()=>xr,createPreviewShell:()=>da,deepClone:()=>G,default:()=>Oe,defaultPreset:()=>ui,deviceGroups:()=>Mn,devicePresets:()=>Pn,diffConfigs:()=>Sn,exportConfigsAsJSON:()=>De,getConfigOverrides:()=>Y,getConfigStateSummary:()=>ai,getOverrideMode:()=>wt,getPresetById:()=>Ne,getPresetsByCategory:()=>Os,loadAllObjectConfigs:()=>li,loadComponentSchemas:()=>si,loadEngineConfig:()=>ci,loadGamePromptConfig:()=>wn,loadObjectCentricConfig:()=>be,loadObjectConfig:()=>Le,loadSceneConfig:()=>di,rehydrateObject:()=>Cn,removeConfigOverride:()=>ni,resetToApplied:()=>Et,resetToOriginal:()=>oi,setBootstrapDependencies:()=>Zs,setOverrideMode:()=>yn,setupHotReload:()=>kn,setupLiveEditBridge:()=>Bi,toLegacyFormat:()=>En,validateObjectConfig:()=>Je});module.exports=zo(pl);var we={};function Ut(n,e,t=!1){we[n]||(we[n]=[]),we[n].push({fn:e,once:t})}function en(n,e){if(we[n]){if(!e){delete we[n];return}we[n]=we[n].filter(t=>t.fn!==e)}}function Gt(n,...e){let t=we[n];if(t)for(let i of[...t])i.fn(...e),i.once&&en(n,i.fn)}function X(n,e){Ut(n,e,!0)}var F=null,ee=[],Ve=null;function _a(n){F=n,ee=[],Ve!==null&&(clearTimeout(Ve),Ve=null)}function Pa(){var n,e,t;return{endpoint:(F==null?void 0:F.endpoint)||"",transport:(F==null?void 0:F.transport)||"beacon",batchSize:(n=F==null?void 0:F.batchSize)!=null?n:10,flushIntervalMs:(e=F==null?void 0:F.flushIntervalMs)!=null?e:300,maxQueue:(t=F==null?void 0:F.maxQueue)!=null?t:200,debug:!!(F!=null&&F.debug)}}async function Ta(n,e,t,i){let a=JSON.stringify(e);if(t==="beacon"&&typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function")try{let r=navigator.sendBeacon(n,new Blob([a],{type:"application/json"}));i&&console.log("[handler.telemetry] beacon",r,e);return}catch(r){i&&console.warn("[handler.telemetry] beacon failed, fallback to fetch",r)}try{await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:a,keepalive:!0}),i&&console.log("[handler.telemetry] fetch",e)}catch(r){i&&console.warn("[handler.telemetry] fetch failed",r)}}function tn(n,e){let t=Pa();if(e&&t.endpoint){if(ee.push(n),ee.length>t.maxQueue&&(ee=ee.slice(ee.length-t.maxQueue)),ee.length>=t.batchSize){ka();return}Ve===null&&(Ve=window.setTimeout(()=>{Ve=null,ka()},t.flushIntervalMs))}}async function ka(){let n=Pa();if(!n.endpoint||ee.length===0)return;let e=ee.splice(0,n.batchSize);await Ta(n.endpoint,{events:e},n.transport,n.debug),ee.length>0&&await Ta(n.endpoint,{events:ee.splice(0,n.batchSize)},n.transport,n.debug)}function Ma(n){return Math.max(0,Math.min(1,n))}function No(n){let e=String(n!=null?n:"power2.out");if(e==="linear")return t=>t;if(e==="sine.inOut")return t=>.5-Math.cos(Math.PI*t)/2;if(e==="power2.out"||e==="easeOutQuad")return t=>1-(1-t)*(1-t);if(e.startsWith("back.out")){let t=e.match(/back\.out\(([\d.]+)\)/),i=t?Number(t[1]):1.8;return a=>1+(i+1)*Math.pow(a-1,3)+i*Math.pow(a-1,2)}return t=>1-(1-t)*(1-t)}function ft(){return typeof performance!="undefined"&&performance.now?performance.now():Date.now()}function Ho(n,e){let t=n==null?void 0:n[e];return typeof t=="number"?t:0}function Oa(n,e,t){try{n[e]=t}catch{}}function Bo(n){let e=n==null?void 0:n.scale;if(!e)return null;let t=typeof e.x=="number"?e.x:1,i=typeof e.y=="number"?e.y:1;return{x:t,y:i}}function Ia(n,e){let t=n==null?void 0:n.scale;if(t)try{typeof t.set=="function"?t.set(e.x,e.y):(typeof t.x=="number"&&(t.x=e.x),typeof t.y=="number"&&(t.y=e.y))}catch{}}function ja(n,e){let t=Bo(n);if(!t)return{from:null,to:null};let i=null,a=null;return typeof e.scale=="number"?(i=e.scale,a=e.scale):e.scale&&typeof e.scale=="object"&&(typeof e.scale.x=="number"&&(i=e.scale.x),typeof e.scale.y=="number"&&(a=e.scale.y)),typeof e.scaleX=="number"&&(i=e.scaleX),typeof e.scaleY=="number"&&(a=e.scaleY),i===null&&a===null?{from:null,to:null}:{from:{x:t.x,y:t.y},to:{x:i!=null?i:t.x,y:a!=null?a:t.y}}}function Ra(){let n=new Set,e=new WeakMap,t=null,i=()=>{if(t!=null)return;t=requestAnimationFrame(()=>{t=null,s(),n.size>0&&i()})},a=p=>{var u;n.add(p);let d=(u=e.get(p.target))!=null?u:new Set;d.add(p),e.set(p.target,d),i()},r=p=>{n.delete(p);let d=e.get(p.target);d&&(d.delete(p),d.size===0&&e.delete(p.target))},o=p=>{p.killed||(p.killed=!0,r(p))},s=()=>{var d,u;let p=ft();for(let g of Array.from(n)){if(g.killed||g.paused)continue;let m=p-g.startMs-g.delayMs;if(m<0)continue;let h=g.durationMs>0?m/g.durationMs:1,f=Ma(h),b=g.repeat>=0?g.repeat+1:1,y=g.repeat>0?Math.min(Math.floor(h),b-1):0;if(g.repeat>0&&h>=1){let w=h-y;f=Ma(w)}let v=g.ease(f);g.yoyo&&y%2===1&&(v=1-v);for(let w of g.props)Oa(g.target,w.key,w.from+(w.to-w.from)*v);g.scaleFrom&&g.scaleTo&&Ia(g.target,{x:g.scaleFrom.x+(g.scaleTo.x-g.scaleFrom.x)*v,y:g.scaleFrom.y+(g.scaleTo.y-g.scaleFrom.y)*v});try{(d=g.onUpdate)==null||d.call(g)}catch{}if(h>=b){o(g);try{(u=g.onComplete)==null||u.call(g)}catch{}}}},l=(p,d,u)=>{var w;let g=Math.max(0,(typeof d.duration=="number"?d.duration:.5)*1e3),m=Math.max(0,(typeof d.delay=="number"?d.delay:0)*1e3+((w=u==null?void 0:u.delayMsOverride)!=null?w:0)),h=No(d.ease),f=typeof d.repeat=="number"?Math.max(0,d.repeat|0):0,b=d.yoyo===!0,y=new Set(["duration","delay","ease","repeat","yoyo","onUpdate","onComplete","scale","scaleX","scaleY"]),v=[];for(let E of Object.keys(d)){if(y.has(E))continue;let C=d[E];typeof C=="number"&&v.push({key:E,from:Ho(p,E),to:C})}let x=ja(p,d);return{target:p,startMs:ft(),delayMs:m,durationMs:g,ease:h,props:v,scaleFrom:x.from,scaleTo:x.to,repeat:f,yoyo:b,onUpdate:typeof d.onUpdate=="function"?d.onUpdate:void 0,onComplete:typeof d.onComplete=="function"?d.onComplete:void 0,killed:!1,paused:!1,pauseAtMs:null}},c={to(p,d){let u=l(p,d);return a(u),{kill:()=>o(u),pause:()=>{u.paused||(u.paused=!0,u.pauseAtMs=ft())},resume:()=>{var h;if(!u.paused)return;let g=(h=u.pauseAtMs)!=null?h:ft(),m=ft()-g;u.startMs+=m,u.paused=!1,u.pauseAtMs=null},isActive:()=>!u.killed&&!u.paused}},fromTo(p,d,u){return c.set(p,d),c.to(p,u)},set(p,d){if(!p||!d)return;for(let g of Object.keys(d)){let m=d[g];g==="scale"||g==="scaleX"||g==="scaleY"||typeof m=="number"&&Oa(p,g,m)}let u=ja(p,d);u.to&&Ia(p,u.to)},killTweensOf(p){let d=e.get(p);if(d)for(let u of Array.from(d))o(u)},timeline(p={}){let d=[],u=0,g=!1,m=[],h=y=>{if(typeof y=="number")return Math.max(0,y*1e3);let v=typeof y=="string"?y.trim():"";return v.startsWith("+=")?u+Math.max(0,Number(v.slice(2))*1e3||0):v?Math.max(0,Number(v)*1e3||0):u},f=y=>{d.push(y);let v=Math.max(0,(typeof y.vars.duration=="number"?y.vars.duration:.5)*1e3);u=Math.max(u,y.atMs+v)},b={to(y,v,x){return f({kind:"to",target:y,vars:v,atMs:h(x)}),b},fromTo(y,v,x,w){return f({kind:"fromTo",target:y,vars:x,from:v,atMs:h(w)}),b},play(){var y,v;if(g)return b;g=!0,m=[];for(let x of d)x.kind==="fromTo"&&c.set(x.target,(y=x.from)!=null?y:{}),m.push(c.to(x.target,{...x.vars,delay:x.atMs/1e3+((v=x.vars.delay)!=null?v:0)}));return b},pause(){for(let y of m)y.pause();return b},kill(){for(let y of m)y.kill();m=[],g=!1}};return p.paused||b.play(),b}};return c}function Da(){if(typeof window=="undefined")return;let n=window;if(!n.gsap)try{n.gsap=Ra()}catch{}}var $a={name:"handler-playable-sdk",version:"0.4.59",type:"module",description:"Handler Playable SDK v0.1 with contract-aligned surface (root sandbox, canonical event envelope).",main:"dist/index.cjs",module:"dist/index.js",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs"},"./pixi":{types:"./dist/pixi/index.d.ts",import:"./dist/pixi/index.js",require:"./dist/pixi/index.cjs"},"./pixi/index.css":{import:"./dist/pixi/index.css",require:"./dist/pixi/index.css"},"./three":{types:"./dist/three/index.d.ts",import:"./dist/three/index.js",require:"./dist/three/index.cjs"},"./cli":{types:"./dist/cli/index.d.ts",import:"./dist/cli/index.js",require:"./dist/cli/index.cjs"}},bin:{"handler-student-helper":"./bin/student-helper.mjs","handler-validate":"./bin/validate.mjs","handler-sync-screens":"./bin/sync-screens.mjs","handler-brand-dna":"./bin/brand-dna.mjs","handler-setup-library":"./bin/setup-library.mjs","handler-screen-helper":"./bin/screen-helper.mjs"},scripts:{prebuild:"python3 src/preview/build-css.py",build:"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --minify --external lottie-web && npm run create-mjs-symlinks && npm run postbuild-cli && npm run obfuscate && npm run postbuild",postbuild:"python3 src/preview/copy-css-to-dist.py","postbuild-cli":"cp src/cli/*.mjs dist/cli/ && chmod +x dist/cli/*.mjs && chmod +x bin/*.mjs","create-mjs-symlinks":"cd dist && ln -sf index.js index.mjs && cd pixi && ln -sf index.js index.mjs && cd ../three && ln -sf index.js index.mjs","build:dev":"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --external lottie-web && npm run create-mjs-symlinks && npm run postbuild-cli",obfuscate:"javascript-obfuscator dist/pixi/index.js --output dist/pixi/index.js --config obfuscator.config.json && javascript-obfuscator dist/three/index.js --output dist/three/index.js --config obfuscator.config.json && javascript-obfuscator dist/cli/index.js --output dist/cli/index.js --config obfuscator.config.json && npm run obfuscate-cli","obfuscate-cli":'for file in dist/cli/*.mjs; do javascript-obfuscator "$file" --output "$file" --config obfuscator.config.json; done',lint:"eslint 'src/**/*.{ts,tsx}'",typecheck:"tsc --noEmit",prepublishOnly:"npm run build","publish:update":"node scripts/publish-and-update.cjs patch","publish:update:minor":"node scripts/publish-and-update.cjs minor","publish:update:major":"node scripts/publish-and-update.cjs major"},author:"Handler",license:"MIT",publishConfig:{access:"public"},repository:{type:"git",url:"https://github.com/HandlerAIGames/handler-playable-sdk.git"},files:["dist","bin","LICENSE","README.md"],peerDependencies:{"lottie-web":"^5.0.0","pixi.js":"^8.0.0",three:"^0.182.0"},peerDependenciesMeta:{"pixi.js":{optional:!0},three:{optional:!0},"lottie-web":{optional:!0}},devDependencies:{"@types/three":"^0.182.0",eslint:"^9.39.2","javascript-obfuscator":"^5.1.0","pixi.js":"8.8.1",three:"^0.182.0","ts-node":"^10.9.2",tsup:"^8.4.0",typescript:"^5.7.2","typescript-eslint":"^8.53.0"},dependencies:{"@google/genai":"^1.35.0","@google/generative-ai":"^0.24.1",jszip:"^3.10.1",sharp:"^0.34.5"}};var J=0,Uo=J++,za=J++,Na=J++,Ha=J++,Ba=J++,Fa=J++,Ua=J++,Ga=J++,qa=J++,Va=J++,Wa=J++,Ya=J++,H=Uo;function Ka(){return H===za}function Xa(){return H===Na}function Ja(){return H===Ha}function Za(){return H===Ba}function We(){return H===Fa}function Ye(){return H===Ua}function Qa(){return H===Ga}function er(){return H===qa}function tr(){return H===Va}function nn(){return H===Wa}function an(){return H===Ya}function ir(){let n=typeof AD_PROTOCOL!="undefined"?AD_PROTOCOL:"none",e=typeof AD_NETWORK!="undefined"?AD_NETWORK:"web_embed";if(n==="mraid")try{mraid.getState(),H=za;return}catch{}else if(n==="dapi")try{dapi.isReady(),H=Na;return}catch{}if(e==="facebook")try{typeof FbPlayableAd!="undefined"&&(H=Ha)}catch{}else if(e==="google")try{typeof ExitApi!="undefined"&&(H=Ba)}catch{}else if(e==="mintegral")window.gameReady&&(H=Fa);else if(e==="tapjoy")window.TJ_API&&(H=Ua);else if(e==="tiktok")window.openAppStore&&(H=Ga);else if(e==="smadex")try{window.smxTracking&&(H=qa)}catch{}else if(e==="snapchat")try{window.ScPlayableAd&&(H=Va)}catch{}else e==="vungle"?H=Wa:(n==="nucleo"||e==="nucleo")&&(H=Ya)}var qt=qe(require("lottie-web"),1),rn=qt.default;typeof window!="undefined"&&(window.lottie=qt.default,window.__baseLottie=qt.default);var Go=require("pixi.js");var on=require("pixi.js");var qo=null;function sn(n){qo=n}Vt();ln();var mt=require("pixi.js");Vt();var Jo=typeof __BUILD_MODE__!="undefined"?__BUILD_MODE__:"undefined",un=Jo;if(typeof window!="undefined")try{let n=new XMLHttpRequest;if(n.open("GET","./build-settings.json",!1),n.send(),n.status===200&&n.responseText){let e=JSON.parse(n.responseText);e!=null&&e.buildMode&&(un=e.buildMode,console.log(`[ObjectFactory] Build mode overridden by settings: ${un}`))}}catch{}function Zo(n){var t,i,a,r,o;if(typeof window!="undefined"&&window.resolveAnchorVec2)return window.resolveAnchorVec2(n);let e={center:{x:.5,y:.5},"top-left":{x:0,y:0},"top-center":{x:.5,y:0},"top-right":{x:1,y:0},"center-left":{x:0,y:.5},"center-right":{x:1,y:.5},"bottom-left":{x:0,y:1},"bottom-center":{x:.5,y:1},"bottom-right":{x:1,y:1},left:{x:0,y:.5},right:{x:1,y:.5},top:{x:.5,y:0},bottom:{x:.5,y:1}};if(Array.isArray(n))return{x:(t=n[0])!=null?t:.5,y:(i=n[1])!=null?i:.5};if(n&&typeof n=="object"&&"x"in n&&"y"in n)return{x:(a=n.x)!=null?a:.5,y:(r=n.y)!=null?r:.5};if(typeof n=="string"){let s=n.trim().toLowerCase();return(o=e[s])!=null?o:{x:.5,y:.5}}return null}var Ae=class{static async create(e,t,i){var l,c,p,d,u,g,m;console.log(`[ObjectFactory] create() called for: ${e}, __BUILD_MODE__: ${un}`);let a=(l=t==null?void 0:t.render)==null?void 0:l.asset;if(!a){console.log(`[ObjectFactory] No asset definition for: ${e}, returning empty container`);let h=new mt.Container;return this.applyTransform(h,t==null?void 0:t.transform,t),h}let r=(c=t==null?void 0:t.identity)==null?void 0:c.id;console.log(`[ObjectFactory] Calling AssetLoader.load() for: ${e}, configId: ${r}, type: ${a.type}, path: ${a.path}`);let o=await je.load(e,a,i,r);console.log(`[ObjectFactory] AssetLoader.load() completed for: ${e}, rawAsset type: ${(p=o==null?void 0:o.constructor)==null?void 0:p.name}`);let s;if(a.type==="image")console.log("[ObjectFactory] Creating Sprite from texture:",o,"for object:",e),s=new mt.Sprite(o),console.log("[ObjectFactory] Created object:",s,"type:",(d=s==null?void 0:s.constructor)==null?void 0:d.name),this.applyTransform(s,t==null?void 0:t.transform,t);else if(a.type==="json")if(console.log("[ObjectFactory] JSON asset for",e,"rawAsset type:",(u=o==null?void 0:o.constructor)==null?void 0:u.name,o),o&&(((g=o.constructor)==null?void 0:g.name)==="Container"||o instanceof mt.Container)){console.warn("[ObjectFactory] JSON asset is Container (from cache), reloading JSON directly");let h=[a.path,`/assets/${a.path}`,`assets/${a.path}`,`../assets/${a.path}`],f=!1;for(let b of h)try{let y=await fetch(b);if(y.ok){s=await y.json(),console.log("[ObjectFactory] Reloaded JSON directly from:",b,"type:",(m=s==null?void 0:s.constructor)==null?void 0:m.name),f=!0;break}}catch{continue}f||(console.error("[ObjectFactory] Failed to reload JSON from any path"),s=o)}else s=o;else s=o,s&&typeof s=="object"&&("x"in s||"position"in s)&&this.applyTransform(s,t==null?void 0:t.transform,t);return s}static applyTransform(e,t,i){var a,r,o,s;if(!(!t||!e)&&(t.position&&("x"in e&&"y"in e?(e.x=(a=t.position.x)!=null?a:0,e.y=(r=t.position.y)!=null?r:0):"position"in e&&e.position&&e.position.set((o=t.position.x)!=null?o:0,(s=t.position.y)!=null?s:0)),t.scale!==void 0&&"scale"in e&&e.scale&&(typeof e.scale=="object"&&"set"in e.scale?e.scale.set(t.scale):e.scale=t.scale),t.rotation!==void 0&&"rotation"in e&&(e.rotation=t.rotation),t.anchor&&"anchor"in e&&e.anchor)){let l=Zo(t.anchor);l&&("set"in e.anchor?e.anchor.set(l.x,l.y):(e.anchor.x=l.x,e.anchor.y=l.y))}}};var bt=class{constructor(){this.config=null}init(e){this.config=e}get(e){if(!this.config)throw new Error("RuntimeObjectRegistry not initialized. Call init() first.");return this.config.objects.get(e)}getAllIds(){if(!this.config)throw new Error("RuntimeObjectRegistry not initialized. Call init() first.");return Array.from(this.config.objects.keys())}has(e){return this.config?this.config.objects.has(e):!1}};var ts=qe(require("pixi.js"),1);typeof window!="undefined"&&(window.__basePixi=ts);Ke();var Wt=require("pixi.js");Ke();var fn=class{constructor(){this.instanceCache=new Map;this.readyPromise=null;this.app=null;this.registry=new bt}init(e,t){this.registry.init(e),this.app=t}updateConfig(e){this.registry.init(e),this.instanceCache.clear(),this.readyPromise=null}async ready(){this.readyPromise&&await this.readyPromise;let t=this.registry.getAllIds().filter(a=>!this.instanceCache.has(a));if(t.length===0)return;let i=async a=>{a.length&&(console.log("[Assets] Loading objects:",a),await Promise.all(a.map(async r=>{var s;let o=this.registry.get(r);if(!o){console.warn("[Assets] No config found for object:",r);return}try{let l=await Ae.create(r,o,this.app);this.instanceCache.set(r,l),console.log("[Assets] Loaded object:",r,(s=l==null?void 0:l.constructor)==null?void 0:s.name)}catch(l){console.error("[Assets] Failed to load object:",r,l)}})))};return this.readyPromise=(async()=>{await i(t);let a=this.registry.getAllIds().filter(r=>!this.instanceCache.has(r));a.length>0&&(console.warn("[Assets] Retrying missing assets:",a),await i(a)),console.log("[Assets] Ready. Cached objects:",Array.from(this.instanceCache.keys()))})(),this.readyPromise}resetScene(){this.instanceCache.clear(),this.readyPromise=null}async reloadObject(e){let t=this.registry.get(e);if(t){let i=await Ae.create(e,t,this.app);this.instanceCache.set(e,i)}}get(e){return this.instanceCache.get(e)}},is=new fn,ns=new Proxy(is,{get(n,e){if(e in n&&typeof n[e]=="function")return n[e].bind(n);if(n.get(e))return n.get(e)}});Ke();var lr=require("pixi.js"),he={width:400,height:600,designWidth:400,scaleFactor:1},Kt={scale:1,position:1},bn=[];function rs(n,e,t,i,a,r,o){bn.push({element:n,originalScale:r,positionHelper:e,heightPercent:a}),e(n,t,i,a,r,o,!1)}function os(){bn.forEach(({element:n,originalScale:e,positionHelper:t,heightPercent:i})=>{let a=e*he.scaleFactor;t(n,he.width,he.height,i,a,!0,!1)})}function mn(n,e){console.log(`[SCREEN] updateScreenState called: ${n}x${e}`),he.width=n,he.height=e,he.scaleFactor=Math.min(n/he.designWidth,1.15),Kt.scale=he.scaleFactor,Kt.position=1,console.log(`[SCREEN] Global multipliers - scale: ${Kt.scale.toFixed(3)}`),os()}var vt={layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:1,screen_scale_y:1},engine:{scale:1,background_scale:1.05,background_offset_y:0,background_alpha:.98,label_pulse_speed:3,label_pulse_intensity:.03}};function ss(n,e,t){let i=vt[n];i&&i[e]!==void 0&&(i[e]=t,console.log(`Updated ${n}.${e} = ${t}`))}function ls(){return vt}var cs={center:{x:.5,y:.5},"center-center":{x:.5,y:.5},middle:{x:.5,y:.5},"middle-center":{x:.5,y:.5},"top-left":{x:0,y:0},"top-center":{x:.5,y:0},"top-right":{x:1,y:0},"bottom-left":{x:0,y:1},"bottom-center":{x:.5,y:1},"bottom-right":{x:1,y:1},"left-center":{x:0,y:.5},"right-center":{x:1,y:.5},"center-left":{x:0,y:.5},"center-right":{x:1,y:.5},left:{x:0,y:.5},right:{x:1,y:.5},top:{x:.5,y:0},bottom:{x:.5,y:1}};function Yt(n,e){return typeof n=="number"&&Number.isFinite(n)?n:e}function Xt(n,e={x:.5,y:.5}){var t;if(Array.isArray(n))return{x:Yt(n[0],e.x),y:Yt(n[1],e.y)};if(n&&typeof n=="object"){let i=n;return{x:Yt(i.x,e.x),y:Yt(i.y,e.y)}}if(typeof n=="string"){let i=n.trim().toLowerCase();return(t=cs[i])!=null?t:e}return e}function cr(n,e,t,i={}){var g,m,h,f,b,y;let a=Xt(t),r=(g=i.inset)!=null?g:{},o=(m=i.padding)!=null?m:{x:0,y:0},s=((h=r.left)!=null?h:0)+o.x,l=((f=r.right)!=null?f:0)+o.x,c=((b=r.top)!=null?b:0)+o.y,p=((y=r.bottom)!=null?y:0)+o.y,d=Math.max(0,n-s-l),u=Math.max(0,e-c-p);return{x:s+d*a.x,y:c+u*a.y}}function dr(n,e,t,i={}){var h,f,b,y,v,x;let a=(h=i.inset)!=null?h:{},r=(f=i.padding)!=null?f:{x:0,y:0},o=((b=a.left)!=null?b:0)+r.x,s=((y=a.right)!=null?y:0)+r.x,l=((v=a.top)!=null?v:0)+r.y,c=((x=a.bottom)!=null?x:0)+r.y,p=Math.max(0,n-o-s),d=Math.max(0,e-l-c),u=Xt(t,{x:.5,y:.5}),g=Math.min(Math.max(u.x,0),1),m=Math.min(Math.max(u.y,0),1);return{x:o+p*g,y:l+d*m}}if(typeof window!="undefined"){let n=window.innerWidth,e=window.innerHeight,t=()=>{let i=window.innerWidth,a=window.innerHeight;(i!==n||a!==e)&&(n=i,e=a,mn(i,a))};window.addEventListener("resize",t),window.addEventListener("orientationchange",()=>{setTimeout(t,100)}),window.mraid&&(window.mraid.addEventListener("viewableChange",t),window.mraid.addEventListener("sizeChange",t)),mn(window.innerWidth,window.innerHeight),window.updateDebugConfig=ss,window.getDebugConfig=ls,window.copyConfig=xs,window.applyConfig=yt,window.applyConfigForRatio=ws,window.positionAtBottom=pr,window.positionAtTop=us,window.positionAtCenter=gs,window.positionAtLeft=hs,window.positionAtRight=fs,window.positionAtBottomLeft=ms,window.positionAtBottomRight=bs,window.positionAtTopLeft=ys,window.positionAtTopRight=vs,window.applyPositionContract=ps,console.log("\u{1F3AE} Debug Config Functions Available:"),console.log("\u2022 updateDebugConfig(category, key, value)"),console.log("\u2022 getDebugConfig()"),console.log("\u2022 copyConfig(presetName)"),console.log("\u2022 applyConfig(config)"),console.log("\u2022 applyConfigForRatio(width, height)"),console.log("\u{1F4CD} Positioning Helpers Available (with scale):"),console.log("\u2022 positionAtBottom(element, w, h, percent, scale)"),console.log("\u2022 positionAtTop(element, w, h, percent, scale)"),console.log("\u2022 positionAtCenter(element, w, h, offsetX, offsetY, scale)"),console.log("\u2022 positionAtLeft/Right(element, w, h, percent, scale)"),console.log("\u2022 Corner positions: BottomLeft/Right, TopLeft/Right (all with scale)"),console.log("\u2022 applyPositionContract(element, w, h, contract)"),console.log("Example: positionAtCenter(mySprite, 400, 600, 0, -50, 1.2)")}function Jt(n,e,t=0){return n*e+t}function Zt(n,e,t=0){return n*(1-e)+t}function Qt(n,e,t=0){return n*e+t}function ei(n,e,t=0){return n*(1-e)+t}function Z(n,e=0){return n/2+e}function ds(n,e){return n*e}function ps(n,e,t,i){var o,s,l,c,p,d,u,g,m,h,f,b,y,v,x,w,E,C,A,M;let a=0,r=0;switch(i.type){case"top":a=Z(e,(s=(o=i.offset)==null?void 0:o.x)!=null?s:0),r=Jt(t,i.percent,(c=(l=i.offset)==null?void 0:l.y)!=null?c:0);break;case"bottom":a=Z(e,(d=(p=i.offset)==null?void 0:p.x)!=null?d:0),r=Zt(t,i.percent,(g=(u=i.offset)==null?void 0:u.y)!=null?g:0);break;case"left":a=Qt(e,i.percent,(h=(m=i.offset)==null?void 0:m.x)!=null?h:0),r=Z(t,(b=(f=i.offset)==null?void 0:f.y)!=null?b:0);break;case"right":a=ei(e,i.percent,(v=(y=i.offset)==null?void 0:y.x)!=null?v:0),r=Z(t,(w=(x=i.offset)==null?void 0:x.y)!=null?w:0);break;case"center":a=Z(e,(C=(E=i.offset)==null?void 0:E.x)!=null?C:0),r=Z(t,(M=(A=i.offset)==null?void 0:A.y)!=null?M:0);break}n.position?n.position.set(a,r):(n.x=a,n.y=r),i.scale!==void 0&&i.scale!==1&&n.scale&&(typeof n.scale.set=="function"?n.scale.set(i.scale,i.scale):(n.scale.x=i.scale,n.scale.y=i.scale))}function pr(n,e,t,i=.2,a=1,r=!0,o=!1){let s=ds(t,i),l=Zt(t,i/2);fe(n,Z(e),l);let c=r?a*he.scaleFactor:a;me(n,c),o&&!bn.find(p=>p.element===n)&&rs(n,pr,e,t,i,a,r)}function us(n,e,t,i=.1,a=1){fe(n,Z(e),Jt(t,i)),me(n,a)}function gs(n,e,t,i=0,a=0,r=1){fe(n,Z(e,i),Z(t,a)),me(n,r)}function hs(n,e,t,i=.1,a=1){fe(n,Qt(e,i),Z(t)),me(n,a)}function fs(n,e,t,i=.1,a=1){fe(n,ei(e,i),Z(t)),me(n,a)}function ms(n,e,t,i=.05,a=.05,r=1){fe(n,Qt(e,a),Zt(t,i)),me(n,r)}function bs(n,e,t,i=.05,a=.05,r=1){fe(n,ei(e,a),Zt(t,i)),me(n,r)}function ys(n,e,t,i=.05,a=.05,r=1){fe(n,Qt(e,a),Jt(t,i)),me(n,r)}function vs(n,e,t,i=.05,a=.05,r=1){fe(n,ei(e,a),Jt(t,i)),me(n,r)}function fe(n,e,t){n&&n.position?typeof n.position.set=="function"?n.position.set(e,t):(n.position.x=e,n.position.y=t):n&&(n.x=e,n.y=t)}function me(n,e){e!==1&&n&&n.scale&&(typeof n.scale.set=="function"?n.scale.set(e,e):n.scale.x!==void 0&&n.scale.y!==void 0&&(n.scale.x=e,n.scale.y=e))}var Re={default:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:1,screen_scale_y:1},engine:{scale:1,background_scale:1.05,background_offset_y:0,background_alpha:.98,label_pulse_speed:3,label_pulse_intensity:.03}},wide:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:.9,screen_scale_y:1.1},engine:{scale:1,background_scale:1.1,background_offset_y:0,background_alpha:.95,label_pulse_speed:3,label_pulse_intensity:.03}},square:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:.85,screen_scale_y:.85},engine:{scale:1,background_scale:1,background_offset_y:0,background_alpha:1,label_pulse_speed:3,label_pulse_intensity:.03}},tall:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:1.1,screen_scale_y:.9},engine:{scale:1,background_scale:.95,background_offset_y:0,background_alpha:1,label_pulse_speed:3,label_pulse_intensity:.03}}};function xs(n){return n&&Re[n]?JSON.parse(JSON.stringify(Re[n])):JSON.parse(JSON.stringify(vt))}function yt(n){Object.keys(n).forEach(e=>{let t=e;vt[t]&&n[t]&&Object.assign(vt[t],n[t])}),console.log("Config applied:",n)}function ws(n,e){let t=n/e;t>1.6?(yt(Re.wide),console.log("Applied WIDE config for ratio:",t)):t<.7?(yt(Re.tall),console.log("Applied TALL config for ratio:",t)):t>.8&&t<1.2?(yt(Re.square),console.log("Applied SQUARE config for ratio:",t)):(yt(Re.default),console.log("Applied DEFAULT config for ratio:",t))}if(typeof window!="undefined"){let n=window;n.configPresets=Re,n.resolveAnchorVec2=n.resolveAnchorVec2||Xt,n.resolveScreenAnchorPoint=n.resolveScreenAnchorPoint||cr,n.resolveScreenRatioPoint=n.resolveScreenRatioPoint||dr}pi();function U(n,e){let t=(a,r)=>r===0?a:t(r,a%r),i=t(n,e);return`${n/i}:${e/i}`}var Nc=[{id:"iphone-15-pro-max",label:"iPhone 15 Pro Max",width:430,height:932,category:"iphone",ratio:U(430,932)},{id:"iphone-15-pro",label:"iPhone 15 Pro",width:393,height:852,category:"iphone",ratio:U(393,852)},{id:"iphone-15",label:"iPhone 15",width:393,height:852,category:"iphone",ratio:U(393,852)},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"iphone",ratio:U(390,844)},{id:"iphone-se",label:"iPhone SE",width:375,height:667,category:"iphone",ratio:U(375,667)},{id:"iphone-12-mini",label:"iPhone 12 Mini",width:360,height:780,category:"iphone",ratio:U(360,780)}],Hc=[{id:"pixel-8-pro",label:"Pixel 8 Pro",width:448,height:998,category:"android",ratio:U(448,998)},{id:"pixel-8",label:"Pixel 8",width:412,height:915,category:"android",ratio:U(412,915)},{id:"samsung-s24-ultra",label:"Samsung S24 Ultra",width:412,height:915,category:"android",ratio:U(412,915)},{id:"samsung-s24",label:"Samsung S24",width:360,height:780,category:"android",ratio:U(360,780)},{id:"samsung-a54",label:"Samsung A54",width:412,height:915,category:"android",ratio:U(412,915)},{id:"oneplus-12",label:"OnePlus 12",width:412,height:915,category:"android",ratio:U(412,915)}],Bc=[{id:"ipad-pro-12",label:'iPad Pro 12.9"',width:1024,height:1366,category:"tablet",ratio:U(1024,1366)},{id:"ipad-pro-11",label:'iPad Pro 11"',width:834,height:1194,category:"tablet",ratio:U(834,1194)},{id:"ipad-air",label:"iPad Air",width:820,height:1180,category:"tablet",ratio:U(820,1180)},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"tablet",ratio:U(768,1024)},{id:"samsung-tab-s9",label:"Samsung Tab S9",width:800,height:1280,category:"tablet",ratio:U(800,1280)}],_n=[{id:"playable-portrait",label:"Playable Portrait",width:320,height:480,category:"playable",ratio:"2:3",mraidScale:1},{id:"mraid-320x480",label:"MRAID 320\xD7480",width:320,height:480,category:"playable",ratio:"2:3",mraidScale:1},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"playable",ratio:U(390,844),mraidScale:.7},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"playable",ratio:U(768,1024),mraidScale:.7}];var Pn=[..._n],Mn=[{category:"playable",label:"Playable Ad",devices:_n}],ui=_n[0];function Ne(n){return Pn.find(e=>e.id===n)||ui}function Os(n){return Pn.filter(e=>e.category===n)}var gi=class{constructor(){this.root=null;this.listContainer=null;this.searchInput=null;this.selectedId=null;this.options=null;this.retryTimer=null;this.screenFilter="all"}getScreenFilterStorageKey(){return`handler_preview_screen_filter::${typeof window!="undefined"&&window.__HANDLER_PROJECT_ID||"default"}`}render(){return`
|
|
47
47
|
<div class="scene-panel scene-objects panel-accent-teal" data-panel="scene-objects">
|
|
48
48
|
<div class="scene-panel-header" data-panel-handle>
|
|
49
49
|
<div class="panel-title">
|
package/dist/index.css
CHANGED
|
@@ -2771,7 +2771,7 @@
|
|
|
2771
2771
|
}
|
|
2772
2772
|
|
|
2773
2773
|
.preview-shell.layout-fixed .debug-workbench {
|
|
2774
|
-
position:
|
|
2774
|
+
position: relative;
|
|
2775
2775
|
grid-column: 3;
|
|
2776
2776
|
grid-row: 1;
|
|
2777
2777
|
width: 350px;
|
|
@@ -2782,6 +2782,7 @@
|
|
|
2782
2782
|
border-right: none;
|
|
2783
2783
|
border-bottom: none;
|
|
2784
2784
|
box-shadow: none;
|
|
2785
|
+
overflow: visible;
|
|
2785
2786
|
top: 0 !important;
|
|
2786
2787
|
left: 0 !important;
|
|
2787
2788
|
right: 0 !important;
|
|
@@ -2790,7 +2791,7 @@
|
|
|
2790
2791
|
}
|
|
2791
2792
|
|
|
2792
2793
|
.preview-shell.layout-fixed .scene-panel.scene-objects {
|
|
2793
|
-
position:
|
|
2794
|
+
position: relative;
|
|
2794
2795
|
grid-column: 1;
|
|
2795
2796
|
grid-row: 1;
|
|
2796
2797
|
width: 300px;
|
|
@@ -2801,6 +2802,7 @@
|
|
|
2801
2802
|
border-left: none;
|
|
2802
2803
|
border-bottom: none;
|
|
2803
2804
|
box-shadow: none;
|
|
2805
|
+
overflow: visible;
|
|
2804
2806
|
top: 0 !important;
|
|
2805
2807
|
left: 0 !important;
|
|
2806
2808
|
right: 0 !important;
|
|
@@ -2849,9 +2851,22 @@
|
|
|
2849
2851
|
display: none !important;
|
|
2850
2852
|
}
|
|
2851
2853
|
|
|
2854
|
+
.preview-shell.layout-fixed .panel-resize-handle-v {
|
|
2855
|
+
position: absolute !important;
|
|
2856
|
+
top: 0 !important;
|
|
2857
|
+
bottom: 0 !important;
|
|
2858
|
+
right: 0 !important;
|
|
2859
|
+
left: auto !important;
|
|
2860
|
+
width: 4px !important;
|
|
2861
|
+
}
|
|
2862
|
+
|
|
2852
2863
|
.preview-shell.layout-fixed .workbench-resize-handle-v {
|
|
2864
|
+
position: absolute !important;
|
|
2865
|
+
top: 0 !important;
|
|
2866
|
+
bottom: 0 !important;
|
|
2853
2867
|
left: 0 !important;
|
|
2854
2868
|
right: auto !important;
|
|
2869
|
+
width: 4px !important;
|
|
2855
2870
|
}
|
|
2856
2871
|
|
|
2857
2872
|
/* Bottom Dock Styles */
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as F,F as G,G as H,H as I,I as J,J as K,K as L,L as M,M as N,N as O,O as P,P as Q,Q as R,R as S,S as T,T as U,U as V,a}from"./chunk-
|
|
1
|
+
import{E as F,F as G,G as H,H as I,I as J,J as K,K as L,L as M,M as N,N as O,O as P,P as Q,Q as R,R as S,S as T,T as U,U as V,a}from"./chunk-DI4XTNYK.js";import"./chunk-I5OOVR5U.js";import{a as q,b as r,c as s,d as t,e as u,f as v,g as w,h as x,i as y,j as z,k as A,l as B,m as C,n as D,o as E}from"./chunk-LV4HGC5G.js";import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k,k as l,l as m,m as n,n as o,o as p}from"./chunk-ZLL42OOV.js";import"./chunk-E6WJCS24.js";import"./chunk-JXBG6UFL.js";export{Q as COLORS,B as ConfigWatcher,K as DebugPanel,A as DefaultReloadStrategy,U as Handler,T as PlayableLoadingScreen,L as PreviewShell,R as STROKE_WIDTH,S as THEME,d as applyConfigOverride,e as applyConfigOverrides,n as applyConfigsToDisk,x as applyDefaults,a as baseLottie,P as bootstrap,f as clearConfigOverrides,g as clearConfigOverridesForObject,j as configOverrideManager,M as createPreviewShell,k as deepClone,V as default,H as defaultPreset,G as deviceGroups,F as devicePresets,C as diffConfigs,l as exportConfigsAsJSON,i as getConfigOverrides,m as getConfigStateSummary,b as getOverrideMode,I as getPresetById,J as getPresetsByCategory,s as loadAllObjectConfigs,q as loadComponentSchemas,t as loadEngineConfig,u as loadGamePromptConfig,y as loadObjectCentricConfig,r as loadObjectConfig,v as loadSceneConfig,D as rehydrateObject,h as removeConfigOverride,o as resetToApplied,p as resetToOriginal,O as setBootstrapDependencies,c as setOverrideMode,E as setupHotReload,N as setupLiveEditBridge,z as toLegacyFormat,w as validateObjectConfig};
|
package/dist/pixi/index.cjs
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
<button class="debug-btn primary" data-modal-apply>Apply</button>
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
|
-
`,this.modal=n}attachModalListeners(){if(!this.modal)return;this.modal.querySelectorAll("[data-modal-close]").forEach(o=>{o.addEventListener("click",()=>this.close())}),this.modal.querySelectorAll("[data-tab]").forEach(o=>{o.addEventListener("click",s=>{let c=s.target.dataset.tab;c&&this.switchTab(c)})});let n=this.modal.querySelector("[data-ai-generate]");n==null||n.addEventListener("click",()=>{this.openAiEditor("generate")});let a=this.modal.querySelector("[data-ai-edit]");a==null||a.addEventListener("click",()=>{this.openAiEditor("edit")});let r=this.modal.querySelector("[data-modal-apply]");r==null||r.addEventListener("click",()=>{this.apply()}),this.modal.addEventListener("click",o=>{o.target===this.modal&&this.close()})}switchTab(e){if(!this.modal)return;this.modal.querySelectorAll("[data-tab]").forEach(a=>{a.classList.toggle("active",a.getAttribute("data-tab")===e)}),this.modal.querySelectorAll("[data-tab-panel]").forEach(a=>{a.classList.toggle("active",a.getAttribute("data-tab-panel")===e)})}openAiEditor(e){let t=window.__openAiEditor;if(typeof t!="function"){alert("AI Editor not available. Please check your setup.");return}let n="";e==="edit"&&this.currentAsset?n=`Edit this image: ${this.currentObjectId}`:n=`Create an image for: ${this.currentObjectId}`,t(this.currentObjectId||"unknown",n,this.currentAsset,{path:this.currentPath,onApply:a=>{this.onApplyCallback&&this.onApplyCallback(a),this.close()}})}apply(){this.onApplyCallback&&this.onApplyCallback("library/placeholder.png"),this.close()}close(){this.modal&&this.modal.parentNode&&this.modal.parentNode.removeChild(this.modal),this.modal=null,this.currentObjectId=null,this.currentPath=null,this.onApplyCallback=null}}});var Nr={};Vi(Nr,{AssetCache:()=>Q,AssetLoader:()=>he,AssetSystem:()=>It,AssetTextures:()=>fe,Assets:()=>pa,BaseSystem:()=>Ne,GameEngine:()=>Ot,GameObject:()=>st,GameObjectManager:()=>$e,ObjectFactory:()=>me,Renderer:()=>ot,RuntimeObjectRegistry:()=>He,Transform:()=>rt,applyScreenAnchor:()=>Dt,basePixi:()=>sa,clearResponsiveElements:()=>ga,createPixiBase:()=>Pt,getRegisteredFontIds:()=>na,globalResponsiveMultipliers:()=>ct,initAssetTextures:()=>At,initAssets:()=>ua,layout:()=>fa,playLottieOverlay:()=>ra,registerFont:()=>ia,registerType:()=>wt,resolveAnchorVec2:()=>Ce,resolveFont:()=>ea,resolveFontWeight:()=>ta,resolveScreenAnchorPoint:()=>Be,resolveScreenRatioPoint:()=>Fe,runInitSequence:()=>ma,setLottieInstance:()=>St,spawnSceneFromConfig:()=>ca,updateScreenState:()=>Rt});module.exports=Ea(Nr);var Qn=require("pixi.js");var pe={};function mt(i,e,t=!1){pe[i]||(pe[i]=[]),pe[i].push({fn:e,once:t})}function Gt(i,e){if(pe[i]){if(!e){delete pe[i];return}pe[i]=pe[i].filter(t=>t.fn!==e)}}function bt(i,...e){let t=pe[i];if(t)for(let n of[...t])n.fn(...e),n.once&&Gt(i,n.fn)}function q(i,e){mt(i,e,!0)}var D=null,Y=[],Le=null;function Xi(i){D=i,Y=[],Le!==null&&(clearTimeout(Le),Le=null)}function Ji(){var i,e,t;return{endpoint:(D==null?void 0:D.endpoint)||"",transport:(D==null?void 0:D.transport)||"beacon",batchSize:(i=D==null?void 0:D.batchSize)!=null?i:10,flushIntervalMs:(e=D==null?void 0:D.flushIntervalMs)!=null?e:300,maxQueue:(t=D==null?void 0:D.maxQueue)!=null?t:200,debug:!!(D!=null&&D.debug)}}async function Yi(i,e,t,n){let a=JSON.stringify(e);if(t==="beacon"&&typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function")try{let r=navigator.sendBeacon(i,new Blob([a],{type:"application/json"}));n&&console.log("[handler.telemetry] beacon",r,e);return}catch(r){n&&console.warn("[handler.telemetry] beacon failed, fallback to fetch",r)}try{await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:a,keepalive:!0}),n&&console.log("[handler.telemetry] fetch",e)}catch(r){n&&console.warn("[handler.telemetry] fetch failed",r)}}function qt(i,e){let t=Ji();if(e&&t.endpoint){if(Y.push(i),Y.length>t.maxQueue&&(Y=Y.slice(Y.length-t.maxQueue)),Y.length>=t.batchSize){Ki();return}Le===null&&(Le=window.setTimeout(()=>{Le=null,Ki()},t.flushIntervalMs))}}async function Ki(){let i=Ji();if(!i.endpoint||Y.length===0)return;let e=Y.splice(0,i.batchSize);await Yi(i.endpoint,{events:e},i.transport,i.debug),Y.length>0&&await Yi(i.endpoint,{events:Y.splice(0,i.batchSize)},i.transport,i.debug)}function Zi(i){return Math.max(0,Math.min(1,i))}function Aa(i){let e=String(i!=null?i:"power2.out");if(e==="linear")return t=>t;if(e==="sine.inOut")return t=>.5-Math.cos(Math.PI*t)/2;if(e==="power2.out"||e==="easeOutQuad")return t=>1-(1-t)*(1-t);if(e.startsWith("back.out")){let t=e.match(/back\.out\(([\d.]+)\)/),n=t?Number(t[1]):1.8;return a=>1+(n+1)*Math.pow(a-1,3)+n*Math.pow(a-1,2)}return t=>1-(1-t)*(1-t)}function Ke(){return typeof performance!="undefined"&&performance.now?performance.now():Date.now()}function Sa(i,e){let t=i==null?void 0:i[e];return typeof t=="number"?t:0}function Qi(i,e,t){try{i[e]=t}catch{}}function Ca(i){let e=i==null?void 0:i.scale;if(!e)return null;let t=typeof e.x=="number"?e.x:1,n=typeof e.y=="number"?e.y:1;return{x:t,y:n}}function en(i,e){let t=i==null?void 0:i.scale;if(t)try{typeof t.set=="function"?t.set(e.x,e.y):(typeof t.x=="number"&&(t.x=e.x),typeof t.y=="number"&&(t.y=e.y))}catch{}}function tn(i,e){let t=Ca(i);if(!t)return{from:null,to:null};let n=null,a=null;return typeof e.scale=="number"?(n=e.scale,a=e.scale):e.scale&&typeof e.scale=="object"&&(typeof e.scale.x=="number"&&(n=e.scale.x),typeof e.scale.y=="number"&&(a=e.scale.y)),typeof e.scaleX=="number"&&(n=e.scaleX),typeof e.scaleY=="number"&&(a=e.scaleY),n===null&&a===null?{from:null,to:null}:{from:{x:t.x,y:t.y},to:{x:n!=null?n:t.x,y:a!=null?a:t.y}}}function nn(){let i=new Set,e=new WeakMap,t=null,n=()=>{if(t!=null)return;t=requestAnimationFrame(()=>{t=null,s(),i.size>0&&n()})},a=u=>{var p;i.add(u);let l=(p=e.get(u.target))!=null?p:new Set;l.add(u),e.set(u.target,l),n()},r=u=>{i.delete(u);let l=e.get(u.target);l&&(l.delete(u),l.size===0&&e.delete(u.target))},o=u=>{u.killed||(u.killed=!0,r(u))},s=()=>{var l,p;let u=Ke();for(let g of Array.from(i)){if(g.killed||g.paused)continue;let m=u-g.startMs-g.delayMs;if(m<0)continue;let f=g.durationMs>0?m/g.durationMs:1,A=Zi(f),b=g.repeat>=0?g.repeat+1:1,h=g.repeat>0?Math.min(Math.floor(f),b-1):0;if(g.repeat>0&&f>=1){let y=f-h;A=Zi(y)}let x=g.ease(A);g.yoyo&&h%2===1&&(x=1-x);for(let y of g.props)Qi(g.target,y.key,y.from+(y.to-y.from)*x);g.scaleFrom&&g.scaleTo&&en(g.target,{x:g.scaleFrom.x+(g.scaleTo.x-g.scaleFrom.x)*x,y:g.scaleFrom.y+(g.scaleTo.y-g.scaleFrom.y)*x});try{(l=g.onUpdate)==null||l.call(g)}catch{}if(f>=b){o(g);try{(p=g.onComplete)==null||p.call(g)}catch{}}}},d=(u,l,p)=>{var y;let g=Math.max(0,(typeof l.duration=="number"?l.duration:.5)*1e3),m=Math.max(0,(typeof l.delay=="number"?l.delay:0)*1e3+((y=p==null?void 0:p.delayMsOverride)!=null?y:0)),f=Aa(l.ease),A=typeof l.repeat=="number"?Math.max(0,l.repeat|0):0,b=l.yoyo===!0,h=new Set(["duration","delay","ease","repeat","yoyo","onUpdate","onComplete","scale","scaleX","scaleY"]),x=[];for(let I of Object.keys(l)){if(h.has(I))continue;let R=l[I];typeof R=="number"&&x.push({key:I,from:Sa(u,I),to:R})}let w=tn(u,l);return{target:u,startMs:Ke(),delayMs:m,durationMs:g,ease:f,props:x,scaleFrom:w.from,scaleTo:w.to,repeat:A,yoyo:b,onUpdate:typeof l.onUpdate=="function"?l.onUpdate:void 0,onComplete:typeof l.onComplete=="function"?l.onComplete:void 0,killed:!1,paused:!1,pauseAtMs:null}},c={to(u,l){let p=d(u,l);return a(p),{kill:()=>o(p),pause:()=>{p.paused||(p.paused=!0,p.pauseAtMs=Ke())},resume:()=>{var f;if(!p.paused)return;let g=(f=p.pauseAtMs)!=null?f:Ke(),m=Ke()-g;p.startMs+=m,p.paused=!1,p.pauseAtMs=null},isActive:()=>!p.killed&&!p.paused}},fromTo(u,l,p){return c.set(u,l),c.to(u,p)},set(u,l){if(!u||!l)return;for(let g of Object.keys(l)){let m=l[g];g==="scale"||g==="scaleX"||g==="scaleY"||typeof m=="number"&&Qi(u,g,m)}let p=tn(u,l);p.to&&en(u,p.to)},killTweensOf(u){let l=e.get(u);if(l)for(let p of Array.from(l))o(p)},timeline(u={}){let l=[],p=0,g=!1,m=[],f=h=>{if(typeof h=="number")return Math.max(0,h*1e3);let x=typeof h=="string"?h.trim():"";return x.startsWith("+=")?p+Math.max(0,Number(x.slice(2))*1e3||0):x?Math.max(0,Number(x)*1e3||0):p},A=h=>{l.push(h);let x=Math.max(0,(typeof h.vars.duration=="number"?h.vars.duration:.5)*1e3);p=Math.max(p,h.atMs+x)},b={to(h,x,w){return A({kind:"to",target:h,vars:x,atMs:f(w)}),b},fromTo(h,x,w,y){return A({kind:"fromTo",target:h,vars:w,from:x,atMs:f(y)}),b},play(){var h,x;if(g)return b;g=!0,m=[];for(let w of l)w.kind==="fromTo"&&c.set(w.target,(h=w.from)!=null?h:{}),m.push(c.to(w.target,{...w.vars,delay:w.atMs/1e3+((x=w.vars.delay)!=null?x:0)}));return b},pause(){for(let h of m)h.pause();return b},kill(){for(let h of m)h.kill();m=[],g=!1}};return u.paused||b.play(),b}};return c}function an(){if(typeof window=="undefined")return;let i=window;if(!i.gsap)try{i.gsap=nn()}catch{}}var rn={name:"handler-playable-sdk",version:"0.4.57",type:"module",description:"Handler Playable SDK v0.1 with contract-aligned surface (root sandbox, canonical event envelope).",main:"dist/index.cjs",module:"dist/index.js",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs"},"./pixi":{types:"./dist/pixi/index.d.ts",import:"./dist/pixi/index.js",require:"./dist/pixi/index.cjs"},"./pixi/index.css":{import:"./dist/pixi/index.css",require:"./dist/pixi/index.css"},"./three":{types:"./dist/three/index.d.ts",import:"./dist/three/index.js",require:"./dist/three/index.cjs"},"./cli":{types:"./dist/cli/index.d.ts",import:"./dist/cli/index.js",require:"./dist/cli/index.cjs"}},bin:{"handler-student-helper":"./bin/student-helper.mjs","handler-validate":"./bin/validate.mjs","handler-sync-screens":"./bin/sync-screens.mjs","handler-brand-dna":"./bin/brand-dna.mjs","handler-setup-library":"./bin/setup-library.mjs","handler-screen-helper":"./bin/screen-helper.mjs"},scripts:{prebuild:"python3 src/preview/build-css.py",build:"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --minify --external lottie-web && npm run create-mjs-symlinks && npm run postbuild-cli && npm run obfuscate && npm run postbuild",postbuild:"python3 src/preview/copy-css-to-dist.py","postbuild-cli":"cp src/cli/*.mjs dist/cli/ && chmod +x dist/cli/*.mjs && chmod +x bin/*.mjs","create-mjs-symlinks":"cd dist && ln -sf index.js index.mjs && cd pixi && ln -sf index.js index.mjs && cd ../three && ln -sf index.js index.mjs","build:dev":"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --external lottie-web && npm run create-mjs-symlinks && npm run postbuild-cli",obfuscate:"javascript-obfuscator dist/pixi/index.js --output dist/pixi/index.js --config obfuscator.config.json && javascript-obfuscator dist/three/index.js --output dist/three/index.js --config obfuscator.config.json && javascript-obfuscator dist/cli/index.js --output dist/cli/index.js --config obfuscator.config.json && npm run obfuscate-cli","obfuscate-cli":'for file in dist/cli/*.mjs; do javascript-obfuscator "$file" --output "$file" --config obfuscator.config.json; done',lint:"eslint 'src/**/*.{ts,tsx}'",typecheck:"tsc --noEmit",prepublishOnly:"npm run build","publish:update":"node scripts/publish-and-update.cjs patch","publish:update:minor":"node scripts/publish-and-update.cjs minor","publish:update:major":"node scripts/publish-and-update.cjs major"},author:"Handler",license:"MIT",publishConfig:{access:"public"},repository:{type:"git",url:"https://github.com/HandlerAIGames/handler-playable-sdk.git"},files:["dist","bin","LICENSE","README.md"],peerDependencies:{"lottie-web":"^5.0.0","pixi.js":"^8.0.0",three:"^0.182.0"},peerDependenciesMeta:{"pixi.js":{optional:!0},three:{optional:!0},"lottie-web":{optional:!0}},devDependencies:{"@types/three":"^0.182.0",eslint:"^9.39.2","javascript-obfuscator":"^5.1.0","pixi.js":"8.8.1",three:"^0.182.0","ts-node":"^10.9.2",tsup:"^8.4.0",typescript:"^5.7.2","typescript-eslint":"^8.53.0"},dependencies:{"@google/genai":"^1.35.0","@google/generative-ai":"^0.24.1",jszip:"^3.10.1",sharp:"^0.34.5"}};var V=0,Ta=V++,on=V++,sn=V++,ln=V++,cn=V++,dn=V++,pn=V++,un=V++,gn=V++,hn=V++,fn=V++,mn=V++,M=Ta;function bn(){return M===on}function yn(){return M===sn}function vn(){return M===ln}function xn(){return M===cn}function Te(){return M===dn}function ke(){return M===pn}function wn(){return M===un}function En(){return M===gn}function An(){return M===hn}function Vt(){return M===fn}function Wt(){return M===mn}function Sn(){let i=typeof AD_PROTOCOL!="undefined"?AD_PROTOCOL:"none",e=typeof AD_NETWORK!="undefined"?AD_NETWORK:"web_embed";if(i==="mraid")try{mraid.getState(),M=on;return}catch{}else if(i==="dapi")try{dapi.isReady(),M=sn;return}catch{}if(e==="facebook")try{typeof FbPlayableAd!="undefined"&&(M=ln)}catch{}else if(e==="google")try{typeof ExitApi!="undefined"&&(M=cn)}catch{}else if(e==="mintegral")window.gameReady&&(M=dn);else if(e==="tapjoy")window.TJ_API&&(M=pn);else if(e==="tiktok")window.openAppStore&&(M=un);else if(e==="smadex")try{window.smxTracking&&(M=gn)}catch{}else if(e==="snapchat")try{window.ScPlayableAd&&(M=hn)}catch{}else e==="vungle"?M=fn:(i==="nucleo"||e==="nucleo")&&(M=mn)}var yt=ft(require("lottie-web"),1),Cn=yt.default;typeof window!="undefined"&&(window.lottie=yt.default,window.__baseLottie=yt.default);Xt();function $(i,e){let t=(a,r)=>r===0?a:t(r,a%r),n=t(i,e);return`${i/n}:${e/n}`}var vo=[{id:"iphone-15-pro-max",label:"iPhone 15 Pro Max",width:430,height:932,category:"iphone",ratio:$(430,932)},{id:"iphone-15-pro",label:"iPhone 15 Pro",width:393,height:852,category:"iphone",ratio:$(393,852)},{id:"iphone-15",label:"iPhone 15",width:393,height:852,category:"iphone",ratio:$(393,852)},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"iphone",ratio:$(390,844)},{id:"iphone-se",label:"iPhone SE",width:375,height:667,category:"iphone",ratio:$(375,667)},{id:"iphone-12-mini",label:"iPhone 12 Mini",width:360,height:780,category:"iphone",ratio:$(360,780)}],xo=[{id:"pixel-8-pro",label:"Pixel 8 Pro",width:448,height:998,category:"android",ratio:$(448,998)},{id:"pixel-8",label:"Pixel 8",width:412,height:915,category:"android",ratio:$(412,915)},{id:"samsung-s24-ultra",label:"Samsung S24 Ultra",width:412,height:915,category:"android",ratio:$(412,915)},{id:"samsung-s24",label:"Samsung S24",width:360,height:780,category:"android",ratio:$(360,780)},{id:"samsung-a54",label:"Samsung A54",width:412,height:915,category:"android",ratio:$(412,915)},{id:"oneplus-12",label:"OnePlus 12",width:412,height:915,category:"android",ratio:$(412,915)}],wo=[{id:"ipad-pro-12",label:'iPad Pro 12.9"',width:1024,height:1366,category:"tablet",ratio:$(1024,1366)},{id:"ipad-pro-11",label:'iPad Pro 11"',width:834,height:1194,category:"tablet",ratio:$(834,1194)},{id:"ipad-air",label:"iPad Air",width:820,height:1180,category:"tablet",ratio:$(820,1180)},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"tablet",ratio:$(768,1024)},{id:"samsung-tab-s9",label:"Samsung Tab S9",width:800,height:1280,category:"tablet",ratio:$(800,1280)}],_n=[{id:"playable-portrait",label:"Playable Portrait",width:320,height:480,category:"playable",ratio:"2:3",mraidScale:1},{id:"mraid-320x480",label:"MRAID 320\xD7480",width:320,height:480,category:"playable",ratio:"2:3",mraidScale:1},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"playable",ratio:$(390,844),mraidScale:.7},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"playable",ratio:$(768,1024),mraidScale:.7}];var Eo=[..._n];var Ra=_n[0];ue();var Ba=ft(require("jszip"),1);function za(i){return new Promise((e,t)=>{let n=new FileReader;n.onerror=()=>t(new Error("FileReader failed")),n.onload=()=>e(String(n.result||"")),n.readAsDataURL(i)})}function Na(i){var a;let[e,t]=i.split(","),n=e==null?void 0:e.match(/data:(.*?);base64/);return{base64:t!=null?t:"",mimeType:(a=n==null?void 0:n[1])!=null?a:"image/png"}}async function Ha(i){return await new Promise(e=>{let t=new Image;t.onload=()=>e({width:t.naturalWidth||t.width,height:t.naturalHeight||t.height}),t.onerror=()=>e(null),t.src=i})}async function Jt(i){var e,t;try{console.log("[ImageUtils] Fetching image data from URL:",i);let n=await fetch(i);if(!n.ok)return console.warn("[ImageUtils] Fetch failed with status:",n.status,i),null;let a=await n.blob();console.log("[ImageUtils] Blob received, size:",a.size,"type:",a.type);let r=await za(a),o=await Ha(r),s=Na(r);return console.log("[ImageUtils] Success resolution:",o==null?void 0:o.width,"x",o==null?void 0:o.height,"mime:",s.mimeType),{base64:s.base64,mimeType:s.mimeType,dataUrl:r,width:(e=o==null?void 0:o.width)!=null?e:0,height:(t=o==null?void 0:o.height)!=null?t:0}}catch(n){return console.error("[ImageUtils] Error fetching image data:",n),null}}async function vt(i,e=30){try{console.log("[ImageUtils] Removing background color...");let t=await new Promise((l,p)=>{let g=new Image;g.onload=()=>l(g),g.onerror=()=>p(new Error("Failed to load image")),g.src=i}),n=document.createElement("canvas");n.width=t.width,n.height=t.height;let a=n.getContext("2d");if(!a)return console.error("[ImageUtils] Failed to get canvas context"),i;a.drawImage(t,0,0);let r=a.getImageData(0,0,n.width,n.height),o=r.data,d=[{name:"top-left",offset:0},{name:"top-right",offset:(n.width-1)*4},{name:"bottom-left",offset:(n.height-1)*n.width*4},{name:"bottom-right",offset:((n.height-1)*n.width+(n.width-1))*4}].map(l=>({r:o[l.offset],g:o[l.offset+1],b:o[l.offset+2]})),c=0;for(let l=0;l<o.length;l+=4){let p=o[l],g=o[l+1],m=o[l+2],f=!1;for(let A of d)if(Math.sqrt(Math.pow(p-A.r,2)+Math.pow(g-A.g,2)+Math.pow(m-A.b,2))<e){f=!0;break}f&&(o[l+3]=0,c++)}return console.log(`[ImageUtils] Removed background from ${c} pixels (4-corner sampling, tolerance: ${e})`),a.putImageData(r,0,0),n.toDataURL("image/png")}catch(t){return console.error("[ImageUtils] Error removing background:",t),i}}var Pn=require("@google/genai");async function Zt(i,e,t=[],n={}){var a,r,o,s,d,c,u;try{if(!(i!=null&&i.trim()))throw new Error("Gemini API key is required");if(!(e!=null&&e.trim()))throw new Error("Prompt is required");for(let b=0;b<t.length;b++){let h=t[b];if(!h.base64||!h.mimeType)throw new Error(`Image ${b+1} is missing required data`);if(h.base64.length<1e3&&console.warn(`Image ${b+1} data appears very small, may be corrupted`),!h.mimeType.startsWith("image/"))throw new Error(`Image ${b+1} has invalid MIME type: ${h.mimeType}`)}let l=new Pn.GoogleGenAI({apiKey:i}),p="gemini-2.5-flash",g=[e];t.length>0&&t.forEach((b,h)=>{g.push({inlineData:{data:b.base64,mimeType:b.mimeType}}),console.log(`[Gemini] Added image ${h+1}: ${b.mimeType}, size: ${Math.round(b.base64.length/1024)}KB`)}),console.log(`[Gemini] Making request with ${t.length} images and prompt length: ${e.length}`);let m=await l.models.generateContent({model:p,contents:g}),f="",A=(o=(r=(a=m.candidates)==null?void 0:a[0])==null?void 0:r.content)==null?void 0:o.parts;if(A)for(let b of A)b.text&&(f+=b.text);if(!f.trim())throw new Error("Empty response from Gemini API");return console.log(`[Gemini] Response received, length: ${f.length}`),f}catch(l){throw console.error("[Gemini] API error:",l),(s=l.message)!=null&&s.includes("Unable to process input image")?new Error("Unable to process the uploaded image. Please ensure it's a valid PNG, JPG, or JPEG file under 10MB and not corrupted."):(d=l.message)!=null&&d.includes("API_KEY_INVALID")?new Error("Invalid Gemini API key. Please check your API key configuration."):(c=l.message)!=null&&c.includes("QUOTA_EXCEEDED")?new Error("Gemini API quota exceeded. Please try again later or check your billing."):(u=l.message)!=null&&u.includes("SAFETY")?new Error("Content was flagged by Gemini safety filters. Please try with different images."):l}}var Mn=require("@google/genai");async function xt(i,e,t=[],n={}){try{console.info("[GEMINI-REAL-SDK] Initializing GoogleGenAI...");let a=new Mn.GoogleGenAI({apiKey:i}),r=[{text:e}];t.length>0&&t.forEach((s,d)=>{console.info(`[GEMINI-REAL-SDK] Adding image part ${d}`),r.push({inlineData:{mimeType:s.mimeType,data:s.base64}})}),console.info("[GEMINI-REAL-SDK] Calling generateContent with model: gemini-2.5-flash-image");let o=await a.models.generateContent({model:"gemini-2.5-flash-image",contents:r});if(console.info("[GEMINI-REAL-SDK] Received response from model"),!o.candidates||!o.candidates[0]||!o.candidates[0].content||!o.candidates[0].content.parts)throw new Error("Gemini 2.5 Flash Image returned invalid response structure.");for(let s of o.candidates[0].content.parts)if(s.text)console.log(s.text);else if(s.inlineData){let d=s.inlineData.data,c=s.inlineData.mimeType||"image/png";return console.info("[GEMINI-REAL-SDK] Found inline image data in response"),`data:${c};base64,${d}`}throw new Error("Gemini 2.5 Flash Image returned no image data.")}catch(a){throw console.error("[GEMINI-REAL-SDK] Error in generateImageWithGemini25Flash:",JSON.stringify(a,Object.getOwnPropertyNames(a),2)),a}}var Wa=require("pixi.js");Xe();ue();var $n=require("pixi.js");var Ya=require("pixi.js");ue();function tr(i){return new Promise((e,t)=>{let n=new FileReader;n.onerror=()=>t(new Error("FileReader failed")),n.onload=()=>e(String(n.result||"")),n.readAsDataURL(i)})}function ir(i){var a;let[e,t]=i.split(","),n=e==null?void 0:e.match(/data:(.*?);base64/);return{base64:t!=null?t:"",mimeType:(a=n==null?void 0:n[1])!=null?a:"image/png"}}function nr(i){return`
|
|
46
|
+
`,this.modal=n}attachModalListeners(){if(!this.modal)return;this.modal.querySelectorAll("[data-modal-close]").forEach(o=>{o.addEventListener("click",()=>this.close())}),this.modal.querySelectorAll("[data-tab]").forEach(o=>{o.addEventListener("click",s=>{let c=s.target.dataset.tab;c&&this.switchTab(c)})});let n=this.modal.querySelector("[data-ai-generate]");n==null||n.addEventListener("click",()=>{this.openAiEditor("generate")});let a=this.modal.querySelector("[data-ai-edit]");a==null||a.addEventListener("click",()=>{this.openAiEditor("edit")});let r=this.modal.querySelector("[data-modal-apply]");r==null||r.addEventListener("click",()=>{this.apply()}),this.modal.addEventListener("click",o=>{o.target===this.modal&&this.close()})}switchTab(e){if(!this.modal)return;this.modal.querySelectorAll("[data-tab]").forEach(a=>{a.classList.toggle("active",a.getAttribute("data-tab")===e)}),this.modal.querySelectorAll("[data-tab-panel]").forEach(a=>{a.classList.toggle("active",a.getAttribute("data-tab-panel")===e)})}openAiEditor(e){let t=window.__openAiEditor;if(typeof t!="function"){alert("AI Editor not available. Please check your setup.");return}let n="";e==="edit"&&this.currentAsset?n=`Edit this image: ${this.currentObjectId}`:n=`Create an image for: ${this.currentObjectId}`,t(this.currentObjectId||"unknown",n,this.currentAsset,{path:this.currentPath,onApply:a=>{this.onApplyCallback&&this.onApplyCallback(a),this.close()}})}apply(){this.onApplyCallback&&this.onApplyCallback("library/placeholder.png"),this.close()}close(){this.modal&&this.modal.parentNode&&this.modal.parentNode.removeChild(this.modal),this.modal=null,this.currentObjectId=null,this.currentPath=null,this.onApplyCallback=null}}});var Nr={};Vi(Nr,{AssetCache:()=>Q,AssetLoader:()=>he,AssetSystem:()=>It,AssetTextures:()=>fe,Assets:()=>pa,BaseSystem:()=>Ne,GameEngine:()=>Ot,GameObject:()=>st,GameObjectManager:()=>$e,ObjectFactory:()=>me,Renderer:()=>ot,RuntimeObjectRegistry:()=>He,Transform:()=>rt,applyScreenAnchor:()=>Dt,basePixi:()=>sa,clearResponsiveElements:()=>ga,createPixiBase:()=>Pt,getRegisteredFontIds:()=>na,globalResponsiveMultipliers:()=>ct,initAssetTextures:()=>At,initAssets:()=>ua,layout:()=>fa,playLottieOverlay:()=>ra,registerFont:()=>ia,registerType:()=>wt,resolveAnchorVec2:()=>Ce,resolveFont:()=>ea,resolveFontWeight:()=>ta,resolveScreenAnchorPoint:()=>Be,resolveScreenRatioPoint:()=>Fe,runInitSequence:()=>ma,setLottieInstance:()=>St,spawnSceneFromConfig:()=>ca,updateScreenState:()=>Rt});module.exports=Ea(Nr);var Qn=require("pixi.js");var pe={};function mt(i,e,t=!1){pe[i]||(pe[i]=[]),pe[i].push({fn:e,once:t})}function Gt(i,e){if(pe[i]){if(!e){delete pe[i];return}pe[i]=pe[i].filter(t=>t.fn!==e)}}function bt(i,...e){let t=pe[i];if(t)for(let n of[...t])n.fn(...e),n.once&&Gt(i,n.fn)}function q(i,e){mt(i,e,!0)}var D=null,Y=[],Le=null;function Xi(i){D=i,Y=[],Le!==null&&(clearTimeout(Le),Le=null)}function Ji(){var i,e,t;return{endpoint:(D==null?void 0:D.endpoint)||"",transport:(D==null?void 0:D.transport)||"beacon",batchSize:(i=D==null?void 0:D.batchSize)!=null?i:10,flushIntervalMs:(e=D==null?void 0:D.flushIntervalMs)!=null?e:300,maxQueue:(t=D==null?void 0:D.maxQueue)!=null?t:200,debug:!!(D!=null&&D.debug)}}async function Yi(i,e,t,n){let a=JSON.stringify(e);if(t==="beacon"&&typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function")try{let r=navigator.sendBeacon(i,new Blob([a],{type:"application/json"}));n&&console.log("[handler.telemetry] beacon",r,e);return}catch(r){n&&console.warn("[handler.telemetry] beacon failed, fallback to fetch",r)}try{await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:a,keepalive:!0}),n&&console.log("[handler.telemetry] fetch",e)}catch(r){n&&console.warn("[handler.telemetry] fetch failed",r)}}function qt(i,e){let t=Ji();if(e&&t.endpoint){if(Y.push(i),Y.length>t.maxQueue&&(Y=Y.slice(Y.length-t.maxQueue)),Y.length>=t.batchSize){Ki();return}Le===null&&(Le=window.setTimeout(()=>{Le=null,Ki()},t.flushIntervalMs))}}async function Ki(){let i=Ji();if(!i.endpoint||Y.length===0)return;let e=Y.splice(0,i.batchSize);await Yi(i.endpoint,{events:e},i.transport,i.debug),Y.length>0&&await Yi(i.endpoint,{events:Y.splice(0,i.batchSize)},i.transport,i.debug)}function Zi(i){return Math.max(0,Math.min(1,i))}function Aa(i){let e=String(i!=null?i:"power2.out");if(e==="linear")return t=>t;if(e==="sine.inOut")return t=>.5-Math.cos(Math.PI*t)/2;if(e==="power2.out"||e==="easeOutQuad")return t=>1-(1-t)*(1-t);if(e.startsWith("back.out")){let t=e.match(/back\.out\(([\d.]+)\)/),n=t?Number(t[1]):1.8;return a=>1+(n+1)*Math.pow(a-1,3)+n*Math.pow(a-1,2)}return t=>1-(1-t)*(1-t)}function Ke(){return typeof performance!="undefined"&&performance.now?performance.now():Date.now()}function Sa(i,e){let t=i==null?void 0:i[e];return typeof t=="number"?t:0}function Qi(i,e,t){try{i[e]=t}catch{}}function Ca(i){let e=i==null?void 0:i.scale;if(!e)return null;let t=typeof e.x=="number"?e.x:1,n=typeof e.y=="number"?e.y:1;return{x:t,y:n}}function en(i,e){let t=i==null?void 0:i.scale;if(t)try{typeof t.set=="function"?t.set(e.x,e.y):(typeof t.x=="number"&&(t.x=e.x),typeof t.y=="number"&&(t.y=e.y))}catch{}}function tn(i,e){let t=Ca(i);if(!t)return{from:null,to:null};let n=null,a=null;return typeof e.scale=="number"?(n=e.scale,a=e.scale):e.scale&&typeof e.scale=="object"&&(typeof e.scale.x=="number"&&(n=e.scale.x),typeof e.scale.y=="number"&&(a=e.scale.y)),typeof e.scaleX=="number"&&(n=e.scaleX),typeof e.scaleY=="number"&&(a=e.scaleY),n===null&&a===null?{from:null,to:null}:{from:{x:t.x,y:t.y},to:{x:n!=null?n:t.x,y:a!=null?a:t.y}}}function nn(){let i=new Set,e=new WeakMap,t=null,n=()=>{if(t!=null)return;t=requestAnimationFrame(()=>{t=null,s(),i.size>0&&n()})},a=u=>{var p;i.add(u);let l=(p=e.get(u.target))!=null?p:new Set;l.add(u),e.set(u.target,l),n()},r=u=>{i.delete(u);let l=e.get(u.target);l&&(l.delete(u),l.size===0&&e.delete(u.target))},o=u=>{u.killed||(u.killed=!0,r(u))},s=()=>{var l,p;let u=Ke();for(let g of Array.from(i)){if(g.killed||g.paused)continue;let m=u-g.startMs-g.delayMs;if(m<0)continue;let f=g.durationMs>0?m/g.durationMs:1,A=Zi(f),b=g.repeat>=0?g.repeat+1:1,h=g.repeat>0?Math.min(Math.floor(f),b-1):0;if(g.repeat>0&&f>=1){let y=f-h;A=Zi(y)}let x=g.ease(A);g.yoyo&&h%2===1&&(x=1-x);for(let y of g.props)Qi(g.target,y.key,y.from+(y.to-y.from)*x);g.scaleFrom&&g.scaleTo&&en(g.target,{x:g.scaleFrom.x+(g.scaleTo.x-g.scaleFrom.x)*x,y:g.scaleFrom.y+(g.scaleTo.y-g.scaleFrom.y)*x});try{(l=g.onUpdate)==null||l.call(g)}catch{}if(f>=b){o(g);try{(p=g.onComplete)==null||p.call(g)}catch{}}}},d=(u,l,p)=>{var y;let g=Math.max(0,(typeof l.duration=="number"?l.duration:.5)*1e3),m=Math.max(0,(typeof l.delay=="number"?l.delay:0)*1e3+((y=p==null?void 0:p.delayMsOverride)!=null?y:0)),f=Aa(l.ease),A=typeof l.repeat=="number"?Math.max(0,l.repeat|0):0,b=l.yoyo===!0,h=new Set(["duration","delay","ease","repeat","yoyo","onUpdate","onComplete","scale","scaleX","scaleY"]),x=[];for(let I of Object.keys(l)){if(h.has(I))continue;let R=l[I];typeof R=="number"&&x.push({key:I,from:Sa(u,I),to:R})}let w=tn(u,l);return{target:u,startMs:Ke(),delayMs:m,durationMs:g,ease:f,props:x,scaleFrom:w.from,scaleTo:w.to,repeat:A,yoyo:b,onUpdate:typeof l.onUpdate=="function"?l.onUpdate:void 0,onComplete:typeof l.onComplete=="function"?l.onComplete:void 0,killed:!1,paused:!1,pauseAtMs:null}},c={to(u,l){let p=d(u,l);return a(p),{kill:()=>o(p),pause:()=>{p.paused||(p.paused=!0,p.pauseAtMs=Ke())},resume:()=>{var f;if(!p.paused)return;let g=(f=p.pauseAtMs)!=null?f:Ke(),m=Ke()-g;p.startMs+=m,p.paused=!1,p.pauseAtMs=null},isActive:()=>!p.killed&&!p.paused}},fromTo(u,l,p){return c.set(u,l),c.to(u,p)},set(u,l){if(!u||!l)return;for(let g of Object.keys(l)){let m=l[g];g==="scale"||g==="scaleX"||g==="scaleY"||typeof m=="number"&&Qi(u,g,m)}let p=tn(u,l);p.to&&en(u,p.to)},killTweensOf(u){let l=e.get(u);if(l)for(let p of Array.from(l))o(p)},timeline(u={}){let l=[],p=0,g=!1,m=[],f=h=>{if(typeof h=="number")return Math.max(0,h*1e3);let x=typeof h=="string"?h.trim():"";return x.startsWith("+=")?p+Math.max(0,Number(x.slice(2))*1e3||0):x?Math.max(0,Number(x)*1e3||0):p},A=h=>{l.push(h);let x=Math.max(0,(typeof h.vars.duration=="number"?h.vars.duration:.5)*1e3);p=Math.max(p,h.atMs+x)},b={to(h,x,w){return A({kind:"to",target:h,vars:x,atMs:f(w)}),b},fromTo(h,x,w,y){return A({kind:"fromTo",target:h,vars:w,from:x,atMs:f(y)}),b},play(){var h,x;if(g)return b;g=!0,m=[];for(let w of l)w.kind==="fromTo"&&c.set(w.target,(h=w.from)!=null?h:{}),m.push(c.to(w.target,{...w.vars,delay:w.atMs/1e3+((x=w.vars.delay)!=null?x:0)}));return b},pause(){for(let h of m)h.pause();return b},kill(){for(let h of m)h.kill();m=[],g=!1}};return u.paused||b.play(),b}};return c}function an(){if(typeof window=="undefined")return;let i=window;if(!i.gsap)try{i.gsap=nn()}catch{}}var rn={name:"handler-playable-sdk",version:"0.4.59",type:"module",description:"Handler Playable SDK v0.1 with contract-aligned surface (root sandbox, canonical event envelope).",main:"dist/index.cjs",module:"dist/index.js",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs"},"./pixi":{types:"./dist/pixi/index.d.ts",import:"./dist/pixi/index.js",require:"./dist/pixi/index.cjs"},"./pixi/index.css":{import:"./dist/pixi/index.css",require:"./dist/pixi/index.css"},"./three":{types:"./dist/three/index.d.ts",import:"./dist/three/index.js",require:"./dist/three/index.cjs"},"./cli":{types:"./dist/cli/index.d.ts",import:"./dist/cli/index.js",require:"./dist/cli/index.cjs"}},bin:{"handler-student-helper":"./bin/student-helper.mjs","handler-validate":"./bin/validate.mjs","handler-sync-screens":"./bin/sync-screens.mjs","handler-brand-dna":"./bin/brand-dna.mjs","handler-setup-library":"./bin/setup-library.mjs","handler-screen-helper":"./bin/screen-helper.mjs"},scripts:{prebuild:"python3 src/preview/build-css.py",build:"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --minify --external lottie-web && npm run create-mjs-symlinks && npm run postbuild-cli && npm run obfuscate && npm run postbuild",postbuild:"python3 src/preview/copy-css-to-dist.py","postbuild-cli":"cp src/cli/*.mjs dist/cli/ && chmod +x dist/cli/*.mjs && chmod +x bin/*.mjs","create-mjs-symlinks":"cd dist && ln -sf index.js index.mjs && cd pixi && ln -sf index.js index.mjs && cd ../three && ln -sf index.js index.mjs","build:dev":"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --external lottie-web && npm run create-mjs-symlinks && npm run postbuild-cli",obfuscate:"javascript-obfuscator dist/pixi/index.js --output dist/pixi/index.js --config obfuscator.config.json && javascript-obfuscator dist/three/index.js --output dist/three/index.js --config obfuscator.config.json && javascript-obfuscator dist/cli/index.js --output dist/cli/index.js --config obfuscator.config.json && npm run obfuscate-cli","obfuscate-cli":'for file in dist/cli/*.mjs; do javascript-obfuscator "$file" --output "$file" --config obfuscator.config.json; done',lint:"eslint 'src/**/*.{ts,tsx}'",typecheck:"tsc --noEmit",prepublishOnly:"npm run build","publish:update":"node scripts/publish-and-update.cjs patch","publish:update:minor":"node scripts/publish-and-update.cjs minor","publish:update:major":"node scripts/publish-and-update.cjs major"},author:"Handler",license:"MIT",publishConfig:{access:"public"},repository:{type:"git",url:"https://github.com/HandlerAIGames/handler-playable-sdk.git"},files:["dist","bin","LICENSE","README.md"],peerDependencies:{"lottie-web":"^5.0.0","pixi.js":"^8.0.0",three:"^0.182.0"},peerDependenciesMeta:{"pixi.js":{optional:!0},three:{optional:!0},"lottie-web":{optional:!0}},devDependencies:{"@types/three":"^0.182.0",eslint:"^9.39.2","javascript-obfuscator":"^5.1.0","pixi.js":"8.8.1",three:"^0.182.0","ts-node":"^10.9.2",tsup:"^8.4.0",typescript:"^5.7.2","typescript-eslint":"^8.53.0"},dependencies:{"@google/genai":"^1.35.0","@google/generative-ai":"^0.24.1",jszip:"^3.10.1",sharp:"^0.34.5"}};var V=0,Ta=V++,on=V++,sn=V++,ln=V++,cn=V++,dn=V++,pn=V++,un=V++,gn=V++,hn=V++,fn=V++,mn=V++,M=Ta;function bn(){return M===on}function yn(){return M===sn}function vn(){return M===ln}function xn(){return M===cn}function Te(){return M===dn}function ke(){return M===pn}function wn(){return M===un}function En(){return M===gn}function An(){return M===hn}function Vt(){return M===fn}function Wt(){return M===mn}function Sn(){let i=typeof AD_PROTOCOL!="undefined"?AD_PROTOCOL:"none",e=typeof AD_NETWORK!="undefined"?AD_NETWORK:"web_embed";if(i==="mraid")try{mraid.getState(),M=on;return}catch{}else if(i==="dapi")try{dapi.isReady(),M=sn;return}catch{}if(e==="facebook")try{typeof FbPlayableAd!="undefined"&&(M=ln)}catch{}else if(e==="google")try{typeof ExitApi!="undefined"&&(M=cn)}catch{}else if(e==="mintegral")window.gameReady&&(M=dn);else if(e==="tapjoy")window.TJ_API&&(M=pn);else if(e==="tiktok")window.openAppStore&&(M=un);else if(e==="smadex")try{window.smxTracking&&(M=gn)}catch{}else if(e==="snapchat")try{window.ScPlayableAd&&(M=hn)}catch{}else e==="vungle"?M=fn:(i==="nucleo"||e==="nucleo")&&(M=mn)}var yt=ft(require("lottie-web"),1),Cn=yt.default;typeof window!="undefined"&&(window.lottie=yt.default,window.__baseLottie=yt.default);Xt();function $(i,e){let t=(a,r)=>r===0?a:t(r,a%r),n=t(i,e);return`${i/n}:${e/n}`}var vo=[{id:"iphone-15-pro-max",label:"iPhone 15 Pro Max",width:430,height:932,category:"iphone",ratio:$(430,932)},{id:"iphone-15-pro",label:"iPhone 15 Pro",width:393,height:852,category:"iphone",ratio:$(393,852)},{id:"iphone-15",label:"iPhone 15",width:393,height:852,category:"iphone",ratio:$(393,852)},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"iphone",ratio:$(390,844)},{id:"iphone-se",label:"iPhone SE",width:375,height:667,category:"iphone",ratio:$(375,667)},{id:"iphone-12-mini",label:"iPhone 12 Mini",width:360,height:780,category:"iphone",ratio:$(360,780)}],xo=[{id:"pixel-8-pro",label:"Pixel 8 Pro",width:448,height:998,category:"android",ratio:$(448,998)},{id:"pixel-8",label:"Pixel 8",width:412,height:915,category:"android",ratio:$(412,915)},{id:"samsung-s24-ultra",label:"Samsung S24 Ultra",width:412,height:915,category:"android",ratio:$(412,915)},{id:"samsung-s24",label:"Samsung S24",width:360,height:780,category:"android",ratio:$(360,780)},{id:"samsung-a54",label:"Samsung A54",width:412,height:915,category:"android",ratio:$(412,915)},{id:"oneplus-12",label:"OnePlus 12",width:412,height:915,category:"android",ratio:$(412,915)}],wo=[{id:"ipad-pro-12",label:'iPad Pro 12.9"',width:1024,height:1366,category:"tablet",ratio:$(1024,1366)},{id:"ipad-pro-11",label:'iPad Pro 11"',width:834,height:1194,category:"tablet",ratio:$(834,1194)},{id:"ipad-air",label:"iPad Air",width:820,height:1180,category:"tablet",ratio:$(820,1180)},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"tablet",ratio:$(768,1024)},{id:"samsung-tab-s9",label:"Samsung Tab S9",width:800,height:1280,category:"tablet",ratio:$(800,1280)}],_n=[{id:"playable-portrait",label:"Playable Portrait",width:320,height:480,category:"playable",ratio:"2:3",mraidScale:1},{id:"mraid-320x480",label:"MRAID 320\xD7480",width:320,height:480,category:"playable",ratio:"2:3",mraidScale:1},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"playable",ratio:$(390,844),mraidScale:.7},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"playable",ratio:$(768,1024),mraidScale:.7}];var Eo=[..._n];var Ra=_n[0];ue();var Ba=ft(require("jszip"),1);function za(i){return new Promise((e,t)=>{let n=new FileReader;n.onerror=()=>t(new Error("FileReader failed")),n.onload=()=>e(String(n.result||"")),n.readAsDataURL(i)})}function Na(i){var a;let[e,t]=i.split(","),n=e==null?void 0:e.match(/data:(.*?);base64/);return{base64:t!=null?t:"",mimeType:(a=n==null?void 0:n[1])!=null?a:"image/png"}}async function Ha(i){return await new Promise(e=>{let t=new Image;t.onload=()=>e({width:t.naturalWidth||t.width,height:t.naturalHeight||t.height}),t.onerror=()=>e(null),t.src=i})}async function Jt(i){var e,t;try{console.log("[ImageUtils] Fetching image data from URL:",i);let n=await fetch(i);if(!n.ok)return console.warn("[ImageUtils] Fetch failed with status:",n.status,i),null;let a=await n.blob();console.log("[ImageUtils] Blob received, size:",a.size,"type:",a.type);let r=await za(a),o=await Ha(r),s=Na(r);return console.log("[ImageUtils] Success resolution:",o==null?void 0:o.width,"x",o==null?void 0:o.height,"mime:",s.mimeType),{base64:s.base64,mimeType:s.mimeType,dataUrl:r,width:(e=o==null?void 0:o.width)!=null?e:0,height:(t=o==null?void 0:o.height)!=null?t:0}}catch(n){return console.error("[ImageUtils] Error fetching image data:",n),null}}async function vt(i,e=30){try{console.log("[ImageUtils] Removing background color...");let t=await new Promise((l,p)=>{let g=new Image;g.onload=()=>l(g),g.onerror=()=>p(new Error("Failed to load image")),g.src=i}),n=document.createElement("canvas");n.width=t.width,n.height=t.height;let a=n.getContext("2d");if(!a)return console.error("[ImageUtils] Failed to get canvas context"),i;a.drawImage(t,0,0);let r=a.getImageData(0,0,n.width,n.height),o=r.data,d=[{name:"top-left",offset:0},{name:"top-right",offset:(n.width-1)*4},{name:"bottom-left",offset:(n.height-1)*n.width*4},{name:"bottom-right",offset:((n.height-1)*n.width+(n.width-1))*4}].map(l=>({r:o[l.offset],g:o[l.offset+1],b:o[l.offset+2]})),c=0;for(let l=0;l<o.length;l+=4){let p=o[l],g=o[l+1],m=o[l+2],f=!1;for(let A of d)if(Math.sqrt(Math.pow(p-A.r,2)+Math.pow(g-A.g,2)+Math.pow(m-A.b,2))<e){f=!0;break}f&&(o[l+3]=0,c++)}return console.log(`[ImageUtils] Removed background from ${c} pixels (4-corner sampling, tolerance: ${e})`),a.putImageData(r,0,0),n.toDataURL("image/png")}catch(t){return console.error("[ImageUtils] Error removing background:",t),i}}var Pn=require("@google/genai");async function Zt(i,e,t=[],n={}){var a,r,o,s,d,c,u;try{if(!(i!=null&&i.trim()))throw new Error("Gemini API key is required");if(!(e!=null&&e.trim()))throw new Error("Prompt is required");for(let b=0;b<t.length;b++){let h=t[b];if(!h.base64||!h.mimeType)throw new Error(`Image ${b+1} is missing required data`);if(h.base64.length<1e3&&console.warn(`Image ${b+1} data appears very small, may be corrupted`),!h.mimeType.startsWith("image/"))throw new Error(`Image ${b+1} has invalid MIME type: ${h.mimeType}`)}let l=new Pn.GoogleGenAI({apiKey:i}),p="gemini-2.5-flash",g=[e];t.length>0&&t.forEach((b,h)=>{g.push({inlineData:{data:b.base64,mimeType:b.mimeType}}),console.log(`[Gemini] Added image ${h+1}: ${b.mimeType}, size: ${Math.round(b.base64.length/1024)}KB`)}),console.log(`[Gemini] Making request with ${t.length} images and prompt length: ${e.length}`);let m=await l.models.generateContent({model:p,contents:g}),f="",A=(o=(r=(a=m.candidates)==null?void 0:a[0])==null?void 0:r.content)==null?void 0:o.parts;if(A)for(let b of A)b.text&&(f+=b.text);if(!f.trim())throw new Error("Empty response from Gemini API");return console.log(`[Gemini] Response received, length: ${f.length}`),f}catch(l){throw console.error("[Gemini] API error:",l),(s=l.message)!=null&&s.includes("Unable to process input image")?new Error("Unable to process the uploaded image. Please ensure it's a valid PNG, JPG, or JPEG file under 10MB and not corrupted."):(d=l.message)!=null&&d.includes("API_KEY_INVALID")?new Error("Invalid Gemini API key. Please check your API key configuration."):(c=l.message)!=null&&c.includes("QUOTA_EXCEEDED")?new Error("Gemini API quota exceeded. Please try again later or check your billing."):(u=l.message)!=null&&u.includes("SAFETY")?new Error("Content was flagged by Gemini safety filters. Please try with different images."):l}}var Mn=require("@google/genai");async function xt(i,e,t=[],n={}){try{console.info("[GEMINI-REAL-SDK] Initializing GoogleGenAI...");let a=new Mn.GoogleGenAI({apiKey:i}),r=[{text:e}];t.length>0&&t.forEach((s,d)=>{console.info(`[GEMINI-REAL-SDK] Adding image part ${d}`),r.push({inlineData:{mimeType:s.mimeType,data:s.base64}})}),console.info("[GEMINI-REAL-SDK] Calling generateContent with model: gemini-2.5-flash-image");let o=await a.models.generateContent({model:"gemini-2.5-flash-image",contents:r});if(console.info("[GEMINI-REAL-SDK] Received response from model"),!o.candidates||!o.candidates[0]||!o.candidates[0].content||!o.candidates[0].content.parts)throw new Error("Gemini 2.5 Flash Image returned invalid response structure.");for(let s of o.candidates[0].content.parts)if(s.text)console.log(s.text);else if(s.inlineData){let d=s.inlineData.data,c=s.inlineData.mimeType||"image/png";return console.info("[GEMINI-REAL-SDK] Found inline image data in response"),`data:${c};base64,${d}`}throw new Error("Gemini 2.5 Flash Image returned no image data.")}catch(a){throw console.error("[GEMINI-REAL-SDK] Error in generateImageWithGemini25Flash:",JSON.stringify(a,Object.getOwnPropertyNames(a),2)),a}}var Wa=require("pixi.js");Xe();ue();var $n=require("pixi.js");var Ya=require("pixi.js");ue();function tr(i){return new Promise((e,t)=>{let n=new FileReader;n.onerror=()=>t(new Error("FileReader failed")),n.onload=()=>e(String(n.result||"")),n.readAsDataURL(i)})}function ir(i){var a;let[e,t]=i.split(","),n=e==null?void 0:e.match(/data:(.*?);base64/);return{base64:t!=null?t:"",mimeType:(a=n==null?void 0:n[1])!=null?a:"image/png"}}function nr(i){return`
|
|
47
47
|
Analyze these screenshots of a brand or game and extract its "Brand DNA".
|
|
48
48
|
|
|
49
49
|
Provide a concise summary (2-3 sentences) covering:
|
package/dist/pixi/index.css
CHANGED
|
@@ -2771,7 +2771,7 @@
|
|
|
2771
2771
|
}
|
|
2772
2772
|
|
|
2773
2773
|
.preview-shell.layout-fixed .debug-workbench {
|
|
2774
|
-
position:
|
|
2774
|
+
position: relative;
|
|
2775
2775
|
grid-column: 3;
|
|
2776
2776
|
grid-row: 1;
|
|
2777
2777
|
width: 350px;
|
|
@@ -2782,6 +2782,7 @@
|
|
|
2782
2782
|
border-right: none;
|
|
2783
2783
|
border-bottom: none;
|
|
2784
2784
|
box-shadow: none;
|
|
2785
|
+
overflow: visible;
|
|
2785
2786
|
top: 0 !important;
|
|
2786
2787
|
left: 0 !important;
|
|
2787
2788
|
right: 0 !important;
|
|
@@ -2790,7 +2791,7 @@
|
|
|
2790
2791
|
}
|
|
2791
2792
|
|
|
2792
2793
|
.preview-shell.layout-fixed .scene-panel.scene-objects {
|
|
2793
|
-
position:
|
|
2794
|
+
position: relative;
|
|
2794
2795
|
grid-column: 1;
|
|
2795
2796
|
grid-row: 1;
|
|
2796
2797
|
width: 300px;
|
|
@@ -2801,6 +2802,7 @@
|
|
|
2801
2802
|
border-left: none;
|
|
2802
2803
|
border-bottom: none;
|
|
2803
2804
|
box-shadow: none;
|
|
2805
|
+
overflow: visible;
|
|
2804
2806
|
top: 0 !important;
|
|
2805
2807
|
left: 0 !important;
|
|
2806
2808
|
right: 0 !important;
|
|
@@ -2849,9 +2851,22 @@
|
|
|
2849
2851
|
display: none !important;
|
|
2850
2852
|
}
|
|
2851
2853
|
|
|
2854
|
+
.preview-shell.layout-fixed .panel-resize-handle-v {
|
|
2855
|
+
position: absolute !important;
|
|
2856
|
+
top: 0 !important;
|
|
2857
|
+
bottom: 0 !important;
|
|
2858
|
+
right: 0 !important;
|
|
2859
|
+
left: auto !important;
|
|
2860
|
+
width: 4px !important;
|
|
2861
|
+
}
|
|
2862
|
+
|
|
2852
2863
|
.preview-shell.layout-fixed .workbench-resize-handle-v {
|
|
2864
|
+
position: absolute !important;
|
|
2865
|
+
top: 0 !important;
|
|
2866
|
+
bottom: 0 !important;
|
|
2853
2867
|
left: 0 !important;
|
|
2854
2868
|
right: auto !important;
|
|
2869
|
+
width: 4px !important;
|
|
2855
2870
|
}
|
|
2856
2871
|
|
|
2857
2872
|
/* Bottom Dock Styles */
|
package/dist/pixi/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x59e9ba,_0xa6ce3b){var a0_0x143bab={_0x131bcf:0x52,_0x247814:0x48,_0x3fff46:'5bYa',_0x3cf71a:0x5a,_0x3ce8fb:0x53,_0x1870fe:0x5d,_0x4ce96c:0x51,_0x4992a2:'7arK',_0x54ea89:0x118,_0xa581cb:0x121,_0x22a9c2:'9iAt',_0x587c3c:0x128,_0x56aba5:0x126,_0x43173:0x122,_0x41f44c:0x131,_0x163020:0x130,_0x3d0b71:0x2d3,_0x46a973:0x2dc,_0x51398a:'9iAt',_0x323b0d:0x2e9,_0x5ac29f:0x2e1,_0xbdcd27:0x114,_0x89e340:0x11e,_0x2a8747:0x2e8,_0x3073a3:0x2ee,_0x4f0896:0x2e6,_0x2a16b3:0x2f1,_0x452904:0x2dd,_0x5a6d65:'2mXX',_0x14c3f6:0x2e5,_0xe67553:0x2e2,_0x33e549:0x2da,_0x2364ae:'LuvH',_0x5f2efe:0x2d0,_0x2507be:0x2d7,_0x43ce41:0x4b,_0x38df17:0x4f,_0x44a080:0x56,_0x338349:'PRp9',_0x18175e:0x2ce,_0x611e92:'7N7q'},a0_0x54b6f1={_0x112c67:0x17};function _0x349430(_0xd022bd,_0xc36d6a,_0x121131,_0x5347a1,_0x2d88fa){return a0_0x4428(_0x2d88fa- -a0_0x54b6f1._0x112c67,_0x121131);}function _0x115bb1(_0x107f8a,_0x4a0ba1,_0x3728b9,_0x19f148,_0x4677e3){return a0_0x4428(_0x4677e3-0x1a2,_0x3728b9);}var _0x111e43=_0x59e9ba();function _0x1cbaa4(_0x3d45e0,_0x320941,_0x7fd3a9,_0x1e15fe,_0x5d94a1){return a0_0x4428(_0x320941- -0xeb,_0x5d94a1);}while(!![]){try{var _0x523d10=-parseInt(_0x1cbaa4(a0_0x143bab._0x131bcf,a0_0x143bab._0x247814,0x3c,0x3d,a0_0x143bab._0x3fff46))/(0x1b28+0x100*-0x16+-0x1*0x527)*(-parseInt(_0x1cbaa4(a0_0x143bab._0x3cf71a,a0_0x143bab._0x3ce8fb,a0_0x143bab._0x1870fe,a0_0x143bab._0x4ce96c,a0_0x143bab._0x4992a2))/(0xeb4+-0x136a+0x4b8))+parseInt(_0x349430(a0_0x143bab._0x54ea89,a0_0x143bab._0xa581cb,a0_0x143bab._0x22a9c2,a0_0x143bab._0x587c3c,a0_0x143bab._0x56aba5))/(-0x981+-0x864+-0xbf*-0x18)*(parseInt(_0x349430(0x12b,a0_0x143bab._0x43173,'eBNd',a0_0x143bab._0x41f44c,a0_0x143bab._0x163020))/(0x2648+-0xe49+-0x17fb*0x1))+parseInt(_0x115bb1(a0_0x143bab._0x3d0b71,a0_0x143bab._0x46a973,a0_0x143bab._0x51398a,a0_0x143bab._0x323b0d,a0_0x143bab._0x5ac29f))/(-0x1*-0x1e71+-0x1d71*-0x1+-0x3bdd)+-parseInt(_0x349430(0x115,a0_0x143bab._0xbdcd27,'lgM6',a0_0x143bab._0x89e340,0x11f))/(0x3be+0x83b+-0x17*0x85)*(-parseInt(_0x115bb1(a0_0x143bab._0x2a8747,0x2d9,'9hTx',a0_0x143bab._0x3073a3,a0_0x143bab._0x4f0896))/(0x257+0x943*0x2+-0x7*0x2fa))+-parseInt(_0x115bb1(a0_0x143bab._0x2a16b3,a0_0x143bab._0x452904,a0_0x143bab._0x5a6d65,a0_0x143bab._0x14c3f6,a0_0x143bab._0xe67553))/(0xa49+0x2d2*0x9+-0xbe1*0x3)+-parseInt(_0x115bb1(0x2c8,a0_0x143bab._0x33e549,a0_0x143bab._0x2364ae,a0_0x143bab._0x5f2efe,a0_0x143bab._0x2507be))/(-0x6c1+0x3c*-0x95+0x232*0x13)+-parseInt(_0x1cbaa4(a0_0x143bab._0x43ce41,0x4d,a0_0x143bab._0x38df17,a0_0x143bab._0x44a080,a0_0x143bab._0x338349))/(-0xa9*0x29+0x249f+-0x1c*0x57)*(parseInt(_0x115bb1(a0_0x143bab._0x18175e,a0_0x143bab._0x2507be,a0_0x143bab._0x611e92,0x2de,0x2d4))/(0x13*-0x7a+-0x2032+-0x294b*-0x1));if(_0x523d10===_0xa6ce3b)break;else _0x111e43['push'](_0x111e43['shift']());}catch(_0x1e73ea){_0x111e43['push'](_0x111e43['shift']());}}}(a0_0x507b,-0xd72e8+-0x22e1e*-0x3+0x15495a));function a0_0x4428(_0x2280af,_0x2416b0){_0x2280af=_0x2280af-(-0x3f4+-0x101*-0x2+0xc*0x43);var _0x2572df=a0_0x507b();var _0x1331e5=_0x2572df[_0x2280af];if(a0_0x4428['oztWWj']===undefined){var _0x25b06b=function(_0x870ac8){var _0x7c6985='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x4584ef='',_0x330c94='',_0x54d840=_0x4584ef+_0x25b06b;for(var _0x539f0c=0x1922+0x3*-0xc6e+0x614*0x2,_0x396757,_0x2bade5,_0x3212f5=-0x153c+-0xd4a+-0x9*-0x3d6;_0x2bade5=_0x870ac8['charAt'](_0x3212f5++);~_0x2bade5&&(_0x396757=_0x539f0c%(0x13e6+-0x2143+0xd61)?_0x396757*(0x2cf*0xd+0x1a7e+-0x3ec1)+_0x2bade5:_0x2bade5,_0x539f0c++%(-0x4*0x6c5+0xd9*-0x17+0x1*0x2e97))?_0x4584ef+=_0x54d840['charCodeAt'](_0x3212f5+(0xd5b+-0x8dd+-0x474))-(-0x21bd+0x1*0xd03+0x14c4)!==0x1*-0x23b6+-0x1ca7+-0x1*-0x405d?String['fromCharCode'](-0x1*0x16a5+-0x229a+0x3a3e&_0x396757>>(-(-0x232d+-0x3d*0x4+-0x349*-0xb)*_0x539f0c&0x1f3*-0xd+-0x101b+0x2978)):_0x539f0c:-0x1*-0x465+0xbbc*-0x3+0x1ecf){_0x2bade5=_0x7c6985['indexOf'](_0x2bade5);}for(var _0xcd7d12=0x1*-0xc42+-0x196*-0x15+-0x150c,_0x94d13=_0x4584ef['length'];_0xcd7d12<_0x94d13;_0xcd7d12++){_0x330c94+='%'+('00'+_0x4584ef['charCodeAt'](_0xcd7d12)['toString'](0x52*-0x1d+-0x45d+-0x1*-0xdb7))['slice'](-(0x4b5+-0x11*-0x209+-0x274c));}return decodeURIComponent(_0x330c94);};var _0x1e4035=function(_0x3441a2,_0x39bb7b){var _0x236e8d=[],_0x1c7693=0x85b+-0x1bfe+0x13a3,_0x48b4a4,_0x1cf382='';_0x3441a2=_0x25b06b(_0x3441a2);var _0x328b8c;for(_0x328b8c=0x382+-0x15e4+0x1262;_0x328b8c<0x518+0x1*-0x69f+0x287;_0x328b8c++){_0x236e8d[_0x328b8c]=_0x328b8c;}for(_0x328b8c=-0x645+-0x26*-0xa7+0x1285*-0x1;_0x328b8c<0x4*-0x23b+0x65*-0x2c+0x1b48;_0x328b8c++){_0x1c7693=(_0x1c7693+_0x236e8d[_0x328b8c]+_0x39bb7b['charCodeAt'](_0x328b8c%_0x39bb7b['length']))%(0x1ae2+0x1f53+0x5*-0xb71),_0x48b4a4=_0x236e8d[_0x328b8c],_0x236e8d[_0x328b8c]=_0x236e8d[_0x1c7693],_0x236e8d[_0x1c7693]=_0x48b4a4;}_0x328b8c=0xb64+0x2e7*-0x1+0x87d*-0x1,_0x1c7693=0x137e+0x3a+-0x4ee*0x4;for(var _0x464b67=0x1902+-0x1e*-0x82+-0x283e;_0x464b67<_0x3441a2['length'];_0x464b67++){_0x328b8c=(_0x328b8c+(-0xde7+-0x1*-0x2479+-0x1691))%(-0x1*0x155+0x2097+-0x2*0xf21),_0x1c7693=(_0x1c7693+_0x236e8d[_0x328b8c])%(0xd6*0x7+0x1d*0x152+-0x2b24),_0x48b4a4=_0x236e8d[_0x328b8c],_0x236e8d[_0x328b8c]=_0x236e8d[_0x1c7693],_0x236e8d[_0x1c7693]=_0x48b4a4,_0x1cf382+=String['fromCharCode'](_0x3441a2['charCodeAt'](_0x464b67)^_0x236e8d[(_0x236e8d[_0x328b8c]+_0x236e8d[_0x1c7693])%(-0xa00+0x10a1+-0x5a1)]);}return _0x1cf382;};a0_0x4428['KFFYKQ']=_0x1e4035,a0_0x4428['gtrxlf']={},a0_0x4428['oztWWj']=!![];}var _0x577a27=_0x2572df[0x148b+-0x1065+-0x426],_0x16ab54=_0x2280af+_0x577a27,_0x5e68c8=a0_0x4428['gtrxlf'][_0x16ab54];if(!_0x5e68c8){if(a0_0x4428['zUhyau']===undefined){var _0x1f669d=function(_0x4fbe34){this['XxiTSV']=_0x4fbe34,this['jpNqsS']=[0x1*-0xc1+-0x1dc*0xe+0x7f*0x36,0x1e9b+0x1*0x870+0x1*-0x270b,0x2174+0x1*0x2196+0x430a*-0x1],this['jebliw']=function(){return'newState';},this['manzKy']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['tBAyLf']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x1f669d['prototype']['UdpvMx']=function(){var _0x4c7204=new RegExp(this['manzKy']+this['tBAyLf']),_0x5a178d=_0x4c7204['test'](this['jebliw']['toString']())?--this['jpNqsS'][-0x1*-0x185+-0x3f8*-0x7+0x96*-0x32]:--this['jpNqsS'][0xb*-0x1df+-0xc61*-0x1+-0x15e*-0x6];return this['xBBJGa'](_0x5a178d);},_0x1f669d['prototype']['xBBJGa']=function(_0x22d63d){if(!Boolean(~_0x22d63d))return _0x22d63d;return this['gJsiaL'](this['XxiTSV']);},_0x1f669d['prototype']['gJsiaL']=function(_0x3c3dfc){for(var _0x4eab31=0x1809+0x1b28+0xa3d*-0x5,_0x47e008=this['jpNqsS']['length'];_0x4eab31<_0x47e008;_0x4eab31++){this['jpNqsS']['push'](Math['round'](Math['random']())),_0x47e008=this['jpNqsS']['length'];}return _0x3c3dfc(this['jpNqsS'][-0x8*-0x35f+-0xa2d+-0x10cb]);},new _0x1f669d(a0_0x4428)['UdpvMx'](),a0_0x4428['zUhyau']=!![];}_0x1331e5=a0_0x4428['KFFYKQ'](_0x1331e5,_0x2416b0),a0_0x4428['gtrxlf'][_0x16ab54]=_0x1331e5;}else _0x1331e5=_0x5e68c8;return _0x1331e5;}var a0_0x1029d6=(function(){var _0x29321c=!![];return function(_0x56f872,_0x394ffa){var _0x3d974c=_0x29321c?function(){if(_0x394ffa){var _0x2c25f8=_0x394ffa['apply'](_0x56f872,arguments);return _0x394ffa=null,_0x2c25f8;}}:function(){};return _0x29321c=![],_0x3d974c;};}()),a0_0x5c458c=a0_0x1029d6(this,function(){var a0_0x3526ab={_0x4f4d5:0x9e,_0x26f545:0xa1,_0x12a7d2:'UKuP',_0x5d4f08:0xb1,_0x220284:0xbd,_0x4d04d6:0xad,_0x3c6360:0x9b,_0x403a56:0x9c,_0x174454:'7N7q',_0xb9fea1:0xaa,_0x2179e3:0x9f,_0x54af18:'BaTp',_0x24692b:0x91,_0x114661:0x9e,_0xc5b928:'8unT',_0x1eb354:0xaf,_0x4f294a:'1gMw',_0x2e1531:0xab,_0x28e373:0xba,_0x27999c:'cZ)u',_0x16ea6b:0x175,_0x138317:0x17f,_0x12d726:0x183,_0x66b938:0x172,_0x4d13b6:0x177,_0x5c77ba:0x178,_0xa30ec:0xa7,_0xf97b9b:0xb6,_0x4e4c98:0xa4,_0x160139:0xb4,_0x4d043c:0xa5,_0x44bad7:'0Ob3',_0x5b2f43:0x93,_0x4dc90b:'mxB8',_0x5850f0:0x9a},a0_0x4435da={_0x89faad:0x1e7},a0_0x4d045a={_0x411367:0x2c6},_0xf82c5c={};function _0x4c0c46(_0x4a59a1,_0x11caaa,_0x68bdfc,_0x468ff8,_0x36642d){return a0_0x4428(_0x4a59a1- -0x1e8,_0x36642d);}function _0x20efba(_0xa98aa9,_0x4c8a41,_0x1c36e0,_0x592fc8,_0x45f844){return a0_0x4428(_0x45f844- -a0_0x4d045a._0x411367,_0xa98aa9);}function _0x4275e6(_0x2d92fc,_0x285eea,_0x576735,_0x16411b,_0x498c23){return a0_0x4428(_0x285eea- -a0_0x4435da._0x89faad,_0x576735);}_0xf82c5c[_0x4c0c46(-a0_0x3526ab._0x4f4d5,-0xa7,-0x96,-a0_0x3526ab._0x26f545,a0_0x3526ab._0x12a7d2)]=_0x4c0c46(-a0_0x3526ab._0x5d4f08,-a0_0x3526ab._0x220284,-0xaf,-a0_0x3526ab._0x4d04d6,'B8hG')+')+)+)'+'+$';var _0x3aac56=_0xf82c5c;return a0_0x5c458c[_0x4275e6(-a0_0x3526ab._0x3c6360,-a0_0x3526ab._0x403a56,a0_0x3526ab._0x174454,-a0_0x3526ab._0x3c6360,-0xa3)+'ing']()[_0x4c0c46(-0xad,-a0_0x3526ab._0xb9fea1,-a0_0x3526ab._0x2179e3,-a0_0x3526ab._0x26f545,a0_0x3526ab._0x54af18)+'h'](_0x4275e6(-a0_0x3526ab._0x24692b,-a0_0x3526ab._0x114661,a0_0x3526ab._0xc5b928,-0x96,-a0_0x3526ab._0x403a56)+')+)+)'+'+$')[_0x4275e6(-a0_0x3526ab._0x1eb354,-0xad,a0_0x3526ab._0x4f294a,-a0_0x3526ab._0x2e1531,-a0_0x3526ab._0x28e373)+_0x20efba(a0_0x3526ab._0x27999c,-a0_0x3526ab._0x16ea6b,-0x190,-a0_0x3526ab._0x138317,-a0_0x3526ab._0x12d726)]()[_0x20efba('PRp9',-a0_0x3526ab._0x66b938,-a0_0x3526ab._0x4d13b6,-a0_0x3526ab._0x66b938,-a0_0x3526ab._0x5c77ba)+_0x4c0c46(-a0_0x3526ab._0xa30ec,-0xa8,-a0_0x3526ab._0xf97b9b,-a0_0x3526ab._0x4e4c98,'lgM6')+'r'](a0_0x5c458c)[_0x4275e6(-a0_0x3526ab._0x160139,-a0_0x3526ab._0x4d043c,a0_0x3526ab._0x44bad7,-a0_0x3526ab._0x4f4d5,-a0_0x3526ab._0x4d04d6)+'h'](_0x3aac56[_0x4275e6(-a0_0x3526ab._0x5b2f43,-0x98,a0_0x3526ab._0x4dc90b,-a0_0x3526ab._0x5850f0,-0x98)]);});a0_0x5c458c();function a0_0x507b(){var _0x5059b9=['r1n/hwCYztFcMuHSiCkqWPa','gmoXyGmOuCoEi8oAW6aVhG','W6K0WO9weq','dSojW5PadG','jtFcHmo7WOHxW7hcKZNdOSkdW5O','qrddTx1dWOLOrtNdRftdGHO','WRJdQqDABmogv8kyWOrrWOxdHhi','FmoFW57cGSo3fCoUWQ8SzqlcP0S','gmo2zhjfd8oybCo6','WQtdTH9fCq','WR5QW5fdixxdQCktW4u','iCklW59+iSo4sq','uZK6g8oO','wSktq8knW5K','sCkwWRiDW65SW7FcUZK','iSolWPf1bCoMwhZcRa','eCovW7avWRz+hq','j8olWPucymkei3VcQCopp8kwzG','ymoce8kLWQL7W7FdHH7cJMCRWP7dVG','w8k1nuvZ','jmozC8k3sq','WRX7hG','W7RcKCkPW5hcSXBcOCk9qb4','jSk4uf8UmfXyWOBcOGn+W4G','W5hdMSoCfmkdvmoJW55Q','WPJdQSkUWO5VW4DiW64smqxcUq','bwBcUmoawfnLtZO','cNHygLq','WOxcTLJcVWy','zwNdOCk8W40'];a0_0x507b=function(){return _0x5059b9;};return a0_0x507b();}import{A as a0_0x1b259b,B as a0_0x39e25d,C as a0_0xd858b9,D as a0_0x1c039a,b as a0_0x1520d3,c as a0_0xc33a24,d as a0_0x33f84d,e as a0_0x14f905,f as a0_0x44b203,g as a0_0x1c9fb9,h as a0_0x185f9c,i as a0_0x35e82c,j as a0_0x279b44,k as a0_0x2ac9d1,l as a0_0x3c18af,m as a0_0x32cbbf,n as a0_0x244bcf,o as a0_0x280923,p as a0_0x4df1a3,q as a0_0x29f5e8,r as a0_0x545b99,s as a0_0x1b20a1,t as a0_0x417517,u as a0_0x53c802,v as a0_0x24ccf5,w as a0_0x1a8066,x as a0_0x42fd41,y as a0_0x461f18,z as a0_0x35d79e}from'../chunk-A3OUQG23.js';import{a as a0_0x493ecb,b as a0_0x2a494a,c as a0_0x507f75,d as a0_0x55eb26,e as a0_0x18a487}from'../chunk-I5OOVR5U.js';import'../chunk-LV4HGC5G.js';import'../chunk-ZLL42OOV.js';import'../chunk-E6WJCS24.js';import'../chunk-JXBG6UFL.js';export{a0_0x493ecb as AssetCache,a0_0x507f75 as AssetLoader,a0_0x53c802 as AssetSystem,a0_0x55eb26 as AssetTextures,a0_0x1b20a1 as Assets,a0_0x280923 as BaseSystem,a0_0x244bcf as GameEngine,a0_0x14f905 as GameObject,a0_0x44b203 as GameObjectManager,a0_0x32cbbf as ObjectFactory,a0_0x33f84d as Renderer,a0_0x4df1a3 as RuntimeObjectRegistry,a0_0xc33a24 as Transform,a0_0x39e25d as applyScreenAnchor,a0_0x29f5e8 as basePixi,a0_0x1a8066 as clearResponsiveElements,a0_0x1520d3 as createPixiBase,a0_0x279b44 as getRegisteredFontIds,a0_0x24ccf5 as globalResponsiveMultipliers,a0_0x18a487 as initAssetTextures,a0_0x417517 as initAssets,a0_0xd858b9 as layout,a0_0x3c18af as playLottieOverlay,a0_0x35e82c as registerFont,a0_0x2a494a as registerType,a0_0x461f18 as resolveAnchorVec2,a0_0x1c9fb9 as resolveFont,a0_0x185f9c as resolveFontWeight,a0_0x35d79e as resolveScreenAnchorPoint,a0_0x1b259b as resolveScreenRatioPoint,a0_0x1c039a as runInitSequence,a0_0x2ac9d1 as setLottieInstance,a0_0x545b99 as spawnSceneFromConfig,a0_0x42fd41 as updateScreenState};
|
|
1
|
+
(function(_0x3b3e2f,_0xb147d5){var a0_0x101c7e={_0x35df90:0x1f6,_0x26f0a5:0x1fb,_0x594d3c:'Yq)P',_0x17d10c:0x1fc,_0x2c2217:0xf8,_0x1b8b9f:0xe7,_0x39f530:'iJ)x',_0x9b7fa9:0x209,_0x25c1c8:0x20a,_0x2729bb:0x21d,_0xa078e1:0x20d,_0x339166:0x31b,_0x325ddf:0x319,_0x38f8cd:'Ug9i',_0x18095a:0x321,_0x21de95:0xe4,_0x109946:0xd5,_0x4416fb:'!7XX',_0x3e74e5:0x206,_0x23ae61:0x20a,_0x1784fb:'LAQ#',_0x4d06cf:0x20f,_0x41ce22:0x203,_0x2ddfb8:0xe0,_0x2465fe:0xdd,_0x50eca5:'ipTO',_0xcc8c0b:0xee,_0x488c3d:0xef,_0x4c1038:'h$S1',_0x272fe2:0xef,_0xe531d3:0xeb,_0x3b2f51:0xef,_0x4ae191:0x32f,_0x578156:0x32a,_0x20a209:'Ug9i',_0x3f0d33:0x337,_0x29a057:0x211,_0x1f38a2:0x207,_0x3810da:0x20c},a0_0x23c1e9={_0x14b74f:0x4},_0x2ae31d=_0x3b3e2f();function _0x3d3231(_0x432bbf,_0x205671,_0x2f2d04,_0x4105c9,_0x461975){return a0_0x2719(_0x461975-0x12e,_0x4105c9);}function _0x1bd73a(_0x4fbf4b,_0x988a2e,_0x41c1b7,_0x40641e,_0xa8e7fd){return a0_0x2719(_0xa8e7fd- -a0_0x23c1e9._0x14b74f,_0x41c1b7);}function _0x52e69d(_0x136aa3,_0x7c2c3e,_0x511813,_0x559b50,_0x1c1d77){return a0_0x2719(_0x7c2c3e- -0x2e6,_0x1c1d77);}while(!![]){try{var _0x4fb821=-parseInt(_0x1bd73a(a0_0x101c7e._0x35df90,a0_0x101c7e._0x26f0a5,a0_0x101c7e._0x594d3c,0x1ed,a0_0x101c7e._0x17d10c))/(0x3*-0x30f+0x2509+0x1*-0x1bdb)+-parseInt(_0x52e69d(-0xe3,-0xef,-a0_0x101c7e._0x2c2217,-a0_0x101c7e._0x1b8b9f,a0_0x101c7e._0x39f530))/(-0xc4c+-0x255*0x1+-0x1*-0xea3)*(parseInt(_0x1bd73a(a0_0x101c7e._0x9b7fa9,a0_0x101c7e._0x25c1c8,'u9)@',a0_0x101c7e._0x2729bb,a0_0x101c7e._0xa078e1))/(0xc25+-0x1d8e+-0xdf*-0x14))+-parseInt(_0x3d3231(0x31f,a0_0x101c7e._0x339166,a0_0x101c7e._0x325ddf,a0_0x101c7e._0x38f8cd,a0_0x101c7e._0x18095a))/(-0x1d07*-0x1+-0xf81+0x85*-0x1a)+-parseInt(_0x52e69d(-0xdf,-a0_0x101c7e._0x21de95,-a0_0x101c7e._0x109946,-0xd6,a0_0x101c7e._0x4416fb))/(0x5*-0x1e0+-0x1*0x114e+0x557*0x5)*(parseInt(_0x1bd73a(a0_0x101c7e._0x3e74e5,a0_0x101c7e._0x23ae61,a0_0x101c7e._0x1784fb,a0_0x101c7e._0x4d06cf,a0_0x101c7e._0x41ce22))/(0x607*0x4+-0x1b2a+0xc5*0x4))+-parseInt(_0x52e69d(-a0_0x101c7e._0x2ddfb8,-0xe5,-0xdf,-a0_0x101c7e._0x2465fe,a0_0x101c7e._0x50eca5))/(0x1d11+-0x1c79*-0x1+0x1*-0x3983)*(-parseInt(_0x52e69d(-0xf4,-a0_0x101c7e._0xcc8c0b,-0xf8,-a0_0x101c7e._0x488c3d,a0_0x101c7e._0x4c1038))/(0xaf9+0x2*0x938+-0x3*0x9cb))+parseInt(_0x52e69d(-a0_0x101c7e._0x272fe2,-a0_0x101c7e._0xe531d3,-a0_0x101c7e._0x3b2f51,-a0_0x101c7e._0xe531d3,'cgP]'))/(0x1b*0x81+-0x1ad6+0xd44)*(parseInt(_0x3d3231(a0_0x101c7e._0x4ae191,a0_0x101c7e._0x578156,0x340,a0_0x101c7e._0x20a209,a0_0x101c7e._0x3f0d33))/(-0x11e*0x17+-0x7bd*-0x3+0x3*0xd7))+parseInt(_0x1bd73a(a0_0x101c7e._0x29a057,0x210,a0_0x101c7e._0x39f530,a0_0x101c7e._0x1f38a2,a0_0x101c7e._0x3810da))/(0xa22*0x1+-0x1602+0xbeb);if(_0x4fb821===_0xb147d5)break;else _0x2ae31d['push'](_0x2ae31d['shift']());}catch(_0x12d31f){_0x2ae31d['push'](_0x2ae31d['shift']());}}}(a0_0x5d56,-0x1a*0x36c7+-0x5aebd*0x1+0x31ebe*0x5));var a0_0x459641=(function(){var a0_0x1e675c={_0x54fa92:0x104,_0x3ae948:0xed,_0x315d32:0x101,_0x22b515:'fxxr'},_0x5c5f1b=!![];return function(_0x5780be,_0x1cc368){var a0_0x11b0b7={_0x799f7e:0x105},_0x311c8b=_0x5c5f1b?function(){function _0x237083(_0x167a0f,_0x6fe97e,_0x2fb344,_0x8ae441,_0x4a4eb2){return a0_0x2719(_0x167a0f- -a0_0x11b0b7._0x799f7e,_0x4a4eb2);}if(_0x1cc368){var _0x45a1ff=_0x1cc368[_0x237083(0xf5,a0_0x1e675c._0x54fa92,a0_0x1e675c._0x3ae948,a0_0x1e675c._0x315d32,a0_0x1e675c._0x22b515)](_0x5780be,arguments);return _0x1cc368=null,_0x45a1ff;}}:function(){};return _0x5c5f1b=![],_0x311c8b;};}()),a0_0x40e583=a0_0x459641(this,function(){var a0_0x4dbf6f={_0xeaac6d:0x2e5,_0x5e885b:'cgP]',_0x10b67a:0x2d6,_0x1a97cd:0x2de,_0x377aba:0x2c6,_0x16eafe:0x2b0,_0x170e17:0x2b8,_0x4b2c20:0x3b2,_0x8ef72:0x3b5,_0x1a6e43:0x3a2,_0x3346c2:0x3ae,_0x4c09bc:0x39b,_0xbe412f:0x3a1,_0x2b4861:'@9QF',_0x10c8db:0x3c2,_0x3373f4:0x3ad,_0x60bed6:0x3ab,_0x292fe7:0x3b7,_0x11578b:0x2e1,_0x13f7bf:0x2ee,_0x217854:0x2d5,_0x330d8f:'0b!i',_0x3958ad:0x2db,_0x1af8c4:0x2d9,_0x4e9f50:0x3ae,_0x4bce68:0x3ad,_0x90ef2f:0x3bd,_0x381c83:0x2e2,_0x2ab4e7:'!7XX',_0x31b56d:0x2d8,_0x1a629c:0x2cb,_0x390d91:0x2e2,_0x16c709:'u0F0',_0x485437:0x2f3},a0_0x227311={_0x1cc225:0xc3},a0_0x5cd9a7={_0xc9d930:0xe2},a0_0x1b4852={_0x1206f1:0x1af};function _0x16f178(_0x55d5b2,_0x2c319d,_0x1cf707,_0xf7b54c,_0x49dd4f){return a0_0x2719(_0x49dd4f-a0_0x1b4852._0x1206f1,_0x55d5b2);}function _0xf2cac3(_0xebce25,_0x57ec90,_0x34e350,_0x4ff633,_0x453dcc){return a0_0x2719(_0x34e350-a0_0x5cd9a7._0xc9d930,_0x57ec90);}var _0x54baa0={};_0x54baa0[_0xf2cac3(a0_0x4dbf6f._0xeaac6d,a0_0x4dbf6f._0x5e885b,a0_0x4dbf6f._0x10b67a,a0_0x4dbf6f._0x1a97cd,a0_0x4dbf6f._0x377aba)]=_0x394fb3(a0_0x4dbf6f._0x16eafe,a0_0x4dbf6f._0x170e17,0x2b8,0x2b2,'cHGR')+')+)+)'+'+$';var _0x258221=_0x54baa0;function _0x394fb3(_0x3a5903,_0x58ffba,_0x72536a,_0xba87a3,_0x3839cb){return a0_0x2719(_0x58ffba-a0_0x227311._0x1cc225,_0x3839cb);}return a0_0x40e583['toStr'+_0x16f178('at&W',a0_0x4dbf6f._0x4b2c20,0x3b9,a0_0x4dbf6f._0x4b2c20,a0_0x4dbf6f._0x8ef72)]()[_0x16f178('(R^b',a0_0x4dbf6f._0x1a6e43,a0_0x4dbf6f._0x3346c2,a0_0x4dbf6f._0x4c09bc,a0_0x4dbf6f._0xbe412f)+'h'](_0x258221['ljcLf'])[_0x16f178(a0_0x4dbf6f._0x2b4861,a0_0x4dbf6f._0x10c8db,a0_0x4dbf6f._0x3373f4,a0_0x4dbf6f._0x60bed6,a0_0x4dbf6f._0x292fe7)+_0xf2cac3(0x2e9,'TXcF',a0_0x4dbf6f._0x11578b,a0_0x4dbf6f._0x13f7bf,a0_0x4dbf6f._0x217854)]()[_0xf2cac3(0x2cf,a0_0x4dbf6f._0x330d8f,a0_0x4dbf6f._0x3958ad,a0_0x4dbf6f._0x1af8c4,0x2dd)+_0x16f178('h$S1',a0_0x4dbf6f._0x4e9f50,0x3b3,a0_0x4dbf6f._0x4bce68,a0_0x4dbf6f._0x90ef2f)+'r'](a0_0x40e583)[_0xf2cac3(a0_0x4dbf6f._0x381c83,a0_0x4dbf6f._0x2ab4e7,a0_0x4dbf6f._0x31b56d,a0_0x4dbf6f._0x1a97cd,a0_0x4dbf6f._0x1a629c)+'h'](_0x258221[_0xf2cac3(a0_0x4dbf6f._0x390d91,a0_0x4dbf6f._0x16c709,0x2e5,0x2d6,a0_0x4dbf6f._0x485437)]);});a0_0x40e583();import{A as a0_0x2d106e,B as a0_0x4fd218,C as a0_0x20d19e,D as a0_0xc77e6d,b as a0_0x5c3e53,c as a0_0x50f0d0,d as a0_0x2956a0,e as a0_0x47c9fd,f as a0_0x735689,g as a0_0x58f602,h as a0_0x41276e,i as a0_0x245722,j as a0_0x35e8a6,k as a0_0x13d2fe,l as a0_0x1f0009,m as a0_0x22a052,n as a0_0x40c34b,o as a0_0x4d0d29,p as a0_0x49b951,q as a0_0x4f86ed,r as a0_0x2a26ea,s as a0_0x342841,t as a0_0x2b04d9,u as a0_0x1428ff,v as a0_0x53cab1,w as a0_0x81953a,x as a0_0x2f3b35,y as a0_0x12a56f,z as a0_0x2bbd02}from'../chunk-DI4XTNYK.js';function a0_0x2719(_0x1d20af,_0x2f5421){_0x1d20af=_0x1d20af-(0x7*0x3c5+0x76f*-0x1+-0x1102);var _0x4763b6=a0_0x5d56();var _0x14c54c=_0x4763b6[_0x1d20af];if(a0_0x2719['JJmltp']===undefined){var _0x531dc5=function(_0x5522fd){var _0x4c8d37='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x243f05='',_0x1a9124='',_0x3ea0d5=_0x243f05+_0x531dc5;for(var _0x364c38=0x10bb+-0x2*0x27b+0x1*-0xbc5,_0x38277d,_0x2e1e7c,_0x58213a=-0x1b25*-0x1+0x10f3+-0x2c18;_0x2e1e7c=_0x5522fd['charAt'](_0x58213a++);~_0x2e1e7c&&(_0x38277d=_0x364c38%(-0xb*0x195+-0x17fa+0x2965)?_0x38277d*(0x1*-0x18b8+-0xb5*-0x20+0x258)+_0x2e1e7c:_0x2e1e7c,_0x364c38++%(0x58f*0x3+0x1064+0x210d*-0x1))?_0x243f05+=_0x3ea0d5['charCodeAt'](_0x58213a+(0xe*0x1c8+-0x10e*0xc+-0xc3e))-(0x688*-0x3+-0x3*-0x4b2+-0x4*-0x163)!==0x1e2*-0x12+0x2349+-0x165?String['fromCharCode'](-0x40b*-0x2+-0x8*-0xe3+-0xe2f&_0x38277d>>(-(0x4bb+-0xd5e*0x1+0x8a5)*_0x364c38&0x235a+0xd93+-0x3c3*0xd)):_0x364c38:-0x177b+0x1*-0x1d36+-0x11f*-0x2f){_0x2e1e7c=_0x4c8d37['indexOf'](_0x2e1e7c);}for(var _0x4bcdc3=0x47b+-0x765*0x3+0x11b4,_0x4d1d46=_0x243f05['length'];_0x4bcdc3<_0x4d1d46;_0x4bcdc3++){_0x1a9124+='%'+('00'+_0x243f05['charCodeAt'](_0x4bcdc3)['toString'](-0x2579+-0x1c16+0x419f))['slice'](-(0x113c+0x1eae*-0x1+-0x2*-0x6ba));}return decodeURIComponent(_0x1a9124);};var _0x1afa81=function(_0xe892a9,_0x50dc5f){var _0x47b965=[],_0x2c8488=0x1a54+0xc2f*-0x1+-0xe25,_0x48bf14,_0x47defc='';_0xe892a9=_0x531dc5(_0xe892a9);var _0x5329b6;for(_0x5329b6=0x5*0x3f3+-0x212b+-0x35b*-0x4;_0x5329b6<-0x36b*0x4+0x224*-0x5+0x1960;_0x5329b6++){_0x47b965[_0x5329b6]=_0x5329b6;}for(_0x5329b6=-0x2467+-0x3d3*0x1+0x283a;_0x5329b6<0x2*-0xbe6+-0x33d*0x1+0x1c09*0x1;_0x5329b6++){_0x2c8488=(_0x2c8488+_0x47b965[_0x5329b6]+_0x50dc5f['charCodeAt'](_0x5329b6%_0x50dc5f['length']))%(0x209f+0x1b9*-0x9+-0x101e),_0x48bf14=_0x47b965[_0x5329b6],_0x47b965[_0x5329b6]=_0x47b965[_0x2c8488],_0x47b965[_0x2c8488]=_0x48bf14;}_0x5329b6=-0x16f9+-0x13ad+0x2aa6,_0x2c8488=0xdc0+-0x51a*-0x5+-0x2742;for(var _0x5270c2=-0x219d*-0x1+0x2*-0x11a7+0x1b1;_0x5270c2<_0xe892a9['length'];_0x5270c2++){_0x5329b6=(_0x5329b6+(0x247c*0x1+-0x607+-0x1e74))%(0x1c7b+0x13c7*-0x1+0x11*-0x74),_0x2c8488=(_0x2c8488+_0x47b965[_0x5329b6])%(-0xe*0x41+0x185c+0x1a*-0xc3),_0x48bf14=_0x47b965[_0x5329b6],_0x47b965[_0x5329b6]=_0x47b965[_0x2c8488],_0x47b965[_0x2c8488]=_0x48bf14,_0x47defc+=String['fromCharCode'](_0xe892a9['charCodeAt'](_0x5270c2)^_0x47b965[(_0x47b965[_0x5329b6]+_0x47b965[_0x2c8488])%(-0x1f8c+0xb49*0x1+0x1543)]);}return _0x47defc;};a0_0x2719['JgRidl']=_0x1afa81,a0_0x2719['FCnMFW']={},a0_0x2719['JJmltp']=!![];}var _0x1cc438=_0x4763b6[-0x403*0x8+0x6ba*0x1+-0x2*-0xcaf],_0x371d06=_0x1d20af+_0x1cc438,_0xaac0b5=a0_0x2719['FCnMFW'][_0x371d06];if(!_0xaac0b5){if(a0_0x2719['Bsptwf']===undefined){var _0x28ec9d=function(_0x30e9b5){this['xczKAg']=_0x30e9b5,this['IxhAUp']=[0x2ea+-0xc95+0x1*0x9ac,-0x106*0x25+0x1*0x10a9+0x1535,0x1*-0x1b53+-0xbc*0x4+0x7f*0x3d],this['YIUTai']=function(){return'newState';},this['eTaTzJ']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['RjtksS']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x28ec9d['prototype']['CdjCjt']=function(){var _0x142c1c=new RegExp(this['eTaTzJ']+this['RjtksS']),_0x598790=_0x142c1c['test'](this['YIUTai']['toString']())?--this['IxhAUp'][0xc1*-0x20+0x1*-0xdba+0x25db]:--this['IxhAUp'][0x405+-0x2*0xb7d+0x1*0x12f5];return this['NrHQiR'](_0x598790);},_0x28ec9d['prototype']['NrHQiR']=function(_0x447052){if(!Boolean(~_0x447052))return _0x447052;return this['WzwxaJ'](this['xczKAg']);},_0x28ec9d['prototype']['WzwxaJ']=function(_0x3d148d){for(var _0x46316a=0x1*0x5f1+-0x8a2+0x2b1,_0x2c5241=this['IxhAUp']['length'];_0x46316a<_0x2c5241;_0x46316a++){this['IxhAUp']['push'](Math['round'](Math['random']())),_0x2c5241=this['IxhAUp']['length'];}return _0x3d148d(this['IxhAUp'][-0x1c59+-0x2*-0xff8+-0x397*0x1]);},new _0x28ec9d(a0_0x2719)['CdjCjt'](),a0_0x2719['Bsptwf']=!![];}_0x14c54c=a0_0x2719['JgRidl'](_0x14c54c,_0x2f5421),a0_0x2719['FCnMFW'][_0x371d06]=_0x14c54c;}else _0x14c54c=_0xaac0b5;return _0x14c54c;}import{a as a0_0x3f967a,b as a0_0x3eb13f,c as a0_0x4db3ec,d as a0_0x51e6f7,e as a0_0x47faaf}from'../chunk-I5OOVR5U.js';import'../chunk-LV4HGC5G.js';import'../chunk-ZLL42OOV.js';import'../chunk-E6WJCS24.js';import'../chunk-JXBG6UFL.js';export{a0_0x3f967a as AssetCache,a0_0x4db3ec as AssetLoader,a0_0x1428ff as AssetSystem,a0_0x51e6f7 as AssetTextures,a0_0x342841 as Assets,a0_0x4d0d29 as BaseSystem,a0_0x40c34b as GameEngine,a0_0x47c9fd as GameObject,a0_0x735689 as GameObjectManager,a0_0x22a052 as ObjectFactory,a0_0x2956a0 as Renderer,a0_0x49b951 as RuntimeObjectRegistry,a0_0x50f0d0 as Transform,a0_0x4fd218 as applyScreenAnchor,a0_0x4f86ed as basePixi,a0_0x81953a as clearResponsiveElements,a0_0x5c3e53 as createPixiBase,a0_0x35e8a6 as getRegisteredFontIds,a0_0x53cab1 as globalResponsiveMultipliers,a0_0x47faaf as initAssetTextures,a0_0x2b04d9 as initAssets,a0_0x20d19e as layout,a0_0x1f0009 as playLottieOverlay,a0_0x245722 as registerFont,a0_0x3eb13f as registerType,a0_0x12a56f as resolveAnchorVec2,a0_0x58f602 as resolveFont,a0_0x41276e as resolveFontWeight,a0_0x2bbd02 as resolveScreenAnchorPoint,a0_0x2d106e as resolveScreenRatioPoint,a0_0xc77e6d as runInitSequence,a0_0x13d2fe as setLottieInstance,a0_0x2a26ea as spawnSceneFromConfig,a0_0x2f3b35 as updateScreenState};function a0_0x5d56(){var _0x4bb079=['WR7dRmk2W7ZcMmkLWRCpWONdHf3dVq','WPxcGZhcGhiHvSoUW5pcOXBdGa','vvvwWRBdRG','WRhcPSoWp8odW7/cPJpdPW','yCkTaJtcPY7cPSoF','WQ3dJg0','WRbNWQj4WPtcJCk+yq','oWC7WP4B','n8o1hJxdMSk7z2pdG8kSEZu','lgGjlSomidO6','WQ3cN8oHW5tcTc3cO8oz','WQ0oqr/dHmoxzX88W7JdMmokW5C','W5/cV8kKhCoStdvBWO0ZW6VcHJC','rmkosfVdPq','oWRdL8orW6ZdGIxcLwbXF8ku','W44/W4tcImk+W5ZdLSoBW5bmwmklWQ8','u8kXvHz4vCk0BSkb','nmk/aSoDW5y','mSoXgJJdMmk5dv7dUmkcFqxdJW','W6ZdTmkGoSoD','n3b7wSkO','W5xdK2ldGYC','W4q5W4JcH8ozWOtcLSonW7Lb','bmopCKFdM2NdTmkz','WQXnldOa','WPdcS31RW4G','WRFcRmk6i8o9W6VcMq0','vSosW4RdLCkHWRvii3vdaMG','WRDHW40AW63dISkUEuWIc8o+','WQnzW6BcJ8kyFGOUWPCiWOSx','zLlcIa','W5ZcTCkIhmoHsLr6WO8pW5hcMW'];a0_0x5d56=function(){return _0x4bb079;};return a0_0x5d56();}
|