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