@deep-eye/core 1.3.36 → 1.3.39

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 (174) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/README.md +2 -2
  3. package/dist/chat-token.css +1 -0
  4. package/dist/components/chat/ChatApp.vue.d.ts +5 -3
  5. package/dist/components/chat/ChatApp.vue.d.ts.map +1 -1
  6. package/dist/components/chat/ChatBot.vue.d.ts +5 -3
  7. package/dist/components/chat/ChatBot.vue.d.ts.map +1 -1
  8. package/dist/components/chat/askUser.d.ts +15 -0
  9. package/dist/components/chat/askUser.d.ts.map +1 -1
  10. package/dist/components/chat/attachments.d.ts +2 -0
  11. package/dist/components/chat/attachments.d.ts.map +1 -1
  12. package/dist/components/chat/buildTimelineSegments.d.ts +19 -2
  13. package/dist/components/chat/buildTimelineSegments.d.ts.map +1 -1
  14. package/dist/components/chat/chatEditSend.d.ts +10 -0
  15. package/dist/components/chat/chatEditSend.d.ts.map +1 -0
  16. package/dist/components/chat/chatSessionSidebarAssets.d.ts +4 -0
  17. package/dist/components/chat/chatSessionSidebarAssets.d.ts.map +1 -1
  18. package/dist/components/chat/chatSessionSidebarTypes.d.ts +5 -0
  19. package/dist/components/chat/chatSessionSidebarTypes.d.ts.map +1 -1
  20. package/dist/components/chat/citation/CatalogHighlightList.vue.d.ts +9 -0
  21. package/dist/components/chat/citation/CatalogHighlightList.vue.d.ts.map +1 -0
  22. package/dist/components/chat/citation/CitationHoverLayer.vue.d.ts +25 -0
  23. package/dist/components/chat/citation/CitationHoverLayer.vue.d.ts.map +1 -0
  24. package/dist/components/chat/citation/CitationPreviewDialog.vue.d.ts +22 -0
  25. package/dist/components/chat/citation/CitationPreviewDialog.vue.d.ts.map +1 -0
  26. package/dist/components/chat/citation/ParsedPdfPage.vue.d.ts +26 -0
  27. package/dist/components/chat/citation/ParsedPdfPage.vue.d.ts.map +1 -0
  28. package/dist/components/chat/citation/ParsedPdfPageSkeleton.vue.d.ts +7 -0
  29. package/dist/components/chat/citation/ParsedPdfPageSkeleton.vue.d.ts.map +1 -0
  30. package/dist/components/chat/citation/ParsedPdfPagesViewer.vue.d.ts +23 -0
  31. package/dist/components/chat/citation/ParsedPdfPagesViewer.vue.d.ts.map +1 -0
  32. package/dist/components/chat/citation/locateCitation.d.ts +22 -0
  33. package/dist/components/chat/citation/locateCitation.d.ts.map +1 -0
  34. package/dist/components/chat/citation/renderCitationMarkdown.d.ts +2 -0
  35. package/dist/components/chat/citation/renderCitationMarkdown.d.ts.map +1 -0
  36. package/dist/components/chat/citation/useCitationPreview.d.ts +62 -0
  37. package/dist/components/chat/citation/useCitationPreview.d.ts.map +1 -0
  38. package/dist/components/chat/cloudConfig.d.ts +22 -2
  39. package/dist/components/chat/cloudConfig.d.ts.map +1 -1
  40. package/dist/components/chat/components/ArtifactPreview.vue.d.ts.map +1 -1
  41. package/dist/components/chat/components/ChatActionbar.vue.d.ts +15 -0
  42. package/dist/components/chat/components/ChatActionbar.vue.d.ts.map +1 -1
  43. package/dist/components/chat/components/ChatAttachments.vue.d.ts +3 -0
  44. package/dist/components/chat/components/ChatAttachments.vue.d.ts.map +1 -1
  45. package/dist/components/chat/components/ChatFileCard.vue.d.ts.map +1 -1
  46. package/dist/components/chat/components/ChatFilePreview.vue.d.ts +4 -2
  47. package/dist/components/chat/components/ChatFilePreview.vue.d.ts.map +1 -1
  48. package/dist/components/chat/components/ChatFilePreviewPanel.vue.d.ts +2 -2
  49. package/dist/components/chat/components/ChatFilePreviewPanel.vue.d.ts.map +1 -1
  50. package/dist/components/chat/components/ChatMessage.vue.d.ts +23 -1
  51. package/dist/components/chat/components/ChatMessage.vue.d.ts.map +1 -1
  52. package/dist/components/chat/components/ChatQueue.vue.d.ts +2 -2
  53. package/dist/components/chat/components/ChatReasoning.vue.d.ts +11 -0
  54. package/dist/components/chat/components/ChatReasoning.vue.d.ts.map +1 -1
  55. package/dist/components/chat/components/ChatSender.vue.d.ts +3 -3
  56. package/dist/components/chat/components/ChatSender.vue.d.ts.map +1 -1
  57. package/dist/components/chat/components/ChatSessionOverflowTooltip.vue.d.ts.map +1 -1
  58. package/dist/components/chat/components/ChatSessionSidebar.vue.d.ts.map +1 -1
  59. package/dist/components/chat/components/ConversationList.vue.d.ts +7 -1
  60. package/dist/components/chat/components/ConversationList.vue.d.ts.map +1 -1
  61. package/dist/components/chat/components/InputContentParts.vue.d.ts.map +1 -1
  62. package/dist/components/chat/components/KnowledgeRetrievalProcessRow.vue.d.ts +16 -0
  63. package/dist/components/chat/components/KnowledgeRetrievalProcessRow.vue.d.ts.map +1 -0
  64. package/dist/components/chat/components/MessageBubble.vue.d.ts +23 -1
  65. package/dist/components/chat/components/MessageBubble.vue.d.ts.map +1 -1
  66. package/dist/components/chat/components/OpenFileViewerHost.vue.d.ts +24 -0
  67. package/dist/components/chat/components/OpenFileViewerHost.vue.d.ts.map +1 -0
  68. package/dist/components/chat/components/ProcessStepGroup.vue.d.ts +14 -1
  69. package/dist/components/chat/components/ProcessStepGroup.vue.d.ts.map +1 -1
  70. package/dist/components/chat/components/ReasoningMarkdown.vue.d.ts.map +1 -1
  71. package/dist/components/chat/components/ToolCallPart.vue.d.ts.map +1 -1
  72. package/dist/components/chat/components/UserMessageEditor.vue.d.ts +22 -0
  73. package/dist/components/chat/components/UserMessageEditor.vue.d.ts.map +1 -0
  74. package/dist/components/chat/components/WebSearchProcessRow.vue.d.ts.map +1 -1
  75. package/dist/components/chat/components/document-viewer/DocViewerToolbar.vue.d.ts +2 -2
  76. package/dist/components/chat/components/index.d.ts +2 -1
  77. package/dist/components/chat/components/index.d.ts.map +1 -1
  78. package/dist/components/chat/composables/chatApiRequest.d.ts.map +1 -1
  79. package/dist/components/chat/composables/chatReferenceApi.d.ts +52 -0
  80. package/dist/components/chat/composables/chatReferenceApi.d.ts.map +1 -0
  81. package/dist/components/chat/composables/chatTtsApi.d.ts +14 -0
  82. package/dist/components/chat/composables/chatTtsApi.d.ts.map +1 -0
  83. package/dist/components/chat/composables/useChatSessionSlots.d.ts +3 -0
  84. package/dist/components/chat/composables/useChatSessionSlots.d.ts.map +1 -1
  85. package/dist/components/chat/composables/useTtsPlayback.d.ts +24 -0
  86. package/dist/components/chat/composables/useTtsPlayback.d.ts.map +1 -0
  87. package/dist/components/chat/formatToolArguments.d.ts +8 -1
  88. package/dist/components/chat/formatToolArguments.d.ts.map +1 -1
  89. package/dist/components/chat/harness/DisclosureRow.vue.d.ts.map +1 -1
  90. package/dist/components/chat/harness/icons.d.ts +30 -2
  91. package/dist/components/chat/harness/icons.d.ts.map +1 -1
  92. package/dist/components/chat/harness/index.d.ts +1 -1
  93. package/dist/components/chat/harness/index.d.ts.map +1 -1
  94. package/dist/components/chat/hydrateHistory.d.ts +3 -2
  95. package/dist/components/chat/hydrateHistory.d.ts.map +1 -1
  96. package/dist/components/chat/icons/ChatSpeakingIcon.vue.d.ts +9 -0
  97. package/dist/components/chat/icons/ChatSpeakingIcon.vue.d.ts.map +1 -0
  98. package/dist/components/chat/icons/index.d.ts +1 -0
  99. package/dist/components/chat/icons/index.d.ts.map +1 -1
  100. package/dist/components/chat/index.d.ts +10 -3
  101. package/dist/components/chat/index.d.ts.map +1 -1
  102. package/dist/components/chat/knowledgeRetrieval.d.ts +19 -0
  103. package/dist/components/chat/knowledgeRetrieval.d.ts.map +1 -0
  104. package/dist/components/chat/mdoc/AskUserForm.vue.d.ts.map +1 -1
  105. package/dist/components/chat/mdoc/ContentNodes.vue.d.ts.map +1 -1
  106. package/dist/components/chat/mdoc/textContent.d.ts +9 -0
  107. package/dist/components/chat/mdoc/textContent.d.ts.map +1 -1
  108. package/dist/components/chat/mdoc/widget/InlineWidgetCard.vue.d.ts +17 -0
  109. package/dist/components/chat/mdoc/widget/InlineWidgetCard.vue.d.ts.map +1 -0
  110. package/dist/components/chat/mdoc/widget/parseWidget.d.ts +32 -0
  111. package/dist/components/chat/mdoc/widget/parseWidget.d.ts.map +1 -0
  112. package/dist/components/chat/mdoc/widget/sanitizeSvg.d.ts +8 -0
  113. package/dist/components/chat/mdoc/widget/sanitizeSvg.d.ts.map +1 -0
  114. package/dist/components/chat/mdoc/widget/widgetDownload.d.ts +28 -0
  115. package/dist/components/chat/mdoc/widget/widgetDownload.d.ts.map +1 -0
  116. package/dist/components/chat/mentionEditor.d.ts +2 -0
  117. package/dist/components/chat/mentionEditor.d.ts.map +1 -1
  118. package/dist/components/chat/messageChrome.d.ts +8 -1
  119. package/dist/components/chat/messageChrome.d.ts.map +1 -1
  120. package/dist/components/chat/morphOrb/fromSteps.d.ts.map +1 -1
  121. package/dist/components/chat/openFileViewer.d.ts +22 -0
  122. package/dist/components/chat/openFileViewer.d.ts.map +1 -0
  123. package/dist/components/chat/previewRenderers.d.ts +8 -1
  124. package/dist/components/chat/previewRenderers.d.ts.map +1 -1
  125. package/dist/components/chat/processGroupSummary.d.ts +23 -11
  126. package/dist/components/chat/processGroupSummary.d.ts.map +1 -1
  127. package/dist/components/chat/responseStream.d.ts +11 -1
  128. package/dist/components/chat/responseStream.d.ts.map +1 -1
  129. package/dist/components/chat/restartUserTurn.d.ts +12 -0
  130. package/dist/components/chat/restartUserTurn.d.ts.map +1 -0
  131. package/dist/components/chat/toolLabels.d.ts +10 -0
  132. package/dist/components/chat/toolLabels.d.ts.map +1 -1
  133. package/dist/components/chat/types.d.ts +63 -4
  134. package/dist/components/chat/types.d.ts.map +1 -1
  135. package/dist/components/skill/components/ChatSkillCard.vue.d.ts.map +1 -1
  136. package/dist/components/ui/components/UiPopover.vue.d.ts +48 -0
  137. package/dist/components/ui/components/UiPopover.vue.d.ts.map +1 -0
  138. package/dist/components/ui/components/index.d.ts +1 -0
  139. package/dist/components/ui/components/index.d.ts.map +1 -1
  140. package/dist/{index-C-_Ruklc.js → index-BglIsE2F.js} +1 -1
  141. package/dist/{index-DAi7oZ-t.js → index-Cu2OIMVP.js} +81537 -76817
  142. package/dist/{index-CSngFmD5.cjs → index-DJ6ebHrV.cjs} +1 -1
  143. package/dist/index-YbPtpb2R.cjs +1215 -0
  144. package/dist/index.cjs +1 -1
  145. package/dist/index.js +366 -343
  146. package/dist/style.css +2 -2
  147. package/package.json +2 -1
  148. package/dist/errors-CHzikrqu.js +0 -70
  149. package/dist/errors-upLl4kf2.cjs +0 -1
  150. package/dist/index-CmSyVjHn.cjs +0 -1129
  151. package/dist/media-community-skin-Djo8L1G9.js +0 -302
  152. package/dist/media-community-skin-YI6NjsJg.cjs +0 -1
  153. package/dist/media-core-CkW37AYl.js +0 -3827
  154. package/dist/media-core-Rxz2MNwG.cjs +0 -1
  155. package/dist/media-outlet-CZTh6XmJ.cjs +0 -1
  156. package/dist/media-outlet-D2rcuhYN.js +0 -2
  157. package/dist/media-player-BZrIM0O_.js +0 -387
  158. package/dist/media-player-D_USOhtK.cjs +0 -1
  159. package/dist/media-ui-DfPbRfFS.js +0 -2832
  160. package/dist/media-ui-zZVnK1ts.cjs +0 -1
  161. package/dist/prod-Ba2x-T01.cjs +0 -4
  162. package/dist/prod-DBMM0zDd.js +0 -992
  163. package/dist/provider-B7wAEcCR.js +0 -163
  164. package/dist/provider-BPphQwpc.cjs +0 -1
  165. package/dist/provider-BSeBwvzM.cjs +0 -1
  166. package/dist/provider-DgSZc2dM.js +0 -162
  167. package/dist/provider-EKFFiZS1.js +0 -27
  168. package/dist/provider-O8r0RFmF.cjs +0 -1
  169. package/dist/provider-WrRdjcjY.js +0 -483
  170. package/dist/provider-sqICX3H9.cjs +0 -1
  171. package/dist/srt-parser-BECMkbXb.cjs +0 -2
  172. package/dist/srt-parser-BR28Llpk.js +0 -27
  173. package/dist/ssa-parser-BJTK0kd-.js +0 -209
  174. package/dist/ssa-parser-CuKkTpK_.cjs +0 -4
