handler-playable-sdk 0.3.3 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/AssetEditorModal-DBAGQINC.js +1 -0
  2. package/dist/AssetTextures-AZY5VKWH.js +1 -0
  3. package/dist/ConfigOverride-DFTDUTRQ.js +1 -0
  4. package/dist/chunk-C2CEUBBT.js +1325 -0
  5. package/dist/chunk-DEUORFXE.js +1 -0
  6. package/dist/chunk-DHSGG7NF.js +1 -0
  7. package/dist/chunk-E6WJCS24.js +46 -0
  8. package/dist/chunk-PWGHKK3J.js +1 -0
  9. package/dist/chunk-Q7FPWOA3.js +1 -0
  10. package/dist/config-7DI6U2YD.js +1 -0
  11. package/dist/index.cjs +1360 -0
  12. package/dist/index.css +4537 -1
  13. package/dist/index.d.cts +892 -0
  14. package/dist/index.d.ts +494 -39
  15. package/dist/index.js +1 -1
  16. package/dist/{loader-object-centric-C1QteFfG.d.mts → loader-object-centric-Ce6MVkQw.d.cts} +1 -1
  17. package/dist/{loader-object-centric-C1QteFfG.d.ts → loader-object-centric-Ce6MVkQw.d.ts} +1 -1
  18. package/dist/pixi/index.cjs +256 -0
  19. package/dist/pixi/index.css +4537 -1
  20. package/dist/pixi/{index.d.mts → index.d.cts} +156 -144
  21. package/dist/pixi/index.d.ts +156 -144
  22. package/dist/pixi/index.js +1 -27
  23. package/dist/three/index.cjs +363 -0
  24. package/dist/three/index.css +4537 -1
  25. package/dist/three/index.js +1 -134
  26. package/package.json +33 -20
  27. package/dist/ConfigOverride-6YH2ILBJ.mjs +0 -1
  28. package/dist/chunk-BDZGKN5O.mjs +0 -1
  29. package/dist/chunk-GYW3GFXA.mjs +0 -830
  30. package/dist/chunk-HN7I4BLB.mjs +0 -1
  31. package/dist/config-QLS2MDB6.mjs +0 -1
  32. package/dist/index.d.mts +0 -437
  33. package/dist/index.mjs +0 -1
  34. package/dist/pixi/index.mjs +0 -1
  35. package/dist/three/index.mjs +0 -118
  36. /package/dist/three/{index.d.mts → index.d.cts} +0 -0
@@ -1,6 +1,6 @@
1
1
  import * as PixiJS from 'pixi.js';
2
- import { Application, Container, Texture, Sprite, Text, Graphics, Point } from 'pixi.js';
3
- import { O as ObjectCentricConfig$1 } from '../loader-object-centric-C1QteFfG.js';
2
+ import { Application, Container, Sprite, Texture, Text } from 'pixi.js';
3
+ import { O as ObjectCentricConfig$1 } from '../loader-object-centric-Ce6MVkQw.js';
4
4
 
5
5
  /**
6
6
  * Handler SDK - PixiJS Base Context
@@ -110,7 +110,7 @@ declare class Renderer {
110
110
  visible?: boolean;
111
111
  tint?: number | null;
112
112
  }): void;
113
- syncToPixi(pixiObject: Container | any): void;
113
+ syncToPixi(pixiObject: Container | any, instanceId?: string): void;
114
114
  }
115
115
  /**
116
116
  * Base GameObject class - Unity-style entity with components
@@ -129,11 +129,21 @@ declare class GameObject {
129
129
  transform: Transform;
130
130
  renderer: Renderer;
131
131
  private _config;
132
+ private _tickerCleanup;
133
+ onRebuildRequired: ((gameObject: GameObject, nextConfig: any) => void) | null;
132
134
  constructor(instanceId: string, objectConfig: string, pixiObject: Container | any, config: any);
133
135
  /**
134
136
  * Sync all components to PixiJS object
135
137
  */
136
138
  sync(): void;
139
+ /**
140
+ * Sync Text-specific properties (ui.text, fontSize, color, etc.)
141
+ */
142
+ private syncTextProperties;
143
+ /**
144
+ * Cleanup GameObject and its tickers
145
+ */
146
+ destroy(): void;
137
147
  /**
138
148
  * Update config and sync (for hot-reload)
139
149
  */
@@ -146,6 +156,22 @@ declare class GameObject {
146
156
  * Apply optional non-uniform scale from effects (if provided)
147
157
  */
148
158
  private applyEffectsScale;
159
+ /**
160
+ * Apply visual effects (shadow, glow, blur, stroke, distortion)
161
+ *
162
+ * NOTE: Full-quality effects (drop shadow with offset, crisp outline stroke, distortion)
163
+ * require the optional `pixi-filters` package. Current implementation uses built-in
164
+ * PixiJS filters with some visual limitations.
165
+ */
166
+ private applyEffects;
167
+ /**
168
+ * Apply intro animation
169
+ */
170
+ private applyIntro;
171
+ /**
172
+ * Apply motion and animations (pulse, swing)
173
+ */
174
+ private applyMotion;
149
175
  /**
150
176
  * Get component value
151
177
  */
@@ -190,6 +216,7 @@ declare class GameObject {
190
216
  declare class GameObjectManager {
191
217
  private objects;
192
218
  private config;
219
+ onObjectRebuildRequired: ((instanceId: string, nextConfig: any) => Promise<GameObject>) | null;
193
220
  constructor(config: any);
194
221
  /**
195
222
  * Create a GameObject from config
@@ -264,139 +291,6 @@ declare function getRegisteredFontIds(): string[];
264
291
  */
265
292
  type ObjectCentricConfig = ObjectCentricConfig$1;
266
293
 
267
- /**
268
- * Handler SDK - EndGame UI Panel
269
- *
270
- * Success screen with logo, text, CTA button, and tutorial hand.
271
- * Fully configurable via UI config system.
272
- *
273
- * DO NOT EDIT - Handler SDK Core
274
- */
275
-
276
- interface EndGamePanelElements {
277
- panel: Container;
278
- logo: Sprite;
279
- title: Text;
280
- subtitle: Text;
281
- footer: Text;
282
- ctaButton: Graphics;
283
- ctaText: Text;
284
- ctaHint: Text;
285
- hand: Sprite;
286
- }
287
- /**
288
- * Create EndGame success panel with all UI elements
289
- */
290
- declare function createEndGamePanel(config: ObjectCentricConfig, handTexture: Texture | null, logoTexture: Texture | null): EndGamePanelElements;
291
- /**
292
- * Animate panel entrance with staggered animations
293
- */
294
- declare function animatePanelEntrance(elements: EndGamePanelElements, config: ObjectCentricConfig, onComplete?: () => void): void;
295
- /**
296
- * Animate tutorial hand clicking CTA button
297
- */
298
- declare function animateHandClick(hand: Sprite, ctaButton: Graphics, config: ObjectCentricConfig, onClick: () => void): void;
299
-
300
- interface SplashScreenConfig {
301
- enabled: boolean;
302
- show_on_start: boolean;
303
- background_color: string;
304
- background_alpha: number;
305
- title: string;
306
- subtitle: string;
307
- button_label: string;
308
- title_color: string;
309
- subtitle_color: string;
310
- button_bg: string;
311
- button_text: string;
312
- button_width: number;
313
- button_height: number;
314
- button_radius: number;
315
- loading_blur: boolean;
316
- loading_blur_strength: number;
317
- loading_overlay_alpha: number;
318
- font_family: string;
319
- title_size: number;
320
- subtitle_size: number;
321
- loading_text: string;
322
- loading_text_scale: number;
323
- }
324
- declare class SplashScreen {
325
- private app;
326
- private stage;
327
- private activeConfig;
328
- private splashConfig;
329
- private splashEnabled;
330
- private loadingBlurEnabled;
331
- private loadingBlurStrength;
332
- private loadingOverlayAlpha;
333
- private splashLayer;
334
- private splashBg;
335
- private splashTitle;
336
- private splashSubtitle;
337
- private splashButton;
338
- private splashButtonText;
339
- private loadingLayer;
340
- private loadingBg;
341
- private loadingText;
342
- private loadingTime;
343
- private tickLoadingHandler;
344
- constructor(app: Application, stage: Container, activeConfig: ObjectCentricConfig);
345
- private resolveLoadingTextStyle;
346
- syncConfig(next?: any): void;
347
- updateLayout(width: number, height: number): void;
348
- private updateSplashLayout;
349
- private updateLoadingLayout;
350
- show(): void;
351
- hide(): void;
352
- startLoadingAnimation(): void;
353
- stopLoadingAnimation(): void;
354
- destroyLoadingLayer(): void;
355
- applyLoadingBlur(background: Sprite | Graphics): any[] | null;
356
- removeLoadingBlur(background: Sprite | Graphics, prevFilters: any[] | null): void;
357
- setupWindowGlobals(): void;
358
- getSplashButton(): Graphics;
359
- shouldShowOnStart(): boolean;
360
- destroy(): void;
361
- }
362
-
363
- /**
364
- * Handler SDK - Tutorial UI Components
365
- *
366
- * Tutorial hand and label components for game tutorials.
367
- * Config requirement: All UI properties from object-centric config.
368
- *
369
- * DO NOT EDIT - Handler SDK Core
370
- */
371
-
372
- /**
373
- * Create hand tutorial sprite
374
- * Hand properties from object-centric config (hand_tutorial_1)
375
- *
376
- * @param handTexture - Texture for the hand sprite
377
- * @param config - Object-centric configuration
378
- * @param baseCharacterPos - Base position of the character for animation reference
379
- */
380
- declare function createHandTutorial(handTexture: Texture, config: ObjectCentricConfig, baseCharacterPos: Point): Sprite;
381
- /**
382
- * Create tutorial label text
383
- * Uses ui.tutorial config object with UI component schema
384
- *
385
- * @param config - Object-centric configuration
386
- */
387
- declare function createTutorialLabel(config: ObjectCentricConfig): Text;
388
- /**
389
- * Update hand animation
390
- * Animation parameters from object-centric config (hand_tutorial_1)
391
- *
392
- * @param hand - The hand sprite
393
- * @param baseCharacterPos - Base character position
394
- * @param time - Current time for animation
395
- * @param isDragging - Whether the user is currently dragging
396
- * @param config - Object-centric configuration
397
- */
398
- declare function updateHandAnimation(hand: Sprite, baseCharacterPos: Point, time: number, isDragging: boolean, config: ObjectCentricConfig): void;
399
-
400
294
  /**
401
295
  * Handler SDK - Lottie Overlay Helper
402
296
  *
@@ -452,7 +346,7 @@ type BuildSettings = {
452
346
  };
453
347
  declare global {
454
348
  interface Window {
455
- INLINE_ASSETS?: Record<string, string>;
349
+ INLINE_ASSETS?: Record<string, any>;
456
350
  __BUILD_SETTINGS__?: BuildSettings;
457
351
  }
458
352
  }
@@ -460,10 +354,10 @@ type AssetDefinition = {
460
354
  type: string;
461
355
  path: string;
462
356
  };
463
- type TypeLoader = (path: string, inlineData: string | undefined, objectId: string, app: any) => Promise<any>;
357
+ type TypeLoader = (path: string, inlineData: any | undefined, objectId: string, app: any) => Promise<any>;
464
358
  declare function registerType(type: string, loader: TypeLoader): void;
465
359
  declare class AssetLoader {
466
- static load(objectId: string, assetDef: AssetDefinition, app: any): Promise<any>;
360
+ static load(objectId: string, assetDef: AssetDefinition, app: any, configId?: string): Promise<any>;
467
361
  private static loadImage;
468
362
  private static loadJSON;
469
363
  private static handleFailure;
@@ -677,6 +571,125 @@ declare class RuntimeObjectRegistry {
677
571
 
678
572
  declare const basePixi: typeof PixiJS;
679
573
 
574
+ /**
575
+ * Handler SDK - Asset Texture Registry
576
+ *
577
+ * Clean texture-only registry for object-centric asset loading.
578
+ *
579
+ * RULES:
580
+ * - Stores ONLY Texture instances, not display objects
581
+ * - Keys are instance IDs from scene (e.g., 'key_1', 'background_1')
582
+ * - Used by spawnScene and game code to create sprites
583
+ * - Library panel updates textures here, onConfigUpdate propagates
584
+ *
585
+ * DO NOT EDIT - Handler SDK Core
586
+ */
587
+
588
+ /**
589
+ * Asset Texture Registry Implementation
590
+ */
591
+ declare class AssetTextureRegistry {
592
+ private textures;
593
+ private readyPromise;
594
+ private config;
595
+ private app;
596
+ /**
597
+ * Initialize with config and app instance
598
+ * CRITICAL: Clears previous state for Preview Restart support
599
+ */
600
+ init(config: ObjectCentricConfig, app: any): void;
601
+ /**
602
+ * Preload all image textures from config
603
+ * RULE: Resolves when all textures are loaded and ready for sprite creation
604
+ */
605
+ ready(): Promise<void>;
606
+ /**
607
+ * Get texture by instance ID
608
+ */
609
+ get(instanceId: string): Texture | undefined;
610
+ /**
611
+ * Set texture for instance ID (used by library panel)
612
+ */
613
+ set(instanceId: string, texture: Texture): void;
614
+ /**
615
+ * Clear all textures (for scene reset)
616
+ */
617
+ clear(): void;
618
+ /**
619
+ * Get all loaded texture IDs
620
+ */
621
+ getAllIds(): string[];
622
+ }
623
+ /**
624
+ * AssetTextures - Texture Registry
625
+ *
626
+ * Access textures by instance ID:
627
+ * @example
628
+ * // After AssetTextures.ready():
629
+ * const texture = AssetTextures.character_1;
630
+ * const sprite = new Sprite(texture);
631
+ *
632
+ * // Or explicit get:
633
+ * const texture = AssetTextures.get('character_1');
634
+ */
635
+ declare const AssetTextures: AssetTextureRegistry & {
636
+ [key: string]: Texture;
637
+ };
638
+ /**
639
+ * Initialize AssetTextures with config and app
640
+ * Must be called before AssetTextures.ready()
641
+ */
642
+ declare function initAssetTextures(config: ObjectCentricConfig, app: any): void;
643
+
644
+ /**
645
+ * Handler SDK - Scene Spawning Utility
646
+ *
647
+ * Automatically spawns PixiJS objects from ObjectCentricConfig.
648
+ * Uses AssetTextures for texture data, creates sprites/text objects.
649
+ *
650
+ * DO NOT EDIT - Handler SDK Core
651
+ */
652
+
653
+ type SpawnOptions = {
654
+ stage: Container;
655
+ mainContainer: Container;
656
+ activeConfig: ObjectCentricConfig;
657
+ gameObjectManager: any;
658
+ /**
659
+ * Optional: spawn only specific instance IDs
660
+ */
661
+ allowList?: Set<string>;
662
+ /**
663
+ * Optional: skip some instance IDs (for special handling)
664
+ */
665
+ denyList?: Set<string>;
666
+ };
667
+ type SpawnResult = {
668
+ objects: Record<string, any>;
669
+ sprites: Record<string, Sprite>;
670
+ texts: Record<string, Text>;
671
+ };
672
+ /**
673
+ * Spawn scene objects from config
674
+ *
675
+ * Uses AssetTextures to create sprites from texture data.
676
+ * Applies all transform and render properties from config.
677
+ *
678
+ * @param opts - Spawn options
679
+ * @returns Map of spawned objects organized by type
680
+ *
681
+ * @example
682
+ * // After AssetTextures.ready():
683
+ * const { objects, sprites, texts } = spawnSceneFromConfig({
684
+ * stage,
685
+ * mainContainer,
686
+ * activeConfig,
687
+ * gameObjectManager,
688
+ * denyList: new Set(['background_1', 'label_1'])
689
+ * });
690
+ */
691
+ declare function spawnSceneFromConfig(opts: SpawnOptions): SpawnResult;
692
+
680
693
  /**
681
694
  * Assets Proxy - Student-Facing API
682
695
  *
@@ -740,7 +753,6 @@ declare const Assets: AssetsCore & {
740
753
  declare function initAssets(config: ObjectCentricConfig$1, app: any): void;
741
754
 
742
755
  declare class AssetSystem extends BaseSystem {
743
- private splashScreen;
744
756
  init(): Promise<void>;
745
757
  onStart(): Promise<void>;
746
758
  onConfigUpdate(): void;
@@ -814,9 +826,9 @@ declare function applyScreenAnchor(element: any, screenWidth: number, screenHeig
814
826
  }): void;
815
827
  /**
816
828
  * Layout Manager
817
- * Strategy: ADAPTIVE ANCHOR
818
- * - Tall Screens: Show full rope (Anchor Top).
819
- * - Short Screens: Prioritize Character (Anchor Character Position).
829
+ * Generic layout system for all games.
830
+ * Positions objects based on their config transform.anchor and transform.position_ratio.
831
+ * Game-specific positioning (like rope physics) should be handled in game systems.
820
832
  */
821
833
  interface LayoutScreen {
822
834
  width: number;
@@ -853,4 +865,4 @@ interface InitSequenceOptions<State = unknown> {
853
865
  */
854
866
  declare function runInitSequence<State = unknown>(options: InitSequenceOptions<State>): void;
855
867
 
856
- export { AssetCache, type AssetDefinition, AssetLoader, AssetSystem, Assets, BaseSystem, type EndGamePanelElements, GameEngine, GameObject, GameObjectManager, type ObjectCentricConfig, ObjectFactory, type PixiBaseContext, type PixiTheme, Renderer, RuntimeObjectRegistry, SplashScreen, type SplashScreenConfig, type SystemContext, Transform, animateHandClick, animatePanelEntrance, applyScreenAnchor, basePixi, clearResponsiveElements, createEndGamePanel, createHandTutorial, createPixiBase, createTutorialLabel, getRegisteredFontIds, globalResponsiveMultipliers, initAssets, layout, playLottieOverlay, registerFont, registerType, resolveAnchorVec2, resolveFont, resolveFontWeight, resolveScreenAnchorPoint, resolveScreenRatioPoint, runInitSequence, setLottieInstance, updateHandAnimation, updateScreenState };
868
+ export { AssetCache, type AssetDefinition, AssetLoader, AssetSystem, AssetTextures, Assets, BaseSystem, GameEngine, GameObject, GameObjectManager, type ObjectCentricConfig, ObjectFactory, type PixiBaseContext, type PixiTheme, Renderer, RuntimeObjectRegistry, type SpawnOptions, type SpawnResult, type SystemContext, Transform, applyScreenAnchor, basePixi, clearResponsiveElements, createPixiBase, getRegisteredFontIds, globalResponsiveMultipliers, initAssetTextures, initAssets, layout, playLottieOverlay, registerFont, registerType, resolveAnchorVec2, resolveFont, resolveFontWeight, resolveScreenAnchorPoint, resolveScreenRatioPoint, runInitSequence, setLottieInstance, spawnSceneFromConfig, updateScreenState };
@@ -1,27 +1 @@
1
- "use strict";var gs=Object.create;var Ut=Object.defineProperty;var hs=Object.getOwnPropertyDescriptor;var fs=Object.getOwnPropertyNames;var bs=Object.getPrototypeOf,ms=Object.prototype.hasOwnProperty;var ut=(t,e)=>()=>(t&&(e=t(t=0)),e);var ys=(t,e)=>{for(var n in e)Ut(t,n,{get:e[n],enumerable:!0})},ea=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of fs(e))!ms.call(t,a)&&a!==n&&Ut(t,a,{get:()=>e[a],enumerable:!(i=hs(e,a))||i.enumerable});return t};var Ln=(t,e,n)=>(n=t!=null?gs(bs(t)):{},ea(e||!t||!t.__esModule?Ut(n,"default",{value:t,enumerable:!0}):n,t)),vs=t=>ea(Ut({},"__esModule",{value:!0}),t);var Xt=ut(()=>{"use strict"});var wa,De,ko,kn=ut(()=>{"use strict";Xt();wa=null,De="dev";if(typeof window!="undefined"){let t=window.__BUILD_SETTINGS__;if(t!=null&&t.buildMode)wa=t,De=t.buildMode,console.log("[CONFIG] Loaded inline build settings:",t,"buildMode:",De);else try{let e=new XMLHttpRequest;if(e.open("GET","./build-settings.json",!1),e.send(),e.status===200&&e.responseText){let n=JSON.parse(e.responseText);wa=n,De=n.buildMode||"dev",console.log("[CONFIG] Loaded build settings:",n,"buildMode:",De)}else console.log("[CONFIG] No build-settings.json found, using default buildMode:",De)}catch(e){console.log("[CONFIG] Failed to load build-settings.json:",e instanceof Error?e.message:String(e))}}console.log("[CONFIG] Final buildMode:",De);ko=De==="dev"||typeof window!="undefined"&&window.location.search.includes("hot-reload")});var In=ut(()=>{"use strict"});var Ea=ut(()=>{"use strict";In();kn()});var On=ut(()=>{"use strict";kn();In();Ea()});var So={};ys(So,{AssetCache:()=>ge,AssetLoader:()=>Ze,AssetSystem:()=>cn,Assets:()=>_e,BaseSystem:()=>et,GameEngine:()=>rn,GameObject:()=>wt,GameObjectManager:()=>Je,ObjectFactory:()=>Fe,Renderer:()=>xt,RuntimeObjectRegistry:()=>tt,SplashScreen:()=>Qe,Transform:()=>vt,animateHandClick:()=>Fa,animatePanelEntrance:()=>za,applyScreenAnchor:()=>pn,basePixi:()=>Xa,clearResponsiveElements:()=>Ja,createEndGamePanel:()=>Da,createHandTutorial:()=>Na,createPixiBase:()=>nn,createTutorialLabel:()=>$a,getRegisteredFontIds:()=>Ba,globalResponsiveMultipliers:()=>Lt,initAssets:()=>ln,layout:()=>Za,playLottieOverlay:()=>qa,registerFont:()=>Ha,registerType:()=>on,resolveAnchorVec2:()=>fn,resolveFont:()=>oe,resolveFontWeight:()=>re,resolveScreenAnchorPoint:()=>bn,resolveScreenRatioPoint:()=>mn,runInitSequence:()=>es,setLottieInstance:()=>Jt,updateHandAnimation:()=>Ga,updateScreenState:()=>un});module.exports=vs(So);var ja=require("pixi.js");var Le={};function Yt(t,e,n=!1){Le[t]||(Le[t]=[]),Le[t].push({fn:e,once:n})}function An(t,e){if(Le[t]){if(!e){delete Le[t];return}Le[t]=Le[t].filter(n=>n.fn!==e)}}function Wt(t,...e){let n=Le[t];if(n)for(let i of[...n])i.fn(...e),i.once&&An(t,i.fn)}function ae(t,e){Yt(t,e,!0)}var se=0,xs=se++,ta=se++,na=se++,ia=se++,aa=se++,sa=se++,oa=se++,ra=se++,la=se++,ca=se++,da=se++,ua=se++,P=xs;function pa(){return P===ta}function ga(){return P===na}function ha(){return P===ia}function fa(){return P===aa}function qe(){return P===sa}function Ue(){return P===oa}function ba(){return P===ra}function ma(){return P===la}function ya(){return P===ca}function Tn(){return P===da}function Mn(){return P===ua}function va(){let t=typeof AD_PROTOCOL!="undefined"?AD_PROTOCOL:"none",e=typeof AD_NETWORK!="undefined"?AD_NETWORK:"web_embed";if(t==="mraid")try{mraid.getState(),P=ta;return}catch{}else if(t==="dapi")try{dapi.isReady(),P=na;return}catch{}if(e==="facebook")try{typeof FbPlayableAd!="undefined"&&(P=ia)}catch{}else if(e==="google")try{typeof ExitApi!="undefined"&&(P=aa)}catch{}else if(e==="mintegral")window.gameReady&&(P=sa);else if(e==="tapjoy")window.TJ_API&&(P=oa);else if(e==="tiktok")window.openAppStore&&(P=ra);else if(e==="smadex")try{window.smxTracking&&(P=la)}catch{}else if(e==="snapchat")try{window.ScPlayableAd&&(P=ca)}catch{}else e==="vungle"?P=da:(t==="nucleo"||e==="nucleo")&&(P=ua)}var Vt=Ln(require("lottie-web")),xa=Vt.default;typeof window!="undefined"&&(window.lottie=Vt.default,window.__baseLottie=Vt.default);On();function z(t,e){let n=(a,s)=>s===0?a:n(s,a%s),i=n(t,e);return`${t/i}:${e/i}`}var Ko=[{id:"iphone-15-pro-max",label:"iPhone 15 Pro Max",width:430,height:932,category:"iphone",ratio:z(430,932)},{id:"iphone-15-pro",label:"iPhone 15 Pro",width:393,height:852,category:"iphone",ratio:z(393,852)},{id:"iphone-15",label:"iPhone 15",width:393,height:852,category:"iphone",ratio:z(393,852)},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"iphone",ratio:z(390,844)},{id:"iphone-se",label:"iPhone SE",width:375,height:667,category:"iphone",ratio:z(375,667)},{id:"iphone-12-mini",label:"iPhone 12 Mini",width:360,height:780,category:"iphone",ratio:z(360,780)}],Jo=[{id:"pixel-8-pro",label:"Pixel 8 Pro",width:448,height:998,category:"android",ratio:z(448,998)},{id:"pixel-8",label:"Pixel 8",width:412,height:915,category:"android",ratio:z(412,915)},{id:"samsung-s24-ultra",label:"Samsung S24 Ultra",width:412,height:915,category:"android",ratio:z(412,915)},{id:"samsung-s24",label:"Samsung S24",width:360,height:780,category:"android",ratio:z(360,780)},{id:"samsung-a54",label:"Samsung A54",width:412,height:915,category:"android",ratio:z(412,915)},{id:"oneplus-12",label:"OnePlus 12",width:412,height:915,category:"android",ratio:z(412,915)}],Qo=[{id:"ipad-pro-12",label:'iPad Pro 12.9"',width:1024,height:1366,category:"tablet",ratio:z(1024,1366)},{id:"ipad-pro-11",label:'iPad Pro 11"',width:834,height:1194,category:"tablet",ratio:z(834,1194)},{id:"ipad-air",label:"iPad Air",width:820,height:1180,category:"tablet",ratio:z(820,1180)},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"tablet",ratio:z(768,1024)},{id:"samsung-tab-s9",label:"Samsung Tab S9",width:800,height:1280,category:"tablet",ratio:z(800,1280)}],_a=[{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:z(390,844),mraidScale:.7},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"playable",ratio:z(768,1024),mraidScale:.7}];var Zo=[..._a];var As=_a[0];var Kt=require("pixi.js");Xt();var Ca=Ln(require("lottie-web"));Jt(xa);typeof window!="undefined"&&!window.lottie&&(window.lottie=Ca.default);On();Xt();var Pn="0.3.1",Ia={mechanic_id:"TODO_mechanic_id",variant_id:"TODO_variant_id",deployment_id:"TODO_deployment_id",export_id:"TODO_export_id",profile_id:"TODO_profile_id",instance_id:"default"},Rs=Math.random().toString(36).slice(2),Ye=null,ht={...Ia},Oa="web_embed",js={},Rn=!1,gt=!1,bt=!1,Pa=!1,Dn=1,Hn=0,tn=!1,xe=!1,en="",We=Math.floor(window.innerWidth),Ve=Math.floor(window.innerHeight),Bn=We>Ve,we=!1,ft=!1,La=!1,Aa=!1,jn=!1,Qt=null;function Ta(){if(Ye)return Ye;let t=document.createElement("div");return t.id="handler-root",t.setAttribute("data-handler-root","true"),document.body.appendChild(t),Ye=t,t}function Zt(t){switch(t){case"interaction":return"engagement";case"finish":return"complete";case"install":return"cta_click";default:return t}}function Ra(t,e){return{event_name:t,ts:Date.now(),session_id:Rs,deployment_id:ht.deployment_id,variant_id:ht.variant_id,export_profile_id:ht.profile_id,instance_id:ht.instance_id||"default",env:Oa==="mraid"?"mraid":"web",payload:e}}function S(t,e){let n=Zt(t),i=Ra(n,e);Wt(n,i),n!==t&&Wt(t,i)}function mt(){Qt&&(Qt(We,Ve),Qt=null)}function Xe(t){Dn=t,S("volume",t)}function Ke(t){t&&(Pa=!0),!bt&&(bt=!0,S("pause"),Xe(0))}function yt(t){!t&&Pa||bt&&(bt=!1,S("resume"),Xe(Dn))}function Te(t,e){We=Math.floor(t||window.innerWidth),Ve=Math.floor(e||window.innerHeight),Bn=We>Ve,S("resize",{width:We,height:Ve})}function Hs(){if(pa())try{let t=mraid.getMaxSize();Te(t.width,t.height);let e=()=>{mraid.isViewable()&&mraid.getState()!=="hidden"?yt():Ke()};if(mraid.addEventListener("viewableChange",e),mraid.addEventListener("stateChange",e),mraid.addEventListener("sizeChange",()=>{let n=mraid.getMaxSize();Te(n.width,n.height)}),mraid.getAudioVolume){let n=mraid.getAudioVolume();Xe(n?1:0)}if(mraid.addEventListener("audioVolumeChange",n=>{n!==null&&Xe(n>0?1:0)}),mraid.addEventListener("error",(n,i)=>{console.warn("mraid error:",n,"action:",i)}),tn=!0,mraid.isViewable()&&mraid.getState()!=="hidden")we=!0,S("boot"),S("view"),S("ready"),xe=!0,mt();else{let n=()=>{we=!0,S("boot"),S("view"),S("ready"),xe=!0,mt()};mraid.addEventListener("ready",n)}}catch(t){console.warn("MRAID hook skipped",t)}}function Bs(){if(ga())try{let t=dapi.getScreenSize();Te(t.width,t.height),dapi.addEventListener("viewableChange",n=>{n.isViewable?yt():Ke()}),dapi.addEventListener("adResized",n=>{let i=dapi.getScreenSize();Te(n.width||i.width,n.height||i.height)});let e=dapi.getAudioVolume();if(Xe(e?1:0),dapi.addEventListener("audioVolumeChange",n=>Xe(n?1:0)),tn=!0,dapi.isViewable())we=!0,S("boot"),S("view"),S("ready"),xe=!0,mt();else{let n=()=>{we=!0,S("boot"),S("view"),S("ready"),xe=!0,mt()};dapi.addEventListener("ready",n)}}catch(t){console.warn("DAPI hook skipped",t)}}function Ma(){let t=()=>{we||document.visibilityState==="visible"&&(document.readyState==="complete"||document.readyState==="interactive")&&(we=!0,S("boot"),S("view"),S("ready"),xe=!0,mt(),ft&&(ft=!1,Ae.start()))};window.addEventListener("resize",()=>Te()),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"?(yt(),t()):Ke()}),document.readyState==="complete"||document.readyState==="interactive"?t():window.addEventListener("load",t),tn=!0}function Ds(){let t=e=>{typeof TouchEvent!="undefined"&&e instanceof TouchEvent&&(La=!0),!(La&&e instanceof MouseEvent)&&(Hn+=1,S("interaction",Hn))};document.addEventListener("mousedown",t),document.addEventListener("touchstart",t)}function zs(t){var i,a,s,o,r,c,l,u,g,p,d,f;let e=typeof AD_PROTOCOL!="undefined"?AD_PROTOCOL:"none";if((typeof AD_NETWORK!="undefined"?AD_NETWORK:"web_embed")==="google")try{(i=window.ExitApi)==null||i.exit();return}catch{}if(e==="mraid"&&typeof mraid!="undefined")mraid.open(t||"");else if(e==="dapi"&&typeof dapi!="undefined")dapi.openStoreUrl();else if(Ue())(s=(a=window.TJ_API)==null?void 0:a.click)==null||s.call(a);else if(ha())(r=(o=window.FbPlayableAd)==null?void 0:o.onCTAClick)==null||r.call(o);else if(ya())(l=(c=window.ScPlayableAd)==null?void 0:c.onCTAClick)==null||l.call(c);else if(ma())try{(g=(u=window.smxTracking)==null?void 0:u.redirect)==null||g.call(u)}catch(h){console.warn("Smadex redirect failed",h)}else if(fa()){let h=window.ExitApi;h&&typeof h.exit=="function"?h.exit(t||en||""):t&&window.open(t)}else qe()?(p=window.install)==null||p.call(window):ba()?(d=window.openAppStore)==null||d.call(window):Tn()?(f=parent==null?void 0:parent.postMessage)==null||f.call(parent,"download","*"):t&&window.open(t)}function Fs(){let t=typeof AD_NETWORK!="undefined"?AD_NETWORK:"web_embed",e=n=>{if(!n)return;let i=new Image;i.src=n};if(t==="bigabid"){let n=window.BIGABID_BIDTIMEMACROS;if(!n)return;ae("view",()=>e(n.mraid_viewable)),ae("start",()=>e(n.game_viewable)),ae("engagement",()=>e(n.engagement));let i=()=>e(n.complete);ae("complete",i),Yt("engagement",a=>{var s;((s=a==null?void 0:a.payload)==null?void 0:s.count)>3&&i()}),ae("cta_click",()=>e(n.click))}else if(t==="inmobi"){let n=window.INMOBI_DSPMACROS;if(!n)return;ae("view",()=>e(n.Ad_Load_Start)),ae("start",()=>e(n.Ad_Viewable)),ae("engagement",()=>e(n.First_Engagement)),ae("complete",()=>e(n.Gameplay_Complete)),ae("cta_click",()=>e(n.DSP_Click)),ae("start",()=>{[5,10,15,20,25,30].forEach(i=>setTimeout(()=>e(n[`Spent_${i}_Seconds`]),i*1e3))})}}function Ns(){if(!Ue())return;let t=window.TJ_API;t&&t.setPlayableAPI&&t.setPlayableAPI({skipAd:()=>{try{Ae.finish()}catch(e){console.warn("Tapjoy skip failed",e)}}})}function ka(){var e,n,i;let t=window.TJ_API;(e=t==null?void 0:t.objectiveComplete)==null||e.call(t),(n=t==null?void 0:t.playableFinished)==null||n.call(t),(i=t==null?void 0:t.gameplayFinished)==null||i.call(t)}function $s(){qe()&&(window.mintGameStart=()=>{yt(!0),Te()},window.mintGameClose=()=>{Ke(!0)})}function Gs(){if(!Mn())return;let t=window.NUC;!t||!t.trigger||(Ae.on("cta_click",()=>{var e,n;return(n=(e=t.trigger).convert)==null?void 0:n.call(e,en)}),Ae.on("complete",()=>{var e,n;return(n=(e=t.trigger).tryAgain)==null?void 0:n.call(e)}))}var Ae={init(t={},e){if(Oa=t.profile||"web_embed",js=t.consent||{},ht={...Ia,...t.ids||{}},Ye=t.rootEl||Ye,en=t.destinationUrl||(/android/i.test(navigator.userAgent)?"https://play.google.com/store":"https://www.apple.com/app-store/"),e&&(Qt=e),S("init"),document.body.oncontextmenu=()=>!1,Ta(),qs(Ye),va(),Hs(),Bs(),!tn){if(document.readyState==="complete")Ma();else if(!Aa){Aa=!0;let n=()=>{Ma(),window.removeEventListener("load",n),document.removeEventListener("DOMContentLoaded",n)};window.addEventListener("load",n),document.addEventListener("DOMContentLoaded",n)}}Ds(),Fs(),Ns(),$s(),Gs(),console.log(`%c @handler/playable-sdk %c v${Pn} `,"background: #007acc; color: #fff; font-size: 14px; padding: 4px 8px; border-top-left-radius: 4px; border-bottom-left-radius: 4px;","background: #e1e4e8; color: #333; font-size: 14px; padding: 4px 8px; border-top-right-radius: 4px; border-bottom-right-radius: 4px;"),we&&!xe&&(S("boot"),S("view"),S("ready"),ft&&(ft=!1,Ae.start()),xe=!0),xe=we},getRoot(){return Ta()},get version(){return Pn},get maxWidth(){return We},get maxHeight(){return Ve},get isLandscape(){return Bn},get isReady(){return xe},get isStarted(){return Rn},get isPaused(){return bt},get isFinished(){return gt},get volume(){return Dn},get interactions(){return Hn},on(t,e){Yt(Zt(t),e)},off(t,e){An(Zt(t),e)},start(){var t,e;if(!Rn){if(!we){ft=!0;return}if(Rn=!0,S("start"),Te(),qe())Ke(),(t=window.gameReady)==null||t.call(window);else if(Ue()){let n=window.TJ_API;(e=n==null?void 0:n.setPlayableBuild)==null||e.call(n,{orientation:Bn?"landscape":"portrait",buildID:Pn})}}},finish(){var t,e;gt||(gt=!0,S("complete"),qe()?(t=window.gameEnd)==null||t.call(window):Tn()?(e=parent==null?void 0:parent.postMessage)==null||e.call(parent,"complete","*"):Ue()&&ka())},install(t){if(!gt){gt=!0,Ue()?(ka(),setTimeout(()=>Ae.install(t),300)):(S("complete"),setTimeout(()=>Ae.install(t),0));return}jn||(jn=!0,setTimeout(()=>jn=!1,500),S("cta_click"),S("conversion"),zs(t||en))},emit(t,e){let n=Zt(t);if(!["view","boot","start","engagement","complete","cta_click","conversion","retry","pause","resume","resize","volume","error"].includes(n)&&!n.startsWith("custom."))throw new Error(`Event ${t} must be canonical or namespaced as custom.<mechanic_id>.<event>`);let i=Ra(n,e);Wt(n,i)},retry(){var t,e,n;if(qe())(t=window.gameRetry)==null||t.call(window);else if(Mn()){let i=window.NUC;(n=(e=i==null?void 0:i.trigger)==null?void 0:e.tryAgain)==null||n.call(e)}S("engagement",{action:"retry"})},pause(){Ke(!0)},resume(){yt(!0)},resize(t,e){Te(t,e)}},pt=Ae;function qs(t){let e=document.createElement("script");e.type="text/javascript",e.textContent=`
2
- (function(){
3
- var events = ['touchstart','touchend','mousedown','keydown'];
4
- function unlock(){
5
- if(window.AudioContext && AudioContext.prototype.resume){
6
- if(!window.__handler_audio_ctx){
7
- window.__handler_audio_ctx = new AudioContext();
8
- }
9
- if(window.__handler_audio_ctx.state === 'suspended'){
10
- window.__handler_audio_ctx.resume();
11
- }
12
- }
13
- events.forEach(function(e){ document.removeEventListener(e, unlock); });
14
- }
15
- events.forEach(function(e){ document.addEventListener(e, unlock, false); });
16
- })();
17
- `,t.appendChild(e)}async function nn(t,e={}){let n=new ja.Application;await n.init({resizeTo:t,autoDensity:!0,resolution:window.devicePixelRatio||1,antialias:!0,backgroundAlpha:0});let i=s=>{var c,l,u,g,p,d;if(!n.renderer)return;let o=(u=(l=(c=s==null?void 0:s.width)!=null?c:t.clientWidth)!=null?l:window.innerWidth)!=null?u:320,r=(d=(p=(g=s==null?void 0:s.height)!=null?g:t.clientHeight)!=null?p:window.innerHeight)!=null?d:480;n.renderer.resize(o,r)};t.innerHTML="",t.style.position="relative",t.style.display="flex",t.style.flexDirection="column",t.style.alignItems="stretch",t.style.width="100%",t.style.height="100dvh",t.style.minHeight="100vh",t.style.maxWidth="100%",t.style.maxHeight="100%",t.style.boxSizing="border-box",t.style.overflow="hidden",e.background&&(t.style.background=e.background),t.appendChild(n.canvas);let a=document.createElement("div");return a.setAttribute("style",["position:absolute","inset:0","display:flex","flex-direction:column","align-items:center","justify-content:flex-start","gap:12px","pointer-events:none","font-family:Arial,sans-serif","padding:20px 16px","padding-bottom:clamp(24px, 6vh, 96px)","box-sizing:border-box","z-index:2"].join(";")),t.appendChild(a),pt.on("pause",()=>{n.ticker.stop(),document.querySelectorAll("audio").forEach(o=>o.pause())}),pt.on("resume",()=>{n.ticker.start(),document.querySelectorAll("audio").forEach(o=>{o.currentTime>0&&!o.ended&&o.play().catch(()=>{})})}),pt.on("resize",({payload:s})=>{i({width:s==null?void 0:s.width,height:s==null?void 0:s.height})}),window.addEventListener("resize",()=>i()),requestAnimationFrame(()=>i()),{app:n,stage:n.stage,overlay:a,applySize:i}}var vt=class{constructor(e){var n,i;this.position=(e==null?void 0:e.position)||{x:0,y:0},this.scale=(n=e==null?void 0:e.scale)!=null?n:1,this.rotation=(i=e==null?void 0:e.rotation)!=null?i:0}update(e){e.position!==void 0&&(this.position={...e.position}),e.scale!==void 0&&(this.scale=e.scale),e.rotation!==void 0&&(this.rotation=e.rotation)}syncToPixi(e){e.position.set(this.position.x,this.position.y),e.scale.set(this.scale),e.rotation=this.rotation}},xt=class{constructor(e){var n,i,a,s;this.z_index=(n=e==null?void 0:e.z_index)!=null?n:0,this.alpha=(i=e==null?void 0:e.alpha)!=null?i:1,this.visible=(a=e==null?void 0:e.visible)!=null?a:!0,this.tint=(s=e==null?void 0:e.tint)!=null?s:null}update(e){e.z_index!==void 0&&(this.z_index=e.z_index),e.alpha!==void 0&&(this.alpha=e.alpha),e.visible!==void 0&&(this.visible=e.visible),e.tint!==void 0&&(this.tint=e.tint)}syncToPixi(e){e.zIndex=this.z_index,e.alpha=this.alpha,e.visible=this.visible,this.tint!==null&&"tint"in e&&(e.tint=this.tint)}},wt=class{constructor(e,n,i,a){this.instanceId=e,this.objectConfig=n,this.pixiObject=i,this._config=a,this.transform=new vt(a.transform),this.renderer=new xt(a.render),this.sync()}sync(){this.transform.syncToPixi(this.pixiObject),this.renderer.syncToPixi(this.pixiObject),this.applyAnchor(),this.applyEffectsScale()}updateConfig(e){this._config=e,e.transform&&this.transform.update(e.transform),e.render&&this.renderer.update(e.render),this.sync()}applyAnchor(){var a,s,o,r;if(!this.pixiObject||!("anchor"in this.pixiObject)||!this.pixiObject.anchor)return;let e=(s=(a=this._config)==null?void 0:a.render)==null?void 0:s.anchor,n=(r=(o=this._config)==null?void 0:o.transform)==null?void 0:r.anchor,i=e&&typeof e=="object"?e:n&&typeof n=="object"?n:null;i&&typeof i.x=="number"&&typeof i.y=="number"&&this.pixiObject.anchor.set(i.x,i.y)}applyEffectsScale(){var s,o,r;if(!((s=this.pixiObject)!=null&&s.scale))return;let e=(o=this._config)==null?void 0:o.effects,n=typeof(e==null?void 0:e.scale_x)=="number"?e.scale_x:1,i=typeof(e==null?void 0:e.scale_y)=="number"?e.scale_y:1;if(n===1&&i===1)return;let a=(r=this.transform.scale)!=null?r:1;typeof this.pixiObject.scale.set=="function"?this.pixiObject.scale.set(a*n,a*i):(this.pixiObject.scale.x=a*n,this.pixiObject.scale.y=a*i)}getComponent(e){return this._config[e]}getPosition(){return{...this.transform.position}}setPosition(e,n){this.transform.position={x:e,y:n},this.transform.syncToPixi(this.pixiObject)}getAlpha(){return this.renderer.alpha}setAlpha(e){this.renderer.alpha=e,this.renderer.syncToPixi(this.pixiObject)}getVisible(){return this.renderer.visible}setVisible(e){this.renderer.visible=e,this.renderer.syncToPixi(this.pixiObject)}},Je=class{constructor(e){this.objects=new Map;this.config=e}create(e,n){let i=this.config.objects.get(e);if(!i)throw new Error(`Object config not found: ${e}`);let a=new wt(e,i.object_config||e,n,i);return this.objects.set(e,a),a}get(e){return this.objects.get(e)}updateConfig(e){this.config=e;for(let[n,i]of this.objects.entries()){let a=e.objects.get(n);a&&i.updateConfig(a)}}getAll(){return Array.from(this.objects.values())}remove(e){this.objects.delete(e)}clear(){this.objects.clear()}};var an={"brand.primary":{family:"Arial, sans-serif",weight:"400"},"brand.warning":{family:"Arial Black, Arial, sans-serif",weight:"900"},"brand.heading":{family:"Arial Black, Arial, sans-serif",weight:"800"},"brand.body":{family:"Arial, sans-serif",weight:"400"}};function oe(t){let e=an[t];return e?e.family:(console.warn(`Font ID "${t}" not found in registry, using fallback`),"Arial, sans-serif")}function re(t){var n;let e=an[t];return e&&(n=e.weight)!=null?n:"400"}function Ha(t,e){an[t]=e}function Ba(){return Object.keys(an)}var B=require("pixi.js");function Da(t,e,n){var Yn,Wn,Vn,Xn,Kn,Jn,Qn,Zn,ei,ti,ni,ii,ai,si,oi,ri,li,ci,di,ui,pi,gi,hi,fi,bi,mi,yi,vi,xi,wi,Si,Ei,_i,Ci,Li,Ai,Ti,Mi,ki,Ii,Oi,Pi,Ri,ji,Hi,Bi,Di,zi,Fi,Ni,$i,Gi,qi,Ui,Yi,Wi,Vi,Xi,Ki,Ji;let i=t.objects.get("ui_endgame_1"),a=t.objects.get("ui_endgame_logo_1"),s=t.objects.get("ui_endgame_title_1"),o=t.objects.get("ui_endgame_subtitle_1"),r=t.objects.get("ui_endgame_footer_1"),c=t.objects.get("ui_endgame_cta_1"),l=t.objects.get("ui_endgame_cta_hint_1"),u=t.objects.get("ui_endgame_hand_1"),g=t.engine.runtime||{},p=new B.Container;p.alpha=0,p.visible=!1;let d=((Yn=i==null?void 0:i.gameplay)==null?void 0:Yn.tuning)||{},f=(i==null?void 0:i.render)||{},h=(Wn=d.panel_width)!=null?Wn:320,b=(Vn=d.panel_height)!=null?Vn:400,m=(Xn=d.panel_padding)!=null?Xn:32,y=(Kn=d.panel_radius)!=null?Kn:24,_=f.background_color||d.panel_bg_color||"#1a0a0a",C=f.background_alpha!==void 0&&f.background_alpha!==null?f.background_alpha:(Jn=d.panel_bg_alpha)!=null?Jn:.98,v=f.border_color||d.panel_border_color||"#ffffff",I=(Qn=d.panel_border_width)!=null?Qn:2,R=(Zn=d.panel_border_alpha)!=null?Zn:.3,M=new B.Graphics;M.roundRect(-h/2,-b/2,h,b,y);let w=_.replace("#","");M.fill({color:parseInt(w,16),alpha:C});let L=v.replace("#","");M.stroke({color:parseInt(L,16),width:I,alpha:R});let G=new B.Graphics;G.roundRect(-h/2+2,-b/2+2,h-4,b-4,y-2),G.stroke({color:16777215,width:1,alpha:.1}),M.addChild(G),p.addChild(M);let E=((ei=a==null?void 0:a.gameplay)==null?void 0:ei.tuning)||{},j=(a==null?void 0:a.transform)||{},N=(ti=E.logo_size)!=null?ti:56,H=(ni=j.scale)!=null?ni:1,q=(ai=(ii=j.offset)==null?void 0:ii.y)!=null?ai:-130,pe=(si=E.logo_alpha)!=null?si:1,D=new B.Sprite(n||B.Texture.EMPTY);D.anchor.set(.5);let K=0,J=0;if(n&&n!==B.Texture.EMPTY){let Q=n.frame,ve=n.baseTexture;Q&&Q.width&&Q.height?(K=Q.width,J=Q.height):ve&&ve.width&&ve.height?(K=ve.width,J=ve.height):n.width&&n.height&&(K=n.width,J=n.height)}if(K>0&&J>0){let Q=K/J,ve,Cn;Q>1?(ve=N,Cn=N/Q):(Cn=N,ve=N*Q);let Qi=ve/K,Zi=Cn/J;Qi*=H,Zi*=H,D.scale.set(Qi,Zi)}else{let Q=N/100*H;D.scale.set(Q)}D.position.set(0,q),D.alpha=0,D.visible=!0,D.targetAlpha=pe,D.baseScaleX=D.scale.x,D.baseScaleY=D.scale.y,p.addChild(D);let $=s==null?void 0:s.ui,Y=((oi=s==null?void 0:s.gameplay)==null?void 0:oi.tuning)||{},$e=($==null?void 0:$.text)||"MISSION ACCOMPLISHED",ke=($==null?void 0:$.font)||"brand.heading",At=($==null?void 0:$.fontSize)||24,Tt=(ri=$==null?void 0:$.letterSpacing)!=null?ri:1,Ie=(li=s==null?void 0:s.render)==null?void 0:li.tint,Mt=typeof Ie=="string"?Ie:Ie?`#${Ie.toString(16).padStart(6,"0")}`:"#00FF88",it=h-m*2-30,kt=Y.font_weight_override?Y.font_weight_override:re(ke),ce=new B.Text({text:$e,style:{fontFamily:oe(ke),fontSize:At,fontWeight:kt,fill:Mt,align:"center",letterSpacing:Tt,wordWrap:!1,stroke:{color:Y.stroke_color||"#000000",width:(ci=Y.stroke_width)!=null?ci:2},dropShadow:{color:Y.shadow_color||"#000000",alpha:(di=Y.shadow_alpha)!=null?di:.9,angle:(ui=Y.shadow_angle)!=null?ui:0,blur:(pi=Y.shadow_blur)!=null?pi:8,distance:(gi=Y.shadow_distance)!=null?gi:4}}});if(ce.width>it){let Q=it/ce.width;ce.scale.set(Q)}ce.anchor.set(.5);let at=(hi=d.title_offset_y)!=null?hi:30,It=at+((fi=Y.animation_start_y_offset)!=null?fi:-20);ce.position.set(0,It),ce.alpha=0,p.addChild(ce);let W=o==null?void 0:o.ui,st=((bi=o==null?void 0:o.gameplay)==null?void 0:bi.tuning)||{},Ot=(W==null?void 0:W.text)||"RESCUE COMPLETE",ot=(W==null?void 0:W.font)||"brand.body",Pt=(W==null?void 0:W.fontSize)||11,Rt=(mi=W==null?void 0:W.letterSpacing)!=null?mi:.5,Oe=(yi=o==null?void 0:o.render)==null?void 0:yi.tint,jt=typeof Oe=="string"?Oe:Oe?`#${Oe.toString(16).padStart(6,"0")}`:"#B0B0B0",be=new B.Text({text:Ot,style:{fontFamily:oe(ot),fontSize:Pt,fontWeight:re(ot),fill:jt,align:"center",letterSpacing:Rt}});be.anchor.set(.5);let Ht=at+20+((vi=st.animation_start_y_offset)!=null?vi:-10);be.position.set(0,Ht),be.alpha=0,be.animationStartYOffset=(xi=st.animation_start_y_offset)!=null?xi:-10,p.addChild(be);let ee=r==null?void 0:r.ui,rt=((wi=r==null?void 0:r.gameplay)==null?void 0:wi.tuning)||{},Bt=(ee==null?void 0:ee.text)||((Si=g.ui)==null?void 0:Si.cta_hint)||"Continue the adventure!",lt=(ee==null?void 0:ee.font)||"brand.body",Dt=(ee==null?void 0:ee.fontSize)||16,Pe=(Ei=r==null?void 0:r.render)==null?void 0:Ei.tint,zt=typeof Pe=="string"?Pe:Pe?`#${Pe.toString(16).padStart(6,"0")}`:"#FFFFFF",Ft=(_i=rt.max_width)!=null?_i:h-m*2,Nt=(Ci=rt.line_height)!=null?Ci:1.4,me=new B.Text({text:Bt,style:{fontFamily:oe(lt),fontSize:Dt,fontWeight:re(lt),fill:zt,align:"center",wordWrap:!0,wordWrapWidth:Ft,lineHeight:Nt}});me.anchor.set(.5);let $t=(Li=d.footer_offset_y)!=null?Li:120;me.position.set(0,$t);let Gt=((Ai=r==null?void 0:r.render)==null?void 0:Ai.alpha)!==void 0&&((Ti=r==null?void 0:r.render)==null?void 0:Ti.alpha)!==null?r.render.alpha:1;me.alpha=0,me.targetAlpha=Gt,p.addChild(me);let te=((Mi=c==null?void 0:c.gameplay)==null?void 0:Mi.tuning)||{},V=c==null?void 0:c.ui,Re=(ki=te.button_width)!=null?ki:260,A=(Ii=te.button_height)!=null?Ii:56,F=(Oi=te.button_radius)!=null?Oi:16,O=te.button_bg_color||((Pi=g.theme)==null?void 0:Pi.cta_background)||"#ffb43b",x=(Ri=te.button_bg_alpha)!=null?Ri:1,ne=te.button_border_color||"#ffffff",de=(ji=te.button_border_width)!=null?ji:2,je=(Hi=te.button_border_alpha)!=null?Hi:.2,ye=(Bi=d.cta_offset_y)!=null?Bi:160,U=new B.Graphics;U.roundRect(-Re/2,-A/2,Re,A,F);let He=O.replace("#","");U.fill({color:parseInt(He,16),alpha:x});let ct=ne.replace("#","");U.stroke({color:parseInt(ct,16),width:de,alpha:je});let En=new B.Graphics;En.roundRect(-Re/2+2,-A/2+2,Re-4,A-4,F-2),En.stroke({color:0,width:1,alpha:.15}),U.addChild(En),U.position.set(0,ye),U.alpha=0,U.eventMode="static",U.cursor="pointer",p.addChild(U);let ts=(V==null?void 0:V.text)||((Di=g.ui)==null?void 0:Di.cta_label_end)||"DOWNLOAD",Gn=(V==null?void 0:V.font)||"brand.heading",ns=(V==null?void 0:V.fontSize)||20,is=te.button_text_color||((zi=g.theme)==null?void 0:zi.cta_text)||"#1a0a0a",dt=new B.Text({text:ts,style:{fontFamily:oe(Gn),fontSize:ns,fontWeight:re(Gn),fill:is,align:"center",letterSpacing:(Fi=V==null?void 0:V.letterSpacing)!=null?Fi:1}});dt.anchor.set(.5),dt.position.set(0,ye),dt.alpha=0,p.addChild(dt);let ie=l==null?void 0:l.ui,qn=((Ni=l==null?void 0:l.gameplay)==null?void 0:Ni.tuning)||{},as=(ie==null?void 0:ie.text)||"Play the full game",Un=(ie==null?void 0:ie.font)||"brand.body",ss=(ie==null?void 0:ie.fontSize)||11,os=($i=ie==null?void 0:ie.letterSpacing)!=null?$i:0,qt=(Gi=l==null?void 0:l.render)==null?void 0:Gi.tint,rs=typeof qt=="string"?qt:qt?`#${qt.toString(16).padStart(6,"0")}`:"#CCCCCC",Ge=new B.Text({text:as,style:{fontFamily:oe(Un),fontSize:ss,fontWeight:re(Un),fill:rs,align:"center",letterSpacing:os}});Ge.anchor.set(.5);let ls=ye+35+((qi=qn.animation_start_y_offset)!=null?qi:5);Ge.position.set(0,ls),Ge.alpha=0,Ge.animationStartYOffset=(Ui=qn.animation_start_y_offset)!=null?Ui:5,p.addChild(Ge);let _n=((Yi=u==null?void 0:u.gameplay)==null?void 0:Yi.tuning)||{},cs=(Wi=_n.hand_offset_x)!=null?Wi:50,ds=(Vi=_n.hand_offset_y)!=null?Vi:50,us=(Ki=(Xi=u==null?void 0:u.transform)==null?void 0:Xi.scale)!=null?Ki:.1875,ps=(Ji=_n.hand_scale_multiplier)!=null?Ji:2.5,Be=new B.Sprite(e||B.Texture.EMPTY);return Be.anchor.set(.5),Be.scale.set(us*ps),Be.position.set(cs,ye+ds),Be.alpha=0,Be.visible=!1,p.addChild(Be),{panel:p,logo:D,title:ce,subtitle:be,footer:me,ctaButton:U,ctaText:dt,ctaHint:Ge,hand:Be}}function za(t,e,n){var I,R,M,w,L,G,E,j;let i=e.objects.get("ui_endgame_1"),a=((I=i==null?void 0:i.gameplay)==null?void 0:I.tuning)||{},s=(R=a.animation_duration_ms)!=null?R:800,o=(M=a.fade_in_duration_ms)!=null?M:600,r=(w=a.scale_animation_intensity)!=null?w:.1,c=(L=a.logo_animation_delay_ms)!=null?L:100,l=(G=a.title_animation_delay_ms)!=null?G:200,u=(E=a.footer_animation_delay_ms)!=null?E:300,g=(j=a.cta_animation_delay_ms)!=null?j:400,{panel:p,logo:d,title:f,subtitle:h,footer:b,ctaButton:m,ctaText:y,ctaHint:_}=t;p.visible=!0;let C=Date.now(),v=()=>{let N=Date.now()-C,H=Math.min(N/o,1),q=1-Math.pow(1-H,3);p.alpha=q,p.scale.set(1+r*(1-q)),H<1?requestAnimationFrame(v):(setTimeout(()=>Us(d,s,e),c),setTimeout(()=>{Ys(f,s),setTimeout(()=>Ws(h,s),50)},l),setTimeout(()=>Vs(b,s),u),setTimeout(()=>{Xs(m,y,s),setTimeout(()=>Ks(_,s),50),n&&n()},g))};v()}function Us(t,e,n){var p,d,f,h,b;let i=n==null?void 0:n.objects.get("ui_endgame_logo_1"),s=(d=(((p=i==null?void 0:i.gameplay)==null?void 0:p.tuning)||{}).animation_start_scale)!=null?d:1.2,o=Date.now(),r=t.alpha,c=(f=t.targetAlpha)!=null?f:1,l=(h=t.baseScaleX)!=null?h:t.scale.x,u=(b=t.baseScaleY)!=null?b:t.scale.y,g=()=>{let m=Date.now()-o,y=Math.min(m/e,1),_=1-Math.pow(1-y,2);t.alpha=r+(c-r)*_;let C=s+(1-s)*_;t.scale.set(l*C,u*C),y<1&&requestAnimationFrame(g)};g()}function Ys(t,e){let n=Date.now(),i=t.alpha,a=t.y,s=()=>{let o=Date.now()-n,r=Math.min(o/e,1),c=1-Math.pow(1-r,2);t.alpha=i+(1-i)*c,t.y=a-20*(1-c),r<1&&requestAnimationFrame(s)};s()}function Ws(t,e){var r;let n=Date.now(),i=t.alpha,a=t.position.y,s=a-((r=t.animationStartYOffset)!=null?r:-10),o=()=>{let c=Date.now()-n,l=Math.min(c/e,1),u=1-Math.pow(1-l,2);t.alpha=i+(1-i)*u,t.position.y=a+(s-a)*u,l<1&&requestAnimationFrame(o)};o()}function Vs(t,e){var o;let n=Date.now(),i=t.alpha,a=(o=t.targetAlpha)!=null?o:1,s=()=>{let r=Date.now()-n,c=Math.min(r/e,1),l=1-Math.pow(1-c,2);t.alpha=i+(a-i)*l,c<1&&requestAnimationFrame(s)};s()}function Xs(t,e,n){let i=Date.now(),a=t.alpha,s=()=>{let o=Date.now()-i,r=Math.min(o/n,1),c=1-Math.pow(1-r,2);t.alpha=a+(1-a)*c,e.alpha=a+(1-a)*c,t.scale.set(1+.1*(1-c)),r<1&&requestAnimationFrame(s)};s()}function Ks(t,e){var r;let n=Date.now(),i=t.alpha,a=t.position.y,s=a-((r=t.animationStartYOffset)!=null?r:5),o=()=>{let c=Date.now()-n,l=Math.min(c/e,1),u=1-Math.pow(1-l,2);t.alpha=i+(1-i)*u,t.position.y=a+(s-a)*u,l<1&&requestAnimationFrame(o)};o()}function Fa(t,e,n,i){var u,g,p,d;let a=n.objects.get("ui_endgame_hand_1"),s=((u=a==null?void 0:a.gameplay)==null?void 0:u.tuning)||{},o=(g=s.click_animation_duration_ms)!=null?g:600,r=(p=s.click_delay_ms)!=null?p:2e3,c=(d=s.click_repeat_delay_ms)!=null?d:3e3,l=()=>{var I,R;t.visible=!0,t.alpha=1;let f=t.x,h=t.y,b=(I=s.hand_offset_x)!=null?I:50,m=(R=s.hand_offset_y)!=null?R:50,y=e.x+b,_=e.y+m,C=Date.now(),v=()=>{var N,H,q;let M=Date.now()-C,w=Math.min(M/o,1),L=w<.5?2*w*w:1-Math.pow(-2*w+2,2)/2;t.x=f+(y-f)*L,t.y=h+(_-h)*L;let G=(H=(N=a==null?void 0:a.transform)==null?void 0:N.scale)!=null?H:.1875,E=(q=s.hand_scale_multiplier)!=null?q:2.5,j=G*E;t.scale.set(j+j*.2*Math.sin(w*Math.PI)),w<1?requestAnimationFrame(v):(e.scale.set(.95),setTimeout(()=>{e.scale.set(1),i()},100),setTimeout(()=>{t.alpha=0,setTimeout(()=>{t.x=f,t.y=h,l()},c)},500))};v()};setTimeout(l,r)}var X=require("pixi.js");var St={enabled:!0,show_on_start:!1,background_color:"#120b14",background_alpha:.8,title:"Rope Rescue",subtitle:"Drag the key to save the hero.",button_label:"Start",title_color:"#FFFFFF",subtitle_color:"#D6C9E0",button_bg:"#FFB43B",button_text:"#1A0A0A",button_width:180,button_height:48,button_radius:14,loading_blur:!0,loading_blur_strength:8,loading_overlay_alpha:.35,font_family:"Arial, sans-serif",title_size:28,subtitle_size:14,loading_text:"Y\xFCkleniyor...",loading_text_scale:.6},Qe=class{constructor(e,n,i){this.loadingTime=0;this.tickLoadingHandler=null;var a,s,o;this.app=e,this.stage=n,this.activeConfig=i,this.splashConfig={...St,...(s=(a=i.engine)==null?void 0:a.splash)!=null?s:{}},this.splashEnabled=this.splashConfig.enabled!==!1,this.loadingBlurEnabled=this.splashConfig.loading_blur!==!1,this.loadingBlurStrength=typeof this.splashConfig.loading_blur_strength=="number"?this.splashConfig.loading_blur_strength:8,this.loadingOverlayAlpha=typeof this.splashConfig.loading_overlay_alpha=="number"?this.splashConfig.loading_overlay_alpha:.35,this.splashLayer=new X.Container,this.splashLayer.visible=!1,this.splashLayer.zIndex=1e4,this.splashLayer.eventMode="static",this.splashLayer.cursor="default",this.splashBg=new X.Graphics,this.splashBg.eventMode="static",this.splashTitle=new X.Text(this.splashConfig.title,{fontFamily:this.splashConfig.font_family,fontSize:this.splashConfig.title_size,fill:this.splashConfig.title_color,align:"center"}),this.splashTitle.anchor.set(.5),this.splashSubtitle=new X.Text(this.splashConfig.subtitle,{fontFamily:this.splashConfig.font_family,fontSize:this.splashConfig.subtitle_size,fill:this.splashConfig.subtitle_color,align:"center"}),this.splashSubtitle.anchor.set(.5),this.splashButton=new X.Graphics,this.splashButton.eventMode="static",this.splashButton.cursor="pointer",this.splashButtonText=new X.Text(this.splashConfig.button_label,{fontFamily:this.splashConfig.font_family,fontSize:Math.round(this.splashConfig.subtitle_size+2),fill:this.splashConfig.button_text,align:"center"}),this.splashButtonText.anchor.set(.5),this.splashButton.addChild(this.splashButtonText),this.splashLayer.addChild(this.splashBg,this.splashTitle,this.splashSubtitle,this.splashButton),this.stage.addChild(this.splashLayer),this.loadingLayer=new X.Container,this.loadingLayer.zIndex=10001,this.loadingLayer.eventMode="static",this.loadingBg=new X.Graphics,this.loadingText=new X.Text((o=this.splashConfig.loading_text)!=null?o:St.loading_text,this.resolveLoadingTextStyle(this.splashConfig)),this.loadingText.anchor.set(.5),this.loadingLayer.addChild(this.loadingBg,this.loadingText),this.stage.addChild(this.loadingLayer),this.syncConfig(),this.updateLoadingLayout(),this.setupWindowGlobals(),this.startLoadingAnimation()}resolveLoadingTextStyle(e){var g,p,d,f,h,b,m;let n=this.activeConfig.objects.get("label_1"),i=(g=n==null?void 0:n.ui)!=null?g:{},a=(p=n==null?void 0:n.render)!=null?p:{},s=(d=i.font)!=null?d:"brand.warning",o=(f=i.fontSize)!=null?f:50,r=(h=i.letterSpacing)!=null?h:0,c=(b=a.tint)!=null?b:"#FFF1C1",l=typeof c=="string"?c:`#${c.toString(16).padStart(6,"0")}`,u=typeof e.loading_text_scale=="number"?e.loading_text_scale:St.loading_text_scale;return{fontFamily:oe(s),fontSize:Math.round(o*u),fontWeight:re(s),fill:l,align:(m=i.align)!=null?m:"center",letterSpacing:r}}syncConfig(e){var i,a,s;let n={...St,...(a=e!=null?e:(i=this.activeConfig.engine)==null?void 0:i.splash)!=null?a:{}};if(this.splashConfig=n,this.splashEnabled=n.enabled!==!1,this.loadingBlurEnabled=n.loading_blur!==!1,this.loadingBlurStrength=typeof n.loading_blur_strength=="number"?n.loading_blur_strength:8,this.loadingOverlayAlpha=typeof n.loading_overlay_alpha=="number"?n.loading_overlay_alpha:.35,this.splashTitle.text=n.title,this.splashTitle.style.fontFamily=n.font_family,this.splashTitle.style.fontSize=n.title_size,this.splashTitle.style.fill=n.title_color,this.splashSubtitle.text=n.subtitle,this.splashSubtitle.style.fontFamily=n.font_family,this.splashSubtitle.style.fontSize=n.subtitle_size,this.splashSubtitle.style.fill=n.subtitle_color,this.splashButtonText.text=n.button_label,this.splashButtonText.style.fontFamily=n.font_family,this.splashButtonText.style.fontSize=Math.round(n.subtitle_size+2),this.splashButtonText.style.fill=n.button_text,this.loadingText){let o=this.resolveLoadingTextStyle(n);this.loadingText.text=(s=n.loading_text)!=null?s:St.loading_text,this.loadingText.style.fontFamily=o.fontFamily,this.loadingText.style.fontSize=o.fontSize,this.loadingText.style.fontWeight=o.fontWeight,this.loadingText.style.fill=o.fill,this.loadingText.style.align=o.align,this.loadingText.style.letterSpacing=o.letterSpacing}}updateLayout(e,n){this.updateSplashLayout(e,n),this.loadingBg&&this.updateLoadingLayout()}updateSplashLayout(e,n){this.splashBg.clear().rect(0,0,e,n).fill({color:Number.parseInt(this.splashConfig.background_color.replace("#",""),16),alpha:this.splashConfig.background_alpha});let i=e/2,a=n/2;this.splashTitle.position.set(i,a-48),this.splashSubtitle.position.set(i,a-16);let s=this.splashConfig.button_width,o=this.splashConfig.button_height,r=this.splashConfig.button_radius;this.splashButton.clear().roundRect(-s/2,-o/2,s,o,r).fill({color:Number.parseInt(this.splashConfig.button_bg.replace("#",""),16),alpha:1}),this.splashButton.position.set(i,a+32),this.splashButtonText.position.set(0,0)}updateLoadingLayout(){var i,a;let{width:e,height:n}=this.app.renderer;(i=this.loadingBg)==null||i.clear().rect(0,0,e,n).fill({color:0,alpha:this.loadingOverlayAlpha}),(a=this.loadingText)==null||a.position.set(e/2,n/2)}show(){this.syncConfig(),this.splashEnabled&&(this.updateSplashLayout(this.app.renderer.width,this.app.renderer.height),this.splashLayer.visible=!0)}hide(){this.splashLayer.visible=!1}startLoadingAnimation(){this.tickLoadingHandler=e=>{let n=e.deltaTime;this.loadingTime+=n,this.loadingText&&(this.loadingText.alpha=.6+Math.sin(this.loadingTime*.08)*.4)},this.app.ticker.add(this.tickLoadingHandler)}stopLoadingAnimation(){this.tickLoadingHandler&&(this.app.ticker.remove(this.tickLoadingHandler),this.tickLoadingHandler=null)}destroyLoadingLayer(){this.stopLoadingAnimation(),this.loadingLayer.destroy({children:!0}),this.loadingText=null,this.loadingBg=null}applyLoadingBlur(e){var n;if(this.loadingBlurEnabled&&e){let i=new X.BlurFilter(this.loadingBlurStrength),a=(n=e.filters)!=null?n:null;return e.filters=[...a!=null?a:[],i],a}return null}removeLoadingBlur(e,n){e&&(n?e.filters=n:e.filters=null)}setupWindowGlobals(){if(typeof window=="undefined")return;let e=window;if(e.__updateSplashLayout=(n,i)=>{this.loadingBg&&this.updateLoadingLayout(),this.updateSplashLayout(n,i)},e.__previewShowSplash=()=>this.show(),e.__previewHideSplash=()=>this.hide(),e.__previewUpdateSplash=()=>{this.syncConfig(),this.loadingBg&&this.updateLoadingLayout(),this.updateSplashLayout(this.app.renderer.width,this.app.renderer.height),this.splashEnabled||(this.splashLayer.visible=!1)},!e.__splashScreenListener){let n=i=>{var r;let{width:a,height:s}=(r=i==null?void 0:i.detail)!=null?r:{};if(typeof a!="number"||typeof s!="number")return;let o=window.__updateSplashLayout;typeof o=="function"&&o(a,s)};e.__splashScreenListener=n,window.addEventListener("handler-preview:screen",n)}}getSplashButton(){return this.splashButton}shouldShowOnStart(){return this.splashEnabled&&this.splashConfig.show_on_start}destroy(){this.stopLoadingAnimation(),this.loadingLayer.destroy({children:!0}),this.splashLayer.destroy({children:!0})}};var sn=require("pixi.js");function Na(t,e,n){var g,p,d,f;let i=e.objects.get("hand_tutorial_1")||e.objects.get("hand_1")||Array.from(e.objects.values()).find(h=>{var b;return((b=h==null?void 0:h.identity)==null?void 0:b.id)==="hand.tutorial"}),a=((g=i==null?void 0:i.gameplay)==null?void 0:g.tuning)||{},s=(i==null?void 0:i.render)||{},o=(i==null?void 0:i.transform)||{},r=new sn.Sprite(t),c=s==null?void 0:s.anchor;c&&typeof c.x=="number"&&typeof c.y=="number"?r.anchor.set(c.x,c.y):r.anchor.set(.5),r.alpha=0;let l=(p=a.hand_scale_multiplier)!=null?p:2.5,u=(d=o.scale)!=null?d:.1875;return r.scale.set(u*l),r.zIndex=(f=s.z_index)!=null?f:99999,r}function $a(t){var h,b,m,y,_,C,v,I,R,M;let e=t.objects.get("ui_tutorial_1")||t.objects.get("label_1")||Array.from(t.objects.values()).find(w=>{var L;return["ui.tutorial","label.warning"].includes((L=w==null?void 0:w.identity)==null?void 0:L.id)}),n=e==null?void 0:e.ui,i=(e==null?void 0:e.render)||{},a=((h=t.engine.runtime)==null?void 0:h.ui_styles)||{},s=((b=t.engine.runtime)==null?void 0:b.ui)||{},o=(n==null?void 0:n.text)||s.tutorial_label||s.label_text||"CLEAN!",r=(n==null?void 0:n.font)||"brand.warning",c=(n==null?void 0:n.fontSize)||a.label_font_size||52,l=(y=n==null?void 0:n.letterSpacing)!=null?y:(m=a.label_letter_spacing)!=null?m:-1,u=(n==null?void 0:n.align)||"center",g=i.tint,p=typeof g=="string"?g:g?`#${g.toString(16).padStart(6,"0")}`:a.label_fill||"#FFF1C1",d=new sn.Text({text:o,style:{fontFamily:oe(r),fontSize:c,fontWeight:re(r),fill:p,align:u,letterSpacing:l,stroke:{color:a.label_stroke||"#8B0000",width:2},dropShadow:{color:a.label_shadow_color||"#000000",alpha:(_=a.label_shadow_alpha)!=null?_:.8,angle:(C=a.label_shadow_angle)!=null?C:0,blur:(v=a.label_shadow_blur)!=null?v:4,distance:(I=a.label_shadow_distance)!=null?I:2}}}),f=i==null?void 0:i.anchor;return f&&typeof f.x=="number"&&typeof f.y=="number"?d.anchor.set(f.x,f.y):d.anchor.set(.5,.5),d.alpha=(R=i.alpha)!=null?R:0,d.visible=(M=i.visible)!=null?M:!0,d}function Ga(t,e,n,i,a){var c,l,u,g,p,d,f,h,b,m,y,_,C,v,I,R,M;let s=a.objects.get("hand_tutorial_1")||a.objects.get("hand_1")||Array.from(a.objects.values()).find(w=>{var L;return((L=w==null?void 0:w.identity)==null?void 0:L.id)==="hand.tutorial"}),o=((c=s==null?void 0:s.gameplay)==null?void 0:c.tuning)||{},r=(s==null?void 0:s.transform)||{};if(!i){let w=(l=o.animation_duration)!=null?l:1.5,L=n%w/w,G=L<.5?2*L*L:-1+(4-2*L)*L,E=(f=(d=(p=(u=r.position)==null?void 0:u.x)!=null?p:(g=r.offset)==null?void 0:g.x)!=null?d:o.start_x_offset)!=null?f:0,j=(_=(y=(m=(h=r.position)==null?void 0:h.y)!=null?m:(b=r.offset)==null?void 0:b.y)!=null?y:o.start_y_offset)!=null?_:0,N=(C=o.x_offset)!=null?C:0,H=(v=o.y_offset)!=null?v:0,q=(I=o.animation_range)!=null?I:40,pe=q*.7,D=q,K=e.x+E+N+pe,J=e.y+j+H+D,$=K+pe,Y=J+D;t.x=K+($-K)*G,t.y=J+(Y-J)*G;let $e=(R=r.scale)!=null?R:.1875,ke=(M=o.hand_scale_multiplier)!=null?M:2.5;t.scale.set($e*ke)}}var Et=null;function Js(){return Et||(typeof window!="undefined"&&window.lottie?Et=window.lottie:(console.warn("[LottieOverlay] lottie-web is not available globally. Make sure it is loaded before using Lottie animations."),Et=null)),Et}function Jt(t){Et=t}function qa(t,e,n,i){var v,I,R,M,w,L,G,E,j,N,H,q,pe;let a=n.objects.get(t);if(!a)return console.warn(`[LottieOverlay] Object config not found: ${t}`),null;let s=((v=a.effects)==null?void 0:v.lottie)||{},o=a.transform||{},r=a.render||{};if(s.enabled===!1||r.visible===!1)return null;let c=i[t];if(!c||typeof c!="object")return console.warn(`[LottieOverlay] Asset data not found or invalid for: ${t}`),null;let l=Js();if(!l)return console.warn(`[LottieOverlay] lottie-web is not available. Cannot play animation: ${t}`),null;let u=(I=s.width)!=null?I:300,g=(R=s.height)!=null?R:300,p=(M=o.scale)!=null?M:1,d=(L=(w=o.position)==null?void 0:w.x)!=null?L:0,f=(E=(G=o.position)==null?void 0:G.y)!=null?E:0,h=(j=o.rotation)!=null?j:0,b=(N=r.z_index)!=null?N:100,m=(H=r.alpha)!=null?H:1,y=document.createElement("div");y.style.cssText=`
18
- position: absolute;
19
- top: calc(50% + ${f}px);
20
- left: calc(50% + ${d}px);
21
- transform: translate(-50%, -50%) scale(${p}) rotate(${h}deg);
22
- width: ${u}px;
23
- height: ${g}px;
24
- pointer-events: none;
25
- z-index: ${b};
26
- opacity: ${m};
27
- `,e.appendChild(y);let _=l.loadAnimation({container:y,renderer:s.renderer||"svg",loop:(q=s.loop)!=null?q:!1,autoplay:(pe=s.autoplay)!=null?pe:!0,animationData:c});s.speed!==void 0&&_.setSpeed(s.speed);let C=()=>{_.destroy(),y.parentNode&&y.parentNode.removeChild(y)};return s.loop||_.addEventListener("complete",C),{animation:_,cleanup:C}}var Ee=require("pixi.js");var ge=class{static get(e){var n;return(n=this.store.get(e))==null?void 0:n.data}static set(e,n){this.store.set(e,{data:n})}static has(e){return this.store.has(e)}static clear(){this.store.clear()}};ge.store=new Map;function Qs(){var t,e;try{let n=typeof window!="undefined"&&(document.querySelector('script[src*="inline-assets.js"]')||((e=(t=document.querySelector("script"))==null?void 0:t.textContent)==null?void 0:e.includes("inline-assets.js"))||window.INLINE_ASSETS),i=typeof window!="undefined"&&document.querySelector('link[href*="assets/"], script[src*="assets/"]');return!!(n&&!i)}catch{return!1}}async function Zs(){try{if(typeof window!="undefined"){let t=await fetch("./build-settings.json");if(t.ok){let e=await t.json();return console.log("[AssetLoader] Loaded build settings:",e),e}}}catch{}return null}function eo(){try{if(typeof window!="undefined"){let t=new XMLHttpRequest;if(t.open("GET","./build-settings.json",!1),t.send(),t.status===200&&t.responseText){let e=JSON.parse(t.responseText);return console.log("[AssetLoader] Loaded build settings (sync):",e),e}}}catch{}return null}var Ua=typeof __BUILD_MODE__!="undefined"?__BUILD_MODE__:"undefined",Ya=Qs(),ze=typeof window!="undefined"?window.__BUILD_SETTINGS__:null,k=Ya?"publish":Ua,he=ze==null?void 0:ze.assetsInlined;ze!=null&&ze.buildMode&&(k=ze.buildMode,console.log(`[AssetLoader] Build mode overridden by inline settings: ${k}`));var Me=eo();Me!=null&&Me.buildMode&&(k=Me.buildMode,console.log(`[AssetLoader] Build mode overridden by sync settings: ${k}`));(Me==null?void 0:Me.assetsInlined)!==void 0&&(he=Me.assetsInlined);Zs().then(t=>{t!=null&&t.buildMode&&t.buildMode!==k&&(k=t.buildMode,console.log(`[AssetLoader] Build mode overridden by settings: ${k}`)),(t==null?void 0:t.assetsInlined)!==void 0&&(he=t.assetsInlined)}).catch(()=>{});console.log(`[AssetLoader] MODULE LOADED - Compile: ${Ua}, Runtime: ${Ya?"publish":"dev"}, Effective: ${k}`);var Se={},zn=null;async function to(){if(console.log(`[AssetLoader] getInlineAssets() called - Effective mode: ${k}`),Object.keys(Se).length>0)return console.log("[AssetLoader] Returning cached inline assets:",Object.keys(Se)),Se;if(typeof window!="undefined"&&window.INLINE_ASSETS)return console.log("[AssetLoader] Using pre-loaded INLINE_ASSETS from window:",Object.keys(window.INLINE_ASSETS)),Se={...window.INLINE_ASSETS},Se;if(!(k==="publish"&&he!==!1))return console.log("[AssetLoader] Inline assets disabled for this build mode."),Se;if(!zn){let e=typeof window!="undefined"?new URL("inline-assets.js",window.location.href).href:"./inline-assets.js";console.log("[AssetLoader] Loading inline assets from:",e),zn=(async()=>{try{try{let s=await import(e+"?t="+Date.now());if(s.INLINE_ASSETS)return console.log("[AssetLoader] Loaded INLINE_ASSETS via ES module:",Object.keys(s.INLINE_ASSETS)),s.INLINE_ASSETS}catch(s){console.warn("[AssetLoader] ES module import failed, trying text parse:",s)}let n=await fetch(e);if(!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);let i=await n.text();console.log("[AssetLoader] Received JS code, length:",i.length);let a=i.match(/export\s+const\s+INLINE_ASSETS\s*=\s*({[\s\S]*?});?\s*$/m);if(a)try{let s=a[1];console.log("[AssetLoader] Found INLINE_ASSETS export, parsing...");let o=new Function("return "+s)();return console.log("[AssetLoader] Parsed inline assets:",Object.keys(o)),o}catch(s){return console.warn("[AssetLoader] Failed to parse inline assets:",s),{}}else return console.warn("[AssetLoader] INLINE_ASSETS export not found in response"),console.log("[AssetLoader] JS code preview:",i.substring(0,500)),{}}catch(n){return console.warn("[AssetLoader] Failed to load inline assets:",n),{}}})()}return Se=await zn,console.log("[AssetLoader] Final inline assets cache:",Object.keys(Se)),Se}var Wa=new Map;function Fn(t){return t===null||typeof t!="object"||(Object.freeze(t),Object.values(t).forEach(e=>Fn(e))),t}function no(t=64,e=64,n=16711680){let i=document.createElement("canvas");i.width=t,i.height=e;let a=i.getContext("2d");return a.fillStyle=`#${n.toString(16).padStart(6,"0")}`,a.fillRect(0,0,t,e),a.strokeStyle="#000",a.strokeRect(0,0,t,e),a.fillStyle="#fff",a.font="10px sans-serif",a.textAlign="center",a.fillText("MISSING",t/2,e/2),Ee.Texture.from(i)}function on(t,e){Wa.set(t,e)}var Ze=class{static async load(e,n,i){let a=ge.get(e);if(a!==void 0)return a;console.log(`[AssetLoader] Loading asset: ${e}, type: ${n.type}, Effective mode: ${k}`),console.log(`[AssetLoader] Window defined: ${typeof window!="undefined"}, INLINE_ASSETS exists: ${!!(typeof window!="undefined"&&window.INLINE_ASSETS)}, keys: ${typeof window!="undefined"&&window.INLINE_ASSETS?Object.keys(window.INLINE_ASSETS).length:"N/A"}`);let s=await to(),o=s[e];if(!o&&n.path){let l=n.path.split("/");if(l.length>=2){let u=l[l.length-1].split(".")[0],g=l[0],p=[`${u}.layer`,`${u}.player`,`${u}.tutorial`,`effects.${u}`,`ui.endgame.${u}`,u];for(let d of p)if(s[d]){o=s[d],console.log(`[AssetLoader] Found inline data for ${e} using derived key: ${d}`);break}}}if(console.log("[AssetLoader] Inline data for",e,":",o?"FOUND":"NOT FOUND"),k==="publish"&&he!==!1&&(console.log("[AssetLoader] \u26A0\uFE0F PUBLISH MODE DETECTED - inline assets are MANDATORY"),!o))throw new Error(`[AssetLoader] PUBLISH MODE: Inline asset required but NOT FOUND for object: ${e}, path: ${n.path}`);let c=Wa.get(n.type);if(c)try{let l=await c(n.path,o,e,i);return ge.set(e,l),l}catch(l){return this.handleFailure(e,n.type,l)}try{let l;switch(n.type){case"image":l=await this.loadImage(n.path,o);break;case"json":l=await this.loadJSON(n.path,o),l=Fn(l);break;default:throw new Error(`Unknown asset type: ${n.type}`)}return ge.set(e,l),l}catch(l){return this.handleFailure(e,n.type,l)}}static async loadImage(e,n){let i=k==="publish",a=i&&he!==!1;if(console.log(`[AssetLoader] loadImage - Effective mode: ${k}, isPublishMode: ${i}, inlineData: ${n?"EXISTS":"MISSING"}`),a){if(console.log("[AssetLoader] PUBLISH MODE ACTIVATED - inline assets are MANDATORY"),!n)throw new Error(`[AssetLoader] Publish mode: inline asset required but not found for object. Path: ${e}`);if(!n.startsWith("data:"))throw new Error(`[AssetLoader] Publish mode: inline asset must be data URI, got: ${n.substring(0,50)}...`);try{return await Ee.Assets.load(n)}catch(s){throw console.error("[AssetLoader] Failed to load texture from data URI:",s),s}}if(n&&n.startsWith("data:"))try{return await Ee.Assets.load(n)}catch(s){return console.error("[AssetLoader] Failed to load texture from data URI, falling back to path:",s),await Ee.Assets.load(e)}return await Ee.Assets.load(e)}static async loadJSON(e,n){let i=k==="publish",a=i&&he!==!1;if(console.log(`[AssetLoader] loadJSON - Effective mode: ${k}, isPublishMode: ${i}, inlineData: ${n?"EXISTS":"MISSING"}`),a){if(console.log("[AssetLoader] PUBLISH MODE ACTIVATED - inline assets are MANDATORY"),!n)throw new Error(`[AssetLoader] Publish mode: inline asset required but not found for path: ${e}`);if(n.startsWith("data:")){let o=atob(n.split(",")[1]);return JSON.parse(o)}return JSON.parse(n)}if(n){if(n.startsWith("data:")){let o=atob(n.split(",")[1]);return JSON.parse(o)}return JSON.parse(n)}let s=await fetch(e);if(!s.ok)throw new Error(`JSON fetch failed: ${e}`);return s.json()}static handleFailure(e,n,i){if(k==="dev"){let s=n==="image"?no():Fn({__placeholder:!0,type:n});return ge.set(e,s),s}throw i}};on("image",async(t,e)=>{let n=k==="publish",i=n&&he!==!1,a=k==="brand",s=n&&he===!1;if(console.log(`[AssetLoader] registerType('image') - Effective mode: ${k}, isPublishMode: ${n}, isBrandMode: ${a}, inlineData: ${e?"EXISTS":"MISSING"}`),i){if(console.log("[AssetLoader] PUBLISH MODE ACTIVATED - inline assets are MANDATORY"),!e)throw new Error(`[AssetLoader] Publish mode: inline asset required but not found for path: ${t}`);if(!e.startsWith("data:"))throw new Error(`[AssetLoader] Publish mode: inline asset must be data URI, got: ${e.substring(0,50)}...`);return Ee.Assets.load(e)}let o=t;return(a||s)&&t&&!t.startsWith("assets/")&&(typeof window!="undefined"&&!document.querySelector('link[href*="assets/"], script[src*="assets/"]')&&!document.querySelector('link[href*="configs/"], script[src*="configs/"]')?(o=t,console.log(`[AssetLoader] BRAND MODE: flattened build, using path "${t}" as-is`)):(o=`assets/${t}`,console.log(`[AssetLoader] BRAND MODE: transformed path "${t}" -> "${o}"`))),Ee.Assets.load(e||o)});on("json",async(t,e)=>{let n=k==="publish",i=n&&he!==!1,a=k==="brand",s=n&&he===!1;if(console.log(`[AssetLoader] registerType('json') - Effective mode: ${k}, isPublishMode: ${n}, isBrandMode: ${a}, inlineData: ${e?"EXISTS":"MISSING"}`),i){if(console.log("[AssetLoader] PUBLISH MODE ACTIVATED - inline assets are MANDATORY"),!e)throw new Error(`[AssetLoader] Publish mode: inline asset required but not found for path: ${t}`);return e.startsWith("data:")?JSON.parse(atob(e.split(",")[1])):JSON.parse(e)}let o=t;if((a||s)&&t&&!t.startsWith("assets/")&&(typeof window!="undefined"&&!document.querySelector('link[href*="assets/"], script[src*="assets/"]')&&!document.querySelector('link[href*="configs/"], script[src*="configs/"]')?(o=t,console.log(`[AssetLoader] BRAND MODE: flattened build, using path "${t}" as-is`)):(o=`assets/${t}`,console.log(`[AssetLoader] BRAND MODE: transformed path "${t}" -> "${o}"`))),e)return e.startsWith("data:")?JSON.parse(atob(e.split(",")[1])):JSON.parse(e);let r=await fetch(o);if(!r.ok)throw new Error(`JSON fetch failed: ${t}`);return r.json()});var _t=require("pixi.js");var io=typeof __BUILD_MODE__!="undefined"?__BUILD_MODE__:"undefined",Nn=io;if(typeof window!="undefined")try{let t=new XMLHttpRequest;if(t.open("GET","./build-settings.json",!1),t.send(),t.status===200&&t.responseText){let e=JSON.parse(t.responseText);e!=null&&e.buildMode&&(Nn=e.buildMode,console.log(`[ObjectFactory] Build mode overridden by settings: ${Nn}`))}}catch{}var Fe=class{static async create(e,n,i){var r,c,l,u,g,p;console.log(`[ObjectFactory] create() called for: ${e}, __BUILD_MODE__: ${Nn}`);let a=(r=n==null?void 0:n.render)==null?void 0:r.asset;if(!a){console.log(`[ObjectFactory] No asset definition for: ${e}, returning empty container`);let d=new _t.Container;return this.applyTransform(d,n==null?void 0:n.transform),d}console.log(`[ObjectFactory] Calling AssetLoader.load() for: ${e}, type: ${a.type}, path: ${a.path}`);let s=await Ze.load(e,a,i);console.log(`[ObjectFactory] AssetLoader.load() completed for: ${e}, rawAsset type: ${(c=s==null?void 0:s.constructor)==null?void 0:c.name}`);let o;if(a.type==="image")console.log("[ObjectFactory] Creating Sprite from texture:",s,"for object:",e),o=new _t.Sprite(s),console.log("[ObjectFactory] Created object:",o,"type:",(l=o==null?void 0:o.constructor)==null?void 0:l.name),this.applyTransform(o,n==null?void 0:n.transform);else if(a.type==="json")if(console.log("[ObjectFactory] JSON asset for",e,"rawAsset type:",(u=s==null?void 0:s.constructor)==null?void 0:u.name,s),s&&(((g=s.constructor)==null?void 0:g.name)==="Container"||s instanceof _t.Container)){console.warn("[ObjectFactory] JSON asset is Container (from cache), reloading JSON directly");let d=[a.path,`/assets/${a.path}`,`assets/${a.path}`,`../assets/${a.path}`],f=!1;for(let h of d)try{let b=await fetch(h);if(b.ok){o=await b.json(),console.log("[ObjectFactory] Reloaded JSON directly from:",h,"type:",(p=o==null?void 0:o.constructor)==null?void 0:p.name),f=!0;break}}catch{continue}f||(console.error("[ObjectFactory] Failed to reload JSON from any path"),o=s)}else o=s;else o=s,o&&typeof o=="object"&&("x"in o||"position"in o)&&this.applyTransform(o,n==null?void 0:n.transform);return o}static applyTransform(e,n){var i,a,s,o;!n||!e||(n.position&&("x"in e&&"y"in e?(e.x=(i=n.position.x)!=null?i:0,e.y=(a=n.position.y)!=null?a:0):"position"in e&&e.position&&e.position.set((s=n.position.x)!=null?s:0,(o=n.position.y)!=null?o:0)),n.scale!==void 0&&"scale"in e&&e.scale&&(typeof e.scale=="object"&&"set"in e.scale?e.scale.set(n.scale):e.scale=n.scale),n.rotation!==void 0&&"rotation"in e&&(e.rotation=n.rotation),n.anchor&&"anchor"in e&&e.anchor&&Array.isArray(n.anchor)&&("set"in e.anchor?e.anchor.set(n.anchor[0],n.anchor[1]):(e.anchor.x=n.anchor[0],e.anchor.y=n.anchor[1])))}};var rn=class{constructor(e,n,i){this.systems=[];this.totalTime=0;this.root=e,this.config=n,this.destinationUrl=i}async init(e){let{app:n,stage:i}=await nn(this.root,{background:e.background_color,text:e.text_color,primary:e.cta_background,cta_text:e.cta_text});this.app=n,this.stage=i,this.gameObjectManager=new Je(this.config),this.stage.eventMode="passive",this.stage.interactive=!1,this.stage.interactiveChildren=!0,this.stage.sortableChildren=!0;let a={app:this.app,stage:this.stage,config:this.config,gameObjectManager:this.gameObjectManager,destinationUrl:this.destinationUrl,root:this.root,engine:this};for(let s of this.systems)s.setContext(a),s.init&&await s.init();return{app:this.app,gameObjectManager:this.gameObjectManager}}registerSystems(e){this.systems.push(...e)}async start(){for(let e of this.systems)e.onStart&&await e.onStart();this.app.ticker.add(this.update.bind(this)),window.addEventListener("handler-preview:screen",e=>{let{width:n,height:i}=e.detail;this.resize(n,i)})}update(e){let n=e.deltaTime/60;this.totalTime+=n;for(let i of this.systems)i.update&&i.update(n,this.totalTime)}resize(e,n){for(let i of this.systems)i.onResize&&i.onResize(e,n)}updateConfig(e){this.config=e;for(let n of this.systems)n.context.config=e,n.onConfigUpdate&&n.onConfigUpdate(e)}destroy(){for(let e of this.systems)e.onDestroy&&e.onDestroy();this.app.ticker.remove(this.update.bind(this)),this.app.destroy(!0,{children:!0,texture:!1})}getApp(){return this.app}getGameObjectManager(){return this.gameObjectManager}getTotalTime(){return this.totalTime}getSystem(e){let n=this.systems.find(i=>i instanceof e);if(!n)throw new Error(`System ${e.name} not found!`);return n}};var et=class{setContext(e){this.context=e}};var tt=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 Va=Ln(require("pixi.js")),Xa=Va;typeof window!="undefined"&&(window.__basePixi=Va);var $n=class{constructor(){this.instanceCache=new Map;this.readyPromise=null;this.app=null;this.registry=new tt}init(e,n){this.registry.init(e),this.app=n}updateConfig(e){this.registry.init(e),this.instanceCache.clear(),this.readyPromise=null}async ready(){this.readyPromise&&await this.readyPromise;let n=this.registry.getAllIds().filter(a=>!this.instanceCache.has(a));if(n.length===0)return;let i=async a=>{a.length&&(console.log("[Assets] Loading objects:",a),await Promise.all(a.map(async s=>{var r;let o=this.registry.get(s);if(!o){console.warn("[Assets] No config found for object:",s);return}try{let c=await Fe.create(s,o,this.app);this.instanceCache.set(s,c),console.log("[Assets] Loaded object:",s,(r=c==null?void 0:c.constructor)==null?void 0:r.name)}catch(c){console.error("[Assets] Failed to load object:",s,c)}})))};return this.readyPromise=(async()=>{await i(n);let a=this.registry.getAllIds().filter(s=>!this.instanceCache.has(s));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 n=this.registry.get(e);if(n){let i=await Fe.create(e,n,this.app);this.instanceCache.set(e,i)}}get(e){return this.instanceCache.get(e)}},Ka=new $n,_e=new Proxy(Ka,{get(t,e){if(e in t&&typeof t[e]=="function")return t[e].bind(t);if(t.get(e))return t.get(e)}});function ln(t,e){Ka.init(t,e)}var nt=require("pixi.js");var cn=class extends et{constructor(){super(...arguments);this.splashScreen=null}async init(){ln(this.context.config,this.context.app),this.splashScreen=new Qe(this.context.app,this.context.stage,this.context.config),this.splashScreen.getSplashButton().on("pointerdown",()=>this.splashScreen.hide());let n=null;try{await _e.reloadObject("background_1");let i=_e.background_1;i&&(i instanceof nt.Sprite||i instanceof nt.Graphics)&&(i.parent||this.context.stage.addChildAt(i,0),n=this.splashScreen.applyLoadingBlur(i))}catch(i){console.warn("[AssetSystem] Background preload failed:",i)}if(await _e.ready(),this.splashScreen){this.splashScreen.stopLoadingAnimation(),this.splashScreen.destroyLoadingLayer();let i=_e.background_1;i&&(i instanceof nt.Sprite||i instanceof nt.Graphics)&&this.splashScreen.removeLoadingBlur(i,n)}console.log("[AssetSystem] All assets preloaded and ready")}async onStart(){this.splashScreen&&this.splashScreen.shouldShowOnStart()&&this.splashScreen.show()}onConfigUpdate(){typeof _e.updateConfig=="function"&&_e.updateConfig(this.context.config)}};var gn=require("pixi.js"),Ce={width:400,height:600,designWidth:400,scaleFactor:1},Lt={scale:1,position:1},hn=[];function ao(t,e,n,i,a,s,o){hn.push({element:t,originalScale:s,positionHelper:e,heightPercent:a}),e(t,n,i,a,s,o,!1)}function so(){hn.forEach(({element:t,originalScale:e,positionHelper:n,heightPercent:i})=>{let a=e*Ce.scaleFactor;n(t,Ce.width,Ce.height,i,a,!0,!1)})}function Ja(){hn.length=0,console.log("[LAYOUT] Cleared all responsive elements")}function un(t,e){console.log(`[SCREEN] updateScreenState called: ${t}x${e}`),Ce.width=t,Ce.height=e,Ce.scaleFactor=Math.min(t/Ce.designWidth,1.15),Lt.scale=Ce.scaleFactor,Lt.position=1,console.log(`[SCREEN] Global multipliers - scale: ${Lt.scale.toFixed(3)}`),so()}var T={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},physics:{rope_length:420,gravity:9.8,friction:.1}};function oo(t,e,n){let i=T[t];i&&i[e]!==void 0&&(i[e]=n,console.log(`Updated ${t}.${e} = ${n}`))}function ro(){return T}var lo={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 dn(t,e){return typeof t=="number"&&Number.isFinite(t)?t:e}function fn(t,e={x:.5,y:.5}){var n;if(Array.isArray(t))return{x:dn(t[0],e.x),y:dn(t[1],e.y)};if(t&&typeof t=="object"){let i=t;return{x:dn(i.x,e.x),y:dn(i.y,e.y)}}if(typeof t=="string"){let i=t.trim().toLowerCase();return(n=lo[i])!=null?n:e}return e}function bn(t,e,n,i={}){var d,f,h,b,m,y;let a=fn(n),s=(d=i.inset)!=null?d:{},o=(f=i.padding)!=null?f:{x:0,y:0},r=((h=s.left)!=null?h:0)+o.x,c=((b=s.right)!=null?b:0)+o.x,l=((m=s.top)!=null?m:0)+o.y,u=((y=s.bottom)!=null?y:0)+o.y,g=Math.max(0,t-r-c),p=Math.max(0,e-l-u);return{x:r+g*a.x,y:l+p*a.y}}function mn(t,e,n,i={}){var h,b,m,y,_,C;let a=(h=i.inset)!=null?h:{},s=(b=i.padding)!=null?b:{x:0,y:0},o=((m=a.left)!=null?m:0)+s.x,r=((y=a.right)!=null?y:0)+s.x,c=((_=a.top)!=null?_:0)+s.y,l=((C=a.bottom)!=null?C:0)+s.y,u=Math.max(0,t-o-r),g=Math.max(0,e-c-l),p=fn(n,{x:.5,y:.5}),d=Math.min(Math.max(p.x,0),1),f=Math.min(Math.max(p.y,0),1);return{x:o+u*d,y:c+g*f}}function pn(t,e,n,i={}){var u,g,p;if(!t)return;let a=i.positionRatio?mn(e,n,i.positionRatio,{inset:i.inset,padding:i.screenPadding}):bn(e,n,i.anchor,{inset:i.inset,padding:i.screenPadding}),s=(u=i.offset)!=null?u:{x:0,y:0},o=a.x+s.x,r=a.y+s.y;t.anchor&&i.renderAnchor&&t.anchor.set(i.renderAnchor.x,i.renderAnchor.y),ue(t,o,r);let c=(g=i.scale)!=null?g:1,l=(p=i.scaleMultiplier)!=null?p:1;(i.scale!==void 0||i.scaleMultiplier!==void 0)&&fe(t,c*l)}if(typeof window!="undefined"){let t=window.innerWidth,e=window.innerHeight,n=()=>{let i=window.innerWidth,a=window.innerHeight;(i!==t||a!==e)&&(t=i,e=a,un(i,a))};window.addEventListener("resize",n),window.addEventListener("orientationchange",()=>{setTimeout(n,100)}),window.mraid&&(window.mraid.addEventListener("viewableChange",n),window.mraid.addEventListener("sizeChange",n)),un(window.innerWidth,window.innerHeight),window.updateDebugConfig=oo,window.getDebugConfig=ro,window.copyConfig=xo,window.applyConfig=Ct,window.applyConfigForRatio=wo,window.positionAtBottom=Qa,window.positionAtTop=po,window.positionAtCenter=go,window.positionAtLeft=ho,window.positionAtRight=fo,window.positionAtBottomLeft=bo,window.positionAtBottomRight=mo,window.positionAtTopLeft=yo,window.positionAtTopRight=vo,window.applyPositionContract=uo,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 yn(t,e,n=0){return t*e+n}function vn(t,e,n=0){return t*(1-e)+n}function xn(t,e,n=0){return t*e+n}function wn(t,e,n=0){return t*(1-e)+n}function le(t,e=0){return t/2+e}function co(t,e){return t*e}function uo(t,e,n,i){var o,r,c,l,u,g,p,d,f,h,b,m,y,_,C,v,I,R,M,w;let a=0,s=0;switch(i.type){case"top":a=le(e,(r=(o=i.offset)==null?void 0:o.x)!=null?r:0),s=yn(n,i.percent,(l=(c=i.offset)==null?void 0:c.y)!=null?l:0);break;case"bottom":a=le(e,(g=(u=i.offset)==null?void 0:u.x)!=null?g:0),s=vn(n,i.percent,(d=(p=i.offset)==null?void 0:p.y)!=null?d:0);break;case"left":a=xn(e,i.percent,(h=(f=i.offset)==null?void 0:f.x)!=null?h:0),s=le(n,(m=(b=i.offset)==null?void 0:b.y)!=null?m:0);break;case"right":a=wn(e,i.percent,(_=(y=i.offset)==null?void 0:y.x)!=null?_:0),s=le(n,(v=(C=i.offset)==null?void 0:C.y)!=null?v:0);break;case"center":a=le(e,(R=(I=i.offset)==null?void 0:I.x)!=null?R:0),s=le(n,(w=(M=i.offset)==null?void 0:M.y)!=null?w:0);break}t.position?t.position.set(a,s):(t.x=a,t.y=s),i.scale!==void 0&&i.scale!==1&&t.scale&&(typeof t.scale.set=="function"?t.scale.set(i.scale,i.scale):(t.scale.x=i.scale,t.scale.y=i.scale))}function Qa(t,e,n,i=.2,a=1,s=!0,o=!1){let r=co(n,i),c=vn(n,i/2);ue(t,le(e),c);let l=s?a*Ce.scaleFactor:a;fe(t,l),o&&!hn.find(u=>u.element===t)&&ao(t,Qa,e,n,i,a,s)}function po(t,e,n,i=.1,a=1){ue(t,le(e),yn(n,i)),fe(t,a)}function go(t,e,n,i=0,a=0,s=1){ue(t,le(e,i),le(n,a)),fe(t,s)}function ho(t,e,n,i=.1,a=1){ue(t,xn(e,i),le(n)),fe(t,a)}function fo(t,e,n,i=.1,a=1){ue(t,wn(e,i),le(n)),fe(t,a)}function bo(t,e,n,i=.05,a=.05,s=1){ue(t,xn(e,a),vn(n,i)),fe(t,s)}function mo(t,e,n,i=.05,a=.05,s=1){ue(t,wn(e,a),vn(n,i)),fe(t,s)}function yo(t,e,n,i=.05,a=.05,s=1){ue(t,xn(e,a),yn(n,i)),fe(t,s)}function vo(t,e,n,i=.05,a=.05,s=1){ue(t,wn(e,a),yn(n,i)),fe(t,s)}function ue(t,e,n){t&&t.position?typeof t.position.set=="function"?t.position.set(e,n):(t.position.x=e,t.position.y=n):t&&(t.x=e,t.y=n)}function fe(t,e){e!==1&&t&&t.scale&&(typeof t.scale.set=="function"?t.scale.set(e,e):t.scale.x!==void 0&&t.scale.y!==void 0&&(t.scale.x=e,t.scale.y=e))}var Ne={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},physics:{rope_length:420,gravity:9.8,friction:.1}},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},physics:{rope_length:420,gravity:9.8,friction:.1}},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},physics:{rope_length:380,gravity:9.8,friction:.1}},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},physics:{rope_length:450,gravity:9.8,friction:.1}}};function xo(t){return t&&Ne[t]?JSON.parse(JSON.stringify(Ne[t])):JSON.parse(JSON.stringify(T))}function Ct(t){Object.keys(t).forEach(e=>{let n=e;T[n]&&t[n]&&Object.assign(T[n],t[n])}),console.log("Config applied:",t)}function wo(t,e){let n=t/e;n>1.6?(Ct(Ne.wide),console.log("Applied WIDE config for ratio:",n)):n<.7?(Ct(Ne.tall),console.log("Applied TALL config for ratio:",n)):n>.8&&n<1.2?(Ct(Ne.square),console.log("Applied SQUARE config for ratio:",n)):(Ct(Ne.default),console.log("Applied DEFAULT config for ratio:",n))}typeof window!="undefined"&&(window.configPresets=Ne);var Z=null;function Za(t,e,n,i,a,s={}){var q,pe,D,K,J,$,Y,$e,ke,At,Tt,Ie,Mt,it,kt,ce,at,It,W,st,Ot,ot,Pt,Rt,Oe,jt,be,Sn,Ht,ee,rt,Bt,lt,Dt,Pe,zt,Ft,Nt,me,$t,Gt,te,V,Re;let o=(q=s.enableDebugLogs)!=null?q:!1;o&&(console.log("\u{1F3AF} [LAYOUT_DEBUGS] ===== STARTING LAYOUT CALCULATION ====="),console.log("\u{1F3AF} [LAYOUT_DEBUGS] Screen dimensions:",{width:i.width,height:i.height}),console.log("\u{1F3AF} [LAYOUT_DEBUGS] Time:",n),console.log("\u{1F3AF} [LAYOUT_DEBUGS] Options:",s));let{mainContainer:r,label:c,background:l,backgroundTexture:u,app:g}=t;if(!g||!g.renderer){o&&console.log("\u{1F3AF} [LAYOUT_DEBUGS] \u274C No app or renderer, skipping layout");return}o&&(console.log("\u{1F3AF} [LAYOUT_DEBUGS] App renderer dimensions:",{width:g.renderer.width,height:g.renderer.height}),console.log("\u{1F3AF} [LAYOUT_DEBUGS] App screen dimensions:",{width:g.screen.width,height:g.screen.height}));let p=i.width,d=i.height;o&&console.log("\u{1F3AF} [LAYOUT_DEBUGS] Base dimensions:",{baseWidth:p,baseHeight:d});let f=p*T.layout.screen_scale_x,h=d*T.layout.screen_scale_y,b=p/2,m=e.engine.runtime||{},y=m.layout||{};o&&(console.log("\u{1F3AF} [LAYOUT_DEBUGS] Debug config:",{screen_scale_x:T.layout.screen_scale_x,screen_scale_y:T.layout.screen_scale_y}),console.log("\u{1F3AF} [LAYOUT_DEBUGS] Calculated dimensions:",{width:f,height:h,midX:b}),console.log("\u{1F3AF} [LAYOUT_DEBUGS] Engine runtime:",m),console.log("\u{1F3AF} [LAYOUT_DEBUGS] Layout config:",y));let _=y.design_width_portrait||400,C=f/_;C=Math.min(C,1.15);let v=C*((pe=T.engine.scale)!=null?pe:1),I=(D=s.skipMainContainerTransform)!=null?D:!1;!I&&r&&r.scale&&(typeof r.scale.set=="function"?r.scale.set(v):(r.scale.x=v,r.scale.y=v));let M=((K=T.physics.rope_length)!=null?K:420)*v,w=p/d>.6,L;w?L=h*.65:L=M+h*.1,!I&&r&&r.position&&(typeof r.position.set=="function"?r.position.set(b+T.layout.position_offset.x,L+T.layout.position_offset.y):(r.position.x=b+T.layout.position_offset.x,r.position.y=L+T.layout.position_offset.y));let G=new Set((J=s.skipInstanceIds)!=null?J:[]);if(a&&(r!=null&&r.toLocal))for(let[A,F]of e.objects.entries()){let O=F==null?void 0:F.transform;if(!O||G.has(A))continue;let x=($=a.get)==null?void 0:$.call(a,A),ne=((Y=x==null?void 0:x.getDisplayObject)==null?void 0:Y.call(x))||(x==null?void 0:x.pixiObject)||x;if(!ne||ne.parent!==r)continue;let de=O.position_ratio!=null?mn(p,d,O.position_ratio):bn(p,d,($e=O.anchor)!=null?$e:"center"),je=r.toLocal(new gn.Point(de.x,de.y)),ye=(ke=O.position)!=null?ke:{x:0,y:0},U=je.x+ye.x,He=je.y+ye.y;typeof(x==null?void 0:x.setPosition)=="function"?x.setPosition(U,He):(ue(ne,U,He),(At=x==null?void 0:x.transform)!=null&&At.position&&(x.transform.position.x=U,x.transform.position.y=He))}if(T.layout.debug_rect_visible){(!Z||Z.parent!==g.stage)&&(Z==null||Z.destroy(),Z=new gn.Graphics,Z.zIndex=9999,g.stage.addChild(Z)),Z.clear();let A=T.layout.debug_rect_scale_x,F=T.layout.debug_rect_scale_y,O=(p-4)*A,x=(d-4)*F,ne=(p-O)/2,de=(d-x)/2;o&&(console.log("\u{1F3AF} [LAYOUT_DEBUGS] ===== DEBUG RECT POSITIONING ====="),console.log("\u{1F3AF} [LAYOUT_DEBUGS] Debug rect calculations:",{baseWidth:p,baseHeight:d,rectW:O,rectH:x,offsetX:ne,offsetY:de}),console.log("\u{1F3AF} [LAYOUT_DEBUGS] Debug rect final position:",{x:2+ne,y:2+de,width:O,height:x})),Z.rect(2+ne,2+de,O,x).stroke({width:T.layout.debug_rect_thickness,color:T.layout.debug_rect_color})}else Z&&(Z.destroy(),Z=null);let E=e.objects.get("label_1")||e.objects.get("ui_tutorial_1"),j=e.objects.get("hazard_1"),N=(ce=(kt=(Ie=(Tt=j==null?void 0:j.gameplay)==null?void 0:Tt.rules)==null?void 0:Ie.hazard_height)!=null?kt:(it=(Mt=j==null?void 0:j.gameplay)==null?void 0:Mt.tuning)==null?void 0:it.hazard_height)!=null?ce:0;if(c&&c.position){let A=(at=E==null?void 0:E.render)==null?void 0:at.anchor,F=(W=(It=E==null?void 0:E.transform)==null?void 0:It.anchor)!=null?W:"center",O=(st=E==null?void 0:E.transform)==null?void 0:st.position_ratio,x=((Ot=E==null?void 0:E.transform)==null?void 0:Ot.offset)||{x:0,y:0};pn(c,p,d,{anchor:F,positionRatio:O,offset:{x:x.x*v,y:x.y*v},inset:{bottom:N},renderAnchor:A})}if(c&&c.alpha>0){let A=1+Math.sin(n*T.engine.label_pulse_speed)*T.engine.label_pulse_intensity,F=(Pt=(ot=E==null?void 0:E.transform)==null?void 0:ot.scale)!=null?Pt:1,O=A*v*F;c.scale&&(typeof c.scale.set=="function"?c.scale.set(O):(c.scale.x=O,c.scale.y=O))}if(o&&console.log("\u{1F3AF} [LAYOUT_DEBUGS] ===== BACKGROUND POSITIONING ====="),l){o&&(console.log("\u{1F3AF} [LAYOUT_DEBUGS] Background object exists:",!!l),console.log("\u{1F3AF} [LAYOUT_DEBUGS] Background type:",(Rt=l.constructor)==null?void 0:Rt.name)),l.alpha=((jt=(Oe=m.background)==null?void 0:Oe.alpha)!=null?jt:.98)*T.engine.background_alpha,o&&console.log("\u{1F3AF} [LAYOUT_DEBUGS] Background alpha set to:",l.alpha);let A=e.objects.get("background_1");o&&console.log("\u{1F3AF} [LAYOUT_DEBUGS] Background config:",A);let F=(A==null?void 0:A.transform)||{};o&&console.log("\u{1F3AF} [LAYOUT_DEBUGS] Background transform:",F);let O=F.offset||{x:0,y:0},x=((Sn=(be=m.background)==null?void 0:be.offset_y)!=null?Sn:0)+T.engine.background_offset_y,ne=(ee=(Ht=A==null?void 0:A.render)==null?void 0:Ht.anchor)!=null?ee:{x:.5,y:.5},de=(rt=F.anchor)!=null?rt:"center",je=F.position_ratio;if(o&&console.log("\u{1F3AF} [LAYOUT_DEBUGS] Background positioning params:",{bgOffset:O,bgRuntimeOffsetY:x,bgRenderAnchor:ne,bgScreenAnchor:de,bgPositionRatio:je,baseWidth:p,baseHeight:d,finalScale:v}),pn(l,p,d,{anchor:de,positionRatio:je,offset:{x:O.x*v,y:O.y*v+x},renderAnchor:ne}),o&&(console.log("\u{1F3AF} [LAYOUT_DEBUGS] Background position after applyScreenAnchor:",{x:l.x,y:l.y,scaleX:(Bt=l.scale)==null?void 0:Bt.x,scaleY:(lt=l.scale)==null?void 0:lt.y,anchorX:(Dt=l.anchor)==null?void 0:Dt.x,anchorY:(Pe=l.anchor)==null?void 0:Pe.y,pivotX:(zt=l.pivot)==null?void 0:zt.x,pivotY:(Ft=l.pivot)==null?void 0:Ft.y,width:l.width,height:l.height}),console.log("\u{1F3AF} [LAYOUT_DEBUGS] Background texture dimensions:",{textureWidth:u==null?void 0:u.width,textureHeight:u==null?void 0:u.height})),u){let ye=Math.max(f/u.width,h/u.height),U=(me=(Nt=m.background)==null?void 0:Nt.scale_multiplier)!=null?me:1.05,He=($t=F.scale)!=null?$t:1,ct=ye*U*T.engine.background_scale*He;l.scale&&(typeof l.scale.set=="function"?l.scale.set(ct):(l.scale.x=ct,l.scale.y=ct))}else l&&typeof l.clear=="function"&&(l.clear(),l.rect(-f/2,-h/2,f,h).fill({color:1444375}))}let H=(Gt=window.gameObjectManager)==null?void 0:Gt.get("character_1");if(H){let A=((te=H.getDisplayObject)==null?void 0:te.call(H))||H;A&&A.scale&&(console.log(`[CHARACTER] After layout - Adjusted scale - x: ${((V=A.scale.x)!=null?V:1).toFixed(3)}, y: ${((Re=A.scale.y)!=null?Re:1).toFixed(3)}`),console.log(`[CHARACTER] Layout finalScale: ${v.toFixed(3)}`))}}function es(t){var r,c,l;let{setState:e,updateLabelAlpha:n,updateHandAlpha:i,config:a,states:s}=t,o=((c=(r=a.engine)==null?void 0:r.runtime)==null?void 0:c.timeline)||{};e(s.showHook),setTimeout(()=>{n(1),i(1),e(s.waitInput),console.log("[GAME] \u23F3 Game ready for user input - tutorial shown")},(l=o.tutorial_delay_ms)!=null?l:1500)}0&&(module.exports={AssetCache,AssetLoader,AssetSystem,Assets,BaseSystem,GameEngine,GameObject,GameObjectManager,ObjectFactory,Renderer,RuntimeObjectRegistry,SplashScreen,Transform,animateHandClick,animatePanelEntrance,applyScreenAnchor,basePixi,clearResponsiveElements,createEndGamePanel,createHandTutorial,createPixiBase,createTutorialLabel,getRegisteredFontIds,globalResponsiveMultipliers,initAssets,layout,playLottieOverlay,registerFont,registerType,resolveAnchorVec2,resolveFont,resolveFontWeight,resolveScreenAnchorPoint,resolveScreenRatioPoint,runInitSequence,setLottieInstance,updateHandAnimation,updateScreenState});
1
+ (function(_0x4a4a5b,_0x25bc97){var a0_0x50595a={_0x4c9c9f:0x53b,_0x409137:0x53e,_0x21731b:0x541,_0x47567d:0x53c,_0x4bd08d:0x536,_0x3ac1d9:0x531,_0x4b7ae6:0x535,_0xffaa85:0x538,_0x3aa8c9:0x539,_0x2aec74:0x540,_0x354d13:0x53b,_0x138788:0x542,_0x3d47d5:0x531,_0x17c3bf:0x538,_0x3080d8:0x53b,_0xf454b5:0x53d,_0x24ea2b:0x536,_0x4fe9fe:0x534,_0x3c0c8c:0x53c,_0x7a3ec7:0x52b,_0x9607:0x53b,_0xa55437:0x533,_0x158e90:0x185,_0x485a26:0x188,_0x552a0f:0x18f},a0_0x31cad5={_0x2cb92d:0x34e};function _0x526f2e(_0xcc402a,_0x476452,_0x2392ad,_0xdb0cf2){return a0_0x2e10(_0x2392ad-a0_0x31cad5._0x2cb92d,_0xdb0cf2);}function _0x213748(_0x2d8e00,_0xe97d26,_0x4fdea2,_0x25e3a8){return a0_0x2e10(_0xe97d26- -0x36c,_0x2d8e00);}var _0x3a944b=_0x4a4a5b();while(!![]){try{var _0x24c80e=-parseInt(_0x526f2e(0x545,a0_0x50595a._0x4c9c9f,a0_0x50595a._0x409137,a0_0x50595a._0x21731b))/(-0x4ba+-0x3*-0x22b+0x2*-0xe3)+parseInt(_0x526f2e(a0_0x50595a._0x47567d,0x535,a0_0x50595a._0x4bd08d,a0_0x50595a._0x4bd08d))/(0xe9c+-0x52a+-0x970)*(parseInt(_0x526f2e(0x537,a0_0x50595a._0x3ac1d9,a0_0x50595a._0x4b7ae6,a0_0x50595a._0xffaa85))/(0x2182+-0x3ca*0x5+-0x5*0x2e9))+-parseInt(_0x526f2e(a0_0x50595a._0x3aa8c9,0x540,a0_0x50595a._0x2aec74,a0_0x50595a._0x354d13))/(0xe9c+0xbce*0x1+-0x1a66)+parseInt(_0x526f2e(0x538,a0_0x50595a._0x138788,0x53c,0x538))/(0x8*0x278+-0x1029+-0x2*0x1c9)*(parseInt(_0x526f2e(a0_0x50595a._0x3d47d5,0x540,a0_0x50595a._0x17c3bf,0x53d))/(0x2*0x2cb+0x1*-0x52a+-0x66*0x1))+parseInt(_0x526f2e(a0_0x50595a._0x3080d8,0x544,a0_0x50595a._0xf454b5,a0_0x50595a._0x24ea2b))/(0x172*0x7+0x1a2f*-0x1+-0x19c*-0xa)*(-parseInt(_0x526f2e(a0_0x50595a._0x4fe9fe,0x534,a0_0x50595a._0x3aa8c9,a0_0x50595a._0x3c0c8c))/(0x43b+0x3*-0x3b5+0x6ec))+parseInt(_0x526f2e(a0_0x50595a._0x7a3ec7,a0_0x50595a._0x9607,a0_0x50595a._0xa55437,0x535))/(-0x1229*-0x1+-0x17e*-0xd+0x2*-0x12c3)+parseInt(_0x213748(-a0_0x50595a._0x158e90,-a0_0x50595a._0x485a26,-a0_0x50595a._0x552a0f,-0x181))/(0x2b*0xae+-0x8d3+-0x145d);if(_0x24c80e===_0x25bc97)break;else _0x3a944b['push'](_0x3a944b['shift']());}catch(_0x49c1c2){_0x3a944b['push'](_0x3a944b['shift']());}}}(a0_0xab61,-0x5*-0x8555+0x87d4*0x1+0xf3f8));var a0_0x21caee=(function(){var a0_0x4e6f0b={_0x30e093:0x286},_0xd39ca7=!![];return function(_0x3dc38d,_0x190265){var _0x5e442d=_0xd39ca7?function(){function _0x2da5ca(_0x21a501,_0x39876a,_0x3a7d1a,_0x39c91f){return a0_0x2e10(_0x39876a-0x9c,_0x21a501);}if(_0x190265){var _0x54ce29=_0x190265[_0x2da5ca(0x289,0x28d,a0_0x4e6f0b._0x30e093,0x285)](_0x3dc38d,arguments);return _0x190265=null,_0x54ce29;}}:function(){};return _0xd39ca7=![],_0x5e442d;};}()),a0_0x5d429e=a0_0x21caee(this,function(){var a0_0x572f54={_0x3d5611:0x307,_0x8f12e1:0x304,_0x1d4393:0x30b,_0x2cdfb2:0xe5,_0x8bdfa1:0xe5,_0x2b62d6:0xe4,_0xa6bea4:0xe1,_0x1d1384:0xe2,_0x277bb3:0xea,_0x3025bc:0xe8,_0x22b96a:0x305,_0x150b1c:0xf5,_0x4f6c2e:0xee,_0x4769ba:0xe6,_0x5db283:0x30b,_0x187c29:0x30e,_0x7bcd18:0x312,_0x3e71d1:0xf4},_0x3b9321={'vAOck':'(((.+)+)+)'+'+$'};function _0x577549(_0x2c47d1,_0x118476,_0x54bdb6,_0x217676){return a0_0x2e10(_0x217676-0x11f,_0x54bdb6);}function _0x546455(_0x38e4df,_0x30865d,_0x9b7586,_0x297cef){return a0_0x2e10(_0x9b7586- -0x2d7,_0x30865d);}return a0_0x5d429e[_0x577549(a0_0x572f54._0x3d5611,a0_0x572f54._0x3d5611,a0_0x572f54._0x8f12e1,a0_0x572f54._0x1d4393)]()[_0x546455(-a0_0x572f54._0x2cdfb2,-a0_0x572f54._0x8bdfa1,-a0_0x572f54._0x2b62d6,-a0_0x572f54._0xa6bea4)](_0x546455(-a0_0x572f54._0x1d1384,-0xe3,-a0_0x572f54._0x277bb3,-a0_0x572f54._0x3025bc)+'+$')[_0x577549(0x305,0x303,a0_0x572f54._0x22b96a,0x30b)]()[_0x546455(-a0_0x572f54._0x150b1c,-0xf6,-a0_0x572f54._0x4f6c2e,-a0_0x572f54._0x4769ba)+'r'](a0_0x5d429e)[_0x577549(a0_0x572f54._0x5db283,a0_0x572f54._0x187c29,0x317,a0_0x572f54._0x7bcd18)](_0x3b9321[_0x546455(-0xea,-0xe9,-0xf1,-a0_0x572f54._0x3e71d1)]);});a0_0x5d429e();function a0_0x2e10(_0x402d4c,_0x6d644){_0x402d4c=_0x402d4c-(0xdf7*0x1+0x2032+-0x2c45);var _0x5061bd=a0_0xab61();var _0x331c98=_0x5061bd[_0x402d4c];if(a0_0x2e10['FEESuz']===undefined){var _0x21f673=function(_0x45474d){var _0x1557f4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0xba0801='',_0x2b9804='',_0x5d84f9=_0xba0801+_0x21f673;for(var _0x5c5c90=0x1*-0x155+0x2079+-0x1f24,_0x109bdd,_0x2387d3,_0x81cd6f=-0x1351+-0x1fd9+0x332a;_0x2387d3=_0x45474d['charAt'](_0x81cd6f++);~_0x2387d3&&(_0x109bdd=_0x5c5c90%(0x5ed+-0x1297*-0x1+-0x1880)?_0x109bdd*(-0x14da+-0x5b9+0x1ad3)+_0x2387d3:_0x2387d3,_0x5c5c90++%(0x2*-0xaa2+0xce0+-0x10d*-0x8))?_0xba0801+=_0x5d84f9['charCodeAt'](_0x81cd6f+(-0x66*0x33+-0x1fa9+-0x243*-0x17))-(0x9d5+0xd*-0x2ff+0x1d28)!==-0x87+0x1*-0x26c8+0x274f?String['fromCharCode'](-0x2486+-0x19cd+0x3f52&_0x109bdd>>(-(0x11d8+-0x26af+0x14d9)*_0x5c5c90&-0xffd*-0x2+0x4bd+-0x24b1)):_0x5c5c90:0x2a5*-0x3+0x29*-0x49+0x13a0){_0x2387d3=_0x1557f4['indexOf'](_0x2387d3);}for(var _0x33b14d=0x10fc*-0x1+0x9*-0x82+0x158e,_0x582142=_0xba0801['length'];_0x33b14d<_0x582142;_0x33b14d++){_0x2b9804+='%'+('00'+_0xba0801['charCodeAt'](_0x33b14d)['toString'](-0x1e78+0xce9+0x15b*0xd))['slice'](-(-0x2670+0x5*-0x183+-0x1*-0x2e01));}return decodeURIComponent(_0x2b9804);};a0_0x2e10['JdsWub']=_0x21f673,a0_0x2e10['bvNIpX']={},a0_0x2e10['FEESuz']=!![];}var _0x5485e9=_0x5061bd[0x13c+0x1607+0x1743*-0x1],_0x3eb1bd=_0x402d4c+_0x5485e9,_0x542c4e=a0_0x2e10['bvNIpX'][_0x3eb1bd];if(!_0x542c4e){var _0x86d2f9=function(_0x5201fd){this['sqMbUc']=_0x5201fd,this['PCusOD']=[0x1*0x722+-0xb9*0x26+0x1455,-0x8*-0x481+0x251e+0x6*-0xc31,-0x16ca+0x134f+0x37b],this['CooGtm']=function(){return'newState';},this['JSpiHn']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['txzHMb']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x86d2f9['prototype']['wxdpdf']=function(){var _0x3f15bc=new RegExp(this['JSpiHn']+this['txzHMb']),_0x2c3edd=_0x3f15bc['test'](this['CooGtm']['toString']())?--this['PCusOD'][-0x1f7a+0x116d+0xe0e]:--this['PCusOD'][-0x2154+0xa25*-0x3+0x3fc3];return this['VMJnQg'](_0x2c3edd);},_0x86d2f9['prototype']['VMJnQg']=function(_0x2e6876){if(!Boolean(~_0x2e6876))return _0x2e6876;return this['unGzmO'](this['sqMbUc']);},_0x86d2f9['prototype']['unGzmO']=function(_0x87f127){for(var _0x546941=-0x23d3+-0x33*-0x63+0x55e*0x3,_0x3bb3f5=this['PCusOD']['length'];_0x546941<_0x3bb3f5;_0x546941++){this['PCusOD']['push'](Math['round'](Math['random']())),_0x3bb3f5=this['PCusOD']['length'];}return _0x87f127(this['PCusOD'][0x9bd+-0x187d*0x1+-0x40*-0x3b]);},new _0x86d2f9(a0_0x2e10)['wxdpdf'](),_0x331c98=a0_0x2e10['JdsWub'](_0x331c98),a0_0x2e10['bvNIpX'][_0x3eb1bd]=_0x331c98;}else _0x331c98=_0x542c4e;return _0x331c98;}import{A as a0_0x57906d,B as a0_0x5e8796,C as a0_0x38655b,D as a0_0xe2be2d,b as a0_0x32c780,c as a0_0x352999,d as a0_0x4bdd87,e as a0_0x1246ba,f as a0_0x19404b,g as a0_0x5baa79,h as a0_0x5cfe35,i as a0_0x46e9a7,j as a0_0x1d3d6a,k as a0_0x20b682,l as a0_0x3bbf08,m as a0_0x46f442,n as a0_0x13df54,o as a0_0x474156,p as a0_0x20878d,q as a0_0x26cc35,r as a0_0x32e454,s as a0_0x945db5,t as a0_0x44f556,u as a0_0x2b20a4,v as a0_0x269f97,w as a0_0x2b486c,x as a0_0x703026,y as a0_0xa8b5e3,z as a0_0x9a7196}from'../chunk-C2CEUBBT.js';import{a as a0_0x4c4d22,b as a0_0x5b063d,c as a0_0x12dca3,d as a0_0x3f7305,e as a0_0x47c267}from'../chunk-DEUORFXE.js';import'../chunk-DHSGG7NF.js';function a0_0xab61(){var _0x26de6a=['ntmWnZa3mfvmshzysW','mty2nZu4m1Pctevpta','DKfpy2S','mJaZnde4EMvvr1rm','nenJzwnjEq','y29UC3rYDwn0BW','mJuZmJbszM1KCNC','mZC0mZjuvhzoA2O','Dg9tDhjPBMC','kcGOlISPkYKRkq','mZaWDfvrrur3','ndqXsvnZEgnu','mti3odu0EfLzANrL','yxbWBhK','mty1nZeYog9dEezywG','C2vHCMnO'];a0_0xab61=function(){return _0x26de6a;};return a0_0xab61();}import'../chunk-PWGHKK3J.js';import'../chunk-E6WJCS24.js';import'../chunk-Q7FPWOA3.js';export{a0_0x4c4d22 as AssetCache,a0_0x12dca3 as AssetLoader,a0_0x2b20a4 as AssetSystem,a0_0x3f7305 as AssetTextures,a0_0x945db5 as Assets,a0_0x474156 as BaseSystem,a0_0x13df54 as GameEngine,a0_0x1246ba as GameObject,a0_0x19404b as GameObjectManager,a0_0x46f442 as ObjectFactory,a0_0x4bdd87 as Renderer,a0_0x20878d as RuntimeObjectRegistry,a0_0x352999 as Transform,a0_0x5e8796 as applyScreenAnchor,a0_0x26cc35 as basePixi,a0_0x2b486c as clearResponsiveElements,a0_0x32c780 as createPixiBase,a0_0x1d3d6a as getRegisteredFontIds,a0_0x269f97 as globalResponsiveMultipliers,a0_0x47c267 as initAssetTextures,a0_0x44f556 as initAssets,a0_0x38655b as layout,a0_0x3bbf08 as playLottieOverlay,a0_0x46e9a7 as registerFont,a0_0x5b063d as registerType,a0_0xa8b5e3 as resolveAnchorVec2,a0_0x5baa79 as resolveFont,a0_0x5cfe35 as resolveFontWeight,a0_0x9a7196 as resolveScreenAnchorPoint,a0_0x57906d as resolveScreenRatioPoint,a0_0xe2be2d as runInitSequence,a0_0x20b682 as setLottieInstance,a0_0x32e454 as spawnSceneFromConfig,a0_0x703026 as updateScreenState};