handler-playable-sdk 1.0.81 → 1.0.83

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 (46) hide show
  1. package/dist/{ConfigOverride-V7DLPL5I.js → ConfigOverride-XECG7H5B.js} +1 -1
  2. package/dist/chunk-EFRB44UC.js +1 -0
  3. package/dist/{chunk-PW2FGMCO.js → chunk-GVZ2445E.js} +1 -1
  4. package/dist/{chunk-XRNPUYEG.js → chunk-R2YB6RWS.js} +184 -176
  5. package/dist/cli/brand-dna.mjs +1 -1
  6. package/dist/cli/canva-import.mjs +1 -1
  7. package/dist/cli/cleanup-assets.mjs +1 -1
  8. package/dist/cli/fix-scales.mjs +1 -1
  9. package/dist/cli/index.js +1 -1
  10. package/dist/cli/screen-helper.mjs +1 -1
  11. package/dist/cli/setup-library.mjs +1 -1
  12. package/dist/cli/student-helper/add-logic.mjs +1 -1
  13. package/dist/cli/student-helper/add-object.mjs +1 -1
  14. package/dist/cli/student-helper/arg-parsing.mjs +1 -1
  15. package/dist/cli/student-helper/asset-registry.mjs +1 -1
  16. package/dist/cli/student-helper/bullet-system.mjs +1 -1
  17. package/dist/cli/student-helper/collectable-system.mjs +1 -1
  18. package/dist/cli/student-helper/constants.mjs +1 -1
  19. package/dist/cli/student-helper/drag-snap-couples.mjs +1 -1
  20. package/dist/cli/student-helper/endgame-screen.mjs +1 -1
  21. package/dist/cli/student-helper/fs-io.mjs +1 -1
  22. package/dist/cli/student-helper/logic-defaults.mjs +1 -1
  23. package/dist/cli/student-helper/print-help.mjs +1 -1
  24. package/dist/cli/student-helper/prompts.mjs +1 -1
  25. package/dist/cli/student-helper/scratch-card.mjs +1 -1
  26. package/dist/cli/student-helper/screen-utils.mjs +1 -1
  27. package/dist/cli/student-helper/snippets.mjs +1 -1
  28. package/dist/cli/student-helper/start-screen.mjs +1 -1
  29. package/dist/cli/student-helper/swerve-collect.mjs +1 -1
  30. package/dist/cli/student-helper/tap-destroy.mjs +1 -1
  31. package/dist/cli/student-helper/template-packs.mjs +1 -1
  32. package/dist/cli/student-helper.mjs +1 -1
  33. package/dist/cli/sync-screens.mjs +1 -1
  34. package/dist/cli/validate-assets.mjs +1 -1
  35. package/dist/cli/validate.mjs +1 -1
  36. package/dist/{config-3JDCJ3GB.js → config-TFSKV7GO.js} +1 -1
  37. package/dist/index.cjs +229 -221
  38. package/dist/index.d.cts +2 -0
  39. package/dist/index.d.ts +2 -0
  40. package/dist/index.js +1 -1
  41. package/dist/pixi/index.cjs +16 -16
  42. package/dist/pixi/index.js +1 -1
  43. package/dist/three/index.cjs +1 -1
  44. package/dist/three/index.js +1 -1
  45. package/package.json +1 -1
  46. package/dist/chunk-HVKF2KYL.js +0 -1
