/*! * filepond 4.4.2 * licensed under mit, https://opensource.org/licenses/mit/ * please visit https://pqina.nl/filepond/ for details. */ /* eslint-disable */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).filepond={})}(this,function(e){"use strict";var t,n,r=function(e,t){for(var n in e)e.hasownproperty(n)&&t(n,e[n])},o=function(e){var t={};return r(e,function(n){!function(e,t,n){"function"!=typeof n?object.defineproperty(e,t,object.assign({},n)):e[t]=n}(t,n,e[n])}),t},i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(null===n)return e.getattribute(t)||e.hasattribute(t);e.setattribute(t,n)},a=["svg","path"],s=function(e){return a.includes(e)},u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"==typeof t&&(n=t,t=null);var o=s(e)?document.createelementns("http://www.w3.org/2000/svg",e):document.createelement(e);return t&&(s(e)?i(o,"class",t):o.classname=t),r(n,function(e,t){i(o,e,t)}),o},l=function(e,t){return function(e,n){return void 0!==n?t.splice(n,0,e):t.push(e),e}},c=function(e,t){return function(n){return t.splice(t.indexof(n),1),n.element.parentnode&&e.removechild(n.element),n}},f=function(e,t,n,r){var o=n[0]||e.left,i=n[1]||e.top,a=o+e.width,s=i+e.height*(r[1]||1),u={element:object.assign({},e),inner:{left:e.left,top:e.top,right:e.right,bottom:e.bottom},outer:{left:o,top:i,right:a,bottom:s}};return t.filter(function(e){return!e.isrectignored()}).map(function(e){return e.rect}).foreach(function(e){p(u.inner,object.assign({},e.inner)),p(u.outer,object.assign({},e.outer))}),d(u.inner),u.outer.bottom+=u.element.marginbottom,u.outer.right+=u.element.marginright,d(u.outer),u},p=function(e,t){t.top+=e.top,t.right+=e.left,t.bottom+=e.top,t.left+=e.left,t.bottom>e.bottom&&(e.bottom=t.bottom),t.right>e.right&&(e.right=t.right)},d=function(e){e.width=e.right-e.left,e.height=e.bottom-e.top},e=function(e){return"number"==typeof e},_=function(e){return e<.5?2*e*e:(4-2*e)*e-1},t={spring:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiffness,n=void 0===t?.5:t,r=e.damping,i=void 0===r?.75:r,a=e.mass,s=void 0===a?10:a,u=null,l=null,c=0,f=!1,p=o({interpolate:function(){if(!f){if(!e(u)||!e(l))return f=!0,void(c=0);!function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.001;return math.abs(e-t)0&&void 0!==arguments[0]?arguments[0]:{},r=n.duration,i=void 0===r?500:r,a=n.easing,s=void 0===a?_:a,u=n.delay,l=void 0===u?0:u,c=null,f=!0,p=!1,d=null,e=o({interpolate:function(n){f||null===d||(null===c&&(c=n),n-c=0?s(p?1-t:t):0)*d)):(e=1,t=p?0:1,e.onupdate(t*d),e.oncomplete(t*d),f=!0)))},target:{get:function(){return p?0:d},set:function(e){if(null===d)return d=e,e.onupdate(e),void e.oncomplete(e);e3&&void 0!==arguments[3]&&arguments[3];(t=array.isarray(t)?t:[t]).foreach(function(t){e.foreach(function(e){var o=e,i=function(){return n[e]},a=function(t){return n[e]=t};"object"==typeof e&&(o=e.key,i=e.getter||i,a=e.setter||a),t[o]&&!r||(t[o]={get:i,set:a})})})},v=function(e){return null!=e},g={opacity:1,scalex:1,scaley:1,translatex:0,translatey:0,rotatex:0,rotatey:0,rotatez:0,originx:0,originy:0},r=function(e,t){if(object.keys(e).length!==object.keys(t).length)return!0;for(var n in t)if(t[n]!==e[n])return!0;return!1},h=function(e,t){var n=t.opacity,r=t.perspective,o=t.translatex,i=t.translatey,a=t.scalex,s=t.scaley,u=t.rotatex,l=t.rotatey,c=t.rotatez,f=t.originx,p=t.originy,d=t.width,e=t.height,_="",t="";(v(f)||v(p))&&(t+="transform-origin: "+(f||0)+"px "+(p||0)+"px;"),v(r)&&(_+="perspective("+r+"px) "),(v(o)||v(i))&&(_+="translate3d("+(o||0)+"px, "+(i||0)+"px, 0) "),(v(a)||v(s))&&(_+="scale3d("+(v(a)?a:1)+", "+(v(s)?s:1)+", 1) "),v(c)&&(_+="rotatez("+c+"rad) "),v(u)&&(_+="rotatex("+u+"rad) "),v(l)&&(_+="rotatey("+l+"rad) "),_.length&&(t+="transform:"+_+";"),v(n)&&(t+="opacity:"+n+";",0===n&&(t+="visibility:hidden;"),n<1&&(t+="pointer-events:none;")),v(e)&&(t+="height:"+e+"px;"),v(d)&&(t+="width:"+d+"px;");var i=e.elementcurrentstyle||"";t.length===i.length&&t===i||(e.setattribute("style",t),e.elementcurrentstyle=t)},o={styles:function(e){var t=e.mixinconfig,n=e.viewprops,r=e.viewinternalapi,o=e.viewexternalapi,i=e.view,a=object.assign({},n),s={};m(t,[r,o],n);var u=function(){return i.rect?f(i.rect,i.childviews,[n.translatex||0,n.translatey||0],[n.scalex||0,n.scaley||0]):null};return r.rect={get:u},o.rect={get:u},t.foreach(function(e){n[e]=void 0===a[e]?g[e]:a[e]}),{write:function(){if(r(s,n))return h(i.element,n),object.assign(s,object.assign({},n)),!0},destroy:function(){}}},listeners:function(e){e.mixinconfig,e.viewprops,e.viewinternalapi;var t,n=e.viewexternalapi,r=(e.viewstate,e.view),o=[],i=(t=r.element,function(e,n){t.addeventlistener(e,n)}),a=function(e){return function(t,n){e.removeeventlistener(t,n)}}(r.element);return n.on=function(e,t){o.push({type:e,fn:t}),i(e,t)},n.off=function(e,t){o.splice(o.findindex(function(n){return n.type===e&&n.fn===t}),1),a(e,t)},{write:function(){return!0},destroy:function(){o.foreach(function(e){a(e.type,e.fn)})}}},animations:function(e){var t=e.mixinconfig,n=e.viewprops,o=e.viewinternalapi,i=e.viewexternalapi,a=(e.viewstate,object.assign({},n)),s=[];return r(t,function(e,t){var r=i(t);r&&(r.onupdate=function(t){n[e]=t},r.target=a[e],m([{key:e,setter:function(e){r.target!==e&&(r.target=e)},getter:function(){return n[e]}}],[o,i],n,!0),s.push(r))}),{write:function(e){var t=!0;return s.foreach(function(n){n.resting||(t=!1),n.interpolate(e)}),t},destroy:function(){}}},apis:function(e){var t=e.mixinconfig,n=e.viewprops,r=e.viewexternalapi;m(t,r,n)}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.layoutcalculated||(e.paddingtop=parseint(n.paddingtop,10)||0,e.margintop=parseint(n.margintop,10)||0,e.marginright=parseint(n.marginright,10)||0,e.marginbottom=parseint(n.marginbottom,10)||0,e.marginleft=parseint(n.marginleft,10)||0,t.layoutcalculated=!0),e.left=t.offsetleft||0,e.top=t.offsettop||0,e.width=t.offsetwidth||0,e.height=t.offsetheight||0,e.right=e.left+e.width,e.bottom=e.top+e.height,e.scrolltop=t.scrolltop,e.hidden=null===t.offsetparent,e},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.tag,n=void 0===t?"div":t,r=e.name,i=void 0===r?null:r,a=e.attributes,s=void 0===a?{}:a,p=e.read,d=void 0===p?function(){}:p,e=e.write,_=void 0===e?function(){}:e,t=e.create,i=void 0===t?function(){}:t,m=e.destroy,v=void 0===m?function(){}:m,g=e.filterframeactionsforchild,r=void 0===g?function(e,t){return t}:g,h=e.didcreateview,s=void 0===h?function(){}:h,y=e.didwriteview,a=void 0===y?function(){}:y,b=e.ignorerect,p=void 0!==b&&b,l=e.ignorerectupdate,m=void 0!==l&&l,c=e.mixins,n=void 0===c?[]:c;return function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=u(n,"filepond--"+i,s),p=window.getcomputedstyle(a,null),e=d(),t=null,m=!1,g=[],h=[],y={},b={},l=[_],c=[d],w=[v],g=function(){return a},u=function(){return g.concat()},b=function(){return t||(t=f(e,g,[0,0],[1,1]))},v={element:{get:g},style:{get:function(){return p}},childviews:{get:u}},f=object.assign({},v,{rect:{get:b},ref:{get:function(){return y}},is:function(e){return i===e},appendchild:(t=a,function(e,n){void 0!==n&&t.children[n]?t.insertbefore(e,t.children[n]):t.appendchild(e)}),createchildview:function(e){return function(t,n){return t(e,n)}}(e),linkview:function(e){return g.push(e),e},unlinkview:function(e){g.splice(g.indexof(e),1)},appendchildview:l(0,g),removechildview:c(a,g),registerwriter:function(e){return l.push(e)},registerreader:function(e){return c.push(e)},registerdestroyer:function(e){return w.push(e)},invalidatelayout:function(){return a.layoutcalculated=!1},dispatch:e.dispatch,query:e.query}),q={element:{get:g},childviews:{get:u},rect:{get:b},resting:{get:function(){return m}},isrectignored:function(){return p},_read:function(){t=null,g.foreach(function(e){return e._read()}),!(m&&e.width&&e.height)&&d(e,a,p);var e={root:y,props:r,rect:e};c.foreach(function(t){return t(e)})},_write:function(e,t,n){var o=0===t.length;return l.foreach(function(i){!1===i({props:r,root:y,actions:t,timestamp:e,shouldoptimize:n})&&(o=!1)}),h.foreach(function(t){!1===t.write(e)&&(o=!1)}),g.filter(function(e){return!!e.element.parentnode}).foreach(function(r){r._write(e,r(r,t),n)||(o=!1)}),g.foreach(function(r,i){r.element.parentnode||(y.appendchild(r.element,i),r._read(),r._write(e,r(r,t),n),o=!1)}),m=o,a({props:r,root:y,actions:t,timestamp:e}),o},_destroy:function(){h.foreach(function(e){return e.destroy()}),w.foreach(function(e){e({root:y,props:r})}),g.foreach(function(e){return e._destroy()})}},x=object.assign({},v,{rect:{get:function(){return e}}});object.keys(n).sort(function(e,t){return"styles"===e?1:"styles"===t?-1:0}).foreach(function(e){var t=o[e]({mixinconfig:n[e],viewprops:r,viewstate:b,viewinternalapi:f,viewexternalapi:q,view:o(x)});t&&h.push(t)});var y=o(f);i({root:y,props:r});var j=a.children.length;return g.foreach(function(e,t){y.appendchild(e.element,j+t)}),s(y),o(q)}},y=function(e,t){return function(n){var r=n.root,o=n.props,i=n.actions,a=void 0===i?[]:i,s=n.timestamp,u=n.shouldoptimize;a.filter(function(t){return e[t.type]}).foreach(function(t){return e[t.type]({root:r,props:o,action:t.data,timestamp:s,shouldoptimize:u})}),t&&t({root:r,props:o,actions:a,timestamp:s,shouldoptimize:u})}},a=function(e,t){return t.parentnode.insertbefore(e,t)},b=function(e,t){return t.parentnode.insertbefore(e,t.nextsibling)},p=function(e){return array.isarray(e)},l=function(e){return null==e},m=function(e){return e.trim()},c=function(e){return""+e},n=function(e){return"boolean"==typeof e},w=function(e){return n(e)?e:"true"===e},g=function(e){return"string"==typeof e},u=function(e){return e(e)?e:g(e)?c(e).replace(/[a-z]+/gi,""):0},b=function(e){return parseint(u(e),10)},v=function(e){return parsefloat(u(e))},f=function(e){return e(e)&&isfinite(e)&&math.floor(e)===e},q=function(e){if(f(e))return e;var t=c(e).trim();return/mb$/i.test(t)?(t=t.replace(/mb$i/,"").trim(),1e3*b(t)*1e3):/kb/i.test(t)?(t=t.replace(/kb$i/,"").trim(),1e3*b(t)):b(t)},x=function(e){return"function"==typeof e},y={process:"post",revert:"delete",fetch:"get",restore:"get",load:"get"},j=function(e,t,n,r){if(null===t)return null;if("function"==typeof t)return t;var o={url:"get"===n?"?"+e+"=":"",method:n,headers:{},withcredentials:!1,timeout:r,onload:null,ondata:null,onerror:null};if(g(t))return o.url=t,o;if(object.assign(o,t),g(o.headers)){var i=o.headers.split(/:(.+)/);o.headers={header:i[0],value:i[1]}}return o.withcredentials=w(o.withcredentials),o},h=function(e){return"object"==typeof e&&null!==e},x=function(e){return p(e)?"array":function(e){return null===e}(e)?"null":f(e)?"int":/^[0-9]+ ?(?:gb|mb|kb)$/gi.test(e)?"bytes":function(e){return h(e)&&g(e.url)&&h(e.process)&&h(e.revert)&&h(e.restore)&&h(e.fetch)}(e)?"api":typeof e},w={array:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",";return l(e)?[]:p(e)?e:c(e).split(t).map(m).filter(function(e){return e.length})},boolean:w,int:function(e){return"bytes"===x(e)?q(e):b(e)},number:v,float:v,bytes:q,string:function(e){return x(e)?e:c(e)},function:function(e){return function(e){for(var t=self,n=e.split("."),r=null;r=n.shift();)if(!(t=t[r]))return null;return t}(e)},serverapi:function(e){return(n={}).url=g(t=e)?t:t.url||"",n.timeout=t.timeout?parseint(t.timeout,10):0,r(y,function(e){n[e]=j(e,t[e],y[e],n.timeout)}),n.remove=t.remove||null,n;var t,n},object:function(e){try{return json.parse(e.replace(/{\s*'/g,'{"').replace(/'\s*}/g,'"}').replace(/'\s*:/g,'":').replace(/:\s*'/g,':"').replace(/,\s*'/g,',"').replace(/'\s*,/g,'",'))}catch(e){return null}}},z=function(e,t,n){if(e===t)return e;var r,o=x(e);if(o!==n){var i=(r=e,w[n](r));if(o=x(i),null===i)throw'trying to assign value with incorrect type to "'+option+'", allowed type: "'+n+'"';e=i}return e},k=function(e){var t={};return r(e,function(n){var r,o,i,a=e[n];t[n]=(r=a[0],o=a[1],i=r,{enumerable:!0,get:function(){return i},set:function(e){i=z(e,r,o)}})}),o(t)},q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e.split(/(?=[a-z])/).map(function(e){return e.tolowercase()}).join(t)},z=function(e){return function(t,n,o){var i={};return r(e,function(e){var n=q(e,"_").touppercase();i["set_"+n]=function(r){try{o.options[e]=r.value}catch(e){}t("did_set_"+n,{value:o.options[e]})}}),i}},$=function(e){return function(t){var n={};return r(e,function(e){n["get_"+q(e,"_").touppercase()]=function(n){return t.options[e]}}),n}},k=1,j=2,ee=3,te=4,ne=5,re=function(){return math.random().tostring(36).substr(2,9)},oe=function(e,t){return e.splice(t,1)},ie=function(){var e=[],t=function(t,n){oe(e,e.findindex(function(e){return e.event===t&&(e.cb===n||!n)}))};return{fire:function(t){for(var n=arguments.length,r=new array(n>1?n-1:0),o=1;obrowse',pe.string],labelinvalidfield:["field contains invalid files",pe.string],labelfilewaitingforsize:["waiting for size",pe.string],labelfilesizenotavailable:["size not available",pe.string],labelfilecountsingular:["file in list",pe.string],labelfilecountplural:["files in list",pe.string],labelfileloading:["loading",pe.string],labelfileadded:["added",pe.string],labelfileloaderror:["error during load",pe.string],labelfileremoved:["removed",pe.string],labelfileremoveerror:["error during remove",pe.string],labelfileprocessing:["uploading",pe.string],labelfileprocessingcomplete:["upload complete",pe.string],labelfileprocessingaborted:["upload cancelled",pe.string],labelfileprocessingerror:["error during upload",pe.string],labelfileprocessingreverterror:["error during revert",pe.string],labeltaptocancel:["tap to cancel",pe.string],labeltaptoretry:["tap to retry",pe.string],labeltaptoundo:["tap to undo",pe.string],labelbuttonremoveitem:["remove",pe.string],labelbuttonabortitemload:["abort",pe.string],labelbuttonretryitemload:["retry",pe.string],labelbuttonabortitemprocessing:["cancel",pe.string],labelbuttonundoitemprocessing:["undo",pe.string],labelbuttonretryitemprocessing:["retry",pe.string],labelbuttonprocessitem:["upload",pe.string],iconremove:['',pe.string],iconprocess:['',pe.string],iconretry:['',pe.string],iconundo:['',pe.string],icondone:['',pe.string],oninit:[null,pe.function],onwarning:[null,pe.function],onerror:[null,pe.function],onactivatefile:[null,pe.function],onaddfilestart:[null,pe.function],onaddfileprogress:[null,pe.function],onaddfile:[null,pe.function],onprocessfilestart:[null,pe.function],onprocessfileprogress:[null,pe.function],onprocessfileabort:[null,pe.function],onprocessfilerevert:[null,pe.function],onprocessfile:[null,pe.function],onprocessfiles:[null,pe.function],onremovefile:[null,pe.function],onpreparefile:[null,pe.function],onupdatefiles:[null,pe.function],beforedropfile:[null,pe.function],beforeaddfile:[null,pe.function],beforeremovefile:[null,pe.function],stylepanellayout:[null,pe.string],stylepanelaspectratio:[null,pe.string],styleitempanelaspectratio:[null,pe.string],stylebuttonremoveitemposition:["left",pe.string],stylebuttonprocessitemposition:["right",pe.string],styleloadindicatorposition:["right",pe.string],styleprogressindicatorposition:["right",pe.string],files:[[],pe.array]},ve=function(e,t){return l(t)?e[0]||null:f(t)?e[t]||null:("object"==typeof t&&(t=t.id),e.find(function(e){return e.id===t})||null)},ge=function(e){if(l(e))return e;if(/:/.test(e)){var t=e.split(":");return t[1]/t[0]}return parsefloat(e)},re=function(e){return e.filter(function(e){return!e.archived})},he={empty:0,idle:1,error:2,busy:3,ready:4},oe=[le.load_error,le.processing_error,le.processing_revert_error],de=[le.loading,le.processing,le.processing_queued,le.init],se=[le.processing_complete],ye=function(e){return oe.includes(e.status)},ae=function(e){return de.includes(e.status)},be=function(e){return se.includes(e.status)},pe=function(e){return{get_status:function(){var t=re(e.items),n=he.empty,r=he.error,o=he.busy,i=he.idle,a=he.ready;return 0===t.length?n:t.some(ye)?r:t.some(ae)?o:t.some(be)?a:i},get_item:function(t){return ve(e.items,t)},get_active_item:function(t){return ve(re(e.items),t)},get_active_items:function(t){return re(e.items)},get_items:function(t){return e.items},get_item_name:function(t){var n=ve(e.items,t);return n?n.filename:null},get_item_size:function(t){var n=ve(e.items,t);return n?n.filesize:null},get_styles:function(){return object.keys(e.options).filter(function(e){return/^style/.test(e)}).map(function(t){return{name:t,value:e.options[t]}})},get_panel_aspect_ratio:function(){return/circle/.test(e.options.stylepanellayout)?1:ge(e.options.stylepanelaspectratio)},get_item_panel_aspect_ratio:function(){return e.options.styleitempanelaspectratio},get_items_by_status:function(t){return re(e.items).filter(function(e){return e.status===t})},get_total_items:function(){return re(e.items).length},is_async:function(){return h(e.options.server)&&(h(e.options.server.process)||x(e.options.server.process))}}},le=function(e,t,n){return l(t)?null:void 0===n?(e.push(t),t):(r=n,o=0,i=e.length,function(e,t,n){e.splice(t,0,n)}(e,n=math.max(math.min(i,r),o),t),t);var r,o,i},me=function(e){return/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i.test(e)},ce=function(e){return e.split("/").pop().split("?").shift()},ne=function(e){return e.split(".").pop()},we=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(t+e).slice(-t.length)},ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new date;return e.getfullyear()+"-"+we(e.getmonth()+1,"00")+"-"+we(e.getdate(),"00")+"_"+we(e.gethours(),"00")+"-"+we(e.getminutes(),"00")+"-"+we(e.getseconds(),"00")},ue=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o="string"==typeof n?e.slice(0,e.size,n):e.slice(0,e.size,e.type);return o.lastmodifieddate=new date,g(t)||(t=ge()),t&&null===r&&ne(t)?o.name=t:(r=r||function(e){if("string"!=typeof e)return"";var t=e.split("/").pop();return/svg/.test(t)?"svg":/zip|compressed/.test(t)?"zip":/plain/.test(t)?"txt":/msword/.test(t)?"doc":/[a-z]+/.test(t)?"jpeg"===t?"jpg":t:""}(o.type),o.name=t+(r?"."+r:"")),o},be=function(e,t){var n=window.blobbuilder=window.blobbuilder||window.webkitblobbuilder||window.mozblobbuilder||window.msblobbuilder;if(n){var r=new n;return r.append(e),r.getblob(t)}return new blob([e],{type:t})},ve=function(e){return(/^data:(.+);/.exec(e)||[])[1]||null},fe=function(e){var t=ve(e);return function(e,t){for(var n=new arraybuffer(e.length),r=new uint8array(n),o=0;o=200&&a.status<300?r.onload(a):r.onerror(a)},a.onerror=function(){return r.onerror(a)},a.onabort=function(){o=!0,r.onabort()},a.ontimeout=function(){return r.ontimeout(a)},a.open(n.method,t,!0),f(n.timeout)&&(a.timeout=n.timeout),object.keys(n.headers).foreach(function(e){a.setrequestheader(e,n.headers[e])}),n.responsetype&&(a.responsetype=n.responsetype),n.withcredentials&&(a.withcredentials=!0),a.send(e),r},ze=function(e,t,n,r){return{type:e,code:t,body:n,headers:r}},ke=function(e){return function(t){e(ze("error",0,"timeout",t.getallresponseheaders()))}},qe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if("function"==typeof t)return t;if(!t||!g(t.url))return null;var n=t.onload||function(e){return e},r=t.onerror||function(e){return null};return function(o,i,a,s,u,l){var c=we(o,e+t.url,object.assign({},t,{responsetype:"blob"}));return c.onload=function(e){var t=e.getallresponseheaders(),r=je(t).name||ce(o);i(ze("load",e.status,ue(n(e.response),r),t))},c.onerror=function(e){a(ze("error",e.status,r(e.response)||e.statustext,e.getallresponseheaders()))},c.onheaders=function(e){l(ze("headers",e.status,null,e.getallresponseheaders()))},c.ontimeout=ke(a),c.onprogress=s,c.onabort=u,c}},ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if("function"==typeof t)return t;if(!t||!g(t.url))return function(e,t){return t()};var n=t.onload||function(e){return e},r=t.onerror||function(e){return null};return function(o,i,a){var s=we(o,e+t.url,t);return s.onload=function(e){i(ze("load",e.status,n(e.response),e.getallresponseheaders()))},s.onerror=function(e){a(ze("error",e.status,r(e.response)||e.statustext,e.getallresponseheaders()))},s.ontimeout=ke(a),s}},$e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e+math.random()*(t-e)},ke=function(e){var t={complete:!1,perceivedprogress:0,perceivedperformanceupdater:null,progress:null,timestamp:null,perceivedduration:0,duration:0,request:null,response:null},n=function(){t.request&&(t.perceivedperformanceupdater.clear(),t.request.abort(),t.complete=!0)},r=object.assign({},ie(),{process:function(n,o){var i=function(){0!==t.duration&&null!==t.progress&&r.fire("progress",r.getprogress())},a=function(){t.complete=!0,r.fire("load-perceived",t.response.body)};r.fire("start"),t.timestamp=date.now(),t.perceivedperformanceupdater=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,n=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],arguments.length>3&&void 0!==arguments[3]?arguments[3]:25),r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,o=null,i=date.now();return function a(){var s=date.now()-i,u=$e(n,r);s+u>t&&(u=s+u-t);var l=s/t;l>=1?e(1):(e(l),o=settimeout(a,u))}(),{clear:function(){cleartimeout(o)}}}(function(e){t.perceivedprogress=e,t.perceivedduration=date.now()-t.timestamp,i(),t.response&&1===t.perceivedprogress&&!t.complete&&a()},$e(750,1500)),t.request=e(n,o,function(e){t.response=h(e)?e:{type:"load",code:200,body:""+e,headers:{}},t.duration=date.now()-t.timestamp,t.progress=1,r.fire("load",t.response.body),1===t.perceivedprogress&&a()},function(e){t.perceivedperformanceupdater.clear(),r.fire("error",h(e)?e:{type:"error",code:0,body:""+e})},function(e,n,r){t.duration=date.now()-t.timestamp,t.progress=e?n/r:null,i()},function(){t.perceivedperformanceupdater.clear(),r.fire("abort",t.response?t.response.body:null)})},abort:n,getprogress:function(){return t.progress?math.min(t.progress,t.perceivedprogress):null},getduration:function(){return math.min(t.duration,t.perceivedduration)},reset:function(){n(),t.complete=!1,t.perceivedprogress=0,t.progress=0,t.timestamp=null,t.perceivedduration=0,t.duration=0,t.request=null,t.response=null}});return r},je=function(e){return e.substr(0,e.lastindexof("."))||e},et={input:1,limbo:2,local:3},tt=function(e){return e instanceof file||e instanceof blob&&e.name},nt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=re(),i={archived:!1,frozen:!1,released:!1,source:null,file:n,serverfilereference:t,status:t?le.processing_complete:le.init,activeloader:null,activeprocessor:null},a=null,s={},u=function(e){return i.status=e},l=function(e){if(!i.released&&!i.frozen){for(var t=arguments.length,n=new array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{},r=n.query,o=n.success,i=void 0===o?function(){}:o,a=n.failure,s=void 0===a?function(){}:a,u=ve(e.items,r);u?t(u,i,s):s({error:ze("error",0,"item not found"),file:null})}},ft=function(e,t,n){return{abort_all:function(){re(n.items).foreach(function(e){e.freeze(),e.abortload(),e.abortprocessing()})},did_set_files:function(t){var r=t.value,o=(void 0===r?[]:r).map(function(e){return{source:e.source?e.source:e,options:e.options}}),i=re(n.items);i.foreach(function(t){o.find(function(e){return e.source===t.source||e.source===t.file})||e("remove_item",{query:t})}),i=re(n.items),o.foreach(function(t,n){i.find(function(e){return e.source===t.source||e.file===t.source})||e("add_item",object.assign({},t,{interactionmethod:ne,index:n}))})},did_update_item_metadata:function(r){var o=r.id,i=(r.change,rt(n.items,o));if(t("is_async")){var a,s=function(){settimeout(function(){e("request_item_processing",{query:o})},32)};return i.status===le.processing_complete?(a=n.options.instantupload,void i.revert(ze(n.options.server.url,n.options.server.revert),t("get_force_revert")).then(a?s:function(){}).catch(function(){})):i.status===le.processing?function(e){i.abortprocessing().then(e?s:function(){})}(n.options.instantupload):void(n.options.instantupload&&s())}ee("should_prepare_output",!1,{item:i,query:t}).then(function(t){t&&e("request_prepare_output",{query:o,item:i,ready:function(t){e("did_prepare_output",{id:o,file:t})}},!0)})},sort:function(e){var t=e.compare;lt(n,t)},add_items:function(n){var r=n.items,o=n.index,i=n.interactionmethod,a=n.success,s=void 0===a?function(){}:a,u=n.failure,l=void 0===u?function(){}:u,c=o;if(-1===o||void 0===o){var f=t("get_item_insert_location"),p=t("get_total_items");c="before"===f?0:p}var d=t("get_ignored_files"),e=r.filter(function(e){return tt(e)?!d.includes(e.name.tolowercase()):!l(e)}).map(function(t){return new promise(function(n,r){e("add_item",{interactionmethod:i,source:t.source||t,success:n,failure:r,index:c++,options:t.options||{}})})});promise.all(e).then(s).catch(l)},add_item:function(r){var o=r.source,i=r.index,a=void 0===i?-1:i,s=r.interactionmethod,u=r.success,l=void 0===u?function(){}:u,c=r.failure,f=void 0===c?function(){}:c,p=r.options,d=void 0===p?{}:p;if(l(o))f({error:ze("error",0,"no source"),file:null});else if(!tt(o)||!n.options.ignoredfiles.includes(o.name.tolowercase())){if(!function(e){var t=re(e.items).length;if(!e.options.allowmultiple)return 0===t;var n=e.options.maxfiles;return null===n||t=400&&t.code<500)return e("did_throw_item_invalid",{id:g,error:t,status:{main:r,sub:t.code+" ("+t.body+")"}}),void f({error:t,file:ue(m)});e("did_throw_item_load_error",{id:g,error:t,status:{main:r,sub:n.options.labeltaptoretry}})}),m.on("load-file-error",function(t){e("did_throw_item_invalid",{id:g,error:t.status,status:t.status})}),m.on("load-abort",function(){e("remove_item",{query:g})}),m.on("load-skip",function(){e("complete_load_item",{query:g,item:m,data:{source:o,success:l}})}),m.on("load",function(){var r=function(r){r?(m.on("metadata-update",function(t){e("did_update_item_metadata",{id:g,change:t})}),ee("should_prepare_output",!1,{item:m,query:t}).then(function(t){var r=function(){e("complete_load_item",{query:g,item:m,data:{source:o,success:l}}),st(e,n)};t?e("request_prepare_output",{query:g,item:m,ready:function(t){e("did_prepare_output",{id:g,file:t}),r()}},!0):r()})):e("remove_item",{query:g})};ee("did_load_item",m,{query:t,dispatch:e}).then(function(){ut(t("get_before_add_file"),ue(m)).then(r)}).catch(function(){r(!1)})}),m.on("process-start",function(){e("did_start_item_processing",{id:g})}),m.on("process-progress",function(t){e("did_update_item_process_progress",{id:g,progress:t})}),m.on("process-error",function(t){e("did_throw_item_processing_error",{id:g,error:t,status:{main:at(n.options.labelfileprocessingerror)(t),sub:n.options.labeltaptoretry}})}),m.on("process-revert-error",function(t){e("did_throw_item_processing_revert_error",{id:g,error:t,status:{main:at(n.options.labelfileprocessingreverterror)(t),sub:n.options.labeltaptoretry}})}),m.on("process-complete",function(t){e("did_complete_item_processing",{id:g,error:null,serverfilereference:t})}),m.on("process-abort",function(){e("did_abort_item_processing",{id:g})}),m.on("process-revert",function(){e("did_revert_item_processing",{id:g})}),e("did_add_item",{id:g,index:a,interactionmethod:s}),st(e,n);var r=n.options.server||{},h=r.url,o=r.load,d=r.restore,s=r.fetch;m.load(o,he(i===et.input?g(o)&&function(e){return(e.indexof(":")>-1||e.indexof("//")>-1)&&it(location.href)!==it(e)}(o)?qe(h,s):ot:qe(h,i===et.limbo?d:o)),function(e,n,r){ee("load_file",e,{query:t}).then(n).catch(r)})}},request_prepare_output:function(e){var n=e.item,r=e.ready;n.archived||ee("prepare_output",n.file,{query:t,item:n}).then(function(e){ee("complete_prepare_output",e,{query:t,item:n}).then(function(e){n.archived||r(e)})})},complete_load_item:function(r){var o=r.item,i=r.data,a=i.success,s=i.source,u=t("get_item_insert_location");x(u)&&s&<(n,u),e("did_load_item",{id:o.id,error:null,serverfilereference:o.origin===et.input?null:s}),a(ue(o)),o.origin!==et.local?o.origin!==et.limbo?t("is_async")&&n.options.instantupload&&e("request_item_processing",{query:o.id}):e("did_complete_item_processing",{id:o.id,error:null,serverfilereference:s}):e("did_load_local_item",{id:o.id})},retry_item_load:ct(n,function(e){e.retryload()}),request_item_processing:ct(n,function(r,o,i){if(r.status===le.idle||r.status===le.processing_error)r.status!==le.processing_queued&&(r.requestprocessing(),e("did_request_item_processing",{id:r.id}),e("process_item",{query:r,success:o,failure:i},!0));else{var a=function(){settimeout(function(){e("request_item_processing",{query:r,success:o,failure:i})},32)};r.status===le.processing_complete||r.status===le.processing_revert_error?r.revert(ze(n.options.server.url,n.options.server.revert),t("get_force_revert")).then(a).catch(function(){}):r.status===le.processing&&r.abortprocessing().then(a)}}),process_item:ct(n,function(r,o,i){var a=t("get_max_parallel_uploads");if(t("get_items_by_status",le.processing).length!==a){if(r.status!==le.processing){var s=function(){var t=n.processingqueue.shift();t&&e("process_item",{query:t.item,success:t.success,failure:t.failure},!0)};r.ononce("process-complete",function(){o(ue(r)),s(),t("get_items_by_status",le.processing_complete).length===n.items.length&&e("did_complete_item_processing_all")}),r.ononce("process-error",function(e){i({error:e,file:ue(r)}),s()}),r.process(ke(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return"function"==typeof t?function(){for(var e=arguments.length,r=new array(e),o=0;or&&o-r<=.5&&(i=0),r>o&&r-o>=.5&&(i=0),function(e,t,n,r,o,i){var a=_t(e,t,n,o),s=_t(e,t,n,r);return["m",a.x,a.y,"a",n,n,0,i,0,s.x,s.y].join(" ")}(e,t,n,360*math.min(.9999,r),360*math.min(.9999,o),i)},it=s({tag:"div",name:"progress-indicator",ignorerectupdate:!0,ignorerect:!0,create:function(e){var t=e.root,n=e.props;n.spin=!1,n.progress=0,n.opacity=0;var r=u("svg");t.ref.path=u("path",{"stroke-width":2,"stroke-linecap":"round"}),r.appendchild(t.ref.path),t.ref.svg=r,t.appendchild(r)},write:function(e){var t=e.root,n=e.props;if(0!==n.opacity){n.align&&(t.element.dataset.align=n.align);var r=parseint(i(t.ref.path,"stroke-width"),10),o=.5*t.rect.element.width,a=0,s=0;n.spin?(a=0,s=.5):(a=0,s=n.progress);var u=tt(o,o,o-r,a,s);i(t.ref.path,"d",u),i(t.ref.path,"stroke-opacity",n.spin||n.progress>0?1:0)}},mixins:{apis:["progress","spin","align"],styles:["opacity"],animations:{opacity:{type:"tween",duration:500},progress:{type:"spring",stiffness:.95,damping:.65,mass:10}}}}),mt=s({tag:"button",attributes:{type:"button"},ignorerect:!0,ignorerectupdate:!0,name:"file-action-button",mixins:{apis:["label"],styles:["translatex","translatey","scalex","scaley","opacity"],animations:{scalex:"spring",scaley:"spring",translatex:"spring",translatey:"spring",opacity:{type:"tween",duration:250}},listeners:!0},create:function(e){var t=e.root,n=e.props;t.element.innerhtml=(n.icon||"")+""+n.label+"",n.isdisabled=!1},write:function(e){var t=e.root,n=e.props,r=n.isdisabled,o=t.query("get_disabled")||0===n.opacity;o&&!r?(n.isdisabled=!0,i(t.element,"disabled","disabled")):!o&&r&&(n.isdisabled=!1,t.element.removeattribute("disabled"))}}),vt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".";return(e=math.round(math.abs(e)))<1e3?e+" bytes":em){if(t.left3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;e.translatex=t,e.translatey=n,date.now()>e.spawndate&&(0===e.opacity&&nn(e,t,n,r,o),e.scalex=1,e.scaley=1,e.opacity=1)},nn=function(e,t,n,r,o){e.interactionmethod===ne?(e.translatex=null,e.translatex=t,e.translatey=null,e.translatey=n):e.interactionmethod===j?(e.translatex=null,e.translatex=t-20*r,e.translatey=null,e.translatey=n-10*o,e.scalex=.8,e.scaley=.8):e.interactionmethod===ee?(e.translatey=null,e.translatey=n-30):e.interactionmethod===k&&(e.translatex=null,e.translatex=t-30,e.translatey=null)},rn=y({did_add_item:function(e){var t=e.root,n=e.action,r=n.id,o=n.index,i=n.interactionmethod;t.ref.addindex=o;var a=date.now(),s=a,u=1;if(i!==ne){u=0;var l=t.query("get_item_insert_interval"),c=a-t.ref.lastitemspanwdate;s=c3&&void 0!==arguments[3]?arguments[3]:"";n?i(e,t,r):e.removeattribute(t)},ln=function(e){var t=e.root,n=(e.action,t.query("get_disabled")),r=t.query("get_allow_browse"),o=n||!r;un(t.element,"disabled",o)},cn=function(e){var t=e.root,n=t.element;t.query("get_total_items")>0?(un(n,"required",!1),un(n,"name",!1)):(un(n,"name",!0,t.query("get_name")),t.query("get_check_validity")&&n.setcustomvalidity(""),t.query("get_required")&&un(n,"required",!0))},fn=s({tag:"input",name:"browser",ignorerect:!0,ignorerectupdate:!0,attributes:{type:"file"},create:function(e){var t=e.root,n=e.props;t.element.id="filepond--browser-"+n.id,i(t.element,"name",t.query("get_name")),i(t.element,"aria-controls","filepond--assistant-"+n.id),i(t.element,"aria-labelledby","filepond--drop-label-"+n.id),t.ref.handlechange=function(e){if(t.element.value){var r=array.from(t.element.files);settimeout(function(){n.onload(r),function(e){if(e&&""!==e.value){try{e.value=""}catch(e){}if(e.value){var t=dt("form"),n=e.parentnode,r=e.nextsibling;t.appendchild(e),t.reset(),r?n.insertbefore(e,r):n.appendchild(e)}}}(t.element)},250)}},t.element.addeventlistener("change",t.ref.handlechange)},destroy:function(e){var t=e.root;t.element.removeeventlistener("change",t.ref.handlechange)},write:y({did_load_item:cn,did_remove_item:cn,did_throw_item_invalid:function(e){var t=e.root;t.query("get_check_validity")&&t.element.setcustomvalidity(t.query("get_label_invalid_field"))},did_set_disabled:ln,did_set_allow_browse:ln,did_set_allow_multiple:function(e){var t=e.root,n=e.action;un(t.element,"multiple",n.value)},did_set_accepted_file_types:function(e){var t=e.root,n=e.action;un(t.element,"accept",!!n.value,n.value?n.value.join(","):"")},did_set_capture_method:function(e){var t=e.root,n=e.action;un(t.element,"capture",!!n.value,!0===n.value?"":n.value)},did_set_required:function(e){var t=e.root;e.action.value?0===t.query("get_total_items")&&un(t.element,"required",!0):un(t.element,"required",!1)}})}),pn=13,dn=32,en=function(e,t){e.innerhtml=t;var n=e.queryselector(".filepond--label-action");return n&&i(n,"tabindex","0"),t},_n=s({name:"drop-label",ignorerect:!0,create:function(e){var t=e.root,n=e.props,r=dt("label");i(r,"for","filepond--browser-"+n.id),i(r,"id","filepond--drop-label-"+n.id),i(r,"aria-hidden","true"),r.addeventlistener("keydown",function(e){(e.keycode===pn||e.keycode===dn)&&(e.preventdefault(),t.ref.label.click())}),t.element.addeventlistener("click",function(e){e.target===r||r.contains(e.target)||t.ref.label.click()}),en(r,n.caption),t.appendchild(r),t.ref.label=r},write:y({did_set_label_idle:function(e){var t=e.root,n=e.action;en(t.ref.label,n.value)}}),mixins:{styles:["opacity","translatex","translatey"],animations:{opacity:{type:"tween",duration:150},translatex:"spring",translatey:"spring"}}}),tn=s({name:"drip-blob",ignorerect:!0,mixins:{styles:["translatex","translatey","scalex","scaley","opacity"],animations:{scalex:"spring",scaley:"spring",translatex:"spring",translatey:"spring",opacity:{type:"tween",duration:250}}}}),in=y({did_drag:function(e){var t=e.root,n=e.action;t.ref.blob?(t.ref.blob.translatex=n.position.scopeleft,t.ref.blob.translatey=n.position.scopetop,t.ref.blob.scalex=1,t.ref.blob.scaley=1,t.ref.blob.opacity=1):function(e){var t=e.root,n=.5*t.rect.element.width,r=.5*t.rect.element.height;t.ref.blob=t.appendchildview(t.createchildview(tn,{opacity:0,scalex:2.5,scaley:2.5,translatex:n,translatey:r}))}({root:t})},did_drop:function(e){var t=e.root;t.ref.blob&&(t.ref.blob.scalex=2.5,t.ref.blob.scaley=2.5,t.ref.blob.opacity=0)},did_end_drag:function(e){var t=e.root;t.ref.blob&&(t.ref.blob.opacity=0)}}),mn=s({ignorerect:!0,ignorerectupdate:!0,name:"drip",write:function(e){var t=e.root,n=e.props,r=e.actions;in({root:t,props:n,actions:r});var o=t.ref.blob;0===r.length&&o&&0===o.opacity&&(t.removechildview(o),t.ref.blob=null)}}),vn=["jpg","jpeg","png","gif","bmp","webp","svg","tiff"],gn=["css","csv","html","txt"],rn={zip:"zip|compressed",epub:"application/epub+zip"},hn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=e.tolowercase(),vn.includes(e)?"image/"+("jpg"===e?"jpeg":"svg"===e?"svg+xml":e):gn.includes(e)?"text/"+e:rn[e]||null},on=function(e){return new promise(function(t,n){var r=cn(e);r.length?t(r):dn(e).then(t)})},dn=function(e){return new promise(function(t,n){var r=(e.items?array.from(e.items):[]).filter(function(e){return sn(e)}).map(function(e){return yn(e)});r.length?promise.all(r).then(function(e){var n=[];e.foreach(function(e){n.push.apply(n,e)}),t(n.filter(function(e){return e}))}):t(e.files?array.from(e.files):[])})},sn=function(e){if(ln(e)){var t=mn(e);if(t)return t.isfile||t.isdirectory}return"file"===e.kind},yn=function(e){return new promise(function(t,n){pn(e)?an(mn(e)).then(t):t([e.getasfile()])})},an=function(e){return new promise(function(t,n){var r=[],o=0;!function e(n){n.createreader().readentries(function(n){n.foreach(function(n){n.isdirectory?e(n):(o++,n.file(function(e){r.push(bn(e)),o===r.length&&t(r)}))})})}(e)})},bn=function(e){if(e.type.length)return e;var t=e.lastmodifieddate,n=e.name;return(e=e.slice(0,e.size,hn(ne(e.name)))).name=n,e.lastmodifieddate=t,e},pn=function(e){return ln(e)&&(mn(e)||{}).isdirectory},ln=function(e){return"webkitgetasentry"in e},mn=function(e){return e.webkitgetasentry()},cn=function(e){var t=[];try{if((t=wn(e)).length)return t;t=nn(e)}catch(e){}return t},nn=function(e){var t=e.getdata("url");return"string"==typeof t&&t.length?[t]:[]},wn=function(e){var t=e.getdata("text/html");if("string"==typeof t&&t.length){var n=t.match(/src\s*=\s*"(.+?)"/);if(n)return[n[1]]}return[]},gn=[],un=function(e){return{pageleft:e.pagex,pagetop:e.pagey,scopeleft:e.offsetx||e.layerx,scopetop:e.offsety||e.layery}},bn=function(e){var t=gn.find(function(t){return t.element===e});if(t)return t;var n=vn(e);return gn.push(n),n},vn=function(e){var t=[],n={dragenter:yn,dragover:jn,dragleave:xn,drop:hn},o={};r(n,function(n,r){o[n]=r(e,t),e.addeventlistener(n,o[n],!1)});var i={element:e,addlistener:function(a){return t.push(a),function(){t.splice(t.indexof(a),1),0===t.length&&(gn.splice(gn.indexof(i),1),r(n,function(t){e.removeeventlistener(t,o[t],!1)}))}}};return i},fn=function(e,t){var n,r=function(e,t){return"elementfrompoint"in e||(e=document),e.elementfrompoint(t.x,t.y)}("getrootnode"in(n=t)?n.getrootnode():document,{x:e.pagex-window.pagexoffset,y:e.pagey-window.pageyoffset});return r===t||t.contains(r)},qn=null,xn=function(e,t){try{e.dropeffect=t}catch(e){}},yn=function(e,t){return function(e){e.preventdefault(),qn=e.target,t.foreach(function(t){var n=t.element,r=t.onenter;fn(e,n)&&(t.state="enter",r(un(e)))})}},jn=function(e,t){return function(e){e.preventdefault();var n=e.datatransfer;on(n).then(function(r){var o=!1;t.some(function(t){var i=t.filterelement,a=t.element,s=t.onenter,u=t.onexit,l=t.ondrag,c=t.allowdrop;xn(n,"copy");var f=c(r);if(f)if(fn(e,a)){if(o=!0,null===t.state)return t.state="enter",void s(un(e));if(t.state="over",i&&!f)return void xn(n,"none");l(un(e))}else i&&!o&&xn(n,"none"),t.state&&(t.state=null,u(un(e)));else xn(n,"none")})})}},hn=function(e,t){return function(e){e.preventdefault();var n=e.datatransfer;on(n).then(function(n){t.foreach(function(t){var r=t.filterelement,o=t.element,i=t.ondrop,a=t.onexit,s=t.allowdrop;t.state=null,s(n)?r&&!fn(e,o)||i(un(e),n):a(un(e))})})}},xn=function(e,t){return function(e){qn===e.target&&t.foreach(function(t){var n=t.onexit;t.state=null,n(un(e))})}},wn=function(e,t,n){e.classlist.add("filepond--hopper");var r=n.catchesdropsonpage,o=n.requiresdroponelement,i=function(e,t,n){var r=bn(t),o={element:e,filterelement:n,state:null,ondrop:function(){},onenter:function(){},ondrag:function(){},onexit:function(){},onload:function(){},allowdrop:function(){}};return o.destroy=r.addlistener(o),o}(e,r?document.documentelement:e,o),a="",s="";i.allowdrop=function(e){return t(e)},i.ondrop=function(e,n){t(n)?(s="drag-drop",u.onload(n,e)):u.ondragend(e)},i.ondrag=function(e){u.ondrag(e)},i.onenter=function(e){s="drag-over",u.ondragstart(e)},i.onexit=function(e){s="drag-exit",u.ondragend(e)};var u={updatehopperstate:function(){a!==s&&(e.dataset.hopperstate=s,a=s)},onload:function(){},ondragstart:function(){},ondrag:function(){},ondragend:function(){},destroy:function(){i.destroy()}};return u},zn=!1,kn=[],qn=function(e){on(e.clipboarddata).then(function(e){e.length&&kn.foreach(function(t){return t(e)})})},zn=function(){var e=function(e){t.onload(e)},t={destroy:function(){var t;t=e,oe(kn,kn.indexof(t)),0===kn.length&&(document.removeeventlistener("paste",qn),zn=!1)},onload:function(){}};return function(e){kn.includes(e)||(kn.push(e),zn||(zn=!0,document.addeventlistener("paste",qn)))}(e),t},$n=null,kn=null,jn=[],er=function(e,t){e.element.textcontent=t},tr=function(e,t,n){var r=e.query("get_total_items");er(e,n+" "+t+", "+r+" "+(1===r?e.query("get_label_file_count_singular"):e.query("get_label_file_count_plural"))),cleartimeout(kn),kn=settimeout(function(){!function(e){e.element.textcontent=""}(e)},1500)},nr=function(e){return e.element.parentnode.contains(document.activeelement)},rr=function(e){var t=e.root,n=e.action,r=t.query("get_item",n.id).filename,o=t.query("get_label_file_processing_aborted");er(t,r+" "+o)},or=function(e){var t=e.root,n=e.action,r=t.query("get_item",n.id).filename;er(t,n.status.main+" "+r+" "+n.status.sub)},ir=s({create:function(e){var t=e.root,n=e.props;t.element.id="filepond--assistant-"+n.id,i(t.element,"role","status"),i(t.element,"aria-live","polite"),i(t.element,"aria-relevant","additions")},ignorerect:!0,ignorerectupdate:!0,write:y({did_load_item:function(e){var t=e.root,n=e.action;if(nr(t)){t.element.textcontent="";var r=t.query("get_item",n.id);jn.push(r.filename),cleartimeout($n),$n=settimeout(function(){tr(t,jn.join(", "),t.query("get_label_file_added")),jn.length=0},750)}},did_remove_item:function(e){var t=e.root,n=e.action;if(nr(t)){var r=n.item;tr(t,r.filename,t.query("get_label_file_removed"))}},did_complete_item_processing:function(e){var t=e.root,n=e.action,r=t.query("get_item",n.id).filename,o=t.query("get_label_file_processing_complete");er(t,r+" "+o)},did_abort_item_processing:rr,did_revert_item_processing:rr,did_throw_item_remove_error:or,did_throw_item_load_error:or,did_throw_item_invalid:or,did_throw_item_processing_error:or}),tag:"span",name:"assistant"}),ar=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e.replace(new regexp(t+".","g"),function(e){return e.charat(1).touppercase()})},sr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=date.now(),o=null;return function(){for(var i=arguments.length,a=new array(i),s=0;s=0?1:0,e=i.find(function(e){return e.markedforremoval&&e.opacity<.45})?-1:0,_=i.length+d+e,t=math.round(a/f);return 1===t?i.foreach(function(e){var r=e.rect.element.height+l;n+=r,t+=r*e.opacity}):(n=math.ceil(_/t)*p,t=n),{visual:t,bounds:n}},cr=function(e){var t=e.ref.measureheight||null;return{cappedheight:parseint(e.style.maxheight,10)||null,fixedheight:0===t?null:t}},fr=function(e,t){var n=e.query("get_allow_replace"),r=e.query("get_allow_multiple"),o=e.query("get_total_items"),i=e.query("get_max_files"),a=t.length;return!r&&a>1||!!(f(i=r?i:n?i:1)&&o+a>i)&&(e.dispatch("did_throw_max_files",{source:t,error:ze("warning",0,"max files")}),!0)},pr=function(e,t){var n=e.childviews[0];return en(n,{left:t.scopeleft-n.rect.element.left,top:t.scopetop-(e.rect.outer.top+e.rect.element.margintop+e.rect.element.scrolltop)})},dr=function(e){var t=e.query("get_allow_drop"),n=e.query("get_disabled"),r=t&&!n;if(r&&!e.ref.hopper){var o=wn(e.element,function(t){if(fr(e,t))return!1;var n=e.query("get_before_drop_file")||function(){return!0};return!e.query("get_drop_validation")||t.every(function(t){return _e("allow_hopper_item",t,{query:e.query}).every(function(e){return!0===e})&&n(t)})},{catchesdropsonpage:e.query("get_drop_on_page"),requiresdroponelement:e.query("get_drop_on_element")});o.onload=function(t,n){e.dispatch("add_items",{items:t,index:pr(e.ref.list,n),interactionmethod:j}),e.dispatch("did_drop",{position:n}),e.dispatch("did_end_drag",{position:n})},o.ondragstart=function(t){e.dispatch("did_start_drag",{position:t})},o.ondrag=sr(function(t){e.dispatch("did_drag",{position:t})}),o.ondragend=function(t){e.dispatch("did_end_drag",{position:t})},e.ref.hopper=o,e.ref.drip=e.appendchildview(e.createchildview(mn))}else!r&&e.ref.hopper&&(e.ref.hopper.destroy(),e.ref.hopper=null,e.removechildview(e.ref.drip))},er=function(e,t){var n=e.query("get_allow_browse"),r=e.query("get_disabled"),o=n&&!r;o&&!e.ref.browser?e.ref.browser=e.appendchildview(e.createchildview(fn,object.assign({},t,{onload:function(t){if(fr(e,t))return!1;e.dispatch("add_items",{items:t,index:-1,interactionmethod:ee})}})),0):!o&&e.ref.browser&&(e.removechildview(e.ref.browser),e.ref.browser=null)},_r=function(e){var t=e.query("get_allow_paste"),n=e.query("get_disabled"),r=t&&!n;r&&!e.ref.paster?(e.ref.paster=zn(),e.ref.paster.onload=function(t){e.dispatch("add_items",{items:t,index:pr(e.ref.list,position),interactionmethod:te})}):!r&&e.ref.paster&&(e.ref.paster.destroy(),e.ref.paster=null)},tr=y({did_set_allow_browse:function(e){var t=e.root,n=e.props;er(t,n)},did_set_allow_drop:function(e){var t=e.root;dr(t)},did_set_allow_paste:function(e){var t=e.root;_r(t)},did_set_disabled:function(e){var t=e.root,n=e.props;dr(t),_r(t),er(t,n),t.query("get_disabled")?t.element.dataset.disabled="disabled":delete t.element.dataset.disabled}}),ir=s({name:"root",read:function(e){var t=e.root;t.ref.measure&&(t.ref.measureheight=t.ref.measure.offsetheight)},create:function(e){var t=e.root,n=e.props,r=t.query("get_id");r&&(t.element.id=r);var o=t.query("get_class_name");o&&o.split(" ").foreach(function(e){t.element.classlist.add(e)}),t.ref.label=t.appendchildview(t.createchildview(_n,object.assign({},n,{translatey:null,caption:t.query("get_label_idle")}))),t.ref.list=t.appendchildview(t.createchildview(sn,{translatey:null})),t.ref.panel=t.appendchildview(t.createchildview(qt,{name:"panel-root"})),t.ref.assistant=t.appendchildview(t.createchildview(ir,object.assign({},n))),t.ref.measure=dt("div"),t.ref.measure.style.height="100%",t.element.appendchild(t.ref.measure),t.ref.bounds=null,t.query("get_styles").filter(function(e){return!l(e.value)}).map(function(e){var n=e.name,r=e.value;t.element.dataset[n]=r}),t.ref.widthprevious=null,t.ref.widthupdated=sr(function(){t.dispatch("did_resize_root")},250),t.ref.previousaspectratio=null,t.ref.updatehistory=[]},write:function(e){var t=e.root,n=e.props,r=e.actions;t.rect.element.width!==t.ref.widthprevious&&(t.ref.widthprevious=t.rect.element.width,t.ref.widthupdated());var o=t.ref.bounds;o||(o=t.ref.bounds=cr(t),t.element.removechild(t.ref.measure),t.ref.measure=null),tr({root:t,props:n,actions:r}),r.filter(function(e){return/^did_set_style_/.test(e.type)}).filter(function(e){return!l(e.data.value)}).map(function(e){var n=e.type,r=e.data,o=ar(n.substr(8).tolowercase(),"_");t.element.dataset[o]=r.value,t.invalidatelayout()});var i=t.ref,a=i.hopper,s=i.label,u=i.list,l=i.panel;a&&a.updatehopperstate();var c=t.query("get_panel_aspect_ratio"),f=t.query("get_allow_multiple"),p=t.query("get_total_items"),d=p===(f?t.query("get_max_files")||1e6:1),e=r.find(function(e){return"did_add_item"===e.type});if(d&&e){var _=e.data.interactionmethod;s.opacity=0,f?s.translatey=-40:_===k?s.translatex=40:s.translatey=_===ee?40:30}else d||(s.opacity=1,s.translatex=0,s.translatey=0);var t=ur(t),i=lr(t),m=s.rect.element.height,v=!f||d?0:m,g=d?u.rect.element.margintop:0,r=0===p?0:u.rect.element.marginbottom,h=v+g+i.visual+r,o=v+g+i.bounds+r;if(u.translatey=math.max(0,v-u.rect.element.margintop)-t.top,c){var d=t.rect.element.width,s=d*c;c!==t.ref.previousaspectratio&&(t.ref.previousaspectratio=c,t.ref.updatehistory=[]);var y=t.ref.updatehistory;if(y.push(d),y.length>4)for(var a=y.length,b=a-10,p=0,m=a;m>=b;m--)if(y[m]===y[m-2]&&p++,p>=2)return;l.scalable=!1,l.height=s;var c=s-v-(r-t.bottom)-(d?g:0);i.visual>c?u.overflow=c:u.overflow=null,t.height=s}else if(o.fixedheight){l.scalable=!1;var n=o.fixedheight-v-(r-t.bottom)-(d?g:0);i.visual>n?u.overflow=n:u.overflow=null}else if(o.cappedheight){var w=h>=o.cappedheight,g=math.min(o.cappedheight,h);l.scalable=!0,l.height=w?g:g-t.top-t.bottom;var u=g-v-(r-t.bottom)-(d?g:0);h>o.cappedheight&&i.visual>u?u.overflow=u:u.overflow=null,t.height=math.min(o.cappedheight,o-t.top-t.bottom)}else{var b=p>0?t.top+t.bottom:0;l.scalable=!0,l.height=math.max(m,h-b),t.height=math.max(m,o-b)}},destroy:function(e){var t=e.root;t.ref.paster&&t.ref.paster.destroy(),t.ref.hopper&&t.ref.hopper.destroy()},mixins:{styles:["height"]}}),mr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null,n=ie(),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=object.assign({},e),o=[],i=[],a=function(e,t,n){n?i.push({type:e,data:t}):(c[e]&&c[e](t),o.push({type:e,data:t}))},s=function(e){for(var t,n=arguments.length,r=new array(n>1?n-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:{};return new promise(function(n,r){h([{source:e,options:t}],{index:t.index}).then(function(e){return n(e&&e[0])}).catch(r)})},addfiles:h,getfile:function(e){return i.query("get_active_item",e)},processfile:d,removefile:r,getfiles:o,processfiles:function(){for(var e=arguments.length,t=new array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t={};return r(ie(),function(e,n){t[e]=n[0]}),mr(object.assign({},t,e))},gr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];r(e.attributes,function(t){n.push(e.attributes[t])});var o=n.filter(function(e){return e.name}).reduce(function(t,n){var r,o=i(e,n.name);return t[(r=n.name,ar(r.replace(/^data-/,"")))]=o===n.name||o,t},{});return function e(t,n){r(n,function(n,o){r(t,function(e,r){var i=new regexp(n);if(i.test(e)&&(delete t[e],!1!==o))if(g(o))t[o]=r;else{var a,s=o.group;h(o)&&!t[s]&&(t[s]={}),t[s][(a=e.replace(i,""),a.charat(0).tolowercase()+a.slice(1))]=r}}),o.mapping&&e(t[o.group],o.mapping)})}(o,t),o},rr=function(){return(arguments.length<=0?void 0:arguments[0])instanceof htmlelement?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={"^class$":"classname","^multiple$":"allowmultiple","^capture$":"capturemethod","^server":{group:"server",mapping:{"^process":{group:"process"},"^revert":{group:"revert"},"^fetch":{group:"fetch"},"^restore":{group:"restore"},"^load":{group:"load"}}},"^type$":!1,"^files$":!1};_e("set_attribute_to_option_map",n);var r=object.assign({},t),o=gr("fieldset"===e.nodename?e.queryselector("input[type=file]"):e,n);object.keys(o).foreach(function(e){h(o[e])?(h(r[e])||(r[e]={}),object.assign(r[e],o[e])):r[e]=o[e]}),r.files=(t.files||[]).concat(array.from(e.queryselectorall("input:not([type=file])")).map(function(e){return{source:e.value,options:{type:e.dataset.type}}}));var i=vr(r);return e.files&&array.from(e.files).foreach(function(e){i.addfile(e)}),i.replaceelement(e),i}.apply(void 0,arguments):vr.apply(void 0,arguments)},hr=["fire","_read","_write"],or=function(e){var t={};return ae(e,t,hr),t},dr=function(e,t){return e.replace(/(?:{([a-za-z]+)})/g,function(e,n){return t[n]})},sr=function(e){var t=new blob(["(",e.tostring(),")()"],{type:"application/javascript"}),n=url.createobjecturl(t),r=new worker(n);return{transfer:function(e,t){},post:function(e,t,n){var o=re();r.onmessage=function(e){e.data.id===o&&t(e.data.message)},r.postmessage({id:o,message:e},n)},terminate:function(){r.terminate(),url.revokeobjecturl(n)}}},yr=function(e){return new promise(function(t,n){var r=new image;r.onload=function(){t(r)},r.onerror=function(e){n(e)},r.src=e})},ar=function(e,t){var n=e.slice(0,e.size,e.type);return n.lastmodifieddate=e.lastmodifieddate,n.name=t,n},br=function(e){return ar(e,e.name)},pr=[],lr=function(e){if(!pr.includes(e)){pr.push(e);var t,n=e({addfilter:te,utils:{type:pe,forin:r,isstring:g,isfile:tt,tonaturalfilesize:vt,replaceinstring:dr,getextensionfromfilename:ne,getfilenamewithoutextension:je,guesstimatemimetype:hn,getfilefromblob:ue,getfilenamefromurl:ce,createroute:y,createworker:sr,createview:s,createitemapi:ue,loadimage:yr,copyfile:br,renamefile:ar,createblob:be,applyfilterchain:ee,text:et,getnumericaspectratiofromstring:ge},views:{fileactionbutton:mt}});t=n.options,object.assign(me,t)}},mr=(wt="undefined"!=typeof window&&void 0!==window.document&&!("[object operamini]"===object.prototype.tostring.call(window.operamini))&&"visibilitystate"in document&&"promise"in window&&"slice"in blob.prototype&&"url"in window&&"createobjecturl"in window.url&&"performance"in window,function(){return wt}),cr={apps:[]},nr=function(){};if(e.status={},e.filestatus={},e.fileorigin={},e.optiontypes={},e.create=nr,e.destroy=nr,e.parse=nr,e.find=nr,e.registerplugin=nr,e.getoptions=nr,e.setoptions=nr,mr()){!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60,r="__framepainter";if(window[r])return window[r].readers.push(e),void window[r].writers.push(t);window[r]={readers:[e],writers:[t]};var o=window[r],i=1e3/n,a=null,s=null;(function e(t){s=window.requestanimationframe(e),a||(a=t);var n=t-a;n<=i||(a=t-n%i,o.readers.foreach(function(e){return e()}),o.writers.foreach(function(e){return e(t)}))})(performance.now())}(function(){cr.apps.foreach(function(e){return e._read()})},function(e){cr.apps.foreach(function(t){return t._write(e)})});var wr=function t(){document.dispatchevent(new customevent("filepond:loaded",{detail:{supported:mr,create:e.create,destroy:e.destroy,parse:e.parse,find:e.find,registerplugin:e.registerplugin,setoptions:e.setoptions}})),document.removeeventlistener("domcontentloaded",t)};"loading"!==document.readystate?settimeout(function(){return wr()},0):document.addeventlistener("domcontentloaded",wr);var gr=function(){return r(ie(),function(t,n){e.optiontypes[t]=n[1]})};e.status=object.assign({},he),e.fileorigin=object.assign({},et),e.filestatus=object.assign({},le),e.optiontypes={},gr(),e.create=function(){var t=rr.apply(void 0,arguments);return t.on("destroy",e.destroy),cr.apps.push(t),or(t)},e.destroy=function(e){var t=cr.apps.findindex(function(t){return t.isattachedto(e)});return t>=0&&(cr.apps.splice(t,1)[0].restoreelement(),!0)},e.parse=function(t){return array.from(t.queryselectorall(".filepond")).filter(function(e){return!cr.apps.find(function(t){return t.isattachedto(e)})}).map(function(t){return e.create(t)})},e.find=function(e){var t=cr.apps.find(function(t){return t.isattachedto(e)});return t?or(t):null},e.registerplugin=function(){for(var e=arguments.length,t=new array(e),n=0;n