hyperframes 0.8.51 → 0.8.53-desktop.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +920 -819
- package/dist/fontLocalizeCli.js +69 -23
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/renderSetupWorker.js +51 -15
- package/dist/studio/assets/{hyperframes-player-Cn_PpHqP.js → hyperframes-player-PTEnAHhg.js} +1 -1
- package/dist/studio/assets/{index-CPS3Cvj8.js → index--myXp8ui.js} +1 -1
- package/dist/studio/assets/{index-Clrb11lj.js → index-BjslOS9g.js} +1 -1
- package/dist/studio/assets/index-BnXZuIJD.css +1 -0
- package/dist/studio/assets/index-CNyviK_l.js +390 -0
- package/dist/studio/index.css +29 -0
- package/dist/studio/index.css.map +1 -0
- package/dist/studio/index.d.ts +808 -12
- package/dist/studio/index.html +2 -2
- package/dist/studio/index.js +8109 -7583
- package/dist/studio/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/studio/assets/index-C05SNrvY.js +0 -360
- package/dist/studio/assets/index-DUR9qzQM.css +0 -1
package/dist/fontLocalizeCli.js
CHANGED
|
@@ -29507,9 +29507,9 @@ var require_main2 = __commonJS({
|
|
|
29507
29507
|
}
|
|
29508
29508
|
});
|
|
29509
29509
|
|
|
29510
|
-
// ../../node_modules/.bun/@babel+parser@7.29.
|
|
29510
|
+
// ../../node_modules/.bun/@babel+parser@7.29.9/node_modules/@babel/parser/lib/index.js
|
|
29511
29511
|
var require_lib2 = __commonJS({
|
|
29512
|
-
"../../node_modules/.bun/@babel+parser@7.29.
|
|
29512
|
+
"../../node_modules/.bun/@babel+parser@7.29.9/node_modules/@babel/parser/lib/index.js"(exports) {
|
|
29513
29513
|
"use strict";
|
|
29514
29514
|
Object.defineProperty(exports, "__esModule", {
|
|
29515
29515
|
value: true
|
|
@@ -29751,6 +29751,7 @@ var require_lib2 = __commonJS({
|
|
|
29751
29751
|
SloppyFunctionAnnexB: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",
|
|
29752
29752
|
SourcePhaseImportRequiresDefault: 'Only `import source x from "./module"` is valid.',
|
|
29753
29753
|
StaticPrototype: "Classes may not have static property named prototype.",
|
|
29754
|
+
SuperCallNotNewExpression: "Cannot use new with super(...).",
|
|
29754
29755
|
SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",
|
|
29755
29756
|
SuperPrivateField: "Private fields can't be accessed on super.",
|
|
29756
29757
|
TrailingDecorator: "Decorators must be attached to a class element.",
|
|
@@ -29780,7 +29781,6 @@ var require_lib2 = __commonJS({
|
|
|
29780
29781
|
UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",
|
|
29781
29782
|
UnexpectedUsingDeclaration: "Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",
|
|
29782
29783
|
UnexpectedVoidPattern: "Unexpected void binding.",
|
|
29783
|
-
UnsupportedBind: "Binding should be performed on object property.",
|
|
29784
29784
|
UnsupportedDecoratorExport: "A decorated export must export a class declaration.",
|
|
29785
29785
|
UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.",
|
|
29786
29786
|
UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.",
|
|
@@ -29848,6 +29848,10 @@ var require_lib2 = __commonJS({
|
|
|
29848
29848
|
PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.",
|
|
29849
29849
|
PrimaryTopicRequiresSmartPipeline: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'
|
|
29850
29850
|
});
|
|
29851
|
+
var FunctionBindErrors = {
|
|
29852
|
+
UnsupportedBind: "Binding should be performed on object property.",
|
|
29853
|
+
UnsupportedBindRHS: "The right-hand side of binding can not be super or import."
|
|
29854
|
+
};
|
|
29851
29855
|
var _excluded = ["message"];
|
|
29852
29856
|
function defineHidden(obj, key2, value) {
|
|
29853
29857
|
Object.defineProperty(obj, key2, {
|
|
@@ -29936,7 +29940,7 @@ var require_lib2 = __commonJS({
|
|
|
29936
29940
|
}
|
|
29937
29941
|
return ParseErrorConstructors;
|
|
29938
29942
|
}
|
|
29939
|
-
var Errors = Object.assign({}, ParseErrorEnum(ModuleErrors), ParseErrorEnum(StandardErrors), ParseErrorEnum(StrictModeErrors), ParseErrorEnum(ParseExpressionErrors), ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors));
|
|
29943
|
+
var Errors = Object.assign({}, ParseErrorEnum(ModuleErrors), ParseErrorEnum(StandardErrors), ParseErrorEnum(StrictModeErrors), ParseErrorEnum(ParseExpressionErrors), ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors), ParseErrorEnum`functionBind`(FunctionBindErrors));
|
|
29940
29944
|
function createDefaultOptions() {
|
|
29941
29945
|
return {
|
|
29942
29946
|
sourceType: "script",
|
|
@@ -32557,13 +32561,15 @@ var require_lib2 = __commonJS({
|
|
|
32557
32561
|
const arrows = [];
|
|
32558
32562
|
while (stack.length !== 0) {
|
|
32559
32563
|
const node2 = stack.pop();
|
|
32560
|
-
if (node2.type === "ArrowFunctionExpression"
|
|
32564
|
+
if (node2.type === "ArrowFunctionExpression") {
|
|
32561
32565
|
if (node2.typeParameters || !node2.returnType) {
|
|
32562
32566
|
this.finishArrowValidation(node2);
|
|
32563
32567
|
} else {
|
|
32564
32568
|
arrows.push(node2);
|
|
32565
32569
|
}
|
|
32566
|
-
|
|
32570
|
+
if (node2.body.type !== "BlockStatement") {
|
|
32571
|
+
stack.push(node2.body);
|
|
32572
|
+
}
|
|
32567
32573
|
} else if (node2.type === "ConditionalExpression") {
|
|
32568
32574
|
stack.push(node2.consequent);
|
|
32569
32575
|
stack.push(node2.alternate);
|
|
@@ -39719,8 +39725,11 @@ var require_lib2 = __commonJS({
|
|
|
39719
39725
|
}
|
|
39720
39726
|
}
|
|
39721
39727
|
fillOptionalPropertiesForTSESLint(node) {
|
|
39722
|
-
var _node$directive, _node$decorators, _node$optional, _node$typeAnnotation, _node$accessibility, _node$decorators2, _node$override, _node$readonly, _node$static, _node$declare, _node$returnType, _node$typeParameters, _node$optional2, _node$optional3, _node$accessibility2, _node$readonly2, _node$static2, _node$declare2, _node$definite, _node$readonly3, _node$typeAnnotation2, _node$accessibility3, _node$decorators3, _node$override2, _node$optional4, _node$id, _node$abstract, _node$declare3, _node$decorators4, _node$implements, _node$superTypeArgume, _node$typeParameters2, _node$declare4, _node$definite2, _node$const, _node$declare5, _node$computed, _node$qualifier, _node$options, _node$declare6, _node$extends, _node$optional5, _node$readonly4, _node$declare7, _node$global, _node$const2, _node$in, _node$out;
|
|
39728
|
+
var _node$phase, _node$directive, _node$decorators, _node$optional, _node$typeAnnotation, _node$accessibility, _node$decorators2, _node$override, _node$readonly, _node$static, _node$declare, _node$returnType, _node$typeParameters, _node$optional2, _node$optional3, _node$accessibility2, _node$readonly2, _node$static2, _node$declare2, _node$definite, _node$readonly3, _node$typeAnnotation2, _node$accessibility3, _node$decorators3, _node$override2, _node$optional4, _node$id, _node$abstract, _node$declare3, _node$decorators4, _node$implements, _node$superTypeArgume, _node$typeParameters2, _node$declare4, _node$definite2, _node$const, _node$declare5, _node$computed, _node$qualifier, _node$options, _node$declare6, _node$extends, _node$optional5, _node$readonly4, _node$declare7, _node$global, _node$const2, _node$in, _node$out;
|
|
39723
39729
|
switch (node.type) {
|
|
39730
|
+
case "ImportDeclaration":
|
|
39731
|
+
(_node$phase = node.phase) != null ? _node$phase : node.phase = null;
|
|
39732
|
+
return;
|
|
39724
39733
|
case "ExpressionStatement":
|
|
39725
39734
|
(_node$directive = node.directive) != null ? _node$directive : node.directive = void 0;
|
|
39726
39735
|
return;
|
|
@@ -40617,7 +40626,7 @@ var require_lib2 = __commonJS({
|
|
|
40617
40626
|
type
|
|
40618
40627
|
} = this.state;
|
|
40619
40628
|
if (!noCalls && type === 15) {
|
|
40620
|
-
return this.parseBind(base2, startLoc,
|
|
40629
|
+
return this.parseBind(base2, startLoc, state);
|
|
40621
40630
|
} else if (tokenIsTemplate(type)) {
|
|
40622
40631
|
return this.parseTaggedTemplateExpression(base2, startLoc, state);
|
|
40623
40632
|
}
|
|
@@ -40670,13 +40679,18 @@ var require_lib2 = __commonJS({
|
|
|
40670
40679
|
return this.finishNode(node, "MemberExpression");
|
|
40671
40680
|
}
|
|
40672
40681
|
}
|
|
40673
|
-
parseBind(base2, startLoc,
|
|
40682
|
+
parseBind(base2, startLoc, state) {
|
|
40674
40683
|
const node = this.startNodeAt(startLoc);
|
|
40675
40684
|
node.object = base2;
|
|
40676
40685
|
this.next();
|
|
40677
|
-
|
|
40686
|
+
const isImport = this.match(83);
|
|
40687
|
+
const callee = this.parseNoCallExpr();
|
|
40688
|
+
if (callee.type === "Super" || isImport && callee.type === "ImportExpression" || callee.type === "Import") {
|
|
40689
|
+
throw this.raise(Errors.UnsupportedBindRHS, callee);
|
|
40690
|
+
}
|
|
40691
|
+
node.callee = callee;
|
|
40678
40692
|
state.stop = true;
|
|
40679
|
-
return this.parseSubscripts(this.finishNode(node, "BindExpression"), startLoc,
|
|
40693
|
+
return this.parseSubscripts(this.finishNode(node, "BindExpression"), startLoc, false);
|
|
40680
40694
|
}
|
|
40681
40695
|
parseCoverCallAndAsyncArrowHead(base2, startLoc, state, optional) {
|
|
40682
40696
|
const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
|
|
@@ -41259,9 +41273,12 @@ var require_lib2 = __commonJS({
|
|
|
41259
41273
|
const isImport = this.match(83);
|
|
41260
41274
|
const callee = this.parseNoCallExpr();
|
|
41261
41275
|
node.callee = callee;
|
|
41262
|
-
if (isImport &&
|
|
41276
|
+
if (isImport && callee.type === "ImportExpression" || callee.type === "Import") {
|
|
41263
41277
|
this.raise(Errors.ImportCallNotNewExpression, callee);
|
|
41264
41278
|
}
|
|
41279
|
+
if (callee.type === "Super") {
|
|
41280
|
+
this.raise(Errors.SuperCallNotNewExpression, callee);
|
|
41281
|
+
}
|
|
41265
41282
|
}
|
|
41266
41283
|
parseTemplateElement(isTagged) {
|
|
41267
41284
|
const {
|
|
@@ -54482,6 +54499,25 @@ var init_audioGroups = __esm({
|
|
|
54482
54499
|
}
|
|
54483
54500
|
});
|
|
54484
54501
|
|
|
54502
|
+
// ../engine/src/services/chromeHostCeiling.ts
|
|
54503
|
+
import { release } from "os";
|
|
54504
|
+
function chromeMajorCeiling(hostPlatform = process.platform, hostRelease = release()) {
|
|
54505
|
+
if (hostPlatform !== "darwin") return void 0;
|
|
54506
|
+
return Number.parseInt(hostRelease, 10) < 22 ? MACOS_12_LAST_CHROME_MAJOR : void 0;
|
|
54507
|
+
}
|
|
54508
|
+
function exceedsChromeCeiling(versionName, ceiling) {
|
|
54509
|
+
if (ceiling === void 0) return false;
|
|
54510
|
+
const major = Number.parseInt(versionName.slice(versionName.indexOf("-") + 1), 10);
|
|
54511
|
+
return major > ceiling;
|
|
54512
|
+
}
|
|
54513
|
+
var MACOS_12_LAST_CHROME_MAJOR;
|
|
54514
|
+
var init_chromeHostCeiling = __esm({
|
|
54515
|
+
"../engine/src/services/chromeHostCeiling.ts"() {
|
|
54516
|
+
"use strict";
|
|
54517
|
+
MACOS_12_LAST_CHROME_MAJOR = 150;
|
|
54518
|
+
}
|
|
54519
|
+
});
|
|
54520
|
+
|
|
54485
54521
|
// ../engine/src/services/systemMemory.ts
|
|
54486
54522
|
import { readFileSync } from "fs";
|
|
54487
54523
|
import { totalmem } from "os";
|
|
@@ -54765,11 +54801,13 @@ function isDrawElementPlatform(platform3) {
|
|
|
54765
54801
|
function resolveDefaultDrawElement(args) {
|
|
54766
54802
|
if (!args.useDrawElement) return false;
|
|
54767
54803
|
if (args.explicitOptIn) return true;
|
|
54804
|
+
if (args.chromeCeiling !== void 0) return false;
|
|
54768
54805
|
if (!isDrawElementPlatform(args.platform) || args.browserGpuMode === "software") return false;
|
|
54769
54806
|
return args.workerEncode;
|
|
54770
54807
|
}
|
|
54771
54808
|
function explainDrawElementDisabled(args) {
|
|
54772
54809
|
if (!isDrawElementPlatform(args.platform)) return "unsupported_platform";
|
|
54810
|
+
if (args.chromeCeiling !== void 0) return "old_chrome";
|
|
54773
54811
|
if (args.browserGpuMode === "software") return "software_gpu";
|
|
54774
54812
|
if (!args.workerEncode) return "worker_encode_off";
|
|
54775
54813
|
return "disabled";
|
|
@@ -54911,7 +54949,8 @@ function resolveConfig(overrides) {
|
|
|
54911
54949
|
explicitOptIn: explicitDrawElementOptIn,
|
|
54912
54950
|
platform: process.platform,
|
|
54913
54951
|
browserGpuMode: merged.browserGpuMode,
|
|
54914
|
-
workerEncode: merged.enableDrawElementWorkerEncode
|
|
54952
|
+
workerEncode: merged.enableDrawElementWorkerEncode,
|
|
54953
|
+
chromeCeiling: chromeMajorCeiling()
|
|
54915
54954
|
});
|
|
54916
54955
|
const explicitForceScreenshotOptOut = env("PRODUCER_FORCE_SCREENSHOT") === "false" || overrides?.forceScreenshot === false;
|
|
54917
54956
|
if (explicitForceScreenshotOptOut) {
|
|
@@ -54960,6 +54999,7 @@ var DEFAULT_CONFIG, OPTIONAL_ENGINE_CONFIG_FIELDS, BOOLEAN_ENGINE_CONFIG_FIELDS,
|
|
|
54960
54999
|
var init_config = __esm({
|
|
54961
55000
|
"../engine/src/config.ts"() {
|
|
54962
55001
|
"use strict";
|
|
55002
|
+
init_chromeHostCeiling();
|
|
54963
55003
|
init_systemMemory();
|
|
54964
55004
|
init_vp9Options();
|
|
54965
55005
|
DEFAULT_CONFIG = {
|
|
@@ -55347,8 +55387,10 @@ function findCachedHeadlessShell(baseDir) {
|
|
|
55347
55387
|
const executable = cachedHeadlessShellExecutable();
|
|
55348
55388
|
if (!executable) return void 0;
|
|
55349
55389
|
try {
|
|
55390
|
+
const ceiling = chromeMajorCeiling();
|
|
55350
55391
|
const versions = readdirSync(baseDir).sort(compareBrowserVersionsDescending);
|
|
55351
55392
|
for (const version2 of versions) {
|
|
55393
|
+
if (exceedsChromeCeiling(version2, ceiling)) continue;
|
|
55352
55394
|
const binary = join4(baseDir, version2, ...executable);
|
|
55353
55395
|
if (existsSync2(binary)) return binary;
|
|
55354
55396
|
}
|
|
@@ -55840,6 +55882,7 @@ var _puppeteer, CACHED_HEADLESS_SHELL_EXECUTABLES, ENABLE_BROWSER_POOL, BEGINFRA
|
|
|
55840
55882
|
var init_browserManager = __esm({
|
|
55841
55883
|
"../engine/src/services/browserManager.ts"() {
|
|
55842
55884
|
"use strict";
|
|
55885
|
+
init_chromeHostCeiling();
|
|
55843
55886
|
init_config();
|
|
55844
55887
|
init_systemMemory();
|
|
55845
55888
|
init_browserLeasePool();
|
|
@@ -59504,7 +59547,7 @@ async function initDrawElementOrTransparentBackground(session, page, logInitPhas
|
|
|
59504
59547
|
session.deGateReason = "unsupported_chrome";
|
|
59505
59548
|
session.deFallbackTrigger = "unsupported_chrome";
|
|
59506
59549
|
console.log(
|
|
59507
|
-
`[engine] fast capture: falling back to ${session.launchCaptureMode} capture \u2014 this Chrome build does not implement canvas.drawElementImage (Dev/Canary-only feature
|
|
59550
|
+
`[engine] fast capture: falling back to ${session.launchCaptureMode} capture \u2014 this Chrome build does not implement canvas.drawElementImage (Dev/Canary-only feature); run \`hyperframes browser ensure --force\` to fetch a supported build, or set HYPERFRAMES_BROWSER_PATH to one.`
|
|
59508
59551
|
);
|
|
59509
59552
|
await routeToFallback();
|
|
59510
59553
|
return;
|
|
@@ -83547,6 +83590,7 @@ __export(src_exports, {
|
|
|
83547
83590
|
captureFramesBatchPipelined: () => captureFramesBatchPipelined,
|
|
83548
83591
|
captureScreenshotWithAlpha: () => captureScreenshotWithAlpha,
|
|
83549
83592
|
cdpSessionCache: () => cdpSessionCache,
|
|
83593
|
+
chromeMajorCeiling: () => chromeMajorCeiling,
|
|
83550
83594
|
classifyCaptureFailure: () => classifyCaptureFailure,
|
|
83551
83595
|
classifyVideoExtractionError: () => classifyVideoExtractionError,
|
|
83552
83596
|
cloneCaptureWarning: () => cloneCaptureWarning,
|
|
@@ -83699,6 +83743,7 @@ var init_src = __esm({
|
|
|
83699
83743
|
init_config();
|
|
83700
83744
|
init_vp9Options();
|
|
83701
83745
|
init_systemMemory();
|
|
83746
|
+
init_chromeHostCeiling();
|
|
83702
83747
|
init_browserManager();
|
|
83703
83748
|
init_protocolTimeoutErrorHint();
|
|
83704
83749
|
init_pageNavigationTimeoutErrorHint();
|
|
@@ -93851,11 +93896,11 @@ var Semaphore = class {
|
|
|
93851
93896
|
var MEDIA_PROBE_CONCURRENCY = 4;
|
|
93852
93897
|
var sharedMediaProbeSemaphore = new Semaphore(MEDIA_PROBE_CONCURRENCY);
|
|
93853
93898
|
async function withMediaProbeSlot(operation) {
|
|
93854
|
-
const
|
|
93899
|
+
const release2 = await sharedMediaProbeSemaphore.acquire();
|
|
93855
93900
|
try {
|
|
93856
93901
|
return await operation();
|
|
93857
93902
|
} finally {
|
|
93858
|
-
|
|
93903
|
+
release2();
|
|
93859
93904
|
}
|
|
93860
93905
|
}
|
|
93861
93906
|
|
|
@@ -99792,7 +99837,8 @@ async function executeRenderPipeline(input) {
|
|
|
99792
99837
|
let deClampReason = cfg.useDrawElement ? void 0 : explainDrawElementDisabled({
|
|
99793
99838
|
platform: process.platform,
|
|
99794
99839
|
browserGpuMode: cfg.browserGpuMode,
|
|
99795
|
-
workerEncode: cfg.enableDrawElementWorkerEncode
|
|
99840
|
+
workerEncode: cfg.enableDrawElementWorkerEncode,
|
|
99841
|
+
chromeCeiling: chromeMajorCeiling()
|
|
99796
99842
|
});
|
|
99797
99843
|
let deWorkerInversion;
|
|
99798
99844
|
let deParallelStreamForced = false;
|
|
@@ -102207,7 +102253,7 @@ function createRenderHandlers(options = {}) {
|
|
|
102207
102253
|
rendersDir,
|
|
102208
102254
|
log
|
|
102209
102255
|
);
|
|
102210
|
-
const
|
|
102256
|
+
const release2 = await renderSemaphore.acquire();
|
|
102211
102257
|
log.info("render started", {
|
|
102212
102258
|
requestId,
|
|
102213
102259
|
projectDir: input.projectDir,
|
|
@@ -102271,7 +102317,7 @@ function createRenderHandlers(options = {}) {
|
|
|
102271
102317
|
500
|
|
102272
102318
|
);
|
|
102273
102319
|
} finally {
|
|
102274
|
-
|
|
102320
|
+
release2();
|
|
102275
102321
|
cleanupTempDir(cleanupProjectDir, log);
|
|
102276
102322
|
}
|
|
102277
102323
|
};
|
|
@@ -102300,7 +102346,7 @@ function createRenderHandlers(options = {}) {
|
|
|
102300
102346
|
})
|
|
102301
102347
|
});
|
|
102302
102348
|
}
|
|
102303
|
-
const
|
|
102349
|
+
const release2 = await renderSemaphore.acquire();
|
|
102304
102350
|
try {
|
|
102305
102351
|
await executeRenderJob(
|
|
102306
102352
|
job,
|
|
@@ -102337,7 +102383,7 @@ function createRenderHandlers(options = {}) {
|
|
|
102337
102383
|
log
|
|
102338
102384
|
});
|
|
102339
102385
|
} finally {
|
|
102340
|
-
|
|
102386
|
+
release2();
|
|
102341
102387
|
c.req.raw.signal.removeEventListener("abort", onRequestAbort);
|
|
102342
102388
|
cleanupTempDir(cleanupProjectDir, log);
|
|
102343
102389
|
}
|
|
@@ -102622,8 +102668,8 @@ async function runFontLocalize(io, localize) {
|
|
|
102622
102668
|
}
|
|
102623
102669
|
|
|
102624
102670
|
// src/version.ts
|
|
102625
|
-
var VERSION = true ? "0.8.
|
|
102626
|
-
var PRODUCER_VERSION = true ? "0.8.
|
|
102671
|
+
var VERSION = true ? "0.8.53-desktop.0" : "0.0.0-dev";
|
|
102672
|
+
var PRODUCER_VERSION = true ? "0.8.53-desktop.0" : "0.0.0-dev";
|
|
102627
102673
|
|
|
102628
102674
|
// src/fontLocalizeCli.ts
|
|
102629
102675
|
async function readStdin() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var HyperframesPlayer=(()=>{var ee=Object.defineProperty;var st=Object.getOwnPropertyDescriptor;var at=Object.getOwnPropertyNames;var dt=Object.prototype.hasOwnProperty;var lt=(r,e)=>{for(var t in e)ee(r,t,{get:e[t],enumerable:!0})},ut=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of at(e))!dt.call(r,n)&&n!==t&&ee(r,n,{get:()=>e[n],enumerable:!(i=st(e,n))||i.enumerable});return r};var ct=r=>ut(ee({},"__esModule",{value:!0}),r);var ei={};lt(ei,{HyperframesPlayer:()=>K,SPEED_PRESETS:()=>re,formatSpeed:()=>N,formatTime:()=>G});function ke(r){return r.hasRuntime||r.runtimeInjected?!1:!!(r.hasNestedCompositions||r.hasTimelines&&r.attempts>=5)}function P(r){return typeof r=="object"&&r!==null}function xe(r){return P(r)&&typeof r.getDuration=="function"}function Me(r){return P(r)&&typeof r.duration=="function"&&typeof r.time=="function"&&typeof r.seek=="function"&&typeof r.play=="function"&&typeof r.pause=="function"}var k="https://cdn.jsdelivr.net/npm/@hyperframes/core@0.8.
|
|
1
|
+
"use strict";var HyperframesPlayer=(()=>{var ee=Object.defineProperty;var st=Object.getOwnPropertyDescriptor;var at=Object.getOwnPropertyNames;var dt=Object.prototype.hasOwnProperty;var lt=(r,e)=>{for(var t in e)ee(r,t,{get:e[t],enumerable:!0})},ut=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of at(e))!dt.call(r,n)&&n!==t&&ee(r,n,{get:()=>e[n],enumerable:!(i=st(e,n))||i.enumerable});return r};var ct=r=>ut(ee({},"__esModule",{value:!0}),r);var ei={};lt(ei,{HyperframesPlayer:()=>K,SPEED_PRESETS:()=>re,formatSpeed:()=>N,formatTime:()=>G});function ke(r){return r.hasRuntime||r.runtimeInjected?!1:!!(r.hasNestedCompositions||r.hasTimelines&&r.attempts>=5)}function P(r){return typeof r=="object"&&r!==null}function xe(r){return P(r)&&typeof r.getDuration=="function"}function Me(r){return P(r)&&typeof r.duration=="function"&&typeof r.time=="function"&&typeof r.seek=="function"&&typeof r.play=="function"&&typeof r.pause=="function"}var k="https://cdn.jsdelivr.net/npm/@hyperframes/core@0.8.53-desktop.0/dist/hyperframe.runtime.iife.js";function O(r){if(r===null)return null;let e=Number.parseInt(r,10);return Number.isFinite(e)&&e>0?e:null}function pt(r){let e=r?.querySelector("[data-composition-id][data-width][data-height]")??r?.querySelector("[data-width][data-height]");if(!e)return null;let t=O(e.getAttribute("data-width")),i=O(e.getAttribute("data-height"));return t!==null&&i!==null?{width:t,height:i}:null}var q=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),n=!!(t.__timelines&&Object.keys(t.__timelines).length>0),o=!!this._iframe.contentDocument?.querySelector("[data-composition-src]");if(ke({hasRuntime:i,hasTimelines:n,hasNestedCompositions:o,runtimeInjected:this._runtimeInjected,attempts:e})){this._injectRuntime();return}if(this._runtimeInjected&&!i)return;let s=this._resolvePlaybackDurationAdapter(t);if(s&&s.getDuration()>0){this.stop();let a=pt(this._iframe.contentDocument);this._callbacks.onReady({duration:s.getDuration(),adapter:s,compositionSize:a});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||P(Reflect.get(e,"__player"))}_injectRuntime(){this._runtimeInjected=!0;try{let e=this._iframe.contentDocument;if(!e)return;let t=e.createElement("script");t.src=k,(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(!P(t))return null;let i=Object.keys(t);if(i.length===0)return null;let n=this._iframe.contentDocument?.querySelector("[data-composition-id]")?.getAttribute("data-composition-id"),o=n&&n in t?n:i[i.length-1],s=t[o];return Me(s)?s:null}_resolvePlaybackDurationAdapter(e){let t=Reflect.get(e,"__player");if(xe(t))return{kind:"runtime",getDuration:()=>t.getDuration()};let i=this._resolveDirectTimelineAdapterFromWindow(e);return i?{kind:"direct-timeline",timeline:i,getDuration:()=>i.duration()}:null}};var Le=`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
position: relative;
|
|
@@ -20363,9 +20363,9 @@ var require_main2 = __commonJS({
|
|
|
20363
20363
|
}
|
|
20364
20364
|
});
|
|
20365
20365
|
|
|
20366
|
-
// ../../node_modules/.bun/@babel+parser@7.29.
|
|
20366
|
+
// ../../node_modules/.bun/@babel+parser@7.29.9/node_modules/@babel/parser/lib/index.js
|
|
20367
20367
|
var require_lib = __commonJS({
|
|
20368
|
-
"../../node_modules/.bun/@babel+parser@7.29.
|
|
20368
|
+
"../../node_modules/.bun/@babel+parser@7.29.9/node_modules/@babel/parser/lib/index.js"(exports) {
|
|
20369
20369
|
"use strict";
|
|
20370
20370
|
Object.defineProperty(exports, "__esModule", {
|
|
20371
20371
|
value: true
|
|
@@ -20607,6 +20607,7 @@ var require_lib = __commonJS({
|
|
|
20607
20607
|
SloppyFunctionAnnexB: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",
|
|
20608
20608
|
SourcePhaseImportRequiresDefault: 'Only `import source x from "./module"` is valid.',
|
|
20609
20609
|
StaticPrototype: "Classes may not have static property named prototype.",
|
|
20610
|
+
SuperCallNotNewExpression: "Cannot use new with super(...).",
|
|
20610
20611
|
SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",
|
|
20611
20612
|
SuperPrivateField: "Private fields can't be accessed on super.",
|
|
20612
20613
|
TrailingDecorator: "Decorators must be attached to a class element.",
|
|
@@ -20636,7 +20637,6 @@ var require_lib = __commonJS({
|
|
|
20636
20637
|
UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",
|
|
20637
20638
|
UnexpectedUsingDeclaration: "Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",
|
|
20638
20639
|
UnexpectedVoidPattern: "Unexpected void binding.",
|
|
20639
|
-
UnsupportedBind: "Binding should be performed on object property.",
|
|
20640
20640
|
UnsupportedDecoratorExport: "A decorated export must export a class declaration.",
|
|
20641
20641
|
UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.",
|
|
20642
20642
|
UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.",
|
|
@@ -20704,6 +20704,10 @@ var require_lib = __commonJS({
|
|
|
20704
20704
|
PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.",
|
|
20705
20705
|
PrimaryTopicRequiresSmartPipeline: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'
|
|
20706
20706
|
});
|
|
20707
|
+
var FunctionBindErrors = {
|
|
20708
|
+
UnsupportedBind: "Binding should be performed on object property.",
|
|
20709
|
+
UnsupportedBindRHS: "The right-hand side of binding can not be super or import."
|
|
20710
|
+
};
|
|
20707
20711
|
var _excluded = ["message"];
|
|
20708
20712
|
function defineHidden(obj, key2, value) {
|
|
20709
20713
|
Object.defineProperty(obj, key2, {
|
|
@@ -20792,7 +20796,7 @@ var require_lib = __commonJS({
|
|
|
20792
20796
|
}
|
|
20793
20797
|
return ParseErrorConstructors;
|
|
20794
20798
|
}
|
|
20795
|
-
var Errors = Object.assign({}, ParseErrorEnum(ModuleErrors), ParseErrorEnum(StandardErrors), ParseErrorEnum(StrictModeErrors), ParseErrorEnum(ParseExpressionErrors), ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors));
|
|
20799
|
+
var Errors = Object.assign({}, ParseErrorEnum(ModuleErrors), ParseErrorEnum(StandardErrors), ParseErrorEnum(StrictModeErrors), ParseErrorEnum(ParseExpressionErrors), ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors), ParseErrorEnum`functionBind`(FunctionBindErrors));
|
|
20796
20800
|
function createDefaultOptions() {
|
|
20797
20801
|
return {
|
|
20798
20802
|
sourceType: "script",
|
|
@@ -23413,13 +23417,15 @@ var require_lib = __commonJS({
|
|
|
23413
23417
|
const arrows = [];
|
|
23414
23418
|
while (stack.length !== 0) {
|
|
23415
23419
|
const node2 = stack.pop();
|
|
23416
|
-
if (node2.type === "ArrowFunctionExpression"
|
|
23420
|
+
if (node2.type === "ArrowFunctionExpression") {
|
|
23417
23421
|
if (node2.typeParameters || !node2.returnType) {
|
|
23418
23422
|
this.finishArrowValidation(node2);
|
|
23419
23423
|
} else {
|
|
23420
23424
|
arrows.push(node2);
|
|
23421
23425
|
}
|
|
23422
|
-
|
|
23426
|
+
if (node2.body.type !== "BlockStatement") {
|
|
23427
|
+
stack.push(node2.body);
|
|
23428
|
+
}
|
|
23423
23429
|
} else if (node2.type === "ConditionalExpression") {
|
|
23424
23430
|
stack.push(node2.consequent);
|
|
23425
23431
|
stack.push(node2.alternate);
|
|
@@ -30575,8 +30581,11 @@ var require_lib = __commonJS({
|
|
|
30575
30581
|
}
|
|
30576
30582
|
}
|
|
30577
30583
|
fillOptionalPropertiesForTSESLint(node) {
|
|
30578
|
-
var _node$directive, _node$decorators, _node$optional, _node$typeAnnotation, _node$accessibility, _node$decorators2, _node$override, _node$readonly, _node$static, _node$declare, _node$returnType, _node$typeParameters, _node$optional2, _node$optional3, _node$accessibility2, _node$readonly2, _node$static2, _node$declare2, _node$definite, _node$readonly3, _node$typeAnnotation2, _node$accessibility3, _node$decorators3, _node$override2, _node$optional4, _node$id, _node$abstract, _node$declare3, _node$decorators4, _node$implements, _node$superTypeArgume, _node$typeParameters2, _node$declare4, _node$definite2, _node$const, _node$declare5, _node$computed, _node$qualifier, _node$options, _node$declare6, _node$extends, _node$optional5, _node$readonly4, _node$declare7, _node$global, _node$const2, _node$in, _node$out;
|
|
30584
|
+
var _node$phase, _node$directive, _node$decorators, _node$optional, _node$typeAnnotation, _node$accessibility, _node$decorators2, _node$override, _node$readonly, _node$static, _node$declare, _node$returnType, _node$typeParameters, _node$optional2, _node$optional3, _node$accessibility2, _node$readonly2, _node$static2, _node$declare2, _node$definite, _node$readonly3, _node$typeAnnotation2, _node$accessibility3, _node$decorators3, _node$override2, _node$optional4, _node$id, _node$abstract, _node$declare3, _node$decorators4, _node$implements, _node$superTypeArgume, _node$typeParameters2, _node$declare4, _node$definite2, _node$const, _node$declare5, _node$computed, _node$qualifier, _node$options, _node$declare6, _node$extends, _node$optional5, _node$readonly4, _node$declare7, _node$global, _node$const2, _node$in, _node$out;
|
|
30579
30585
|
switch (node.type) {
|
|
30586
|
+
case "ImportDeclaration":
|
|
30587
|
+
(_node$phase = node.phase) != null ? _node$phase : node.phase = null;
|
|
30588
|
+
return;
|
|
30580
30589
|
case "ExpressionStatement":
|
|
30581
30590
|
(_node$directive = node.directive) != null ? _node$directive : node.directive = void 0;
|
|
30582
30591
|
return;
|
|
@@ -31473,7 +31482,7 @@ var require_lib = __commonJS({
|
|
|
31473
31482
|
type
|
|
31474
31483
|
} = this.state;
|
|
31475
31484
|
if (!noCalls && type === 15) {
|
|
31476
|
-
return this.parseBind(base2, startLoc,
|
|
31485
|
+
return this.parseBind(base2, startLoc, state);
|
|
31477
31486
|
} else if (tokenIsTemplate(type)) {
|
|
31478
31487
|
return this.parseTaggedTemplateExpression(base2, startLoc, state);
|
|
31479
31488
|
}
|
|
@@ -31526,13 +31535,18 @@ var require_lib = __commonJS({
|
|
|
31526
31535
|
return this.finishNode(node, "MemberExpression");
|
|
31527
31536
|
}
|
|
31528
31537
|
}
|
|
31529
|
-
parseBind(base2, startLoc,
|
|
31538
|
+
parseBind(base2, startLoc, state) {
|
|
31530
31539
|
const node = this.startNodeAt(startLoc);
|
|
31531
31540
|
node.object = base2;
|
|
31532
31541
|
this.next();
|
|
31533
|
-
|
|
31542
|
+
const isImport = this.match(83);
|
|
31543
|
+
const callee = this.parseNoCallExpr();
|
|
31544
|
+
if (callee.type === "Super" || isImport && callee.type === "ImportExpression" || callee.type === "Import") {
|
|
31545
|
+
throw this.raise(Errors.UnsupportedBindRHS, callee);
|
|
31546
|
+
}
|
|
31547
|
+
node.callee = callee;
|
|
31534
31548
|
state.stop = true;
|
|
31535
|
-
return this.parseSubscripts(this.finishNode(node, "BindExpression"), startLoc,
|
|
31549
|
+
return this.parseSubscripts(this.finishNode(node, "BindExpression"), startLoc, false);
|
|
31536
31550
|
}
|
|
31537
31551
|
parseCoverCallAndAsyncArrowHead(base2, startLoc, state, optional) {
|
|
31538
31552
|
const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
|
|
@@ -32115,9 +32129,12 @@ var require_lib = __commonJS({
|
|
|
32115
32129
|
const isImport = this.match(83);
|
|
32116
32130
|
const callee = this.parseNoCallExpr();
|
|
32117
32131
|
node.callee = callee;
|
|
32118
|
-
if (isImport &&
|
|
32132
|
+
if (isImport && callee.type === "ImportExpression" || callee.type === "Import") {
|
|
32119
32133
|
this.raise(Errors.ImportCallNotNewExpression, callee);
|
|
32120
32134
|
}
|
|
32135
|
+
if (callee.type === "Super") {
|
|
32136
|
+
this.raise(Errors.SuperCallNotNewExpression, callee);
|
|
32137
|
+
}
|
|
32121
32138
|
}
|
|
32122
32139
|
parseTemplateElement(isTagged) {
|
|
32123
32140
|
const {
|
|
@@ -44514,6 +44531,19 @@ import { basename } from "path";
|
|
|
44514
44531
|
import { homedir } from "os";
|
|
44515
44532
|
import { join } from "path";
|
|
44516
44533
|
|
|
44534
|
+
// ../engine/src/services/chromeHostCeiling.ts
|
|
44535
|
+
import { release } from "os";
|
|
44536
|
+
var MACOS_12_LAST_CHROME_MAJOR = 150;
|
|
44537
|
+
function chromeMajorCeiling(hostPlatform = process.platform, hostRelease = release()) {
|
|
44538
|
+
if (hostPlatform !== "darwin") return void 0;
|
|
44539
|
+
return Number.parseInt(hostRelease, 10) < 22 ? MACOS_12_LAST_CHROME_MAJOR : void 0;
|
|
44540
|
+
}
|
|
44541
|
+
function exceedsChromeCeiling(versionName, ceiling) {
|
|
44542
|
+
if (ceiling === void 0) return false;
|
|
44543
|
+
const major = Number.parseInt(versionName.slice(versionName.indexOf("-") + 1), 10);
|
|
44544
|
+
return major > ceiling;
|
|
44545
|
+
}
|
|
44546
|
+
|
|
44517
44547
|
// src/utils/errorMessage.ts
|
|
44518
44548
|
function normalizeErrorMessage(error) {
|
|
44519
44549
|
if (error instanceof Error) return error.message;
|
|
@@ -44847,6 +44877,10 @@ Fix: run \`npm install\` or \`bun install\` to restore missing packages, then re
|
|
|
44847
44877
|
}
|
|
44848
44878
|
}
|
|
44849
44879
|
var CHROME_VERSION = "152.0.7977.30";
|
|
44880
|
+
var MACOS_12_CHROME_VERSION = "150.0.7871.124";
|
|
44881
|
+
function managedChromeVersion() {
|
|
44882
|
+
return chromeMajorCeiling() === void 0 ? CHROME_VERSION : MACOS_12_CHROME_VERSION;
|
|
44883
|
+
}
|
|
44850
44884
|
var CACHE_ROOT_DIR = join(homedir(), ".cache", "hyperframes");
|
|
44851
44885
|
var CACHE_DIR = join(homedir(), ".cache", "hyperframes", "chrome");
|
|
44852
44886
|
var PUPPETEER_CACHE_DIR = join(homedir(), ".cache", "puppeteer", "chrome-headless-shell");
|
|
@@ -45035,7 +45069,7 @@ async function findFromHyperframesCache() {
|
|
|
45035
45069
|
}
|
|
45036
45070
|
const hostPlatform = detectBrowserPlatform();
|
|
45037
45071
|
const match = installed.find(
|
|
45038
|
-
(b) => b.browser === Browser.CHROMEHEADLESSSHELL && b.buildId ===
|
|
45072
|
+
(b) => b.browser === Browser.CHROMEHEADLESSSHELL && b.buildId === managedChromeVersion() && b.platform === hostPlatform
|
|
45039
45073
|
);
|
|
45040
45074
|
if (match && existsSync(match.executablePath)) {
|
|
45041
45075
|
return { result: { executablePath: match.executablePath, source: "cache" } };
|
|
@@ -45100,7 +45134,9 @@ function findFromPuppeteerCache() {
|
|
|
45100
45134
|
} catch {
|
|
45101
45135
|
return void 0;
|
|
45102
45136
|
}
|
|
45137
|
+
const ceiling = chromeMajorCeiling();
|
|
45103
45138
|
for (const version2 of versions) {
|
|
45139
|
+
if (exceedsChromeCeiling(version2, ceiling)) continue;
|
|
45104
45140
|
const binary = join(PUPPETEER_CACHE_DIR, version2, ...executable);
|
|
45105
45141
|
if (existsSync(binary)) {
|
|
45106
45142
|
return { executablePath: binary, source: "cache" };
|
|
@@ -45289,7 +45325,7 @@ function browserPathHintForPlatform() {
|
|
|
45289
45325
|
function wrapDownloadFailureWithBrowserPathHint(cause) {
|
|
45290
45326
|
const original = normalizeErrorMessage(cause);
|
|
45291
45327
|
const example = browserPathHintForPlatform();
|
|
45292
|
-
const message = `Failed to download chrome-headless-shell ${
|
|
45328
|
+
const message = `Failed to download chrome-headless-shell ${managedChromeVersion()}: ${original}
|
|
45293
45329
|
|
|
45294
45330
|
Point hyperframes at an already-installed Chrome/Chromium instead:
|
|
45295
45331
|
|
|
@@ -45310,7 +45346,7 @@ async function downloadBrowser(options) {
|
|
|
45310
45346
|
const runInstall = () => install({
|
|
45311
45347
|
cacheDir: CACHE_DIR,
|
|
45312
45348
|
browser: Browser.CHROMEHEADLESSSHELL,
|
|
45313
|
-
buildId:
|
|
45349
|
+
buildId: managedChromeVersion(),
|
|
45314
45350
|
platform,
|
|
45315
45351
|
downloadProgressCallback: options?.onProgress
|
|
45316
45352
|
});
|
package/dist/studio/assets/{hyperframes-player-Cn_PpHqP.js → hyperframes-player-PTEnAHhg.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 u=(s,i,e)=>Ae(s,typeof i!="symbol"?i+"":i,e);import{r as ue,i as w,a as he,b as Ee,c as Te,s as Ce,d as Re}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 u=(s,i,e)=>Ae(s,typeof i!="symbol"?i+"":i,e);import{r as ue,i as w,a as he,b as Ee,c as Te,s as Ce,d as Re}from"./index-CNyviK_l.js";function Se(s){return s.hasRuntime||s.runtimeInjected?!1:!!(s.hasNestedCompositions||s.hasTimelines&&s.attempts>=5)}function $(s){return typeof s=="object"&&s!==null}function xe(s){return $(s)&&typeof s.getDuration=="function"}function Le(s){return $(s)&&typeof s.duration=="function"&&typeof s.time=="function"&&typeof s.seek=="function"&&typeof s.play=="function"&&typeof s.pause=="function"}function Me(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__:Me("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 De(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 Pe{constructor(i,e){u(this,"_interval",null);u(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),o=!!((e=this._iframe.contentDocument)!=null&&e.querySelector("[data-composition-src]"));if(Se({hasRuntime:r,hasTimelines:n,hasNestedCompositions:o,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=De(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],o=e[n];return Le(o)?o:null}_resolvePlaybackDurationAdapter(i){const e=Reflect.get(i,"__player");if(xe(e))return{kind:"runtime",getDuration:()=>e.getDuration()};const t=this._resolveDirectTimelineAdapterFromWindow(i);return t?{kind:"direct-timeline",timeline:t,getDuration:()=>t.duration()}:null}}const ke=`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
position: relative;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as P}from"./index-
|
|
1
|
+
import{g as P}from"./index-CNyviK_l.js";function j(c,d){for(var s=0;s<d.length;s++){const a=d[s];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in c)){const l=Object.getOwnPropertyDescriptor(a,i);l&&Object.defineProperty(c,i,l.get?l:{enumerable:!0,get:()=>a[i]})}}}return Object.freeze(Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}))}var v={},w;function k(){if(w)return v;w=1,Object.defineProperty(v,"__esModule",{value:!0}),v.default=d;var c=window.OfflineAudioContext||window.webkitOfflineAudioContext;function d(e){var r=a(e);return r.start(0),[i,y,O(e.sampleRate),s].reduce(function(t,o){return o(t)},r.buffer.getChannelData(0))}function s(e){return e.sort(function(r,t){return t.count-r.count}).splice(0,5)[0].tempo}function a(e){var r=e.length,t=e.numberOfChannels,o=e.sampleRate,n=new c(t,r,o),u=n.createBufferSource();u.buffer=e;var f=n.createBiquadFilter();return f.type="lowpass",u.connect(f),f.connect(n.destination),u}function i(e){for(var r=[],t=.9,o=.3,n=15;r.length<n&&t>=o;)r=l(e,t),t-=.05;if(r.length<n)throw new Error("Could not find enough samples for a reliable detection.");return r}function l(e,r){for(var t=[],o=0,n=e.length;o<n;o+=1)e[o]>r&&(t.push(o),o+=1e4);return t}function y(e){var r=[];return e.forEach(function(t,o){for(var n=function(x){var g=e[o+x]-t,_=r.some(function(h){if(h.interval===g)return h.count+=1});_||r.push({interval:g,count:1})},u=0;u<10;u+=1)n(u)}),r}function O(e){return function(r){var t=[];return r.forEach(function(o){if(o.interval!==0){for(var n=60/(o.interval/e);n<90;)n*=2;for(;n>180;)n/=2;n=Math.round(n);var u=t.some(function(f){if(f.tempo===n)return f.count+=o.count});u||t.push({tempo:n,count:o.count})}}),t}}return v}var p,b;function q(){return b||(b=1,p=k().default),p}var m=q();const A=P(m),D=j({__proto__:null,default:A},[m]);export{D as i};
|