@vidispine/vdt-js 23.4.0-pre.4 → 23.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1929,7 +1929,7 @@ declare type TimeCodeToSecondsOptions = {
1929
1929
  round?: boolean;
1930
1930
  };
1931
1931
 
1932
- declare type ToSmpteOptions = {
1932
+ export declare type ToSmpteOptions = {
1933
1933
  uniformSeparators?: boolean;
1934
1934
  };
1935
1935
 
package/dist/index.js CHANGED
@@ -1825,7 +1825,7 @@ ${o.join(`
1825
1825
  restrictions: A,
1826
1826
  data: O,
1827
1827
  options: g,
1828
- system: u === "true"
1828
+ system: u !== void 0 ? u === "true" : void 0
1829
1829
  };
1830
1830
  }, ys = (e) => e == null ? void 0 : e.map(ts).filter((t) => !!t), Ss = [
1831
1831
  "date",
@@ -2,4 +2,4 @@
2
2
 
3
3
 
4
4
  ${o.join(`
5
- `)}`},Le={count:!0,exclude:!0},Pe=(e=[],t={})=>{const s={...Le,...t},{count:i,exclude:r}=s;return e.map(n=>typeof n=="string"?{field:n,name:n,count:i,...r===!0?{exclude:[n]}:{}}:n)},je=(e=[])=>e==null?void 0:e.map(({name:t,field:s,count:i,range:r})=>({facetName:t,fieldName:s,count:i==null?void 0:i.reduce((n,{fieldValue:o,value:a})=>({...n,[o]:a}),{}),...r?{range:r.map(({value:n,start:o,end:a})=>({start:Number.isNaN(+o)?o:Number(o),end:Number.isNaN(+a)?a:Number(a),count:Number(n)||0}))}:{}})),ke=(e=[])=>{const t={};return e.forEach(({name:s,field:i,count:r})=>{t[s||i]=r.reduce((n,{fieldValue:o,value:a})=>({...n,[o]:a}),{})}),t},Wt={arrayOnSingle:!0,joinValue:void 0,timespanAsList:!1},z=(e,t)=>{const{arrayOnSingle:s=!0,joinValue:i=void 0,timespanAsList:r=!1}={...Wt,...t||{}},{field:n=[],start:o,end:a}=e||{},c=r?{start:o,end:a}:{};return n.reduce((u,f)=>{const{name:m,value:_=[]}=f;if(_.length===0)return u;let d;return s===!1&&_.length===1?[d]=_:i?d=_.join(i):d=_,{...u,[m]:d}},c)},We={...Wt,timespanAsList:!1,joinTimespan:"_",flat:!1,flatTimespan:!1},$e=(e=[],t)=>{const{timespanAsList:s,joinTimespan:i="_",flat:r,flatTimespan:n,...o}={...We,...t||{}};return s===!0?e.map(a=>z(a,{...o,timespanAsList:s})):r===!0||n===!0?e.reduce((a,c)=>({...a,...z(c,t)}),{}):e.reduce((a,c)=>({...a,[[c.start,c.end].join(i)]:z(c,t)}),{})},$t=(e,t)=>{const s=L(t).toSeconds(),{thumbnails:i={}}=e||{},{uri:r=[]}=i,n=r.map(a=>{const c=a.split("/").pop().split("?").shift();return $(c).toSeconds()}),o=n.reduce((a,c,l)=>Math.abs(c-s)<Math.abs(n[a]-s)?l:a,0);return r[o]},Ue={includeGroupMetadata:!1,flatEvents:!1,includeEntityType:!1,includeNearestThumbnail:!1},xe=({start:e,end:t,group:s=[{id:"unknown",name:"unknown"}]})=>{const[{id:i,name:r}]=s,n=L(e).toSeconds(),o=L(t).toSeconds();return{start:e,end:t,startSeconds:n,endSeconds:o,group:{uuid:i,name:r}}},Ge=(e={},t)=>{const{entry:s=[]}=e,i={...Ue,...t||{}},{includeGroupMetadata:r,flatEvents:n,includeEntityType:o,includeNearestThumbnail:a}=i,c=s.map(l=>{const{type:u,item:{metadata:f={},id:m,thumbnails:_={}}={},timespan:d,item:h}=l;let g=d.map(A=>xe(A));if(a&&u==="Item"&&_.uri&&(g=g.map(A=>{const{start:I}=A,b=$t(h,L(I));return{...A,thumbnail:b}})),r&&u==="Item"){const{timespan:A=[]}=f,I=A.flatMap(b=>b.group);if(I.length>0){const b=g.map(O=>{const{group:{uuid:S}}=O,[N]=S.split("/"),{field:j=[],group:k=[]}=I.find(({uuid:D})=>D===N);return{...O,group:{...O.group,field:j,group:k}}});return{entityType:"Item",entityId:m,events:b.sort((O,S)=>O.startSeconds-S.startSeconds),...o?{itemType:h}:{}}}}return{entityType:u==="Item"?"Item":"Collection",entityId:m,events:g.sort((A,I)=>A.startSeconds-I.startSeconds),...o&&u==="Item"?{itemType:h}:{},...o&&u==="Collection"?{collectionType:h}:{}}});return n?c.flatMap(({events:l,entityType:u,entityId:f,itemType:m,collectionType:_})=>l.map(d=>({...d,entityType:u,entityId:f,...m&&{itemType:m},..._&&{collectionType:_}}))).sort((l,u)=>l.startSeconds-u.startSeconds):c},ze=(e="NOW")=>{if(e.startsWith("NOW")){if(e==="NOW")return new Date;const t=e[3],s=Number(e.match(/(\d+)/)[0]),i=e.match(/(\d.*)/)[0].replace(/\d/g,""),r=new Date;switch(i){case"HOUR":case"HOURS":t==="+"&&r.setHours(r.getHours()+s),t==="-"&&r.setHours(r.getHours()-s);break;case"DAY":case"DAYS":t==="+"&&r.setDate(r.getDate()+s),t==="-"&&r.setDate(r.getDate()-s);break;case"MONTH":case"MONTHS":t==="+"&&r.setMonth(r.getMonth()+s),t==="-"&&r.setMonth(r.getMonth()-s);break;case"YEAR":case"YEARS":t==="+"&&r.setFullYear(r.getFullYear()+s),t==="-"&&r.setFullYear(r.getFullYear()-s);break}return r}return new Date(e)},V=e=>{const{property:t=[],...s}=e||{};return{...M(t),...s}},Ve=e=>V(e),Ye=e=>V(e),He={kB:"kHz",B:"Hz",mB:"mHz"},Ut={kB:"kbps",B:"bps",MB:"mbps"},xt=e=>{var g;const{timeBase:t,channelCount:s,codec:i,mediaInfo:r,bitrate:n,metadata:o}=e,a=Ve(r),{Format:c,Resolution:l,Bit_rate_mode:u}=a,f=M(o||[]),m=t!=null&&t.denominator?((t==null?void 0:t.denominator)||1)/((t==null?void 0:t.numerator)||1):void 0,_=m!==void 0?v.filesize(m,{base:10,round:1,symbols:He}):void 0;let d,h;return n!==void 0&&(d=v.filesize(n,{round:2,symbols:Ut}),h=Number((g=v.filesize(n,{exponent:1,symbols:Ut}).split(" kbps"))==null?void 0:g[0])),{audioFormat:c,audioCodec:i,audioSamplerate:_,audioSamplerateSamples:m,audioBitDepth:l,audioBitrate:d,audioBitrateKbps:h,audioBitRateMode:u,audioChannels:s,audioMediaInfo:a,audioMetadata:f}},Ke={NONE:"NONE",OPEN:"OPEN",CLOSED:"CLOSED",UNKNOWN:"UNKNOWN",MISSING:"MISSING",LOST:"LOST",TO_APPEAR:"TO_APPEAR",TO_BE_DELETED:"TO_BE_DELETED",BEING_READ:"BEING_READ",ARCHIVED:"ARCHIVED",AWAITING_SYNC:"AWAITING_SYNC"},ut=e=>{const{uri:t=[],size:s,hash:i,path:r,id:n,storage:o}=e,[a]=t,c=s!==void 0?v.filesize(s,{base:2,standard:"jedec"}):"",l=(r==null?void 0:r.split("/"))||[],u=l.pop()||"",f=l.map(m=>`${m}/`).join("")||void 0;return{uri:a,hash:i,fileSize:c,fileSizeBytes:s,path:r,fileName:u,fileId:n,storageId:o,folderPath:f}},Gt=(e={})=>{const{file:t,mediaInfo:s,metadata:i=[]}=e,r=M(i),n=V(s);let o={binaryMetadata:r,binaryMediaInfo:n};if(t){const[a]=t,c=ut(a);o={...o,...c}}return o},zt=(e={})=>{const{mediaInfo:t,metadata:s,file:i,duration:r,startTimestamp:n,startTimecode:o,timeCodeTimeBase:a}=e,c=M(s||[]),l=V(t);let{Format:u}=l;const{Video_Format_List:f,Audio_Format_List:m,Text_Format_List:_}=l;if(u===void 0){const{format:h}=e;u=h,h&&h.includes(",")&&([u]=h.split(","))}let d={containerFormat:u,videoFormat:f,audioFormat:m,textFormat:_,containerMetadata:c,containerMediaInfo:l};if(c.componentOriginalFilename&&(d.originalFilename=c.componentOriginalFilename),r!==void 0&&r.samples!==0){const h=B(r);d.durationTimeCode=h.toObject(),d.duration=h.toDuration()}if(n&&(d.startTimestamp=B(n).toObject()),o!==void 0&&a&&(d.startTimecode=B({samples:o,timeBase:a})),i){const[h]=i,g=ut(h);d={...d,...g}}return d},Vt={kB:"kbps",B:"bps",MB:"mbps"},Yt=(e={})=>{var q;const{codec:t,bitrate:s,fieldOrder:i,resolution:r,mediaInfo:n,metadata:o=[]}=e,a=Ye(n),c=M(o),{Format:l,"Frame rate":u,"Color space":f,"Color primaries":m,Colorimetry:_}=a;let d;const{averageFrameRate:h,realBaseFrameRate:g}=e;g!==void 0?d=w({numerator:g.denominator,denominator:g.numerator}):u!==void 0?d=G(u):h!==void 0&&(d=w({numerator:h.denominator,denominator:h.numerator}));let{"Frame count":A}=a;if(A===void 0){const{numberOfPackets:ee}=e;ee!==void 0&&(A=ee.toString())}let I,b,O;A&&d&&(I=B({samples:A,timeBase:d}),b=I.timeBase.toConstant()||I.timeBase.toRate(),O=I.toSmpte());const{height:S,width:N}=r||{},j=J(r),k=`${N}x${S}`;let D,U;return s!==void 0&&(D=v.filesize(s,{round:2,symbols:Vt}),U=Number((q=v.filesize(s,{exponent:2,symbols:Vt}).split(" mbps"))==null?void 0:q[0])),{videoFormat:l,dimension:k,frameRate:b,height:S,width:N,timeBase:d,timeCode:I,videoCodec:t,smpte:O,videoBitrate:D,videoBitrateMbps:U,fieldOrder:i,colorSpace:f,chromaSubsampling:_,aspectRatio:j,colorPrimaries:m,videoMetadata:c,videoMediaInfo:a}},Y=(e={},t={})=>{let s={};const{priority:i=["container","video","audio","binary"]}=t,{containerComponent:r,videoComponent:n,audioComponent:o,binaryComponent:a,mimeType:c=[],tag:l=[]}=e;[s.tag]=l,[s.mimeType]=c;const u=(f,m)=>Object.fromEntries([...new Set([...Object.keys(m),...Object.keys(f)])].map(_=>[_,m[_]??f[_]]));return i.reverse().forEach(f=>{switch(f){case"container":r&&(s=u(s,zt(r)));break;case"video":if(n){const[m]=n;s=u(s,Yt(m))}break;case"audio":if(o){const[m]=o;s=u(s,xt(m))}break;case"binary":if(a){const[m]=a;s=u(s,Gt(m))}break}}),s},P={PDF:"PDF",TEXT:"TEXT",MSWORD:"MSWORD",JSON:"JSON",XML:"XML"},y={IMAGE:"IMAGE",AUDIO:"AUDIO",VIDEO:"VIDEO",DOCUMENT:"DOCUMENT",BINARY:"BINARY"},qe=(e={})=>{const{mimeType:t}=e,s=Array.isArray(t)?t[0]:t;if(s){if(s.endsWith("/pdf"))return P.PDF;if(s.startsWith("text/"))return P.TEXT;if(s.endsWith("/msword"))return P.MSWORD;if(s.endsWith("/json"))return P.JSON;if(s.endsWith("/xml"))return P.XML}},Je=["image/apng","image/bmp","image/gif","image/jpeg","image/x-icon","image/png","image/svg+xml"],Xe=["video/mp4"],Qe=["audio/mp4","audio/mpeg","audio/x-aac","audio/aac","audio/x-wav","audio/wav","audio/accp","audio/ogg","audio/webm","audio/x-flac"],Ze=[...Xe,...Je,...Qe],ts=["http","https"],es="video/mp4",ss="video/quicktime",rs="video/x-m4v",is="MPEG-4",ns="mov",as="h264",H=["__mp4","__mp3_160k","__png","__jpeg","__gif","original"].reverse(),Ht=({parsedShape:{tag:e}},{parsedShape:{tag:t}})=>H.includes(e)||H.includes(t)?H.indexOf(t)-H.indexOf(e):e.toLowerCase().localeCompare(t.toLowerCase()),os=(e,t)=>{const{allowedMimeTypes:s=Ze,allowedMethods:i=ts,sortPriority:r=Ht,sourceKey:n="src",mimeTypeKey:o="type",shapeKey:a="shape",parsedShapeKey:c="parsedShape"}=t||{},{shape:l=[]}=e||{},u=l.reduce((f,m)=>{let _,d;const h=Y(m),{uri:g,mimeType:A,containerFormat:I,videoCodec:b}=h;if(A&&(_=A,(A===ss||A===rs)&&(I===is||I===ns)&&b===as&&(_=es)),g)if(i){const[O]=g.split("://");i.includes(O)&&(d=g)}else d=g;return d&&s.includes(_)&&f.push({[n]:d,[o]:_,[a]:m,[c]:h}),f},[]);return typeof r=="function"&&u.sort(Ht),u},cs=e=>{const t=Y(e),{mimeType:s,videoCodec:i,audioCodec:r}=t;if(s){if(s.startsWith("audio/")&&r!==void 0)return y.AUDIO;if(s.startsWith("video/")){if(i!==void 0)return y.VIDEO;if(r!==void 0)return y.AUDIO}if(s.startsWith("image/"))return y.IMAGE;if(s.endsWith("/pdf")||s.startsWith("text/")||s.endsWith("/msword")||s.endsWith("/json")||s.endsWith("/xml"))return y.DOCUMENT;if(s.endsWith("/octet-stream"))return y.BINARY}},Kt="video/mp4",qt="video/quicktime",Jt="video/x-m4v",us="MPEG-4",ds="mov",ls="h264",fs=[Kt,qt,Jt],Xt=["video/x-mxf-h264","video/x-mxf-h264-aac","video/x-mxf-h264-pcm_s24le","video/x-mxf-mpeg2video-pcm_s24le","video/x-mxf-mpeg2video-pcm_s16le","video/x-mxf-prores-pcm_s16le","video/x-mxf-h264-pcm_s16le"],ms=[...fs,...Xt],hs=["audio/mp4","audio/mpeg","audio/x-aac","audio/aac","audio/x-wav","audio/wav","audio/accp","audio/ogg","audio/webm","audio/x-flac"],ps=[...ms,...hs],_s=["http","https"],Ts=({streamingServers:e,url:t,ending:s})=>se(e[0],window.btoa(t),`.${s}`),Es=(e,t)=>{const{allowedMimeTypes:s=ps,allowedMethods:i=_s,streamingServers:r=[]}=t||{},{shape:n=[]}=e||{},{startTimeCode:o}=Ct(e==null?void 0:e.metadata,{flat:!0,arrayOnSingleValue:!1});return n.reduce((c,l)=>{var N,j,k;let u,f,m;const _=Y(l),{uri:d,mimeType:h,containerFormat:g,videoCodec:A}=_;if(!(s!=null&&s.includes(h))||!(i!=null&&i.includes((N=d==null?void 0:d.split("://"))==null?void 0:N[0])))return c;if(m=_.tag,!m){const D=(k=(j=h==null?void 0:h.split)==null?void 0:j.call(h,"/"))==null?void 0:k.pop(),U=c.filter(q=>q.label===D).length;U===0?m=D:m=D+(U+1)}const{timeBase:I,startTimecode:b}=_,O=o??b,S=O&&L(O);return f=d,u=h,(h===qt||h===Jt)&&(g===us||g===ds)&&A===ls&&(u=Kt),r!=null&&r.length&&Xt.includes(h)&&(f=Ts({url:d,streamingServers:r,ending:"mpd"}),u="application/dash+xml"),f&&c.push({src:f,...u?{type:u}:{},...m?{label:m}:{},...I?{timeBase:I}:{},...S?{startTimeCode:S}:{}}),c},[])},Qt=e=>{const t={},{outputSetting:s=[]}=e||{};if(s.length===0)return t;const i=JSON.parse(s[0]),{Settings:{ContainerSettings:r,VideoDescription:n,AudioDescriptions:o}={}}=i;if(r&&(t.containerFormat=r.Container),n){const{CodecSettings:a={}}=n,{Codec:c,...l}=a;t.videoFormat=c;const{Height:u,Width:f}=n;t.height=u,t.width=f,u&&f&&(t.dimension=`${f}x${u}`,t.aspectRatio=J({height:u,width:f}));const[m]=Object.values(l);if(m){t.fieldOrder=m.InterlaceMode,t.fieldOrder&&t.fieldOrder.includes("TOP")&&(t.fieldOrder="interlaced"),t.videoBitrate=m.Bitrate;const _=m.FramerateDenominator,d=m.FramerateNumerator,h=w({denominator:d,numerator:_});t.timeBase=h,t.frameRate=h.toConstant()||h.toRate()}}if(o&&o.length>0){const{CodecSettings:a={}}=o[0],{Codec:c,...l}=a;t.audioFormat=c;const[u]=Object.values(l);u&&(t.audioSamplerate=u.SampleRate,t.audioBitrate=u.Bitrate,t.audioBitRateMode=u.RateControlMode)}return t},gs=e=>{const t={},{description:s,format:i,audio:r,video:n,mediaconvert:o}=e||{};if(o)return{description:s,...Qt(o)};if(t.description=s,t.containerFormat=i,n){if(t.videoFormat=n.codec,t.videoBitrate=n.bitrate,n.framerate){const a=w(n.framerate);t.timeBase=a,t.frameRate=a.toConstant()||a.toRate()}if(n.scaling){const{height:a,width:c}=n.scaling;t.height=a,t.width=c,a&&c&&(t.dimension=`${c}x${a}`,t.aspectRatio=J({height:a,width:c}))}}if(r){const{codec:a,channel:c}=r;t.audioFormat=a,c&&(t.audioChannels=c.length)}return t},As=e=>{if(!e)return;const{name:t,type:s,defaultValue:i,stringRestriction:r,floatRestriction:n,integerRestriction:o,longRestriction:a,data:c,values:l,system:u}=e,{minLength:f,maxLength:m,pattern:_}=r||{},{minInclusive:d,maxInclusive:h}=n||o||a||{},g=((l==null?void 0:l.field)||[]).map(({key:O,value:S})=>({label:S??O,value:O})),I=(O=>Object.fromEntries(Object.entries(O).filter(([,S])=>S!==void 0)))({min:d,max:h,minLength:f,maxLength:m,pattern:_?new RegExp(_):void 0}),b=M(c);return{name:t,type:s,defaultValue:i,required:d!==void 0||f!==void 0&&f>0,restrictions:I,data:b,options:g,system:u==="true"}},Is=e=>e==null?void 0:e.map(As).filter(t=>!!t),Os=["date","float","integer","long","string","string-exact","boolean","timeCode"];class K{constructor(){this.events={}}on(t,s){const i=this.events[t]||[];i.push(s),this.events[t]=i}off(t){this.events[t]&&(this.events[t]=[])}trigger(t,s,i){const r=this.events[t];!r||r.length<1||r.forEach(n=>{n(s,i)})}}var T=(e=>(e[e.transferring=1]="transferring",e[e.paused=2]="paused",e[e.complete=3]="complete",e[e.failed=4]="failed",e[e.idle=5]="idle",e[e.canceled=6]="canceled",e[e.offline=7]="offline",e))(T||{}),E=(e=>(e.progress="progress",e.update="update",e.complete="complete",e.error="error",e.added="upload-added",e.removed="upload-removed",e.failed="upload-failed",e.retry="retry",e.pausing="pausing",e.paused="paused",e.resuming="resuming",e.offline="offline",e.online="online",e))(E||{});class Zt{constructor(t={}){this.blobSlice=(t==null?void 0:t.blobSlice)??null,this.fileSize=(t==null?void 0:t.fileSize)??null,this.start=(t==null?void 0:t.start)??null,this.end=(t==null?void 0:t.end)??null,this.api=(t==null?void 0:t.api)??null,this.state={retries:0,status:T.idle,startTime:null,completeTime:null,response:null,bytesTransferred:null},this.eventBus=new K}tryTransfer(){return this.state.status=T.transferring,this.state.startTime=performance.now(),new Promise((t,s)=>{const i=()=>{this.transfer().then(r=>{this.state.response=r,this.onComplete(),t(this)}).catch(()=>{this.state.retries>3?(this.state.status=T.failed,s(new Error(`Chunk ${this.start}-${this.end} failed`))):this.state.status!==T.paused?(this.state.retries+=1,this.tryTimeout=setTimeout(()=>{i()},1e3)):clearTimeout(this.tryTimeout)})};i(),window.addEventListener(E.online,()=>{this.resume()}),window.addEventListener(E.offline,()=>{this.pause()})})}transfer(){let t={file:this.blobSlice,onUploadProgress:s=>{[T.complete,T.offline].includes(this.state.status)||(this.state.bytesTransferred=s==null?void 0:s.loaded,this.eventBus.trigger(E.progress,this.state))}};return this.end-this.start!==this.fileSize&&(t.headers={index:this.start,size:this.fileSize}),t={...t,...this.api.props||{}},this.transferPromise=this.api.method(t),this.state.status=T.transferring,this.transferPromise}pause(){this.state.status!==T.complete&&(this.state.status=T.paused)}resume(){this.state.status!==T.complete&&(this.state.status=T.transferring)}cancel(){this.state.status!==T.complete&&(this.state.status=T.canceled)}get transferRate(){if(this.state.bytesTransferred){const t=(this.state.completeTime-this.state.startTime)/1e3;return this.state.bytesTransferred/t}return 0}onComplete(){this.state.status=T.complete,this.state.bytesTransferred=this.end-this.start,this.state.completeTime=performance.now(),this.eventBus.trigger(E.complete,this.state)}}class dt{constructor(t,s){var i,r,n,o,a,c;if(this.DEFAULT_OPTIONS=Object.freeze({targetRate:4e6,chunkSize:8388608,minChunkSize:8388608,maxConcurrentTransfers:1,maxConcurrentFileTransfers:1,autoMaxConcurrentTransfers:!1,minFileSize:104857600,autoResume:!0,api:void 0}),this.eventBus=new K,!s.api.method)throw new Error("No api method specified");console.log(s),this.options={...this.DEFAULT_OPTIONS,...s,api:{...s.api??{},props:{...((i=s.api)==null?void 0:i.props)??{},queryParams:{transferId:ne(),...((n=(r=s.api)==null?void 0:r.props)==null?void 0:n.queryParams)??{}}}}},this.state={blob:null,chunks:[],transferPromises:[],targetRate:this.options.targetRate,rate:0,autoMaxConcurrentTransfers:this.options.autoMaxConcurrentTransfers,maxConcurrentTransfers:this.options.maxConcurrentTransfers,mime:"",status:T.idle,transferId:(c=(a=(o=s.api)==null?void 0:o.props)==null?void 0:a.queryParams)==null?void 0:c.transferId,lastStats:{}},typeof t=="object"?(this.state.blob=t,this.state.mime=t.type,this.addChunksFromBlob(t)):console.error(new Error(`Expected a File or a Blob object, but got ${typeof t}`))}upload(){const{status:t}=this.state;if(console.log("status",t),t!==T.complete)if(t===T.idle||t===T.transferring){this.state.transferPromises=[];const s=()=>{const i=this.state.chunks[0].state.status,r=this.state.transferPromises.length<this.state.maxConcurrentTransfers&&i!==T.transferring;return console.log("isOK",r),console.log("this.state",this.state),r};s()&&(console.log("this.state.chunks",this.state.chunks),this.state.chunks.forEach(i=>{i.state.status!==T.complete&&i.state.status!==T.transferring&&s()&&(this.state.status=T.transferring,this.state.transferPromises.push(i.tryTransfer()))}),this.state.transferPromises.length>0&&Promise.all(this.state.transferPromises).then(()=>{this.upload()}).catch(i=>{console.log("Failed on this upload() cycle, check connectivity and try to resume :(",i),this.state.status!==T.offline?(this.state.status=T.failed,this.eventBus.trigger(E.failed,this.state,i)):setTimeout(()=>this.retry(),5e3)}))}else this.retry()}getByteRangesForChunks(t,s=this.options.chunkSize){const i=[],{minChunkSize:r}=this.options;let o=s>=r?s:r,a=Math.floor(t.size/o);if(t.size-(t.size-t.size/a)>=r||(a-=1,o=Math.floor(t.size/a)),a<2||t.size<this.options.minFileSize)i.push({start:0,end:t.size});else for(let c=0;c<=a;c+=1){const l=o*c;let u=o*c+o;t.size-o*c<=r&&(u=t.size);const m={start:l,end:u};if(i.push(m),u===t.size)break}return i}addChunksFromBlob(t){this.getByteRangesForChunks(t).forEach(i=>{const r=new Zt({start:i.start,end:i.end,blobSlice:t.slice(i.start,i.end),fileSize:t.size,api:this.options.api});r.eventBus.on(E.progress,()=>{this.onProgress()}),r.eventBus.on(E.complete,()=>{this.onProgress()}),this.state.chunks.push(r)})}retry(){this.state.status===T.failed&&(this.resume(),this.eventBus.trigger(E.retry,this.state))}resume(){this.state.status=T.transferring,this.eventBus.trigger(E.resuming,this.state),this.state.chunks.length>0&&this.state.chunks.forEach(t=>{t.resume()})}pause(){this.state.status=T.paused,this.state.chunks.length>0&&this.state.chunks.forEach(s=>{s.pause()});const t=Promise.all(this.state.transferPromises);return this.eventBus.trigger(E.pausing,this.state),t.then(()=>{this.eventBus.trigger(E.paused,this.state)}),Promise.all(this.state.transferPromises)}cancel(){this.state.status=T.canceled,this.state.chunks.length>0&&this.state.chunks.forEach(s=>{s.cancel()}),this.upload=()=>{};const t=Promise.all(this.state.transferPromises);return t.then(()=>{this.eventBus.trigger(E.removed,this.state)}),t}autoAdjustMaxConcurrentTransfers(t){if(this.state.autoMaxConcurrentTransfers&&this.state.status!==T.complete){const s=t.avgTransferRate/this.state.targetRate;if(s>1.2)this.state.maxConcurrentTransfers+=1;else if(s<.3)this.state.maxConcurrentTransfers=1;else{const i=this.options.maxConcurrentTransfers-1;this.state.maxConcurrentTransfers=Math.max(this.options.maxConcurrentTransfers,Math.min(i,this.options.maxConcurrentTransfers))}}}onProgress(){try{const t=this.getStats();t!==this.state.lastStats&&(this.state.lastStats=t,ie(()=>{this.autoAdjustMaxConcurrentTransfers(t)},1e3,!1)({}),this.state.status!==T.complete&&(t.totalChunks===t.completedChunks?this.onComplete():(this.eventBus.trigger(E.progress,this.state),this.options.onProgress&&this.options.onProgress(t))))}catch(t){console.error(t)}}onComplete(){const t=this.getStats();this.state.lastStats=t,this.state.status=T.complete,this.eventBus.trigger(E.complete,this.state),this.options.onComplete&&this.options.onComplete(this.finalResponse)}getStats(){const t=this.state.chunks.length,s=this.state.chunks.filter(l=>l.state.status===T.complete),i=this.state.chunks.filter(l=>l.state.status===T.transferring),r=s.length;let n=0,o=0;s.forEach(l=>{n+=l.transferRate,o+=l.blobSlice.size}),i.forEach(l=>{o+=l.state.bytesTransferred});const a=n/r,c={totalChunks:t,completedChunks:r,totalBytes:this.state.blob.size,transferredBytes:o,avgTransferRate:a,concurrentTransfers:this.state.maxConcurrentTransfers};return this.state.rate=c.avgTransferRate,c}set concurrentTransfers(t){this.state.autoMaxConcurrentTransfers=!1,this.state.maxConcurrentTransfers=t}set rate(t){this.state.targetRate=t}get rate(){return this.state.rate}get finalResponse(){const t=this.state.chunks.length-1,s=!1;for(let i=t;i>=0;i-=1){const r=this.state.chunks[i];if(typeof r.state.response.data=="object")return r.state.response}return s}get transferId(){return this.state.transferId}}function bs(e,t){return e===0||t===0?0:Math.floor(e/t*100)}const Ss={maxConcurrentFileTransfers:1,autoResume:!0};class Rs{constructor(t){this.initialState=Object.freeze({status:T.idle,transfers:[],bytesDone:0,bytesTotal:0,lastStats:{bytesDone:0,bytesTotal:0}}),this.state={...this.initialState},this.options={...Ss,...t},this.events=new K,this.bindNetworkEvents()}get transfers(){return Object.values(this.state.transfers)||[]}get status(){return this.state.status}set status(t){this.events.trigger(E.update,this.state),this.state.status=t}get bytesTotal(){let t=0;return this.transfers.forEach(s=>{t+=s.state.blob.size}),t}get bytesDone(){let t=0;return this.transfers.forEach(s=>{t+=s.getStats().transferredBytes}),t}get isUploading(){return this.state.status===T.transferring}get paused(){let t=!0;return this.transfers.forEach(s=>{s.state.status!==T.paused&&(t=!1)}),t}bindNetworkEvents(){typeof window>"u"||(window.addEventListener(E.online,()=>{this.events.trigger(E.online,this.state),this.state.status=T.transferring,this.options.autoResume&&setTimeout(()=>{this.retry()},1500)}),window.addEventListener(E.offline,()=>{this.events.trigger(E.offline,this.state),this.state.status=T.offline}))}addChunkedUpload(t){console.log("chunkedUpload",t),t.transferId!==null&&(this.state.transfers[t.transferId]=t,t.eventBus.on(E.progress,()=>{this.onProgress()}),t.eventBus.on(E.complete,()=>{this.upload(),this.onProgress()}),t.eventBus.on(E.failed,(s,i)=>{this.onFail(i,s)}),t.eventBus.on(E.retry,()=>{this.events.trigger(E.retry,this.state)}),t.eventBus.on(E.paused,()=>{this.paused&&this.events.trigger(E.paused,this.state)}),this.updateStats(),this.events.trigger(E.added,this.state),this.events.trigger(E.update,this.state))}removeChunkedUpload(t,s=!1){const i=r=>r?r.state.status===T.complete&&!s?(console.error("Can't cancel complete transfers, pass true as a second argument in .removeChunkedUpload() to force removal."),!1):(Object.keys(this.state.transfers).forEach(n=>{r===this.state.transfers[n]&&delete this.state.transfers[n]}),this.events.trigger(E.removed,this.state),r.cancel(),!0):(console.error("Could not find a matching transfer to cancel."),!1);t instanceof dt?i(t):t instanceof File?i(this.exists(t)):typeof t=="string"?i(this.transfers.find(r=>r.transferId===t)):console.error("Invalid object to remove - has to be either ChunkedUpload, File or transferId")}onProgress(){this.updateStats(),this.hasCompleted?this.onComplete():this.state.bytesDone!==this.state.lastStats.bytesDone&&(this.state.status=T.transferring,this.events.trigger(E.progress,this.state))}onComplete(){this.state.status=T.complete,this.events.trigger(E.complete,this.state)}exists(t){let s;for(let i=0;i<this.transfers.length;i+=1){const r=this.transfers[i];if(r.state.blob.name===t.name&&r.state.blob.lastModified===t.lastModified&&r.state.blob.size&&t.size)return s=r,s}return s}isTransferAvailable(t){return t.state.status!==T.complete&&t.state.status!==T.transferring||t.state.status===T.idle}pause(){let t=Promise.resolve(!0);if(!this.paused){this.events.trigger(E.pausing,this.state);const s=[];this.transfers.forEach(i=>{s.push(i.pause())}),t=Promise.all(s),t.then(()=>{this.events.trigger(E.paused,this.state)})}return t}resume(){this.events.trigger(E.update,this.state),this.transfers.forEach(t=>{this.isTransferAvailable(t)&&t.state.status!==T.idle&&t.resume()})}retry(){this.status===T.failed&&(this.resume(),this.events.trigger(E.retry,this.state))}upload(){let t=0;console.log("this.transfers",this.transfers),console.log("this.options.maxConcurrentFileTransfers",this.options.maxConcurrentFileTransfers),console.log("before ongoingTransfers",t),this.transfers.forEach(s=>{this.isTransferAvailable(s)?t<this.options.maxConcurrentFileTransfers&&(this.events.trigger(E.update,this.state),s.upload(),t+=1):s.state.status!==T.complete&&(t+=1)}),t>0&&(this.status=T.transferring),t<this.options.maxConcurrentFileTransfers&&this.transfers.length<t&&this.upload(),console.log("after ongoingTransfers",t)}onFail(t,s){this.status=T.failed,this.events.trigger(E.error,s,t)}reset(){this.transfers.forEach(t=>{t.constructor.name===dt.name&&this.removeChunkedUpload(t,!0)}),this.state={...this.initialState},this.events.trigger(E.update,this.state),this.events.trigger(E.complete,this.state)}destroy(){this.reset()}get hasCompleted(){let t=!0;return this.transfers.forEach(s=>{s.state.status!==T.complete&&(t=!1)}),t}updateStats(){this.state.lastStats.bytesDone=this.state.bytesDone,this.state.lastStats.bytesTotal=this.state.bytesTotal,this.state.bytesTotal=this.bytesTotal,this.state.bytesDone=this.bytesDone}get percentDone(){return bs(this.state.bytesDone,this.state.bytesTotal)}get fileList(){const t=[];return this.transfers.forEach(s=>{const i=s.getStats(),{totalChunks:r,completedChunks:n}=i,o={name:s.state.blob.name,bytesDone:i.transferredBytes,bytesTotal:s.state.blob.size,totalChunks:r,completedChunks:n,transfer:s};t.push(o)}),t}}const te=(e,t,s="")=>{const i=a=>{const c=a.startsWith("/")?a.slice(1):a,l=(c==null?void 0:c.search("/"))??-1;return l===-1?[c]:[c.slice(0,l),c.slice(l+1)]},[r,n]=i(t),o=[s,r].filter(Boolean).join("/");return n?{[r]:{file:new File([e],r,{...e,type:"folder"}),path:o,progress:{totalBytes:e.size??0,transferredBytes:0},files:te(e,n,o)}}:{[r]:{file:e,path:o,progress:{totalBytes:e.size??0,transferredBytes:0}}}},ys=e=>e.map(t=>te(t,t.path??t.webkitRelativePath)).reduce((t,s)=>re(t,s),{});p.Chunk=Zt,p.ChunkedTransferManager=Rs,p.ChunkedUpload=dt,p.ChunkedUploadEventBus=K,p.DOCUMENT_TYPES=P,p.EVENTS=E,p.FIELD_ATTRIBUTE_KEYS=ht,p.FIELD_DEFINITION_TYPES=Os,p.FIELD_VALUE_ATTRIBUTE_KEYS=mt,p.FILE_STATES=Ke,p.GROUP_ATTRIBUTE_KEYS=pt,p.ROLE_NAMES=ae,p.SHAPE_MEDIA_TYPES=y,p.STATUSES=T,p.SYSTEM_FIELDGROUPS=oe,p.SYSTEM_FIELDS=ce,p.TimeBase=R,p.TimeCode=F,p.createMetadataType=pe,p.createSearchFacetList=Pe,p.createTimeBase=W,p.createTimeCode=L,p.fileListToFileTree=ys,p.filterShapeSource=os,p.findNearestThumbnail=$t,p.formatTimeBaseText=G,p.formatTimeBaseType=w,p.formatTimeCodeSeconds=Pt,p.formatTimeCodeSmpte=jt,p.formatTimeCodeText=$,p.formatTimeCodeType=B,p.getPlayerSources=Es,p.getShapeDocumentType=qe,p.getShapeMediaType=cs,p.metadataTypeToWebVtt=Be,p.parseAudioComponent=xt,p.parseBinaryComponent=Gt,p.parseContainerComponent=zt,p.parseFacetList=je,p.parseFacetType=ke,p.parseFieldDefinitionList=Is,p.parseFieldList=tt,p.parseFileType=ut,p.parseGroupList=st,p.parseHighlightTimespan=z,p.parseHighlightTimespanList=$e,p.parseKeyValuePairType=M,p.parseMediaConvertPreset=Qt,p.parseMetadataType=Ct,p.parseNowDate=ze,p.parseSearchResultEvents=Ge,p.parseShapeType=Y,p.parseSimpleMetadataType=be,p.parseTimespan=Dt,p.parseTimespanList=it,p.parseTranscodePreset=gs,p.parseVideoComponent=Yt,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
5
+ `)}`},Le={count:!0,exclude:!0},Pe=(e=[],t={})=>{const s={...Le,...t},{count:i,exclude:r}=s;return e.map(n=>typeof n=="string"?{field:n,name:n,count:i,...r===!0?{exclude:[n]}:{}}:n)},je=(e=[])=>e==null?void 0:e.map(({name:t,field:s,count:i,range:r})=>({facetName:t,fieldName:s,count:i==null?void 0:i.reduce((n,{fieldValue:o,value:a})=>({...n,[o]:a}),{}),...r?{range:r.map(({value:n,start:o,end:a})=>({start:Number.isNaN(+o)?o:Number(o),end:Number.isNaN(+a)?a:Number(a),count:Number(n)||0}))}:{}})),ke=(e=[])=>{const t={};return e.forEach(({name:s,field:i,count:r})=>{t[s||i]=r.reduce((n,{fieldValue:o,value:a})=>({...n,[o]:a}),{})}),t},Wt={arrayOnSingle:!0,joinValue:void 0,timespanAsList:!1},z=(e,t)=>{const{arrayOnSingle:s=!0,joinValue:i=void 0,timespanAsList:r=!1}={...Wt,...t||{}},{field:n=[],start:o,end:a}=e||{},c=r?{start:o,end:a}:{};return n.reduce((u,f)=>{const{name:m,value:_=[]}=f;if(_.length===0)return u;let d;return s===!1&&_.length===1?[d]=_:i?d=_.join(i):d=_,{...u,[m]:d}},c)},We={...Wt,timespanAsList:!1,joinTimespan:"_",flat:!1,flatTimespan:!1},$e=(e=[],t)=>{const{timespanAsList:s,joinTimespan:i="_",flat:r,flatTimespan:n,...o}={...We,...t||{}};return s===!0?e.map(a=>z(a,{...o,timespanAsList:s})):r===!0||n===!0?e.reduce((a,c)=>({...a,...z(c,t)}),{}):e.reduce((a,c)=>({...a,[[c.start,c.end].join(i)]:z(c,t)}),{})},$t=(e,t)=>{const s=L(t).toSeconds(),{thumbnails:i={}}=e||{},{uri:r=[]}=i,n=r.map(a=>{const c=a.split("/").pop().split("?").shift();return $(c).toSeconds()}),o=n.reduce((a,c,l)=>Math.abs(c-s)<Math.abs(n[a]-s)?l:a,0);return r[o]},Ue={includeGroupMetadata:!1,flatEvents:!1,includeEntityType:!1,includeNearestThumbnail:!1},xe=({start:e,end:t,group:s=[{id:"unknown",name:"unknown"}]})=>{const[{id:i,name:r}]=s,n=L(e).toSeconds(),o=L(t).toSeconds();return{start:e,end:t,startSeconds:n,endSeconds:o,group:{uuid:i,name:r}}},Ge=(e={},t)=>{const{entry:s=[]}=e,i={...Ue,...t||{}},{includeGroupMetadata:r,flatEvents:n,includeEntityType:o,includeNearestThumbnail:a}=i,c=s.map(l=>{const{type:u,item:{metadata:f={},id:m,thumbnails:_={}}={},timespan:d,item:h}=l;let g=d.map(A=>xe(A));if(a&&u==="Item"&&_.uri&&(g=g.map(A=>{const{start:I}=A,b=$t(h,L(I));return{...A,thumbnail:b}})),r&&u==="Item"){const{timespan:A=[]}=f,I=A.flatMap(b=>b.group);if(I.length>0){const b=g.map(O=>{const{group:{uuid:S}}=O,[N]=S.split("/"),{field:j=[],group:k=[]}=I.find(({uuid:D})=>D===N);return{...O,group:{...O.group,field:j,group:k}}});return{entityType:"Item",entityId:m,events:b.sort((O,S)=>O.startSeconds-S.startSeconds),...o?{itemType:h}:{}}}}return{entityType:u==="Item"?"Item":"Collection",entityId:m,events:g.sort((A,I)=>A.startSeconds-I.startSeconds),...o&&u==="Item"?{itemType:h}:{},...o&&u==="Collection"?{collectionType:h}:{}}});return n?c.flatMap(({events:l,entityType:u,entityId:f,itemType:m,collectionType:_})=>l.map(d=>({...d,entityType:u,entityId:f,...m&&{itemType:m},..._&&{collectionType:_}}))).sort((l,u)=>l.startSeconds-u.startSeconds):c},ze=(e="NOW")=>{if(e.startsWith("NOW")){if(e==="NOW")return new Date;const t=e[3],s=Number(e.match(/(\d+)/)[0]),i=e.match(/(\d.*)/)[0].replace(/\d/g,""),r=new Date;switch(i){case"HOUR":case"HOURS":t==="+"&&r.setHours(r.getHours()+s),t==="-"&&r.setHours(r.getHours()-s);break;case"DAY":case"DAYS":t==="+"&&r.setDate(r.getDate()+s),t==="-"&&r.setDate(r.getDate()-s);break;case"MONTH":case"MONTHS":t==="+"&&r.setMonth(r.getMonth()+s),t==="-"&&r.setMonth(r.getMonth()-s);break;case"YEAR":case"YEARS":t==="+"&&r.setFullYear(r.getFullYear()+s),t==="-"&&r.setFullYear(r.getFullYear()-s);break}return r}return new Date(e)},V=e=>{const{property:t=[],...s}=e||{};return{...M(t),...s}},Ve=e=>V(e),Ye=e=>V(e),He={kB:"kHz",B:"Hz",mB:"mHz"},Ut={kB:"kbps",B:"bps",MB:"mbps"},xt=e=>{var g;const{timeBase:t,channelCount:s,codec:i,mediaInfo:r,bitrate:n,metadata:o}=e,a=Ve(r),{Format:c,Resolution:l,Bit_rate_mode:u}=a,f=M(o||[]),m=t!=null&&t.denominator?((t==null?void 0:t.denominator)||1)/((t==null?void 0:t.numerator)||1):void 0,_=m!==void 0?v.filesize(m,{base:10,round:1,symbols:He}):void 0;let d,h;return n!==void 0&&(d=v.filesize(n,{round:2,symbols:Ut}),h=Number((g=v.filesize(n,{exponent:1,symbols:Ut}).split(" kbps"))==null?void 0:g[0])),{audioFormat:c,audioCodec:i,audioSamplerate:_,audioSamplerateSamples:m,audioBitDepth:l,audioBitrate:d,audioBitrateKbps:h,audioBitRateMode:u,audioChannels:s,audioMediaInfo:a,audioMetadata:f}},Ke={NONE:"NONE",OPEN:"OPEN",CLOSED:"CLOSED",UNKNOWN:"UNKNOWN",MISSING:"MISSING",LOST:"LOST",TO_APPEAR:"TO_APPEAR",TO_BE_DELETED:"TO_BE_DELETED",BEING_READ:"BEING_READ",ARCHIVED:"ARCHIVED",AWAITING_SYNC:"AWAITING_SYNC"},ut=e=>{const{uri:t=[],size:s,hash:i,path:r,id:n,storage:o}=e,[a]=t,c=s!==void 0?v.filesize(s,{base:2,standard:"jedec"}):"",l=(r==null?void 0:r.split("/"))||[],u=l.pop()||"",f=l.map(m=>`${m}/`).join("")||void 0;return{uri:a,hash:i,fileSize:c,fileSizeBytes:s,path:r,fileName:u,fileId:n,storageId:o,folderPath:f}},Gt=(e={})=>{const{file:t,mediaInfo:s,metadata:i=[]}=e,r=M(i),n=V(s);let o={binaryMetadata:r,binaryMediaInfo:n};if(t){const[a]=t,c=ut(a);o={...o,...c}}return o},zt=(e={})=>{const{mediaInfo:t,metadata:s,file:i,duration:r,startTimestamp:n,startTimecode:o,timeCodeTimeBase:a}=e,c=M(s||[]),l=V(t);let{Format:u}=l;const{Video_Format_List:f,Audio_Format_List:m,Text_Format_List:_}=l;if(u===void 0){const{format:h}=e;u=h,h&&h.includes(",")&&([u]=h.split(","))}let d={containerFormat:u,videoFormat:f,audioFormat:m,textFormat:_,containerMetadata:c,containerMediaInfo:l};if(c.componentOriginalFilename&&(d.originalFilename=c.componentOriginalFilename),r!==void 0&&r.samples!==0){const h=B(r);d.durationTimeCode=h.toObject(),d.duration=h.toDuration()}if(n&&(d.startTimestamp=B(n).toObject()),o!==void 0&&a&&(d.startTimecode=B({samples:o,timeBase:a})),i){const[h]=i,g=ut(h);d={...d,...g}}return d},Vt={kB:"kbps",B:"bps",MB:"mbps"},Yt=(e={})=>{var q;const{codec:t,bitrate:s,fieldOrder:i,resolution:r,mediaInfo:n,metadata:o=[]}=e,a=Ye(n),c=M(o),{Format:l,"Frame rate":u,"Color space":f,"Color primaries":m,Colorimetry:_}=a;let d;const{averageFrameRate:h,realBaseFrameRate:g}=e;g!==void 0?d=w({numerator:g.denominator,denominator:g.numerator}):u!==void 0?d=G(u):h!==void 0&&(d=w({numerator:h.denominator,denominator:h.numerator}));let{"Frame count":A}=a;if(A===void 0){const{numberOfPackets:ee}=e;ee!==void 0&&(A=ee.toString())}let I,b,O;A&&d&&(I=B({samples:A,timeBase:d}),b=I.timeBase.toConstant()||I.timeBase.toRate(),O=I.toSmpte());const{height:S,width:N}=r||{},j=J(r),k=`${N}x${S}`;let D,U;return s!==void 0&&(D=v.filesize(s,{round:2,symbols:Vt}),U=Number((q=v.filesize(s,{exponent:2,symbols:Vt}).split(" mbps"))==null?void 0:q[0])),{videoFormat:l,dimension:k,frameRate:b,height:S,width:N,timeBase:d,timeCode:I,videoCodec:t,smpte:O,videoBitrate:D,videoBitrateMbps:U,fieldOrder:i,colorSpace:f,chromaSubsampling:_,aspectRatio:j,colorPrimaries:m,videoMetadata:c,videoMediaInfo:a}},Y=(e={},t={})=>{let s={};const{priority:i=["container","video","audio","binary"]}=t,{containerComponent:r,videoComponent:n,audioComponent:o,binaryComponent:a,mimeType:c=[],tag:l=[]}=e;[s.tag]=l,[s.mimeType]=c;const u=(f,m)=>Object.fromEntries([...new Set([...Object.keys(m),...Object.keys(f)])].map(_=>[_,m[_]??f[_]]));return i.reverse().forEach(f=>{switch(f){case"container":r&&(s=u(s,zt(r)));break;case"video":if(n){const[m]=n;s=u(s,Yt(m))}break;case"audio":if(o){const[m]=o;s=u(s,xt(m))}break;case"binary":if(a){const[m]=a;s=u(s,Gt(m))}break}}),s},P={PDF:"PDF",TEXT:"TEXT",MSWORD:"MSWORD",JSON:"JSON",XML:"XML"},y={IMAGE:"IMAGE",AUDIO:"AUDIO",VIDEO:"VIDEO",DOCUMENT:"DOCUMENT",BINARY:"BINARY"},qe=(e={})=>{const{mimeType:t}=e,s=Array.isArray(t)?t[0]:t;if(s){if(s.endsWith("/pdf"))return P.PDF;if(s.startsWith("text/"))return P.TEXT;if(s.endsWith("/msword"))return P.MSWORD;if(s.endsWith("/json"))return P.JSON;if(s.endsWith("/xml"))return P.XML}},Je=["image/apng","image/bmp","image/gif","image/jpeg","image/x-icon","image/png","image/svg+xml"],Xe=["video/mp4"],Qe=["audio/mp4","audio/mpeg","audio/x-aac","audio/aac","audio/x-wav","audio/wav","audio/accp","audio/ogg","audio/webm","audio/x-flac"],Ze=[...Xe,...Je,...Qe],ts=["http","https"],es="video/mp4",ss="video/quicktime",rs="video/x-m4v",is="MPEG-4",ns="mov",as="h264",H=["__mp4","__mp3_160k","__png","__jpeg","__gif","original"].reverse(),Ht=({parsedShape:{tag:e}},{parsedShape:{tag:t}})=>H.includes(e)||H.includes(t)?H.indexOf(t)-H.indexOf(e):e.toLowerCase().localeCompare(t.toLowerCase()),os=(e,t)=>{const{allowedMimeTypes:s=Ze,allowedMethods:i=ts,sortPriority:r=Ht,sourceKey:n="src",mimeTypeKey:o="type",shapeKey:a="shape",parsedShapeKey:c="parsedShape"}=t||{},{shape:l=[]}=e||{},u=l.reduce((f,m)=>{let _,d;const h=Y(m),{uri:g,mimeType:A,containerFormat:I,videoCodec:b}=h;if(A&&(_=A,(A===ss||A===rs)&&(I===is||I===ns)&&b===as&&(_=es)),g)if(i){const[O]=g.split("://");i.includes(O)&&(d=g)}else d=g;return d&&s.includes(_)&&f.push({[n]:d,[o]:_,[a]:m,[c]:h}),f},[]);return typeof r=="function"&&u.sort(Ht),u},cs=e=>{const t=Y(e),{mimeType:s,videoCodec:i,audioCodec:r}=t;if(s){if(s.startsWith("audio/")&&r!==void 0)return y.AUDIO;if(s.startsWith("video/")){if(i!==void 0)return y.VIDEO;if(r!==void 0)return y.AUDIO}if(s.startsWith("image/"))return y.IMAGE;if(s.endsWith("/pdf")||s.startsWith("text/")||s.endsWith("/msword")||s.endsWith("/json")||s.endsWith("/xml"))return y.DOCUMENT;if(s.endsWith("/octet-stream"))return y.BINARY}},Kt="video/mp4",qt="video/quicktime",Jt="video/x-m4v",us="MPEG-4",ds="mov",ls="h264",fs=[Kt,qt,Jt],Xt=["video/x-mxf-h264","video/x-mxf-h264-aac","video/x-mxf-h264-pcm_s24le","video/x-mxf-mpeg2video-pcm_s24le","video/x-mxf-mpeg2video-pcm_s16le","video/x-mxf-prores-pcm_s16le","video/x-mxf-h264-pcm_s16le"],ms=[...fs,...Xt],hs=["audio/mp4","audio/mpeg","audio/x-aac","audio/aac","audio/x-wav","audio/wav","audio/accp","audio/ogg","audio/webm","audio/x-flac"],ps=[...ms,...hs],_s=["http","https"],Ts=({streamingServers:e,url:t,ending:s})=>se(e[0],window.btoa(t),`.${s}`),Es=(e,t)=>{const{allowedMimeTypes:s=ps,allowedMethods:i=_s,streamingServers:r=[]}=t||{},{shape:n=[]}=e||{},{startTimeCode:o}=Ct(e==null?void 0:e.metadata,{flat:!0,arrayOnSingleValue:!1});return n.reduce((c,l)=>{var N,j,k;let u,f,m;const _=Y(l),{uri:d,mimeType:h,containerFormat:g,videoCodec:A}=_;if(!(s!=null&&s.includes(h))||!(i!=null&&i.includes((N=d==null?void 0:d.split("://"))==null?void 0:N[0])))return c;if(m=_.tag,!m){const D=(k=(j=h==null?void 0:h.split)==null?void 0:j.call(h,"/"))==null?void 0:k.pop(),U=c.filter(q=>q.label===D).length;U===0?m=D:m=D+(U+1)}const{timeBase:I,startTimecode:b}=_,O=o??b,S=O&&L(O);return f=d,u=h,(h===qt||h===Jt)&&(g===us||g===ds)&&A===ls&&(u=Kt),r!=null&&r.length&&Xt.includes(h)&&(f=Ts({url:d,streamingServers:r,ending:"mpd"}),u="application/dash+xml"),f&&c.push({src:f,...u?{type:u}:{},...m?{label:m}:{},...I?{timeBase:I}:{},...S?{startTimeCode:S}:{}}),c},[])},Qt=e=>{const t={},{outputSetting:s=[]}=e||{};if(s.length===0)return t;const i=JSON.parse(s[0]),{Settings:{ContainerSettings:r,VideoDescription:n,AudioDescriptions:o}={}}=i;if(r&&(t.containerFormat=r.Container),n){const{CodecSettings:a={}}=n,{Codec:c,...l}=a;t.videoFormat=c;const{Height:u,Width:f}=n;t.height=u,t.width=f,u&&f&&(t.dimension=`${f}x${u}`,t.aspectRatio=J({height:u,width:f}));const[m]=Object.values(l);if(m){t.fieldOrder=m.InterlaceMode,t.fieldOrder&&t.fieldOrder.includes("TOP")&&(t.fieldOrder="interlaced"),t.videoBitrate=m.Bitrate;const _=m.FramerateDenominator,d=m.FramerateNumerator,h=w({denominator:d,numerator:_});t.timeBase=h,t.frameRate=h.toConstant()||h.toRate()}}if(o&&o.length>0){const{CodecSettings:a={}}=o[0],{Codec:c,...l}=a;t.audioFormat=c;const[u]=Object.values(l);u&&(t.audioSamplerate=u.SampleRate,t.audioBitrate=u.Bitrate,t.audioBitRateMode=u.RateControlMode)}return t},gs=e=>{const t={},{description:s,format:i,audio:r,video:n,mediaconvert:o}=e||{};if(o)return{description:s,...Qt(o)};if(t.description=s,t.containerFormat=i,n){if(t.videoFormat=n.codec,t.videoBitrate=n.bitrate,n.framerate){const a=w(n.framerate);t.timeBase=a,t.frameRate=a.toConstant()||a.toRate()}if(n.scaling){const{height:a,width:c}=n.scaling;t.height=a,t.width=c,a&&c&&(t.dimension=`${c}x${a}`,t.aspectRatio=J({height:a,width:c}))}}if(r){const{codec:a,channel:c}=r;t.audioFormat=a,c&&(t.audioChannels=c.length)}return t},As=e=>{if(!e)return;const{name:t,type:s,defaultValue:i,stringRestriction:r,floatRestriction:n,integerRestriction:o,longRestriction:a,data:c,values:l,system:u}=e,{minLength:f,maxLength:m,pattern:_}=r||{},{minInclusive:d,maxInclusive:h}=n||o||a||{},g=((l==null?void 0:l.field)||[]).map(({key:O,value:S})=>({label:S??O,value:O})),I=(O=>Object.fromEntries(Object.entries(O).filter(([,S])=>S!==void 0)))({min:d,max:h,minLength:f,maxLength:m,pattern:_?new RegExp(_):void 0}),b=M(c);return{name:t,type:s,defaultValue:i,required:d!==void 0||f!==void 0&&f>0,restrictions:I,data:b,options:g,system:u!==void 0?u==="true":void 0}},Is=e=>e==null?void 0:e.map(As).filter(t=>!!t),Os=["date","float","integer","long","string","string-exact","boolean","timeCode"];class K{constructor(){this.events={}}on(t,s){const i=this.events[t]||[];i.push(s),this.events[t]=i}off(t){this.events[t]&&(this.events[t]=[])}trigger(t,s,i){const r=this.events[t];!r||r.length<1||r.forEach(n=>{n(s,i)})}}var T=(e=>(e[e.transferring=1]="transferring",e[e.paused=2]="paused",e[e.complete=3]="complete",e[e.failed=4]="failed",e[e.idle=5]="idle",e[e.canceled=6]="canceled",e[e.offline=7]="offline",e))(T||{}),E=(e=>(e.progress="progress",e.update="update",e.complete="complete",e.error="error",e.added="upload-added",e.removed="upload-removed",e.failed="upload-failed",e.retry="retry",e.pausing="pausing",e.paused="paused",e.resuming="resuming",e.offline="offline",e.online="online",e))(E||{});class Zt{constructor(t={}){this.blobSlice=(t==null?void 0:t.blobSlice)??null,this.fileSize=(t==null?void 0:t.fileSize)??null,this.start=(t==null?void 0:t.start)??null,this.end=(t==null?void 0:t.end)??null,this.api=(t==null?void 0:t.api)??null,this.state={retries:0,status:T.idle,startTime:null,completeTime:null,response:null,bytesTransferred:null},this.eventBus=new K}tryTransfer(){return this.state.status=T.transferring,this.state.startTime=performance.now(),new Promise((t,s)=>{const i=()=>{this.transfer().then(r=>{this.state.response=r,this.onComplete(),t(this)}).catch(()=>{this.state.retries>3?(this.state.status=T.failed,s(new Error(`Chunk ${this.start}-${this.end} failed`))):this.state.status!==T.paused?(this.state.retries+=1,this.tryTimeout=setTimeout(()=>{i()},1e3)):clearTimeout(this.tryTimeout)})};i(),window.addEventListener(E.online,()=>{this.resume()}),window.addEventListener(E.offline,()=>{this.pause()})})}transfer(){let t={file:this.blobSlice,onUploadProgress:s=>{[T.complete,T.offline].includes(this.state.status)||(this.state.bytesTransferred=s==null?void 0:s.loaded,this.eventBus.trigger(E.progress,this.state))}};return this.end-this.start!==this.fileSize&&(t.headers={index:this.start,size:this.fileSize}),t={...t,...this.api.props||{}},this.transferPromise=this.api.method(t),this.state.status=T.transferring,this.transferPromise}pause(){this.state.status!==T.complete&&(this.state.status=T.paused)}resume(){this.state.status!==T.complete&&(this.state.status=T.transferring)}cancel(){this.state.status!==T.complete&&(this.state.status=T.canceled)}get transferRate(){if(this.state.bytesTransferred){const t=(this.state.completeTime-this.state.startTime)/1e3;return this.state.bytesTransferred/t}return 0}onComplete(){this.state.status=T.complete,this.state.bytesTransferred=this.end-this.start,this.state.completeTime=performance.now(),this.eventBus.trigger(E.complete,this.state)}}class dt{constructor(t,s){var i,r,n,o,a,c;if(this.DEFAULT_OPTIONS=Object.freeze({targetRate:4e6,chunkSize:8388608,minChunkSize:8388608,maxConcurrentTransfers:1,maxConcurrentFileTransfers:1,autoMaxConcurrentTransfers:!1,minFileSize:104857600,autoResume:!0,api:void 0}),this.eventBus=new K,!s.api.method)throw new Error("No api method specified");console.log(s),this.options={...this.DEFAULT_OPTIONS,...s,api:{...s.api??{},props:{...((i=s.api)==null?void 0:i.props)??{},queryParams:{transferId:ne(),...((n=(r=s.api)==null?void 0:r.props)==null?void 0:n.queryParams)??{}}}}},this.state={blob:null,chunks:[],transferPromises:[],targetRate:this.options.targetRate,rate:0,autoMaxConcurrentTransfers:this.options.autoMaxConcurrentTransfers,maxConcurrentTransfers:this.options.maxConcurrentTransfers,mime:"",status:T.idle,transferId:(c=(a=(o=s.api)==null?void 0:o.props)==null?void 0:a.queryParams)==null?void 0:c.transferId,lastStats:{}},typeof t=="object"?(this.state.blob=t,this.state.mime=t.type,this.addChunksFromBlob(t)):console.error(new Error(`Expected a File or a Blob object, but got ${typeof t}`))}upload(){const{status:t}=this.state;if(console.log("status",t),t!==T.complete)if(t===T.idle||t===T.transferring){this.state.transferPromises=[];const s=()=>{const i=this.state.chunks[0].state.status,r=this.state.transferPromises.length<this.state.maxConcurrentTransfers&&i!==T.transferring;return console.log("isOK",r),console.log("this.state",this.state),r};s()&&(console.log("this.state.chunks",this.state.chunks),this.state.chunks.forEach(i=>{i.state.status!==T.complete&&i.state.status!==T.transferring&&s()&&(this.state.status=T.transferring,this.state.transferPromises.push(i.tryTransfer()))}),this.state.transferPromises.length>0&&Promise.all(this.state.transferPromises).then(()=>{this.upload()}).catch(i=>{console.log("Failed on this upload() cycle, check connectivity and try to resume :(",i),this.state.status!==T.offline?(this.state.status=T.failed,this.eventBus.trigger(E.failed,this.state,i)):setTimeout(()=>this.retry(),5e3)}))}else this.retry()}getByteRangesForChunks(t,s=this.options.chunkSize){const i=[],{minChunkSize:r}=this.options;let o=s>=r?s:r,a=Math.floor(t.size/o);if(t.size-(t.size-t.size/a)>=r||(a-=1,o=Math.floor(t.size/a)),a<2||t.size<this.options.minFileSize)i.push({start:0,end:t.size});else for(let c=0;c<=a;c+=1){const l=o*c;let u=o*c+o;t.size-o*c<=r&&(u=t.size);const m={start:l,end:u};if(i.push(m),u===t.size)break}return i}addChunksFromBlob(t){this.getByteRangesForChunks(t).forEach(i=>{const r=new Zt({start:i.start,end:i.end,blobSlice:t.slice(i.start,i.end),fileSize:t.size,api:this.options.api});r.eventBus.on(E.progress,()=>{this.onProgress()}),r.eventBus.on(E.complete,()=>{this.onProgress()}),this.state.chunks.push(r)})}retry(){this.state.status===T.failed&&(this.resume(),this.eventBus.trigger(E.retry,this.state))}resume(){this.state.status=T.transferring,this.eventBus.trigger(E.resuming,this.state),this.state.chunks.length>0&&this.state.chunks.forEach(t=>{t.resume()})}pause(){this.state.status=T.paused,this.state.chunks.length>0&&this.state.chunks.forEach(s=>{s.pause()});const t=Promise.all(this.state.transferPromises);return this.eventBus.trigger(E.pausing,this.state),t.then(()=>{this.eventBus.trigger(E.paused,this.state)}),Promise.all(this.state.transferPromises)}cancel(){this.state.status=T.canceled,this.state.chunks.length>0&&this.state.chunks.forEach(s=>{s.cancel()}),this.upload=()=>{};const t=Promise.all(this.state.transferPromises);return t.then(()=>{this.eventBus.trigger(E.removed,this.state)}),t}autoAdjustMaxConcurrentTransfers(t){if(this.state.autoMaxConcurrentTransfers&&this.state.status!==T.complete){const s=t.avgTransferRate/this.state.targetRate;if(s>1.2)this.state.maxConcurrentTransfers+=1;else if(s<.3)this.state.maxConcurrentTransfers=1;else{const i=this.options.maxConcurrentTransfers-1;this.state.maxConcurrentTransfers=Math.max(this.options.maxConcurrentTransfers,Math.min(i,this.options.maxConcurrentTransfers))}}}onProgress(){try{const t=this.getStats();t!==this.state.lastStats&&(this.state.lastStats=t,ie(()=>{this.autoAdjustMaxConcurrentTransfers(t)},1e3,!1)({}),this.state.status!==T.complete&&(t.totalChunks===t.completedChunks?this.onComplete():(this.eventBus.trigger(E.progress,this.state),this.options.onProgress&&this.options.onProgress(t))))}catch(t){console.error(t)}}onComplete(){const t=this.getStats();this.state.lastStats=t,this.state.status=T.complete,this.eventBus.trigger(E.complete,this.state),this.options.onComplete&&this.options.onComplete(this.finalResponse)}getStats(){const t=this.state.chunks.length,s=this.state.chunks.filter(l=>l.state.status===T.complete),i=this.state.chunks.filter(l=>l.state.status===T.transferring),r=s.length;let n=0,o=0;s.forEach(l=>{n+=l.transferRate,o+=l.blobSlice.size}),i.forEach(l=>{o+=l.state.bytesTransferred});const a=n/r,c={totalChunks:t,completedChunks:r,totalBytes:this.state.blob.size,transferredBytes:o,avgTransferRate:a,concurrentTransfers:this.state.maxConcurrentTransfers};return this.state.rate=c.avgTransferRate,c}set concurrentTransfers(t){this.state.autoMaxConcurrentTransfers=!1,this.state.maxConcurrentTransfers=t}set rate(t){this.state.targetRate=t}get rate(){return this.state.rate}get finalResponse(){const t=this.state.chunks.length-1,s=!1;for(let i=t;i>=0;i-=1){const r=this.state.chunks[i];if(typeof r.state.response.data=="object")return r.state.response}return s}get transferId(){return this.state.transferId}}function bs(e,t){return e===0||t===0?0:Math.floor(e/t*100)}const Ss={maxConcurrentFileTransfers:1,autoResume:!0};class Rs{constructor(t){this.initialState=Object.freeze({status:T.idle,transfers:[],bytesDone:0,bytesTotal:0,lastStats:{bytesDone:0,bytesTotal:0}}),this.state={...this.initialState},this.options={...Ss,...t},this.events=new K,this.bindNetworkEvents()}get transfers(){return Object.values(this.state.transfers)||[]}get status(){return this.state.status}set status(t){this.events.trigger(E.update,this.state),this.state.status=t}get bytesTotal(){let t=0;return this.transfers.forEach(s=>{t+=s.state.blob.size}),t}get bytesDone(){let t=0;return this.transfers.forEach(s=>{t+=s.getStats().transferredBytes}),t}get isUploading(){return this.state.status===T.transferring}get paused(){let t=!0;return this.transfers.forEach(s=>{s.state.status!==T.paused&&(t=!1)}),t}bindNetworkEvents(){typeof window>"u"||(window.addEventListener(E.online,()=>{this.events.trigger(E.online,this.state),this.state.status=T.transferring,this.options.autoResume&&setTimeout(()=>{this.retry()},1500)}),window.addEventListener(E.offline,()=>{this.events.trigger(E.offline,this.state),this.state.status=T.offline}))}addChunkedUpload(t){console.log("chunkedUpload",t),t.transferId!==null&&(this.state.transfers[t.transferId]=t,t.eventBus.on(E.progress,()=>{this.onProgress()}),t.eventBus.on(E.complete,()=>{this.upload(),this.onProgress()}),t.eventBus.on(E.failed,(s,i)=>{this.onFail(i,s)}),t.eventBus.on(E.retry,()=>{this.events.trigger(E.retry,this.state)}),t.eventBus.on(E.paused,()=>{this.paused&&this.events.trigger(E.paused,this.state)}),this.updateStats(),this.events.trigger(E.added,this.state),this.events.trigger(E.update,this.state))}removeChunkedUpload(t,s=!1){const i=r=>r?r.state.status===T.complete&&!s?(console.error("Can't cancel complete transfers, pass true as a second argument in .removeChunkedUpload() to force removal."),!1):(Object.keys(this.state.transfers).forEach(n=>{r===this.state.transfers[n]&&delete this.state.transfers[n]}),this.events.trigger(E.removed,this.state),r.cancel(),!0):(console.error("Could not find a matching transfer to cancel."),!1);t instanceof dt?i(t):t instanceof File?i(this.exists(t)):typeof t=="string"?i(this.transfers.find(r=>r.transferId===t)):console.error("Invalid object to remove - has to be either ChunkedUpload, File or transferId")}onProgress(){this.updateStats(),this.hasCompleted?this.onComplete():this.state.bytesDone!==this.state.lastStats.bytesDone&&(this.state.status=T.transferring,this.events.trigger(E.progress,this.state))}onComplete(){this.state.status=T.complete,this.events.trigger(E.complete,this.state)}exists(t){let s;for(let i=0;i<this.transfers.length;i+=1){const r=this.transfers[i];if(r.state.blob.name===t.name&&r.state.blob.lastModified===t.lastModified&&r.state.blob.size&&t.size)return s=r,s}return s}isTransferAvailable(t){return t.state.status!==T.complete&&t.state.status!==T.transferring||t.state.status===T.idle}pause(){let t=Promise.resolve(!0);if(!this.paused){this.events.trigger(E.pausing,this.state);const s=[];this.transfers.forEach(i=>{s.push(i.pause())}),t=Promise.all(s),t.then(()=>{this.events.trigger(E.paused,this.state)})}return t}resume(){this.events.trigger(E.update,this.state),this.transfers.forEach(t=>{this.isTransferAvailable(t)&&t.state.status!==T.idle&&t.resume()})}retry(){this.status===T.failed&&(this.resume(),this.events.trigger(E.retry,this.state))}upload(){let t=0;console.log("this.transfers",this.transfers),console.log("this.options.maxConcurrentFileTransfers",this.options.maxConcurrentFileTransfers),console.log("before ongoingTransfers",t),this.transfers.forEach(s=>{this.isTransferAvailable(s)?t<this.options.maxConcurrentFileTransfers&&(this.events.trigger(E.update,this.state),s.upload(),t+=1):s.state.status!==T.complete&&(t+=1)}),t>0&&(this.status=T.transferring),t<this.options.maxConcurrentFileTransfers&&this.transfers.length<t&&this.upload(),console.log("after ongoingTransfers",t)}onFail(t,s){this.status=T.failed,this.events.trigger(E.error,s,t)}reset(){this.transfers.forEach(t=>{t.constructor.name===dt.name&&this.removeChunkedUpload(t,!0)}),this.state={...this.initialState},this.events.trigger(E.update,this.state),this.events.trigger(E.complete,this.state)}destroy(){this.reset()}get hasCompleted(){let t=!0;return this.transfers.forEach(s=>{s.state.status!==T.complete&&(t=!1)}),t}updateStats(){this.state.lastStats.bytesDone=this.state.bytesDone,this.state.lastStats.bytesTotal=this.state.bytesTotal,this.state.bytesTotal=this.bytesTotal,this.state.bytesDone=this.bytesDone}get percentDone(){return bs(this.state.bytesDone,this.state.bytesTotal)}get fileList(){const t=[];return this.transfers.forEach(s=>{const i=s.getStats(),{totalChunks:r,completedChunks:n}=i,o={name:s.state.blob.name,bytesDone:i.transferredBytes,bytesTotal:s.state.blob.size,totalChunks:r,completedChunks:n,transfer:s};t.push(o)}),t}}const te=(e,t,s="")=>{const i=a=>{const c=a.startsWith("/")?a.slice(1):a,l=(c==null?void 0:c.search("/"))??-1;return l===-1?[c]:[c.slice(0,l),c.slice(l+1)]},[r,n]=i(t),o=[s,r].filter(Boolean).join("/");return n?{[r]:{file:new File([e],r,{...e,type:"folder"}),path:o,progress:{totalBytes:e.size??0,transferredBytes:0},files:te(e,n,o)}}:{[r]:{file:e,path:o,progress:{totalBytes:e.size??0,transferredBytes:0}}}},ys=e=>e.map(t=>te(t,t.path??t.webkitRelativePath)).reduce((t,s)=>re(t,s),{});p.Chunk=Zt,p.ChunkedTransferManager=Rs,p.ChunkedUpload=dt,p.ChunkedUploadEventBus=K,p.DOCUMENT_TYPES=P,p.EVENTS=E,p.FIELD_ATTRIBUTE_KEYS=ht,p.FIELD_DEFINITION_TYPES=Os,p.FIELD_VALUE_ATTRIBUTE_KEYS=mt,p.FILE_STATES=Ke,p.GROUP_ATTRIBUTE_KEYS=pt,p.ROLE_NAMES=ae,p.SHAPE_MEDIA_TYPES=y,p.STATUSES=T,p.SYSTEM_FIELDGROUPS=oe,p.SYSTEM_FIELDS=ce,p.TimeBase=R,p.TimeCode=F,p.createMetadataType=pe,p.createSearchFacetList=Pe,p.createTimeBase=W,p.createTimeCode=L,p.fileListToFileTree=ys,p.filterShapeSource=os,p.findNearestThumbnail=$t,p.formatTimeBaseText=G,p.formatTimeBaseType=w,p.formatTimeCodeSeconds=Pt,p.formatTimeCodeSmpte=jt,p.formatTimeCodeText=$,p.formatTimeCodeType=B,p.getPlayerSources=Es,p.getShapeDocumentType=qe,p.getShapeMediaType=cs,p.metadataTypeToWebVtt=Be,p.parseAudioComponent=xt,p.parseBinaryComponent=Gt,p.parseContainerComponent=zt,p.parseFacetList=je,p.parseFacetType=ke,p.parseFieldDefinitionList=Is,p.parseFieldList=tt,p.parseFileType=ut,p.parseGroupList=st,p.parseHighlightTimespan=z,p.parseHighlightTimespanList=$e,p.parseKeyValuePairType=M,p.parseMediaConvertPreset=Qt,p.parseMetadataType=Ct,p.parseNowDate=ze,p.parseSearchResultEvents=Ge,p.parseShapeType=Y,p.parseSimpleMetadataType=be,p.parseTimespan=Dt,p.parseTimespanList=it,p.parseTranscodePreset=gs,p.parseVideoComponent=Yt,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vidispine/vdt-js",
3
- "version": "23.4.0-pre.4",
3
+ "version": "23.4.0",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -38,18 +38,18 @@
38
38
  "format": "prettier . --check"
39
39
  },
40
40
  "dependencies": {
41
- "@vidispine/types": "23.4.0-pre.4",
41
+ "@vidispine/types": "23.4.0",
42
42
  "filesize": "^10.1.0",
43
43
  "lodash.merge": "^4.6.2",
44
44
  "url-join": "^5.0.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@vidispine/eslint-config-base": "23.4.0-pre.4",
48
- "@vidispine/eslint-config-mdx": "23.4.0-pre.4",
49
- "@vidispine/eslint-config-storybook": "23.4.0-pre.4",
50
- "@vidispine/tests": "23.4.0-pre.4",
51
- "@vidispine/types": "23.4.0-pre.4",
52
- "@vidispine/vdt-storybook": "23.4.0-pre.4",
47
+ "@vidispine/eslint-config-base": "23.4.0",
48
+ "@vidispine/eslint-config-mdx": "23.4.0",
49
+ "@vidispine/eslint-config-storybook": "23.4.0",
50
+ "@vidispine/tests": "23.4.0",
51
+ "@vidispine/types": "23.4.0",
52
+ "@vidispine/vdt-storybook": "23.4.0",
53
53
  "eslint": "8.55.0",
54
54
  "eslint-plugin-testing-library": "6.2.0",
55
55
  "prettier": "3.1.1",