@waniwani/sdk 0.14.1 → 0.14.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/README.md +5 -5
  2. package/dist/angular-html-GK625GFM.js +2 -0
  3. package/dist/{angular-ts-UPMUIYI3.js → angular-ts-BBPQXDS2.js} +2 -2
  4. package/dist/{angular-ts-A7ZNTSV6.js → angular-ts-DFS2FCNO.js} +2 -2
  5. package/dist/{apl-QBN4KIYA.js → apl-FBR445XW.js} +2 -2
  6. package/dist/{apl-ZTMAKUPW.js → apl-JGB4KP74.js} +2 -2
  7. package/dist/{astro-OQUOYMBE.js → astro-BMSTTQT4.js} +2 -2
  8. package/dist/{astro-ZC25ZSBI.js → astro-K7JGTCPV.js} +2 -2
  9. package/dist/{blade-QBDEYXMB.js → blade-OHP5YUT7.js} +2 -2
  10. package/dist/{blade-BVUO2H7O.js → blade-RWJJQSLU.js} +2 -2
  11. package/dist/chat/embed.js +66 -65
  12. package/dist/chat/embed.js.map +1 -1
  13. package/dist/chat/express-js/index.d.ts +4 -4
  14. package/dist/chat/express-js/index.js.map +1 -1
  15. package/dist/chat/index.d.ts +16 -9
  16. package/dist/chat/index.js +10 -9
  17. package/dist/chat/index.js.map +1 -1
  18. package/dist/chat/next-js/index.d.ts +5 -5
  19. package/dist/chat/next-js/index.js.map +1 -1
  20. package/dist/chat/server/index.d.ts +4 -4
  21. package/dist/chat/server/index.js.map +1 -1
  22. package/dist/chat/styles.css +1 -1
  23. package/dist/{chunk-7PHUBJVC.js → chunk-AI3BZXLG.js} +2 -2
  24. package/dist/{chunk-5JBHQYU5.js → chunk-F4UUXA3U.js} +3 -3
  25. package/dist/{chunk-2RS4JWNJ.js → chunk-HFFYDWFN.js} +2 -2
  26. package/dist/{chunk-AGWJ4LUC.js → chunk-HWHRZFFJ.js} +2 -2
  27. package/dist/{chunk-BFEOSXSG.js → chunk-IPSY5OIT.js} +2 -2
  28. package/dist/{chunk-BKIIYGWO.js → chunk-OHRY6PPX.js} +2 -2
  29. package/dist/{chunk-BNESB5SU.js → chunk-ORTYTFGK.js} +2 -2
  30. package/dist/{chunk-TV2UKRXD.js → chunk-REK5PMSH.js} +2 -2
  31. package/dist/{chunk-KMHU4XIM.js → chunk-SREBMPDB.js} +2 -2
  32. package/dist/{chunk-4OK4GCCR.js → chunk-VDGF5EL2.js} +2 -2
  33. package/dist/{chunk-VNX5AK2O.js → chunk-VNL3EXC2.js} +2 -2
  34. package/dist/{chunk-V6FKURGI.js → chunk-W4SPRY5O.js} +2 -2
  35. package/dist/{chunk-4WLKD7DL.js → chunk-YP6YTC7R.js} +3 -3
  36. package/dist/{cobol-6DNJTKH3.js → cobol-LJNKRWP5.js} +2 -2
  37. package/dist/{cobol-SKJIT3WM.js → cobol-ZFZ6ZP6X.js} +2 -2
  38. package/dist/{code-block-37QAKDTI-IIYKFI5S.js → code-block-37QAKDTI-HV355RRX.js} +2 -2
  39. package/dist/{code-block-37QAKDTI-IJYLCU3C.js → code-block-37QAKDTI-Y3BUEJRG.js} +2 -2
  40. package/dist/cpp-HLYUQ6RF.js +2 -0
  41. package/dist/{crystal-YFCJLEES.js → crystal-UPNOBGN4.js} +2 -2
  42. package/dist/{edge-3LWPZYS7.js → edge-XE5XFLFP.js} +2 -2
  43. package/dist/{elixir-3H7W7YJZ.js → elixir-EXRA4QJX.js} +2 -2
  44. package/dist/{erb-HGSLHT5Y.js → erb-KUYJX32Q.js} +2 -2
  45. package/dist/{erb-AXCKAI43.js → erb-LRUOJBTB.js} +2 -2
  46. package/dist/{glimmer-js-ZXI6Y36F.js → glimmer-js-JA25I4AE.js} +2 -2
  47. package/dist/{glimmer-ts-BJKMFBLF.js → glimmer-ts-CKELYRRF.js} +2 -2
  48. package/dist/graphql-NLMAEKLI.js +3 -0
  49. package/dist/graphql-UN5O7U5U.js +2 -0
  50. package/dist/{hack-KV5GHBVV.js → hack-QIUJFE3G.js} +2 -2
  51. package/dist/haml-JQIESO7E.js +2 -0
  52. package/dist/{handlebars-U44VLSEQ.js → handlebars-UBV5AWUH.js} +2 -2
  53. package/dist/html-AWDHWPK7.js +2 -0
  54. package/dist/html-derivative-QY3ZIV7G.js +2 -0
  55. package/dist/{http-NEPTRAQZ.js → http-7ZVVH3VM.js} +2 -2
  56. package/dist/{http-JSPDAWSO.js → http-KIGXJYY6.js} +2 -2
  57. package/dist/{hurl-V6ZX2Q3F.js → hurl-B6WXEN45.js} +2 -2
  58. package/dist/{hurl-OT2SM4S7.js → hurl-BZB5LDD5.js} +2 -2
  59. package/dist/index.d.ts +9 -9
  60. package/dist/index.js +1 -1
  61. package/dist/index.js.map +1 -1
  62. package/dist/{jinja-CCI3FGLW.js → jinja-AEVQQKWS.js} +2 -2
  63. package/dist/{julia-BWWONBRS.js → julia-75QR2XDN.js} +2 -2
  64. package/dist/{julia-QPZ7EOS6.js → julia-CPV3A4MM.js} +2 -2
  65. package/dist/kb/index.js.map +1 -1
  66. package/dist/legacy/chat/express-js/index.d.ts +4 -4
  67. package/dist/legacy/chat/express-js/index.js.map +1 -1
  68. package/dist/legacy/chat/next-js/index.d.ts +5 -5
  69. package/dist/legacy/chat/next-js/index.js.map +1 -1
  70. package/dist/legacy/index.d.ts +11 -11
  71. package/dist/legacy/index.js +16 -15
  72. package/dist/legacy/index.js.map +1 -1
  73. package/dist/legacy/mcp/react.d.ts +1 -1
  74. package/dist/legacy/mcp/react.js +1 -1
  75. package/dist/legacy/mcp/react.js.map +1 -1
  76. package/dist/{liquid-OSRU4KOW.js → liquid-S4LVU77Y.js} +2 -2
  77. package/dist/mcp/index.d.ts +15 -15
  78. package/dist/mcp/index.js +5 -5
  79. package/dist/mcp/index.js.map +1 -1
  80. package/dist/mcp/react.d.ts +3 -3
  81. package/dist/mcp/react.js +1 -1
  82. package/dist/mcp/react.js.map +1 -1
  83. package/dist/{mcp-apps-client-OFYMQOI3.js → mcp-apps-client-WEXKWHUI.js} +2 -2
  84. package/dist/{mcp-apps-client-OFYMQOI3.js.map → mcp-apps-client-WEXKWHUI.js.map} +1 -1
  85. package/dist/{mcp-apps-client-RY3VD4L7.js → mcp-apps-client-Z5ICFYSR.js} +2 -2
  86. package/dist/{mcp-apps-client-RY3VD4L7.js.map → mcp-apps-client-Z5ICFYSR.js.map} +1 -1
  87. package/dist/{mdc-PDOFYVVO.js → mdc-NDTDGSIG.js} +2 -2
  88. package/dist/{mdc-TEVTGSC7.js → mdc-XWCHWP6B.js} +2 -2
  89. package/dist/mermaid-4DMBBIKO-DV4JRUY5.js +2 -0
  90. package/dist/mermaid-4DMBBIKO-IGH2CKFF.js +3 -0
  91. package/dist/{nim-JPSYX5KC.js → nim-U57UBFBS.js} +2 -2
  92. package/dist/{nim-WGQAUAVA.js → nim-Z6EEJ7SX.js} +2 -2
  93. package/dist/{openai-client-TZIOCMXP.js → openai-client-PUBKF5TI.js} +2 -2
  94. package/dist/{openai-client-TZIOCMXP.js.map → openai-client-PUBKF5TI.js.map} +1 -1
  95. package/dist/{openai-client-XYLENCIC.js → openai-client-VRJPAPFR.js} +2 -2
  96. package/dist/{openai-client-XYLENCIC.js.map → openai-client-VRJPAPFR.js.map} +1 -1
  97. package/dist/{perl-Y3ALUOFJ.js → perl-5IQEFQG3.js} +2 -2
  98. package/dist/{perl-X4IFZB22.js → perl-IZHDGBO6.js} +2 -2
  99. package/dist/php-MNP62HWP.js +3 -0
  100. package/dist/php-UQGWKJAF.js +2 -0
  101. package/dist/{pug-7XNGVJEC.js → pug-XHTBJJNO.js} +2 -2
  102. package/dist/{razor-C2NV2YNT.js → razor-UMC4HKIF.js} +2 -2
  103. package/dist/{rst-WIWCR2KQ.js → rst-6KQSGP2V.js} +2 -2
  104. package/dist/{rst-W5S2XFF7.js → rst-HCGHBPBZ.js} +2 -2
  105. package/dist/ruby-ML25RVXY.js +2 -0
  106. package/dist/ruby-OWE2HOOR.js +3 -0
  107. package/dist/{soy-G2LDZSDN.js → soy-ALTWCQTO.js} +2 -2
  108. package/dist/{svelte-EYZDXUS2.js → svelte-6TT7H4YP.js} +2 -2
  109. package/dist/{templ-KXQ2KV7D.js → templ-WN3SJLUV.js} +2 -2
  110. package/dist/{ts-tags-TCQ23O6Y.js → ts-tags-NAJDOQCO.js} +2 -2
  111. package/dist/{ts-tags-7WGDLEKX.js → ts-tags-XNK5N5RZ.js} +2 -2
  112. package/dist/{twig-JAL4753Y.js → twig-GIY7NVAA.js} +2 -2
  113. package/dist/{twig-C6YWFFZU.js → twig-OEIJ72KK.js} +2 -2
  114. package/dist/{vue-O6SLORWU.js → vue-FIH2DYBE.js} +2 -2
  115. package/dist/{vue-D6SXQNWM.js → vue-V6GLJNYA.js} +2 -2
  116. package/dist/{vue-vine-T6MFB2MU.js → vue-vine-KB45C76H.js} +2 -2
  117. package/package.json +2 -2
  118. package/dist/angular-html-VZSV3CDH.js +0 -2
  119. package/dist/cpp-4EW5XLOK.js +0 -2
  120. package/dist/graphql-KHEFECOG.js +0 -2
  121. package/dist/graphql-YEJQLMOO.js +0 -3
  122. package/dist/haml-6R7X7F2Q.js +0 -2
  123. package/dist/html-MYZBE4UD.js +0 -2
  124. package/dist/html-derivative-OWRPAN3G.js +0 -2
  125. package/dist/mermaid-4DMBBIKO-7EL5WRQI.js +0 -2
  126. package/dist/mermaid-4DMBBIKO-PAA57QRQ.js +0 -3
  127. package/dist/php-3V7EPUAN.js +0 -3
  128. package/dist/php-QERWOQJG.js +0 -2
  129. package/dist/ruby-EYYAUQUG.js +0 -2
  130. package/dist/ruby-LXZJUMFB.js +0 -3
  131. /package/dist/{angular-html-VZSV3CDH.js.map → angular-html-GK625GFM.js.map} +0 -0
  132. /package/dist/{angular-ts-UPMUIYI3.js.map → angular-ts-BBPQXDS2.js.map} +0 -0
  133. /package/dist/{angular-ts-A7ZNTSV6.js.map → angular-ts-DFS2FCNO.js.map} +0 -0
  134. /package/dist/{apl-QBN4KIYA.js.map → apl-FBR445XW.js.map} +0 -0
  135. /package/dist/{apl-ZTMAKUPW.js.map → apl-JGB4KP74.js.map} +0 -0
  136. /package/dist/{astro-OQUOYMBE.js.map → astro-BMSTTQT4.js.map} +0 -0
  137. /package/dist/{astro-ZC25ZSBI.js.map → astro-K7JGTCPV.js.map} +0 -0
  138. /package/dist/{blade-QBDEYXMB.js.map → blade-OHP5YUT7.js.map} +0 -0
  139. /package/dist/{blade-BVUO2H7O.js.map → blade-RWJJQSLU.js.map} +0 -0
  140. /package/dist/{chunk-7PHUBJVC.js.map → chunk-AI3BZXLG.js.map} +0 -0
  141. /package/dist/{chunk-5JBHQYU5.js.map → chunk-F4UUXA3U.js.map} +0 -0
  142. /package/dist/{chunk-2RS4JWNJ.js.map → chunk-HFFYDWFN.js.map} +0 -0
  143. /package/dist/{chunk-AGWJ4LUC.js.map → chunk-HWHRZFFJ.js.map} +0 -0
  144. /package/dist/{chunk-BFEOSXSG.js.map → chunk-IPSY5OIT.js.map} +0 -0
  145. /package/dist/{chunk-BKIIYGWO.js.map → chunk-OHRY6PPX.js.map} +0 -0
  146. /package/dist/{chunk-BNESB5SU.js.map → chunk-ORTYTFGK.js.map} +0 -0
  147. /package/dist/{chunk-TV2UKRXD.js.map → chunk-REK5PMSH.js.map} +0 -0
  148. /package/dist/{chunk-KMHU4XIM.js.map → chunk-SREBMPDB.js.map} +0 -0
  149. /package/dist/{chunk-4OK4GCCR.js.map → chunk-VDGF5EL2.js.map} +0 -0
  150. /package/dist/{chunk-VNX5AK2O.js.map → chunk-VNL3EXC2.js.map} +0 -0
  151. /package/dist/{chunk-V6FKURGI.js.map → chunk-W4SPRY5O.js.map} +0 -0
  152. /package/dist/{chunk-4WLKD7DL.js.map → chunk-YP6YTC7R.js.map} +0 -0
  153. /package/dist/{cobol-6DNJTKH3.js.map → cobol-LJNKRWP5.js.map} +0 -0
  154. /package/dist/{cobol-SKJIT3WM.js.map → cobol-ZFZ6ZP6X.js.map} +0 -0
  155. /package/dist/{code-block-37QAKDTI-IIYKFI5S.js.map → code-block-37QAKDTI-HV355RRX.js.map} +0 -0
  156. /package/dist/{code-block-37QAKDTI-IJYLCU3C.js.map → code-block-37QAKDTI-Y3BUEJRG.js.map} +0 -0
  157. /package/dist/{cpp-4EW5XLOK.js.map → cpp-HLYUQ6RF.js.map} +0 -0
  158. /package/dist/{crystal-YFCJLEES.js.map → crystal-UPNOBGN4.js.map} +0 -0
  159. /package/dist/{edge-3LWPZYS7.js.map → edge-XE5XFLFP.js.map} +0 -0
  160. /package/dist/{elixir-3H7W7YJZ.js.map → elixir-EXRA4QJX.js.map} +0 -0
  161. /package/dist/{erb-HGSLHT5Y.js.map → erb-KUYJX32Q.js.map} +0 -0
  162. /package/dist/{erb-AXCKAI43.js.map → erb-LRUOJBTB.js.map} +0 -0
  163. /package/dist/{glimmer-js-ZXI6Y36F.js.map → glimmer-js-JA25I4AE.js.map} +0 -0
  164. /package/dist/{glimmer-ts-BJKMFBLF.js.map → glimmer-ts-CKELYRRF.js.map} +0 -0
  165. /package/dist/{graphql-KHEFECOG.js.map → graphql-NLMAEKLI.js.map} +0 -0
  166. /package/dist/{graphql-YEJQLMOO.js.map → graphql-UN5O7U5U.js.map} +0 -0
  167. /package/dist/{hack-KV5GHBVV.js.map → hack-QIUJFE3G.js.map} +0 -0
  168. /package/dist/{haml-6R7X7F2Q.js.map → haml-JQIESO7E.js.map} +0 -0
  169. /package/dist/{handlebars-U44VLSEQ.js.map → handlebars-UBV5AWUH.js.map} +0 -0
  170. /package/dist/{html-MYZBE4UD.js.map → html-AWDHWPK7.js.map} +0 -0
  171. /package/dist/{html-derivative-OWRPAN3G.js.map → html-derivative-QY3ZIV7G.js.map} +0 -0
  172. /package/dist/{http-NEPTRAQZ.js.map → http-7ZVVH3VM.js.map} +0 -0
  173. /package/dist/{http-JSPDAWSO.js.map → http-KIGXJYY6.js.map} +0 -0
  174. /package/dist/{hurl-V6ZX2Q3F.js.map → hurl-B6WXEN45.js.map} +0 -0
  175. /package/dist/{hurl-OT2SM4S7.js.map → hurl-BZB5LDD5.js.map} +0 -0
  176. /package/dist/{jinja-CCI3FGLW.js.map → jinja-AEVQQKWS.js.map} +0 -0
  177. /package/dist/{julia-BWWONBRS.js.map → julia-75QR2XDN.js.map} +0 -0
  178. /package/dist/{julia-QPZ7EOS6.js.map → julia-CPV3A4MM.js.map} +0 -0
  179. /package/dist/{liquid-OSRU4KOW.js.map → liquid-S4LVU77Y.js.map} +0 -0
  180. /package/dist/{mdc-PDOFYVVO.js.map → mdc-NDTDGSIG.js.map} +0 -0
  181. /package/dist/{mdc-TEVTGSC7.js.map → mdc-XWCHWP6B.js.map} +0 -0
  182. /package/dist/{mermaid-4DMBBIKO-7EL5WRQI.js.map → mermaid-4DMBBIKO-DV4JRUY5.js.map} +0 -0
  183. /package/dist/{mermaid-4DMBBIKO-PAA57QRQ.js.map → mermaid-4DMBBIKO-IGH2CKFF.js.map} +0 -0
  184. /package/dist/{nim-JPSYX5KC.js.map → nim-U57UBFBS.js.map} +0 -0
  185. /package/dist/{nim-WGQAUAVA.js.map → nim-Z6EEJ7SX.js.map} +0 -0
  186. /package/dist/{perl-Y3ALUOFJ.js.map → perl-5IQEFQG3.js.map} +0 -0
  187. /package/dist/{perl-X4IFZB22.js.map → perl-IZHDGBO6.js.map} +0 -0
  188. /package/dist/{php-3V7EPUAN.js.map → php-MNP62HWP.js.map} +0 -0
  189. /package/dist/{php-QERWOQJG.js.map → php-UQGWKJAF.js.map} +0 -0
  190. /package/dist/{pug-7XNGVJEC.js.map → pug-XHTBJJNO.js.map} +0 -0
  191. /package/dist/{razor-C2NV2YNT.js.map → razor-UMC4HKIF.js.map} +0 -0
  192. /package/dist/{rst-WIWCR2KQ.js.map → rst-6KQSGP2V.js.map} +0 -0
  193. /package/dist/{rst-W5S2XFF7.js.map → rst-HCGHBPBZ.js.map} +0 -0
  194. /package/dist/{ruby-EYYAUQUG.js.map → ruby-ML25RVXY.js.map} +0 -0
  195. /package/dist/{ruby-LXZJUMFB.js.map → ruby-OWE2HOOR.js.map} +0 -0
  196. /package/dist/{soy-G2LDZSDN.js.map → soy-ALTWCQTO.js.map} +0 -0
  197. /package/dist/{svelte-EYZDXUS2.js.map → svelte-6TT7H4YP.js.map} +0 -0
  198. /package/dist/{templ-KXQ2KV7D.js.map → templ-WN3SJLUV.js.map} +0 -0
  199. /package/dist/{ts-tags-TCQ23O6Y.js.map → ts-tags-NAJDOQCO.js.map} +0 -0
  200. /package/dist/{ts-tags-7WGDLEKX.js.map → ts-tags-XNK5N5RZ.js.map} +0 -0
  201. /package/dist/{twig-JAL4753Y.js.map → twig-GIY7NVAA.js.map} +0 -0
  202. /package/dist/{twig-C6YWFFZU.js.map → twig-OEIJ72KK.js.map} +0 -0
  203. /package/dist/{vue-O6SLORWU.js.map → vue-FIH2DYBE.js.map} +0 -0
  204. /package/dist/{vue-D6SXQNWM.js.map → vue-V6GLJNYA.js.map} +0 -0
  205. /package/dist/{vue-vine-T6MFB2MU.js.map → vue-vine-KB45C76H.js.map} +0 -0
