!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.TaipyGui=t():e.TaipyGui=t()}(self,(()=>(()=>{"use strict";const e=(e,t,o,s,a,n,l,p,r)=>{const d=new XMLHttpRequest;d.open("POST",`${t}?client_id=${p}`,!1),d.onerror=e=>self.postMessage({message:"Error: "+e,error:!0}),d.onload=e=>r(e.lengthComputable?e.loaded:0);const i=new FormData;i.append("blob",e,n),i.append("part",s.toString()),i.append("total",a.toString()),i.append("var_name",o),i.append("multiple",l?"True":"False"),d.send(i)},t=1048576,o=(e,t)=>o=>self.postMessage({progress:100*(t+o)/e,done:!1});return self.onmessage=s=>{((s,a,n,l)=>{if(s){let p=0;for(let e=0;e<s.length;e++)p+=s[e].size;const r=[];for(let d=0;d<s.length;d++){const i=s[d],f=i.size;let c=0,u=t;const g=Math.ceil(f/t);for(;c<f;){const f=i.slice(c,u),m=o(p,c);m(0),e(f,a,n,Math.floor(c/t),g,i.name,0!=d&&s.length>0,l,m),m(f.size),c=u,u=c+t,r.push(i.name)}}self.postMessage({progress:100,message:r.join(", ")+" Uploaded Successfully",done:!0})}})(s.data.files,s.data.uploadUrl,s.data.varName,s.data.id)},{}})()));