!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,(function(){return function(){"use strict";const e=(e,t,o,s,n,a,r,l,p)=>{const d=new XMLHttpRequest;d.open("POST",`${t}?client_id=${l}`,!1),d.onerror=e=>self.postMessage({message:"Error: "+e,error:!0}),d.onload=e=>p(e.lengthComputable?e.loaded:0);const i=new FormData;i.append("blob",e,a),i.append("part",s.toString()),i.append("total",n.toString()),i.append("var_name",o),i.append("multiple",r?"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,n,a,r)=>{if(s){let l=0;for(let e=0;e<s.length;e++)l+=s[e].size;const p=[];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(l,c);m(0),e(f,n,a,Math.floor(c/t),g,i.name,0!=d&&s.length>0,r,m),m(f.size),c=u,u=c+t,p.push(i.name)}}self.postMessage({progress:100,message:p.join(", ")+" Uploaded Succesfully",done:!0})}})(s.data.files,s.data.uploadUrl,s.data.varName,s.data.id)},{}}()}));