@@ -180,7 +180,7 @@ interface UnstableSendFollowUpWithGhostGuardResult {
180
180
  * on mount — if it sees a record set by a different `mountId` within
181
181
  * `ADVANCED_WINDOW_MS`, it collapses the iframe to 0×0.
182
182
  *
183
- * On every other host (WaniWani embed, MCP Apps, etc.) the hook is a
183
+ * On every other host (Waniwani embed, MCP Apps, etc.) the hook is a
184
184
  * pure pass-through: `sendFollowUp` is your function unchanged and
185
185
  * `Guard` is a transparent fragment.
186
186
  *
@@ -658,7 +658,7 @@ interface AutoCaptureToggles {
658
658
 
659
659
  interface BaseUseWaniwaniOptions {
660
660
  /**
661
- * JWT widget token for authenticating directly with the WaniWani backend.
661
+ * JWT widget token for authenticating directly with the Waniwani backend.
662
662
  * If omitted, the hook resolves from tool response metadata
663
663
  * (`toolResponseMetadata.waniwani` or `toolResponseMetadata._meta.waniwani`).
664
664
  */
@@ -722,7 +722,7 @@ interface WaniwaniWidget {
722
722
  conversion(name: string, data?: Record<string, unknown>): void;
723
723
  }
724
724
  /**
725
- * React hook for WaniWani widget tracking.
725
+ * React hook for Waniwani widget tracking.
726
726
  *
727
727
  * Auto-captures DOM events (clicks, link clicks, errors, scrolls, form
728
728
  * interactions) and provides manual tracking methods. Returns a singleton
package/dist/mcp/react.js CHANGED
@@ -59,7 +59,7 @@ import{a as V,b as ke,c as Ce}from"../chunk-DP6SAQTK.js";import{b as H,c as Me}f
59
59
  0 25px 50px -12px rgba(0, 0, 0, 0.6),
60
60
  0 0 0 1px rgba(255, 255, 255, 0.05),
61
61
  inset 0 1px 0 rgba(255, 255, 255, 0.04)
62
- `},children:[y("div",{className:"flex items-center justify-between px-4 py-3",style:{borderBottom:"1px solid rgba(255, 255, 255, 0.06)"},children:[y("div",{className:"flex items-center gap-2",children:[l(Ee,{className:"w-4 h-4 text-gray-400"}),l("span",{className:"text-sm font-medium text-white",children:"Dev Controls"})]}),y("div",{className:"flex items-center gap-2",children:[l("span",{className:"text-[10px] font-medium text-gray-500 px-1.5 py-0.5 rounded",style:{background:"rgba(255, 255, 255, 0.04)",border:"1px solid rgba(255, 255, 255, 0.06)"},children:typeof navigator<"u"&&navigator.platform?.includes("Mac")?"\u2318\u21E7D":"Ctrl+Shift+D"}),l("button",{type:"button",onClick:W,className:"p-1 rounded-md text-gray-500 hover:text-gray-300 hover:bg-white/5 transition-colors",children:l(rt,{className:"w-4 h-4"})})]})]}),y("div",{className:"p-4 space-y-5 overflow-y-auto",style:{maxHeight:"calc(100vh - 200px)"},children:[y("div",{children:[l("label",{htmlFor:"display-mode",className:"text-[11px] font-medium uppercase tracking-wider text-gray-500 block mb-2",children:"Display Mode"}),l(Re,{options:Ze,value:h,onChange:Ve})]}),y("div",{children:[l("label",{htmlFor:"theme",className:"text-[11px] font-medium uppercase tracking-wider text-gray-500 block mb-2",children:"Theme"}),l(Re,{options:Qe,value:g,onChange:$e})]}),y("div",{children:[l("label",{htmlFor:"safe-area",className:"text-[11px] font-medium uppercase tracking-wider text-gray-500 block mb-2",children:"Safe Area (Chat Input)"}),y("button",{type:"button",onClick:()=>o(!s),className:`w-full flex items-center justify-between px-3 py-2.5 rounded-lg text-xs font-medium transition-all duration-150 ${s?"text-emerald-400":"text-gray-400"}`,style:{background:s?"rgba(34, 197, 94, 0.1)":"rgba(255, 255, 255, 0.04)",border:s?"1px solid rgba(34, 197, 94, 0.3)":"1px solid rgba(255, 255, 255, 0.06)"},children:[l("span",{children:"Mock ChatGPT Input Bar"}),l("span",{className:`px-2 py-0.5 rounded text-[10px] font-semibold ${s?"bg-emerald-500/20 text-emerald-400":"bg-gray-500/20 text-gray-500"}`,children:s?"ON":"OFF"})]}),s&&y("p",{className:"text-[10px] text-gray-500 mt-1.5",children:["bottom: ",$,"px"]})]}),y("div",{children:[l("label",{htmlFor:"widget-props",className:"text-[11px] font-medium uppercase tracking-wider text-gray-500 block mb-2",children:"Widget Props"}),l("textarea",{value:a,onChange:w=>Xe(w.target.value),onBlur:Ye,className:"dev-json-editor w-full min-h-[160px] text-xs text-gray-200 p-3 rounded-lg resize-none focus:outline-none transition-colors",style:{background:"rgba(0, 0, 0, 0.3)",border:d?"1px solid rgba(239, 68, 68, 0.5)":"1px solid rgba(255, 255, 255, 0.06)",fontFamily:"'JetBrains Mono', 'SF Mono', 'Fira Code', monospace",lineHeight:1.6},onFocus:w=>{d||(w.target.style.borderColor="rgba(99, 102, 241, 0.5)")},onBlurCapture:w=>{d||(w.target.style.borderColor="rgba(255, 255, 255, 0.06)")},spellCheck:!1}),d&&y("p",{className:"text-red-400 text-[11px] mt-1.5 flex items-center gap-1",children:[l("svg",{"aria-hidden":"true","aria-label":"Error",className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:l("path",{d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM7 4.5h2v4H7v-4zm0 5h2v2H7v-2z"})}),d]})]}),y("button",{type:"button",onClick:qe,className:"w-full flex items-center justify-center gap-2 px-3 py-2 rounded-lg text-xs font-medium text-gray-400 transition-all duration-150 hover:text-gray-200",style:{background:"rgba(255, 255, 255, 0.04)",border:"1px solid rgba(255, 255, 255, 0.06)"},onMouseEnter:w=>{w.currentTarget.style.background="rgba(255, 255, 255, 0.08)",w.currentTarget.style.borderColor="rgba(255, 255, 255, 0.1)"},onMouseLeave:w=>{w.currentTarget.style.background="rgba(255, 255, 255, 0.04)",w.currentTarget.style.borderColor="rgba(255, 255, 255, 0.06)"},children:[l(ut,{className:"w-3.5 h-3.5"}),"Reset to Defaults"]})]})]})]}),s&&y("div",{className:"fixed bottom-0 left-0 right-0 z-[9998] flex items-center justify-center pointer-events-none",style:{height:`${$}px`,background:"linear-gradient(to top, #1a1a1a 0%, #1a1a1a 80%, transparent 100%)"},children:[y("div",{className:"w-full max-w-2xl mx-4 px-4 py-3 rounded-2xl bg-[#2f2f2f] border border-[#424242] flex items-center gap-3",children:[l("div",{className:"w-8 h-8 rounded-full bg-[#424242] flex items-center justify-center",children:l("svg",{"aria-hidden":"true",className:"w-4 h-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}),l("div",{className:"flex-1 text-gray-400 text-sm",children:"Ask me anything..."}),l("div",{className:"w-8 h-8 rounded-full bg-[#424242] flex items-center justify-center",children:l("svg",{"aria-hidden":"true",className:"w-4 h-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"})})})]}),y("div",{className:"absolute bottom-1 text-[10px] text-gray-600 font-mono",children:["Mock SafeArea: bottom=",$,"px"]})]})]})}import{useCallback as ft,useContext as ht,useLayoutEffect as wt,useMemo as vt,useRef as We}from"react";import{createContext as mt}from"react";var _=mt(null);import{Fragment as _e,jsx as te}from"react/jsx-runtime";var yt="waniwani:send-follow-up:advanced:",xt=1e4;function Ae(e){return`${yt}${e??"default"}`}function bt(e){try{let t=globalThis.localStorage?.getItem(Ae(e));if(!t)return null;let n=JSON.parse(t);return typeof n?.at!="number"||typeof n?.byMountId!="string"?null:n}catch{return null}}function kt(e,t){try{globalThis.localStorage?.setItem(Ae(e),JSON.stringify({at:Date.now(),byMountId:t}))}catch{}}function ne(){return typeof window>"u"?!1:typeof window.openai=="object"}function Ct(){return ne()?window.openai:null}function Mt(){return wt(()=>{let e=document.documentElement,t=document.body,n=e.getAttribute("style"),i=t.getAttribute("style"),r="margin:0!important;padding:0!important;border:0!important;background:transparent!important;background-color:transparent!important;height:0!important;min-height:0!important;max-height:0!important;overflow:hidden!important;";return e.setAttribute("style",r),t.setAttribute("style",r),()=>{n===null?e.removeAttribute("style"):e.setAttribute("style",n),i===null?t.removeAttribute("style"):t.setAttribute("style",i)}},[]),null}function oe(e){let t=ht(_),n=We(e);n.current=e;let i=t?.getToolResponseMetadata?.()??null,r=Ct()?.toolResponseMetadata??null,u=i??r,f=u&&typeof u.viewUUID=="string"?u.viewUUID:void 0,h=We("");h.current===""&&(h.current=crypto.randomUUID());let p=ft((c,s)=>{ne()&&kt(f,h.current);try{Promise.resolve(n.current(c)).catch(o=>{console.error("[unstable_useSendFollowUpWithGhostGuard]",o)})}catch(o){console.error("[unstable_useSendFollowUpWithGhostGuard]",o)}},[f]),g=vt(()=>{let c=h.current;return function({children:o}){if(!ne())return te(_e,{children:o});let a=bt(f);return a&&a.byMountId!==c&&Date.now()-a.at<xt?te(Mt,{}):te(_e,{children:o})}},[f]);return{sendFollowUp:p,Guard:g}}import{useCallback as Et}from"react";import K,{useCallback as Ie,useContext as St,useEffect as Ue,useState as re,useSyncExternalStore as Tt}from"react";async function Oe(){let{detectPlatform:e}=await import("../platform-LKQFC3AJ.js");if(e()==="openai"){let{OpenAIWidgetClient:n}=await import("../openai-client-TZIOCMXP.js");return new n}else{let{MCPAppsWidgetClient:n}=await import("../mcp-apps-client-OFYMQOI3.js");return new n}}function ie({children:e,loading:t=null,onError:n}){let[i,r]=re(null),[u,f]=re(null),[h,p]=re(!0);return Ue(()=>{let g=!0,c=null;async function s(){try{let o=await Oe();await o.connect(),g?(c=o,r(o),p(!1)):o.close()}catch(o){g&&(console.error("error",o),f(o instanceof Error?o:new Error(String(o))),p(!1))}}return s(),()=>{g=!1,c?.close()}},[]),Ue(()=>{if(!i)return;let g=c=>{document.documentElement.classList.toggle("dark",c==="dark"),document.documentElement.style.colorScheme=c==="dark"?"dark":"auto"};return g(i.getTheme()),i.onThemeChange(g)},[i]),u&&n?K.createElement(K.Fragment,null,n(u)):h||!i?K.createElement(K.Fragment,null,t):K.createElement(_.Provider,{value:i},e)}function v(e){let t=St(_);if(!t)throw new Error("useWidgetClient must be used within a WidgetProvider");let n=Ie(u=>e==="toolOutput"?t.onToolResult(()=>u()):e==="theme"?t.onThemeChange(()=>u()):e==="displayMode"?t.onDisplayModeChange(()=>u()):e==="safeArea"?t.onSafeAreaChange(()=>u()):e==="maxHeight"?t.onMaxHeightChange(()=>u()):e==="toolResponseMetadata"?t.onToolResponseMetadataChange(()=>u()):e==="widgetState"?t.onWidgetStateChange(()=>u()):()=>{},[t,e]),i=Ie(()=>e==="toolOutput"?t.getToolOutput():e==="theme"?t.getTheme():e==="displayMode"?t.getDisplayMode():e==="locale"?t.getLocale():e==="safeArea"?t.getSafeArea():e==="maxHeight"?t.getMaxHeight():e==="toolResponseMetadata"?t.getToolResponseMetadata():e==="widgetState"?t.getWidgetState():null,[t,e]),r=Tt(n,i,i);return e?r:t}function se(){let e=v();return Et((t,n)=>e.callTool(t,n),[e])}function ae(){return v("displayMode")}function z(){return v("toolOutput")}function le(){return{data:z()}}import{useSyncExternalStore as Rt}from"react";function de(){return Rt(()=>()=>{},()=>typeof window>"u"?!1:window.__isChatGptApp===!0,()=>!1)}function ue(){return v("locale")}function ce(){return v("maxHeight")}import{useCallback as Wt}from"react";function pe(){let e=v();return Wt(t=>e.openExternal(t),[e])}import{useCallback as _t}from"react";function ge(){let e=v();return _t(t=>e.requestDisplayMode(t),[e])}function me(){return v("safeArea")}import{useCallback as At}from"react";function fe(){let e=v();return At((t,n)=>{(async()=>{Me(n?.modelContext)&&await Promise.resolve(e.updateModelContext(n.modelContext)),await Promise.resolve(e.sendFollowUp(t))})().catch(i=>{console.error("Failed to send follow-up message:",i)})},[e])}function he(){return v("theme")}function we(){return v("toolResponseMetadata")}import{useCallback as Ot}from"react";function ve(){let e=v();return Ot(async t=>{await Promise.resolve(e.updateModelContext(t))},[e])}import{useCallback as It,useEffect as Ut,useState as Nt}from"react";function ye(e){let t=v("widgetState"),[n,i]=Nt(()=>t??(typeof e=="function"?e():e??null));Ut(()=>{i(t)},[t]);let r=It(u=>{i(f=>{let h=typeof u=="function"?u(f):u;return V()==="openai"&&h!=null&&window.openai?.setWidgetState(h),h})},[]);return[n,r]}import{jsx as A,jsxs as Ne}from"react/jsx-runtime";var Le=()=>Ne("div",{className:"flex flex-col items-center justify-center h-full min-h-[120px] gap-4",children:[Ne("div",{className:"flex gap-2",children:[A("div",{className:"w-3 h-3 rounded-full bg-gradient-to-r from-blue-400 to-cyan-400 animate-bounce [animation-delay:-0.3s]"}),A("div",{className:"w-3 h-3 rounded-full bg-gradient-to-r from-cyan-400 to-teal-400 animate-bounce [animation-delay:-0.15s]"}),A("div",{className:"w-3 h-3 rounded-full bg-gradient-to-r from-teal-400 to-emerald-400 animate-bounce"})]}),A("p",{className:"text-sm font-medium text-transparent bg-clip-text bg-gradient-to-r from-slate-400 via-slate-200 to-slate-400 bg-[length:200%_100%] animate-[shimmer_1.5s_ease-in-out_infinite]",children:"Loading widget..."}),A("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:A("div",{className:"w-16 h-16 rounded-full border-2 border-blue-400/20 animate-ping"})}),A("style",{children:`
62
+ `},children:[y("div",{className:"flex items-center justify-between px-4 py-3",style:{borderBottom:"1px solid rgba(255, 255, 255, 0.06)"},children:[y("div",{className:"flex items-center gap-2",children:[l(Ee,{className:"w-4 h-4 text-gray-400"}),l("span",{className:"text-sm font-medium text-white",children:"Dev Controls"})]}),y("div",{className:"flex items-center gap-2",children:[l("span",{className:"text-[10px] font-medium text-gray-500 px-1.5 py-0.5 rounded",style:{background:"rgba(255, 255, 255, 0.04)",border:"1px solid rgba(255, 255, 255, 0.06)"},children:typeof navigator<"u"&&navigator.platform?.includes("Mac")?"\u2318\u21E7D":"Ctrl+Shift+D"}),l("button",{type:"button",onClick:W,className:"p-1 rounded-md text-gray-500 hover:text-gray-300 hover:bg-white/5 transition-colors",children:l(rt,{className:"w-4 h-4"})})]})]}),y("div",{className:"p-4 space-y-5 overflow-y-auto",style:{maxHeight:"calc(100vh - 200px)"},children:[y("div",{children:[l("label",{htmlFor:"display-mode",className:"text-[11px] font-medium uppercase tracking-wider text-gray-500 block mb-2",children:"Display Mode"}),l(Re,{options:Ze,value:h,onChange:Ve})]}),y("div",{children:[l("label",{htmlFor:"theme",className:"text-[11px] font-medium uppercase tracking-wider text-gray-500 block mb-2",children:"Theme"}),l(Re,{options:Qe,value:g,onChange:$e})]}),y("div",{children:[l("label",{htmlFor:"safe-area",className:"text-[11px] font-medium uppercase tracking-wider text-gray-500 block mb-2",children:"Safe Area (Chat Input)"}),y("button",{type:"button",onClick:()=>o(!s),className:`w-full flex items-center justify-between px-3 py-2.5 rounded-lg text-xs font-medium transition-all duration-150 ${s?"text-emerald-400":"text-gray-400"}`,style:{background:s?"rgba(34, 197, 94, 0.1)":"rgba(255, 255, 255, 0.04)",border:s?"1px solid rgba(34, 197, 94, 0.3)":"1px solid rgba(255, 255, 255, 0.06)"},children:[l("span",{children:"Mock ChatGPT Input Bar"}),l("span",{className:`px-2 py-0.5 rounded text-[10px] font-semibold ${s?"bg-emerald-500/20 text-emerald-400":"bg-gray-500/20 text-gray-500"}`,children:s?"ON":"OFF"})]}),s&&y("p",{className:"text-[10px] text-gray-500 mt-1.5",children:["bottom: ",$,"px"]})]}),y("div",{children:[l("label",{htmlFor:"widget-props",className:"text-[11px] font-medium uppercase tracking-wider text-gray-500 block mb-2",children:"Widget Props"}),l("textarea",{value:a,onChange:w=>Xe(w.target.value),onBlur:Ye,className:"dev-json-editor w-full min-h-[160px] text-xs text-gray-200 p-3 rounded-lg resize-none focus:outline-none transition-colors",style:{background:"rgba(0, 0, 0, 0.3)",border:d?"1px solid rgba(239, 68, 68, 0.5)":"1px solid rgba(255, 255, 255, 0.06)",fontFamily:"'JetBrains Mono', 'SF Mono', 'Fira Code', monospace",lineHeight:1.6},onFocus:w=>{d||(w.target.style.borderColor="rgba(99, 102, 241, 0.5)")},onBlurCapture:w=>{d||(w.target.style.borderColor="rgba(255, 255, 255, 0.06)")},spellCheck:!1}),d&&y("p",{className:"text-red-400 text-[11px] mt-1.5 flex items-center gap-1",children:[l("svg",{"aria-hidden":"true","aria-label":"Error",className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:l("path",{d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM7 4.5h2v4H7v-4zm0 5h2v2H7v-2z"})}),d]})]}),y("button",{type:"button",onClick:qe,className:"w-full flex items-center justify-center gap-2 px-3 py-2 rounded-lg text-xs font-medium text-gray-400 transition-all duration-150 hover:text-gray-200",style:{background:"rgba(255, 255, 255, 0.04)",border:"1px solid rgba(255, 255, 255, 0.06)"},onMouseEnter:w=>{w.currentTarget.style.background="rgba(255, 255, 255, 0.08)",w.currentTarget.style.borderColor="rgba(255, 255, 255, 0.1)"},onMouseLeave:w=>{w.currentTarget.style.background="rgba(255, 255, 255, 0.04)",w.currentTarget.style.borderColor="rgba(255, 255, 255, 0.06)"},children:[l(ut,{className:"w-3.5 h-3.5"}),"Reset to Defaults"]})]})]})]}),s&&y("div",{className:"fixed bottom-0 left-0 right-0 z-[9998] flex items-center justify-center pointer-events-none",style:{height:`${$}px`,background:"linear-gradient(to top, #1a1a1a 0%, #1a1a1a 80%, transparent 100%)"},children:[y("div",{className:"w-full max-w-2xl mx-4 px-4 py-3 rounded-2xl bg-[#2f2f2f] border border-[#424242] flex items-center gap-3",children:[l("div",{className:"w-8 h-8 rounded-full bg-[#424242] flex items-center justify-center",children:l("svg",{"aria-hidden":"true",className:"w-4 h-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}),l("div",{className:"flex-1 text-gray-400 text-sm",children:"Ask me anything..."}),l("div",{className:"w-8 h-8 rounded-full bg-[#424242] flex items-center justify-center",children:l("svg",{"aria-hidden":"true",className:"w-4 h-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"})})})]}),y("div",{className:"absolute bottom-1 text-[10px] text-gray-600 font-mono",children:["Mock SafeArea: bottom=",$,"px"]})]})]})}import{useCallback as ft,useContext as ht,useLayoutEffect as wt,useMemo as vt,useRef as We}from"react";import{createContext as mt}from"react";var _=mt(null);import{Fragment as _e,jsx as te}from"react/jsx-runtime";var yt="waniwani:send-follow-up:advanced:",xt=1e4;function Ae(e){return`${yt}${e??"default"}`}function bt(e){try{let t=globalThis.localStorage?.getItem(Ae(e));if(!t)return null;let n=JSON.parse(t);return typeof n?.at!="number"||typeof n?.byMountId!="string"?null:n}catch{return null}}function kt(e,t){try{globalThis.localStorage?.setItem(Ae(e),JSON.stringify({at:Date.now(),byMountId:t}))}catch{}}function ne(){return typeof window>"u"?!1:typeof window.openai=="object"}function Ct(){return ne()?window.openai:null}function Mt(){return wt(()=>{let e=document.documentElement,t=document.body,n=e.getAttribute("style"),i=t.getAttribute("style"),r="margin:0!important;padding:0!important;border:0!important;background:transparent!important;background-color:transparent!important;height:0!important;min-height:0!important;max-height:0!important;overflow:hidden!important;";return e.setAttribute("style",r),t.setAttribute("style",r),()=>{n===null?e.removeAttribute("style"):e.setAttribute("style",n),i===null?t.removeAttribute("style"):t.setAttribute("style",i)}},[]),null}function oe(e){let t=ht(_),n=We(e);n.current=e;let i=t?.getToolResponseMetadata?.()??null,r=Ct()?.toolResponseMetadata??null,u=i??r,f=u&&typeof u.viewUUID=="string"?u.viewUUID:void 0,h=We("");h.current===""&&(h.current=crypto.randomUUID());let p=ft((c,s)=>{ne()&&kt(f,h.current);try{Promise.resolve(n.current(c)).catch(o=>{console.error("[unstable_useSendFollowUpWithGhostGuard]",o)})}catch(o){console.error("[unstable_useSendFollowUpWithGhostGuard]",o)}},[f]),g=vt(()=>{let c=h.current;return function({children:o}){if(!ne())return te(_e,{children:o});let a=bt(f);return a&&a.byMountId!==c&&Date.now()-a.at<xt?te(Mt,{}):te(_e,{children:o})}},[f]);return{sendFollowUp:p,Guard:g}}import{useCallback as Et}from"react";import K,{useCallback as Ie,useContext as St,useEffect as Ue,useState as re,useSyncExternalStore as Tt}from"react";async function Oe(){let{detectPlatform:e}=await import("../platform-LKQFC3AJ.js");if(e()==="openai"){let{OpenAIWidgetClient:n}=await import("../openai-client-PUBKF5TI.js");return new n}else{let{MCPAppsWidgetClient:n}=await import("../mcp-apps-client-WEXKWHUI.js");return new n}}function ie({children:e,loading:t=null,onError:n}){let[i,r]=re(null),[u,f]=re(null),[h,p]=re(!0);return Ue(()=>{let g=!0,c=null;async function s(){try{let o=await Oe();await o.connect(),g?(c=o,r(o),p(!1)):o.close()}catch(o){g&&(console.error("error",o),f(o instanceof Error?o:new Error(String(o))),p(!1))}}return s(),()=>{g=!1,c?.close()}},[]),Ue(()=>{if(!i)return;let g=c=>{document.documentElement.classList.toggle("dark",c==="dark"),document.documentElement.style.colorScheme=c==="dark"?"dark":"auto"};return g(i.getTheme()),i.onThemeChange(g)},[i]),u&&n?K.createElement(K.Fragment,null,n(u)):h||!i?K.createElement(K.Fragment,null,t):K.createElement(_.Provider,{value:i},e)}function v(e){let t=St(_);if(!t)throw new Error("useWidgetClient must be used within a WidgetProvider");let n=Ie(u=>e==="toolOutput"?t.onToolResult(()=>u()):e==="theme"?t.onThemeChange(()=>u()):e==="displayMode"?t.onDisplayModeChange(()=>u()):e==="safeArea"?t.onSafeAreaChange(()=>u()):e==="maxHeight"?t.onMaxHeightChange(()=>u()):e==="toolResponseMetadata"?t.onToolResponseMetadataChange(()=>u()):e==="widgetState"?t.onWidgetStateChange(()=>u()):()=>{},[t,e]),i=Ie(()=>e==="toolOutput"?t.getToolOutput():e==="theme"?t.getTheme():e==="displayMode"?t.getDisplayMode():e==="locale"?t.getLocale():e==="safeArea"?t.getSafeArea():e==="maxHeight"?t.getMaxHeight():e==="toolResponseMetadata"?t.getToolResponseMetadata():e==="widgetState"?t.getWidgetState():null,[t,e]),r=Tt(n,i,i);return e?r:t}function se(){let e=v();return Et((t,n)=>e.callTool(t,n),[e])}function ae(){return v("displayMode")}function z(){return v("toolOutput")}function le(){return{data:z()}}import{useSyncExternalStore as Rt}from"react";function de(){return Rt(()=>()=>{},()=>typeof window>"u"?!1:window.__isChatGptApp===!0,()=>!1)}function ue(){return v("locale")}function ce(){return v("maxHeight")}import{useCallback as Wt}from"react";function pe(){let e=v();return Wt(t=>e.openExternal(t),[e])}import{useCallback as _t}from"react";function ge(){let e=v();return _t(t=>e.requestDisplayMode(t),[e])}function me(){return v("safeArea")}import{useCallback as At}from"react";function fe(){let e=v();return At((t,n)=>{(async()=>{Me(n?.modelContext)&&await Promise.resolve(e.updateModelContext(n.modelContext)),await Promise.resolve(e.sendFollowUp(t))})().catch(i=>{console.error("Failed to send follow-up message:",i)})},[e])}function he(){return v("theme")}function we(){return v("toolResponseMetadata")}import{useCallback as Ot}from"react";function ve(){let e=v();return Ot(async t=>{await Promise.resolve(e.updateModelContext(t))},[e])}import{useCallback as It,useEffect as Ut,useState as Nt}from"react";function ye(e){let t=v("widgetState"),[n,i]=Nt(()=>t??(typeof e=="function"?e():e??null));Ut(()=>{i(t)},[t]);let r=It(u=>{i(f=>{let h=typeof u=="function"?u(f):u;return V()==="openai"&&h!=null&&window.openai?.setWidgetState(h),h})},[]);return[n,r]}import{jsx as A,jsxs as Ne}from"react/jsx-runtime";var Le=()=>Ne("div",{className:"flex flex-col items-center justify-center h-full min-h-[120px] gap-4",children:[Ne("div",{className:"flex gap-2",children:[A("div",{className:"w-3 h-3 rounded-full bg-gradient-to-r from-blue-400 to-cyan-400 animate-bounce [animation-delay:-0.3s]"}),A("div",{className:"w-3 h-3 rounded-full bg-gradient-to-r from-cyan-400 to-teal-400 animate-bounce [animation-delay:-0.15s]"}),A("div",{className:"w-3 h-3 rounded-full bg-gradient-to-r from-teal-400 to-emerald-400 animate-bounce"})]}),A("p",{className:"text-sm font-medium text-transparent bg-clip-text bg-gradient-to-r from-slate-400 via-slate-200 to-slate-400 bg-[length:200%_100%] animate-[shimmer_1.5s_ease-in-out_infinite]",children:"Loading widget..."}),A("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:A("div",{className:"w-16 h-16 rounded-full border-2 border-blue-400/20 animate-ping"})}),A("style",{children:`
63
63
  @keyframes shimmer {
64
64
  0% { background-position: 200% 0; }
65
65
  100% { background-position: -200% 0; }