@corti/dictation-web 0.6.1-rc.1 → 0.7.0-ambient.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +2031 -1594
- package/dist/components/ambient-recording-button.d.ts +16 -0
- package/dist/components/ambient-recording-button.js +68 -0
- package/dist/components/ambient-recording-button.js.map +1 -0
- package/dist/components/corti-ambient.d.ts +27 -0
- package/dist/components/corti-ambient.js +97 -0
- package/dist/components/corti-ambient.js.map +1 -0
- package/dist/components/corti-dictation.d.ts +9 -109
- package/dist/components/corti-dictation.js +12 -187
- package/dist/components/corti-dictation.js.map +1 -1
- package/dist/components/corti-root.d.ts +121 -0
- package/dist/components/corti-root.js +196 -0
- package/dist/components/corti-root.js.map +1 -0
- package/dist/components/device-selector.js +2 -2
- package/dist/components/device-selector.js.map +1 -1
- package/dist/components/dictation-recording-button.d.ts +13 -0
- package/dist/components/dictation-recording-button.js +30 -0
- package/dist/components/dictation-recording-button.js.map +1 -0
- package/dist/components/keybinding-input.js +1 -1
- package/dist/components/keybinding-input.js.map +1 -1
- package/dist/components/keybinding-selector.js +1 -1
- package/dist/components/keybinding-selector.js.map +1 -1
- package/dist/components/language-selector.d.ts +1 -1
- package/dist/components/language-selector.js +5 -5
- package/dist/components/language-selector.js.map +1 -1
- package/dist/components/{recording-button.d.ts → recording-button-base.d.ts} +7 -9
- package/dist/components/recording-button-base.js +321 -0
- package/dist/components/recording-button-base.js.map +1 -0
- package/dist/components/settings-menu.js +1 -1
- package/dist/components/settings-menu.js.map +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +9 -0
- package/dist/constants.js.map +1 -1
- package/dist/contexts/ambient-context.d.ts +20 -0
- package/dist/contexts/ambient-context.js +60 -0
- package/dist/contexts/ambient-context.js.map +1 -0
- package/dist/contexts/dictation-context.d.ts +5 -92
- package/dist/contexts/dictation-context.js +14 -254
- package/dist/contexts/dictation-context.js.map +1 -1
- package/dist/contexts/mixins/auth-context.d.ts +32 -0
- package/dist/contexts/mixins/auth-context.js +116 -0
- package/dist/contexts/mixins/auth-context.js.map +1 -0
- package/dist/contexts/mixins/devices-context.d.ts +14 -0
- package/dist/contexts/mixins/devices-context.js +58 -0
- package/dist/contexts/mixins/devices-context.js.map +1 -0
- package/dist/contexts/mixins/keybindings-context.d.ts +13 -0
- package/dist/contexts/mixins/keybindings-context.js +62 -0
- package/dist/contexts/mixins/keybindings-context.js.map +1 -0
- package/dist/contexts/mixins/languages-context.d.ts +16 -0
- package/dist/contexts/mixins/languages-context.js +73 -0
- package/dist/contexts/mixins/languages-context.js.map +1 -0
- package/dist/contexts/mixins/proxy-context.d.ts +14 -0
- package/dist/contexts/mixins/proxy-context.js +24 -0
- package/dist/contexts/mixins/proxy-context.js.map +1 -0
- package/dist/contexts/mixins/recording-state-context.d.ts +13 -0
- package/dist/contexts/mixins/recording-state-context.js +30 -0
- package/dist/contexts/mixins/recording-state-context.js.map +1 -0
- package/dist/contexts/mixins/types.d.ts +5 -0
- package/dist/contexts/mixins/types.js +2 -0
- package/dist/contexts/mixins/types.js.map +1 -0
- package/dist/contexts/root-context.d.ts +8 -0
- package/dist/contexts/root-context.js +34 -0
- package/dist/contexts/root-context.js.map +1 -0
- package/dist/controllers/ambient-controller.d.ts +16 -0
- package/dist/controllers/ambient-controller.js +24 -0
- package/dist/controllers/ambient-controller.js.map +1 -0
- package/dist/controllers/dictation-controller.d.ts +8 -31
- package/dist/controllers/dictation-controller.js +17 -283
- package/dist/controllers/dictation-controller.js.map +1 -1
- package/dist/controllers/languages-controller.d.ts +2 -1
- package/dist/controllers/languages-controller.js +2 -5
- package/dist/controllers/languages-controller.js.map +1 -1
- package/dist/controllers/socket-controller.d.ts +51 -0
- package/dist/controllers/socket-controller.js +281 -0
- package/dist/controllers/socket-controller.js.map +1 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.js.map +1 -1
- package/dist/utils/events.d.ts +5 -3
- package/dist/utils/events.js +7 -0
- package/dist/utils/events.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/recording-button.js +0 -331
- package/dist/components/recording-button.js.map +0 -1
package/dist/bundle.js
CHANGED
|
@@ -46,20 +46,169 @@ var require_browser = __commonJS({
|
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
+
// node_modules/@lit/context/lib/context-request-event.js
|
|
50
|
+
var s = class extends Event {
|
|
51
|
+
constructor(s8, t7, e10, o10) {
|
|
52
|
+
super("context-request", { bubbles: true, composed: true }), this.context = s8, this.contextTarget = t7, this.callback = e10, this.subscribe = o10 ?? false;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
// node_modules/@lit/context/lib/create-context.js
|
|
57
|
+
function n(n8) {
|
|
58
|
+
return n8;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// node_modules/@lit/context/lib/controllers/context-consumer.js
|
|
62
|
+
var s2 = class {
|
|
63
|
+
constructor(t7, s8, i7, h5) {
|
|
64
|
+
if (this.subscribe = false, this.provided = false, this.value = void 0, this.t = (t8, s9) => {
|
|
65
|
+
this.unsubscribe && (this.unsubscribe !== s9 && (this.provided = false, this.unsubscribe()), this.subscribe || this.unsubscribe()), this.value = t8, this.host.requestUpdate(), this.provided && !this.subscribe || (this.provided = true, this.callback && this.callback(t8, s9)), this.unsubscribe = s9;
|
|
66
|
+
}, this.host = t7, void 0 !== s8.context) {
|
|
67
|
+
const t8 = s8;
|
|
68
|
+
this.context = t8.context, this.callback = t8.callback, this.subscribe = t8.subscribe ?? false;
|
|
69
|
+
} else this.context = s8, this.callback = i7, this.subscribe = h5 ?? false;
|
|
70
|
+
this.host.addController(this);
|
|
71
|
+
}
|
|
72
|
+
hostConnected() {
|
|
73
|
+
this.dispatchRequest();
|
|
74
|
+
}
|
|
75
|
+
hostDisconnected() {
|
|
76
|
+
this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0);
|
|
77
|
+
}
|
|
78
|
+
dispatchRequest() {
|
|
79
|
+
this.host.dispatchEvent(new s(this.context, this.host, this.t, this.subscribe));
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// node_modules/@lit/context/lib/value-notifier.js
|
|
84
|
+
var s3 = class {
|
|
85
|
+
get value() {
|
|
86
|
+
return this.o;
|
|
87
|
+
}
|
|
88
|
+
set value(s8) {
|
|
89
|
+
this.setValue(s8);
|
|
90
|
+
}
|
|
91
|
+
setValue(s8, t7 = false) {
|
|
92
|
+
const i7 = t7 || !Object.is(s8, this.o);
|
|
93
|
+
this.o = s8, i7 && this.updateObservers();
|
|
94
|
+
}
|
|
95
|
+
constructor(s8) {
|
|
96
|
+
this.subscriptions = /* @__PURE__ */ new Map(), this.updateObservers = () => {
|
|
97
|
+
for (const [s9, { disposer: t7 }] of this.subscriptions) s9(this.o, t7);
|
|
98
|
+
}, void 0 !== s8 && (this.value = s8);
|
|
99
|
+
}
|
|
100
|
+
addCallback(s8, t7, i7) {
|
|
101
|
+
if (!i7) return void s8(this.value);
|
|
102
|
+
this.subscriptions.has(s8) || this.subscriptions.set(s8, { disposer: () => {
|
|
103
|
+
this.subscriptions.delete(s8);
|
|
104
|
+
}, consumerHost: t7 });
|
|
105
|
+
const { disposer: h5 } = this.subscriptions.get(s8);
|
|
106
|
+
s8(this.value, h5);
|
|
107
|
+
}
|
|
108
|
+
clearCallbacks() {
|
|
109
|
+
this.subscriptions.clear();
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
// node_modules/@lit/context/lib/controllers/context-provider.js
|
|
114
|
+
var e = class extends Event {
|
|
115
|
+
constructor(t7, s8) {
|
|
116
|
+
super("context-provider", { bubbles: true, composed: true }), this.context = t7, this.contextTarget = s8;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
var i = class extends s3 {
|
|
120
|
+
constructor(s8, e10, i7) {
|
|
121
|
+
super(void 0 !== e10.context ? e10.initialValue : i7), this.onContextRequest = (t7) => {
|
|
122
|
+
if (t7.context !== this.context) return;
|
|
123
|
+
const s9 = t7.contextTarget ?? t7.composedPath()[0];
|
|
124
|
+
s9 !== this.host && (t7.stopPropagation(), this.addCallback(t7.callback, s9, t7.subscribe));
|
|
125
|
+
}, this.onProviderRequest = (s9) => {
|
|
126
|
+
if (s9.context !== this.context) return;
|
|
127
|
+
if ((s9.contextTarget ?? s9.composedPath()[0]) === this.host) return;
|
|
128
|
+
const e11 = /* @__PURE__ */ new Set();
|
|
129
|
+
for (const [s10, { consumerHost: i8 }] of this.subscriptions) e11.has(s10) || (e11.add(s10), i8.dispatchEvent(new s(this.context, i8, s10, true)));
|
|
130
|
+
s9.stopPropagation();
|
|
131
|
+
}, this.host = s8, void 0 !== e10.context ? this.context = e10.context : this.context = e10, this.attachListeners(), this.host.addController?.(this);
|
|
132
|
+
}
|
|
133
|
+
attachListeners() {
|
|
134
|
+
this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
|
|
135
|
+
}
|
|
136
|
+
hostConnected() {
|
|
137
|
+
this.host.dispatchEvent(new e(this.context, this.host));
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
// node_modules/@lit/context/lib/decorators/provide.js
|
|
142
|
+
function e2({ context: e10 }) {
|
|
143
|
+
return (n8, i7) => {
|
|
144
|
+
const r7 = /* @__PURE__ */ new WeakMap();
|
|
145
|
+
if ("object" == typeof i7) return { get() {
|
|
146
|
+
return n8.get.call(this);
|
|
147
|
+
}, set(t7) {
|
|
148
|
+
return r7.get(this).setValue(t7), n8.set.call(this, t7);
|
|
149
|
+
}, init(n9) {
|
|
150
|
+
return r7.set(this, new i(this, { context: e10, initialValue: n9 })), n9;
|
|
151
|
+
} };
|
|
152
|
+
{
|
|
153
|
+
n8.constructor.addInitializer((n9) => {
|
|
154
|
+
r7.set(n9, new i(n9, { context: e10 }));
|
|
155
|
+
});
|
|
156
|
+
const o10 = Object.getOwnPropertyDescriptor(n8, i7);
|
|
157
|
+
let s8;
|
|
158
|
+
if (void 0 === o10) {
|
|
159
|
+
const t7 = /* @__PURE__ */ new WeakMap();
|
|
160
|
+
s8 = { get() {
|
|
161
|
+
return t7.get(this);
|
|
162
|
+
}, set(e11) {
|
|
163
|
+
r7.get(this).setValue(e11), t7.set(this, e11);
|
|
164
|
+
}, configurable: true, enumerable: true };
|
|
165
|
+
} else {
|
|
166
|
+
const t7 = o10.set;
|
|
167
|
+
s8 = { ...o10, set(e11) {
|
|
168
|
+
r7.get(this).setValue(e11), t7?.call(this, e11);
|
|
169
|
+
} };
|
|
170
|
+
}
|
|
171
|
+
return void Object.defineProperty(n8, i7, s8);
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// node_modules/@lit/context/lib/decorators/consume.js
|
|
177
|
+
function c({ context: c6, subscribe: e10 }) {
|
|
178
|
+
return (o10, n8) => {
|
|
179
|
+
"object" == typeof n8 ? n8.addInitializer(function() {
|
|
180
|
+
new s2(this, { context: c6, callback: (t7) => {
|
|
181
|
+
o10.set.call(this, t7);
|
|
182
|
+
}, subscribe: e10 });
|
|
183
|
+
}) : o10.constructor.addInitializer((o11) => {
|
|
184
|
+
new s2(o11, { context: c6, callback: (t7) => {
|
|
185
|
+
o11[n8] = t7;
|
|
186
|
+
}, subscribe: e10 });
|
|
187
|
+
});
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// node_modules/@lit/reactive-element/decorators/custom-element.js
|
|
192
|
+
var t2 = (t7) => (e10, o10) => {
|
|
193
|
+
void 0 !== o10 ? o10.addInitializer(() => {
|
|
194
|
+
customElements.define(t7, e10);
|
|
195
|
+
}) : customElements.define(t7, e10);
|
|
196
|
+
};
|
|
197
|
+
|
|
49
198
|
// node_modules/@lit/reactive-element/css-tag.js
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
199
|
+
var t3 = globalThis;
|
|
200
|
+
var e3 = t3.ShadowRoot && (void 0 === t3.ShadyCSS || t3.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype;
|
|
201
|
+
var s4 = Symbol();
|
|
53
202
|
var o = /* @__PURE__ */ new WeakMap();
|
|
54
|
-
var
|
|
203
|
+
var n2 = class {
|
|
55
204
|
constructor(t7, e10, o10) {
|
|
56
|
-
if (this._$cssResult$ = true, o10 !==
|
|
205
|
+
if (this._$cssResult$ = true, o10 !== s4) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
57
206
|
this.cssText = t7, this.t = e10;
|
|
58
207
|
}
|
|
59
208
|
get styleSheet() {
|
|
60
209
|
let t7 = this.o;
|
|
61
210
|
const s8 = this.t;
|
|
62
|
-
if (
|
|
211
|
+
if (e3 && void 0 === t7) {
|
|
63
212
|
const e10 = void 0 !== s8 && 1 === s8.length;
|
|
64
213
|
e10 && (t7 = o.get(s8)), void 0 === t7 && ((this.o = t7 = new CSSStyleSheet()).replaceSync(this.cssText), e10 && o.set(s8, t7));
|
|
65
214
|
}
|
|
@@ -69,33 +218,33 @@ var n = class {
|
|
|
69
218
|
return this.cssText;
|
|
70
219
|
}
|
|
71
220
|
};
|
|
72
|
-
var r = (t7) => new
|
|
73
|
-
var
|
|
221
|
+
var r = (t7) => new n2("string" == typeof t7 ? t7 : t7 + "", void 0, s4);
|
|
222
|
+
var i2 = (t7, ...e10) => {
|
|
74
223
|
const o10 = 1 === t7.length ? t7[0] : e10.reduce((e11, s8, o11) => e11 + ((t8) => {
|
|
75
224
|
if (true === t8._$cssResult$) return t8.cssText;
|
|
76
225
|
if ("number" == typeof t8) return t8;
|
|
77
226
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + t8 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
78
227
|
})(s8) + t7[o11 + 1], t7[0]);
|
|
79
|
-
return new
|
|
228
|
+
return new n2(o10, t7, s4);
|
|
80
229
|
};
|
|
81
230
|
var S = (s8, o10) => {
|
|
82
|
-
if (
|
|
231
|
+
if (e3) s8.adoptedStyleSheets = o10.map((t7) => t7 instanceof CSSStyleSheet ? t7 : t7.styleSheet);
|
|
83
232
|
else for (const e10 of o10) {
|
|
84
|
-
const o11 = document.createElement("style"), n8 =
|
|
233
|
+
const o11 = document.createElement("style"), n8 = t3.litNonce;
|
|
85
234
|
void 0 !== n8 && o11.setAttribute("nonce", n8), o11.textContent = e10.cssText, s8.appendChild(o11);
|
|
86
235
|
}
|
|
87
236
|
};
|
|
88
|
-
var
|
|
237
|
+
var c2 = e3 ? (t7) => t7 : (t7) => t7 instanceof CSSStyleSheet ? ((t8) => {
|
|
89
238
|
let e10 = "";
|
|
90
239
|
for (const s8 of t8.cssRules) e10 += s8.cssText;
|
|
91
240
|
return r(e10);
|
|
92
241
|
})(t7) : t7;
|
|
93
242
|
|
|
94
243
|
// node_modules/@lit/reactive-element/reactive-element.js
|
|
95
|
-
var { is:
|
|
244
|
+
var { is: i3, defineProperty: e4, getOwnPropertyDescriptor: h, getOwnPropertyNames: r2, getOwnPropertySymbols: o2, getPrototypeOf: n3 } = Object;
|
|
96
245
|
var a = globalThis;
|
|
97
|
-
var
|
|
98
|
-
var l =
|
|
246
|
+
var c3 = a.trustedTypes;
|
|
247
|
+
var l = c3 ? c3.emptyScript : "";
|
|
99
248
|
var p = a.reactiveElementPolyfillSupport;
|
|
100
249
|
var d = (t7, s8) => t7;
|
|
101
250
|
var u = { toAttribute(t7, s8) {
|
|
@@ -127,7 +276,7 @@ var u = { toAttribute(t7, s8) {
|
|
|
127
276
|
}
|
|
128
277
|
return i7;
|
|
129
278
|
} };
|
|
130
|
-
var f = (t7, s8) => !
|
|
279
|
+
var f = (t7, s8) => !i3(t7, s8);
|
|
131
280
|
var b = { attribute: true, type: String, converter: u, reflect: false, useDefault: false, hasChanged: f };
|
|
132
281
|
Symbol.metadata ??= Symbol("metadata"), a.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
133
282
|
var y = class extends HTMLElement {
|
|
@@ -140,7 +289,7 @@ var y = class extends HTMLElement {
|
|
|
140
289
|
static createProperty(t7, s8 = b) {
|
|
141
290
|
if (s8.state && (s8.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t7) && ((s8 = Object.create(s8)).wrapped = true), this.elementProperties.set(t7, s8), !s8.noAccessor) {
|
|
142
291
|
const i7 = Symbol(), h5 = this.getPropertyDescriptor(t7, i7, s8);
|
|
143
|
-
void 0 !== h5 &&
|
|
292
|
+
void 0 !== h5 && e4(this.prototype, t7, h5);
|
|
144
293
|
}
|
|
145
294
|
}
|
|
146
295
|
static getPropertyDescriptor(t7, s8, i7) {
|
|
@@ -159,7 +308,7 @@ var y = class extends HTMLElement {
|
|
|
159
308
|
}
|
|
160
309
|
static _$Ei() {
|
|
161
310
|
if (this.hasOwnProperty(d("elementProperties"))) return;
|
|
162
|
-
const t7 =
|
|
311
|
+
const t7 = n3(this);
|
|
163
312
|
t7.finalize(), void 0 !== t7.l && (this.l = [...t7.l]), this.elementProperties = new Map(t7.elementProperties);
|
|
164
313
|
}
|
|
165
314
|
static finalize() {
|
|
@@ -184,8 +333,8 @@ var y = class extends HTMLElement {
|
|
|
184
333
|
const i7 = [];
|
|
185
334
|
if (Array.isArray(s8)) {
|
|
186
335
|
const e10 = new Set(s8.flat(1 / 0).reverse());
|
|
187
|
-
for (const s9 of e10) i7.unshift(
|
|
188
|
-
} else void 0 !== s8 && i7.push(
|
|
336
|
+
for (const s9 of e10) i7.unshift(c2(s9));
|
|
337
|
+
} else void 0 !== s8 && i7.push(c2(s8));
|
|
189
338
|
return i7;
|
|
190
339
|
}
|
|
191
340
|
static _$Eu(t7, s8) {
|
|
@@ -313,17 +462,100 @@ var y = class extends HTMLElement {
|
|
|
313
462
|
};
|
|
314
463
|
y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[d("elementProperties")] = /* @__PURE__ */ new Map(), y[d("finalized")] = /* @__PURE__ */ new Map(), p?.({ ReactiveElement: y }), (a.reactiveElementVersions ??= []).push("2.1.1");
|
|
315
464
|
|
|
465
|
+
// node_modules/@lit/reactive-element/decorators/property.js
|
|
466
|
+
var o3 = { attribute: true, type: String, converter: u, reflect: false, hasChanged: f };
|
|
467
|
+
var r3 = (t7 = o3, e10, r7) => {
|
|
468
|
+
const { kind: n8, metadata: i7 } = r7;
|
|
469
|
+
let s8 = globalThis.litPropertyMetadata.get(i7);
|
|
470
|
+
if (void 0 === s8 && globalThis.litPropertyMetadata.set(i7, s8 = /* @__PURE__ */ new Map()), "setter" === n8 && ((t7 = Object.create(t7)).wrapped = true), s8.set(r7.name, t7), "accessor" === n8) {
|
|
471
|
+
const { name: o10 } = r7;
|
|
472
|
+
return { set(r8) {
|
|
473
|
+
const n9 = e10.get.call(this);
|
|
474
|
+
e10.set.call(this, r8), this.requestUpdate(o10, n9, t7);
|
|
475
|
+
}, init(e11) {
|
|
476
|
+
return void 0 !== e11 && this.C(o10, void 0, t7, e11), e11;
|
|
477
|
+
} };
|
|
478
|
+
}
|
|
479
|
+
if ("setter" === n8) {
|
|
480
|
+
const { name: o10 } = r7;
|
|
481
|
+
return function(r8) {
|
|
482
|
+
const n9 = this[o10];
|
|
483
|
+
e10.call(this, r8), this.requestUpdate(o10, n9, t7);
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
throw Error("Unsupported decorator location: " + n8);
|
|
487
|
+
};
|
|
488
|
+
function n4(t7) {
|
|
489
|
+
return (e10, o10) => "object" == typeof o10 ? r3(t7, e10, o10) : ((t8, e11, o11) => {
|
|
490
|
+
const r7 = e11.hasOwnProperty(o11);
|
|
491
|
+
return e11.constructor.createProperty(o11, t8), r7 ? Object.getOwnPropertyDescriptor(e11, o11) : void 0;
|
|
492
|
+
})(t7, e10, o10);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
// node_modules/@lit/reactive-element/decorators/state.js
|
|
496
|
+
function r4(r7) {
|
|
497
|
+
return n4({ ...r7, state: true, attribute: false });
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
// dist/constants.js
|
|
501
|
+
var LANGUAGES_SUPPORTED_EU = [
|
|
502
|
+
"da",
|
|
503
|
+
"de",
|
|
504
|
+
"de-CH",
|
|
505
|
+
"en",
|
|
506
|
+
"en-GB",
|
|
507
|
+
"es",
|
|
508
|
+
"fr",
|
|
509
|
+
"hu",
|
|
510
|
+
"it",
|
|
511
|
+
"nl",
|
|
512
|
+
"no",
|
|
513
|
+
"pt",
|
|
514
|
+
"sv",
|
|
515
|
+
"gsw-CH"
|
|
516
|
+
].sort();
|
|
517
|
+
var LANGUAGES_SUPPORTED_US = [
|
|
518
|
+
"da",
|
|
519
|
+
"de",
|
|
520
|
+
"de-CH",
|
|
521
|
+
"en",
|
|
522
|
+
"en-GB",
|
|
523
|
+
"es",
|
|
524
|
+
"fr",
|
|
525
|
+
"hu",
|
|
526
|
+
"it",
|
|
527
|
+
"nl",
|
|
528
|
+
"no",
|
|
529
|
+
"pt",
|
|
530
|
+
"sv"
|
|
531
|
+
].sort();
|
|
532
|
+
var DEFAULT_DICTATION_CONFIG = {
|
|
533
|
+
automaticPunctuation: false,
|
|
534
|
+
primaryLanguage: "en",
|
|
535
|
+
spokenPunctuation: true
|
|
536
|
+
};
|
|
537
|
+
var DEFAULT_STREAM_CONFIG = {
|
|
538
|
+
mode: { outputLocale: "en", type: "facts" },
|
|
539
|
+
transcription: {
|
|
540
|
+
isDiarization: true,
|
|
541
|
+
isMultichannel: false,
|
|
542
|
+
participants: [],
|
|
543
|
+
primaryLanguage: "en"
|
|
544
|
+
}
|
|
545
|
+
};
|
|
546
|
+
var AUDIO_CHUNK_INTERVAL_MS = 250;
|
|
547
|
+
|
|
316
548
|
// node_modules/lit-html/lit-html.js
|
|
317
|
-
var
|
|
318
|
-
var
|
|
319
|
-
var
|
|
320
|
-
var
|
|
549
|
+
var t4 = globalThis;
|
|
550
|
+
var i4 = t4.trustedTypes;
|
|
551
|
+
var s5 = i4 ? i4.createPolicy("lit-html", { createHTML: (t7) => t7 }) : void 0;
|
|
552
|
+
var e6 = "$lit$";
|
|
321
553
|
var h2 = `lit$${Math.random().toFixed(9).slice(2)}$`;
|
|
322
|
-
var
|
|
323
|
-
var
|
|
324
|
-
var
|
|
325
|
-
var l2 = () =>
|
|
326
|
-
var
|
|
554
|
+
var o4 = "?" + h2;
|
|
555
|
+
var n5 = `<${o4}>`;
|
|
556
|
+
var r5 = document;
|
|
557
|
+
var l2 = () => r5.createComment("");
|
|
558
|
+
var c4 = (t7) => null === t7 || "object" != typeof t7 && "function" != typeof t7;
|
|
327
559
|
var a2 = Array.isArray;
|
|
328
560
|
var u2 = (t7) => a2(t7) || "function" == typeof t7?.[Symbol.iterator];
|
|
329
561
|
var d2 = "[ \n\f\r]";
|
|
@@ -342,10 +574,10 @@ var w = y2(3);
|
|
|
342
574
|
var T = Symbol.for("lit-noChange");
|
|
343
575
|
var E = Symbol.for("lit-nothing");
|
|
344
576
|
var A = /* @__PURE__ */ new WeakMap();
|
|
345
|
-
var C =
|
|
577
|
+
var C = r5.createTreeWalker(r5, 129);
|
|
346
578
|
function P(t7, i7) {
|
|
347
579
|
if (!a2(t7) || !t7.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
348
|
-
return void 0 !==
|
|
580
|
+
return void 0 !== s5 ? s5.createHTML(i7) : i7;
|
|
349
581
|
}
|
|
350
582
|
var V = (t7, i7) => {
|
|
351
583
|
const s8 = t7.length - 1, o10 = [];
|
|
@@ -355,7 +587,7 @@ var V = (t7, i7) => {
|
|
|
355
587
|
let a3, u3, d3 = -1, y3 = 0;
|
|
356
588
|
for (; y3 < s9.length && (c6.lastIndex = y3, u3 = c6.exec(s9), null !== u3); ) y3 = c6.lastIndex, c6 === f2 ? "!--" === u3[1] ? c6 = v : void 0 !== u3[1] ? c6 = _ : void 0 !== u3[2] ? ($.test(u3[2]) && (r7 = RegExp("</" + u3[2], "g")), c6 = m) : void 0 !== u3[3] && (c6 = m) : c6 === m ? ">" === u3[0] ? (c6 = r7 ?? f2, d3 = -1) : void 0 === u3[1] ? d3 = -2 : (d3 = c6.lastIndex - u3[2].length, a3 = u3[1], c6 = void 0 === u3[3] ? m : '"' === u3[3] ? g : p2) : c6 === g || c6 === p2 ? c6 = m : c6 === v || c6 === _ ? c6 = f2 : (c6 = m, r7 = void 0);
|
|
357
589
|
const x2 = c6 === m && t7[i8 + 1].startsWith("/>") ? " " : "";
|
|
358
|
-
l3 += c6 === f2 ? s9 +
|
|
590
|
+
l3 += c6 === f2 ? s9 + n5 : d3 >= 0 ? (o10.push(a3), s9.slice(0, d3) + e6 + s9.slice(d3) + h2 + x2) : s9 + h2 + (-2 === d3 ? i8 : x2);
|
|
359
591
|
}
|
|
360
592
|
return [P(t7, l3 + (t7[s8] || "<?>") + (2 === i7 ? "</svg>" : 3 === i7 ? "</math>" : "")), o10];
|
|
361
593
|
};
|
|
@@ -371,19 +603,19 @@ var N = class _N {
|
|
|
371
603
|
}
|
|
372
604
|
for (; null !== (r7 = C.nextNode()) && d3.length < u3; ) {
|
|
373
605
|
if (1 === r7.nodeType) {
|
|
374
|
-
if (r7.hasAttributes()) for (const t8 of r7.getAttributeNames()) if (t8.endsWith(
|
|
606
|
+
if (r7.hasAttributes()) for (const t8 of r7.getAttributeNames()) if (t8.endsWith(e6)) {
|
|
375
607
|
const i7 = v2[a3++], s9 = r7.getAttribute(t8).split(h2), e10 = /([.?@])?(.*)/.exec(i7);
|
|
376
608
|
d3.push({ type: 1, index: c6, name: e10[2], strings: s9, ctor: "." === e10[1] ? H : "?" === e10[1] ? I : "@" === e10[1] ? L : k }), r7.removeAttribute(t8);
|
|
377
609
|
} else t8.startsWith(h2) && (d3.push({ type: 6, index: c6 }), r7.removeAttribute(t8));
|
|
378
610
|
if ($.test(r7.tagName)) {
|
|
379
611
|
const t8 = r7.textContent.split(h2), s9 = t8.length - 1;
|
|
380
612
|
if (s9 > 0) {
|
|
381
|
-
r7.textContent =
|
|
613
|
+
r7.textContent = i4 ? i4.emptyScript : "";
|
|
382
614
|
for (let i7 = 0; i7 < s9; i7++) r7.append(t8[i7], l2()), C.nextNode(), d3.push({ type: 2, index: ++c6 });
|
|
383
615
|
r7.append(t8[s9], l2());
|
|
384
616
|
}
|
|
385
617
|
}
|
|
386
|
-
} else if (8 === r7.nodeType) if (r7.data ===
|
|
618
|
+
} else if (8 === r7.nodeType) if (r7.data === o4) d3.push({ type: 2, index: c6 });
|
|
387
619
|
else {
|
|
388
620
|
let t8 = -1;
|
|
389
621
|
for (; -1 !== (t8 = r7.data.indexOf(h2, t8 + 1)); ) d3.push({ type: 7, index: c6 }), t8 += h2.length - 1;
|
|
@@ -392,14 +624,14 @@ var N = class _N {
|
|
|
392
624
|
}
|
|
393
625
|
}
|
|
394
626
|
static createElement(t7, i7) {
|
|
395
|
-
const s8 =
|
|
627
|
+
const s8 = r5.createElement("template");
|
|
396
628
|
return s8.innerHTML = t7, s8;
|
|
397
629
|
}
|
|
398
630
|
};
|
|
399
631
|
function S2(t7, i7, s8 = t7, e10) {
|
|
400
632
|
if (i7 === T) return i7;
|
|
401
633
|
let h5 = void 0 !== e10 ? s8._$Co?.[e10] : s8._$Cl;
|
|
402
|
-
const o10 =
|
|
634
|
+
const o10 = c4(i7) ? void 0 : i7._$litDirective$;
|
|
403
635
|
return h5?.constructor !== o10 && (h5?._$AO?.(false), void 0 === o10 ? h5 = void 0 : (h5 = new o10(t7), h5._$AT(t7, s8, e10)), void 0 !== e10 ? (s8._$Co ??= [])[e10] = h5 : s8._$Cl = h5), void 0 !== h5 && (i7 = S2(t7, h5._$AS(t7, i7.values), h5, e10)), i7;
|
|
404
636
|
}
|
|
405
637
|
var M = class {
|
|
@@ -413,7 +645,7 @@ var M = class {
|
|
|
413
645
|
return this._$AM._$AU;
|
|
414
646
|
}
|
|
415
647
|
u(t7) {
|
|
416
|
-
const { el: { content: i7 }, parts: s8 } = this._$AD, e10 = (t7?.creationScope ??
|
|
648
|
+
const { el: { content: i7 }, parts: s8 } = this._$AD, e10 = (t7?.creationScope ?? r5).importNode(i7, true);
|
|
417
649
|
C.currentNode = e10;
|
|
418
650
|
let h5 = C.nextNode(), o10 = 0, n8 = 0, l3 = s8[0];
|
|
419
651
|
for (; void 0 !== l3; ) {
|
|
@@ -423,7 +655,7 @@ var M = class {
|
|
|
423
655
|
}
|
|
424
656
|
o10 !== l3?.index && (h5 = C.nextNode(), o10++);
|
|
425
657
|
}
|
|
426
|
-
return C.currentNode =
|
|
658
|
+
return C.currentNode = r5, e10;
|
|
427
659
|
}
|
|
428
660
|
p(t7) {
|
|
429
661
|
let i7 = 0;
|
|
@@ -449,7 +681,7 @@ var R = class _R {
|
|
|
449
681
|
return this._$AB;
|
|
450
682
|
}
|
|
451
683
|
_$AI(t7, i7 = this) {
|
|
452
|
-
t7 = S2(this, t7, i7),
|
|
684
|
+
t7 = S2(this, t7, i7), c4(t7) ? t7 === E || null == t7 || "" === t7 ? (this._$AH !== E && this._$AR(), this._$AH = E) : t7 !== this._$AH && t7 !== T && this._(t7) : void 0 !== t7._$litType$ ? this.$(t7) : void 0 !== t7.nodeType ? this.T(t7) : u2(t7) ? this.k(t7) : this._(t7);
|
|
453
685
|
}
|
|
454
686
|
O(t7) {
|
|
455
687
|
return this._$AA.parentNode.insertBefore(t7, this._$AB);
|
|
@@ -458,7 +690,7 @@ var R = class _R {
|
|
|
458
690
|
this._$AH !== t7 && (this._$AR(), this._$AH = this.O(t7));
|
|
459
691
|
}
|
|
460
692
|
_(t7) {
|
|
461
|
-
this._$AH !== E &&
|
|
693
|
+
this._$AH !== E && c4(this._$AH) ? this._$AA.nextSibling.data = t7 : this.T(r5.createTextNode(t7)), this._$AH = t7;
|
|
462
694
|
}
|
|
463
695
|
$(t7) {
|
|
464
696
|
const { values: i7, _$litType$: s8 } = t7, e10 = "number" == typeof s8 ? this._$AC(t7) : (void 0 === s8.el && (s8.el = N.createElement(P(s8.h, s8.h[0]), this.options)), s8);
|
|
@@ -502,11 +734,11 @@ var k = class {
|
|
|
502
734
|
_$AI(t7, i7 = this, s8, e10) {
|
|
503
735
|
const h5 = this.strings;
|
|
504
736
|
let o10 = false;
|
|
505
|
-
if (void 0 === h5) t7 = S2(this, t7, i7, 0), o10 = !
|
|
737
|
+
if (void 0 === h5) t7 = S2(this, t7, i7, 0), o10 = !c4(t7) || t7 !== this._$AH && t7 !== T, o10 && (this._$AH = t7);
|
|
506
738
|
else {
|
|
507
739
|
const e11 = t7;
|
|
508
740
|
let n8, r7;
|
|
509
|
-
for (t7 = h5[0], n8 = 0; n8 < h5.length - 1; n8++) r7 = S2(this, e11[s8 + n8], i7, n8), r7 === T && (r7 = this._$AH[n8]), o10 ||= !
|
|
741
|
+
for (t7 = h5[0], n8 = 0; n8 < h5.length - 1; n8++) r7 = S2(this, e11[s8 + n8], i7, n8), r7 === T && (r7 = this._$AH[n8]), o10 ||= !c4(r7) || r7 !== this._$AH[n8], r7 === E ? t7 = E : t7 !== E && (t7 += (r7 ?? "") + h5[n8 + 1]), this._$AH[n8] = r7;
|
|
510
742
|
}
|
|
511
743
|
o10 && !e10 && this.j(t7);
|
|
512
744
|
}
|
|
@@ -554,9 +786,9 @@ var z = class {
|
|
|
554
786
|
S2(this, t7);
|
|
555
787
|
}
|
|
556
788
|
};
|
|
557
|
-
var Z = { M:
|
|
558
|
-
var j =
|
|
559
|
-
j?.(N, R), (
|
|
789
|
+
var Z = { M: e6, P: h2, A: o4, C: 1, L: V, R: M, D: u2, V: S2, I: R, H: k, N: I, U: L, B: H, F: z };
|
|
790
|
+
var j = t4.litHtmlPolyfillSupport;
|
|
791
|
+
j?.(N, R), (t4.litHtmlVersions ??= []).push("3.3.1");
|
|
560
792
|
var B = (t7, i7, s8) => {
|
|
561
793
|
const e10 = s8?.renderBefore ?? i7;
|
|
562
794
|
let h5 = e10._$litPart$;
|
|
@@ -568,8 +800,8 @@ var B = (t7, i7, s8) => {
|
|
|
568
800
|
};
|
|
569
801
|
|
|
570
802
|
// node_modules/lit-element/lit-element.js
|
|
571
|
-
var
|
|
572
|
-
var
|
|
803
|
+
var s6 = globalThis;
|
|
804
|
+
var i5 = class extends y {
|
|
573
805
|
constructor() {
|
|
574
806
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
575
807
|
}
|
|
@@ -591,415 +823,57 @@ var i4 = class extends y {
|
|
|
591
823
|
return T;
|
|
592
824
|
}
|
|
593
825
|
};
|
|
594
|
-
|
|
595
|
-
var
|
|
596
|
-
|
|
597
|
-
(
|
|
826
|
+
i5._$litElement$ = true, i5["finalized"] = true, s6.litElementHydrateSupport?.({ LitElement: i5 });
|
|
827
|
+
var o5 = s6.litElementPolyfillSupport;
|
|
828
|
+
o5?.({ LitElement: i5 });
|
|
829
|
+
(s6.litElementVersions ??= []).push("4.2.1");
|
|
598
830
|
|
|
599
|
-
//
|
|
600
|
-
var
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
}
|
|
604
|
-
};
|
|
831
|
+
// dist/styles/component-styles.js
|
|
832
|
+
var ComponentStyles = i2`
|
|
833
|
+
:host {
|
|
834
|
+
font-family: var(--component-font-family, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, Cantarell, Ubuntu, roboto, noto, helvetica, arial, sans-serif);
|
|
835
|
+
}
|
|
605
836
|
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
} };
|
|
837
|
+
.wrapper {
|
|
838
|
+
background-color: var(--card-background, light-dark(#fff, #333));
|
|
839
|
+
border: 1px solid var(--card-border-color, light-dark(#ddd, #555));
|
|
840
|
+
border-radius: var(--card-border-radius, 8px);
|
|
841
|
+
box-shadow: var(--card-box-shadow, 0 2px 5px rgba(0, 0, 0, 0.1));
|
|
842
|
+
padding: var(--card-padding, 4px);
|
|
843
|
+
display: flex;
|
|
844
|
+
gap: 4px;
|
|
845
|
+
height: 46px;
|
|
846
|
+
width: fit-content;
|
|
847
|
+
box-sizing: border-box;
|
|
848
|
+
overflow: hidden;
|
|
619
849
|
}
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
850
|
+
`;
|
|
851
|
+
var LabelStyles = i2`
|
|
852
|
+
label {
|
|
853
|
+
display: block;
|
|
854
|
+
font-size: 0.8rem;
|
|
855
|
+
padding-bottom: 0.5rem;
|
|
856
|
+
font-weight: 500;
|
|
857
|
+
color: var(--component-text-color, light-dark(#333, #eee));
|
|
858
|
+
pointer-events: none;
|
|
626
859
|
}
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
function n4(t7) {
|
|
630
|
-
return (e10, o10) => "object" == typeof o10 ? r4(t7, e10, o10) : ((t8, e11, o11) => {
|
|
631
|
-
const r7 = e11.hasOwnProperty(o11);
|
|
632
|
-
return e11.constructor.createProperty(o11, t8), r7 ? Object.getOwnPropertyDescriptor(e11, o11) : void 0;
|
|
633
|
-
})(t7, e10, o10);
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
// node_modules/@lit/reactive-element/decorators/state.js
|
|
637
|
-
function r5(r7) {
|
|
638
|
-
return n4({ ...r7, state: true, attribute: false });
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
// node_modules/lit-html/directive.js
|
|
642
|
-
var t4 = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 };
|
|
643
|
-
var e5 = (t7) => (...e10) => ({ _$litDirective$: t7, values: e10 });
|
|
644
|
-
var i5 = class {
|
|
645
|
-
constructor(t7) {
|
|
646
|
-
}
|
|
647
|
-
get _$AU() {
|
|
648
|
-
return this._$AM._$AU;
|
|
649
|
-
}
|
|
650
|
-
_$AT(t7, e10, i7) {
|
|
651
|
-
this._$Ct = t7, this._$AM = e10, this._$Ci = i7;
|
|
652
|
-
}
|
|
653
|
-
_$AS(t7, e10) {
|
|
654
|
-
return this.update(t7, e10);
|
|
655
|
-
}
|
|
656
|
-
update(t7, e10) {
|
|
657
|
-
return this.render(...e10);
|
|
658
|
-
}
|
|
659
|
-
};
|
|
660
|
-
|
|
661
|
-
// node_modules/lit-html/directives/class-map.js
|
|
662
|
-
var e6 = e5(class extends i5 {
|
|
663
|
-
constructor(t7) {
|
|
664
|
-
if (super(t7), t7.type !== t4.ATTRIBUTE || "class" !== t7.name || t7.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
665
|
-
}
|
|
666
|
-
render(t7) {
|
|
667
|
-
return " " + Object.keys(t7).filter((s8) => t7[s8]).join(" ") + " ";
|
|
668
|
-
}
|
|
669
|
-
update(s8, [i7]) {
|
|
670
|
-
if (void 0 === this.st) {
|
|
671
|
-
this.st = /* @__PURE__ */ new Set(), void 0 !== s8.strings && (this.nt = new Set(s8.strings.join(" ").split(/\s/).filter((t7) => "" !== t7)));
|
|
672
|
-
for (const t7 in i7) i7[t7] && !this.nt?.has(t7) && this.st.add(t7);
|
|
673
|
-
return this.render(i7);
|
|
674
|
-
}
|
|
675
|
-
const r7 = s8.element.classList;
|
|
676
|
-
for (const t7 of this.st) t7 in i7 || (r7.remove(t7), this.st.delete(t7));
|
|
677
|
-
for (const t7 in i7) {
|
|
678
|
-
const s9 = !!i7[t7];
|
|
679
|
-
s9 === this.st.has(t7) || this.nt?.has(t7) || (s9 ? (r7.add(t7), this.st.add(t7)) : (r7.remove(t7), this.st.delete(t7)));
|
|
680
|
-
}
|
|
681
|
-
return T;
|
|
682
|
-
}
|
|
683
|
-
});
|
|
684
|
-
|
|
685
|
-
// node_modules/lit-html/directive-helpers.js
|
|
686
|
-
var { I: t5 } = Z;
|
|
687
|
-
var f3 = (o10) => void 0 === o10.strings;
|
|
688
|
-
|
|
689
|
-
// node_modules/lit-html/async-directive.js
|
|
690
|
-
var s4 = (i7, t7) => {
|
|
691
|
-
const e10 = i7._$AN;
|
|
692
|
-
if (void 0 === e10) return false;
|
|
693
|
-
for (const i8 of e10) i8._$AO?.(t7, false), s4(i8, t7);
|
|
694
|
-
return true;
|
|
695
|
-
};
|
|
696
|
-
var o6 = (i7) => {
|
|
697
|
-
let t7, e10;
|
|
698
|
-
do {
|
|
699
|
-
if (void 0 === (t7 = i7._$AM)) break;
|
|
700
|
-
e10 = t7._$AN, e10.delete(i7), i7 = t7;
|
|
701
|
-
} while (0 === e10?.size);
|
|
702
|
-
};
|
|
703
|
-
var r6 = (i7) => {
|
|
704
|
-
for (let t7; t7 = i7._$AM; i7 = t7) {
|
|
705
|
-
let e10 = t7._$AN;
|
|
706
|
-
if (void 0 === e10) t7._$AN = e10 = /* @__PURE__ */ new Set();
|
|
707
|
-
else if (e10.has(i7)) break;
|
|
708
|
-
e10.add(i7), c4(t7);
|
|
709
|
-
}
|
|
710
|
-
};
|
|
711
|
-
function h3(i7) {
|
|
712
|
-
void 0 !== this._$AN ? (o6(this), this._$AM = i7, r6(this)) : this._$AM = i7;
|
|
713
|
-
}
|
|
714
|
-
function n5(i7, t7 = false, e10 = 0) {
|
|
715
|
-
const r7 = this._$AH, h5 = this._$AN;
|
|
716
|
-
if (void 0 !== h5 && 0 !== h5.size) if (t7) if (Array.isArray(r7)) for (let i8 = e10; i8 < r7.length; i8++) s4(r7[i8], false), o6(r7[i8]);
|
|
717
|
-
else null != r7 && (s4(r7, false), o6(r7));
|
|
718
|
-
else s4(this, i7);
|
|
719
|
-
}
|
|
720
|
-
var c4 = (i7) => {
|
|
721
|
-
i7.type == t4.CHILD && (i7._$AP ??= n5, i7._$AQ ??= h3);
|
|
722
|
-
};
|
|
723
|
-
var f4 = class extends i5 {
|
|
724
|
-
constructor() {
|
|
725
|
-
super(...arguments), this._$AN = void 0;
|
|
726
|
-
}
|
|
727
|
-
_$AT(i7, t7, e10) {
|
|
728
|
-
super._$AT(i7, t7, e10), r6(this), this.isConnected = i7._$AU;
|
|
729
|
-
}
|
|
730
|
-
_$AO(i7, t7 = true) {
|
|
731
|
-
i7 !== this.isConnected && (this.isConnected = i7, i7 ? this.reconnected?.() : this.disconnected?.()), t7 && (s4(this, i7), o6(this));
|
|
732
|
-
}
|
|
733
|
-
setValue(t7) {
|
|
734
|
-
if (f3(this._$Ct)) this._$Ct._$AI(t7, this);
|
|
735
|
-
else {
|
|
736
|
-
const i7 = [...this._$Ct._$AH];
|
|
737
|
-
i7[this._$Ci] = t7, this._$Ct._$AI(i7, this, 0);
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
disconnected() {
|
|
741
|
-
}
|
|
742
|
-
reconnected() {
|
|
743
|
-
}
|
|
744
|
-
};
|
|
745
|
-
|
|
746
|
-
// node_modules/lit-html/directives/ref.js
|
|
747
|
-
var e7 = () => new h4();
|
|
748
|
-
var h4 = class {
|
|
749
|
-
};
|
|
750
|
-
var o7 = /* @__PURE__ */ new WeakMap();
|
|
751
|
-
var n6 = e5(class extends f4 {
|
|
752
|
-
render(i7) {
|
|
753
|
-
return E;
|
|
754
|
-
}
|
|
755
|
-
update(i7, [s8]) {
|
|
756
|
-
const e10 = s8 !== this.G;
|
|
757
|
-
return e10 && void 0 !== this.G && this.rt(void 0), (e10 || this.lt !== this.ct) && (this.G = s8, this.ht = i7.options?.host, this.rt(this.ct = i7.element)), E;
|
|
758
|
-
}
|
|
759
|
-
rt(t7) {
|
|
760
|
-
if (this.isConnected || (t7 = void 0), "function" == typeof this.G) {
|
|
761
|
-
const i7 = this.ht ?? globalThis;
|
|
762
|
-
let s8 = o7.get(i7);
|
|
763
|
-
void 0 === s8 && (s8 = /* @__PURE__ */ new WeakMap(), o7.set(i7, s8)), void 0 !== s8.get(this.G) && this.G.call(this.ht, void 0), s8.set(this.G, t7), void 0 !== t7 && this.G.call(this.ht, t7);
|
|
764
|
-
} else this.G.value = t7;
|
|
765
|
-
}
|
|
766
|
-
get lt() {
|
|
767
|
-
return "function" == typeof this.G ? o7.get(this.ht ?? globalThis)?.get(this.G) : this.G?.value;
|
|
768
|
-
}
|
|
769
|
-
disconnected() {
|
|
770
|
-
this.lt === this.ct && this.rt(void 0);
|
|
771
|
-
}
|
|
772
|
-
reconnected() {
|
|
773
|
-
this.rt(this.ct);
|
|
774
|
-
}
|
|
775
|
-
});
|
|
776
|
-
|
|
777
|
-
// dist/constants.js
|
|
778
|
-
var LANGUAGES_SUPPORTED_EU = [
|
|
779
|
-
"da",
|
|
780
|
-
"de",
|
|
781
|
-
"de-CH",
|
|
782
|
-
"en",
|
|
783
|
-
"en-GB",
|
|
784
|
-
"es",
|
|
785
|
-
"fr",
|
|
786
|
-
"hu",
|
|
787
|
-
"it",
|
|
788
|
-
"nl",
|
|
789
|
-
"no",
|
|
790
|
-
"pt",
|
|
791
|
-
"sv",
|
|
792
|
-
"gsw-CH"
|
|
793
|
-
].sort();
|
|
794
|
-
var LANGUAGES_SUPPORTED_US = [
|
|
795
|
-
"da",
|
|
796
|
-
"de",
|
|
797
|
-
"de-CH",
|
|
798
|
-
"en",
|
|
799
|
-
"en-GB",
|
|
800
|
-
"es",
|
|
801
|
-
"fr",
|
|
802
|
-
"hu",
|
|
803
|
-
"it",
|
|
804
|
-
"nl",
|
|
805
|
-
"no",
|
|
806
|
-
"pt",
|
|
807
|
-
"sv"
|
|
808
|
-
].sort();
|
|
809
|
-
var DEFAULT_DICTATION_CONFIG = {
|
|
810
|
-
automaticPunctuation: false,
|
|
811
|
-
primaryLanguage: "en",
|
|
812
|
-
spokenPunctuation: true
|
|
813
|
-
};
|
|
814
|
-
var AUDIO_CHUNK_INTERVAL_MS = 250;
|
|
815
|
-
|
|
816
|
-
// dist/utils/converters.js
|
|
817
|
-
var commaSeparatedConverter = {
|
|
818
|
-
fromAttribute: (value) => value?.split(",").map((s8) => s8.trim()).filter(Boolean),
|
|
819
|
-
toAttribute: (value) => value?.join(",")
|
|
820
|
-
};
|
|
821
|
-
|
|
822
|
-
// node_modules/@lit/context/lib/context-request-event.js
|
|
823
|
-
var s5 = class extends Event {
|
|
824
|
-
constructor(s8, t7, e10, o10) {
|
|
825
|
-
super("context-request", { bubbles: true, composed: true }), this.context = s8, this.contextTarget = t7, this.callback = e10, this.subscribe = o10 ?? false;
|
|
826
|
-
}
|
|
827
|
-
};
|
|
828
|
-
|
|
829
|
-
// node_modules/@lit/context/lib/create-context.js
|
|
830
|
-
function n7(n8) {
|
|
831
|
-
return n8;
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
// node_modules/@lit/context/lib/controllers/context-consumer.js
|
|
835
|
-
var s6 = class {
|
|
836
|
-
constructor(t7, s8, i7, h5) {
|
|
837
|
-
if (this.subscribe = false, this.provided = false, this.value = void 0, this.t = (t8, s9) => {
|
|
838
|
-
this.unsubscribe && (this.unsubscribe !== s9 && (this.provided = false, this.unsubscribe()), this.subscribe || this.unsubscribe()), this.value = t8, this.host.requestUpdate(), this.provided && !this.subscribe || (this.provided = true, this.callback && this.callback(t8, s9)), this.unsubscribe = s9;
|
|
839
|
-
}, this.host = t7, void 0 !== s8.context) {
|
|
840
|
-
const t8 = s8;
|
|
841
|
-
this.context = t8.context, this.callback = t8.callback, this.subscribe = t8.subscribe ?? false;
|
|
842
|
-
} else this.context = s8, this.callback = i7, this.subscribe = h5 ?? false;
|
|
843
|
-
this.host.addController(this);
|
|
844
|
-
}
|
|
845
|
-
hostConnected() {
|
|
846
|
-
this.dispatchRequest();
|
|
847
|
-
}
|
|
848
|
-
hostDisconnected() {
|
|
849
|
-
this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0);
|
|
850
|
-
}
|
|
851
|
-
dispatchRequest() {
|
|
852
|
-
this.host.dispatchEvent(new s5(this.context, this.host, this.t, this.subscribe));
|
|
853
|
-
}
|
|
854
|
-
};
|
|
855
|
-
|
|
856
|
-
// node_modules/@lit/context/lib/value-notifier.js
|
|
857
|
-
var s7 = class {
|
|
858
|
-
get value() {
|
|
859
|
-
return this.o;
|
|
860
|
-
}
|
|
861
|
-
set value(s8) {
|
|
862
|
-
this.setValue(s8);
|
|
863
|
-
}
|
|
864
|
-
setValue(s8, t7 = false) {
|
|
865
|
-
const i7 = t7 || !Object.is(s8, this.o);
|
|
866
|
-
this.o = s8, i7 && this.updateObservers();
|
|
867
|
-
}
|
|
868
|
-
constructor(s8) {
|
|
869
|
-
this.subscriptions = /* @__PURE__ */ new Map(), this.updateObservers = () => {
|
|
870
|
-
for (const [s9, { disposer: t7 }] of this.subscriptions) s9(this.o, t7);
|
|
871
|
-
}, void 0 !== s8 && (this.value = s8);
|
|
872
|
-
}
|
|
873
|
-
addCallback(s8, t7, i7) {
|
|
874
|
-
if (!i7) return void s8(this.value);
|
|
875
|
-
this.subscriptions.has(s8) || this.subscriptions.set(s8, { disposer: () => {
|
|
876
|
-
this.subscriptions.delete(s8);
|
|
877
|
-
}, consumerHost: t7 });
|
|
878
|
-
const { disposer: h5 } = this.subscriptions.get(s8);
|
|
879
|
-
s8(this.value, h5);
|
|
880
|
-
}
|
|
881
|
-
clearCallbacks() {
|
|
882
|
-
this.subscriptions.clear();
|
|
883
|
-
}
|
|
884
|
-
};
|
|
885
|
-
|
|
886
|
-
// node_modules/@lit/context/lib/controllers/context-provider.js
|
|
887
|
-
var e8 = class extends Event {
|
|
888
|
-
constructor(t7, s8) {
|
|
889
|
-
super("context-provider", { bubbles: true, composed: true }), this.context = t7, this.contextTarget = s8;
|
|
890
|
-
}
|
|
891
|
-
};
|
|
892
|
-
var i6 = class extends s7 {
|
|
893
|
-
constructor(s8, e10, i7) {
|
|
894
|
-
super(void 0 !== e10.context ? e10.initialValue : i7), this.onContextRequest = (t7) => {
|
|
895
|
-
if (t7.context !== this.context) return;
|
|
896
|
-
const s9 = t7.contextTarget ?? t7.composedPath()[0];
|
|
897
|
-
s9 !== this.host && (t7.stopPropagation(), this.addCallback(t7.callback, s9, t7.subscribe));
|
|
898
|
-
}, this.onProviderRequest = (s9) => {
|
|
899
|
-
if (s9.context !== this.context) return;
|
|
900
|
-
if ((s9.contextTarget ?? s9.composedPath()[0]) === this.host) return;
|
|
901
|
-
const e11 = /* @__PURE__ */ new Set();
|
|
902
|
-
for (const [s10, { consumerHost: i8 }] of this.subscriptions) e11.has(s10) || (e11.add(s10), i8.dispatchEvent(new s5(this.context, i8, s10, true)));
|
|
903
|
-
s9.stopPropagation();
|
|
904
|
-
}, this.host = s8, void 0 !== e10.context ? this.context = e10.context : this.context = e10, this.attachListeners(), this.host.addController?.(this);
|
|
905
|
-
}
|
|
906
|
-
attachListeners() {
|
|
907
|
-
this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
|
|
908
|
-
}
|
|
909
|
-
hostConnected() {
|
|
910
|
-
this.host.dispatchEvent(new e8(this.context, this.host));
|
|
911
|
-
}
|
|
912
|
-
};
|
|
913
|
-
|
|
914
|
-
// node_modules/@lit/context/lib/decorators/provide.js
|
|
915
|
-
function e9({ context: e10 }) {
|
|
916
|
-
return (n8, i7) => {
|
|
917
|
-
const r7 = /* @__PURE__ */ new WeakMap();
|
|
918
|
-
if ("object" == typeof i7) return { get() {
|
|
919
|
-
return n8.get.call(this);
|
|
920
|
-
}, set(t7) {
|
|
921
|
-
return r7.get(this).setValue(t7), n8.set.call(this, t7);
|
|
922
|
-
}, init(n9) {
|
|
923
|
-
return r7.set(this, new i6(this, { context: e10, initialValue: n9 })), n9;
|
|
924
|
-
} };
|
|
925
|
-
{
|
|
926
|
-
n8.constructor.addInitializer((n9) => {
|
|
927
|
-
r7.set(n9, new i6(n9, { context: e10 }));
|
|
928
|
-
});
|
|
929
|
-
const o10 = Object.getOwnPropertyDescriptor(n8, i7);
|
|
930
|
-
let s8;
|
|
931
|
-
if (void 0 === o10) {
|
|
932
|
-
const t7 = /* @__PURE__ */ new WeakMap();
|
|
933
|
-
s8 = { get() {
|
|
934
|
-
return t7.get(this);
|
|
935
|
-
}, set(e11) {
|
|
936
|
-
r7.get(this).setValue(e11), t7.set(this, e11);
|
|
937
|
-
}, configurable: true, enumerable: true };
|
|
938
|
-
} else {
|
|
939
|
-
const t7 = o10.set;
|
|
940
|
-
s8 = { ...o10, set(e11) {
|
|
941
|
-
r7.get(this).setValue(e11), t7?.call(this, e11);
|
|
942
|
-
} };
|
|
943
|
-
}
|
|
944
|
-
return void Object.defineProperty(n8, i7, s8);
|
|
945
|
-
}
|
|
946
|
-
};
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
// node_modules/@lit/context/lib/decorators/consume.js
|
|
950
|
-
function c5({ context: c6, subscribe: e10 }) {
|
|
951
|
-
return (o10, n8) => {
|
|
952
|
-
"object" == typeof n8 ? n8.addInitializer(function() {
|
|
953
|
-
new s6(this, { context: c6, callback: (t7) => {
|
|
954
|
-
o10.set.call(this, t7);
|
|
955
|
-
}, subscribe: e10 });
|
|
956
|
-
}) : o10.constructor.addInitializer((o11) => {
|
|
957
|
-
new s6(o11, { context: c6, callback: (t7) => {
|
|
958
|
-
o11[n8] = t7;
|
|
959
|
-
}, subscribe: e10 });
|
|
960
|
-
});
|
|
961
|
-
};
|
|
962
|
-
}
|
|
860
|
+
`;
|
|
861
|
+
var component_styles_default = ComponentStyles;
|
|
963
862
|
|
|
964
|
-
// dist/utils/
|
|
965
|
-
async function
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
|
|
975
|
-
stream.getTracks().forEach((track) => {
|
|
976
|
-
track.stop();
|
|
977
|
-
});
|
|
978
|
-
}
|
|
979
|
-
async function getAudioDevices() {
|
|
980
|
-
if (!navigator.mediaDevices?.enumerateDevices) {
|
|
981
|
-
throw new Error("MediaDevices API is not available");
|
|
982
|
-
}
|
|
983
|
-
let audioDevices = await listAudioInputs();
|
|
984
|
-
if (needsMicPriming(audioDevices)) {
|
|
985
|
-
await primeMicStream();
|
|
986
|
-
audioDevices = await listAudioInputs();
|
|
863
|
+
// dist/utils/auth.js
|
|
864
|
+
async function getInitialToken(config) {
|
|
865
|
+
const initialToken = "accessToken" in config ? {
|
|
866
|
+
accessToken: config.accessToken,
|
|
867
|
+
refreshToken: config.refreshToken
|
|
868
|
+
} : await config.refreshAccessToken();
|
|
869
|
+
if (!initialToken?.accessToken || typeof initialToken.accessToken !== "string") {
|
|
870
|
+
throw new Error("Access token is required and must be a string");
|
|
987
871
|
}
|
|
988
872
|
return {
|
|
989
|
-
|
|
990
|
-
|
|
873
|
+
accessToken: initialToken.accessToken,
|
|
874
|
+
refreshToken: initialToken.refreshToken
|
|
991
875
|
};
|
|
992
876
|
}
|
|
993
|
-
async function listAudioInputs() {
|
|
994
|
-
const devices = await navigator.mediaDevices.enumerateDevices();
|
|
995
|
-
return devices.filter((device) => device.kind === "audioinput");
|
|
996
|
-
}
|
|
997
|
-
function needsMicPriming(audioInputs) {
|
|
998
|
-
if (audioInputs.length === 0) {
|
|
999
|
-
return false;
|
|
1000
|
-
}
|
|
1001
|
-
return audioInputs.some((d3) => d3.deviceId === "" || d3.label === "");
|
|
1002
|
-
}
|
|
1003
877
|
|
|
1004
878
|
// dist/utils/events.js
|
|
1005
879
|
function languagesChangedEvent(languages, selectedLanguage) {
|
|
@@ -1062,6 +936,13 @@ function deltaUsageEvent(detail) {
|
|
|
1062
936
|
detail
|
|
1063
937
|
});
|
|
1064
938
|
}
|
|
939
|
+
function factsEvent(detail) {
|
|
940
|
+
return new CustomEvent("facts", {
|
|
941
|
+
bubbles: true,
|
|
942
|
+
composed: true,
|
|
943
|
+
detail
|
|
944
|
+
});
|
|
945
|
+
}
|
|
1065
946
|
function errorToMessage(error) {
|
|
1066
947
|
if (error instanceof Error) {
|
|
1067
948
|
return error.message;
|
|
@@ -1126,6 +1007,194 @@ function keybindingActivatedEvent(keyboardEvent) {
|
|
|
1126
1007
|
});
|
|
1127
1008
|
}
|
|
1128
1009
|
|
|
1010
|
+
// dist/utils/token.js
|
|
1011
|
+
function decodeToken(token) {
|
|
1012
|
+
const parts = token.split(".");
|
|
1013
|
+
if (parts.length < 2) {
|
|
1014
|
+
throw new Error("Invalid token format");
|
|
1015
|
+
}
|
|
1016
|
+
const base64Url = parts[1];
|
|
1017
|
+
const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
|
|
1018
|
+
let jsonPayload;
|
|
1019
|
+
try {
|
|
1020
|
+
jsonPayload = decodeURIComponent(atob(base64).split("").map((c6) => "%" + ("00" + c6.charCodeAt(0).toString(16)).slice(-2)).join(""));
|
|
1021
|
+
} catch (error) {
|
|
1022
|
+
throw new Error("Failed to decode token payload");
|
|
1023
|
+
}
|
|
1024
|
+
let tokenDetails;
|
|
1025
|
+
try {
|
|
1026
|
+
tokenDetails = JSON.parse(jsonPayload);
|
|
1027
|
+
} catch (error) {
|
|
1028
|
+
throw new Error("Invalid JSON payload in token");
|
|
1029
|
+
}
|
|
1030
|
+
const issuerUrl = tokenDetails.iss;
|
|
1031
|
+
if (!issuerUrl) {
|
|
1032
|
+
throw new Error("Token payload does not contain an issuer (iss) field");
|
|
1033
|
+
}
|
|
1034
|
+
const regex = /^https:\/\/(keycloak|auth)\.([^.]+)\.corti\.app\/realms\/([^/]+)/;
|
|
1035
|
+
const match = issuerUrl.match(regex);
|
|
1036
|
+
if (!match) {
|
|
1037
|
+
throw new Error("Access token does not match expected format");
|
|
1038
|
+
}
|
|
1039
|
+
const expiresAt = tokenDetails.exp && typeof tokenDetails.exp === "number" ? tokenDetails.exp : void 0;
|
|
1040
|
+
return {
|
|
1041
|
+
accessToken: token,
|
|
1042
|
+
environment: match[2],
|
|
1043
|
+
expiresAt,
|
|
1044
|
+
tenant: match[3]
|
|
1045
|
+
};
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
// dist/contexts/mixins/auth-context.js
|
|
1049
|
+
var __decorate = function(decorators, target, key, desc) {
|
|
1050
|
+
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
1051
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
1052
|
+
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
1053
|
+
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
1054
|
+
};
|
|
1055
|
+
var regionContext = n(Symbol("region"));
|
|
1056
|
+
var tenantNameContext = n(Symbol("tenantName"));
|
|
1057
|
+
var accessTokenContext = n(Symbol("accessToken"));
|
|
1058
|
+
var authConfigContext = n(Symbol("authConfig"));
|
|
1059
|
+
function AuthContextMixin(superclass) {
|
|
1060
|
+
class AuthContextMixinClass extends superclass {
|
|
1061
|
+
set accessToken(token) {
|
|
1062
|
+
this.setAccessToken(token);
|
|
1063
|
+
}
|
|
1064
|
+
get accessToken() {
|
|
1065
|
+
return this._accessToken;
|
|
1066
|
+
}
|
|
1067
|
+
set authConfig(config) {
|
|
1068
|
+
this.setAuthConfig(config);
|
|
1069
|
+
}
|
|
1070
|
+
get authConfig() {
|
|
1071
|
+
return this._authConfig;
|
|
1072
|
+
}
|
|
1073
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
1074
|
+
// Public methods
|
|
1075
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
1076
|
+
/**
|
|
1077
|
+
* Sets the access token and parses region/tenant from it.
|
|
1078
|
+
* @returns ServerConfig with environment, tenant, and accessToken
|
|
1079
|
+
* @deprecated Use 'accessToken' property instead.
|
|
1080
|
+
*/
|
|
1081
|
+
setAccessToken(token) {
|
|
1082
|
+
this._accessToken = token;
|
|
1083
|
+
this.region = void 0;
|
|
1084
|
+
this.tenantName = void 0;
|
|
1085
|
+
if (!token) {
|
|
1086
|
+
return {
|
|
1087
|
+
accessToken: token,
|
|
1088
|
+
environment: void 0,
|
|
1089
|
+
tenant: void 0
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
try {
|
|
1093
|
+
const decoded = decodeToken(token);
|
|
1094
|
+
this.region = decoded?.environment;
|
|
1095
|
+
this.tenantName = decoded?.tenant;
|
|
1096
|
+
return {
|
|
1097
|
+
accessToken: token,
|
|
1098
|
+
environment: decoded?.environment,
|
|
1099
|
+
tenant: decoded?.tenant
|
|
1100
|
+
};
|
|
1101
|
+
} catch (error) {
|
|
1102
|
+
this.dispatchEvent(errorEvent(error));
|
|
1103
|
+
}
|
|
1104
|
+
return { accessToken: token, environment: void 0, tenant: void 0 };
|
|
1105
|
+
}
|
|
1106
|
+
/**
|
|
1107
|
+
* Sets the auth config and parses region/tenant from the initial token.
|
|
1108
|
+
* @returns Promise with ServerConfig containing environment, tenant, and accessToken
|
|
1109
|
+
* @deprecated Use 'authConfig' property instead.
|
|
1110
|
+
*/
|
|
1111
|
+
async setAuthConfig(config) {
|
|
1112
|
+
this._authConfig = config;
|
|
1113
|
+
if (!config) {
|
|
1114
|
+
return {
|
|
1115
|
+
accessToken: void 0,
|
|
1116
|
+
environment: void 0,
|
|
1117
|
+
tenant: void 0
|
|
1118
|
+
};
|
|
1119
|
+
}
|
|
1120
|
+
try {
|
|
1121
|
+
const { accessToken } = await getInitialToken(config);
|
|
1122
|
+
return this.setAccessToken(accessToken);
|
|
1123
|
+
} catch (error) {
|
|
1124
|
+
this.dispatchEvent(errorEvent(error));
|
|
1125
|
+
}
|
|
1126
|
+
return {
|
|
1127
|
+
accessToken: void 0,
|
|
1128
|
+
environment: void 0,
|
|
1129
|
+
tenant: void 0
|
|
1130
|
+
};
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
__decorate([
|
|
1134
|
+
e2({ context: regionContext }),
|
|
1135
|
+
r4()
|
|
1136
|
+
], AuthContextMixinClass.prototype, "region", void 0);
|
|
1137
|
+
__decorate([
|
|
1138
|
+
e2({ context: tenantNameContext }),
|
|
1139
|
+
r4()
|
|
1140
|
+
], AuthContextMixinClass.prototype, "tenantName", void 0);
|
|
1141
|
+
__decorate([
|
|
1142
|
+
e2({ context: accessTokenContext }),
|
|
1143
|
+
r4()
|
|
1144
|
+
], AuthContextMixinClass.prototype, "_accessToken", void 0);
|
|
1145
|
+
__decorate([
|
|
1146
|
+
n4({ type: String })
|
|
1147
|
+
], AuthContextMixinClass.prototype, "accessToken", null);
|
|
1148
|
+
__decorate([
|
|
1149
|
+
e2({ context: authConfigContext }),
|
|
1150
|
+
r4()
|
|
1151
|
+
], AuthContextMixinClass.prototype, "_authConfig", void 0);
|
|
1152
|
+
__decorate([
|
|
1153
|
+
n4({ attribute: false, type: Object })
|
|
1154
|
+
], AuthContextMixinClass.prototype, "authConfig", null);
|
|
1155
|
+
return AuthContextMixinClass;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
// dist/utils/devices.js
|
|
1159
|
+
async function primeMicStream() {
|
|
1160
|
+
if (navigator.permissions) {
|
|
1161
|
+
const permissionStatus = await navigator.permissions.query({
|
|
1162
|
+
name: "microphone"
|
|
1163
|
+
});
|
|
1164
|
+
if (permissionStatus.state === "denied") {
|
|
1165
|
+
throw new Error("Microphone permission is denied");
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
|
|
1169
|
+
stream.getTracks().forEach((track) => {
|
|
1170
|
+
track.stop();
|
|
1171
|
+
});
|
|
1172
|
+
}
|
|
1173
|
+
async function getAudioDevices() {
|
|
1174
|
+
if (!navigator.mediaDevices?.enumerateDevices) {
|
|
1175
|
+
throw new Error("MediaDevices API is not available");
|
|
1176
|
+
}
|
|
1177
|
+
let audioDevices = await listAudioInputs();
|
|
1178
|
+
if (needsMicPriming(audioDevices)) {
|
|
1179
|
+
await primeMicStream();
|
|
1180
|
+
audioDevices = await listAudioInputs();
|
|
1181
|
+
}
|
|
1182
|
+
return {
|
|
1183
|
+
defaultDevice: audioDevices[0],
|
|
1184
|
+
devices: audioDevices
|
|
1185
|
+
};
|
|
1186
|
+
}
|
|
1187
|
+
async function listAudioInputs() {
|
|
1188
|
+
const devices = await navigator.mediaDevices.enumerateDevices();
|
|
1189
|
+
return devices.filter((device) => device.kind === "audioinput");
|
|
1190
|
+
}
|
|
1191
|
+
function needsMicPriming(audioInputs) {
|
|
1192
|
+
if (audioInputs.length === 0) {
|
|
1193
|
+
return false;
|
|
1194
|
+
}
|
|
1195
|
+
return audioInputs.some((d3) => d3.deviceId === "" || d3.label === "");
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1129
1198
|
// dist/controllers/devices-controller.js
|
|
1130
1199
|
var __classPrivateFieldSet = function(receiver, state, value, kind, f5) {
|
|
1131
1200
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
@@ -1219,6 +1288,117 @@ _DevicesController_autoLoadedDevices = /* @__PURE__ */ new WeakMap(), _DevicesCo
|
|
|
1219
1288
|
}
|
|
1220
1289
|
};
|
|
1221
1290
|
|
|
1291
|
+
// dist/contexts/mixins/devices-context.js
|
|
1292
|
+
var __decorate2 = function(decorators, target, key, desc) {
|
|
1293
|
+
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
1294
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
1295
|
+
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
1296
|
+
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
1297
|
+
};
|
|
1298
|
+
var __classPrivateFieldGet2 = function(receiver, state, kind, f5) {
|
|
1299
|
+
if (kind === "a" && !f5) throw new TypeError("Private accessor was defined without a getter");
|
|
1300
|
+
if (typeof state === "function" ? receiver !== state || !f5 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
1301
|
+
return kind === "m" ? f5 : kind === "a" ? f5.call(receiver) : f5 ? f5.value : state.get(receiver);
|
|
1302
|
+
};
|
|
1303
|
+
var devicesContext = n(Symbol("devices"));
|
|
1304
|
+
var selectedDeviceContext = n(Symbol("selectedDevice"));
|
|
1305
|
+
function DevicesContextMixin(superclass) {
|
|
1306
|
+
var _DevicesContextMixinClass_devicesController;
|
|
1307
|
+
class DevicesContextMixinClass extends superclass {
|
|
1308
|
+
set devices(value) {
|
|
1309
|
+
this._devices = value;
|
|
1310
|
+
if (value !== void 0) {
|
|
1311
|
+
__classPrivateFieldGet2(this, _DevicesContextMixinClass_devicesController, "f").clearAutoLoadedFlag();
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
get devices() {
|
|
1315
|
+
return this._devices;
|
|
1316
|
+
}
|
|
1317
|
+
constructor(...args) {
|
|
1318
|
+
super(...args);
|
|
1319
|
+
_DevicesContextMixinClass_devicesController.set(this, new DevicesController(this));
|
|
1320
|
+
this.addEventListener("recording-devices-changed", (e10) => {
|
|
1321
|
+
const event = e10;
|
|
1322
|
+
this.selectedDevice = event.detail.selectedDevice;
|
|
1323
|
+
});
|
|
1324
|
+
this.addEventListener("context-request", (ev) => {
|
|
1325
|
+
if (ev.context === devicesContext) {
|
|
1326
|
+
__classPrivateFieldGet2(this, _DevicesContextMixinClass_devicesController, "f").initialize();
|
|
1327
|
+
}
|
|
1328
|
+
});
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
_DevicesContextMixinClass_devicesController = /* @__PURE__ */ new WeakMap();
|
|
1332
|
+
__decorate2([
|
|
1333
|
+
e2({ context: devicesContext }),
|
|
1334
|
+
r4()
|
|
1335
|
+
], DevicesContextMixinClass.prototype, "_devices", void 0);
|
|
1336
|
+
__decorate2([
|
|
1337
|
+
n4({ attribute: false, type: Array })
|
|
1338
|
+
], DevicesContextMixinClass.prototype, "devices", null);
|
|
1339
|
+
__decorate2([
|
|
1340
|
+
e2({ context: selectedDeviceContext }),
|
|
1341
|
+
n4({ attribute: false, type: Object })
|
|
1342
|
+
], DevicesContextMixinClass.prototype, "selectedDevice", void 0);
|
|
1343
|
+
return DevicesContextMixinClass;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
// dist/contexts/mixins/keybindings-context.js
|
|
1347
|
+
var __decorate3 = function(decorators, target, key, desc) {
|
|
1348
|
+
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
1349
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
1350
|
+
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
1351
|
+
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
1352
|
+
};
|
|
1353
|
+
var __classPrivateFieldGet3 = function(receiver, state, kind, f5) {
|
|
1354
|
+
if (kind === "a" && !f5) throw new TypeError("Private accessor was defined without a getter");
|
|
1355
|
+
if (typeof state === "function" ? receiver !== state || !f5 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
1356
|
+
return kind === "m" ? f5 : kind === "a" ? f5.call(receiver) : f5 ? f5.value : state.get(receiver);
|
|
1357
|
+
};
|
|
1358
|
+
var pushToTalkKeybindingContext = n(Symbol("pushToTalkKeybinding"));
|
|
1359
|
+
var toggleToTalkKeybindingContext = n(Symbol("toggleToTalkKeybinding"));
|
|
1360
|
+
function KeybindingsContextMixin(superclass) {
|
|
1361
|
+
var _KeybindingsContextMixinClass_handleContextRequest, _KeybindingsContextMixinClass_handleKeybindingChanged;
|
|
1362
|
+
class KeybindingsContextMixinClass extends superclass {
|
|
1363
|
+
constructor(...args) {
|
|
1364
|
+
super(...args);
|
|
1365
|
+
_KeybindingsContextMixinClass_handleContextRequest.set(this, (e10) => {
|
|
1366
|
+
if (e10.contextTarget.tagName.toLowerCase() === "dictation-keybinding-selector") {
|
|
1367
|
+
if (e10.context === pushToTalkKeybindingContext && this.pushToTalkKeybinding === void 0) {
|
|
1368
|
+
this.pushToTalkKeybinding = "Space";
|
|
1369
|
+
this.dispatchEvent(keybindingChangedEvent(" ", "Space", "Space", "push-to-talk"));
|
|
1370
|
+
}
|
|
1371
|
+
if (e10.context === toggleToTalkKeybindingContext && this.toggleToTalkKeybinding === void 0) {
|
|
1372
|
+
this.toggleToTalkKeybinding = "Enter";
|
|
1373
|
+
this.dispatchEvent(keybindingChangedEvent("Enter", "Enter", "Enter", "toggle-to-talk"));
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
});
|
|
1377
|
+
_KeybindingsContextMixinClass_handleKeybindingChanged.set(this, (e10) => {
|
|
1378
|
+
const event = e10;
|
|
1379
|
+
const keybinding = event.detail.keybinding;
|
|
1380
|
+
if (event.detail.type === "push-to-talk") {
|
|
1381
|
+
this.pushToTalkKeybinding = keybinding;
|
|
1382
|
+
} else if (event.detail.type === "toggle-to-talk") {
|
|
1383
|
+
this.toggleToTalkKeybinding = keybinding;
|
|
1384
|
+
}
|
|
1385
|
+
});
|
|
1386
|
+
this.addEventListener("keybinding-changed", __classPrivateFieldGet3(this, _KeybindingsContextMixinClass_handleKeybindingChanged, "f"));
|
|
1387
|
+
this.addEventListener("context-request", __classPrivateFieldGet3(this, _KeybindingsContextMixinClass_handleContextRequest, "f"));
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
_KeybindingsContextMixinClass_handleContextRequest = /* @__PURE__ */ new WeakMap(), _KeybindingsContextMixinClass_handleKeybindingChanged = /* @__PURE__ */ new WeakMap();
|
|
1391
|
+
__decorate3([
|
|
1392
|
+
e2({ context: pushToTalkKeybindingContext }),
|
|
1393
|
+
n4({ type: String })
|
|
1394
|
+
], KeybindingsContextMixinClass.prototype, "pushToTalkKeybinding", void 0);
|
|
1395
|
+
__decorate3([
|
|
1396
|
+
e2({ context: toggleToTalkKeybindingContext }),
|
|
1397
|
+
n4({ type: String })
|
|
1398
|
+
], KeybindingsContextMixinClass.prototype, "toggleToTalkKeybinding", void 0);
|
|
1399
|
+
return KeybindingsContextMixinClass;
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1222
1402
|
// dist/utils/languages.js
|
|
1223
1403
|
var DEFAULT_LANGUAGES_BY_REGION = {
|
|
1224
1404
|
default: LANGUAGES_SUPPORTED_EU,
|
|
@@ -1250,7 +1430,7 @@ var __classPrivateFieldSet2 = function(receiver, state, value, kind, f5) {
|
|
|
1250
1430
|
if (typeof state === "function" ? receiver !== state || !f5 : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
1251
1431
|
return kind === "a" ? f5.call(receiver, value) : f5 ? f5.value = value : state.set(receiver, value), value;
|
|
1252
1432
|
};
|
|
1253
|
-
var
|
|
1433
|
+
var __classPrivateFieldGet4 = function(receiver, state, kind, f5) {
|
|
1254
1434
|
if (kind === "a" && !f5) throw new TypeError("Private accessor was defined without a getter");
|
|
1255
1435
|
if (typeof state === "function" ? receiver !== state || !f5 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
1256
1436
|
return kind === "m" ? f5 : kind === "a" ? f5.call(receiver) : f5 ? f5.value : state.get(receiver);
|
|
@@ -1274,311 +1454,182 @@ var LanguagesController = class {
|
|
|
1274
1454
|
initialize() {
|
|
1275
1455
|
__classPrivateFieldSet2(this, _LanguagesController_initialized, true, "f");
|
|
1276
1456
|
if (this.host._languages === void 0) {
|
|
1277
|
-
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
hostUpdate() {
|
|
1281
|
-
if (!__classPrivateFieldGet2(this, _LanguagesController_initialized, "f")) {
|
|
1282
|
-
return;
|
|
1283
|
-
}
|
|
1284
|
-
if (__classPrivateFieldGet2(this, _LanguagesController_previousRegion, "f") !== this.host.region && __classPrivateFieldGet2(this, _LanguagesController_autoLoadedLanguages, "f") || this.host._languages === void 0) {
|
|
1285
|
-
__classPrivateFieldGet2(this, _LanguagesController_instances, "m", _LanguagesController_loadLanguages).call(this);
|
|
1457
|
+
__classPrivateFieldGet4(this, _LanguagesController_instances, "m", _LanguagesController_loadLanguages).call(this);
|
|
1286
1458
|
}
|
|
1287
|
-
__classPrivateFieldSet2(this, _LanguagesController_previousRegion, this.host.region, "f");
|
|
1288
|
-
}
|
|
1289
|
-
/**
|
|
1290
|
-
* Clear the auto-loaded flag (when languages are set externally)
|
|
1291
|
-
*/
|
|
1292
|
-
clearAutoLoadedFlag() {
|
|
1293
|
-
__classPrivateFieldSet2(this, _LanguagesController_autoLoadedLanguages, false, "f");
|
|
1294
|
-
}
|
|
1295
|
-
};
|
|
1296
|
-
_LanguagesController_autoLoadedLanguages = /* @__PURE__ */ new WeakMap(), _LanguagesController_loadingLanguages = /* @__PURE__ */ new WeakMap(), _LanguagesController_previousRegion = /* @__PURE__ */ new WeakMap(), _LanguagesController_initialized = /* @__PURE__ */ new WeakMap(), _LanguagesController_instances = /* @__PURE__ */ new WeakSet(), _LanguagesController_loadLanguages = async function _LanguagesController_loadLanguages2() {
|
|
1297
|
-
if (__classPrivateFieldGet2(this, _LanguagesController_loadingLanguages, "f")) {
|
|
1298
|
-
return;
|
|
1299
|
-
}
|
|
1300
|
-
__classPrivateFieldSet2(this, _LanguagesController_loadingLanguages, true, "f");
|
|
1301
|
-
try {
|
|
1302
|
-
const { languages, defaultLanguage } = getLanguagesByRegion(this.host.region);
|
|
1303
|
-
__classPrivateFieldSet2(this, _LanguagesController_autoLoadedLanguages, true, "f");
|
|
1304
|
-
this.host._languages = languages;
|
|
1305
|
-
const previousLanguage = this.host.dictationConfig?.primaryLanguage;
|
|
1306
|
-
const selectedLanguage = previousLanguage && languages.includes(previousLanguage) ? previousLanguage : defaultLanguage;
|
|
1307
|
-
this.host.dictationConfig = {
|
|
1308
|
-
...this.host.dictationConfig,
|
|
1309
|
-
primaryLanguage: selectedLanguage || "en"
|
|
1310
|
-
};
|
|
1311
|
-
this.host.requestUpdate();
|
|
1312
|
-
this.host.dispatchEvent(languagesChangedEvent(languages, selectedLanguage));
|
|
1313
|
-
} catch (error) {
|
|
1314
|
-
this.host.dispatchEvent(errorEvent(error));
|
|
1315
|
-
} finally {
|
|
1316
|
-
__classPrivateFieldSet2(this, _LanguagesController_loadingLanguages, false, "f");
|
|
1317
|
-
}
|
|
1318
|
-
};
|
|
1319
|
-
|
|
1320
|
-
// dist/styles/component-styles.js
|
|
1321
|
-
var ComponentStyles = i`
|
|
1322
|
-
:host {
|
|
1323
|
-
font-family: var(--component-font-family, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, Cantarell, Ubuntu, roboto, noto, helvetica, arial, sans-serif);
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
.wrapper {
|
|
1327
|
-
background-color: var(--card-background, light-dark(#fff, #333));
|
|
1328
|
-
border: 1px solid var(--card-border-color, light-dark(#ddd, #555));
|
|
1329
|
-
border-radius: var(--card-border-radius, 8px);
|
|
1330
|
-
box-shadow: var(--card-box-shadow, 0 2px 5px rgba(0, 0, 0, 0.1));
|
|
1331
|
-
padding: var(--card-padding, 4px);
|
|
1332
|
-
display: flex;
|
|
1333
|
-
gap: 4px;
|
|
1334
|
-
height: 46px;
|
|
1335
|
-
width: fit-content;
|
|
1336
|
-
box-sizing: border-box;
|
|
1337
|
-
overflow: hidden;
|
|
1338
|
-
}
|
|
1339
|
-
`;
|
|
1340
|
-
var LabelStyles = i`
|
|
1341
|
-
label {
|
|
1342
|
-
display: block;
|
|
1343
|
-
font-size: 0.8rem;
|
|
1344
|
-
padding-bottom: 0.5rem;
|
|
1345
|
-
font-weight: 500;
|
|
1346
|
-
color: var(--component-text-color, light-dark(#333, #eee));
|
|
1347
|
-
pointer-events: none;
|
|
1348
|
-
}
|
|
1349
|
-
`;
|
|
1350
|
-
var component_styles_default = ComponentStyles;
|
|
1351
|
-
|
|
1352
|
-
// dist/utils/auth.js
|
|
1353
|
-
async function getInitialToken(config) {
|
|
1354
|
-
const initialToken = "accessToken" in config ? {
|
|
1355
|
-
accessToken: config.accessToken,
|
|
1356
|
-
refreshToken: config.refreshToken
|
|
1357
|
-
} : await config.refreshAccessToken();
|
|
1358
|
-
if (!initialToken?.accessToken || typeof initialToken.accessToken !== "string") {
|
|
1359
|
-
throw new Error("Access token is required and must be a string");
|
|
1360
|
-
}
|
|
1361
|
-
return {
|
|
1362
|
-
accessToken: initialToken.accessToken,
|
|
1363
|
-
refreshToken: initialToken.refreshToken
|
|
1364
|
-
};
|
|
1365
|
-
}
|
|
1366
|
-
|
|
1367
|
-
// dist/utils/token.js
|
|
1368
|
-
function decodeToken(token) {
|
|
1369
|
-
const parts = token.split(".");
|
|
1370
|
-
if (parts.length < 2) {
|
|
1371
|
-
throw new Error("Invalid token format");
|
|
1372
1459
|
}
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1460
|
+
hostUpdate() {
|
|
1461
|
+
if (!__classPrivateFieldGet4(this, _LanguagesController_initialized, "f")) {
|
|
1462
|
+
return;
|
|
1463
|
+
}
|
|
1464
|
+
if (__classPrivateFieldGet4(this, _LanguagesController_previousRegion, "f") !== this.host.region && __classPrivateFieldGet4(this, _LanguagesController_autoLoadedLanguages, "f") || this.host._languages === void 0) {
|
|
1465
|
+
__classPrivateFieldGet4(this, _LanguagesController_instances, "m", _LanguagesController_loadLanguages).call(this);
|
|
1466
|
+
}
|
|
1467
|
+
__classPrivateFieldSet2(this, _LanguagesController_previousRegion, this.host.region, "f");
|
|
1380
1468
|
}
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1469
|
+
/**
|
|
1470
|
+
* Clear the auto-loaded flag (when languages are set externally)
|
|
1471
|
+
*/
|
|
1472
|
+
clearAutoLoadedFlag() {
|
|
1473
|
+
__classPrivateFieldSet2(this, _LanguagesController_autoLoadedLanguages, false, "f");
|
|
1386
1474
|
}
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1475
|
+
};
|
|
1476
|
+
_LanguagesController_autoLoadedLanguages = /* @__PURE__ */ new WeakMap(), _LanguagesController_loadingLanguages = /* @__PURE__ */ new WeakMap(), _LanguagesController_previousRegion = /* @__PURE__ */ new WeakMap(), _LanguagesController_initialized = /* @__PURE__ */ new WeakMap(), _LanguagesController_instances = /* @__PURE__ */ new WeakSet(), _LanguagesController_loadLanguages = async function _LanguagesController_loadLanguages2() {
|
|
1477
|
+
if (__classPrivateFieldGet4(this, _LanguagesController_loadingLanguages, "f")) {
|
|
1478
|
+
return;
|
|
1390
1479
|
}
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1480
|
+
__classPrivateFieldSet2(this, _LanguagesController_loadingLanguages, true, "f");
|
|
1481
|
+
try {
|
|
1482
|
+
const { languages, defaultLanguage } = getLanguagesByRegion(this.host.region);
|
|
1483
|
+
__classPrivateFieldSet2(this, _LanguagesController_autoLoadedLanguages, true, "f");
|
|
1484
|
+
this.host._languages = languages;
|
|
1485
|
+
const previousLanguage = this.host.selectedLanguage;
|
|
1486
|
+
const selectedLanguage = previousLanguage && languages.includes(previousLanguage) ? previousLanguage : defaultLanguage;
|
|
1487
|
+
this.host._selectedLanguage = selectedLanguage;
|
|
1488
|
+
this.host.requestUpdate();
|
|
1489
|
+
this.host.dispatchEvent(languagesChangedEvent(languages, selectedLanguage));
|
|
1490
|
+
} catch (error) {
|
|
1491
|
+
this.host.dispatchEvent(errorEvent(error));
|
|
1492
|
+
} finally {
|
|
1493
|
+
__classPrivateFieldSet2(this, _LanguagesController_loadingLanguages, false, "f");
|
|
1395
1494
|
}
|
|
1396
|
-
|
|
1397
|
-
return {
|
|
1398
|
-
accessToken: token,
|
|
1399
|
-
environment: match[2],
|
|
1400
|
-
expiresAt,
|
|
1401
|
-
tenant: match[3]
|
|
1402
|
-
};
|
|
1403
|
-
}
|
|
1495
|
+
};
|
|
1404
1496
|
|
|
1405
|
-
// dist/
|
|
1406
|
-
var
|
|
1497
|
+
// dist/utils/converters.js
|
|
1498
|
+
var commaSeparatedConverter = {
|
|
1499
|
+
fromAttribute: (value) => value?.split(",").map((s8) => s8.trim()).filter(Boolean),
|
|
1500
|
+
toAttribute: (value) => value?.join(",")
|
|
1501
|
+
};
|
|
1502
|
+
|
|
1503
|
+
// dist/contexts/mixins/languages-context.js
|
|
1504
|
+
var __decorate4 = function(decorators, target, key, desc) {
|
|
1407
1505
|
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
1408
1506
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
1409
1507
|
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
1410
1508
|
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
1411
1509
|
};
|
|
1412
|
-
var
|
|
1510
|
+
var __classPrivateFieldGet5 = function(receiver, state, kind, f5) {
|
|
1413
1511
|
if (kind === "a" && !f5) throw new TypeError("Private accessor was defined without a getter");
|
|
1414
1512
|
if (typeof state === "function" ? receiver !== state || !f5 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
1415
1513
|
return kind === "m" ? f5 : kind === "a" ? f5.call(receiver) : f5 ? f5.value : state.get(receiver);
|
|
1416
1514
|
};
|
|
1417
|
-
var
|
|
1418
|
-
var
|
|
1419
|
-
|
|
1420
|
-
var
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
set languages(value) {
|
|
1452
|
-
this._languages = value;
|
|
1453
|
-
if (value !== void 0) {
|
|
1454
|
-
__classPrivateFieldGet3(this, _DictationRoot_languagesController, "f").clearAutoLoadedFlag();
|
|
1455
|
-
}
|
|
1456
|
-
}
|
|
1457
|
-
get languages() {
|
|
1458
|
-
return this._languages;
|
|
1459
|
-
}
|
|
1460
|
-
set devices(value) {
|
|
1461
|
-
this._devices = value;
|
|
1462
|
-
if (value !== void 0) {
|
|
1463
|
-
__classPrivateFieldGet3(this, _DictationRoot_devicesController, "f").clearAutoLoadedFlag();
|
|
1515
|
+
var languagesContext = n(Symbol("languages"));
|
|
1516
|
+
var selectedLanguageContext = n(Symbol("selectedLanguage"));
|
|
1517
|
+
function LanguagesContextMixin(superclass) {
|
|
1518
|
+
var _LanguagesContextMixinClass_languagesController;
|
|
1519
|
+
class LanguagesContextMixinClass extends superclass {
|
|
1520
|
+
set languages(value) {
|
|
1521
|
+
this._languages = value;
|
|
1522
|
+
if (value !== void 0) {
|
|
1523
|
+
__classPrivateFieldGet5(this, _LanguagesContextMixinClass_languagesController, "f").clearAutoLoadedFlag();
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
get languages() {
|
|
1527
|
+
return this._languages;
|
|
1528
|
+
}
|
|
1529
|
+
set selectedLanguage(value) {
|
|
1530
|
+
this._selectedLanguage = value;
|
|
1531
|
+
}
|
|
1532
|
+
get selectedLanguage() {
|
|
1533
|
+
return this._selectedLanguage;
|
|
1534
|
+
}
|
|
1535
|
+
constructor(...args) {
|
|
1536
|
+
super(...args);
|
|
1537
|
+
_LanguagesContextMixinClass_languagesController.set(this, new LanguagesController(this));
|
|
1538
|
+
this.addEventListener("context-request", (e10) => {
|
|
1539
|
+
const ev = e10;
|
|
1540
|
+
if (ev.context === languagesContext) {
|
|
1541
|
+
__classPrivateFieldGet5(this, _LanguagesContextMixinClass_languagesController, "f").initialize();
|
|
1542
|
+
}
|
|
1543
|
+
});
|
|
1544
|
+
this.addEventListener("languages-changed", (e10) => {
|
|
1545
|
+
const event = e10;
|
|
1546
|
+
const selectedLanguage = event.detail.selectedLanguage;
|
|
1547
|
+
this.selectedLanguage = selectedLanguage ?? event.detail.languages[0];
|
|
1548
|
+
});
|
|
1464
1549
|
}
|
|
1465
1550
|
}
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
} else if (e10.contextTarget.tagName.toLowerCase() === "dictation-keybinding-selector") {
|
|
1499
|
-
if (e10.context === pushToTalkKeybindingContext && this.pushToTalkKeybinding === void 0) {
|
|
1500
|
-
this.pushToTalkKeybinding = "Space";
|
|
1501
|
-
this.dispatchEvent(keybindingChangedEvent(" ", "Space", "Space", "push-to-talk"));
|
|
1502
|
-
}
|
|
1503
|
-
if (e10.context === toggleToTalkKeybindingContext && this.toggleToTalkKeybinding === void 0) {
|
|
1504
|
-
this.toggleToTalkKeybinding = "Enter";
|
|
1505
|
-
this.dispatchEvent(keybindingChangedEvent("Enter", "Enter", "Enter", "toggle-to-talk"));
|
|
1506
|
-
}
|
|
1507
|
-
}
|
|
1508
|
-
});
|
|
1509
|
-
_DictationRoot_handleKeybindingChanged.set(this, (e10) => {
|
|
1510
|
-
const event = e10;
|
|
1511
|
-
const keybinding = event.detail.keybinding;
|
|
1512
|
-
if (event.detail.type === "push-to-talk") {
|
|
1513
|
-
this.pushToTalkKeybinding = keybinding;
|
|
1514
|
-
} else if (event.detail.type === "toggle-to-talk") {
|
|
1515
|
-
this.toggleToTalkKeybinding = keybinding;
|
|
1516
|
-
}
|
|
1517
|
-
});
|
|
1518
|
-
this.addEventListener("languages-changed", __classPrivateFieldGet3(this, _DictationRoot_handleLanguageChanged, "f"));
|
|
1519
|
-
this.addEventListener("recording-devices-changed", __classPrivateFieldGet3(this, _DictationRoot_handleDeviceChanged, "f"));
|
|
1520
|
-
this.addEventListener("recording-state-changed", __classPrivateFieldGet3(this, _DictationRoot_handleRecordingStateChanged, "f"));
|
|
1521
|
-
this.addEventListener("context-request", __classPrivateFieldGet3(this, _DictationRoot_handleContextRequest, "f"));
|
|
1522
|
-
this.addEventListener("keybinding-changed", __classPrivateFieldGet3(this, _DictationRoot_handleKeybindingChanged, "f"));
|
|
1551
|
+
_LanguagesContextMixinClass_languagesController = /* @__PURE__ */ new WeakMap();
|
|
1552
|
+
__decorate4([
|
|
1553
|
+
e2({ context: languagesContext }),
|
|
1554
|
+
r4()
|
|
1555
|
+
], LanguagesContextMixinClass.prototype, "_languages", void 0);
|
|
1556
|
+
__decorate4([
|
|
1557
|
+
e2({ context: selectedLanguageContext }),
|
|
1558
|
+
r4()
|
|
1559
|
+
], LanguagesContextMixinClass.prototype, "_selectedLanguage", void 0);
|
|
1560
|
+
__decorate4([
|
|
1561
|
+
n4({
|
|
1562
|
+
converter: commaSeparatedConverter,
|
|
1563
|
+
type: Array
|
|
1564
|
+
})
|
|
1565
|
+
], LanguagesContextMixinClass.prototype, "languages", null);
|
|
1566
|
+
__decorate4([
|
|
1567
|
+
n4({ type: String })
|
|
1568
|
+
], LanguagesContextMixinClass.prototype, "selectedLanguage", null);
|
|
1569
|
+
return LanguagesContextMixinClass;
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
// dist/contexts/mixins/proxy-context.js
|
|
1573
|
+
var __decorate5 = function(decorators, target, key, desc) {
|
|
1574
|
+
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
1575
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
1576
|
+
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
1577
|
+
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
1578
|
+
};
|
|
1579
|
+
var socketUrlContext = n(Symbol("socketUrl"));
|
|
1580
|
+
var socketProxyContext = n(Symbol("socketProxy"));
|
|
1581
|
+
function ProxyContextMixin(superclass) {
|
|
1582
|
+
class ProxyContextMixinClass extends superclass {
|
|
1523
1583
|
}
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1584
|
+
__decorate5([
|
|
1585
|
+
e2({ context: socketUrlContext }),
|
|
1586
|
+
n4({ type: String })
|
|
1587
|
+
], ProxyContextMixinClass.prototype, "socketUrl", void 0);
|
|
1588
|
+
__decorate5([
|
|
1589
|
+
e2({ context: socketProxyContext }),
|
|
1590
|
+
n4({ attribute: false, type: Object })
|
|
1591
|
+
], ProxyContextMixinClass.prototype, "socketProxy", void 0);
|
|
1592
|
+
return ProxyContextMixinClass;
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
// dist/contexts/mixins/recording-state-context.js
|
|
1596
|
+
var __decorate6 = function(decorators, target, key, desc) {
|
|
1597
|
+
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
1598
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
1599
|
+
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
1600
|
+
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
1601
|
+
};
|
|
1602
|
+
var recordingStateContext = n(Symbol("recordingState"));
|
|
1603
|
+
function RecordingStateContextMixin(superclass) {
|
|
1604
|
+
class RecordingStateContextMixinClass extends superclass {
|
|
1605
|
+
constructor(...args) {
|
|
1606
|
+
super(...args);
|
|
1607
|
+
this.recordingState = "stopped";
|
|
1608
|
+
this.addEventListener("recording-state-changed", (e10) => {
|
|
1609
|
+
const event = e10;
|
|
1610
|
+
this.recordingState = event.detail.state;
|
|
1611
|
+
});
|
|
1550
1612
|
}
|
|
1551
|
-
return { accessToken: token, environment: void 0, tenant: void 0 };
|
|
1552
1613
|
}
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
this.dispatchEvent(errorEvent(error));
|
|
1572
|
-
}
|
|
1573
|
-
return {
|
|
1574
|
-
accessToken: void 0,
|
|
1575
|
-
environment: void 0,
|
|
1576
|
-
tenant: void 0
|
|
1577
|
-
};
|
|
1614
|
+
__decorate6([
|
|
1615
|
+
e2({ context: recordingStateContext }),
|
|
1616
|
+
r4()
|
|
1617
|
+
], RecordingStateContextMixinClass.prototype, "recordingState", void 0);
|
|
1618
|
+
return RecordingStateContextMixinClass;
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
// dist/contexts/root-context.js
|
|
1622
|
+
var __decorate7 = function(decorators, target, key, desc) {
|
|
1623
|
+
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
1624
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
1625
|
+
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
1626
|
+
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
1627
|
+
};
|
|
1628
|
+
var RootContext = class extends DevicesContextMixin(RecordingStateContextMixin(KeybindingsContextMixin(LanguagesContextMixin(AuthContextMixin(ProxyContextMixin(i5)))))) {
|
|
1629
|
+
constructor() {
|
|
1630
|
+
super(...arguments);
|
|
1631
|
+
this.noWrapper = false;
|
|
1578
1632
|
}
|
|
1579
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
1580
|
-
// Render
|
|
1581
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
1582
1633
|
render() {
|
|
1583
1634
|
if (this.noWrapper) {
|
|
1584
1635
|
return x`<slot></slot>`;
|
|
@@ -1588,91 +1639,63 @@ var DictationRoot = class DictationRoot2 extends i4 {
|
|
|
1588
1639
|
</div>`;
|
|
1589
1640
|
}
|
|
1590
1641
|
};
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
r5()
|
|
1640
|
-
], DictationRoot.prototype, "_languages", void 0);
|
|
1641
|
-
__decorate([
|
|
1642
|
-
n4({
|
|
1643
|
-
converter: commaSeparatedConverter,
|
|
1644
|
-
type: Array
|
|
1645
|
-
})
|
|
1646
|
-
], DictationRoot.prototype, "languages", null);
|
|
1647
|
-
__decorate([
|
|
1648
|
-
e9({ context: devicesContext }),
|
|
1649
|
-
r5()
|
|
1650
|
-
], DictationRoot.prototype, "_devices", void 0);
|
|
1651
|
-
__decorate([
|
|
1652
|
-
n4({ attribute: false, type: Array })
|
|
1653
|
-
], DictationRoot.prototype, "devices", null);
|
|
1654
|
-
__decorate([
|
|
1655
|
-
e9({ context: selectedDeviceContext }),
|
|
1642
|
+
RootContext.styles = [component_styles_default];
|
|
1643
|
+
__decorate7([
|
|
1644
|
+
n4({ type: Boolean })
|
|
1645
|
+
], RootContext.prototype, "noWrapper", void 0);
|
|
1646
|
+
|
|
1647
|
+
// dist/contexts/ambient-context.js
|
|
1648
|
+
var __decorate8 = function(decorators, target, key, desc) {
|
|
1649
|
+
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
1650
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
1651
|
+
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
1652
|
+
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
1653
|
+
};
|
|
1654
|
+
var ambientConfigContext = n(Symbol("ambientConfig"));
|
|
1655
|
+
var interactionIdContext = n(Symbol("interactionId"));
|
|
1656
|
+
var AmbientRoot = class AmbientRoot2 extends RootContext {
|
|
1657
|
+
constructor() {
|
|
1658
|
+
super();
|
|
1659
|
+
this.ambientConfig = DEFAULT_STREAM_CONFIG;
|
|
1660
|
+
this.addEventListener("languages-changed", (e10) => {
|
|
1661
|
+
const event = e10;
|
|
1662
|
+
const lang = event.detail.selectedLanguage ?? "en";
|
|
1663
|
+
const base = this.ambientConfig ?? DEFAULT_STREAM_CONFIG;
|
|
1664
|
+
this.ambientConfig = {
|
|
1665
|
+
...base,
|
|
1666
|
+
mode: {
|
|
1667
|
+
...base.mode,
|
|
1668
|
+
outputLocale: lang
|
|
1669
|
+
},
|
|
1670
|
+
transcription: {
|
|
1671
|
+
...base.transcription,
|
|
1672
|
+
primaryLanguage: lang
|
|
1673
|
+
}
|
|
1674
|
+
};
|
|
1675
|
+
});
|
|
1676
|
+
}
|
|
1677
|
+
willUpdate(changedProperties) {
|
|
1678
|
+
super.willUpdate(changedProperties);
|
|
1679
|
+
if (!changedProperties.has("ambientConfig")) {
|
|
1680
|
+
return;
|
|
1681
|
+
}
|
|
1682
|
+
const configuredLanguage = this.ambientConfig?.transcription?.primaryLanguage ?? "en";
|
|
1683
|
+
if (configuredLanguage !== void 0 && configuredLanguage !== this.selectedLanguage) {
|
|
1684
|
+
this.selectedLanguage = configuredLanguage;
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
};
|
|
1688
|
+
__decorate8([
|
|
1689
|
+
e2({ context: ambientConfigContext }),
|
|
1656
1690
|
n4({ attribute: false, type: Object })
|
|
1657
|
-
],
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
n4({ attribute: "debug-display-audio", type: Boolean })
|
|
1661
|
-
], DictationRoot.prototype, "debug_displayAudio", void 0);
|
|
1662
|
-
__decorate([
|
|
1663
|
-
e9({ context: pushToTalkKeybindingContext }),
|
|
1664
|
-
n4({ type: String })
|
|
1665
|
-
], DictationRoot.prototype, "pushToTalkKeybinding", void 0);
|
|
1666
|
-
__decorate([
|
|
1667
|
-
e9({ context: toggleToTalkKeybindingContext }),
|
|
1691
|
+
], AmbientRoot.prototype, "ambientConfig", void 0);
|
|
1692
|
+
__decorate8([
|
|
1693
|
+
e2({ context: interactionIdContext }),
|
|
1668
1694
|
n4({ type: String })
|
|
1669
|
-
],
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
],
|
|
1673
|
-
DictationRoot = __decorate([
|
|
1674
|
-
t3("dictation-root")
|
|
1675
|
-
], DictationRoot);
|
|
1695
|
+
], AmbientRoot.prototype, "interactionId", void 0);
|
|
1696
|
+
AmbientRoot = __decorate8([
|
|
1697
|
+
t2("ambient-root")
|
|
1698
|
+
], AmbientRoot);
|
|
1676
1699
|
|
|
1677
1700
|
// node_modules/@corti/sdk/dist/esm/core/json.mjs
|
|
1678
1701
|
var toJson = (value, replacer, space) => {
|
|
@@ -5450,12 +5473,6 @@ ReconnectingWebSocket.OPEN = 1;
|
|
|
5450
5473
|
ReconnectingWebSocket.CLOSING = 2;
|
|
5451
5474
|
ReconnectingWebSocket.CLOSED = 3;
|
|
5452
5475
|
|
|
5453
|
-
// node_modules/@corti/sdk/dist/esm/serialization/resources/agents/types/AgentsCreateAgentAgentType.mjs
|
|
5454
|
-
var AgentsCreateAgentAgentType = schemas_exports.enum_(["expert", "orchestrator", "interviewing-expert"]);
|
|
5455
|
-
|
|
5456
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/AgentsCreateExpertType.mjs
|
|
5457
|
-
var AgentsCreateExpertType = schemas_exports.enum_(["new"]);
|
|
5458
|
-
|
|
5459
5476
|
// node_modules/@corti/sdk/dist/esm/serialization/types/AgentsCreateMcpServerAuthorizationType.mjs
|
|
5460
5477
|
var AgentsCreateMcpServerAuthorizationType = schemas_exports.enum_(["none", "bearer", "inherit", "oauth2.0"]);
|
|
5461
5478
|
|
|
@@ -5474,6 +5491,12 @@ var AgentsCreateMcpServer = schemas_exports.object({
|
|
|
5474
5491
|
token: schemas_exports.string().optional()
|
|
5475
5492
|
});
|
|
5476
5493
|
|
|
5494
|
+
// node_modules/@corti/sdk/dist/esm/serialization/resources/agents/types/AgentsCreateAgentAgentType.mjs
|
|
5495
|
+
var AgentsCreateAgentAgentType = schemas_exports.enum_(["expert", "orchestrator", "interviewing-expert"]);
|
|
5496
|
+
|
|
5497
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/AgentsCreateExpertType.mjs
|
|
5498
|
+
var AgentsCreateExpertType = schemas_exports.enum_(["new"]);
|
|
5499
|
+
|
|
5477
5500
|
// node_modules/@corti/sdk/dist/esm/serialization/types/AgentsCreateExpert.mjs
|
|
5478
5501
|
var AgentsCreateExpert = schemas_exports.object({
|
|
5479
5502
|
type: AgentsCreateExpertType,
|
|
@@ -5503,7 +5526,8 @@ var AgentsCreateAgent = schemas_exports.object({
|
|
|
5503
5526
|
agentType: AgentsCreateAgentAgentType.optional(),
|
|
5504
5527
|
systemPrompt: schemas_exports.string().optional(),
|
|
5505
5528
|
description: schemas_exports.string(),
|
|
5506
|
-
experts: schemas_exports.list(AgentsCreateAgentExpertsItem).optional()
|
|
5529
|
+
experts: schemas_exports.list(AgentsCreateAgentExpertsItem).optional(),
|
|
5530
|
+
mcpServers: schemas_exports.list(AgentsCreateMcpServer).optional()
|
|
5507
5531
|
});
|
|
5508
5532
|
|
|
5509
5533
|
// node_modules/@corti/sdk/dist/esm/serialization/types/AgentsMessageKind.mjs
|
|
@@ -5604,15 +5628,19 @@ var AgentsMessageSendParams = schemas_exports.object({
|
|
|
5604
5628
|
metadata: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional()
|
|
5605
5629
|
});
|
|
5606
5630
|
|
|
5631
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/AgentsUpdateExpertReference.mjs
|
|
5632
|
+
var AgentsUpdateExpertReference = AgentsCreateExpertReference;
|
|
5633
|
+
|
|
5607
5634
|
// node_modules/@corti/sdk/dist/esm/serialization/resources/agents/types/AgentsUpdateAgentExpertsItem.mjs
|
|
5608
|
-
var AgentsUpdateAgentExpertsItem = schemas_exports.undiscriminatedUnion([AgentsCreateExpert,
|
|
5635
|
+
var AgentsUpdateAgentExpertsItem = schemas_exports.undiscriminatedUnion([AgentsCreateExpert, AgentsUpdateExpertReference]);
|
|
5609
5636
|
|
|
5610
5637
|
// node_modules/@corti/sdk/dist/esm/serialization/resources/agents/client/requests/AgentsUpdateAgent.mjs
|
|
5611
5638
|
var AgentsUpdateAgent = schemas_exports.object({
|
|
5612
5639
|
name: schemas_exports.string().optional(),
|
|
5613
5640
|
systemPrompt: schemas_exports.string().optional(),
|
|
5614
5641
|
description: schemas_exports.string().optional(),
|
|
5615
|
-
experts: schemas_exports.list(AgentsUpdateAgentExpertsItem).optional()
|
|
5642
|
+
experts: schemas_exports.list(AgentsUpdateAgentExpertsItem).optional(),
|
|
5643
|
+
mcpServers: schemas_exports.list(AgentsCreateMcpServer).optional()
|
|
5616
5644
|
});
|
|
5617
5645
|
|
|
5618
5646
|
// node_modules/@corti/sdk/dist/esm/serialization/resources/agents/index.mjs
|
|
@@ -5641,7 +5669,7 @@ var AgentsExpertType = schemas_exports.enum_(["expert"]);
|
|
|
5641
5669
|
var AgentsMcpServerAuthorizationType = schemas_exports.enum_(["none", "bearer", "inherit", "oauth2.0"]);
|
|
5642
5670
|
|
|
5643
5671
|
// node_modules/@corti/sdk/dist/esm/serialization/types/AgentsMcpServerTransportType.mjs
|
|
5644
|
-
var AgentsMcpServerTransportType = schemas_exports.enum_(["stdio", "streamable_http"]);
|
|
5672
|
+
var AgentsMcpServerTransportType = schemas_exports.enum_(["stdio", "streamable_http", "sse"]);
|
|
5645
5673
|
|
|
5646
5674
|
// node_modules/@corti/sdk/dist/esm/serialization/types/AgentsMcpServer.mjs
|
|
5647
5675
|
var AgentsMcpServer = schemas_exports.object({
|
|
@@ -5684,7 +5712,8 @@ var AgentsAgent = schemas_exports.object({
|
|
|
5684
5712
|
name: schemas_exports.string(),
|
|
5685
5713
|
description: schemas_exports.string(),
|
|
5686
5714
|
systemPrompt: schemas_exports.string(),
|
|
5687
|
-
experts: schemas_exports.list(AgentsAgentExpertsItem).optional()
|
|
5715
|
+
experts: schemas_exports.list(AgentsAgentExpertsItem).optional(),
|
|
5716
|
+
mcpServers: schemas_exports.list(AgentsMcpServer).optional()
|
|
5688
5717
|
});
|
|
5689
5718
|
|
|
5690
5719
|
// node_modules/@corti/sdk/dist/esm/serialization/types/AgentsAgentReferenceType.mjs
|
|
@@ -5845,7 +5874,14 @@ var CommonCodingSystemEnum = schemas_exports.enum_([
|
|
|
5845
5874
|
"icd10int-inpatient",
|
|
5846
5875
|
"icd10int-outpatient",
|
|
5847
5876
|
"icd10uk-inpatient",
|
|
5848
|
-
"icd10uk-outpatient"
|
|
5877
|
+
"icd10uk-outpatient",
|
|
5878
|
+
"cim10fr-inpatient",
|
|
5879
|
+
"cim10fr-outpatient",
|
|
5880
|
+
"icd10gm-inpatient",
|
|
5881
|
+
"icd10gm-outpatient",
|
|
5882
|
+
"opcs4",
|
|
5883
|
+
"ops",
|
|
5884
|
+
"ccam"
|
|
5849
5885
|
]);
|
|
5850
5886
|
|
|
5851
5887
|
// node_modules/@corti/sdk/dist/esm/serialization/resources/codes/client/requests/CodesGeneralPredictRequest.mjs
|
|
@@ -5963,16 +5999,56 @@ var InteractionsEncounterUpdateRequest = schemas_exports.object({
|
|
|
5963
5999
|
title: schemas_exports.string().optionalNullable()
|
|
5964
6000
|
});
|
|
5965
6001
|
|
|
5966
|
-
// node_modules/@corti/sdk/dist/esm/serialization/resources/interactions/client/requests/InteractionsUpdateRequest.mjs
|
|
5967
|
-
var InteractionsUpdateRequest = schemas_exports.object({
|
|
5968
|
-
assignedUserId: Uuid.optional(),
|
|
5969
|
-
encounter: InteractionsEncounterUpdateRequest.optional(),
|
|
5970
|
-
patient: InteractionsPatient.optional()
|
|
6002
|
+
// node_modules/@corti/sdk/dist/esm/serialization/resources/interactions/client/requests/InteractionsUpdateRequest.mjs
|
|
6003
|
+
var InteractionsUpdateRequest = schemas_exports.object({
|
|
6004
|
+
assignedUserId: Uuid.optional(),
|
|
6005
|
+
encounter: InteractionsEncounterUpdateRequest.optional(),
|
|
6006
|
+
patient: InteractionsPatient.optional()
|
|
6007
|
+
});
|
|
6008
|
+
|
|
6009
|
+
// node_modules/@corti/sdk/dist/esm/serialization/resources/interactions/types/InteractionsListRequestSort.mjs
|
|
6010
|
+
var InteractionsListRequestSort = schemas_exports.enum_(["id", "assignedUserId", "patient", "createdAt", "endedAt", "updatedAt"]);
|
|
6011
|
+
|
|
6012
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamConfigModeType.mjs
|
|
6013
|
+
var StreamConfigModeType = schemas_exports.enum_(["facts", "transcription"]);
|
|
6014
|
+
|
|
6015
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamSupportedLanguage.mjs
|
|
6016
|
+
var StreamSupportedLanguage = schemas_exports.string();
|
|
6017
|
+
|
|
6018
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamConfigMode.mjs
|
|
6019
|
+
var StreamConfigMode = schemas_exports.object({
|
|
6020
|
+
type: StreamConfigModeType,
|
|
6021
|
+
outputLocale: StreamSupportedLanguage.optional()
|
|
6022
|
+
});
|
|
6023
|
+
|
|
6024
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamConfigRetentionPolicy.mjs
|
|
6025
|
+
var StreamConfigRetentionPolicy = schemas_exports.enum_(["retain", "none"]);
|
|
6026
|
+
|
|
6027
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamConfigParticipantRole.mjs
|
|
6028
|
+
var StreamConfigParticipantRole = schemas_exports.enum_(["doctor", "patient", "multiple"]);
|
|
6029
|
+
|
|
6030
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamConfigParticipant.mjs
|
|
6031
|
+
var StreamConfigParticipant = schemas_exports.object({
|
|
6032
|
+
channel: schemas_exports.number(),
|
|
6033
|
+
role: StreamConfigParticipantRole
|
|
6034
|
+
});
|
|
6035
|
+
|
|
6036
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamConfigTranscription.mjs
|
|
6037
|
+
var StreamConfigTranscription = schemas_exports.object({
|
|
6038
|
+
primaryLanguage: StreamSupportedLanguage,
|
|
6039
|
+
isDiarization: schemas_exports.boolean().optional(),
|
|
6040
|
+
isMultichannel: schemas_exports.boolean().optional(),
|
|
6041
|
+
participants: schemas_exports.list(StreamConfigParticipant)
|
|
6042
|
+
});
|
|
6043
|
+
|
|
6044
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamConfig.mjs
|
|
6045
|
+
var StreamConfig = schemas_exports.object({
|
|
6046
|
+
transcription: StreamConfigTranscription,
|
|
6047
|
+
mode: StreamConfigMode,
|
|
6048
|
+
retentionPolicy: StreamConfigRetentionPolicy.optional(),
|
|
6049
|
+
audioFormat: schemas_exports.string().optional()
|
|
5971
6050
|
});
|
|
5972
6051
|
|
|
5973
|
-
// node_modules/@corti/sdk/dist/esm/serialization/resources/interactions/types/InteractionsListRequestSort.mjs
|
|
5974
|
-
var InteractionsListRequestSort = schemas_exports.enum_(["id", "assignedUserId", "patient", "createdAt", "endedAt", "updatedAt"]);
|
|
5975
|
-
|
|
5976
6052
|
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamConfigStatusMessageType.mjs
|
|
5977
6053
|
var StreamConfigStatusMessageType2 = schemas_exports.enum_([
|
|
5978
6054
|
"CONFIG_ACCEPTED",
|
|
@@ -5985,7 +6061,8 @@ var StreamConfigStatusMessageType2 = schemas_exports.enum_([
|
|
|
5985
6061
|
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamConfigStatusMessage.mjs
|
|
5986
6062
|
var StreamConfigStatusMessage = schemas_exports.object({
|
|
5987
6063
|
type: StreamConfigStatusMessageType2,
|
|
5988
|
-
reason: schemas_exports.string().optional()
|
|
6064
|
+
reason: schemas_exports.string().optional(),
|
|
6065
|
+
configuration: StreamConfig.optional()
|
|
5989
6066
|
});
|
|
5990
6067
|
|
|
5991
6068
|
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamDeltaUsageMessage.mjs
|
|
@@ -6099,6 +6176,62 @@ var TranscribeCommandMessage = schemas_exports.object({
|
|
|
6099
6176
|
data: TranscribeCommandData
|
|
6100
6177
|
});
|
|
6101
6178
|
|
|
6179
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeCommandVariable.mjs
|
|
6180
|
+
var TranscribeCommandVariable = schemas_exports.object({
|
|
6181
|
+
key: schemas_exports.string(),
|
|
6182
|
+
type: schemas_exports.stringLiteral("enum"),
|
|
6183
|
+
enum: schemas_exports.list(schemas_exports.string())
|
|
6184
|
+
});
|
|
6185
|
+
|
|
6186
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeCommand.mjs
|
|
6187
|
+
var TranscribeCommand = schemas_exports.object({
|
|
6188
|
+
id: schemas_exports.string(),
|
|
6189
|
+
phrases: schemas_exports.list(schemas_exports.string()),
|
|
6190
|
+
variables: schemas_exports.list(TranscribeCommandVariable).optional()
|
|
6191
|
+
});
|
|
6192
|
+
|
|
6193
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeFormattingDates.mjs
|
|
6194
|
+
var TranscribeFormattingDates = schemas_exports.enum_(["locale:long", "locale:medium", "locale:short", "as_dictated", "iso"]);
|
|
6195
|
+
|
|
6196
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeFormattingMeasurements.mjs
|
|
6197
|
+
var TranscribeFormattingMeasurements = schemas_exports.enum_(["abbreviated", "as_dictated"]);
|
|
6198
|
+
|
|
6199
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeFormattingNumbers.mjs
|
|
6200
|
+
var TranscribeFormattingNumbers = schemas_exports.enum_(["numerals_above_nine", "numerals", "as_dictated"]);
|
|
6201
|
+
|
|
6202
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeFormattingNumericRanges.mjs
|
|
6203
|
+
var TranscribeFormattingNumericRanges = schemas_exports.enum_(["numerals", "as_dictated"]);
|
|
6204
|
+
|
|
6205
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeFormattingOrdinals.mjs
|
|
6206
|
+
var TranscribeFormattingOrdinals = schemas_exports.enum_(["numerals_above_nine", "as_dictated", "numerals"]);
|
|
6207
|
+
|
|
6208
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeFormattingTimes.mjs
|
|
6209
|
+
var TranscribeFormattingTimes = schemas_exports.enum_(["locale", "h24", "h12", "as_dictated"]);
|
|
6210
|
+
|
|
6211
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeFormatting.mjs
|
|
6212
|
+
var TranscribeFormatting = schemas_exports.object({
|
|
6213
|
+
dates: TranscribeFormattingDates.optional(),
|
|
6214
|
+
times: TranscribeFormattingTimes.optional(),
|
|
6215
|
+
numbers: TranscribeFormattingNumbers.optional(),
|
|
6216
|
+
measurements: TranscribeFormattingMeasurements.optional(),
|
|
6217
|
+
numericRanges: TranscribeFormattingNumericRanges.optional(),
|
|
6218
|
+
ordinals: TranscribeFormattingOrdinals.optional()
|
|
6219
|
+
});
|
|
6220
|
+
|
|
6221
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeSupportedLanguage.mjs
|
|
6222
|
+
var TranscribeSupportedLanguage = schemas_exports.string();
|
|
6223
|
+
|
|
6224
|
+
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeConfig.mjs
|
|
6225
|
+
var TranscribeConfig = schemas_exports.object({
|
|
6226
|
+
primaryLanguage: TranscribeSupportedLanguage,
|
|
6227
|
+
interimResults: schemas_exports.boolean().optional(),
|
|
6228
|
+
spokenPunctuation: schemas_exports.boolean().optional(),
|
|
6229
|
+
automaticPunctuation: schemas_exports.boolean().optional(),
|
|
6230
|
+
commands: schemas_exports.list(TranscribeCommand).optional(),
|
|
6231
|
+
formatting: TranscribeFormatting.optional(),
|
|
6232
|
+
audioFormat: schemas_exports.string().optional()
|
|
6233
|
+
});
|
|
6234
|
+
|
|
6102
6235
|
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeConfigStatusMessageType.mjs
|
|
6103
6236
|
var TranscribeConfigStatusMessageType2 = schemas_exports.enum_([
|
|
6104
6237
|
"CONFIG_ACCEPTED",
|
|
@@ -6112,7 +6245,8 @@ var TranscribeConfigStatusMessageType2 = schemas_exports.enum_([
|
|
|
6112
6245
|
var TranscribeConfigStatusMessage = schemas_exports.object({
|
|
6113
6246
|
type: TranscribeConfigStatusMessageType2,
|
|
6114
6247
|
reason: schemas_exports.string().optional(),
|
|
6115
|
-
sessionId: schemas_exports.string()
|
|
6248
|
+
sessionId: schemas_exports.string().optional(),
|
|
6249
|
+
configuration: TranscribeConfig.optional()
|
|
6116
6250
|
});
|
|
6117
6251
|
|
|
6118
6252
|
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeDeltaUsageMessage.mjs
|
|
@@ -6297,6 +6431,8 @@ var AgentsRegistryMcpServer = schemas_exports.object({
|
|
|
6297
6431
|
// node_modules/@corti/sdk/dist/esm/serialization/types/AgentsRegistryExpert.mjs
|
|
6298
6432
|
var AgentsRegistryExpert = schemas_exports.object({
|
|
6299
6433
|
name: schemas_exports.string(),
|
|
6434
|
+
displayName: schemas_exports.string().optional(),
|
|
6435
|
+
displayDescription: schemas_exports.string().optional(),
|
|
6300
6436
|
description: schemas_exports.string(),
|
|
6301
6437
|
mcpServers: schemas_exports.list(AgentsRegistryMcpServer).optional()
|
|
6302
6438
|
});
|
|
@@ -6684,45 +6820,6 @@ var RecordingsListResponse = schemas_exports.object({
|
|
|
6684
6820
|
recordings: schemas_exports.list(Uuid)
|
|
6685
6821
|
});
|
|
6686
6822
|
|
|
6687
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamConfigModeType.mjs
|
|
6688
|
-
var StreamConfigModeType = schemas_exports.enum_(["facts", "transcription"]);
|
|
6689
|
-
|
|
6690
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamSupportedLanguage.mjs
|
|
6691
|
-
var StreamSupportedLanguage = schemas_exports.string();
|
|
6692
|
-
|
|
6693
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamConfigMode.mjs
|
|
6694
|
-
var StreamConfigMode = schemas_exports.object({
|
|
6695
|
-
type: StreamConfigModeType,
|
|
6696
|
-
outputLocale: StreamSupportedLanguage.optional()
|
|
6697
|
-
});
|
|
6698
|
-
|
|
6699
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamConfigParticipantRole.mjs
|
|
6700
|
-
var StreamConfigParticipantRole = schemas_exports.enum_(["doctor", "patient", "multiple"]);
|
|
6701
|
-
|
|
6702
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamConfigParticipant.mjs
|
|
6703
|
-
var StreamConfigParticipant = schemas_exports.object({
|
|
6704
|
-
channel: schemas_exports.number(),
|
|
6705
|
-
role: StreamConfigParticipantRole
|
|
6706
|
-
});
|
|
6707
|
-
|
|
6708
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamConfigTranscription.mjs
|
|
6709
|
-
var StreamConfigTranscription = schemas_exports.object({
|
|
6710
|
-
primaryLanguage: StreamSupportedLanguage,
|
|
6711
|
-
isDiarization: schemas_exports.boolean().optional(),
|
|
6712
|
-
isMultichannel: schemas_exports.boolean().optional(),
|
|
6713
|
-
participants: schemas_exports.list(StreamConfigParticipant)
|
|
6714
|
-
});
|
|
6715
|
-
|
|
6716
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamConfigXCortiRetentionPolicy.mjs
|
|
6717
|
-
var StreamConfigXCortiRetentionPolicy = schemas_exports.enum_(["retain", "none"]);
|
|
6718
|
-
|
|
6719
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamConfig.mjs
|
|
6720
|
-
var StreamConfig = schemas_exports.object({
|
|
6721
|
-
transcription: StreamConfigTranscription,
|
|
6722
|
-
mode: StreamConfigMode,
|
|
6723
|
-
xCortiRetentionPolicy: schemas_exports.property("X-Corti-Retention-Policy", StreamConfigXCortiRetentionPolicy.optional())
|
|
6724
|
-
});
|
|
6725
|
-
|
|
6726
6823
|
// node_modules/@corti/sdk/dist/esm/serialization/types/StreamConfigMessage.mjs
|
|
6727
6824
|
var StreamConfigMessage = schemas_exports.object({
|
|
6728
6825
|
type: schemas_exports.stringLiteral("config"),
|
|
@@ -6808,61 +6905,6 @@ var TemplatesSectionListResponse = schemas_exports.object({
|
|
|
6808
6905
|
data: schemas_exports.list(TemplatesSection)
|
|
6809
6906
|
});
|
|
6810
6907
|
|
|
6811
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeCommandVariable.mjs
|
|
6812
|
-
var TranscribeCommandVariable = schemas_exports.object({
|
|
6813
|
-
key: schemas_exports.string(),
|
|
6814
|
-
type: schemas_exports.stringLiteral("enum"),
|
|
6815
|
-
enum: schemas_exports.list(schemas_exports.string())
|
|
6816
|
-
});
|
|
6817
|
-
|
|
6818
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeCommand.mjs
|
|
6819
|
-
var TranscribeCommand = schemas_exports.object({
|
|
6820
|
-
id: schemas_exports.string(),
|
|
6821
|
-
phrases: schemas_exports.list(schemas_exports.string()),
|
|
6822
|
-
variables: schemas_exports.list(TranscribeCommandVariable).optional()
|
|
6823
|
-
});
|
|
6824
|
-
|
|
6825
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeFormattingDates.mjs
|
|
6826
|
-
var TranscribeFormattingDates = schemas_exports.enum_(["locale:long", "locale:medium", "locale:short", "as_dictated", "iso"]);
|
|
6827
|
-
|
|
6828
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeFormattingMeasurements.mjs
|
|
6829
|
-
var TranscribeFormattingMeasurements = schemas_exports.enum_(["abbreviated", "as_dictated"]);
|
|
6830
|
-
|
|
6831
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeFormattingNumbers.mjs
|
|
6832
|
-
var TranscribeFormattingNumbers = schemas_exports.enum_(["numerals_above_nine", "numerals", "as_dictated"]);
|
|
6833
|
-
|
|
6834
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeFormattingNumericRanges.mjs
|
|
6835
|
-
var TranscribeFormattingNumericRanges = schemas_exports.enum_(["numerals", "as_dictated"]);
|
|
6836
|
-
|
|
6837
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeFormattingOrdinals.mjs
|
|
6838
|
-
var TranscribeFormattingOrdinals = schemas_exports.enum_(["numerals_above_nine", "as_dictated", "numerals"]);
|
|
6839
|
-
|
|
6840
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeFormattingTimes.mjs
|
|
6841
|
-
var TranscribeFormattingTimes = schemas_exports.enum_(["locale", "h24", "h12", "as_dictated"]);
|
|
6842
|
-
|
|
6843
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeFormatting.mjs
|
|
6844
|
-
var TranscribeFormatting = schemas_exports.object({
|
|
6845
|
-
dates: TranscribeFormattingDates.optional(),
|
|
6846
|
-
times: TranscribeFormattingTimes.optional(),
|
|
6847
|
-
numbers: TranscribeFormattingNumbers.optional(),
|
|
6848
|
-
measurements: TranscribeFormattingMeasurements.optional(),
|
|
6849
|
-
numericRanges: TranscribeFormattingNumericRanges.optional(),
|
|
6850
|
-
ordinals: TranscribeFormattingOrdinals.optional()
|
|
6851
|
-
});
|
|
6852
|
-
|
|
6853
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeSupportedLanguage.mjs
|
|
6854
|
-
var TranscribeSupportedLanguage = schemas_exports.string();
|
|
6855
|
-
|
|
6856
|
-
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeConfig.mjs
|
|
6857
|
-
var TranscribeConfig = schemas_exports.object({
|
|
6858
|
-
primaryLanguage: TranscribeSupportedLanguage,
|
|
6859
|
-
interimResults: schemas_exports.boolean().optional(),
|
|
6860
|
-
spokenPunctuation: schemas_exports.boolean().optional(),
|
|
6861
|
-
automaticPunctuation: schemas_exports.boolean().optional(),
|
|
6862
|
-
commands: schemas_exports.list(TranscribeCommand).optional(),
|
|
6863
|
-
formatting: TranscribeFormatting.optional()
|
|
6864
|
-
});
|
|
6865
|
-
|
|
6866
6908
|
// node_modules/@corti/sdk/dist/esm/serialization/types/TranscribeConfigMessage.mjs
|
|
6867
6909
|
var TranscribeConfigMessage = schemas_exports.object({
|
|
6868
6910
|
type: schemas_exports.stringLiteral("config"),
|
|
@@ -7555,8 +7597,8 @@ function normalizeClientOptions(options) {
|
|
|
7555
7597
|
const headers = mergeHeaders({
|
|
7556
7598
|
"X-Fern-Language": "JavaScript",
|
|
7557
7599
|
"X-Fern-SDK-Name": "@corti/sdk",
|
|
7558
|
-
"X-Fern-SDK-Version": "
|
|
7559
|
-
"User-Agent": "@corti/sdk/
|
|
7600
|
+
"X-Fern-SDK-Version": "2.0.0",
|
|
7601
|
+
"User-Agent": "@corti/sdk/2.0.0",
|
|
7560
7602
|
"X-Fern-Runtime": RUNTIME.type,
|
|
7561
7603
|
"X-Fern-Runtime-Version": RUNTIME.version,
|
|
7562
7604
|
"Tenant-Name": options === null || options === void 0 ? void 0 : options.tenantName
|
|
@@ -8931,7 +8973,7 @@ var CodesClient = class {
|
|
|
8931
8973
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
8932
8974
|
}
|
|
8933
8975
|
/**
|
|
8934
|
-
* Predict medical codes from provided context.<br/><Note>This is a stateless endpoint, designed to predict ICD-10-CM, ICD-10-PCS, ICD-10-UK and CPT codes based on input text string or documentId.<br/><br/>More than one code system may be defined in a single request.<br/><br/>Code prediction requests have two possible values for context:<br/>- `text`: One set of code prediction results will be returned based on all input text defined.<br/>- `documentId`: Code prediction will be based on that defined document only.<br/><br/>The response includes two sets of results:<br/>- `Codes`: Codes predicted by the model.<br/>- `Candidates`: Lower-confidence codes the model considered potentially relevant but excluded from the predicted set.<br/><br/>All predicted code results are based on input context defined in the request only (not other external data or assets associated with an interaction).</Note>
|
|
8976
|
+
* Predict medical codes from provided context.<br/><Note>This is a stateless endpoint, designed to predict ICD-10-CM, ICD-10-PCS, ICD-10 (international), ICD-10-UK, CIM-10-FR, ICD-10-GM, OPCS-4, OPS, CCAM and CPT codes based on input text string or documentId.<br/><br/>More than one code system may be defined in a single request.<br/><br/>Code prediction requests have two possible values for context:<br/>- `text`: One set of code prediction results will be returned based on all input text defined.<br/>- `documentId`: Code prediction will be based on that defined document only.<br/><br/>The response includes two sets of results:<br/>- `Codes`: Codes predicted by the model.<br/>- `Candidates`: Lower-confidence codes the model considered potentially relevant but excluded from the predicted set.<br/><br/>All predicted code results are based on input context defined in the request only (not other external data or assets associated with an interaction).</Note>
|
|
8935
8977
|
*
|
|
8936
8978
|
* @param {Corti.CodesGeneralPredictRequest} request
|
|
8937
8979
|
* @param {CodesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -12537,8 +12579,8 @@ var CortiWebSocketProxyClient = class {
|
|
|
12537
12579
|
CortiWebSocketProxyClient.stream = new CustomProxyStream();
|
|
12538
12580
|
CortiWebSocketProxyClient.transcribe = new CustomProxyTranscribe();
|
|
12539
12581
|
|
|
12540
|
-
// dist/controllers/
|
|
12541
|
-
var
|
|
12582
|
+
// dist/controllers/socket-controller.js
|
|
12583
|
+
var __classPrivateFieldGet6 = function(receiver, state, kind, f5) {
|
|
12542
12584
|
if (kind === "a" && !f5) throw new TypeError("Private accessor was defined without a getter");
|
|
12543
12585
|
if (typeof state === "function" ? receiver !== state || !f5 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
12544
12586
|
return kind === "m" ? f5 : kind === "a" ? f5.call(receiver) : f5 ? f5.value : state.get(receiver);
|
|
@@ -12549,121 +12591,126 @@ var __classPrivateFieldSet3 = function(receiver, state, value, kind, f5) {
|
|
|
12549
12591
|
if (typeof state === "function" ? receiver !== state || !f5 : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
12550
12592
|
return kind === "a" ? f5.call(receiver, value) : f5 ? f5.value = value : state.set(receiver, value), value;
|
|
12551
12593
|
};
|
|
12552
|
-
var
|
|
12553
|
-
var
|
|
12554
|
-
var
|
|
12555
|
-
var
|
|
12556
|
-
var
|
|
12557
|
-
var
|
|
12558
|
-
var
|
|
12559
|
-
var
|
|
12560
|
-
var
|
|
12561
|
-
var
|
|
12562
|
-
var
|
|
12563
|
-
var
|
|
12564
|
-
var
|
|
12565
|
-
var
|
|
12566
|
-
var
|
|
12567
|
-
var
|
|
12568
|
-
var
|
|
12569
|
-
var
|
|
12570
|
-
var
|
|
12571
|
-
var
|
|
12572
|
-
var
|
|
12594
|
+
var _SocketController_instances;
|
|
12595
|
+
var _SocketController_webSocket;
|
|
12596
|
+
var _SocketController_cortiClient;
|
|
12597
|
+
var _SocketController_connectionGeneration;
|
|
12598
|
+
var _SocketController_socketReady;
|
|
12599
|
+
var _SocketController_closeTimeout;
|
|
12600
|
+
var _SocketController_outboundQueue;
|
|
12601
|
+
var _SocketController_callbacks;
|
|
12602
|
+
var _SocketController_lastConfig;
|
|
12603
|
+
var _SocketController_lastSocketUrl;
|
|
12604
|
+
var _SocketController_lastSocketProxy;
|
|
12605
|
+
var _SocketController_connectingPromise;
|
|
12606
|
+
var _SocketController_isConnecting;
|
|
12607
|
+
var _SocketController_openViaProxy;
|
|
12608
|
+
var _SocketController_openViaAuth;
|
|
12609
|
+
var _SocketController_doConnect;
|
|
12610
|
+
var _SocketController_isSocketOpen;
|
|
12611
|
+
var _SocketController_configHasChanged;
|
|
12612
|
+
var _SocketController_drain;
|
|
12613
|
+
var _SocketController_setupWebSocketHandlers;
|
|
12614
|
+
var SocketController = class {
|
|
12573
12615
|
constructor(host) {
|
|
12574
|
-
|
|
12575
|
-
|
|
12576
|
-
|
|
12577
|
-
|
|
12578
|
-
|
|
12579
|
-
|
|
12580
|
-
|
|
12581
|
-
|
|
12582
|
-
|
|
12583
|
-
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
|
|
12616
|
+
_SocketController_instances.add(this);
|
|
12617
|
+
_SocketController_webSocket.set(this, null);
|
|
12618
|
+
_SocketController_cortiClient.set(this, null);
|
|
12619
|
+
_SocketController_connectionGeneration.set(this, 0);
|
|
12620
|
+
_SocketController_socketReady.set(this, false);
|
|
12621
|
+
_SocketController_closeTimeout.set(this, void 0);
|
|
12622
|
+
_SocketController_outboundQueue.set(this, []);
|
|
12623
|
+
_SocketController_callbacks.set(this, void 0);
|
|
12624
|
+
_SocketController_lastConfig.set(this, null);
|
|
12625
|
+
_SocketController_lastSocketUrl.set(this, void 0);
|
|
12626
|
+
_SocketController_lastSocketProxy.set(this, void 0);
|
|
12627
|
+
_SocketController_connectingPromise.set(this, null);
|
|
12628
|
+
_SocketController_isConnecting.set(this, false);
|
|
12587
12629
|
this.mediaRecorderHandler = (data) => {
|
|
12588
|
-
if (
|
|
12589
|
-
|
|
12590
|
-
|
|
12630
|
+
if (__classPrivateFieldGet6(this, _SocketController_socketReady, "f") && __classPrivateFieldGet6(this, _SocketController_instances, "m", _SocketController_isSocketOpen).call(this)) {
|
|
12631
|
+
__classPrivateFieldGet6(this, _SocketController_webSocket, "f")?.send(data);
|
|
12632
|
+
__classPrivateFieldGet6(this, _SocketController_callbacks, "f")?.onNetworkActivity?.("sent", {
|
|
12591
12633
|
size: data.size,
|
|
12592
12634
|
type: "audio"
|
|
12593
12635
|
});
|
|
12594
12636
|
return;
|
|
12595
12637
|
}
|
|
12596
|
-
|
|
12638
|
+
__classPrivateFieldGet6(this, _SocketController_outboundQueue, "f").push(data);
|
|
12597
12639
|
};
|
|
12598
12640
|
this.host = host;
|
|
12599
12641
|
host.addController(this);
|
|
12600
12642
|
}
|
|
12601
|
-
|
|
12602
|
-
this.
|
|
12603
|
-
|
|
12604
|
-
async connect(dictationConfig = DEFAULT_DICTATION_CONFIG, callbacks = {}) {
|
|
12605
|
-
if (__classPrivateFieldGet4(this, _DictationController_connectingPromise, "f") && !__classPrivateFieldGet4(this, _DictationController_instances, "m", _DictationController_configHasChanged).call(this)) {
|
|
12606
|
-
return __classPrivateFieldGet4(this, _DictationController_connectingPromise, "f");
|
|
12643
|
+
async connect(config, callbacks) {
|
|
12644
|
+
if (__classPrivateFieldGet6(this, _SocketController_connectingPromise, "f") && !__classPrivateFieldGet6(this, _SocketController_instances, "m", _SocketController_configHasChanged).call(this, config)) {
|
|
12645
|
+
return __classPrivateFieldGet6(this, _SocketController_connectingPromise, "f");
|
|
12607
12646
|
}
|
|
12608
|
-
__classPrivateFieldSet3(this,
|
|
12609
|
-
__classPrivateFieldSet3(this,
|
|
12610
|
-
__classPrivateFieldSet3(this,
|
|
12611
|
-
__classPrivateFieldSet3(this,
|
|
12647
|
+
__classPrivateFieldSet3(this, _SocketController_isConnecting, true, "f");
|
|
12648
|
+
__classPrivateFieldSet3(this, _SocketController_connectingPromise, __classPrivateFieldGet6(this, _SocketController_instances, "m", _SocketController_doConnect).call(this, config, callbacks).finally(() => {
|
|
12649
|
+
__classPrivateFieldSet3(this, _SocketController_isConnecting, false, "f");
|
|
12650
|
+
__classPrivateFieldSet3(this, _SocketController_connectingPromise, null, "f");
|
|
12612
12651
|
}), "f");
|
|
12613
|
-
return
|
|
12652
|
+
return __classPrivateFieldGet6(this, _SocketController_connectingPromise, "f");
|
|
12614
12653
|
}
|
|
12615
|
-
|
|
12616
|
-
|
|
12617
|
-
__classPrivateFieldGet4(this, _DictationController_webSocket, "f")?.send(JSON.stringify({ type: "flush" }));
|
|
12618
|
-
__classPrivateFieldGet4(this, _DictationController_callbacks, "f")?.onNetworkActivity?.("sent", { type: "flush" });
|
|
12619
|
-
return;
|
|
12620
|
-
}
|
|
12621
|
-
__classPrivateFieldGet4(this, _DictationController_outboundQueue, "f").push({ type: "flush" });
|
|
12654
|
+
hostDisconnected() {
|
|
12655
|
+
this.cleanup();
|
|
12622
12656
|
}
|
|
12623
12657
|
isConnectionOpen() {
|
|
12624
|
-
return
|
|
12658
|
+
return __classPrivateFieldGet6(this, _SocketController_webSocket, "f") !== null && (__classPrivateFieldGet6(this, _SocketController_webSocket, "f").readyState === WebSocket.OPEN || __classPrivateFieldGet6(this, _SocketController_webSocket, "f").readyState === WebSocket.CONNECTING);
|
|
12625
12659
|
}
|
|
12626
12660
|
isConnecting() {
|
|
12627
|
-
return
|
|
12661
|
+
return __classPrivateFieldGet6(this, _SocketController_isConnecting, "f");
|
|
12628
12662
|
}
|
|
12629
12663
|
async waitForConnection() {
|
|
12630
|
-
await
|
|
12664
|
+
await __classPrivateFieldGet6(this, _SocketController_connectingPromise, "f");
|
|
12665
|
+
}
|
|
12666
|
+
async pause() {
|
|
12667
|
+
if (__classPrivateFieldGet6(this, _SocketController_socketReady, "f") && __classPrivateFieldGet6(this, _SocketController_instances, "m", _SocketController_isSocketOpen).call(this)) {
|
|
12668
|
+
__classPrivateFieldGet6(this, _SocketController_webSocket, "f")?.send(JSON.stringify({ type: "flush" }));
|
|
12669
|
+
__classPrivateFieldGet6(this, _SocketController_callbacks, "f")?.onNetworkActivity?.("sent", { type: "flush" });
|
|
12670
|
+
return;
|
|
12671
|
+
}
|
|
12672
|
+
__classPrivateFieldGet6(this, _SocketController_outboundQueue, "f").push({ type: "flush" });
|
|
12673
|
+
}
|
|
12674
|
+
async stopRecording() {
|
|
12675
|
+
await this.pause();
|
|
12631
12676
|
}
|
|
12632
12677
|
async closeConnection(onClose) {
|
|
12633
12678
|
await new Promise((resolve, reject) => {
|
|
12634
|
-
const oldSocket =
|
|
12635
|
-
__classPrivateFieldSet3(this,
|
|
12679
|
+
const oldSocket = __classPrivateFieldGet6(this, _SocketController_webSocket, "f");
|
|
12680
|
+
__classPrivateFieldSet3(this, _SocketController_webSocket, null, "f");
|
|
12636
12681
|
if (!oldSocket || oldSocket.readyState !== WebSocket.OPEN && oldSocket.readyState !== WebSocket.CONNECTING) {
|
|
12637
|
-
__classPrivateFieldSet3(this,
|
|
12682
|
+
__classPrivateFieldSet3(this, _SocketController_socketReady, false, "f");
|
|
12638
12683
|
resolve();
|
|
12639
12684
|
return;
|
|
12640
12685
|
}
|
|
12641
12686
|
oldSocket.on("close", (event) => {
|
|
12642
|
-
if (
|
|
12643
|
-
clearTimeout(
|
|
12644
|
-
__classPrivateFieldSet3(this,
|
|
12687
|
+
if (__classPrivateFieldGet6(this, _SocketController_closeTimeout, "f")) {
|
|
12688
|
+
clearTimeout(__classPrivateFieldGet6(this, _SocketController_closeTimeout, "f"));
|
|
12689
|
+
__classPrivateFieldSet3(this, _SocketController_closeTimeout, void 0, "f");
|
|
12645
12690
|
}
|
|
12646
12691
|
if (onClose) {
|
|
12647
12692
|
onClose(event);
|
|
12693
|
+
} else if (__classPrivateFieldGet6(this, _SocketController_callbacks, "f")?.onClose) {
|
|
12694
|
+
__classPrivateFieldGet6(this, _SocketController_callbacks, "f").onClose(event);
|
|
12648
12695
|
}
|
|
12649
12696
|
resolve();
|
|
12650
12697
|
});
|
|
12651
|
-
const wasReady =
|
|
12652
|
-
__classPrivateFieldSet3(this,
|
|
12698
|
+
const wasReady = __classPrivateFieldGet6(this, _SocketController_socketReady, "f");
|
|
12699
|
+
__classPrivateFieldSet3(this, _SocketController_socketReady, false, "f");
|
|
12653
12700
|
oldSocket.on("message", (message) => {
|
|
12654
|
-
|
|
12655
|
-
if (
|
|
12656
|
-
|
|
12701
|
+
__classPrivateFieldGet6(this, _SocketController_callbacks, "f")?.onNetworkActivity?.("received", message);
|
|
12702
|
+
if (__classPrivateFieldGet6(this, _SocketController_callbacks, "f")?.onMessage) {
|
|
12703
|
+
__classPrivateFieldGet6(this, _SocketController_callbacks, "f").onMessage(message);
|
|
12657
12704
|
}
|
|
12658
12705
|
if (!wasReady && message.type === "CONFIG_ACCEPTED") {
|
|
12659
12706
|
oldSocket.sendEnd({ type: "end" });
|
|
12660
|
-
|
|
12707
|
+
__classPrivateFieldGet6(this, _SocketController_callbacks, "f")?.onNetworkActivity?.("sent", { type: "end" });
|
|
12661
12708
|
return;
|
|
12662
12709
|
}
|
|
12663
|
-
if (message.type === "ended") {
|
|
12664
|
-
if (
|
|
12665
|
-
clearTimeout(
|
|
12666
|
-
__classPrivateFieldSet3(this,
|
|
12710
|
+
if (message.type === "ended" || message.type === "ENDED") {
|
|
12711
|
+
if (__classPrivateFieldGet6(this, _SocketController_closeTimeout, "f")) {
|
|
12712
|
+
clearTimeout(__classPrivateFieldGet6(this, _SocketController_closeTimeout, "f"));
|
|
12713
|
+
__classPrivateFieldSet3(this, _SocketController_closeTimeout, void 0, "f");
|
|
12667
12714
|
}
|
|
12668
12715
|
resolve();
|
|
12669
12716
|
return;
|
|
@@ -12671,9 +12718,9 @@ var DictationController = class {
|
|
|
12671
12718
|
});
|
|
12672
12719
|
if (wasReady) {
|
|
12673
12720
|
oldSocket.sendEnd({ type: "end" });
|
|
12674
|
-
|
|
12721
|
+
__classPrivateFieldGet6(this, _SocketController_callbacks, "f")?.onNetworkActivity?.("sent", { type: "end" });
|
|
12675
12722
|
}
|
|
12676
|
-
__classPrivateFieldSet3(this,
|
|
12723
|
+
__classPrivateFieldSet3(this, _SocketController_closeTimeout, window.setTimeout(() => {
|
|
12677
12724
|
reject(new Error("Connection close timeout"));
|
|
12678
12725
|
if (oldSocket?.readyState === WebSocket.OPEN) {
|
|
12679
12726
|
oldSocket.close();
|
|
@@ -12683,68 +12730,35 @@ var DictationController = class {
|
|
|
12683
12730
|
}
|
|
12684
12731
|
cleanup() {
|
|
12685
12732
|
var _a;
|
|
12686
|
-
__classPrivateFieldSet3(this,
|
|
12687
|
-
__classPrivateFieldSet3(this,
|
|
12688
|
-
if (
|
|
12689
|
-
clearTimeout(
|
|
12690
|
-
__classPrivateFieldSet3(this,
|
|
12733
|
+
__classPrivateFieldSet3(this, _SocketController_connectionGeneration, (_a = __classPrivateFieldGet6(this, _SocketController_connectionGeneration, "f"), _a++, _a), "f");
|
|
12734
|
+
__classPrivateFieldSet3(this, _SocketController_socketReady, false, "f");
|
|
12735
|
+
if (__classPrivateFieldGet6(this, _SocketController_closeTimeout, "f")) {
|
|
12736
|
+
clearTimeout(__classPrivateFieldGet6(this, _SocketController_closeTimeout, "f"));
|
|
12737
|
+
__classPrivateFieldSet3(this, _SocketController_closeTimeout, void 0, "f");
|
|
12691
12738
|
}
|
|
12692
12739
|
if (this.isConnectionOpen()) {
|
|
12693
|
-
|
|
12740
|
+
__classPrivateFieldGet6(this, _SocketController_webSocket, "f")?.close();
|
|
12694
12741
|
}
|
|
12695
|
-
__classPrivateFieldSet3(this,
|
|
12696
|
-
__classPrivateFieldSet3(this,
|
|
12697
|
-
__classPrivateFieldSet3(this,
|
|
12698
|
-
__classPrivateFieldSet3(this,
|
|
12699
|
-
__classPrivateFieldSet3(this,
|
|
12700
|
-
if (
|
|
12701
|
-
this.host.dispatchEvent(errorEvent(`${
|
|
12742
|
+
__classPrivateFieldSet3(this, _SocketController_webSocket, null, "f");
|
|
12743
|
+
__classPrivateFieldSet3(this, _SocketController_cortiClient, null, "f");
|
|
12744
|
+
__classPrivateFieldSet3(this, _SocketController_lastConfig, null, "f");
|
|
12745
|
+
__classPrivateFieldSet3(this, _SocketController_lastSocketUrl, void 0, "f");
|
|
12746
|
+
__classPrivateFieldSet3(this, _SocketController_lastSocketProxy, void 0, "f");
|
|
12747
|
+
if (__classPrivateFieldGet6(this, _SocketController_outboundQueue, "f").length > 0) {
|
|
12748
|
+
this.host.dispatchEvent(errorEvent(`${__classPrivateFieldGet6(this, _SocketController_outboundQueue, "f").length} unsent message(s) were discarded because the configuration changed before the connection was closed`));
|
|
12702
12749
|
}
|
|
12703
|
-
__classPrivateFieldSet3(this,
|
|
12750
|
+
__classPrivateFieldSet3(this, _SocketController_outboundQueue, [], "f");
|
|
12704
12751
|
}
|
|
12705
12752
|
};
|
|
12706
|
-
|
|
12707
|
-
return JSON.stringify(this.host._dictationConfig) !== JSON.stringify(__classPrivateFieldGet4(this, _DictationController_lastDictationConfig, "f")) || this.host._socketUrl !== __classPrivateFieldGet4(this, _DictationController_lastSocketUrl, "f") || JSON.stringify(this.host._socketProxy) !== JSON.stringify(__classPrivateFieldGet4(this, _DictationController_lastSocketProxy, "f"));
|
|
12708
|
-
}, _DictationController_doConnect = async function _DictationController_doConnect2(dictationConfig, callbacks) {
|
|
12709
|
-
const newConnection = __classPrivateFieldGet4(this, _DictationController_instances, "m", _DictationController_configHasChanged).call(this) || !this.isConnectionOpen();
|
|
12710
|
-
if (newConnection) {
|
|
12711
|
-
this.cleanup();
|
|
12712
|
-
__classPrivateFieldSet3(this, _DictationController_lastDictationConfig, this.host._dictationConfig || null, "f");
|
|
12713
|
-
__classPrivateFieldSet3(this, _DictationController_lastSocketUrl, this.host._socketUrl, "f");
|
|
12714
|
-
__classPrivateFieldSet3(this, _DictationController_lastSocketProxy, this.host._socketProxy, "f");
|
|
12715
|
-
const generation = __classPrivateFieldGet4(this, _DictationController_connectionGeneration, "f");
|
|
12716
|
-
const socket = this.host._socketUrl || this.host._socketProxy ? await __classPrivateFieldGet4(this, _DictationController_instances, "m", _DictationController_connectProxy).call(this, dictationConfig) : await __classPrivateFieldGet4(this, _DictationController_instances, "m", _DictationController_connectAuth).call(this, dictationConfig);
|
|
12717
|
-
if (__classPrivateFieldGet4(this, _DictationController_connectionGeneration, "f") !== generation) {
|
|
12718
|
-
socket.close();
|
|
12719
|
-
return "superseded";
|
|
12720
|
-
}
|
|
12721
|
-
__classPrivateFieldSet3(this, _DictationController_webSocket, socket, "f");
|
|
12722
|
-
__classPrivateFieldGet4(this, _DictationController_callbacks, "f")?.onNetworkActivity?.("sent", {
|
|
12723
|
-
configuration: dictationConfig,
|
|
12724
|
-
type: "config"
|
|
12725
|
-
});
|
|
12726
|
-
}
|
|
12727
|
-
__classPrivateFieldSet3(this, _DictationController_callbacks, callbacks, "f");
|
|
12728
|
-
__classPrivateFieldGet4(this, _DictationController_instances, "m", _DictationController_setupWebSocketHandlers).call(this, callbacks);
|
|
12729
|
-
if (!newConnection && this.isConnectionOpen()) {
|
|
12730
|
-
__classPrivateFieldSet3(this, _DictationController_socketReady, true, "f");
|
|
12731
|
-
__classPrivateFieldGet4(this, _DictationController_instances, "m", _DictationController_drain).call(this);
|
|
12732
|
-
}
|
|
12733
|
-
return newConnection;
|
|
12734
|
-
}, _DictationController_connectProxy = async function _DictationController_connectProxy2(dictationConfig) {
|
|
12753
|
+
_SocketController_webSocket = /* @__PURE__ */ new WeakMap(), _SocketController_cortiClient = /* @__PURE__ */ new WeakMap(), _SocketController_connectionGeneration = /* @__PURE__ */ new WeakMap(), _SocketController_socketReady = /* @__PURE__ */ new WeakMap(), _SocketController_closeTimeout = /* @__PURE__ */ new WeakMap(), _SocketController_outboundQueue = /* @__PURE__ */ new WeakMap(), _SocketController_callbacks = /* @__PURE__ */ new WeakMap(), _SocketController_lastConfig = /* @__PURE__ */ new WeakMap(), _SocketController_lastSocketUrl = /* @__PURE__ */ new WeakMap(), _SocketController_lastSocketProxy = /* @__PURE__ */ new WeakMap(), _SocketController_connectingPromise = /* @__PURE__ */ new WeakMap(), _SocketController_isConnecting = /* @__PURE__ */ new WeakMap(), _SocketController_instances = /* @__PURE__ */ new WeakSet(), _SocketController_openViaProxy = async function _SocketController_openViaProxy2(config) {
|
|
12735
12754
|
const proxyOptions = this.host._socketProxy || {
|
|
12736
12755
|
url: this.host._socketUrl || ""
|
|
12737
12756
|
};
|
|
12738
12757
|
if (!proxyOptions.url) {
|
|
12739
12758
|
throw new Error("Proxy URL is required when using proxy client");
|
|
12740
12759
|
}
|
|
12741
|
-
return
|
|
12742
|
-
|
|
12743
|
-
awaitConfiguration: false,
|
|
12744
|
-
configuration: dictationConfig,
|
|
12745
|
-
proxy: proxyOptions
|
|
12746
|
-
});
|
|
12747
|
-
}, _DictationController_connectAuth = async function _DictationController_connectAuth2(dictationConfig) {
|
|
12760
|
+
return this._connectThroughProxy(config, proxyOptions);
|
|
12761
|
+
}, _SocketController_openViaAuth = async function _SocketController_openViaAuth2(config) {
|
|
12748
12762
|
if (!this.host._authConfig && !this.host._accessToken) {
|
|
12749
12763
|
throw new Error("Auth configuration or access token is required to connect");
|
|
12750
12764
|
}
|
|
@@ -12754,67 +12768,161 @@ _DictationController_cortiClient = /* @__PURE__ */ new WeakMap(), _DictationCont
|
|
|
12754
12768
|
accessToken: this.host._accessToken || ""
|
|
12755
12769
|
})
|
|
12756
12770
|
};
|
|
12757
|
-
__classPrivateFieldSet3(this,
|
|
12771
|
+
__classPrivateFieldSet3(this, _SocketController_cortiClient, new CortiClient2({
|
|
12758
12772
|
auth,
|
|
12759
12773
|
environment: this.host._region,
|
|
12760
12774
|
tenantName: this.host._tenantName
|
|
12761
12775
|
}), "f");
|
|
12762
|
-
return
|
|
12763
|
-
|
|
12764
|
-
|
|
12765
|
-
|
|
12766
|
-
|
|
12767
|
-
|
|
12768
|
-
|
|
12776
|
+
return this._connectThroughAuth(__classPrivateFieldGet6(this, _SocketController_cortiClient, "f"), config);
|
|
12777
|
+
}, _SocketController_doConnect = async function _SocketController_doConnect2(config, callbacks) {
|
|
12778
|
+
const newConnection = __classPrivateFieldGet6(this, _SocketController_instances, "m", _SocketController_configHasChanged).call(this, config) || !this.isConnectionOpen();
|
|
12779
|
+
if (newConnection) {
|
|
12780
|
+
this.cleanup();
|
|
12781
|
+
__classPrivateFieldSet3(this, _SocketController_lastConfig, config, "f");
|
|
12782
|
+
__classPrivateFieldSet3(this, _SocketController_lastSocketUrl, this.host._socketUrl, "f");
|
|
12783
|
+
__classPrivateFieldSet3(this, _SocketController_lastSocketProxy, this.host._socketProxy, "f");
|
|
12784
|
+
const generation = __classPrivateFieldGet6(this, _SocketController_connectionGeneration, "f");
|
|
12785
|
+
const socket = this.host._socketUrl || this.host._socketProxy ? await __classPrivateFieldGet6(this, _SocketController_instances, "m", _SocketController_openViaProxy).call(this, config) : await __classPrivateFieldGet6(this, _SocketController_instances, "m", _SocketController_openViaAuth).call(this, config);
|
|
12786
|
+
if (__classPrivateFieldGet6(this, _SocketController_connectionGeneration, "f") !== generation) {
|
|
12787
|
+
socket.close();
|
|
12788
|
+
return "superseded";
|
|
12789
|
+
}
|
|
12790
|
+
__classPrivateFieldSet3(this, _SocketController_webSocket, socket, "f");
|
|
12791
|
+
__classPrivateFieldGet6(this, _SocketController_callbacks, "f")?.onNetworkActivity?.("sent", {
|
|
12792
|
+
configuration: config,
|
|
12793
|
+
type: "config"
|
|
12794
|
+
});
|
|
12795
|
+
}
|
|
12796
|
+
__classPrivateFieldSet3(this, _SocketController_callbacks, callbacks, "f");
|
|
12797
|
+
__classPrivateFieldGet6(this, _SocketController_instances, "m", _SocketController_setupWebSocketHandlers).call(this, callbacks);
|
|
12798
|
+
if (!newConnection && this.isConnectionOpen()) {
|
|
12799
|
+
__classPrivateFieldSet3(this, _SocketController_socketReady, true, "f");
|
|
12800
|
+
__classPrivateFieldGet6(this, _SocketController_instances, "m", _SocketController_drain).call(this);
|
|
12801
|
+
}
|
|
12802
|
+
return newConnection;
|
|
12803
|
+
}, _SocketController_isSocketOpen = function _SocketController_isSocketOpen2() {
|
|
12804
|
+
return __classPrivateFieldGet6(this, _SocketController_webSocket, "f") !== null && __classPrivateFieldGet6(this, _SocketController_webSocket, "f").readyState === WebSocket.OPEN;
|
|
12805
|
+
}, _SocketController_configHasChanged = function _SocketController_configHasChanged2(nextConfig) {
|
|
12806
|
+
return JSON.stringify(nextConfig) !== JSON.stringify(__classPrivateFieldGet6(this, _SocketController_lastConfig, "f")) || this.host._socketUrl !== __classPrivateFieldGet6(this, _SocketController_lastSocketUrl, "f") || JSON.stringify(this.host._socketProxy) !== JSON.stringify(__classPrivateFieldGet6(this, _SocketController_lastSocketProxy, "f"));
|
|
12807
|
+
}, _SocketController_drain = function _SocketController_drain2() {
|
|
12808
|
+
if (!__classPrivateFieldGet6(this, _SocketController_socketReady, "f") || !__classPrivateFieldGet6(this, _SocketController_instances, "m", _SocketController_isSocketOpen).call(this) || __classPrivateFieldGet6(this, _SocketController_outboundQueue, "f").length === 0) {
|
|
12809
|
+
return;
|
|
12810
|
+
}
|
|
12811
|
+
while (__classPrivateFieldGet6(this, _SocketController_outboundQueue, "f").length > 0 && __classPrivateFieldGet6(this, _SocketController_instances, "m", _SocketController_isSocketOpen).call(this)) {
|
|
12812
|
+
const item = __classPrivateFieldGet6(this, _SocketController_outboundQueue, "f").shift();
|
|
12813
|
+
if (item === void 0) {
|
|
12814
|
+
break;
|
|
12815
|
+
}
|
|
12816
|
+
if (item instanceof Blob) {
|
|
12817
|
+
__classPrivateFieldGet6(this, _SocketController_webSocket, "f").send(item);
|
|
12818
|
+
__classPrivateFieldGet6(this, _SocketController_callbacks, "f")?.onNetworkActivity?.("sent", {
|
|
12819
|
+
size: item.size,
|
|
12820
|
+
type: "audio"
|
|
12821
|
+
});
|
|
12822
|
+
continue;
|
|
12823
|
+
}
|
|
12824
|
+
__classPrivateFieldGet6(this, _SocketController_webSocket, "f").send(JSON.stringify(item));
|
|
12825
|
+
__classPrivateFieldGet6(this, _SocketController_callbacks, "f")?.onNetworkActivity?.("sent", {
|
|
12826
|
+
type: item.type
|
|
12827
|
+
});
|
|
12828
|
+
}
|
|
12829
|
+
}, _SocketController_setupWebSocketHandlers = function _SocketController_setupWebSocketHandlers2(callbacks) {
|
|
12830
|
+
if (!__classPrivateFieldGet6(this, _SocketController_webSocket, "f")) {
|
|
12769
12831
|
throw new Error("WebSocket not initialized");
|
|
12770
12832
|
}
|
|
12771
|
-
|
|
12833
|
+
__classPrivateFieldGet6(this, _SocketController_webSocket, "f").on("message", (message) => {
|
|
12772
12834
|
if (message.type === "CONFIG_ACCEPTED") {
|
|
12773
|
-
__classPrivateFieldSet3(this,
|
|
12774
|
-
|
|
12835
|
+
__classPrivateFieldSet3(this, _SocketController_socketReady, true, "f");
|
|
12836
|
+
__classPrivateFieldGet6(this, _SocketController_instances, "m", _SocketController_drain).call(this);
|
|
12775
12837
|
}
|
|
12776
12838
|
callbacks.onNetworkActivity?.("received", message);
|
|
12777
12839
|
if (callbacks.onMessage) {
|
|
12778
12840
|
callbacks.onMessage(message);
|
|
12779
12841
|
}
|
|
12780
12842
|
});
|
|
12781
|
-
|
|
12782
|
-
__classPrivateFieldSet3(this,
|
|
12843
|
+
__classPrivateFieldGet6(this, _SocketController_webSocket, "f").on("error", (event) => {
|
|
12844
|
+
__classPrivateFieldSet3(this, _SocketController_socketReady, false, "f");
|
|
12783
12845
|
if (callbacks.onError) {
|
|
12784
12846
|
callbacks.onError(event);
|
|
12785
12847
|
}
|
|
12786
12848
|
});
|
|
12787
|
-
|
|
12788
|
-
__classPrivateFieldSet3(this,
|
|
12849
|
+
__classPrivateFieldGet6(this, _SocketController_webSocket, "f").on("close", (event) => {
|
|
12850
|
+
__classPrivateFieldSet3(this, _SocketController_socketReady, false, "f");
|
|
12789
12851
|
if (callbacks.onClose) {
|
|
12790
12852
|
callbacks.onClose(event);
|
|
12791
12853
|
}
|
|
12792
12854
|
});
|
|
12793
|
-
}
|
|
12794
|
-
|
|
12795
|
-
|
|
12796
|
-
|
|
12797
|
-
|
|
12855
|
+
};
|
|
12856
|
+
|
|
12857
|
+
// dist/controllers/ambient-controller.js
|
|
12858
|
+
var AmbientController = class extends SocketController {
|
|
12859
|
+
async stopRecording() {
|
|
12860
|
+
await this.closeConnection();
|
|
12798
12861
|
}
|
|
12799
|
-
|
|
12800
|
-
|
|
12801
|
-
|
|
12802
|
-
|
|
12862
|
+
async _connectThroughProxy(session, proxy) {
|
|
12863
|
+
return await CortiWebSocketProxyClient.stream.connect({
|
|
12864
|
+
// awaitConfiguration: false — CONFIG_* appears in network activity before the socket is configured server-side
|
|
12865
|
+
awaitConfiguration: false,
|
|
12866
|
+
configuration: session.configuration,
|
|
12867
|
+
proxy
|
|
12868
|
+
});
|
|
12869
|
+
}
|
|
12870
|
+
async _connectThroughAuth(client, session) {
|
|
12871
|
+
return await client.stream.connect({
|
|
12872
|
+
// awaitConfiguration: false — CONFIG_* appears in network activity before the socket is configured server-side
|
|
12873
|
+
awaitConfiguration: false,
|
|
12874
|
+
configuration: session.configuration,
|
|
12875
|
+
id: session.interactionId
|
|
12876
|
+
});
|
|
12877
|
+
}
|
|
12878
|
+
};
|
|
12879
|
+
|
|
12880
|
+
// dist/contexts/dictation-context.js
|
|
12881
|
+
var __decorate9 = function(decorators, target, key, desc) {
|
|
12882
|
+
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
12883
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
12884
|
+
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
12885
|
+
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
12886
|
+
};
|
|
12887
|
+
var dictationConfigContext = n(Symbol("dictationConfig"));
|
|
12888
|
+
var debugDisplayAudioContext = n(Symbol("debugDisplayAudio"));
|
|
12889
|
+
var DictationRoot = class DictationRoot2 extends RootContext {
|
|
12890
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
12891
|
+
// Lifecycle
|
|
12892
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
12893
|
+
constructor() {
|
|
12894
|
+
super();
|
|
12895
|
+
this.addEventListener("languages-changed", (e10) => {
|
|
12896
|
+
const event = e10;
|
|
12897
|
+
const selectedLanguage = event.detail.selectedLanguage;
|
|
12898
|
+
this.dictationConfig = {
|
|
12899
|
+
...this.dictationConfig,
|
|
12900
|
+
primaryLanguage: selectedLanguage ?? "en"
|
|
12901
|
+
};
|
|
12902
|
+
});
|
|
12903
|
+
}
|
|
12904
|
+
willUpdate(changedProperties) {
|
|
12905
|
+
super.willUpdate(changedProperties);
|
|
12906
|
+
if (!changedProperties.has("dictationConfig")) {
|
|
12907
|
+
return;
|
|
12803
12908
|
}
|
|
12804
|
-
|
|
12805
|
-
|
|
12806
|
-
|
|
12807
|
-
size: item.size,
|
|
12808
|
-
type: "audio"
|
|
12809
|
-
});
|
|
12810
|
-
continue;
|
|
12909
|
+
const configuredLanguage = this.dictationConfig?.primaryLanguage;
|
|
12910
|
+
if (configuredLanguage !== void 0 && configuredLanguage !== this.selectedLanguage) {
|
|
12911
|
+
this.selectedLanguage = configuredLanguage;
|
|
12811
12912
|
}
|
|
12812
|
-
__classPrivateFieldGet4(this, _DictationController_webSocket, "f").send(JSON.stringify(item));
|
|
12813
|
-
__classPrivateFieldGet4(this, _DictationController_callbacks, "f")?.onNetworkActivity?.("sent", {
|
|
12814
|
-
type: item.type
|
|
12815
|
-
});
|
|
12816
12913
|
}
|
|
12817
12914
|
};
|
|
12915
|
+
__decorate9([
|
|
12916
|
+
e2({ context: dictationConfigContext }),
|
|
12917
|
+
n4({ attribute: false, type: Object })
|
|
12918
|
+
], DictationRoot.prototype, "dictationConfig", void 0);
|
|
12919
|
+
__decorate9([
|
|
12920
|
+
e2({ context: debugDisplayAudioContext }),
|
|
12921
|
+
n4({ attribute: "debug-display-audio", type: Boolean })
|
|
12922
|
+
], DictationRoot.prototype, "debug_displayAudio", void 0);
|
|
12923
|
+
DictationRoot = __decorate9([
|
|
12924
|
+
t2("dictation-root")
|
|
12925
|
+
], DictationRoot);
|
|
12818
12926
|
|
|
12819
12927
|
// dist/utils/keybinding.js
|
|
12820
12928
|
function isMac() {
|
|
@@ -12881,7 +12989,7 @@ function shouldIgnoreKeybinding(element) {
|
|
|
12881
12989
|
}
|
|
12882
12990
|
|
|
12883
12991
|
// dist/controllers/keybinding-controller.js
|
|
12884
|
-
var
|
|
12992
|
+
var __classPrivateFieldGet7 = function(receiver, state, kind, f5) {
|
|
12885
12993
|
if (kind === "a" && !f5) throw new TypeError("Private accessor was defined without a getter");
|
|
12886
12994
|
if (typeof state === "function" ? receiver !== state || !f5 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
12887
12995
|
return kind === "m" ? f5 : kind === "a" ? f5.call(receiver) : f5 ? f5.value : state.get(receiver);
|
|
@@ -12910,19 +13018,19 @@ var KeybindingController = class {
|
|
|
12910
13018
|
host.addController(this);
|
|
12911
13019
|
}
|
|
12912
13020
|
hostConnected() {
|
|
12913
|
-
|
|
13021
|
+
__classPrivateFieldGet7(this, _KeybindingController_instances, "m", _KeybindingController_setupListeners).call(this);
|
|
12914
13022
|
}
|
|
12915
13023
|
hostDisconnected() {
|
|
12916
|
-
|
|
13024
|
+
__classPrivateFieldGet7(this, _KeybindingController_instances, "m", _KeybindingController_removeListeners).call(this);
|
|
12917
13025
|
}
|
|
12918
13026
|
};
|
|
12919
13027
|
_KeybindingController_keydownHandler = /* @__PURE__ */ new WeakMap(), _KeybindingController_keyupHandler = /* @__PURE__ */ new WeakMap(), _KeybindingController_blurHandler = /* @__PURE__ */ new WeakMap(), _KeybindingController_isPushToTalkKeyPressed = /* @__PURE__ */ new WeakMap(), _KeybindingController_instances = /* @__PURE__ */ new WeakSet(), _KeybindingController_setupListeners = function _KeybindingController_setupListeners2() {
|
|
12920
|
-
|
|
13028
|
+
__classPrivateFieldGet7(this, _KeybindingController_instances, "m", _KeybindingController_removeListeners).call(this);
|
|
12921
13029
|
__classPrivateFieldSet4(this, _KeybindingController_keydownHandler, (event) => {
|
|
12922
13030
|
if (shouldIgnoreKeybinding(document.activeElement)) {
|
|
12923
13031
|
return;
|
|
12924
13032
|
}
|
|
12925
|
-
if (this.host._toggleToTalkKeybinding && matchesKeybinding(event, this.host._toggleToTalkKeybinding) && !
|
|
13033
|
+
if (this.host._toggleToTalkKeybinding && matchesKeybinding(event, this.host._toggleToTalkKeybinding) && !__classPrivateFieldGet7(this, _KeybindingController_isPushToTalkKeyPressed, "f")) {
|
|
12926
13034
|
if (!this.host.dispatchEvent(keybindingActivatedEvent(event))) {
|
|
12927
13035
|
return;
|
|
12928
13036
|
}
|
|
@@ -12947,25 +13055,25 @@ _KeybindingController_keydownHandler = /* @__PURE__ */ new WeakMap(), _Keybindin
|
|
|
12947
13055
|
}
|
|
12948
13056
|
}, "f");
|
|
12949
13057
|
__classPrivateFieldSet4(this, _KeybindingController_blurHandler, () => {
|
|
12950
|
-
if (
|
|
13058
|
+
if (__classPrivateFieldGet7(this, _KeybindingController_isPushToTalkKeyPressed, "f")) {
|
|
12951
13059
|
__classPrivateFieldSet4(this, _KeybindingController_isPushToTalkKeyPressed, false, "f");
|
|
12952
13060
|
this.host.stopRecording();
|
|
12953
13061
|
}
|
|
12954
13062
|
}, "f");
|
|
12955
|
-
window.addEventListener("keydown",
|
|
12956
|
-
window.addEventListener("keyup",
|
|
12957
|
-
window.addEventListener("blur",
|
|
13063
|
+
window.addEventListener("keydown", __classPrivateFieldGet7(this, _KeybindingController_keydownHandler, "f"));
|
|
13064
|
+
window.addEventListener("keyup", __classPrivateFieldGet7(this, _KeybindingController_keyupHandler, "f"));
|
|
13065
|
+
window.addEventListener("blur", __classPrivateFieldGet7(this, _KeybindingController_blurHandler, "f"));
|
|
12958
13066
|
}, _KeybindingController_removeListeners = function _KeybindingController_removeListeners2() {
|
|
12959
|
-
if (
|
|
12960
|
-
window.removeEventListener("keydown",
|
|
13067
|
+
if (__classPrivateFieldGet7(this, _KeybindingController_keydownHandler, "f")) {
|
|
13068
|
+
window.removeEventListener("keydown", __classPrivateFieldGet7(this, _KeybindingController_keydownHandler, "f"));
|
|
12961
13069
|
__classPrivateFieldSet4(this, _KeybindingController_keydownHandler, void 0, "f");
|
|
12962
13070
|
}
|
|
12963
|
-
if (
|
|
12964
|
-
window.removeEventListener("keyup",
|
|
13071
|
+
if (__classPrivateFieldGet7(this, _KeybindingController_keyupHandler, "f")) {
|
|
13072
|
+
window.removeEventListener("keyup", __classPrivateFieldGet7(this, _KeybindingController_keyupHandler, "f"));
|
|
12965
13073
|
__classPrivateFieldSet4(this, _KeybindingController_keyupHandler, void 0, "f");
|
|
12966
13074
|
}
|
|
12967
|
-
if (
|
|
12968
|
-
window.removeEventListener("blur",
|
|
13075
|
+
if (__classPrivateFieldGet7(this, _KeybindingController_blurHandler, "f")) {
|
|
13076
|
+
window.removeEventListener("blur", __classPrivateFieldGet7(this, _KeybindingController_blurHandler, "f"));
|
|
12969
13077
|
__classPrivateFieldSet4(this, _KeybindingController_blurHandler, void 0, "f");
|
|
12970
13078
|
}
|
|
12971
13079
|
};
|
|
@@ -13015,7 +13123,7 @@ var __classPrivateFieldSet5 = function(receiver, state, value, kind, f5) {
|
|
|
13015
13123
|
if (typeof state === "function" ? receiver !== state || !f5 : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
13016
13124
|
return kind === "a" ? f5.call(receiver, value) : f5 ? f5.value = value : state.set(receiver, value), value;
|
|
13017
13125
|
};
|
|
13018
|
-
var
|
|
13126
|
+
var __classPrivateFieldGet8 = function(receiver, state, kind, f5) {
|
|
13019
13127
|
if (kind === "a" && !f5) throw new TypeError("Private accessor was defined without a getter");
|
|
13020
13128
|
if (typeof state === "function" ? receiver !== state || !f5 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
13021
13129
|
return kind === "m" ? f5 : kind === "a" ? f5.call(receiver) : f5 ? f5.value : state.get(receiver);
|
|
@@ -13051,25 +13159,25 @@ var MediaController = class {
|
|
|
13051
13159
|
__classPrivateFieldSet5(this, _MediaController_onTrackEnded, onTrackEnded, "f");
|
|
13052
13160
|
__classPrivateFieldSet5(this, _MediaController_dataHandler, dataHandler, "f");
|
|
13053
13161
|
__classPrivateFieldSet5(this, _MediaController_mediaStream, await getMediaStream(this.host._selectedDevice?.deviceId, this.host._debug_displayAudio), "f");
|
|
13054
|
-
|
|
13162
|
+
__classPrivateFieldGet8(this, _MediaController_mediaStream, "f").getTracks().forEach((track) => {
|
|
13055
13163
|
track.addEventListener("ended", () => {
|
|
13056
|
-
if (
|
|
13057
|
-
|
|
13164
|
+
if (__classPrivateFieldGet8(this, _MediaController_onTrackEnded, "f")) {
|
|
13165
|
+
__classPrivateFieldGet8(this, _MediaController_onTrackEnded, "f").call(this);
|
|
13058
13166
|
}
|
|
13059
13167
|
});
|
|
13060
13168
|
});
|
|
13061
|
-
const { audioContext, analyser } = createAudioAnalyzer(
|
|
13169
|
+
const { audioContext, analyser } = createAudioAnalyzer(__classPrivateFieldGet8(this, _MediaController_mediaStream, "f"));
|
|
13062
13170
|
__classPrivateFieldSet5(this, _MediaController_audioContext, audioContext, "f");
|
|
13063
13171
|
__classPrivateFieldSet5(this, _MediaController_analyser, analyser, "f");
|
|
13064
|
-
__classPrivateFieldSet5(this, _MediaController_mediaRecorder, new MediaRecorder(
|
|
13065
|
-
|
|
13066
|
-
if (
|
|
13067
|
-
|
|
13172
|
+
__classPrivateFieldSet5(this, _MediaController_mediaRecorder, new MediaRecorder(__classPrivateFieldGet8(this, _MediaController_mediaStream, "f")), "f");
|
|
13173
|
+
__classPrivateFieldGet8(this, _MediaController_mediaRecorder, "f").ondataavailable = (event) => {
|
|
13174
|
+
if (__classPrivateFieldGet8(this, _MediaController_dataHandler, "f")) {
|
|
13175
|
+
__classPrivateFieldGet8(this, _MediaController_dataHandler, "f").call(this, event.data);
|
|
13068
13176
|
}
|
|
13069
13177
|
};
|
|
13070
13178
|
}
|
|
13071
13179
|
getAudioLevel() {
|
|
13072
|
-
return
|
|
13180
|
+
return __classPrivateFieldGet8(this, _MediaController_analyser, "f") ? calculateAudioLevel(__classPrivateFieldGet8(this, _MediaController_analyser, "f")) : 0;
|
|
13073
13181
|
}
|
|
13074
13182
|
startAudioLevelMonitoring(onAudioLevelChange) {
|
|
13075
13183
|
this.stopAudioLevelMonitoring();
|
|
@@ -13077,38 +13185,38 @@ var MediaController = class {
|
|
|
13077
13185
|
__classPrivateFieldSet5(this, _MediaController_visualiserInterval, window.setInterval(() => {
|
|
13078
13186
|
__classPrivateFieldSet5(this, _MediaController_audioLevel, this.getAudioLevel() * 3, "f");
|
|
13079
13187
|
this.host.requestUpdate();
|
|
13080
|
-
if (
|
|
13081
|
-
|
|
13188
|
+
if (__classPrivateFieldGet8(this, _MediaController_onAudioLevelChange, "f")) {
|
|
13189
|
+
__classPrivateFieldGet8(this, _MediaController_onAudioLevelChange, "f").call(this, __classPrivateFieldGet8(this, _MediaController_audioLevel, "f"));
|
|
13082
13190
|
}
|
|
13083
13191
|
}, 150), "f");
|
|
13084
13192
|
}
|
|
13085
13193
|
stopAudioLevelMonitoring() {
|
|
13086
|
-
if (
|
|
13087
|
-
clearInterval(
|
|
13194
|
+
if (__classPrivateFieldGet8(this, _MediaController_visualiserInterval, "f")) {
|
|
13195
|
+
clearInterval(__classPrivateFieldGet8(this, _MediaController_visualiserInterval, "f"));
|
|
13088
13196
|
__classPrivateFieldSet5(this, _MediaController_visualiserInterval, void 0, "f");
|
|
13089
13197
|
}
|
|
13090
13198
|
__classPrivateFieldSet5(this, _MediaController_audioLevel, 0, "f");
|
|
13091
13199
|
this.host.requestUpdate();
|
|
13092
|
-
if (
|
|
13093
|
-
|
|
13200
|
+
if (__classPrivateFieldGet8(this, _MediaController_onAudioLevelChange, "f")) {
|
|
13201
|
+
__classPrivateFieldGet8(this, _MediaController_onAudioLevelChange, "f").call(this, __classPrivateFieldGet8(this, _MediaController_audioLevel, "f"));
|
|
13094
13202
|
}
|
|
13095
13203
|
}
|
|
13096
13204
|
async cleanup() {
|
|
13097
13205
|
this.stopAudioLevelMonitoring();
|
|
13098
|
-
if (
|
|
13099
|
-
|
|
13206
|
+
if (__classPrivateFieldGet8(this, _MediaController_mediaRecorder, "f")?.state === "recording") {
|
|
13207
|
+
__classPrivateFieldGet8(this, _MediaController_mediaRecorder, "f").stop();
|
|
13100
13208
|
}
|
|
13101
|
-
if (
|
|
13102
|
-
|
|
13209
|
+
if (__classPrivateFieldGet8(this, _MediaController_mediaRecorder, "f")) {
|
|
13210
|
+
__classPrivateFieldGet8(this, _MediaController_mediaRecorder, "f").ondataavailable = null;
|
|
13103
13211
|
}
|
|
13104
|
-
if (
|
|
13105
|
-
|
|
13212
|
+
if (__classPrivateFieldGet8(this, _MediaController_mediaStream, "f")) {
|
|
13213
|
+
__classPrivateFieldGet8(this, _MediaController_mediaStream, "f").getTracks().forEach((track) => {
|
|
13106
13214
|
track.stop();
|
|
13107
13215
|
});
|
|
13108
13216
|
__classPrivateFieldSet5(this, _MediaController_mediaStream, null, "f");
|
|
13109
13217
|
}
|
|
13110
|
-
if (
|
|
13111
|
-
await
|
|
13218
|
+
if (__classPrivateFieldGet8(this, _MediaController_audioContext, "f") && __classPrivateFieldGet8(this, _MediaController_audioContext, "f").state !== "closed") {
|
|
13219
|
+
await __classPrivateFieldGet8(this, _MediaController_audioContext, "f").close();
|
|
13112
13220
|
}
|
|
13113
13221
|
__classPrivateFieldSet5(this, _MediaController_audioContext, null, "f");
|
|
13114
13222
|
__classPrivateFieldSet5(this, _MediaController_analyser, null, "f");
|
|
@@ -13123,27 +13231,27 @@ var MediaController = class {
|
|
|
13123
13231
|
*/
|
|
13124
13232
|
async stopRecording() {
|
|
13125
13233
|
return new Promise((resolve) => {
|
|
13126
|
-
if (!
|
|
13234
|
+
if (!__classPrivateFieldGet8(this, _MediaController_mediaRecorder, "f") || __classPrivateFieldGet8(this, _MediaController_mediaRecorder, "f").state !== "recording") {
|
|
13127
13235
|
resolve();
|
|
13128
13236
|
return;
|
|
13129
13237
|
}
|
|
13130
|
-
|
|
13238
|
+
__classPrivateFieldGet8(this, _MediaController_mediaRecorder, "f").onstop = () => {
|
|
13131
13239
|
resolve();
|
|
13132
13240
|
};
|
|
13133
|
-
|
|
13241
|
+
__classPrivateFieldGet8(this, _MediaController_mediaRecorder, "f").stop();
|
|
13134
13242
|
});
|
|
13135
13243
|
}
|
|
13136
13244
|
get mediaRecorder() {
|
|
13137
|
-
return
|
|
13245
|
+
return __classPrivateFieldGet8(this, _MediaController_mediaRecorder, "f");
|
|
13138
13246
|
}
|
|
13139
13247
|
get audioLevel() {
|
|
13140
|
-
return
|
|
13248
|
+
return __classPrivateFieldGet8(this, _MediaController_audioLevel, "f");
|
|
13141
13249
|
}
|
|
13142
13250
|
};
|
|
13143
13251
|
_MediaController_mediaStream = /* @__PURE__ */ new WeakMap(), _MediaController_audioContext = /* @__PURE__ */ new WeakMap(), _MediaController_analyser = /* @__PURE__ */ new WeakMap(), _MediaController_mediaRecorder = /* @__PURE__ */ new WeakMap(), _MediaController_visualiserInterval = /* @__PURE__ */ new WeakMap(), _MediaController_audioLevel = /* @__PURE__ */ new WeakMap(), _MediaController_onTrackEnded = /* @__PURE__ */ new WeakMap(), _MediaController_onAudioLevelChange = /* @__PURE__ */ new WeakMap(), _MediaController_dataHandler = /* @__PURE__ */ new WeakMap();
|
|
13144
13252
|
|
|
13145
13253
|
// dist/styles/buttons.js
|
|
13146
|
-
var ButtonStyles =
|
|
13254
|
+
var ButtonStyles = i2`
|
|
13147
13255
|
/* Default (plain) button styling */
|
|
13148
13256
|
button {
|
|
13149
13257
|
background: var(--action-plain-background, transparent);
|
|
@@ -13194,15 +13302,59 @@ var ButtonStyles = i`
|
|
|
13194
13302
|
var buttons_default = ButtonStyles;
|
|
13195
13303
|
|
|
13196
13304
|
// dist/styles/recording-button.js
|
|
13197
|
-
var RecordingButtonStyles =
|
|
13305
|
+
var RecordingButtonStyles = i2`
|
|
13198
13306
|
:host {
|
|
13199
13307
|
display: inline-flex;
|
|
13200
13308
|
}
|
|
13201
13309
|
`;
|
|
13202
13310
|
var recording_button_default = RecordingButtonStyles;
|
|
13203
13311
|
|
|
13312
|
+
// node_modules/lit-html/directive.js
|
|
13313
|
+
var t5 = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 };
|
|
13314
|
+
var e7 = (t7) => (...e10) => ({ _$litDirective$: t7, values: e10 });
|
|
13315
|
+
var i6 = class {
|
|
13316
|
+
constructor(t7) {
|
|
13317
|
+
}
|
|
13318
|
+
get _$AU() {
|
|
13319
|
+
return this._$AM._$AU;
|
|
13320
|
+
}
|
|
13321
|
+
_$AT(t7, e10, i7) {
|
|
13322
|
+
this._$Ct = t7, this._$AM = e10, this._$Ci = i7;
|
|
13323
|
+
}
|
|
13324
|
+
_$AS(t7, e10) {
|
|
13325
|
+
return this.update(t7, e10);
|
|
13326
|
+
}
|
|
13327
|
+
update(t7, e10) {
|
|
13328
|
+
return this.render(...e10);
|
|
13329
|
+
}
|
|
13330
|
+
};
|
|
13331
|
+
|
|
13332
|
+
// node_modules/lit-html/directives/class-map.js
|
|
13333
|
+
var e8 = e7(class extends i6 {
|
|
13334
|
+
constructor(t7) {
|
|
13335
|
+
if (super(t7), t7.type !== t5.ATTRIBUTE || "class" !== t7.name || t7.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
13336
|
+
}
|
|
13337
|
+
render(t7) {
|
|
13338
|
+
return " " + Object.keys(t7).filter((s8) => t7[s8]).join(" ") + " ";
|
|
13339
|
+
}
|
|
13340
|
+
update(s8, [i7]) {
|
|
13341
|
+
if (void 0 === this.st) {
|
|
13342
|
+
this.st = /* @__PURE__ */ new Set(), void 0 !== s8.strings && (this.nt = new Set(s8.strings.join(" ").split(/\s/).filter((t7) => "" !== t7)));
|
|
13343
|
+
for (const t7 in i7) i7[t7] && !this.nt?.has(t7) && this.st.add(t7);
|
|
13344
|
+
return this.render(i7);
|
|
13345
|
+
}
|
|
13346
|
+
const r7 = s8.element.classList;
|
|
13347
|
+
for (const t7 of this.st) t7 in i7 || (r7.remove(t7), this.st.delete(t7));
|
|
13348
|
+
for (const t7 in i7) {
|
|
13349
|
+
const s9 = !!i7[t7];
|
|
13350
|
+
s9 === this.st.has(t7) || this.nt?.has(t7) || (s9 ? (r7.add(t7), this.st.add(t7)) : (r7.remove(t7), this.st.delete(t7)));
|
|
13351
|
+
}
|
|
13352
|
+
return T;
|
|
13353
|
+
}
|
|
13354
|
+
});
|
|
13355
|
+
|
|
13204
13356
|
// node_modules/lit-html/directives/map.js
|
|
13205
|
-
function*
|
|
13357
|
+
function* o6(o10, f5) {
|
|
13206
13358
|
if (void 0 !== o10) {
|
|
13207
13359
|
let i7 = 0;
|
|
13208
13360
|
for (const t7 of o10) yield f5(t7, i7++);
|
|
@@ -13210,14 +13362,14 @@ function* o8(o10, f5) {
|
|
|
13210
13362
|
}
|
|
13211
13363
|
|
|
13212
13364
|
// node_modules/lit-html/directives/range.js
|
|
13213
|
-
function*
|
|
13365
|
+
function* o7(o10, t7, e10 = 1) {
|
|
13214
13366
|
const i7 = void 0 === t7 ? 0 : o10;
|
|
13215
13367
|
t7 ??= o10;
|
|
13216
13368
|
for (let o11 = i7; e10 > 0 ? o11 < t7 : t7 < o11; o11 += e10) yield o11;
|
|
13217
13369
|
}
|
|
13218
13370
|
|
|
13219
13371
|
// dist/styles/audio-visualiser.js
|
|
13220
|
-
var AudioVisualiserStyles =
|
|
13372
|
+
var AudioVisualiserStyles = i2`
|
|
13221
13373
|
:host {
|
|
13222
13374
|
height: 100%;
|
|
13223
13375
|
}
|
|
@@ -13258,13 +13410,13 @@ function normalizeToRange(value, min = 0, max = 1) {
|
|
|
13258
13410
|
}
|
|
13259
13411
|
|
|
13260
13412
|
// dist/components/audio-visualiser.js
|
|
13261
|
-
var
|
|
13413
|
+
var __decorate10 = function(decorators, target, key, desc) {
|
|
13262
13414
|
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
13263
13415
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
13264
13416
|
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
13265
13417
|
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
13266
13418
|
};
|
|
13267
|
-
var DictationAudioVisualiser = class DictationAudioVisualiser2 extends
|
|
13419
|
+
var DictationAudioVisualiser = class DictationAudioVisualiser2 extends i5 {
|
|
13268
13420
|
constructor() {
|
|
13269
13421
|
super(...arguments);
|
|
13270
13422
|
this.level = 0;
|
|
@@ -13278,12 +13430,12 @@ var DictationAudioVisualiser = class DictationAudioVisualiser2 extends i4 {
|
|
|
13278
13430
|
}
|
|
13279
13431
|
render() {
|
|
13280
13432
|
const activeSegments = Math.round(this.level * this.segmentCount);
|
|
13281
|
-
const segments =
|
|
13433
|
+
const segments = o6(o7(this.segmentCount), (i7) => x`<div class=${e8({
|
|
13282
13434
|
active: i7 < activeSegments,
|
|
13283
13435
|
segment: true
|
|
13284
13436
|
})} />`);
|
|
13285
13437
|
return x`
|
|
13286
|
-
<div class=${
|
|
13438
|
+
<div class=${e8({
|
|
13287
13439
|
active: this.active,
|
|
13288
13440
|
container: true
|
|
13289
13441
|
})}>
|
|
@@ -13293,27 +13445,27 @@ var DictationAudioVisualiser = class DictationAudioVisualiser2 extends i4 {
|
|
|
13293
13445
|
}
|
|
13294
13446
|
};
|
|
13295
13447
|
DictationAudioVisualiser.styles = audio_visualiser_default;
|
|
13296
|
-
|
|
13448
|
+
__decorate10([
|
|
13297
13449
|
n4({ type: Number })
|
|
13298
13450
|
], DictationAudioVisualiser.prototype, "level", void 0);
|
|
13299
|
-
|
|
13451
|
+
__decorate10([
|
|
13300
13452
|
n4({ type: Boolean })
|
|
13301
13453
|
], DictationAudioVisualiser.prototype, "active", void 0);
|
|
13302
|
-
|
|
13454
|
+
__decorate10([
|
|
13303
13455
|
n4({ type: Number })
|
|
13304
13456
|
], DictationAudioVisualiser.prototype, "segmentCount", void 0);
|
|
13305
|
-
DictationAudioVisualiser =
|
|
13306
|
-
|
|
13457
|
+
DictationAudioVisualiser = __decorate10([
|
|
13458
|
+
t2("dictation-audio-visualiser")
|
|
13307
13459
|
], DictationAudioVisualiser);
|
|
13308
13460
|
|
|
13309
13461
|
// dist/icons/icons.js
|
|
13310
|
-
var
|
|
13462
|
+
var __decorate11 = function(decorators, target, key, desc) {
|
|
13311
13463
|
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
13312
13464
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
13313
13465
|
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
13314
13466
|
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
13315
13467
|
};
|
|
13316
|
-
var IconMicOn = class IconMicOn2 extends
|
|
13468
|
+
var IconMicOn = class IconMicOn2 extends i5 {
|
|
13317
13469
|
render() {
|
|
13318
13470
|
return x`
|
|
13319
13471
|
<div style="display: flex">
|
|
@@ -13337,10 +13489,10 @@ var IconMicOn = class IconMicOn2 extends i4 {
|
|
|
13337
13489
|
`;
|
|
13338
13490
|
}
|
|
13339
13491
|
};
|
|
13340
|
-
IconMicOn =
|
|
13341
|
-
|
|
13492
|
+
IconMicOn = __decorate11([
|
|
13493
|
+
t2("icon-mic-on")
|
|
13342
13494
|
], IconMicOn);
|
|
13343
|
-
var IconMicOff = class IconMicOff2 extends
|
|
13495
|
+
var IconMicOff = class IconMicOff2 extends i5 {
|
|
13344
13496
|
render() {
|
|
13345
13497
|
return x` <div style="display: flex">
|
|
13346
13498
|
<svg
|
|
@@ -13365,10 +13517,10 @@ var IconMicOff = class IconMicOff2 extends i4 {
|
|
|
13365
13517
|
</div>`;
|
|
13366
13518
|
}
|
|
13367
13519
|
};
|
|
13368
|
-
IconMicOff =
|
|
13369
|
-
|
|
13520
|
+
IconMicOff = __decorate11([
|
|
13521
|
+
t2("icon-mic-off")
|
|
13370
13522
|
], IconMicOff);
|
|
13371
|
-
var IconRecording = class IconRecording2 extends
|
|
13523
|
+
var IconRecording = class IconRecording2 extends i5 {
|
|
13372
13524
|
render() {
|
|
13373
13525
|
return x`
|
|
13374
13526
|
<div style="display: flex;">
|
|
@@ -13391,10 +13543,10 @@ var IconRecording = class IconRecording2 extends i4 {
|
|
|
13391
13543
|
`;
|
|
13392
13544
|
}
|
|
13393
13545
|
};
|
|
13394
|
-
IconRecording =
|
|
13395
|
-
|
|
13546
|
+
IconRecording = __decorate11([
|
|
13547
|
+
t2("icon-recording")
|
|
13396
13548
|
], IconRecording);
|
|
13397
|
-
var IconSettings = class IconSettings2 extends
|
|
13549
|
+
var IconSettings = class IconSettings2 extends i5 {
|
|
13398
13550
|
render() {
|
|
13399
13551
|
return x`<div style="display: flex">
|
|
13400
13552
|
<svg
|
|
@@ -13417,10 +13569,10 @@ var IconSettings = class IconSettings2 extends i4 {
|
|
|
13417
13569
|
</div>`;
|
|
13418
13570
|
}
|
|
13419
13571
|
};
|
|
13420
|
-
IconSettings =
|
|
13421
|
-
|
|
13572
|
+
IconSettings = __decorate11([
|
|
13573
|
+
t2("icon-settings")
|
|
13422
13574
|
], IconSettings);
|
|
13423
|
-
var IconLoadingSpinner = class IconLoadingSpinner2 extends
|
|
13575
|
+
var IconLoadingSpinner = class IconLoadingSpinner2 extends i5 {
|
|
13424
13576
|
render() {
|
|
13425
13577
|
return x`<div style="display: flex">
|
|
13426
13578
|
<svg
|
|
@@ -13440,7 +13592,7 @@ var IconLoadingSpinner = class IconLoadingSpinner2 extends i4 {
|
|
|
13440
13592
|
</div>`;
|
|
13441
13593
|
}
|
|
13442
13594
|
};
|
|
13443
|
-
IconLoadingSpinner.styles =
|
|
13595
|
+
IconLoadingSpinner.styles = i2`
|
|
13444
13596
|
@keyframes spin {
|
|
13445
13597
|
0% {
|
|
13446
13598
|
transform: rotate(0deg);
|
|
@@ -13453,18 +13605,18 @@ IconLoadingSpinner.styles = i`
|
|
|
13453
13605
|
animation: spin 1s linear infinite;
|
|
13454
13606
|
}
|
|
13455
13607
|
`;
|
|
13456
|
-
IconLoadingSpinner =
|
|
13457
|
-
|
|
13608
|
+
IconLoadingSpinner = __decorate11([
|
|
13609
|
+
t2("icon-loading-spinner")
|
|
13458
13610
|
], IconLoadingSpinner);
|
|
13459
13611
|
|
|
13460
|
-
// dist/components/recording-button.js
|
|
13461
|
-
var
|
|
13612
|
+
// dist/components/recording-button-base.js
|
|
13613
|
+
var __decorate12 = function(decorators, target, key, desc) {
|
|
13462
13614
|
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
13463
13615
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
13464
13616
|
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
13465
13617
|
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
13466
13618
|
};
|
|
13467
|
-
var
|
|
13619
|
+
var __classPrivateFieldGet9 = function(receiver, state, kind, f5) {
|
|
13468
13620
|
if (kind === "a" && !f5) throw new TypeError("Private accessor was defined without a getter");
|
|
13469
13621
|
if (typeof state === "function" ? receiver !== state || !f5 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
13470
13622
|
return kind === "m" ? f5 : kind === "a" ? f5.call(receiver) : f5 ? f5.value : state.get(receiver);
|
|
@@ -13475,41 +13627,39 @@ var __classPrivateFieldSet6 = function(receiver, state, value, kind, f5) {
|
|
|
13475
13627
|
if (typeof state === "function" ? receiver !== state || !f5 : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
13476
13628
|
return kind === "a" ? f5.call(receiver, value) : f5 ? f5.value = value : state.set(receiver, value), value;
|
|
13477
13629
|
};
|
|
13478
|
-
var
|
|
13479
|
-
var
|
|
13480
|
-
var
|
|
13481
|
-
var
|
|
13482
|
-
var
|
|
13483
|
-
var
|
|
13484
|
-
var
|
|
13485
|
-
var
|
|
13486
|
-
var
|
|
13487
|
-
var
|
|
13488
|
-
var
|
|
13489
|
-
var
|
|
13490
|
-
var
|
|
13491
|
-
var
|
|
13492
|
-
var DictationRecordingButton = class DictationRecordingButton2 extends i4 {
|
|
13630
|
+
var _RecordingButtonBase_instances;
|
|
13631
|
+
var _RecordingButtonBase_mediaController;
|
|
13632
|
+
var _RecordingButtonBase_keybindingController;
|
|
13633
|
+
var _RecordingButtonBase_closeConnectionOnInit;
|
|
13634
|
+
var _RecordingButtonBase_processing;
|
|
13635
|
+
var _RecordingButtonBase_connection;
|
|
13636
|
+
var _RecordingButtonBase_handleClick;
|
|
13637
|
+
var _RecordingButtonBase_handleWebSocketMessage;
|
|
13638
|
+
var _RecordingButtonBase_handleWebSocketError;
|
|
13639
|
+
var _RecordingButtonBase_handleWebSocketClose;
|
|
13640
|
+
var _RecordingButtonBase_dispatchRecordingStateChanged;
|
|
13641
|
+
var _RecordingButtonBase_handleStart;
|
|
13642
|
+
var _RecordingButtonBase_handleStop;
|
|
13643
|
+
var RecordingButtonBase = class extends i5 {
|
|
13493
13644
|
constructor() {
|
|
13494
13645
|
super(...arguments);
|
|
13495
|
-
|
|
13646
|
+
_RecordingButtonBase_instances.add(this);
|
|
13496
13647
|
this._recordingState = "stopped";
|
|
13497
13648
|
this.allowButtonFocus = false;
|
|
13498
|
-
|
|
13499
|
-
|
|
13500
|
-
|
|
13501
|
-
|
|
13502
|
-
|
|
13503
|
-
|
|
13504
|
-
_DictationRecordingButton_handleWebSocketMessage.set(this, (message) => {
|
|
13649
|
+
_RecordingButtonBase_mediaController.set(this, new MediaController(this));
|
|
13650
|
+
_RecordingButtonBase_keybindingController.set(this, new KeybindingController(this));
|
|
13651
|
+
_RecordingButtonBase_closeConnectionOnInit.set(this, false);
|
|
13652
|
+
_RecordingButtonBase_processing.set(this, false);
|
|
13653
|
+
_RecordingButtonBase_connection.set(this, "CLOSED");
|
|
13654
|
+
_RecordingButtonBase_handleWebSocketMessage.set(this, (message) => {
|
|
13505
13655
|
switch (message.type) {
|
|
13506
13656
|
case "CONFIG_DENIED":
|
|
13507
13657
|
this.dispatchEvent(errorEvent(`Config denied: ${message.reason ?? "Unknown reason"}`));
|
|
13508
|
-
|
|
13658
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_handleStop).call(this);
|
|
13509
13659
|
break;
|
|
13510
13660
|
case "CONFIG_TIMEOUT":
|
|
13511
13661
|
this.dispatchEvent(errorEvent("Config timeout"));
|
|
13512
|
-
|
|
13662
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_handleStop).call(this);
|
|
13513
13663
|
break;
|
|
13514
13664
|
case "transcript":
|
|
13515
13665
|
this.dispatchEvent(transcriptEvent(message));
|
|
@@ -13517,6 +13667,9 @@ var DictationRecordingButton = class DictationRecordingButton2 extends i4 {
|
|
|
13517
13667
|
case "command":
|
|
13518
13668
|
this.dispatchEvent(commandEvent(message));
|
|
13519
13669
|
break;
|
|
13670
|
+
case "facts":
|
|
13671
|
+
this.dispatchEvent(factsEvent(message));
|
|
13672
|
+
break;
|
|
13520
13673
|
case "usage":
|
|
13521
13674
|
this.dispatchEvent(usageEvent(message));
|
|
13522
13675
|
break;
|
|
@@ -13525,36 +13678,41 @@ var DictationRecordingButton = class DictationRecordingButton2 extends i4 {
|
|
|
13525
13678
|
break;
|
|
13526
13679
|
case "error":
|
|
13527
13680
|
this.dispatchEvent(errorEvent(message.error));
|
|
13528
|
-
|
|
13681
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_handleStop).call(this);
|
|
13682
|
+
break;
|
|
13683
|
+
case "ended":
|
|
13684
|
+
case "ENDED":
|
|
13685
|
+
__classPrivateFieldSet6(this, _RecordingButtonBase_processing, false, "f");
|
|
13686
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_dispatchRecordingStateChanged).call(this, this._recordingState);
|
|
13529
13687
|
break;
|
|
13530
13688
|
case "flushed":
|
|
13531
13689
|
if (this._recordingState === "stopped" || this._recordingState === "stopping") {
|
|
13532
|
-
__classPrivateFieldSet6(this,
|
|
13533
|
-
|
|
13690
|
+
__classPrivateFieldSet6(this, _RecordingButtonBase_processing, false, "f");
|
|
13691
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_dispatchRecordingStateChanged).call(this, this._recordingState);
|
|
13534
13692
|
}
|
|
13535
13693
|
break;
|
|
13536
13694
|
}
|
|
13537
13695
|
});
|
|
13538
|
-
|
|
13539
|
-
this.dispatchEvent(errorEvent(
|
|
13540
|
-
__classPrivateFieldSet6(this,
|
|
13541
|
-
__classPrivateFieldSet6(this,
|
|
13542
|
-
|
|
13696
|
+
_RecordingButtonBase_handleWebSocketError.set(this, (error) => {
|
|
13697
|
+
this.dispatchEvent(errorEvent(`Socket error: ${error.message}`));
|
|
13698
|
+
__classPrivateFieldSet6(this, _RecordingButtonBase_processing, false, "f");
|
|
13699
|
+
__classPrivateFieldSet6(this, _RecordingButtonBase_connection, "CLOSED", "f");
|
|
13700
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_handleStop).call(this);
|
|
13543
13701
|
});
|
|
13544
|
-
|
|
13545
|
-
if (
|
|
13702
|
+
_RecordingButtonBase_handleWebSocketClose.set(this, (event) => {
|
|
13703
|
+
if (this._socketController.isConnectionOpen() || this._socketController.isConnecting()) {
|
|
13546
13704
|
return;
|
|
13547
13705
|
}
|
|
13548
|
-
__classPrivateFieldSet6(this,
|
|
13549
|
-
__classPrivateFieldSet6(this,
|
|
13706
|
+
__classPrivateFieldSet6(this, _RecordingButtonBase_processing, false, "f");
|
|
13707
|
+
__classPrivateFieldSet6(this, _RecordingButtonBase_connection, "CLOSED", "f");
|
|
13550
13708
|
this.dispatchEvent(streamClosedEvent(event));
|
|
13551
|
-
|
|
13709
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_dispatchRecordingStateChanged).call(this, this._recordingState);
|
|
13552
13710
|
});
|
|
13553
13711
|
}
|
|
13554
13712
|
update(changedProperties) {
|
|
13555
|
-
if (changedProperties.has("_recordingState") && this._recordingState === "recording" &&
|
|
13556
|
-
__classPrivateFieldSet6(this,
|
|
13557
|
-
|
|
13713
|
+
if (changedProperties.has("_recordingState") && this._recordingState === "recording" && __classPrivateFieldGet9(this, _RecordingButtonBase_closeConnectionOnInit, "f")) {
|
|
13714
|
+
__classPrivateFieldSet6(this, _RecordingButtonBase_closeConnectionOnInit, false, "f");
|
|
13715
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_handleStop).call(this);
|
|
13558
13716
|
}
|
|
13559
13717
|
super.update(changedProperties);
|
|
13560
13718
|
}
|
|
@@ -13562,17 +13720,17 @@ var DictationRecordingButton = class DictationRecordingButton2 extends i4 {
|
|
|
13562
13720
|
if (this._recordingState !== "stopped") {
|
|
13563
13721
|
return;
|
|
13564
13722
|
}
|
|
13565
|
-
|
|
13723
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_handleStart).call(this);
|
|
13566
13724
|
}
|
|
13567
13725
|
stopRecording() {
|
|
13568
13726
|
if (this._recordingState === "stopped" || this._recordingState === "stopping") {
|
|
13569
13727
|
return;
|
|
13570
13728
|
}
|
|
13571
13729
|
if (this._recordingState === "initializing") {
|
|
13572
|
-
__classPrivateFieldSet6(this,
|
|
13730
|
+
__classPrivateFieldSet6(this, _RecordingButtonBase_closeConnectionOnInit, true, "f");
|
|
13573
13731
|
return;
|
|
13574
13732
|
}
|
|
13575
|
-
|
|
13733
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_handleStop).call(this);
|
|
13576
13734
|
}
|
|
13577
13735
|
toggleRecording() {
|
|
13578
13736
|
if (this._recordingState === "stopped") {
|
|
@@ -13582,46 +13740,46 @@ var DictationRecordingButton = class DictationRecordingButton2 extends i4 {
|
|
|
13582
13740
|
}
|
|
13583
13741
|
}
|
|
13584
13742
|
async openConnection() {
|
|
13585
|
-
if (this._recordingState !== "stopped" ||
|
|
13743
|
+
if (this._recordingState !== "stopped" || __classPrivateFieldGet9(this, _RecordingButtonBase_processing, "f")) {
|
|
13586
13744
|
return;
|
|
13587
13745
|
}
|
|
13588
|
-
if (
|
|
13746
|
+
if (this._socketController.isConnectionOpen()) {
|
|
13589
13747
|
return;
|
|
13590
13748
|
}
|
|
13591
13749
|
try {
|
|
13592
|
-
__classPrivateFieldSet6(this,
|
|
13593
|
-
|
|
13594
|
-
await
|
|
13595
|
-
onClose:
|
|
13596
|
-
onError:
|
|
13597
|
-
onMessage:
|
|
13750
|
+
__classPrivateFieldSet6(this, _RecordingButtonBase_connection, "CONNECTING", "f");
|
|
13751
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_dispatchRecordingStateChanged).call(this, this._recordingState);
|
|
13752
|
+
await this._socketController.connect(this._getConnectConfig(), {
|
|
13753
|
+
onClose: __classPrivateFieldGet9(this, _RecordingButtonBase_handleWebSocketClose, "f"),
|
|
13754
|
+
onError: __classPrivateFieldGet9(this, _RecordingButtonBase_handleWebSocketError, "f"),
|
|
13755
|
+
onMessage: __classPrivateFieldGet9(this, _RecordingButtonBase_handleWebSocketMessage, "f"),
|
|
13598
13756
|
onNetworkActivity: (direction, data) => {
|
|
13599
13757
|
this.dispatchEvent(networkActivityEvent(direction, data));
|
|
13600
13758
|
}
|
|
13601
13759
|
});
|
|
13602
|
-
__classPrivateFieldSet6(this,
|
|
13603
|
-
|
|
13760
|
+
__classPrivateFieldSet6(this, _RecordingButtonBase_connection, "OPEN", "f");
|
|
13761
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_dispatchRecordingStateChanged).call(this, this._recordingState);
|
|
13604
13762
|
} catch (error) {
|
|
13605
|
-
__classPrivateFieldSet6(this,
|
|
13763
|
+
__classPrivateFieldSet6(this, _RecordingButtonBase_connection, "CLOSED", "f");
|
|
13606
13764
|
this.dispatchEvent(errorEvent(error));
|
|
13607
13765
|
}
|
|
13608
13766
|
}
|
|
13609
13767
|
async closeConnection() {
|
|
13610
|
-
if (this._recordingState !== "stopped" ||
|
|
13768
|
+
if (this._recordingState !== "stopped" || __classPrivateFieldGet9(this, _RecordingButtonBase_processing, "f")) {
|
|
13611
13769
|
return;
|
|
13612
13770
|
}
|
|
13613
|
-
if (
|
|
13614
|
-
await
|
|
13771
|
+
if (this._socketController.isConnecting()) {
|
|
13772
|
+
await this._socketController.waitForConnection();
|
|
13615
13773
|
}
|
|
13616
|
-
if (!
|
|
13617
|
-
__classPrivateFieldSet6(this,
|
|
13618
|
-
|
|
13774
|
+
if (!this._socketController.isConnectionOpen()) {
|
|
13775
|
+
__classPrivateFieldSet6(this, _RecordingButtonBase_connection, "CLOSED", "f");
|
|
13776
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_dispatchRecordingStateChanged).call(this, "stopped");
|
|
13619
13777
|
return;
|
|
13620
13778
|
}
|
|
13621
13779
|
try {
|
|
13622
|
-
__classPrivateFieldSet6(this,
|
|
13623
|
-
|
|
13624
|
-
await
|
|
13780
|
+
__classPrivateFieldSet6(this, _RecordingButtonBase_connection, "CLOSING", "f");
|
|
13781
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_dispatchRecordingStateChanged).call(this, "stopped");
|
|
13782
|
+
await this._socketController.closeConnection(__classPrivateFieldGet9(this, _RecordingButtonBase_handleWebSocketClose, "f"));
|
|
13625
13783
|
} catch (error) {
|
|
13626
13784
|
this.dispatchEvent(errorEvent(error));
|
|
13627
13785
|
}
|
|
@@ -13631,7 +13789,7 @@ var DictationRecordingButton = class DictationRecordingButton2 extends i4 {
|
|
|
13631
13789
|
const isRecording = this._recordingState === "recording";
|
|
13632
13790
|
return x`
|
|
13633
13791
|
<button
|
|
13634
|
-
@click=${
|
|
13792
|
+
@click=${__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_handleClick)}
|
|
13635
13793
|
?disabled=${isLoading}
|
|
13636
13794
|
class=${isRecording ? "red" : "accent"}
|
|
13637
13795
|
aria-label=${isRecording ? "Stop recording" : "Start recording"}
|
|
@@ -13639,57 +13797,45 @@ var DictationRecordingButton = class DictationRecordingButton2 extends i4 {
|
|
|
13639
13797
|
>
|
|
13640
13798
|
${isLoading ? x`<icon-loading-spinner />` : isRecording ? x`<icon-recording />` : x`<icon-mic-on />`}
|
|
13641
13799
|
<dictation-audio-visualiser
|
|
13642
|
-
.level=${
|
|
13800
|
+
.level=${__classPrivateFieldGet9(this, _RecordingButtonBase_mediaController, "f").audioLevel}
|
|
13643
13801
|
?active=${isRecording}
|
|
13644
13802
|
/>
|
|
13645
13803
|
</button>
|
|
13646
13804
|
`;
|
|
13647
13805
|
}
|
|
13648
13806
|
};
|
|
13649
|
-
|
|
13650
|
-
_DictationRecordingButton_dictationController = /* @__PURE__ */ new WeakMap();
|
|
13651
|
-
_DictationRecordingButton_keybindingController = /* @__PURE__ */ new WeakMap();
|
|
13652
|
-
_DictationRecordingButton_closeConnectionOnInit = /* @__PURE__ */ new WeakMap();
|
|
13653
|
-
_DictationRecordingButton_processing = /* @__PURE__ */ new WeakMap();
|
|
13654
|
-
_DictationRecordingButton_connection = /* @__PURE__ */ new WeakMap();
|
|
13655
|
-
_DictationRecordingButton_handleWebSocketMessage = /* @__PURE__ */ new WeakMap();
|
|
13656
|
-
_DictationRecordingButton_handleWebSocketError = /* @__PURE__ */ new WeakMap();
|
|
13657
|
-
_DictationRecordingButton_handleWebSocketClose = /* @__PURE__ */ new WeakMap();
|
|
13658
|
-
_DictationRecordingButton_instances = /* @__PURE__ */ new WeakSet();
|
|
13659
|
-
_DictationRecordingButton_handleClick = function _DictationRecordingButton_handleClick2(event) {
|
|
13807
|
+
_RecordingButtonBase_mediaController = /* @__PURE__ */ new WeakMap(), _RecordingButtonBase_keybindingController = /* @__PURE__ */ new WeakMap(), _RecordingButtonBase_closeConnectionOnInit = /* @__PURE__ */ new WeakMap(), _RecordingButtonBase_processing = /* @__PURE__ */ new WeakMap(), _RecordingButtonBase_connection = /* @__PURE__ */ new WeakMap(), _RecordingButtonBase_handleWebSocketMessage = /* @__PURE__ */ new WeakMap(), _RecordingButtonBase_handleWebSocketError = /* @__PURE__ */ new WeakMap(), _RecordingButtonBase_handleWebSocketClose = /* @__PURE__ */ new WeakMap(), _RecordingButtonBase_instances = /* @__PURE__ */ new WeakSet(), _RecordingButtonBase_handleClick = function _RecordingButtonBase_handleClick2(event) {
|
|
13660
13808
|
if (!this.allowButtonFocus) {
|
|
13661
13809
|
event.preventDefault();
|
|
13662
13810
|
}
|
|
13663
13811
|
this.toggleRecording();
|
|
13664
|
-
}
|
|
13665
|
-
_DictationRecordingButton_dispatchRecordingStateChanged = function _DictationRecordingButton_dispatchRecordingStateChanged2(state) {
|
|
13812
|
+
}, _RecordingButtonBase_dispatchRecordingStateChanged = function _RecordingButtonBase_dispatchRecordingStateChanged2(state) {
|
|
13666
13813
|
this.dispatchEvent(recordingStateChangedEvent(state, {
|
|
13667
|
-
connection:
|
|
13668
|
-
processing:
|
|
13814
|
+
connection: __classPrivateFieldGet9(this, _RecordingButtonBase_connection, "f"),
|
|
13815
|
+
processing: __classPrivateFieldGet9(this, _RecordingButtonBase_processing, "f")
|
|
13669
13816
|
}));
|
|
13670
|
-
}
|
|
13671
|
-
|
|
13672
|
-
__classPrivateFieldGet7(this, _DictationRecordingButton_instances, "m", _DictationRecordingButton_dispatchRecordingStateChanged).call(this, "initializing");
|
|
13817
|
+
}, _RecordingButtonBase_handleStart = async function _RecordingButtonBase_handleStart2() {
|
|
13818
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_dispatchRecordingStateChanged).call(this, "initializing");
|
|
13673
13819
|
try {
|
|
13674
|
-
await
|
|
13820
|
+
await __classPrivateFieldGet9(this, _RecordingButtonBase_mediaController, "f").initialize(() => {
|
|
13675
13821
|
if (this._recordingState === "recording") {
|
|
13676
13822
|
this.dispatchEvent(errorEvent("Recording device access was lost."));
|
|
13677
|
-
|
|
13823
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_handleStop).call(this);
|
|
13678
13824
|
}
|
|
13679
|
-
},
|
|
13680
|
-
|
|
13681
|
-
|
|
13825
|
+
}, this._socketController.mediaRecorderHandler);
|
|
13826
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_mediaController, "f").mediaRecorder?.start(AUDIO_CHUNK_INTERVAL_MS);
|
|
13827
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_mediaController, "f").startAudioLevelMonitoring((level) => {
|
|
13682
13828
|
this.dispatchEvent(audioLevelChangedEvent(level));
|
|
13683
13829
|
});
|
|
13684
|
-
__classPrivateFieldSet6(this,
|
|
13685
|
-
if (
|
|
13686
|
-
__classPrivateFieldSet6(this,
|
|
13830
|
+
__classPrivateFieldSet6(this, _RecordingButtonBase_processing, true, "f");
|
|
13831
|
+
if (__classPrivateFieldGet9(this, _RecordingButtonBase_connection, "f") !== "OPEN") {
|
|
13832
|
+
__classPrivateFieldSet6(this, _RecordingButtonBase_connection, "CONNECTING", "f");
|
|
13687
13833
|
}
|
|
13688
|
-
|
|
13689
|
-
const isNewConnection = await
|
|
13690
|
-
onClose:
|
|
13691
|
-
onError:
|
|
13692
|
-
onMessage:
|
|
13834
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_dispatchRecordingStateChanged).call(this, "recording");
|
|
13835
|
+
const isNewConnection = await this._socketController.connect(this._getConnectConfig(), {
|
|
13836
|
+
onClose: __classPrivateFieldGet9(this, _RecordingButtonBase_handleWebSocketClose, "f"),
|
|
13837
|
+
onError: __classPrivateFieldGet9(this, _RecordingButtonBase_handleWebSocketError, "f"),
|
|
13838
|
+
onMessage: __classPrivateFieldGet9(this, _RecordingButtonBase_handleWebSocketMessage, "f"),
|
|
13693
13839
|
onNetworkActivity: (direction, data) => {
|
|
13694
13840
|
this.dispatchEvent(networkActivityEvent(direction, data));
|
|
13695
13841
|
}
|
|
@@ -13697,83 +13843,404 @@ _DictationRecordingButton_handleStart = async function _DictationRecordingButton
|
|
|
13697
13843
|
if (isNewConnection === "superseded") {
|
|
13698
13844
|
return;
|
|
13699
13845
|
}
|
|
13700
|
-
__classPrivateFieldSet6(this,
|
|
13701
|
-
|
|
13846
|
+
__classPrivateFieldSet6(this, _RecordingButtonBase_connection, "OPEN", "f");
|
|
13847
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_dispatchRecordingStateChanged).call(this, this._recordingState);
|
|
13702
13848
|
} catch (error) {
|
|
13703
13849
|
this.dispatchEvent(errorEvent(error));
|
|
13704
|
-
await
|
|
13850
|
+
await __classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_handleStop).call(this);
|
|
13705
13851
|
}
|
|
13706
|
-
}
|
|
13707
|
-
|
|
13708
|
-
__classPrivateFieldGet7(this, _DictationRecordingButton_instances, "m", _DictationRecordingButton_dispatchRecordingStateChanged).call(this, "stopping");
|
|
13852
|
+
}, _RecordingButtonBase_handleStop = async function _RecordingButtonBase_handleStop2() {
|
|
13853
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_dispatchRecordingStateChanged).call(this, "stopping");
|
|
13709
13854
|
try {
|
|
13710
|
-
|
|
13711
|
-
await
|
|
13712
|
-
|
|
13713
|
-
await
|
|
13714
|
-
await __classPrivateFieldGet7(this, _DictationRecordingButton_mediaController, "f").cleanup();
|
|
13855
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_mediaController, "f").stopAudioLevelMonitoring();
|
|
13856
|
+
await __classPrivateFieldGet9(this, _RecordingButtonBase_mediaController, "f").stopRecording();
|
|
13857
|
+
await this._socketController.stopRecording();
|
|
13858
|
+
await __classPrivateFieldGet9(this, _RecordingButtonBase_mediaController, "f").cleanup();
|
|
13715
13859
|
} catch (error) {
|
|
13716
13860
|
this.dispatchEvent(errorEvent(error));
|
|
13717
13861
|
}
|
|
13862
|
+
__classPrivateFieldGet9(this, _RecordingButtonBase_instances, "m", _RecordingButtonBase_dispatchRecordingStateChanged).call(this, "stopped");
|
|
13863
|
+
};
|
|
13864
|
+
RecordingButtonBase.styles = [recording_button_default, buttons_default];
|
|
13865
|
+
__decorate12([
|
|
13866
|
+
c({ context: recordingStateContext, subscribe: true }),
|
|
13867
|
+
r4()
|
|
13868
|
+
], RecordingButtonBase.prototype, "_recordingState", void 0);
|
|
13869
|
+
__decorate12([
|
|
13870
|
+
c({ context: selectedDeviceContext, subscribe: true }),
|
|
13871
|
+
r4()
|
|
13872
|
+
], RecordingButtonBase.prototype, "_selectedDevice", void 0);
|
|
13873
|
+
__decorate12([
|
|
13874
|
+
c({ context: accessTokenContext, subscribe: true }),
|
|
13875
|
+
r4()
|
|
13876
|
+
], RecordingButtonBase.prototype, "_accessToken", void 0);
|
|
13877
|
+
__decorate12([
|
|
13878
|
+
c({ context: authConfigContext, subscribe: true }),
|
|
13879
|
+
r4()
|
|
13880
|
+
], RecordingButtonBase.prototype, "_authConfig", void 0);
|
|
13881
|
+
__decorate12([
|
|
13882
|
+
c({ context: regionContext, subscribe: true }),
|
|
13883
|
+
r4()
|
|
13884
|
+
], RecordingButtonBase.prototype, "_region", void 0);
|
|
13885
|
+
__decorate12([
|
|
13886
|
+
c({ context: tenantNameContext, subscribe: true }),
|
|
13887
|
+
r4()
|
|
13888
|
+
], RecordingButtonBase.prototype, "_tenantName", void 0);
|
|
13889
|
+
__decorate12([
|
|
13890
|
+
c({ context: socketUrlContext, subscribe: true }),
|
|
13891
|
+
r4()
|
|
13892
|
+
], RecordingButtonBase.prototype, "_socketUrl", void 0);
|
|
13893
|
+
__decorate12([
|
|
13894
|
+
c({ context: socketProxyContext, subscribe: true }),
|
|
13895
|
+
r4()
|
|
13896
|
+
], RecordingButtonBase.prototype, "_socketProxy", void 0);
|
|
13897
|
+
__decorate12([
|
|
13898
|
+
c({ context: debugDisplayAudioContext, subscribe: true }),
|
|
13899
|
+
r4()
|
|
13900
|
+
], RecordingButtonBase.prototype, "_debug_displayAudio", void 0);
|
|
13901
|
+
__decorate12([
|
|
13902
|
+
c({ context: pushToTalkKeybindingContext, subscribe: true }),
|
|
13903
|
+
r4()
|
|
13904
|
+
], RecordingButtonBase.prototype, "_pushToTalkKeybinding", void 0);
|
|
13905
|
+
__decorate12([
|
|
13906
|
+
c({ context: toggleToTalkKeybindingContext, subscribe: true }),
|
|
13907
|
+
r4()
|
|
13908
|
+
], RecordingButtonBase.prototype, "_toggleToTalkKeybinding", void 0);
|
|
13909
|
+
__decorate12([
|
|
13910
|
+
n4({ type: Boolean })
|
|
13911
|
+
], RecordingButtonBase.prototype, "allowButtonFocus", void 0);
|
|
13912
|
+
|
|
13913
|
+
// dist/components/ambient-recording-button.js
|
|
13914
|
+
var __decorate13 = function(decorators, target, key, desc) {
|
|
13915
|
+
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
13916
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
13917
|
+
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
13918
|
+
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
13919
|
+
};
|
|
13920
|
+
var __classPrivateFieldGet10 = function(receiver, state, kind, f5) {
|
|
13921
|
+
if (kind === "a" && !f5) throw new TypeError("Private accessor was defined without a getter");
|
|
13922
|
+
if (typeof state === "function" ? receiver !== state || !f5 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
13923
|
+
return kind === "m" ? f5 : kind === "a" ? f5.call(receiver) : f5 ? f5.value : state.get(receiver);
|
|
13924
|
+
};
|
|
13925
|
+
var _AmbientRecordingButton_instances;
|
|
13926
|
+
var _AmbientRecordingButton_trimmedInteractionId;
|
|
13927
|
+
var interactionIdRequiredError = () => new Error("interactionId is required. Set interactionId on ambient-root.");
|
|
13928
|
+
var AmbientRecordingButton = class AmbientRecordingButton2 extends RecordingButtonBase {
|
|
13929
|
+
constructor() {
|
|
13930
|
+
super(...arguments);
|
|
13931
|
+
_AmbientRecordingButton_instances.add(this);
|
|
13932
|
+
this._socketController = new AmbientController(this);
|
|
13933
|
+
}
|
|
13934
|
+
startRecording() {
|
|
13935
|
+
if (!__classPrivateFieldGet10(this, _AmbientRecordingButton_instances, "m", _AmbientRecordingButton_trimmedInteractionId).call(this)) {
|
|
13936
|
+
this.dispatchEvent(errorEvent(interactionIdRequiredError()));
|
|
13937
|
+
return;
|
|
13938
|
+
}
|
|
13939
|
+
super.startRecording();
|
|
13940
|
+
}
|
|
13941
|
+
async openConnection() {
|
|
13942
|
+
if (!__classPrivateFieldGet10(this, _AmbientRecordingButton_instances, "m", _AmbientRecordingButton_trimmedInteractionId).call(this)) {
|
|
13943
|
+
this.dispatchEvent(errorEvent(interactionIdRequiredError()));
|
|
13944
|
+
return;
|
|
13945
|
+
}
|
|
13946
|
+
await super.openConnection();
|
|
13947
|
+
}
|
|
13948
|
+
_getConnectConfig() {
|
|
13949
|
+
const interactionId = __classPrivateFieldGet10(this, _AmbientRecordingButton_instances, "m", _AmbientRecordingButton_trimmedInteractionId).call(this);
|
|
13950
|
+
if (!interactionId) {
|
|
13951
|
+
throw interactionIdRequiredError();
|
|
13952
|
+
}
|
|
13953
|
+
return {
|
|
13954
|
+
configuration: this._ambientConfig ?? DEFAULT_STREAM_CONFIG,
|
|
13955
|
+
interactionId
|
|
13956
|
+
};
|
|
13957
|
+
}
|
|
13958
|
+
};
|
|
13959
|
+
_AmbientRecordingButton_instances = /* @__PURE__ */ new WeakSet();
|
|
13960
|
+
_AmbientRecordingButton_trimmedInteractionId = function _AmbientRecordingButton_trimmedInteractionId2() {
|
|
13961
|
+
return this._interactionId?.trim();
|
|
13962
|
+
};
|
|
13963
|
+
__decorate13([
|
|
13964
|
+
c({ context: ambientConfigContext, subscribe: true }),
|
|
13965
|
+
r4()
|
|
13966
|
+
], AmbientRecordingButton.prototype, "_ambientConfig", void 0);
|
|
13967
|
+
__decorate13([
|
|
13968
|
+
c({ context: interactionIdContext, subscribe: true }),
|
|
13969
|
+
r4()
|
|
13970
|
+
], AmbientRecordingButton.prototype, "_interactionId", void 0);
|
|
13971
|
+
AmbientRecordingButton = __decorate13([
|
|
13972
|
+
t2("ambient-recording-button")
|
|
13973
|
+
], AmbientRecordingButton);
|
|
13974
|
+
|
|
13975
|
+
// node_modules/lit-html/directive-helpers.js
|
|
13976
|
+
var { I: t6 } = Z;
|
|
13977
|
+
var f3 = (o10) => void 0 === o10.strings;
|
|
13978
|
+
|
|
13979
|
+
// node_modules/lit-html/async-directive.js
|
|
13980
|
+
var s7 = (i7, t7) => {
|
|
13981
|
+
const e10 = i7._$AN;
|
|
13982
|
+
if (void 0 === e10) return false;
|
|
13983
|
+
for (const i8 of e10) i8._$AO?.(t7, false), s7(i8, t7);
|
|
13984
|
+
return true;
|
|
13985
|
+
};
|
|
13986
|
+
var o8 = (i7) => {
|
|
13987
|
+
let t7, e10;
|
|
13988
|
+
do {
|
|
13989
|
+
if (void 0 === (t7 = i7._$AM)) break;
|
|
13990
|
+
e10 = t7._$AN, e10.delete(i7), i7 = t7;
|
|
13991
|
+
} while (0 === e10?.size);
|
|
13992
|
+
};
|
|
13993
|
+
var r6 = (i7) => {
|
|
13994
|
+
for (let t7; t7 = i7._$AM; i7 = t7) {
|
|
13995
|
+
let e10 = t7._$AN;
|
|
13996
|
+
if (void 0 === e10) t7._$AN = e10 = /* @__PURE__ */ new Set();
|
|
13997
|
+
else if (e10.has(i7)) break;
|
|
13998
|
+
e10.add(i7), c5(t7);
|
|
13999
|
+
}
|
|
14000
|
+
};
|
|
14001
|
+
function h3(i7) {
|
|
14002
|
+
void 0 !== this._$AN ? (o8(this), this._$AM = i7, r6(this)) : this._$AM = i7;
|
|
14003
|
+
}
|
|
14004
|
+
function n6(i7, t7 = false, e10 = 0) {
|
|
14005
|
+
const r7 = this._$AH, h5 = this._$AN;
|
|
14006
|
+
if (void 0 !== h5 && 0 !== h5.size) if (t7) if (Array.isArray(r7)) for (let i8 = e10; i8 < r7.length; i8++) s7(r7[i8], false), o8(r7[i8]);
|
|
14007
|
+
else null != r7 && (s7(r7, false), o8(r7));
|
|
14008
|
+
else s7(this, i7);
|
|
14009
|
+
}
|
|
14010
|
+
var c5 = (i7) => {
|
|
14011
|
+
i7.type == t5.CHILD && (i7._$AP ??= n6, i7._$AQ ??= h3);
|
|
14012
|
+
};
|
|
14013
|
+
var f4 = class extends i6 {
|
|
14014
|
+
constructor() {
|
|
14015
|
+
super(...arguments), this._$AN = void 0;
|
|
14016
|
+
}
|
|
14017
|
+
_$AT(i7, t7, e10) {
|
|
14018
|
+
super._$AT(i7, t7, e10), r6(this), this.isConnected = i7._$AU;
|
|
14019
|
+
}
|
|
14020
|
+
_$AO(i7, t7 = true) {
|
|
14021
|
+
i7 !== this.isConnected && (this.isConnected = i7, i7 ? this.reconnected?.() : this.disconnected?.()), t7 && (s7(this, i7), o8(this));
|
|
14022
|
+
}
|
|
14023
|
+
setValue(t7) {
|
|
14024
|
+
if (f3(this._$Ct)) this._$Ct._$AI(t7, this);
|
|
14025
|
+
else {
|
|
14026
|
+
const i7 = [...this._$Ct._$AH];
|
|
14027
|
+
i7[this._$Ci] = t7, this._$Ct._$AI(i7, this, 0);
|
|
14028
|
+
}
|
|
14029
|
+
}
|
|
14030
|
+
disconnected() {
|
|
14031
|
+
}
|
|
14032
|
+
reconnected() {
|
|
14033
|
+
}
|
|
14034
|
+
};
|
|
14035
|
+
|
|
14036
|
+
// node_modules/lit-html/directives/ref.js
|
|
14037
|
+
var e9 = () => new h4();
|
|
14038
|
+
var h4 = class {
|
|
14039
|
+
};
|
|
14040
|
+
var o9 = /* @__PURE__ */ new WeakMap();
|
|
14041
|
+
var n7 = e7(class extends f4 {
|
|
14042
|
+
render(i7) {
|
|
14043
|
+
return E;
|
|
14044
|
+
}
|
|
14045
|
+
update(i7, [s8]) {
|
|
14046
|
+
const e10 = s8 !== this.G;
|
|
14047
|
+
return e10 && void 0 !== this.G && this.rt(void 0), (e10 || this.lt !== this.ct) && (this.G = s8, this.ht = i7.options?.host, this.rt(this.ct = i7.element)), E;
|
|
14048
|
+
}
|
|
14049
|
+
rt(t7) {
|
|
14050
|
+
if (this.isConnected || (t7 = void 0), "function" == typeof this.G) {
|
|
14051
|
+
const i7 = this.ht ?? globalThis;
|
|
14052
|
+
let s8 = o9.get(i7);
|
|
14053
|
+
void 0 === s8 && (s8 = /* @__PURE__ */ new WeakMap(), o9.set(i7, s8)), void 0 !== s8.get(this.G) && this.G.call(this.ht, void 0), s8.set(this.G, t7), void 0 !== t7 && this.G.call(this.ht, t7);
|
|
14054
|
+
} else this.G.value = t7;
|
|
14055
|
+
}
|
|
14056
|
+
get lt() {
|
|
14057
|
+
return "function" == typeof this.G ? o9.get(this.ht ?? globalThis)?.get(this.G) : this.G?.value;
|
|
14058
|
+
}
|
|
14059
|
+
disconnected() {
|
|
14060
|
+
this.lt === this.ct && this.rt(void 0);
|
|
14061
|
+
}
|
|
14062
|
+
reconnected() {
|
|
14063
|
+
this.rt(this.ct);
|
|
14064
|
+
}
|
|
14065
|
+
});
|
|
14066
|
+
|
|
14067
|
+
// dist/components/corti-root.js
|
|
14068
|
+
var __decorate14 = function(decorators, target, key, desc) {
|
|
14069
|
+
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
14070
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
14071
|
+
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
14072
|
+
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
14073
|
+
};
|
|
14074
|
+
var CortiRoot = class extends i5 {
|
|
14075
|
+
constructor() {
|
|
14076
|
+
super(...arguments);
|
|
14077
|
+
this.settingsEnabled = ["device", "language"];
|
|
14078
|
+
this.allowButtonFocus = false;
|
|
14079
|
+
this._contextProviderRef = e9();
|
|
14080
|
+
this._recordingButtonRef = e9();
|
|
14081
|
+
}
|
|
14082
|
+
/**
|
|
14083
|
+
* List of all language codes available for use with the Web Component.
|
|
14084
|
+
* Default list depends on the accessToken
|
|
14085
|
+
*/
|
|
14086
|
+
set languagesSupported(value) {
|
|
14087
|
+
this._languagesSupported = value;
|
|
14088
|
+
}
|
|
14089
|
+
get languagesSupported() {
|
|
14090
|
+
return this._contextProviderRef.value?.languages || this._languagesSupported || [];
|
|
14091
|
+
}
|
|
14092
|
+
/**
|
|
14093
|
+
* List of available recording devices
|
|
14094
|
+
*/
|
|
14095
|
+
set devices(value) {
|
|
14096
|
+
this._devices = value;
|
|
14097
|
+
}
|
|
14098
|
+
get devices() {
|
|
14099
|
+
return this._contextProviderRef.value?.devices || this._devices || [];
|
|
14100
|
+
}
|
|
14101
|
+
/**
|
|
14102
|
+
* The selected device used for recording (MediaDeviceInfo).
|
|
14103
|
+
*/
|
|
14104
|
+
set selectedDevice(value) {
|
|
14105
|
+
this._selectedDevice = value;
|
|
14106
|
+
}
|
|
14107
|
+
get selectedDevice() {
|
|
14108
|
+
return this._contextProviderRef.value?.selectedDevice || this._selectedDevice;
|
|
14109
|
+
}
|
|
14110
|
+
/**
|
|
14111
|
+
* Push-to-talk keybinding for keyboard shortcut. Single key only (e.g., "Space", "k", "meta", "ctrl").
|
|
14112
|
+
* Combinations with "+" are not supported.
|
|
14113
|
+
* Keydown starts recording, keyup stops recording.
|
|
14114
|
+
* Defaults to "Space" if keybinding is in settingsEnabled, otherwise undefined
|
|
14115
|
+
*/
|
|
14116
|
+
set pushToTalkKeybinding(value) {
|
|
14117
|
+
this._pushToTalkKeybinding = value;
|
|
14118
|
+
}
|
|
14119
|
+
get pushToTalkKeybinding() {
|
|
14120
|
+
return this._contextProviderRef.value?.pushToTalkKeybinding || this._pushToTalkKeybinding;
|
|
14121
|
+
}
|
|
14122
|
+
/**
|
|
14123
|
+
* Toggle-to-talk keybinding for keyboard shortcut. Single key only (e.g., "`", "k", "meta", "ctrl").
|
|
14124
|
+
* Combinations with "+" are not supported.
|
|
14125
|
+
* Pressing the key toggles recording on/off.
|
|
14126
|
+
* Defaults to "`" if keybinding is in settingsEnabled, otherwise undefined
|
|
14127
|
+
*/
|
|
14128
|
+
set toggleToTalkKeybinding(value) {
|
|
14129
|
+
this._toggleToTalkKeybinding = value;
|
|
14130
|
+
}
|
|
14131
|
+
get toggleToTalkKeybinding() {
|
|
14132
|
+
return this._contextProviderRef.value?.toggleToTalkKeybinding || this._toggleToTalkKeybinding;
|
|
14133
|
+
}
|
|
14134
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
14135
|
+
// Public methods
|
|
14136
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
14137
|
+
/**
|
|
14138
|
+
* Current state of recording (stopped, recording, initializing and stopping, ).
|
|
14139
|
+
*/
|
|
14140
|
+
get recordingState() {
|
|
14141
|
+
return this._contextProviderRef.value?.recordingState ?? "stopped";
|
|
14142
|
+
}
|
|
14143
|
+
/**
|
|
14144
|
+
* Starts a recording.
|
|
14145
|
+
*/
|
|
14146
|
+
startRecording() {
|
|
14147
|
+
this._recordingButtonRef.value?.startRecording();
|
|
14148
|
+
}
|
|
14149
|
+
/**
|
|
14150
|
+
* Stops a recording.
|
|
14151
|
+
*/
|
|
14152
|
+
stopRecording() {
|
|
14153
|
+
this._recordingButtonRef.value?.stopRecording();
|
|
14154
|
+
}
|
|
14155
|
+
/**
|
|
14156
|
+
* Starts or stops recording. Convenience layer on top of the start/stop methods.
|
|
14157
|
+
*/
|
|
14158
|
+
toggleRecording() {
|
|
14159
|
+
this._recordingButtonRef.value?.toggleRecording();
|
|
14160
|
+
}
|
|
14161
|
+
/**
|
|
14162
|
+
* Opens the WebSocket connection without starting recording.
|
|
14163
|
+
* Use this to pre-establish the connection before recording starts.
|
|
14164
|
+
*/
|
|
14165
|
+
async openConnection() {
|
|
14166
|
+
await this._recordingButtonRef.value?.openConnection();
|
|
14167
|
+
}
|
|
14168
|
+
/**
|
|
14169
|
+
* Closes the WebSocket connection by sending "end" and waiting for "ended".
|
|
14170
|
+
* Call this to receive "usage" statistics or when done with the connection.
|
|
14171
|
+
*/
|
|
14172
|
+
async closeConnection() {
|
|
14173
|
+
await this._recordingButtonRef.value?.closeConnection();
|
|
14174
|
+
}
|
|
14175
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
14176
|
+
// Render
|
|
14177
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
14178
|
+
render() {
|
|
14179
|
+
return x``;
|
|
14180
|
+
}
|
|
13718
14181
|
};
|
|
13719
|
-
|
|
13720
|
-
|
|
13721
|
-
|
|
13722
|
-
|
|
13723
|
-
|
|
13724
|
-
|
|
13725
|
-
|
|
13726
|
-
|
|
13727
|
-
|
|
13728
|
-
|
|
13729
|
-
|
|
13730
|
-
|
|
13731
|
-
|
|
13732
|
-
|
|
13733
|
-
|
|
13734
|
-
|
|
13735
|
-
],
|
|
13736
|
-
|
|
13737
|
-
|
|
13738
|
-
|
|
13739
|
-
|
|
13740
|
-
|
|
13741
|
-
|
|
13742
|
-
|
|
13743
|
-
], DictationRecordingButton.prototype, "_tenantName", void 0);
|
|
13744
|
-
__decorate4([
|
|
13745
|
-
c5({ context: dictationConfigContext, subscribe: true }),
|
|
13746
|
-
r5()
|
|
13747
|
-
], DictationRecordingButton.prototype, "_dictationConfig", void 0);
|
|
13748
|
-
__decorate4([
|
|
13749
|
-
c5({ context: socketUrlContext, subscribe: true }),
|
|
13750
|
-
r5()
|
|
13751
|
-
], DictationRecordingButton.prototype, "_socketUrl", void 0);
|
|
13752
|
-
__decorate4([
|
|
13753
|
-
c5({ context: socketProxyContext, subscribe: true }),
|
|
13754
|
-
r5()
|
|
13755
|
-
], DictationRecordingButton.prototype, "_socketProxy", void 0);
|
|
13756
|
-
__decorate4([
|
|
13757
|
-
c5({ context: debugDisplayAudioContext, subscribe: true }),
|
|
13758
|
-
r5()
|
|
13759
|
-
], DictationRecordingButton.prototype, "_debug_displayAudio", void 0);
|
|
13760
|
-
__decorate4([
|
|
13761
|
-
c5({ context: pushToTalkKeybindingContext, subscribe: true }),
|
|
13762
|
-
r5()
|
|
13763
|
-
], DictationRecordingButton.prototype, "_pushToTalkKeybinding", void 0);
|
|
13764
|
-
__decorate4([
|
|
13765
|
-
c5({ context: toggleToTalkKeybindingContext, subscribe: true }),
|
|
13766
|
-
r5()
|
|
13767
|
-
], DictationRecordingButton.prototype, "_toggleToTalkKeybinding", void 0);
|
|
13768
|
-
__decorate4([
|
|
14182
|
+
CortiRoot.styles = i2`
|
|
14183
|
+
.hidden {
|
|
14184
|
+
display: none;
|
|
14185
|
+
}
|
|
14186
|
+
`;
|
|
14187
|
+
__decorate14([
|
|
14188
|
+
n4({ type: String })
|
|
14189
|
+
], CortiRoot.prototype, "accessToken", void 0);
|
|
14190
|
+
__decorate14([
|
|
14191
|
+
n4({ attribute: false, type: Object })
|
|
14192
|
+
], CortiRoot.prototype, "authConfig", void 0);
|
|
14193
|
+
__decorate14([
|
|
14194
|
+
n4({ type: String })
|
|
14195
|
+
], CortiRoot.prototype, "socketUrl", void 0);
|
|
14196
|
+
__decorate14([
|
|
14197
|
+
n4({ attribute: false, type: Object })
|
|
14198
|
+
], CortiRoot.prototype, "socketProxy", void 0);
|
|
14199
|
+
__decorate14([
|
|
14200
|
+
n4({
|
|
14201
|
+
converter: commaSeparatedConverter,
|
|
14202
|
+
type: Array
|
|
14203
|
+
})
|
|
14204
|
+
], CortiRoot.prototype, "settingsEnabled", void 0);
|
|
14205
|
+
__decorate14([
|
|
13769
14206
|
n4({ type: Boolean })
|
|
13770
|
-
],
|
|
13771
|
-
|
|
13772
|
-
|
|
13773
|
-
|
|
14207
|
+
], CortiRoot.prototype, "allowButtonFocus", void 0);
|
|
14208
|
+
__decorate14([
|
|
14209
|
+
n4({
|
|
14210
|
+
converter: commaSeparatedConverter,
|
|
14211
|
+
type: Array
|
|
14212
|
+
})
|
|
14213
|
+
], CortiRoot.prototype, "languagesSupported", null);
|
|
14214
|
+
__decorate14([
|
|
14215
|
+
r4()
|
|
14216
|
+
], CortiRoot.prototype, "_languagesSupported", void 0);
|
|
14217
|
+
__decorate14([
|
|
14218
|
+
n4({ attribute: false, type: Array })
|
|
14219
|
+
], CortiRoot.prototype, "devices", null);
|
|
14220
|
+
__decorate14([
|
|
14221
|
+
r4()
|
|
14222
|
+
], CortiRoot.prototype, "_devices", void 0);
|
|
14223
|
+
__decorate14([
|
|
14224
|
+
n4({ attribute: false, type: Object })
|
|
14225
|
+
], CortiRoot.prototype, "selectedDevice", null);
|
|
14226
|
+
__decorate14([
|
|
14227
|
+
r4()
|
|
14228
|
+
], CortiRoot.prototype, "_selectedDevice", void 0);
|
|
14229
|
+
__decorate14([
|
|
14230
|
+
n4({ type: String })
|
|
14231
|
+
], CortiRoot.prototype, "pushToTalkKeybinding", null);
|
|
14232
|
+
__decorate14([
|
|
14233
|
+
r4()
|
|
14234
|
+
], CortiRoot.prototype, "_pushToTalkKeybinding", void 0);
|
|
14235
|
+
__decorate14([
|
|
14236
|
+
n4({ type: String })
|
|
14237
|
+
], CortiRoot.prototype, "toggleToTalkKeybinding", null);
|
|
14238
|
+
__decorate14([
|
|
14239
|
+
r4()
|
|
14240
|
+
], CortiRoot.prototype, "_toggleToTalkKeybinding", void 0);
|
|
13774
14241
|
|
|
13775
14242
|
// dist/styles/callout.js
|
|
13776
|
-
var CalloutStyles =
|
|
14243
|
+
var CalloutStyles = i2`
|
|
13777
14244
|
.callout {
|
|
13778
14245
|
background: var(--callout-info-background, light-dark(#007bff33, #0056b333));
|
|
13779
14246
|
border: 1px solid var(--callout-info-border, light-dark(#007bff99, #0056b399));
|
|
@@ -13796,7 +14263,7 @@ var CalloutStyles = i`
|
|
|
13796
14263
|
var callout_default = CalloutStyles;
|
|
13797
14264
|
|
|
13798
14265
|
// dist/styles/settings-menu.js
|
|
13799
|
-
var SettingsMenuStyles =
|
|
14266
|
+
var SettingsMenuStyles = i2`
|
|
13800
14267
|
:host {
|
|
13801
14268
|
display: block;
|
|
13802
14269
|
}
|
|
@@ -13832,7 +14299,7 @@ var settings_menu_default = SettingsMenuStyles;
|
|
|
13832
14299
|
// dist/styles/select.js
|
|
13833
14300
|
var SelectStyles = [
|
|
13834
14301
|
LabelStyles,
|
|
13835
|
-
|
|
14302
|
+
i2`
|
|
13836
14303
|
select {
|
|
13837
14304
|
background: var(--card-background, light-dark(#fff, #333));
|
|
13838
14305
|
color: var(--component-text-color, light-dark(#333, #eee));
|
|
@@ -13861,20 +14328,20 @@ var SelectStyles = [
|
|
|
13861
14328
|
var select_default = SelectStyles;
|
|
13862
14329
|
|
|
13863
14330
|
// dist/components/device-selector.js
|
|
13864
|
-
var
|
|
14331
|
+
var __decorate15 = function(decorators, target, key, desc) {
|
|
13865
14332
|
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
13866
14333
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
13867
14334
|
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
13868
14335
|
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
13869
14336
|
};
|
|
13870
|
-
var
|
|
14337
|
+
var __classPrivateFieldGet11 = function(receiver, state, kind, f5) {
|
|
13871
14338
|
if (kind === "a" && !f5) throw new TypeError("Private accessor was defined without a getter");
|
|
13872
14339
|
if (typeof state === "function" ? receiver !== state || !f5 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
13873
14340
|
return kind === "m" ? f5 : kind === "a" ? f5.call(receiver) : f5 ? f5.value : state.get(receiver);
|
|
13874
14341
|
};
|
|
13875
14342
|
var _DictationDeviceSelector_instances;
|
|
13876
14343
|
var _DictationDeviceSelector_handleSelectDevice;
|
|
13877
|
-
var DictationDeviceSelector = class DictationDeviceSelector2 extends
|
|
14344
|
+
var DictationDeviceSelector = class DictationDeviceSelector2 extends i5 {
|
|
13878
14345
|
constructor() {
|
|
13879
14346
|
super(...arguments);
|
|
13880
14347
|
_DictationDeviceSelector_instances.add(this);
|
|
@@ -13884,12 +14351,12 @@ var DictationDeviceSelector = class DictationDeviceSelector2 extends i4 {
|
|
|
13884
14351
|
return x`
|
|
13885
14352
|
<div>
|
|
13886
14353
|
<label id="device-select-label" for="device-select">
|
|
13887
|
-
|
|
14354
|
+
Microphone
|
|
13888
14355
|
</label>
|
|
13889
14356
|
<select
|
|
13890
14357
|
id="device-select"
|
|
13891
14358
|
aria-labelledby="device-select-label"
|
|
13892
|
-
@change=${
|
|
14359
|
+
@change=${__classPrivateFieldGet11(this, _DictationDeviceSelector_instances, "m", _DictationDeviceSelector_handleSelectDevice)}
|
|
13893
14360
|
?disabled=${this.disabled || !this._devices || this._devices.length === 0}
|
|
13894
14361
|
>
|
|
13895
14362
|
${this._devices?.map((device) => x`
|
|
@@ -13915,25 +14382,25 @@ _DictationDeviceSelector_handleSelectDevice = function _DictationDeviceSelector_
|
|
|
13915
14382
|
this.dispatchEvent(recordingDevicesChangedEvent(this._devices || [], device));
|
|
13916
14383
|
};
|
|
13917
14384
|
DictationDeviceSelector.styles = select_default;
|
|
13918
|
-
|
|
13919
|
-
|
|
13920
|
-
|
|
14385
|
+
__decorate15([
|
|
14386
|
+
c({ context: devicesContext, subscribe: true }),
|
|
14387
|
+
r4()
|
|
13921
14388
|
], DictationDeviceSelector.prototype, "_devices", void 0);
|
|
13922
|
-
|
|
13923
|
-
|
|
13924
|
-
|
|
14389
|
+
__decorate15([
|
|
14390
|
+
c({ context: selectedDeviceContext, subscribe: true }),
|
|
14391
|
+
r4()
|
|
13925
14392
|
], DictationDeviceSelector.prototype, "_selectedDevice", void 0);
|
|
13926
|
-
|
|
14393
|
+
__decorate15([
|
|
13927
14394
|
n4({ type: Boolean })
|
|
13928
14395
|
], DictationDeviceSelector.prototype, "disabled", void 0);
|
|
13929
|
-
DictationDeviceSelector =
|
|
13930
|
-
|
|
14396
|
+
DictationDeviceSelector = __decorate15([
|
|
14397
|
+
t2("dictation-device-selector")
|
|
13931
14398
|
], DictationDeviceSelector);
|
|
13932
14399
|
|
|
13933
14400
|
// dist/styles/keybinding-selector.js
|
|
13934
14401
|
var KeybindingSelectorStyles = [
|
|
13935
14402
|
LabelStyles,
|
|
13936
|
-
|
|
14403
|
+
i2`
|
|
13937
14404
|
:host {
|
|
13938
14405
|
display: block;
|
|
13939
14406
|
}
|
|
@@ -14008,13 +14475,13 @@ var KeybindingSelectorStyles = [
|
|
|
14008
14475
|
var keybinding_selector_default = KeybindingSelectorStyles;
|
|
14009
14476
|
|
|
14010
14477
|
// dist/components/keybinding-input.js
|
|
14011
|
-
var
|
|
14478
|
+
var __decorate16 = function(decorators, target, key, desc) {
|
|
14012
14479
|
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
14013
14480
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
14014
14481
|
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
14015
14482
|
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
14016
14483
|
};
|
|
14017
|
-
var
|
|
14484
|
+
var __classPrivateFieldGet12 = function(receiver, state, kind, f5) {
|
|
14018
14485
|
if (kind === "a" && !f5) throw new TypeError("Private accessor was defined without a getter");
|
|
14019
14486
|
if (typeof state === "function" ? receiver !== state || !f5 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14020
14487
|
return kind === "m" ? f5 : kind === "a" ? f5.call(receiver) : f5 ? f5.value : state.get(receiver);
|
|
@@ -14023,7 +14490,7 @@ var _DictationKeybindingInput_instances;
|
|
|
14023
14490
|
var _DictationKeybindingInput_handleKeybindingInputFocus;
|
|
14024
14491
|
var _DictationKeybindingInput_handleKeybindingInputBlur;
|
|
14025
14492
|
var _DictationKeybindingInput_handleKeybindingKeyDown;
|
|
14026
|
-
var DictationKeybindingInput = class DictationKeybindingInput2 extends
|
|
14493
|
+
var DictationKeybindingInput = class DictationKeybindingInput2 extends i5 {
|
|
14027
14494
|
constructor() {
|
|
14028
14495
|
super(...arguments);
|
|
14029
14496
|
_DictationKeybindingInput_instances.add(this);
|
|
@@ -14045,9 +14512,9 @@ var DictationKeybindingInput = class DictationKeybindingInput2 extends i4 {
|
|
|
14045
14512
|
.value=""
|
|
14046
14513
|
placeholder="Click and press a key..."
|
|
14047
14514
|
readonly
|
|
14048
|
-
@focusin=${
|
|
14049
|
-
@focusout=${
|
|
14050
|
-
@keydown=${
|
|
14515
|
+
@focusin=${__classPrivateFieldGet12(this, _DictationKeybindingInput_instances, "m", _DictationKeybindingInput_handleKeybindingInputFocus)}
|
|
14516
|
+
@focusout=${__classPrivateFieldGet12(this, _DictationKeybindingInput_instances, "m", _DictationKeybindingInput_handleKeybindingInputBlur)}
|
|
14517
|
+
@keydown=${__classPrivateFieldGet12(this, _DictationKeybindingInput_instances, "m", _DictationKeybindingInput_handleKeybindingKeyDown)}
|
|
14051
14518
|
?disabled=${this.disabled}
|
|
14052
14519
|
/>
|
|
14053
14520
|
</div>
|
|
@@ -14072,35 +14539,35 @@ _DictationKeybindingInput_handleKeybindingKeyDown = function _DictationKeybindin
|
|
|
14072
14539
|
this.dispatchEvent(keybindingChangedEvent(event.key, event.code, keybinding, this.keybindingType));
|
|
14073
14540
|
};
|
|
14074
14541
|
DictationKeybindingInput.styles = keybinding_selector_default;
|
|
14075
|
-
|
|
14542
|
+
__decorate16([
|
|
14076
14543
|
n4({ type: String })
|
|
14077
14544
|
], DictationKeybindingInput.prototype, "keybindingType", void 0);
|
|
14078
|
-
|
|
14079
|
-
|
|
14080
|
-
|
|
14545
|
+
__decorate16([
|
|
14546
|
+
c({ context: pushToTalkKeybindingContext, subscribe: true }),
|
|
14547
|
+
r4()
|
|
14081
14548
|
], DictationKeybindingInput.prototype, "_pushToTalkKeybinding", void 0);
|
|
14082
|
-
|
|
14083
|
-
|
|
14084
|
-
|
|
14549
|
+
__decorate16([
|
|
14550
|
+
c({ context: toggleToTalkKeybindingContext, subscribe: true }),
|
|
14551
|
+
r4()
|
|
14085
14552
|
], DictationKeybindingInput.prototype, "_toggleToTalkKeybinding", void 0);
|
|
14086
|
-
|
|
14553
|
+
__decorate16([
|
|
14087
14554
|
n4({ type: Boolean })
|
|
14088
14555
|
], DictationKeybindingInput.prototype, "disabled", void 0);
|
|
14089
|
-
|
|
14090
|
-
|
|
14556
|
+
__decorate16([
|
|
14557
|
+
r4()
|
|
14091
14558
|
], DictationKeybindingInput.prototype, "_isCapturingKeybinding", void 0);
|
|
14092
|
-
DictationKeybindingInput =
|
|
14093
|
-
|
|
14559
|
+
DictationKeybindingInput = __decorate16([
|
|
14560
|
+
t2("dictation-keybinding-input")
|
|
14094
14561
|
], DictationKeybindingInput);
|
|
14095
14562
|
|
|
14096
14563
|
// dist/components/keybinding-selector.js
|
|
14097
|
-
var
|
|
14564
|
+
var __decorate17 = function(decorators, target, key, desc) {
|
|
14098
14565
|
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
14099
14566
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
14100
14567
|
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
14101
14568
|
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
14102
14569
|
};
|
|
14103
|
-
var DictationKeybindingSelector = class DictationKeybindingSelector2 extends
|
|
14570
|
+
var DictationKeybindingSelector = class DictationKeybindingSelector2 extends i5 {
|
|
14104
14571
|
constructor() {
|
|
14105
14572
|
super(...arguments);
|
|
14106
14573
|
this.disabled = false;
|
|
@@ -14124,36 +14591,36 @@ var DictationKeybindingSelector = class DictationKeybindingSelector2 extends i4
|
|
|
14124
14591
|
}
|
|
14125
14592
|
};
|
|
14126
14593
|
DictationKeybindingSelector.styles = keybinding_selector_default;
|
|
14127
|
-
|
|
14128
|
-
|
|
14129
|
-
|
|
14594
|
+
__decorate17([
|
|
14595
|
+
c({ context: pushToTalkKeybindingContext, subscribe: true }),
|
|
14596
|
+
r4()
|
|
14130
14597
|
], DictationKeybindingSelector.prototype, "_pushToTalkKeybinding", void 0);
|
|
14131
|
-
|
|
14132
|
-
|
|
14133
|
-
|
|
14598
|
+
__decorate17([
|
|
14599
|
+
c({ context: toggleToTalkKeybindingContext, subscribe: true }),
|
|
14600
|
+
r4()
|
|
14134
14601
|
], DictationKeybindingSelector.prototype, "_toggleToTalkKeybinding", void 0);
|
|
14135
|
-
|
|
14602
|
+
__decorate17([
|
|
14136
14603
|
n4({ type: Boolean })
|
|
14137
14604
|
], DictationKeybindingSelector.prototype, "disabled", void 0);
|
|
14138
|
-
DictationKeybindingSelector =
|
|
14139
|
-
|
|
14605
|
+
DictationKeybindingSelector = __decorate17([
|
|
14606
|
+
t2("dictation-keybinding-selector")
|
|
14140
14607
|
], DictationKeybindingSelector);
|
|
14141
14608
|
|
|
14142
14609
|
// dist/components/language-selector.js
|
|
14143
|
-
var
|
|
14610
|
+
var __decorate18 = function(decorators, target, key, desc) {
|
|
14144
14611
|
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
14145
14612
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
14146
14613
|
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
14147
14614
|
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
14148
14615
|
};
|
|
14149
|
-
var
|
|
14616
|
+
var __classPrivateFieldGet13 = function(receiver, state, kind, f5) {
|
|
14150
14617
|
if (kind === "a" && !f5) throw new TypeError("Private accessor was defined without a getter");
|
|
14151
14618
|
if (typeof state === "function" ? receiver !== state || !f5 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14152
14619
|
return kind === "m" ? f5 : kind === "a" ? f5.call(receiver) : f5 ? f5.value : state.get(receiver);
|
|
14153
14620
|
};
|
|
14154
14621
|
var _DictationLanguageSelector_instances;
|
|
14155
14622
|
var _DictationLanguageSelector_handleSelectLanguage;
|
|
14156
|
-
var DictationLanguageSelector = class DictationLanguageSelector2 extends
|
|
14623
|
+
var DictationLanguageSelector = class DictationLanguageSelector2 extends i5 {
|
|
14157
14624
|
constructor() {
|
|
14158
14625
|
super(...arguments);
|
|
14159
14626
|
_DictationLanguageSelector_instances.add(this);
|
|
@@ -14163,18 +14630,18 @@ var DictationLanguageSelector = class DictationLanguageSelector2 extends i4 {
|
|
|
14163
14630
|
return x`
|
|
14164
14631
|
<div>
|
|
14165
14632
|
<label id="language-select-label" for="language-select">
|
|
14166
|
-
|
|
14633
|
+
Spoken language
|
|
14167
14634
|
</label>
|
|
14168
14635
|
<select
|
|
14169
14636
|
id="language-select"
|
|
14170
14637
|
aria-labelledby="language-select-label"
|
|
14171
|
-
@change=${
|
|
14638
|
+
@change=${__classPrivateFieldGet13(this, _DictationLanguageSelector_instances, "m", _DictationLanguageSelector_handleSelectLanguage)}
|
|
14172
14639
|
?disabled=${this.disabled || !this._languages || this._languages.length === 0}
|
|
14173
14640
|
>
|
|
14174
14641
|
${this._languages?.map((language) => x`
|
|
14175
14642
|
<option
|
|
14176
14643
|
value=${language}
|
|
14177
|
-
?selected=${this.
|
|
14644
|
+
?selected=${this._selectedLanguage === language}
|
|
14178
14645
|
>
|
|
14179
14646
|
${getLanguageName(language)}
|
|
14180
14647
|
</option>
|
|
@@ -14191,29 +14658,29 @@ _DictationLanguageSelector_handleSelectLanguage = function _DictationLanguageSel
|
|
|
14191
14658
|
this.dispatchEvent(languageChangedEvent(language));
|
|
14192
14659
|
};
|
|
14193
14660
|
DictationLanguageSelector.styles = select_default;
|
|
14194
|
-
|
|
14195
|
-
|
|
14196
|
-
|
|
14661
|
+
__decorate18([
|
|
14662
|
+
c({ context: languagesContext, subscribe: true }),
|
|
14663
|
+
r4()
|
|
14197
14664
|
], DictationLanguageSelector.prototype, "_languages", void 0);
|
|
14198
|
-
|
|
14199
|
-
|
|
14200
|
-
|
|
14201
|
-
], DictationLanguageSelector.prototype, "
|
|
14202
|
-
|
|
14665
|
+
__decorate18([
|
|
14666
|
+
c({ context: selectedLanguageContext, subscribe: true }),
|
|
14667
|
+
r4()
|
|
14668
|
+
], DictationLanguageSelector.prototype, "_selectedLanguage", void 0);
|
|
14669
|
+
__decorate18([
|
|
14203
14670
|
n4({ type: Boolean })
|
|
14204
14671
|
], DictationLanguageSelector.prototype, "disabled", void 0);
|
|
14205
|
-
DictationLanguageSelector =
|
|
14206
|
-
|
|
14672
|
+
DictationLanguageSelector = __decorate18([
|
|
14673
|
+
t2("dictation-language-selector")
|
|
14207
14674
|
], DictationLanguageSelector);
|
|
14208
14675
|
|
|
14209
14676
|
// dist/components/settings-menu.js
|
|
14210
|
-
var
|
|
14677
|
+
var __decorate19 = function(decorators, target, key, desc) {
|
|
14211
14678
|
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
14212
14679
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
14213
14680
|
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
14214
14681
|
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
14215
14682
|
};
|
|
14216
|
-
var DictationSettingsMenu = class DictationSettingsMenu2 extends
|
|
14683
|
+
var DictationSettingsMenu = class DictationSettingsMenu2 extends i5 {
|
|
14217
14684
|
constructor() {
|
|
14218
14685
|
super(...arguments);
|
|
14219
14686
|
this._recordingState = "stopped";
|
|
@@ -14259,110 +14726,165 @@ DictationSettingsMenu.styles = [
|
|
|
14259
14726
|
buttons_default,
|
|
14260
14727
|
callout_default
|
|
14261
14728
|
];
|
|
14262
|
-
|
|
14263
|
-
|
|
14264
|
-
|
|
14729
|
+
__decorate19([
|
|
14730
|
+
c({ context: recordingStateContext, subscribe: true }),
|
|
14731
|
+
r4()
|
|
14265
14732
|
], DictationSettingsMenu.prototype, "_recordingState", void 0);
|
|
14266
|
-
|
|
14733
|
+
__decorate19([
|
|
14267
14734
|
n4({
|
|
14268
14735
|
converter: commaSeparatedConverter,
|
|
14269
14736
|
type: Array
|
|
14270
14737
|
})
|
|
14271
14738
|
], DictationSettingsMenu.prototype, "settingsEnabled", void 0);
|
|
14272
|
-
DictationSettingsMenu =
|
|
14273
|
-
|
|
14739
|
+
DictationSettingsMenu = __decorate19([
|
|
14740
|
+
t2("dictation-settings-menu")
|
|
14274
14741
|
], DictationSettingsMenu);
|
|
14275
14742
|
|
|
14276
|
-
// dist/components/corti-
|
|
14277
|
-
var
|
|
14743
|
+
// dist/components/corti-ambient.js
|
|
14744
|
+
var __decorate20 = function(decorators, target, key, desc) {
|
|
14278
14745
|
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
14279
14746
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
14280
14747
|
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
14281
14748
|
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
14282
14749
|
};
|
|
14283
|
-
var
|
|
14284
|
-
if (kind === "a" && !f5) throw new TypeError("Private accessor was defined without a getter");
|
|
14285
|
-
if (typeof state === "function" ? receiver !== state || !f5 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14286
|
-
return kind === "m" ? f5 : kind === "a" ? f5.call(receiver) : f5 ? f5.value : state.get(receiver);
|
|
14287
|
-
};
|
|
14288
|
-
var _CortiDictation_recordingButtonRef;
|
|
14289
|
-
var _CortiDictation_contextProviderRef;
|
|
14290
|
-
var CortiDictation = class CortiDictation2 extends i4 {
|
|
14750
|
+
var CortiAmbient = class CortiAmbient2 extends CortiRoot {
|
|
14291
14751
|
constructor() {
|
|
14292
14752
|
super(...arguments);
|
|
14293
|
-
|
|
14294
|
-
_CortiDictation_contextProviderRef.set(this, e7());
|
|
14295
|
-
this.settingsEnabled = ["device", "language"];
|
|
14296
|
-
this.allowButtonFocus = false;
|
|
14297
|
-
this.debug_displayAudio = false;
|
|
14298
|
-
this._dictationConfig = DEFAULT_DICTATION_CONFIG;
|
|
14753
|
+
this._ambientConfig = DEFAULT_STREAM_CONFIG;
|
|
14299
14754
|
}
|
|
14300
14755
|
/**
|
|
14301
|
-
*
|
|
14302
|
-
* Default list depends on the accessToken
|
|
14756
|
+
* Stream configuration for ambient capture (modes, transcription, etc.).
|
|
14303
14757
|
*/
|
|
14304
|
-
set
|
|
14305
|
-
this.
|
|
14758
|
+
set ambientConfig(value) {
|
|
14759
|
+
this._ambientConfig = value;
|
|
14306
14760
|
}
|
|
14307
|
-
get
|
|
14308
|
-
return
|
|
14761
|
+
get ambientConfig() {
|
|
14762
|
+
return this._contextProviderRef.value?.ambientConfig ?? this._ambientConfig ?? DEFAULT_STREAM_CONFIG;
|
|
14309
14763
|
}
|
|
14310
14764
|
/**
|
|
14311
|
-
*
|
|
14765
|
+
* Stream interaction id passed to `stream.connect` for this session.
|
|
14312
14766
|
*/
|
|
14313
|
-
set
|
|
14314
|
-
this.
|
|
14767
|
+
set interactionId(value) {
|
|
14768
|
+
this._interactionId = value;
|
|
14315
14769
|
}
|
|
14316
|
-
get
|
|
14317
|
-
return
|
|
14770
|
+
get interactionId() {
|
|
14771
|
+
return this._contextProviderRef.value?.interactionId ?? this._interactionId;
|
|
14318
14772
|
}
|
|
14319
|
-
|
|
14320
|
-
|
|
14321
|
-
|
|
14322
|
-
|
|
14323
|
-
this.
|
|
14773
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
14774
|
+
// Render
|
|
14775
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
14776
|
+
render() {
|
|
14777
|
+
const isHidden = !this.accessToken && !this.authConfig && !this.socketUrl && !this.socketProxy;
|
|
14778
|
+
return x`
|
|
14779
|
+
<ambient-root
|
|
14780
|
+
${n7(this._contextProviderRef)}
|
|
14781
|
+
class=${e8({ hidden: isHidden })}
|
|
14782
|
+
.accessToken=${this.accessToken}
|
|
14783
|
+
.authConfig=${this.authConfig}
|
|
14784
|
+
.socketUrl=${this.socketUrl}
|
|
14785
|
+
.socketProxy=${this.socketProxy}
|
|
14786
|
+
.ambientConfig=${this._ambientConfig}
|
|
14787
|
+
.interactionId=${this._interactionId}
|
|
14788
|
+
.languages=${this._languagesSupported}
|
|
14789
|
+
.devices=${this._devices}
|
|
14790
|
+
.selectedDevice=${this._selectedDevice}
|
|
14791
|
+
.pushToTalkKeybinding=${this._pushToTalkKeybinding}
|
|
14792
|
+
.toggleToTalkKeybinding=${this._toggleToTalkKeybinding}
|
|
14793
|
+
>
|
|
14794
|
+
<ambient-recording-button
|
|
14795
|
+
${n7(this._recordingButtonRef)}
|
|
14796
|
+
?allowButtonFocus=${this.allowButtonFocus}
|
|
14797
|
+
></ambient-recording-button>
|
|
14798
|
+
${this.settingsEnabled?.length > 0 ? x`<dictation-settings-menu
|
|
14799
|
+
.settingsEnabled=${this.settingsEnabled}
|
|
14800
|
+
></dictation-settings-menu>` : E}
|
|
14801
|
+
</ambient-root>
|
|
14802
|
+
`;
|
|
14324
14803
|
}
|
|
14325
|
-
|
|
14326
|
-
|
|
14804
|
+
};
|
|
14805
|
+
__decorate20([
|
|
14806
|
+
n4({ attribute: false, type: Object })
|
|
14807
|
+
], CortiAmbient.prototype, "ambientConfig", null);
|
|
14808
|
+
__decorate20([
|
|
14809
|
+
r4()
|
|
14810
|
+
], CortiAmbient.prototype, "_ambientConfig", void 0);
|
|
14811
|
+
__decorate20([
|
|
14812
|
+
n4({ type: String })
|
|
14813
|
+
], CortiAmbient.prototype, "interactionId", null);
|
|
14814
|
+
__decorate20([
|
|
14815
|
+
r4()
|
|
14816
|
+
], CortiAmbient.prototype, "_interactionId", void 0);
|
|
14817
|
+
CortiAmbient = __decorate20([
|
|
14818
|
+
t2("corti-ambient")
|
|
14819
|
+
], CortiAmbient);
|
|
14820
|
+
|
|
14821
|
+
// dist/controllers/dictation-controller.js
|
|
14822
|
+
var DictationController = class extends SocketController {
|
|
14823
|
+
async stopRecording() {
|
|
14824
|
+
await this.pause();
|
|
14327
14825
|
}
|
|
14328
|
-
|
|
14329
|
-
|
|
14330
|
-
|
|
14331
|
-
|
|
14332
|
-
|
|
14826
|
+
async _connectThroughProxy(dictationConfig, proxy) {
|
|
14827
|
+
return await CortiWebSocketProxyClient.transcribe.connect({
|
|
14828
|
+
// awaitConfiguration: false — CONFIG_* appears in network activity before the socket is configured server-side
|
|
14829
|
+
awaitConfiguration: false,
|
|
14830
|
+
configuration: dictationConfig,
|
|
14831
|
+
proxy
|
|
14832
|
+
});
|
|
14333
14833
|
}
|
|
14334
|
-
|
|
14335
|
-
return
|
|
14834
|
+
async _connectThroughAuth(client, dictationConfig) {
|
|
14835
|
+
return await client.transcribe.connect({
|
|
14836
|
+
// awaitConfiguration: false — CONFIG_* appears in network activity before the socket is configured server-side
|
|
14837
|
+
awaitConfiguration: false,
|
|
14838
|
+
configuration: dictationConfig
|
|
14839
|
+
});
|
|
14336
14840
|
}
|
|
14337
|
-
|
|
14338
|
-
|
|
14339
|
-
|
|
14340
|
-
|
|
14341
|
-
|
|
14841
|
+
};
|
|
14842
|
+
|
|
14843
|
+
// dist/components/dictation-recording-button.js
|
|
14844
|
+
var __decorate21 = function(decorators, target, key, desc) {
|
|
14845
|
+
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
14846
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
14847
|
+
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
14848
|
+
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
14849
|
+
};
|
|
14850
|
+
var DictationRecordingButton = class DictationRecordingButton2 extends RecordingButtonBase {
|
|
14851
|
+
constructor() {
|
|
14852
|
+
super(...arguments);
|
|
14853
|
+
this._socketController = new DictationController(this);
|
|
14342
14854
|
}
|
|
14343
|
-
|
|
14344
|
-
|
|
14345
|
-
* Combinations with "+" are not supported.
|
|
14346
|
-
* Keydown starts recording, keyup stops recording.
|
|
14347
|
-
* Defaults to "Space" if keybinding is in settingsEnabled, otherwise undefined
|
|
14348
|
-
*/
|
|
14349
|
-
set pushToTalkKeybinding(value) {
|
|
14350
|
-
this._pushToTalkKeybinding = value;
|
|
14855
|
+
_getConnectConfig() {
|
|
14856
|
+
return this._dictationConfig ?? DEFAULT_DICTATION_CONFIG;
|
|
14351
14857
|
}
|
|
14352
|
-
|
|
14353
|
-
|
|
14858
|
+
};
|
|
14859
|
+
__decorate21([
|
|
14860
|
+
c({ context: dictationConfigContext, subscribe: true }),
|
|
14861
|
+
r4()
|
|
14862
|
+
], DictationRecordingButton.prototype, "_dictationConfig", void 0);
|
|
14863
|
+
DictationRecordingButton = __decorate21([
|
|
14864
|
+
t2("dictation-recording-button")
|
|
14865
|
+
], DictationRecordingButton);
|
|
14866
|
+
|
|
14867
|
+
// dist/components/corti-dictation.js
|
|
14868
|
+
var __decorate22 = function(decorators, target, key, desc) {
|
|
14869
|
+
var c6 = arguments.length, r7 = c6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d3;
|
|
14870
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
14871
|
+
else for (var i7 = decorators.length - 1; i7 >= 0; i7--) if (d3 = decorators[i7]) r7 = (c6 < 3 ? d3(r7) : c6 > 3 ? d3(target, key, r7) : d3(target, key)) || r7;
|
|
14872
|
+
return c6 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
14873
|
+
};
|
|
14874
|
+
var CortiDictation = class CortiDictation2 extends CortiRoot {
|
|
14875
|
+
constructor() {
|
|
14876
|
+
super(...arguments);
|
|
14877
|
+
this.debug_displayAudio = false;
|
|
14878
|
+
this._dictationConfig = DEFAULT_DICTATION_CONFIG;
|
|
14354
14879
|
}
|
|
14355
14880
|
/**
|
|
14356
|
-
*
|
|
14357
|
-
* Combinations with "+" are not supported.
|
|
14358
|
-
* Pressing the key toggles recording on/off.
|
|
14359
|
-
* Defaults to "`" if keybinding is in settingsEnabled, otherwise undefined
|
|
14881
|
+
* Configuration settings for dictation
|
|
14360
14882
|
*/
|
|
14361
|
-
set
|
|
14362
|
-
this.
|
|
14883
|
+
set dictationConfig(value) {
|
|
14884
|
+
this._dictationConfig = value;
|
|
14363
14885
|
}
|
|
14364
|
-
get
|
|
14365
|
-
return
|
|
14886
|
+
get dictationConfig() {
|
|
14887
|
+
return this._contextProviderRef.value?.dictationConfig || this._dictationConfig;
|
|
14366
14888
|
}
|
|
14367
14889
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
14368
14890
|
// Public methods
|
|
@@ -14374,7 +14896,7 @@ var CortiDictation = class CortiDictation2 extends i4 {
|
|
|
14374
14896
|
*/
|
|
14375
14897
|
setAccessToken(token) {
|
|
14376
14898
|
this.accessToken = token;
|
|
14377
|
-
return
|
|
14899
|
+
return this._contextProviderRef.value?.setAccessToken(token) ?? {
|
|
14378
14900
|
accessToken: token,
|
|
14379
14901
|
environment: void 0,
|
|
14380
14902
|
tenant: void 0
|
|
@@ -14387,44 +14909,12 @@ var CortiDictation = class CortiDictation2 extends i4 {
|
|
|
14387
14909
|
*/
|
|
14388
14910
|
async setAuthConfig(config) {
|
|
14389
14911
|
this.authConfig = config;
|
|
14390
|
-
return
|
|
14912
|
+
return this._contextProviderRef.value?.setAuthConfig(config) ?? {
|
|
14391
14913
|
accessToken: void 0,
|
|
14392
14914
|
environment: void 0,
|
|
14393
14915
|
tenant: void 0
|
|
14394
14916
|
};
|
|
14395
14917
|
}
|
|
14396
|
-
/**
|
|
14397
|
-
* Starts a recording.
|
|
14398
|
-
*/
|
|
14399
|
-
startRecording() {
|
|
14400
|
-
__classPrivateFieldGet11(this, _CortiDictation_recordingButtonRef, "f").value?.startRecording();
|
|
14401
|
-
}
|
|
14402
|
-
/**
|
|
14403
|
-
* Stops a recording.
|
|
14404
|
-
*/
|
|
14405
|
-
stopRecording() {
|
|
14406
|
-
__classPrivateFieldGet11(this, _CortiDictation_recordingButtonRef, "f").value?.stopRecording();
|
|
14407
|
-
}
|
|
14408
|
-
/**
|
|
14409
|
-
* Starts or stops recording. Convenience layer on top of the start/stop methods.
|
|
14410
|
-
*/
|
|
14411
|
-
toggleRecording() {
|
|
14412
|
-
__classPrivateFieldGet11(this, _CortiDictation_recordingButtonRef, "f").value?.toggleRecording();
|
|
14413
|
-
}
|
|
14414
|
-
/**
|
|
14415
|
-
* Opens the WebSocket connection without starting recording.
|
|
14416
|
-
* Use this to pre-establish the connection before recording starts.
|
|
14417
|
-
*/
|
|
14418
|
-
async openConnection() {
|
|
14419
|
-
await __classPrivateFieldGet11(this, _CortiDictation_recordingButtonRef, "f").value?.openConnection();
|
|
14420
|
-
}
|
|
14421
|
-
/**
|
|
14422
|
-
* Closes the WebSocket connection by sending "end" and waiting for "ended".
|
|
14423
|
-
* Call this to receive "usage" statistics or when done with the connection.
|
|
14424
|
-
*/
|
|
14425
|
-
async closeConnection() {
|
|
14426
|
-
await __classPrivateFieldGet11(this, _CortiDictation_recordingButtonRef, "f").value?.closeConnection();
|
|
14427
|
-
}
|
|
14428
14918
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
14429
14919
|
// Render
|
|
14430
14920
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -14432,8 +14922,8 @@ var CortiDictation = class CortiDictation2 extends i4 {
|
|
|
14432
14922
|
const isHidden = !this.accessToken && !this.authConfig && !this.socketUrl && !this.socketProxy;
|
|
14433
14923
|
return x`
|
|
14434
14924
|
<dictation-root
|
|
14435
|
-
${
|
|
14436
|
-
class=${
|
|
14925
|
+
${n7(this._contextProviderRef)}
|
|
14926
|
+
class=${e8({ hidden: isHidden })}
|
|
14437
14927
|
.accessToken=${this.accessToken}
|
|
14438
14928
|
.authConfig=${this.authConfig}
|
|
14439
14929
|
.socketUrl=${this.socketUrl}
|
|
@@ -14447,7 +14937,7 @@ var CortiDictation = class CortiDictation2 extends i4 {
|
|
|
14447
14937
|
.toggleToTalkKeybinding=${this._toggleToTalkKeybinding}
|
|
14448
14938
|
>
|
|
14449
14939
|
<dictation-recording-button
|
|
14450
|
-
${
|
|
14940
|
+
${n7(this._recordingButtonRef)}
|
|
14451
14941
|
?allowButtonFocus=${this.allowButtonFocus}
|
|
14452
14942
|
></dictation-recording-button>
|
|
14453
14943
|
${this.settingsEnabled?.length > 0 ? x`<dictation-settings-menu
|
|
@@ -14457,81 +14947,26 @@ var CortiDictation = class CortiDictation2 extends i4 {
|
|
|
14457
14947
|
`;
|
|
14458
14948
|
}
|
|
14459
14949
|
};
|
|
14460
|
-
|
|
14461
|
-
_CortiDictation_contextProviderRef = /* @__PURE__ */ new WeakMap();
|
|
14462
|
-
CortiDictation.styles = i`
|
|
14463
|
-
.hidden {
|
|
14464
|
-
display: none;
|
|
14465
|
-
}
|
|
14466
|
-
`;
|
|
14467
|
-
__decorate10([
|
|
14468
|
-
n4({ type: String })
|
|
14469
|
-
], CortiDictation.prototype, "accessToken", void 0);
|
|
14470
|
-
__decorate10([
|
|
14471
|
-
n4({ attribute: false, type: Object })
|
|
14472
|
-
], CortiDictation.prototype, "authConfig", void 0);
|
|
14473
|
-
__decorate10([
|
|
14474
|
-
n4({ type: String })
|
|
14475
|
-
], CortiDictation.prototype, "socketUrl", void 0);
|
|
14476
|
-
__decorate10([
|
|
14477
|
-
n4({ attribute: false, type: Object })
|
|
14478
|
-
], CortiDictation.prototype, "socketProxy", void 0);
|
|
14479
|
-
__decorate10([
|
|
14480
|
-
n4({
|
|
14481
|
-
converter: commaSeparatedConverter,
|
|
14482
|
-
type: Array
|
|
14483
|
-
})
|
|
14484
|
-
], CortiDictation.prototype, "languagesSupported", null);
|
|
14485
|
-
__decorate10([
|
|
14486
|
-
r5()
|
|
14487
|
-
], CortiDictation.prototype, "_languagesSupported", void 0);
|
|
14488
|
-
__decorate10([
|
|
14489
|
-
n4({
|
|
14490
|
-
converter: commaSeparatedConverter,
|
|
14491
|
-
type: Array
|
|
14492
|
-
})
|
|
14493
|
-
], CortiDictation.prototype, "settingsEnabled", void 0);
|
|
14494
|
-
__decorate10([
|
|
14495
|
-
n4({ type: Boolean })
|
|
14496
|
-
], CortiDictation.prototype, "allowButtonFocus", void 0);
|
|
14497
|
-
__decorate10([
|
|
14950
|
+
__decorate22([
|
|
14498
14951
|
n4({ attribute: "debug-display-audio", type: Boolean })
|
|
14499
14952
|
], CortiDictation.prototype, "debug_displayAudio", void 0);
|
|
14500
|
-
|
|
14953
|
+
__decorate22([
|
|
14501
14954
|
n4({ attribute: false, type: Object })
|
|
14502
14955
|
], CortiDictation.prototype, "dictationConfig", null);
|
|
14503
|
-
|
|
14504
|
-
|
|
14956
|
+
__decorate22([
|
|
14957
|
+
r4()
|
|
14505
14958
|
], CortiDictation.prototype, "_dictationConfig", void 0);
|
|
14506
|
-
|
|
14507
|
-
|
|
14508
|
-
], CortiDictation.prototype, "devices", null);
|
|
14509
|
-
__decorate10([
|
|
14510
|
-
r5()
|
|
14511
|
-
], CortiDictation.prototype, "_devices", void 0);
|
|
14512
|
-
__decorate10([
|
|
14513
|
-
n4({ attribute: false, type: Object })
|
|
14514
|
-
], CortiDictation.prototype, "selectedDevice", null);
|
|
14515
|
-
__decorate10([
|
|
14516
|
-
r5()
|
|
14517
|
-
], CortiDictation.prototype, "_selectedDevice", void 0);
|
|
14518
|
-
__decorate10([
|
|
14519
|
-
n4({ type: String })
|
|
14520
|
-
], CortiDictation.prototype, "pushToTalkKeybinding", null);
|
|
14521
|
-
__decorate10([
|
|
14522
|
-
r5()
|
|
14523
|
-
], CortiDictation.prototype, "_pushToTalkKeybinding", void 0);
|
|
14524
|
-
__decorate10([
|
|
14525
|
-
n4({ type: String })
|
|
14526
|
-
], CortiDictation.prototype, "toggleToTalkKeybinding", null);
|
|
14527
|
-
__decorate10([
|
|
14528
|
-
r5()
|
|
14529
|
-
], CortiDictation.prototype, "_toggleToTalkKeybinding", void 0);
|
|
14530
|
-
CortiDictation = __decorate10([
|
|
14531
|
-
t3("corti-dictation")
|
|
14959
|
+
CortiDictation = __decorate22([
|
|
14960
|
+
t2("corti-dictation")
|
|
14532
14961
|
], CortiDictation);
|
|
14533
14962
|
|
|
14534
14963
|
// dist/index.js
|
|
14964
|
+
if (!customElements.get("ambient-recording-button")) {
|
|
14965
|
+
customElements.define("ambient-recording-button", AmbientRecordingButton);
|
|
14966
|
+
}
|
|
14967
|
+
if (!customElements.get("corti-ambient")) {
|
|
14968
|
+
customElements.define("corti-ambient", CortiAmbient);
|
|
14969
|
+
}
|
|
14535
14970
|
if (!customElements.get("corti-dictation")) {
|
|
14536
14971
|
customElements.define("corti-dictation", CortiDictation);
|
|
14537
14972
|
}
|
|
@@ -14555,6 +14990,8 @@ if (!customElements.get("dictation-root")) {
|
|
|
14555
14990
|
}
|
|
14556
14991
|
var index_default = CortiDictation;
|
|
14557
14992
|
export {
|
|
14993
|
+
AmbientRecordingButton,
|
|
14994
|
+
CortiAmbient,
|
|
14558
14995
|
CortiDictation,
|
|
14559
14996
|
DictationDeviceSelector,
|
|
14560
14997
|
DictationKeybindingSelector,
|
|
@@ -14566,17 +15003,24 @@ export {
|
|
|
14566
15003
|
};
|
|
14567
15004
|
/*! Bundled license information:
|
|
14568
15005
|
|
|
14569
|
-
@lit/
|
|
15006
|
+
@lit/context/lib/context-request-event.js:
|
|
15007
|
+
@lit/context/lib/create-context.js:
|
|
15008
|
+
@lit/context/lib/controllers/context-consumer.js:
|
|
15009
|
+
@lit/context/lib/value-notifier.js:
|
|
15010
|
+
@lit/context/lib/controllers/context-provider.js:
|
|
15011
|
+
@lit/context/lib/context-root.js:
|
|
15012
|
+
@lit/reactive-element/decorators/query-assigned-elements.js:
|
|
15013
|
+
lit-html/directives/map.js:
|
|
15014
|
+
lit-html/directives/range.js:
|
|
14570
15015
|
(**
|
|
14571
15016
|
* @license
|
|
14572
|
-
* Copyright
|
|
15017
|
+
* Copyright 2021 Google LLC
|
|
14573
15018
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
14574
15019
|
*)
|
|
14575
15020
|
|
|
14576
|
-
@lit/
|
|
14577
|
-
lit-html/lit-html.js:
|
|
14578
|
-
lit-element/lit-element.js:
|
|
15021
|
+
@lit/context/lib/decorators/provide.js:
|
|
14579
15022
|
@lit/reactive-element/decorators/custom-element.js:
|
|
15023
|
+
@lit/reactive-element/reactive-element.js:
|
|
14580
15024
|
@lit/reactive-element/decorators/property.js:
|
|
14581
15025
|
@lit/reactive-element/decorators/state.js:
|
|
14582
15026
|
@lit/reactive-element/decorators/event-options.js:
|
|
@@ -14585,35 +15029,28 @@ lit-element/lit-element.js:
|
|
|
14585
15029
|
@lit/reactive-element/decorators/query-all.js:
|
|
14586
15030
|
@lit/reactive-element/decorators/query-async.js:
|
|
14587
15031
|
@lit/reactive-element/decorators/query-assigned-nodes.js:
|
|
15032
|
+
lit-html/lit-html.js:
|
|
15033
|
+
lit-element/lit-element.js:
|
|
14588
15034
|
lit-html/directive.js:
|
|
14589
15035
|
lit-html/async-directive.js:
|
|
14590
|
-
@lit/context/lib/decorators/provide.js:
|
|
14591
15036
|
(**
|
|
14592
15037
|
* @license
|
|
14593
15038
|
* Copyright 2017 Google LLC
|
|
14594
15039
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
14595
15040
|
*)
|
|
14596
15041
|
|
|
14597
|
-
lit-html/is-server.js:
|
|
14598
15042
|
@lit/context/lib/decorators/consume.js:
|
|
15043
|
+
lit-html/is-server.js:
|
|
14599
15044
|
(**
|
|
14600
15045
|
* @license
|
|
14601
15046
|
* Copyright 2022 Google LLC
|
|
14602
15047
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
14603
15048
|
*)
|
|
14604
15049
|
|
|
14605
|
-
@lit/reactive-element/
|
|
14606
|
-
@lit/context/lib/context-request-event.js:
|
|
14607
|
-
@lit/context/lib/create-context.js:
|
|
14608
|
-
@lit/context/lib/controllers/context-consumer.js:
|
|
14609
|
-
@lit/context/lib/value-notifier.js:
|
|
14610
|
-
@lit/context/lib/controllers/context-provider.js:
|
|
14611
|
-
@lit/context/lib/context-root.js:
|
|
14612
|
-
lit-html/directives/map.js:
|
|
14613
|
-
lit-html/directives/range.js:
|
|
15050
|
+
@lit/reactive-element/css-tag.js:
|
|
14614
15051
|
(**
|
|
14615
15052
|
* @license
|
|
14616
|
-
* Copyright
|
|
15053
|
+
* Copyright 2019 Google LLC
|
|
14617
15054
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
14618
15055
|
*)
|
|
14619
15056
|
|