@sapia-ai/chatbot-v3 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/dist/EmbeddedVideoPlayer-SaMMfDIW.js +1277 -0
  2. package/dist/EmbeddedVideoPlayer-SaMMfDIW.js.map +1 -0
  3. package/dist/Preview-Db-hgkTh.js +83 -0
  4. package/dist/Preview-Db-hgkTh.js.map +1 -0
  5. package/dist/api/client.d.ts +60 -0
  6. package/dist/api/config.d.ts +18 -0
  7. package/dist/api/constants.d.ts +5 -0
  8. package/dist/api/index.d.ts +5 -0
  9. package/dist/api/sse.d.ts +12 -0
  10. package/dist/api/types/branding.d.ts +17 -0
  11. package/dist/api/types/messages.d.ts +148 -0
  12. package/dist/api/types/responses.d.ts +106 -0
  13. package/dist/api.js +2 -0
  14. package/dist/classPrivateFieldSet2-DtQPURVD.js +32 -0
  15. package/dist/core/bubbles/convert.d.ts +18 -0
  16. package/dist/core/bubbles/types.d.ts +55 -0
  17. package/dist/core/constants.d.ts +14 -0
  18. package/dist/core/events.d.ts +44 -0
  19. package/dist/core/i18n/fallback.d.ts +2 -0
  20. package/dist/core/i18n/languages.d.ts +11 -0
  21. package/dist/core/i18n/translator.d.ts +13 -0
  22. package/dist/core/interview.d.ts +207 -0
  23. package/dist/core/media/mimeTypes.d.ts +10 -0
  24. package/dist/core/media/recorder.d.ts +61 -0
  25. package/dist/core/persistence.d.ts +4 -0
  26. package/dist/core/store.d.ts +49 -0
  27. package/dist/core/theme/branding.d.ts +6 -0
  28. package/dist/core/theme/cssVariables.d.ts +16 -0
  29. package/dist/core/theme/types.d.ts +11 -0
  30. package/dist/core/validation/phoneCountries.d.ts +21 -0
  31. package/dist/core/validation/pii.d.ts +30 -0
  32. package/dist/dash.all.min-DZ1yEcJk.js +27302 -0
  33. package/dist/dash.all.min-DZ1yEcJk.js.map +1 -0
  34. package/dist/defineProperty-DiFpLzd2.js +39 -0
  35. package/dist/dist-BSi28_cP.js +702 -0
  36. package/dist/dist-BSi28_cP.js.map +1 -0
  37. package/dist/dist-DGBYKC8c.js +14327 -0
  38. package/dist/dist-DGBYKC8c.js.map +1 -0
  39. package/dist/dist-FvHBWiRa.js +76 -0
  40. package/dist/dist-FvHBWiRa.js.map +1 -0
  41. package/dist/embed/compat.d.ts +82 -0
  42. package/dist/embed/constants.d.ts +2 -0
  43. package/dist/embed/createChatbot.d.ts +22 -0
  44. package/dist/fix-webm-duration-BW9Fbdzt.js +1057 -0
  45. package/dist/fix-webm-duration-BW9Fbdzt.js.map +1 -0
  46. package/dist/hls-mBncGwsE.js +18657 -0
  47. package/dist/hls-mBncGwsE.js.map +1 -0
  48. package/dist/index.d.ts +7 -0
  49. package/dist/index.js +4428 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/max-Btet1snX.js +12212 -0
  52. package/dist/max-Btet1snX.js.map +1 -0
  53. package/dist/messages-C4jqrtSG.js +187 -0
  54. package/dist/messages-C4jqrtSG.js.map +1 -0
  55. package/dist/react/AnswerInput.d.ts +21 -0
  56. package/dist/react/SapiaChatbot.d.ts +23 -0
  57. package/dist/react/bubbleViewModel.d.ts +50 -0
  58. package/dist/react/strings.d.ts +98 -0
  59. package/dist/react/useBeforeUnload.d.ts +5 -0
  60. package/dist/react/useVideoRecorder.d.ts +24 -0
  61. package/dist/react-BGJ7Szvq.js +216 -0
  62. package/dist/react-BGJ7Szvq.js.map +1 -0
  63. package/dist/react-BMxM8TWJ.js +192 -0
  64. package/dist/react-BMxM8TWJ.js.map +1 -0
  65. package/dist/react-BVzcquey.js +457 -0
  66. package/dist/react-BVzcquey.js.map +1 -0
  67. package/dist/react-BrCGR7Ca.js +2208 -0
  68. package/dist/react-BrCGR7Ca.js.map +1 -0
  69. package/dist/react-Bujo1aK5.js +334 -0
  70. package/dist/react-Bujo1aK5.js.map +1 -0
  71. package/dist/react-CRTg4gz8.js +367 -0
  72. package/dist/react-CRTg4gz8.js.map +1 -0
  73. package/dist/react-GXf8sbzf.js +311 -0
  74. package/dist/react-GXf8sbzf.js.map +1 -0
  75. package/dist/react-lp7yfM94.js +371 -0
  76. package/dist/react-lp7yfM94.js.map +1 -0
  77. package/dist/sapia-chatbot.css +3 -0
  78. package/dist/sapia.d.ts +4 -0
  79. package/dist/ui/chat/ChatBubble/ChatBubble.d.ts +47 -0
  80. package/dist/ui/chat/ChatLog/ChatLog.d.ts +33 -0
  81. package/dist/ui/chat/TypingIndicator/TypingIndicator.d.ts +17 -0
  82. package/dist/ui/chat/types.d.ts +71 -0
  83. package/dist/ui/constants.d.ts +2 -0
  84. package/dist/ui/inputs/DropdownInput/DropdownInput.d.ts +18 -0
  85. package/dist/ui/inputs/OptionList/OptionList.d.ts +18 -0
  86. package/dist/ui/inputs/PhoneAnswerInput/PhoneAnswerInput.d.ts +19 -0
  87. package/dist/ui/inputs/SliderInput/SliderInput.d.ts +19 -0
  88. package/dist/ui/inputs/TextAnswerInput/TextAnswerInput.d.ts +32 -0
  89. package/dist/ui/inputs/VideoRecorder/VideoRecorder.d.ts +54 -0
  90. package/dist/ui/media/EmbeddedVideo/EmbeddedVideo.d.ts +11 -0
  91. package/dist/ui/media/EmbeddedVideo/EmbeddedVideoPlayer.d.ts +16 -0
  92. package/dist/ui/media/EmbeddedVideo/VimeoPlayer.d.ts +20 -0
  93. package/dist/ui/media/UploadProgress/UploadProgress.d.ts +7 -0
  94. package/dist/ui/media/VideoPlayer/VideoPlayer.d.ts +13 -0
  95. package/dist/ui/primitives/Button/Button.d.ts +6 -0
  96. package/dist/ui/primitives/Dialog/Dialog.d.ts +16 -0
  97. package/dist/ui/richText.d.ts +6 -0
  98. package/dist/ui/shell/AccessVerificationForm/AccessVerificationForm.d.ts +21 -0
  99. package/dist/ui/shell/CopyLinkButton/CopyLinkButton.d.ts +11 -0
  100. package/dist/ui/shell/DoneScreen/DoneScreen.d.ts +15 -0
  101. package/dist/ui/shell/Header/Header.d.ts +13 -0
  102. package/dist/ui/shell/PreparingScreen/PreparingScreen.d.ts +9 -0
  103. package/dist/ui/shell/ProgressBar/ProgressBar.d.ts +9 -0
  104. package/dist/ui/shell/WelcomeScreen/WelcomeScreen.d.ts +22 -0
  105. package/dist/ui/shell/WidgetRoot/WidgetRoot.d.ts +12 -0
  106. package/dist-umd/sapia-chatbot.umd.js +3655 -0
  107. package/dist-umd/sapia-chatbot.umd.js.map +1 -0
  108. package/package.json +94 -0
