conformtools 0.5.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/README.md +69 -6
  2. package/dist/browser/timeline_core_bg.wasm +0 -0
  3. package/dist/chunk-6TM32YIJ.js +7 -0
  4. package/dist/chunk-BTXLTVNK.js +3 -0
  5. package/dist/{chunk-AHNDJFQR.js → chunk-BUEIRRNY.js} +1 -1
  6. package/dist/chunk-BXFVYGFW.js +3 -0
  7. package/dist/chunk-CX3USH6A.js +318 -0
  8. package/dist/chunk-D5DEQ467.js +3 -0
  9. package/dist/{chunk-YPRTUS5W.js → chunk-FNGHTZ5F.js} +1 -1
  10. package/dist/chunk-GXEVALBL.js +3 -0
  11. package/dist/chunk-JH3OLTR6.js +3 -0
  12. package/dist/chunk-KP4C2MFM.js +3 -0
  13. package/dist/chunk-PIEH7J6J.js +3 -0
  14. package/dist/chunk-RUBNBRUK.js +3 -0
  15. package/dist/chunk-RULUDOB7.js +3 -0
  16. package/dist/chunk-Y2BEEOPB.js +3 -0
  17. package/dist/claude-setup-XSNTKEU7.js +5 -0
  18. package/dist/cli.js +11 -5
  19. package/dist/conformtools-decode +0 -0
  20. package/dist/cr3-wasm-YTMVBAFM.js +3 -0
  21. package/dist/dng-wasm-WUUQB7M2.js +3 -0
  22. package/dist/dpx-wasm-XBKO4V4W.js +3 -0
  23. package/dist/exr-wasm-VE2W6MFW.js +3 -0
  24. package/dist/{h264-JHQCJTWP.js → h264-HD7BY5J5.js} +1 -1
  25. package/dist/{h264-mxf-4M63NBQK.js → h264-mxf-6OOODSAK.js} +1 -1
  26. package/dist/http.js +2 -2
  27. package/dist/{inspect-6OM4FTVW.js → inspect-TDZCNXVW.js} +2 -2
  28. package/dist/isobmff-57HSD6O2.js +3 -0
  29. package/dist/mcp.js +10 -9
  30. package/dist/media_core-R5PPN3AY.js +9 -0
  31. package/dist/{media_core_bg-XIM7Y4R3.js → media_core_bg-YBW45HJ2.js} +1 -1
  32. package/dist/mxf-FAXEK4WR.js +3 -0
  33. package/dist/{ops-7HVBBXUQ.js → ops-UPPAG2TI.js} +1 -1
  34. package/dist/premiere-uxp/icons/panel.png +0 -0
  35. package/dist/premiere-uxp/icons/panel@2x.png +0 -0
  36. package/dist/premiere-uxp/icons/plugin.png +0 -0
  37. package/dist/premiere-uxp/icons/plugin@2x.png +0 -0
  38. package/dist/premiere-uxp/index.html +38 -0
  39. package/dist/premiere-uxp/index.js +93 -0
  40. package/dist/premiere-uxp/lib/clipmeta.js +170 -0
  41. package/dist/premiere-uxp/lib/ctx.js +62 -0
  42. package/dist/premiere-uxp/lib/handles.js +57 -0
  43. package/dist/premiere-uxp/lib/markers.js +198 -0
  44. package/dist/premiere-uxp/lib/pairing.js +58 -0
  45. package/dist/premiere-uxp/lib/premiere.js +82 -0
  46. package/dist/premiere-uxp/lib/probe.js +139 -0
  47. package/dist/premiere-uxp/lib/protocol.js +165 -0
  48. package/dist/premiere-uxp/lib/render.js +38 -0
  49. package/dist/premiere-uxp/lib/session.js +85 -0
  50. package/dist/premiere-uxp/lib/sizing.js +312 -0
  51. package/dist/premiere-uxp/lib/time.js +82 -0
  52. package/dist/premiere-uxp/lib/timeline.js +336 -0
  53. package/dist/premiere-uxp/lib/verbs.js +20 -0
  54. package/dist/premiere-uxp/lib/write.js +97 -0
  55. package/dist/premiere-uxp/manifest.json +102 -0
  56. package/dist/{r3d-AT6NNIY3.js → r3d-EY6FEFKM.js} +1 -1
  57. package/dist/r3d-KJVC7T2C.js +3 -0
  58. package/dist/resolve-bridge.py +974 -0
  59. package/dist/resolve-presets/conform.tools.xml +127 -0
  60. package/dist/sscd-embed-DHFTEIOC.js +3 -0
  61. package/dist/sscd-sweep-OYS4XAID.js +3 -0
  62. package/dist/statusline-GMMCFMOA.js +4 -0
  63. package/dist/statusline.js +3 -0
  64. package/dist/{still-E4HLCCST.js → still-WY7MUR7A.js} +1 -1
  65. package/dist/tiff-wasm-T2V2ICZT.js +3 -0
  66. package/dist/wasm/media_core_bg.wasm +0 -0
  67. package/dist/wasm/udf_bg.wasm +0 -0
  68. package/dist/wasm-threads/media_core_bg.wasm +0 -0
  69. package/dist/{wav-DXF73Y56.js → wav-LFS6OZHJ.js} +1 -1
  70. package/package.json +1 -1
  71. package/dist/chunk-35U7WGES.js +0 -3
  72. package/dist/chunk-3XTUTEKJ.js +0 -102
  73. package/dist/chunk-HJXRLQOI.js +0 -3
  74. package/dist/chunk-IDDQR56R.js +0 -7
  75. package/dist/chunk-UUMHVA7R.js +0 -3
  76. package/dist/chunk-WWGQFOB2.js +0 -64
  77. package/dist/cr3-wasm-X6Q4YMUU.js +0 -3
  78. package/dist/dng-wasm-EAB24KDN.js +0 -3
  79. package/dist/dpx-wasm-OX2D24ZB.js +0 -3
  80. package/dist/exr-wasm-Z6BBPJSN.js +0 -3
  81. package/dist/isobmff-XL33CVJR.js +0 -3
  82. package/dist/media_core-VSTO6CS4.js +0 -9
  83. package/dist/mxf-VIANACTI.js +0 -3
  84. package/dist/r3d-2QCFX7UX.js +0 -3
  85. package/dist/sscd-sweep-IXM4OD7O.js +0 -3
  86. package/dist/tiff-wasm-XYTQNL2F.js +0 -3
  87. package/dist/zod-IPSV75LP.js +0 -3
  88. /package/dist/{arriraw-Y5VXHXNX.js → arriraw-BEZILZY3.js} +0 -0
  89. /package/dist/{chunk-NYB4ISL3.js → chunk-NP53ITN6.js} +0 -0
  90. /package/dist/{media_core_bg-BKXQLNFA.js → media_core_bg-5UIQAP7I.js} +0 -0
  91. /package/dist/{prores-TQEZ3KFH.js → prores-BNALPJPS.js} +0 -0
  92. /package/dist/{timeline_core_bg-QEOVAIWP.js → timeline_core_bg-XYT26ZTU.js} +0 -0
  93. /package/dist/{udf_bg-UTQ6BVXX.js → udf_bg-R3JEZJAT.js} +0 -0
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
+ import"./chunk-PSANHDZM.js";function wt(r,n){return new Promise(e=>{r.addEventListener("message",function _({data:i}){i?.type===n&&(r.removeEventListener("message",_),e(i))})})}wt(self,"wasm_bindgen_worker_init").then(async({init:r,receiver:n})=>{let e=await import("./media_core-R5PPN3AY.js");await e.default(r),postMessage({type:"wasm_bindgen_worker_ready"}),e.wbg_rayon_start_worker(n)});var Tt;async function bt(r,n,e){if(e.numThreads()===0)throw new Error("num_threads must be > 0.");let _={type:"wasm_bindgen_worker_init",init:{module_or_path:r,memory:n},receiver:e.receiver()};Tt=await Promise.all(Array.from({length:e.numThreads()},async()=>{let i=new Worker(new URL("./workerHelpers.js",import.meta.url),{type:"module"});return i.postMessage(_),await wt(i,"wasm_bindgen_worker_ready"),i})),e.build()}var tt=class{__destroy_into_raw(){let n=this.__wbg_ptr;return this.__wbg_ptr=0,ft.unregister(this),n}free(){let n=this.__destroy_into_raw();t.__wbg_exrbench_free(n,0)}block_rows(){return t.exrbench_block_rows(this.__wbg_ptr)>>>0}f32_to_half_block(){return t.exrbench_f32_to_half_block(this.__wbg_ptr)}n_blocks(){return t.exrbench_n_blocks(this.__wbg_ptr)>>>0}constructor(n,e,_,i){try{let d=t.__wbindgen_add_to_stack_pointer(-16),g=y(i,t.__wbindgen_export4,t.__wbindgen_export5),w=p;t.exrbench_new(d,n,e,_,g,w);var c=o().getInt32(d+0,!0),a=o().getInt32(d+4,!0),s=o().getInt32(d+8,!0);if(s)throw u(a);return this.__wbg_ptr=c,ft.register(this,this.__wbg_ptr,this),this}finally{t.__wbindgen_add_to_stack_pointer(16)}}piz_stage_block(n){try{let c=t.__wbindgen_add_to_stack_pointer(-16);t.exrbench_piz_stage_block(c,this.__wbg_ptr,n);var e=o().getFloat64(c+0,!0),_=o().getInt32(c+8,!0),i=o().getInt32(c+12,!0);if(i)throw u(_);return e}finally{t.__wbindgen_add_to_stack_pointer(16)}}staging_f32_ptr(){return t.exrbench_staging_f32_ptr(this.__wbg_ptr)>>>0}staging_f32_samples(){return t.exrbench_staging_f32_samples(this.__wbg_ptr)>>>0}staging_half_len(){return t.exrbench_staging_half_len(this.__wbg_ptr)>>>0}staging_half_ptr(){return t.exrbench_staging_half_ptr(this.__wbg_ptr)>>>0}zip_stage_block(n){try{let c=t.__wbindgen_add_to_stack_pointer(-16);t.exrbench_zip_stage_block(c,this.__wbg_ptr,n);var e=o().getFloat64(c+0,!0),_=o().getInt32(c+8,!0),i=o().getInt32(c+12,!0);if(i)throw u(_);return e}finally{t.__wbindgen_add_to_stack_pointer(16)}}};Symbol.dispose&&(tt.prototype[Symbol.dispose]=tt.prototype.free);var et=class{__destroy_into_raw(){let n=this.__wbg_ptr;return this.__wbg_ptr=0,vt.unregister(this),n}free(){let n=this.__destroy_into_raw();t.__wbg_exrstreamencoder_free(n,0)}block_rows(){return t.exrstreamencoder_block_rows(this.__wbg_ptr)>>>0}finish(){try{let a=t.__wbindgen_add_to_stack_pointer(-16);t.exrstreamencoder_finish(a,this.__wbg_ptr);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}header(){try{let i=t.__wbindgen_add_to_stack_pointer(-16);t.exrstreamencoder_header(i,this.__wbg_ptr);var n=o().getInt32(i+0,!0),e=o().getInt32(i+4,!0),_=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),_}finally{t.__wbindgen_add_to_stack_pointer(16)}}n_blocks(){return t.exrstreamencoder_n_blocks(this.__wbg_ptr)>>>0}constructor(n,e,_,i,c,a,s,d,g,w){try{let I=t.__wbindgen_add_to_stack_pointer(-16),k=y(_,t.__wbindgen_export4,t.__wbindgen_export5),A=p,F=y(i,t.__wbindgen_export4,t.__wbindgen_export5),z=p,W=y(c,t.__wbindgen_export4,t.__wbindgen_export5),R=p,j=y(a,t.__wbindgen_export4,t.__wbindgen_export5),T=p,O=y(d,t.__wbindgen_export4,t.__wbindgen_export5),L=p;t.exrstreamencoder_new(I,n,e,k,A,F,z,W,R,j,T,s,O,L,g,w);var b=o().getInt32(I+0,!0),x=o().getInt32(I+4,!0),m=o().getInt32(I+8,!0);if(m)throw u(x);return this.__wbg_ptr=b,vt.register(this,this.__wbg_ptr,this),this}finally{t.__wbindgen_add_to_stack_pointer(16)}}push_block(n){try{let s=t.__wbindgen_add_to_stack_pointer(-16);t.exrstreamencoder_push_block(s,this.__wbg_ptr,n);var e=o().getInt32(s+0,!0),_=o().getInt32(s+4,!0),i=o().getInt32(s+8,!0),c=o().getInt32(s+12,!0);if(c)throw u(i);var a=f(e,_).slice();return t.__wbindgen_export3(e,_*1,1),a}finally{t.__wbindgen_add_to_stack_pointer(16)}}rows_remaining(){return t.exrstreamencoder_rows_remaining(this.__wbg_ptr)>>>0}staging_ptr(){return t.exrstreamencoder_staging_ptr(this.__wbg_ptr)>>>0}staging_samples(){return t.exrstreamencoder_staging_samples(this.__wbg_ptr)>>>0}};Symbol.dispose&&(et.prototype[Symbol.dispose]=et.prototype.free);var nt=class{__destroy_into_raw(){let n=this.__wbg_ptr;return this.__wbg_ptr=0,xt.unregister(this),n}free(){let n=this.__destroy_into_raw();t.__wbg_proresbench_free(n,0)}constructor(n,e,_,i){try{let d=t.__wbindgen_add_to_stack_pointer(-16),g=y(_,t.__wbindgen_export4,t.__wbindgen_export5),w=p;t.proresbench_new(d,n,e,g,w,i);var c=o().getInt32(d+0,!0),a=o().getInt32(d+4,!0),s=o().getInt32(d+8,!0);if(s)throw u(a);return this.__wbg_ptr=c,xt.register(this,this.__wbg_ptr,this),this}finally{t.__wbindgen_add_to_stack_pointer(16)}}stage(n){try{let c=t.__wbindgen_add_to_stack_pointer(-16);t.proresbench_stage(c,this.__wbg_ptr,n);var e=o().getFloat64(c+0,!0),_=o().getInt32(c+8,!0),i=o().getInt32(c+12,!0);if(i)throw u(_);return e}finally{t.__wbindgen_add_to_stack_pointer(16)}}staging_len(){return t.proresbench_staging_len(this.__wbg_ptr)>>>0}staging_ptr(){return t.proresbench_staging_ptr(this.__wbg_ptr)>>>0}};Symbol.dispose&&(nt.prototype[Symbol.dispose]=nt.prototype.free);var rt=class{__destroy_into_raw(){let n=this.__wbg_ptr;return this.__wbg_ptr=0,yt.unregister(this),n}free(){let n=this.__destroy_into_raw();t.__wbg_proresmovencoder_free(n,0)}add_frame_rgba(n){try{let i=t.__wbindgen_add_to_stack_pointer(-16),c=l(n,t.__wbindgen_export4),a=p;t.proresmovencoder_add_frame_rgba(i,this.__wbg_ptr,c,a);var e=o().getInt32(i+0,!0),_=o().getInt32(i+4,!0);if(_)throw u(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}finish(){try{let i=t.__wbindgen_add_to_stack_pointer(-16);t.proresmovencoder_finish(i,this.__wbg_ptr);var n=o().getInt32(i+0,!0),e=o().getInt32(i+4,!0),_=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),_}finally{t.__wbindgen_add_to_stack_pointer(16)}}frame_count(){return t.proresmovencoder_frame_count(this.__wbg_ptr)>>>0}constructor(n,e,_,i){let c=t.proresmovencoder_new(n,e,_,i);return this.__wbg_ptr=c,yt.register(this,this.__wbg_ptr,this),this}set_alpha(n){t.proresmovencoder_set_alpha(this.__wbg_ptr,n)}set_bitrate_mbps(n){t.proresmovencoder_set_bitrate_mbps(this.__wbg_ptr,n)}set_qscale(n){t.proresmovencoder_set_qscale(this.__wbg_ptr,n)}};Symbol.dispose&&(rt.prototype[Symbol.dispose]=rt.prototype.free);var _t=class{__destroy_into_raw(){let n=this.__wbg_ptr;return this.__wbg_ptr=0,It.unregister(this),n}free(){let n=this.__destroy_into_raw();t.__wbg_proresmovwriter_free(n,0)}finish(){try{let i=t.__wbindgen_add_to_stack_pointer(-16);t.proresmovwriter_finish(i,this.__wbg_ptr);var n=o().getInt32(i+0,!0),e=o().getInt32(i+4,!0),_=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),_}finally{t.__wbindgen_add_to_stack_pointer(16)}}frame_count(){return t.proresmovwriter_frame_count(this.__wbg_ptr)>>>0}header(){try{let i=t.__wbindgen_add_to_stack_pointer(-16);t.proresmovwriter_header(i,this.__wbg_ptr);var n=o().getInt32(i+0,!0),e=o().getInt32(i+4,!0),_=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),_}finally{t.__wbindgen_add_to_stack_pointer(16)}}mdat_box_header(){try{let i=t.__wbindgen_add_to_stack_pointer(-16);t.proresmovwriter_mdat_box_header(i,this.__wbg_ptr);var n=o().getInt32(i+0,!0),e=o().getInt32(i+4,!0),_=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),_}finally{t.__wbindgen_add_to_stack_pointer(16)}}mdat_box_offset(){return t.proresmovwriter_mdat_box_offset(this.__wbg_ptr)}constructor(n,e,_,i){let c=t.proresmovwriter_new(n,e,_,i);return this.__wbg_ptr=c,It.register(this,this.__wbg_ptr,this),this}push_frame(){try{let a=t.__wbindgen_add_to_stack_pointer(-16);t.proresmovwriter_push_frame(a,this.__wbg_ptr);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}push_sample(n){try{let i=t.__wbindgen_add_to_stack_pointer(-16),c=l(n,t.__wbindgen_export4),a=p;t.proresmovwriter_push_sample(i,this.__wbg_ptr,c,a);var e=o().getInt32(i+0,!0),_=o().getInt32(i+4,!0);if(_)throw u(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}push_sample_len(n){try{let i=t.__wbindgen_add_to_stack_pointer(-16);t.proresmovwriter_push_sample_len(i,this.__wbg_ptr,n);var e=o().getInt32(i+0,!0),_=o().getInt32(i+4,!0);if(_)throw u(e)}finally{t.__wbindgen_add_to_stack_pointer(16)}}reserve_large_mdat(n){t.proresmovwriter_reserve_large_mdat(this.__wbg_ptr,n)}set_alpha(n){t.proresmovwriter_set_alpha(this.__wbg_ptr,n)}set_bitrate_mbps(n){t.proresmovwriter_set_bitrate_mbps(this.__wbg_ptr,n)}set_par(n,e){t.proresmovwriter_set_par(this.__wbg_ptr,n,e)}set_profile(n){let e=y(n,t.__wbindgen_export4,t.__wbindgen_export5),_=p;t.proresmovwriter_set_profile(this.__wbg_ptr,e,_)}set_qscale(n){t.proresmovwriter_set_qscale(this.__wbg_ptr,n)}set_start_timecode(n,e){t.proresmovwriter_set_start_timecode(this.__wbg_ptr,n,e)}staging_len(){return t.proresmovwriter_staging_len(this.__wbg_ptr)>>>0}staging_ptr(){return t.proresmovwriter_staging_ptr(this.__wbg_ptr)>>>0}total_len(){return t.proresmovwriter_total_len(this.__wbg_ptr)}};Symbol.dispose&&(_t.prototype[Symbol.dispose]=_t.prototype.free);function Nt(r){let n,e;try{let c=t.__wbindgen_add_to_stack_pointer(-16),a=l(r,t.__wbindgen_export4),s=p;t.arriraw12_clip_info(c,a,s);var _=o().getInt32(c+0,!0),i=o().getInt32(c+4,!0);return n=_,e=i,M(_,i)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_export3(n,e,1)}}function Gt(r,n,e,_){var i=E(_)?0:y(_,t.__wbindgen_export4,t.__wbindgen_export5),c=p;let a=t.arriraw_mxf_gpu_frame(v(r),n,e,i,c);return u(a)}function Xt(r,n,e){let _=t.audio_aac_au(v(r),n,e);return u(_)}function Yt(r,n){let e=t.audio_aac_config(v(r),n);return u(e)}function Jt(r,n){let e=t.audio_info(v(r),n);return u(e)}function Kt(r){let n=ut(r,t.__wbindgen_export4),e=p;return t.bench_f32_boundary(n,e)}function Qt(r,n,e,_){let i=ut(r,t.__wbindgen_export4),c=p;return t.bench_piz_no_huffman(i,c,n,e,_)}function Zt(r,n,e){let _=S(r,t.__wbindgen_export4),i=p;return t.dci_code_full_depth(_,i,n,e)}function $t(r,n,e){return t.dci_frame_cap(r,n,e)>>>0}function te(r,n){try{let s=t.__wbindgen_add_to_stack_pointer(-16),d=l(r,t.__wbindgen_export4),g=p,w=y(n,t.__wbindgen_export4,t.__wbindgen_export5),b=p;t.dci_gpu_colour_patch(s,d,g,w,b);var e=o().getInt32(s+0,!0),_=o().getInt32(s+4,!0),i=o().getInt32(s+8,!0),c=o().getInt32(s+12,!0);if(c)throw u(i);var a=gt(e,_).slice();return t.__wbindgen_export3(e,_*2,2),a}finally{t.__wbindgen_add_to_stack_pointer(16)}}function ee(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=y(r,t.__wbindgen_export4,t.__wbindgen_export5),d=p;t.dci_gpu_colour_tables(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function ne(){try{let _=t.__wbindgen_add_to_stack_pointer(-16);t.dci_last_pass_caps(_);var r=o().getInt32(_+0,!0),n=o().getInt32(_+4,!0),e=ot(r,n).slice();return t.__wbindgen_export3(r,n*4,4),e}finally{t.__wbindgen_add_to_stack_pointer(16)}}function re(r,n){try{let c=t.__wbindgen_add_to_stack_pointer(-16);t.dci_legal_rates(c,r,n);var e=o().getInt32(c+0,!0),_=o().getInt32(c+4,!0),i=ot(e,_).slice();return t.__wbindgen_export3(e,_*4,4),i}finally{t.__wbindgen_add_to_stack_pointer(16)}}function _e(r){return t.dci_mq_bench(r)>>>0}function oe(r,n,e,_,i,c,a,s,d,g,w){try{let A=t.__wbindgen_add_to_stack_pointer(-16),F=U(r,t.__wbindgen_export4),z=p,W=l(n,t.__wbindgen_export4),R=p,j=U(e,t.__wbindgen_export4),T=p,O=U(_,t.__wbindgen_export4),L=p,P=U(i,t.__wbindgen_export4),B=p,it=U(c,t.__wbindgen_export4),at=p,ct=U(a,t.__wbindgen_export4),st=p,Wt=U(s,t.__wbindgen_export4),jt=p;t.dci_pack_tier1(A,F,z,W,R,j,T,O,L,P,B,it,at,ct,st,Wt,jt,d,g,w);var b=o().getInt32(A+0,!0),x=o().getInt32(A+4,!0),m=o().getInt32(A+8,!0),I=o().getInt32(A+12,!0);if(I)throw u(m);var k=f(b,x).slice();return t.__wbindgen_export3(b,x*1,1),k}finally{t.__wbindgen_add_to_stack_pointer(16)}}function ie(r,n){let e=t.dci_stage_rgba8(r,n);return u(e)}function ae(r,n,e){let _=S(r,t.__wbindgen_export4),i=p;return t.dci_transform_only(_,i,n,e)}function ce(r,n){try{let s=t.__wbindgen_add_to_stack_pointer(-16),d=l(r,t.__wbindgen_export4),g=p,w=l(n,t.__wbindgen_export4),b=p;t.decode_arriraw12_luma(s,d,g,w,b);var e=o().getInt32(s+0,!0),_=o().getInt32(s+4,!0),i=o().getInt32(s+8,!0),c=o().getInt32(s+12,!0);if(c)throw u(i);var a=f(e,_).slice();return t.__wbindgen_export3(e,_*1,1),a}finally{t.__wbindgen_add_to_stack_pointer(16)}}function se(r,n,e,_){let i=y(_,t.__wbindgen_export4,t.__wbindgen_export5),c=p,a=t.decode_arriraw12_mxf(v(r),n,e,i,c);return u(a)}function de(r,n,e){try{let d=t.__wbindgen_add_to_stack_pointer(-16),g=l(r,t.__wbindgen_export4),w=p,b=l(n,t.__wbindgen_export4),x=p;t.decode_arriraw12_preview(d,g,w,b,x,e);var _=o().getInt32(d+0,!0),i=o().getInt32(d+4,!0),c=o().getInt32(d+8,!0),a=o().getInt32(d+12,!0);if(a)throw u(c);var s=f(_,i).slice();return t.__wbindgen_export3(_,i*1,1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}function pe(r,n){try{let s=t.__wbindgen_add_to_stack_pointer(-16),d=l(r,t.__wbindgen_export4),g=p,w=l(n,t.__wbindgen_export4),b=p;t.decode_arriraw12_rgba(s,d,g,w,b);var e=o().getInt32(s+0,!0),_=o().getInt32(s+4,!0),i=o().getInt32(s+8,!0),c=o().getInt32(s+12,!0);if(c)throw u(i);var a=f(e,_).slice();return t.__wbindgen_export3(e,_*1,1),a}finally{t.__wbindgen_add_to_stack_pointer(16)}}function ge(r,n,e){try{let d=t.__wbindgen_add_to_stack_pointer(-16),g=l(r,t.__wbindgen_export4),w=p;t.decode_arriraw_luma(d,g,w,n,e);var _=o().getInt32(d+0,!0),i=o().getInt32(d+4,!0),c=o().getInt32(d+8,!0),a=o().getInt32(d+12,!0);if(a)throw u(c);var s=f(_,i).slice();return t.__wbindgen_export3(_,i*1,1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}function ue(r,n,e,_){let i=y(_,t.__wbindgen_export4,t.__wbindgen_export5),c=p,a=t.decode_arriraw_mxf(v(r),n,e,i,c);return u(a)}function we(r,n,e,_){try{let g=t.__wbindgen_add_to_stack_pointer(-16),w=l(r,t.__wbindgen_export4),b=p;t.decode_arriraw_preview(g,w,b,n,e,_);var i=o().getInt32(g+0,!0),c=o().getInt32(g+4,!0),a=o().getInt32(g+8,!0),s=o().getInt32(g+12,!0);if(s)throw u(a);var d=f(i,c).slice();return t.__wbindgen_export3(i,c*1,1),d}finally{t.__wbindgen_add_to_stack_pointer(16)}}function be(r,n,e,_){try{let g=t.__wbindgen_add_to_stack_pointer(-16),w=l(r,t.__wbindgen_export4),b=p;t.decode_arriraw_preview_gray(g,w,b,n,e,_);var i=o().getInt32(g+0,!0),c=o().getInt32(g+4,!0),a=o().getInt32(g+8,!0),s=o().getInt32(g+12,!0);if(s)throw u(a);var d=f(i,c).slice();return t.__wbindgen_export3(i,c*1,1),d}finally{t.__wbindgen_add_to_stack_pointer(16)}}function le(r,n,e,_,i,c,a,s,d){try{let A=t.__wbindgen_add_to_stack_pointer(-16),F=l(r,t.__wbindgen_export4),z=p;var g=E(d)?0:J(d,t.__wbindgen_export4),w=p;t.decode_arriraw_preview_meta(A,F,z,n,e,_,i,c,a,s,g,w);var b=o().getInt32(A+0,!0),x=o().getInt32(A+4,!0),m=o().getInt32(A+8,!0),I=o().getInt32(A+12,!0);if(I)throw u(m);var k=f(b,x).slice();return t.__wbindgen_export3(b,x*1,1),k}finally{t.__wbindgen_add_to_stack_pointer(16)}}function fe(r,n,e){try{let d=t.__wbindgen_add_to_stack_pointer(-16),g=l(r,t.__wbindgen_export4),w=p;t.decode_arriraw_rgba(d,g,w,n,e);var _=o().getInt32(d+0,!0),i=o().getInt32(d+4,!0),c=o().getInt32(d+8,!0),a=o().getInt32(d+12,!0);if(a)throw u(c);var s=f(_,i).slice();return t.__wbindgen_export3(_,i*1,1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}function ve(r,n,e,_,i,c,a,s){try{let k=t.__wbindgen_add_to_stack_pointer(-16),A=l(r,t.__wbindgen_export4),F=p;var d=E(s)?0:J(s,t.__wbindgen_export4),g=p;t.decode_arriraw_rgba_meta(k,A,F,n,e,_,i,c,a,d,g);var w=o().getInt32(k+0,!0),b=o().getInt32(k+4,!0),x=o().getInt32(k+8,!0),m=o().getInt32(k+12,!0);if(m)throw u(x);var I=f(w,b).slice();return t.__wbindgen_export3(w,b*1,1),I}finally{t.__wbindgen_add_to_stack_pointer(16)}}function xe(r,n,e,_){let i=t.decode_audio_pcm(v(r),n,e,_);return u(i)}function ye(r){try{let i=t.__wbindgen_add_to_stack_pointer(-16),c=l(r,t.__wbindgen_export4),a=p;t.decode_braw_gen5log(i,c,a);var n=o().getInt32(i+0,!0),e=o().getInt32(i+4,!0),_=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),_}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Ie(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_braw_luma(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function me(r,n){try{let s=t.__wbindgen_add_to_stack_pointer(-16),d=l(r,t.__wbindgen_export4),g=p;t.decode_braw_preview(s,d,g,n);var e=o().getInt32(s+0,!0),_=o().getInt32(s+4,!0),i=o().getInt32(s+8,!0),c=o().getInt32(s+12,!0);if(c)throw u(i);var a=f(e,_).slice();return t.__wbindgen_export3(e,_*1,1),a}finally{t.__wbindgen_add_to_stack_pointer(16)}}function he(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_braw_rgba(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function ke(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_cr3_rgba(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Ae(r,n,e,_){let i=y(_,t.__wbindgen_export4,t.__wbindgen_export5),c=p,a=t.decode_crm(v(r),n,e,i,c);return u(a)}function Fe(r,n){try{let s=t.__wbindgen_add_to_stack_pointer(-16),d=l(r,t.__wbindgen_export4),g=p;t.decode_dng_preview(s,d,g,n);var e=o().getInt32(s+0,!0),_=o().getInt32(s+4,!0),i=o().getInt32(s+8,!0),c=o().getInt32(s+12,!0);if(c)throw u(i);var a=f(e,_).slice();return t.__wbindgen_export3(e,_*1,1),a}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Me(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_dng_rgba(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Re(r,n){try{let s=t.__wbindgen_add_to_stack_pointer(-16),d=l(r,t.__wbindgen_export4),g=p;t.decode_dpx_preview(s,d,g,n);var e=o().getInt32(s+0,!0),_=o().getInt32(s+4,!0),i=o().getInt32(s+8,!0),c=o().getInt32(s+12,!0);if(c)throw u(i);var a=f(e,_).slice();return t.__wbindgen_export3(e,_*1,1),a}finally{t.__wbindgen_add_to_stack_pointer(16)}}function ze(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_dpx_rgba(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function We(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_exr_linear(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function je(r,n){try{let s=t.__wbindgen_add_to_stack_pointer(-16),d=l(r,t.__wbindgen_export4),g=p;t.decode_exr_preview(s,d,g,n);var e=o().getInt32(s+0,!0),_=o().getInt32(s+4,!0),i=o().getInt32(s+8,!0),c=o().getInt32(s+12,!0);if(c)throw u(i);var a=f(e,_).slice();return t.__wbindgen_export3(e,_*1,1),a}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Te(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_exr_rgba(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Se(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_jpeg_rgba(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Ue(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_png_rgba(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Oe(r,n,e){try{let d=t.__wbindgen_add_to_stack_pointer(-16),g=l(r,t.__wbindgen_export4),w=p;t.decode_prores_band_rgba(d,g,w,n,e);var _=o().getInt32(d+0,!0),i=o().getInt32(d+4,!0),c=o().getInt32(d+8,!0),a=o().getInt32(d+12,!0);if(a)throw u(c);var s=f(_,i).slice();return t.__wbindgen_export3(_,i*1,1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}function qe(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_prores_luma(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Le(r,n,e,_){let i=y(_,t.__wbindgen_export4,t.__wbindgen_export5),c=p,a=t.decode_prores_mxf(v(r),n,e,i,c);return u(a)}function Ee(r,n){try{let s=t.__wbindgen_add_to_stack_pointer(-16),d=l(r,t.__wbindgen_export4),g=p;t.decode_prores_preview(s,d,g,n);var e=o().getInt32(s+0,!0),_=o().getInt32(s+4,!0),i=o().getInt32(s+8,!0),c=o().getInt32(s+12,!0);if(c)throw u(i);var a=f(e,_).slice();return t.__wbindgen_export3(e,_*1,1),a}finally{t.__wbindgen_add_to_stack_pointer(16)}}function De(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_prores_raw_acescct(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Pe(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_prores_raw_luma(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Be(r,n){try{let s=t.__wbindgen_add_to_stack_pointer(-16),d=l(r,t.__wbindgen_export4),g=p;t.decode_prores_raw_preview(s,d,g,n);var e=o().getInt32(s+0,!0),_=o().getInt32(s+4,!0),i=o().getInt32(s+8,!0),c=o().getInt32(s+12,!0);if(c)throw u(i);var a=f(e,_).slice();return t.__wbindgen_export3(e,_*1,1),a}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Ce(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_prores_raw_rec2020(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Ve(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_prores_raw_rgba(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function He(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_prores_rgb16(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Ne(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_prores_rgba(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Ge(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_prores_thumb_dc32(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Xe(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_r3d_luma(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Ye(r,n){try{let s=t.__wbindgen_add_to_stack_pointer(-16),d=l(r,t.__wbindgen_export4),g=p;t.decode_r3d_preview(s,d,g,n);var e=o().getInt32(s+0,!0),_=o().getInt32(s+4,!0),i=o().getInt32(s+8,!0),c=o().getInt32(s+12,!0);if(c)throw u(i);var a=f(e,_).slice();return t.__wbindgen_export3(e,_*1,1),a}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Je(r,n,e){try{let d=t.__wbindgen_add_to_stack_pointer(-16),g=l(r,t.__wbindgen_export4),w=p,b=l(n,t.__wbindgen_export4),x=p;t.decode_r3d_preview_clip(d,g,w,b,x,e);var _=o().getInt32(d+0,!0),i=o().getInt32(d+4,!0),c=o().getInt32(d+8,!0),a=o().getInt32(d+12,!0);if(a)throw u(c);var s=f(_,i).slice();return t.__wbindgen_export3(_,i*1,1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Ke(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_r3d_rgb16(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Qe(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_r3d_rgba(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Ze(r,n){try{let s=t.__wbindgen_add_to_stack_pointer(-16),d=l(r,t.__wbindgen_export4),g=p,w=l(n,t.__wbindgen_export4),b=p;t.decode_r3d_rgba_clip(s,d,g,w,b);var e=o().getInt32(s+0,!0),_=o().getInt32(s+4,!0),i=o().getInt32(s+8,!0),c=o().getInt32(s+12,!0);if(c)throw u(i);var a=f(e,_).slice();return t.__wbindgen_export3(e,_*1,1),a}finally{t.__wbindgen_add_to_stack_pointer(16)}}function $e(r,n){try{let s=t.__wbindgen_add_to_stack_pointer(-16),d=l(r,t.__wbindgen_export4),g=p;t.decode_tiff_preview(s,d,g,n);var e=o().getInt32(s+0,!0),_=o().getInt32(s+4,!0),i=o().getInt32(s+8,!0),c=o().getInt32(s+12,!0);if(c)throw u(i);var a=f(e,_).slice();return t.__wbindgen_export3(e,_*1,1),a}finally{t.__wbindgen_add_to_stack_pointer(16)}}function tn(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_tiff_rgba(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function en(r,n,e){try{let d=t.__wbindgen_add_to_stack_pointer(-16),g=l(r,t.__wbindgen_export4),w=p;t.decode_vc3_band_rgba(d,g,w,n,e);var _=o().getInt32(d+0,!0),i=o().getInt32(d+4,!0),c=o().getInt32(d+8,!0),a=o().getInt32(d+12,!0);if(a)throw u(c);var s=f(_,i).slice();return t.__wbindgen_export3(_,i*1,1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}function nn(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_vc3_luma(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function rn(r,n,e,_){let i=y(_,t.__wbindgen_export4,t.__wbindgen_export5),c=p,a=t.decode_vc3_mxf(v(r),n,e,i,c);return u(a)}function _n(r,n){try{let s=t.__wbindgen_add_to_stack_pointer(-16),d=l(r,t.__wbindgen_export4),g=p;t.decode_vc3_preview(s,d,g,n);var e=o().getInt32(s+0,!0),_=o().getInt32(s+4,!0),i=o().getInt32(s+8,!0),c=o().getInt32(s+12,!0);if(c)throw u(i);var a=f(e,_).slice();return t.__wbindgen_export3(e,_*1,1),a}finally{t.__wbindgen_add_to_stack_pointer(16)}}function on(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_vc3_rgba(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function an(r){try{let i=t.__wbindgen_add_to_stack_pointer(-16),c=l(r,t.__wbindgen_export4),a=p;t.decode_xocn_index_luma(i,c,a);var n=o().getInt32(i+0,!0),e=o().getInt32(i+4,!0),_=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),_}finally{t.__wbindgen_add_to_stack_pointer(16)}}function cn(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_xocn_luma(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function sn(r,n,e,_){let i=y(_,t.__wbindgen_export4,t.__wbindgen_export5),c=p,a=t.decode_xocn_mxf(v(r),n,e,i,c);return u(a)}function dn(r,n){try{let s=t.__wbindgen_add_to_stack_pointer(-16),d=l(r,t.__wbindgen_export4),g=p;t.decode_xocn_preview(s,d,g,n);var e=o().getInt32(s+0,!0),_=o().getInt32(s+4,!0),i=o().getInt32(s+8,!0),c=o().getInt32(s+12,!0);if(c)throw u(i);var a=f(e,_).slice();return t.__wbindgen_export3(e,_*1,1),a}finally{t.__wbindgen_add_to_stack_pointer(16)}}function pn(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_xocn_preview_rec709(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function gn(r){try{let i=t.__wbindgen_add_to_stack_pointer(-16),c=l(r,t.__wbindgen_export4),a=p;t.decode_xocn_rgb16(i,c,a);var n=o().getInt32(i+0,!0),e=o().getInt32(i+4,!0),_=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),_}finally{t.__wbindgen_add_to_stack_pointer(16)}}function un(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.decode_xocn_rgba(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function wn(r,n,e,_){try{let g=t.__wbindgen_add_to_stack_pointer(-16),w=S(r,t.__wbindgen_export4),b=p;t.encode_dci_j2c(g,w,b,n,e,_);var i=o().getInt32(g+0,!0),c=o().getInt32(g+4,!0),a=o().getInt32(g+8,!0),s=o().getInt32(g+12,!0);if(s)throw u(a);var d=f(i,c).slice();return t.__wbindgen_export3(i,c*1,1),d}finally{t.__wbindgen_add_to_stack_pointer(16)}}function bn(r,n,e,_,i,c){try{let b=t.__wbindgen_add_to_stack_pointer(-16),x=S(r,t.__wbindgen_export4),m=p,I=y(e,t.__wbindgen_export4,t.__wbindgen_export5),k=p;t.encode_dci_j2c_rgb(b,x,m,n,I,k,_,i,c);var a=o().getInt32(b+0,!0),s=o().getInt32(b+4,!0),d=o().getInt32(b+8,!0),g=o().getInt32(b+12,!0);if(g)throw u(d);var w=f(a,s).slice();return t.__wbindgen_export3(a,s*1,1),w}finally{t.__wbindgen_add_to_stack_pointer(16)}}function ln(r,n,e,_,i){try{let w=t.__wbindgen_add_to_stack_pointer(-16),b=l(r,t.__wbindgen_export4),x=p,m=y(n,t.__wbindgen_export4,t.__wbindgen_export5),I=p;t.encode_dci_j2c_rgba8(w,b,x,m,I,e,_,i);var c=o().getInt32(w+0,!0),a=o().getInt32(w+4,!0),s=o().getInt32(w+8,!0),d=o().getInt32(w+12,!0);if(d)throw u(s);var g=f(c,a).slice();return t.__wbindgen_export3(c,a*1,1),g}finally{t.__wbindgen_add_to_stack_pointer(16)}}function fn(r,n,e,_,i){try{let w=t.__wbindgen_add_to_stack_pointer(-16),b=y(_,t.__wbindgen_export4,t.__wbindgen_export5),x=p;t.encode_dci_j2c_staged(w,r,n,e,b,x,i);var c=o().getInt32(w+0,!0),a=o().getInt32(w+4,!0),s=o().getInt32(w+8,!0),d=o().getInt32(w+12,!0);if(d)throw u(s);var g=f(c,a).slice();return t.__wbindgen_export3(c,a*1,1),g}finally{t.__wbindgen_add_to_stack_pointer(16)}}function vn(r,n,e,_,i){try{let w=t.__wbindgen_add_to_stack_pointer(-16),b=y(_,t.__wbindgen_export4,t.__wbindgen_export5),x=p;t.encode_dci_j2c_staged_modelled(w,r,n,e,b,x,i);var c=o().getInt32(w+0,!0),a=o().getInt32(w+4,!0),s=o().getInt32(w+8,!0),d=o().getInt32(w+12,!0);if(d)throw u(s);var g=f(c,a).slice();return t.__wbindgen_export3(c,a*1,1),g}finally{t.__wbindgen_add_to_stack_pointer(16)}}function xn(r,n,e,_,i,c,a,s,d,g,w,b,x,m,I){try{let R=t.__wbindgen_add_to_stack_pointer(-16),j=ut(r,t.__wbindgen_export4),T=p,O=y(i,t.__wbindgen_export4,t.__wbindgen_export5),L=p,P=y(c,t.__wbindgen_export4,t.__wbindgen_export5),B=p,it=y(a,t.__wbindgen_export4,t.__wbindgen_export5),at=p,ct=y(x,t.__wbindgen_export4,t.__wbindgen_export5),st=p;t.encode_exr(R,j,T,n,e,_,O,L,P,B,it,at,s,d,g,w,b,ct,st,m,I);var k=o().getInt32(R+0,!0),A=o().getInt32(R+4,!0),F=o().getInt32(R+8,!0),z=o().getInt32(R+12,!0);if(z)throw u(F);var W=f(k,A).slice();return t.__wbindgen_export3(k,A*1,1),W}finally{t.__wbindgen_add_to_stack_pointer(16)}}function yn(r,n,e,_,i){try{let w=t.__wbindgen_add_to_stack_pointer(-16),b=l(r,t.__wbindgen_export4),x=p;t.encode_prores_4444_alpha_mov_rgba(w,b,x,n,e,_,i);var c=o().getInt32(w+0,!0),a=o().getInt32(w+4,!0),s=o().getInt32(w+8,!0),d=o().getInt32(w+12,!0);if(d)throw u(s);var g=f(c,a).slice();return t.__wbindgen_export3(c,a*1,1),g}finally{t.__wbindgen_add_to_stack_pointer(16)}}function In(r,n,e,_){try{let g=t.__wbindgen_add_to_stack_pointer(-16),w=l(r,t.__wbindgen_export4),b=p;t.encode_prores_4444_alpha_sample_q(g,w,b,n,e,_);var i=o().getInt32(g+0,!0),c=o().getInt32(g+4,!0),a=o().getInt32(g+8,!0),s=o().getInt32(g+12,!0);if(s)throw u(a);var d=f(i,c).slice();return t.__wbindgen_export3(i,c*1,1),d}finally{t.__wbindgen_add_to_stack_pointer(16)}}function mn(r,n,e,_){try{let g=t.__wbindgen_add_to_stack_pointer(-16),w=l(r,t.__wbindgen_export4),b=p;t.encode_prores_444_sample_cbr(g,w,b,n,e,_);var i=o().getInt32(g+0,!0),c=o().getInt32(g+4,!0),a=o().getInt32(g+8,!0),s=o().getInt32(g+12,!0);if(s)throw u(a);var d=f(i,c).slice();return t.__wbindgen_export3(i,c*1,1),d}finally{t.__wbindgen_add_to_stack_pointer(16)}}function hn(r,n,e,_){try{let g=t.__wbindgen_add_to_stack_pointer(-16),w=S(r,t.__wbindgen_export4),b=p;t.encode_prores_444_sample_cbr_rgb16(g,w,b,n,e,_);var i=o().getInt32(g+0,!0),c=o().getInt32(g+4,!0),a=o().getInt32(g+8,!0),s=o().getInt32(g+12,!0);if(s)throw u(a);var d=f(i,c).slice();return t.__wbindgen_export3(i,c*1,1),d}finally{t.__wbindgen_add_to_stack_pointer(16)}}function kn(r,n,e,_,i){try{let w=t.__wbindgen_add_to_stack_pointer(-16),b=S(r,t.__wbindgen_export4),x=p,m=S(i,t.__wbindgen_export4),I=p;t.encode_prores_444_sample_cbr_rgb16_lut(w,b,x,n,e,_,m,I);var c=o().getInt32(w+0,!0),a=o().getInt32(w+4,!0),s=o().getInt32(w+8,!0),d=o().getInt32(w+12,!0);if(d)throw u(s);var g=f(c,a).slice();return t.__wbindgen_export3(c,a*1,1),g}finally{t.__wbindgen_add_to_stack_pointer(16)}}function An(r,n,e,_,i){try{let w=t.__wbindgen_add_to_stack_pointer(-16),b=l(r,t.__wbindgen_export4),x=p;t.encode_prores_mov_rgba(w,b,x,n,e,_,i);var c=o().getInt32(w+0,!0),a=o().getInt32(w+4,!0),s=o().getInt32(w+8,!0),d=o().getInt32(w+12,!0);if(d)throw u(s);var g=f(c,a).slice();return t.__wbindgen_export3(c,a*1,1),g}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Fn(r,n,e){try{let d=t.__wbindgen_add_to_stack_pointer(-16),g=l(r,t.__wbindgen_export4),w=p;t.encode_prores_rgba(d,g,w,n,e);var _=o().getInt32(d+0,!0),i=o().getInt32(d+4,!0),c=o().getInt32(d+8,!0),a=o().getInt32(d+12,!0);if(a)throw u(c);var s=f(_,i).slice();return t.__wbindgen_export3(_,i*1,1),s}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Mn(r,n,e,_){try{let g=t.__wbindgen_add_to_stack_pointer(-16),w=l(r,t.__wbindgen_export4),b=p;t.encode_prores_sample_cbr(g,w,b,n,e,_);var i=o().getInt32(g+0,!0),c=o().getInt32(g+4,!0),a=o().getInt32(g+8,!0),s=o().getInt32(g+12,!0);if(s)throw u(a);var d=f(i,c).slice();return t.__wbindgen_export3(i,c*1,1),d}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Rn(r,n,e,_){try{let g=t.__wbindgen_add_to_stack_pointer(-16),w=S(r,t.__wbindgen_export4),b=p;t.encode_prores_sample_cbr_rgb16(g,w,b,n,e,_);var i=o().getInt32(g+0,!0),c=o().getInt32(g+4,!0),a=o().getInt32(g+8,!0),s=o().getInt32(g+12,!0);if(s)throw u(a);var d=f(i,c).slice();return t.__wbindgen_export3(i,c*1,1),d}finally{t.__wbindgen_add_to_stack_pointer(16)}}function zn(r,n,e,_,i){try{let w=t.__wbindgen_add_to_stack_pointer(-16),b=S(r,t.__wbindgen_export4),x=p,m=S(i,t.__wbindgen_export4),I=p;t.encode_prores_sample_cbr_rgb16_lut(w,b,x,n,e,_,m,I);var c=o().getInt32(w+0,!0),a=o().getInt32(w+4,!0),s=o().getInt32(w+8,!0),d=o().getInt32(w+12,!0);if(d)throw u(s);var g=f(c,a).slice();return t.__wbindgen_export3(c,a*1,1),g}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Wn(r,n,e,_){try{let g=t.__wbindgen_add_to_stack_pointer(-16),w=l(r,t.__wbindgen_export4),b=p;t.encode_prores_sample_q(g,w,b,n,e,_);var i=o().getInt32(g+0,!0),c=o().getInt32(g+4,!0),a=o().getInt32(g+8,!0),s=o().getInt32(g+12,!0);if(s)throw u(a);var d=f(i,c).slice();return t.__wbindgen_export3(i,c*1,1),d}finally{t.__wbindgen_add_to_stack_pointer(16)}}function jn(r,n,e,_){let i,c;try{let x=t.__wbindgen_add_to_stack_pointer(-16),m=y(r,t.__wbindgen_export4,t.__wbindgen_export5),I=p;t.exr_sequence_filename(x,m,I,n,e,_);var a=o().getInt32(x+0,!0),s=o().getInt32(x+4,!0),d=o().getInt32(x+8,!0),g=o().getInt32(x+12,!0),w=a,b=s;if(g)throw w=0,b=0,u(d);return i=w,c=b,M(w,b)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_export3(i,c,1)}}function Tn(r,n,e,_,i,c,a,s){let d,g;try{let A=t.__wbindgen_add_to_stack_pointer(-16),F=l(r,t.__wbindgen_export4),z=p,W=l(_,t.__wbindgen_export4),R=p,j=y(s,t.__wbindgen_export4,t.__wbindgen_export5),T=p;t.fit_sizing(A,F,z,n,e,W,R,i,c,a,j,T);var w=o().getInt32(A+0,!0),b=o().getInt32(A+4,!0),x=o().getInt32(A+8,!0),m=o().getInt32(A+12,!0),I=w,k=b;if(m)throw I=0,k=0,u(x);return d=I,g=k,M(I,k)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_export3(d,g,1)}}function Sn(r){let n=t.initThreadPool(r);return u(n)}function Un(r){let n,e;try{let c=t.__wbindgen_add_to_stack_pointer(-16),a=l(r,t.__wbindgen_export4),s=p;t.inspect_cr3(c,a,s);var _=o().getInt32(c+0,!0),i=o().getInt32(c+4,!0);return n=_,e=i,M(_,i)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_export3(n,e,1)}}function On(r){let n,e;try{let c=t.__wbindgen_add_to_stack_pointer(-16),a=l(r,t.__wbindgen_export4),s=p;t.inspect_dng(c,a,s);var _=o().getInt32(c+0,!0),i=o().getInt32(c+4,!0);return n=_,e=i,M(_,i)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_export3(n,e,1)}}function qn(r){let n,e;try{let c=t.__wbindgen_add_to_stack_pointer(-16),a=l(r,t.__wbindgen_export4),s=p;t.inspect_dpx(c,a,s);var _=o().getInt32(c+0,!0),i=o().getInt32(c+4,!0);return n=_,e=i,M(_,i)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_export3(n,e,1)}}function Ln(r){let n,e;try{let c=t.__wbindgen_add_to_stack_pointer(-16),a=l(r,t.__wbindgen_export4),s=p;t.inspect_exr(c,a,s);var _=o().getInt32(c+0,!0),i=o().getInt32(c+4,!0);return n=_,e=i,M(_,i)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_export3(n,e,1)}}function En(r,n,e){let _=y(e,t.__wbindgen_export4,t.__wbindgen_export5),i=p,c=t.inspect_isobmff(v(r),n,_,i);return u(c)}function Dn(r){let n,e;try{let c=t.__wbindgen_add_to_stack_pointer(-16),a=l(r,t.__wbindgen_export4),s=p;t.inspect_tiff(c,a,s);var _=o().getInt32(c+0,!0),i=o().getInt32(c+4,!0);return n=_,e=i,M(_,i)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_export3(n,e,1)}}function Pn(r,n){let e=t.inspect_wav(v(r),n);return u(e)}function Bn(r,n){let e=t.is_arriraw12_mxf(v(r),n);return u(e)}function Cn(r,n){let e=t.is_arriraw_mxf(v(r),n);return u(e)}function Vn(r,n){let e=t.is_crm(v(r),n);return u(e)}function Hn(r,n){let e=t.is_prores_mxf(v(r),n);return u(e)}function Nn(r,n){let e=t.is_vc3_mxf(v(r),n);return u(e)}function Gn(r,n){let e=t.is_xavc_mxf(v(r),n);return u(e)}function Xn(r,n){let e=t.is_xocn_mxf(v(r),n);return u(e)}function Yn(r,n,e){let _=y(e,t.__wbindgen_export4,t.__wbindgen_export5),i=p,c=t.list_isobmff_segments(v(r),n,_,i);return u(c)}function Jn(r,n){let e=t.list_mxf_segments(v(r),n);return u(e)}function Kn(r,n){let e=y(n,t.__wbindgen_export4,t.__wbindgen_export5),_=p,i=t.list_r3d_frames(v(r),e,_);return u(i)}function Qn(r,n){let e=y(n,t.__wbindgen_export4,t.__wbindgen_export5),_=p,i=t.list_r3d_segments(v(r),e,_);return u(i)}function Zn(r,n){let e=t.list_wav_segments(v(r),n);return u(e)}function $n(r,n,e,_,i,c){try{let b=t.__wbindgen_add_to_stack_pointer(-16),x=l(r,t.__wbindgen_export4),m=p,I=U(n,t.__wbindgen_export4),k=p;t.mux_prores_4444_alpha_samples(b,x,m,I,k,e,_,i,c);var a=o().getInt32(b+0,!0),s=o().getInt32(b+4,!0),d=o().getInt32(b+8,!0),g=o().getInt32(b+12,!0);if(g)throw u(d);var w=f(a,s).slice();return t.__wbindgen_export3(a,s*1,1),w}finally{t.__wbindgen_add_to_stack_pointer(16)}}function tr(r,n,e,_,i,c){try{let b=t.__wbindgen_add_to_stack_pointer(-16),x=l(r,t.__wbindgen_export4),m=p,I=U(n,t.__wbindgen_export4),k=p;t.mux_prores_samples(b,x,m,I,k,e,_,i,c);var a=o().getInt32(b+0,!0),s=o().getInt32(b+4,!0),d=o().getInt32(b+8,!0),g=o().getInt32(b+12,!0);if(g)throw u(d);var w=f(a,s).slice();return t.__wbindgen_export3(a,s*1,1),w}finally{t.__wbindgen_add_to_stack_pointer(16)}}function er(r,n,e,_,i,c,a,s,d,g,w,b){try{let F=t.__wbindgen_add_to_stack_pointer(-16),z=l(r,t.__wbindgen_export4),W=p,R=U(n,t.__wbindgen_export4),j=p,T=y(a,t.__wbindgen_export4,t.__wbindgen_export5),O=p;t.mux_prores_samples_full(F,z,W,R,j,e,_,i,c,T,O,s,d,g,w,b);var x=o().getInt32(F+0,!0),m=o().getInt32(F+4,!0),I=o().getInt32(F+8,!0),k=o().getInt32(F+12,!0);if(k)throw u(I);var A=f(x,m).slice();return t.__wbindgen_export3(x,m*1,1),A}finally{t.__wbindgen_add_to_stack_pointer(16)}}function nr(r,n,e,_){let i=t.mxf_au_run(v(r),n,e,_);return u(i)}function rr(r,n){let e=t.mxf_frame_index(v(r),n);return u(e)}function _r(r,n){let e=t.mxf_gop_map(v(r),n);return u(e)}function or(r,n){let e=t.mxf_h264_kind(v(r),n);return u(e)}function ir(r,n){let e,_;try{let w=t.__wbindgen_add_to_stack_pointer(-16),b=l(r,t.__wbindgen_export4),x=p,m=y(n,t.__wbindgen_export4,t.__wbindgen_export5),I=p;t.plan_isobmff_trim(w,b,x,m,I);var i=o().getInt32(w+0,!0),c=o().getInt32(w+4,!0),a=o().getInt32(w+8,!0),s=o().getInt32(w+12,!0),d=i,g=c;if(s)throw d=0,g=0,u(a);return e=d,_=g,M(d,g)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_export3(e,_,1)}}function ar(r,n,e,_,i){let c=y(i,t.__wbindgen_export4,t.__wbindgen_export5),a=p,s=t.plan_isobmff_trim_reader(v(r),n,e,_,c,a);return u(s)}function cr(r){let n,e;try{let g=t.__wbindgen_add_to_stack_pointer(-16),w=y(r,t.__wbindgen_export4,t.__wbindgen_export5),b=p;t.plan_mxf_compact_trim(g,w,b);var _=o().getInt32(g+0,!0),i=o().getInt32(g+4,!0),c=o().getInt32(g+8,!0),a=o().getInt32(g+12,!0),s=_,d=i;if(a)throw s=0,d=0,u(c);return n=s,e=d,M(s,d)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_export3(n,e,1)}}function sr(r,n,e,_){let i=t.plan_mxf_trim(v(r),n,e,_);return u(i)}function dr(r,n,e,_,i,c,a,s){let d,g;try{let x=t.__wbindgen_add_to_stack_pointer(-16),m=l(r,t.__wbindgen_export4),I=p,k=l(n,t.__wbindgen_export4),A=p,F=l(e,t.__wbindgen_export4),z=p,W=l(_,t.__wbindgen_export4),R=p,j=J(i,t.__wbindgen_export4),T=p,O=J(c,t.__wbindgen_export4),L=p,P=J(a,t.__wbindgen_export4),B=p;t.plan_r3d_compact(x,m,I,k,A,F,z,W,R,j,T,O,L,P,B,s);var w=o().getInt32(x+0,!0),b=o().getInt32(x+4,!0);return d=w,g=b,M(w,b)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_export3(d,g,1)}}function pr(r,n,e,_){let i,c;try{let x=t.__wbindgen_add_to_stack_pointer(-16),m=l(r,t.__wbindgen_export4),I=p;t.plan_wav_trim(x,m,I,n,e,_);var a=o().getInt32(x+0,!0),s=o().getInt32(x+4,!0),d=o().getInt32(x+8,!0),g=o().getInt32(x+12,!0),w=a,b=s;if(g)throw w=0,b=0,u(d);return i=w,c=b,M(w,b)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_export3(i,c,1)}}function gr(r,n,e,_,i){let c=t.plan_wav_trim_reader(v(r),n,e,_,i);return u(c)}function ur(r,n,e,_){let i=y(e,t.__wbindgen_export4,t.__wbindgen_export5),c=p,a=y(_,t.__wbindgen_export4,t.__wbindgen_export5),s=p,d=t.prepare_isobmff(v(r),n,i,c,a,s);return u(d)}function wr(r,n,e){let _=y(e,t.__wbindgen_export4,t.__wbindgen_export5),i=p,c=t.prepare_mxf(v(r),n,_,i);return u(c)}function br(r,n,e){let _=y(n,t.__wbindgen_export4,t.__wbindgen_export5),i=p,c=y(e,t.__wbindgen_export4,t.__wbindgen_export5),a=p,s=t.prepare_r3d(v(r),_,i,c,a);return u(s)}function lr(r,n,e,_){let i=y(e,t.__wbindgen_export4,t.__wbindgen_export5),c=p,a=t.prepare_wav(v(r),n,i,c,_);return u(a)}function fr(r){let n,e;try{let g=t.__wbindgen_add_to_stack_pointer(-16),w=l(r,t.__wbindgen_export4),b=p;t.probe_mov(g,w,b);var _=o().getInt32(g+0,!0),i=o().getInt32(g+4,!0),c=o().getInt32(g+8,!0),a=o().getInt32(g+12,!0),s=_,d=i;if(a)throw s=0,d=0,u(c);return n=s,e=d,M(s,d)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_export3(n,e,1)}}function vr(r,n){let e=t.probe_mxf(v(r),n);return u(e)}function xr(r,n){let e=y(n,t.__wbindgen_export4,t.__wbindgen_export5),_=p,i=t.probe_r3d(v(r),e,_);return u(i)}function yr(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.prores_band_info(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=ot(n,e).slice();return t.__wbindgen_export3(n,e*4,4),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Ir(){t.prores_reset_rate_control()}function mr(r){try{let i=t.__wbindgen_add_to_stack_pointer(-16),c=l(r,t.__wbindgen_export4),a=p;t.r3d_gpu_develop_params(i,c,a);var n=o().getInt32(i+0,!0),e=o().getInt32(i+4,!0),_=f(n,e).slice();return t.__wbindgen_export3(n,e*1,1),_}finally{t.__wbindgen_add_to_stack_pointer(16)}}function hr(r){let n=l(r,t.__wbindgen_export4),e=p;return t.r3d_is_helium(n,e)!==0}function kr(r){let n,e;try{let g=t.__wbindgen_add_to_stack_pointer(-16),w=l(r,t.__wbindgen_export4),b=p;t.read_arriraw_fcs(g,w,b);var _=o().getInt32(g+0,!0),i=o().getInt32(g+4,!0),c=o().getInt32(g+8,!0),a=o().getInt32(g+12,!0),s=_,d=i;if(a)throw s=0,d=0,u(c);return n=s,e=d,M(s,d)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_export3(n,e,1)}}function Ar(r,n){try{let c=t.__wbindgen_add_to_stack_pointer(-16),a=l(r,t.__wbindgen_export4),s=p;t.read_arriraw_unit_correction(c,a,s,n);var e=o().getInt32(c+0,!0),_=o().getInt32(c+4,!0),i=Lt(e,_).slice();return t.__wbindgen_export3(e,_*8,8),i}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Fr(r,n,e,_,i,c,a){let s,d;try{let k=t.__wbindgen_add_to_stack_pointer(-16),A=l(r,t.__wbindgen_export4),F=p,z=l(_,t.__wbindgen_export4),W=p,R=y(a,t.__wbindgen_export4,t.__wbindgen_export5),j=p;t.recover_reframe(k,A,F,n,e,z,W,i,c,R,j);var g=o().getInt32(k+0,!0),w=o().getInt32(k+4,!0),b=o().getInt32(k+8,!0),x=o().getInt32(k+12,!0),m=g,I=w;if(x)throw m=0,I=0,u(b);return s=m,d=I,M(m,I)}finally{t.__wbindgen_add_to_stack_pointer(16),t.__wbindgen_export3(s,d,1)}}function Mr(r,n,e,_,i,c){try{let b=t.__wbindgen_add_to_stack_pointer(-16),x=S(r,t.__wbindgen_export4),m=p,I=y(c,t.__wbindgen_export4,t.__wbindgen_export5),k=p;t.resample_rgba16(b,x,m,n,e,_,i,I,k);var a=o().getInt32(b+0,!0),s=o().getInt32(b+4,!0),d=o().getInt32(b+8,!0),g=o().getInt32(b+12,!0);if(g)throw u(d);var w=gt(a,s).slice();return t.__wbindgen_export3(a,s*2,2),w}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Rr(r,n,e,_,i,c){try{let b=t.__wbindgen_add_to_stack_pointer(-16),x=l(r,t.__wbindgen_export4),m=p,I=y(c,t.__wbindgen_export4,t.__wbindgen_export5),k=p;t.resample_rgba8(b,x,m,n,e,_,i,I,k);var a=o().getInt32(b+0,!0),s=o().getInt32(b+4,!0),d=o().getInt32(b+8,!0),g=o().getInt32(b+12,!0);if(g)throw u(d);var w=f(a,s).slice();return t.__wbindgen_export3(a,s*1,1),w}finally{t.__wbindgen_add_to_stack_pointer(16)}}function zr(){t.reset_dci_rate_state()}function Wr(r,n,e,_){try{let g=t.__wbindgen_add_to_stack_pointer(-16),w=l(r,t.__wbindgen_export4),b=p;t.resize_luma_area(g,w,b,n,e,_);var i=o().getInt32(g+0,!0),c=o().getInt32(g+4,!0),a=o().getInt32(g+8,!0),s=o().getInt32(g+12,!0);if(s)throw u(a);var d=f(i,c).slice();return t.__wbindgen_export3(i,c*1,1),d}finally{t.__wbindgen_add_to_stack_pointer(16)}}function jr(r,n,e,_,i){try{let w=t.__wbindgen_add_to_stack_pointer(-16),b=l(r,t.__wbindgen_export4),x=p,m=y(i,t.__wbindgen_export4,t.__wbindgen_export5),I=p;t.rgba8_to_xyz12(w,b,x,n,e,_,m,I);var c=o().getInt32(w+0,!0),a=o().getInt32(w+4,!0),s=o().getInt32(w+8,!0),d=o().getInt32(w+12,!0);if(d)throw u(s);var g=gt(c,a).slice();return t.__wbindgen_export3(c,a*2,2),g}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Tr(r,n,e,_){let i=y(n,t.__wbindgen_export4,t.__wbindgen_export5),c=p,a=y(e,t.__wbindgen_export4,t.__wbindgen_export5),s=p,d=y(_,t.__wbindgen_export4,t.__wbindgen_export5),g=p,w=t.trim_r3d(v(r),i,c,a,s,d,g);return u(w)}function Sr(r){try{let a=t.__wbindgen_add_to_stack_pointer(-16),s=l(r,t.__wbindgen_export4),d=p;t.vc3_band_info(a,s,d);var n=o().getInt32(a+0,!0),e=o().getInt32(a+4,!0),_=o().getInt32(a+8,!0),i=o().getInt32(a+12,!0);if(i)throw u(_);var c=ot(n,e).slice();return t.__wbindgen_export3(n,e*4,4),c}finally{t.__wbindgen_add_to_stack_pointer(16)}}function Ur(r,n,e){let _=y(e,t.__wbindgen_export4,t.__wbindgen_export5),i=p,c=t.video_frame_index_isobmff_reader(v(r),n,_,i);return u(c)}var Z=class r{static __wrap(n){let e=Object.create(r.prototype);return e.__wbg_ptr=n,mt.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){let n=this.__wbg_ptr;return this.__wbg_ptr=0,mt.unregister(this),n}free(){let n=this.__destroy_into_raw();t.__wbg_wbg_rayon_poolbuilder_free(n,0)}build(){t.wbg_rayon_poolbuilder_build(this.__wbg_ptr)}numThreads(){return t.wbg_rayon_poolbuilder_numThreads(this.__wbg_ptr)>>>0}receiver(){return t.wbg_rayon_poolbuilder_receiver(this.__wbg_ptr)>>>0}};Symbol.dispose&&(Z.prototype[Symbol.dispose]=Z.prototype.free);function Or(r){t.wbg_rayon_start_worker(r)}function qr(r,n,e){let _=t.xavc_au(v(r),n,e);return u(_)}function Lr(r,n){let e=t.xavc_frame_count(v(r),n);return u(e)}function Er(r,n){let e=t.xocn_frame_count(v(r),n);return u(e)}function Dr(r){let n=l(r,t.__wbindgen_export4),e=p;return t.xocn_index_prefix_len(n,e)>>>0}function Pr(r){let n=l(r,t.__wbindgen_export4),e=p;return t.xocn_preview_prefix_len(n,e)>>>0}function kt(r){return{__proto__:null,"./media_core_bg.js":{__proto__:null,__wbg___wbindgen_is_function_acc5528be2b923f2:function(e){return typeof h(e)=="function"},__wbg___wbindgen_is_undefined_721f8decd50c87a3:function(e){return h(e)===void 0},__wbg___wbindgen_memory_9751d9a3017e7c25:function(){let e=t.memory;return v(e)},__wbg___wbindgen_module_f86f28f0f85995dd:function(){return v(Rt)},__wbg___wbindgen_rethrow_858623e73c3311dc:function(e){throw u(e)},__wbg___wbindgen_throw_ea4887a5f8f9a9db:function(e,_){throw new Error(M(e,_))},__wbg__wbg_cb_unref_33c39e13d73b25f6:function(e){h(e)._wbg_cb_unref()},__wbg_async_4ec36f08efecafdc:function(e){return h(e).async},__wbg_buffer_49b4f592d8036785:function(e){let _=h(e).buffer;return v(_)},__wbg_call_0e855b388e315e17:function(){return $(function(e,_,i,c){let a=h(e).call(h(_),h(i),h(c));return v(a)},arguments)},__wbg_call_5575218572ead796:function(){return $(function(e,_,i){let c=h(e).call(h(_),h(i));return v(c)},arguments)},__wbg_call_dd0f909cbc9405d0:function(){return $(function(e,_,i,c,a){let s=h(e).call(h(_),h(i),h(c),h(a));return v(s)},arguments)},__wbg_data_23c14f7d1102d077:function(e){let _=h(e).data;return v(_)},__wbg_instanceof_Window_0d356b88a2f77c42:function(e){let _;try{_=h(e)instanceof Window}catch{_=!1}return _},__wbg_length_589238bdcf171f0e:function(e){return h(e).length},__wbg_new_476e05fb84d8e4f3:function(e){let _=new Int32Array(h(e));return v(_)},__wbg_new_81880fb5002cb255:function(e){let _=new Uint8Array(h(e));return v(_)},__wbg_new_f85beb941dc6d8aa:function(e,_){try{var i={a:e,b:_},c=(s,d)=>{let g=i.a;i.a=0;try{return lt(g,i.b,s,d)}finally{i.a=g}};let a=new Promise(c);return v(a)}finally{i.a=0}},__wbg_new_typed_00a409eb4ec4f2d9:function(e,_){try{var i={a:e,b:_},c=(s,d)=>{let g=i.a;i.a=0;try{return lt(g,i.b,s,d)}finally{i.a=g}};let a=new Promise(c);return v(a)}finally{i.a=0}},__wbg_new_worker_e68fc8188cc230b5:function(e,_){let i=new Worker(M(e,_));return v(i)},__wbg_of_8737c43050b5546e:function(e,_,i){let c=Array.of(h(e),h(_),h(i));return v(c)},__wbg_postMessage_0162be6e48cf631e:function(){return $(function(e,_){h(e).postMessage(h(_))},arguments)},__wbg_prototypesetcall_d721637c7ca66eb8:function(e,_,i){Uint8Array.prototype.set.call(f(e,_),h(i))},__wbg_queueMicrotask_1c9b3800e321a967:function(e){let _=h(e).queueMicrotask;return v(_)},__wbg_queueMicrotask_311744e534a929a3:function(e){queueMicrotask(h(e))},__wbg_resolve_d82363d90af6928a:function(e){let _=Promise.resolve(h(e));return v(_)},__wbg_set_onmessage_d05709471e546dca:function(e,_){h(e).onmessage=h(_)},__wbg_startWorkers_8b582d57e92bd2d4:function(e,_,i){let c=bt(u(e),u(_),Z.__wrap(i));return v(c)},__wbg_static_accessor_GLOBAL_THIS_2fee5048bcca5938:function(){let e=typeof globalThis>"u"?null:globalThis;return E(e)?0:v(e)},__wbg_static_accessor_GLOBAL_ce44e66a4935da8c:function(){let e=typeof global>"u"?null:global;return E(e)?0:v(e)},__wbg_static_accessor_SELF_44f6e0cb5e67cdad:function(){let e=typeof self>"u"?null:self;return E(e)?0:v(e)},__wbg_static_accessor_WINDOW_168f178805d978fe:function(){let e=typeof window>"u"?null:window;return E(e)?0:v(e)},__wbg_then_05edfc8a4fea5106:function(e,_,i){let c=h(e).then(h(_),h(i));return v(c)},__wbg_then_591b6b3a75ee817a:function(e,_){let i=h(e).then(h(_));return v(i)},__wbg_then_c768c7c3e60c20ef:function(e,_){let i=h(e).then(h(_));return v(i)},__wbg_value_2f34afb824ffcd9a:function(e){let _=h(e).value;return v(_)},__wbg_waitAsync_134f0b4abc50f1f2:function(e,_,i){let c=Atomics.waitAsync(h(e),_>>>0,i);return v(c)},__wbg_waitAsync_485a8d512901fd53:function(){let e=Atomics.waitAsync;return v(e)},__wbindgen_cast_0000000000000001:function(e,_){let i=dt(e,_,St);return v(i)},__wbindgen_cast_0000000000000002:function(e,_){let i=dt(e,_,Ot);return v(i)},__wbindgen_cast_0000000000000003:function(e,_){let i=dt(e,_,Ut);return v(i)},__wbindgen_cast_0000000000000004:function(e){return v(e)},__wbindgen_cast_0000000000000005:function(e,_){let i=f(e,_);return v(i)},__wbindgen_cast_0000000000000006:function(e,_){let i=M(e,_);return v(i)},__wbindgen_cast_0000000000000007:function(e,_){var i=f(e,_).slice();return t.__wbindgen_export3(e,_*1,1),v(i)},__wbindgen_link_ec60efd85dcca315:function(e){let _=`onmessage = function (ev) {
4
+ let [ia, index, value] = ev.data;
5
+ ia = new Int32Array(ia.buffer);
6
+ let result = Atomics.wait(ia, index, value);
7
+ postMessage(result);
8
+ };
9
+ `,i=typeof URL.createObjectURL>"u"?"data:application/javascript,"+encodeURIComponent(_):URL.createObjectURL(new Blob([_],{type:"text/javascript"})),c=y(i,t.__wbindgen_export4,t.__wbindgen_export5),a=p;o().setInt32(e+4,a,!0),o().setInt32(e+0,c,!0)},__wbindgen_object_clone_ref:function(e){let _=h(e);return v(_)},__wbindgen_object_drop_ref:function(e){u(e)},memory:r||new WebAssembly.Memory({initial:77,maximum:65536,shared:!0})}}}function St(r,n,e){t.__wasm_bindgen_func_elem_492(r,n,v(e))}function Ut(r,n,e){t.__wasm_bindgen_func_elem_2068(r,n,v(e))}function Ot(r,n,e){try{let c=t.__wbindgen_add_to_stack_pointer(-16);t.__wasm_bindgen_func_elem_2066(c,r,n,v(e));var _=o().getInt32(c+0,!0),i=o().getInt32(c+4,!0);if(i)throw u(_)}finally{t.__wbindgen_add_to_stack_pointer(16)}}function lt(r,n,e,_){t.__wasm_bindgen_func_elem_2083(r,n,v(e),v(_))}var ft=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>t.__wbg_exrbench_free(r,1)),vt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>t.__wbg_exrstreamencoder_free(r,1)),xt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>t.__wbg_proresbench_free(r,1)),yt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>t.__wbg_proresmovencoder_free(r,1)),It=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>t.__wbg_proresmovwriter_free(r,1)),mt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>t.__wbg_wbg_rayon_poolbuilder_free(r,1));function v(r){Y===q.length&&q.push(q.length+1);let n=Y;return Y=q[n],q[n]=r,n}var ht=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>t.__wbindgen_export2(r.a,r.b));function qt(r){r<1028||(q[r]=Y,Y=r)}function Lt(r,n){return r=r>>>0,At().subarray(r/8,r/8+n)}function gt(r,n){return r=r>>>0,Ft().subarray(r/2,r/2+n)}function ot(r,n){return r=r>>>0,Mt().subarray(r/4,r/4+n)}function f(r,n){return r=r>>>0,D().subarray(r/1,r/1+n)}var C=null;function o(){return(C===null||C.buffer!==t.memory.buffer)&&(C=new DataView(t.memory.buffer)),C}var V=null;function Et(){return(V===null||V.buffer!==t.memory.buffer)&&(V=new Float32Array(t.memory.buffer)),V}var H=null;function At(){return(H===null||H.buffer!==t.memory.buffer)&&(H=new Float64Array(t.memory.buffer)),H}function M(r,n){return Pt(r>>>0,n)}var N=null;function Ft(){return(N===null||N.buffer!==t.memory.buffer)&&(N=new Uint16Array(t.memory.buffer)),N}var G=null;function Mt(){return(G===null||G.buffer!==t.memory.buffer)&&(G=new Uint32Array(t.memory.buffer)),G}var X=null;function D(){return(X===null||X.buffer!==t.memory.buffer)&&(X=new Uint8Array(t.memory.buffer)),X}function h(r){return q[r]}function $(r,n){try{return r.apply(this,n)}catch(e){t.__wbindgen_export(v(e))}}var q=new Array(1024).fill(void 0);q.push(void 0,null,!0,!1);var Y=q.length;function E(r){return r==null}function dt(r,n,e){let _={a:r,b:n,cnt:1},i=(...c)=>{_.cnt++;let a=_.a;_.a=0;try{return e(a,_.b,...c)}finally{_.a=a,i._wbg_cb_unref()}};return i._wbg_cb_unref=()=>{--_.cnt===0&&(t.__wbindgen_export2(_.a,_.b),_.a=0,ht.unregister(_))},ht.register(i,_,_),i}function S(r,n){let e=n(r.length*2,2)>>>0;return Ft().set(r,e/2),p=r.length,e}function U(r,n){let e=n(r.length*4,4)>>>0;return Mt().set(r,e/4),p=r.length,e}function l(r,n){let e=n(r.length*1,1)>>>0;return D().set(r,e/1),p=r.length,e}function ut(r,n){let e=n(r.length*4,4)>>>0;return Et().set(r,e/4),p=r.length,e}function J(r,n){let e=n(r.length*8,8)>>>0;return At().set(r,e/8),p=r.length,e}function y(r,n,e){if(e===void 0){let s=Q.encode(r),d=n(s.length,1)>>>0;return D().subarray(d,d+s.length).set(s),p=s.length,d}let _=r.length,i=n(_,1)>>>0,c=D(),a=0;for(;a<_;a++){let s=r.charCodeAt(a);if(s>127)break;c[i+a]=s}if(a!==_){a!==0&&(r=r.slice(a)),i=e(i,_,_=a+r.length*3,1)>>>0;let s=D().subarray(i+a,i+_),d=Q.encodeInto(r,s);a+=d.written,i=e(i,_,a,1)>>>0}return p=a,i}function u(r){let n=h(r);return qt(r),n}var K=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):void 0;K&&K.decode();var Dt=2146435072,pt=0;function Pt(r,n){return pt+=n,pt>=Dt&&(K=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),K.decode(),pt=n),K.decode(D().slice(r,r+n))}var Q=typeof TextEncoder<"u"?new TextEncoder:void 0;Q&&(Q.encodeInto=function(r,n){let e=Q.encode(r);return n.set(e),{read:r.length,written:e.length}});var p=0,Rt,Bt,t;function zt(r,n,e){if(Bt=r,t=r.exports,Rt=n,C=null,V=null,H=null,N=null,G=null,X=null,typeof e<"u"&&(typeof e!="number"||e===0||e%65536!==0))throw new Error("invalid stack size");return t.__wbindgen_start(e),t}async function Ct(r,n){if(typeof Response=="function"&&r instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(r,n)}catch(i){if(r.ok&&e(r.type)&&r.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",i);else throw i}let _=await r.arrayBuffer();return await WebAssembly.instantiate(_,n)}else{let _=await WebAssembly.instantiate(r,n);return _ instanceof WebAssembly.Instance?{instance:_,module:r}:_}function e(_){switch(_){case"basic":case"cors":case"default":return!0}return!1}}function Br(r,n){if(t!==void 0)return t;let e;r!==void 0&&(Object.getPrototypeOf(r)===Object.prototype?{module:r,memory:n,thread_stack_size:e}=r:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let _=kt(n);r instanceof WebAssembly.Module||(r=new WebAssembly.Module(r));let i=new WebAssembly.Instance(r,_);return zt(i,r,e)}async function Cr(r,n){if(t!==void 0)return t;let e;r!==void 0&&(Object.getPrototypeOf(r)===Object.prototype?{module_or_path:r,memory:n,thread_stack_size:e}=r:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),r===void 0&&(r=new URL("media_core_bg.wasm",import.meta.url));let _=kt(n);(typeof r=="string"||typeof Request=="function"&&r instanceof Request||typeof URL=="function"&&r instanceof URL)&&(r=fetch(r));let{instance:i,module:c}=await Ct(await r,_);return zt(i,c,e)}export{tt as ExrBench,et as ExrStreamEncoder,nt as ProResBench,rt as ProResMovEncoder,_t as ProResMovWriter,Nt as arriraw12_clip_info,Gt as arriraw_mxf_gpu_frame,Xt as audio_aac_au,Yt as audio_aac_config,Jt as audio_info,Kt as bench_f32_boundary,Qt as bench_piz_no_huffman,Zt as dci_code_full_depth,$t as dci_frame_cap,te as dci_gpu_colour_patch,ee as dci_gpu_colour_tables,ne as dci_last_pass_caps,re as dci_legal_rates,_e as dci_mq_bench,oe as dci_pack_tier1,ie as dci_stage_rgba8,ae as dci_transform_only,ce as decode_arriraw12_luma,se as decode_arriraw12_mxf,de as decode_arriraw12_preview,pe as decode_arriraw12_rgba,ge as decode_arriraw_luma,ue as decode_arriraw_mxf,we as decode_arriraw_preview,be as decode_arriraw_preview_gray,le as decode_arriraw_preview_meta,fe as decode_arriraw_rgba,ve as decode_arriraw_rgba_meta,xe as decode_audio_pcm,ye as decode_braw_gen5log,Ie as decode_braw_luma,me as decode_braw_preview,he as decode_braw_rgba,ke as decode_cr3_rgba,Ae as decode_crm,Fe as decode_dng_preview,Me as decode_dng_rgba,Re as decode_dpx_preview,ze as decode_dpx_rgba,We as decode_exr_linear,je as decode_exr_preview,Te as decode_exr_rgba,Se as decode_jpeg_rgba,Ue as decode_png_rgba,Oe as decode_prores_band_rgba,qe as decode_prores_luma,Le as decode_prores_mxf,Ee as decode_prores_preview,De as decode_prores_raw_acescct,Pe as decode_prores_raw_luma,Be as decode_prores_raw_preview,Ce as decode_prores_raw_rec2020,Ve as decode_prores_raw_rgba,He as decode_prores_rgb16,Ne as decode_prores_rgba,Ge as decode_prores_thumb_dc32,Xe as decode_r3d_luma,Ye as decode_r3d_preview,Je as decode_r3d_preview_clip,Ke as decode_r3d_rgb16,Qe as decode_r3d_rgba,Ze as decode_r3d_rgba_clip,$e as decode_tiff_preview,tn as decode_tiff_rgba,en as decode_vc3_band_rgba,nn as decode_vc3_luma,rn as decode_vc3_mxf,_n as decode_vc3_preview,on as decode_vc3_rgba,an as decode_xocn_index_luma,cn as decode_xocn_luma,sn as decode_xocn_mxf,dn as decode_xocn_preview,pn as decode_xocn_preview_rec709,gn as decode_xocn_rgb16,un as decode_xocn_rgba,Cr as default,wn as encode_dci_j2c,bn as encode_dci_j2c_rgb,ln as encode_dci_j2c_rgba8,fn as encode_dci_j2c_staged,vn as encode_dci_j2c_staged_modelled,xn as encode_exr,yn as encode_prores_4444_alpha_mov_rgba,In as encode_prores_4444_alpha_sample_q,mn as encode_prores_444_sample_cbr,hn as encode_prores_444_sample_cbr_rgb16,kn as encode_prores_444_sample_cbr_rgb16_lut,An as encode_prores_mov_rgba,Fn as encode_prores_rgba,Mn as encode_prores_sample_cbr,Rn as encode_prores_sample_cbr_rgb16,zn as encode_prores_sample_cbr_rgb16_lut,Wn as encode_prores_sample_q,jn as exr_sequence_filename,Tn as fit_sizing,Br as initSync,Sn as initThreadPool,Un as inspect_cr3,On as inspect_dng,qn as inspect_dpx,Ln as inspect_exr,En as inspect_isobmff,Dn as inspect_tiff,Pn as inspect_wav,Bn as is_arriraw12_mxf,Cn as is_arriraw_mxf,Vn as is_crm,Hn as is_prores_mxf,Nn as is_vc3_mxf,Gn as is_xavc_mxf,Xn as is_xocn_mxf,Yn as list_isobmff_segments,Jn as list_mxf_segments,Kn as list_r3d_frames,Qn as list_r3d_segments,Zn as list_wav_segments,$n as mux_prores_4444_alpha_samples,tr as mux_prores_samples,er as mux_prores_samples_full,nr as mxf_au_run,rr as mxf_frame_index,_r as mxf_gop_map,or as mxf_h264_kind,ir as plan_isobmff_trim,ar as plan_isobmff_trim_reader,cr as plan_mxf_compact_trim,sr as plan_mxf_trim,dr as plan_r3d_compact,pr as plan_wav_trim,gr as plan_wav_trim_reader,ur as prepare_isobmff,wr as prepare_mxf,br as prepare_r3d,lr as prepare_wav,fr as probe_mov,vr as probe_mxf,xr as probe_r3d,yr as prores_band_info,Ir as prores_reset_rate_control,mr as r3d_gpu_develop_params,hr as r3d_is_helium,kr as read_arriraw_fcs,Ar as read_arriraw_unit_correction,Fr as recover_reframe,Mr as resample_rgba16,Rr as resample_rgba8,zr as reset_dci_rate_state,Wr as resize_luma_area,jr as rgba8_to_xyz12,Tr as trim_r3d,Sr as vc3_band_info,Ur as video_frame_index_isobmff_reader,Z as wbg_rayon_PoolBuilder,Or as wbg_rayon_start_worker,qr as xavc_au,Lr as xavc_frame_count,Er as xocn_frame_count,Dr as xocn_index_prefix_len,Pr as xocn_preview_prefix_len};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
- import{a}from"./chunk-NYB4ISL3.js";import"./chunk-PSANHDZM.js";export{a as default};
3
+ import{a}from"./chunk-NP53ITN6.js";import"./chunk-PSANHDZM.js";export{a as default};
@@ -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 $}from"./chunk-AACY2V3L.js";import{a as J}from"./chunk-JEMLKBH2.js";import{b as j}from"./chunk-FNGHTZ5F.js";import{$ as L,Ca as l,J as P,O as z,Z as D,_ as E,a as k,aa as C,ba as O,c as I,da as V,e as M,la as W,oa as G,qa as N,t as T}from"./chunk-PIEH7J6J.js";import"./chunk-PSANHDZM.js";var F=new Uint8Array([6,14,43,52,2,5,1,1,13,1,2,1,1,17,1,0]);function oe(t){e:for(let r=t.length-F.length;r>=0;r--){for(let e=0;e<F.length;e++)if(t[r+e]!==F[e])continue e;return r}return-1}function Z(t,r){if(r>=t.byteLength)return[null,0];let e=t.getUint8(r);if(e<128)return[e,1];let n=e&127;if(n===0||n>8||r+1+n>t.byteLength)return[null,1];let a=0;for(let i=0;i<n;i++)a=a*256+t.getUint8(r+1+i);return[a,1+n]}function w(t,r){let e=t.getUint32(r,!1),n=t.getUint32(r+4,!1);return e*4294967296+n}async function H(t){let r=t.fileSize,e=[];if(r<1024)return e;let a=Math.max(0,r-65536),i=r-a,o=await t.read(a,i);e.push({offset:a,length:i});let s=oe(o);if(s<0)return e;let c=new DataView(o.buffer,o.byteOffset,o.byteLength),[f,d]=Z(c,s+16);if(f===null||f<16||f>65536)return e;let A=s+16+d;if(A+f>o.length)return e;let R=[],te=new DataView(o.buffer,o.byteOffset+A,f),y=Math.floor((f-4)/12);if(y<1||y>4096)return e;for(let u=0;u<y;u++){let p=w(te,u*12+4);p>=0&&p<r&&R.push(p)}for(let u of R){let p=Math.min(256,r-u),b=await t.read(u,p);if(b.length<80)continue;let _=new DataView(b.buffer,b.byteOffset,b.byteLength),[v,U]=Z(_,16);if(v===null)continue;let m=16+U,x,S;if(b.length<m+64){let ie=Math.min(m+64,r-u),g=await t.read(u,ie);if(g.length<m+64)continue;let B=new DataView(g.buffer,g.byteOffset,g.byteLength);x=w(B,m+32),S=w(B,m+40)}else x=w(_,m+32),S=w(_,m+40);let ne=u+16+U+v+x+S,ae=Math.min(ne+65536,r)-u;e.push({offset:u,length:ae})}return e}function q(t,r){let e=[];for(let n of t){if(n.kind!=="clip"||!n.source_range)continue;let a=n.source_range.start.value,i=n.source_range.duration.value,o=Math.max(0,Math.floor(a)-r),s=Math.floor(a+i-1)+r;s>=o&&e.push({first_frame:o,last_frame:s})}return e}function se(t,r){let e=[...t].sort((i,o)=>i.offset-o.offset),n=[],a=0;for(let i of e)i.offset>a&&n.push({offset:a,length:i.offset-a}),a=Math.max(a,i.offset+i.length);return a<r&&n.push({offset:a,length:r-a}),n}async function K(t,r,e){let n=q(r,e);if(n.length===0)throw new Error("planMxfTrimsFromItems: no usable trim ranges in items");await l();let a=(s,c)=>t.read(s,c),i=J(n),o=[];for(let[s,c]of i.entries()){let f=await W(a,t.fileSize,c.first_frame,c.last_frame+1),d=JSON.parse(f);i.length>1&&(d.output_clip_number=s+1,d.output_clip_count=i.length,d.output_part_number=1),o.push(d)}return o}async function Q(t,r,e){await l();let n=q(r,e),i=await G((s,c)=>t.read(s,c),t.fileSize,JSON.stringify(n));if(i!=="null")return JSON.parse(i);console.warn(`[mxf] no parseable index \u2014 shipping the WHOLE file (${t.fileSize} bytes). The cut's ${n.length} range(s) cannot be addressed; nothing is trimmed.`);let o=(await H(t)).map(s=>({offset:s.offset,length:s.length}));return{fileSize:t.fileSize,structuralRanges:o,essenceRanges:se(o,t.fileSize),trimInputs:n,wholeFileFallback:!0}}async function X(t){await l();let e=await N((n,a)=>t.read(n,a),t.fileSize);return JSON.parse(e)}function h(t){return(r,e)=>t.read(r,e)}var Me={async inspect(t){let r=t.parts[0],e=await X(r);if(!e)return null;let n=e.timecode??null,a=n&&n.fps_denominator>0?n.fps_numerator/n.fps_denominator:null,i=e.width??null,o=e.height??null;return{id:r.filename,kind:"external",target_url:r.filename,available_range:a&&e.frame_count?{start:{value:0,rate:a},duration:{value:e.frame_count,rate:a}}:null,reel_name:null,source_timecode:n?.display??null,source_fps:a,source_resolution_w:i,source_resolution_h:o,container:"mxf",codec:null,size_bytes:r.fileSize,streams:[...i||o||a?[{kind:"video",codec:null,width:i??void 0,height:o??void 0,rate:a??void 0,codec_specific:null}]:[],...e.audio?[{kind:"audio",codec:e.audio.codec_fourcc,channels:e.audio.channels??void 0,rate:e.audio.sample_rate??void 0,bit_depth:e.audio.bit_depth??void 0,codec_specific:{fourcc:e.audio.codec_fourcc}}]:[]],decode_provenance:e.decode_provenance??null,vendor_metadata:{frame_count:e.frame_count,...n?{drop_frame:n.drop_frame}:{},...e.inner_codec?{inner_codec:e.inner_codec}:{},...e.truncated?{truncated:!0}:{}},binding_state:"unbound",raw_extraction:{mxf_probe:e},metadata:{}}},async extract(t){await l();let r=t.parts[0],e=JSON.parse(await V(h(r),r.fileSize));return e.length===0?null:{v:1,container:"mxf",codec:"mxf",frame_count:$(e),granularity:"frame",segments:e}},async sparsify(t,r){let e=t.parts[0],n=await Q(e,r.items,r.handles);return[{filename:e.filename,fileSize:n.fileSize,structuralRanges:n.structuralRanges,essenceRanges:n.essenceRanges,trimInputs:n.trimInputs,wholeFileFallback:n.wholeFileFallback}]},async trim(t,r){let e=t.parts[0];return K(e,r.items,r.handles)},async decode(t,r,e){await l();let n=t.parts[0],a=h(n),i=await re(t),o=e.detail==="coarse",s;if(i==="arriraw")s=await M(a,n.fileSize,r,o?"preview:4":"full");else if(i==="arriraw-alev3")s=await I(a,n.fileSize,r,o?"preview:4":"full");else if(i==="dnxhr")s=await P(a,n.fileSize,r,o?"preview":"full");else if(i==="xocn")s=await z(a,n.fileSize,r,o?"preview":"full");else if(i==="prores")s=await T(a,n.fileSize,r,o?"preview":"full");else throw new Error(`mxf decode: no decoder for inner codec '${i}'`);let c=new DataView(s.buffer,s.byteOffset,8);return{width:c.getUint32(0,!0),height:c.getUint32(4,!0),rgba:s.slice(8)}},async decode16(t,r){await l();let e=t.parts[0],n=h(e),a=await re(t),i;try{if(a==="arriraw"){let o=await ue(t,r);if(o)return o;i=await M(n,e.fileSize,r,"rgb16")}else if(a==="dnxhr")i=await P(n,e.fileSize,r,"rgb16");else if(a==="xocn")i=await z(n,e.fileSize,r,"rgb16");else throw new Error(`mxf decode16: no decoder for inner codec '${a}'`)}catch(o){throw fe(o,a)}return j(i)}};function fe(t,r){let e=typeof t=="string"?t:t instanceof Error?t.message:"";return/has no 16-bit decoder|no rgb16 tier/.test(e)?new Error(`mxf ${r}: has no 16-bit decoder \u2014 ${e}`):t}var Y=new WeakMap;async function ue(t,r){if(!!0)return null;try{let e=await import("./arriraw-BEZILZY3.js");if(!await e.arrirawGpuAvailable())return null;let{parseArrirawGpuPayload:n,arrirawFrameToRgb16:a}=await import("./clip-state-B6JOX3JE.js"),i=t.parts[0],o=Y.get(t)??null,s=await k(h(i),i.fileSize,r,o?.key),c=n(s,o);if(!c)return null;Y.set(t,{key:c.key,state:c.state});let f=await e.decodeArrirawFrameGpu(c.essence,c.state);return f?{width:f.width,height:f.height,rgb16:a(f)}:null}catch{return null}}var ee=new WeakMap;async function re(t){let r=ee.get(t);if(r)return r;await l();let e=t.parts[0],n=h(e),a="mxf";return await E(n,e.fileSize)?a="arriraw":await D(n,e.fileSize)?a="arriraw-alev3":await C(n,e.fileSize)?a="dnxhr":await O(n,e.fileSize)?a="xocn":await L(n,e.fileSize)&&(a="prores"),ee.set(t,a),a}export{Me as mxfFormat};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
- import{a,b,c,d,e,f,g,h,i}from"./chunk-YPRTUS5W.js";import"./chunk-PSANHDZM.js";export{c as CoverageMissError,e as DeliveryCoverageMissError,a as INTENTS,f as asDeliveryCoverageMiss,h as extract,i as mediaOp,d as parseDeliveryCoverageMiss,g as resolveFormat,b as unpackFrame16};
3
+ import{a,b,c,d,e,f,g,h,i}from"./chunk-FNGHTZ5F.js";import"./chunk-PSANHDZM.js";export{c as CoverageMissError,e as DeliveryCoverageMissError,a as INTENTS,f as asDeliveryCoverageMiss,h as extract,i as mediaOp,d as parseDeliveryCoverageMiss,g as resolveFormat,b as unpackFrame16};
@@ -0,0 +1,38 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <style>
6
+ body { margin: 0; padding: 10px; font: 12px/1.4 -apple-system, "Segoe UI", sans-serif; color: #d4d4d4; background: #1e1e1e; }
7
+ h1 { font-size: 13px; letter-spacing: .04em; margin: 0 0 8px; text-transform: uppercase; }
8
+ h1 b { color: #FF3C00; }
9
+ .row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
10
+ .dot { width: 10px; height: 10px; border-radius: 2px; background: #555; flex: none; }
11
+ .dot.on { background: #34d399; } .dot.wait { background: #FFDE00; } .dot.off { background: #FF3C00; }
12
+ .muted { color: #8a8a8a; } .mono { font-family: ui-monospace, Menlo, monospace; font-size: 11px; }
13
+ button { background: #2a2a2a; color: #d4d4d4; border: 1px solid #444; border-radius: 4px; padding: 4px 8px; font-size: 11px; cursor: pointer; }
14
+ button.primary { background: #FF3C00; border-color: #FF3C00; color: #fff; }
15
+ textarea { width: 100%; box-sizing: border-box; background: #141414; color: #ccc; border: 1px solid #333; border-radius: 4px; font-size: 11px; min-height: 48px; }
16
+ #log { margin-top: 8px; background: #141414; border: 1px solid #333; border-radius: 4px; padding: 6px; height: 140px; overflow: auto; white-space: pre-wrap; }
17
+ details { margin-top: 8px; } summary { cursor: pointer; color: #8a8a8a; }
18
+ </style>
19
+ </head>
20
+ <body>
21
+ <h1>CONFORM<b>.</b>TOOLS</h1>
22
+ <div class="row"><span id="dot" class="dot"></span><span id="state">Starting…</span></div>
23
+ <div class="row muted mono" id="detail"></div>
24
+ <div class="row">
25
+ <button id="reconnect">Reconnect</button>
26
+ <button id="pick">Pick pairing folder…</button>
27
+ <button id="forget" title="Forget the pasted pairing and the picked folder">Forget</button>
28
+ </div>
29
+ <details>
30
+ <summary>Paste pairing (local only)</summary>
31
+ <p class="muted">conform.tools › Settings › Developer › Host bridge › “Show pairing” — paste the JSON here. It stays on this machine.</p>
32
+ <textarea id="paste" placeholder='{"protocol":1,"url":"ws://127.0.0.1:…/host-bridge","port":…,"token":"…"}'></textarea>
33
+ <div class="row"><button id="save" class="primary">Use this pairing</button></div>
34
+ </details>
35
+ <div id="log" class="mono"></div>
36
+ <script src="index.js"></script>
37
+ </body>
38
+ </html>
@@ -0,0 +1,93 @@
1
+ // Panel entry: wires the bridge client to the Premiere verbs and to the UI.
2
+ "use strict";
3
+
4
+ const { BridgeClient } = require("./lib/protocol");
5
+ const { makeReader, dataDirs, maskToken } = require("./lib/pairing");
6
+ const P = require("./lib/premiere");
7
+
8
+ const { VERBS, CAPABILITIES, OPTIONAL_VERBS } = require("./lib/verbs");
9
+
10
+ const $ = (id) => document.getElementById(id);
11
+ const lines = [];
12
+ function log(line) {
13
+ const ts = new Date().toISOString().slice(11, 19);
14
+ lines.push(`${ts} ${line}`);
15
+ while (lines.length > 200) lines.shift();
16
+ const el = $("log");
17
+ if (el) { el.textContent = lines.join("\n"); el.scrollTop = el.scrollHeight; }
18
+ }
19
+
20
+ const uxp = P.uxp();
21
+ const lfs = uxp && uxp.storage && uxp.storage.localFileSystem;
22
+ const os = (() => { try { return require("os"); } catch (_) { return null; } })();
23
+ const home = os && os.homedir ? os.homedir() : "";
24
+ const platform = P.platform();
25
+
26
+ async function readFileAt(path) {
27
+ if (!lfs) throw new Error("no file system access");
28
+ const url = platform === "win32" ? `file:///${path.replace(/\\/g, "/")}` : `file://${path}`;
29
+ const entry = await lfs.getEntryWithUrl(url);
30
+ return entry.read();
31
+ }
32
+
33
+ async function pickedFolderRead() {
34
+ const token = localStorage.getItem("conformtools.pairingFolder");
35
+ if (!token || !lfs) return null;
36
+ const folder = await lfs.getEntryForPersistentToken(token);
37
+ const entry = await folder.getEntry("pairing.json");
38
+ return entry.read();
39
+ }
40
+
41
+ const readPairing = makeReader({
42
+ candidates: () => (home ? dataDirs(home, platform) : []),
43
+ readFileAt, pickedFolderRead, storage: localStorage,
44
+ });
45
+
46
+ const client = new BridgeClient({
47
+ makeSocket: (url) => new WebSocket(url),
48
+ readPairing: async () => {
49
+ const p = await readPairing();
50
+ $("detail").textContent = `${p.url} token ${maskToken(p.token)} (${p.source})`;
51
+ return p;
52
+ },
53
+ host: { id: "premiere", name: "Premiere Pro", version: P.hostVersion() || "unknown", platform },
54
+ capabilities: CAPABILITIES,
55
+ optionalVerbs: OPTIONAL_VERBS,
56
+ verbs: VERBS,
57
+ log,
58
+ onState: (state, detail) => {
59
+ const dot = $("dot");
60
+ const text = { idle: "Idle", unpaired: "Not paired", connecting: "Connecting…", hello: "Pairing…", connected: "Connected to conform.tools", closed: "Disconnected", refused: "Refused by conform.tools", stopped: "Stopped" }[state] || state;
61
+ $("state").textContent = detail ? `${text} - ${detail}` : text;
62
+ dot.className = "dot " + (state === "connected" ? "on" : state === "connecting" || state === "hello" ? "wait" : state === "refused" || state === "unpaired" ? "off" : "");
63
+ log(`state: ${state}${detail ? " (" + detail + ")" : ""}`);
64
+ },
65
+ });
66
+
67
+ $("reconnect").addEventListener("click", () => { client.stop(); client.start(); });
68
+ $("pick").addEventListener("click", async () => {
69
+ if (!lfs) return log("no file system access");
70
+ const folder = await lfs.getFolder();
71
+ if (!folder) return;
72
+ localStorage.setItem("conformtools.pairingFolder", await lfs.createPersistentToken(folder));
73
+ log(`pairing folder: ${folder.nativePath || folder.name}`);
74
+ client.stop(); client.start();
75
+ });
76
+ $("forget").addEventListener("click", () => {
77
+ localStorage.removeItem("conformtools.pairingFolder");
78
+ localStorage.removeItem("conformtools.pairing");
79
+ $("paste").value = "";
80
+ log("forgot pasted pairing and picked folder");
81
+ });
82
+ $("save").addEventListener("click", () => {
83
+ try {
84
+ const { parsePairing } = require("./lib/pairing");
85
+ parsePairing($("paste").value);
86
+ localStorage.setItem("conformtools.pairing", $("paste").value.trim());
87
+ log("pairing saved (local)");
88
+ client.stop(); client.start();
89
+ } catch (e) { log(`pairing rejected: ${e.message}`); }
90
+ });
91
+
92
+ log(`conform.tools panel · Premiere ${P.hostVersion() || "?"} · ${platform}`);
93
+ client.start();
@@ -0,0 +1,170 @@
1
+ // `clip_meta`: the project panel (bins = FolderItems, clips = ClipProjectItems)
2
+ // and clip properties. The neutral property names are Resolve's ("Clip Name",
3
+ // "File Path", "Scene", "Shot", "Take", "Comments", "Keywords", "Clip Color");
4
+ // Premiere keeps them in three places - the item name, the project metadata
5
+ // (Column.Intrinsic.*), and XMP (xmpDM:scene / shotName / takeNumber /
6
+ // logComment) - and the map below says which. Field names were checked
7
+ // against Premiere 26.2's own writes (see the internal doc).
8
+ "use strict";
9
+
10
+ const { handles, h, g, transact, activeProject, projectOf, PeerError, P } = require("./ctx");
11
+
12
+ const XMP_FIELDS = {
13
+ "Scene": "xmpDM:scene", "Shot": "xmpDM:shotName", "Take": "xmpDM:takeNumber", "Comments": "xmpDM:logComment",
14
+ "Keywords": "dc:subject", "Description": "dc:description", "Camera": "xmpDM:cameraModel", "Reel Name": "xmpDM:tapeName",
15
+ "Tape Name": "xmpDM:tapeName", "Good Take": "xmpDM:good",
16
+ };
17
+ const READONLY = new Set(["File Path", "Clip Name", "Start TC", "Duration", "Frame Rate"]);
18
+
19
+ async function itemsOf(folder) {
20
+ const items = await P.callAny(folder, ["getItems"]);
21
+ return Array.isArray(items) ? items : [];
22
+ }
23
+
24
+ function isFolder(item) {
25
+ const ppro = P.api();
26
+ try { if (ppro.FolderItem && P.has(ppro.FolderItem, "cast")) return !!ppro.FolderItem.cast(item); } catch (_) { /* not a folder */ }
27
+ return P.has(item, "getItems");
28
+ }
29
+
30
+ function asClip(item) {
31
+ const ppro = P.api();
32
+ try { if (ppro.ClipProjectItem && P.has(ppro.ClipProjectItem, "cast")) return ppro.ClipProjectItem.cast(item) || item; } catch (_) { /* not a clip */ }
33
+ return item;
34
+ }
35
+
36
+ function xmpGet(xml, field) {
37
+ const local = field.split(":")[1];
38
+ const m = new RegExp(`<${field}[^>]*>([\\s\\S]*?)</${field}>`).exec(xml) || new RegExp(`${field}="([^"]*)"`).exec(xml)
39
+ || new RegExp(`<[^:>]*:${local}[^>]*>([\\s\\S]*?)</[^:>]*:${local}>`).exec(xml);
40
+ if (!m) return "";
41
+ // dc:subject / rdf:Bag lists -> comma-joined
42
+ const inner = m[1];
43
+ const li = Array.from(inner.matchAll(/<rdf:li[^>]*>([\s\S]*?)<\/rdf:li>/g)).map((x) => x[1].trim());
44
+ return li.length ? li.join(", ") : inner.trim();
45
+ }
46
+
47
+ function xmpSet(xml, field, value) {
48
+ const esc = String(value).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
49
+ const re = new RegExp(`(<${field}[^>]*>)([\\s\\S]*?)(</${field}>)`);
50
+ if (re.test(xml)) return xml.replace(re, `$1${esc}$3`);
51
+ const attr = new RegExp(`(${field}=")([^"]*)(")`);
52
+ if (attr.test(xml)) return xml.replace(attr, `$1${esc}$3`);
53
+ // Insert into the first rdf:Description of the document.
54
+ const ins = `<${field}>${esc}</${field}>`;
55
+ const desc = /<rdf:Description[^>]*>/.exec(xml);
56
+ if (desc) return xml.slice(0, desc.index + desc[0].length) + ins + xml.slice(desc.index + desc[0].length);
57
+ return xml;
58
+ }
59
+
60
+ async function xmpOf(item) {
61
+ const ppro = P.api();
62
+ if (!ppro.Metadata || !P.has(ppro.Metadata, "getXMPMetadata")) return "";
63
+ try { return String(await ppro.Metadata.getXMPMetadata(item) || ""); } catch (_) { return ""; }
64
+ }
65
+
66
+ /** "Timeline" for a sequence in the project panel (the Clip Renamer skips
67
+ * those on the media-pool target, as it does in Resolve), else "Video". */
68
+ async function itemType(clip) {
69
+ if (!clip) return "Timeline";
70
+ try { if (P.has(clip, "isSequence") && await clip.isSequence()) return "Timeline"; } catch (_) { /* not a sequence */ }
71
+ try { if (P.has(clip, "getSequence") && await clip.getSequence()) return "Timeline"; } catch (_) { /* not a sequence */ }
72
+ // A Sequence object itself (the project panel hands one back where a
73
+ // ClipProjectItem cast fails): it has a timebase and tracks, a clip has not.
74
+ if (P.has(clip, "getTimebase") && P.has(clip, "getVideoTrackCount")) return "Timeline";
75
+ return "Video";
76
+ }
77
+
78
+ async function clipProps(item) {
79
+ const clip = asClip(item);
80
+ const out = { "Clip Name": String(item.name || ""), "File Path": "", Type: await itemType(clip) };
81
+ try { out["File Path"] = String(await P.callAny(clip, ["getMediaFilePath"]) || ""); } catch (_) { /* a bin or sequence */ }
82
+ try { out["Clip Color"] = String(P.has(clip, "getColorLabelIndex") ? await clip.getColorLabelIndex() : ""); } catch (_) { out["Clip Color"] = ""; }
83
+ const xml = await xmpOf(item);
84
+ for (const [k, f] of Object.entries(XMP_FIELDS)) out[k] = xml ? xmpGet(xml, f) : "";
85
+ return out;
86
+ }
87
+
88
+ const verbs = {
89
+ "clip_meta.media_pool": async ({ project }) => {
90
+ const p = await projectOf(project);
91
+ return p ? h("project", p) : null; // Premiere's pool IS the project
92
+ },
93
+ "clip_meta.root_folder": async ({ media_pool }) => {
94
+ const p = g(media_pool, "project");
95
+ const root = await P.callAny(p, ["getRootItem"]);
96
+ return root ? h("bin", root) : null;
97
+ },
98
+ "clip_meta.current_folder": async ({ media_pool }) => {
99
+ const p = g(media_pool, "project");
100
+ const root = await P.callAny(p, ["getRootItem"]);
101
+ return root ? h("bin", root) : null; // Premiere has no "current bin"; the root stands in
102
+ },
103
+ "clip_meta.subfolders": async ({ folder }) => {
104
+ const out = [];
105
+ for (const it of await itemsOf(g(folder, "bin"))) if (isFolder(it)) out.push(h("bin", it));
106
+ return out;
107
+ },
108
+ "clip_meta.clips": async ({ folder }) => {
109
+ const out = [];
110
+ for (const it of await itemsOf(g(folder, "bin"))) if (!isFolder(it)) out.push(h("clip", it));
111
+ return out;
112
+ },
113
+ "clip_meta.clip_property": async ({ clip, key }) => {
114
+ const item = g(clip);
115
+ const props = await clipProps(item);
116
+ if (key === null || key === undefined) return props;
117
+ return key in props ? props[key] : "";
118
+ },
119
+ "clip_meta.set_clip_property": async ({ clip, key, value }) => {
120
+ const ppro = P.api();
121
+ const item = g(clip);
122
+ const project = await activeProject();
123
+ if (!project) throw new PeerError("no_project", "No project open");
124
+ if (key === "Clip Name") {
125
+ const n = await transact(project, "Rename clip", async (add) => { add(await P.callAny(item, ["createSetNameAction"], String(value))); });
126
+ return n > 0;
127
+ }
128
+ if (key === "Clip Color") {
129
+ const c = asClip(item);
130
+ const n = await transact(project, "Clip label", async (add) => { add(await P.callAny(c, ["createSetColorLabelAction"], Number(value))); });
131
+ return n > 0;
132
+ }
133
+ if (READONLY.has(key)) return false;
134
+ const field = XMP_FIELDS[key];
135
+ if (!field) return false;
136
+ if (!ppro.Metadata || !P.has(ppro.Metadata, "createSetXMPMetadataAction")) return false;
137
+ const xml = await xmpOf(item);
138
+ if (!xml) return false;
139
+ const next = xmpSet(xml, field, value);
140
+ const n = await transact(project, `Set ${key}`, async (add) => { add(await ppro.Metadata.createSetXMPMetadataAction(item, next)); });
141
+ return n > 0;
142
+ },
143
+ /** Several writes as ONE transaction = one undo step in Premiere. Only
144
+ * plain writes (Clip Name, Clip Color, an XMP field); one bool per item,
145
+ * in order; a read-only key is false and skipped, never a failure. */
146
+ "clip_meta.set_clip_properties": async ({ items }) => {
147
+ const ppro = P.api();
148
+ const project = await activeProject();
149
+ if (!project) throw new PeerError("no_project", "No project open");
150
+ const list = Array.isArray(items) ? items : [];
151
+ const results = new Array(list.length).fill(false);
152
+ const n = await transact(project, `Rename ${list.length} item(s)`, async (add) => {
153
+ for (let i = 0; i < list.length; i++) {
154
+ const { clip, key, value } = list[i] || {};
155
+ try {
156
+ const item = g(clip);
157
+ if (key === "Clip Name") { add(await P.callAny(item, ["createSetNameAction"], String(value))); results[i] = true; }
158
+ else if (key === "Clip Color") { add(await P.callAny(asClip(item), ["createSetColorLabelAction"], Number(value))); results[i] = true; }
159
+ else if (!READONLY.has(key) && XMP_FIELDS[key]) {
160
+ const xml = xmpSet(await xmpOf(item), XMP_FIELDS[key], String(value));
161
+ add(await P.callAny(ppro.Metadata, ["createSetXMPMetadataAction"], item, xml)); results[i] = true;
162
+ }
163
+ } catch (_) { results[i] = false; }
164
+ }
165
+ });
166
+ return n > 0 ? results : results.map(() => false);
167
+ },
168
+ };
169
+
170
+ module.exports = { verbs, XMP_FIELDS, xmpGet, xmpSet, clipProps, h };
@@ -0,0 +1,62 @@
1
+ // Shared plumbing for the capability modules: the handle registry, the API,
2
+ // and the ONE way an edit reaches Premiere - inside a transaction (one undo
3
+ // step), inside lockedAccess() where the host requires it (26.3+).
4
+ "use strict";
5
+
6
+ const { Handles, PeerError } = require("./handles");
7
+ const P = require("./premiere");
8
+
9
+ const handles = new Handles();
10
+
11
+ /** Run `build()` to collect actions, then commit them as one undo step.
12
+ *
13
+ * MEASURED on Premiere Pro 26.2.2: `project.lockedAccess(fn)` takes a
14
+ * SYNCHRONOUS callback - an async one returns at its first `await`, the lock
15
+ * is released, and the work runs later outside it (the first live pass saw
16
+ * every write report "0 actions" while the renames still landed). So the
17
+ * callback here never awaits: when `build` and the `create*Action` calls are
18
+ * synchronous, creation and commit both happen under the lock (the 26.3
19
+ * contract); when they are not, creation finishes outside and only the
20
+ * commit is taken under the lock, which 26.2 accepts. */
21
+ const isThenable = (x) => !!x && typeof x.then === "function";
22
+
23
+ async function transact(project, label, build) {
24
+ const actions = [];
25
+ const add = (a) => { if (a) actions.push(a); };
26
+ const commit = () => {
27
+ if (!actions.length) return 0;
28
+ project.executeTransaction((compound) => { for (const a of actions) compound.addAction(a); }, label);
29
+ return actions.length;
30
+ };
31
+ const locked = P.has(project, "lockedAccess");
32
+ let built = null;
33
+ let n = null;
34
+ const start = () => {
35
+ built = build(add);
36
+ if (!isThenable(built) && !actions.some(isThenable)) n = commit();
37
+ };
38
+ if (locked) project.lockedAccess(start); else start();
39
+ if (n !== null) return n;
40
+ // The builder (or an action factory) is asynchronous: finish it here.
41
+ if (isThenable(built)) await built;
42
+ for (let i = 0; i < actions.length; i++) if (isThenable(actions[i])) actions[i] = await actions[i];
43
+ if (locked) project.lockedAccess(() => { n = commit(); }); else n = commit();
44
+ return n;
45
+ }
46
+
47
+ function h(kind, obj, key) { return handles.wrap(kind, obj, key); }
48
+ function g(handle, kind) { return handles.get(handle, kind); }
49
+
50
+ async function activeProject() {
51
+ const ppro = P.api();
52
+ const project = await P.callAny(ppro.Project, ["getActiveProject"]);
53
+ return project || null;
54
+ }
55
+
56
+ /** A project from a handle, or the active one when the caller passed null. */
57
+ async function projectOf(handle) {
58
+ if (handle) return g(handle, "project");
59
+ return activeProject();
60
+ }
61
+
62
+ module.exports = { handles, h, g, transact, activeProject, projectOf, PeerError, P };
@@ -0,0 +1,57 @@
1
+ // Handle registry: the app never sees a Premiere object, only an id this
2
+ // plugin minted ({"$h": "seq:3"}). Ids are stable for the life of the panel
3
+ // so a tool can hand one back across calls. Nothing here touches Premiere.
4
+ "use strict";
5
+
6
+ const H = "$h";
7
+
8
+ class Handles {
9
+ constructor() {
10
+ this._byId = new Map();
11
+ this._ids = new WeakMap();
12
+ this._n = 0;
13
+ }
14
+ /** Register `obj` under `kind` (once) and return its wire handle. */
15
+ wrap(kind, obj, key) {
16
+ if (obj === null || obj === undefined) return null;
17
+ const k = key || obj;
18
+ if (typeof k === "object") {
19
+ const known = this._ids.get(k);
20
+ if (known) return { [H]: known };
21
+ }
22
+ const id = `${kind}:${++this._n}`;
23
+ this._byId.set(id, obj);
24
+ if (typeof k === "object") this._ids.set(k, id);
25
+ return { [H]: id };
26
+ }
27
+ /** The object behind a wire handle; throws a plain error when unknown. */
28
+ get(handle, kind) {
29
+ const id = handle && typeof handle === "object" ? handle[H] : handle;
30
+ if (!id || typeof id !== "string") throw new PeerError("bad_handle", "not a handle");
31
+ if (kind && !id.startsWith(kind + ":")) throw new PeerError("bad_handle", `expected a ${kind}, got ${id}`);
32
+ const obj = this._byId.get(id);
33
+ if (obj === undefined) throw new PeerError("bad_handle", `unknown handle ${id}`);
34
+ return obj;
35
+ }
36
+ kindOf(handle) {
37
+ const id = handle && typeof handle === "object" ? handle[H] : handle;
38
+ return typeof id === "string" ? id.split(":")[0] : "";
39
+ }
40
+ isHandle(v) {
41
+ return !!v && typeof v === "object" && typeof v[H] === "string" && Object.keys(v).length === 1;
42
+ }
43
+ clear() {
44
+ this._byId.clear();
45
+ this._ids = new WeakMap();
46
+ }
47
+ get size() { return this._byId.size; }
48
+ }
49
+
50
+ class PeerError extends Error {
51
+ constructor(code, message) {
52
+ super(message || code);
53
+ this.code = code || "peer_error";
54
+ }
55
+ }
56
+
57
+ module.exports = { Handles, PeerError, H };