handler-playable-sdk 0.3.42 → 0.3.43
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-ZTARCNWY.js → chunk-XSKUGJJF.js} +1 -1
- package/dist/cli/brand-dna.mjs +1 -1
- package/dist/cli/canva-import.mjs +1 -1
- package/dist/cli/cleanup-assets.mjs +1 -1
- package/dist/cli/fix-scales.mjs +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/screen-helper.mjs +1 -1
- package/dist/cli/setup-library.mjs +1 -1
- package/dist/cli/student-helper.mjs +1 -1
- package/dist/cli/sync-screens.mjs +1 -1
- package/dist/cli/validate-assets.mjs +1 -1
- package/dist/cli/validate.mjs +1 -1
- package/dist/index.cjs +88 -88
- package/dist/index.css +200 -0
- package/dist/index.js +1 -1
- package/dist/pixi/index.cjs +11 -11
- package/dist/pixi/index.css +200 -0
- package/dist/pixi/index.js +1 -1
- package/dist/three/index.cjs +1 -1
- package/dist/three/index.css +200 -0
- package/dist/three/index.js +1 -1
- package/package.json +1 -1
package/dist/pixi/index.css
CHANGED
|
@@ -3817,6 +3817,29 @@
|
|
|
3817
3817
|
}
|
|
3818
3818
|
|
|
3819
3819
|
|
|
3820
|
+
/* ========== 08-breadcrumbs.css ========== */
|
|
3821
|
+
/* Breadcrumbs */
|
|
3822
|
+
.scene-breadcrumbs {
|
|
3823
|
+
display: flex;
|
|
3824
|
+
align-items: center;
|
|
3825
|
+
gap: 6px;
|
|
3826
|
+
padding: 8px 14px;
|
|
3827
|
+
background: var(--ui-surface-2);
|
|
3828
|
+
border-bottom: 1px solid var(--ui-border);
|
|
3829
|
+
font-size: 11px;
|
|
3830
|
+
color: var(--ui-muted);
|
|
3831
|
+
}
|
|
3832
|
+
|
|
3833
|
+
.breadcrumb-item {
|
|
3834
|
+
font-weight: var(--font-weight-medium);
|
|
3835
|
+
color: var(--ui-text);
|
|
3836
|
+
}
|
|
3837
|
+
|
|
3838
|
+
.breadcrumb-separator {
|
|
3839
|
+
color: var(--ui-muted);
|
|
3840
|
+
font-size: 12px;
|
|
3841
|
+
}
|
|
3842
|
+
|
|
3820
3843
|
/* ========== 08-inspector.css ========== */
|
|
3821
3844
|
/* 08 Inspector */
|
|
3822
3845
|
/* Auto-generated from preview.css */
|
|
@@ -4619,6 +4642,183 @@
|
|
|
4619
4642
|
|
|
4620
4643
|
|
|
4621
4644
|
|
|
4645
|
+
/* ========== 13-nudge-panel.css ========== */
|
|
4646
|
+
/* Nudge Panel - Floating on left side */
|
|
4647
|
+
.nudge-panel {
|
|
4648
|
+
position: absolute;
|
|
4649
|
+
left: 16px;
|
|
4650
|
+
top: 50%;
|
|
4651
|
+
transform: translateY(-50%);
|
|
4652
|
+
width: 180px;
|
|
4653
|
+
background: var(--ui-surface);
|
|
4654
|
+
border: 1px solid var(--ui-border);
|
|
4655
|
+
border-radius: 14px;
|
|
4656
|
+
box-shadow: var(--ui-shadow);
|
|
4657
|
+
z-index: 60;
|
|
4658
|
+
pointer-events: auto;
|
|
4659
|
+
transition: opacity var(--ui-duration-fast) var(--ui-ease);
|
|
4660
|
+
}
|
|
4661
|
+
|
|
4662
|
+
.nudge-panel.hidden {
|
|
4663
|
+
opacity: 0;
|
|
4664
|
+
pointer-events: none;
|
|
4665
|
+
}
|
|
4666
|
+
|
|
4667
|
+
.nudge-panel-header {
|
|
4668
|
+
padding: 10px 12px;
|
|
4669
|
+
background: var(--ui-bg-2);
|
|
4670
|
+
border-bottom: 1px solid var(--ui-border);
|
|
4671
|
+
border-radius: 14px 14px 0 0;
|
|
4672
|
+
}
|
|
4673
|
+
|
|
4674
|
+
.nudge-panel-title {
|
|
4675
|
+
font-size: 11px;
|
|
4676
|
+
font-weight: var(--font-weight-semibold);
|
|
4677
|
+
color: var(--ui-text);
|
|
4678
|
+
letter-spacing: 0.4px;
|
|
4679
|
+
text-transform: uppercase;
|
|
4680
|
+
}
|
|
4681
|
+
|
|
4682
|
+
.nudge-panel-body {
|
|
4683
|
+
padding: 12px;
|
|
4684
|
+
display: flex;
|
|
4685
|
+
flex-direction: column;
|
|
4686
|
+
gap: 14px;
|
|
4687
|
+
}
|
|
4688
|
+
|
|
4689
|
+
.nudge-section {
|
|
4690
|
+
display: flex;
|
|
4691
|
+
flex-direction: column;
|
|
4692
|
+
gap: 8px;
|
|
4693
|
+
}
|
|
4694
|
+
|
|
4695
|
+
.nudge-section-label {
|
|
4696
|
+
font-size: 11px;
|
|
4697
|
+
font-weight: var(--font-weight-medium);
|
|
4698
|
+
color: var(--ui-muted);
|
|
4699
|
+
text-transform: uppercase;
|
|
4700
|
+
letter-spacing: 0.3px;
|
|
4701
|
+
}
|
|
4702
|
+
|
|
4703
|
+
.nudge-step-input {
|
|
4704
|
+
background: var(--ui-bg);
|
|
4705
|
+
border: 1px solid var(--ui-border);
|
|
4706
|
+
border-radius: 6px;
|
|
4707
|
+
padding: 6px 8px;
|
|
4708
|
+
font-size: 12px;
|
|
4709
|
+
color: var(--ui-text);
|
|
4710
|
+
font-family: var(--font-primary);
|
|
4711
|
+
width: 100%;
|
|
4712
|
+
}
|
|
4713
|
+
|
|
4714
|
+
.nudge-step-input:focus {
|
|
4715
|
+
outline: none;
|
|
4716
|
+
border-color: var(--ui-terracotta);
|
|
4717
|
+
box-shadow: 0 0 0 2px rgba(227, 138, 90, 0.2);
|
|
4718
|
+
}
|
|
4719
|
+
|
|
4720
|
+
/* Nudge arrow grid */
|
|
4721
|
+
.nudge-arrow-grid {
|
|
4722
|
+
display: grid;
|
|
4723
|
+
grid-template-columns: repeat(3, 1fr);
|
|
4724
|
+
grid-template-rows: repeat(2, 1fr);
|
|
4725
|
+
gap: 4px;
|
|
4726
|
+
}
|
|
4727
|
+
|
|
4728
|
+
.nudge-arrow-btn {
|
|
4729
|
+
background: var(--ui-surface);
|
|
4730
|
+
border: 1px solid var(--ui-border);
|
|
4731
|
+
border-radius: 8px;
|
|
4732
|
+
padding: 8px;
|
|
4733
|
+
cursor: pointer;
|
|
4734
|
+
transition: all var(--ui-duration-fast) var(--ui-ease);
|
|
4735
|
+
color: var(--ui-text);
|
|
4736
|
+
display: flex;
|
|
4737
|
+
align-items: center;
|
|
4738
|
+
justify-content: center;
|
|
4739
|
+
}
|
|
4740
|
+
|
|
4741
|
+
.nudge-arrow-btn svg {
|
|
4742
|
+
width: 16px;
|
|
4743
|
+
height: 16px;
|
|
4744
|
+
stroke-width: var(--ui-icon-stroke);
|
|
4745
|
+
}
|
|
4746
|
+
|
|
4747
|
+
.nudge-arrow-btn:hover {
|
|
4748
|
+
background: var(--ui-terracotta);
|
|
4749
|
+
border-color: var(--ui-terracotta);
|
|
4750
|
+
color: var(--ui-text-white);
|
|
4751
|
+
transform: translateY(-1px);
|
|
4752
|
+
}
|
|
4753
|
+
|
|
4754
|
+
.nudge-arrow-btn:active {
|
|
4755
|
+
transform: translateY(0);
|
|
4756
|
+
background: var(--ui-terracotta-active);
|
|
4757
|
+
}
|
|
4758
|
+
|
|
4759
|
+
.nudge-arrow-btn[data-nudge="up"] {
|
|
4760
|
+
grid-column: 2;
|
|
4761
|
+
grid-row: 1;
|
|
4762
|
+
}
|
|
4763
|
+
|
|
4764
|
+
.nudge-arrow-btn[data-nudge="left"] {
|
|
4765
|
+
grid-column: 1;
|
|
4766
|
+
grid-row: 2;
|
|
4767
|
+
}
|
|
4768
|
+
|
|
4769
|
+
.nudge-arrow-btn[data-nudge="down"] {
|
|
4770
|
+
grid-column: 2;
|
|
4771
|
+
grid-row: 2;
|
|
4772
|
+
}
|
|
4773
|
+
|
|
4774
|
+
.nudge-arrow-btn[data-nudge="right"] {
|
|
4775
|
+
grid-column: 3;
|
|
4776
|
+
grid-row: 2;
|
|
4777
|
+
}
|
|
4778
|
+
|
|
4779
|
+
/* Scale controls */
|
|
4780
|
+
.nudge-scale-controls {
|
|
4781
|
+
display: flex;
|
|
4782
|
+
flex-direction: column;
|
|
4783
|
+
gap: 6px;
|
|
4784
|
+
}
|
|
4785
|
+
|
|
4786
|
+
.nudge-scale-btn {
|
|
4787
|
+
background: var(--ui-surface);
|
|
4788
|
+
border: 1px solid var(--ui-border);
|
|
4789
|
+
border-radius: 8px;
|
|
4790
|
+
padding: 8px 10px;
|
|
4791
|
+
cursor: pointer;
|
|
4792
|
+
transition: all var(--ui-duration-fast) var(--ui-ease);
|
|
4793
|
+
color: var(--ui-text);
|
|
4794
|
+
display: flex;
|
|
4795
|
+
align-items: center;
|
|
4796
|
+
gap: 6px;
|
|
4797
|
+
font-size: 11px;
|
|
4798
|
+
font-weight: var(--font-weight-medium);
|
|
4799
|
+
}
|
|
4800
|
+
|
|
4801
|
+
.nudge-scale-btn svg {
|
|
4802
|
+
width: 14px;
|
|
4803
|
+
height: 14px;
|
|
4804
|
+
stroke-width: var(--ui-icon-stroke);
|
|
4805
|
+
}
|
|
4806
|
+
|
|
4807
|
+
.nudge-scale-btn:hover {
|
|
4808
|
+
background: var(--ui-terracotta);
|
|
4809
|
+
border-color: var(--ui-terracotta);
|
|
4810
|
+
color: var(--ui-text-white);
|
|
4811
|
+
}
|
|
4812
|
+
|
|
4813
|
+
.nudge-scale-btn:active {
|
|
4814
|
+
background: var(--ui-terracotta-active);
|
|
4815
|
+
}
|
|
4816
|
+
|
|
4817
|
+
/* Hide nudge panel in compare mode */
|
|
4818
|
+
.preview-shell.compare-mode .nudge-panel {
|
|
4819
|
+
display: none;
|
|
4820
|
+
}
|
|
4821
|
+
|
|
4622
4822
|
/* ========== 99-misc.css ========== */
|
|
4623
4823
|
/* 99 Misc */
|
|
4624
4824
|
/* Auto-generated from preview.css */
|
package/dist/pixi/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x522ff3,_0x2bd2c5){var a0_0x2e8928={_0x38b7b4:0x435,_0x5d482a:'v0bX',_0x25aa2b:0x439,_0xa9a139:0x42e,_0x59197b:0x441,_0x675446:'nLB(',_0x206ffb:0x432,_0x58d82a:0x434,_0x420776:0x430,_0x5556af:'JpdS',_0x451546:0x427,_0x466033:0x2d3,_0x52e6a1:0x2d7,_0x412988:0x2c9,_0x15b835:0x2e2,_0x265a24:0x2c4,_0x2cc73:0x2d4,_0x2c5cf8:0x2b9,_0x5bc5b6:'g[tC',_0x413950:0x2cf,_0x2a8034:0x432,_0x61da92:0x434,_0xd5066e:0x430,_0x2537c2:0x43a,_0x2fb996:0xea,_0x1b7c51:'!sW@',_0x13c093:0xf8,_0x4bb2e9:0xed,_0x2b6864:0xe9,_0x238c7a:0xeb,_0x2b4ea9:'L5vL',_0x239ce2:0xf7,_0x3d4290:0xdf,_0x4a816b:0xf6,_0x392355:0x108,_0x3ef0e2:0xfb},a0_0x2ba263={_0x4cbe91:0x204},a0_0x1d6165={_0x40fe30:0x322};function _0x1385c6(_0xc938aa,_0x8f28b3,_0x36e0b4,_0x4e5d63,_0x5e69ef){return a0_0x3da4(_0xc938aa-a0_0x1d6165._0x40fe30,_0x8f28b3);}function _0x514279(_0x22e966,_0x379091,_0x4f3dbe,_0x17446e,_0x1f349e){return a0_0x3da4(_0x1f349e- -a0_0x2ba263._0x4cbe91,_0x17446e);}function _0x445da0(_0xf92f63,_0x59e245,_0x4db13d,_0x4f03cf,_0x12a4bc){return a0_0x3da4(_0xf92f63- -0x3dd,_0x4f03cf);}var _0x137f79=_0x522ff3();while(!![]){try{var _0x1274cc=-parseInt(_0x1385c6(a0_0x2e8928._0x38b7b4,a0_0x2e8928._0x5d482a,a0_0x2e8928._0x25aa2b,a0_0x2e8928._0xa9a139,0x441))/(0xa63+-0x1b7f*0x1+-0xd*-0x151)*(-parseInt(_0x1385c6(a0_0x2e8928._0x59197b,a0_0x2e8928._0x675446,0x43e,a0_0x2e8928._0x206ffb,a0_0x2e8928._0x58d82a))/(0x1fab+0xce+-0x2077))+-parseInt(_0x1385c6(a0_0x2e8928._0x420776,a0_0x2e8928._0x5556af,a0_0x2e8928._0x420776,a0_0x2e8928._0x451546,0x423))/(0xfda*0x1+-0x1e2*0xb+0x4df)+-parseInt(_0x445da0(-a0_0x2e8928._0x466033,-a0_0x2e8928._0x52e6a1,-a0_0x2e8928._0x412988,'BC$#',-a0_0x2e8928._0x15b835))/(-0xa8a*0x2+0x7*-0x95+0x192b)*(parseInt(_0x445da0(-a0_0x2e8928._0x265a24,-a0_0x2e8928._0x2cc73,-a0_0x2e8928._0x2c5cf8,a0_0x2e8928._0x5bc5b6,-a0_0x2e8928._0x413950))/(0x1*0x60d+-0x1*-0x245f+0x5*-0x87b))+parseInt(_0x1385c6(a0_0x2e8928._0x2a8034,'PlS]',a0_0x2e8928._0x61da92,a0_0x2e8928._0xd5066e,a0_0x2e8928._0x2537c2))/(0x229c+0x1ec1+-0x4157)+-parseInt(_0x514279(-a0_0x2e8928._0x2fb996,-0xf9,-0xf5,a0_0x2e8928._0x1b7c51,-a0_0x2e8928._0x13c093))/(-0x483+0x10*-0x25+-0x6da*-0x1)+-parseInt(_0x514279(-a0_0x2e8928._0x4bb2e9,-a0_0x2e8928._0x2b6864,-a0_0x2e8928._0x238c7a,a0_0x2e8928._0x2b4ea9,-a0_0x2e8928._0x239ce2))/(-0x40b*-0x9+0x246+-0x155*0x1d)*(-parseInt(_0x514279(-a0_0x2e8928._0x3d4290,-0xf3,-0xea,'Q%t9',-a0_0x2e8928._0x4bb2e9))/(0xcbd+-0x1cdd+0x7*0x24f))+-parseInt(_0x514279(-a0_0x2e8928._0x239ce2,-a0_0x2e8928._0x4a816b,-a0_0x2e8928._0x392355,'xpzK',-a0_0x2e8928._0x3ef0e2))/(0x2d*0x1d+-0x387*-0x2+0x1*-0xc1d);if(_0x1274cc===_0x2bd2c5)break;else _0x137f79['push'](_0x137f79['shift']());}catch(_0x4bed4b){_0x137f79['push'](_0x137f79['shift']());}}}(a0_0x273a,0x195bb*-0xa+0x8fd99+-0x8c0*-0x200));function a0_0x3da4(_0x4320f9,_0x5aa938){_0x4320f9=_0x4320f9-(-0x1*0x2689+0x1c42+0xb49);var _0x40fd42=a0_0x273a();var _0x40421b=_0x40fd42[_0x4320f9];if(a0_0x3da4['Yodort']===undefined){var _0x25e425=function(_0x4abfef){var _0x25e7cd='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x42762a='',_0x3b797a='',_0x59eea8=_0x42762a+_0x25e425;for(var _0x5539f8=-0x23ea+-0x1e*-0x12c+0x1*0xc2,_0x2ccec3,_0x64b914,_0x21beed=0x2462+0x1e*0x113+-0x449c;_0x64b914=_0x4abfef['charAt'](_0x21beed++);~_0x64b914&&(_0x2ccec3=_0x5539f8%(0x257e+0x161b+-0x3b95)?_0x2ccec3*(-0x2b3*0x1+-0x5d*-0x9+-0x29*0x2)+_0x64b914:_0x64b914,_0x5539f8++%(-0xea*0x8+0x147c+-0x1a5*0x8))?_0x42762a+=_0x59eea8['charCodeAt'](_0x21beed+(0x8f7*-0x2+-0x20ad+-0x5*-0xa21))-(-0x96b*-0x1+0x1*-0x1241+0x8e0)!==-0x268f+-0x12b8+-0x2b*-0x155?String['fromCharCode'](-0x519+0x2056+-0x1*0x1a3e&_0x2ccec3>>(-(0x3*0x4f9+-0x29*0x9d+0x51e*0x2)*_0x5539f8&0x1*-0x2337+-0x913+0x2c50*0x1)):_0x5539f8:-0x151f+0xdb9+0x2*0x3b3){_0x64b914=_0x25e7cd['indexOf'](_0x64b914);}for(var _0x2a2ed7=0x4f*-0x31+-0x18e*0x19+0x35fd,_0x2cde50=_0x42762a['length'];_0x2a2ed7<_0x2cde50;_0x2a2ed7++){_0x3b797a+='%'+('00'+_0x42762a['charCodeAt'](_0x2a2ed7)['toString'](0x321+0x1726+-0x1a37))['slice'](-(0x2*-0x27a+0x1a19+-0x1523));}return decodeURIComponent(_0x3b797a);};var _0x3fbcfd=function(_0x8233ee,_0x375ee0){var _0x433c6b=[],_0x411c6e=-0x969+-0x7e3+-0x24*-0x7b,_0xb76593,_0x5c1920='';_0x8233ee=_0x25e425(_0x8233ee);var _0x3276ff;for(_0x3276ff=-0x8d*-0x13+-0xe*0xc6+0x5d;_0x3276ff<-0x1f91+0x1*-0x814+0x28a5;_0x3276ff++){_0x433c6b[_0x3276ff]=_0x3276ff;}for(_0x3276ff=-0x269a*0x1+-0x1adc+0x4176;_0x3276ff<-0x1*0x1cb5+-0xdee+0x2ba3;_0x3276ff++){_0x411c6e=(_0x411c6e+_0x433c6b[_0x3276ff]+_0x375ee0['charCodeAt'](_0x3276ff%_0x375ee0['length']))%(0x739+0x2*-0x8f5+0x29*0x49),_0xb76593=_0x433c6b[_0x3276ff],_0x433c6b[_0x3276ff]=_0x433c6b[_0x411c6e],_0x433c6b[_0x411c6e]=_0xb76593;}_0x3276ff=-0xd*0xd3+0xccc+-0xd*0x29,_0x411c6e=0x150a+0x1bc8+-0x3*0x1046;for(var _0x3cd00a=-0x20fc*0x1+-0xd5+0x21d1;_0x3cd00a<_0x8233ee['length'];_0x3cd00a++){_0x3276ff=(_0x3276ff+(0x1*0x3+-0x529+0x527*0x1))%(-0x237d+-0x15b3+0x62*0x98),_0x411c6e=(_0x411c6e+_0x433c6b[_0x3276ff])%(0x109c+-0x68c+-0x3a*0x28),_0xb76593=_0x433c6b[_0x3276ff],_0x433c6b[_0x3276ff]=_0x433c6b[_0x411c6e],_0x433c6b[_0x411c6e]=_0xb76593,_0x5c1920+=String['fromCharCode'](_0x8233ee['charCodeAt'](_0x3cd00a)^_0x433c6b[(_0x433c6b[_0x3276ff]+_0x433c6b[_0x411c6e])%(-0x17*-0x1a6+0x266+-0x22*0x128)]);}return _0x5c1920;};a0_0x3da4['LctTuS']=_0x3fbcfd,a0_0x3da4['RFqcGI']={},a0_0x3da4['Yodort']=!![];}var _0x371288=_0x40fd42[-0xc75+-0x1517*0x1+-0x863*-0x4],_0x5c140b=_0x4320f9+_0x371288,_0x412fb0=a0_0x3da4['RFqcGI'][_0x5c140b];if(!_0x412fb0){if(a0_0x3da4['vJnazV']===undefined){var _0x80cfb5=function(_0x14c1b9){this['wQLVxL']=_0x14c1b9,this['gXlDWx']=[0x93*0x43+0x6*0x2d9+-0x378e,-0x259*0x5+-0x99b+-0x1*-0x1558,-0x1548+-0x1ff*-0x11+0x29*-0x4f],this['TDYzlz']=function(){return'newState';},this['CObwCW']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['NzfJSG']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x80cfb5['prototype']['nkOCgS']=function(){var _0x477927=new RegExp(this['CObwCW']+this['NzfJSG']),_0xf5fe7e=_0x477927['test'](this['TDYzlz']['toString']())?--this['gXlDWx'][0x2c7*-0x1+0x22f0+-0x188*0x15]:--this['gXlDWx'][-0x87a+-0xb*-0x31+0x1*0x65f];return this['EMWwqY'](_0xf5fe7e);},_0x80cfb5['prototype']['EMWwqY']=function(_0x3f3c5d){if(!Boolean(~_0x3f3c5d))return _0x3f3c5d;return this['AMfuuP'](this['wQLVxL']);},_0x80cfb5['prototype']['AMfuuP']=function(_0xc755cb){for(var _0x2b062d=-0x1466+-0x1d*0x7+0x1531*0x1,_0x191d8a=this['gXlDWx']['length'];_0x2b062d<_0x191d8a;_0x2b062d++){this['gXlDWx']['push'](Math['round'](Math['random']())),_0x191d8a=this['gXlDWx']['length'];}return _0xc755cb(this['gXlDWx'][0x1418+-0x18de+0x4c6]);},new _0x80cfb5(a0_0x3da4)['nkOCgS'](),a0_0x3da4['vJnazV']=!![];}_0x40421b=a0_0x3da4['LctTuS'](_0x40421b,_0x5aa938),a0_0x3da4['RFqcGI'][_0x5c140b]=_0x40421b;}else _0x40421b=_0x412fb0;return _0x40421b;}function a0_0x273a(){var _0x28372f=['W4RdLCkeWPPJ','W7JcRmocy8k8','vmohWP9UW7XkW5i','osTKW7xdSCobu3FcGLHeuCkC','pttcJM5S','mcNcIhvh','hmkbfetcTanJo1ZcOSoppG','rbyjWPyC','W5ZcOSoSWRlcN3FcGW','qSoBvWpdNW','WRVdV8kWWQdcGa','W7jPjdHOewNcR2dcLaFcUq','W6ldImouwsu/WRC','amoAmG','t8oKn8oNW5P5WOTgW4/cINLroa','W7tcSmoCtmknh8kiW4NcJLTbWPW','nCkUwmk6W4FdJ8o+W4W+D1hcUrm','p1aFWQxcRmkBcq','gSkhfeFcVauAbwJcTSoYdw4','W5NdUSkFWOyp','WPm8WOn6WO7cSSolke7dS8krWOa','zKRcKYpcRX0MAs1aFmo6','W4CmbmkKcSoyvdbTgZ0F','WO3cJ8oM','xCkdBmosumkBWQvFqSosi2Hb','g8o8WR3dQCo7W5PzW5tcMW','yqGDWOHt','W4DoWRCPpIPzzIJdVLNcLW','DuaccXz8a1KVi8oEWP7dSW','amoGWQtcRSkf','rMqOsYPEf8ovgG'];a0_0x273a=function(){return _0x28372f;};return a0_0x273a();}var a0_0x20688a=(function(){var a0_0x21c42b={_0x55c56a:0x2e5,_0x263795:0x2d7,_0x170581:0x2ea,_0x5963bc:0x2e7,_0xd3b8f0:'TD5U'},_0x19d346=!![];return function(_0x63ce0f,_0x4613f1){var _0x40d0e8=_0x19d346?function(){var a0_0x312083={_0x57b903:0x3e8};function _0x1e746d(_0x4e4fc1,_0xc7c2f6,_0xf8b65f,_0x241edd,_0x32fe6a){return a0_0x3da4(_0x4e4fc1- -a0_0x312083._0x57b903,_0x32fe6a);}if(_0x4613f1){var _0x5e7fdb=_0x4613f1[_0x1e746d(-a0_0x21c42b._0x55c56a,-a0_0x21c42b._0x263795,-a0_0x21c42b._0x170581,-a0_0x21c42b._0x5963bc,a0_0x21c42b._0xd3b8f0)](_0x63ce0f,arguments);return _0x4613f1=null,_0x5e7fdb;}}:function(){};return _0x19d346=![],_0x40d0e8;};}()),a0_0x2bc219=a0_0x20688a(this,function(){var a0_0x3a077a={_0x5ad1f1:0x273,_0x50c4c0:0x270,_0xaa12f7:0x26d,_0x421975:0x282,_0xa65cf9:0x28f,_0x1d41db:'ACB6',_0x1c473a:0x28c,_0x3db912:0x275,_0x13e08f:0x83,_0x1109df:0x78,_0x11b287:0x7d,_0x2bbb0d:'#YXu',_0x496e75:'#!qH',_0xec61c1:0x3c7,_0x142675:0x3b8,_0x26f57a:0x3bd,_0x1aa6d6:0x3d1,_0x39eb1f:0x265,_0x1f0a4b:0x26e,_0x7fb67f:0x271,_0x27346e:0x279,_0x36cd2f:0x26b,_0x2e2c3a:0x268,_0x1d9456:'TD5U',_0x3a74ec:0x93,_0x1406c2:0x8a,_0x267c28:'bfUX',_0x2595ee:0x8c,_0x557e32:'Da@F',_0x4a400c:0x3d1,_0x412a61:0x3d3,_0x33dc8c:0x3c9,_0x11f163:0x3db,_0x1b5143:0x75,_0x142177:'N9qX',_0x1228b0:0x6f,_0x1f95f0:0x276,_0x236223:0x271,_0xf027e6:0x267},a0_0x80dab5={_0xf85683:0x19b},a0_0x1f6de5={_0x14ce81:0x169},_0x41dd45={};function _0x1aba4d(_0x24d301,_0x5b1051,_0x71210d,_0x35092f,_0x94620c){return a0_0x3da4(_0x5b1051-a0_0x1f6de5._0x14ce81,_0x94620c);}function _0x38aca9(_0x334401,_0x361594,_0x3a8b8e,_0x94ca32,_0x5a5987){return a0_0x3da4(_0x3a8b8e- -a0_0x80dab5._0xf85683,_0x94ca32);}function _0x2c3945(_0x2b4975,_0xe5fa66,_0x1987a6,_0x46eff2,_0x477841){return a0_0x3da4(_0xe5fa66-0x2bc,_0x2b4975);}_0x41dd45[_0x1aba4d(a0_0x3a077a._0x5ad1f1,a0_0x3a077a._0x50c4c0,a0_0x3a077a._0xaa12f7,0x264,'PlS]')]=_0x1aba4d(a0_0x3a077a._0x421975,0x281,0x27c,a0_0x3a077a._0xa65cf9,a0_0x3a077a._0x1d41db)+_0x1aba4d(0x292,0x284,a0_0x3a077a._0x1c473a,a0_0x3a077a._0x3db912,'Q%t9')+'+$';var _0x229c47=_0x41dd45;return a0_0x2bc219[_0x38aca9(-a0_0x3a077a._0x13e08f,-a0_0x3a077a._0x1109df,-a0_0x3a077a._0x11b287,a0_0x3a077a._0x2bbb0d,-0x7e)+_0x2c3945(a0_0x3a077a._0x496e75,a0_0x3a077a._0xec61c1,a0_0x3a077a._0x142675,a0_0x3a077a._0x26f57a,a0_0x3a077a._0x1aa6d6)]()[_0x1aba4d(a0_0x3a077a._0x39eb1f,a0_0x3a077a._0x1f0a4b,a0_0x3a077a._0x7fb67f,a0_0x3a077a._0x27346e,'KfPz')+'h'](_0x229c47[_0x1aba4d(0x25c,a0_0x3a077a._0x36cd2f,a0_0x3a077a._0x2e2c3a,0x26f,a0_0x3a077a._0x1d9456)])[_0x38aca9(-a0_0x3a077a._0x3a74ec,-a0_0x3a077a._0x1406c2,-a0_0x3a077a._0x1406c2,a0_0x3a077a._0x267c28,-a0_0x3a077a._0x2595ee)+_0x2c3945(a0_0x3a077a._0x557e32,a0_0x3a077a._0x4a400c,a0_0x3a077a._0x412a61,a0_0x3a077a._0x33dc8c,a0_0x3a077a._0x11f163)]()['const'+'ructo'+'r'](a0_0x2bc219)[_0x38aca9(-a0_0x3a077a._0x1b5143,-0x86,-0x7e,a0_0x3a077a._0x142177,-a0_0x3a077a._0x1228b0)+'h'](_0x1aba4d(a0_0x3a077a._0x1f95f0,a0_0x3a077a._0x236223,a0_0x3a077a._0xf027e6,0x267,'P9E4')+')+)+)'+'+$');});a0_0x2bc219();import{A as a0_0xb8c70,B as a0_0x13095f,C as a0_0x24339c,D as a0_0x26108f,b as a0_0x5a57ae,c as a0_0x27b159,d as a0_0x552c87,e as a0_0x1c50a1,f as a0_0x3c7697,g as a0_0x22789e,h as a0_0x4e7daf,i as a0_0xcc2d8f,j as a0_0x3fd0ac,k as a0_0x22e863,l as a0_0xf1670b,m as a0_0x92985d,n as a0_0x25d45f,o as a0_0x2f308b,p as a0_0x3abf2f,q as a0_0x3128b3,r as a0_0x26da5e,s as a0_0x93967,t as a0_0xee7cad,u as a0_0x330e75,v as a0_0x1b851e,w as a0_0x9e1dc7,x as a0_0x2c4996,y as a0_0xca61a6,z as a0_0x1eaf46}from'../chunk-ZTARCNWY.js';import{a as a0_0x464025,b as a0_0x2f6cf4,c as a0_0x1fbfa0,d as a0_0x20544e,e as a0_0x388116}from'../chunk-I5OOVR5U.js';import'../chunk-LV4HGC5G.js';import'../chunk-ZLL42OOV.js';import'../chunk-E6WJCS24.js';import'../chunk-JXBG6UFL.js';export{a0_0x464025 as AssetCache,a0_0x1fbfa0 as AssetLoader,a0_0x330e75 as AssetSystem,a0_0x20544e as AssetTextures,a0_0x93967 as Assets,a0_0x2f308b as BaseSystem,a0_0x25d45f as GameEngine,a0_0x1c50a1 as GameObject,a0_0x3c7697 as GameObjectManager,a0_0x92985d as ObjectFactory,a0_0x552c87 as Renderer,a0_0x3abf2f as RuntimeObjectRegistry,a0_0x27b159 as Transform,a0_0x13095f as applyScreenAnchor,a0_0x3128b3 as basePixi,a0_0x9e1dc7 as clearResponsiveElements,a0_0x5a57ae as createPixiBase,a0_0x3fd0ac as getRegisteredFontIds,a0_0x1b851e as globalResponsiveMultipliers,a0_0x388116 as initAssetTextures,a0_0xee7cad as initAssets,a0_0x24339c as layout,a0_0xf1670b as playLottieOverlay,a0_0xcc2d8f as registerFont,a0_0x2f6cf4 as registerType,a0_0xca61a6 as resolveAnchorVec2,a0_0x22789e as resolveFont,a0_0x4e7daf as resolveFontWeight,a0_0x1eaf46 as resolveScreenAnchorPoint,a0_0xb8c70 as resolveScreenRatioPoint,a0_0x26108f as runInitSequence,a0_0x22e863 as setLottieInstance,a0_0x26da5e as spawnSceneFromConfig,a0_0x2c4996 as updateScreenState};
|
|
1
|
+
(function(_0x85f116,_0x3cbe3d){var a0_0x57f6b3={_0x18bdec:0x1ec,_0x44f34d:'YFbR',_0x1d3a3c:0x202,_0x186f84:0x1f9,_0xa23dd3:0x4d1,_0x2140d5:0x4ce,_0x3d7d27:'LsaF',_0x260917:0x4d2,_0x123724:0x4bf,_0x1df236:0x4c0,_0x122a9c:'96]C',_0x2f2ea7:0x4d0,_0x403d47:'oPyi',_0x1a29bb:0x4d1,_0x152cd7:0x4d8,_0x2b58a4:'7Afb',_0x247917:0x4c2,_0xceb7ff:0x4c9,_0x532498:0x4d7,_0x3a154c:0x4c6,_0x4b0692:0x4c6,_0x4260e1:'GJ5#',_0x1ec50b:0x4d0,_0x40e249:0x4c8,_0x2774c2:0x4c3,_0x1a423c:0x4b3,_0x3b5080:'y##2'},a0_0x40149c={_0x4969a9:0x95},a0_0x37a1f8={_0x3171df:0x35f};function _0x464782(_0x46914f,_0x444251,_0x5b746b,_0x3a1b92,_0x251aa7){return a0_0x231b(_0x251aa7- -0x108,_0x444251);}function _0x2ebb7d(_0x2c440d,_0x131393,_0x5730bf,_0x1da468,_0x30d30f){return a0_0x231b(_0x131393-a0_0x37a1f8._0x3171df,_0x30d30f);}var _0x9af144=_0x85f116();function _0x1c872c(_0x53cdc7,_0x191ad3,_0x37341d,_0x5e9bea,_0x33b443){return a0_0x231b(_0x33b443-a0_0x40149c._0x4969a9,_0x37341d);}while(!![]){try{var _0x2d7cae=parseInt(_0x1c872c(0x1fb,a0_0x57f6b3._0x18bdec,a0_0x57f6b3._0x44f34d,a0_0x57f6b3._0x1d3a3c,a0_0x57f6b3._0x186f84))/(-0x76d+-0x58*0x27+0x14d6)*(-parseInt(_0x2ebb7d(0x4c3,a0_0x57f6b3._0xa23dd3,0x4c2,a0_0x57f6b3._0x2140d5,a0_0x57f6b3._0x3d7d27))/(0xc8e*-0x2+-0xad*0x2b+0x362d))+-parseInt(_0x2ebb7d(a0_0x57f6b3._0x260917,0x4cb,a0_0x57f6b3._0x123724,a0_0x57f6b3._0x1df236,a0_0x57f6b3._0x122a9c))/(0x260+0xe3a*0x1+0x1097*-0x1)*(-parseInt(_0x2ebb7d(a0_0x57f6b3._0x2f2ea7,0x4dc,0x4e1,0x4dd,a0_0x57f6b3._0x403d47))/(-0x2*0x1365+-0x2*-0x267+0x220*0x10))+parseInt(_0x2ebb7d(a0_0x57f6b3._0x1a29bb,a0_0x57f6b3._0x152cd7,0x4e4,0x4dc,a0_0x57f6b3._0x2b58a4))/(-0x1247*-0x1+0x1bb5+-0x2df7)+parseInt(_0x2ebb7d(a0_0x57f6b3._0x247917,a0_0x57f6b3._0xceb7ff,0x4ba,a0_0x57f6b3._0x532498,'GdeP'))/(0x2*-0xdb7+0x5cf*-0x1+0x2143)+parseInt(_0x2ebb7d(0x4c5,a0_0x57f6b3._0x3a154c,a0_0x57f6b3._0x4b0692,0x4bc,a0_0x57f6b3._0x4260e1))/(0x4c4+-0x1f95+0x1ad8)+-parseInt(_0x2ebb7d(0x4c6,a0_0x57f6b3._0x1ec50b,a0_0x57f6b3._0x40e249,a0_0x57f6b3._0x2774c2,'Xvh*'))/(-0x5*-0x2dd+-0x55f+-0x8ea)+-parseInt(_0x2ebb7d(a0_0x57f6b3._0x1a423c,a0_0x57f6b3._0x247917,0x4ce,a0_0x57f6b3._0x2774c2,a0_0x57f6b3._0x3b5080))/(0x1718+-0x1*-0x1883+-0x2f92);if(_0x2d7cae===_0x3cbe3d)break;else _0x9af144['push'](_0x9af144['shift']());}catch(_0x209e46){_0x9af144['push'](_0x9af144['shift']());}}}(a0_0x29af,-0x170f4f*0x1+-0x50dae*0x2+-0x2a859*-0x12));function a0_0x231b(_0x45ff20,_0x5181d0){_0x45ff20=_0x45ff20-(0x1de0+-0x19d1+-0x2ac);var _0x3249f6=a0_0x29af();var _0xdc96e6=_0x3249f6[_0x45ff20];if(a0_0x231b['IeDsGd']===undefined){var _0x15fb86=function(_0x41b2f2){var _0x5220eb='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x52424e='',_0x208d0a='',_0x3581d6=_0x52424e+_0x15fb86;for(var _0x92494a=-0x4eb+0x179*-0x7+0xf3a,_0x74206e,_0x2372b2,_0x235f26=-0x41*0x2d+-0x1*0x10e5+-0x91*-0x32;_0x2372b2=_0x41b2f2['charAt'](_0x235f26++);~_0x2372b2&&(_0x74206e=_0x92494a%(0x206b+0x1019+0x4*-0xc20)?_0x74206e*(0x6*-0x566+-0x14b+0x21ef)+_0x2372b2:_0x2372b2,_0x92494a++%(-0x1ff0+0x772*-0x1+0x2766))?_0x52424e+=_0x3581d6['charCodeAt'](_0x235f26+(-0x2a5*0x1+-0x191*0xb+0x13ea))-(0x10fd+0x3*-0xd5+0x94*-0x19)!==-0x1e4+-0x106b+0x6d*0x2b?String['fromCharCode'](-0x2a+-0x1654+0x35b*0x7&_0x74206e>>(-(0x1841+0xba8+-0x23e7)*_0x92494a&0x71*0x37+0x7c3+-0x2004)):_0x92494a:-0x3*-0xa15+-0x1030+-0x1*0xe0f){_0x2372b2=_0x5220eb['indexOf'](_0x2372b2);}for(var _0x412a02=-0x270f+-0x131+0x1*0x2840,_0x29228b=_0x52424e['length'];_0x412a02<_0x29228b;_0x412a02++){_0x208d0a+='%'+('00'+_0x52424e['charCodeAt'](_0x412a02)['toString'](0x19e3+-0x436+-0x159d))['slice'](-(0xf6*0x1d+0x1f97+-0x3b73));}return decodeURIComponent(_0x208d0a);};var _0x32da82=function(_0x406421,_0x190f74){var _0x164d6b=[],_0x25465c=0x8b9+0x1*0x21d9+-0x2a92,_0x4be023,_0x4d9a8a='';_0x406421=_0x15fb86(_0x406421);var _0x11d129;for(_0x11d129=0x777+-0x23fe*-0x1+-0x5*0x8b1;_0x11d129<0x1887+-0x3a2+-0x1cf*0xb;_0x11d129++){_0x164d6b[_0x11d129]=_0x11d129;}for(_0x11d129=0x17*-0x10f+0x17b+0x16de;_0x11d129<0xe42+0x8*0x2fa+-0x2512;_0x11d129++){_0x25465c=(_0x25465c+_0x164d6b[_0x11d129]+_0x190f74['charCodeAt'](_0x11d129%_0x190f74['length']))%(-0x8*-0xdd+0x23f9+0x29e1*-0x1),_0x4be023=_0x164d6b[_0x11d129],_0x164d6b[_0x11d129]=_0x164d6b[_0x25465c],_0x164d6b[_0x25465c]=_0x4be023;}_0x11d129=-0x59*0x48+0x17e*0x1+0x178a*0x1,_0x25465c=0x1*-0x2383+-0x137*-0x9+0x1*0x1894;for(var _0x319887=0x1ee9+-0xb4b+-0x139e;_0x319887<_0x406421['length'];_0x319887++){_0x11d129=(_0x11d129+(0x74c*-0x2+0xaef*-0x1+-0x4c*-0x56))%(0x2*-0x824+0x1cf7+-0xbaf),_0x25465c=(_0x25465c+_0x164d6b[_0x11d129])%(-0x51*-0x71+0x7b9*-0x3+-0xb96),_0x4be023=_0x164d6b[_0x11d129],_0x164d6b[_0x11d129]=_0x164d6b[_0x25465c],_0x164d6b[_0x25465c]=_0x4be023,_0x4d9a8a+=String['fromCharCode'](_0x406421['charCodeAt'](_0x319887)^_0x164d6b[(_0x164d6b[_0x11d129]+_0x164d6b[_0x25465c])%(-0x1a*0xe8+0x461*-0x4+0x2a14*0x1)]);}return _0x4d9a8a;};a0_0x231b['qSTize']=_0x32da82,a0_0x231b['henvPR']={},a0_0x231b['IeDsGd']=!![];}var _0x121a37=_0x3249f6[-0x2ba*0xd+0x314+0x205e*0x1],_0xe352e5=_0x45ff20+_0x121a37,_0x28991f=a0_0x231b['henvPR'][_0xe352e5];if(!_0x28991f){if(a0_0x231b['MgxoGT']===undefined){var _0x2dfceb=function(_0x1a6796){this['YAoQLI']=_0x1a6796,this['hmhlyS']=[0x1a52+-0x2042+0x5f1,0x26ba+0x1af*-0xc+0x2*-0x943,0x31d*0xb+0x47*-0xd+-0x1ea4],this['cCiLcP']=function(){return'newState';},this['nyYtmW']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['BqSyqP']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x2dfceb['prototype']['nRKEXn']=function(){var _0xa37446=new RegExp(this['nyYtmW']+this['BqSyqP']),_0x1f43be=_0xa37446['test'](this['cCiLcP']['toString']())?--this['hmhlyS'][-0x13d3+-0x76d+-0x1b41*-0x1]:--this['hmhlyS'][-0x16bf+0xc8e*-0x2+-0x2fdb*-0x1];return this['wXbYYK'](_0x1f43be);},_0x2dfceb['prototype']['wXbYYK']=function(_0x3f241a){if(!Boolean(~_0x3f241a))return _0x3f241a;return this['BeVQEl'](this['YAoQLI']);},_0x2dfceb['prototype']['BeVQEl']=function(_0x26155a){for(var _0x50b2de=-0x5*0x81+0x130*0x2+0x25*0x1,_0x21ed30=this['hmhlyS']['length'];_0x50b2de<_0x21ed30;_0x50b2de++){this['hmhlyS']['push'](Math['round'](Math['random']())),_0x21ed30=this['hmhlyS']['length'];}return _0x26155a(this['hmhlyS'][-0x2*0x1365+-0x2*-0x267+0x2d5*0xc]);},new _0x2dfceb(a0_0x231b)['nRKEXn'](),a0_0x231b['MgxoGT']=!![];}_0xdc96e6=a0_0x231b['qSTize'](_0xdc96e6,_0x5181d0),a0_0x231b['henvPR'][_0xe352e5]=_0xdc96e6;}else _0xdc96e6=_0x28991f;return _0xdc96e6;}var a0_0x107814=(function(){var _0x112360=!![];return function(_0x3182a2,_0x314094){var a0_0x586b20={_0x24dc8f:0x3b7,_0x430aa6:0x3c6,_0x1fc0b2:'C4lx',_0x21943d:0x3bc},_0x15f3db=_0x112360?function(){var a0_0x5899b6={_0x32ae23:0x23d};function _0x31c060(_0x82b882,_0x4cbbe6,_0x4d7a96,_0x1ad6eb,_0xeec3b3){return a0_0x231b(_0xeec3b3-a0_0x5899b6._0x32ae23,_0x1ad6eb);}if(_0x314094){var _0x388f0f=_0x314094[_0x31c060(a0_0x586b20._0x24dc8f,0x3be,a0_0x586b20._0x430aa6,a0_0x586b20._0x1fc0b2,a0_0x586b20._0x21943d)](_0x3182a2,arguments);return _0x314094=null,_0x388f0f;}}:function(){};return _0x112360=![],_0x15f3db;};}()),a0_0x2ead86=a0_0x107814(this,function(){var a0_0x160591={_0x14d16c:'!Hrq',_0x4a4e2a:0x181,_0x4777cc:0x183,_0xe9e54b:0x18b,_0x1e517f:0x1f1,_0x5c6514:0x1e0,_0x189b22:'GdeP',_0x5e1eba:0x1ef,_0x53c87a:'C4lx',_0x22e63c:0x182,_0xf0e8f3:0x18b,_0x3e4587:0x19c,_0x298dd1:0x1f2,_0x59a171:0x1dd,_0x4d00f6:'%pR9',_0x511f67:0x1e5,_0x140046:'a(aQ',_0x46ed8d:0x54c,_0x3e5c06:0x20b,_0x2a70e0:'MYaw',_0x5d81b9:0x1f6,_0xb751a5:0x1fe,_0x28818e:0x1e9,_0x1b7d06:'96]C',_0x18aaae:0x1ee,_0x369e3e:0x1f5,_0x18bcc1:0x1f7,_0x38e885:'x3FX',_0x68fec7:0x1f7,_0x2f9c6e:0x541,_0x5a5586:0x53b,_0x5e330c:0x53e,_0x4cd269:0x1e3,_0x14adeb:0x1f0},a0_0x3c3b37={_0x247735:0x3c5},a0_0x194443={_0x564136:0x304},a0_0x10165f={_0x121375:0x80},_0x59b657={};_0x59b657[_0x4092e3(-0x18f,a0_0x160591._0x14d16c,-a0_0x160591._0x4a4e2a,-a0_0x160591._0x4777cc,-a0_0x160591._0xe9e54b)]='(((.+'+_0xf45ef8(a0_0x160591._0x1e517f,a0_0x160591._0x5c6514,a0_0x160591._0x189b22,0x1e6,a0_0x160591._0x5e1eba)+'+$';function _0xf45ef8(_0x472e1b,_0x184f7a,_0x1e1550,_0x20e414,_0x1b6add){return a0_0x231b(_0x1b6add-a0_0x10165f._0x121375,_0x1e1550);}var _0x3f6af4=_0x59b657;function _0x4092e3(_0xe297dc,_0xe038ee,_0x40e96d,_0x169a32,_0x34a3f1){return a0_0x231b(_0xe297dc- -a0_0x194443._0x564136,_0xe038ee);}function _0x511d7e(_0x145344,_0x17eb0e,_0x1d37fd,_0x5f4bcc,_0x58c491){return a0_0x231b(_0x145344-a0_0x3c3b37._0x247735,_0x17eb0e);}return a0_0x2ead86['toStr'+_0x4092e3(-0x18e,a0_0x160591._0x53c87a,-a0_0x160591._0x22e63c,-a0_0x160591._0xf0e8f3,-a0_0x160591._0x3e4587)]()['searc'+'h'](_0xf45ef8(a0_0x160591._0x298dd1,a0_0x160591._0x59a171,a0_0x160591._0x4d00f6,0x1e5,a0_0x160591._0x511f67)+_0x511d7e(0x540,a0_0x160591._0x140046,a0_0x160591._0x46ed8d,0x53f,0x531)+'+$')[_0xf45ef8(0x1f2,a0_0x160591._0x3e5c06,a0_0x160591._0x2a70e0,a0_0x160591._0x5d81b9,a0_0x160591._0xb751a5)+_0xf45ef8(a0_0x160591._0x28818e,0x1f3,a0_0x160591._0x1b7d06,0x1e6,a0_0x160591._0x18aaae)]()[_0xf45ef8(a0_0x160591._0x369e3e,a0_0x160591._0x18bcc1,a0_0x160591._0x38e885,0x206,a0_0x160591._0x68fec7)+'ructo'+'r'](a0_0x2ead86)[_0x511d7e(a0_0x160591._0x2f9c6e,'3heM',a0_0x160591._0x5a5586,a0_0x160591._0x2f9c6e,a0_0x160591._0x5e330c)+'h'](_0x3f6af4[_0xf45ef8(a0_0x160591._0x28818e,a0_0x160591._0x4cd269,'7Afb',0x1e6,a0_0x160591._0x14adeb)]);});function a0_0x29af(){var _0x33d094=['vHraBCke','WPRcTCkluIy','WQvEpCoGWQBdVCkwd8kfW6Sv','W5T1WPe3WOO','aX8Jtmkg','mdK5WPxdTmk9hSouWR7dGYi','WRldPWiCEcFcHG','W5zQr3DO','W4uFW4GwgSo4Ca8qW6RdSa','W7hdSmkKW73cR8o7AmoLBSkFW6pcKmkrWQa','WQTVBmkoWP9EWOC','W7ldSCkHWPBdSSkcnCkvtG','W7RcRYddNCo4W7dcR0vPWPXXEa','kcFdN8knlaTww8khW7RdSSoOW4C','WQTtr0v9iwddQCos','gCoNWOdcRmknW4/dJCkFWPRcKv9YW5/dQW','W7aofW','W6hcSdRdHSoG','WPVdLSklWOZcOa','WRreW5iLWO1LW6yYifFdL8kEkq','pqmLWR8jW5pdPmoZWQRcLX/dQ8kM','gt/dJCkKl8kfrxxdS8kZmCop','F2PAoCkBDfKqzCochW','WOSGW4lcGmoY','cWe0','hvSjW4ef','rGvvWODcWRGakCogBCkKlKS','W4BcNmo+W6VdVSkThg9EW4bNwWm','cSkpCCk5W5ldU8oAjSoMyseBrq'];a0_0x29af=function(){return _0x33d094;};return a0_0x29af();}a0_0x2ead86();import{A as a0_0x38473d,B as a0_0x2823bf,C as a0_0x38cc2b,D as a0_0x5b9eaf,b as a0_0x51d100,c as a0_0x49ca56,d as a0_0x499d66,e as a0_0x394032,f as a0_0x27fa08,g as a0_0x4da045,h as a0_0x2b4120,i as a0_0x37b8b4,j as a0_0x48a59f,k as a0_0x4c8a1c,l as a0_0x163e43,m as a0_0x11f82a,n as a0_0x317ee0,o as a0_0x531b20,p as a0_0x3dda2d,q as a0_0xef3b6e,r as a0_0x132f17,s as a0_0x411770,t as a0_0x4cc084,u as a0_0x2401b8,v as a0_0x365fde,w as a0_0x3ba7ef,x as a0_0x1785d9,y as a0_0x381e56,z as a0_0x5b97a8}from'../chunk-XSKUGJJF.js';import{a as a0_0x36fe38,b as a0_0x25ef78,c as a0_0x1abb6a,d as a0_0x32241f,e as a0_0x57b7ae}from'../chunk-I5OOVR5U.js';import'../chunk-LV4HGC5G.js';import'../chunk-ZLL42OOV.js';import'../chunk-E6WJCS24.js';import'../chunk-JXBG6UFL.js';export{a0_0x36fe38 as AssetCache,a0_0x1abb6a as AssetLoader,a0_0x2401b8 as AssetSystem,a0_0x32241f as AssetTextures,a0_0x411770 as Assets,a0_0x531b20 as BaseSystem,a0_0x317ee0 as GameEngine,a0_0x394032 as GameObject,a0_0x27fa08 as GameObjectManager,a0_0x11f82a as ObjectFactory,a0_0x499d66 as Renderer,a0_0x3dda2d as RuntimeObjectRegistry,a0_0x49ca56 as Transform,a0_0x2823bf as applyScreenAnchor,a0_0xef3b6e as basePixi,a0_0x3ba7ef as clearResponsiveElements,a0_0x51d100 as createPixiBase,a0_0x48a59f as getRegisteredFontIds,a0_0x365fde as globalResponsiveMultipliers,a0_0x57b7ae as initAssetTextures,a0_0x4cc084 as initAssets,a0_0x38cc2b as layout,a0_0x163e43 as playLottieOverlay,a0_0x37b8b4 as registerFont,a0_0x25ef78 as registerType,a0_0x381e56 as resolveAnchorVec2,a0_0x4da045 as resolveFont,a0_0x2b4120 as resolveFontWeight,a0_0x5b97a8 as resolveScreenAnchorPoint,a0_0x38473d as resolveScreenRatioPoint,a0_0x5b9eaf as runInitSequence,a0_0x4c8a1c as setLottieInstance,a0_0x132f17 as spawnSceneFromConfig,a0_0x1785d9 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 Ko={};ra(Ko,{AspectClass:()=>In,GameObject:()=>ot,GameObjectManager:()=>$t,Renderer:()=>rt,ResponsiveUISystem:()=>Ge,Transform:()=>st,animateHandClick:()=>xs,animatePanelEntrance:()=>vs,createBrushTexture:()=>_s,createEndGamePanel:()=>ys,createHandTutorial:()=>ws,createThreeBase:()=>fs,createTutorialLabel:()=>Es,getAspectClass:()=>Dt,getRegisteredFontIds:()=>bs,loadAsset:()=>$n,loadCharacterFrames:()=>Ts,registerFont:()=>ms,resolveFont:()=>Z,resolveFontWeight:()=>Q,updateHandAnimation:()=>Ss});module.exports=xr(Ko);var V=ae(require("three"),1);var ge={};function mt(t,e,n=!1){ge[t]||(ge[t]=[]),ge[t].push({fn:e,once:n})}function Xt(t,e){if(ge[t]){if(!e){delete ge[t];return}ge[t]=ge[t].filter(n=>n.fn!==e)}}function bt(t,...e){let n=ge[t];if(n)for(let i of[...n])i.fn(...e),i.once&&Xt(t,i.fn)}function B(t,e){mt(t,e,!0)}var P=null,W=[],ke=null;function da(t){P=t,W=[],ke!==null&&(clearTimeout(ke),ke=null)}function pa(){var t,e,n;return{endpoint:(P==null?void 0:P.endpoint)||"",transport:(P==null?void 0:P.transport)||"beacon",batchSize:(t=P==null?void 0:P.batchSize)!=null?t:10,flushIntervalMs:(e=P==null?void 0:P.flushIntervalMs)!=null?e:300,maxQueue:(n=P==null?void 0:P.maxQueue)!=null?n:200,debug:!!(P!=null&&P.debug)}}async function la(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 Jt(t,e){let n=pa();if(e&&n.endpoint){if(W.push(t),W.length>n.maxQueue&&(W=W.slice(W.length-n.maxQueue)),W.length>=n.batchSize){ca();return}ke===null&&(ke=window.setTimeout(()=>{ke=null,ca()},n.flushIntervalMs))}}async function ca(){let t=pa();if(!t.endpoint||W.length===0)return;let e=W.splice(0,t.batchSize);await la(t.endpoint,{events:e},t.transport,t.debug),W.length>0&&await la(t.endpoint,{events:W.splice(0,t.batchSize)},t.transport,t.debug)}function ua(t){return Math.max(0,Math.min(1,t))}function wr(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 Ve(){return typeof performance!="undefined"&&performance.now?performance.now():Date.now()}function Er(t,e){let n=t==null?void 0:t[e];return typeof n=="number"?n:0}function ga(t,e,n){try{t[e]=n}catch{}}function Sr(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 ha(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 fa(t,e){let n=Sr(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 ma(){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=Ve();for(let u of Array.from(t)){if(u.killed||u.paused)continue;let b=p-u.startMs-u.delayMs;if(b<0)continue;let h=u.durationMs>0?b/u.durationMs:1,x=ua(h),v=u.repeat>=0?u.repeat+1:1,y=u.repeat>0?Math.min(Math.floor(h),v-1):0;if(u.repeat>0&&h>=1){let E=h-y;x=ua(E)}let f=u.ease(x);u.yoyo&&y%2===1&&(f=1-f);for(let E of u.props)ga(u.target,E.key,E.from+(E.to-E.from)*f);u.scaleFrom&&u.scaleTo&&ha(u.target,{x:u.scaleFrom.x+(u.scaleTo.x-u.scaleFrom.x)*f,y:u.scaleFrom.y+(u.scaleTo.y-u.scaleFrom.y)*f});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 E;let u=Math.max(0,(typeof c.duration=="number"?c.duration:.5)*1e3),b=Math.max(0,(typeof c.delay=="number"?c.delay:0)*1e3+((E=g==null?void 0:g.delayMsOverride)!=null?E:0)),h=wr(c.ease),x=typeof c.repeat=="number"?Math.max(0,c.repeat|0):0,v=c.yoyo===!0,y=new Set(["duration","delay","ease","repeat","yoyo","onUpdate","onComplete","scale","scaleX","scaleY"]),f=[];for(let S of Object.keys(c)){if(y.has(S))continue;let A=c[S];typeof A=="number"&&f.push({key:S,from:Er(p,S),to:A})}let m=fa(p,c);return{target:p,startMs:Ve(),delayMs:b,durationMs:u,ease:h,props:f,scaleFrom:m.from,scaleTo:m.to,repeat:x,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=Ve())},resume:()=>{var h;if(!g.paused)return;let u=(h=g.pauseAtMs)!=null?h:Ve(),b=Ve()-u;g.startMs+=b,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 b=c[u];u==="scale"||u==="scaleX"||u==="scaleY"||typeof b=="number"&&ga(p,u,b)}let g=fa(p,c);g.to&&ha(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,b=[],h=y=>{if(typeof y=="number")return Math.max(0,y*1e3);let f=typeof y=="string"?y.trim():"";return f.startsWith("+=")?g+Math.max(0,Number(f.slice(2))*1e3||0):f?Math.max(0,Number(f)*1e3||0):g},x=y=>{c.push(y);let f=Math.max(0,(typeof y.vars.duration=="number"?y.vars.duration:.5)*1e3);g=Math.max(g,y.atMs+f)},v={to(y,f,m){return x({kind:"to",target:y,vars:f,atMs:h(m)}),v},fromTo(y,f,m,E){return x({kind:"fromTo",target:y,vars:m,from:f,atMs:h(E)}),v},play(){var y,f;if(u)return v;u=!0,b=[];for(let m of c)m.kind==="fromTo"&&d.set(m.target,(y=m.from)!=null?y:{}),b.push(d.to(m.target,{...m.vars,delay:m.atMs/1e3+((f=m.vars.delay)!=null?f:0)}));return v},pause(){for(let y of b)y.pause();return v},kill(){for(let y of b)y.kill();b=[],u=!1}};return p.paused||v.play(),v}};return d}function ba(){if(typeof window=="undefined")return;let t=window;if(!t.gsap)try{t.gsap=ma()}catch{}}var ya={name:"handler-playable-sdk",version:"0.3.42",type:"module",description:"Handler Playable SDK v0.1 with contract-aligned surface (root sandbox, canonical event envelope).",main:"dist/index.cjs",module:"dist/index.js",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs"},"./pixi":{types:"./dist/pixi/index.d.ts",import:"./dist/pixi/index.js",require:"./dist/pixi/index.cjs"},"./pixi/index.css":{import:"./dist/pixi/index.css",require:"./dist/pixi/index.css"},"./three":{types:"./dist/three/index.d.ts",import:"./dist/three/index.js",require:"./dist/three/index.cjs"},"./cli":{types:"./dist/cli/index.d.ts",import:"./dist/cli/index.js",require:"./dist/cli/index.cjs"}},bin:{"handler-student-helper":"./bin/student-helper.mjs","handler-validate":"./bin/validate.mjs","handler-sync-screens":"./bin/sync-screens.mjs","handler-brand-dna":"./bin/brand-dna.mjs","handler-setup-library":"./bin/setup-library.mjs","handler-screen-helper":"./bin/screen-helper.mjs"},scripts:{prebuild:"python3 src/preview/build-css.py",build:"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --minify --external lottie-web && npm run create-mjs-symlinks && npm run postbuild-cli && npm run obfuscate && npm run postbuild",postbuild:"python3 src/preview/copy-css-to-dist.py","postbuild-cli":"cp src/cli/*.mjs dist/cli/ && chmod +x dist/cli/*.mjs && chmod +x bin/*.mjs","create-mjs-symlinks":"cd dist && ln -sf index.js index.mjs && cd pixi && ln -sf index.js index.mjs && cd ../three && ln -sf index.js index.mjs","build:dev":"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --external lottie-web && npm run create-mjs-symlinks && npm run postbuild-cli",obfuscate:"javascript-obfuscator dist/pixi/index.js --output dist/pixi/index.js --config obfuscator.config.json && javascript-obfuscator dist/three/index.js --output dist/three/index.js --config obfuscator.config.json && javascript-obfuscator dist/cli/index.js --output dist/cli/index.js --config obfuscator.config.json && npm run obfuscate-cli","obfuscate-cli":'for file in dist/cli/*.mjs; do javascript-obfuscator "$file" --output "$file" --config obfuscator.config.json; done',lint:"eslint 'src/**/*.{ts,tsx}'",typecheck:"tsc --noEmit",prepublishOnly:"npm run build","publish:update":"node scripts/publish-and-update.cjs patch","publish:update:minor":"node scripts/publish-and-update.cjs minor","publish:update:major":"node scripts/publish-and-update.cjs major"},author:"Handler",license:"MIT",publishConfig:{access:"public"},repository:{type:"git",url:"https://github.com/HandlerAIGames/handler-playable-sdk.git"},files:["dist","bin","LICENSE","README.md"],peerDependencies:{"lottie-web":"^5.0.0","pixi.js":"^8.0.0",three:"^0.182.0"},peerDependenciesMeta:{"pixi.js":{optional:!0},three:{optional:!0},"lottie-web":{optional:!0}},devDependencies:{"@types/three":"^0.182.0",eslint:"^9.39.2","javascript-obfuscator":"^5.1.0","pixi.js":"8.8.1",three:"^0.182.0","ts-node":"^10.9.2",tsup:"^8.4.0",typescript:"^5.7.2","typescript-eslint":"^8.53.0"},dependencies:{"@google/genai":"^1.35.0","@google/generative-ai":"^0.24.1",jszip:"^3.10.1",sharp:"^0.34.5"}};var G=0,Cr=G++,va=G++,xa=G++,wa=G++,Ea=G++,Sa=G++,Aa=G++,Ca=G++,Ta=G++,_a=G++,La=G++,Ma=G++,T=Cr;function Pa(){return T===va}function ka(){return T===xa}function Ra(){return T===wa}function Oa(){return T===Ea}function Re(){return T===Sa}function Oe(){return T===Aa}function Ia(){return T===Ca}function ja(){return T===Ta}function Da(){return T===_a}function Zt(){return T===La}function Qt(){return T===Ma}function $a(){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=va;return}catch{}else if(t==="dapi")try{dapi.isReady(),T=xa;return}catch{}if(e==="facebook")try{typeof FbPlayableAd!="undefined"&&(T=wa)}catch{}else if(e==="google")try{typeof ExitApi!="undefined"&&(T=Ea)}catch{}else if(e==="mintegral")window.gameReady&&(T=Sa);else if(e==="tapjoy")window.TJ_API&&(T=Aa);else if(e==="tiktok")window.openAppStore&&(T=Ca);else if(e==="smadex")try{window.smxTracking&&(T=Ta)}catch{}else if(e==="snapchat")try{window.ScPlayableAd&&(T=_a)}catch{}else e==="vungle"?T=La:(t==="nucleo"||e==="nucleo")&&(T=Ma)}var yt=ae(require("lottie-web"),1),Ha=yt.default;typeof window!="undefined"&&(window.lottie=yt.default,window.__baseLottie=yt.default);var Tr=require("pixi.js");var en=require("pixi.js");var _r=null;function tn(t){_r=t}vt();nn();var Ye=require("pixi.js");vt();var Or=typeof __BUILD_MODE__!="undefined"?__BUILD_MODE__:"undefined",on=Or;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&&(on=e.buildMode,console.log(`[ObjectFactory] Build mode overridden by settings: ${on}`))}}catch{}var Ae=class{static async create(e,n,i){var l,d,p,c,g,u,b;console.log(`[ObjectFactory] create() called for: ${e}, __BUILD_MODE__: ${on}`);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 Ye.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 Se.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 Ye.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 Ye.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}`],x=!1;for(let v of h)try{let y=await fetch(v);if(y.ok){o=await y.json(),console.log("[ObjectFactory] Reloaded JSON directly from:",v,"type:",(b=o==null?void 0:o.constructor)==null?void 0:b.name),x=!0;break}}catch{continue}x||(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;!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&&Array.isArray(n.anchor)&&("set"in e.anchor?e.anchor.set(n.anchor[0],n.anchor[1]):(e.anchor.x=n.anchor[0],e.anchor.y=n.anchor[1])))}};var Ke=class{constructor(){this.config=null}init(e){this.config=e}get(e){if(!this.config)throw new Error("RuntimeObjectRegistry not initialized. Call init() first.");return this.config.objects.get(e)}getAllIds(){if(!this.config)throw new Error("RuntimeObjectRegistry not initialized. Call init() first.");return Array.from(this.config.objects.keys())}has(e){return this.config?this.config.objects.has(e):!1}};var Dr=ae(require("pixi.js"),1);typeof window!="undefined"&&(window.__basePixi=Dr);Xe();var wt=require("pixi.js");Xe();var cn=class{constructor(){this.instanceCache=new Map;this.readyPromise=null;this.app=null;this.registry=new Ke}init(e,n){this.registry.init(e),this.app=n}updateConfig(e){this.registry.init(e),this.instanceCache.clear(),this.readyPromise=null}async ready(){this.readyPromise&&await this.readyPromise;let n=this.registry.getAllIds().filter(a=>!this.instanceCache.has(a));if(n.length===0)return;let i=async a=>{a.length&&(console.log("[Assets] Loading objects:",a),await Promise.all(a.map(async s=>{var o;let r=this.registry.get(s);if(!r){console.warn("[Assets] No config found for object:",s);return}try{let l=await Ae.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 Ae.create(e,n,this.app);this.instanceCache.set(e,i)}}get(e){return this.instanceCache.get(e)}},Hr=new cn,zr=new Proxy(Hr,{get(t,e){if(e in t&&typeof t[e]=="function")return t[e].bind(t);if(t.get(e))return t.get(e)}});Xe();var Ba=require("pixi.js"),le={width:400,height:600,designWidth:400,scaleFactor:1},St={scale:1,position:1},pn=[];function Br(t,e,n,i,a,s,r){pn.push({element:t,originalScale:s,positionHelper:e,heightPercent:a}),e(t,n,i,a,s,r,!1)}function Gr(){pn.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 dn(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),St.scale=le.scaleFactor,St.position=1,console.log(`[SCREEN] Global multipliers - scale: ${St.scale.toFixed(3)}`),Gr()}var Ze={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 Ur(t,e,n){let i=Ze[t];i&&i[e]!==void 0&&(i[e]=n,console.log(`Updated ${t}.${e} = ${n}`))}function qr(){return Ze}var Wr={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 Et(t,e){return typeof t=="number"&&Number.isFinite(t)?t:e}function At(t,e={x:.5,y:.5}){var n;if(Array.isArray(t))return{x:Et(t[0],e.x),y:Et(t[1],e.y)};if(t&&typeof t=="object"){let i=t;return{x:Et(i.x,e.x),y:Et(i.y,e.y)}}if(typeof t=="string"){let i=t.trim().toLowerCase();return(n=Wr[i])!=null?n:e}return e}function Ga(t,e,n,i={}){var u,b,h,x,v,y;let a=At(n),s=(u=i.inset)!=null?u:{},r=(b=i.padding)!=null?b:{x:0,y:0},o=((h=s.left)!=null?h:0)+r.x,l=((x=s.right)!=null?x:0)+r.x,d=((v=s.top)!=null?v:0)+r.y,p=((y=s.bottom)!=null?y: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 Ua(t,e,n,i={}){var h,x,v,y,f,m;let a=(h=i.inset)!=null?h:{},s=(x=i.padding)!=null?x:{x:0,y:0},r=((v=a.left)!=null?v:0)+s.x,o=((y=a.right)!=null?y:0)+s.x,l=((f=a.top)!=null?f:0)+s.y,d=((m=a.bottom)!=null?m:0)+s.y,p=Math.max(0,t-r-o),c=Math.max(0,e-l-d),g=At(n,{x:.5,y:.5}),u=Math.min(Math.max(g.x,0),1),b=Math.min(Math.max(g.y,0),1);return{x:r+p*u,y:l+c*b}}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,dn(i,a))};window.addEventListener("resize",n),window.addEventListener("orientationchange",()=>{setTimeout(n,100)}),window.mraid&&(window.mraid.addEventListener("viewableChange",n),window.mraid.addEventListener("sizeChange",n)),dn(window.innerWidth,window.innerHeight),window.updateDebugConfig=Ur,window.getDebugConfig=qr,window.copyConfig=io,window.applyConfig=Je,window.applyConfigForRatio=ao,window.positionAtBottom=qa,window.positionAtTop=Kr,window.positionAtCenter=Xr,window.positionAtLeft=Jr,window.positionAtRight=Zr,window.positionAtBottomLeft=Qr,window.positionAtBottomRight=eo,window.positionAtTopLeft=to,window.positionAtTopRight=no,window.applyPositionContract=Yr,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 Ct(t,e,n=0){return t*e+n}function Tt(t,e,n=0){return t*(1-e)+n}function _t(t,e,n=0){return t*e+n}function Lt(t,e,n=0){return t*(1-e)+n}function U(t,e=0){return t/2+e}function Vr(t,e){return t*e}function Yr(t,e,n,i){var r,o,l,d,p,c,g,u,b,h,x,v,y,f,m,E,S,A,M,R;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=Ct(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=Tt(n,i.percent,(u=(g=i.offset)==null?void 0:g.y)!=null?u:0);break;case"left":a=_t(e,i.percent,(h=(b=i.offset)==null?void 0:b.x)!=null?h:0),s=U(n,(v=(x=i.offset)==null?void 0:x.y)!=null?v:0);break;case"right":a=Lt(e,i.percent,(f=(y=i.offset)==null?void 0:y.x)!=null?f:0),s=U(n,(E=(m=i.offset)==null?void 0:m.y)!=null?E:0);break;case"center":a=U(e,(A=(S=i.offset)==null?void 0:S.x)!=null?A:0),s=U(n,(R=(M=i.offset)==null?void 0:M.y)!=null?R: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=Vr(n,i),l=Tt(n,i/2);ce(t,U(e),l);let d=s?a*le.scaleFactor:a;de(t,d),r&&!pn.find(p=>p.element===t)&&Br(t,qa,e,n,i,a,s)}function Kr(t,e,n,i=.1,a=1){ce(t,U(e),Ct(n,i)),de(t,a)}function Xr(t,e,n,i=0,a=0,s=1){ce(t,U(e,i),U(n,a)),de(t,s)}function Jr(t,e,n,i=.1,a=1){ce(t,_t(e,i),U(n)),de(t,a)}function Zr(t,e,n,i=.1,a=1){ce(t,Lt(e,i),U(n)),de(t,a)}function Qr(t,e,n,i=.05,a=.05,s=1){ce(t,_t(e,a),Tt(n,i)),de(t,s)}function eo(t,e,n,i=.05,a=.05,s=1){ce(t,Lt(e,a),Tt(n,i)),de(t,s)}function to(t,e,n,i=.05,a=.05,s=1){ce(t,_t(e,a),Ct(n,i)),de(t,s)}function no(t,e,n,i=.05,a=.05,s=1){ce(t,Lt(e,a),Ct(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 Ce={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 io(t){return t&&Ce[t]?JSON.parse(JSON.stringify(Ce[t])):JSON.parse(JSON.stringify(Ze))}function Je(t){Object.keys(t).forEach(e=>{let n=e;Ze[n]&&t[n]&&Object.assign(Ze[n],t[n])}),console.log("Config applied:",t)}function ao(t,e){let n=t/e;n>1.6?(Je(Ce.wide),console.log("Applied WIDE config for ratio:",n)):n<.7?(Je(Ce.tall),console.log("Applied TALL config for ratio:",n)):n>.8&&n<1.2?(Je(Ce.square),console.log("Applied SQUARE config for ratio:",n)):(Je(Ce.default),console.log("Applied DEFAULT config for ratio:",n))}if(typeof window!="undefined"){let t=window;t.configPresets=Ce,t.resolveAnchorVec2=t.resolveAnchorVec2||At,t.resolveScreenAnchorPoint=t.resolveScreenAnchorPoint||Ga,t.resolveScreenRatioPoint=t.resolveScreenRatioPoint||Ua}hn();function k(t,e){let n=(a,s)=>s===0?a:n(s,a%s),i=n(t,e);return`${t/i}:${e/i}`}var Fc=[{id:"iphone-15-pro-max",label:"iPhone 15 Pro Max",width:430,height:932,category:"iphone",ratio:k(430,932)},{id:"iphone-15-pro",label:"iPhone 15 Pro",width:393,height:852,category:"iphone",ratio:k(393,852)},{id:"iphone-15",label:"iPhone 15",width:393,height:852,category:"iphone",ratio:k(393,852)},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"iphone",ratio:k(390,844)},{id:"iphone-se",label:"iPhone SE",width:375,height:667,category:"iphone",ratio:k(375,667)},{id:"iphone-12-mini",label:"iPhone 12 Mini",width:360,height:780,category:"iphone",ratio:k(360,780)}],Bc=[{id:"pixel-8-pro",label:"Pixel 8 Pro",width:448,height:998,category:"android",ratio:k(448,998)},{id:"pixel-8",label:"Pixel 8",width:412,height:915,category:"android",ratio:k(412,915)},{id:"samsung-s24-ultra",label:"Samsung S24 Ultra",width:412,height:915,category:"android",ratio:k(412,915)},{id:"samsung-s24",label:"Samsung S24",width:360,height:780,category:"android",ratio:k(360,780)},{id:"samsung-a54",label:"Samsung A54",width:412,height:915,category:"android",ratio:k(412,915)},{id:"oneplus-12",label:"OnePlus 12",width:412,height:915,category:"android",ratio:k(412,915)}],Gc=[{id:"ipad-pro-12",label:'iPad Pro 12.9"',width:1024,height:1366,category:"tablet",ratio:k(1024,1366)},{id:"ipad-pro-11",label:'iPad Pro 11"',width:834,height:1194,category:"tablet",ratio:k(834,1194)},{id:"ipad-air",label:"iPad Air",width:820,height:1180,category:"tablet",ratio:k(820,1180)},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"tablet",ratio:k(768,1024)},{id:"samsung-tab-s9",label:"Samsung Tab S9",width:800,height:1280,category:"tablet",ratio:k(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:k(390,844),mraidScale:.7},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"playable",ratio:k(768,1024),mraidScale:.7}];var Uc=[...Ka];var go=Ka[0];fe();var vo=ae(require("jszip"),1);function mo(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 bo(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 yo(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 fn(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 mo(a),r=await yo(s),o=bo(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 Mt(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],b=r[c+2],h=!1;for(let x of l)if(Math.sqrt(Math.pow(g-x.r,2)+Math.pow(u-x.g,2)+Math.pow(b-x.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 Xa=require("@google/genai");async function mn(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 y=n[v];if(!y.base64||!y.mimeType)throw new Error(`Image ${v+1} is missing required data`);if(y.base64.length<1e3&&console.warn(`Image ${v+1} data appears very small, may be corrupted`),!y.mimeType.startsWith("image/"))throw new Error(`Image ${v+1} has invalid MIME type: ${y.mimeType}`)}let c=new Xa.GoogleGenAI({apiKey:t}),g="gemini-2.5-flash",u=[e];n.length>0&&n.forEach((v,y)=>{u.push({inlineData:{data:v.base64,mimeType:v.mimeType}}),console.log(`[Gemini] Added image ${y+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 b=await c.models.generateContent({model:g,contents:u}),h="",x=(r=(s=(a=b.candidates)==null?void 0:a[0])==null?void 0:s.content)==null?void 0:r.parts;if(x)for(let v of x)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 Ja=require("@google/genai");async function Pt(t,e,n=[],i={}){try{console.info("[GEMINI-REAL-SDK] Initializing GoogleGenAI...");let a=new Ja.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");Xe();fe();var Qa=require("pixi.js");var wo=require("pixi.js");fe();function Lo(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 Mo(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 Po(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 Ko={};ra(Ko,{AspectClass:()=>In,GameObject:()=>ot,GameObjectManager:()=>$t,Renderer:()=>rt,ResponsiveUISystem:()=>Ge,Transform:()=>st,animateHandClick:()=>xs,animatePanelEntrance:()=>vs,createBrushTexture:()=>_s,createEndGamePanel:()=>ys,createHandTutorial:()=>ws,createThreeBase:()=>fs,createTutorialLabel:()=>Es,getAspectClass:()=>Dt,getRegisteredFontIds:()=>bs,loadAsset:()=>$n,loadCharacterFrames:()=>Ts,registerFont:()=>ms,resolveFont:()=>Z,resolveFontWeight:()=>Q,updateHandAnimation:()=>Ss});module.exports=xr(Ko);var V=ae(require("three"),1);var ge={};function mt(t,e,n=!1){ge[t]||(ge[t]=[]),ge[t].push({fn:e,once:n})}function Xt(t,e){if(ge[t]){if(!e){delete ge[t];return}ge[t]=ge[t].filter(n=>n.fn!==e)}}function bt(t,...e){let n=ge[t];if(n)for(let i of[...n])i.fn(...e),i.once&&Xt(t,i.fn)}function B(t,e){mt(t,e,!0)}var P=null,W=[],ke=null;function da(t){P=t,W=[],ke!==null&&(clearTimeout(ke),ke=null)}function pa(){var t,e,n;return{endpoint:(P==null?void 0:P.endpoint)||"",transport:(P==null?void 0:P.transport)||"beacon",batchSize:(t=P==null?void 0:P.batchSize)!=null?t:10,flushIntervalMs:(e=P==null?void 0:P.flushIntervalMs)!=null?e:300,maxQueue:(n=P==null?void 0:P.maxQueue)!=null?n:200,debug:!!(P!=null&&P.debug)}}async function la(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 Jt(t,e){let n=pa();if(e&&n.endpoint){if(W.push(t),W.length>n.maxQueue&&(W=W.slice(W.length-n.maxQueue)),W.length>=n.batchSize){ca();return}ke===null&&(ke=window.setTimeout(()=>{ke=null,ca()},n.flushIntervalMs))}}async function ca(){let t=pa();if(!t.endpoint||W.length===0)return;let e=W.splice(0,t.batchSize);await la(t.endpoint,{events:e},t.transport,t.debug),W.length>0&&await la(t.endpoint,{events:W.splice(0,t.batchSize)},t.transport,t.debug)}function ua(t){return Math.max(0,Math.min(1,t))}function wr(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 Ve(){return typeof performance!="undefined"&&performance.now?performance.now():Date.now()}function Er(t,e){let n=t==null?void 0:t[e];return typeof n=="number"?n:0}function ga(t,e,n){try{t[e]=n}catch{}}function Sr(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 ha(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 fa(t,e){let n=Sr(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 ma(){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=Ve();for(let u of Array.from(t)){if(u.killed||u.paused)continue;let b=p-u.startMs-u.delayMs;if(b<0)continue;let h=u.durationMs>0?b/u.durationMs:1,x=ua(h),v=u.repeat>=0?u.repeat+1:1,y=u.repeat>0?Math.min(Math.floor(h),v-1):0;if(u.repeat>0&&h>=1){let E=h-y;x=ua(E)}let f=u.ease(x);u.yoyo&&y%2===1&&(f=1-f);for(let E of u.props)ga(u.target,E.key,E.from+(E.to-E.from)*f);u.scaleFrom&&u.scaleTo&&ha(u.target,{x:u.scaleFrom.x+(u.scaleTo.x-u.scaleFrom.x)*f,y:u.scaleFrom.y+(u.scaleTo.y-u.scaleFrom.y)*f});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 E;let u=Math.max(0,(typeof c.duration=="number"?c.duration:.5)*1e3),b=Math.max(0,(typeof c.delay=="number"?c.delay:0)*1e3+((E=g==null?void 0:g.delayMsOverride)!=null?E:0)),h=wr(c.ease),x=typeof c.repeat=="number"?Math.max(0,c.repeat|0):0,v=c.yoyo===!0,y=new Set(["duration","delay","ease","repeat","yoyo","onUpdate","onComplete","scale","scaleX","scaleY"]),f=[];for(let S of Object.keys(c)){if(y.has(S))continue;let A=c[S];typeof A=="number"&&f.push({key:S,from:Er(p,S),to:A})}let m=fa(p,c);return{target:p,startMs:Ve(),delayMs:b,durationMs:u,ease:h,props:f,scaleFrom:m.from,scaleTo:m.to,repeat:x,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=Ve())},resume:()=>{var h;if(!g.paused)return;let u=(h=g.pauseAtMs)!=null?h:Ve(),b=Ve()-u;g.startMs+=b,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 b=c[u];u==="scale"||u==="scaleX"||u==="scaleY"||typeof b=="number"&&ga(p,u,b)}let g=fa(p,c);g.to&&ha(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,b=[],h=y=>{if(typeof y=="number")return Math.max(0,y*1e3);let f=typeof y=="string"?y.trim():"";return f.startsWith("+=")?g+Math.max(0,Number(f.slice(2))*1e3||0):f?Math.max(0,Number(f)*1e3||0):g},x=y=>{c.push(y);let f=Math.max(0,(typeof y.vars.duration=="number"?y.vars.duration:.5)*1e3);g=Math.max(g,y.atMs+f)},v={to(y,f,m){return x({kind:"to",target:y,vars:f,atMs:h(m)}),v},fromTo(y,f,m,E){return x({kind:"fromTo",target:y,vars:m,from:f,atMs:h(E)}),v},play(){var y,f;if(u)return v;u=!0,b=[];for(let m of c)m.kind==="fromTo"&&d.set(m.target,(y=m.from)!=null?y:{}),b.push(d.to(m.target,{...m.vars,delay:m.atMs/1e3+((f=m.vars.delay)!=null?f:0)}));return v},pause(){for(let y of b)y.pause();return v},kill(){for(let y of b)y.kill();b=[],u=!1}};return p.paused||v.play(),v}};return d}function ba(){if(typeof window=="undefined")return;let t=window;if(!t.gsap)try{t.gsap=ma()}catch{}}var ya={name:"handler-playable-sdk",version:"0.3.43",type:"module",description:"Handler Playable SDK v0.1 with contract-aligned surface (root sandbox, canonical event envelope).",main:"dist/index.cjs",module:"dist/index.js",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs"},"./pixi":{types:"./dist/pixi/index.d.ts",import:"./dist/pixi/index.js",require:"./dist/pixi/index.cjs"},"./pixi/index.css":{import:"./dist/pixi/index.css",require:"./dist/pixi/index.css"},"./three":{types:"./dist/three/index.d.ts",import:"./dist/three/index.js",require:"./dist/three/index.cjs"},"./cli":{types:"./dist/cli/index.d.ts",import:"./dist/cli/index.js",require:"./dist/cli/index.cjs"}},bin:{"handler-student-helper":"./bin/student-helper.mjs","handler-validate":"./bin/validate.mjs","handler-sync-screens":"./bin/sync-screens.mjs","handler-brand-dna":"./bin/brand-dna.mjs","handler-setup-library":"./bin/setup-library.mjs","handler-screen-helper":"./bin/screen-helper.mjs"},scripts:{prebuild:"python3 src/preview/build-css.py",build:"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --minify --external lottie-web && npm run create-mjs-symlinks && npm run postbuild-cli && npm run obfuscate && npm run postbuild",postbuild:"python3 src/preview/copy-css-to-dist.py","postbuild-cli":"cp src/cli/*.mjs dist/cli/ && chmod +x dist/cli/*.mjs && chmod +x bin/*.mjs","create-mjs-symlinks":"cd dist && ln -sf index.js index.mjs && cd pixi && ln -sf index.js index.mjs && cd ../three && ln -sf index.js index.mjs","build:dev":"tsup src/index.ts src/pixi/index.ts src/three/index.ts src/cli/index.ts --format cjs,esm --dts --clean --external lottie-web && npm run create-mjs-symlinks && npm run postbuild-cli",obfuscate:"javascript-obfuscator dist/pixi/index.js --output dist/pixi/index.js --config obfuscator.config.json && javascript-obfuscator dist/three/index.js --output dist/three/index.js --config obfuscator.config.json && javascript-obfuscator dist/cli/index.js --output dist/cli/index.js --config obfuscator.config.json && npm run obfuscate-cli","obfuscate-cli":'for file in dist/cli/*.mjs; do javascript-obfuscator "$file" --output "$file" --config obfuscator.config.json; done',lint:"eslint 'src/**/*.{ts,tsx}'",typecheck:"tsc --noEmit",prepublishOnly:"npm run build","publish:update":"node scripts/publish-and-update.cjs patch","publish:update:minor":"node scripts/publish-and-update.cjs minor","publish:update:major":"node scripts/publish-and-update.cjs major"},author:"Handler",license:"MIT",publishConfig:{access:"public"},repository:{type:"git",url:"https://github.com/HandlerAIGames/handler-playable-sdk.git"},files:["dist","bin","LICENSE","README.md"],peerDependencies:{"lottie-web":"^5.0.0","pixi.js":"^8.0.0",three:"^0.182.0"},peerDependenciesMeta:{"pixi.js":{optional:!0},three:{optional:!0},"lottie-web":{optional:!0}},devDependencies:{"@types/three":"^0.182.0",eslint:"^9.39.2","javascript-obfuscator":"^5.1.0","pixi.js":"8.8.1",three:"^0.182.0","ts-node":"^10.9.2",tsup:"^8.4.0",typescript:"^5.7.2","typescript-eslint":"^8.53.0"},dependencies:{"@google/genai":"^1.35.0","@google/generative-ai":"^0.24.1",jszip:"^3.10.1",sharp:"^0.34.5"}};var G=0,Cr=G++,va=G++,xa=G++,wa=G++,Ea=G++,Sa=G++,Aa=G++,Ca=G++,Ta=G++,_a=G++,La=G++,Ma=G++,T=Cr;function Pa(){return T===va}function ka(){return T===xa}function Ra(){return T===wa}function Oa(){return T===Ea}function Re(){return T===Sa}function Oe(){return T===Aa}function Ia(){return T===Ca}function ja(){return T===Ta}function Da(){return T===_a}function Zt(){return T===La}function Qt(){return T===Ma}function $a(){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=va;return}catch{}else if(t==="dapi")try{dapi.isReady(),T=xa;return}catch{}if(e==="facebook")try{typeof FbPlayableAd!="undefined"&&(T=wa)}catch{}else if(e==="google")try{typeof ExitApi!="undefined"&&(T=Ea)}catch{}else if(e==="mintegral")window.gameReady&&(T=Sa);else if(e==="tapjoy")window.TJ_API&&(T=Aa);else if(e==="tiktok")window.openAppStore&&(T=Ca);else if(e==="smadex")try{window.smxTracking&&(T=Ta)}catch{}else if(e==="snapchat")try{window.ScPlayableAd&&(T=_a)}catch{}else e==="vungle"?T=La:(t==="nucleo"||e==="nucleo")&&(T=Ma)}var yt=ae(require("lottie-web"),1),Ha=yt.default;typeof window!="undefined"&&(window.lottie=yt.default,window.__baseLottie=yt.default);var Tr=require("pixi.js");var en=require("pixi.js");var _r=null;function tn(t){_r=t}vt();nn();var Ye=require("pixi.js");vt();var Or=typeof __BUILD_MODE__!="undefined"?__BUILD_MODE__:"undefined",on=Or;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&&(on=e.buildMode,console.log(`[ObjectFactory] Build mode overridden by settings: ${on}`))}}catch{}var Ae=class{static async create(e,n,i){var l,d,p,c,g,u,b;console.log(`[ObjectFactory] create() called for: ${e}, __BUILD_MODE__: ${on}`);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 Ye.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 Se.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 Ye.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 Ye.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}`],x=!1;for(let v of h)try{let y=await fetch(v);if(y.ok){o=await y.json(),console.log("[ObjectFactory] Reloaded JSON directly from:",v,"type:",(b=o==null?void 0:o.constructor)==null?void 0:b.name),x=!0;break}}catch{continue}x||(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;!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&&Array.isArray(n.anchor)&&("set"in e.anchor?e.anchor.set(n.anchor[0],n.anchor[1]):(e.anchor.x=n.anchor[0],e.anchor.y=n.anchor[1])))}};var Ke=class{constructor(){this.config=null}init(e){this.config=e}get(e){if(!this.config)throw new Error("RuntimeObjectRegistry not initialized. Call init() first.");return this.config.objects.get(e)}getAllIds(){if(!this.config)throw new Error("RuntimeObjectRegistry not initialized. Call init() first.");return Array.from(this.config.objects.keys())}has(e){return this.config?this.config.objects.has(e):!1}};var Dr=ae(require("pixi.js"),1);typeof window!="undefined"&&(window.__basePixi=Dr);Xe();var wt=require("pixi.js");Xe();var cn=class{constructor(){this.instanceCache=new Map;this.readyPromise=null;this.app=null;this.registry=new Ke}init(e,n){this.registry.init(e),this.app=n}updateConfig(e){this.registry.init(e),this.instanceCache.clear(),this.readyPromise=null}async ready(){this.readyPromise&&await this.readyPromise;let n=this.registry.getAllIds().filter(a=>!this.instanceCache.has(a));if(n.length===0)return;let i=async a=>{a.length&&(console.log("[Assets] Loading objects:",a),await Promise.all(a.map(async s=>{var o;let r=this.registry.get(s);if(!r){console.warn("[Assets] No config found for object:",s);return}try{let l=await Ae.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 Ae.create(e,n,this.app);this.instanceCache.set(e,i)}}get(e){return this.instanceCache.get(e)}},Hr=new cn,zr=new Proxy(Hr,{get(t,e){if(e in t&&typeof t[e]=="function")return t[e].bind(t);if(t.get(e))return t.get(e)}});Xe();var Ba=require("pixi.js"),le={width:400,height:600,designWidth:400,scaleFactor:1},St={scale:1,position:1},pn=[];function Br(t,e,n,i,a,s,r){pn.push({element:t,originalScale:s,positionHelper:e,heightPercent:a}),e(t,n,i,a,s,r,!1)}function Gr(){pn.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 dn(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),St.scale=le.scaleFactor,St.position=1,console.log(`[SCREEN] Global multipliers - scale: ${St.scale.toFixed(3)}`),Gr()}var Ze={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 Ur(t,e,n){let i=Ze[t];i&&i[e]!==void 0&&(i[e]=n,console.log(`Updated ${t}.${e} = ${n}`))}function qr(){return Ze}var Wr={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 Et(t,e){return typeof t=="number"&&Number.isFinite(t)?t:e}function At(t,e={x:.5,y:.5}){var n;if(Array.isArray(t))return{x:Et(t[0],e.x),y:Et(t[1],e.y)};if(t&&typeof t=="object"){let i=t;return{x:Et(i.x,e.x),y:Et(i.y,e.y)}}if(typeof t=="string"){let i=t.trim().toLowerCase();return(n=Wr[i])!=null?n:e}return e}function Ga(t,e,n,i={}){var u,b,h,x,v,y;let a=At(n),s=(u=i.inset)!=null?u:{},r=(b=i.padding)!=null?b:{x:0,y:0},o=((h=s.left)!=null?h:0)+r.x,l=((x=s.right)!=null?x:0)+r.x,d=((v=s.top)!=null?v:0)+r.y,p=((y=s.bottom)!=null?y: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 Ua(t,e,n,i={}){var h,x,v,y,f,m;let a=(h=i.inset)!=null?h:{},s=(x=i.padding)!=null?x:{x:0,y:0},r=((v=a.left)!=null?v:0)+s.x,o=((y=a.right)!=null?y:0)+s.x,l=((f=a.top)!=null?f:0)+s.y,d=((m=a.bottom)!=null?m:0)+s.y,p=Math.max(0,t-r-o),c=Math.max(0,e-l-d),g=At(n,{x:.5,y:.5}),u=Math.min(Math.max(g.x,0),1),b=Math.min(Math.max(g.y,0),1);return{x:r+p*u,y:l+c*b}}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,dn(i,a))};window.addEventListener("resize",n),window.addEventListener("orientationchange",()=>{setTimeout(n,100)}),window.mraid&&(window.mraid.addEventListener("viewableChange",n),window.mraid.addEventListener("sizeChange",n)),dn(window.innerWidth,window.innerHeight),window.updateDebugConfig=Ur,window.getDebugConfig=qr,window.copyConfig=io,window.applyConfig=Je,window.applyConfigForRatio=ao,window.positionAtBottom=qa,window.positionAtTop=Kr,window.positionAtCenter=Xr,window.positionAtLeft=Jr,window.positionAtRight=Zr,window.positionAtBottomLeft=Qr,window.positionAtBottomRight=eo,window.positionAtTopLeft=to,window.positionAtTopRight=no,window.applyPositionContract=Yr,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 Ct(t,e,n=0){return t*e+n}function Tt(t,e,n=0){return t*(1-e)+n}function _t(t,e,n=0){return t*e+n}function Lt(t,e,n=0){return t*(1-e)+n}function U(t,e=0){return t/2+e}function Vr(t,e){return t*e}function Yr(t,e,n,i){var r,o,l,d,p,c,g,u,b,h,x,v,y,f,m,E,S,A,M,R;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=Ct(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=Tt(n,i.percent,(u=(g=i.offset)==null?void 0:g.y)!=null?u:0);break;case"left":a=_t(e,i.percent,(h=(b=i.offset)==null?void 0:b.x)!=null?h:0),s=U(n,(v=(x=i.offset)==null?void 0:x.y)!=null?v:0);break;case"right":a=Lt(e,i.percent,(f=(y=i.offset)==null?void 0:y.x)!=null?f:0),s=U(n,(E=(m=i.offset)==null?void 0:m.y)!=null?E:0);break;case"center":a=U(e,(A=(S=i.offset)==null?void 0:S.x)!=null?A:0),s=U(n,(R=(M=i.offset)==null?void 0:M.y)!=null?R: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=Vr(n,i),l=Tt(n,i/2);ce(t,U(e),l);let d=s?a*le.scaleFactor:a;de(t,d),r&&!pn.find(p=>p.element===t)&&Br(t,qa,e,n,i,a,s)}function Kr(t,e,n,i=.1,a=1){ce(t,U(e),Ct(n,i)),de(t,a)}function Xr(t,e,n,i=0,a=0,s=1){ce(t,U(e,i),U(n,a)),de(t,s)}function Jr(t,e,n,i=.1,a=1){ce(t,_t(e,i),U(n)),de(t,a)}function Zr(t,e,n,i=.1,a=1){ce(t,Lt(e,i),U(n)),de(t,a)}function Qr(t,e,n,i=.05,a=.05,s=1){ce(t,_t(e,a),Tt(n,i)),de(t,s)}function eo(t,e,n,i=.05,a=.05,s=1){ce(t,Lt(e,a),Tt(n,i)),de(t,s)}function to(t,e,n,i=.05,a=.05,s=1){ce(t,_t(e,a),Ct(n,i)),de(t,s)}function no(t,e,n,i=.05,a=.05,s=1){ce(t,Lt(e,a),Ct(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 Ce={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 io(t){return t&&Ce[t]?JSON.parse(JSON.stringify(Ce[t])):JSON.parse(JSON.stringify(Ze))}function Je(t){Object.keys(t).forEach(e=>{let n=e;Ze[n]&&t[n]&&Object.assign(Ze[n],t[n])}),console.log("Config applied:",t)}function ao(t,e){let n=t/e;n>1.6?(Je(Ce.wide),console.log("Applied WIDE config for ratio:",n)):n<.7?(Je(Ce.tall),console.log("Applied TALL config for ratio:",n)):n>.8&&n<1.2?(Je(Ce.square),console.log("Applied SQUARE config for ratio:",n)):(Je(Ce.default),console.log("Applied DEFAULT config for ratio:",n))}if(typeof window!="undefined"){let t=window;t.configPresets=Ce,t.resolveAnchorVec2=t.resolveAnchorVec2||At,t.resolveScreenAnchorPoint=t.resolveScreenAnchorPoint||Ga,t.resolveScreenRatioPoint=t.resolveScreenRatioPoint||Ua}hn();function k(t,e){let n=(a,s)=>s===0?a:n(s,a%s),i=n(t,e);return`${t/i}:${e/i}`}var Fc=[{id:"iphone-15-pro-max",label:"iPhone 15 Pro Max",width:430,height:932,category:"iphone",ratio:k(430,932)},{id:"iphone-15-pro",label:"iPhone 15 Pro",width:393,height:852,category:"iphone",ratio:k(393,852)},{id:"iphone-15",label:"iPhone 15",width:393,height:852,category:"iphone",ratio:k(393,852)},{id:"iphone-14",label:"iPhone 14",width:390,height:844,category:"iphone",ratio:k(390,844)},{id:"iphone-se",label:"iPhone SE",width:375,height:667,category:"iphone",ratio:k(375,667)},{id:"iphone-12-mini",label:"iPhone 12 Mini",width:360,height:780,category:"iphone",ratio:k(360,780)}],Bc=[{id:"pixel-8-pro",label:"Pixel 8 Pro",width:448,height:998,category:"android",ratio:k(448,998)},{id:"pixel-8",label:"Pixel 8",width:412,height:915,category:"android",ratio:k(412,915)},{id:"samsung-s24-ultra",label:"Samsung S24 Ultra",width:412,height:915,category:"android",ratio:k(412,915)},{id:"samsung-s24",label:"Samsung S24",width:360,height:780,category:"android",ratio:k(360,780)},{id:"samsung-a54",label:"Samsung A54",width:412,height:915,category:"android",ratio:k(412,915)},{id:"oneplus-12",label:"OnePlus 12",width:412,height:915,category:"android",ratio:k(412,915)}],Gc=[{id:"ipad-pro-12",label:'iPad Pro 12.9"',width:1024,height:1366,category:"tablet",ratio:k(1024,1366)},{id:"ipad-pro-11",label:'iPad Pro 11"',width:834,height:1194,category:"tablet",ratio:k(834,1194)},{id:"ipad-air",label:"iPad Air",width:820,height:1180,category:"tablet",ratio:k(820,1180)},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"tablet",ratio:k(768,1024)},{id:"samsung-tab-s9",label:"Samsung Tab S9",width:800,height:1280,category:"tablet",ratio:k(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:k(390,844),mraidScale:.7},{id:"ipad-mini",label:"iPad Mini",width:768,height:1024,category:"playable",ratio:k(768,1024),mraidScale:.7}];var Uc=[...Ka];var go=Ka[0];fe();var vo=ae(require("jszip"),1);function mo(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 bo(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 yo(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 fn(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 mo(a),r=await yo(s),o=bo(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 Mt(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],b=r[c+2],h=!1;for(let x of l)if(Math.sqrt(Math.pow(g-x.r,2)+Math.pow(u-x.g,2)+Math.pow(b-x.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 Xa=require("@google/genai");async function mn(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 y=n[v];if(!y.base64||!y.mimeType)throw new Error(`Image ${v+1} is missing required data`);if(y.base64.length<1e3&&console.warn(`Image ${v+1} data appears very small, may be corrupted`),!y.mimeType.startsWith("image/"))throw new Error(`Image ${v+1} has invalid MIME type: ${y.mimeType}`)}let c=new Xa.GoogleGenAI({apiKey:t}),g="gemini-2.5-flash",u=[e];n.length>0&&n.forEach((v,y)=>{u.push({inlineData:{data:v.base64,mimeType:v.mimeType}}),console.log(`[Gemini] Added image ${y+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 b=await c.models.generateContent({model:g,contents:u}),h="",x=(r=(s=(a=b.candidates)==null?void 0:a[0])==null?void 0:s.content)==null?void 0:r.parts;if(x)for(let v of x)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 Ja=require("@google/genai");async function Pt(t,e,n=[],i={}){try{console.info("[GEMINI-REAL-SDK] Initializing GoogleGenAI...");let a=new Ja.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");Xe();fe();var Qa=require("pixi.js");var wo=require("pixi.js");fe();function Lo(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 Mo(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 Po(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:
|