@@ -1,163 +0,0 @@
1
- var a = Object.defineProperty;
2
- var g = (i, t, e) => t in i ? a(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
- var h = (i, t, e) => g(i, typeof t != "symbol" ? t + "" : t, e);
4
- import { X as f, Y as p, Z as d, _ as v, a0 as L, a1 as S, a2 as m, a3 as w, z as y } from "./media-core-CkW37AYl.js";
5
- import { VideoProvider as E } from "./provider-DgSZc2dM.js";
6
- import { a as H } from "./provider-WrRdjcjY.js";
7
- class j {
8
- constructor(t, e, r) {
9
- this.Bh = t, this.ph = e, this.jf = r, this.Ch();
10
- }
11
- async Ch() {
12
- const t = {
13
- onLoadStart: this.ge.bind(this),
14
- onLoaded: this.ue.bind(this),
15
- onLoadError: this.Dh.bind(this)
16
- };
17
- let e = await C(this.Bh, t);
18
- if (f(e) && !p(this.Bh) && (e = await D(this.Bh, t)), !e)
19
- return null;
20
- if (!e.isSupported()) {
21
- const r = "[vidstack]: `hls.js` is not supported in this environment";
22
- return this.ph.player.dispatchEvent(new d("hls-unsupported")), this.ph.delegate.p("error", { detail: { message: r, code: 4 } }), null;
23
- }
24
- return e;
25
- }
26
- ge() {
27
- this.ph.player.dispatchEvent(new d("hls-lib-load-start"));
28
- }
29
- ue(t) {
30
- this.ph.player.dispatchEvent(
31
- new d("hls-lib-loaded", {
32
- detail: t
33
- })
34
- ), this.jf(t);
35
- }
36
- Dh(t) {
37
- const e = v(t);
38
- this.ph.player.dispatchEvent(
39
- new d("hls-lib-load-error", {
40
- detail: e
41
- })
42
- ), this.ph.delegate.p("error", {
43
- detail: { message: e.message, code: 4 }
44
- });
45
- }
46
- }
47
- async function D(i, t = {}) {
48
- var e, r, o, n, u;
49
- if (!f(i)) {
50
- if ((e = t.onLoadStart) == null || e.call(t), i.prototype && i.prototype !== Function)
51
- return (r = t.onLoaded) == null || r.call(t, i), i;
52
- try {
53
- const s = (o = await i()) == null ? void 0 : o.default;
54
- if (s && s.isSupported)
55
- (n = t.onLoaded) == null || n.call(t, s);
56
- else
57
- throw Error(
58
- ""
59
- );
60
- return s;
61
- } catch (s) {
62
- (u = t.onLoadError) == null || u.call(t, s);
63
- }
64
- }
65
- }
66
- async function C(i, t = {}) {
67
- var e, r, o;
68
- if (p(i)) {
69
- (e = t.onLoadStart) == null || e.call(t);
70
- try {
71
- if (await L(i), !S(window.Hls))
72
- throw Error(
73
- ""
74
- );
75
- const n = window.Hls;
76
- return (r = t.onLoaded) == null || r.call(t, n), n;
77
- } catch (n) {
78
- (o = t.onLoadError) == null || o.call(t, n);
79
- }
80
- }
81
- }
82
- const $ = "https://cdn.jsdelivr.net";
83
- class B extends E {
84
- constructor() {
85
- super(...arguments);
86
- h(this, "$$PROVIDER_TYPE", "HLS");
87
- h(this, "mh", null);
88
- h(this, "od", new H(this.video));
89
- h(this, "lh", `${$}/npm/hls.js@^1.0.0/dist/hls.min.js`);
90
- }
91
- /**
92
- * The `hls.js` constructor.
93
- */
94
- get ctor() {
95
- return this.mh;
96
- }
97
- /**
98
- * The current `hls.js` instance.
99
- */
100
- get instance() {
101
- return this.od.instance;
102
- }
103
- get type() {
104
- return "hls";
105
- }
106
- get canLiveSync() {
107
- return !0;
108
- }
109
- /**
110
- * The `hls.js` configuration object.
111
- *
112
- * @see {@link https://github.com/video-dev/hls.js/blob/master/docs/API.md#fine-tuning}
113
- */
114
- get config() {
115
- return this.od.nh;
116
- }
117
- set config(e) {
118
- this.od.nh = e;
119
- }
120
- /**
121
- * The `hls.js` constructor (supports dynamic imports) or a URL of where it can be found.
122
- *
123
- * @defaultValue `https://cdn.jsdelivr.net/npm/hls.js@^1.0.0/dist/hls.min.js`
124
- */
125
- get library() {
126
- return this.lh;
127
- }
128
- set library(e) {
129
- this.lh = e;
130
- }
131
- preconnect() {
132
- p(this.lh) && w(this.lh);
133
- }
134
- setup(e) {
135
- super.setup(e), new j(this.lh, e, (r) => {
136
- this.mh = r, this.od.setup(r, e), e.delegate.p("provider-setup", { detail: this });
137
- const o = y(e.$store.source);
138
- o && this.loadSource(o);
139
- });
140
- }
141
- async loadSource({ src: e }) {
142
- var r;
143
- p(e) && ((r = this.od.instance) == null || r.loadSource(e));
144
- }
145
- /**
146
- * The given callback is invoked when a new `hls.js` instance is created and right before it's
147
- * attached to media.
148
- */
149
- onInstance(e) {
150
- const r = this.od.instance;
151
- return r && e(r), this.od.oh.add(e), () => this.od.oh.delete(e);
152
- }
153
- destroy() {
154
- this.od.Jg();
155
- }
156
- }
157
- /**
158
- * Whether `hls.js` is supported in this environment.
159
- */
160
- h(B, "supported", m());
161
- export {
162
- B as HLSProvider
163
- };
@@ -1 +0,0 @@
1
- "use strict";var f=Object.defineProperty;var v=(r,t,e)=>t in r?f(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var h=(r,t,e)=>v(r,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./media-core-Rxz2MNwG.cjs"),S=require("./provider-O8r0RFmF.cjs"),g=require("./provider-sqICX3H9.cjs");class L{constructor(t,e,i){this.Bh=t,this.ph=e,this.jf=i,this.Ch()}async Ch(){const t={onLoadStart:this.ge.bind(this),onLoaded:this.ue.bind(this),onLoadError:this.Dh.bind(this)};let e=await w(this.Bh,t);if(n.isUndefined(e)&&!n.isString(this.Bh)&&(e=await y(this.Bh,t)),!e)return null;if(!e.isSupported()){const i="[vidstack]: `hls.js` is not supported in this environment";return this.ph.player.dispatchEvent(new n.DOMEvent("hls-unsupported")),this.ph.delegate.p("error",{detail:{message:i,code:4}}),null}return e}ge(){this.ph.player.dispatchEvent(new n.DOMEvent("hls-lib-load-start"))}ue(t){this.ph.player.dispatchEvent(new n.DOMEvent("hls-lib-loaded",{detail:t})),this.jf(t)}Dh(t){const e=n.coerceToError(t);this.ph.player.dispatchEvent(new n.DOMEvent("hls-lib-load-error",{detail:e})),this.ph.delegate.p("error",{detail:{message:e.message,code:4}})}}async function y(r,t={}){var e,i,o,s,u;if(!n.isUndefined(r)){if((e=t.onLoadStart)==null||e.call(t),r.prototype&&r.prototype!==Function)return(i=t.onLoaded)==null||i.call(t,r),r;try{const d=(o=await r())==null?void 0:o.default;if(d&&d.isSupported)(s=t.onLoaded)==null||s.call(t,d);else throw Error("");return d}catch(d){(u=t.onLoadError)==null||u.call(t,d)}}}async function w(r,t={}){var e,i,o;if(n.isString(r)){(e=t.onLoadStart)==null||e.call(t);try{if(await n.loadScript(r),!n.isFunction(window.Hls))throw Error("");const s=window.Hls;return(i=t.onLoaded)==null||i.call(t,s),s}catch(s){(o=t.onLoadError)==null||o.call(t,s)}}}const E="https://cdn.jsdelivr.net";class p extends S.VideoProvider{constructor(){super(...arguments);h(this,"$$PROVIDER_TYPE","HLS");h(this,"mh",null);h(this,"od",new g.HLSController(this.video));h(this,"lh",`${E}/npm/hls.js@^1.0.0/dist/hls.min.js`)}get ctor(){return this.mh}get instance(){return this.od.instance}get type(){return"hls"}get canLiveSync(){return!0}get config(){return this.od.nh}set config(e){this.od.nh=e}get library(){return this.lh}set library(e){this.lh=e}preconnect(){n.isString(this.lh)&&n.preconnect(this.lh)}setup(e){super.setup(e),new L(this.lh,e,i=>{this.mh=i,this.od.setup(i,e),e.delegate.p("provider-setup",{detail:this});const o=n.peek(e.$store.source);o&&this.loadSource(o)})}async loadSource({src:e}){var i;n.isString(e)&&((i=this.od.instance)==null||i.loadSource(e))}onInstance(e){const i=this.od.instance;return i&&e(i),this.od.oh.add(e),()=>this.od.oh.delete(e)}destroy(){this.od.Jg()}}h(p,"supported",n.isHLSSupported());exports.HLSProvider=p;
@@ -1 +0,0 @@
1
- "use strict";var d=Object.defineProperty;var u=(i,e,r)=>e in i?d(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r;var t=(i,e,r)=>u(i,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./provider-sqICX3H9.cjs");class s extends o.HTMLMediaProvider{constructor(){super(...arguments);t(this,"$$PROVIDER_TYPE","AUDIO")}get type(){return"audio"}setup(r){super.setup(r),this.type==="audio"&&r.delegate.p("provider-setup",{detail:this})}get audio(){return this.j}}exports.AudioProvider=s;
@@ -1,162 +0,0 @@
1
- var T = Object.defineProperty;
2
- var P = (s, e, t) => e in s ? T(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var r = (s, e, t) => P(s, typeof e != "symbol" ? e + "" : e, t);
4
- import { aD as d, aL as f, aM as u, aN as k, aO as I, t as c, aP as l, aQ as p, Z as E, aR as H, aS as o } from "./media-core-CkW37AYl.js";
5
- import { H as v } from "./provider-WrRdjcjY.js";
6
- class q {
7
- constructor(e, t) {
8
- this.qa = e, this.ph = t, e.textTracks.onaddtrack = this.va.bind(this), d(this.Eh.bind(this));
9
- }
10
- va(e) {
11
- const t = e.track;
12
- if (!t || A(this.qa, t))
13
- return;
14
- const i = new f({
15
- id: t.id,
16
- kind: t.kind,
17
- label: t.label,
18
- language: t.language,
19
- type: "vtt"
20
- });
21
- i[u] = { track: t }, i[k] = 2, i[I] = !0;
22
- let n = 0;
23
- const h = (g) => {
24
- if (t.cues)
25
- for (let a = n; a < t.cues.length; a++)
26
- i.addCue(t.cues[a], g), n++;
27
- };
28
- h(e), t.oncuechange = h, this.ph.textTracks.add(i, e), i.setMode(t.mode, e);
29
- }
30
- Eh() {
31
- var e;
32
- this.qa.textTracks.onaddtrack = null;
33
- for (const t of this.ph.textTracks) {
34
- const i = (e = t[u]) == null ? void 0 : e.track;
35
- i != null && i.oncuechange && (i.oncuechange = null);
36
- }
37
- }
38
- }
39
- function A(s, e) {
40
- return Array.from(s.children).find((t) => t.track === e);
41
- }
42
- class x {
43
- constructor(e, t) {
44
- r(this, "Hc", (e, t) => {
45
- this.j.delegate.p("picture-in-picture-change", {
46
- detail: e,
47
- trigger: t
48
- });
49
- });
50
- this.qa = e, this.j = t, c(this.qa, "enterpictureinpicture", this.Fh.bind(this)), c(this.qa, "leavepictureinpicture", this.Gh.bind(this));
51
- }
52
- get active() {
53
- return document.pictureInPictureElement === this.qa;
54
- }
55
- get supported() {
56
- return l(this.qa);
57
- }
58
- async enter() {
59
- return this.qa.requestPictureInPicture();
60
- }
61
- exit() {
62
- return document.exitPictureInPicture();
63
- }
64
- Fh(e) {
65
- this.Hc(!0, e);
66
- }
67
- Gh(e) {
68
- this.Hc(!1, e);
69
- }
70
- }
71
- class G {
72
- constructor(e, t) {
73
- r(this, "Ga", "inline");
74
- this.qa = e, this.j = t, c(this.qa, "webkitpresentationmodechanged", this.Kh.bind(this));
75
- }
76
- get Jh() {
77
- return p(this.qa);
78
- }
79
- async Ih(e) {
80
- this.Ga !== e && this.qa.webkitSetPresentationMode(e);
81
- }
82
- Kh() {
83
- var t;
84
- const e = this.Ga;
85
- this.Ga = this.qa.webkitPresentationMode, (t = this.j.player) == null || t.dispatchEvent(
86
- new E("video-presentation-change", {
87
- detail: this.Ga,
88
- trigger: event
89
- })
90
- ), ["fullscreen", "picture-in-picture"].forEach((i) => {
91
- (this.Ga === i || e === i) && this.j.delegate.p(`${i}-change`, {
92
- detail: this.Ga === i,
93
- trigger: event
94
- });
95
- });
96
- }
97
- }
98
- class b {
99
- constructor(e) {
100
- this.Hh = e;
101
- }
102
- get active() {
103
- return this.Hh.Ga === "fullscreen";
104
- }
105
- get supported() {
106
- return this.Hh.Jh;
107
- }
108
- async enter() {
109
- this.Hh.Ih("fullscreen");
110
- }
111
- async exit() {
112
- this.Hh.Ih("inline");
113
- }
114
- }
115
- class m {
116
- constructor(e) {
117
- this.Hh = e;
118
- }
119
- get active() {
120
- return this.Hh.Ga === "picture-in-picture";
121
- }
122
- get supported() {
123
- return this.Hh.Jh;
124
- }
125
- async enter() {
126
- this.Hh.Ih("picture-in-picture");
127
- }
128
- async exit() {
129
- this.Hh.Ih("inline");
130
- }
131
- }
132
- class V extends v {
133
- constructor(t, i) {
134
- super(t);
135
- r(this, "$$PROVIDER_TYPE", "VIDEO");
136
- r(this, "fullscreen");
137
- r(this, "pictureInPicture");
138
- if (p(t)) {
139
- const n = new G(t, i);
140
- this.fullscreen = new b(n), this.pictureInPicture = new m(n);
141
- } else l(t) && (this.pictureInPicture = new x(t, i));
142
- }
143
- get type() {
144
- return "video";
145
- }
146
- setup(t) {
147
- super.setup(t), H(this.video) && new q(this.video, t), t.textRenderers[o](this.video), d(() => {
148
- t.textRenderers[o](null);
149
- }), this.type === "video" && t.delegate.p("provider-setup", { detail: this });
150
- }
151
- /**
152
- * The native HTML `<video>` element.
153
- *
154
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement}
155
- */
156
- get video() {
157
- return this.j;
158
- }
159
- }
160
- export {
161
- V as VideoProvider
162
- };
@@ -1,27 +0,0 @@
1
- var d = Object.defineProperty;
2
- var s = (i, e, t) => e in i ? d(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var r = (i, e, t) => s(i, typeof e != "symbol" ? e + "" : e, t);
4
- import { H as p } from "./provider-WrRdjcjY.js";
5
- class a extends p {
6
- constructor() {
7
- super(...arguments);
8
- r(this, "$$PROVIDER_TYPE", "AUDIO");
9
- }
10
- get type() {
11
- return "audio";
12
- }
13
- setup(t) {
14
- super.setup(t), this.type === "audio" && t.delegate.p("provider-setup", { detail: this });
15
- }
16
- /**
17
- * The native HTML `<audio>` element.
18
- *
19
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement}
20
- */
21
- get audio() {
22
- return this.j;
23
- }
24
- }
25
- export {
26
- a as AudioProvider
27
- };
@@ -1 +0,0 @@
1
- "use strict";var o=Object.defineProperty;var d=(s,t,e)=>t in s?o(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var n=(s,t,e)=>d(s,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./media-core-Rxz2MNwG.cjs"),l=require("./provider-sqICX3H9.cjs");class p{constructor(t,e){this.qa=t,this.ph=e,t.textTracks.onaddtrack=this.va.bind(this),r.onDispose(this.Eh.bind(this))}va(t){const e=t.track;if(!e||T(this.qa,e))return;const i=new r.TextTrack({id:e.id,kind:e.kind,label:e.label,language:e.language,type:"vtt"});i[r.TEXT_TRACK_NATIVE]={track:e},i[r.TEXT_TRACK_READY_STATE]=2,i[r.TEXT_TRACK_NATIVE_HLS]=!0;let a=0;const h=u=>{if(e.cues)for(let c=a;c<e.cues.length;c++)i.addCue(e.cues[c],u),a++};h(t),e.oncuechange=h,this.ph.textTracks.add(i,t),i.setMode(e.mode,t)}Eh(){var t;this.qa.textTracks.onaddtrack=null;for(const e of this.ph.textTracks){const i=(t=e[r.TEXT_TRACK_NATIVE])==null?void 0:t.track;i!=null&&i.oncuechange&&(i.oncuechange=null)}}}function T(s,t){return Array.from(s.children).find(e=>e.track===t)}class g{constructor(t,e){n(this,"Hc",(t,e)=>{this.j.delegate.p("picture-in-picture-change",{detail:t,trigger:e})});this.qa=t,this.j=e,r.listenEvent(this.qa,"enterpictureinpicture",this.Fh.bind(this)),r.listenEvent(this.qa,"leavepictureinpicture",this.Gh.bind(this))}get active(){return document.pictureInPictureElement===this.qa}get supported(){return r.canUsePictureInPicture(this.qa)}async enter(){return this.qa.requestPictureInPicture()}exit(){return document.exitPictureInPicture()}Fh(t){this.Hc(!0,t)}Gh(t){this.Hc(!1,t)}}class P{constructor(t,e){n(this,"Ga","inline");this.qa=t,this.j=e,r.listenEvent(this.qa,"webkitpresentationmodechanged",this.Kh.bind(this))}get Jh(){return r.canUseVideoPresentation(this.qa)}async Ih(t){this.Ga!==t&&this.qa.webkitSetPresentationMode(t)}Kh(){var e;const t=this.Ga;this.Ga=this.qa.webkitPresentationMode,(e=this.j.player)==null||e.dispatchEvent(new r.DOMEvent("video-presentation-change",{detail:this.Ga,trigger:event})),["fullscreen","picture-in-picture"].forEach(i=>{(this.Ga===i||t===i)&&this.j.delegate.p(`${i}-change`,{detail:this.Ga===i,trigger:event})})}}class f{constructor(t){this.Hh=t}get active(){return this.Hh.Ga==="fullscreen"}get supported(){return this.Hh.Jh}async enter(){this.Hh.Ih("fullscreen")}async exit(){this.Hh.Ih("inline")}}class E{constructor(t){this.Hh=t}get active(){return this.Hh.Ga==="picture-in-picture"}get supported(){return this.Hh.Jh}async enter(){this.Hh.Ih("picture-in-picture")}async exit(){this.Hh.Ih("inline")}}class I extends l.HTMLMediaProvider{constructor(e,i){super(e);n(this,"$$PROVIDER_TYPE","VIDEO");n(this,"fullscreen");n(this,"pictureInPicture");if(r.canUseVideoPresentation(e)){const a=new P(e,i);this.fullscreen=new f(a),this.pictureInPicture=new E(a)}else r.canUsePictureInPicture(e)&&(this.pictureInPicture=new g(e,i))}get type(){return"video"}setup(e){super.setup(e),r.canPlayHLSNatively(this.video)&&new p(this.video,e),e.textRenderers[r.ATTACH_VIDEO](this.video),r.onDispose(()=>{e.textRenderers[r.ATTACH_VIDEO](null)}),this.type==="video"&&e.delegate.p("provider-setup",{detail:this})}get video(){return this.j}}exports.VideoProvider=I;