handler-playable-sdk 1.0.48 → 1.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-WE3O2OX5.js → chunk-GP26YPPA.js} +66 -66
- package/dist/cli/brand-dna.mjs +1 -1
- package/dist/cli/canva-import.mjs +1 -1
- package/dist/cli/cleanup-assets.mjs +1 -1
- package/dist/cli/fix-scales.mjs +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/screen-helper.mjs +1 -1
- package/dist/cli/setup-library.mjs +1 -1
- package/dist/cli/student-helper/add-logic.mjs +1 -1
- package/dist/cli/student-helper/add-object.mjs +1 -1
- package/dist/cli/student-helper/arg-parsing.mjs +1 -1
- package/dist/cli/student-helper/asset-registry.mjs +1 -1
- package/dist/cli/student-helper/bullet-system.mjs +1 -1
- package/dist/cli/student-helper/collectable-system.mjs +1 -1
- package/dist/cli/student-helper/constants.mjs +1 -1
- package/dist/cli/student-helper/drag-snap-couples.mjs +1 -1
- package/dist/cli/student-helper/endgame-screen.mjs +1 -1
- package/dist/cli/student-helper/fs-io.mjs +1 -1
- package/dist/cli/student-helper/logic-defaults.mjs +1 -1
- package/dist/cli/student-helper/print-help.mjs +1 -1
- package/dist/cli/student-helper/prompts.mjs +1 -1
- package/dist/cli/student-helper/scratch-card.mjs +1 -1
- package/dist/cli/student-helper/screen-utils.mjs +1 -1
- package/dist/cli/student-helper/snippets.mjs +1 -1
- package/dist/cli/student-helper/start-screen.mjs +1 -1
- package/dist/cli/student-helper/swerve-collect.mjs +1 -1
- package/dist/cli/student-helper/tap-destroy.mjs +1 -1
- package/dist/cli/student-helper/template-packs.mjs +1 -1
- package/dist/cli/student-helper.mjs +1 -1
- package/dist/cli/sync-screens.mjs +1 -1
- package/dist/cli/validate-assets.mjs +1 -1
- package/dist/cli/validate.mjs +1 -1
- package/dist/index.cjs +88 -88
- package/dist/index.js +1 -1
- package/dist/pixi/index.cjs +8 -8
- package/dist/pixi/index.js +1 -1
- package/dist/three/index.cjs +1 -1
- package/dist/three/index.js +1 -1
- package/package.json +1 -1
package/dist/pixi/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x53f213,_0x552974){var a0_0x3adf33={_0x1cb1b7:0x10a,_0x1dd70f:0x101,_0x3f6e39:'ac0Q',_0x4627b0:0xe5,_0x5d7a4e:0xed,_0x33393f:'(QS7',_0x4808a6:0x14b,_0x3f1072:0x144,_0x16b353:0x13d,_0x5808e3:0x139,_0x335051:'cG5R',_0x577c6e:0x14e,_0x3f495d:0x141,_0x2ef009:0x14f,_0x48d975:0x130,_0x521d4b:0x126,_0x37f406:0x118,_0x76a483:0xf0,_0x4a4fdb:0x142,_0x40d0b0:'ZBLY',_0x293739:0x137,_0x17c0cf:0x12b,_0x492caf:0x100,_0x116ae9:0x103,_0x3abe71:0xff,_0x50a821:'ac0Q',_0x1b472e:0xf7,_0x3f3077:0x13c,_0xa80fc0:0x135},a0_0x84da81={_0x315f17:0x74},a0_0xcbddb={_0x49404d:0x34},a0_0x29e9bf={_0x1bd86f:0x29};function _0x229566(_0xb3790,_0x55002a,_0x29f54c,_0x50ba23,_0x434346){return a0_0x2d60(_0x50ba23- -a0_0x29e9bf._0x1bd86f,_0x55002a);}function _0x42dd6d(_0x1db5eb,_0x43166d,_0x3f2c27,_0x938556,_0x478bbe){return a0_0x2d60(_0x3f2c27- -a0_0xcbddb._0x49404d,_0x478bbe);}var _0x54f849=_0x53f213();function _0x18567d(_0x1bf899,_0x17a02f,_0x3f9231,_0x1093ae,_0x93424d){return a0_0x2d60(_0x3f9231- -a0_0x84da81._0x315f17,_0x1093ae);}while(!![]){try{var _0x4b8dd2=-parseInt(_0x18567d(a0_0x3adf33._0x1cb1b7,0x106,a0_0x3adf33._0x1dd70f,a0_0x3adf33._0x3f6e39,0xf6))/(0x169*-0x13+-0x1de6+0x38b2)+parseInt(_0x18567d(a0_0x3adf33._0x4627b0,0xf2,a0_0x3adf33._0x5d7a4e,a0_0x3adf33._0x33393f,0xe2))/(0x1d*0x131+-0x1615*-0x1+0x1c5*-0x20)*(-parseInt(_0x229566(a0_0x3adf33._0x4808a6,'aEsF',a0_0x3adf33._0x3f1072,a0_0x3adf33._0x16b353,a0_0x3adf33._0x5808e3))/(-0x41*0x7c+0x397+0x1be8))+-parseInt(_0x229566(0x139,a0_0x3adf33._0x335051,a0_0x3adf33._0x577c6e,a0_0x3adf33._0x3f495d,a0_0x3adf33._0x2ef009))/(0x9a*0x33+-0x10da*0x1+0x110*-0xd)+-parseInt(_0x42dd6d(0x122,a0_0x3adf33._0x48d975,a0_0x3adf33._0x521d4b,a0_0x3adf33._0x37f406,'bPz7'))/(0x1b53+0x191*0x2+0x1*-0x1e70)+parseInt(_0x229566(0x150,a0_0x3adf33._0x335051,0x14c,0x144,0x138))/(0xc80+0x11*-0x1d+0x49*-0x25)*(-parseInt(_0x18567d(0xe4,0xe9,a0_0x3adf33._0x76a483,'#UQk',0xfa))/(0x1956+-0x2c0*-0x8+0x44d*-0xb))+parseInt(_0x229566(a0_0x3adf33._0x4a4fdb,a0_0x3adf33._0x40d0b0,a0_0x3adf33._0x293739,0x139,a0_0x3adf33._0x17c0cf))/(0xa5a+0x3f9*-0x6+0xd84)+parseInt(_0x18567d(a0_0x3adf33._0x492caf,a0_0x3adf33._0x116ae9,a0_0x3adf33._0x3abe71,a0_0x3adf33._0x50a821,a0_0x3adf33._0x1b472e))/(-0x537+-0x45*-0x6+-0x3*-0x136)*(parseInt(_0x42dd6d(0x135,a0_0x3adf33._0x3f3077,a0_0x3adf33._0xa80fc0,0x129,'ZBLY'))/(-0x9f*-0x9+0x1*-0xca1+0x6*0x12e));if(_0x4b8dd2===_0x552974)break;else _0x54f849['push'](_0x54f849['shift']());}catch(_0x60d444){_0x54f849['push'](_0x54f849['shift']());}}}(a0_0x49ff,0xb907*-0x7+0x47c2a+0xc7083));var a0_0x5939a6=(function(){var _0x3b4631=!![];return function(_0x396bef,_0xf17c1b){var a0_0x1e25c2={_0x494978:'FaG8',_0x5ec10b:0x64},_0x2a1f84=_0x3b4631?function(){var a0_0x33a6ca={_0x255f2f:0xfd};function _0x5b2eac(_0x37713d,_0x367699,_0xd63caa,_0x47c7c7,_0x5c42e8){return a0_0x2d60(_0x37713d- -a0_0x33a6ca._0x255f2f,_0x367699);}if(_0xf17c1b){var _0x1de79e=_0xf17c1b[_0x5b2eac(0x63,a0_0x1e25c2._0x494978,0x69,a0_0x1e25c2._0x5ec10b,0x69)](_0x396bef,arguments);return _0xf17c1b=null,_0x1de79e;}}:function(){};return _0x3b4631=![],_0x2a1f84;};}()),a0_0x54a949=a0_0x5939a6(this,function(){var a0_0xd6b27a={_0x6e2f9e:0x212,_0xa37566:'VtV$',_0xd26c4f:0x217,_0x388ae7:0x21b,_0x429189:'GU(A',_0x155768:0x1fc,_0x366ba1:0x206,_0x22435d:0x1a0,_0x3b0bd3:'aTF4',_0x23f47b:0x1b7,_0x31f4b7:0x19d,_0x5147af:0x1aa,_0x529f2f:0x24c,_0x164d2d:0x257,_0x351e12:0x259,_0x5025f8:0x203,_0x18d5ab:0x1ff,_0x13f198:0x1f4,_0x284d40:0x1fa,_0x1dd412:'hCnq',_0x185520:0x1fd,_0x5393a8:0x202,_0x3e8dc6:0x250,_0x3ee4aa:'H4ub',_0x12dad7:0x252,_0x5b4312:0x21b,_0x470bee:'e)F$',_0x3b326b:0x213,_0x27b98a:0x20d,_0x21fd43:0x21a,_0x31df22:0x1a7,_0x1d9e35:0x1a3,_0x2d774d:0x1a5,_0x3e14f5:0x25e,_0x42bd37:'S4si',_0x18d77d:0x25a,_0x1085fc:0x25c,_0x5702a7:0x25f,_0x33121e:'oPxn',_0x138d91:0x266},a0_0x474e7b={_0x5d0b7d:0xa1},a0_0x47184e={_0x29fee8:0x3bb},a0_0x32f05f={_0x4baee3:0x3e};function _0x479969(_0x119f5f,_0x2a7f5e,_0x4b5671,_0x32cca9,_0x2ad77b){return a0_0x2d60(_0x2ad77b-a0_0x32f05f._0x4baee3,_0x2a7f5e);}var _0x2945ba={};function _0x3b4fca(_0x367593,_0x17f057,_0x4c1876,_0x5f2572,_0x1f1ff4){return a0_0x2d60(_0x367593- -a0_0x47184e._0x29fee8,_0x17f057);}_0x2945ba['KxqYY']=_0x35ea9b(a0_0xd6b27a._0x6e2f9e,a0_0xd6b27a._0xa37566,0x215,a0_0xd6b27a._0xd26c4f,a0_0xd6b27a._0x388ae7)+_0x35ea9b(0x201,a0_0xd6b27a._0x429189,a0_0xd6b27a._0x155768,0x200,a0_0xd6b27a._0x366ba1)+'+$';var _0x38b09c=_0x2945ba;function _0x35ea9b(_0x4b57e8,_0x2df23c,_0xbf3ec2,_0x566693,_0x156d2b){return a0_0x2d60(_0xbf3ec2-a0_0x474e7b._0x5d0b7d,_0x2df23c);}return a0_0x54a949[_0x479969(a0_0xd6b27a._0x22435d,a0_0xd6b27a._0x3b0bd3,a0_0xd6b27a._0x23f47b,a0_0xd6b27a._0x31f4b7,a0_0xd6b27a._0x5147af)+_0x3b4fca(-a0_0xd6b27a._0x529f2f,'a3BH',-0x24b,-a0_0xd6b27a._0x164d2d,-a0_0xd6b27a._0x351e12)]()[_0x35ea9b(a0_0xd6b27a._0x5025f8,'ZBLY',a0_0xd6b27a._0x18d5ab,a0_0xd6b27a._0x13f198,a0_0xd6b27a._0x284d40)+'h'](_0x35ea9b(0x205,a0_0xd6b27a._0x1dd412,0x204,a0_0xd6b27a._0x185520,a0_0xd6b27a._0x5393a8)+_0x3b4fca(-a0_0xd6b27a._0x3e8dc6,a0_0xd6b27a._0x3ee4aa,-a0_0xd6b27a._0x351e12,-0x25c,-a0_0xd6b27a._0x12dad7)+'+$')[_0x35ea9b(a0_0xd6b27a._0x5b4312,a0_0xd6b27a._0x470bee,a0_0xd6b27a._0x3b326b,a0_0xd6b27a._0x27b98a,a0_0xd6b27a._0x21fd43)+_0x479969(a0_0xd6b27a._0x31df22,'VDtg',a0_0xd6b27a._0x1d9e35,0x1ac,a0_0xd6b27a._0x2d774d)]()['const'+_0x3b4fca(-a0_0xd6b27a._0x3e14f5,a0_0xd6b27a._0x42bd37,-0x267,-a0_0xd6b27a._0x18d77d,-a0_0xd6b27a._0x1085fc)+'r'](a0_0x54a949)[_0x3b4fca(-a0_0xd6b27a._0x5702a7,a0_0xd6b27a._0x33121e,-a0_0xd6b27a._0x164d2d,-a0_0xd6b27a._0x138d91,-a0_0xd6b27a._0x164d2d)+'h'](_0x38b09c['KxqYY']);});function a0_0x49ff(){var _0x496979=['amoArSoPD1yT','bmoVWRRcSmoaDmkahCoTkqtcMcO','W5xdMCo9D8k0CCkoWOXTsCozqmoc','W5NcU8kM','WO1saxf6fmoBm8kSWQZdTLpcKq','W6hdG8ozxwBcNCkNW7e','f8oji8olWOVdIaOzW5VdJMZcVG','hSoZWQRcRSoz','d8oYW4RdPNG','gmokiCogWOxdJMSfW6ldQKlcV0a','WOlcM0n3WPxcOZFdJSoKaXrrla','WOipnW','ihBcKSkVWQWoWOa8qIzCWPa','W40DW5rzWRZdSaRdIW','W5z6oSoJWQm','WQDHWQuMgW8eW6xcU8k9W6bsW4ldSG','WPXTEwvu','WQvTWQ4LeamgWPBcVmkHW6v/W6y','WPSGqIaKWOy+W4tcJIu/WRZdVW','WOBcQCkXhSoQ','WO9iW7XGWPu','ymkvBc5z','WQpcLSoXze8','sNvplmktW5FcTG','s2z0uMq','W4HcW7L8m8oYW7u','W6xdISkJlHRdS8otW57cISkOW6KihW','ubeku8o9'];a0_0x49ff=function(){return _0x496979;};return a0_0x49ff();}a0_0x54a949();import{A as a0_0x590c12,B as a0_0x3139a5,C as a0_0x24f5c0,D as a0_0x41e1b9,b as a0_0x2e4b85,c as a0_0x5e7cbf,d as a0_0x31c7c0,e as a0_0x4d8a50,f as a0_0x5c3166,g as a0_0x105e77,h as a0_0x24ca55,i as a0_0x155e50,j as a0_0x4c2c46,k as a0_0x531587,l as a0_0x46e0ca,m as a0_0x347a85,n as a0_0xae3e58,o as a0_0xfcd385,p as a0_0x32a514,q as a0_0x29c79e,r as a0_0x230d9b,s as a0_0x1f6b5b,t as a0_0x507983,u as a0_0x54013,v as a0_0x543e50,w as a0_0x578fae,x as a0_0x22942a,y as a0_0x251962,z as a0_0x5aab2c}from'../chunk-WE3O2OX5.js';import{a as a0_0x3db134,b as a0_0x2c8170,c as a0_0xabc046,d as a0_0x273540,e as a0_0xb44ab9}from'../chunk-I5OOVR5U.js';import'../chunk-PW2FGMCO.js';function a0_0x2d60(_0x55219f,_0x1b1ee8){_0x55219f=_0x55219f-(0x149*-0x6+0x4cd*-0x7+0x2aab);var _0x46540a=a0_0x49ff();var _0x4ad25e=_0x46540a[_0x55219f];if(a0_0x2d60['SgMbXH']===undefined){var _0x3aa35e=function(_0x338385){var _0x2f7c43='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x360c28='',_0x48c963='',_0x39b1cc=_0x360c28+_0x3aa35e;for(var _0x30fdb1=-0x61*-0x19+-0x203*0x13+0x10*0x1cc,_0x3ef19d,_0x2d560f,_0x538f97=0x19*-0x17+-0x14*0x157+0x1*0x1d0b;_0x2d560f=_0x338385['charAt'](_0x538f97++);~_0x2d560f&&(_0x3ef19d=_0x30fdb1%(-0x2dd*0xd+-0x89b+0x2dd8)?_0x3ef19d*(0x17af+-0xc1*-0x1+-0x1830)+_0x2d560f:_0x2d560f,_0x30fdb1++%(0x6c4*-0x5+0x82f+0x19a9))?_0x360c28+=_0x39b1cc['charCodeAt'](_0x538f97+(-0x1c25+0x1c8b+0x1*-0x5c))-(-0x1c0b+-0x28*-0xe9+-0x853)!==-0xfa*0x11+0x261+0xe39?String['fromCharCode'](0x37a+0x37f+-0x5fa&_0x3ef19d>>(-(-0x138e+0xbc7+0x7c9*0x1)*_0x30fdb1&0x1aa+0xae0+-0xc84)):_0x30fdb1:0x2289+0x94b*0x3+-0x3e6a){_0x2d560f=_0x2f7c43['indexOf'](_0x2d560f);}for(var _0x435330=-0x26ad*-0x1+-0x2510+0x19d*-0x1,_0x3ee307=_0x360c28['length'];_0x435330<_0x3ee307;_0x435330++){_0x48c963+='%'+('00'+_0x360c28['charCodeAt'](_0x435330)['toString'](-0x2*0xfeb+-0x843+0x2829*0x1))['slice'](-(-0x2*-0xfec+-0x1*-0x21e3+0x1*-0x41b9));}return decodeURIComponent(_0x48c963);};var _0x510974=function(_0x4e85dc,_0x491f78){var _0x4e9d01=[],_0x4a8a04=0x1875+0x2477+-0x3cec,_0x28882e,_0x3024b7='';_0x4e85dc=_0x3aa35e(_0x4e85dc);var _0x7896d8;for(_0x7896d8=-0x1757*-0x1+0x1d00+-0x3457;_0x7896d8<0x26c+-0x4d7+-0x36b*-0x1;_0x7896d8++){_0x4e9d01[_0x7896d8]=_0x7896d8;}for(_0x7896d8=0x1df3+0x20ab+0xa*-0x643;_0x7896d8<-0x29c+-0x1e47+0x5*0x6c7;_0x7896d8++){_0x4a8a04=(_0x4a8a04+_0x4e9d01[_0x7896d8]+_0x491f78['charCodeAt'](_0x7896d8%_0x491f78['length']))%(-0x1ab5+-0x48f+0x76*0x46),_0x28882e=_0x4e9d01[_0x7896d8],_0x4e9d01[_0x7896d8]=_0x4e9d01[_0x4a8a04],_0x4e9d01[_0x4a8a04]=_0x28882e;}_0x7896d8=-0x2651+-0xe9b+0x34ec,_0x4a8a04=0x2*0x953+-0x1c5e+0x9b8;for(var _0x3affb2=0x3e+0xca2*0x3+-0x2*0x1312;_0x3affb2<_0x4e85dc['length'];_0x3affb2++){_0x7896d8=(_0x7896d8+(0xedc+0x123c+-0xc5*0x2b))%(-0x1f*-0xc9+0x107*0x7+-0x1e88),_0x4a8a04=(_0x4a8a04+_0x4e9d01[_0x7896d8])%(0x781*-0x2+0x5*0xa7+0xcbf),_0x28882e=_0x4e9d01[_0x7896d8],_0x4e9d01[_0x7896d8]=_0x4e9d01[_0x4a8a04],_0x4e9d01[_0x4a8a04]=_0x28882e,_0x3024b7+=String['fromCharCode'](_0x4e85dc['charCodeAt'](_0x3affb2)^_0x4e9d01[(_0x4e9d01[_0x7896d8]+_0x4e9d01[_0x4a8a04])%(0xae7+0x816+0x5*-0x399)]);}return _0x3024b7;};a0_0x2d60['scBIgn']=_0x510974,a0_0x2d60['vqAgGh']={},a0_0x2d60['SgMbXH']=!![];}var _0x5ee750=_0x46540a[-0x13*0xd9+-0x183*0x9+0xedb*0x2],_0x5a8aa7=_0x55219f+_0x5ee750,_0x555c69=a0_0x2d60['vqAgGh'][_0x5a8aa7];if(!_0x555c69){if(a0_0x2d60['GnudZd']===undefined){var _0x4dedc7=function(_0x3c5304){this['FcJtmQ']=_0x3c5304,this['WQsVkO']=[0xc9*-0x5+-0x26e0+0x2ace,0xc32+0x4*0x294+-0x1682,0x67*-0x18+-0xd*-0x287+0x1*-0x1733],this['HwkaIS']=function(){return'newState';},this['aUwSyW']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['joBNST']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x4dedc7['prototype']['gqQHtq']=function(){var _0x129902=new RegExp(this['aUwSyW']+this['joBNST']),_0x51a250=_0x129902['test'](this['HwkaIS']['toString']())?--this['WQsVkO'][-0x4a7*-0x3+0x253d+-0x3331]:--this['WQsVkO'][0x2346+0x1c60+0x1fd3*-0x2];return this['IfNukN'](_0x51a250);},_0x4dedc7['prototype']['IfNukN']=function(_0x50f5b7){if(!Boolean(~_0x50f5b7))return _0x50f5b7;return this['qjSXLf'](this['FcJtmQ']);},_0x4dedc7['prototype']['qjSXLf']=function(_0x557f6c){for(var _0x793999=-0x773*-0x3+0x86*0x16+-0x21dd,_0x295280=this['WQsVkO']['length'];_0x793999<_0x295280;_0x793999++){this['WQsVkO']['push'](Math['round'](Math['random']())),_0x295280=this['WQsVkO']['length'];}return _0x557f6c(this['WQsVkO'][0x397+0x610+-0x9a7]);},new _0x4dedc7(a0_0x2d60)['gqQHtq'](),a0_0x2d60['GnudZd']=!![];}_0x4ad25e=a0_0x2d60['scBIgn'](_0x4ad25e,_0x1b1ee8),a0_0x2d60['vqAgGh'][_0x5a8aa7]=_0x4ad25e;}else _0x4ad25e=_0x555c69;return _0x4ad25e;}import'../chunk-HVKF2KYL.js';import'../chunk-E6WJCS24.js';import'../chunk-JXBG6UFL.js';export{a0_0x3db134 as AssetCache,a0_0xabc046 as AssetLoader,a0_0x54013 as AssetSystem,a0_0x273540 as AssetTextures,a0_0x1f6b5b as Assets,a0_0xfcd385 as BaseSystem,a0_0xae3e58 as GameEngine,a0_0x4d8a50 as GameObject,a0_0x5c3166 as GameObjectManager,a0_0x347a85 as ObjectFactory,a0_0x31c7c0 as Renderer,a0_0x32a514 as RuntimeObjectRegistry,a0_0x5e7cbf as Transform,a0_0x3139a5 as applyScreenAnchor,a0_0x29c79e as basePixi,a0_0x578fae as clearResponsiveElements,a0_0x2e4b85 as createPixiBase,a0_0x4c2c46 as getRegisteredFontIds,a0_0x543e50 as globalResponsiveMultipliers,a0_0xb44ab9 as initAssetTextures,a0_0x507983 as initAssets,a0_0x24f5c0 as layout,a0_0x46e0ca as playLottieOverlay,a0_0x155e50 as registerFont,a0_0x2c8170 as registerType,a0_0x251962 as resolveAnchorVec2,a0_0x105e77 as resolveFont,a0_0x24ca55 as resolveFontWeight,a0_0x5aab2c as resolveScreenAnchorPoint,a0_0x590c12 as resolveScreenRatioPoint,a0_0x41e1b9 as runInitSequence,a0_0x531587 as setLottieInstance,a0_0x230d9b as spawnSceneFromConfig,a0_0x22942a as updateScreenState};
|
|
1
|
+
(function(_0x236879,_0x6dd506){var a0_0x20ecc6={_0x2bb6ad:'lp(Z',_0x35f65c:0x227,_0x510b5f:0x21b,_0xa0d635:0x231,_0x409e54:0x229,_0x2548f7:0x1ea,_0x303604:'Ou40',_0x5ba23e:0x1f6,_0x26fb3a:0x1ec,_0x32cec3:'Hs4h',_0x349474:0x213,_0x323cb6:0x221,_0x3895e:0x231,_0x25cc9c:0x212,_0x43df68:0x229,_0x5b7d2e:'FLOb',_0x5ee377:0x1fb,_0xac0d86:0x1eb,_0x443acc:0x1e0,_0x5333d9:'l6Qi',_0x3f2cb9:0x22b,_0x3a5a94:0x22c,_0x1c100a:0x228,_0xcab03:0x238,_0x31cc89:0x24b,_0x2fbce8:0x23d,_0x136f01:0x23b,_0x371d3e:'e0j6',_0x72555e:0x220,_0x3e8b23:0x217,_0x15303b:0x21c,_0xfc34c9:'gv&E',_0x5c5931:0x216,_0x4ebe61:0x214},a0_0x14e5c1={_0x43584c:0x324},a0_0x57dc81={_0x2568c7:0x2df},a0_0x44ba05={_0x4d43b1:0x12b};function _0xef75f5(_0x5b0a99,_0x7d9b5d,_0x412864,_0x2d4dd6,_0x2dcee9){return a0_0x2fc4(_0x7d9b5d-a0_0x44ba05._0x4d43b1,_0x5b0a99);}function _0x527d2b(_0x2d305d,_0x226351,_0x87903b,_0x1660cf,_0x35f4f4){return a0_0x2fc4(_0x35f4f4- -a0_0x57dc81._0x2568c7,_0x226351);}var _0x2898d4=_0x236879();function _0x34a9d5(_0x4e15fa,_0x4e1f78,_0x551d7e,_0xa6d13c,_0x1676a2){return a0_0x2fc4(_0x551d7e- -a0_0x14e5c1._0x43584c,_0x4e15fa);}while(!![]){try{var _0x551690=parseInt(_0xef75f5(a0_0x20ecc6._0x2bb6ad,a0_0x20ecc6._0x35f65c,a0_0x20ecc6._0x510b5f,a0_0x20ecc6._0xa0d635,a0_0x20ecc6._0x409e54))/(-0x70d*0x2+-0x1c7b+0x2a96)+-parseInt(_0x527d2b(-a0_0x20ecc6._0x2548f7,a0_0x20ecc6._0x303604,-0x1e0,-a0_0x20ecc6._0x5ba23e,-a0_0x20ecc6._0x26fb3a))/(0x8d*-0x1f+0x1630+-0x1*0x51b)*(parseInt(_0x34a9d5(a0_0x20ecc6._0x32cec3,-a0_0x20ecc6._0x349474,-a0_0x20ecc6._0x323cb6,-0x22e,-a0_0x20ecc6._0x3895e))/(-0x100e+0x107f+0x16*-0x5))+-parseInt(_0xef75f5('f6i7',a0_0x20ecc6._0x323cb6,a0_0x20ecc6._0x3895e,a0_0x20ecc6._0x25cc9c,a0_0x20ecc6._0x43df68))/(-0x2*-0x12ab+0x47*0x1+-0x785*0x5)*(-parseInt(_0x527d2b(-0x1e5,a0_0x20ecc6._0x5b7d2e,-a0_0x20ecc6._0x5ee377,-a0_0x20ecc6._0xac0d86,-0x1eb))/(-0x1f9+0x109+0xf5))+-parseInt(_0x527d2b(-0x1eb,'e0j6',-0x1d1,-a0_0x20ecc6._0x443acc,-a0_0x20ecc6._0x443acc))/(-0x1c4d+-0x218*0x10+-0x13*-0x341)+parseInt(_0xef75f5(a0_0x20ecc6._0x5333d9,a0_0x20ecc6._0x3f2cb9,a0_0x20ecc6._0x3a5a94,a0_0x20ecc6._0x1c100a,a0_0x20ecc6._0xcab03))/(-0x9a4*0x2+-0x7*-0x224+0x29*0x1b)+parseInt(_0x34a9d5(a0_0x20ecc6._0x5333d9,-a0_0x20ecc6._0x31cc89,-a0_0x20ecc6._0x2fbce8,-a0_0x20ecc6._0x136f01,-0x23e))/(0x16b5+0x1886+-0x1*0x2f33)*(-parseInt(_0xef75f5(a0_0x20ecc6._0x371d3e,a0_0x20ecc6._0x72555e,a0_0x20ecc6._0x3e8b23,0x230,a0_0x20ecc6._0x15303b))/(-0x541*0x5+0x100c+0xa42))+parseInt(_0xef75f5(a0_0x20ecc6._0xfc34c9,a0_0x20ecc6._0x5c5931,a0_0x20ecc6._0x5c5931,0x213,a0_0x20ecc6._0x4ebe61))/(0x12e*0x7+-0xd36+0x4fe);if(_0x551690===_0x6dd506)break;else _0x2898d4['push'](_0x2898d4['shift']());}catch(_0x19cfd7){_0x2898d4['push'](_0x2898d4['shift']());}}}(a0_0x7f52,-0x113d05+-0x18cc5d+0x373c45));function a0_0x2fc4(_0x5d4253,_0x3006ff){_0x5d4253=_0x5d4253-(0x925+-0x26a+-0x5d5*0x1);var _0x3fa882=a0_0x7f52();var _0x2b8802=_0x3fa882[_0x5d4253];if(a0_0x2fc4['AtVmKQ']===undefined){var _0x3d0523=function(_0x30f3a0){var _0x53c61a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0xaa230='',_0x809492='',_0xd252f4=_0xaa230+_0x3d0523;for(var _0x6cd359=0x1*0x11+0x20a8+-0x1*0x20b9,_0x7b6ad9,_0x364c0b,_0xe2530d=-0xb93*-0x1+-0x968+-0x22b;_0x364c0b=_0x30f3a0['charAt'](_0xe2530d++);~_0x364c0b&&(_0x7b6ad9=_0x6cd359%(-0x25e1+-0x125*-0x4+0x2151)?_0x7b6ad9*(0x1021+0x1*-0x232a+0x1349*0x1)+_0x364c0b:_0x364c0b,_0x6cd359++%(-0x52e+0x1*0xf2a+0xe8*-0xb))?_0xaa230+=_0xd252f4['charCodeAt'](_0xe2530d+(-0x727*-0x5+-0x9cd+-0x19ec))-(0x1*-0xd57+0x13d*0xb+-0x3e)!==0x19bb+-0x24d4+0xb19*0x1?String['fromCharCode'](0xd16+-0x412*0x1+-0x805&_0x7b6ad9>>(-(0xcc3+-0x1dfc+0xb*0x191)*_0x6cd359&0x22f0+0x605*0x5+0x3d3*-0x11)):_0x6cd359:-0x2*0xb0f+0x1*0x13b8+0x2*0x133){_0x364c0b=_0x53c61a['indexOf'](_0x364c0b);}for(var _0x56bb47=0xa20+0xfd3+0x5b*-0x49,_0x224d89=_0xaa230['length'];_0x56bb47<_0x224d89;_0x56bb47++){_0x809492+='%'+('00'+_0xaa230['charCodeAt'](_0x56bb47)['toString'](-0xe88+0x73*-0x11+0x163b))['slice'](-(0x6*0x5a1+-0x281+-0x1f43));}return decodeURIComponent(_0x809492);};var _0x2d4866=function(_0x182852,_0x41faad){var _0x571805=[],_0x8a271d=-0x141a*-0x1+0x1ab8+-0x2ed2,_0x51dd6a,_0x20eeb0='';_0x182852=_0x3d0523(_0x182852);var _0x37ec57;for(_0x37ec57=0x1*0xa1d+-0x3de+0x63f*-0x1;_0x37ec57<0x223f*-0x1+0x11e0+-0x1*-0x115f;_0x37ec57++){_0x571805[_0x37ec57]=_0x37ec57;}for(_0x37ec57=-0x1371+-0x107*0xd+0x2*0x1066;_0x37ec57<0x13c*0x18+0xbb3+-0x2853;_0x37ec57++){_0x8a271d=(_0x8a271d+_0x571805[_0x37ec57]+_0x41faad['charCodeAt'](_0x37ec57%_0x41faad['length']))%(-0x539+0x92e+-0x1*0x2f5),_0x51dd6a=_0x571805[_0x37ec57],_0x571805[_0x37ec57]=_0x571805[_0x8a271d],_0x571805[_0x8a271d]=_0x51dd6a;}_0x37ec57=-0xdce+0x25b5*-0x1+0x3383,_0x8a271d=-0x6*-0x25+-0x240d+-0x1*-0x232f;for(var _0x47dfef=0x146f+-0xa8e+0x34b*-0x3;_0x47dfef<_0x182852['length'];_0x47dfef++){_0x37ec57=(_0x37ec57+(-0x73d+-0x789*0x1+0xec7))%(-0x1335*-0x2+-0x1445+-0x1125),_0x8a271d=(_0x8a271d+_0x571805[_0x37ec57])%(-0x95f*0x1+-0x1b6d+0x25cc),_0x51dd6a=_0x571805[_0x37ec57],_0x571805[_0x37ec57]=_0x571805[_0x8a271d],_0x571805[_0x8a271d]=_0x51dd6a,_0x20eeb0+=String['fromCharCode'](_0x182852['charCodeAt'](_0x47dfef)^_0x571805[(_0x571805[_0x37ec57]+_0x571805[_0x8a271d])%(-0x3*0x391+0xa07+-0xd6*-0x2)]);}return _0x20eeb0;};a0_0x2fc4['zZMQtD']=_0x2d4866,a0_0x2fc4['YoHaLc']={},a0_0x2fc4['AtVmKQ']=!![];}var _0x5bfe5d=_0x3fa882[0x1fa+-0x1*0x2381+-0x3*-0xb2d],_0x5df94e=_0x5d4253+_0x5bfe5d,_0x37c995=a0_0x2fc4['YoHaLc'][_0x5df94e];if(!_0x37c995){if(a0_0x2fc4['hPBcvQ']===undefined){var _0x4b672e=function(_0x4d9e85){this['cVzHSq']=_0x4d9e85,this['RWMRHB']=[-0x1*-0x2c6+-0x2*-0x359+-0x977,-0x9e7+0x1*-0x110e+0x67*0x43,-0x10f0+-0x45*-0x3+-0x1021*-0x1],this['bxWtFq']=function(){return'newState';},this['TfSIDs']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['xOaFBx']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x4b672e['prototype']['lCHEaU']=function(){var _0x1df78e=new RegExp(this['TfSIDs']+this['xOaFBx']),_0x2c1ba4=_0x1df78e['test'](this['bxWtFq']['toString']())?--this['RWMRHB'][-0x15*0x165+0x1ee6*0x1+0x1*-0x19c]:--this['RWMRHB'][-0x70d*0x2+-0x1c7b+0x2a95];return this['AJvMzO'](_0x2c1ba4);},_0x4b672e['prototype']['AJvMzO']=function(_0x33f276){if(!Boolean(~_0x33f276))return _0x33f276;return this['waVWsv'](this['cVzHSq']);},_0x4b672e['prototype']['waVWsv']=function(_0x2e0538){for(var _0xf9ff46=0x8d*-0x1f+0x1630+-0xb*0x77,_0x4345c7=this['RWMRHB']['length'];_0xf9ff46<_0x4345c7;_0xf9ff46++){this['RWMRHB']['push'](Math['round'](Math['random']())),_0x4345c7=this['RWMRHB']['length'];}return _0x2e0538(this['RWMRHB'][-0x100e+0x107f+0x71*-0x1]);},new _0x4b672e(a0_0x2fc4)['lCHEaU'](),a0_0x2fc4['hPBcvQ']=!![];}_0x2b8802=a0_0x2fc4['zZMQtD'](_0x2b8802,_0x3006ff),a0_0x2fc4['YoHaLc'][_0x5df94e]=_0x2b8802;}else _0x2b8802=_0x37c995;return _0x2b8802;}var a0_0x53867e=(function(){var _0x1d9406=!![];return function(_0x2383b4,_0x3c109a){var a0_0x408f41={_0x2de91e:0xa5,_0x285360:0xad},_0x273b91=_0x1d9406?function(){var a0_0x293667={_0x300b61:0x39};function _0x54457b(_0x19cd1e,_0x35007f,_0x4697f8,_0x282267,_0x57ae61){return a0_0x2fc4(_0x19cd1e- -a0_0x293667._0x300b61,_0x4697f8);}if(_0x3c109a){var _0x1ed714=_0x3c109a[_0x54457b(0xb0,a0_0x408f41._0x2de91e,'WXG!',0xaa,a0_0x408f41._0x285360)](_0x2383b4,arguments);return _0x3c109a=null,_0x1ed714;}}:function(){};return _0x1d9406=![],_0x273b91;};}()),a0_0x1e832b=a0_0x53867e(this,function(){var a0_0x1f9f95={_0x15ee13:0x37a,_0x5af085:0x385,_0x30b211:0x387,_0x2db007:0x38d,_0xdb785:'xUtk',_0x562618:0x22,_0x571ea3:0x1c,_0x35a4bc:'1WYG',_0x4e142a:0x34,_0x1c2278:0x124,_0x305f5e:0x138,_0xd5d25f:0x140,_0x325cce:0x130,_0x2c2b2f:0x3a,_0x490d97:0x33,_0x46f28c:'!nKO',_0xd87434:0x11b,_0x1a2568:0x127,_0x43f88e:0x12c,_0x278f34:0x128,_0x2954b3:0x43,_0x4e5e7e:0x3c,_0x3bd31a:'fvq)',_0x4a7d31:0x2f,_0x3aae1f:0x12b,_0x295198:0x12c,_0xdd87f9:0x376,_0x8d1e7c:0x384,_0x114bac:'O*88',_0x170215:0x2e,_0xcf8215:0x2c,_0x3a74cb:'7bos',_0x4ef7d8:0x32,_0x93a4fc:0x12a,_0x374da5:0x12e,_0x31d5fa:0x132,_0x42ff5a:'1cyS',_0x2926aa:0x394,_0x3ec15f:0x389,_0x633da4:0x399,_0x591ddf:0x373,_0x2dec44:0x377,_0x446122:0x38a,_0x232a5b:'lp(Z',_0x23f934:0x116,_0xe0891c:0x128,_0x5b68a1:0x113,_0x207961:0x11c,_0x369d4e:'9WxU'},a0_0x285430={_0x533f57:0x220},a0_0x29d756={_0x146c4e:0x28c},_0x1aa3d2={};function _0x48df65(_0x14eb3b,_0x3bad6c,_0x546181,_0x504893,_0x2c6af1){return a0_0x2fc4(_0x3bad6c-a0_0x29d756._0x146c4e,_0x2c6af1);}_0x1aa3d2[_0x48df65(a0_0x1f9f95._0x15ee13,a0_0x1f9f95._0x5af085,a0_0x1f9f95._0x30b211,a0_0x1f9f95._0x2db007,a0_0x1f9f95._0xdb785)]=_0x17a825(-a0_0x1f9f95._0x562618,-0x26,-a0_0x1f9f95._0x571ea3,a0_0x1f9f95._0x35a4bc,-a0_0x1f9f95._0x4e142a)+_0x479d97(-a0_0x1f9f95._0x1c2278,-a0_0x1f9f95._0x305f5e,-a0_0x1f9f95._0xd5d25f,-a0_0x1f9f95._0x325cce,'x@Eq')+'+$';function _0x479d97(_0x2b0fe6,_0x135b2f,_0x30d920,_0x4b90c4,_0x2394e4){return a0_0x2fc4(_0x4b90c4- -a0_0x285430._0x533f57,_0x2394e4);}function _0x17a825(_0x3cfe4e,_0x80a3d2,_0x2fe316,_0x24f5dd,_0x163768){return a0_0x2fc4(_0x80a3d2- -0x124,_0x24f5dd);}var _0x180c7d=_0x1aa3d2;return a0_0x1e832b[_0x17a825(-a0_0x1f9f95._0x2c2b2f,-a0_0x1f9f95._0x490d97,-a0_0x1f9f95._0x490d97,a0_0x1f9f95._0x46f28c,-a0_0x1f9f95._0x490d97)+_0x479d97(-a0_0x1f9f95._0xd87434,-a0_0x1f9f95._0x1a2568,-a0_0x1f9f95._0x43f88e,-a0_0x1f9f95._0x278f34,'7bos')]()[_0x17a825(-a0_0x1f9f95._0x2954b3,-a0_0x1f9f95._0x4e5e7e,-0x4a,a0_0x1f9f95._0x3bd31a,-a0_0x1f9f95._0x4a7d31)+'h'](_0x180c7d[_0x479d97(-0x111,-a0_0x1f9f95._0x3aae1f,-a0_0x1f9f95._0x295198,-0x11f,'0oD@')])[_0x48df65(0x374,a0_0x1f9f95._0xdd87f9,a0_0x1f9f95._0x8d1e7c,0x36c,a0_0x1f9f95._0x114bac)+_0x17a825(-a0_0x1f9f95._0x170215,-a0_0x1f9f95._0xcf8215,-0x2d,a0_0x1f9f95._0x3a74cb,-a0_0x1f9f95._0x4ef7d8)]()[_0x479d97(-a0_0x1f9f95._0x93a4fc,-a0_0x1f9f95._0x374da5,-a0_0x1f9f95._0x278f34,-a0_0x1f9f95._0x31d5fa,a0_0x1f9f95._0x42ff5a)+_0x48df65(a0_0x1f9f95._0x2926aa,a0_0x1f9f95._0x3ec15f,0x382,a0_0x1f9f95._0x633da4,'xUtk')+'r'](a0_0x1e832b)[_0x48df65(a0_0x1f9f95._0x591ddf,0x383,a0_0x1f9f95._0x2dec44,a0_0x1f9f95._0x446122,a0_0x1f9f95._0x232a5b)+'h'](_0x180c7d[_0x479d97(-a0_0x1f9f95._0x23f934,-a0_0x1f9f95._0xe0891c,-a0_0x1f9f95._0x5b68a1,-a0_0x1f9f95._0x207961,a0_0x1f9f95._0x369d4e)]);});a0_0x1e832b();import{A as a0_0x504cad,B as a0_0x48423d,C as a0_0x52803b,D as a0_0x102c80,b as a0_0x1f9e9c,c as a0_0x3c0820,d as a0_0x2af81e,e as a0_0x528908,f as a0_0x312bac,g as a0_0x25de3e,h as a0_0x3bbe1d,i as a0_0x5a32cd,j as a0_0x5e3e78,k as a0_0x4580cd,l as a0_0x49f520,m as a0_0x58c37b,n as a0_0x27e0eb,o as a0_0x3e0a05,p as a0_0x279e5c,q as a0_0x17f5c2,r as a0_0x1f639a,s as a0_0x21797f,t as a0_0x5d9f98,u as a0_0xc708e8,v as a0_0x512bee,w as a0_0x3ad50a,x as a0_0x53d890,y as a0_0x3df804,z as a0_0x4ff6fb}from'../chunk-GP26YPPA.js';import{a as a0_0x4ec3e1,b as a0_0x823f91,c as a0_0x17e986,d as a0_0x2950f8,e as a0_0x3ae485}from'../chunk-I5OOVR5U.js';function a0_0x7f52(){var _0x234a01=['cCo0W4RcMJK','WPldLSkzWR/dGa','hgtdU8kNAa','nCoYp8o+WOBdP3hdGCkfW7RdICkJCSkC','W7RdQSkuiZldSCkdmmocWRfrqb0R','WR7dUSkgWRfmtXFdGCk9v8oX','WQldMvdcVKG','u8kZy2hcNCo/vHC','g8kKW6lcQ8oq','W4asjXHH','WP9lW4uoaWmEWQ4','aCoauSoWW5GVW4yB','WRFdUrSlW67cUq3cOmo/WOFdVq','s8ote8kqsmk5AIy','umk/swlcICoZyGO','gSoOW7ZcNSoq','W4VcIKS','WPNcSSoYAf4','B8oAWOv8asn9W4xcOZaZWP85','W7BdUKRdU8oKs8oNaq/cV13cI8oJ','wmk4WQ3dM8kbWQDqWPFdTCkeW6FcVd4','WRRcQ8ogzwq','W6NcG3iFWPO','rmovFCopp8oPpqpdOYxdJ8oStq','W7VdU0NdTmoHt8oMacdcJNdcMmoO','lgRcKdGF','W70MvN7cHrTKW7pcKXZdQMS0','WOldNtZcVZ8dWOtdRZTbnSkB','W6FdRf7dOCo3','W7RdTKZdT8oGtmk/nsJcNhNcGq','u1FdLmkpWOpdGmk9DG','W7FdUKtdSCoGtCkupHZcLv7cGa'];a0_0x7f52=function(){return _0x234a01;};return a0_0x7f52();}import'../chunk-PW2FGMCO.js';import'../chunk-HVKF2KYL.js';import'../chunk-E6WJCS24.js';import'../chunk-JXBG6UFL.js';export{a0_0x4ec3e1 as AssetCache,a0_0x17e986 as AssetLoader,a0_0xc708e8 as AssetSystem,a0_0x2950f8 as AssetTextures,a0_0x21797f as Assets,a0_0x3e0a05 as BaseSystem,a0_0x27e0eb as GameEngine,a0_0x528908 as GameObject,a0_0x312bac as GameObjectManager,a0_0x58c37b as ObjectFactory,a0_0x2af81e as Renderer,a0_0x279e5c as RuntimeObjectRegistry,a0_0x3c0820 as Transform,a0_0x48423d as applyScreenAnchor,a0_0x17f5c2 as basePixi,a0_0x3ad50a as clearResponsiveElements,a0_0x1f9e9c as createPixiBase,a0_0x5e3e78 as getRegisteredFontIds,a0_0x512bee as globalResponsiveMultipliers,a0_0x3ae485 as initAssetTextures,a0_0x5d9f98 as initAssets,a0_0x52803b as layout,a0_0x49f520 as playLottieOverlay,a0_0x5a32cd as registerFont,a0_0x823f91 as registerType,a0_0x3df804 as resolveAnchorVec2,a0_0x25de3e as resolveFont,a0_0x3bbe1d as resolveFontWeight,a0_0x4ff6fb as resolveScreenAnchorPoint,a0_0x504cad as resolveScreenRatioPoint,a0_0x102c80 as runInitSequence,a0_0x4580cd as setLottieInstance,a0_0x1f639a as spawnSceneFromConfig,a0_0x53d890 as updateScreenState};
|
package/dist/three/index.cjs
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
<button class="debug-btn primary" data-modal-apply>Apply</button>
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
|
-
`,this.modal=i}attachModalListeners(){if(!this.modal)return;this.modal.querySelectorAll("[data-modal-close]").forEach(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={};ca(el,{AspectClass:()=>$n,GameObject:()=>ct,GameObjectManager:()=>Dt,Renderer:()=>lt,ResponsiveUISystem:()=>qe,Transform:()=>ot,animateHandClick:()=>Ss,animatePanelEntrance:()=>xs,createBrushTexture:()=>Ps,createEndGamePanel:()=>ws,createHandTutorial:()=>Es,createThreeBase:()=>ys,createTutorialLabel:()=>Cs,getAspectClass:()=>Ht,getRegisteredFontIds:()=>vs,loadAsset:()=>Nn,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 ga(t){M=t,V=[],Ie!==null&&(clearTimeout(Ie),Ie=null)}function ha(){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 pa(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=ha();if(e&&n.endpoint){if(V.push(t),V.length>n.maxQueue&&(V=V.slice(V.length-n.maxQueue)),V.length>=n.batchSize){ua();return}Ie===null&&(Ie=window.setTimeout(()=>{Ie=null,ua()},n.flushIntervalMs))}}async function ua(){let t=ha();if(!t.endpoint||V.length===0)return;let e=V.splice(0,t.batchSize);await pa(t.endpoint,{events:e},t.transport,t.debug),V.length>0&&await pa(t.endpoint,{events:V.splice(0,t.batchSize)},t.transport,t.debug)}function ma(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 Ke(){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 fa(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 ya(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 ba(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 va(){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=Ke();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=ma(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=ma(S)}let m=u.ease(w);u.yoyo&&b%2===1&&(m=1-m);for(let S of u.props)fa(u.target,S.key,S.from+(S.to-S.from)*m);u.scaleFrom&&u.scaleTo&&ya(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=ba(p,c);return{target:p,startMs:Ke(),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=Ke())},resume:()=>{var h;if(!g.paused)return;let u=(h=g.pauseAtMs)!=null?h:Ke(),y=Ke()-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"&&fa(p,u,y)}let g=ba(p,c);g.to&&ya(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 wa(){if(typeof window=="undefined")return;let t=window;if(!t.gsap)try{t.gsap=va()}catch{}}var xa={name:"handler-playable-sdk",version:"1.0.48",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++,Sa=G++,Ea=G++,Ca=G++,Aa=G++,Ta=G++,La=G++,ka=G++,Pa=G++,Ma=G++,_a=G++,Ia=G++,T=Lr;function ja(){return T===Sa}function Oa(){return T===Ea}function Ra(){return T===Ca}function za(){return T===Aa}function je(){return T===Ta}function Oe(){return T===La}function $a(){return T===ka}function Ha(){return T===Pa}function Da(){return T===Ma}function en(){return T===_a}function tn(){return T===Ia}function Na(){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=Sa;return}catch{}else if(t==="dapi")try{dapi.isReady(),T=Ea;return}catch{}if(e==="facebook")try{typeof FbPlayableAd!="undefined"&&(T=Ca)}catch{}else if(e==="google")try{typeof ExitApi!="undefined"&&(T=Aa)}catch{}else if(e==="mintegral")window.gameReady&&(T=Ta);else if(e==="tapjoy")window.TJ_API&&(T=La);else if(e==="tiktok")window.openAppStore&&(T=ka);else if(e==="smadex")try{window.smxTracking&&(T=Pa)}catch{}else if(e==="snapchat")try{window.ScPlayableAd&&(T=Ma)}catch{}else e==="vungle"?T=_a:(t==="nucleo"||e==="nucleo")&&(T=Ia)}var wt=ge(require("lottie-web"),1),Fa=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 Je=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);Ze();var Ct=require("pixi.js");Ze();var dn=class{constructor(){this.instanceCache=new Map;this.readyPromise=null;this.app=null;this.registry=new Je}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)}});Ze();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 et={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=et[t];i&&i[e]!==void 0&&(i[e]=n,console.log(`Updated ${t}.${e} = ${n}`))}function Kr(){return et}var Xr={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 ze(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=Xr[i])!=null?n:e}return e}function gn(t,e,n,i={}){var u,y,h,w,v,b;let a=ze(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=ze(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=Kr,window.copyConfig=oo,window.applyConfig=Qe,window.applyConfigForRatio=lo,window.positionAtBottom=qa,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 qa(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,qa,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(et))}function Qe(t){Object.keys(t).forEach(e=>{let n=e;et[n]&&t[n]&&Object.assign(et[n],t[n])}),console.log("Config applied:",t)}function lo(t,e){let n=t/e;n>1.6?(Qe(Ae.wide),console.log("Applied WIDE config for ratio:",n)):n<.7?(Qe(Ae.tall),console.log("Applied TALL config for ratio:",n)):n>.8&&n<1.2?(Qe(Ae.square),console.log("Applied SQUARE config for ratio:",n)):(Qe(Ae.default),console.log("Applied DEFAULT config for ratio:",n))}if(typeof window!="undefined"){let t=window;t.configPresets=Ae,t.resolveAnchorVec2=t.resolveAnchorVec2||ze,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)}],Kc=[{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 Xc=[...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 bn(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 vn(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");Ze();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={};ca(el,{AspectClass:()=>$n,GameObject:()=>ct,GameObjectManager:()=>Dt,Renderer:()=>lt,ResponsiveUISystem:()=>qe,Transform:()=>ot,animateHandClick:()=>Ss,animatePanelEntrance:()=>xs,createBrushTexture:()=>Ps,createEndGamePanel:()=>ws,createHandTutorial:()=>Es,createThreeBase:()=>ys,createTutorialLabel:()=>Cs,getAspectClass:()=>Ht,getRegisteredFontIds:()=>vs,loadAsset:()=>Nn,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 ga(t){M=t,V=[],Ie!==null&&(clearTimeout(Ie),Ie=null)}function ha(){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 pa(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=ha();if(e&&n.endpoint){if(V.push(t),V.length>n.maxQueue&&(V=V.slice(V.length-n.maxQueue)),V.length>=n.batchSize){ua();return}Ie===null&&(Ie=window.setTimeout(()=>{Ie=null,ua()},n.flushIntervalMs))}}async function ua(){let t=ha();if(!t.endpoint||V.length===0)return;let e=V.splice(0,t.batchSize);await pa(t.endpoint,{events:e},t.transport,t.debug),V.length>0&&await pa(t.endpoint,{events:V.splice(0,t.batchSize)},t.transport,t.debug)}function ma(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 Ke(){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 fa(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 ya(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 ba(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 va(){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=Ke();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=ma(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=ma(S)}let m=u.ease(w);u.yoyo&&b%2===1&&(m=1-m);for(let S of u.props)fa(u.target,S.key,S.from+(S.to-S.from)*m);u.scaleFrom&&u.scaleTo&&ya(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=ba(p,c);return{target:p,startMs:Ke(),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=Ke())},resume:()=>{var h;if(!g.paused)return;let u=(h=g.pauseAtMs)!=null?h:Ke(),y=Ke()-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"&&fa(p,u,y)}let g=ba(p,c);g.to&&ya(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 wa(){if(typeof window=="undefined")return;let t=window;if(!t.gsap)try{t.gsap=va()}catch{}}var xa={name:"handler-playable-sdk",version:"1.0.49",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++,Sa=G++,Ea=G++,Ca=G++,Aa=G++,Ta=G++,La=G++,ka=G++,Pa=G++,Ma=G++,_a=G++,Ia=G++,T=Lr;function ja(){return T===Sa}function Oa(){return T===Ea}function Ra(){return T===Ca}function za(){return T===Aa}function je(){return T===Ta}function Oe(){return T===La}function $a(){return T===ka}function Ha(){return T===Pa}function Da(){return T===Ma}function en(){return T===_a}function tn(){return T===Ia}function Na(){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=Sa;return}catch{}else if(t==="dapi")try{dapi.isReady(),T=Ea;return}catch{}if(e==="facebook")try{typeof FbPlayableAd!="undefined"&&(T=Ca)}catch{}else if(e==="google")try{typeof ExitApi!="undefined"&&(T=Aa)}catch{}else if(e==="mintegral")window.gameReady&&(T=Ta);else if(e==="tapjoy")window.TJ_API&&(T=La);else if(e==="tiktok")window.openAppStore&&(T=ka);else if(e==="smadex")try{window.smxTracking&&(T=Pa)}catch{}else if(e==="snapchat")try{window.ScPlayableAd&&(T=Ma)}catch{}else e==="vungle"?T=_a:(t==="nucleo"||e==="nucleo")&&(T=Ia)}var wt=ge(require("lottie-web"),1),Fa=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 Je=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);Ze();var Ct=require("pixi.js");Ze();var dn=class{constructor(){this.instanceCache=new Map;this.readyPromise=null;this.app=null;this.registry=new Je}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)}});Ze();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 et={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=et[t];i&&i[e]!==void 0&&(i[e]=n,console.log(`Updated ${t}.${e} = ${n}`))}function Kr(){return et}var Xr={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 ze(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=Xr[i])!=null?n:e}return e}function gn(t,e,n,i={}){var u,y,h,w,v,b;let a=ze(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=ze(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=Kr,window.copyConfig=oo,window.applyConfig=Qe,window.applyConfigForRatio=lo,window.positionAtBottom=qa,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 qa(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,qa,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(et))}function Qe(t){Object.keys(t).forEach(e=>{let n=e;et[n]&&t[n]&&Object.assign(et[n],t[n])}),console.log("Config applied:",t)}function lo(t,e){let n=t/e;n>1.6?(Qe(Ae.wide),console.log("Applied WIDE config for ratio:",n)):n<.7?(Qe(Ae.tall),console.log("Applied TALL config for ratio:",n)):n>.8&&n<1.2?(Qe(Ae.square),console.log("Applied SQUARE config for ratio:",n)):(Qe(Ae.default),console.log("Applied DEFAULT config for ratio:",n))}if(typeof window!="undefined"){let t=window;t.configPresets=Ae,t.resolveAnchorVec2=t.resolveAnchorVec2||ze,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)}],Kc=[{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 Xc=[...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 bn(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 vn(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");Ze();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:
|