@@ -0,0 +1,1057 @@
1
+ import { t as e } from "./index.js";
2
+ //#region ../../node_modules/.pnpm/fix-webm-duration@1.0.6/node_modules/fix-webm-duration/fix-webm-duration.js
3
+ var t = /* @__PURE__ */ e(((e, t) => {
4
+ (function(e, n) {
5
+ typeof define == "function" && define.amd ? define(n) : t !== void 0 && t.exports ? t.exports = n() : window.ysFixWebmDuration = n();
6
+ })("fix-webm-duration", function() {
7
+ var e = {
8
+ 172351395: {
9
+ name: "EBML",
10
+ type: "Container"
11
+ },
12
+ 646: {
13
+ name: "EBMLVersion",
14
+ type: "Uint"
15
+ },
16
+ 759: {
17
+ name: "EBMLReadVersion",
18
+ type: "Uint"
19
+ },
20
+ 754: {
21
+ name: "EBMLMaxIDLength",
22
+ type: "Uint"
23
+ },
24
+ 755: {
25
+ name: "EBMLMaxSizeLength",
26
+ type: "Uint"
27
+ },
28
+ 642: {
29
+ name: "DocType",
30
+ type: "String"
31
+ },
32
+ 647: {
33
+ name: "DocTypeVersion",
34
+ type: "Uint"
35
+ },
36
+ 645: {
37
+ name: "DocTypeReadVersion",
38
+ type: "Uint"
39
+ },
40
+ 108: {
41
+ name: "Void",
42
+ type: "Binary"
43
+ },
44
+ 63: {
45
+ name: "CRC-32",
46
+ type: "Binary"
47
+ },
48
+ 190023271: {
49
+ name: "SignatureSlot",
50
+ type: "Container"
51
+ },
52
+ 16010: {
53
+ name: "SignatureAlgo",
54
+ type: "Uint"
55
+ },
56
+ 16026: {
57
+ name: "SignatureHash",
58
+ type: "Uint"
59
+ },
60
+ 16037: {
61
+ name: "SignaturePublicKey",
62
+ type: "Binary"
63
+ },
64
+ 16053: {
65
+ name: "Signature",
66
+ type: "Binary"
67
+ },
68
+ 15963: {
69
+ name: "SignatureElements",
70
+ type: "Container"
71
+ },
72
+ 15995: {
73
+ name: "SignatureElementList",
74
+ type: "Container"
75
+ },
76
+ 9522: {
77
+ name: "SignedElement",
78
+ type: "Binary"
79
+ },
80
+ 139690087: {
81
+ name: "Segment",
82
+ type: "Container"
83
+ },
84
+ 21863284: {
85
+ name: "SeekHead",
86
+ type: "Container"
87
+ },
88
+ 3515: {
89
+ name: "Seek",
90
+ type: "Container"
91
+ },
92
+ 5035: {
93
+ name: "SeekID",
94
+ type: "Binary"
95
+ },
96
+ 5036: {
97
+ name: "SeekPosition",
98
+ type: "Uint"
99
+ },
100
+ 88713574: {
101
+ name: "Info",
102
+ type: "Container"
103
+ },
104
+ 13220: {
105
+ name: "SegmentUID",
106
+ type: "Binary"
107
+ },
108
+ 13188: {
109
+ name: "SegmentFilename",
110
+ type: "String"
111
+ },
112
+ 1882403: {
113
+ name: "PrevUID",
114
+ type: "Binary"
115
+ },
116
+ 1868715: {
117
+ name: "PrevFilename",
118
+ type: "String"
119
+ },
120
+ 2013475: {
121
+ name: "NextUID",
122
+ type: "Binary"
123
+ },
124
+ 1999803: {
125
+ name: "NextFilename",
126
+ type: "String"
127
+ },
128
+ 1092: {
129
+ name: "SegmentFamily",
130
+ type: "Binary"
131
+ },
132
+ 10532: {
133
+ name: "ChapterTranslate",
134
+ type: "Container"
135
+ },
136
+ 10748: {
137
+ name: "ChapterTranslateEditionUID",
138
+ type: "Uint"
139
+ },
140
+ 10687: {
141
+ name: "ChapterTranslateCodec",
142
+ type: "Uint"
143
+ },
144
+ 10661: {
145
+ name: "ChapterTranslateID",
146
+ type: "Binary"
147
+ },
148
+ 710577: {
149
+ name: "TimecodeScale",
150
+ type: "Uint"
151
+ },
152
+ 1161: {
153
+ name: "Duration",
154
+ type: "Float"
155
+ },
156
+ 1121: {
157
+ name: "DateUTC",
158
+ type: "Date"
159
+ },
160
+ 15273: {
161
+ name: "Title",
162
+ type: "String"
163
+ },
164
+ 3456: {
165
+ name: "MuxingApp",
166
+ type: "String"
167
+ },
168
+ 5953: {
169
+ name: "WritingApp",
170
+ type: "String"
171
+ },
172
+ 103: {
173
+ name: "Timecode",
174
+ type: "Uint"
175
+ },
176
+ 6228: {
177
+ name: "SilentTracks",
178
+ type: "Container"
179
+ },
180
+ 6359: {
181
+ name: "SilentTrackNumber",
182
+ type: "Uint"
183
+ },
184
+ 39: {
185
+ name: "Position",
186
+ type: "Uint"
187
+ },
188
+ 43: {
189
+ name: "PrevSize",
190
+ type: "Uint"
191
+ },
192
+ 35: {
193
+ name: "SimpleBlock",
194
+ type: "Binary"
195
+ },
196
+ 32: {
197
+ name: "BlockGroup",
198
+ type: "Container"
199
+ },
200
+ 33: {
201
+ name: "Block",
202
+ type: "Binary"
203
+ },
204
+ 34: {
205
+ name: "BlockVirtual",
206
+ type: "Binary"
207
+ },
208
+ 13729: {
209
+ name: "BlockAdditions",
210
+ type: "Container"
211
+ },
212
+ 38: {
213
+ name: "BlockMore",
214
+ type: "Container"
215
+ },
216
+ 110: {
217
+ name: "BlockAddID",
218
+ type: "Uint"
219
+ },
220
+ 37: {
221
+ name: "BlockAdditional",
222
+ type: "Binary"
223
+ },
224
+ 27: {
225
+ name: "BlockDuration",
226
+ type: "Uint"
227
+ },
228
+ 122: {
229
+ name: "ReferencePriority",
230
+ type: "Uint"
231
+ },
232
+ 123: {
233
+ name: "ReferenceBlock",
234
+ type: "Int"
235
+ },
236
+ 125: {
237
+ name: "ReferenceVirtual",
238
+ type: "Int"
239
+ },
240
+ 36: {
241
+ name: "CodecState",
242
+ type: "Binary"
243
+ },
244
+ 13730: {
245
+ name: "DiscardPadding",
246
+ type: "Int"
247
+ },
248
+ 14: {
249
+ name: "Slices",
250
+ type: "Container"
251
+ },
252
+ 104: {
253
+ name: "TimeSlice",
254
+ type: "Container"
255
+ },
256
+ 76: {
257
+ name: "LaceNumber",
258
+ type: "Uint"
259
+ },
260
+ 77: {
261
+ name: "FrameNumber",
262
+ type: "Uint"
263
+ },
264
+ 75: {
265
+ name: "BlockAdditionID",
266
+ type: "Uint"
267
+ },
268
+ 78: {
269
+ name: "Delay",
270
+ type: "Uint"
271
+ },
272
+ 79: {
273
+ name: "SliceDuration",
274
+ type: "Uint"
275
+ },
276
+ 72: {
277
+ name: "ReferenceFrame",
278
+ type: "Container"
279
+ },
280
+ 73: {
281
+ name: "ReferenceOffset",
282
+ type: "Uint"
283
+ },
284
+ 74: {
285
+ name: "ReferenceTimeCode",
286
+ type: "Uint"
287
+ },
288
+ 47: {
289
+ name: "EncryptedBlock",
290
+ type: "Binary"
291
+ },
292
+ 106212971: {
293
+ name: "Tracks",
294
+ type: "Container"
295
+ },
296
+ 46: {
297
+ name: "TrackEntry",
298
+ type: "Container"
299
+ },
300
+ 87: {
301
+ name: "TrackNumber",
302
+ type: "Uint"
303
+ },
304
+ 13253: {
305
+ name: "TrackUID",
306
+ type: "Uint"
307
+ },
308
+ 3: {
309
+ name: "TrackType",
310
+ type: "Uint"
311
+ },
312
+ 57: {
313
+ name: "FlagEnabled",
314
+ type: "Uint"
315
+ },
316
+ 8: {
317
+ name: "FlagDefault",
318
+ type: "Uint"
319
+ },
320
+ 5546: {
321
+ name: "FlagForced",
322
+ type: "Uint"
323
+ },
324
+ 28: {
325
+ name: "FlagLacing",
326
+ type: "Uint"
327
+ },
328
+ 11751: {
329
+ name: "MinCache",
330
+ type: "Uint"
331
+ },
332
+ 11768: {
333
+ name: "MaxCache",
334
+ type: "Uint"
335
+ },
336
+ 254851: {
337
+ name: "DefaultDuration",
338
+ type: "Uint"
339
+ },
340
+ 216698: {
341
+ name: "DefaultDecodedFieldDuration",
342
+ type: "Uint"
343
+ },
344
+ 209231: {
345
+ name: "TrackTimecodeScale",
346
+ type: "Float"
347
+ },
348
+ 4991: {
349
+ name: "TrackOffset",
350
+ type: "Int"
351
+ },
352
+ 5614: {
353
+ name: "MaxBlockAdditionID",
354
+ type: "Uint"
355
+ },
356
+ 4974: {
357
+ name: "Name",
358
+ type: "String"
359
+ },
360
+ 177564: {
361
+ name: "Language",
362
+ type: "String"
363
+ },
364
+ 6: {
365
+ name: "CodecID",
366
+ type: "String"
367
+ },
368
+ 9122: {
369
+ name: "CodecPrivate",
370
+ type: "Binary"
371
+ },
372
+ 362120: {
373
+ name: "CodecName",
374
+ type: "String"
375
+ },
376
+ 13382: {
377
+ name: "AttachmentLink",
378
+ type: "Uint"
379
+ },
380
+ 1742487: {
381
+ name: "CodecSettings",
382
+ type: "String"
383
+ },
384
+ 1785920: {
385
+ name: "CodecInfoURL",
386
+ type: "String"
387
+ },
388
+ 438848: {
389
+ name: "CodecDownloadURL",
390
+ type: "String"
391
+ },
392
+ 42: {
393
+ name: "CodecDecodeAll",
394
+ type: "Uint"
395
+ },
396
+ 12203: {
397
+ name: "TrackOverlay",
398
+ type: "Uint"
399
+ },
400
+ 5802: {
401
+ name: "CodecDelay",
402
+ type: "Uint"
403
+ },
404
+ 5819: {
405
+ name: "SeekPreRoll",
406
+ type: "Uint"
407
+ },
408
+ 9764: {
409
+ name: "TrackTranslate",
410
+ type: "Container"
411
+ },
412
+ 9980: {
413
+ name: "TrackTranslateEditionUID",
414
+ type: "Uint"
415
+ },
416
+ 9919: {
417
+ name: "TrackTranslateCodec",
418
+ type: "Uint"
419
+ },
420
+ 9893: {
421
+ name: "TrackTranslateTrackID",
422
+ type: "Binary"
423
+ },
424
+ 96: {
425
+ name: "Video",
426
+ type: "Container"
427
+ },
428
+ 26: {
429
+ name: "FlagInterlaced",
430
+ type: "Uint"
431
+ },
432
+ 5048: {
433
+ name: "StereoMode",
434
+ type: "Uint"
435
+ },
436
+ 5056: {
437
+ name: "AlphaMode",
438
+ type: "Uint"
439
+ },
440
+ 5049: {
441
+ name: "OldStereoMode",
442
+ type: "Uint"
443
+ },
444
+ 48: {
445
+ name: "PixelWidth",
446
+ type: "Uint"
447
+ },
448
+ 58: {
449
+ name: "PixelHeight",
450
+ type: "Uint"
451
+ },
452
+ 5290: {
453
+ name: "PixelCropBottom",
454
+ type: "Uint"
455
+ },
456
+ 5307: {
457
+ name: "PixelCropTop",
458
+ type: "Uint"
459
+ },
460
+ 5324: {
461
+ name: "PixelCropLeft",
462
+ type: "Uint"
463
+ },
464
+ 5341: {
465
+ name: "PixelCropRight",
466
+ type: "Uint"
467
+ },
468
+ 5296: {
469
+ name: "DisplayWidth",
470
+ type: "Uint"
471
+ },
472
+ 5306: {
473
+ name: "DisplayHeight",
474
+ type: "Uint"
475
+ },
476
+ 5298: {
477
+ name: "DisplayUnit",
478
+ type: "Uint"
479
+ },
480
+ 5299: {
481
+ name: "AspectRatioType",
482
+ type: "Uint"
483
+ },
484
+ 963876: {
485
+ name: "ColourSpace",
486
+ type: "Binary"
487
+ },
488
+ 1029411: {
489
+ name: "GammaValue",
490
+ type: "Float"
491
+ },
492
+ 230371: {
493
+ name: "FrameRate",
494
+ type: "Float"
495
+ },
496
+ 97: {
497
+ name: "Audio",
498
+ type: "Container"
499
+ },
500
+ 53: {
501
+ name: "SamplingFrequency",
502
+ type: "Float"
503
+ },
504
+ 14517: {
505
+ name: "OutputSamplingFrequency",
506
+ type: "Float"
507
+ },
508
+ 31: {
509
+ name: "Channels",
510
+ type: "Uint"
511
+ },
512
+ 15739: {
513
+ name: "ChannelPositions",
514
+ type: "Binary"
515
+ },
516
+ 8804: {
517
+ name: "BitDepth",
518
+ type: "Uint"
519
+ },
520
+ 98: {
521
+ name: "TrackOperation",
522
+ type: "Container"
523
+ },
524
+ 99: {
525
+ name: "TrackCombinePlanes",
526
+ type: "Container"
527
+ },
528
+ 100: {
529
+ name: "TrackPlane",
530
+ type: "Container"
531
+ },
532
+ 101: {
533
+ name: "TrackPlaneUID",
534
+ type: "Uint"
535
+ },
536
+ 102: {
537
+ name: "TrackPlaneType",
538
+ type: "Uint"
539
+ },
540
+ 105: {
541
+ name: "TrackJoinBlocks",
542
+ type: "Container"
543
+ },
544
+ 109: {
545
+ name: "TrackJoinUID",
546
+ type: "Uint"
547
+ },
548
+ 64: {
549
+ name: "TrickTrackUID",
550
+ type: "Uint"
551
+ },
552
+ 65: {
553
+ name: "TrickTrackSegmentUID",
554
+ type: "Binary"
555
+ },
556
+ 70: {
557
+ name: "TrickTrackFlag",
558
+ type: "Uint"
559
+ },
560
+ 71: {
561
+ name: "TrickMasterTrackUID",
562
+ type: "Uint"
563
+ },
564
+ 68: {
565
+ name: "TrickMasterTrackSegmentUID",
566
+ type: "Binary"
567
+ },
568
+ 11648: {
569
+ name: "ContentEncodings",
570
+ type: "Container"
571
+ },
572
+ 8768: {
573
+ name: "ContentEncoding",
574
+ type: "Container"
575
+ },
576
+ 4145: {
577
+ name: "ContentEncodingOrder",
578
+ type: "Uint"
579
+ },
580
+ 4146: {
581
+ name: "ContentEncodingScope",
582
+ type: "Uint"
583
+ },
584
+ 4147: {
585
+ name: "ContentEncodingType",
586
+ type: "Uint"
587
+ },
588
+ 4148: {
589
+ name: "ContentCompression",
590
+ type: "Container"
591
+ },
592
+ 596: {
593
+ name: "ContentCompAlgo",
594
+ type: "Uint"
595
+ },
596
+ 597: {
597
+ name: "ContentCompSettings",
598
+ type: "Binary"
599
+ },
600
+ 4149: {
601
+ name: "ContentEncryption",
602
+ type: "Container"
603
+ },
604
+ 2017: {
605
+ name: "ContentEncAlgo",
606
+ type: "Uint"
607
+ },
608
+ 2018: {
609
+ name: "ContentEncKeyID",
610
+ type: "Binary"
611
+ },
612
+ 2019: {
613
+ name: "ContentSignature",
614
+ type: "Binary"
615
+ },
616
+ 2020: {
617
+ name: "ContentSigKeyID",
618
+ type: "Binary"
619
+ },
620
+ 2021: {
621
+ name: "ContentSigAlgo",
622
+ type: "Uint"
623
+ },
624
+ 2022: {
625
+ name: "ContentSigHashAlgo",
626
+ type: "Uint"
627
+ },
628
+ 206814059: {
629
+ name: "Cues",
630
+ type: "Container"
631
+ },
632
+ 59: {
633
+ name: "CuePoint",
634
+ type: "Container"
635
+ },
636
+ 51: {
637
+ name: "CueTime",
638
+ type: "Uint"
639
+ },
640
+ 55: {
641
+ name: "CueTrackPositions",
642
+ type: "Container"
643
+ },
644
+ 119: {
645
+ name: "CueTrack",
646
+ type: "Uint"
647
+ },
648
+ 113: {
649
+ name: "CueClusterPosition",
650
+ type: "Uint"
651
+ },
652
+ 112: {
653
+ name: "CueRelativePosition",
654
+ type: "Uint"
655
+ },
656
+ 50: {
657
+ name: "CueDuration",
658
+ type: "Uint"
659
+ },
660
+ 4984: {
661
+ name: "CueBlockNumber",
662
+ type: "Uint"
663
+ },
664
+ 106: {
665
+ name: "CueCodecState",
666
+ type: "Uint"
667
+ },
668
+ 91: {
669
+ name: "CueReference",
670
+ type: "Container"
671
+ },
672
+ 22: {
673
+ name: "CueRefTime",
674
+ type: "Uint"
675
+ },
676
+ 23: {
677
+ name: "CueRefCluster",
678
+ type: "Uint"
679
+ },
680
+ 4959: {
681
+ name: "CueRefNumber",
682
+ type: "Uint"
683
+ },
684
+ 107: {
685
+ name: "CueRefCodecState",
686
+ type: "Uint"
687
+ },
688
+ 155296873: {
689
+ name: "Attachments",
690
+ type: "Container"
691
+ },
692
+ 8615: {
693
+ name: "AttachedFile",
694
+ type: "Container"
695
+ },
696
+ 1662: {
697
+ name: "FileDescription",
698
+ type: "String"
699
+ },
700
+ 1646: {
701
+ name: "FileName",
702
+ type: "String"
703
+ },
704
+ 1632: {
705
+ name: "FileMimeType",
706
+ type: "String"
707
+ },
708
+ 1628: {
709
+ name: "FileData",
710
+ type: "Binary"
711
+ },
712
+ 1710: {
713
+ name: "FileUID",
714
+ type: "Uint"
715
+ },
716
+ 1653: {
717
+ name: "FileReferral",
718
+ type: "Binary"
719
+ },
720
+ 1633: {
721
+ name: "FileUsedStartTime",
722
+ type: "Uint"
723
+ },
724
+ 1634: {
725
+ name: "FileUsedEndTime",
726
+ type: "Uint"
727
+ },
728
+ 4433776: {
729
+ name: "Chapters",
730
+ type: "Container"
731
+ },
732
+ 1465: {
733
+ name: "EditionEntry",
734
+ type: "Container"
735
+ },
736
+ 1468: {
737
+ name: "EditionUID",
738
+ type: "Uint"
739
+ },
740
+ 1469: {
741
+ name: "EditionFlagHidden",
742
+ type: "Uint"
743
+ },
744
+ 1499: {
745
+ name: "EditionFlagDefault",
746
+ type: "Uint"
747
+ },
748
+ 1501: {
749
+ name: "EditionFlagOrdered",
750
+ type: "Uint"
751
+ },
752
+ 54: {
753
+ name: "ChapterAtom",
754
+ type: "Container"
755
+ },
756
+ 13252: {
757
+ name: "ChapterUID",
758
+ type: "Uint"
759
+ },
760
+ 5716: {
761
+ name: "ChapterStringUID",
762
+ type: "String"
763
+ },
764
+ 17: {
765
+ name: "ChapterTimeStart",
766
+ type: "Uint"
767
+ },
768
+ 18: {
769
+ name: "ChapterTimeEnd",
770
+ type: "Uint"
771
+ },
772
+ 24: {
773
+ name: "ChapterFlagHidden",
774
+ type: "Uint"
775
+ },
776
+ 1432: {
777
+ name: "ChapterFlagEnabled",
778
+ type: "Uint"
779
+ },
780
+ 11879: {
781
+ name: "ChapterSegmentUID",
782
+ type: "Binary"
783
+ },
784
+ 11964: {
785
+ name: "ChapterSegmentEditionUID",
786
+ type: "Uint"
787
+ },
788
+ 9155: {
789
+ name: "ChapterPhysicalEquiv",
790
+ type: "Uint"
791
+ },
792
+ 15: {
793
+ name: "ChapterTrack",
794
+ type: "Container"
795
+ },
796
+ 9: {
797
+ name: "ChapterTrackNumber",
798
+ type: "Uint"
799
+ },
800
+ 0: {
801
+ name: "ChapterDisplay",
802
+ type: "Container"
803
+ },
804
+ 5: {
805
+ name: "ChapString",
806
+ type: "String"
807
+ },
808
+ 892: {
809
+ name: "ChapLanguage",
810
+ type: "String"
811
+ },
812
+ 894: {
813
+ name: "ChapCountry",
814
+ type: "String"
815
+ },
816
+ 10564: {
817
+ name: "ChapProcess",
818
+ type: "Container"
819
+ },
820
+ 10581: {
821
+ name: "ChapProcessCodecID",
822
+ type: "Uint"
823
+ },
824
+ 1293: {
825
+ name: "ChapProcessPrivate",
826
+ type: "Binary"
827
+ },
828
+ 10513: {
829
+ name: "ChapProcessCommand",
830
+ type: "Container"
831
+ },
832
+ 10530: {
833
+ name: "ChapProcessTime",
834
+ type: "Uint"
835
+ },
836
+ 10547: {
837
+ name: "ChapProcessData",
838
+ type: "Binary"
839
+ },
840
+ 39109479: {
841
+ name: "Tags",
842
+ type: "Container"
843
+ },
844
+ 13171: {
845
+ name: "Tag",
846
+ type: "Container"
847
+ },
848
+ 9152: {
849
+ name: "Targets",
850
+ type: "Container"
851
+ },
852
+ 10442: {
853
+ name: "TargetTypeValue",
854
+ type: "Uint"
855
+ },
856
+ 9162: {
857
+ name: "TargetType",
858
+ type: "String"
859
+ },
860
+ 9157: {
861
+ name: "TagTrackUID",
862
+ type: "Uint"
863
+ },
864
+ 9161: {
865
+ name: "TagEditionUID",
866
+ type: "Uint"
867
+ },
868
+ 9156: {
869
+ name: "TagChapterUID",
870
+ type: "Uint"
871
+ },
872
+ 9158: {
873
+ name: "TagAttachmentUID",
874
+ type: "Uint"
875
+ },
876
+ 10184: {
877
+ name: "SimpleTag",
878
+ type: "Container"
879
+ },
880
+ 1443: {
881
+ name: "TagName",
882
+ type: "String"
883
+ },
884
+ 1146: {
885
+ name: "TagLanguage",
886
+ type: "String"
887
+ },
888
+ 1156: {
889
+ name: "TagDefault",
890
+ type: "Uint"
891
+ },
892
+ 1159: {
893
+ name: "TagString",
894
+ type: "String"
895
+ },
896
+ 1157: {
897
+ name: "TagBinary",
898
+ type: "Binary"
899
+ }
900
+ };
901
+ function t(e, t) {
902
+ e.prototype = Object.create(t.prototype), e.prototype.constructor = e;
903
+ }
904
+ function n(e, t) {
905
+ this.name = e || "Unknown", this.type = t || "Unknown";
906
+ }
907
+ n.prototype.updateBySource = function() {}, n.prototype.setSource = function(e) {
908
+ this.source = e, this.updateBySource();
909
+ }, n.prototype.updateByData = function() {}, n.prototype.setData = function(e) {
910
+ this.data = e, this.updateByData();
911
+ };
912
+ function r(e, t) {
913
+ n.call(this, e, t || "Uint");
914
+ }
915
+ t(r, n);
916
+ function i(e) {
917
+ return e.length % 2 == 1 ? "0" + e : e;
918
+ }
919
+ r.prototype.updateBySource = function() {
920
+ this.data = "";
921
+ for (var e = 0; e < this.source.length; e++) {
922
+ var t = this.source[e].toString(16);
923
+ this.data += i(t);
924
+ }
925
+ }, r.prototype.updateByData = function() {
926
+ var e = this.data.length / 2;
927
+ this.source = new Uint8Array(e);
928
+ for (var t = 0; t < e; t++) {
929
+ var n = this.data.substr(t * 2, 2);
930
+ this.source[t] = parseInt(n, 16);
931
+ }
932
+ }, r.prototype.getValue = function() {
933
+ return parseInt(this.data, 16);
934
+ }, r.prototype.setValue = function(e) {
935
+ this.setData(i(e.toString(16)));
936
+ };
937
+ function a(e, t) {
938
+ n.call(this, e, t || "Float");
939
+ }
940
+ t(a, n), a.prototype.getFloatArrayType = function() {
941
+ return this.source && this.source.length === 4 ? Float32Array : Float64Array;
942
+ }, a.prototype.updateBySource = function() {
943
+ var e = this.source.reverse(), t = new (this.getFloatArrayType())(e.buffer);
944
+ this.data = t[0];
945
+ }, a.prototype.updateByData = function() {
946
+ var e = new (this.getFloatArrayType())([this.data]), t = new Uint8Array(e.buffer);
947
+ this.source = t.reverse();
948
+ }, a.prototype.getValue = function() {
949
+ return this.data;
950
+ }, a.prototype.setValue = function(e) {
951
+ this.setData(e);
952
+ };
953
+ function o(e, t) {
954
+ n.call(this, e, t || "Container");
955
+ }
956
+ t(o, n), o.prototype.readByte = function() {
957
+ return this.source[this.offset++];
958
+ }, o.prototype.readUint = function() {
959
+ for (var e = this.readByte(), t = 8 - e.toString(2).length, n = e - (1 << 7 - t), r = 0; r < t; r++) n *= 256, n += this.readByte();
960
+ return n;
961
+ }, o.prototype.updateBySource = function() {
962
+ for (this.data = [], this.offset = 0; this.offset < this.source.length; this.offset = s) {
963
+ var t = this.readUint(), i = this.readUint(), s = Math.min(this.offset + i, this.source.length), c = this.source.slice(this.offset, s), l = e[t] || {
964
+ name: "Unknown",
965
+ type: "Unknown"
966
+ }, u = n;
967
+ switch (l.type) {
968
+ case "Container":
969
+ u = o;
970
+ break;
971
+ case "Uint":
972
+ u = r;
973
+ break;
974
+ case "Float":
975
+ u = a;
976
+ break;
977
+ }
978
+ var d = new u(l.name, l.type);
979
+ d.setSource(c), this.data.push({
980
+ id: t,
981
+ idHex: t.toString(16),
982
+ data: d
983
+ });
984
+ }
985
+ }, o.prototype.writeUint = function(e, t) {
986
+ for (var n = 1, r = 128; e >= r && n < 8; n++, r *= 128);
987
+ if (!t) for (var i = r + e, a = n - 1; a >= 0; a--) {
988
+ var o = i % 256;
989
+ this.source[this.offset + a] = o, i = (i - o) / 256;
990
+ }
991
+ this.offset += n;
992
+ }, o.prototype.writeSections = function(e) {
993
+ this.offset = 0;
994
+ for (var t = 0; t < this.data.length; t++) {
995
+ var n = this.data[t], r = n.data.source, i = r.length;
996
+ this.writeUint(n.id, e), this.writeUint(i, e), e || this.source.set(r, this.offset), this.offset += i;
997
+ }
998
+ return this.offset;
999
+ }, o.prototype.updateByData = function() {
1000
+ var e = this.writeSections("draft");
1001
+ this.source = new Uint8Array(e), this.writeSections();
1002
+ }, o.prototype.getSectionById = function(e) {
1003
+ for (var t = 0; t < this.data.length; t++) {
1004
+ var n = this.data[t];
1005
+ if (n.id === e) return n.data;
1006
+ }
1007
+ return null;
1008
+ };
1009
+ function s(e) {
1010
+ o.call(this, "File", "File"), this.setSource(e);
1011
+ }
1012
+ t(s, o), s.prototype.fixDuration = function(e, t) {
1013
+ var n = t && t.logger;
1014
+ n === void 0 ? n = function(e) {
1015
+ console.log(e);
1016
+ } : n || (n = function() {});
1017
+ var r = this.getSectionById(139690087);
1018
+ if (!r) return n("[fix-webm-duration] Segment section is missing"), !1;
1019
+ var i = r.getSectionById(88713574);
1020
+ if (!i) return n("[fix-webm-duration] Info section is missing"), !1;
1021
+ var o = i.getSectionById(710577);
1022
+ if (!o) return n("[fix-webm-duration] TimecodeScale section is missing"), !1;
1023
+ var s = i.getSectionById(1161);
1024
+ if (s) if (s.getValue() <= 0) n(`[fix-webm-duration] Duration section is present, but the value is ${s.getValue()}`), s.setValue(e);
1025
+ else return n(`[fix-webm-duration] Duration section is present, and the value is ${s.getValue()}`), !1;
1026
+ else n("[fix-webm-duration] Duration section is missing"), s = new a("Duration", "Float"), s.setValue(e), i.data.push({
1027
+ id: 1161,
1028
+ data: s
1029
+ });
1030
+ return o.setValue(1e6), i.updateByData(), r.updateByData(), this.updateByData(), !0;
1031
+ }, s.prototype.toBlob = function(e) {
1032
+ return new Blob([this.source.buffer], { type: e || "video/webm" });
1033
+ };
1034
+ function c(e, t, n, r) {
1035
+ if (typeof n == "object" && (r = n, n = void 0), !n) return new Promise(function(n) {
1036
+ c(e, t, n, r);
1037
+ });
1038
+ try {
1039
+ var i = new FileReader();
1040
+ i.onloadend = function() {
1041
+ try {
1042
+ var a = new s(new Uint8Array(i.result));
1043
+ a.fixDuration(t, r) && (e = a.toBlob(e.type));
1044
+ } catch {}
1045
+ n(e);
1046
+ }, i.readAsArrayBuffer(e);
1047
+ } catch {
1048
+ n(e);
1049
+ }
1050
+ }
1051
+ return c.default = c, c;
1052
+ });
1053
+ }));
1054
+ //#endregion
1055
+ export default t();
1056
+
1057
+ //# sourceMappingURL=fix-webm-duration-BW9Fbdzt.js.map