@@ -1 +1 @@
1
- (function(_0x2706e8,_0x558837){var a0_0x15ede2={_0x156810:0x456,_0x2da795:'!pwb',_0x386550:0x437,_0x31b4c6:0x448,_0x27e29f:'RD90',_0x508a54:0x268,_0x34f96d:0x25a,_0x1b0e2:0x251,_0x42c9f7:0x250,_0x2e1a84:'Is^K',_0x52cf99:0x1e2,_0x133005:0x1e7,_0x19a706:0x1ed,_0x2970c1:0x1ee,_0x47d433:0x25c,_0x5d339b:0x254,_0x162202:0x24a,_0x13119c:0x25b,_0x1474d9:0x44e,_0x174c1d:0x44f,_0x5c81b9:0x445,_0x119077:0x441,_0x4bcc4e:'LOwb',_0x37159a:0x435,_0x22391e:0x443,_0xf3c74f:0x44b,_0x2799e9:'y**(',_0x4eeaa7:0x253,_0x222ab4:0x259,_0x208d8c:0x248,_0xe0d539:'Wyek',_0x4eed55:0x235,_0x4bb0a9:0x23f,_0x29da6d:0x235,_0x331b06:0x449,_0x5322a2:'Is^K',_0x25f9ea:0x440,_0x2db1ab:0x44b,_0x83a4b6:0x444,_0x31b501:0x452,_0x46a7b1:0x458,_0xc47dfa:'S!f$',_0x46aaef:0x1ea,_0x451961:0x1ec,_0x43c8ba:0x1fb,_0x1a3b1a:0x1f1},a0_0x32ff64={_0xb133fe:0x2ec},a0_0x302e3b={_0x3a01b2:0x13a};function _0x406b7d(_0xbee55c,_0x1c235a,_0x38417c,_0x4cc587,_0x21788b){return a0_0x4bf4(_0x4cc587-0x3af,_0x1c235a);}function _0xc5412d(_0x23dcb0,_0x57d857,_0x5387a1,_0x5b7c2e,_0x3ba574){return a0_0x4bf4(_0x57d857-a0_0x302e3b._0x3a01b2,_0x23dcb0);}var _0x234f5a=_0x2706e8();function _0x52d685(_0x4aff49,_0x2f9682,_0x35ab76,_0x55cb29,_0x55b762){return a0_0x4bf4(_0x35ab76- -a0_0x32ff64._0xb133fe,_0x4aff49);}while(!![]){try{var _0x3d1873=parseInt(_0x406b7d(a0_0x15ede2._0x156810,a0_0x15ede2._0x2da795,a0_0x15ede2._0x386550,a0_0x15ede2._0x31b4c6,0x454))/(-0x7*0x139+0x243*-0x1+0xa3*0x11)*(parseInt(_0x52d685(a0_0x15ede2._0x27e29f,-a0_0x15ede2._0x508a54,-a0_0x15ede2._0x34f96d,-a0_0x15ede2._0x1b0e2,-a0_0x15ede2._0x42c9f7))/(0x14aa+-0x1755+0x2ad))+parseInt(_0xc5412d(a0_0x15ede2._0x2e1a84,a0_0x15ede2._0x52cf99,a0_0x15ede2._0x133005,a0_0x15ede2._0x19a706,a0_0x15ede2._0x2970c1))/(0xe5+-0x55*-0x6f+-0x1*0x25bd)*(-parseInt(_0x52d685('Mh2h',-a0_0x15ede2._0x47d433,-a0_0x15ede2._0x5d339b,-a0_0x15ede2._0x162202,-a0_0x15ede2._0x13119c))/(-0x1c32+0x2255+-0x1*0x61f))+parseInt(_0x406b7d(a0_0x15ede2._0x1474d9,'y!z9',a0_0x15ede2._0x174c1d,a0_0x15ede2._0x5c81b9,0x451))/(-0x1*-0x1cf3+-0x18f6+-0x3f8)*(parseInt(_0x406b7d(a0_0x15ede2._0x119077,a0_0x15ede2._0x4bcc4e,a0_0x15ede2._0x37159a,a0_0x15ede2._0x22391e,a0_0x15ede2._0xf3c74f))/(-0x2bf+0x114e+-0x3d*0x3d))+-parseInt(_0x52d685(a0_0x15ede2._0x2799e9,-a0_0x15ede2._0x4eeaa7,-a0_0x15ede2._0x162202,-a0_0x15ede2._0x222ab4,-a0_0x15ede2._0x208d8c))/(-0x323+-0x172b+0x1a55)+-parseInt(_0x52d685(a0_0x15ede2._0xe0d539,-a0_0x15ede2._0x4eed55,-a0_0x15ede2._0x4bb0a9,-a0_0x15ede2._0x29da6d,-0x250))/(0x1a42+-0x1*0x17c9+0x5*-0x7d)+parseInt(_0x406b7d(a0_0x15ede2._0x331b06,a0_0x15ede2._0x5322a2,a0_0x15ede2._0x25f9ea,a0_0x15ede2._0x2db1ab,0x43d))/(-0x34d*-0x6+0x465+-0x182a*0x1)+-parseInt(_0x406b7d(a0_0x15ede2._0x83a4b6,'6om@',a0_0x15ede2._0x156810,a0_0x15ede2._0x31b501,a0_0x15ede2._0x46a7b1))/(-0x7a5+0xcb*0x14+-0x82d)*(-parseInt(_0xc5412d(a0_0x15ede2._0xc47dfa,a0_0x15ede2._0x46aaef,a0_0x15ede2._0x451961,a0_0x15ede2._0x43c8ba,a0_0x15ede2._0x1a3b1a))/(-0x9e4+0x83*0x3b+0x2*-0xa21));if(_0x3d1873===_0x558837)break;else _0x234f5a['push'](_0x234f5a['shift']());}catch(_0x1aad2b){_0x234f5a['push'](_0x234f5a['shift']());}}}(a0_0x2b01,-0x5b*-0xe61+-0x1*-0x10d17+-0x38c69));var a0_0x4b6ec9=(function(){var a0_0x5cd115={_0x3d5c13:0xfb,_0x3d1f95:0x103,_0x1976ef:0xfd,_0x37632b:0x10b,_0x2b7de4:'6om@'},_0x11ed55=!![];return function(_0x1b91a9,_0x4ad331){var _0x1a1df1=_0x11ed55?function(){function _0x42f8c9(_0x4dc597,_0x39d8bb,_0x59196f,_0x5740ec,_0x5127ef){return a0_0x4bf4(_0x39d8bb- -0x1a0,_0x5127ef);}if(_0x4ad331){var _0x3fecbe=_0x4ad331[_0x42f8c9(-a0_0x5cd115._0x3d5c13,-a0_0x5cd115._0x3d1f95,-a0_0x5cd115._0x1976ef,-a0_0x5cd115._0x37632b,a0_0x5cd115._0x2b7de4)](_0x1b91a9,arguments);return _0x4ad331=null,_0x3fecbe;}}:function(){};return _0x11ed55=![],_0x1a1df1;};}()),a0_0x5c6980=a0_0x4b6ec9(this,function(){var a0_0xacb50c={_0x561fad:0x333,_0x16dfdf:'UTRq',_0xe3165b:0x33b,_0x41ab6f:0x341,_0x314b5d:0x48e,_0x1283ff:'s(Mi',_0x290988:0x480,_0x476191:0x337,_0x1597ae:0x328,_0x3b94d2:0x33c,_0x16e3c2:0x34a,_0x410fa5:'EeD&',_0x16ce2d:0x341,_0x455cf9:0x335,_0x448754:0x47e,_0x2429b8:'Mgnu',_0x417c4d:0x485,_0x342577:0x1f,_0x3146c1:0x26,_0x200688:0x1e,_0x18bbf1:0x47c,_0xe3937a:0x480,_0x19f559:'qFVf',_0x1e54d2:0x471,_0x20b483:'GMTM',_0x270516:0x28,_0x15a91e:0x20,_0x146506:'8%p[',_0x5be62c:0x29,_0x3d473e:0x29,_0x50fa57:0x21,_0x259a2f:'GMTM',_0x53aec9:0x34,_0x205c9f:0x1a,_0x4d79cd:0x24,_0x36ca10:0x33,_0x47cf91:0x476,_0x53bf4e:0x487,_0x4da9a5:0x475,_0x4153b3:'Y5ek',_0x39c6c0:0x339,_0x382092:'RD90',_0x1b48eb:0x322,_0x2459cd:0x1b,_0x9f8572:0xf},a0_0x31ff71={_0x40ce23:0xc4},a0_0x33828a={_0x3bf1ff:0x298};function _0x1eaaa0(_0x4501f8,_0x32a637,_0x1dd03a,_0x163a7f,_0x2454da){return a0_0x4bf4(_0x4501f8-a0_0x33828a._0x3bf1ff,_0x1dd03a);}var _0x413d43={};function _0x282890(_0x1d5055,_0x4b3d8b,_0x15abc0,_0x469260,_0x813f77){return a0_0x4bf4(_0x469260- -a0_0x31ff71._0x40ce23,_0x1d5055);}_0x413d43[_0x1eaaa0(0x342,a0_0xacb50c._0x561fad,a0_0xacb50c._0x16dfdf,a0_0xacb50c._0xe3165b,a0_0xacb50c._0x41ab6f)]='(((.+'+_0x10e7c0(a0_0xacb50c._0x314b5d,0x48e,0x480,a0_0xacb50c._0x1283ff,a0_0xacb50c._0x290988)+'+$';var _0xb86b13=_0x413d43;function _0x10e7c0(_0x41c1c2,_0x24235f,_0xd006b2,_0x1553e1,_0x1df666){return a0_0x4bf4(_0x41c1c2-0x3e5,_0x1553e1);}return a0_0x5c6980[_0x1eaaa0(a0_0xacb50c._0x476191,a0_0xacb50c._0x1597ae,'a)FA',a0_0xacb50c._0x41ab6f,0x32c)+_0x1eaaa0(a0_0xacb50c._0x3b94d2,a0_0xacb50c._0x16e3c2,a0_0xacb50c._0x410fa5,a0_0xacb50c._0x16ce2d,a0_0xacb50c._0x455cf9)]()[_0x10e7c0(0x48b,0x496,a0_0xacb50c._0x448754,a0_0xacb50c._0x2429b8,a0_0xacb50c._0x417c4d)+'h'](_0x282890('G5zR',-a0_0xacb50c._0x342577,-a0_0xacb50c._0x3146c1,-a0_0xacb50c._0x3146c1,-a0_0xacb50c._0x200688)+_0x10e7c0(a0_0xacb50c._0x18bbf1,a0_0xacb50c._0xe3937a,0x477,a0_0xacb50c._0x19f559,a0_0xacb50c._0x1e54d2)+'+$')[_0x282890(a0_0xacb50c._0x20b483,-a0_0xacb50c._0x270516,-0x25,-0x19,-a0_0xacb50c._0x15a91e)+_0x282890(a0_0xacb50c._0x146506,-a0_0xacb50c._0x5be62c,-a0_0xacb50c._0x3d473e,-0x23,-a0_0xacb50c._0x50fa57)]()[_0x282890(a0_0xacb50c._0x259a2f,-a0_0xacb50c._0x53aec9,-a0_0xacb50c._0x205c9f,-a0_0xacb50c._0x4d79cd,-a0_0xacb50c._0x36ca10)+_0x10e7c0(a0_0xacb50c._0x47cf91,a0_0xacb50c._0x53bf4e,a0_0xacb50c._0x4da9a5,a0_0xacb50c._0x4153b3,0x46b)+'r'](a0_0x5c6980)[_0x1eaaa0(0x32b,a0_0xacb50c._0x39c6c0,a0_0xacb50c._0x382092,a0_0xacb50c._0x1b48eb,0x32d)+'h'](_0xb86b13[_0x282890('Mgnu',-a0_0xacb50c._0x2459cd,-0x23,-0x15,-a0_0xacb50c._0x9f8572)]);});function a0_0x4bf4(_0xd46818,_0x5996d4){_0xd46818=_0xd46818-(-0x2252+0x4c*0x20+0x1962);var _0x119c46=a0_0x2b01();var _0x251e1b=_0x119c46[_0xd46818];if(a0_0x4bf4['pAUAJg']===undefined){var _0x568a40=function(_0x2b95e1){var _0x13fd31='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x801624='',_0x2c562e='',_0x44cf69=_0x801624+_0x568a40;for(var _0x142534=-0x1*0x232f+0x1274+0x10bb,_0xd02142,_0x3f47fb,_0x1a5eef=-0x106c+0x4fa+0x2*0x5b9;_0x3f47fb=_0x2b95e1['charAt'](_0x1a5eef++);~_0x3f47fb&&(_0xd02142=_0x142534%(0x1645+0xb2d*-0x1+-0x2*0x58a)?_0xd02142*(0xd4+0xe36+-0xeca)+_0x3f47fb:_0x3f47fb,_0x142534++%(0xb*-0x4+0xb9e+0x4d*-0x26))?_0x801624+=_0x44cf69['charCodeAt'](_0x1a5eef+(-0x31*0x65+-0x204d+0x19d6*0x2))-(0x716+0x202b+0x1*-0x2737)!==0xd49+-0x1e57+0x110e?String['fromCharCode'](0x8*0x7d+-0x135*-0x15+-0x1*0x1c42&_0xd02142>>(-(0x1a83+0x156a+-0x1a7*0x1d)*_0x142534&-0x3*0xc9+-0x219+0x1*0x47a)):_0x142534:-0xcb0*-0x3+0x1*-0x4b1+-0x215f){_0x3f47fb=_0x13fd31['indexOf'](_0x3f47fb);}for(var _0x2bdc2d=-0x3*0xb2b+0x1*0x165f+-0x3*-0x3b6,_0x13698e=_0x801624['length'];_0x2bdc2d<_0x13698e;_0x2bdc2d++){_0x2c562e+='%'+('00'+_0x801624['charCodeAt'](_0x2bdc2d)['toString'](-0x161*-0x12+0xca2+-0x2564))['slice'](-(0x1ef9+0xdae*-0x1+-0x1149));}return decodeURIComponent(_0x2c562e);};var _0x493396=function(_0x9759fc,_0x13afb2){var _0x67ac7e=[],_0x4fbc20=-0xee*-0x1b+-0x3*-0xc1f+-0x147d*0x3,_0x12a8cc,_0x219f42='';_0x9759fc=_0x568a40(_0x9759fc);var _0x39d6a1;for(_0x39d6a1=-0x6*-0x523+-0x1*0x1843+0x49*-0x17;_0x39d6a1<-0x2617*-0x1+-0x52f*0x6+0x3*-0x1ff;_0x39d6a1++){_0x67ac7e[_0x39d6a1]=_0x39d6a1;}for(_0x39d6a1=0x21*-0x7b+0x2*0x7eb+-0x5*-0x1;_0x39d6a1<-0xf33+-0x2*0xc31+0x3*0xd87;_0x39d6a1++){_0x4fbc20=(_0x4fbc20+_0x67ac7e[_0x39d6a1]+_0x13afb2['charCodeAt'](_0x39d6a1%_0x13afb2['length']))%(-0xcd*0x25+-0x8*0x41c+0x3f81),_0x12a8cc=_0x67ac7e[_0x39d6a1],_0x67ac7e[_0x39d6a1]=_0x67ac7e[_0x4fbc20],_0x67ac7e[_0x4fbc20]=_0x12a8cc;}_0x39d6a1=0x5*0x21e+0x7*0xe9+-0x10f5*0x1,_0x4fbc20=-0x2*0xb4c+-0x101*0x25+-0x175*-0x29;for(var _0x250361=-0x58b+-0x120c+0x1797;_0x250361<_0x9759fc['length'];_0x250361++){_0x39d6a1=(_0x39d6a1+(-0x536+0x1*0xd51+-0x81a))%(0x8*0x3cc+-0x93f*0x3+-0x1a3*0x1),_0x4fbc20=(_0x4fbc20+_0x67ac7e[_0x39d6a1])%(0xeef+-0x76c+0x1*-0x683),_0x12a8cc=_0x67ac7e[_0x39d6a1],_0x67ac7e[_0x39d6a1]=_0x67ac7e[_0x4fbc20],_0x67ac7e[_0x4fbc20]=_0x12a8cc,_0x219f42+=String['fromCharCode'](_0x9759fc['charCodeAt'](_0x250361)^_0x67ac7e[(_0x67ac7e[_0x39d6a1]+_0x67ac7e[_0x4fbc20])%(0x25e+0x412+-0x570)]);}return _0x219f42;};a0_0x4bf4['YTdrha']=_0x493396,a0_0x4bf4['UKkTtM']={},a0_0x4bf4['pAUAJg']=!![];}var _0x2b9887=_0x119c46[0x15*0x56+-0xf96+-0x1a*-0x54],_0x530556=_0xd46818+_0x2b9887,_0x113913=a0_0x4bf4['UKkTtM'][_0x530556];if(!_0x113913){if(a0_0x4bf4['BSXMbe']===undefined){var _0x4ba40b=function(_0x40d34a){this['RagoTs']=_0x40d34a,this['zMOYAo']=[-0x1885+-0x11e8+0x2a6e,-0x119*0x1+-0x1904*0x1+0x1a1d,-0x225c+0x2a*-0x2f+0x1509*0x2],this['SZQRgE']=function(){return'newState';},this['iQQUOA']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['iJZsgW']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x4ba40b['prototype']['gFVJwE']=function(){var _0x47dcce=new RegExp(this['iQQUOA']+this['iJZsgW']),_0x350de2=_0x47dcce['test'](this['SZQRgE']['toString']())?--this['zMOYAo'][-0x12ef*-0x2+-0x290*-0x1+-0x286d]:--this['zMOYAo'][-0x243+0x16bf*0x1+0x5c*-0x39];return this['jjZrjO'](_0x350de2);},_0x4ba40b['prototype']['jjZrjO']=function(_0x3026aa){if(!Boolean(~_0x3026aa))return _0x3026aa;return this['FCCpGq'](this['RagoTs']);},_0x4ba40b['prototype']['FCCpGq']=function(_0x9ed394){for(var _0x1d52bd=0x14aa+-0x1755+0x2ab,_0x44fb7a=this['zMOYAo']['length'];_0x1d52bd<_0x44fb7a;_0x1d52bd++){this['zMOYAo']['push'](Math['round'](Math['random']())),_0x44fb7a=this['zMOYAo']['length'];}return _0x9ed394(this['zMOYAo'][0xe5+-0x55*-0x6f+-0x4*0x970]);},new _0x4ba40b(a0_0x4bf4)['gFVJwE'](),a0_0x4bf4['BSXMbe']=!![];}_0x251e1b=a0_0x4bf4['YTdrha'](_0x251e1b,_0x5996d4),a0_0x4bf4['UKkTtM'][_0x530556]=_0x251e1b;}else _0x251e1b=_0x113913;return _0x251e1b;}a0_0x5c6980();function a0_0x2b01(){var _0x53dfd5=['W6iVawJdTCouW5ZcRhu7uXy','mHRdQSkDfmoJtCoaAYpcPmoMwq','WQrwW7/dKmk7WPlcJ8kkAtTZ','WQK8W6/dICov','W6bWw8kbyCoAt8kc','WQiLumksBG','W4BcHCk4oCkios/cPmk6mCkF','f8k2a27cHSoEW5KxgGGP','WPZdPcO9W7THqe/dKa','qqxdRx7dGG','muSMgmkNvCoRFSkJDarY','arb9W6dcJSoKwJhcT8kfW7S','fKHgmthdGs3dUW','hhhdSHhdG8ojWQddK8kIW7mmWRu','W6KpWPldH8kCjSkWqhBcTJJdRW','W7avWRZcHmo0','rhxdQeRcUG','W5/cQSokW4HD','d8o+WQikW5W','oSoGrG','WPFcV3LuwmkBnG9BW5VdINq','WQzvWRNcICoCWOxcQ8kx','AuhcUW','q8oZzs/dImosW7WioSktW5rr','uH1siGm','q8korCk+i0SyW7JdOmkshmoG','W6jLW6hcKCo+D8kO','WRGqWQZcUCke','wcqxeSo5','gmo+WP8nW5O','hh7dTCoMW4/cLmkgvq','W4m8W5BcSCoiqwpcPX3cHmorW54q','WQjIW4pdSmo4W5tcJW','uY1cosW'];a0_0x2b01=function(){return _0x53dfd5;};return a0_0x2b01();}import{A as a0_0x4a7daa,B as a0_0x4e53b4,C as a0_0x5c1184,D as a0_0x4a05df,b as a0_0x101ceb,c as a0_0x382640,d as a0_0x28892c,e as a0_0x57c6e1,f as a0_0xb2b3ef,g as a0_0x554d99,h as a0_0x12136b,i as a0_0x385230,j as a0_0x22a4fc,k as a0_0x42cea9,l as a0_0x2b8154,m as a0_0x531f3c,n as a0_0x48a1fe,o as a0_0x5e2de5,p as a0_0x9bab04,q as a0_0x4407e7,r as a0_0x6062c3,s as a0_0x5c0bf3,t as a0_0x11e69c,u as a0_0x32ffa7,v as a0_0x386312,w as a0_0x1c5649,x as a0_0x430444,y as a0_0x467d0b,z as a0_0x423bdb}from'../chunk-XRNPUYEG.js';import{a as a0_0x515969,b as a0_0x3bd281,c as a0_0x3256ed,d as a0_0x937ccf,e as a0_0x1d234a}from'../chunk-I5OOVR5U.js';import'../chunk-PW2FGMCO.js';import'../chunk-HVKF2KYL.js';import'../chunk-E6WJCS24.js';import'../chunk-JXBG6UFL.js';export{a0_0x515969 as AssetCache,a0_0x3256ed as AssetLoader,a0_0x32ffa7 as AssetSystem,a0_0x937ccf as AssetTextures,a0_0x5c0bf3 as Assets,a0_0x5e2de5 as BaseSystem,a0_0x48a1fe as GameEngine,a0_0x57c6e1 as GameObject,a0_0xb2b3ef as GameObjectManager,a0_0x531f3c as ObjectFactory,a0_0x28892c as Renderer,a0_0x9bab04 as RuntimeObjectRegistry,a0_0x382640 as Transform,a0_0x4e53b4 as applyScreenAnchor,a0_0x4407e7 as basePixi,a0_0x1c5649 as clearResponsiveElements,a0_0x101ceb as createPixiBase,a0_0x22a4fc as getRegisteredFontIds,a0_0x386312 as globalResponsiveMultipliers,a0_0x1d234a as initAssetTextures,a0_0x11e69c as initAssets,a0_0x5c1184 as layout,a0_0x2b8154 as playLottieOverlay,a0_0x385230 as registerFont,a0_0x3bd281 as registerType,a0_0x467d0b as resolveAnchorVec2,a0_0x554d99 as resolveFont,a0_0x12136b as resolveFontWeight,a0_0x423bdb as resolveScreenAnchorPoint,a0_0x4a7daa as resolveScreenRatioPoint,a0_0x4a05df as runInitSequence,a0_0x42cea9 as setLottieInstance,a0_0x6062c3 as spawnSceneFromConfig,a0_0x430444 as updateScreenState};
1
+ (function(_0x82f243,_0x3327ca){var a0_0x110b6e={_0x58c3f6:0x25d,_0x541f60:0x26b,_0x5d1ac1:'6IRt',_0x12283f:0x254,_0x55f21c:0x264,_0x4a6b05:0x259,_0x30d7d6:'aPq!',_0xc04254:0x72,_0x3c4d35:0x5e,_0x27374e:'Eihe',_0x9d7951:0x28b,_0x3596ac:0x278,_0x308905:0x288,_0x19a0d2:0x295,_0x28ce1a:0x61,_0x1246e4:'P!Gw',_0xbb253:0x66,_0x485efe:0x52,_0x42b980:'nS#]',_0x5a4356:0x298,_0x18b0f7:0x291,_0xb0b6c2:0x287,_0x4d745d:0x72,_0x53e26e:0x7e,_0x3747bb:0x85,_0x3b423f:'dBb2',_0x19345e:0x271,_0x178b2a:0x288,_0x5a0958:0x27f,_0x30168f:'$25I',_0x6a8f75:0x255,_0x45bdf4:0x251,_0xba8b9d:0x25d,_0x51205b:0x262,_0x27e743:0x271,_0x4fe494:0x26a,_0x38ae52:0x26d,_0x10fcb4:0x267,_0x4a15c4:'MESu',_0x35054a:0x278,_0x4bab8a:0x26c,_0x2ac512:0x274,_0x162386:0x281},a0_0x59d1dc={_0x27f171:0x10c},a0_0x4a0f={_0x382fb9:0x10a};function _0x3e9d75(_0x1ce6e0,_0x3699f6,_0x187ceb,_0x50771a,_0x26bad0){return a0_0x175c(_0x26bad0-0xe5,_0x1ce6e0);}var _0x5caacb=_0x82f243();function _0x5c989a(_0x36585a,_0x3ad6cd,_0xae2b9d,_0x2e2f5a,_0x238237){return a0_0x175c(_0x36585a- -a0_0x4a0f._0x382fb9,_0x3ad6cd);}function _0x15ad60(_0x10c543,_0x59b7c9,_0x51990c,_0x3f9a4f,_0x15efa3){return a0_0x175c(_0x3f9a4f-a0_0x59d1dc._0x27f171,_0x10c543);}while(!![]){try{var _0x3d5404=-parseInt(_0x3e9d75('wklG',0x25d,0x26a,a0_0x110b6e._0x58c3f6,a0_0x110b6e._0x541f60))/(0x1*-0x263f+-0x9d*0x4+0x28b4)*(parseInt(_0x3e9d75(a0_0x110b6e._0x5d1ac1,a0_0x110b6e._0x12283f,a0_0x110b6e._0x55f21c,a0_0x110b6e._0x4a6b05,0x253))/(-0x146f*0x1+-0x1467+0x28d8))+parseInt(_0x5c989a(0x6b,a0_0x110b6e._0x30d7d6,a0_0x110b6e._0xc04254,0x65,a0_0x110b6e._0x3c4d35))/(0x9c+0x1433+-0x14cc)*(parseInt(_0x15ad60(a0_0x110b6e._0x27374e,a0_0x110b6e._0x9d7951,a0_0x110b6e._0x3596ac,a0_0x110b6e._0x308905,a0_0x110b6e._0x19a0d2))/(-0xf95*-0x1+0x17d*0x7+-0x67f*0x4))+parseInt(_0x5c989a(a0_0x110b6e._0x28ce1a,a0_0x110b6e._0x1246e4,0x62,a0_0x110b6e._0xbb253,a0_0x110b6e._0x485efe))/(0x414+0x17e1+0xc*-0x254)+-parseInt(_0x15ad60(a0_0x110b6e._0x42b980,0x287,a0_0x110b6e._0x5a4356,a0_0x110b6e._0x18b0f7,a0_0x110b6e._0xb0b6c2))/(-0x1846+0x7*-0x1d4+0x1*0x2518)+parseInt(_0x5c989a(0x74,'(Rpn',a0_0x110b6e._0x4d745d,a0_0x110b6e._0x53e26e,a0_0x110b6e._0x3747bb))/(0x525*0x2+0x33*-0x3b+0x17e)*(-parseInt(_0x15ad60(a0_0x110b6e._0x3b423f,a0_0x110b6e._0x19345e,a0_0x110b6e._0x178b2a,a0_0x110b6e._0x5a0958,0x276))/(0x1*0x1481+-0x1ca8+-0x82f*-0x1))+parseInt(_0x3e9d75(a0_0x110b6e._0x30168f,a0_0x110b6e._0x6a8f75,a0_0x110b6e._0x45bdf4,a0_0x110b6e._0xba8b9d,a0_0x110b6e._0x51205b))/(0x2bc+0x253e+-0x27f1)+parseInt(_0x3e9d75('JVu^',a0_0x110b6e._0x27e743,a0_0x110b6e._0x4fe494,a0_0x110b6e._0x38ae52,a0_0x110b6e._0x10fcb4))/(-0x159e*-0x1+0xb*0x35b+-0x3a7d)*(parseInt(_0x15ad60(a0_0x110b6e._0x4a15c4,a0_0x110b6e._0x35054a,a0_0x110b6e._0x4bab8a,a0_0x110b6e._0x2ac512,a0_0x110b6e._0x162386))/(-0x10c7+0x173a+-0x668));if(_0x3d5404===_0x3327ca)break;else _0x5caacb['push'](_0x5caacb['shift']());}catch(_0x1aa3f1){_0x5caacb['push'](_0x5caacb['shift']());}}}(a0_0x478a,-0x7cd61+0x16a37+0x13d2bb));var a0_0x58c7e4=(function(){var a0_0x564f01={_0x5526e1:0x215,_0x3a2b82:0x20d,_0x20b6de:0x21c},_0x3ef9f6=!![];return function(_0x19eb0a,_0x2b4576){var a0_0x1114fb={_0x1a2fe8:0xae},_0x313da8=_0x3ef9f6?function(){function _0x51f67f(_0x7c959,_0x13a8d2,_0x4240bf,_0x13c137,_0x33fb54){return a0_0x175c(_0x7c959-a0_0x1114fb._0x1a2fe8,_0x13c137);}if(_0x2b4576){var _0x580a5a=_0x2b4576[_0x51f67f(a0_0x564f01._0x5526e1,a0_0x564f01._0x3a2b82,0x215,'@[Nu',a0_0x564f01._0x20b6de)](_0x19eb0a,arguments);return _0x2b4576=null,_0x580a5a;}}:function(){};return _0x3ef9f6=![],_0x313da8;};}()),a0_0x1a306d=a0_0x58c7e4(this,function(){var a0_0x59f3a8={_0x5bcb47:'Lf!2',_0x25e06c:0x300,_0x2a7ef2:0x301,_0x3792a8:0x306,_0x36fa48:0x2e9,_0x132ffd:0x2f6,_0x193914:0x3a5,_0x4970bf:0x395,_0x90329d:'JSoz',_0x516945:0x3a2,_0x34aa0c:0x394,_0x151ec9:0x3a4,_0x522214:'B*%5',_0x23c1a2:0x2fa,_0x3e8b81:0x2f8,_0x2411f8:0x2fc,_0x3c572d:0x38e,_0x46f889:0x389,_0x2d2e83:'8]FY',_0x34329b:0x2ff,_0x550fd4:0x301,_0x4b13e4:0x4d9,_0x217d75:'p0Cw',_0x46c856:0x4ef,_0x267d96:0x38d,_0x1f6c60:0x39b,_0x472537:0x393,_0x1539f1:'Q(U8',_0x2c2cf9:0x30e,_0x249522:0x312,_0x5d5d23:0x309,_0x49b96f:0x4e3,_0x230edd:'Bj!C',_0x127ef8:0x4ec,_0x1d55c0:0x4ec,_0xc1695a:0x4f0,_0x83592b:'@*Rq',_0x131ab1:0x301,_0x3c5b67:0x2f5,_0x52de5e:0x3a0,_0x4c2660:0x3ab,_0x1b6f57:0x39c,_0x2223d0:'gtMT'},a0_0x529c3d={_0x5a452d:0x22a},a0_0xc0eec7={_0x328371:0x189},_0x96937d={};function _0x1b9bb4(_0x1125fe,_0x55255d,_0x392c09,_0x2ac453,_0x5c7147){return a0_0x175c(_0x2ac453-a0_0xc0eec7._0x328371,_0x1125fe);}_0x96937d[_0x1b9bb4(a0_0x59f3a8._0x5bcb47,a0_0x59f3a8._0x25e06c,a0_0x59f3a8._0x2a7ef2,0x2ff,a0_0x59f3a8._0x3792a8)]=_0x1b9bb4('Rukb',0x2f8,a0_0x59f3a8._0x36fa48,a0_0x59f3a8._0x132ffd,a0_0x59f3a8._0x132ffd)+_0x471099(a0_0x59f3a8._0x193914,a0_0x59f3a8._0x4970bf,0x39e,0x3a5,a0_0x59f3a8._0x90329d)+'+$';function _0x27b823(_0x11c525,_0x1d03f7,_0x2d6e34,_0x1f235a,_0x37adb6){return a0_0x175c(_0x1f235a-0x36d,_0x1d03f7);}var _0x5a4ae2=_0x96937d;function _0x471099(_0x5cb56d,_0x1a95da,_0x1ce259,_0x539e7b,_0x12c3d8){return a0_0x175c(_0x1ce259-a0_0x529c3d._0x5a452d,_0x12c3d8);}return a0_0x1a306d[_0x471099(a0_0x59f3a8._0x516945,a0_0x59f3a8._0x34aa0c,a0_0x59f3a8._0x151ec9,0x39d,'sqHp')+_0x1b9bb4(a0_0x59f3a8._0x522214,a0_0x59f3a8._0x23c1a2,0x2fd,a0_0x59f3a8._0x3e8b81,a0_0x59f3a8._0x2411f8)]()['searc'+'h'](_0x5a4ae2[_0x471099(a0_0x59f3a8._0x3c572d,a0_0x59f3a8._0x46f889,0x396,0x386,a0_0x59f3a8._0x2d2e83)])[_0x1b9bb4('$25I',a0_0x59f3a8._0x34329b,a0_0x59f3a8._0x550fd4,a0_0x59f3a8._0x25e06c,a0_0x59f3a8._0x25e06c)+_0x27b823(a0_0x59f3a8._0x4b13e4,a0_0x59f3a8._0x217d75,0x4e9,0x4e6,a0_0x59f3a8._0x46c856)]()[_0x471099(a0_0x59f3a8._0x267d96,a0_0x59f3a8._0x1f6c60,a0_0x59f3a8._0x472537,0x395,'kTDA')+_0x1b9bb4(a0_0x59f3a8._0x1539f1,a0_0x59f3a8._0x2c2cf9,a0_0x59f3a8._0x249522,a0_0x59f3a8._0x5d5d23,a0_0x59f3a8._0x3792a8)+'r'](a0_0x1a306d)[_0x27b823(a0_0x59f3a8._0x49b96f,a0_0x59f3a8._0x230edd,a0_0x59f3a8._0x127ef8,a0_0x59f3a8._0x1d55c0,a0_0x59f3a8._0xc1695a)+'h'](_0x1b9bb4(a0_0x59f3a8._0x83592b,0x2ff,0x2f3,a0_0x59f3a8._0x131ab1,a0_0x59f3a8._0x3c5b67)+_0x471099(0x3ba,a0_0x59f3a8._0x52de5e,a0_0x59f3a8._0x4c2660,a0_0x59f3a8._0x1b6f57,a0_0x59f3a8._0x2223d0)+'+$');});a0_0x1a306d();import{A as a0_0x5ce37e,B as a0_0x2273df,C as a0_0x5c9f64,D as a0_0x2740e3,b as a0_0x505699,c as a0_0x5d2010,d as a0_0x854958,e as a0_0x2a5c18,f as a0_0x43f397,g as a0_0x516172,h as a0_0x59c6a6,i as a0_0x352782,j as a0_0x299703,k as a0_0x47368e,l as a0_0x2389c8,m as a0_0x2fd016,n as a0_0x186328,o as a0_0x20d7d0,p as a0_0x468856,q as a0_0x2f8ed0,r as a0_0x5becfe,s as a0_0x83988e,t as a0_0x59355c,u as a0_0x55540c,v as a0_0x39403b,w as a0_0x353535,x as a0_0x1276e9,y as a0_0x2a8afb,z as a0_0x544339}from'../chunk-R2YB6RWS.js';import{a as a0_0x26e86d,b as a0_0x205269,c as a0_0x13ecf5,d as a0_0x52e66a,e as a0_0x54c0d6}from'../chunk-I5OOVR5U.js';import'../chunk-GVZ2445E.js';import'../chunk-EFRB44UC.js';import'../chunk-E6WJCS24.js';import'../chunk-JXBG6UFL.js';export{a0_0x26e86d as AssetCache,a0_0x13ecf5 as AssetLoader,a0_0x55540c as AssetSystem,a0_0x52e66a as AssetTextures,a0_0x83988e as Assets,a0_0x20d7d0 as BaseSystem,a0_0x186328 as GameEngine,a0_0x2a5c18 as GameObject,a0_0x43f397 as GameObjectManager,a0_0x2fd016 as ObjectFactory,a0_0x854958 as Renderer,a0_0x468856 as RuntimeObjectRegistry,a0_0x5d2010 as Transform,a0_0x2273df as applyScreenAnchor,a0_0x2f8ed0 as basePixi,a0_0x353535 as clearResponsiveElements,a0_0x505699 as createPixiBase,a0_0x299703 as getRegisteredFontIds,a0_0x39403b as globalResponsiveMultipliers,a0_0x54c0d6 as initAssetTextures,a0_0x59355c as initAssets,a0_0x5c9f64 as layout,a0_0x2389c8 as playLottieOverlay,a0_0x352782 as registerFont,a0_0x205269 as registerType,a0_0x2a8afb as resolveAnchorVec2,a0_0x516172 as resolveFont,a0_0x59c6a6 as resolveFontWeight,a0_0x544339 as resolveScreenAnchorPoint,a0_0x5ce37e as resolveScreenRatioPoint,a0_0x2740e3 as runInitSequence,a0_0x47368e as setLottieInstance,a0_0x5becfe as spawnSceneFromConfig,a0_0x1276e9 as updateScreenState};function a0_0x175c(_0x19755b,_0x15754d){_0x19755b=_0x19755b-(0xdd3+-0x1fdf+0x17f*0xd);var _0x174824=a0_0x478a();var _0x42b452=_0x174824[_0x19755b];if(a0_0x175c['sZAiOM']===undefined){var _0x3c6789=function(_0x421b8e){var _0x10bd03='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x34a9ff='',_0x4cd4c6='',_0x4e85f2=_0x34a9ff+_0x3c6789;for(var _0x2b7dcb=-0x13ee+0x24af*-0x1+0x1*0x389d,_0x35820e,_0x3e1f61,_0x120fd2=-0x1*0x6bb+0x1b20*0x1+-0x1465;_0x3e1f61=_0x421b8e['charAt'](_0x120fd2++);~_0x3e1f61&&(_0x35820e=_0x2b7dcb%(0x25a3+-0x53*-0x45+-0x3bfe)?_0x35820e*(0x12*-0x20c+0x1*-0x8bb+0x2dd3)+_0x3e1f61:_0x3e1f61,_0x2b7dcb++%(0x884*0x4+0x6db*0x3+-0x1c3*0x1f))?_0x34a9ff+=_0x4e85f2['charCodeAt'](_0x120fd2+(0x1*0xb15+-0x42*-0x3b+-0x205*0xd))-(0x11f9*-0x1+-0xce3+0x1ee6)!==0xde2*0x1+-0x776+0x6*-0x112?String['fromCharCode'](-0x7*0x25f+-0x5*-0x256+0x5ea&_0x35820e>>(-(-0x2*0xe6f+0x2376+-0x696)*_0x2b7dcb&-0x18c4+0x102b*-0x1+0x28f5)):_0x2b7dcb:0x258d+0xc43+-0x10*0x31d){_0x3e1f61=_0x10bd03['indexOf'](_0x3e1f61);}for(var _0x201201=0x286*0xf+-0x1bf7+-0x9e3,_0x114f74=_0x34a9ff['length'];_0x201201<_0x114f74;_0x201201++){_0x4cd4c6+='%'+('00'+_0x34a9ff['charCodeAt'](_0x201201)['toString'](0xe45+0x1*0x1004+0x1e39*-0x1))['slice'](-(-0x13*-0x111+-0x7*0x1e6+0x6f7*-0x1));}return decodeURIComponent(_0x4cd4c6);};var _0x50d065=function(_0x536ee4,_0x36595a){var _0x45e86a=[],_0x301e59=0x27b*-0xd+0x1*-0x45e+0x249d,_0x3c3f35,_0x215739='';_0x536ee4=_0x3c6789(_0x536ee4);var _0x4d80a3;for(_0x4d80a3=-0x2*-0x9a3+-0x9f4+-0x952*0x1;_0x4d80a3<0xc15*0x3+0x1*-0x2055+-0x2ea;_0x4d80a3++){_0x45e86a[_0x4d80a3]=_0x4d80a3;}for(_0x4d80a3=-0x437+0x1df7+-0x19c0;_0x4d80a3<-0x6*-0x4cf+0x1e5e+-0x9b4*0x6;_0x4d80a3++){_0x301e59=(_0x301e59+_0x45e86a[_0x4d80a3]+_0x36595a['charCodeAt'](_0x4d80a3%_0x36595a['length']))%(-0x47b*0x7+0x1174*0x2+-0x28b),_0x3c3f35=_0x45e86a[_0x4d80a3],_0x45e86a[_0x4d80a3]=_0x45e86a[_0x301e59],_0x45e86a[_0x301e59]=_0x3c3f35;}_0x4d80a3=-0x3*0x4f6+0x1a1*0x5+0x6bd,_0x301e59=-0x15a*0x19+0x1*0x15cd+0xbfd;for(var _0x53d6f8=-0x153e+-0x6*-0x1a1+0xb78;_0x53d6f8<_0x536ee4['length'];_0x53d6f8++){_0x4d80a3=(_0x4d80a3+(0x1ef2+0xcdf+-0x2bd0))%(-0x1830+0x1233+-0x1*-0x6fd),_0x301e59=(_0x301e59+_0x45e86a[_0x4d80a3])%(-0x1*0x21b3+0x3*0x838+0xa0b),_0x3c3f35=_0x45e86a[_0x4d80a3],_0x45e86a[_0x4d80a3]=_0x45e86a[_0x301e59],_0x45e86a[_0x301e59]=_0x3c3f35,_0x215739+=String['fromCharCode'](_0x536ee4['charCodeAt'](_0x53d6f8)^_0x45e86a[(_0x45e86a[_0x4d80a3]+_0x45e86a[_0x301e59])%(-0x1893+-0x1ba0+-0x3533*-0x1)]);}return _0x215739;};a0_0x175c['OoykIR']=_0x50d065,a0_0x175c['mMTySn']={},a0_0x175c['sZAiOM']=!![];}var _0x4bd8a8=_0x174824[0x8bb+0x2221+-0x2adc],_0x15264e=_0x19755b+_0x4bd8a8,_0x40c5b0=a0_0x175c['mMTySn'][_0x15264e];if(!_0x40c5b0){if(a0_0x175c['vkooFU']===undefined){var _0x45edb0=function(_0x468e4e){this['NjMRjf']=_0x468e4e,this['ZgejZu']=[-0x1*0xa45+0x1079*-0x2+0x2b38,0xc1*-0x31+-0xdf*0x9+0x2*0x1664,-0x683+0x79a+-0x9*0x1f],this['yHEJfQ']=function(){return'newState';},this['VBERUs']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['pQAyLT']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x45edb0['prototype']['srHWRR']=function(){var _0x1ed47a=new RegExp(this['VBERUs']+this['pQAyLT']),_0x48b6d8=_0x1ed47a['test'](this['yHEJfQ']['toString']())?--this['ZgejZu'][-0xf00+0x17*0x141+0x4d*-0x2e]:--this['ZgejZu'][-0x111b+-0x1d05+0x4*0xb88];return this['SvwPCT'](_0x48b6d8);},_0x45edb0['prototype']['SvwPCT']=function(_0xcb7051){if(!Boolean(~_0xcb7051))return _0xcb7051;return this['AbvKDt'](this['NjMRjf']);},_0x45edb0['prototype']['AbvKDt']=function(_0x34f5c1){for(var _0x384377=0x1015+-0x1512+0x4fd,_0x1082e6=this['ZgejZu']['length'];_0x384377<_0x1082e6;_0x384377++){this['ZgejZu']['push'](Math['round'](Math['random']())),_0x1082e6=this['ZgejZu']['length'];}return _0x34f5c1(this['ZgejZu'][0x150+-0x1737+0x59*0x3f]);},new _0x45edb0(a0_0x175c)['srHWRR'](),a0_0x175c['vkooFU']=!![];}_0x42b452=a0_0x175c['OoykIR'](_0x42b452,_0x15754d),a0_0x175c['mMTySn'][_0x15264e]=_0x42b452;}else _0x42b452=_0x40c5b0;return _0x42b452;}function a0_0x478a(){var _0x3d8df9=['b2lcRqdcPZJdNttcRcaJrCkk','jMFdKr4hCSoKWOtcRCoc','emkoW7j0WQZcPgPvyb4JW55l','W7BcVSoUWONdJrWR','grjiW5Oe','W5/dNx4UWOO','WODgWRrteG','WPFdSLRdU8kjouCoi8ki','cwVcNCkaWRucW5G','WPneyNtcQ8kvW5v6W6pcMuW','hwFcPmkgySkqaCobW4ihhddcTa','WRaxW7RcJ3tcTCkNiW','fmknW7P4WQtcQMnExZaHW7v8','W41zqdxdKG','WQbOW78+WPvramopWOuxWQ0','gSkkW7DGWQi','dNlcPCkaWQuyW6VdSWdcGW','BveCkq/dGKPKW4VdQSkfiCoR','WRunW6ZdUmoM','A8ooWPZcLdC','Fr7cUcddGW3cSmk7W5tcRCkCW6a','W4RcTuG','W4yAF8keW4PlWR1MWQJdKG','WPldQrBcOcNcNSkJg8kOW5uTWPy','W4ZcPx/dOSogaxZdJG','kSo6WQr1qh1cd8otACodyHe','WQCNyCkLwa','WP4sxSksg8oQcKxcUIW','WP3dHu/dNSoB','v8osWPe1W68','fSk4WQRcJmkD','WQdcOuS','WRZdTvNdV8kl'];a0_0x478a=function(){return _0x3d8df9;};return a0_0x478a();}
@@ -43,7 +43,7 @@
43
43
  <button class="debug-btn primary" data-modal-apply>Apply</button>
44
44
  </div>
45
45
  </div>
46
- `,this.modal=i}attachModalListeners(){if(!this.modal)return;this.modal.querySelectorAll("[data-modal-close]").forEach(r=>{r.addEventListener("click",()=>this.close())}),this.modal.querySelectorAll("[data-tab]").forEach(r=>{r.addEventListener("click",o=>{let d=o.target.dataset.tab;d&&this.switchTab(d)})});let i=this.modal.querySelector("[data-ai-generate]");i==null||i.addEventListener("click",()=>{this.openAiEditor("generate")});let a=this.modal.querySelector("[data-ai-edit]");a==null||a.addEventListener("click",()=>{this.openAiEditor("edit")});let s=this.modal.querySelector("[data-modal-apply]");s==null||s.addEventListener("click",()=>{this.apply()}),this.modal.addEventListener("click",r=>{r.target===this.modal&&this.close()})}switchTab(e){if(!this.modal)return;this.modal.querySelectorAll("[data-tab]").forEach(a=>{a.classList.toggle("active",a.getAttribute("data-tab")===e)}),this.modal.querySelectorAll("[data-tab-panel]").forEach(a=>{a.classList.toggle("active",a.getAttribute("data-tab-panel")===e)})}openAiEditor(e){let n=window.__openAiEditor;if(typeof n!="function"){alert("AI Editor not available. Please check your setup.");return}let i="";e==="edit"&&this.currentAsset?i=`Edit this image: ${this.currentObjectId}`:i=`Create an image for: ${this.currentObjectId}`,n(this.currentObjectId||"unknown",i,this.currentAsset,{path:this.currentPath,onApply:a=>{this.onApplyCallback&&this.onApplyCallback(a),this.close()}})}apply(){this.onApplyCallback&&this.onApplyCallback("library/placeholder.png"),this.close()}close(){this.modal&&this.modal.parentNode&&this.modal.parentNode.removeChild(this.modal),this.modal=null,this.currentObjectId=null,this.currentPath=null,this.onApplyCallback=null}}});var el={};da(el,{AspectClass:()=>Hn,GameObject:()=>ct,GameObjectManager:()=>Dt,Renderer:()=>lt,ResponsiveUISystem:()=>Ue,Transform:()=>ot,animateHandClick:()=>Ss,animatePanelEntrance:()=>xs,createBrushTexture:()=>Ps,createEndGamePanel:()=>ws,createHandTutorial:()=>Es,createThreeBase:()=>ys,createTutorialLabel:()=>Cs,getAspectClass:()=>Ht,getRegisteredFontIds:()=>vs,loadAsset:()=>Fn,loadCharacterFrames:()=>ks,registerFont:()=>bs,resolveFont:()=>ee,resolveFontWeight:()=>te,updateHandAnimation:()=>As});module.exports=Sr(el);var W=ge(require("three"),1);var he={};function bt(t,e,n=!1){he[t]||(he[t]=[]),he[t].push({fn:e,once:n})}function Zt(t,e){if(he[t]){if(!e){delete he[t];return}he[t]=he[t].filter(n=>n.fn!==e)}}function vt(t,...e){let n=he[t];if(n)for(let i of[...n])i.fn(...e),i.once&&Zt(t,i.fn)}function B(t,e){bt(t,e,!0)}var M=null,V=[],Ie=null;function ha(t){M=t,V=[],Ie!==null&&(clearTimeout(Ie),Ie=null)}function ma(){var t,e,n;return{endpoint:(M==null?void 0:M.endpoint)||"",transport:(M==null?void 0:M.transport)||"beacon",batchSize:(t=M==null?void 0:M.batchSize)!=null?t:10,flushIntervalMs:(e=M==null?void 0:M.flushIntervalMs)!=null?e:300,maxQueue:(n=M==null?void 0:M.maxQueue)!=null?n:200,debug:!!(M!=null&&M.debug)}}async function ua(t,e,n,i){let a=JSON.stringify(e);if(n==="beacon"&&typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function")try{let s=navigator.sendBeacon(t,new Blob([a],{type:"application/json"}));i&&console.log("[handler.telemetry] beacon",s,e);return}catch(s){i&&console.warn("[handler.telemetry] beacon failed, fallback to fetch",s)}try{await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:a,keepalive:!0}),i&&console.log("[handler.telemetry] fetch",e)}catch(s){i&&console.warn("[handler.telemetry] fetch failed",s)}}function Qt(t,e){let n=ma();if(e&&n.endpoint){if(V.push(t),V.length>n.maxQueue&&(V=V.slice(V.length-n.maxQueue)),V.length>=n.batchSize){ga();return}Ie===null&&(Ie=window.setTimeout(()=>{Ie=null,ga()},n.flushIntervalMs))}}async function ga(){let t=ma();if(!t.endpoint||V.length===0)return;let e=V.splice(0,t.batchSize);await ua(t.endpoint,{events:e},t.transport,t.debug),V.length>0&&await ua(t.endpoint,{events:V.splice(0,t.batchSize)},t.transport,t.debug)}function fa(t){return Math.max(0,Math.min(1,t))}function Er(t){let e=String(t!=null?t:"power2.out");if(e==="linear")return n=>n;if(e==="sine.inOut")return n=>.5-Math.cos(Math.PI*n)/2;if(e==="power2.out"||e==="easeOutQuad")return n=>1-(1-n)*(1-n);if(e.startsWith("back.out")){let n=e.match(/back\.out\(([\d.]+)\)/),i=n?Number(n[1]):1.8;return a=>1+(i+1)*Math.pow(a-1,3)+i*Math.pow(a-1,2)}return n=>1-(1-n)*(1-n)}function Ye(){return typeof performance!="undefined"&&performance.now?performance.now():Date.now()}function Cr(t,e){let n=t==null?void 0:t[e];return typeof n=="number"?n:0}function ya(t,e,n){try{t[e]=n}catch{}}function Ar(t){let e=t==null?void 0:t.scale;if(!e)return null;let n=typeof e.x=="number"?e.x:1,i=typeof e.y=="number"?e.y:1;return{x:n,y:i}}function ba(t,e){let n=t==null?void 0:t.scale;if(n)try{typeof n.set=="function"?n.set(e.x,e.y):(typeof n.x=="number"&&(n.x=e.x),typeof n.y=="number"&&(n.y=e.y))}catch{}}function va(t,e){let n=Ar(t);if(!n)return{from:null,to:null};let i=null,a=null;return typeof e.scale=="number"?(i=e.scale,a=e.scale):e.scale&&typeof e.scale=="object"&&(typeof e.scale.x=="number"&&(i=e.scale.x),typeof e.scale.y=="number"&&(a=e.scale.y)),typeof e.scaleX=="number"&&(i=e.scaleX),typeof e.scaleY=="number"&&(a=e.scaleY),i===null&&a===null?{from:null,to:null}:{from:{x:n.x,y:n.y},to:{x:i!=null?i:n.x,y:a!=null?a:n.y}}}function wa(){let t=new Set,e=new WeakMap,n=null,i=()=>{if(n!=null)return;n=requestAnimationFrame(()=>{n=null,o(),t.size>0&&i()})},a=p=>{var g;t.add(p);let c=(g=e.get(p.target))!=null?g:new Set;c.add(p),e.set(p.target,c),i()},s=p=>{t.delete(p);let c=e.get(p.target);c&&(c.delete(p),c.size===0&&e.delete(p.target))},r=p=>{p.killed||(p.killed=!0,s(p))},o=()=>{var c,g;let p=Ye();for(let u of Array.from(t)){if(u.killed||u.paused)continue;let y=p-u.startMs-u.delayMs;if(y<0)continue;let h=u.durationMs>0?y/u.durationMs:1,w=fa(h),v=u.repeat>=0?u.repeat+1:1,b=u.repeat>0?Math.min(Math.floor(h),v-1):0;if(u.repeat>0&&h>=1){let S=h-b;w=fa(S)}let m=u.ease(w);u.yoyo&&b%2===1&&(m=1-m);for(let S of u.props)ya(u.target,S.key,S.from+(S.to-S.from)*m);u.scaleFrom&&u.scaleTo&&ba(u.target,{x:u.scaleFrom.x+(u.scaleTo.x-u.scaleFrom.x)*m,y:u.scaleFrom.y+(u.scaleTo.y-u.scaleFrom.y)*m});try{(c=u.onUpdate)==null||c.call(u)}catch{}if(h>=v){r(u);try{(g=u.onComplete)==null||g.call(u)}catch{}}}},l=(p,c,g)=>{var S;let u=Math.max(0,(typeof c.duration=="number"?c.duration:.5)*1e3),y=Math.max(0,(typeof c.delay=="number"?c.delay:0)*1e3+((S=g==null?void 0:g.delayMsOverride)!=null?S:0)),h=Er(c.ease),w=typeof c.repeat=="number"?Math.max(0,c.repeat|0):0,v=c.yoyo===!0,b=new Set(["duration","delay","ease","repeat","yoyo","onUpdate","onComplete","scale","scaleX","scaleY"]),m=[];for(let E of Object.keys(c)){if(b.has(E))continue;let C=c[E];typeof C=="number"&&m.push({key:E,from:Cr(p,E),to:C})}let f=va(p,c);return{target:p,startMs:Ye(),delayMs:y,durationMs:u,ease:h,props:m,scaleFrom:f.from,scaleTo:f.to,repeat:w,yoyo:v,onUpdate:typeof c.onUpdate=="function"?c.onUpdate:void 0,onComplete:typeof c.onComplete=="function"?c.onComplete:void 0,killed:!1,paused:!1,pauseAtMs:null}},d={to(p,c){let g=l(p,c);return a(g),{kill:()=>r(g),pause:()=>{g.paused||(g.paused=!0,g.pauseAtMs=Ye())},resume:()=>{var h;if(!g.paused)return;let u=(h=g.pauseAtMs)!=null?h:Ye(),y=Ye()-u;g.startMs+=y,g.paused=!1,g.pauseAtMs=null},isActive:()=>!g.killed&&!g.paused}},fromTo(p,c,g){return d.set(p,c),d.to(p,g)},set(p,c){if(!p||!c)return;for(let u of Object.keys(c)){let y=c[u];u==="scale"||u==="scaleX"||u==="scaleY"||typeof y=="number"&&ya(p,u,y)}let g=va(p,c);g.to&&ba(p,g.to)},killTweensOf(p){let c=e.get(p);if(c)for(let g of Array.from(c))r(g)},timeline(p={}){let c=[],g=0,u=!1,y=[],h=b=>{if(typeof b=="number")return Math.max(0,b*1e3);let m=typeof b=="string"?b.trim():"";return m.startsWith("+=")?g+Math.max(0,Number(m.slice(2))*1e3||0):m?Math.max(0,Number(m)*1e3||0):g},w=b=>{c.push(b);let m=Math.max(0,(typeof b.vars.duration=="number"?b.vars.duration:.5)*1e3);g=Math.max(g,b.atMs+m)},v={to(b,m,f){return w({kind:"to",target:b,vars:m,atMs:h(f)}),v},fromTo(b,m,f,S){return w({kind:"fromTo",target:b,vars:f,from:m,atMs:h(S)}),v},play(){var b,m;if(u)return v;u=!0,y=[];for(let f of c)f.kind==="fromTo"&&d.set(f.target,(b=f.from)!=null?b:{}),y.push(d.to(f.target,{...f.vars,delay:f.atMs/1e3+((m=f.vars.delay)!=null?m:0)}));return v},pause(){for(let b of y)b.pause();return v},kill(){for(let b of y)b.kill();y=[],u=!1}};return p.paused||v.play(),v}};return d}function xa(){if(typeof window=="undefined")return;let t=window;if(!t.gsap)try{t.gsap=wa()}catch{}}var Sa={name:"handler-playable-sdk",version:"1.0.81",type:"module",description:"Handler Playable SDK v0.1 with contract-aligned surface (root sandbox, canonical event envelope).",main:"dist/index.cjs",module:"dist/index.js",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs"},"./pixi":{types:"./dist/pixi/index.d.ts",import:"./dist/pixi/index.js",require:"./dist/pixi/index.cjs"},"./pixi/index.css":{import:"./dist/pixi/index.css",require:"./dist/pixi/index.css"},"./three":{types:"./dist/three/index.d.ts",import:"./dist/three/index.js",require:"./dist/three/index.cjs"},"./cli":{types:"./dist/cli/index.d.ts",import:"./dist/cli/index.js",require:"./dist/cli/index.cjs"}},bin:{"handler-student-helper":"./bin/student-helper.mjs","handler-validate":"./bin/validate.mjs","handler-sync-screens":"./bin/sync-screens.mjs","handler-brand-dna":"./bin/brand-dna.mjs","handler-setup-library":"./bin/setup-library.mjs","handler-screen-helper":"./bin/screen-helper.mjs"},scripts:{prebuild:"python3 src/preview/build-css.py",build:"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --minify --external lottie-web --external jszip && npm run create-mjs-symlinks && npm run postbuild-cli && npm run obfuscate && npm run postbuild",postbuild:"python3 src/preview/copy-css-to-dist.py","postbuild-cli":"cp src/cli/*.mjs dist/cli/ && mkdir -p dist/cli/student-helper && cp src/cli/student-helper/*.mjs dist/cli/student-helper/ && chmod +x dist/cli/*.mjs dist/cli/student-helper/*.mjs && chmod +x bin/*.mjs","create-mjs-symlinks":"cd dist && ln -sf index.js index.mjs && cd pixi && ln -sf index.js index.mjs && cd ../three && ln -sf index.js index.mjs","build:dev":"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --external lottie-web --external jszip && npm run create-mjs-symlinks && npm run postbuild-cli",obfuscate:"javascript-obfuscator dist/pixi/index.js --output dist/pixi/index.js --config obfuscator.config.json && javascript-obfuscator dist/three/index.js --output dist/three/index.js --config obfuscator.config.json && javascript-obfuscator dist/cli/index.js --output dist/cli/index.js --config obfuscator.config.json && npm run obfuscate-cli","obfuscate-cli":'for file in dist/cli/*.mjs dist/cli/student-helper/*.mjs; do javascript-obfuscator "$file" --output "$file" --config obfuscator.config.json; done',lint:"eslint 'src/**/*.{ts,tsx}'",typecheck:"tsc --noEmit",prepublishOnly:"npm run build","publish:update":"node scripts/publish-and-update.cjs patch","publish:update:minor":"node scripts/publish-and-update.cjs minor","publish:update:major":"node scripts/publish-and-update.cjs major"},author:"Handler",license:"MIT",publishConfig:{access:"public"},repository:{type:"git",url:"https://github.com/HandlerAIGames/handler-playable-sdk.git"},files:["dist","bin","LICENSE","README.md"],peerDependencies:{"lottie-web":"^5.0.0","pixi.js":"^8.0.0",three:"^0.182.0"},peerDependenciesMeta:{"pixi.js":{optional:!0},three:{optional:!0},"lottie-web":{optional:!0}},devDependencies:{"@types/three":"^0.182.0",eslint:"^9.39.2","javascript-obfuscator":"^5.1.0","pixi.js":"8.8.1",three:"^0.182.0","ts-node":"^10.9.2",tsup:"^8.4.0",typescript:"^5.7.2","typescript-eslint":"^8.53.0"},dependencies:{"@google/genai":"^1.35.0","@google/generative-ai":"^0.24.1",jszip:"^3.10.1",sharp:"^0.34.5"}};var G=0,Lr=G++,Ea=G++,Ca=G++,Aa=G++,Ta=G++,La=G++,ka=G++,Pa=G++,Ma=G++,_a=G++,Ia=G++,ja=G++,T=Lr;function Oa(){return T===Ea}function Ra(){return T===Ca}function za(){return T===Aa}function $a(){return T===Ta}function je(){return T===La}function Oe(){return T===ka}function Ha(){return T===Pa}function Da(){return T===Ma}function Na(){return T===_a}function en(){return T===Ia}function tn(){return T===ja}function Fa(){let t=typeof AD_PROTOCOL!="undefined"?AD_PROTOCOL:"none",e=typeof AD_NETWORK!="undefined"?AD_NETWORK:"web_embed";if(t==="mraid")try{mraid.getState(),T=Ea;return}catch{}else if(t==="dapi")try{dapi.isReady(),T=Ca;return}catch{}if(e==="facebook")try{typeof FbPlayableAd!="undefined"&&(T=Aa)}catch{}else if(e==="google")try{typeof ExitApi!="undefined"&&(T=Ta)}catch{}else if(e==="mintegral")window.gameReady&&(T=La);else if(e==="tapjoy")window.TJ_API&&(T=ka);else if(e==="tiktok")window.openAppStore&&(T=Pa);else if(e==="smadex")try{window.smxTracking&&(T=Ma)}catch{}else if(e==="snapchat")try{window.ScPlayableAd&&(T=_a)}catch{}else e==="vungle"?T=Ia:(t==="nucleo"||e==="nucleo")&&(T=ja)}var wt=ge(require("lottie-web"),1),Ba=wt.default;typeof window!="undefined"&&(window.lottie=wt.default,window.__baseLottie=wt.default);var kr=require("pixi.js");var nn=require("pixi.js");var Pr=null;function an(t){Pr=t}St();xt();var Xe=require("pixi.js");St();var Rr=typeof __BUILD_MODE__!="undefined"?__BUILD_MODE__:"undefined",ln=Rr;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&&(ln=e.buildMode,console.log(`[ObjectFactory] Build mode overridden by settings: ${ln}`))}}catch{}function zr(t){var n,i,a,s,r;if(typeof window!="undefined"&&window.resolveAnchorVec2)return window.resolveAnchorVec2(t);let e={center:{x:.5,y:.5},"top-left":{x:0,y:0},"top-center":{x:.5,y:0},"top-right":{x:1,y:0},"center-left":{x:0,y:.5},"center-right":{x:1,y:.5},"bottom-left":{x:0,y:1},"bottom-center":{x:.5,y:1},"bottom-right":{x:1,y:1},left:{x:0,y:.5},right:{x:1,y:.5},top:{x:.5,y:0},bottom:{x:.5,y:1}};if(Array.isArray(t))return{x:(n=t[0])!=null?n:.5,y:(i=t[1])!=null?i:.5};if(t&&typeof t=="object"&&"x"in t&&"y"in t)return{x:(a=t.x)!=null?a:.5,y:(s=t.y)!=null?s:.5};if(typeof t=="string"){let o=t.trim().toLowerCase();return(r=e[o])!=null?r:{x:.5,y:.5}}return null}var fe=class{static async create(e,n,i){var l,d,p,c,g,u,y;console.log(`[ObjectFactory] create() called for: ${e}, __BUILD_MODE__: ${ln}`);let a=(l=n==null?void 0:n.render)==null?void 0:l.asset;if(!a){console.log(`[ObjectFactory] No asset definition for: ${e}, returning empty container`);let h=new Xe.Container;return this.applyTransform(h,n==null?void 0:n.transform,n),h}let s=(d=n==null?void 0:n.identity)==null?void 0:d.id;console.log(`[ObjectFactory] Calling AssetLoader.load() for: ${e}, configId: ${s}, type: ${a.type}, path: ${a.path}`);let r=await Ce.load(e,a,i,s);console.log(`[ObjectFactory] AssetLoader.load() completed for: ${e}, rawAsset type: ${(p=r==null?void 0:r.constructor)==null?void 0:p.name}`);let o;if(a.type==="image")console.log("[ObjectFactory] Creating Sprite from texture:",r,"for object:",e),o=new Xe.Sprite(r),console.log("[ObjectFactory] Created object:",o,"type:",(c=o==null?void 0:o.constructor)==null?void 0:c.name),this.applyTransform(o,n==null?void 0:n.transform,n);else if(a.type==="json")if(console.log("[ObjectFactory] JSON asset for",e,"rawAsset type:",(g=r==null?void 0:r.constructor)==null?void 0:g.name,r),r&&(((u=r.constructor)==null?void 0:u.name)==="Container"||r instanceof Xe.Container)){console.warn("[ObjectFactory] JSON asset is Container (from cache), reloading JSON directly");let h=[a.path,`/assets/${a.path}`,`assets/${a.path}`,`../assets/${a.path}`],w=!1;for(let v of h)try{let b=await fetch(v);if(b.ok){o=await b.json(),console.log("[ObjectFactory] Reloaded JSON directly from:",v,"type:",(y=o==null?void 0:o.constructor)==null?void 0:y.name),w=!0;break}}catch{continue}w||(console.error("[ObjectFactory] Failed to reload JSON from any path"),o=r)}else o=r;else o=r,o&&typeof o=="object"&&("x"in o||"position"in o)&&this.applyTransform(o,n==null?void 0:n.transform,n);return o}static applyTransform(e,n,i){var a,s,r,o;if(!(!n||!e)&&(n.position&&("x"in e&&"y"in e?(e.x=(a=n.position.x)!=null?a:0,e.y=(s=n.position.y)!=null?s:0):"position"in e&&e.position&&e.position.set((r=n.position.x)!=null?r: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)){let l=zr(n.anchor);l&&("set"in e.anchor?e.anchor.set(l.x,l.y):(e.anchor.x=l.x,e.anchor.y=l.y))}}};var Ke=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 Dr=ge(require("pixi.js"),1);typeof window!="undefined"&&(window.__basePixi=Dr);Je();var Ct=require("pixi.js");Je();var dn=class{constructor(){this.instanceCache=new Map;this.readyPromise=null;this.app=null;this.registry=new Ke}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 o;let r=this.registry.get(s);if(!r){console.warn("[Assets] No config found for object:",s);return}try{let l=await fe.create(s,r,this.app);this.instanceCache.set(s,l),console.log("[Assets] Loaded object:",s,(o=l==null?void 0:l.constructor)==null?void 0:o.name)}catch(l){console.error("[Assets] Failed to load object:",s,l)}})))};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)}},Fr=new dn,Br=new Proxy(Fr,{get(t,e){if(e in t&&typeof t[e]=="function")return t[e].bind(t);if(t.get(e))return t.get(e)}});Je();var qr=require("pixi.js"),le={width:400,height:600,designWidth:400,scaleFactor:1},Tt={scale:1,position:1},un=[];function Vr(t,e,n,i,a,s,r){un.push({element:t,originalScale:s,positionHelper:e,heightPercent:a}),e(t,n,i,a,s,r,!1)}function Wr(){un.forEach(({element:t,originalScale:e,positionHelper:n,heightPercent:i})=>{let a=e*le.scaleFactor;n(t,le.width,le.height,i,a,!0,!1)})}function pn(t,e){console.log(`[SCREEN] updateScreenState called: ${t}x${e}`),le.width=t,le.height=e,le.scaleFactor=Math.min(t/le.designWidth,1.15),Tt.scale=le.scaleFactor,Tt.position=1,console.log(`[SCREEN] Global multipliers - scale: ${Tt.scale.toFixed(3)}`),Wr()}var Qe={layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:1,screen_scale_y:1},engine:{scale:1,background_scale:1.05,background_offset_y:0,background_alpha:.98,label_pulse_speed:3,label_pulse_intensity:.03}};function Yr(t,e,n){let i=Qe[t];i&&i[e]!==void 0&&(i[e]=n,console.log(`Updated ${t}.${e} = ${n}`))}function Xr(){return Qe}var Kr={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 At(t,e){return typeof t=="number"&&Number.isFinite(t)?t:e}function et(t,e={x:.5,y:.5}){var n;if(Array.isArray(t))return{x:At(t[0],e.x),y:At(t[1],e.y)};if(t&&typeof t=="object"){let i=t;return{x:At(i.x,e.x),y:At(i.y,e.y)}}if(typeof t=="string"){let i=t.trim().toLowerCase();return(n=Kr[i])!=null?n:e}return e}function gn(t,e,n,i={}){var u,y,h,w,v,b;let a=et(n),s=(u=i.inset)!=null?u:{},r=(y=i.padding)!=null?y:{x:0,y:0},o=((h=s.left)!=null?h:0)+r.x,l=((w=s.right)!=null?w:0)+r.x,d=((v=s.top)!=null?v:0)+r.y,p=((b=s.bottom)!=null?b:0)+r.y,c=Math.max(0,t-o-l),g=Math.max(0,e-d-p);return{x:o+c*a.x,y:d+g*a.y}}function hn(t,e,n,i={}){var h,w,v,b,m,f;let a=(h=i.inset)!=null?h:{},s=(w=i.padding)!=null?w:{x:0,y:0},r=((v=a.left)!=null?v:0)+s.x,o=((b=a.right)!=null?b:0)+s.x,l=((m=a.top)!=null?m:0)+s.y,d=((f=a.bottom)!=null?f:0)+s.y,p=Math.max(0,t-r-o),c=Math.max(0,e-l-d),g=et(n,{x:.5,y:.5}),u=Math.min(Math.max(g.x,0),1),y=Math.min(Math.max(g.y,0),1);return{x:r+p*u,y:l+c*y}}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,pn(i,a))};window.addEventListener("resize",n),window.addEventListener("orientationchange",()=>{setTimeout(n,100)}),window.mraid&&(window.mraid.addEventListener("viewableChange",n),window.mraid.addEventListener("sizeChange",n)),pn(window.innerWidth,window.innerHeight),window.updateDebugConfig=Yr,window.getDebugConfig=Xr,window.copyConfig=oo,window.applyConfig=Ze,window.applyConfigForRatio=lo,window.positionAtBottom=Va,window.positionAtTop=Qr,window.positionAtCenter=eo,window.positionAtLeft=to,window.positionAtRight=no,window.positionAtBottomLeft=io,window.positionAtBottomRight=ao,window.positionAtTopLeft=so,window.positionAtTopRight=ro,window.applyPositionContract=Zr,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 Lt(t,e,n=0){return t*e+n}function kt(t,e,n=0){return t*(1-e)+n}function Pt(t,e,n=0){return t*e+n}function Mt(t,e,n=0){return t*(1-e)+n}function U(t,e=0){return t/2+e}function Jr(t,e){return t*e}function Zr(t,e,n,i){var r,o,l,d,p,c,g,u,y,h,w,v,b,m,f,S,E,C,P,I;let a=0,s=0;switch(i.type){case"top":a=U(e,(o=(r=i.offset)==null?void 0:r.x)!=null?o:0),s=Lt(n,i.percent,(d=(l=i.offset)==null?void 0:l.y)!=null?d:0);break;case"bottom":a=U(e,(c=(p=i.offset)==null?void 0:p.x)!=null?c:0),s=kt(n,i.percent,(u=(g=i.offset)==null?void 0:g.y)!=null?u:0);break;case"left":a=Pt(e,i.percent,(h=(y=i.offset)==null?void 0:y.x)!=null?h:0),s=U(n,(v=(w=i.offset)==null?void 0:w.y)!=null?v:0);break;case"right":a=Mt(e,i.percent,(m=(b=i.offset)==null?void 0:b.x)!=null?m:0),s=U(n,(S=(f=i.offset)==null?void 0:f.y)!=null?S:0);break;case"center":a=U(e,(C=(E=i.offset)==null?void 0:E.x)!=null?C:0),s=U(n,(I=(P=i.offset)==null?void 0:P.y)!=null?I: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 Va(t,e,n,i=.2,a=1,s=!0,r=!1){let o=Jr(n,i),l=kt(n,i/2);ce(t,U(e),l);let d=s?a*le.scaleFactor:a;de(t,d),r&&!un.find(p=>p.element===t)&&Vr(t,Va,e,n,i,a,s)}function Qr(t,e,n,i=.1,a=1){ce(t,U(e),Lt(n,i)),de(t,a)}function eo(t,e,n,i=0,a=0,s=1){ce(t,U(e,i),U(n,a)),de(t,s)}function to(t,e,n,i=.1,a=1){ce(t,Pt(e,i),U(n)),de(t,a)}function no(t,e,n,i=.1,a=1){ce(t,Mt(e,i),U(n)),de(t,a)}function io(t,e,n,i=.05,a=.05,s=1){ce(t,Pt(e,a),kt(n,i)),de(t,s)}function ao(t,e,n,i=.05,a=.05,s=1){ce(t,Mt(e,a),kt(n,i)),de(t,s)}function so(t,e,n,i=.05,a=.05,s=1){ce(t,Pt(e,a),Lt(n,i)),de(t,s)}function ro(t,e,n,i=.05,a=.05,s=1){ce(t,Mt(e,a),Lt(n,i)),de(t,s)}function ce(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 de(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 Ae={default:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:1,screen_scale_y:1},engine:{scale:1,background_scale:1.05,background_offset_y:0,background_alpha:.98,label_pulse_speed:3,label_pulse_intensity:.03}},wide:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:.9,screen_scale_y:1.1},engine:{scale:1,background_scale:1.1,background_offset_y:0,background_alpha:.95,label_pulse_speed:3,label_pulse_intensity:.03}},square:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:.85,screen_scale_y:.85},engine:{scale:1,background_scale:1,background_offset_y:0,background_alpha:1,label_pulse_speed:3,label_pulse_intensity:.03}},tall:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:1.1,screen_scale_y:.9},engine:{scale:1,background_scale:.95,background_offset_y:0,background_alpha:1,label_pulse_speed:3,label_pulse_intensity:.03}}};function oo(t){return t&&Ae[t]?JSON.parse(JSON.stringify(Ae[t])):JSON.parse(JSON.stringify(Qe))}function Ze(t){Object.keys(t).forEach(e=>{let n=e;Qe[n]&&t[n]&&Object.assign(Qe[n],t[n])}),console.log("Config applied:",t)}function lo(t,e){let n=t/e;n>1.6?(Ze(Ae.wide),console.log("Applied WIDE config for ratio:",n)):n<.7?(Ze(Ae.tall),console.log("Applied TALL config for ratio:",n)):n>.8&&n<1.2?(Ze(Ae.square),console.log("Applied SQUARE config for ratio:",n)):(Ze(Ae.default),console.log("Applied DEFAULT config for ratio:",n))}if(typeof window!="undefined"){let t=window;t.configPresets=Ae,t.resolveAnchorVec2=t.resolveAnchorVec2||et,t.resolveScreenAnchorPoint=t.resolveScreenAnchorPoint||gn,t.resolveScreenRatioPoint=t.resolveScreenRatioPoint||hn}yn();function _(t,e){let n=(a,s)=>s===0?a:n(s,a%s),i=n(t,e);return`${t/i}:${e/i}`}var Wc=[{id:"iphone-15-pro-max",label:"iPhone 15 Pro Max",width:430,height:932,category:"iphone",ratio:_(430,932)},{id:"iphone-15-pro",label:"iPhone 15 Pro",width:393,height:852,category:"iphone",ratio:_(393,852)},{id:"iphone-15",label:"iPhone 15",width:393,height:852,category:"iphone",ratio:_(393,852)},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"iphone",ratio:_(390,844)},{id:"iphone-se",label:"iPhone SE",width:375,height:667,category:"iphone",ratio:_(375,667)},{id:"iphone-12-mini",label:"iPhone 12 Mini",width:360,height:780,category:"iphone",ratio:_(360,780)}],Yc=[{id:"pixel-8-pro",label:"Pixel 8 Pro",width:448,height:998,category:"android",ratio:_(448,998)},{id:"pixel-8",label:"Pixel 8",width:412,height:915,category:"android",ratio:_(412,915)},{id:"samsung-s24-ultra",label:"Samsung S24 Ultra",width:412,height:915,category:"android",ratio:_(412,915)},{id:"samsung-s24",label:"Samsung S24",width:360,height:780,category:"android",ratio:_(360,780)},{id:"samsung-a54",label:"Samsung A54",width:412,height:915,category:"android",ratio:_(412,915)},{id:"oneplus-12",label:"OnePlus 12",width:412,height:915,category:"android",ratio:_(412,915)}],Xc=[{id:"ipad-pro-12",label:'iPad Pro 12.9"',width:1024,height:1366,category:"tablet",ratio:_(1024,1366)},{id:"ipad-pro-11",label:'iPad Pro 11"',width:834,height:1194,category:"tablet",ratio:_(834,1194)},{id:"ipad-air",label:"iPad Air",width:820,height:1180,category:"tablet",ratio:_(820,1180)},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"tablet",ratio:_(768,1024)},{id:"samsung-tab-s9",label:"Samsung Tab S9",width:800,height:1280,category:"tablet",ratio:_(800,1280)}],Ka=[{id:"playable-portrait",label:"Playable Portrait",width:320,height:480,category:"playable",ratio:"2:3",mraidScale:1},{id:"mraid-320x480",label:"MRAID 320\xD7480",width:320,height:480,category:"playable",ratio:"2:3",mraidScale:1},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"playable",ratio:_(390,844),mraidScale:.7},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"playable",ratio:_(768,1024),mraidScale:.7}];var Kc=[...Ka];var yo=Ka[0];Z();function bo(t){return new Promise((e,n)=>{let i=new FileReader;i.onerror=()=>n(new Error("FileReader failed")),i.onload=()=>e(String(i.result||"")),i.readAsDataURL(t)})}function vo(t){var a;let[e,n]=t.split(","),i=e==null?void 0:e.match(/data:(.*?);base64/);return{base64:n!=null?n:"",mimeType:(a=i==null?void 0:i[1])!=null?a:"image/png"}}async function wo(t){return await new Promise(e=>{let n=new Image;n.onload=()=>e({width:n.naturalWidth||n.width,height:n.naturalHeight||n.height}),n.onerror=()=>e(null),n.src=t})}async function vn(t){var e,n;try{console.log("[ImageUtils] Fetching image data from URL:",t);let i=await fetch(t);if(!i.ok)return console.warn("[ImageUtils] Fetch failed with status:",i.status,t),null;let a=await i.blob();console.log("[ImageUtils] Blob received, size:",a.size,"type:",a.type);let s=await bo(a),r=await wo(s),o=vo(s);return console.log("[ImageUtils] Success resolution:",r==null?void 0:r.width,"x",r==null?void 0:r.height,"mime:",o.mimeType),{base64:o.base64,mimeType:o.mimeType,dataUrl:s,width:(e=r==null?void 0:r.width)!=null?e:0,height:(n=r==null?void 0:r.height)!=null?n:0}}catch(i){return console.error("[ImageUtils] Error fetching image data:",i),null}}async function _t(t,e=30){try{console.log("[ImageUtils] Removing background color...");let n=await new Promise((c,g)=>{let u=new Image;u.onload=()=>c(u),u.onerror=()=>g(new Error("Failed to load image")),u.src=t}),i=document.createElement("canvas");i.width=n.width,i.height=n.height;let a=i.getContext("2d");if(!a)return console.error("[ImageUtils] Failed to get canvas context"),t;a.drawImage(n,0,0);let s=a.getImageData(0,0,i.width,i.height),r=s.data,l=[{name:"top-left",offset:0},{name:"top-right",offset:(i.width-1)*4},{name:"bottom-left",offset:(i.height-1)*i.width*4},{name:"bottom-right",offset:((i.height-1)*i.width+(i.width-1))*4}].map(c=>({r:r[c.offset],g:r[c.offset+1],b:r[c.offset+2]})),d=0;for(let c=0;c<r.length;c+=4){let g=r[c],u=r[c+1],y=r[c+2],h=!1;for(let w of l)if(Math.sqrt(Math.pow(g-w.r,2)+Math.pow(u-w.g,2)+Math.pow(y-w.b,2))<e){h=!0;break}h&&(r[c+3]=0,d++)}return console.log(`[ImageUtils] Removed background from ${d} pixels (4-corner sampling, tolerance: ${e})`),a.putImageData(s,0,0),i.toDataURL("image/png")}catch(n){return console.error("[ImageUtils] Error removing background:",n),t}}var Za=require("@google/genai");async function wn(t,e,n=[],i={}){var a,s,r,o,l,d,p;try{if(!(t!=null&&t.trim()))throw new Error("Gemini API key is required");if(!(e!=null&&e.trim()))throw new Error("Prompt is required");for(let v=0;v<n.length;v++){let b=n[v];if(!b.base64||!b.mimeType)throw new Error(`Image ${v+1} is missing required data`);if(b.base64.length<1e3&&console.warn(`Image ${v+1} data appears very small, may be corrupted`),!b.mimeType.startsWith("image/"))throw new Error(`Image ${v+1} has invalid MIME type: ${b.mimeType}`)}let c=new Za.GoogleGenAI({apiKey:t}),g="gemini-2.5-flash",u=[e];n.length>0&&n.forEach((v,b)=>{u.push({inlineData:{data:v.base64,mimeType:v.mimeType}}),console.log(`[Gemini] Added image ${b+1}: ${v.mimeType}, size: ${Math.round(v.base64.length/1024)}KB`)}),console.log(`[Gemini] Making request with ${n.length} images and prompt length: ${e.length}`);let y=await c.models.generateContent({model:g,contents:u}),h="",w=(r=(s=(a=y.candidates)==null?void 0:a[0])==null?void 0:s.content)==null?void 0:r.parts;if(w)for(let v of w)v.text&&(h+=v.text);if(!h.trim())throw new Error("Empty response from Gemini API");return console.log(`[Gemini] Response received, length: ${h.length}`),h}catch(c){throw console.error("[Gemini] API error:",c),(o=c.message)!=null&&o.includes("Unable to process input image")?new Error("Unable to process the uploaded image. Please ensure it's a valid PNG, JPG, or JPEG file under 10MB and not corrupted."):(l=c.message)!=null&&l.includes("API_KEY_INVALID")?new Error("Invalid Gemini API key. Please check your API key configuration."):(d=c.message)!=null&&d.includes("QUOTA_EXCEEDED")?new Error("Gemini API quota exceeded. Please try again later or check your billing."):(p=c.message)!=null&&p.includes("SAFETY")?new Error("Content was flagged by Gemini safety filters. Please try with different images."):c}}var Qa=require("@google/genai");async function It(t,e,n=[],i={}){try{console.info("[GEMINI-REAL-SDK] Initializing GoogleGenAI...");let a=new Qa.GoogleGenAI({apiKey:t}),s=[{text:e}];n.length>0&&n.forEach((o,l)=>{console.info(`[GEMINI-REAL-SDK] Adding image part ${l}`),s.push({inlineData:{mimeType:o.mimeType,data:o.base64}})}),console.info("[GEMINI-REAL-SDK] Calling generateContent with model: gemini-2.5-flash-image");let r=await a.models.generateContent({model:"gemini-2.5-flash-image",contents:s});if(console.info("[GEMINI-REAL-SDK] Received response from model"),!r.candidates||!r.candidates[0]||!r.candidates[0].content||!r.candidates[0].content.parts)throw new Error("Gemini 2.5 Flash Image returned invalid response structure.");for(let o of r.candidates[0].content.parts)if(o.text)console.log(o.text);else if(o.inlineData){let l=o.inlineData.data,d=o.inlineData.mimeType||"image/png";return console.info("[GEMINI-REAL-SDK] Found inline image data in response"),`data:${d};base64,${l}`}throw new Error("Gemini 2.5 Flash Image returned no image data.")}catch(a){throw console.error("[GEMINI-REAL-SDK] Error in generateImageWithGemini25Flash:",JSON.stringify(a,Object.getOwnPropertyNames(a),2)),a}}var xo=require("pixi.js");Je();xt();Z();var ts=require("pixi.js");var Eo=require("pixi.js");Z();function jo(t){return new Promise((e,n)=>{let i=new FileReader;i.onerror=()=>n(new Error("FileReader failed")),i.onload=()=>e(String(i.result||"")),i.readAsDataURL(t)})}function Oo(t){var a;let[e,n]=t.split(","),i=e==null?void 0:e.match(/data:(.*?);base64/);return{base64:n!=null?n:"",mimeType:(a=i==null?void 0:i[1])!=null?a:"image/png"}}function Ro(t){return`
46
+ `,this.modal=i}attachModalListeners(){if(!this.modal)return;this.modal.querySelectorAll("[data-modal-close]").forEach(r=>{r.addEventListener("click",()=>this.close())}),this.modal.querySelectorAll("[data-tab]").forEach(r=>{r.addEventListener("click",o=>{let d=o.target.dataset.tab;d&&this.switchTab(d)})});let i=this.modal.querySelector("[data-ai-generate]");i==null||i.addEventListener("click",()=>{this.openAiEditor("generate")});let a=this.modal.querySelector("[data-ai-edit]");a==null||a.addEventListener("click",()=>{this.openAiEditor("edit")});let s=this.modal.querySelector("[data-modal-apply]");s==null||s.addEventListener("click",()=>{this.apply()}),this.modal.addEventListener("click",r=>{r.target===this.modal&&this.close()})}switchTab(e){if(!this.modal)return;this.modal.querySelectorAll("[data-tab]").forEach(a=>{a.classList.toggle("active",a.getAttribute("data-tab")===e)}),this.modal.querySelectorAll("[data-tab-panel]").forEach(a=>{a.classList.toggle("active",a.getAttribute("data-tab-panel")===e)})}openAiEditor(e){let n=window.__openAiEditor;if(typeof n!="function"){alert("AI Editor not available. Please check your setup.");return}let i="";e==="edit"&&this.currentAsset?i=`Edit this image: ${this.currentObjectId}`:i=`Create an image for: ${this.currentObjectId}`,n(this.currentObjectId||"unknown",i,this.currentAsset,{path:this.currentPath,onApply:a=>{this.onApplyCallback&&this.onApplyCallback(a),this.close()}})}apply(){this.onApplyCallback&&this.onApplyCallback("library/placeholder.png"),this.close()}close(){this.modal&&this.modal.parentNode&&this.modal.parentNode.removeChild(this.modal),this.modal=null,this.currentObjectId=null,this.currentPath=null,this.onApplyCallback=null}}});var el={};da(el,{AspectClass:()=>Hn,GameObject:()=>ct,GameObjectManager:()=>Dt,Renderer:()=>lt,ResponsiveUISystem:()=>Ue,Transform:()=>ot,animateHandClick:()=>Ss,animatePanelEntrance:()=>xs,createBrushTexture:()=>Ps,createEndGamePanel:()=>ws,createHandTutorial:()=>Es,createThreeBase:()=>ys,createTutorialLabel:()=>Cs,getAspectClass:()=>Ht,getRegisteredFontIds:()=>vs,loadAsset:()=>Fn,loadCharacterFrames:()=>ks,registerFont:()=>bs,resolveFont:()=>ee,resolveFontWeight:()=>te,updateHandAnimation:()=>As});module.exports=Sr(el);var W=ge(require("three"),1);var he={};function bt(t,e,n=!1){he[t]||(he[t]=[]),he[t].push({fn:e,once:n})}function Zt(t,e){if(he[t]){if(!e){delete he[t];return}he[t]=he[t].filter(n=>n.fn!==e)}}function vt(t,...e){let n=he[t];if(n)for(let i of[...n])i.fn(...e),i.once&&Zt(t,i.fn)}function B(t,e){bt(t,e,!0)}var M=null,V=[],Ie=null;function ha(t){M=t,V=[],Ie!==null&&(clearTimeout(Ie),Ie=null)}function ma(){var t,e,n;return{endpoint:(M==null?void 0:M.endpoint)||"",transport:(M==null?void 0:M.transport)||"beacon",batchSize:(t=M==null?void 0:M.batchSize)!=null?t:10,flushIntervalMs:(e=M==null?void 0:M.flushIntervalMs)!=null?e:300,maxQueue:(n=M==null?void 0:M.maxQueue)!=null?n:200,debug:!!(M!=null&&M.debug)}}async function ua(t,e,n,i){let a=JSON.stringify(e);if(n==="beacon"&&typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function")try{let s=navigator.sendBeacon(t,new Blob([a],{type:"application/json"}));i&&console.log("[handler.telemetry] beacon",s,e);return}catch(s){i&&console.warn("[handler.telemetry] beacon failed, fallback to fetch",s)}try{await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:a,keepalive:!0}),i&&console.log("[handler.telemetry] fetch",e)}catch(s){i&&console.warn("[handler.telemetry] fetch failed",s)}}function Qt(t,e){let n=ma();if(e&&n.endpoint){if(V.push(t),V.length>n.maxQueue&&(V=V.slice(V.length-n.maxQueue)),V.length>=n.batchSize){ga();return}Ie===null&&(Ie=window.setTimeout(()=>{Ie=null,ga()},n.flushIntervalMs))}}async function ga(){let t=ma();if(!t.endpoint||V.length===0)return;let e=V.splice(0,t.batchSize);await ua(t.endpoint,{events:e},t.transport,t.debug),V.length>0&&await ua(t.endpoint,{events:V.splice(0,t.batchSize)},t.transport,t.debug)}function fa(t){return Math.max(0,Math.min(1,t))}function Er(t){let e=String(t!=null?t:"power2.out");if(e==="linear")return n=>n;if(e==="sine.inOut")return n=>.5-Math.cos(Math.PI*n)/2;if(e==="power2.out"||e==="easeOutQuad")return n=>1-(1-n)*(1-n);if(e.startsWith("back.out")){let n=e.match(/back\.out\(([\d.]+)\)/),i=n?Number(n[1]):1.8;return a=>1+(i+1)*Math.pow(a-1,3)+i*Math.pow(a-1,2)}return n=>1-(1-n)*(1-n)}function Ye(){return typeof performance!="undefined"&&performance.now?performance.now():Date.now()}function Cr(t,e){let n=t==null?void 0:t[e];return typeof n=="number"?n:0}function ya(t,e,n){try{t[e]=n}catch{}}function Ar(t){let e=t==null?void 0:t.scale;if(!e)return null;let n=typeof e.x=="number"?e.x:1,i=typeof e.y=="number"?e.y:1;return{x:n,y:i}}function ba(t,e){let n=t==null?void 0:t.scale;if(n)try{typeof n.set=="function"?n.set(e.x,e.y):(typeof n.x=="number"&&(n.x=e.x),typeof n.y=="number"&&(n.y=e.y))}catch{}}function va(t,e){let n=Ar(t);if(!n)return{from:null,to:null};let i=null,a=null;return typeof e.scale=="number"?(i=e.scale,a=e.scale):e.scale&&typeof e.scale=="object"&&(typeof e.scale.x=="number"&&(i=e.scale.x),typeof e.scale.y=="number"&&(a=e.scale.y)),typeof e.scaleX=="number"&&(i=e.scaleX),typeof e.scaleY=="number"&&(a=e.scaleY),i===null&&a===null?{from:null,to:null}:{from:{x:n.x,y:n.y},to:{x:i!=null?i:n.x,y:a!=null?a:n.y}}}function wa(){let t=new Set,e=new WeakMap,n=null,i=()=>{if(n!=null)return;n=requestAnimationFrame(()=>{n=null,o(),t.size>0&&i()})},a=p=>{var g;t.add(p);let c=(g=e.get(p.target))!=null?g:new Set;c.add(p),e.set(p.target,c),i()},s=p=>{t.delete(p);let c=e.get(p.target);c&&(c.delete(p),c.size===0&&e.delete(p.target))},r=p=>{p.killed||(p.killed=!0,s(p))},o=()=>{var c,g;let p=Ye();for(let u of Array.from(t)){if(u.killed||u.paused)continue;let y=p-u.startMs-u.delayMs;if(y<0)continue;let h=u.durationMs>0?y/u.durationMs:1,w=fa(h),v=u.repeat>=0?u.repeat+1:1,b=u.repeat>0?Math.min(Math.floor(h),v-1):0;if(u.repeat>0&&h>=1){let S=h-b;w=fa(S)}let m=u.ease(w);u.yoyo&&b%2===1&&(m=1-m);for(let S of u.props)ya(u.target,S.key,S.from+(S.to-S.from)*m);u.scaleFrom&&u.scaleTo&&ba(u.target,{x:u.scaleFrom.x+(u.scaleTo.x-u.scaleFrom.x)*m,y:u.scaleFrom.y+(u.scaleTo.y-u.scaleFrom.y)*m});try{(c=u.onUpdate)==null||c.call(u)}catch{}if(h>=v){r(u);try{(g=u.onComplete)==null||g.call(u)}catch{}}}},l=(p,c,g)=>{var S;let u=Math.max(0,(typeof c.duration=="number"?c.duration:.5)*1e3),y=Math.max(0,(typeof c.delay=="number"?c.delay:0)*1e3+((S=g==null?void 0:g.delayMsOverride)!=null?S:0)),h=Er(c.ease),w=typeof c.repeat=="number"?Math.max(0,c.repeat|0):0,v=c.yoyo===!0,b=new Set(["duration","delay","ease","repeat","yoyo","onUpdate","onComplete","scale","scaleX","scaleY"]),m=[];for(let E of Object.keys(c)){if(b.has(E))continue;let C=c[E];typeof C=="number"&&m.push({key:E,from:Cr(p,E),to:C})}let f=va(p,c);return{target:p,startMs:Ye(),delayMs:y,durationMs:u,ease:h,props:m,scaleFrom:f.from,scaleTo:f.to,repeat:w,yoyo:v,onUpdate:typeof c.onUpdate=="function"?c.onUpdate:void 0,onComplete:typeof c.onComplete=="function"?c.onComplete:void 0,killed:!1,paused:!1,pauseAtMs:null}},d={to(p,c){let g=l(p,c);return a(g),{kill:()=>r(g),pause:()=>{g.paused||(g.paused=!0,g.pauseAtMs=Ye())},resume:()=>{var h;if(!g.paused)return;let u=(h=g.pauseAtMs)!=null?h:Ye(),y=Ye()-u;g.startMs+=y,g.paused=!1,g.pauseAtMs=null},isActive:()=>!g.killed&&!g.paused}},fromTo(p,c,g){return d.set(p,c),d.to(p,g)},set(p,c){if(!p||!c)return;for(let u of Object.keys(c)){let y=c[u];u==="scale"||u==="scaleX"||u==="scaleY"||typeof y=="number"&&ya(p,u,y)}let g=va(p,c);g.to&&ba(p,g.to)},killTweensOf(p){let c=e.get(p);if(c)for(let g of Array.from(c))r(g)},timeline(p={}){let c=[],g=0,u=!1,y=[],h=b=>{if(typeof b=="number")return Math.max(0,b*1e3);let m=typeof b=="string"?b.trim():"";return m.startsWith("+=")?g+Math.max(0,Number(m.slice(2))*1e3||0):m?Math.max(0,Number(m)*1e3||0):g},w=b=>{c.push(b);let m=Math.max(0,(typeof b.vars.duration=="number"?b.vars.duration:.5)*1e3);g=Math.max(g,b.atMs+m)},v={to(b,m,f){return w({kind:"to",target:b,vars:m,atMs:h(f)}),v},fromTo(b,m,f,S){return w({kind:"fromTo",target:b,vars:f,from:m,atMs:h(S)}),v},play(){var b,m;if(u)return v;u=!0,y=[];for(let f of c)f.kind==="fromTo"&&d.set(f.target,(b=f.from)!=null?b:{}),y.push(d.to(f.target,{...f.vars,delay:f.atMs/1e3+((m=f.vars.delay)!=null?m:0)}));return v},pause(){for(let b of y)b.pause();return v},kill(){for(let b of y)b.kill();y=[],u=!1}};return p.paused||v.play(),v}};return d}function xa(){if(typeof window=="undefined")return;let t=window;if(!t.gsap)try{t.gsap=wa()}catch{}}var Sa={name:"handler-playable-sdk",version:"1.0.83",type:"module",description:"Handler Playable SDK v0.1 with contract-aligned surface (root sandbox, canonical event envelope).",main:"dist/index.cjs",module:"dist/index.js",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs"},"./pixi":{types:"./dist/pixi/index.d.ts",import:"./dist/pixi/index.js",require:"./dist/pixi/index.cjs"},"./pixi/index.css":{import:"./dist/pixi/index.css",require:"./dist/pixi/index.css"},"./three":{types:"./dist/three/index.d.ts",import:"./dist/three/index.js",require:"./dist/three/index.cjs"},"./cli":{types:"./dist/cli/index.d.ts",import:"./dist/cli/index.js",require:"./dist/cli/index.cjs"}},bin:{"handler-student-helper":"./bin/student-helper.mjs","handler-validate":"./bin/validate.mjs","handler-sync-screens":"./bin/sync-screens.mjs","handler-brand-dna":"./bin/brand-dna.mjs","handler-setup-library":"./bin/setup-library.mjs","handler-screen-helper":"./bin/screen-helper.mjs"},scripts:{prebuild:"python3 src/preview/build-css.py",build:"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --minify --external lottie-web --external jszip && npm run create-mjs-symlinks && npm run postbuild-cli && npm run obfuscate && npm run postbuild",postbuild:"python3 src/preview/copy-css-to-dist.py","postbuild-cli":"cp src/cli/*.mjs dist/cli/ && mkdir -p dist/cli/student-helper && cp src/cli/student-helper/*.mjs dist/cli/student-helper/ && chmod +x dist/cli/*.mjs dist/cli/student-helper/*.mjs && chmod +x bin/*.mjs","create-mjs-symlinks":"cd dist && ln -sf index.js index.mjs && cd pixi && ln -sf index.js index.mjs && cd ../three && ln -sf index.js index.mjs","build:dev":"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --external lottie-web --external jszip && npm run create-mjs-symlinks && npm run postbuild-cli",obfuscate:"javascript-obfuscator dist/pixi/index.js --output dist/pixi/index.js --config obfuscator.config.json && javascript-obfuscator dist/three/index.js --output dist/three/index.js --config obfuscator.config.json && javascript-obfuscator dist/cli/index.js --output dist/cli/index.js --config obfuscator.config.json && npm run obfuscate-cli","obfuscate-cli":'for file in dist/cli/*.mjs dist/cli/student-helper/*.mjs; do javascript-obfuscator "$file" --output "$file" --config obfuscator.config.json; done',lint:"eslint 'src/**/*.{ts,tsx}'",typecheck:"tsc --noEmit",prepublishOnly:"npm run build","publish:update":"node scripts/publish-and-update.cjs patch","publish:update:minor":"node scripts/publish-and-update.cjs minor","publish:update:major":"node scripts/publish-and-update.cjs major"},author:"Handler",license:"MIT",publishConfig:{access:"public"},repository:{type:"git",url:"https://github.com/HandlerAIGames/handler-playable-sdk.git"},files:["dist","bin","LICENSE","README.md"],peerDependencies:{"lottie-web":"^5.0.0","pixi.js":"^8.0.0",three:"^0.182.0"},peerDependenciesMeta:{"pixi.js":{optional:!0},three:{optional:!0},"lottie-web":{optional:!0}},devDependencies:{"@types/three":"^0.182.0",eslint:"^9.39.2","javascript-obfuscator":"^5.1.0","pixi.js":"8.8.1",three:"^0.182.0","ts-node":"^10.9.2",tsup:"^8.4.0",typescript:"^5.7.2","typescript-eslint":"^8.53.0"},dependencies:{"@google/genai":"^1.35.0","@google/generative-ai":"^0.24.1",jszip:"^3.10.1",sharp:"^0.34.5"}};var G=0,Lr=G++,Ea=G++,Ca=G++,Aa=G++,Ta=G++,La=G++,ka=G++,Pa=G++,Ma=G++,_a=G++,Ia=G++,ja=G++,T=Lr;function Oa(){return T===Ea}function Ra(){return T===Ca}function za(){return T===Aa}function $a(){return T===Ta}function je(){return T===La}function Oe(){return T===ka}function Ha(){return T===Pa}function Da(){return T===Ma}function Na(){return T===_a}function en(){return T===Ia}function tn(){return T===ja}function Fa(){let t=typeof AD_PROTOCOL!="undefined"?AD_PROTOCOL:"none",e=typeof AD_NETWORK!="undefined"?AD_NETWORK:"web_embed";if(t==="mraid")try{mraid.getState(),T=Ea;return}catch{}else if(t==="dapi")try{dapi.isReady(),T=Ca;return}catch{}if(e==="facebook")try{typeof FbPlayableAd!="undefined"&&(T=Aa)}catch{}else if(e==="google")try{typeof ExitApi!="undefined"&&(T=Ta)}catch{}else if(e==="mintegral")window.gameReady&&(T=La);else if(e==="tapjoy")window.TJ_API&&(T=ka);else if(e==="tiktok")window.openAppStore&&(T=Pa);else if(e==="smadex")try{window.smxTracking&&(T=Ma)}catch{}else if(e==="snapchat")try{window.ScPlayableAd&&(T=_a)}catch{}else e==="vungle"?T=Ia:(t==="nucleo"||e==="nucleo")&&(T=ja)}var wt=ge(require("lottie-web"),1),Ba=wt.default;typeof window!="undefined"&&(window.lottie=wt.default,window.__baseLottie=wt.default);var kr=require("pixi.js");var nn=require("pixi.js");var Pr=null;function an(t){Pr=t}St();xt();var Xe=require("pixi.js");St();var Rr=typeof __BUILD_MODE__!="undefined"?__BUILD_MODE__:"undefined",ln=Rr;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&&(ln=e.buildMode,console.log(`[ObjectFactory] Build mode overridden by settings: ${ln}`))}}catch{}function zr(t){var n,i,a,s,r;if(typeof window!="undefined"&&window.resolveAnchorVec2)return window.resolveAnchorVec2(t);let e={center:{x:.5,y:.5},"top-left":{x:0,y:0},"top-center":{x:.5,y:0},"top-right":{x:1,y:0},"center-left":{x:0,y:.5},"center-right":{x:1,y:.5},"bottom-left":{x:0,y:1},"bottom-center":{x:.5,y:1},"bottom-right":{x:1,y:1},left:{x:0,y:.5},right:{x:1,y:.5},top:{x:.5,y:0},bottom:{x:.5,y:1}};if(Array.isArray(t))return{x:(n=t[0])!=null?n:.5,y:(i=t[1])!=null?i:.5};if(t&&typeof t=="object"&&"x"in t&&"y"in t)return{x:(a=t.x)!=null?a:.5,y:(s=t.y)!=null?s:.5};if(typeof t=="string"){let o=t.trim().toLowerCase();return(r=e[o])!=null?r:{x:.5,y:.5}}return null}var fe=class{static async create(e,n,i){var l,d,p,c,g,u,y;console.log(`[ObjectFactory] create() called for: ${e}, __BUILD_MODE__: ${ln}`);let a=(l=n==null?void 0:n.render)==null?void 0:l.asset;if(!a){console.log(`[ObjectFactory] No asset definition for: ${e}, returning empty container`);let h=new Xe.Container;return this.applyTransform(h,n==null?void 0:n.transform,n),h}let s=(d=n==null?void 0:n.identity)==null?void 0:d.id;console.log(`[ObjectFactory] Calling AssetLoader.load() for: ${e}, configId: ${s}, type: ${a.type}, path: ${a.path}`);let r=await Ce.load(e,a,i,s);console.log(`[ObjectFactory] AssetLoader.load() completed for: ${e}, rawAsset type: ${(p=r==null?void 0:r.constructor)==null?void 0:p.name}`);let o;if(a.type==="image")console.log("[ObjectFactory] Creating Sprite from texture:",r,"for object:",e),o=new Xe.Sprite(r),console.log("[ObjectFactory] Created object:",o,"type:",(c=o==null?void 0:o.constructor)==null?void 0:c.name),this.applyTransform(o,n==null?void 0:n.transform,n);else if(a.type==="json")if(console.log("[ObjectFactory] JSON asset for",e,"rawAsset type:",(g=r==null?void 0:r.constructor)==null?void 0:g.name,r),r&&(((u=r.constructor)==null?void 0:u.name)==="Container"||r instanceof Xe.Container)){console.warn("[ObjectFactory] JSON asset is Container (from cache), reloading JSON directly");let h=[a.path,`/assets/${a.path}`,`assets/${a.path}`,`../assets/${a.path}`],w=!1;for(let v of h)try{let b=await fetch(v);if(b.ok){o=await b.json(),console.log("[ObjectFactory] Reloaded JSON directly from:",v,"type:",(y=o==null?void 0:o.constructor)==null?void 0:y.name),w=!0;break}}catch{continue}w||(console.error("[ObjectFactory] Failed to reload JSON from any path"),o=r)}else o=r;else o=r,o&&typeof o=="object"&&("x"in o||"position"in o)&&this.applyTransform(o,n==null?void 0:n.transform,n);return o}static applyTransform(e,n,i){var a,s,r,o;if(!(!n||!e)&&(n.position&&("x"in e&&"y"in e?(e.x=(a=n.position.x)!=null?a:0,e.y=(s=n.position.y)!=null?s:0):"position"in e&&e.position&&e.position.set((r=n.position.x)!=null?r: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)){let l=zr(n.anchor);l&&("set"in e.anchor?e.anchor.set(l.x,l.y):(e.anchor.x=l.x,e.anchor.y=l.y))}}};var Ke=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 Dr=ge(require("pixi.js"),1);typeof window!="undefined"&&(window.__basePixi=Dr);Je();var Ct=require("pixi.js");Je();var dn=class{constructor(){this.instanceCache=new Map;this.readyPromise=null;this.app=null;this.registry=new Ke}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 o;let r=this.registry.get(s);if(!r){console.warn("[Assets] No config found for object:",s);return}try{let l=await fe.create(s,r,this.app);this.instanceCache.set(s,l),console.log("[Assets] Loaded object:",s,(o=l==null?void 0:l.constructor)==null?void 0:o.name)}catch(l){console.error("[Assets] Failed to load object:",s,l)}})))};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)}},Fr=new dn,Br=new Proxy(Fr,{get(t,e){if(e in t&&typeof t[e]=="function")return t[e].bind(t);if(t.get(e))return t.get(e)}});Je();var qr=require("pixi.js"),le={width:400,height:600,designWidth:400,scaleFactor:1},Tt={scale:1,position:1},un=[];function Vr(t,e,n,i,a,s,r){un.push({element:t,originalScale:s,positionHelper:e,heightPercent:a}),e(t,n,i,a,s,r,!1)}function Wr(){un.forEach(({element:t,originalScale:e,positionHelper:n,heightPercent:i})=>{let a=e*le.scaleFactor;n(t,le.width,le.height,i,a,!0,!1)})}function pn(t,e){console.log(`[SCREEN] updateScreenState called: ${t}x${e}`),le.width=t,le.height=e,le.scaleFactor=Math.min(t/le.designWidth,1.15),Tt.scale=le.scaleFactor,Tt.position=1,console.log(`[SCREEN] Global multipliers - scale: ${Tt.scale.toFixed(3)}`),Wr()}var Qe={layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:1,screen_scale_y:1},engine:{scale:1,background_scale:1.05,background_offset_y:0,background_alpha:.98,label_pulse_speed:3,label_pulse_intensity:.03}};function Yr(t,e,n){let i=Qe[t];i&&i[e]!==void 0&&(i[e]=n,console.log(`Updated ${t}.${e} = ${n}`))}function Xr(){return Qe}var Kr={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 At(t,e){return typeof t=="number"&&Number.isFinite(t)?t:e}function et(t,e={x:.5,y:.5}){var n;if(Array.isArray(t))return{x:At(t[0],e.x),y:At(t[1],e.y)};if(t&&typeof t=="object"){let i=t;return{x:At(i.x,e.x),y:At(i.y,e.y)}}if(typeof t=="string"){let i=t.trim().toLowerCase();return(n=Kr[i])!=null?n:e}return e}function gn(t,e,n,i={}){var u,y,h,w,v,b;let a=et(n),s=(u=i.inset)!=null?u:{},r=(y=i.padding)!=null?y:{x:0,y:0},o=((h=s.left)!=null?h:0)+r.x,l=((w=s.right)!=null?w:0)+r.x,d=((v=s.top)!=null?v:0)+r.y,p=((b=s.bottom)!=null?b:0)+r.y,c=Math.max(0,t-o-l),g=Math.max(0,e-d-p);return{x:o+c*a.x,y:d+g*a.y}}function hn(t,e,n,i={}){var h,w,v,b,m,f;let a=(h=i.inset)!=null?h:{},s=(w=i.padding)!=null?w:{x:0,y:0},r=((v=a.left)!=null?v:0)+s.x,o=((b=a.right)!=null?b:0)+s.x,l=((m=a.top)!=null?m:0)+s.y,d=((f=a.bottom)!=null?f:0)+s.y,p=Math.max(0,t-r-o),c=Math.max(0,e-l-d),g=et(n,{x:.5,y:.5}),u=Math.min(Math.max(g.x,0),1),y=Math.min(Math.max(g.y,0),1);return{x:r+p*u,y:l+c*y}}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,pn(i,a))};window.addEventListener("resize",n),window.addEventListener("orientationchange",()=>{setTimeout(n,100)}),window.mraid&&(window.mraid.addEventListener("viewableChange",n),window.mraid.addEventListener("sizeChange",n)),pn(window.innerWidth,window.innerHeight),window.updateDebugConfig=Yr,window.getDebugConfig=Xr,window.copyConfig=oo,window.applyConfig=Ze,window.applyConfigForRatio=lo,window.positionAtBottom=Va,window.positionAtTop=Qr,window.positionAtCenter=eo,window.positionAtLeft=to,window.positionAtRight=no,window.positionAtBottomLeft=io,window.positionAtBottomRight=ao,window.positionAtTopLeft=so,window.positionAtTopRight=ro,window.applyPositionContract=Zr,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 Lt(t,e,n=0){return t*e+n}function kt(t,e,n=0){return t*(1-e)+n}function Pt(t,e,n=0){return t*e+n}function Mt(t,e,n=0){return t*(1-e)+n}function U(t,e=0){return t/2+e}function Jr(t,e){return t*e}function Zr(t,e,n,i){var r,o,l,d,p,c,g,u,y,h,w,v,b,m,f,S,E,C,P,I;let a=0,s=0;switch(i.type){case"top":a=U(e,(o=(r=i.offset)==null?void 0:r.x)!=null?o:0),s=Lt(n,i.percent,(d=(l=i.offset)==null?void 0:l.y)!=null?d:0);break;case"bottom":a=U(e,(c=(p=i.offset)==null?void 0:p.x)!=null?c:0),s=kt(n,i.percent,(u=(g=i.offset)==null?void 0:g.y)!=null?u:0);break;case"left":a=Pt(e,i.percent,(h=(y=i.offset)==null?void 0:y.x)!=null?h:0),s=U(n,(v=(w=i.offset)==null?void 0:w.y)!=null?v:0);break;case"right":a=Mt(e,i.percent,(m=(b=i.offset)==null?void 0:b.x)!=null?m:0),s=U(n,(S=(f=i.offset)==null?void 0:f.y)!=null?S:0);break;case"center":a=U(e,(C=(E=i.offset)==null?void 0:E.x)!=null?C:0),s=U(n,(I=(P=i.offset)==null?void 0:P.y)!=null?I: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 Va(t,e,n,i=.2,a=1,s=!0,r=!1){let o=Jr(n,i),l=kt(n,i/2);ce(t,U(e),l);let d=s?a*le.scaleFactor:a;de(t,d),r&&!un.find(p=>p.element===t)&&Vr(t,Va,e,n,i,a,s)}function Qr(t,e,n,i=.1,a=1){ce(t,U(e),Lt(n,i)),de(t,a)}function eo(t,e,n,i=0,a=0,s=1){ce(t,U(e,i),U(n,a)),de(t,s)}function to(t,e,n,i=.1,a=1){ce(t,Pt(e,i),U(n)),de(t,a)}function no(t,e,n,i=.1,a=1){ce(t,Mt(e,i),U(n)),de(t,a)}function io(t,e,n,i=.05,a=.05,s=1){ce(t,Pt(e,a),kt(n,i)),de(t,s)}function ao(t,e,n,i=.05,a=.05,s=1){ce(t,Mt(e,a),kt(n,i)),de(t,s)}function so(t,e,n,i=.05,a=.05,s=1){ce(t,Pt(e,a),Lt(n,i)),de(t,s)}function ro(t,e,n,i=.05,a=.05,s=1){ce(t,Mt(e,a),Lt(n,i)),de(t,s)}function ce(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 de(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 Ae={default:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:1,screen_scale_y:1},engine:{scale:1,background_scale:1.05,background_offset_y:0,background_alpha:.98,label_pulse_speed:3,label_pulse_intensity:.03}},wide:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:.9,screen_scale_y:1.1},engine:{scale:1,background_scale:1.1,background_offset_y:0,background_alpha:.95,label_pulse_speed:3,label_pulse_intensity:.03}},square:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:.85,screen_scale_y:.85},engine:{scale:1,background_scale:1,background_offset_y:0,background_alpha:1,label_pulse_speed:3,label_pulse_intensity:.03}},tall:{layout:{scale_multiplier:1,position_offset:{x:0,y:0},debug_rect_visible:!0,debug_rect_color:16711680,debug_rect_thickness:4,debug_rect_scale_x:1,debug_rect_scale_y:1,screen_scale_x:1.1,screen_scale_y:.9},engine:{scale:1,background_scale:.95,background_offset_y:0,background_alpha:1,label_pulse_speed:3,label_pulse_intensity:.03}}};function oo(t){return t&&Ae[t]?JSON.parse(JSON.stringify(Ae[t])):JSON.parse(JSON.stringify(Qe))}function Ze(t){Object.keys(t).forEach(e=>{let n=e;Qe[n]&&t[n]&&Object.assign(Qe[n],t[n])}),console.log("Config applied:",t)}function lo(t,e){let n=t/e;n>1.6?(Ze(Ae.wide),console.log("Applied WIDE config for ratio:",n)):n<.7?(Ze(Ae.tall),console.log("Applied TALL config for ratio:",n)):n>.8&&n<1.2?(Ze(Ae.square),console.log("Applied SQUARE config for ratio:",n)):(Ze(Ae.default),console.log("Applied DEFAULT config for ratio:",n))}if(typeof window!="undefined"){let t=window;t.configPresets=Ae,t.resolveAnchorVec2=t.resolveAnchorVec2||et,t.resolveScreenAnchorPoint=t.resolveScreenAnchorPoint||gn,t.resolveScreenRatioPoint=t.resolveScreenRatioPoint||hn}yn();function _(t,e){let n=(a,s)=>s===0?a:n(s,a%s),i=n(t,e);return`${t/i}:${e/i}`}var Wc=[{id:"iphone-15-pro-max",label:"iPhone 15 Pro Max",width:430,height:932,category:"iphone",ratio:_(430,932)},{id:"iphone-15-pro",label:"iPhone 15 Pro",width:393,height:852,category:"iphone",ratio:_(393,852)},{id:"iphone-15",label:"iPhone 15",width:393,height:852,category:"iphone",ratio:_(393,852)},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"iphone",ratio:_(390,844)},{id:"iphone-se",label:"iPhone SE",width:375,height:667,category:"iphone",ratio:_(375,667)},{id:"iphone-12-mini",label:"iPhone 12 Mini",width:360,height:780,category:"iphone",ratio:_(360,780)}],Yc=[{id:"pixel-8-pro",label:"Pixel 8 Pro",width:448,height:998,category:"android",ratio:_(448,998)},{id:"pixel-8",label:"Pixel 8",width:412,height:915,category:"android",ratio:_(412,915)},{id:"samsung-s24-ultra",label:"Samsung S24 Ultra",width:412,height:915,category:"android",ratio:_(412,915)},{id:"samsung-s24",label:"Samsung S24",width:360,height:780,category:"android",ratio:_(360,780)},{id:"samsung-a54",label:"Samsung A54",width:412,height:915,category:"android",ratio:_(412,915)},{id:"oneplus-12",label:"OnePlus 12",width:412,height:915,category:"android",ratio:_(412,915)}],Xc=[{id:"ipad-pro-12",label:'iPad Pro 12.9"',width:1024,height:1366,category:"tablet",ratio:_(1024,1366)},{id:"ipad-pro-11",label:'iPad Pro 11"',width:834,height:1194,category:"tablet",ratio:_(834,1194)},{id:"ipad-air",label:"iPad Air",width:820,height:1180,category:"tablet",ratio:_(820,1180)},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"tablet",ratio:_(768,1024)},{id:"samsung-tab-s9",label:"Samsung Tab S9",width:800,height:1280,category:"tablet",ratio:_(800,1280)}],Ka=[{id:"playable-portrait",label:"Playable Portrait",width:320,height:480,category:"playable",ratio:"2:3",mraidScale:1},{id:"mraid-320x480",label:"MRAID 320\xD7480",width:320,height:480,category:"playable",ratio:"2:3",mraidScale:1},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"playable",ratio:_(390,844),mraidScale:.7},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"playable",ratio:_(768,1024),mraidScale:.7}];var Kc=[...Ka];var yo=Ka[0];Z();function bo(t){return new Promise((e,n)=>{let i=new FileReader;i.onerror=()=>n(new Error("FileReader failed")),i.onload=()=>e(String(i.result||"")),i.readAsDataURL(t)})}function vo(t){var a;let[e,n]=t.split(","),i=e==null?void 0:e.match(/data:(.*?);base64/);return{base64:n!=null?n:"",mimeType:(a=i==null?void 0:i[1])!=null?a:"image/png"}}async function wo(t){return await new Promise(e=>{let n=new Image;n.onload=()=>e({width:n.naturalWidth||n.width,height:n.naturalHeight||n.height}),n.onerror=()=>e(null),n.src=t})}async function vn(t){var e,n;try{console.log("[ImageUtils] Fetching image data from URL:",t);let i=await fetch(t);if(!i.ok)return console.warn("[ImageUtils] Fetch failed with status:",i.status,t),null;let a=await i.blob();console.log("[ImageUtils] Blob received, size:",a.size,"type:",a.type);let s=await bo(a),r=await wo(s),o=vo(s);return console.log("[ImageUtils] Success resolution:",r==null?void 0:r.width,"x",r==null?void 0:r.height,"mime:",o.mimeType),{base64:o.base64,mimeType:o.mimeType,dataUrl:s,width:(e=r==null?void 0:r.width)!=null?e:0,height:(n=r==null?void 0:r.height)!=null?n:0}}catch(i){return console.error("[ImageUtils] Error fetching image data:",i),null}}async function _t(t,e=30){try{console.log("[ImageUtils] Removing background color...");let n=await new Promise((c,g)=>{let u=new Image;u.onload=()=>c(u),u.onerror=()=>g(new Error("Failed to load image")),u.src=t}),i=document.createElement("canvas");i.width=n.width,i.height=n.height;let a=i.getContext("2d");if(!a)return console.error("[ImageUtils] Failed to get canvas context"),t;a.drawImage(n,0,0);let s=a.getImageData(0,0,i.width,i.height),r=s.data,l=[{name:"top-left",offset:0},{name:"top-right",offset:(i.width-1)*4},{name:"bottom-left",offset:(i.height-1)*i.width*4},{name:"bottom-right",offset:((i.height-1)*i.width+(i.width-1))*4}].map(c=>({r:r[c.offset],g:r[c.offset+1],b:r[c.offset+2]})),d=0;for(let c=0;c<r.length;c+=4){let g=r[c],u=r[c+1],y=r[c+2],h=!1;for(let w of l)if(Math.sqrt(Math.pow(g-w.r,2)+Math.pow(u-w.g,2)+Math.pow(y-w.b,2))<e){h=!0;break}h&&(r[c+3]=0,d++)}return console.log(`[ImageUtils] Removed background from ${d} pixels (4-corner sampling, tolerance: ${e})`),a.putImageData(s,0,0),i.toDataURL("image/png")}catch(n){return console.error("[ImageUtils] Error removing background:",n),t}}var Za=require("@google/genai");async function wn(t,e,n=[],i={}){var a,s,r,o,l,d,p;try{if(!(t!=null&&t.trim()))throw new Error("Gemini API key is required");if(!(e!=null&&e.trim()))throw new Error("Prompt is required");for(let v=0;v<n.length;v++){let b=n[v];if(!b.base64||!b.mimeType)throw new Error(`Image ${v+1} is missing required data`);if(b.base64.length<1e3&&console.warn(`Image ${v+1} data appears very small, may be corrupted`),!b.mimeType.startsWith("image/"))throw new Error(`Image ${v+1} has invalid MIME type: ${b.mimeType}`)}let c=new Za.GoogleGenAI({apiKey:t}),g="gemini-2.5-flash",u=[e];n.length>0&&n.forEach((v,b)=>{u.push({inlineData:{data:v.base64,mimeType:v.mimeType}}),console.log(`[Gemini] Added image ${b+1}: ${v.mimeType}, size: ${Math.round(v.base64.length/1024)}KB`)}),console.log(`[Gemini] Making request with ${n.length} images and prompt length: ${e.length}`);let y=await c.models.generateContent({model:g,contents:u}),h="",w=(r=(s=(a=y.candidates)==null?void 0:a[0])==null?void 0:s.content)==null?void 0:r.parts;if(w)for(let v of w)v.text&&(h+=v.text);if(!h.trim())throw new Error("Empty response from Gemini API");return console.log(`[Gemini] Response received, length: ${h.length}`),h}catch(c){throw console.error("[Gemini] API error:",c),(o=c.message)!=null&&o.includes("Unable to process input image")?new Error("Unable to process the uploaded image. Please ensure it's a valid PNG, JPG, or JPEG file under 10MB and not corrupted."):(l=c.message)!=null&&l.includes("API_KEY_INVALID")?new Error("Invalid Gemini API key. Please check your API key configuration."):(d=c.message)!=null&&d.includes("QUOTA_EXCEEDED")?new Error("Gemini API quota exceeded. Please try again later or check your billing."):(p=c.message)!=null&&p.includes("SAFETY")?new Error("Content was flagged by Gemini safety filters. Please try with different images."):c}}var Qa=require("@google/genai");async function It(t,e,n=[],i={}){try{console.info("[GEMINI-REAL-SDK] Initializing GoogleGenAI...");let a=new Qa.GoogleGenAI({apiKey:t}),s=[{text:e}];n.length>0&&n.forEach((o,l)=>{console.info(`[GEMINI-REAL-SDK] Adding image part ${l}`),s.push({inlineData:{mimeType:o.mimeType,data:o.base64}})}),console.info("[GEMINI-REAL-SDK] Calling generateContent with model: gemini-2.5-flash-image");let r=await a.models.generateContent({model:"gemini-2.5-flash-image",contents:s});if(console.info("[GEMINI-REAL-SDK] Received response from model"),!r.candidates||!r.candidates[0]||!r.candidates[0].content||!r.candidates[0].content.parts)throw new Error("Gemini 2.5 Flash Image returned invalid response structure.");for(let o of r.candidates[0].content.parts)if(o.text)console.log(o.text);else if(o.inlineData){let l=o.inlineData.data,d=o.inlineData.mimeType||"image/png";return console.info("[GEMINI-REAL-SDK] Found inline image data in response"),`data:${d};base64,${l}`}throw new Error("Gemini 2.5 Flash Image returned no image data.")}catch(a){throw console.error("[GEMINI-REAL-SDK] Error in generateImageWithGemini25Flash:",JSON.stringify(a,Object.getOwnPropertyNames(a),2)),a}}var xo=require("pixi.js");Je();xt();Z();var ts=require("pixi.js");var Eo=require("pixi.js");Z();function jo(t){return new Promise((e,n)=>{let i=new FileReader;i.onerror=()=>n(new Error("FileReader failed")),i.onload=()=>e(String(i.result||"")),i.readAsDataURL(t)})}function Oo(t){var a;let[e,n]=t.split(","),i=e==null?void 0:e.match(/data:(.*?);base64/);return{base64:n!=null?n:"",mimeType:(a=i==null?void 0:i[1])!=null?a:"image/png"}}function Ro(t){return`
47
47
  Analyze these screenshots of a brand or game and extract its "Brand DNA".
48
48
 
49
49
  Provide a concise summary (2-3 sentences) covering: