conformtools 0.6.0 → 0.6.3
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/README.md +27 -17
- package/dist/browser/timeline_core_bg.wasm +0 -0
- package/dist/{chunk-PZFWQJCF.js → chunk-5K56Q5EX.js} +1 -1
- package/dist/chunk-6FVGUJ6L.js +3 -0
- package/dist/{chunk-N43NAG5E.js → chunk-BK62N3ID.js} +1 -1
- package/dist/{chunk-AHNDJFQR.js → chunk-BUEIRRNY.js} +1 -1
- package/dist/{chunk-XDHIIZ6A.js → chunk-CETBLAWM.js} +1 -1
- package/dist/{chunk-ZAHP3ES5.js → chunk-D2RXAX5C.js} +1 -1
- package/dist/chunk-D5DEQ467.js +3 -0
- package/dist/chunk-EV52G33S.js +354 -0
- package/dist/chunk-FMYTLXWN.js +3 -0
- package/dist/{chunk-R6WJ6JIQ.js → chunk-JBSH4AK3.js} +1 -1
- package/dist/{chunk-PSMXHDMX.js → chunk-LO4K2ZF3.js} +1 -1
- package/dist/{chunk-UUDNNFU7.js → chunk-R7P7WVNI.js} +1 -1
- package/dist/{chunk-7XTBFOUJ.js → chunk-WE4S4PEA.js} +1 -1
- package/dist/claude-setup-XSNTKEU7.js +5 -0
- package/dist/cli.js +10 -5
- package/dist/conformtools-decode +0 -0
- package/dist/{cr3-wasm-CWKEOCYH.js → cr3-wasm-HTRSUBJK.js} +1 -1
- package/dist/{dng-wasm-JNFS44V5.js → dng-wasm-2I7S2SN4.js} +1 -1
- package/dist/{dpx-wasm-VNJRFPYY.js → dpx-wasm-AHH7D56L.js} +1 -1
- package/dist/{exr-wasm-5D66YR7A.js → exr-wasm-3TAN64WQ.js} +1 -1
- package/dist/{h264-ZB5DJSNV.js → h264-2LU2X635.js} +1 -1
- package/dist/{h264-mxf-NVBLGU3V.js → h264-mxf-5HJUSZLL.js} +1 -1
- package/dist/http.js +1 -1
- package/dist/i2o-transfer +0 -0
- package/dist/{inspect-MGSZRRAF.js → inspect-NY36WVMH.js} +1 -1
- package/dist/isobmff-HSF7B3Y7.js +3 -0
- package/dist/mcp.js +8 -9
- package/dist/{media_core-AISE7FMT.js → media_core-R5PPN3AY.js} +2 -2
- package/dist/{media_core_bg-FGAR5KA5.js → media_core_bg-MEORQOCQ.js} +1 -1
- package/dist/mxf-IQBPP3JA.js +3 -0
- package/dist/{ops-BQDPU4M6.js → ops-PFEKOSET.js} +1 -1
- package/dist/{r3d-T6D3M2XJ.js → r3d-QLV4J6YF.js} +1 -1
- package/dist/{r3d-U4XTQJXQ.js → r3d-YZH6X2D7.js} +1 -1
- package/dist/resolve-bridge.py +465 -37
- package/dist/statusline-GMMCFMOA.js +4 -0
- package/dist/statusline.js +3 -0
- package/dist/still-LORP3E5C.js +3 -0
- package/dist/{tiff-wasm-2CEABW6L.js → tiff-wasm-6XFTTCL4.js} +1 -1
- package/dist/wasm/media_core_bg.wasm +0 -0
- package/dist/wasm/udf_bg.wasm +0 -0
- package/dist/wasm-threads/media_core_bg.wasm +0 -0
- package/dist/{wav-KNJZMOGX.js → wav-PMVKVYNP.js} +1 -1
- package/package.json +1 -1
- package/dist/chunk-E6YXZIJS.js +0 -230
- package/dist/chunk-JEMLKBH2.js +0 -3
- package/dist/chunk-RXHNBSER.js +0 -3
- package/dist/isobmff-7G55HKDG.js +0 -3
- package/dist/mxf-YH2A2XLW.js +0 -3
- package/dist/skills/auto-conform/SKILL.md +0 -87
- package/dist/skills/conform-artist/SKILL.md +0 -68
- package/dist/skills/conform-artist/references/avid.md +0 -19
- package/dist/skills/conform-artist/references/other-hosts.md +0 -23
- package/dist/skills/conform-artist/references/premiere.md +0 -18
- package/dist/skills/conform-artist/references/resolve.md +0 -19
- package/dist/skills/conform-artist/references/troubleshooting.md +0 -33
- package/dist/skills/conform-artist/references/turnover-checklist.md +0 -37
- package/dist/skills/delivery-qc/SKILL.md +0 -48
- package/dist/still-UFLOAEM4.js +0 -3
- /package/dist/{arriraw-3GKCR6K2.js → arriraw-GUQEZ7CH.js} +0 -0
- /package/dist/{chunk-WHY3DVXS.js → chunk-GIZIR52D.js} +0 -0
- /package/dist/{media_core_bg-YK63OUDM.js → media_core_bg-5QHIWEZB.js} +0 -0
- /package/dist/{prores-L4JZZWGH.js → prores-BR2YURFP.js} +0 -0
- /package/dist/{timeline_core_bg-2TYWZ35G.js → timeline_core_bg-DFKQ7XOU.js} +0 -0
- /package/dist/{udf_bg-A4WEMSAX.js → udf_bg-ZIB3GK52.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{e as kt,f as qr,h as Br,k as Fr}from"./chunk-PSMXHDMX.js";import"./chunk-P7OVDUA5.js";import"./chunk-UCMNH6Q6.js";import"./chunk-N43NAG5E.js";import"./chunk-C2ESM27Z.js";import{b as Cn,c as P,d as Dr,e as E,f as Ie,g as re}from"./chunk-PSANHDZM.js";var Y={};Dr(Y,{__addDisposableResource:()=>ps,__assign:()=>ze,__asyncDelegator:()=>os,__asyncGenerator:()=>is,__asyncValues:()=>as,__await:()=>ve,__awaiter:()=>Zr,__classPrivateFieldGet:()=>hs,__classPrivateFieldIn:()=>fs,__classPrivateFieldSet:()=>ds,__createBinding:()=>Ye,__decorate:()=>Kr,__disposeResources:()=>ms,__esDecorate:()=>zr,__exportStar:()=>ts,__extends:()=>Wr,__generator:()=>es,__importDefault:()=>us,__importStar:()=>cs,__makeTemplateObject:()=>ls,__metadata:()=>Qr,__param:()=>Gr,__propKey:()=>Yr,__read:()=>It,__rest:()=>Hr,__rewriteRelativeImportExtension:()=>_s,__runInitializers:()=>Jr,__setFunctionName:()=>Xr,__spread:()=>rs,__spreadArray:()=>ns,__spreadArrays:()=>ss,__values:()=>Je,default:()=>Ln});function Wr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ot(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function Hr(t,e){var r={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(r[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,s=Object.getOwnPropertySymbols(t);n<s.length;n++)e.indexOf(s[n])<0&&Object.prototype.propertyIsEnumerable.call(t,s[n])&&(r[s[n]]=t[s[n]]);return r}function Kr(t,e,r,s){var n=arguments.length,i=n<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,r):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(n<3?o(i):n>3?o(e,r,i):o(e,r))||i);return n>3&&i&&Object.defineProperty(e,r,i),i}function Gr(t,e){return function(r,s){e(r,s,t)}}function zr(t,e,r,s,n,i){function o(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}for(var a=s.kind,l=a==="getter"?"get":a==="setter"?"set":"value",c=!e&&t?s.static?t:t.prototype:null,u=e||(c?Object.getOwnPropertyDescriptor(c,s.name):{}),d,f=!1,h=r.length-1;h>=0;h--){var p={};for(var m in s)p[m]=m==="access"?{}:s[m];for(var m in s.access)p.access[m]=s.access[m];p.addInitializer=function(y){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(o(y||null))};var _=(0,r[h])(a==="accessor"?{get:u.get,set:u.set}:u[l],p);if(a==="accessor"){if(_===void 0)continue;if(_===null||typeof _!="object")throw new TypeError("Object expected");(d=o(_.get))&&(u.get=d),(d=o(_.set))&&(u.set=d),(d=o(_.init))&&n.unshift(d)}else(d=o(_))&&(a==="field"?n.unshift(d):u[l]=d)}c&&Object.defineProperty(c,s.name,u),f=!0}function Jr(t,e,r){for(var s=arguments.length>2,n=0;n<e.length;n++)r=s?e[n].call(t,r):e[n].call(t);return s?r:void 0}function Yr(t){return typeof t=="symbol"?t:"".concat(t)}function Xr(t,e,r){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",e):e})}function Qr(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function Zr(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(s.next(u))}catch(d){o(d)}}function l(u){try{c(s.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):n(u.value).then(a,l)}c((s=s.apply(t,e||[])).next())})}function es(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,n,i,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(u){return l([c,u])}}function l(c){if(s)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(s=1,n&&(i=c[0]&2?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){r.label=c[1];break}if(c[0]===6&&r.label<i[1]){r.label=i[1],i=c;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(c);break}i[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(u){c=[6,u],n=0}finally{s=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function ts(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Ye(e,t,r)}function Je(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],s=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function It(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var s=r.call(t),n,i=[],o;try{for(;(e===void 0||e-- >0)&&!(n=s.next()).done;)i.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return i}function rs(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(It(arguments[e]));return t}function ss(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var s=Array(t),n=0,e=0;e<r;e++)for(var i=arguments[e],o=0,a=i.length;o<a;o++,n++)s[n]=i[o];return s}function ns(t,e,r){if(r||arguments.length===2)for(var s=0,n=e.length,i;s<n;s++)(i||!(s in e))&&(i||(i=Array.prototype.slice.call(e,0,s)),i[s]=e[s]);return t.concat(i||Array.prototype.slice.call(e))}function ve(t){return this instanceof ve?(this.v=t,this):new ve(t)}function is(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=r.apply(t,e||[]),n,i=[];return n=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),n[Symbol.asyncIterator]=function(){return this},n;function o(h){return function(p){return Promise.resolve(p).then(h,d)}}function a(h,p){s[h]&&(n[h]=function(m){return new Promise(function(_,y){i.push([h,m,_,y])>1||l(h,m)})},p&&(n[h]=p(n[h])))}function l(h,p){try{c(s[h](p))}catch(m){f(i[0][3],m)}}function c(h){h.value instanceof ve?Promise.resolve(h.value.v).then(u,d):f(i[0][2],h)}function u(h){l("next",h)}function d(h){l("throw",h)}function f(h,p){h(p),i.shift(),i.length&&l(i[0][0],i[0][1])}}function os(t){var e,r;return e={},s("next"),s("throw",function(n){throw n}),s("return"),e[Symbol.iterator]=function(){return this},e;function s(n,i){e[n]=t[n]?function(o){return(r=!r)?{value:ve(t[n](o)),done:!1}:i?i(o):o}:i}}function as(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Je=="function"?Je(t):t[Symbol.iterator](),r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r);function s(i){r[i]=t[i]&&function(o){return new Promise(function(a,l){o=t[i](o),n(a,l,o.done,o.value)})}}function n(i,o,a,l){Promise.resolve(l).then(function(c){i({value:c,done:a})},o)}}function ls(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function cs(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=Pt(t),s=0;s<r.length;s++)r[s]!=="default"&&Ye(e,t,r[s]);return jn(e,t),e}function us(t){return t&&t.__esModule?t:{default:t}}function hs(t,e,r,s){if(r==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?s:r==="a"?s.call(t):s?s.value:e.get(t)}function ds(t,e,r,s,n){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?n.call(t,r):n?n.value=r:e.set(t,r),r}function fs(t,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?e===t:t.has(e)}function ps(t,e,r){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var s,n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");s=e[Symbol.asyncDispose]}if(s===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");s=e[Symbol.dispose],r&&(n=s)}if(typeof s!="function")throw new TypeError("Object not disposable.");n&&(s=function(){try{n.call(this)}catch(i){return Promise.reject(i)}}),t.stack.push({value:e,dispose:s,async:r})}else r&&t.stack.push({async:!0});return e}function ms(t){function e(i){t.error=t.hasError?new Un(i,t.error,"An error was suppressed during disposal."):i,t.hasError=!0}var r,s=0;function n(){for(;r=t.stack.pop();)try{if(!r.async&&s===1)return s=0,t.stack.push(r),Promise.resolve().then(n);if(r.dispose){var i=r.dispose.call(r.value);if(r.async)return s|=2,Promise.resolve(i).then(n,function(o){return e(o),n()})}else s|=1}catch(o){e(o)}if(s===1)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}return n()}function _s(t,e){return typeof t=="string"&&/^\.\.?\//.test(t)?t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,s,n,i,o){return s?e?".jsx":".js":n&&(!i||!o)?r:n+i+"."+o.toLowerCase()+"js"}):t}var Ot,ze,Ye,jn,Pt,Un,Ln,X=Cn(()=>{Ot=function(t,e){return Ot=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(r[n]=s[n])},Ot(t,e)};ze=function(){return ze=Object.assign||function(e){for(var r,s=1,n=arguments.length;s<n;s++){r=arguments[s];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},ze.apply(this,arguments)};Ye=Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]});jn=Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e},Pt=function(t){return Pt=Object.getOwnPropertyNames||function(e){var r=[];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[r.length]=s);return r},Pt(t)};Un=typeof SuppressedError=="function"?SuppressedError:function(t,e,r){var s=new Error(r);return s.name="SuppressedError",s.error=t,s.suppressed=e,s};Ln={__extends:Wr,__assign:ze,__rest:Hr,__decorate:Kr,__param:Gr,__esDecorate:zr,__runInitializers:Jr,__propKey:Yr,__setFunctionName:Xr,__metadata:Qr,__awaiter:Zr,__generator:es,__createBinding:Ye,__exportStar:ts,__values:Je,__read:It,__spread:rs,__spreadArrays:ss,__spreadArray:ns,__await:ve,__asyncGenerator:is,__asyncDelegator:os,__asyncValues:as,__makeTemplateObject:ls,__importStar:cs,__importDefault:us,__classPrivateFieldGet:hs,__classPrivateFieldSet:ds,__classPrivateFieldIn:fs,__addDisposableResource:ps,__disposeResources:ms,__rewriteRelativeImportExtension:_s}});var gs=P(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.resolveFetch=void 0;var $n=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);Xe.resolveFetch=$n});var jt=P(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.FunctionRegion=Q.FunctionsHttpError=Q.FunctionsRelayError=Q.FunctionsFetchError=Q.FunctionsError=void 0;var we=class extends Error{constructor(e,r="FunctionsError",s){super(e),this.name=r,this.context=s}};Q.FunctionsError=we;var Ct=class extends we{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}};Q.FunctionsFetchError=Ct;var xt=class extends we{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}};Q.FunctionsRelayError=xt;var Nt=class extends we{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}};Q.FunctionsHttpError=Nt;var ys;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(ys||(Q.FunctionRegion=ys={}))});var vs=P(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.FunctionsClient=void 0;var Dn=(X(),re(Y)),qn=gs(),be=jt(),Ut=class{constructor(e,{headers:r={},customFetch:s,region:n=be.FunctionRegion.Any}={}){this.url=e,this.headers=r,this.region=n,this.fetch=(0,qn.resolveFetch)(s)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return Dn.__awaiter(this,arguments,void 0,function*(r,s={}){var n;let i,o;try{let{headers:a,method:l,body:c,signal:u,timeout:d}=s,f={},{region:h}=s;h||(h=this.region);let p=new URL(`${this.url}/${r}`);h&&h!=="any"&&(f["x-region"]=h,p.searchParams.set("forceFunctionRegion",h));let m;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",m=c):typeof c=="string"?(f["Content-Type"]="text/plain",m=c):typeof FormData<"u"&&c instanceof FormData?m=c:(f["Content-Type"]="application/json",m=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?m=JSON.stringify(c):m=c;let _=u;d&&(o=new AbortController,i=setTimeout(()=>o.abort(),d),u?(_=o.signal,u.addEventListener("abort",()=>o.abort())):_=o.signal);let y=yield this.fetch(p.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:m,signal:_}).catch(H=>{throw new be.FunctionsFetchError(H)}),S=y.headers.get("x-relay-error");if(S&&S==="true")throw new be.FunctionsRelayError(y);if(!y.ok)throw new be.FunctionsHttpError(y);let w=((n=y.headers.get("Content-Type"))!==null&&n!==void 0?n:"text/plain").split(";")[0].trim(),k;return w==="application/json"?k=yield y.json():w==="application/octet-stream"||w==="application/pdf"?k=yield y.blob():w==="text/event-stream"?k=y:w==="multipart/form-data"?k=yield y.formData():k=yield y.text(),{data:k,error:null,response:y}}catch(a){return{data:null,error:a,response:a instanceof be.FunctionsHttpError||a instanceof be.FunctionsRelayError?a.context:void 0}}finally{i&&clearTimeout(i)}})}};Qe.FunctionsClient=Ut});var ws=P(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.FunctionRegion=G.FunctionsRelayError=G.FunctionsHttpError=G.FunctionsFetchError=G.FunctionsError=G.FunctionsClient=void 0;var Bn=vs();Object.defineProperty(G,"FunctionsClient",{enumerable:!0,get:function(){return Bn.FunctionsClient}});var Ce=jt();Object.defineProperty(G,"FunctionsError",{enumerable:!0,get:function(){return Ce.FunctionsError}});Object.defineProperty(G,"FunctionsFetchError",{enumerable:!0,get:function(){return Ce.FunctionsFetchError}});Object.defineProperty(G,"FunctionsHttpError",{enumerable:!0,get:function(){return Ce.FunctionsHttpError}});Object.defineProperty(G,"FunctionsRelayError",{enumerable:!0,get:function(){return Ce.FunctionsRelayError}});Object.defineProperty(G,"FunctionRegion",{enumerable:!0,get:function(){return Ce.FunctionRegion}})});var $t=P(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.WebSocketFactory=void 0;var et=class{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};let r=globalThis.process;if(r){let s=r.versions;if(s&&s.node){let n=s.node,i=parseInt(n.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
|
|
3
|
+
import{e as kt,f as qr,h as Br,k as Fr}from"./chunk-LO4K2ZF3.js";import"./chunk-C2ESM27Z.js";import"./chunk-P7OVDUA5.js";import"./chunk-UCMNH6Q6.js";import"./chunk-BK62N3ID.js";import{b as Cn,c as P,d as Dr,e as E,f as Ie,g as re}from"./chunk-PSANHDZM.js";var Y={};Dr(Y,{__addDisposableResource:()=>ps,__assign:()=>ze,__asyncDelegator:()=>os,__asyncGenerator:()=>is,__asyncValues:()=>as,__await:()=>ve,__awaiter:()=>Zr,__classPrivateFieldGet:()=>hs,__classPrivateFieldIn:()=>fs,__classPrivateFieldSet:()=>ds,__createBinding:()=>Ye,__decorate:()=>Kr,__disposeResources:()=>ms,__esDecorate:()=>zr,__exportStar:()=>ts,__extends:()=>Wr,__generator:()=>es,__importDefault:()=>us,__importStar:()=>cs,__makeTemplateObject:()=>ls,__metadata:()=>Qr,__param:()=>Gr,__propKey:()=>Yr,__read:()=>It,__rest:()=>Hr,__rewriteRelativeImportExtension:()=>_s,__runInitializers:()=>Jr,__setFunctionName:()=>Xr,__spread:()=>rs,__spreadArray:()=>ns,__spreadArrays:()=>ss,__values:()=>Je,default:()=>Ln});function Wr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ot(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function Hr(t,e){var r={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(r[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,s=Object.getOwnPropertySymbols(t);n<s.length;n++)e.indexOf(s[n])<0&&Object.prototype.propertyIsEnumerable.call(t,s[n])&&(r[s[n]]=t[s[n]]);return r}function Kr(t,e,r,s){var n=arguments.length,i=n<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,r):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(n<3?o(i):n>3?o(e,r,i):o(e,r))||i);return n>3&&i&&Object.defineProperty(e,r,i),i}function Gr(t,e){return function(r,s){e(r,s,t)}}function zr(t,e,r,s,n,i){function o(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}for(var a=s.kind,l=a==="getter"?"get":a==="setter"?"set":"value",c=!e&&t?s.static?t:t.prototype:null,u=e||(c?Object.getOwnPropertyDescriptor(c,s.name):{}),d,f=!1,h=r.length-1;h>=0;h--){var p={};for(var m in s)p[m]=m==="access"?{}:s[m];for(var m in s.access)p.access[m]=s.access[m];p.addInitializer=function(y){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(o(y||null))};var _=(0,r[h])(a==="accessor"?{get:u.get,set:u.set}:u[l],p);if(a==="accessor"){if(_===void 0)continue;if(_===null||typeof _!="object")throw new TypeError("Object expected");(d=o(_.get))&&(u.get=d),(d=o(_.set))&&(u.set=d),(d=o(_.init))&&n.unshift(d)}else(d=o(_))&&(a==="field"?n.unshift(d):u[l]=d)}c&&Object.defineProperty(c,s.name,u),f=!0}function Jr(t,e,r){for(var s=arguments.length>2,n=0;n<e.length;n++)r=s?e[n].call(t,r):e[n].call(t);return s?r:void 0}function Yr(t){return typeof t=="symbol"?t:"".concat(t)}function Xr(t,e,r){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",e):e})}function Qr(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function Zr(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(s.next(u))}catch(d){o(d)}}function l(u){try{c(s.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):n(u.value).then(a,l)}c((s=s.apply(t,e||[])).next())})}function es(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,n,i,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(u){return l([c,u])}}function l(c){if(s)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(s=1,n&&(i=c[0]&2?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){r.label=c[1];break}if(c[0]===6&&r.label<i[1]){r.label=i[1],i=c;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(c);break}i[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(u){c=[6,u],n=0}finally{s=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function ts(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Ye(e,t,r)}function Je(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],s=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function It(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var s=r.call(t),n,i=[],o;try{for(;(e===void 0||e-- >0)&&!(n=s.next()).done;)i.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return i}function rs(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(It(arguments[e]));return t}function ss(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var s=Array(t),n=0,e=0;e<r;e++)for(var i=arguments[e],o=0,a=i.length;o<a;o++,n++)s[n]=i[o];return s}function ns(t,e,r){if(r||arguments.length===2)for(var s=0,n=e.length,i;s<n;s++)(i||!(s in e))&&(i||(i=Array.prototype.slice.call(e,0,s)),i[s]=e[s]);return t.concat(i||Array.prototype.slice.call(e))}function ve(t){return this instanceof ve?(this.v=t,this):new ve(t)}function is(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=r.apply(t,e||[]),n,i=[];return n=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),n[Symbol.asyncIterator]=function(){return this},n;function o(h){return function(p){return Promise.resolve(p).then(h,d)}}function a(h,p){s[h]&&(n[h]=function(m){return new Promise(function(_,y){i.push([h,m,_,y])>1||l(h,m)})},p&&(n[h]=p(n[h])))}function l(h,p){try{c(s[h](p))}catch(m){f(i[0][3],m)}}function c(h){h.value instanceof ve?Promise.resolve(h.value.v).then(u,d):f(i[0][2],h)}function u(h){l("next",h)}function d(h){l("throw",h)}function f(h,p){h(p),i.shift(),i.length&&l(i[0][0],i[0][1])}}function os(t){var e,r;return e={},s("next"),s("throw",function(n){throw n}),s("return"),e[Symbol.iterator]=function(){return this},e;function s(n,i){e[n]=t[n]?function(o){return(r=!r)?{value:ve(t[n](o)),done:!1}:i?i(o):o}:i}}function as(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Je=="function"?Je(t):t[Symbol.iterator](),r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r);function s(i){r[i]=t[i]&&function(o){return new Promise(function(a,l){o=t[i](o),n(a,l,o.done,o.value)})}}function n(i,o,a,l){Promise.resolve(l).then(function(c){i({value:c,done:a})},o)}}function ls(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function cs(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=Pt(t),s=0;s<r.length;s++)r[s]!=="default"&&Ye(e,t,r[s]);return jn(e,t),e}function us(t){return t&&t.__esModule?t:{default:t}}function hs(t,e,r,s){if(r==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?s:r==="a"?s.call(t):s?s.value:e.get(t)}function ds(t,e,r,s,n){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?n.call(t,r):n?n.value=r:e.set(t,r),r}function fs(t,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?e===t:t.has(e)}function ps(t,e,r){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var s,n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");s=e[Symbol.asyncDispose]}if(s===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");s=e[Symbol.dispose],r&&(n=s)}if(typeof s!="function")throw new TypeError("Object not disposable.");n&&(s=function(){try{n.call(this)}catch(i){return Promise.reject(i)}}),t.stack.push({value:e,dispose:s,async:r})}else r&&t.stack.push({async:!0});return e}function ms(t){function e(i){t.error=t.hasError?new Un(i,t.error,"An error was suppressed during disposal."):i,t.hasError=!0}var r,s=0;function n(){for(;r=t.stack.pop();)try{if(!r.async&&s===1)return s=0,t.stack.push(r),Promise.resolve().then(n);if(r.dispose){var i=r.dispose.call(r.value);if(r.async)return s|=2,Promise.resolve(i).then(n,function(o){return e(o),n()})}else s|=1}catch(o){e(o)}if(s===1)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}return n()}function _s(t,e){return typeof t=="string"&&/^\.\.?\//.test(t)?t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,s,n,i,o){return s?e?".jsx":".js":n&&(!i||!o)?r:n+i+"."+o.toLowerCase()+"js"}):t}var Ot,ze,Ye,jn,Pt,Un,Ln,X=Cn(()=>{Ot=function(t,e){return Ot=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(r[n]=s[n])},Ot(t,e)};ze=function(){return ze=Object.assign||function(e){for(var r,s=1,n=arguments.length;s<n;s++){r=arguments[s];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},ze.apply(this,arguments)};Ye=Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]});jn=Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e},Pt=function(t){return Pt=Object.getOwnPropertyNames||function(e){var r=[];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[r.length]=s);return r},Pt(t)};Un=typeof SuppressedError=="function"?SuppressedError:function(t,e,r){var s=new Error(r);return s.name="SuppressedError",s.error=t,s.suppressed=e,s};Ln={__extends:Wr,__assign:ze,__rest:Hr,__decorate:Kr,__param:Gr,__esDecorate:zr,__runInitializers:Jr,__propKey:Yr,__setFunctionName:Xr,__metadata:Qr,__awaiter:Zr,__generator:es,__createBinding:Ye,__exportStar:ts,__values:Je,__read:It,__spread:rs,__spreadArrays:ss,__spreadArray:ns,__await:ve,__asyncGenerator:is,__asyncDelegator:os,__asyncValues:as,__makeTemplateObject:ls,__importStar:cs,__importDefault:us,__classPrivateFieldGet:hs,__classPrivateFieldSet:ds,__classPrivateFieldIn:fs,__addDisposableResource:ps,__disposeResources:ms,__rewriteRelativeImportExtension:_s}});var gs=P(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.resolveFetch=void 0;var $n=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);Xe.resolveFetch=$n});var jt=P(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.FunctionRegion=Q.FunctionsHttpError=Q.FunctionsRelayError=Q.FunctionsFetchError=Q.FunctionsError=void 0;var we=class extends Error{constructor(e,r="FunctionsError",s){super(e),this.name=r,this.context=s}};Q.FunctionsError=we;var Ct=class extends we{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}};Q.FunctionsFetchError=Ct;var xt=class extends we{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}};Q.FunctionsRelayError=xt;var Nt=class extends we{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}};Q.FunctionsHttpError=Nt;var ys;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(ys||(Q.FunctionRegion=ys={}))});var vs=P(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.FunctionsClient=void 0;var Dn=(X(),re(Y)),qn=gs(),be=jt(),Ut=class{constructor(e,{headers:r={},customFetch:s,region:n=be.FunctionRegion.Any}={}){this.url=e,this.headers=r,this.region=n,this.fetch=(0,qn.resolveFetch)(s)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return Dn.__awaiter(this,arguments,void 0,function*(r,s={}){var n;let i,o;try{let{headers:a,method:l,body:c,signal:u,timeout:d}=s,f={},{region:h}=s;h||(h=this.region);let p=new URL(`${this.url}/${r}`);h&&h!=="any"&&(f["x-region"]=h,p.searchParams.set("forceFunctionRegion",h));let m;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",m=c):typeof c=="string"?(f["Content-Type"]="text/plain",m=c):typeof FormData<"u"&&c instanceof FormData?m=c:(f["Content-Type"]="application/json",m=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?m=JSON.stringify(c):m=c;let _=u;d&&(o=new AbortController,i=setTimeout(()=>o.abort(),d),u?(_=o.signal,u.addEventListener("abort",()=>o.abort())):_=o.signal);let y=yield this.fetch(p.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:m,signal:_}).catch(H=>{throw new be.FunctionsFetchError(H)}),S=y.headers.get("x-relay-error");if(S&&S==="true")throw new be.FunctionsRelayError(y);if(!y.ok)throw new be.FunctionsHttpError(y);let w=((n=y.headers.get("Content-Type"))!==null&&n!==void 0?n:"text/plain").split(";")[0].trim(),k;return w==="application/json"?k=yield y.json():w==="application/octet-stream"||w==="application/pdf"?k=yield y.blob():w==="text/event-stream"?k=y:w==="multipart/form-data"?k=yield y.formData():k=yield y.text(),{data:k,error:null,response:y}}catch(a){return{data:null,error:a,response:a instanceof be.FunctionsHttpError||a instanceof be.FunctionsRelayError?a.context:void 0}}finally{i&&clearTimeout(i)}})}};Qe.FunctionsClient=Ut});var ws=P(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.FunctionRegion=G.FunctionsRelayError=G.FunctionsHttpError=G.FunctionsFetchError=G.FunctionsError=G.FunctionsClient=void 0;var Bn=vs();Object.defineProperty(G,"FunctionsClient",{enumerable:!0,get:function(){return Bn.FunctionsClient}});var Ce=jt();Object.defineProperty(G,"FunctionsError",{enumerable:!0,get:function(){return Ce.FunctionsError}});Object.defineProperty(G,"FunctionsFetchError",{enumerable:!0,get:function(){return Ce.FunctionsFetchError}});Object.defineProperty(G,"FunctionsHttpError",{enumerable:!0,get:function(){return Ce.FunctionsHttpError}});Object.defineProperty(G,"FunctionsRelayError",{enumerable:!0,get:function(){return Ce.FunctionsRelayError}});Object.defineProperty(G,"FunctionRegion",{enumerable:!0,get:function(){return Ce.FunctionRegion}})});var $t=P(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.WebSocketFactory=void 0;var et=class{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};let r=globalThis.process;if(r){let s=r.versions;if(s&&s.node){let n=s.node,i=parseInt(n.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
|
|
4
4
|
import ws from "ws"
|
|
5
5
|
new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){let e=this.detectEnvironment();if(e.constructor)return e.constructor;let r=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(r+=`
|
|
6
6
|
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
+
import{a as H,b as I}from"./chunk-SP5RGDAM.js";import{a as k,b as O}from"./chunk-AACY2V3L.js";import{b as l,c as E}from"./chunk-BUEIRRNY.js";import{a as N}from"./chunk-TK55FA56.js";import{b as C}from"./chunk-FMYTLXWN.js";import{b as T,c as f}from"./chunk-BK62N3ID.js";import{A as P,Ca as s,K as x,L as F,W as m,ca as D,h as b,j as h,k as g,ka as A,m as v,na as z,u as w,v as S,x as R,y,z as M}from"./chunk-JBSH4AK3.js";import"./chunk-PSANHDZM.js";function u(e){return(t,n)=>e.read(t,n)}function J(e){let t=e.toLowerCase().trim();return t==="aprn"||t==="aprh"?"prores_raw":t==="apch"||t==="apcn"||t==="apcs"||t==="apco"||t==="ap4h"||t==="ap4x"?"prores":t==="avdn"?"dnxhd":t==="dnxh"?"dnxhr":t==="avc1"||t==="avc3"?"h264":t==="hev1"||t==="hvc1"?"h265":t==="braw"?"braw":e}var p={apco:"Proxy",apcs:"LT",apcn:"422",apch:"HQ",ap4h:"4444",ap4x:"4444 XQ"},X={1:"bt709",2:"unknown",5:"bt470bg",6:"smpte170m",9:"bt2020",11:"smpte431",12:"smpte432"},q={1:"bt709",2:"unknown",6:"smpte170m",8:"linear",13:"iec61966-2-1",14:"bt2020-10",15:"bt2020-12",16:"smpte2084",18:"arib-std-b67"},K={0:"gbr",1:"bt709",2:"unknown",5:"bt470bg",6:"smpte170m",9:"bt2020nc",10:"bt2020c"};function Y(e,t){return e==="ap4h"||e==="ap4x"?t===32?"yuva444p12le":"yuv444p12le":e in p?"yuv422p10le":void 0}var L={66:"Baseline",77:"Main",88:"Extended",100:"High",110:"High 10",122:"High 4:2:2",244:"High 4:4:4"},U={1:"Main",2:"Main 10",3:"Main Still",4:"Rext"},Z={1270:"DNxHR 444",1271:"DNxHR HQX",1272:"DNxHR HQ",1273:"DNxHR SQ",1274:"DNxHR LB"};function ee(e,t){if(p[e.codec_fourcc])return`ProRes ${p[e.codec_fourcc]}`;if(e.vc3_cid)return Z[e.vc3_cid]??`DNxHD ${e.vc3_cid}`;if(e.video_profile!=null){if(t==="h264"&&L[e.video_profile])return`H.264 ${L[e.video_profile]}`;if(t==="h265"&&U[e.video_profile])return`HEVC ${U[e.video_profile]}`}}function re(e,t){let n=e.video_chroma,r=e.video_bit_depth;if(n==null&&t==="h264"&&[66,77,88].includes(e.video_profile??-1)&&([n,r]=[1,8]),n==null&&e.vc3_cid&&(n=e.vc3_cid===1270||e.vc3_cid===1256?3:2),n==null||r==null)return;let o=["gray","yuv420p","yuv422p","yuv444p"][n];return r>8?`${o}${r}le`:o}function V(e,t){let n=[];for(let r of e){if(r.kind!=="clip"||!r.source_range)continue;let o=r.source_range.start.value,i=r.source_range.duration.value,c=Math.max(0,Math.floor(o)-t),a=Math.floor(o+i-1)+t;a>=c&&n.push({first_frame:c,last_frame:a})}return n}var le={async inspect(e){await s();let t=e.parts[0],n=await m(u(t),t.fileSize,e.format),r=JSON.parse(n);if(!r)return null;let o=r.timecode&&r.timecode.fps_denominator>0?r.timecode.fps_numerator/r.timecode.fps_denominator:null,i=J(r.codec_fourcc),c=[{kind:"video",codec:i,width:r.width??void 0,height:r.height??void 0,rate:o??void 0,bit_depth:l(r.codec_fourcc)??l(i)??E(i,r.video_profile)??r.video_bit_depth??void 0,codec_specific:{fourcc:r.codec_fourcc,profile:ee(r,i),pixel_format:Y(r.codec_fourcc,r.video_depth)??re(r,i),colr:r.colr?{primaries:X[r.colr.primaries]??r.colr.primaries,transfer:q[r.colr.transfer]??r.colr.transfer,matrix:K[r.colr.matrix]??r.colr.matrix}:void 0}}];for(let a of r.audio_tracks??(r.audio?[r.audio]:[]))c.push({kind:"audio",codec:a.codec_fourcc,channels:a.channels??void 0,rate:a.sample_rate??void 0,bit_depth:a.bit_depth??void 0,codec_specific:{fourcc:a.codec_fourcc,channel_layout:a.channel_layout??void 0}});return{id:t.filename,kind:"external",target_url:t.filename,available_range:o&&r.duration_seconds?{start:{value:0,rate:o},duration:{value:Math.round(r.duration_seconds*o),rate:o}}:null,reel_name:null,source_timecode:r.timecode?.display??null,container:e.format==="mov"?"mov":e.format,codec:i,size_bytes:t.fileSize,source_fps:o,source_resolution_w:r.width??null,source_resolution_h:r.height??null,streams:c,decode_provenance:r.decode_provenance??null,vendor_metadata:r.timecode?{drop_frame:r.timecode.drop_frame}:{},binding_state:"unbound",raw_extraction:{mov_probe:r},metadata:{}}},async extract(e){await s();let t=e.parts[0],n=JSON.parse(await D(u(t),t.fileSize,e.format));if(n.length===0)return null;let r=JSON.parse(await m(u(t),t.fileSize,e.format)),o=r?J(r.codec_fourcc):e.format,i=r?.timecode&&r.timecode.fps_denominator>0?r.timecode.fps_numerator/r.timecode.fps_denominator:void 0;return{v:1,container:e.format==="mov"?"mov":e.format,codec:o,width:r?.width??void 0,height:r?.height??void 0,fps:i,frame_count:k(n),timecode:r?.timecode?.display??void 0,granularity:O(n),segments:n}},async sparsify(e,t){await s();let n=e.parts[0],r=V(t.items,t.handles),o=await z(u(n),n.fileSize,JSON.stringify(r),e.format),i=JSON.parse(o);return[{filename:n.filename,fileSize:i.fileSize,structuralRanges:i.structuralRanges,essenceRanges:i.essenceRanges,trimInputs:i.trimInputs}]},async trim(e,t){await s();let n=e.parts[0],r=V(t.items,0);if(r.length===0)throw new Error("isobmff trim: no usable trim ranges in items");let o=await C(r,t.handles,(i,c)=>A(u(n),n.fileSize,i,c,e.format));return o.map((i,c)=>{let a=JSON.parse(i);return o.length>1&&(a.output_clip_number=c+1,a.output_clip_count=o.length,a.output_part_number=1),a})},async decode(e,t,n){await s();let r=n.detail==="coarse",o=e.parts[0];if(e.format==="crm"){let j=await v(u(o),o.fileSize,t,r?"preview":"full");return d(j)}let i=await G(e);if(t<0||t>=i.length)throw new f(t,i.length);let c=i[t],a=await o.read(c.offset,c.size);if(e.format==="braw")return d(r?h(a,0):g(a));if(B(a))return d(r?R(a,0):y(a));if($(a))return d(r?x(a,0):F(a));if(r)return d(w(a,0));let _=await te(a);return _||d(P(a))},async decode16(e,t){await s();let n=e.parts[0];if(e.format==="crm")throw new Error("crm: no 16-bit decoder");let r=await G(e);if(t<0||t>=r.length)throw new f(t,r.length);let o=r[t],i=await n.read(o.offset,o.size),c=e.format==="braw"?b(i):B(i)?S(i):$(i)?(()=>{throw new Error("vc3: no 16-bit decoder")})():M(i);return T(c)}};async function te(e){if(!!0)return null;try{let t=await import("./prores-BR2YURFP.js");if(!await t.proresGpuAvailable())return null;let n=await t.decodeProResRgbaGpu(e);return n?{width:n.width,height:n.height,rgba:n.rgba}:null}catch{return null}}function $(e){return e.length>=4&&e[0]===0&&e[1]===0&&e[2]===2&&e[3]===128}function B(e){return e.length>=8&&e[4]===112&&e[5]===114&&e[6]===114&&e[7]===102}function d(e){let t=new DataView(e.buffer,e.byteOffset,8);return{width:t.getUint32(0,!0),height:t.getUint32(4,!0),rgba:e.slice(8)}}var Q=new WeakMap;async function G(e){let t=Q.get(e);if(!t){let n=e.parts[0];t=I(H(await N({fileSize:n.fileSize,read:n.read}))),Q.set(e,t)}return t}export{le as isobmffFormat};
|