hyperframes 0.8.59 → 0.8.60
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/cli.js +51 -8
- package/dist/fontLocalizeCli.js +25 -6
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/studio/assets/{hyperframes-player-BBub3ZdI.js → hyperframes-player-Di7GyCOP.js} +1 -1
- package/dist/studio/assets/{index-DZBHG9TW.css → index-CBKb_0TI.css} +1 -1
- package/dist/studio/assets/{index-D1KNPijK.js → index-Dpq2lkOm.js} +111 -111
- package/dist/studio/assets/{index-BxZ5Cw5w.js → index-Dx_pt9m4.js} +1 -1
- package/dist/studio/assets/{index-CI7WON-E.js → index-jAjhQTrB.js} +1 -1
- package/dist/studio/index.d.ts +1 -5
- package/dist/studio/index.html +2 -2
- package/dist/studio/index.js +4439 -4118
- package/dist/studio/index.js.map +1 -1
- package/dist/studio/styles.css +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -50,7 +50,7 @@ var VERSION;
|
|
|
50
50
|
var init_version = __esm({
|
|
51
51
|
"src/version.ts"() {
|
|
52
52
|
"use strict";
|
|
53
|
-
VERSION = true ? "0.8.
|
|
53
|
+
VERSION = true ? "0.8.60" : "0.0.0-dev";
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
|
|
@@ -93100,17 +93100,34 @@ function* riffChunks(buffer) {
|
|
|
93100
93100
|
offset2 += 8 + size + size % 2;
|
|
93101
93101
|
}
|
|
93102
93102
|
}
|
|
93103
|
+
function extensibleFormatTag(fmt) {
|
|
93104
|
+
const extraSize = fmt.readUInt16LE(16);
|
|
93105
|
+
if (extraSize < 22 || 18 + extraSize > fmt.length) return null;
|
|
93106
|
+
return EXTENSIBLE_FORMATS.get(fmt.toString("hex", 24, 40)) ?? null;
|
|
93107
|
+
}
|
|
93108
|
+
function wavFormatTag(buffer, body, size) {
|
|
93109
|
+
const fmt = buffer.subarray(body, body + size);
|
|
93110
|
+
if (fmt.length < 16) return null;
|
|
93111
|
+
const tag = fmt.readUInt16LE(0);
|
|
93112
|
+
if (tag !== 65534) return tag;
|
|
93113
|
+
return fmt.length < 40 ? null : extensibleFormatTag(fmt);
|
|
93114
|
+
}
|
|
93115
|
+
var EXTENSIBLE_FORMATS;
|
|
93103
93116
|
var init_wavChunks = __esm({
|
|
93104
93117
|
"../engine/src/services/wavChunks.ts"() {
|
|
93105
93118
|
"use strict";
|
|
93119
|
+
EXTENSIBLE_FORMATS = /* @__PURE__ */ new Map([
|
|
93120
|
+
["0100000000001000800000aa00389b71", 1],
|
|
93121
|
+
["0300000000001000800000aa00389b71", 3]
|
|
93122
|
+
]);
|
|
93106
93123
|
}
|
|
93107
93124
|
});
|
|
93108
93125
|
|
|
93109
93126
|
// ../engine/src/services/audioVolumeEnvelope.ts
|
|
93110
93127
|
import { mkdtempSync as mkdtempSync3, readFileSync as readFileSync7, renameSync as renameSync3, rmSync as rmSync5, writeFileSync as writeFileSync5 } from "fs";
|
|
93111
93128
|
import { dirname as dirname10, join as join15 } from "path";
|
|
93112
|
-
function readFmtChunk(buffer, body) {
|
|
93113
|
-
const format = buffer
|
|
93129
|
+
function readFmtChunk(buffer, body, size) {
|
|
93130
|
+
const format = wavFormatTag(buffer, body, size);
|
|
93114
93131
|
const bits = buffer.readUInt16LE(body + 14);
|
|
93115
93132
|
const float = format === FLOAT_FORMAT;
|
|
93116
93133
|
if (!float && format !== PCM_FORMAT) return null;
|
|
@@ -93128,7 +93145,7 @@ function parseWavLayout(buffer) {
|
|
|
93128
93145
|
let data2 = null;
|
|
93129
93146
|
for (const { id, body, size } of riffChunks(buffer)) {
|
|
93130
93147
|
if (id === "fmt " && body + 16 <= buffer.length) {
|
|
93131
|
-
fmt = readFmtChunk(buffer, body);
|
|
93148
|
+
fmt = readFmtChunk(buffer, body, size);
|
|
93132
93149
|
} else if (id === "data") {
|
|
93133
93150
|
data2 = { offset: body, size: Math.min(size, buffer.length - body) };
|
|
93134
93151
|
}
|
|
@@ -93346,7 +93363,9 @@ function readWavChunks(buf) {
|
|
|
93346
93363
|
let data2;
|
|
93347
93364
|
for (const { id, body, size } of riffChunks(buf)) {
|
|
93348
93365
|
if (id === "fmt ") {
|
|
93349
|
-
|
|
93366
|
+
const format = wavFormatTag(buf, body, size);
|
|
93367
|
+
if (format === null) throw new AudioFxRenderError("Invalid or unsupported WAV format header");
|
|
93368
|
+
head.format = format;
|
|
93350
93369
|
head.channels = buf.readUInt16LE(body + 2);
|
|
93351
93370
|
head.sampleRate = buf.readUInt32LE(body + 4);
|
|
93352
93371
|
head.bits = buf.readUInt16LE(body + 14);
|
|
@@ -174171,11 +174190,11 @@ function lintFeedbackComment(input2) {
|
|
|
174171
174190
|
if (!trimmed) return [];
|
|
174172
174191
|
const upperTrimmed = trimmed.toUpperCase();
|
|
174173
174192
|
const warnings = [];
|
|
174174
|
-
if (!
|
|
174193
|
+
if (!hasReproCommandBody(trimmed)) {
|
|
174175
174194
|
warnings.push({
|
|
174176
174195
|
code: "missing-repro-command",
|
|
174177
174196
|
message: [
|
|
174178
|
-
`Comment on a ${rating}/${FEEDBACK_RATING_SCALE} report is missing a "${REPRO_MARKER}" block \u2014`,
|
|
174197
|
+
`Comment on a ${rating}/${FEEDBACK_RATING_SCALE} report is missing a non-empty "${REPRO_MARKER}" block \u2014`,
|
|
174179
174198
|
"maintainers can't rerun the failure from a symptom summary alone.",
|
|
174180
174199
|
"See `references/preview-render.md` \u2192 feedback for the required packet shape."
|
|
174181
174200
|
].join(" ")
|
|
@@ -174194,13 +174213,29 @@ function lintFeedbackComment(input2) {
|
|
|
174194
174213
|
}
|
|
174195
174214
|
return warnings;
|
|
174196
174215
|
}
|
|
174216
|
+
function hasReproCommandBody(comment) {
|
|
174217
|
+
const lines = comment.split(/\r?\n/);
|
|
174218
|
+
return lines.some((line3, index) => {
|
|
174219
|
+
const markerIndex = line3.toUpperCase().indexOf(REPRO_MARKER);
|
|
174220
|
+
if (markerIndex === -1) return false;
|
|
174221
|
+
const inlineBody = line3.slice(markerIndex + REPRO_MARKER.length).trim();
|
|
174222
|
+
if (inlineBody) return !startsWithFeedbackPacketMarker(inlineBody);
|
|
174223
|
+
const nextContentLine = lines.slice(index + 1).find((candidate) => candidate.trim());
|
|
174224
|
+
if (!nextContentLine) return false;
|
|
174225
|
+
return !startsWithFeedbackPacketMarker(nextContentLine.trimStart());
|
|
174226
|
+
});
|
|
174227
|
+
}
|
|
174228
|
+
function startsWithFeedbackPacketMarker(value) {
|
|
174229
|
+
const upperValue = value.toUpperCase();
|
|
174230
|
+
return FEEDBACK_PACKET_MARKERS.some((marker) => upperValue.startsWith(marker));
|
|
174231
|
+
}
|
|
174197
174232
|
function escapeRegex3(input2) {
|
|
174198
174233
|
return input2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
174199
174234
|
}
|
|
174200
174235
|
function mentionsVisualDefect(comment) {
|
|
174201
174236
|
return VISUAL_DEFECT_REGEX.test(comment);
|
|
174202
174237
|
}
|
|
174203
|
-
var VISUAL_DEFECT_KEYWORDS, COMPOSITION_STRUCTURE_RATING_CEILING, REPRO_MARKER, STRUCTURE_MARKER, VISUAL_DEFECT_REGEX;
|
|
174238
|
+
var VISUAL_DEFECT_KEYWORDS, COMPOSITION_STRUCTURE_RATING_CEILING, REPRO_MARKER, STRUCTURE_MARKER, FEEDBACK_PACKET_MARKERS, VISUAL_DEFECT_REGEX;
|
|
174204
174239
|
var init_feedbackLint = __esm({
|
|
174205
174240
|
"src/utils/feedbackLint.ts"() {
|
|
174206
174241
|
"use strict";
|
|
@@ -174216,6 +174251,14 @@ var init_feedbackLint = __esm({
|
|
|
174216
174251
|
COMPOSITION_STRUCTURE_RATING_CEILING = 7;
|
|
174217
174252
|
REPRO_MARKER = "REPRO COMMAND:";
|
|
174218
174253
|
STRUCTURE_MARKER = "COMPOSITION_STRUCTURE:";
|
|
174254
|
+
FEEDBACK_PACKET_MARKERS = [
|
|
174255
|
+
REPRO_MARKER,
|
|
174256
|
+
"EXPECTED / ACTUAL:",
|
|
174257
|
+
"EXACT ERROR:",
|
|
174258
|
+
"OUTCOME:",
|
|
174259
|
+
"WORKAROUND:",
|
|
174260
|
+
STRUCTURE_MARKER
|
|
174261
|
+
];
|
|
174219
174262
|
VISUAL_DEFECT_REGEX = new RegExp(
|
|
174220
174263
|
`(^|[^A-Za-z0-9_])(?:${VISUAL_DEFECT_KEYWORDS.map(escapeRegex3).join("|")})(?![A-Za-z0-9_])`,
|
|
174221
174264
|
"i"
|
package/dist/fontLocalizeCli.js
CHANGED
|
@@ -80176,17 +80176,34 @@ function* riffChunks(buffer) {
|
|
|
80176
80176
|
offset2 += 8 + size + size % 2;
|
|
80177
80177
|
}
|
|
80178
80178
|
}
|
|
80179
|
+
function extensibleFormatTag(fmt) {
|
|
80180
|
+
const extraSize = fmt.readUInt16LE(16);
|
|
80181
|
+
if (extraSize < 22 || 18 + extraSize > fmt.length) return null;
|
|
80182
|
+
return EXTENSIBLE_FORMATS.get(fmt.toString("hex", 24, 40)) ?? null;
|
|
80183
|
+
}
|
|
80184
|
+
function wavFormatTag(buffer, body, size) {
|
|
80185
|
+
const fmt = buffer.subarray(body, body + size);
|
|
80186
|
+
if (fmt.length < 16) return null;
|
|
80187
|
+
const tag = fmt.readUInt16LE(0);
|
|
80188
|
+
if (tag !== 65534) return tag;
|
|
80189
|
+
return fmt.length < 40 ? null : extensibleFormatTag(fmt);
|
|
80190
|
+
}
|
|
80191
|
+
var EXTENSIBLE_FORMATS;
|
|
80179
80192
|
var init_wavChunks = __esm({
|
|
80180
80193
|
"../engine/src/services/wavChunks.ts"() {
|
|
80181
80194
|
"use strict";
|
|
80195
|
+
EXTENSIBLE_FORMATS = /* @__PURE__ */ new Map([
|
|
80196
|
+
["0100000000001000800000aa00389b71", 1],
|
|
80197
|
+
["0300000000001000800000aa00389b71", 3]
|
|
80198
|
+
]);
|
|
80182
80199
|
}
|
|
80183
80200
|
});
|
|
80184
80201
|
|
|
80185
80202
|
// ../engine/src/services/audioVolumeEnvelope.ts
|
|
80186
80203
|
import { mkdtempSync as mkdtempSync3, readFileSync as readFileSync4, renameSync as renameSync2, rmSync as rmSync4, writeFileSync as writeFileSync4 } from "fs";
|
|
80187
80204
|
import { dirname as dirname8, join as join13 } from "path";
|
|
80188
|
-
function readFmtChunk(buffer, body) {
|
|
80189
|
-
const format = buffer
|
|
80205
|
+
function readFmtChunk(buffer, body, size) {
|
|
80206
|
+
const format = wavFormatTag(buffer, body, size);
|
|
80190
80207
|
const bits = buffer.readUInt16LE(body + 14);
|
|
80191
80208
|
const float = format === FLOAT_FORMAT;
|
|
80192
80209
|
if (!float && format !== PCM_FORMAT) return null;
|
|
@@ -80204,7 +80221,7 @@ function parseWavLayout(buffer) {
|
|
|
80204
80221
|
let data2 = null;
|
|
80205
80222
|
for (const { id, body, size } of riffChunks(buffer)) {
|
|
80206
80223
|
if (id === "fmt " && body + 16 <= buffer.length) {
|
|
80207
|
-
fmt = readFmtChunk(buffer, body);
|
|
80224
|
+
fmt = readFmtChunk(buffer, body, size);
|
|
80208
80225
|
} else if (id === "data") {
|
|
80209
80226
|
data2 = { offset: body, size: Math.min(size, buffer.length - body) };
|
|
80210
80227
|
}
|
|
@@ -80367,7 +80384,9 @@ function readWavChunks(buf) {
|
|
|
80367
80384
|
let data2;
|
|
80368
80385
|
for (const { id, body, size } of riffChunks(buf)) {
|
|
80369
80386
|
if (id === "fmt ") {
|
|
80370
|
-
|
|
80387
|
+
const format = wavFormatTag(buf, body, size);
|
|
80388
|
+
if (format === null) throw new AudioFxRenderError("Invalid or unsupported WAV format header");
|
|
80389
|
+
head.format = format;
|
|
80371
80390
|
head.channels = buf.readUInt16LE(body + 2);
|
|
80372
80391
|
head.sampleRate = buf.readUInt32LE(body + 4);
|
|
80373
80392
|
head.bits = buf.readUInt16LE(body + 14);
|
|
@@ -102729,8 +102748,8 @@ async function runFontLocalize(io, localize) {
|
|
|
102729
102748
|
}
|
|
102730
102749
|
|
|
102731
102750
|
// src/version.ts
|
|
102732
|
-
var VERSION = true ? "0.8.
|
|
102733
|
-
var PRODUCER_VERSION = true ? "0.8.
|
|
102751
|
+
var VERSION = true ? "0.8.60" : "0.0.0-dev";
|
|
102752
|
+
var PRODUCER_VERSION = true ? "0.8.60" : "0.0.0-dev";
|
|
102734
102753
|
|
|
102735
102754
|
// src/fontLocalizeCli.ts
|
|
102736
102755
|
async function readStdin() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var HyperframesPlayer=(()=>{var Ee=Object.defineProperty;var pn=Object.getOwnPropertyDescriptor;var fn=Object.getOwnPropertyNames;var hn=Object.prototype.hasOwnProperty;var bn=(n,e)=>{for(var t in e)Ee(n,t,{get:e[t],enumerable:!0})},gn=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of fn(e))!hn.call(n,r)&&r!==t&&Ee(n,r,{get:()=>e[r],enumerable:!(i=pn(e,r))||i.enumerable});return n};var _n=n=>gn(Ee({},"__esModule",{value:!0}),n);var Yi={};bn(Yi,{HyperframesPlayer:()=>Ae,SPEED_PRESETS:()=>xe,formatSpeed:()=>G,formatTime:()=>ie});function dt(n){return n.hasRuntime||n.runtimeInjected?!1:!!(n.hasNestedCompositions||n.hasTimelines&&n.attempts>=5)}function H(n){return typeof n=="object"&&n!==null}function ct(n){return H(n)&&typeof n.getDuration=="function"}function mt(n){return H(n)&&typeof n.duration=="function"&&typeof n.time=="function"&&typeof n.seek=="function"&&typeof n.play=="function"&&typeof n.pause=="function"}var L="https://cdn.jsdelivr.net/npm/@hyperframes/core@0.8.
|
|
1
|
+
"use strict";var HyperframesPlayer=(()=>{var Ee=Object.defineProperty;var pn=Object.getOwnPropertyDescriptor;var fn=Object.getOwnPropertyNames;var hn=Object.prototype.hasOwnProperty;var bn=(n,e)=>{for(var t in e)Ee(n,t,{get:e[t],enumerable:!0})},gn=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of fn(e))!hn.call(n,r)&&r!==t&&Ee(n,r,{get:()=>e[r],enumerable:!(i=pn(e,r))||i.enumerable});return n};var _n=n=>gn(Ee({},"__esModule",{value:!0}),n);var Yi={};bn(Yi,{HyperframesPlayer:()=>Ae,SPEED_PRESETS:()=>xe,formatSpeed:()=>G,formatTime:()=>ie});function dt(n){return n.hasRuntime||n.runtimeInjected?!1:!!(n.hasNestedCompositions||n.hasTimelines&&n.attempts>=5)}function H(n){return typeof n=="object"&&n!==null}function ct(n){return H(n)&&typeof n.getDuration=="function"}function mt(n){return H(n)&&typeof n.duration=="function"&&typeof n.time=="function"&&typeof n.seek=="function"&&typeof n.play=="function"&&typeof n.pause=="function"}var L="https://cdn.jsdelivr.net/npm/@hyperframes/core@0.8.60/dist/hyperframe.runtime.iife.js";function V(n){if(n===null)return null;let e=Number.parseInt(n,10);return Number.isFinite(e)&&e>0?e:null}function yn(n){let e=n?.querySelector("[data-composition-id][data-width][data-height]")??n?.querySelector("[data-width][data-height]");if(!e)return null;let t=V(e.getAttribute("data-width")),i=V(e.getAttribute("data-height"));return t!==null&&i!==null?{width:t,height:i}:null}var ne=class{constructor(e,t){this._iframe=e;this._callbacks=t}_iframe;_callbacks;_interval=null;_runtimeInjected=!1;get runtimeInjected(){return this._runtimeInjected}start(){this.stop(),this._runtimeInjected=!1;let e=0;this._interval=setInterval(()=>{e++;try{let t=this._iframe.contentWindow;if(!t)return;let i=!!(t.__hf||t.__player),r=!!(t.__timelines&&Object.keys(t.__timelines).length>0),o=!!this._iframe.contentDocument?.querySelector("[data-composition-src]");if(dt({hasRuntime:i,hasTimelines:r,hasNestedCompositions:o,runtimeInjected:this._runtimeInjected,attempts:e})){this._injectRuntime();return}if(this._runtimeInjected&&!i)return;let a=this._resolvePlaybackDurationAdapter(t);if(a&&a.getDuration()>0){this.stop();let s=yn(this._iframe.contentDocument);this._callbacks.onReady({duration:a.getDuration(),adapter:a,compositionSize:s});return}}catch{}e>=40&&(this.stop(),this._callbacks.onError("Composition timeline not found after 8s"))},200)}stop(){this._interval!==null&&(clearInterval(this._interval),this._interval=null)}resolveDirectTimelineAdapter(){try{let e=this._iframe.contentWindow;return e?this._resolveDirectTimelineAdapterFromWindow(e):null}catch{return null}}resolveDirectTimelineAdapterFromWindow(e){return this._resolveDirectTimelineAdapterFromWindow(e)}hasRuntimeBridge(e){return Reflect.get(e,"__hf")!==void 0||H(Reflect.get(e,"__player"))}_injectRuntime(){this._runtimeInjected=!0;try{let e=this._iframe.contentDocument;if(!e)return;let t=e.createElement("script");t.src=L,(e.head||e.documentElement).appendChild(t),this._callbacks.onRuntimeInjected?.()}catch{}}_resolveDirectTimelineAdapterFromWindow(e){if(this.hasRuntimeBridge(e))return null;let t=Reflect.get(e,"__timelines");if(!H(t))return null;let i=Object.keys(t);if(i.length===0)return null;let r=this._iframe.contentDocument?.querySelector("[data-composition-id]")?.getAttribute("data-composition-id"),o=r&&r in t?r:i[i.length-1],a=t[o];return mt(a)?a:null}_resolvePlaybackDurationAdapter(e){let t=Reflect.get(e,"__player");if(ct(t))return{kind:"runtime",getDuration:()=>t.getDuration()};let i=this._resolveDirectTimelineAdapterFromWindow(e);return i?{kind:"direct-timeline",timeline:i,getDuration:()=>i.duration()}:null}};var pt=`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
position: relative;
|
package/dist/studio/assets/{hyperframes-player-BBub3ZdI.js → hyperframes-player-Di7GyCOP.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var we=Object.defineProperty;var Ae=(s,i,e)=>i in s?we(s,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[i]=e;var h=(s,i,e)=>Ae(s,typeof i!="symbol"?i+"":i,e);import{r as he,i as Ee,a as w,b as ue,c as Ce,d as Te,s as Re,e as Se,F as Le}from"./index-
|
|
1
|
+
var we=Object.defineProperty;var Ae=(s,i,e)=>i in s?we(s,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[i]=e;var h=(s,i,e)=>Ae(s,typeof i!="symbol"?i+"":i,e);import{r as he,i as Ee,a as w,b as ue,c as Ce,d as Te,s as Re,e as Se,F as Le}from"./index-Dpq2lkOm.js";function xe(s){return s.hasRuntime||s.runtimeInjected?!1:!!(s.hasNestedCompositions||s.hasTimelines&&s.attempts>=5)}function $(s){return typeof s=="object"&&s!==null}function Me(s){return $(s)&&typeof s.getDuration=="function"}function De(s){return $(s)&&typeof s.duration=="function"&&typeof s.time=="function"&&typeof s.seek=="function"&&typeof s.play=="function"&&typeof s.pause=="function"}function Pe(s){if(!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(s))throw new Error(`Invalid HyperFrames runtime version: ${s}`);return`https://cdn.jsdelivr.net/npm/@hyperframes/core@${s}/dist/hyperframe.runtime.iife.js`}const H=typeof __HYPERFRAMES_RUNTIME_CDN_URL__=="string"?__HYPERFRAMES_RUNTIME_CDN_URL__:Pe("0.0.0-dev");function V(s){if(s===null)return null;const i=Number.parseInt(s,10);return Number.isFinite(i)&&i>0?i:null}function ke(s){const i=(s==null?void 0:s.querySelector("[data-composition-id][data-width][data-height]"))??(s==null?void 0:s.querySelector("[data-width][data-height]"));if(!i)return null;const e=V(i.getAttribute("data-width")),t=V(i.getAttribute("data-height"));return e!==null&&t!==null?{width:e,height:t}:null}class Ie{constructor(i,e){h(this,"_interval",null);h(this,"_runtimeInjected",!1);this._iframe=i,this._callbacks=e}get runtimeInjected(){return this._runtimeInjected}start(){this.stop(),this._runtimeInjected=!1;let i=0;this._interval=setInterval(()=>{var e;i++;try{const t=this._iframe.contentWindow;if(!t)return;const r=!!(t.__hf||t.__player),n=!!(t.__timelines&&Object.keys(t.__timelines).length>0),a=!!((e=this._iframe.contentDocument)!=null&&e.querySelector("[data-composition-src]"));if(xe({hasRuntime:r,hasTimelines:n,hasNestedCompositions:a,runtimeInjected:this._runtimeInjected,attempts:i})){this._injectRuntime();return}if(this._runtimeInjected&&!r)return;const d=this._resolvePlaybackDurationAdapter(t);if(d&&d.getDuration()>0){this.stop();const c=ke(this._iframe.contentDocument);this._callbacks.onReady({duration:d.getDuration(),adapter:d,compositionSize:c});return}}catch{}i>=40&&(this.stop(),this._callbacks.onError("Composition timeline not found after 8s"))},200)}stop(){this._interval!==null&&(clearInterval(this._interval),this._interval=null)}resolveDirectTimelineAdapter(){try{const i=this._iframe.contentWindow;return i?this._resolveDirectTimelineAdapterFromWindow(i):null}catch{return null}}resolveDirectTimelineAdapterFromWindow(i){return this._resolveDirectTimelineAdapterFromWindow(i)}hasRuntimeBridge(i){return Reflect.get(i,"__hf")!==void 0||$(Reflect.get(i,"__player"))}_injectRuntime(){var i,e;this._runtimeInjected=!0;try{const t=this._iframe.contentDocument;if(!t)return;const r=t.createElement("script");r.src=H,(t.head||t.documentElement).appendChild(r),(e=(i=this._callbacks).onRuntimeInjected)==null||e.call(i)}catch{}}_resolveDirectTimelineAdapterFromWindow(i){var d,c;if(this.hasRuntimeBridge(i))return null;const e=Reflect.get(i,"__timelines");if(!$(e))return null;const t=Object.keys(e);if(t.length===0)return null;const r=(c=(d=this._iframe.contentDocument)==null?void 0:d.querySelector("[data-composition-id]"))==null?void 0:c.getAttribute("data-composition-id"),n=r&&r in e?r:t[t.length-1],a=e[n];return De(a)?a:null}_resolvePlaybackDurationAdapter(i){const e=Reflect.get(i,"__player");if(Me(e))return{kind:"runtime",getDuration:()=>e.getDuration()};const t=this._resolveDirectTimelineAdapterFromWindow(i);return t?{kind:"direct-timeline",timeline:t,getDuration:()=>t.duration()}:null}}const Oe=`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
position: relative;
|