@urbiport/js 0.0.1 → 0.0.11

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.
@@ -0,0 +1,11 @@
1
+  WARN  Issue while reading "/home/runner/work/quick.bot/quick.bot/packages/embeds/js/.npmrc". Failed to replace env in config: ${NPM_TOKEN}
2
+
3
+ > @urbiport/js@0.0.11 build /home/runner/work/quick.bot/quick.bot/packages/embeds/js
4
+ > rollup --config rollup.config.js
5
+
6
+ 
7
+ ./src/index.ts → dist/index.js...
8
+ created dist/index.js in 56.7s
9
+ 
10
+ ./src/web.ts → dist/web.js...
11
+ created dist/web.js in 1m 10.3s
package/LICENSE ADDED
@@ -0,0 +1,669 @@
1
+ Copyright (c) 2020-present Typebot
2
+
3
+ Portions of this software are licensed as follows:
4
+
5
+ - All content that resides under https://github.com/baptisteArno/typebot.io/tree/main/ee directory of this repository is licensed under the license defined in [ee/LICENSE](./ee/LICENSE).
6
+ - Content outside of the above mentioned directories or restrictions above is available under the "AGPLv3" license as defined below.
7
+
8
+
9
+ GNU AFFERO GENERAL PUBLIC LICENSE
10
+ Version 3, 19 November 2007
11
+
12
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
13
+ Everyone is permitted to copy and distribute verbatim copies
14
+ of this license document, but changing it is not allowed.
15
+
16
+ Preamble
17
+
18
+ The GNU Affero General Public License is a free, copyleft license for
19
+ software and other kinds of works, specifically designed to ensure
20
+ cooperation with the community in the case of network server software.
21
+
22
+ The licenses for most software and other practical works are designed
23
+ to take away your freedom to share and change the works. By contrast,
24
+ our General Public Licenses are intended to guarantee your freedom to
25
+ share and change all versions of a program--to make sure it remains free
26
+ software for all its users.
27
+
28
+ When we speak of free software, we are referring to freedom, not
29
+ price. Our General Public Licenses are designed to make sure that you
30
+ have the freedom to distribute copies of free software (and charge for
31
+ them if you wish), that you receive source code or can get it if you
32
+ want it, that you can change the software or use pieces of it in new
33
+ free programs, and that you know you can do these things.
34
+
35
+ Developers that use our General Public Licenses protect your rights
36
+ with two steps: (1) assert copyright on the software, and (2) offer
37
+ you this License which gives you legal permission to copy, distribute
38
+ and/or modify the software.
39
+
40
+ A secondary benefit of defending all users' freedom is that
41
+ improvements made in alternate versions of the program, if they
42
+ receive widespread use, become available for other developers to
43
+ incorporate. Many developers of free software are heartened and
44
+ encouraged by the resulting cooperation. However, in the case of
45
+ software used on network servers, this result may fail to come about.
46
+ The GNU General Public License permits making a modified version and
47
+ letting the public access it on a server without ever releasing its
48
+ source code to the public.
49
+
50
+ The GNU Affero General Public License is designed specifically to
51
+ ensure that, in such cases, the modified source code becomes available
52
+ to the community. It requires the operator of a network server to
53
+ provide the source code of the modified version running there to the
54
+ users of that server. Therefore, public use of a modified version, on
55
+ a publicly accessible server, gives the public access to the source
56
+ code of the modified version.
57
+
58
+ An older license, called the Affero General Public License and
59
+ published by Affero, was designed to accomplish similar goals. This is
60
+ a different license, not a version of the Affero GPL, but Affero has
61
+ released a new version of the Affero GPL which permits relicensing under
62
+ this license.
63
+
64
+ The precise terms and conditions for copying, distribution and
65
+ modification follow.
66
+
67
+ TERMS AND CONDITIONS
68
+
69
+ 0. Definitions.
70
+
71
+ "This License" refers to version 3 of the GNU Affero General Public License.
72
+
73
+ "Copyright" also means copyright-like laws that apply to other kinds of
74
+ works, such as semiconductor masks.
75
+
76
+ "The Program" refers to any copyrightable work licensed under this
77
+ License. Each licensee is addressed as "you". "Licensees" and
78
+ "recipients" may be individuals or organizations.
79
+
80
+ To "modify" a work means to copy from or adapt all or part of the work
81
+ in a fashion requiring copyright permission, other than the making of an
82
+ exact copy. The resulting work is called a "modified version" of the
83
+ earlier work or a work "based on" the earlier work.
84
+
85
+ A "covered work" means either the unmodified Program or a work based
86
+ on the Program.
87
+
88
+ To "propagate" a work means to do anything with it that, without
89
+ permission, would make you directly or secondarily liable for
90
+ infringement under applicable copyright law, except executing it on a
91
+ computer or modifying a private copy. Propagation includes copying,
92
+ distribution (with or without modification), making available to the
93
+ public, and in some countries other activities as well.
94
+
95
+ To "convey" a work means any kind of propagation that enables other
96
+ parties to make or receive copies. Mere interaction with a user through
97
+ a computer network, with no transfer of a copy, is not conveying.
98
+
99
+ An interactive user interface displays "Appropriate Legal Notices"
100
+ to the extent that it includes a convenient and prominently visible
101
+ feature that (1) displays an appropriate copyright notice, and (2)
102
+ tells the user that there is no warranty for the work (except to the
103
+ extent that warranties are provided), that licensees may convey the
104
+ work under this License, and how to view a copy of this License. If
105
+ the interface presents a list of user commands or options, such as a
106
+ menu, a prominent item in the list meets this criterion.
107
+
108
+ 1. Source Code.
109
+
110
+ The "source code" for a work means the preferred form of the work
111
+ for making modifications to it. "Object code" means any non-source
112
+ form of a work.
113
+
114
+ A "Standard Interface" means an interface that either is an official
115
+ standard defined by a recognized standards body, or, in the case of
116
+ interfaces specified for a particular programming language, one that
117
+ is widely used among developers working in that language.
118
+
119
+ The "System Libraries" of an executable work include anything, other
120
+ than the work as a whole, that (a) is included in the normal form of
121
+ packaging a Major Component, but which is not part of that Major
122
+ Component, and (b) serves only to enable use of the work with that
123
+ Major Component, or to implement a Standard Interface for which an
124
+ implementation is available to the public in source code form. A
125
+ "Major Component", in this context, means a major essential component
126
+ (kernel, window system, and so on) of the specific operating system
127
+ (if any) on which the executable work runs, or a compiler used to
128
+ produce the work, or an object code interpreter used to run it.
129
+
130
+ The "Corresponding Source" for a work in object code form means all
131
+ the source code needed to generate, install, and (for an executable
132
+ work) run the object code and to modify the work, including scripts to
133
+ control those activities. However, it does not include the work's
134
+ System Libraries, or general-purpose tools or generally available free
135
+ programs which are used unmodified in performing those activities but
136
+ which are not part of the work. For example, Corresponding Source
137
+ includes interface definition files associated with source files for
138
+ the work, and the source code for shared libraries and dynamically
139
+ linked subprograms that the work is specifically designed to require,
140
+ such as by intimate data communication or control flow between those
141
+ subprograms and other parts of the work.
142
+
143
+ The Corresponding Source need not include anything that users
144
+ can regenerate automatically from other parts of the Corresponding
145
+ Source.
146
+
147
+ The Corresponding Source for a work in source code form is that
148
+ same work.
149
+
150
+ 2. Basic Permissions.
151
+
152
+ All rights granted under this License are granted for the term of
153
+ copyright on the Program, and are irrevocable provided the stated
154
+ conditions are met. This License explicitly affirms your unlimited
155
+ permission to run the unmodified Program. The output from running a
156
+ covered work is covered by this License only if the output, given its
157
+ content, constitutes a covered work. This License acknowledges your
158
+ rights of fair use or other equivalent, as provided by copyright law.
159
+
160
+ You may make, run and propagate covered works that you do not
161
+ convey, without conditions so long as your license otherwise remains
162
+ in force. You may convey covered works to others for the sole purpose
163
+ of having them make modifications exclusively for you, or provide you
164
+ with facilities for running those works, provided that you comply with
165
+ the terms of this License in conveying all material for which you do
166
+ not control copyright. Those thus making or running the covered works
167
+ for you must do so exclusively on your behalf, under your direction
168
+ and control, on terms that prohibit them from making any copies of
169
+ your copyrighted material outside their relationship with you.
170
+
171
+ Conveying under any other circumstances is permitted solely under
172
+ the conditions stated below. Sublicensing is not allowed; section 10
173
+ makes it unnecessary.
174
+
175
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
176
+
177
+ No covered work shall be deemed part of an effective technological
178
+ measure under any applicable law fulfilling obligations under article
179
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
180
+ similar laws prohibiting or restricting circumvention of such
181
+ measures.
182
+
183
+ When you convey a covered work, you waive any legal power to forbid
184
+ circumvention of technological measures to the extent such circumvention
185
+ is effected by exercising rights under this License with respect to
186
+ the covered work, and you disclaim any intention to limit operation or
187
+ modification of the work as a means of enforcing, against the work's
188
+ users, your or third parties' legal rights to forbid circumvention of
189
+ technological measures.
190
+
191
+ 4. Conveying Verbatim Copies.
192
+
193
+ You may convey verbatim copies of the Program's source code as you
194
+ receive it, in any medium, provided that you conspicuously and
195
+ appropriately publish on each copy an appropriate copyright notice;
196
+ keep intact all notices stating that this License and any
197
+ non-permissive terms added in accord with section 7 apply to the code;
198
+ keep intact all notices of the absence of any warranty; and give all
199
+ recipients a copy of this License along with the Program.
200
+
201
+ You may charge any price or no price for each copy that you convey,
202
+ and you may offer support or warranty protection for a fee.
203
+
204
+ 5. Conveying Modified Source Versions.
205
+
206
+ You may convey a work based on the Program, or the modifications to
207
+ produce it from the Program, in the form of source code under the
208
+ terms of section 4, provided that you also meet all of these conditions:
209
+
210
+ a) The work must carry prominent notices stating that you modified
211
+ it, and giving a relevant date.
212
+
213
+ b) The work must carry prominent notices stating that it is
214
+ released under this License and any conditions added under section
215
+ 7. This requirement modifies the requirement in section 4 to
216
+ "keep intact all notices".
217
+
218
+ c) You must license the entire work, as a whole, under this
219
+ License to anyone who comes into possession of a copy. This
220
+ License will therefore apply, along with any applicable section 7
221
+ additional terms, to the whole of the work, and all its parts,
222
+ regardless of how they are packaged. This License gives no
223
+ permission to license the work in any other way, but it does not
224
+ invalidate such permission if you have separately received it.
225
+
226
+ d) If the work has interactive user interfaces, each must display
227
+ Appropriate Legal Notices; however, if the Program has interactive
228
+ interfaces that do not display Appropriate Legal Notices, your
229
+ work need not make them do so.
230
+
231
+ A compilation of a covered work with other separate and independent
232
+ works, which are not by their nature extensions of the covered work,
233
+ and which are not combined with it such as to form a larger program,
234
+ in or on a volume of a storage or distribution medium, is called an
235
+ "aggregate" if the compilation and its resulting copyright are not
236
+ used to limit the access or legal rights of the compilation's users
237
+ beyond what the individual works permit. Inclusion of a covered work
238
+ in an aggregate does not cause this License to apply to the other
239
+ parts of the aggregate.
240
+
241
+ 6. Conveying Non-Source Forms.
242
+
243
+ You may convey a covered work in object code form under the terms
244
+ of sections 4 and 5, provided that you also convey the
245
+ machine-readable Corresponding Source under the terms of this License,
246
+ in one of these ways:
247
+
248
+ a) Convey the object code in, or embodied in, a physical product
249
+ (including a physical distribution medium), accompanied by the
250
+ Corresponding Source fixed on a durable physical medium
251
+ customarily used for software interchange.
252
+
253
+ b) Convey the object code in, or embodied in, a physical product
254
+ (including a physical distribution medium), accompanied by a
255
+ written offer, valid for at least three years and valid for as
256
+ long as you offer spare parts or customer support for that product
257
+ model, to give anyone who possesses the object code either (1) a
258
+ copy of the Corresponding Source for all the software in the
259
+ product that is covered by this License, on a durable physical
260
+ medium customarily used for software interchange, for a price no
261
+ more than your reasonable cost of physically performing this
262
+ conveying of source, or (2) access to copy the
263
+ Corresponding Source from a network server at no charge.
264
+
265
+ c) Convey individual copies of the object code with a copy of the
266
+ written offer to provide the Corresponding Source. This
267
+ alternative is allowed only occasionally and noncommercially, and
268
+ only if you received the object code with such an offer, in accord
269
+ with subsection 6b.
270
+
271
+ d) Convey the object code by offering access from a designated
272
+ place (gratis or for a charge), and offer equivalent access to the
273
+ Corresponding Source in the same way through the same place at no
274
+ further charge. You need not require recipients to copy the
275
+ Corresponding Source along with the object code. If the place to
276
+ copy the object code is a network server, the Corresponding Source
277
+ may be on a different server (operated by you or a third party)
278
+ that supports equivalent copying facilities, provided you maintain
279
+ clear directions next to the object code saying where to find the
280
+ Corresponding Source. Regardless of what server hosts the
281
+ Corresponding Source, you remain obligated to ensure that it is
282
+ available for as long as needed to satisfy these requirements.
283
+
284
+ e) Convey the object code using peer-to-peer transmission, provided
285
+ you inform other peers where the object code and Corresponding
286
+ Source of the work are being offered to the general public at no
287
+ charge under subsection 6d.
288
+
289
+ A separable portion of the object code, whose source code is excluded
290
+ from the Corresponding Source as a System Library, need not be
291
+ included in conveying the object code work.
292
+
293
+ A "User Product" is either (1) a "consumer product", which means any
294
+ tangible personal property which is normally used for personal, family,
295
+ or household purposes, or (2) anything designed or sold for incorporation
296
+ into a dwelling. In determining whether a product is a consumer product,
297
+ doubtful cases shall be resolved in favor of coverage. For a particular
298
+ product received by a particular user, "normally used" refers to a
299
+ typical or common use of that class of product, regardless of the status
300
+ of the particular user or of the way in which the particular user
301
+ actually uses, or expects or is expected to use, the product. A product
302
+ is a consumer product regardless of whether the product has substantial
303
+ commercial, industrial or non-consumer uses, unless such uses represent
304
+ the only significant mode of use of the product.
305
+
306
+ "Installation Information" for a User Product means any methods,
307
+ procedures, authorization keys, or other information required to install
308
+ and execute modified versions of a covered work in that User Product from
309
+ a modified version of its Corresponding Source. The information must
310
+ suffice to ensure that the continued functioning of the modified object
311
+ code is in no case prevented or interfered with solely because
312
+ modification has been made.
313
+
314
+ If you convey an object code work under this section in, or with, or
315
+ specifically for use in, a User Product, and the conveying occurs as
316
+ part of a transaction in which the right of possession and use of the
317
+ User Product is transferred to the recipient in perpetuity or for a
318
+ fixed term (regardless of how the transaction is characterized), the
319
+ Corresponding Source conveyed under this section must be accompanied
320
+ by the Installation Information. But this requirement does not apply
321
+ if neither you nor any third party retains the ability to install
322
+ modified object code on the User Product (for example, the work has
323
+ been installed in ROM).
324
+
325
+ The requirement to provide Installation Information does not include a
326
+ requirement to continue to provide support service, warranty, or updates
327
+ for a work that has been modified or installed by the recipient, or for
328
+ the User Product in which it has been modified or installed. Access to a
329
+ network may be denied when the modification itself materially and
330
+ adversely affects the operation of the network or violates the rules and
331
+ protocols for communication across the network.
332
+
333
+ Corresponding Source conveyed, and Installation Information provided,
334
+ in accord with this section must be in a format that is publicly
335
+ documented (and with an implementation available to the public in
336
+ source code form), and must require no special password or key for
337
+ unpacking, reading or copying.
338
+
339
+ 7. Additional Terms.
340
+
341
+ "Additional permissions" are terms that supplement the terms of this
342
+ License by making exceptions from one or more of its conditions.
343
+ Additional permissions that are applicable to the entire Program shall
344
+ be treated as though they were included in this License, to the extent
345
+ that they are valid under applicable law. If additional permissions
346
+ apply only to part of the Program, that part may be used separately
347
+ under those permissions, but the entire Program remains governed by
348
+ this License without regard to the additional permissions.
349
+
350
+ When you convey a copy of a covered work, you may at your option
351
+ remove any additional permissions from that copy, or from any part of
352
+ it. (Additional permissions may be written to require their own
353
+ removal in certain cases when you modify the work.) You may place
354
+ additional permissions on material, added by you to a covered work,
355
+ for which you have or can give appropriate copyright permission.
356
+
357
+ Notwithstanding any other provision of this License, for material you
358
+ add to a covered work, you may (if authorized by the copyright holders of
359
+ that material) supplement the terms of this License with terms:
360
+
361
+ a) Disclaiming warranty or limiting liability differently from the
362
+ terms of sections 15 and 16 of this License; or
363
+
364
+ b) Requiring preservation of specified reasonable legal notices or
365
+ author attributions in that material or in the Appropriate Legal
366
+ Notices displayed by works containing it; or
367
+
368
+ c) Prohibiting misrepresentation of the origin of that material, or
369
+ requiring that modified versions of such material be marked in
370
+ reasonable ways as different from the original version; or
371
+
372
+ d) Limiting the use for publicity purposes of names of licensors or
373
+ authors of the material; or
374
+
375
+ e) Declining to grant rights under trademark law for use of some
376
+ trade names, trademarks, or service marks; or
377
+
378
+ f) Requiring indemnification of licensors and authors of that
379
+ material by anyone who conveys the material (or modified versions of
380
+ it) with contractual assumptions of liability to the recipient, for
381
+ any liability that these contractual assumptions directly impose on
382
+ those licensors and authors.
383
+
384
+ All other non-permissive additional terms are considered "further
385
+ restrictions" within the meaning of section 10. If the Program as you
386
+ received it, or any part of it, contains a notice stating that it is
387
+ governed by this License along with a term that is a further
388
+ restriction, you may remove that term. If a license document contains
389
+ a further restriction but permits relicensing or conveying under this
390
+ License, you may add to a covered work material governed by the terms
391
+ of that license document, provided that the further restriction does
392
+ not survive such relicensing or conveying.
393
+
394
+ If you add terms to a covered work in accord with this section, you
395
+ must place, in the relevant source files, a statement of the
396
+ additional terms that apply to those files, or a notice indicating
397
+ where to find the applicable terms.
398
+
399
+ Additional terms, permissive or non-permissive, may be stated in the
400
+ form of a separately written license, or stated as exceptions;
401
+ the above requirements apply either way.
402
+
403
+ 8. Termination.
404
+
405
+ You may not propagate or modify a covered work except as expressly
406
+ provided under this License. Any attempt otherwise to propagate or
407
+ modify it is void, and will automatically terminate your rights under
408
+ this License (including any patent licenses granted under the third
409
+ paragraph of section 11).
410
+
411
+ However, if you cease all violation of this License, then your
412
+ license from a particular copyright holder is reinstated (a)
413
+ provisionally, unless and until the copyright holder explicitly and
414
+ finally terminates your license, and (b) permanently, if the copyright
415
+ holder fails to notify you of the violation by some reasonable means
416
+ prior to 60 days after the cessation.
417
+
418
+ Moreover, your license from a particular copyright holder is
419
+ reinstated permanently if the copyright holder notifies you of the
420
+ violation by some reasonable means, this is the first time you have
421
+ received notice of violation of this License (for any work) from that
422
+ copyright holder, and you cure the violation prior to 30 days after
423
+ your receipt of the notice.
424
+
425
+ Termination of your rights under this section does not terminate the
426
+ licenses of parties who have received copies or rights from you under
427
+ this License. If your rights have been terminated and not permanently
428
+ reinstated, you do not qualify to receive new licenses for the same
429
+ material under section 10.
430
+
431
+ 9. Acceptance Not Required for Having Copies.
432
+
433
+ You are not required to accept this License in order to receive or
434
+ run a copy of the Program. Ancillary propagation of a covered work
435
+ occurring solely as a consequence of using peer-to-peer transmission
436
+ to receive a copy likewise does not require acceptance. However,
437
+ nothing other than this License grants you permission to propagate or
438
+ modify any covered work. These actions infringe copyright if you do
439
+ not accept this License. Therefore, by modifying or propagating a
440
+ covered work, you indicate your acceptance of this License to do so.
441
+
442
+ 10. Automatic Licensing of Downstream Recipients.
443
+
444
+ Each time you convey a covered work, the recipient automatically
445
+ receives a license from the original licensors, to run, modify and
446
+ propagate that work, subject to this License. You are not responsible
447
+ for enforcing compliance by third parties with this License.
448
+
449
+ An "entity transaction" is a transaction transferring control of an
450
+ organization, or substantially all assets of one, or subdividing an
451
+ organization, or merging organizations. If propagation of a covered
452
+ work results from an entity transaction, each party to that
453
+ transaction who receives a copy of the work also receives whatever
454
+ licenses to the work the party's predecessor in interest had or could
455
+ give under the previous paragraph, plus a right to possession of the
456
+ Corresponding Source of the work from the predecessor in interest, if
457
+ the predecessor has it or can get it with reasonable efforts.
458
+
459
+ You may not impose any further restrictions on the exercise of the
460
+ rights granted or affirmed under this License. For example, you may
461
+ not impose a license fee, royalty, or other charge for exercise of
462
+ rights granted under this License, and you may not initiate litigation
463
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
464
+ any patent claim is infringed by making, using, selling, offering for
465
+ sale, or importing the Program or any portion of it.
466
+
467
+ 11. Patents.
468
+
469
+ A "contributor" is a copyright holder who authorizes use under this
470
+ License of the Program or a work on which the Program is based. The
471
+ work thus licensed is called the contributor's "contributor version".
472
+
473
+ A contributor's "essential patent claims" are all patent claims
474
+ owned or controlled by the contributor, whether already acquired or
475
+ hereafter acquired, that would be infringed by some manner, permitted
476
+ by this License, of making, using, or selling its contributor version,
477
+ but do not include claims that would be infringed only as a
478
+ consequence of further modification of the contributor version. For
479
+ purposes of this definition, "control" includes the right to grant
480
+ patent sublicenses in a manner consistent with the requirements of
481
+ this License.
482
+
483
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
484
+ patent license under the contributor's essential patent claims, to
485
+ make, use, sell, offer for sale, import and otherwise run, modify and
486
+ propagate the contents of its contributor version.
487
+
488
+ In the following three paragraphs, a "patent license" is any express
489
+ agreement or commitment, however denominated, not to enforce a patent
490
+ (such as an express permission to practice a patent or covenant not to
491
+ sue for patent infringement). To "grant" such a patent license to a
492
+ party means to make such an agreement or commitment not to enforce a
493
+ patent against the party.
494
+
495
+ If you convey a covered work, knowingly relying on a patent license,
496
+ and the Corresponding Source of the work is not available for anyone
497
+ to copy, free of charge and under the terms of this License, through a
498
+ publicly available network server or other readily accessible means,
499
+ then you must either (1) cause the Corresponding Source to be so
500
+ available, or (2) arrange to deprive yourself of the benefit of the
501
+ patent license for this particular work, or (3) arrange, in a manner
502
+ consistent with the requirements of this License, to extend the patent
503
+ license to downstream recipients. "Knowingly relying" means you have
504
+ actual knowledge that, but for the patent license, your conveying the
505
+ covered work in a country, or your recipient's use of the covered work
506
+ in a country, would infringe one or more identifiable patents in that
507
+ country that you have reason to believe are valid.
508
+
509
+ If, pursuant to or in connection with a single transaction or
510
+ arrangement, you convey, or propagate by procuring conveyance of, a
511
+ covered work, and grant a patent license to some of the parties
512
+ receiving the covered work authorizing them to use, propagate, modify
513
+ or convey a specific copy of the covered work, then the patent license
514
+ you grant is automatically extended to all recipients of the covered
515
+ work and works based on it.
516
+
517
+ A patent license is "discriminatory" if it does not include within
518
+ the scope of its coverage, prohibits the exercise of, or is
519
+ conditioned on the non-exercise of one or more of the rights that are
520
+ specifically granted under this License. You may not convey a covered
521
+ work if you are a party to an arrangement with a third party that is
522
+ in the business of distributing software, under which you make payment
523
+ to the third party based on the extent of your activity of conveying
524
+ the work, and under which the third party grants, to any of the
525
+ parties who would receive the covered work from you, a discriminatory
526
+ patent license (a) in connection with copies of the covered work
527
+ conveyed by you (or copies made from those copies), or (b) primarily
528
+ for and in connection with specific products or compilations that
529
+ contain the covered work, unless you entered into that arrangement,
530
+ or that patent license was granted, prior to 28 March 2007.
531
+
532
+ Nothing in this License shall be construed as excluding or limiting
533
+ any implied license or other defenses to infringement that may
534
+ otherwise be available to you under applicable patent law.
535
+
536
+ 12. No Surrender of Others' Freedom.
537
+
538
+ If conditions are imposed on you (whether by court order, agreement or
539
+ otherwise) that contradict the conditions of this License, they do not
540
+ excuse you from the conditions of this License. If you cannot convey a
541
+ covered work so as to satisfy simultaneously your obligations under this
542
+ License and any other pertinent obligations, then as a consequence you may
543
+ not convey it at all. For example, if you agree to terms that obligate you
544
+ to collect a royalty for further conveying from those to whom you convey
545
+ the Program, the only way you could satisfy both those terms and this
546
+ License would be to refrain entirely from conveying the Program.
547
+
548
+ 13. Remote Network Interaction; Use with the GNU General Public License.
549
+
550
+ Notwithstanding any other provision of this License, if you modify the
551
+ Program, your modified version must prominently offer all users
552
+ interacting with it remotely through a computer network (if your version
553
+ supports such interaction) an opportunity to receive the Corresponding
554
+ Source of your version by providing access to the Corresponding Source
555
+ from a network server at no charge, through some standard or customary
556
+ means of facilitating copying of software. This Corresponding Source
557
+ shall include the Corresponding Source for any work covered by version 3
558
+ of the GNU General Public License that is incorporated pursuant to the
559
+ following paragraph.
560
+
561
+ Notwithstanding any other provision of this License, you have
562
+ permission to link or combine any covered work with a work licensed
563
+ under version 3 of the GNU General Public License into a single
564
+ combined work, and to convey the resulting work. The terms of this
565
+ License will continue to apply to the part which is the covered work,
566
+ but the work with which it is combined will remain governed by version
567
+ 3 of the GNU General Public License.
568
+
569
+ 14. Revised Versions of this License.
570
+
571
+ The Free Software Foundation may publish revised and/or new versions of
572
+ the GNU Affero General Public License from time to time. Such new versions
573
+ will be similar in spirit to the present version, but may differ in detail to
574
+ address new problems or concerns.
575
+
576
+ Each version is given a distinguishing version number. If the
577
+ Program specifies that a certain numbered version of the GNU Affero General
578
+ Public License "or any later version" applies to it, you have the
579
+ option of following the terms and conditions either of that numbered
580
+ version or of any later version published by the Free Software
581
+ Foundation. If the Program does not specify a version number of the
582
+ GNU Affero General Public License, you may choose any version ever published
583
+ by the Free Software Foundation.
584
+
585
+ If the Program specifies that a proxy can decide which future
586
+ versions of the GNU Affero General Public License can be used, that proxy's
587
+ public statement of acceptance of a version permanently authorizes you
588
+ to choose that version for the Program.
589
+
590
+ Later license versions may give you additional or different
591
+ permissions. However, no additional obligations are imposed on any
592
+ author or copyright holder as a result of your choosing to follow a
593
+ later version.
594
+
595
+ 15. Disclaimer of Warranty.
596
+
597
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
598
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
599
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
600
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
601
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
602
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
603
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
604
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
605
+
606
+ 16. Limitation of Liability.
607
+
608
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
609
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
610
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
611
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
612
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
613
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
614
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
615
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
616
+ SUCH DAMAGES.
617
+
618
+ 17. Interpretation of Sections 15 and 16.
619
+
620
+ If the disclaimer of warranty and limitation of liability provided
621
+ above cannot be given local legal effect according to their terms,
622
+ reviewing courts shall apply local law that most closely approximates
623
+ an absolute waiver of all civil liability in connection with the
624
+ Program, unless a warranty or assumption of liability accompanies a
625
+ copy of the Program in return for a fee.
626
+
627
+ END OF TERMS AND CONDITIONS
628
+
629
+ How to Apply These Terms to Your New Programs
630
+
631
+ If you develop a new program, and you want it to be of the greatest
632
+ possible use to the public, the best way to achieve this is to make it
633
+ free software which everyone can redistribute and change under these terms.
634
+
635
+ To do so, attach the following notices to the program. It is safest
636
+ to attach them to the start of each source file to most effectively
637
+ state the exclusion of warranty; and each file should have at least
638
+ the "copyright" line and a pointer to where the full notice is found.
639
+
640
+ <one line to give the program's name and a brief idea of what it does.>
641
+ Copyright (C) <year> <name of author>
642
+
643
+ This program is free software: you can redistribute it and/or modify
644
+ it under the terms of the GNU Affero General Public License as published
645
+ by the Free Software Foundation, either version 3 of the License, or
646
+ (at your option) any later version.
647
+
648
+ This program is distributed in the hope that it will be useful,
649
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
650
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
651
+ GNU Affero General Public License for more details.
652
+
653
+ You should have received a copy of the GNU Affero General Public License
654
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
655
+
656
+ Also add information on how to contact you by electronic and paper mail.
657
+
658
+ If your software can interact with users remotely through a computer
659
+ network, you should also make sure that it provides a way for users to
660
+ get its source. For example, if your program is a web application, its
661
+ interface could display a "Source" link that leads users to an archive
662
+ of the code. There are many ways you could offer source, and different
663
+ solutions will be better for different programs; see section 13 for the
664
+ specific requirements.
665
+
666
+ You should also get your employer (if you work as a programmer) or school,
667
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
668
+ For more information on this, and how to apply and follow the GNU AGPL, see
669
+ <https://www.gnu.org/licenses/>.
package/README.md CHANGED
@@ -9,14 +9,14 @@ Frontend library to embed typebots from [Typebot](https://quick.bot/).
9
9
  To install, simply run:
10
10
 
11
11
  ```bash
12
- npm install @typebot.io/js
12
+ npm install @urbiport/js
13
13
  ```
14
14
 
15
15
  ### Directly in your HTML
16
16
 
17
17
  ```
18
18
  <script type="module">
19
- import Typebot from 'https://cdn.jsdelivr.net/npm/@typebot.io/js@0.3/dist/web.js'
19
+ import Typebot from 'https://cdn.jsdelivr.net/npm/@urbiport/js@0.3/dist/web.js'
20
20
 
21
21
  Typebot.initStandard({
22
22
  typebot: 'my-typebot',
@@ -28,13 +28,14 @@ npm install @typebot.io/js
28
28
 
29
29
  ## Standard
30
30
 
31
- You can get the standard HTML and Javascript code by clicking on the "HTML & Javascript" button in the "Share" tab of your typebot.
31
+ You can get the standard HTML and Javascript code by clicking on the "HTML & Javascript" button in
32
+ the "Share" tab of your typebot.
32
33
 
33
34
  There, you can change the container dimensions. Here is a code example:
34
35
 
35
36
  ```html
36
37
  <script type="module">
37
- import Typebot from 'https://cdn.jsdelivr.net/npm/@typebot.io/js@0.3/dist/web.js'
38
+ import Typebot from 'https://cdn.jsdelivr.net/npm/@urbiport/js@0.3/dist/web.js'
38
39
 
39
40
  Typebot.initStandard({
40
41
  typebot: 'my-typebot',
@@ -48,13 +49,14 @@ This code is creating a container with a 100% width (will match parent width) an
48
49
 
49
50
  ## Popup
50
51
 
51
- You can get the popup HTML and Javascript code by clicking on the "HTML & Javascript" button in the "Share" tab of your typebot.
52
+ You can get the popup HTML and Javascript code by clicking on the "HTML & Javascript" button in the
53
+ "Share" tab of your typebot.
52
54
 
53
55
  Here is an example:
54
56
 
55
57
  ```html
56
58
  <script type="module">
57
- import Typebot from 'https://cdn.jsdelivr.net/npm/@typebot.io/js@0.3/dist/web.js'
59
+ import Typebot from 'https://cdn.jsdelivr.net/npm/@urbiport/js@0.3/dist/web.js'
58
60
 
59
61
  Typebot.initPopup({
60
62
  typebot: 'my-typebot',
@@ -90,13 +92,14 @@ You can bind these commands on a button element, for example:
90
92
 
91
93
  ## Bubble
92
94
 
93
- You can get the bubble HTML and Javascript code by clicking on the "HTML & Javascript" button in the "Share" tab of your typebot.
95
+ You can get the bubble HTML and Javascript code by clicking on the "HTML & Javascript" button in the
96
+ "Share" tab of your typebot.
94
97
 
95
98
  Here is an example:
96
99
 
97
100
  ```html
98
101
  <script type="module">
99
- import Typebot from 'https://cdn.jsdelivr.net/npm/@typebot.io/js@0.3/dist/web.js'
102
+ import Typebot from 'https://cdn.jsdelivr.net/npm/@urbiport/js@0.3/dist/web.js'
100
103
 
101
104
  Typebot.initBubble({
102
105
  typebot: 'my-typebot',
@@ -152,7 +155,8 @@ You can bind these commands on a button element, for example:
152
155
 
153
156
  ## Additional configuration
154
157
 
155
- You can prefill the bot variable values in your embed code by adding the `prefilledVariables` option. Here is an example:
158
+ You can prefill the bot variable values in your embed code by adding the `prefilledVariables`
159
+ option. Here is an example:
156
160
 
157
161
  ```js
158
162
  Typebot.initStandard({
@@ -164,6 +168,9 @@ Typebot.initStandard({
164
168
  })
165
169
  ```
166
170
 
167
- It will prefill the `Current URL` variable with "https://my-site/account" and the `User name` variable with "Francisco". More info about variables: [here](/editor/variables).
171
+ It will prefill the `Current URL` variable with "https://my-site/account" and the `User name`
172
+ variable with "Francisco". More info about variables: [here](/editor/variables).
168
173
 
169
- Note that if your site URL contains query params (i.e. https://quick.bot?User%20name=John%20Doe), the variables will automatically be injected to the typebot. So you don't need to manually transfer query params to the bot embed configuration.
174
+ Note that if your site URL contains query params (i.e. https://quick.bot?User%20name=John%20Doe),
175
+ the variables will automatically be injected to the typebot. So you don't need to manually transfer
176
+ query params to the bot embed configuration.
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- // v0.3.12
1
+ // v0.0.11
2
2
  const o=()=>{window.postMessage({isFromTypebot:!0,command:"close"})},s=()=>{window.postMessage({isFromTypebot:!0,command:"hidePreviewMessage"})},e=()=>{window.postMessage({isFromTypebot:!0,command:"open"})},m=o=>{const s={isFromTypebot:!0,command:"setPrefilledVariables",variables:o};window.postMessage(s)},t=o=>{const s={isFromTypebot:!0,command:"showPreviewMessage",message:o};window.postMessage(s)},a=()=>{window.postMessage({isFromTypebot:!0,command:"toggle"})},n=o=>{const s={isFromTypebot:!0,command:"setInputValue",value:o};window.postMessage(s)},i=()=>{window.postMessage({isFromTypebot:!0,command:"unmount"})};export{o as close,s as hidePreviewMessage,e as open,n as setInputValue,m as setPrefilledVariables,t as showPreviewMessage,a as toggle,i as unmount};
package/dist/web.js CHANGED
@@ -1,4 +1,4 @@
1
- // v0.3.12
1
+ // v0.0.11
2
2
  function e(e){return Object.keys(e).reduce(((t,n)=>{const r=e[n];var i;return t[n]=Object.assign({},r),o(r.value)&&(i=r.value,"[object Function]"!==Object.prototype.toString.call(i))&&!Array.isArray(r.value)&&(t[n].value=Object.assign({},r.value)),Array.isArray(r.value)&&(t[n].value=r.value.slice(0)),t}),{})}function t(e){if(e)try{return JSON.parse(e)}catch(t){return e}}function n(e,t,n,o){if(null==n||!1===n)return e.removeAttribute(t);let r=o?JSON.stringify(n):n;e.__updating[t]=!0,"true"===r&&(r=""),e.setAttribute(t,r),Promise.resolve().then((()=>delete e.__updating[t]))}function o(e){return null!=e&&("object"==typeof e||"function"==typeof e)}let r;function i(o,i){const a=Object.keys(i);return class extends o{static get observedAttributes(){return a.map((e=>i[e].attribute))}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=function(o,r){const i=e(r);return Object.keys(r).forEach((e=>{const r=i[e],a=o.getAttribute(r.attribute),s=o[e];null!=a&&(r.value=r.parse?t(a):a),null!=s&&(r.value=Array.isArray(s)?s.slice(0):s),r.reflect&&n(o,r.attribute,r.value,!!r.parse),Object.defineProperty(o,e,{get:()=>r.value,set(t){const o=r.value;r.value=t,r.reflect&&n(this,r.attribute,r.value,!!r.parse);for(let n=0,r=this.__propertyChangedCallbacks.length;n<r;n++)this.__propertyChangedCallbacks[n](e,t,o)},enumerable:!0,configurable:!0})})),i}(this,i);const o=function(e){return Object.keys(e).reduce(((t,n)=>(t[n]=e[n].value,t)),{})}(this.props),a=this.Component,s=r;try{r=this,this.__initialized=!0,"function"==typeof(l=a)&&0===l.toString().indexOf("class")?new a(o,{element:this}):a(o,{element:this})}finally{r=s}var l}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let e=null;for(;e=this.__releaseCallbacks.pop();)e(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(e,n,o){if(this.__initialized&&!this.__updating[e]&&(e=this.lookupProp(e))in i){if(null==o&&!this[e])return;this[e]=i[e].parse?t(o):o}}lookupProp(e){if(i)return a.find((t=>e===t||e===i[t].attribute))}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(e){this.__releaseCallbacks.push(e)}addPropertyChangedCallback(e){this.__propertyChangedCallbacks.push(e)}}}function a(e,t={},n={}){const{BaseElement:r=HTMLElement,extension:a,customElements:s=window.customElements}=n;return n=>{if(!e)throw new Error("tag is required to register a Component");let l=s.get(e);return l?(l.prototype.Component=n,l):(l=i(r,function(e){return e?Object.keys(e).reduce(((t,n)=>{const r=e[n];return t[n]=o(r)&&"value"in r?r:{value:r},t[n].attribute||(t[n].attribute=n.replace(/\.?([A-Z]+)/g,((e,t)=>"-"+t.toLowerCase())).replace("_","-").replace(/^-/,"")),t[n].parse="parse"in t[n]?t[n].parse:"string"!=typeof t[n].value,t}),{}):{}}(t)),l.prototype.Component=n,l.prototype.registeredTag=e,s.define(e,l,a),l)}}const s={context:void 0,registry:void 0},l=Symbol("solid-proxy"),c=Symbol("solid-track"),d=Symbol("solid-dev-component"),u={equals:(e,t)=>e===t};let p=F;const g=1,h=2,f={owned:null,cleanups:null,context:null,owner:null};var m=null;let b=null,y=null,v=null,w=null,x=0;function k(e,t){const n=y,o=m,r=0===e.length,i=r?f:{owned:null,cleanups:null,context:null,owner:void 0===t?o:t},a=r?e:()=>e((()=>C((()=>V(i)))));m=i,y=null;try{return B(a,!0)}finally{y=n,m=o}}function _(e,t){const n={value:e,observers:null,observerSlots:null,comparator:(t=t?Object.assign({},u,t):u).equals||void 0};return[N.bind(n),e=>("function"==typeof e&&(e=e(n.value)),L(n,e))]}function T(e,t,n){D(M(e,t,!1,g))}function S(e,t,n){p=j;const o=M(e,t,!1,g);n&&n.render||(o.user=!0),w?w.push(o):D(o)}function E(e,t,n){n=n?Object.assign({},u,n):u;const o=M(e,t,!0,0);return o.observers=null,o.observerSlots=null,o.comparator=n.equals||void 0,D(o),N.bind(o)}function C(e){if(null===y)return e();const t=y;y=null;try{return e()}finally{y=t}}function P(e){S((()=>C(e)))}function I(e){return null===m||(null===m.cleanups?m.cleanups=[e]:m.cleanups.push(e)),e}function O(){return y}function A(){return m}function $(e){let t;return void 0!==(t=W(m,e.id))?t:e.defaultValue}function R(e){const t=E(e),n=E((()=>q(t())));return n.toArray=()=>{const e=n();return Array.isArray(e)?e:null!=e?[e]:[]},n}function N(){if(this.sources&&this.state)if(this.state===g)D(this);else{const e=v;v=null,B((()=>z(this)),!1),v=e}if(y){const e=this.observers?this.observers.length:0;y.sources?(y.sources.push(this),y.sourceSlots.push(e)):(y.sources=[this],y.sourceSlots=[e]),this.observers?(this.observers.push(y),this.observerSlots.push(y.sources.length-1)):(this.observers=[y],this.observerSlots=[y.sources.length-1])}return this.value}function L(e,t,n){let o=e.value;return e.comparator&&e.comparator(o,t)||(e.value=t,e.observers&&e.observers.length&&B((()=>{for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t],o=b&&b.running;o&&b.disposed.has(n),(o?n.tState:n.state)||(n.pure?v.push(n):w.push(n),n.observers&&H(n)),o||(n.state=g)}if(v.length>1e6)throw v=[],new Error}),!1)),t}function D(e){if(!e.fn)return;V(e);const t=m,n=y,o=x;y=m=e,function(e,t,n){let o;try{o=e.fn(t)}catch(t){return e.pure&&(e.state=g,e.owned&&e.owned.forEach(V),e.owned=null),e.updatedAt=n+1,G(t)}(!e.updatedAt||e.updatedAt<=n)&&(null!=e.updatedAt&&"observers"in e?L(e,o):e.value=o,e.updatedAt=n)}(e,e.value,o),y=n,m=t}function M(e,t,n,o=g,r){const i={fn:e,state:o,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:m,context:null,pure:n};return null===m||m!==f&&(m.owned?m.owned.push(i):m.owned=[i]),i}function U(e){if(0===e.state)return;if(e.state===h)return z(e);if(e.suspense&&C(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<x);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if((e=t[n]).state===g)D(e);else if(e.state===h){const n=v;v=null,B((()=>z(e,t[0])),!1),v=n}}function B(e,t){if(v)return e();let n=!1;t||(v=[]),w?n=!0:w=[],x++;try{const t=e();return function(e){v&&(F(v),v=null);if(e)return;const t=w;w=null,t.length&&B((()=>p(t)),!1)}(n),t}catch(e){n||(w=null),v=null,G(e)}}function F(e){for(let t=0;t<e.length;t++)U(e[t])}function j(e){let t,n=0;for(t=0;t<e.length;t++){const o=e[t];o.user?e[n++]=o:U(o)}for(t=0;t<n;t++)U(e[t])}function z(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const o=e.sources[n];if(o.sources){const e=o.state;e===g?o!==t&&(!o.updatedAt||o.updatedAt<x)&&U(o):e===h&&z(o,t)}}}function H(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=h,n.pure?v.push(n):w.push(n),n.observers&&H(n))}}function V(e){let t;if(e.sources)for(;e.sources.length;){const t=e.sources.pop(),n=e.sourceSlots.pop(),o=t.observers;if(o&&o.length){const e=o.pop(),r=t.observerSlots.pop();n<o.length&&(e.sourceSlots[r]=n,o[n]=e,t.observerSlots[n]=r)}}if(e.owned){for(t=e.owned.length-1;t>=0;t--)V(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function G(e,t=m){const n=function(e){return e instanceof Error?e:new Error("string"==typeof e?e:"Unknown error",{cause:e})}(e);throw n}function W(e,t){return e?e.context&&void 0!==e.context[t]?e.context[t]:W(e.owner,t):void 0}function q(e){if("function"==typeof e&&!e.length)return q(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const o=q(e[n]);Array.isArray(o)?t.push.apply(t,o):t.push(o)}return t}return e}function K(e,t){return function(t){let n;return T((()=>n=C((()=>(m.context={[e]:t.value},R((()=>t.children)))))),void 0),n}}const Y=Symbol("fallback");function X(e){for(let t=0;t<e.length;t++)e[t]()}function Z(e,t){return C((()=>e(t||{})))}function J(){return!0}const Q={get:(e,t,n)=>t===l?n:e.get(t),has:(e,t)=>t===l||e.has(t),set:J,deleteProperty:J,getOwnPropertyDescriptor:(e,t)=>({configurable:!0,enumerable:!0,get:()=>e.get(t),set:J,deleteProperty:J}),ownKeys:e=>e.keys()};function ee(e){return(e="function"==typeof e?e():e)?e:{}}function te(){for(let e=0,t=this.length;e<t;++e){const t=this[e]();if(void 0!==t)return t}}function ne(...e){let t=!1;for(let n=0;n<e.length;n++){const o=e[n];t=t||!!o&&l in o,e[n]="function"==typeof o?(t=!0,E(o)):o}if(t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const o=ee(e[n])[t];if(void 0!==o)return o}},has(t){for(let n=e.length-1;n>=0;n--)if(t in ee(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(ee(e[n])));return[...new Set(t)]}},Q);const n={},o={},r=new Set;for(let t=e.length-1;t>=0;t--){const i=e[t];if(!i)continue;const a=Object.getOwnPropertyNames(i);for(let e=0,t=a.length;e<t;e++){const t=a[e];if("__proto__"===t||"constructor"===t)continue;const s=Object.getOwnPropertyDescriptor(i,t);if(r.has(t)){const e=o[t];e?s.get?e.push(s.get.bind(i)):void 0!==s.value&&e.push((()=>s.value)):void 0===n[t]&&(n[t]=s.value)}else s.get?(r.add(t),Object.defineProperty(n,t,{enumerable:!0,configurable:!0,get:te.bind(o[t]=[s.get.bind(i)])})):(void 0!==s.value&&r.add(t),n[t]=s.value)}}return n}function oe(e,...t){if(l in e){const n=new Set(t.length>1?t.flat():t[0]),o=t.map((t=>new Proxy({get:n=>t.includes(n)?e[n]:void 0,has:n=>t.includes(n)&&n in e,keys:()=>t.filter((t=>t in e))},Q)));return o.push(new Proxy({get:t=>n.has(t)?void 0:e[t],has:t=>!n.has(t)&&t in e,keys:()=>Object.keys(e).filter((e=>!n.has(e)))},Q)),o}const n={},o=t.map((()=>({})));for(const r of Object.getOwnPropertyNames(e)){const i=Object.getOwnPropertyDescriptor(e,r),a=!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable;let s=!1,l=0;for(const e of t)e.includes(r)&&(s=!0,a?o[l][r]=i.value:Object.defineProperty(o[l],r,i)),++l;s||(a?n[r]=i.value:Object.defineProperty(n,r,i))}return[...o,n]}let re=0;function ie(){const e=s.context;return e?`${e.id}${e.count++}`:"cl-"+re++}const ae=e=>`Stale read from <${e}>.`;function se(e){const t="fallback"in e&&{fallback:()=>e.fallback};return E(function(e,t,n={}){let o=[],r=[],i=[],a=0,s=t.length>1?[]:null;return I((()=>X(i))),()=>{let l,d,u=e()||[];return u[c],C((()=>{let e,t,c,g,h,f,m,b,y,v=u.length;if(0===v)0!==a&&(X(i),i=[],o=[],r=[],a=0,s&&(s=[])),n.fallback&&(o=[Y],r[0]=k((e=>(i[0]=e,n.fallback()))),a=1);else if(0===a){for(r=new Array(v),d=0;d<v;d++)o[d]=u[d],r[d]=k(p);a=v}else{for(c=new Array(v),g=new Array(v),s&&(h=new Array(v)),f=0,m=Math.min(a,v);f<m&&o[f]===u[f];f++);for(m=a-1,b=v-1;m>=f&&b>=f&&o[m]===u[b];m--,b--)c[b]=r[m],g[b]=i[m],s&&(h[b]=s[m]);for(e=new Map,t=new Array(b+1),d=b;d>=f;d--)y=u[d],l=e.get(y),t[d]=void 0===l?-1:l,e.set(y,d);for(l=f;l<=m;l++)y=o[l],d=e.get(y),void 0!==d&&-1!==d?(c[d]=r[l],g[d]=i[l],s&&(h[d]=s[l]),d=t[d],e.set(y,d)):i[l]();for(d=f;d<v;d++)d in c?(r[d]=c[d],i[d]=g[d],s&&(s[d]=h[d],s[d](d))):r[d]=k(p);r=r.slice(0,a=v),o=u.slice(0)}return r}));function p(e){if(i[d]=e,s){const[e,n]=_(d);return s[d]=n,t(u[d],e)}return t(u[d])}}}((()=>e.each),e.children,t||void 0))}function le(e){const t=e.keyed,n=E((()=>e.when),void 0,{equals:(e,n)=>t?e===n:!e==!n});return E((()=>{const o=n();if(o){const r=e.children;return"function"==typeof r&&r.length>0?C((()=>r(t?o:()=>{if(!C(n))throw ae("Show");return e.when}))):r}return e.fallback}),void 0,void 0)}function ce(e){let t=!1;const n=R((()=>e.children)),o=E((()=>{let e=n();Array.isArray(e)||(e=[e]);for(let n=0;n<e.length;n++){const o=e[n].when;if(o)return t=!!e[n].keyed,[n,o,e[n]]}return[-1]}),void 0,{equals:(e,n)=>e[0]===n[0]&&(t?e[1]===n[1]:!e[1]==!n[1])&&e[2]===n[2]});return E((()=>{const[n,r,i]=o();if(n<0)return e.fallback;const a=i.children;return"function"==typeof a&&a.length>0?C((()=>a(t?r:()=>{if(C(o)[0]!==n)throw ae("Match");return i.when}))):a}),void 0,void 0)}function de(e){return e}const ue=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline","allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"]),pe=new Set(["innerHTML","textContent","innerText","children"]),ge=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),he=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});const fe=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),me=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),be={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};const ye="_$DX_DELEGATE";function ve(e,t,n){let o;const r=()=>{const t=document.createElement("template");return t.innerHTML=e,n?t.content.firstChild.firstChild:t.content.firstChild},i=t?()=>C((()=>document.importNode(o||(o=r()),!0))):()=>(o||(o=r())).cloneNode(!0);return i.cloneNode=i,i}function we(e,t=window.document){const n=t[ye]||(t[ye]=new Set);for(let o=0,r=e.length;o<r;o++){const r=e[o];n.has(r)||(n.add(r),t.addEventListener(r,Pe))}}function xe(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n)}function ke(e,t){null==t?e.removeAttribute("class"):e.className=t}function _e(e,t={},n,o){const r={};return o||T((()=>r.children=Ie(e,t.children,r.children))),T((()=>t.ref&&t.ref(e))),T((()=>function(e,t,n,o,r={},i=!1){t||(t={});for(const o in r)if(!(o in t)){if("children"===o)continue;r[o]=Ce(e,o,null,r[o],n,i)}for(const a in t){if("children"===a){o||Ie(e,t.children);continue}const s=t[a];r[a]=Ce(e,a,s,r[a],n,i)}}(e,t,n,!0,r,!0))),r}function Te(e,t,n){return C((()=>e(t,n)))}function Se(e,t,n,o){if(void 0===n||o||(o=[]),"function"!=typeof t)return Ie(e,t,o,n);T((o=>Ie(e,t(),o,n)),o)}function Ee(e,t,n){const o=t.trim().split(/\s+/);for(let t=0,r=o.length;t<r;t++)e.classList.toggle(o[t],n)}function Ce(e,t,n,o,r,i){let a,s,l,c,d;if("style"===t)return function(e,t,n){if(!t)return n?xe(e,"style"):t;const o=e.style;if("string"==typeof t)return o.cssText=t;let r,i;for(i in"string"==typeof n&&(o.cssText=n=void 0),n||(n={}),t||(t={}),n)null==t[i]&&o.removeProperty(i),delete n[i];for(i in t)r=t[i],r!==n[i]&&(o.setProperty(i,r),n[i]=r);return n}(e,n,o);if("classList"===t)return function(e,t,n={}){const o=Object.keys(t||{}),r=Object.keys(n);let i,a;for(i=0,a=r.length;i<a;i++){const o=r[i];o&&"undefined"!==o&&!t[o]&&(Ee(e,o,!1),delete n[o])}for(i=0,a=o.length;i<a;i++){const r=o[i],a=!!t[r];r&&"undefined"!==r&&n[r]!==a&&a&&(Ee(e,r,!0),n[r]=a)}return n}(e,n,o);if(n===o)return o;if("ref"===t)i||n(e);else if("on:"===t.slice(0,3)){const r=t.slice(3);o&&e.removeEventListener(r,o),n&&e.addEventListener(r,n)}else if("oncapture:"===t.slice(0,10)){const r=t.slice(10);o&&e.removeEventListener(r,o,!0),n&&e.addEventListener(r,n,!0)}else if("on"===t.slice(0,2)){const r=t.slice(2).toLowerCase(),i=fe.has(r);if(!i&&o){const t=Array.isArray(o)?o[0]:o;e.removeEventListener(r,t)}(i||n)&&(!function(e,t,n,o){if(o)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const o=n[0];e.addEventListener(t,n[0]=t=>o.call(e,n[1],t))}else e.addEventListener(t,n)}(e,r,n,i),i&&we([r]))}else if("attr:"===t.slice(0,5))xe(e,t.slice(5),n);else if((d="prop:"===t.slice(0,5))||(l=pe.has(t))||!r&&((c=function(e,t){const n=he[e];return"object"==typeof n?n[t]?n.$:void 0:n}(t,e.tagName))||(s=ue.has(t)))||(a=e.nodeName.includes("-")))d&&(t=t.slice(5),s=!0),"class"===t||"className"===t?ke(e,n):!a||s||l?e[c||t]=n:e[(u=t,u.toLowerCase().replace(/-([a-z])/g,((e,t)=>t.toUpperCase())))]=n;else{const o=r&&t.indexOf(":")>-1&&be[t.split(":")[0]];o?function(e,t,n,o){null==o?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,o)}(e,o,t,n):xe(e,ge[t]||t,n)}var u;return n}function Pe(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>n||document});n;){const o=n[t];if(o&&!n.disabled){const r=n[`${t}Data`];if(void 0!==r?o.call(n,r,e):o.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function Ie(e,t,n,o,r){for(;"function"==typeof n;)n=n();if(t===n)return n;const i=typeof t,a=void 0!==o;if(e=a&&n[0]&&n[0].parentNode||e,"string"===i||"number"===i)if("number"===i&&(t=t.toString()),a){let r=n[0];r&&3===r.nodeType?r.data=t:r=document.createTextNode(t),n=$e(e,n,o,r)}else n=""!==n&&"string"==typeof n?e.firstChild.data=t:e.textContent=t;else if(null==t||"boolean"===i)n=$e(e,n,o);else{if("function"===i)return T((()=>{let r=t();for(;"function"==typeof r;)r=r();n=Ie(e,r,n,o)})),()=>n;if(Array.isArray(t)){const i=[],s=n&&Array.isArray(n);if(Oe(i,t,n,r))return T((()=>n=Ie(e,i,n,o,!0))),()=>n;if(0===i.length){if(n=$e(e,n,o),a)return n}else s?0===n.length?Ae(e,i,o):function(e,t,n){let o=n.length,r=t.length,i=o,a=0,s=0,l=t[r-1].nextSibling,c=null;for(;a<r||s<i;)if(t[a]!==n[s]){for(;t[r-1]===n[i-1];)r--,i--;if(r===a){const t=i<o?s?n[s-1].nextSibling:n[i-s]:l;for(;s<i;)e.insertBefore(n[s++],t)}else if(i===s)for(;a<r;)c&&c.has(t[a])||t[a].remove(),a++;else if(t[a]===n[i-1]&&n[s]===t[r-1]){const o=t[--r].nextSibling;e.insertBefore(n[s++],t[a++].nextSibling),e.insertBefore(n[--i],o),t[r]=n[i]}else{if(!c){c=new Map;let e=s;for(;e<i;)c.set(n[e],e++)}const o=c.get(t[a]);if(null!=o)if(s<o&&o<i){let l,d=a,u=1;for(;++d<r&&d<i&&null!=(l=c.get(t[d]))&&l===o+u;)u++;if(u>o-s){const r=t[a];for(;s<o;)e.insertBefore(n[s++],r)}else e.replaceChild(n[s++],t[a++])}else a++;else t[a++].remove()}}else a++,s++}(e,n,i):(n&&$e(e),Ae(e,i));n=i}else if(t.nodeType){if(Array.isArray(n)){if(a)return n=$e(e,n,o,t);$e(e,n,null,t)}else null!=n&&""!==n&&e.firstChild?e.replaceChild(t,e.firstChild):e.appendChild(t);n=t}else console.warn("Unrecognized value. Skipped inserting",t)}return n}function Oe(e,t,n,o){let r=!1;for(let i=0,a=t.length;i<a;i++){let a,s=t[i],l=n&&n[i];if(null==s||!0===s||!1===s);else if("object"==(a=typeof s)&&s.nodeType)e.push(s);else if(Array.isArray(s))r=Oe(e,s,l)||r;else if("function"===a)if(o){for(;"function"==typeof s;)s=s();r=Oe(e,Array.isArray(s)?s:[s],Array.isArray(l)?l:[l])||r}else e.push(s),r=!0;else{const t=String(s);l&&3===l.nodeType&&l.data===t?e.push(l):e.push(document.createTextNode(t))}}return r}function Ae(e,t,n=null){for(let o=0,r=t.length;o<r;o++)e.insertBefore(t[o],n)}function $e(e,t,n,o){if(void 0===n)return e.textContent="";const r=o||document.createTextNode("");if(t.length){let o=!1;for(let i=t.length-1;i>=0;i--){const a=t[i];if(r!==a){const t=a.parentNode===e;o||i?t&&a.remove():t?e.replaceChild(r,a):e.insertBefore(r,n)}else o=!0}}else e.insertBefore(r,n);return[r]}function Re(e,t=!1){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}function Ne(e){const{useShadow:t}=e,n=document.createTextNode(""),o=A();let r;return S((()=>{r||(r=function(e,t){const n=m,o=y;m=e,y=null;try{return B(t,!0)}catch(e){G(e)}finally{m=n,y=o}}(o,(()=>E((()=>e.children)))));const i=e.mount||document.body;if(i instanceof HTMLHeadElement){const[e,t]=_(!1),n=()=>t(!0);k((t=>Se(i,(()=>e()?t():r()),null))),I(n)}else{const o=Re(e.isSVG?"g":"div",e.isSVG),a=t&&o.attachShadow?o.attachShadow({mode:"open"}):o;Object.defineProperty(o,"_$host",{get:()=>n.parentNode,configurable:!0}),Se(a,r),i.appendChild(o),e.ref&&e.ref(o),I((()=>i.removeChild(o)))}}),void 0,{render:!!!s.context}),n}function Le(e){const[t,n]=oe(e,["component"]),o=E((()=>t.component));return E((()=>{const e=o();switch(typeof e){case"function":return Object.assign(e,{[d]:!0}),C((()=>e(n)));case"string":const t=me.has(e),o=Re(e,t);return _e(o,n,t),o}}))}function De(e){return(t,n)=>{const{element:o}=n;return k((r=>{const i=function(e){const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const[r,i]=_(e[t[o]]);Object.defineProperty(n,t[o],{get:r,set(e){i((()=>e))}})}return n}(t);o.addPropertyChangedCallback(((e,t)=>i[e]=t)),o.addReleaseCallback((()=>{o.renderRoot.textContent="",r()}));const a=e(i,n);return Se(o.renderRoot,a)}),function(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&(!t.assignedSlot||!t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}(o))}}function Me(e,t,n){return 2===arguments.length&&(n=t,t={}),a(e,t)(De(n))}const Ue={typebot:void 0,onNewInputBlock:void 0,onAnswer:void 0,onEnd:void 0,onInit:void 0,onNewLogs:void 0,isPreview:void 0,startFrom:void 0,prefilledVariables:void 0,apiHost:void 0,resultId:void 0,sessionId:void 0},Be={...Ue,onClose:void 0,onOpen:void 0,theme:void 0,autoShowDelay:void 0,isOpen:void 0,defaultOpen:void 0},Fe={...Ue,onClose:void 0,onOpen:void 0,theme:void 0,previewMessage:void 0,onPreviewMessageClick:void 0,autoShowDelay:void 0};var je='/*! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-right-2{right:-8px}.-top-2{top:-8px}.bottom-5{bottom:20px}.left-0{left:0}.left-5{left:20px}.right-0{right:0}.right-2{right:8px}.right-5{right:20px}.top-0{top:0}.top-2{top:8px}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.m-2{margin:8px}.m-auto{margin:auto}.mx-4{margin-left:16px;margin-right:16px}.my-2{margin-bottom:8px;margin-top:8px}.-mr-1{margin-right:-4px}.-mt-1{margin-top:-4px}.ml-2{margin-left:8px}.mt-1{margin-top:4px}.mt-4{margin-top:16px}.\\!block{display:block!important}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.h-10{height:40px}.h-2{height:8px}.h-2\\.5{height:10px}.h-3{height:12px}.h-4{height:16px}.h-5{height:20px}.h-6{height:24px}.h-8{height:32px}.h-9{height:36px}.h-\\[56px\\]{height:56px}.h-\\[58px\\]{height:58px}.h-\\[80vh\\]{height:80vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-80{max-height:320px}.max-h-\\[464px\\]{max-height:464px}.min-h-full{min-height:100%}.w-10{width:40px}.w-2{width:8px}.w-3{width:12px}.w-4{width:16px}.w-5{width:20px}.w-6{width:24px}.w-8{width:32px}.w-\\[35px\\]{width:35px}.w-\\[58px\\]{width:58px}.w-\\[60\\%\\]{width:60%}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\\[250px\\]{min-width:250px}.max-w-\\[256px\\]{max-width:256px}.max-w-\\[350px\\]{max-width:350px}.max-w-\\[90\\%\\]{max-width:90%}.max-w-full{max-width:100%}.max-w-lg{max-width:512px}.max-w-xs{max-width:320px}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.-rotate-180{--tw-rotate:-180deg}.-rotate-180,.rotate-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate:0deg}.scale-0{--tw-scale-x:0;--tw-scale-y:0}.scale-0,.scale-100{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.animate-fade-in{animation:fade-in .3s ease-out}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:4px}.gap-2{gap:8px}.gap-3{gap:12px}.gap-4{gap:16px}.gap-6{gap:24px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-y-scroll{overflow-y:scroll}.scroll-smooth{scroll-behavior:smooth}.text-ellipsis{text-overflow:ellipsis}.whitespace-pre-wrap{white-space:pre-wrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:8px}.rounded-md{border-radius:6px}.border{border-width:1px}.border-2{border-width:2px}.border-dashed{border-style:dashed}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity))}.bg-\\[rgba\\(0\\2c 0\\2c 0\\2c 0\\.5\\)\\]{background-color:rgba(0,0,0,.5)}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-black\\/20{background-color:rgba(0,0,0,.2)}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity))}.bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity))}.bg-pink-400{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity:0.5}.fill-transparent{fill:transparent}.stroke-2{stroke-width:2}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\\.5{padding:2px}.p-1{padding:4px}.p-2{padding:8px}.p-3{padding:12px}.p-4{padding:16px}.p-\\[1px\\]{padding:1px}.px-2{padding-left:8px;padding-right:8px}.px-3{padding-left:12px;padding-right:12px}.px-4{padding-left:16px;padding-right:16px}.px-8{padding-left:32px;padding-right:32px}.px-\\[15px\\]{padding-left:15px;padding-right:15px}.py-1{padding-bottom:4px;padding-top:4px}.py-2{padding-bottom:8px;padding-top:8px}.py-4{padding-bottom:16px;padding-top:16px}.py-6{padding-bottom:24px;padding-top:24px}.py-\\[7px\\]{padding-bottom:7px;padding-top:7px}.pb-0{padding-bottom:0}.pl-2{padding-left:8px}.pl-4{padding-left:16px}.pr-1{padding-right:4px}.pr-2{padding-right:8px}.pr-4{padding-right:16px}.pt-10{padding-top:40px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-2xl{font-size:24px;line-height:32px}.text-4xl{font-size:36px;line-height:40px}.text-base{font-size:16px;line-height:24px}.text-sm{font-size:14px;line-height:20px}.text-xl{font-size:20px;line-height:28px}.text-xs{font-size:12px;line-height:16px}.font-bold{font-weight:700}.font-normal{font-weight:400}.font-semibold{font-weight:600}.italic{font-style:italic}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.blur{--tw-blur:blur(8px)}.blur,.brightness-150{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.brightness-150{--tw-brightness:brightness(1.5)}.brightness-200{--tw-brightness:brightness(2)}.brightness-200,.brightness-95{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.brightness-95{--tw-brightness:brightness(.95)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.scrollable-container::-webkit-scrollbar{display:none}.scrollable-container{-ms-overflow-style:none;scrollbar-width:none}.text-fade-in{transition:opacity .4s ease-in .2s}.bubble-typing{transition:width .4s ease-out,height .4s ease-out}.bubble1,.bubble2,.bubble3{background-color:var(--typebot-host-bubble-color);opacity:.5}.bubble1,.bubble2{animation:chatBubbles 1s ease-in-out infinite}.bubble2{animation-delay:.3s}.bubble3{animation:chatBubbles 1s ease-in-out infinite;animation-delay:.5s}@keyframes chatBubbles{0%{transform:translateY(2.5)}50%{transform:translateY(-2.5px)}to{transform:translateY(0)}}button,input,textarea{font-weight:300}a{text-decoration:underline}ol,ul{margin-inline-end:0;margin-inline-start:0;padding-inline-start:40px}ol{list-style-type:decimal}ul{list-style-type:disc}li:not(:last-child){margin-bottom:8px}pre{word-wrap:break-word;max-height:100%;max-width:100%;overflow:auto;overflow-wrap:break-word;white-space:pre-wrap}.slate-bold{font-weight:700}.slate-italic{font-style:oblique}.slate-underline{text-decoration:underline}.text-input::-moz-placeholder{color:var(--typebot-input-placeholder-color)!important;opacity:1!important}.text-input::placeholder{color:var(--typebot-input-placeholder-color)!important;opacity:1!important}.typebot-container{background-color:var(--typebot-container-bg-color);background-image:var(--typebot-container-bg-image);background-position:50%;background-size:cover;container-type:inline-size;font-family:var(--typebot-container-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"}.typebot-chat-view{-webkit-backdrop-filter:blur(var(--typebot-chat-container-blur));backdrop-filter:blur(var(--typebot-chat-container-blur));background-color:rgba(var(--typebot-chat-container-bg-rgb),var(--typebot-chat-container-opacity));border-color:rgba(var(--typebot-chat-container-border-rgb),var(--typebot-chat-container-border-opacity));border-width:var(--typebot-chat-container-border-width);box-shadow:var(--typebot-chat-container-box-shadow);color:rgb(var(--typebot-chat-container-color));max-width:var(--typebot-chat-container-max-width);min-height:100%;padding-left:20px;padding-right:20px}@container (min-width: 480px){.typebot-chat-view{border-radius:var(--typebot-chat-container-border-radius);max-height:var(--typebot-chat-container-max-height);min-height:var(--typebot-chat-container-max-height)}}.typebot-button{-webkit-backdrop-filter:blur(var(--typebot-button-blur));backdrop-filter:blur(var(--typebot-button-blur));background-color:rgba(var(--typebot-button-bg-rgb),var(--typebot-button-opacity));border-color:rgba(var(--typebot-button-border-rgb),var(--typebot-button-border-opacity));border-radius:var(--typebot-button-border-radius);border-width:var(--typebot-button-border-width);box-shadow:var(--typebot-button-box-shadow);color:var(--typebot-button-color);transition:all .3s ease}.typebot-selectable{background-color:rgba(var(--typebot-button-bg-rgb),calc(var(--selectable-alpha-ratio)*.08));border-color:rgba(var(--typebot-button-border-rgb),calc(var(--selectable-alpha-ratio)*.25));border-radius:var(--typebot-button-border-radius);border-width:var(--typebot-button-border-width);color:rgb(var(--typebot-chat-container-color));transition:all .3s ease}.typebot-selectable:hover{background-color:rgba(var(--typebot-button-bg-rgb),calc(var(--selectable-alpha-ratio)*.12));border-color:rgba(var(--typebot-button-border-rgb),calc(var(--selectable-alpha-ratio)*.3))}.typebot-selectable.selected{background-color:rgba(var(--typebot-button-bg-rgb),calc(var(--selectable-alpha-ratio)*.18));border-color:rgba(var(--typebot-button-border-rgb),calc(var(--selectable-alpha-ratio)*.35))}.typebot-checkbox{background-color:rgba(var(--typebot-checkbox-bg-rgb));border:1px solid rgba(var(--typebot-button-bg-rgb),var(--typebot-button-opacity));border-radius:var(--typebot-button-border-radius);border-radius:2px;color:var(--typebot-button-color);padding:1px;transition:all .3s ease}.typebot-checkbox.checked{background-color:rgb(var(--typebot-button-bg-rgb))}.typebot-host-bubble{color:var(--typebot-host-bubble-color)}.typebot-host-bubble>.bubble-typing{-webkit-backdrop-filter:blur(var(--typebot-host-bubble-blur));backdrop-filter:blur(var(--typebot-host-bubble-blur));background-color:rgba(var(--typebot-host-bubble-bg-rgb),var(--typebot-host-bubble-opacity));border-color:rgba(var(--typebot-host-bubble-border-rgb),var(--typebot-host-bubble-border-opacity));border-radius:var(--typebot-host-bubble-border-radius);border-width:var(--typebot-host-bubble-border-width);box-shadow:var(--typebot-host-bubble-box-shadow)}.typebot-host-bubble iframe,.typebot-host-bubble img,.typebot-host-bubble video{border-radius:6px}.typebot-guest-bubble{-webkit-backdrop-filter:blur(var(--typebot-guest-bubble-blur));backdrop-filter:blur(var(--typebot-guest-bubble-blur));background-color:rgba(var(--typebot-guest-bubble-bg-rgb),var(--typebot-guest-bubble-opacity));border-color:rgba(var(--typebot-guest-bubble-border-rgb),var(--typebot-guest-bubble-border-opacity));border-width:var(--typebot-guest-bubble-border-width);box-shadow:var(--typebot-guest-bubble-box-shadow);color:var(--typebot-guest-bubble-color)}.typebot-guest-bubble,.typebot-guest-bubble-image-attachment{border-radius:var(--typebot-guest-bubble-border-radius)}.typebot-input{-webkit-backdrop-filter:blur(var(--typebot-input-blur));backdrop-filter:blur(var(--typebot-input-blur));background-color:rgba(var(--typebot-input-bg-rgb),var(--typebot-input-opacity));border-color:rgba(var(--typebot-input-border-rgb),var(--typebot-input-border-opacity));border-radius:var(--typebot-input-border-radius);border-width:var(--typebot-input-border-width);box-shadow:var(--typebot-input-box-shadow);transition:filter .1s ease}.typebot-input,.typebot-input-error-message{color:var(--typebot-input-color)}.typebot-input-form .typebot-button{box-shadow:var(--typebot-input-box-shadow)}.typebot-button>.send-icon{fill:var(--typebot-button-color)}.ping span{background-color:rgb(var(--typebot-button-bg-rgb))}.rating-icon-container svg{stroke:rgb(var(--typebot-button-bg-rgb));fill:var(--typebot-host-bubble-bg-color);height:42px;transition:fill .1s ease-out;width:42px}.rating-icon-container.selected svg{fill:rgb(var(--typebot-button-bg-rgb))}.rating-icon-container:hover svg{filter:brightness(.9)}.rating-icon-container:active svg{filter:brightness(.75)}.upload-progress-bar{border-radius:var(--typebot-input-border-radius)}.total-files-indicator,.upload-progress-bar{background-color:rgb(var(--typebot-button-bg-rgb))}.total-files-indicator{color:var(--typebot-button-color);font-size:10px}.typebot-upload-input{border-radius:var(--typebot-input-border-radius);transition:border-color .1s ease-out}.typebot-upload-input.dragging-over{border-color:rgb(var(--typebot-button-bg-rgb))}.secondary-button{background-color:var(--typebot-host-bubble-bg-color);border-radius:var(--typebot-button-border-radius);color:var(--typebot-host-bubble-color)}.typebot-country-select{border-radius:var(--typebot-button-border-radius);color:var(--typebot-input-color)}.typebot-country-select,.typebot-date-input{background-color:var(--typebot-input-bg-color)}.typebot-date-input{color:var(--typebot-input-color);color-scheme:light}.typebot-date-input,.typebot-popup-blocked-toast{border-radius:var(--typebot-input-border-radius)}.typebot-picture-button{background-color:rgb(var(--typebot-button-bg-rgb));border-radius:var(--typebot-button-border-radius);color:var(--typebot-button-color);transition:all .3s ease;width:236px}.typebot-picture-button>img,.typebot-selectable-picture>img{border-radius:var(--typebot-button-border-radius) var(--typebot-button-border-radius) 0 0;height:100%;max-height:200px;min-width:200px;-o-object-fit:cover;object-fit:cover;width:100%}.typebot-picture-button.has-svg>img,.typebot-selectable-picture.has-svg>img{max-height:128px;-o-object-fit:contain;object-fit:contain;padding:1rem}.typebot-selectable-picture{background-color:rgba(var(--typebot-button-bg-rgb),calc(var(--selectable-alpha-ratio)*.08));border:1px solid rgba(var(--typebot-button-bg-rgb),calc(var(--selectable-alpha-ratio)*.25));border-radius:var(--typebot-button-border-radius);color:rgb(var(--typebot-chat-container-color));transition:all .3s ease;width:236px}.typebot-selectable-picture:hover{background-color:rgba(var(--typebot-button-bg-rgb),calc(var(--selectable-alpha-ratio)*.12));border-color:rgba(var(--typebot-button-bg-rgb),calc(var(--selectable-alpha-ratio)*.3))}.typebot-selectable-picture.selected{background-color:rgba(var(--typebot-button-bg-rgb),calc(var(--selectable-alpha-ratio)*.18));border-color:rgba(var(--typebot-button-bg-rgb),calc(var(--selectable-alpha-ratio)*.35))}select option{background-color:var(--typebot-input-bg-color);color:var(--typebot-input-color)}.typebot-progress-bar-container{background-color:rgba(var(--typebot-progress-bar-bg-rgb),calc(var(--selectable-alpha-ratio)*.12));bottom:var(--typebot-progress-bar-bottom);height:var(--typebot-progress-bar-height);left:0;position:var(--typebot-progress-bar-position);top:var(--typebot-progress-bar-top);width:100%;z-index:42424242}.typebot-progress-bar-container>.typebot-progress-bar{background-color:var(--typebot-progress-bar-color);height:100%;position:absolute;transition:width .25s ease}.typebot-recorder .left-gradient{background-image:linear-gradient(to right,rgba(var(--typebot-input-bg-rgb),1),rgba(var(--typebot-input-bg-rgb),0))}.typebot-recorder .right-gradient{background-image:linear-gradient(to left,rgba(var(--typebot-input-bg-rgb),1),rgba(var(--typebot-input-bg-rgb),0))}.typebot-recorder button{background-color:rgba(var(--typebot-button-bg-rgb),.3);color:rgba(var(--typebot-button-bg-rgb))}@keyframes fadeInFromTop{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeOutFromTop{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-4px)}}@keyframes fadeInFromBottom{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeOutFromBottom{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}[data-scope=menu][data-part=content]{-webkit-backdrop-filter:blur(var(--typebot-input-blur));backdrop-filter:blur(var(--typebot-input-blur));border-color:rgba(var(--typebot-input-border-rgb),var(--typebot-input-border-opacity));border-width:var(--typebot-input-border-width);box-shadow:var(--typebot-input-box-shadow);color:var(--typebot-input-color)}[data-scope=menu][data-part=content],[data-scope=menu][data-part=item]{background-color:rgba(var(--typebot-input-bg-rgb),var(--typebot-input-opacity));border-radius:var(--typebot-input-border-radius)}[data-scope=menu][data-part=item]{cursor:pointer}[data-scope=menu][data-part=content][data-state=open]{animation:fadeInFromTop .15s ease-out forwards}[data-scope=menu][data-part=content][data-state=closed]{animation:fadeOutFromTop 50ms ease-out forwards}[data-scope=toast][data-part=group]{width:100%}[data-scope=toast][data-part=root]{background-color:rgba(var(--typebot-input-bg-rgb),var(--typebot-input-opacity));border-radius:var(--typebot-chat-container-border-radius);box-shadow:var(--typebot-input-box-shadow);color:var(--typebot-input-color);display:flex;flex-direction:column;gap:4px;max-width:60vw;padding:16px 32px 16px 16px}[data-scope=toast][data-part=title]{font-weight:600}[data-scope=toast][data-part=description]{font-size:14px;line-height:20px}[data-scope=toast][data-part=root][data-state=open]{animation:fadeInFromBottom .15s ease-out forwards}[data-scope=toast][data-part=root][data-state=closed]{animation:fadeOutFromBottom 50ms ease-out forwards}[data-scope=progress][data-part=root]{height:100%;width:100%}[data-scope=progress][data-part=circle]{--size:40px;--thickness:4px;--radius:18px;--circomference:113.09724px}[data-scope=progress][data-part=circle-range]{stroke:#fff;--transition-prop:stroke-dasharray,stroke,stroke-dashoffset;--transition-duration:0.2s;transition-duration:.2s;transition-property:stroke-dasharray,stroke,stroke-dashoffset}[data-scope=progress][data-part=circle-track]{stroke:rgba(0,0,0,.5)}.hover\\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\\:brightness-90:hover{--tw-brightness:brightness(.9)}.hover\\:brightness-90:hover,.hover\\:brightness-95:hover{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.hover\\:brightness-95:hover{--tw-brightness:brightness(.95)}.hover\\:backdrop-brightness-95:hover{--tw-backdrop-brightness:brightness(.95);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.active\\:scale-95:active{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\\:brightness-75:active{--tw-brightness:brightness(.75)}.active\\:brightness-75:active,.active\\:brightness-90:active{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.active\\:brightness-90:active{--tw-brightness:brightness(.9)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:brightness-100:disabled{--tw-brightness:brightness(1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.group:hover .group-hover\\:opacity-100{opacity:1}.data-\\[state\\=open\\]\\:backdrop-brightness-90[data-state=open]{--tw-backdrop-brightness:brightness(.9);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}@media (min-width:640px){.sm\\:right-5{right:20px}.sm\\:my-8{margin-bottom:32px;margin-top:32px}.sm\\:p-0{padding:0}.sm\\:opacity-0{opacity:0}}';const ze=async e=>{let t;try{const n="string"==typeof e?e:e.url;t=await fetch(n,{method:"string"==typeof e?"GET":e.method,mode:"cors",headers:"string"!=typeof e&&He(e.body)?{"Content-Type":"application/json"}:void 0,body:"string"!=typeof e&&He(e.body)?JSON.stringify(e.body):void 0});const o=await t.json();if(!t.ok)throw"error"in o?o.error:o;return{data:o,response:t}}catch(e){return console.error(e),{error:e,response:t}}},He=e=>null!=e,Ve=e=>null==e,Ge=e=>null==e||""===e,We=e=>null!=e&&""!==e,qe=e=>e?.startsWith("data:image/svg")||e?.endsWith(".svg"),Ke=e=>{e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,((e,t,n,o)=>t+t+n+n+o+o));const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:[0,0,0]},Ye=e=>(([e,t,n])=>(299*e+587*t+114*n)/1e3>155)(Ke(e));function Xe(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Xe(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function Ze(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=Xe(e))&&(o&&(o+=" "),o+=t);return o}const Je=ve('<svg part="button-icon" viewBox="0 0 24 24"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z">'),Qe=ve('<img part="button-icon" alt="Bubble button icon">'),et=ve('<span part="button-icon">'),tt=ve('<svg part="button-icon" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M18.601 8.39897C18.269 8.06702 17.7309 8.06702 17.3989 8.39897L12 13.7979L6.60099 8.39897C6.26904 8.06702 5.73086 8.06702 5.39891 8.39897C5.06696 8.73091 5.06696 9.2691 5.39891 9.60105L11.3989 15.601C11.7309 15.933 12.269 15.933 12.601 15.601L18.601 9.60105C18.9329 9.2691 18.9329 8.73091 18.601 8.39897Z">'),nt=ve('<img part="button-icon" alt="Bubble button close icon">'),ot=ve('<button part="button" aria-label="Open chatbot">'),rt="#0042DA",it="#27272A",at="#fff",st=e=>e.startsWith("http")||e.startsWith("data:image/svg+xml"),lt=e=>(()=>{const t=ot();return t.$$click=()=>e.toggleBot(),t.style.setProperty("z-index","42424242"),Se(t,Z(le,{get when(){return Ve(e.customIconSrc)},keyed:!0,get children(){const t=Je();return T((n=>{const o=e.iconColor??(Ye(e.backgroundColor??rt)?it:at),r=Ze("stroke-2 fill-transparent absolute duration-200 transition w-[60%]",e.isBotOpened?"scale-0 opacity-0":"scale-100 opacity-100");return o!==n._v$&&(null!=(n._v$=o)?t.style.setProperty("stroke",o):t.style.removeProperty("stroke")),r!==n._v$2&&xe(t,"class",n._v$2=r),n}),{_v$:void 0,_v$2:void 0}),t}}),null),Se(t,Z(le,{get when(){return E((()=>!!e.customIconSrc))()&&st(e.customIconSrc)},get children(){const t=Qe();return T((n=>{const o=e.customIconSrc,r=Ze("duration-200 transition",e.isBotOpened?"scale-0 opacity-0":"scale-100 opacity-100",qe(e.customIconSrc)?"w-[60%]":"w-full h-full",qe(e.customIconSrc)?"":"object-cover rounded-full");return o!==n._v$3&&xe(t,"src",n._v$3=o),r!==n._v$4&&ke(t,n._v$4=r),n}),{_v$3:void 0,_v$4:void 0}),t}}),null),Se(t,Z(le,{get when(){return E((()=>!!e.customIconSrc))()&&!st(e.customIconSrc)},get children(){const t=et();return t.style.setProperty("font-family","-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'"),Se(t,(()=>e.customIconSrc)),T((()=>ke(t,Ze("text-4xl duration-200 transition",e.isBotOpened?"scale-0 opacity-0":"scale-100 opacity-100")))),t}}),null),Se(t,Z(le,{get when(){return Ve(e.customCloseIconSrc)},get children(){const t=tt();return T((n=>{const o=e.iconColor??(Ye(e.backgroundColor??rt)?it:at),r=Ze("absolute duration-200 transition w-[60%]",e.isBotOpened?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-180 opacity-0");return o!==n._v$5&&(null!=(n._v$5=o)?t.style.setProperty("fill",o):t.style.removeProperty("fill")),r!==n._v$6&&xe(t,"class",n._v$6=r),n}),{_v$5:void 0,_v$6:void 0}),t}}),null),Se(t,Z(le,{get when(){return E((()=>!!e.customCloseIconSrc))()&&st(e.customCloseIconSrc)},get children(){const t=nt();return T((n=>{const o=e.customCloseIconSrc,r=Ze("absolute duration-200 transition",e.isBotOpened?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-180 opacity-0",qe(e.customCloseIconSrc)?"w-[60%]":"w-full h-full",qe(e.customCloseIconSrc)?"":"object-cover rounded-full");return o!==n._v$7&&xe(t,"src",n._v$7=o),r!==n._v$8&&ke(t,n._v$8=r),n}),{_v$7:void 0,_v$8:void 0}),t}}),null),Se(t,Z(le,{get when(){return E((()=>!!e.customCloseIconSrc))()&&!st(e.customCloseIconSrc)},get children(){const t=et();return t.style.setProperty("font-family","-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'"),Se(t,(()=>e.customCloseIconSrc)),T((()=>ke(t,Ze("absolute text-4xl duration-200 transition",e.isBotOpened?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-180 opacity-0")))),t}}),null),T((n=>{const o=Ze("fixed bottom-5 shadow-md rounded-full hover:scale-110 active:scale-95 transition-transform duration-200 flex justify-center items-center animate-fade-in","left"===e.placement?" left-5":" right-5"),r=e.backgroundColor??rt,i=e.buttonSize,a=e.buttonSize;return o!==n._v$9&&ke(t,n._v$9=o),r!==n._v$10&&(null!=(n._v$10=r)?t.style.setProperty("background-color",r):t.style.removeProperty("background-color")),i!==n._v$11&&(null!=(n._v$11=i)?t.style.setProperty("width",i):t.style.removeProperty("width")),a!==n._v$12&&(null!=(n._v$12=a)?t.style.setProperty("height",a):t.style.removeProperty("height")),n}),{_v$9:void 0,_v$10:void 0,_v$11:void 0,_v$12:void 0}),t})();we(["click"]);const ct=ve('<div part="preview-message"><p>'),dt=ve('<img class="rounded-full w-8 h-8 object-cover" alt="Bot avatar" elementtiming="Bot avatar" fetchpriority="high">'),ut=ve('<button part="preview-message-close-button" aria-label="Close"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18">'),pt="#F7F8FF",gt="#303235",ht=e=>{const[t,n]=_(!1),[o,r]=_({x:0,y:0}),i=e=>{r({x:e.touches[0].clientX,y:e.touches[0].clientY})},a=t=>{const n=t.changedTouches[0].clientX,i=t.changedTouches[0].clientY;(Math.abs(n-o().x)>10||i-o().y>10)&&e.onCloseClick(),r({x:0,y:0})};return(()=>{const o=ct(),r=o.firstChild;return o.$$touchend=a,o.$$touchstart=i,o.addEventListener("mouseleave",(()=>n(!1))),o.addEventListener("mouseenter",(()=>n(!0))),o.$$click=()=>e.onClick(),o.style.setProperty("z-index","42424242"),Se(o,Z(ft,{get isHovered(){return t()},get previewMessageTheme(){return e.previewMessageTheme},get onClick(){return e.onCloseClick}}),r),Se(o,Z(le,{get when(){return e.avatarUrl},keyed:!0,children:e=>(()=>{const t=dt();return xe(t,"src",e),t})()}),r),Se(r,(()=>e.message)),T((t=>{const n="fixed max-w-[256px] rounded-md duration-200 flex items-center gap-4 shadow-md animate-fade-in cursor-pointer hover:shadow-lg p-4"+("left"===e.placement?" left-5":" right-5"),r=e.previewMessageTheme?.backgroundColor??pt,i=e.previewMessageTheme?.textColor??gt,a=`calc(${e.buttonSize} + 32px)`;return n!==t._v$&&ke(o,t._v$=n),r!==t._v$2&&(null!=(t._v$2=r)?o.style.setProperty("background-color",r):o.style.removeProperty("background-color")),i!==t._v$3&&(null!=(t._v$3=i)?o.style.setProperty("color",i):o.style.removeProperty("color")),a!==t._v$4&&(null!=(t._v$4=a)?o.style.setProperty("bottom",a):o.style.removeProperty("bottom")),t}),{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),o})()},ft=e=>(()=>{const t=ut();return t.$$click=t=>(t.stopPropagation(),e.onClick()),T((n=>{const o="absolute -top-2 -right-2 rounded-full w-6 h-6 p-1 hover:brightness-95 active:brightness-90 transition-all border "+(e.isHovered?"opacity-100":"opacity-0"),r=e.previewMessageTheme?.closeButtonBackgroundColor??pt,i=e.previewMessageTheme?.closeButtonIconColor??gt;return o!==n._v$5&&ke(t,n._v$5=o),r!==n._v$6&&(null!=(n._v$6=r)?t.style.setProperty("background-color",r):t.style.removeProperty("background-color")),i!==n._v$7&&(null!=(n._v$7=i)?t.style.setProperty("color",i):t.style.removeProperty("color")),n}),{_v$5:void 0,_v$6:void 0,_v$7:void 0}),t})();we(["click","touchstart","touchend"]);const mt=ve('<svg viewBox="0 0 800 800" width="16"><rect width="800" height="800" rx="80" fill="#0042DA"></rect><rect x="650" y="293" width="85.4704" height="384.617" rx="20" transform="rotate(90 650 293)" fill="#FF8E20"></rect><path fill-rule="evenodd" clip-rule="evenodd" d="M192.735 378.47C216.337 378.47 235.47 359.337 235.47 335.735C235.47 312.133 216.337 293 192.735 293C169.133 293 150 312.133 150 335.735C150 359.337 169.133 378.47 192.735 378.47Z" fill="#FF8E20"></path><rect x="150" y="506.677" width="85.4704" height="384.617" rx="20" transform="rotate(-90 150 506.677)" fill="white"></rect><path fill-rule="evenodd" clip-rule="evenodd" d="M607.265 421.206C583.663 421.206 564.53 440.34 564.53 463.942C564.53 487.544 583.663 506.677 607.265 506.677C630.867 506.677 650 487.544 650 463.942C650 440.34 630.867 421.206 607.265 421.206Z" fill="white">'),bt=()=>mt(),yt=ve('<a href="https://quick.bot/?utm_source=litebadge" target="_blank" rel="noopener noreferrer" class="lite-badge" id="lite-badge"><span>Made with Typebot'),vt=e=>{let t,n;const o=n=>{n.forEach((n=>{n.removedNodes.forEach((n=>{"id"in n&&t&&"lite-badge"==n.id&&(console.log("Sorry, you can't remove the brand 😅"),e.botContainer?.append(t))}))}))};return P((()=>{document&&e.botContainer&&(n=new MutationObserver(o),n.observe(e.botContainer,{subtree:!1,childList:!0}))})),I((()=>{n&&n.disconnect()})),(()=>{const e=yt(),n=e.firstChild;return"function"==typeof t?Te(t,e):t=e,Se(e,Z(bt,{}),n),e})()},wt=(e,t)=>"undefined"!=typeof window?window.__ENV?window.__ENV[e]??t:void 0:"undefined"!=typeof process?process.env[e]??t:void 0,xt=({ignoreChatApiUrl:e}={ignoreChatApiUrl:!1})=>{const t=wt("NEXT_PUBLIC_CHAT_API_URL"),n=wt("NEXT_PUBLIC_USE_EXPERIMENTAL_CHAT_API_ON")?.split(",");if(!e&&t&&(!n||n.some((e=>e===window.location.href))))return t;const o=wt("NEXT_PUBLIC_VIEWER_URL")?.split(","),r=o?.find((e=>window.location.href.startsWith(e)));return r??o?.[0]??"https://quick.bot"},kt=()=>sessionStorage.getItem("typebotPaymentInProgress"),_t=()=>{sessionStorage.removeItem("typebotPaymentInProgress")};class Tt extends Error{constructor(e,t,n){const o=`${e.status||0===e.status?e.status:""} ${e.statusText||""}`.trim();super(`Request failed with ${o?`status code ${o}`:"an unknown error"}`),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="HTTPError",this.response=e,this.request=t,this.options=n}}class St extends Error{constructor(e){super("Request timed out"),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.request=e}}const Et=e=>null!==e&&"object"==typeof e,Ct=(...e)=>{for(const t of e)if((!Et(t)||Array.isArray(t))&&void 0!==t)throw new TypeError("The `options` argument must be an object");return It({},...e)},Pt=(e={},t={})=>{const n=new globalThis.Headers(e),o=t instanceof globalThis.Headers,r=new globalThis.Headers(t);for(const[e,t]of r.entries())o&&"undefined"===t||void 0===t?n.delete(e):n.set(e,t);return n},It=(...e)=>{let t={},n={};for(const o of e)if(Array.isArray(o))Array.isArray(t)||(t=[]),t=[...t,...o];else if(Et(o)){for(let[e,n]of Object.entries(o))Et(n)&&e in t&&(n=It(t[e],n)),t={...t,[e]:n};Et(o.headers)&&(n=Pt(n,o.headers),t.headers=n)}return t},Ot=(()=>{let e=!1,t=!1;const n="function"==typeof globalThis.ReadableStream,o="function"==typeof globalThis.Request;return n&&o&&(t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")),e&&!t})(),At="function"==typeof globalThis.AbortController,$t="function"==typeof globalThis.ReadableStream,Rt="function"==typeof globalThis.FormData,Nt=["get","post","put","patch","head","delete"],Lt={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Dt=2147483647,Mt=Symbol("stop"),Ut={json:!0,parseJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,fetch:!0},Bt={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},Ft=e=>Nt.includes(e)?e.toUpperCase():e,jt=[413,429,503],zt={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:jt,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},Ht=(e={})=>{if("number"==typeof e)return{...zt,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...zt,...e,afterStatusCodes:jt}};class Vt{static create(e,t){const n=new Vt(e,t),o=async()=>{if("number"==typeof n._options.timeout&&n._options.timeout>Dt)throw new RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let e=await n._fetch();for(const t of n._options.hooks.afterResponse){const o=await t(n.request,n._options,n._decorateResponse(e.clone()));o instanceof globalThis.Response&&(e=o)}if(n._decorateResponse(e),!e.ok&&n._options.throwHttpErrors){let t=new Tt(e,n.request,n._options);for(const e of n._options.hooks.beforeError)t=await e(t);throw t}if(n._options.onDownloadProgress){if("function"!=typeof n._options.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!$t)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return n._stream(e.clone(),n._options.onDownloadProgress)}return e},r=n._options.retry.methods.includes(n.request.method.toLowerCase())?n._retry(o):o();for(const[e,o]of Object.entries(Lt))r[e]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||o);const i=(await r).clone();if("json"===e){if(204===i.status)return"";if(0===(await i.clone().arrayBuffer()).byteLength)return"";if(t.parseJson)return t.parseJson(await i.text())}return i[e]()};return r}constructor(e,t={}){Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"abortController",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_retryCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._input=e;const n=this._input instanceof Request&&"credentials"in Request.prototype?this._input.credentials:void 0;if(this._options={...n&&{credentials:n},...t,headers:Pt(this._input.headers,t.headers),hooks:It({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},t.hooks),method:Ft(t.method??this._input.method),prefixUrl:String(t.prefixUrl||""),retry:Ht(t.retry),throwHttpErrors:!1!==t.throwHttpErrors,timeout:t.timeout??1e4,fetch:t.fetch??globalThis.fetch.bind(globalThis)},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(At){if(this.abortController=new globalThis.AbortController,this._options.signal){const e=this._options.signal;this._options.signal.addEventListener("abort",(()=>{this.abortController.abort(e.reason)}))}this._options.signal=this.abortController.signal}if(Ot&&(this._options.duplex="half"),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const e="?"+("string"==typeof this._options.searchParams?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),t=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,e);!(Rt&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)||this._options.headers&&this._options.headers["content-type"]||this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(t,{...this.request}),this._options)}void 0!==this._options.json&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type",this._options.headers.get("content-type")??"application/json"),this.request=new globalThis.Request(this.request,{body:this._options.body}))}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount<=this._options.retry.limit&&!(e instanceof St)){if(e instanceof Tt){if(!this._options.retry.statusCodes.includes(e.response.status))return 0;const t=e.response.headers.get("Retry-After");if(t&&this._options.retry.afterStatusCodes.includes(e.response.status)){let e=Number(t);return Number.isNaN(e)?e=Date.parse(t)-Date.now():e*=1e3,void 0!==this._options.retry.maxRetryAfter&&e>this._options.retry.maxRetryAfter?0:e}if(413===e.response.status)return 0}const t=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,t)}return 0}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(t){const n=Math.min(this._calculateRetryDelay(t),Dt);if(0!==n&&this._retryCount>0){await async function(e,{signal:t}){return new Promise(((n,o)=>{function r(){clearTimeout(i),o(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",r,{once:!0}));const i=setTimeout((()=>{t?.removeEventListener("abort",r),n()}),e)}))}(n,{signal:this._options.signal});for(const e of this._options.hooks.beforeRetry){if(await e({request:this.request,options:this._options,error:t,retryCount:this._retryCount})===Mt)return}return this._retry(e)}throw t}}async _fetch(){for(const e of this._options.hooks.beforeRequest){const t=await e(this.request,this._options);if(t instanceof Request){this.request=t;break}if(t instanceof Response)return t}const e=((e,t)=>{const n={};for(const o in t)o in Bt||o in Ut||o in e||(n[o]=t[o]);return n})(this.request,this._options);return!1===this._options.timeout?this._options.fetch(this.request.clone(),e):async function(e,t,n,o){return new Promise(((r,i)=>{const a=setTimeout((()=>{n&&n.abort(),i(new St(e))}),o.timeout);o.fetch(e,t).then(r).catch(i).then((()=>{clearTimeout(a)}))}))}(this.request.clone(),e,this.abortController,this._options)}_stream(e,t){const n=Number(e.headers.get("content-length"))||0;let o=0;return 204===e.status?(t&&t({percent:1,totalBytes:n,transferredBytes:o},new Uint8Array),new globalThis.Response(null,{status:e.status,statusText:e.statusText,headers:e.headers})):new globalThis.Response(new globalThis.ReadableStream({async start(r){const i=e.body.getReader();t&&t({percent:0,transferredBytes:0,totalBytes:n},new Uint8Array),await async function e(){const{done:a,value:s}=await i.read();if(a)r.close();else{if(t){o+=s.byteLength;t({percent:0===n?0:o/n,transferredBytes:o,totalBytes:n},s)}r.enqueue(s),await e()}}()}}),{status:e.status,statusText:e.statusText,headers:e.headers})}}
3
3
  /*! MIT License © Sindre Sorhus */const Gt=e=>{const t=(t,n)=>Vt.create(t,Ct(e,n));for(const n of Nt)t[n]=(t,o)=>Vt.create(t,Ct(e,o,{method:n}));return t.create=e=>Gt(Ct(e)),t.extend=t=>Gt(Ct(e,t)),t.stop=Mt,t};var Wt=Gt();class qt extends Error{constructor(e){super("This bot can only be executed on "+e)}}const[Kt,Yt]=_(),Xt=ve('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="19px" color="white"><path d="M476.59 227.05l-.16-.07L49.35 49.84A23.56 23.56 0 0027.14 52 24.65 24.65 0 0016 72.59v113.29a24 24 0 0019.52 23.57l232.93 43.07a4 4 0 010 7.86L35.53 303.45A24 24 0 0016 327v113.31A23.57 23.57 0 0026.59 460a23.94 23.94 0 0013.22 4 24.55 24.55 0 009.52-1.93L476.4 285.94l.19-.09a32 32 0 000-58.8z">'),Zt=e=>(()=>{const t=Xt();return _e(t,e,!0,!0),t})(),Jt=ve('<svg><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z">'),Qt=e=>(()=>{const t=Jt();return _e(t,ne(e,{get class(){return"animate-spin h-6 w-6 "+e.class},xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","data-testid":"loading-spinner"}),!0,!0),t})(),en=ve("<button>"),tn=e=>{const t=R((()=>e.children)),[n,o]=oe(e,["disabled","class"]);return(()=>{const r=en();return _e(r,ne(o,{get disabled(){return e.isDisabled||e.isLoading},get class(){return"py-2 px-4 font-semibold focus:outline-none filter hover:brightness-90 active:brightness-75 disabled:opacity-50 disabled:cursor-not-allowed disabled:brightness-100 flex justify-center"+("secondary"===e.variant?" secondary-button":" typebot-button")+" "+n.class}}),!1,!0),Se(r,Z(le,{get when(){return!e.isLoading},get fallback(){return Z(Qt,{})},get children(){return t()}})),r})()},nn=e=>{const[t,n]=oe(e,["disableIcon"]),o=Kt()&&!t.disableIcon||!e.children||"string"==typeof e.children&&Ge(e.children);return Z(tn,ne({type:"submit"},n,{get class(){return Ze("flex items-center",e.class)},"aria-label":o?"Send":void 0,get children(){return Z(ce,{get children(){return[Z(de,{when:o,get children(){return Z(Zt,{get class(){return"send-icon flex w-6 h-6 "+(t.disableIcon?"hidden":"")}})}}),Z(de,{when:!o,get children(){return e.children}})]}})}}))},on=ve('<div class="flex items-center gap-1"><div class="w-2 h-2 rounded-full bubble1"></div><div class="w-2 h-2 rounded-full bubble2"></div><div class="w-2 h-2 rounded-full bubble3">'),rn=()=>on(),an=ve('<input class="focus:outline-none bg-transparent px-4 py-4 flex-1 w-full text-input" type="text">'),sn=e=>{const[t,n]=oe(e,["ref","onInput"]);return(()=>{const o=an();o.$$input=e=>t.onInput(e.currentTarget.value);const r=e.ref;return"function"==typeof r?Te(r,o):e.ref=o,o.style.setProperty("font-size","16px"),_e(o,n,!1,!1),o})()};we(["input"]);const ln=ve('<textarea class="focus:outline-none bg-transparent px-4 py-4 flex-1 w-full text-input" rows="6" data-testid="textarea" required>'),cn=e=>{const[t,n]=oe(e,["ref","onInput"]);return(()=>{const e=ln();e.$$input=e=>t.onInput(e.currentTarget.value);const o=t.ref;return"function"==typeof o?Te(o,e):t.ref=e,e.style.setProperty("font-size","16px"),_e(e,ne({get autofocus(){return!Kt()}},n),!1,!1),e})()};we(["input"]);const dn=!0,un=ve('<div><div class="flex w-full items-center"><div class="flex relative z-10 items-start typebot-host-bubble max-w-full"><div class="flex items-center absolute px-4 py-2 bubble-typing z-10 "></div><audio controls>');let pn;const gn=e=>{let t,n,o=!1;const[r,i]=_(!!e.onTransitionEnd);return P((()=>{pn=setTimeout((()=>{o||(o=!0,i(!1),setTimeout((()=>e.onTransitionEnd?.(t)),400))}),100)})),I((()=>{pn&&clearTimeout(pn)})),(()=>{const o=un(),i=o.firstChild.firstChild.firstChild,a=i.nextSibling;"function"==typeof t?Te(t,o):t=o,Se(i,(()=>{const e=E((()=>!!r()));return()=>e()&&Z(rn,{})})());return"function"==typeof n?Te(n,a):n=a,T((t=>{const n=Ze("flex flex-col",e.onTransitionEnd?"animate-fade-in":void 0),s=r()?"64px":"100%",l=r()?"32px":"100%",c=e.content?.url,d=!!e.onTransitionEnd&&(e.content?.isAutoplayEnabled??dn),u="z-10 text-fade-in "+(r()?"opacity-0":"opacity-100 m-2"),p=r()?Kt()?"32px":"36px":"revert";return n!==t._v$&&ke(o,t._v$=n),s!==t._v$2&&(null!=(t._v$2=s)?i.style.setProperty("width",s):i.style.removeProperty("width")),l!==t._v$3&&(null!=(t._v$3=l)?i.style.setProperty("height",l):i.style.removeProperty("height")),c!==t._v$4&&xe(a,"src",t._v$4=c),d!==t._v$5&&(a.autoplay=t._v$5=d),u!==t._v$6&&ke(a,t._v$6=u),p!==t._v$7&&(null!=(t._v$7=p)?a.style.setProperty("height",p):a.style.removeProperty("height")),t}),{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0,_v$7:void 0}),o})()},hn=400,fn=ve('<div><div class="flex w-full items-center"><div class="flex relative z-10 items-start typebot-host-bubble w-full max-w-full"><div class="flex items-center absolute px-4 py-2 bubble-typing z-10 "></div><div><iframe id="embed-bubble-content" class="w-full h-full ">');let mn;const bn=e=>{let t;const[n,o]=_(!!e.onTransitionEnd),r=t=>{e.content?.waitForEvent?.isEnabled&&We(t.data.name)&&t.data.name===e.content?.waitForEvent.name&&(e.onCompleted?.(e.content.waitForEvent.saveDataInVariableId&&t.data.data?{type:"text",value:t.data.data}:void 0),window.removeEventListener("message",r))};return P((()=>{mn=setTimeout((()=>{o(!1),e.content?.waitForEvent?.isEnabled&&window.addEventListener("message",r),setTimeout((()=>{e.onTransitionEnd?.(t)}),400)}),2e3)})),I((()=>{mn&&clearTimeout(mn),window.removeEventListener("message",r)})),(()=>{const o=fn(),r=o.firstChild.firstChild.firstChild,i=r.nextSibling,a=i.firstChild;return"function"==typeof t?Te(t,o):t=o,Se(r,(()=>{const e=E((()=>!!n()));return()=>e()&&Z(rn,{})})()),T((t=>{const s=Ze("flex flex-col w-full",e.onTransitionEnd?"animate-fade-in":void 0),l=n()?"64px":"100%",c=n()?"32px":"100%",d=Ze("p-4 z-20 text-fade-in w-full",n()?"opacity-0":"opacity-100 p-4"),u=n()?Kt()?"32px":"36px":`${e.content?.height??hn}px`,p=e.content?.url;return s!==t._v$&&ke(o,t._v$=s),l!==t._v$2&&(null!=(t._v$2=l)?r.style.setProperty("width",l):r.style.removeProperty("width")),c!==t._v$3&&(null!=(t._v$3=c)?r.style.setProperty("height",c):r.style.removeProperty("height")),d!==t._v$4&&ke(i,t._v$4=d),u!==t._v$5&&(null!=(t._v$5=u)?i.style.setProperty("height",u):i.style.removeProperty("height")),p!==t._v$6&&xe(a,"src",t._v$6=p),t}),{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0}),o})()},yn=e=>"string"==typeof e?e:e instanceof Error?e.name+": "+e.message:JSON.stringify(e),vn=Object.getPrototypeOf((async function(){})).constructor,wn=async({content:e,args:t})=>{try{const n=vn(...t.map((e=>e.id)),xn(e));await n(...t.map((e=>e.value)))}catch(e){return{logs:[{status:"error",description:"Script block failed to execute",details:yn(e)}]}}},xn=e=>e.replace(/<script>/g,"").replace(/<\/script>/g,""),kn=async({args:e,content:t})=>{try{const n=vn(...Object.keys(e),t);await n(...Object.keys(e).map((t=>e[t])))}catch(e){console.warn("Script threw an error:",e)}},[_n,Tn]=_("100%"),Sn=ve('<div><div class="flex w-full items-center"><div class="flex relative z-10 items-start typebot-host-bubble w-full max-w-full"><div class="flex items-center absolute px-4 py-2 bubble-typing z-10 "></div><div><div class="w-full overflow-y-auto">');let En;const Cn=e=>{let t;const[n,o]=_(!!e.onTransitionEnd);let r;return P((()=>{kn({args:{...e.content.initFunction.args,typebotElement:r},content:e.content.initFunction.content}),e.content.waitForEventFunction&&kn({args:{...e.content.waitForEventFunction.args,continueFlow:t=>e.onCompleted(t?{type:"text",value:t}:void 0)},content:e.content.waitForEventFunction.content}),En=setTimeout((()=>{o(!1),setTimeout((()=>e.onTransitionEnd?.(t)),400)}),2e3)})),I((()=>{En&&clearTimeout(En)})),(()=>{const o=Sn(),i=o.firstChild.firstChild.firstChild,a=i.nextSibling,s=a.firstChild;"function"==typeof t?Te(t,o):t=o,Se(i,(()=>{const e=E((()=>!!n()));return()=>e()&&Z(rn,{})})());return"function"==typeof r?Te(r,s):r=s,T((t=>{const r=Ze("flex flex-col w-full",e.onTransitionEnd?"animate-fade-in":void 0),l=n()?"64px":"100%",c=n()?"32px":"100%",d=Ze("p-2 z-20 text-fade-in w-full",n()?"opacity-0":"opacity-100"),u=n()?Kt()?"32px":"36px":void 0,p=`calc(${_n()} - 100px)`;return r!==t._v$&&ke(o,t._v$=r),l!==t._v$2&&(null!=(t._v$2=l)?i.style.setProperty("width",l):i.style.removeProperty("width")),c!==t._v$3&&(null!=(t._v$3=c)?i.style.setProperty("height",c):i.style.removeProperty("height")),d!==t._v$4&&ke(a,t._v$4=d),u!==t._v$5&&(null!=(t._v$5=u)?a.style.setProperty("height",u):a.style.removeProperty("height")),p!==t._v$6&&(null!=(t._v$6=p)?s.style.setProperty("max-height",p):s.style.removeProperty("max-height")),t}),{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0}),o})()},Pn={alt:"Bubble image"},In=ve('<img elementtiming="Bubble image" fetchpriority="high">'),On=ve('<div><div class="flex w-full items-center"><div class="flex relative z-10 items-start typebot-host-bubble max-w-full"><div class="flex items-center absolute px-4 py-2 bubble-typing z-10 ">'),An=ve('<a target="_blank">'),$n=ve("<figure>");let Rn;const Nn=e=>{let t,n;const[o,r]=_(!!e.onTransitionEnd),i=()=>{o()&&(r(!1),setTimeout((()=>{e.onTransitionEnd?.(t)}),400))};P((()=>{n&&(Rn=setTimeout(i,5e3),n.onload=()=>{clearTimeout(Rn),i()})})),I((()=>{Rn&&clearTimeout(Rn)}));const a=(()=>{const t=In();return"function"==typeof n?Te(n,t):n=t,t.style.setProperty("max-height","512px"),T((n=>{const r=e.content?.url,i=e.content?.clickLink?.alt??Pn.alt,a=Ze(o()?"opacity-0":"opacity-100",e.onTransitionEnd?"text-fade-in":void 0,e.content?.url?.endsWith(".svg")?"w-full":void 0),s=o()?"32px":"auto";return r!==n._v$&&xe(t,"src",n._v$=r),i!==n._v$2&&xe(t,"alt",n._v$2=i),a!==n._v$3&&ke(t,n._v$3=a),s!==n._v$4&&(null!=(n._v$4=s)?t.style.setProperty("height",s):t.style.removeProperty("height")),n}),{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),t})();return(()=>{const n=On(),r=n.firstChild.firstChild,i=r.firstChild;return"function"==typeof t?Te(t,n):t=n,Se(i,(()=>{const e=E((()=>!!o()));return()=>e()?Z(rn,{}):null})()),Se(r,(()=>{const t=E((()=>!!e.content?.clickLink));return()=>t()?(()=>{const t=An();return Se(t,a),T((n=>{const r=e.content.clickLink.url,i=Ze("z-10",o()?"h-8":"p-4");return r!==n._v$8&&xe(t,"href",n._v$8=r),i!==n._v$9&&ke(t,n._v$9=i),n}),{_v$8:void 0,_v$9:void 0}),t})():(()=>{const e=$n();return Se(e,a),T((()=>ke(e,Ze("z-10",!o()&&"p-4",o()?Kt()?"h-8":"h-9":"")))),e})()})(),null),T((t=>{const r=Ze("flex flex-col",e.onTransitionEnd?"animate-fade-in":void 0),a=o()?"64px":"100%",s=o()?"32px":"100%";return r!==t._v$5&&ke(n,t._v$5=r),a!==t._v$6&&(null!=(t._v$6=a)?i.style.setProperty("width",a):i.style.removeProperty("width")),s!==t._v$7&&(null!=(t._v$7=s)?i.style.setProperty("height",s):i.style.removeProperty("height")),t}),{_v$5:void 0,_v$6:void 0,_v$7:void 0}),n})()},Ln=ve("<br>"),Dn=ve("<span>"),Mn=e=>(()=>{const t=Dn();return Se(t,(()=>e.text),null),Se(t,Z(le,{get when(){return E((()=>!!e.isUniqueChild))()&&Ge(e.text)},get children(){return Ln()}}),null),T((()=>ke(t,((e,t,n)=>{let o="";return e&&(o+="slate-bold"),t&&(o+=" slate-italic"),n&&(o+=" slate-underline"),o})(e.bold,e.italic,e.underline)))),t})(),Un=ve('<a target="_blank" rel="noopener noreferrer">'),Bn=ve("<ol>"),Fn=ve("<ul>"),jn=ve("<li>"),zn=ve("<span>"),Hn=ve("<div>"),Vn=e=>Z(ce,{get children(){return[Z(de,{get when(){return He(e.element.text)},get children(){return Z(Mn,ne((()=>e.element),{get isUniqueChild(){return e.isUniqueChild??!1}}))}}),Z(de,{when:!0,get children(){return Z(ce,{get children(){return[Z(de,{get when(){return"a"===e.element.type},get children(){const t=Un();return Se(t,Z(se,{get each(){return e.element.children},children:t=>Z(Vn,{element:t,get isUniqueChild(){return 1===e.element.children?.length}})})),T((()=>xe(t,"href",e.element.url))),t}}),Z(de,{get when(){return"ol"===e.element.type},get children(){const t=Bn();return Se(t,Z(se,{get each(){return e.element.children},children:t=>Z(Vn,{element:t,get isUniqueChild(){return 1===e.element.children?.length}})})),t}}),Z(de,{get when(){return"ul"===e.element.type},get children(){const t=Fn();return Se(t,Z(se,{get each(){return e.element.children},children:t=>Z(Vn,{element:t,get isUniqueChild(){return 1===e.element.children?.length}})})),t}}),Z(de,{get when(){return"li"===e.element.type},get children(){const t=jn();return Se(t,Z(se,{get each(){return e.element.children},children:t=>Z(Vn,{element:t,get isUniqueChild(){return 1===e.element.children?.length}})})),t}}),Z(de,{when:!0,get children(){return Z(Gn,{get element(){return e.element},get insideInlineVariable(){return e.insideInlineVariable??!1},get children(){return Z(se,{get each(){return e.element.children},children:t=>Z(Vn,{element:t,get isUniqueChild(){return 1===e.element.children?.length},get insideInlineVariable(){return"inline-variable"===e.element.type}})})}})}})]}})}})]}}),Gn=e=>Z(ce,{get children(){return[Z(de,{get when(){return"inline-variable"===e.element.type||e.insideInlineVariable},get children(){const t=zn();return Se(t,(()=>e.children)),T((()=>xe(t,"data-element-type",e.element.type))),t}}),Z(de,{when:!0,get children(){const t=Hn();return Se(t,(()=>e.children)),T((()=>xe(t,"data-element-type",e.element.type))),t}})]}}),Wn=e=>e.map((e=>e.text??Wn(e.children))).join(""),qn={isInputPrefillEnabled:!1,isHideQueryParamsEnabled:!0,isNewResultOnRefreshEnabled:!0,rememberUser:{isEnabled:!1,storage:"session"},isBrandingEnabled:!1,isTypingEmulationEnabled:!0},Kn={enabled:!0,speed:400,maxDelay:3,delayBetweenBubbles:0,isDisabledOnFirstMessage:!0},Yn=ve('<div><div class="flex w-full items-center"><div class="flex relative items-start typebot-host-bubble max-w-full"><div class="flex items-center absolute px-4 py-2 bubble-typing " data-testid="host-bubble"></div><div>');let Xn;const Zn=e=>{let t;const[n,o]=_(!!e.onTransitionEnd),r=()=>{n()&&(o(!1),setTimeout((()=>{e.onTransitionEnd?.(t)}),400))};return P((()=>{if(!n)return;const t=e.content?.richText?Wn(e.content.richText):"",o=!1===e.typingEmulation?.enabled||e.isTypingSkipped?0:(({bubbleContent:e,typingSettings:t})=>{let n=e.match(/(\w+)/g)?.length??0;0===n&&(n=e.length);const{enabled:o,speed:r,maxDelay:i}={enabled:t?.enabled??Kn.enabled,speed:t?.speed??Kn.speed,maxDelay:t?.maxDelay??Kn.maxDelay};let a=o?n/r*6e4:0;return a>1e3*i&&(a=1e3*i),a})({bubbleContent:t,typingSettings:e.typingEmulation});Xn=setTimeout(r,o)})),I((()=>{Xn&&clearTimeout(Xn)})),(()=>{const o=Yn(),r=o.firstChild.firstChild.firstChild,i=r.nextSibling;return"function"==typeof t?Te(t,o):t=o,Se(r,(()=>{const e=E((()=>!!n()));return()=>e()&&Z(rn,{})})()),Se(i,Z(se,{get each(){return e.content?.richText},children:e=>Z(Vn,{element:e})})),T((t=>{const a=Ze("flex flex-col",e.onTransitionEnd?"animate-fade-in":void 0),s=n()?"64px":"100%",l=n()?"32px":"100%",c=Ze("overflow-hidden text-fade-in mx-4 my-2 whitespace-pre-wrap slate-html-container relative text-ellipsis",n()?"opacity-0":"opacity-100"),d=n()?Kt()?"16px":"20px":"100%";return a!==t._v$&&ke(o,t._v$=a),s!==t._v$2&&(null!=(t._v$2=s)?r.style.setProperty("width",s):r.style.removeProperty("width")),l!==t._v$3&&(null!=(t._v$3=l)?r.style.setProperty("height",l):r.style.removeProperty("height")),c!==t._v$4&&ke(i,t._v$4=c),d!==t._v$5&&(null!=(t._v$5=d)?i.style.setProperty("height",d):i.style.removeProperty("height")),t}),{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0}),o})()};let Jn=function(e){return e.URL="url",e.YOUTUBE="youtube",e.VIMEO="vimeo",e.TIKTOK="tiktok",e.GUMLET="gumlet",e}({});const Qn=[Jn.YOUTUBE,Jn.VIMEO,Jn.TIKTOK,Jn.GUMLET],eo=400,to="100%",no=!0,oo=!0,ro={[Jn.VIMEO]:"https://player.vimeo.com/video",[Jn.YOUTUBE]:"https://www.youtube.com/embed",[Jn.TIKTOK]:"https://www.tiktok.com/embed/v2",[Jn.GUMLET]:"https://play.gumlet.io/embed"},io=ve("<video>"),ao=ve('<div><iframe class="w-full h-full" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>'),so=ve('<div><div class="flex w-full items-center"><div class="flex relative z-10 items-start typebot-host-bubble overflow-hidden w-full max-w-full"><div class="flex items-center absolute px-4 py-2 bubble-typing z-10 ">');let lo;const co=e=>{let t;const[n,o]=_(!!e.onTransitionEnd);return P((()=>{const r=e.content?.type&&Qn.includes(e.content?.type)?2e3:100;lo=setTimeout((()=>{n()&&(o(!1),setTimeout((()=>{e.onTransitionEnd?.(t)}),400))}),r)})),I((()=>{lo&&clearTimeout(lo)})),(()=>{const o=so(),r=o.firstChild.firstChild,i=r.firstChild;return"function"==typeof t?Te(t,o):t=o,Se(i,(()=>{const e=E((()=>!!n()));return()=>e()&&Z(rn,{})})()),Se(r,Z(ce,{get children(){return[Z(de,{get when(){return e.content?.type&&e.content.type===Jn.URL},get children(){const t=io();return T((o=>{const r=!!e.onTransitionEnd&&(e.content?.isAutoplayEnabled??oo),i=e.content?.url,a=e.content?.areControlsDisplayed??no,s="p-4 focus:outline-none w-full z-10 text-fade-in rounded-md "+(n()?"opacity-0":"opacity-100"),l=n()?Kt()?"32px":"36px":"auto",c=e.content?.aspectRatio,d=e.content?.maxWidth??to;return r!==o._v$&&(t.autoplay=o._v$=r),i!==o._v$2&&xe(t,"src",o._v$2=i),a!==o._v$3&&(t.controls=o._v$3=a),s!==o._v$4&&ke(t,o._v$4=s),l!==o._v$5&&(null!=(o._v$5=l)?t.style.setProperty("height",l):t.style.removeProperty("height")),c!==o._v$6&&(null!=(o._v$6=c)?t.style.setProperty("aspect-ratio",c):t.style.removeProperty("aspect-ratio")),d!==o._v$7&&(null!=(o._v$7=d)?t.style.setProperty("max-width",d):t.style.removeProperty("max-width")),o}),{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0,_v$7:void 0}),t}}),Z(de,{get when(){return E((()=>!!e.content?.type))()&&Qn.includes(e.content.type)},get children(){const t=ao(),o=t.firstChild;return T((r=>{const i=Ze("p-4 z-10 text-fade-in w-full",n()?"opacity-0":"opacity-100 p-4"),a=n()?Kt()?"32px":"36px":e.content?.aspectRatio?void 0:`${e.content?.height??eo}px`,s=e.content?.aspectRatio,l=e.content?.maxWidth??to,c=`${ro[e.content?.type]}/${e.content?.id??""}${e.content?.queryParamsStr??""}`;return i!==r._v$8&&ke(t,r._v$8=i),a!==r._v$9&&(null!=(r._v$9=a)?t.style.setProperty("height",a):t.style.removeProperty("height")),s!==r._v$10&&(null!=(r._v$10=s)?t.style.setProperty("aspect-ratio",s):t.style.removeProperty("aspect-ratio")),l!==r._v$11&&(null!=(r._v$11=l)?t.style.setProperty("max-width",l):t.style.removeProperty("max-width")),c!==r._v$12&&xe(o,"src",r._v$12=c),r}),{_v$8:void 0,_v$9:void 0,_v$10:void 0,_v$11:void 0,_v$12:void 0}),t}})]}}),null),T((t=>{const r=Ze("flex flex-col w-full",e.onTransitionEnd?"animate-fade-in":void 0),a=n()?"64px":"100%",s=n()?"32px":"100%",l=e.content?.maxWidth??to;return r!==t._v$13&&ke(o,t._v$13=r),a!==t._v$14&&(null!=(t._v$14=a)?i.style.setProperty("width",a):i.style.removeProperty("width")),s!==t._v$15&&(null!=(t._v$15=s)?i.style.setProperty("height",s):i.style.removeProperty("height")),l!==t._v$16&&(null!=(t._v$16=l)?i.style.setProperty("max-width",l):i.style.removeProperty("max-width")),t}),{_v$13:void 0,_v$14:void 0,_v$15:void 0,_v$16:void 0}),o})()};let uo=function(e){return e.TEXT="text",e.IMAGE="image",e.VIDEO="video",e.EMBED="embed",e.AUDIO="audio",e}({});const po=e=>Z(ce,{get children(){return[Z(de,{get when(){return e.message.type===uo.TEXT},get children(){return Z(Zn,{get content(){return e.message.content},get isTypingSkipped(){return e.isTypingSkipped},get typingEmulation(){return e.typingEmulation},get onTransitionEnd(){return e.onTransitionEnd}})}}),Z(de,{get when(){return e.message.type===uo.IMAGE},get children(){return Z(Nn,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd}})}}),Z(de,{get when(){return e.message.type===uo.VIDEO},get children(){return Z(co,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd}})}}),Z(de,{get when(){return e.message.type===uo.EMBED},get children(){return Z(bn,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd},get onCompleted(){return e.onCompleted}})}}),Z(de,{get when(){return"custom-embed"===e.message.type},get children(){return Z(Cn,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd},get onCompleted(){return e.onCompleted}})}}),Z(de,{get when(){return e.message.type===uo.AUDIO},get children(){return Z(gn,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd}})}})]}}),go=ve('<figure data-testid="default-avatar"><svg width="75" height="75" viewBox="0 0 75 75" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="mask0" x="0" y="0" mask-type="alpha"><circle cx="37.5" cy="37.5" r="37.5" fill="#0042DA"></circle></mask><g mask="url(#mask0)"><rect x="-30" y="-43" width="131" height="154" fill="#0042DA"></rect><rect x="2.50413" y="120.333" width="81.5597" height="86.4577" rx="2.5" transform="rotate(-52.6423 2.50413 120.333)" stroke="#FED23D" stroke-width="5"></rect><circle cx="76.5" cy="-1.5" r="29" stroke="#FF8E20" stroke-width="5"></circle><path d="M-49.8224 22L-15.5 -40.7879L18.8224 22H-49.8224Z" stroke="#F7F8FF" stroke-width="5">'),ho=()=>(()=>{const e=go(),t=e.firstChild;return T((n=>{const o="flex justify-center items-center rounded-full text-white relative flex-shrink-0 "+(Kt()?"w-6 h-6 text-sm":"w-10 h-10 text-xl"),r="absolute top-0 left-0 "+(Kt()?" w-6 h-6 text-sm":"w-full h-full text-xl");return o!==n._v$&&ke(e,n._v$=o),r!==n._v$2&&xe(t,"class",n._v$2=r),n}),{_v$:void 0,_v$2:void 0}),e})(),fo=ve('<figure><img alt="Bot avatar" class="rounded-full object-cover w-full h-full" elementtiming="Bot avatar" fetchpriority="high">'),mo=e=>{const[t,n]=_(e.initialAvatarSrc);return S((()=>{!t()?.startsWith("{{")&&t()||!e.initialAvatarSrc?.startsWith("http")||n(e.initialAvatarSrc)})),Z(le,{get when(){return We(t())},keyed:!0,get fallback(){return Z(ho,{})},get children(){const e=fo(),n=e.firstChild;return T((o=>{const r="flex justify-center items-center rounded-full text-white relative animate-fade-in flex-shrink-0 "+(Kt()?"w-6 h-6 text-sm":"w-10 h-10 text-xl"),i=t();return r!==o._v$&&ke(e,o._v$=r),i!==o._v$2&&xe(n,"src",o._v$2=i),o}),{_v$:void 0,_v$2:void 0}),e}})},bo=Symbol(),yo=Object.getPrototypeOf,vo=new WeakMap,wo=e=>(e=>e&&(vo.has(e)?vo.get(e):yo(e)===Object.prototype||yo(e)===Array.prototype))(e)&&e[bo]||null,xo=(e,t=!0)=>{vo.set(e,t)};function ko(e,t){const n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0;return n?(n[e]||(n[e]=t()),n[e]):t()}var _o=e=>"object"==typeof e&&null!==e,To=ko("__zag__proxyStateMap",(()=>new WeakMap)),So=ko("__zag__refSet",(()=>new WeakSet)),[Eo]=((e=Object.is,t=(e,t)=>new Proxy(e,t),n=e=>_o(e)&&!So.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer),o=e=>{switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e}},r=new WeakMap,i=(e,t,n=o)=>{const i=r.get(e);if(i?.[0]===t)return i[1];const a=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return xo(a,!0),r.set(e,[t,a]),Reflect.ownKeys(e).forEach((t=>{const o=Reflect.get(e,t);So.has(o)?(xo(o,!1),a[t]=o):o instanceof Promise?Object.defineProperty(a,t,{get:()=>n(o)}):To.has(o)?a[t]=Io(o,n):a[t]=o})),Object.freeze(a)},a=new WeakMap,s=[1,1],l=o=>{if(!_o(o))throw new Error("object required");const r=a.get(o);if(r)return r;let l=s[0];const c=new Set,d=(e,t=++s[0])=>{l!==t&&(l=t,c.forEach((n=>n(e,t))))};let u=s[1];const p=e=>(t,n)=>{const o=[...t];o[1]=[e,...o[1]],d(o,n)},g=new Map,h=e=>{const t=g.get(e);t&&(g.delete(e),t[1]?.())},f=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o)),m=t(f,{deleteProperty(e,t){const n=Reflect.get(e,t);h(t);const o=Reflect.deleteProperty(e,t);return o&&d(["delete",[t],n]),o},set(t,o,r,i){const s=Reflect.has(t,o),l=Reflect.get(t,o,i);if(s&&(e(l,r)||a.has(r)&&e(l,a.get(r))))return!0;h(o),_o(r)&&(r=wo(r)||r);let u=r;if(Object.getOwnPropertyDescriptor(t,o)?.set);else if(r instanceof Promise)r.then((e=>{Object.assign(r,{status:"fulfilled",value:e}),d(["resolve",[o],e])})).catch((e=>{Object.assign(r,{status:"rejected",reason:e}),d(["reject",[o],e])}));else{!To.has(r)&&n(r)&&(u=Co(r));const e=!So.has(u)&&To.get(u);e&&((e,t)=>{if(c.size){const n=t[3](p(e));g.set(e,[t,n])}else g.set(e,[t])})(o,e)}return Reflect.set(t,o,u,i),d(["set",[o],r,l]),!0}});a.set(o,m);const b=[f,(e=++s[1])=>(u===e||c.size||(u=e,g.forEach((([t])=>{const n=t[1](e);n>l&&(l=n)}))),l),i,e=>{c.add(e),1===c.size&&g.forEach((([e,t],n)=>{const o=e[3](p(n));g.set(n,[e,o])}));return()=>{c.delete(e),0===c.size&&g.forEach((([e,t],n)=>{t&&(t(),g.set(n,[e]))}))}}];return To.set(m,b),Reflect.ownKeys(o).forEach((e=>{const t=Object.getOwnPropertyDescriptor(o,e);t.get||t.set?Object.defineProperty(f,e,t):m[e]=o[e]})),m})=>[l,To,So,e,t,n,o,r,i,a,s])();function Co(e={}){return Eo(e)}function Po(e,t,n){const o=To.get(e);let r;const i=[],a=o[3];let s=!1;const l=a((e=>{i.push(e),n?t(i.splice(0)):r||(r=Promise.resolve().then((()=>{r=void 0,s&&t(i.splice(0))})))}));return s=!0,()=>{s=!1,l()}}function Io(e,t){const n=To.get(e),[o,r,i]=n;return i(o,r(),t)}function Oo(e){return So.add(e),e}function Ao(e,t){Object.keys(t).forEach((o=>{if(Object.getOwnPropertyDescriptor(e,o))throw new Error("object property already defined");const r=t[o],{get:i,set:a}="function"==typeof r?{get:r}:r,s={get:()=>i(Io(n))};a&&(s.set=e=>a(n,e)),Object.defineProperty(e,o,s)}));const n=Co(e);return n}function $o(e,t,n){"object"==typeof n.value&&(n.value=Ro(n.value)),n.enumerable&&!n.get&&!n.set&&n.configurable&&n.writable&&"__proto__"!==t?e[t]=n.value:Object.defineProperty(e,t,n)}function Ro(e){if("object"!=typeof e)return e;var t,n,o,r=0,i=Object.prototype.toString.call(e);if("[object Object]"===i?o=Object.create(e.__proto__||null):"[object Array]"===i?o=Array(e.length):"[object Set]"===i?(o=new Set,e.forEach((function(e){o.add(Ro(e))}))):"[object Map]"===i?(o=new Map,e.forEach((function(e,t){o.set(Ro(t),Ro(e))}))):"[object Date]"===i?o=new Date(+e):"[object RegExp]"===i?o=new RegExp(e.source,e.flags):"[object DataView]"===i?o=new e.constructor(Ro(e.buffer)):"[object ArrayBuffer]"===i?o=e.slice(0):"Array]"===i.slice(-6)&&(o=new e.constructor(e)),o){for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)$o(o,n[r],Object.getOwnPropertyDescriptor(e,n[r]));for(r=0,n=Object.getOwnPropertyNames(e);r<n.length;r++)Object.hasOwnProperty.call(o,t=n[r])&&o[t]===e[t]||$o(o,t,Object.getOwnPropertyDescriptor(e,t))}return o||e}var No=Object.defineProperty,Lo=(e,t,n)=>((e,t,n)=>t in e?No(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);var Do=(e,...t)=>("function"==typeof e?e(...t):e)??void 0,Mo=()=>{},Uo=(...e)=>(...t)=>{e.forEach((function(e){e?.(...t)}))},Bo=(()=>{let e=0;return()=>(e++,e.toString(36))})(),Fo=e=>Array.isArray(e),jo=e=>!(null==e||"object"!=typeof e||Fo(e)),zo=e=>"string"==typeof e,Ho=e=>"function"==typeof e;function Vo(e){if(!Go(e)||void 0===e)return e;const t=Reflect.ownKeys(e).filter((e=>"string"==typeof e)),n={};for(const o of t){const t=e[o];void 0!==t&&(n[o]=Vo(t))}return n}var Go=e=>e&&"object"==typeof e&&e.constructor===Object;function Wo(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function qo(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function Ko(e,...t){for(const n of t){const t=Vo(n);for(const o in t)jo(n[o])?(e[o]||(e[o]={}),Ko(e[o],n[o])):e[o]=n[o]}return e}function Yo(e){return Ro(e)}function Xo(e){return zo(e)?{type:e}:e}function Zo(e){return e?Fo(e)?e.slice():[e]:[]}function Jo(e){return jo(e)&&null!=e.predicate}var Qo=()=>!0;function er(e,t,n,o){return r=>zo(r)?!!e[r]?.(t,n,o):Ho(r)?r(t,n,o):r.predicate(e)(t,n,o)}var tr={or:function(...e){return{predicate:t=>(n,o,r)=>e.map(er(t,n,o,r)).some(Boolean)}},and:function(...e){return{predicate:t=>(n,o,r)=>e.map(er(t,n,o,r)).every(Boolean)}},not:function(e){return{predicate:t=>(n,o,r)=>!er(t,n,o,r)(e)}},stateIn:function(...e){return(t,n,o)=>o.state.matches(...e)}};function nr(e,t){return e=e??Qo,(n,o,r)=>{if(zo(e)){const i=t[e];return Ho(i)?i(n,o,r):i}return Jo(e)?e.predicate(t)(n,o,r):e?.(n,o,r)}}function or(e,t){return(n,o,r)=>Jo(e)?e.predicate(t)(n,o,r):e}function rr(e,t){return(n,o)=>{if("number"==typeof(r=e)&&!Number.isNaN(r))return e;var r;if(Ho(e))return e(n,o);if(zo(e)){const r=Number.parseFloat(e);if(!Number.isNaN(r))return r;if(t){const r=t?.[e];return qo(null==r,`[@zag-js/core > determine-delay] Cannot determine delay for \`${e}\`. It doesn't exist in \`options.delays\``),Ho(r)?r(n,o):r}}}}function ir(e){return zo(e)?{target:e}:e}var ar=class{constructor(e,t){Lo(this,"status","Not Started"),Lo(this,"state"),Lo(this,"initialState"),Lo(this,"initialContext"),Lo(this,"id"),Lo(this,"type","machine"),Lo(this,"activityEvents",new Map),Lo(this,"delayedEvents",new Map),Lo(this,"stateListeners",new Set),Lo(this,"doneListeners",new Set),Lo(this,"contextWatchers",new Set),Lo(this,"removeStateListener",Mo),Lo(this,"parent"),Lo(this,"children",new Map),Lo(this,"guardMap"),Lo(this,"actionMap"),Lo(this,"delayMap"),Lo(this,"activityMap"),Lo(this,"sync"),Lo(this,"options"),Lo(this,"config"),Lo(this,"_created",(()=>{const e=Xo("machine.created");this.executeActions(this.config?.created,e)})),Lo(this,"start",(e=>{if(this.state.value="",this.state.tags=[],"Running"===this.status)return this;this.status="Running",this.removeStateListener=Po(this.state,(()=>{this.stateListeners.forEach((e=>{e(this.stateSnapshot)}))}),this.sync),this.setupContextWatchers(),this.executeActivities(Xo("machine.start"),Zo(this.config.activities),"machine.start"),this.executeActions(this.config.entry,Xo("machine.start"));const t=Xo("machine.init"),n=jo(e)?e.value:e,o=jo(e)?e.context:void 0;o&&this.setContext(o);const r={target:n??this.config.initial},i=this.getNextStateInfo(r,t);return this.initialState=i,this.performStateChangeEffects(this.state.value,i,t),this})),Lo(this,"setupContextWatchers",(()=>{const{watch:e}=this.config;if(!e)return;let t=Io(this.state.context);const n=Po(this.state.context,(()=>{const n=Io(this.state.context);for(const[o,r]of Object.entries(e)){(this.options.compareFns?.[o]??Object.is)(t[o],n[o])||this.executeActions(r,this.state.event)}t=n}));this.contextWatchers.add(n)})),Lo(this,"stop",(()=>{if("Stopped"!==this.status)return this.performExitEffects(this.state.value,Xo("machine.stop")),this.executeActions(this.config.exit,Xo("machine.stop")),this.setState(""),this.setEvent("machine.stop"),this.stopStateListeners(),this.stopChildren(),this.stopActivities(),this.stopDelayedEvents(),this.stopContextWatchers(),this.status="Stopped",this})),Lo(this,"stopStateListeners",(()=>{this.removeStateListener(),this.stateListeners.clear()})),Lo(this,"stopContextWatchers",(()=>{this.contextWatchers.forEach((e=>e())),this.contextWatchers.clear()})),Lo(this,"stopDelayedEvents",(()=>{this.delayedEvents.forEach((e=>{e.forEach((e=>e()))})),this.delayedEvents.clear()})),Lo(this,"stopActivities",(e=>{e?(this.activityEvents.get(e)?.forEach((e=>e())),this.activityEvents.get(e)?.clear(),this.activityEvents.delete(e)):(this.activityEvents.forEach((e=>{e.forEach((e=>e())),e.clear()})),this.activityEvents.clear())})),Lo(this,"sendChild",((e,t)=>{const n=Xo(e),o=Do(t,this.contextSnapshot),r=this.children.get(o);r||qo(`[@zag-js/core] Cannot send '${n.type}' event to unknown child`),r.send(n)})),Lo(this,"stopChild",(e=>{this.children.has(e)||qo(`[@zag-js/core > stop-child] Cannot stop unknown child ${e}`),this.children.get(e).stop(),this.children.delete(e)})),Lo(this,"removeChild",(e=>{this.children.delete(e)})),Lo(this,"stopChildren",(()=>{this.children.forEach((e=>e.stop())),this.children.clear()})),Lo(this,"setParent",(e=>{this.parent=e})),Lo(this,"spawn",((e,t)=>{const n=Do(e);return t&&(n.id=t),n.type="machine.actor",n.setParent(this),this.children.set(n.id,n),n.onDone((()=>{this.removeChild(n.id)})).start(),Oo(n)})),Lo(this,"stopActivity",(e=>{if(!this.state.value)return;const t=this.activityEvents.get(this.state.value);t?.get(e)?.(),t?.delete(e)})),Lo(this,"addActivityCleanup",((e,t,n)=>{e&&(this.activityEvents.has(e)?this.activityEvents.get(e)?.set(t,n):this.activityEvents.set(e,new Map([[t,n]])))})),Lo(this,"setState",(e=>{this.state.previousValue=this.state.value,this.state.value=e;const t=this.getStateNode(e);null==e?function(e){for(;e.length>0;)e.pop()}(this.state.tags):this.state.tags=Zo(t?.tags)})),Lo(this,"setContext",(e=>{e&&Ko(this.state.context,Vo(e))})),Lo(this,"setOptions",(e=>{const t=Vo(e);this.actionMap={...this.actionMap,...t.actions},this.delayMap={...this.delayMap,...t.delays},this.activityMap={...this.activityMap,...t.activities},this.guardMap={...this.guardMap,...t.guards}})),Lo(this,"getStateNode",(e=>{if(e)return this.config.states?.[e]})),Lo(this,"getNextStateInfo",((e,t)=>{const n=this.determineTransition(e,t),o=!n?.target,r=n?.target??this.state.value,i=this.state.value!==r,a=this.getStateNode(r),s={reenter:!o&&!i&&!n?.internal,transition:n,stateNode:a,target:r,changed:i};return this.log("NextState:",`[${t.type}]`,this.state.value,"----\x3e",s.target),s})),Lo(this,"getAfterActions",((e,t)=>{let n;return{entry:()=>{n=globalThis.setTimeout((()=>{const t=this.getNextStateInfo(e,this.state.event);this.performStateChangeEffects(this.state.value,t,this.state.event)}),t)},exit:()=>{globalThis.clearTimeout(n)}}})),Lo(this,"getDelayedEventActions",(e=>{const t=this.getStateNode(e),n=this.state.event;if(!t||!t.after)return;const o=[],r=[];if(Fo(t.after)){const e=this.determineTransition(t.after,n);if(!e)return;if(i=e,a="delay",!Object.prototype.hasOwnProperty.call(i,a))throw new Error(`[@zag-js/core > after] Delay is required for after transition: ${JSON.stringify(e)}`);const s=rr(e.delay,this.delayMap)(this.contextSnapshot,n),l=this.getAfterActions(e,s);return o.push(l.entry),r.push(l.exit),{entries:o,exits:r}}var i,a;if(jo(t.after))for(const e in t.after){const i=t.after[e],a=rr(e,this.delayMap)(this.contextSnapshot,n),s=this.getAfterActions(i,a);o.push(s.entry),r.push(s.exit)}return{entries:o,exits:r}})),Lo(this,"executeActions",((e,t)=>{const n=or(e,this.guardMap)(this.contextSnapshot,t,this.guardMeta);for(const e of Zo(n)){const n=zo(e)?this.actionMap?.[e]:e;Wo(zo(e)&&!n,`[@zag-js/core > execute-actions] No implementation found for action: \`${e}\``),n?.(this.state.context,t,this.meta)}})),Lo(this,"executeActivities",((e,t,n)=>{for(const o of t){const t=zo(o)?this.activityMap?.[o]:o;if(!t){Wo(`[@zag-js/core > execute-activity] No implementation found for activity: \`${o}\``);continue}const r=t(this.state.context,e,this.meta);if(r){const e=zo(o)?o:o.name||Bo();this.addActivityCleanup(n??this.state.value,e,r)}}})),Lo(this,"createEveryActivities",((e,t)=>{if(e)if(Fo(e)){const n=Zo(e).find((e=>{const t=rr(e.delay,this.delayMap)(this.contextSnapshot,this.state.event);return nr(e.guard,this.guardMap)(this.contextSnapshot,this.state.event,this.guardMeta)??null!=t}));if(!n)return;const o=rr(n.delay,this.delayMap)(this.contextSnapshot,this.state.event);t((()=>{const e=globalThis.setInterval((()=>{this.executeActions(n.actions,this.state.event)}),o);return()=>{globalThis.clearInterval(e)}}))}else for(const n in e){const o=e?.[n],r=rr(n,this.delayMap)(this.contextSnapshot,this.state.event);t((()=>{const e=globalThis.setInterval((()=>{this.executeActions(o,this.state.event)}),r);return()=>{globalThis.clearInterval(e)}}))}})),Lo(this,"setEvent",(e=>{this.state.previousEvent=this.state.event,this.state.event=Oo(Xo(e))})),Lo(this,"performExitEffects",((e,t)=>{const n=this.state.value;if(""===n)return;const o=e?this.getStateNode(e):void 0;this.stopActivities(n);const r=Zo(or(o?.exit,this.guardMap)(this.contextSnapshot,t,this.guardMeta)),i=this.delayedEvents.get(n);i&&r.push(...i),this.executeActions(r,t)})),Lo(this,"performEntryEffects",((e,t)=>{const n=this.getStateNode(e),o=Zo(n?.activities);this.createEveryActivities(n?.every,(e=>{o.unshift(e)})),o.length>0&&this.executeActivities(t,o);const r=Zo(or(n?.entry,this.guardMap)(this.contextSnapshot,t,this.guardMeta)),i=this.getDelayedEventActions(e);n?.after&&i&&(this.delayedEvents.set(e,i?.exits),r.push(...i.entries)),this.executeActions(r,t),"final"===n?.type&&(this.state.done=!0,this.doneListeners.forEach((e=>{e(this.stateSnapshot)})),this.stop())})),Lo(this,"performTransitionEffects",((e,t)=>{const n=this.determineTransition(e,t);this.executeActions(n?.actions,t)})),Lo(this,"performStateChangeEffects",((e,t,n)=>{this.setEvent(n);const o=t.changed||t.reenter;o&&this.performExitEffects(e,n),this.performTransitionEffects(t.transition,n),this.setState(t.target),o&&this.performEntryEffects(t.target,n)})),Lo(this,"determineTransition",((e,t)=>{const n=(o=e,r=this.guardMap,(e,t,n)=>Zo(o).map(ir).find((o=>nr(o.guard,r)(e,t,n)??o.target??o.actions)));var o,r;return n?.(this.contextSnapshot,t,this.guardMeta)})),Lo(this,"sendParent",(e=>{this.parent||qo("[@zag-js/core > send-parent] Cannot send event to an unknown parent");const t=Xo(e);this.parent?.send(t)})),Lo(this,"log",((...e)=>{})),Lo(this,"send",(e=>{const t=Xo(e);this.transition(this.state.value,t)})),Lo(this,"transition",((e,t)=>{const n=zo(e)?this.getStateNode(e):e?.stateNode,o=Xo(t);if(!n&&!this.config.on){return void Wo("Stopped"===this.status?"[@zag-js/core > transition] Cannot transition a stopped machine":`[@zag-js/core > transition] State does not have a definition for \`state\`: ${e}, \`event\`: ${o.type}`)}const r=n?.on?.[o.type]??this.config.on?.[o.type],i=this.getNextStateInfo(r,o);return this.performStateChangeEffects(this.state.value,i,o),i.stateNode})),Lo(this,"subscribe",(e=>(this.stateListeners.add(e),"Running"===this.status&&e(this.stateSnapshot),()=>{this.stateListeners.delete(e)}))),Lo(this,"onDone",(e=>(this.doneListeners.add(e),this))),Lo(this,"onTransition",(e=>(this.stateListeners.add(e),"Running"===this.status&&e(this.stateSnapshot),this))),this.config=Yo(e),this.options=Yo(t??{}),this.id=this.config.id??`machine-${Bo()}`,this.guardMap=this.options?.guards??{},this.actionMap=this.options?.actions??{},this.delayMap=this.options?.delays??{},this.activityMap=this.options?.activities??{},this.sync=this.options?.sync??!1,this.state=function(e){const t=e.computed??{},n=e.context??{},o=e.initial?e.states?.[e.initial]?.tags:[];return Co({value:e.initial??"",previousValue:"",event:{},previousEvent:{},context:Ao(n,t),done:!1,tags:o??[],hasTag(e){return this.tags.includes(e)},matches(...e){return e.includes(this.value)},can(e){return this.nextEvents.includes(e)},get nextEvents(){const t=e.states?.[this.value]?.on??{},n=e?.on??{};return Object.keys({...t,...n})},get changed(){return!("machine.init"===this.event.value||!this.previousValue)&&this.value!==this.previousValue}})}(this.config),this.initialContext=Io(this.state.context)}get stateSnapshot(){return Io(this.state)}getState(){return this.stateSnapshot}get contextSnapshot(){return this.stateSnapshot.context}get self(){const e=this;return{id:this.id,send:this.send.bind(this),sendParent:this.sendParent.bind(this),sendChild:this.sendChild.bind(this),stop:this.stop.bind(this),stopChild:this.stopChild.bind(this),spawn:this.spawn.bind(this),stopActivity:this.stopActivity.bind(this),get state(){return e.stateSnapshot},get initialContext(){return e.initialContext},get initialState(){return e.initialState?.target??""}}}get meta(){return{state:this.stateSnapshot,guards:this.guardMap,send:this.send.bind(this),self:this.self,initialContext:this.initialContext,initialState:this.initialState?.target??"",getState:()=>this.stateSnapshot,getAction:e=>this.actionMap[e],getGuard:e=>this.guardMap[e]}}get guardMeta(){return{state:this.stateSnapshot}}get[Symbol.toStringTag](){return"Machine"}},sr=(e,t)=>new ar(e,t),lr=(...e)=>e.map((e=>e?.trim?.())).filter(Boolean).join(" "),cr=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,dr=e=>{const t={};let n;for(;n=cr.exec(e);)t[n[1]]=n[2];return t},ur=(e,t)=>{if(zo(e)){if(zo(t))return`${e};${t}`;e=dr(e)}else zo(t)&&(t=dr(t));return Object.assign({},e??{},t??{})};function pr(...e){let t={};for(let n of e){for(let e in t)e.startsWith("on")&&"function"==typeof t[e]&&"function"==typeof n[e]?t[e]=Uo(n[e],t[e]):t[e]="className"!==e&&"class"!==e?"style"!==e?void 0!==n[e]?n[e]:t[e]:ur(t[e],n[e]):lr(t[e],n[e]);for(let e in n)void 0===t[e]&&(t[e]=n[e])}return t}var gr=()=>e=>Array.from(new Set(e));const hr=Symbol("store-raw"),fr=Symbol("store-node");function mr(e){let t=e[l];if(!t&&(Object.defineProperty(e,l,{value:t=new Proxy(e,_r)}),!Array.isArray(e))){const n=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let r=0,i=n.length;r<i;r++){const i=n[r];o[i].get&&Object.defineProperty(e,i,{enumerable:o[i].enumerable,get:o[i].get.bind(t)})}}return t}function br(e){let t;return null!=e&&"object"==typeof e&&(e[l]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function yr(e,t=new Set){let n,o,r,i;if(n=null!=e&&e[hr])return n;if(!br(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,i=e.length;n<i;n++)r=e[n],(o=yr(r,t))!==r&&(e[n]=o)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const n=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let s=0,l=n.length;s<l;s++)i=n[s],a[i].get||(r=e[i],(o=yr(r,t))!==r&&(e[i]=o))}return e}function vr(e){let t=e[fr];return t||Object.defineProperty(e,fr,{value:t=Object.create(null)}),t}function wr(e,t,n){return e[t]||(e[t]=kr(n))}function xr(e){if(O()){const t=vr(e);(t._||(t._=kr()))()}}function kr(e){const[t,n]=_(e,{equals:!1,internal:!0});return t.$=n,t}const _r={get(e,t,n){if(t===hr)return e;if(t===l)return n;if(t===c)return xr(e),n;const o=vr(e),r=o[t];let i=r?r():e[t];if(t===fr||"__proto__"===t)return i;if(!r){const n=Object.getOwnPropertyDescriptor(e,t);!O()||"function"==typeof i&&!e.hasOwnProperty(t)||n&&n.get||(i=wr(o,t,i)())}return br(i)?mr(i):i},has(e,t){return t===hr||t===l||t===c||t===fr||"__proto__"===t||(this.get(e,t,e),t in e)},set:()=>!0,deleteProperty:()=>!0,ownKeys:function(e){return xr(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor:function(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return n&&!n.get&&n.configurable&&t!==l&&t!==fr?(delete n.value,delete n.writable,n.get=()=>e[l][t],n):n}};function Tr(e,t,n,o=!1){if(!o&&e[t]===n)return;const r=e[t],i=e.length;void 0===n?delete e[t]:e[t]=n;let a,s=vr(e);if((a=wr(s,t,r))&&a.$((()=>n)),Array.isArray(e)&&e.length!==i){for(let t=e.length;t<i;t++)(a=s[t])&&a.$();(a=wr(s,"length",i))&&a.$(e.length)}(a=s._)&&a.$()}function Sr(e,t){const n=Object.keys(t);for(let o=0;o<n.length;o+=1){const r=n[o];Tr(e,r,t[r])}}function Er(e,t,n=[]){let o,r=e;if(t.length>1){o=t.shift();const i=typeof o,a=Array.isArray(e);if(Array.isArray(o)){for(let r=0;r<o.length;r++)Er(e,[o[r]].concat(t),n);return}if(a&&"function"===i){for(let r=0;r<e.length;r++)o(e[r],r)&&Er(e,[r].concat(t),n);return}if(a&&"object"===i){const{from:r=0,to:i=e.length-1,by:a=1}=o;for(let o=r;o<=i;o+=a)Er(e,[o].concat(t),n);return}if(t.length>1)return void Er(e[o],t,[o].concat(n));r=e[o],n=[o].concat(n)}let i=t[0];"function"==typeof i&&(i=i(r,n),i===r)||void 0===o&&null==i||(i=yr(i),void 0===o||br(r)&&br(i)&&!Array.isArray(i)?Sr(r,i):Tr(e,o,i))}function Cr(...[e,t]){const n=yr(e||{}),o=Array.isArray(n);return[mr(n),function(...e){B((()=>{o&&1===e.length?function(e,t){if("function"==typeof t&&(t=t(e)),t=yr(t),Array.isArray(t)){if(e===t)return;let n=0,o=t.length;for(;n<o;n++){const o=t[n];e[n]!==o&&Tr(e,n,o)}Tr(e,"length",o)}else Sr(e,t)}(n,e[0]):Er(n,e)}),!1)}]}const Pr=Symbol("store-root");function Ir(e,t,n,o,r){const i=t[n];if(e===i)return;if(n!==Pr&&(!br(e)||!br(i)||r&&e[r]!==i[r]))return void Tr(t,n,e);if(Array.isArray(e)){if(e.length&&i.length&&(!o||r&&e[0]&&null!=e[0][r])){let t,n,a,s,l,c,d,u;for(a=0,s=Math.min(i.length,e.length);a<s&&(i[a]===e[a]||r&&i[a]&&e[a]&&i[a][r]===e[a][r]);a++)Ir(e[a],i,a,o,r);const p=new Array(e.length),g=new Map;for(s=i.length-1,l=e.length-1;s>=a&&l>=a&&(i[s]===e[l]||r&&i[a]&&e[a]&&i[s][r]===e[l][r]);s--,l--)p[l]=i[s];if(a>l||a>s){for(n=a;n<=l;n++)Tr(i,n,e[n]);for(;n<e.length;n++)Tr(i,n,p[n]),Ir(e[n],i,n,o,r);return void(i.length>e.length&&Tr(i,"length",e.length))}for(d=new Array(l+1),n=l;n>=a;n--)c=e[n],u=r&&c?c[r]:c,t=g.get(u),d[n]=void 0===t?-1:t,g.set(u,n);for(t=a;t<=s;t++)c=i[t],u=r&&c?c[r]:c,n=g.get(u),void 0!==n&&-1!==n&&(p[n]=i[t],n=d[n],g.set(u,n));for(n=a;n<e.length;n++)n in p?(Tr(i,n,p[n]),Ir(e[n],i,n,o,r)):Tr(i,n,e[n])}else for(let t=0,n=e.length;t<n;t++)Ir(e[t],i,t,o,r);return void(i.length>e.length&&Tr(i,"length",e.length))}const a=Object.keys(e);for(let t=0,n=a.length;t<n;t++)Ir(e[a[t]],i,a[t],o,r);const s=Object.keys(i);for(let t=0,n=s.length;t<n;t++)void 0===e[s[t]]&&Tr(i,s[t],void 0)}function Or(e,t={}){const{merge:n,key:o="id"}=t,r=yr(e);return e=>{if(!br(e)||!br(r))return r;const t=Ir(r,{[Pr]:e},Pr,n,o);return void 0===t?e:t}}function Ar(...e){const t={};for(let n=0;n<e.length;n++){let o=e[n];if("function"==typeof o&&(o=o()),o){const n=Object.getOwnPropertyDescriptors(o);for(const o in n)o in t||Object.defineProperty(t,o,{enumerable:!0,get(){let t={};if("style"===o||"class"===o||"className"===o||o.startsWith("on")){for(let n=0;n<e.length;n++){let r=e[n];"function"==typeof r&&(r=r()),t=pr(t,{[o]:(r||{})[o]})}return t[o]}for(let t=e.length-1;t>=0;t--){let n,r=e[t];if("function"==typeof r&&(r=r()),n=(r||{})[o],void 0!==n)return n}}})}}return t}var $r=e=>!(null==e||"object"!=typeof e||(e=>Array.isArray(e))(e)),Rr=e=>"string"==typeof e,Nr={onFocus:"onFocusIn",onBlur:"onFocusOut",onDoubleClick:"onDblClick",onChange:"onInput",defaultChecked:"checked",defaultValue:"value",htmlFor:"for",className:"class"},Lr=e=>e.startsWith("--")?e:function(e){if(jr.hasOwnProperty(e))return jr[e];var t=e.replace(Br,zr);return jr[e]=Fr.test(t)?"-"+t:t}(e);var Dr,Mr=(Dr=e=>{const t={};for(const o in e){const r=e[o];"readOnly"===o&&!1===r||("style"===o&&$r(r)?t.style=Ur(r):"children"!==o?t[(n=o,n in Nr?Nr[n]:n)]=r:Rr(r)&&(t.textContent=r))}var n;return t},new Proxy({},{get:()=>Dr}));function Ur(e){let t={};for(const o in e){const r=e[o];!Rr(r)&&("number"!=typeof(n=r)||Number.isNaN(n))||(t[Lr(o)]=r)}var n;return t}var Br=/[A-Z]/g,Fr=/^ms-/,jr={};function zr(e){return"-"+e.toLowerCase()}function Hr(e,t){const{actions:n,context:o}=t??{},[r,i]=Cr(e.getState());return P((()=>{const t=e.subscribe((e=>{i(Or(e))}));I((()=>{t()}))})),S((()=>{const t="function"==typeof o?o():o;e.setContext(t)})),S((()=>{e.setOptions({actions:n})})),r}function Vr(e,t){const n=function(e,t){const{state:n,context:o}=t??{},r=(()=>{const t="function"==typeof e?e():e,n="function"==typeof o?o():o;return n&&t.setContext(n),t._created(),t})();return P((()=>{r.start(n),I((()=>{r.stop()}))})),r}(e,t);return[Hr(n,t),n.send,n]}var Gr=(e,t=[])=>({parts:(...n)=>{if(qr(t))return Gr(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Gr(e,[...t,...n]),rename:e=>Gr(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce(((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${Wr(e)}"][data-part="${Wr(n)}"]`,`& [data-scope="${Wr(e)}"][data-part="${Wr(n)}"]`].join(", "),attrs:{"data-scope":Wr(e),"data-part":Wr(n)}}})),{})}),Wr=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),qr=e=>0===e.length,Kr=e=>e?"":void 0,Yr=e=>"object"==typeof e&&e?.nodeType===Node.ELEMENT_NODE&&"string"==typeof e?.nodeName,Xr=e=>e.nodeType===Node.DOCUMENT_NODE;function Zr(e,t){return!(!e||!t)&&(!(!Yr(e)||!Yr(t))&&(e===t||e.contains(t)))}function Jr(e){return Xr(e)?e:(e=>null!=e&&e===e.window)(e)?e.document:e?.ownerDocument??document}function Qr(e){return(e=>e&&(e=>void 0!==e.nodeType)(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e)(e)?Qr(e.host):Xr(e)?e.defaultView??window:Yr(e)?e.ownerDocument?.defaultView??window:window}var ei=()=>"undefined"!=typeof document;var ti=e=>ei()&&e.test(function(){const e=navigator.userAgentData;return e?.platform??navigator.platform}()),ni=()=>{return e=/firefox\//i,ei()&&e.test(navigator.userAgent);var e};function oi(e){const t=function(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}(e);return t?.[0]??e.target}function ri(e){const t=e.currentTarget;if(!t)return!1;const n=ti(/mac|iphone|ipad|ipod/i);if(n&&!e.metaKey)return!1;if(!n&&!e.ctrlKey)return!1;const o=t.localName;return"a"===o||("button"===o&&"submit"===t.type||"input"===o&&"submit"===t.type)}function ii(e){const t=e.currentTarget;if(!t)return!1;const n=t.localName;return!!e.altKey&&("a"===n||("button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type))}var ai=e=>e.id;function si(e,t,n=ai){const o=function(e,t,n=ai){return e.find((e=>n(e)===t))}(e,t,n);return o?e.indexOf(o):-1}function li(e,t,n,o=ai){const r=n?si(e,n,o):-1;let i=n?((e,t)=>e.map(((n,o)=>e[(Math.max(t,0)+o)%e.length])))(e,r):e;return 1===t.length&&(i=i.filter((e=>o(e)!==n))),i.find((e=>{return n=(e=>(e.dataset.valuetext??e.textContent??"").split("").map((e=>{const t=e.charCodeAt(0);return t>0&&t<128?e:t>=128&&t<=255?`/x${t.toString(16)}`.replace("/","\\"):""})).join("").trim())(e),o=t,n.trim().toLowerCase().startsWith(o.toLowerCase());var n,o}))}function ci(e,t){const{state:n,activeId:o,key:r,timeout:i=350,itemToId:a}=t,s=n.keysSoFar+r,l=s.length>1&&Array.from(s).every((e=>e===s[0]))?s[0]:s;const c=li(e.slice(),l,o,a);function d(){clearTimeout(n.timer),n.timer=-1}return function e(t){n.keysSoFar=t,d(),""!==t&&(n.timer=+setTimeout((()=>{e(""),d()}),i))}(s),c}var di=Object.assign(ci,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:function(e){return 1===e.key.length&&!e.ctrlKey&&!e.metaKey}});var ui=e=>"object"==typeof e&&null!==e&&1===e.nodeType;var pi="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type";function gi(e){return!(!e||e.closest("[inert]"))&&(e.matches(pi)&&(!!ui(t=e)&&(t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0)));var t}function hi(e,t){if(!e)return[];const n=Array.from(e.querySelectorAll(pi)),o=n.filter(fi);return t&&fi(e)&&o.unshift(e),o.forEach(((e,t)=>{if((e=>ui(e)&&"IFRAME"===e.tagName)(e)&&e.contentDocument){const n=hi(e.contentDocument.body);o.splice(t,1,...n)}})),!o.length&&t?n:o}function fi(e){return null!=e&&e.tabIndex>0||gi(e)&&!(parseInt(e.getAttribute("tabindex")||"0",10)<0)}function mi(e){const{root:t,getInitialEl:n,filter:o,enabled:r=!0}=e;if(!r)return;let i=null;if(i||(i="function"==typeof n?n():n),i||(i=t?.querySelector("[data-autofocus],[autofocus]")),!i){const e=hi(t);i=o?e.filter(o)[0]:e[0]}return i||t||void 0}function bi(e){const t=e.currentTarget;if(!t)return!1;const[n,o]=function(e,t){const n=hi(e,t);return[n[0]||null,n[n.length-1]||null]}(t),r=t.ownerDocument||document;return(r.activeElement!==n||!e.shiftKey)&&(!(r.activeElement===o&&!e.shiftKey)&&!(!n&&!o))}function yi(e){if(null==e||!Yr(e))return!1;try{return e instanceof Qr(e).HTMLInputElement&&null!=e.selectionStart||/(textarea|select)/.test(e.localName)||e.isContentEditable}catch{return!1}}var vi=/auto|scroll|overlay|hidden|clip/;function wi(e){const t=globalThis.requestAnimationFrame(e);return()=>{globalThis.cancelAnimationFrame(t)}}function xi(e,t){const{defer:n}=t,o=n?wi:e=>e(),r=[];return r.push(o((()=>{const n="function"==typeof e?e():e;r.push(function(e,t){if(!e)return;const{attributes:n,callback:o}=t,r=new(e.ownerDocument.defaultView||window).MutationObserver((e=>{for(const t of e)"attributes"===t.type&&t.attributeName&&n.includes(t.attributeName)&&o(t)}));return r.observe(e,{attributes:!0,attributeFilter:n}),()=>r.disconnect()}(n,t))}))),()=>{r.forEach((e=>e?.()))}}function ki(e,t){return Array.from(e?.querySelectorAll(t)??[])}function _i(e){const t={getRootNode:e=>e.getRootNode?.()??document,getDoc:e=>Jr(t.getRootNode(e)),getWin:e=>t.getDoc(e).defaultView??window,getActiveElement:e=>t.getDoc(e).activeElement,isActiveElement:(e,n)=>n===t.getActiveElement(e),getById:(e,n)=>t.getRootNode(e).getElementById(n),setValue:(e,t)=>{if(null==e||null==t)return;const n=t.toString();e.value!==n&&(e.value=t.toString())}};return{...t,...e}}function Ti(e,t){const{rootEl:n,...o}=t||{};e&&n&&function(e){const t=Qr(e),{overflow:n,overflowX:o,overflowY:r,display:i}=t.getComputedStyle(e);return vi.test(n+r+o)&&!["inline","contents"].includes(i)}(n)&&function(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}(n)&&e.scrollIntoView(o)}var Si=new WeakMap;function Ei(e,t){if(!e)return()=>{};return function(e,t,n){Si.has(e)||Si.set(e,new Map);const o=Si.get(e),r=o.get(t);if(!r)return o.set(t,n()),()=>{o.get(t)?.(),o.delete(t)};const i=n(),a=()=>{i(),r(),o.delete(t)};return o.set(t,a),()=>{o.get(t)===a&&(i(),o.set(t,r))}}(e,"style",(()=>{const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}))}var Ci=1e3/60;function Pi(e,t){const n=[];return e?.forEach((e=>{const o=function(e,t){const n=e();if(Yr(n)&&n.isConnected)return t(n),()=>{};{const n=setInterval((()=>{const o=e();Yr(o)&&o.isConnected&&(t(o),clearInterval(n))}),Ci);return()=>clearInterval(n)}}(e,t);n.push(o)})),()=>{n.forEach((e=>e()))}}var Ii=e=>"Array"===e?.constructor.name,Oi=(e,t)=>{if(Object.is(e,t))return!0;if(null==e&&null!=t||null!=e&&null==t)return!1;if("function"==typeof e?.isEqual&&"function"==typeof t?.isEqual)return e.isEqual(t);if("function"==typeof e&&"function"==typeof t)return e.toString()===t.toString();if(Ii(e)&&Ii(t))return Array.from(e).toString()===Array.from(t).toString();if("object"!=typeof e||"object"!=typeof t)return!1;const n=Object.keys(t??Object.create(null)),o=n.length;for(let t=0;t<o;t++){if(!Reflect.has(e,n[t]))return!1}for(let r=0;r<o;r++){const o=n[r];if(!Oi(e[o],t[o]))return!1}return!0},Ai=(e,...t)=>("function"==typeof e?e(...t):e)??void 0,$i=()=>{},Ri=(...e)=>(...t)=>{e.forEach((function(e){e?.(...t)}))},Ni=(()=>{let e=0;return()=>(e++,e.toString(36))})(),Li=e=>"number"==typeof e&&!Number.isNaN(e),Di=e=>"function"==typeof e;function Mi(e){if(!Ui(e)||void 0===e)return e;const t=Reflect.ownKeys(e).filter((e=>"string"==typeof e)),n={};for(const o of t){const t=e[o];void 0!==t&&(n[o]=Mi(t))}return n}var Ui=e=>e&&"object"==typeof e&&e.constructor===Object;function Bi(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}var Fi=(e,t,n,o)=>{const r="function"==typeof e?e():e;return r?.addEventListener(t,n,o),()=>{r?.removeEventListener(t,n,o)}};var ji=e=>0===e.button,zi=e=>2===e.button||ti(/^Mac/)&&e.ctrlKey&&0===e.button;function Hi(e){if(!function(e){return e?.matches("a[href]")??!1}(e))return;const t=()=>e.click();ni()?function(e,t,n){const o=(e=>{const t=requestAnimationFrame(e);return()=>cancelAnimationFrame(t)})((()=>{e.removeEventListener(t,r,!0),n()})),r=()=>{o(),n()};e.addEventListener(t,r,{once:!0,capture:!0})}(e,"keyup",t):queueMicrotask(t)}function Vi(e,t,n){if(!e)return;const o=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(o)}var Gi={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Wi={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function qi(e,t={}){const{dir:n="ltr",orientation:o="horizontal"}=t;let{key:r}=e;r=Gi[r]??r;return"rtl"===n&&"horizontal"===o&&r in Wi&&(r=Wi[r]),r}function Ki(e,t="client"){return(e=>"touches"in e&&e.touches.length>0)(e)?function(e,t="client"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}(e,t):function(e,t="client"){return{x:e[`${t}X`],y:e[`${t}Y`]}}(e,t)}const Yi=Math.min,Xi=Math.max,Zi=Math.round,Ji=Math.floor,Qi=e=>({x:e,y:e}),ea={left:"right",right:"left",bottom:"top",top:"bottom"},ta={start:"end",end:"start"};function na(e,t,n){return Xi(e,Yi(t,n))}function oa(e,t){return"function"==typeof e?e(t):e}function ra(e){return e.split("-")[0]}function ia(e){return e.split("-")[1]}function aa(e){return"x"===e?"y":"x"}function sa(e){return"y"===e?"height":"width"}function la(e){return["top","bottom"].includes(ra(e))?"y":"x"}function ca(e){return aa(la(e))}function da(e){return e.replace(/start|end/g,(e=>ta[e]))}function ua(e){return e.replace(/left|right|bottom|top/g,(e=>ea[e]))}function pa(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function ga(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function ha(e,t,n){let{reference:o,floating:r}=e;const i=la(t),a=ca(t),s=sa(a),l=ra(t),c="y"===i,d=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,p=o[s]/2-r[s]/2;let g;switch(l){case"top":g={x:d,y:o.y-r.height};break;case"bottom":g={x:d,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:u};break;case"left":g={x:o.x-r.width,y:u};break;default:g={x:o.x,y:o.y}}switch(ia(t)){case"start":g[a]-=p*(n&&c?-1:1);break;case"end":g[a]+=p*(n&&c?-1:1)}return g}async function fa(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:g=0}=oa(t,e),h=pa(g),f=s[p?"floating"===u?"reference":"floating":u],m=ga(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(f)))||n?f:f.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),b="floating"===u?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),v=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=ga(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:y,strategy:l}):b);return{top:(m.top-w.top+h.top)/v.y,bottom:(w.bottom-m.bottom+h.bottom)/v.y,left:(m.left-w.left+h.left)/v.x,right:(w.right-m.right+h.right)/v.x}}function ma(){return"undefined"!=typeof window}function ba(e){return wa(e)?(e.nodeName||"").toLowerCase():"#document"}function ya(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function va(e){var t;return null==(t=(wa(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function wa(e){return!!ma()&&(e instanceof Node||e instanceof ya(e).Node)}function xa(e){return!!ma()&&(e instanceof Element||e instanceof ya(e).Element)}function ka(e){return!!ma()&&(e instanceof HTMLElement||e instanceof ya(e).HTMLElement)}function _a(e){return!(!ma()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ya(e).ShadowRoot)}function Ta(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Oa(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function Sa(e){return["table","td","th"].includes(ba(e))}function Ea(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Ca(e){const t=Pa(),n=xa(e)?Oa(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Pa(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ia(e){return["html","body","#document"].includes(ba(e))}function Oa(e){return ya(e).getComputedStyle(e)}function Aa(e){return xa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $a(e){if("html"===ba(e))return e;const t=e.assignedSlot||e.parentNode||_a(e)&&e.host||va(e);return _a(t)?t.host:t}function Ra(e){const t=$a(e);return Ia(t)?e.ownerDocument?e.ownerDocument.body:e.body:ka(t)&&Ta(t)?t:Ra(t)}function Na(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=Ra(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),a=ya(r);if(i){const e=function(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}
4
4
  /*!
package/package.json CHANGED
@@ -1,17 +1,10 @@
1
1
  {
2
2
  "name": "@urbiport/js",
3
- "version": "0.0.1",
3
+ "version": "0.0.11",
4
4
  "description": "Javascript library to display bots on your website",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
- "scripts": {
9
- "dev": "rollup --watch --config rollup.config.js",
10
- "build": "rollup --config rollup.config.js",
11
- "lint": "eslint --fix \"src/**/*.ts*\"",
12
- "format:write": "prettier --write ./src",
13
- "format:check": "prettier --check ./src"
14
- },
15
8
  "license": "AGPL-3.0-or-later",
16
9
  "dependencies": {
17
10
  "@ai-sdk/ui-utils": "0.0.36",
@@ -33,18 +26,11 @@
33
26
  "@rollup/plugin-replace": "5.0.7",
34
27
  "@rollup/plugin-terser": "0.4.3",
35
28
  "@rollup/plugin-typescript": "11.1.2",
36
- "@typebot.io/bot-engine": "workspace:*",
37
- "@typebot.io/env": "workspace:*",
38
- "@typebot.io/lib": "workspace:*",
39
- "@typebot.io/schemas": "workspace:*",
40
- "@typebot.io/theme": "workspace:*",
41
- "@typebot.io/tsconfig": "workspace:*",
42
29
  "@types/dompurify": "3.0.3",
43
30
  "autoprefixer": "10.4.14",
44
31
  "babel-preset-solid": "1.7.7",
45
32
  "clsx": "2.0.0",
46
33
  "eslint": "8.44.0",
47
- "eslint-config-custom": "workspace:*",
48
34
  "eslint-plugin-solid": "0.12.1",
49
35
  "postcss": "8.4.26",
50
36
  "react": "18.2.0",
@@ -52,6 +38,20 @@
52
38
  "rollup-plugin-postcss": "4.0.2",
53
39
  "rollup-plugin-typescript-paths": "1.4.0",
54
40
  "tailwindcss": "3.3.3",
55
- "typescript": "5.4.5"
41
+ "typescript": "5.4.5",
42
+ "@typebot.io/bot-engine": "1.0.0",
43
+ "@typebot.io/lib": "1.0.0",
44
+ "@typebot.io/env": "1.0.0",
45
+ "@typebot.io/schemas": "1.0.0",
46
+ "@typebot.io/tsconfig": "0.0.1",
47
+ "@typebot.io/theme": "1.0.0",
48
+ "eslint-config-custom": "0.0.1"
49
+ },
50
+ "scripts": {
51
+ "dev": "rollup --watch --config rollup.config.js",
52
+ "build": "rollup --config rollup.config.js",
53
+ "lint": "eslint --fix \"src/**/*.ts*\"",
54
+ "format:write": "prettier --write ./src",
55
+ "format:check": "prettier --check ./src"
56
56
  }
57
- }
57
+ }