@micromag/viewer-build 0.3.499 → 0.3.500

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.
@@ -0,0 +1 @@
1
+ (self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[377],{48761:function(e){e.exports=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,i=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var s=Math.min(Math.floor(Math.log(e)/Math.log(1024)),i.length-1);e=Number(e/Math.pow(1024,s));var o=i[s];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+o:(t?"-":"")+e.toFixed(1)+" "+o}},91566:function(e,t,i){var s=i(67764),o=/[\/\+\.]/;e.exports=function(e,t){function i(t){var i=s(t,e,o);return i&&i.length>=2}return t?i(t.split(";")[0]):i}},5181:function(e,t,i){"use strict";i.r(t),i.d(t,{Component:function(){return S},Fragment:function(){return w},cloneElement:function(){return W},createContext:function(){return G},createElement:function(){return v},createRef:function(){return b},h:function(){return v},hydrate:function(){return q},isValidElement:function(){return r},options:function(){return o},render:function(){return B},toChildArray:function(){return T}});var s,o,n,r,l,a,u,d,c,p={},h=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function _(e,t){for(var i in t)e[i]=t[i];return e}function m(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,i){var o,n,r,l={};for(r in t)"key"==r?o=t[r]:"ref"==r?n=t[r]:l[r]=t[r];if(arguments.length>2&&(l.children=arguments.length>3?s.call(arguments,2):i),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===l[r]&&(l[r]=e.defaultProps[r]);return y(e,l,o,n,null)}function y(e,t,i,s,r){var l={type:e,props:t,key:i,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++n:r,__i:-1,__u:0};return null==r&&null!=o.vnode&&o.vnode(l),l}function b(){return{current:null}}function w(e){return e.children}function S(e,t){this.props=e,this.context=t}function x(e,t){if(null==t)return e.__?x(e.__,e.__i+1):null;for(var i;t<e.__k.length;t++)if(null!=(i=e.__k[t])&&null!=i.__e)return i.__e;return"function"==typeof e.type?x(e):null}function P(e){var t,i;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(i=e.__k[t])&&null!=i.__e){e.__e=e.__c.base=i.__e;break}return P(e)}}function F(e){(!e.__d&&(e.__d=!0)&&l.push(e)&&!O.__r++||a!==o.debounceRendering)&&((a=o.debounceRendering)||u)(O)}function O(){var e,t,i,s,n,r,a,u,c;for(l.sort(d);e=l.shift();)e.__d&&(t=l.length,s=void 0,r=(n=(i=e).__v).__e,u=[],c=[],(a=i.__P)&&((s=_({},n)).__v=n.__v+1,o.vnode&&o.vnode(s),N(a,s,n,i.__n,void 0!==a.ownerSVGElement,32&n.__u?[r]:null,u,null==r?x(n):r,!!(32&n.__u),c),s.__v=n.__v,s.__.__k[s.__i]=s,I(u,s,c),s.__e!=r&&P(s)),l.length>t&&l.sort(d));O.__r=0}function U(e,t,i,s,o,n,r,l,a,u,d){var c,f,g,_,m,v=s&&s.__k||h,y=t.length;for(i.__d=a,k(i,t,v),a=i.__d,c=0;c<y;c++)null!=(g=i.__k[c])&&"boolean"!=typeof g&&"function"!=typeof g&&(f=-1===g.__i?p:v[g.__i]||p,g.__i=c,N(e,g,f,o,n,r,l,a,u,d),_=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&L(f.ref,null,g),d.push(g.ref,g.__c||_,g)),null==m&&null!=_&&(m=_),65536&g.__u||f.__k===g.__k?(_||f.__e!=a||(a=x(f)),a=E(g,a,e)):"function"==typeof g.type&&void 0!==g.__d?a=g.__d:_&&(a=_.nextSibling),g.__d=void 0,g.__u&=-196609);i.__d=a,i.__e=m}function k(e,t,i){var s,o,n,r,l,a=t.length,u=i.length,d=u,c=0;for(e.__k=[],s=0;s<a;s++)r=s+c,null!=(o=e.__k[s]=null==(o=t[s])||"boolean"==typeof o||"function"==typeof o?null:"string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?y(null,o,null,null,null):g(o)?y(w,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?y(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=e,o.__b=e.__b+1,l=C(o,i,r,d),o.__i=l,n=null,-1!==l&&(d--,(n=i[l])&&(n.__u|=131072)),null==n||null===n.__v?(-1==l&&c--,"function"!=typeof o.type&&(o.__u|=65536)):l!==r&&(l===r+1?c++:l>r?d>a-r?c+=l-r:c--:l<r?l==r-1&&(c=l-r):c=0,l!==s+c&&(o.__u|=65536))):(n=i[r])&&null==n.key&&n.__e&&!(131072&n.__u)&&(n.__e==e.__d&&(e.__d=x(n)),z(n,n,!1),i[r]=null,d--);if(d)for(s=0;s<u;s++)null!=(n=i[s])&&!(131072&n.__u)&&(n.__e==e.__d&&(e.__d=x(n)),z(n,n))}function E(e,t,i){var s,o;if("function"==typeof e.type){for(s=e.__k,o=0;s&&o<s.length;o++)s[o]&&(s[o].__=e,t=E(s[o],t,i));return t}e.__e!=t&&(i.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function T(e,t){return t=t||[],null==e||"boolean"==typeof e||(g(e)?e.some((function(e){T(e,t)})):t.push(e)),t}function C(e,t,i,s){var o=e.key,n=e.type,r=i-1,l=i+1,a=t[i];if(null===a||a&&o==a.key&&n===a.type&&!(131072&a.__u))return i;if(s>(null==a||131072&a.__u?0:1))for(;r>=0||l<t.length;){if(r>=0){if((a=t[r])&&!(131072&a.__u)&&o==a.key&&n===a.type)return r;r--}if(l<t.length){if((a=t[l])&&!(131072&a.__u)&&o==a.key&&n===a.type)return l;l++}}return-1}function A(e,t,i){"-"===t[0]?e.setProperty(t,null==i?"":i):e[t]=null==i?"":"number"!=typeof i||f.test(t)?i:i+"px"}function j(e,t,i,s,o){var n;e:if("style"===t)if("string"==typeof i)e.style.cssText=i;else{if("string"==typeof s&&(e.style.cssText=s=""),s)for(t in s)i&&t in i||A(e.style,t,"");if(i)for(t in i)s&&i[t]===s[t]||A(e.style,t,i[t])}else if("o"===t[0]&&"n"===t[1])n=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+n]=i,i?s?i.u=s.u:(i.u=Date.now(),e.addEventListener(t,n?M:$,n)):e.removeEventListener(t,n?M:$,n);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==i?"":i;break e}catch(e){}"function"==typeof i||(null==i||!1===i&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,i))}}function $(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(o.event?o.event(e):e)}}function M(e){if(this.l)return this.l[e.type+!0](o.event?o.event(e):e)}function N(e,t,i,s,n,r,l,a,u,d){var c,p,h,f,m,v,y,b,x,P,F,O,k,E,T,C=t.type;if(void 0!==t.constructor)return null;128&i.__u&&(u=!!(32&i.__u),r=[a=t.__e=i.__e]),(c=o.__b)&&c(t);e:if("function"==typeof C)try{if(b=t.props,x=(c=C.contextType)&&s[c.__c],P=c?x?x.props.value:c.__:s,i.__c?y=(p=t.__c=i.__c).__=p.__E:("prototype"in C&&C.prototype.render?t.__c=p=new C(b,P):(t.__c=p=new S(b,P),p.constructor=C,p.render=D),x&&x.sub(p),p.props=b,p.state||(p.state={}),p.context=P,p.__n=s,h=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=C.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=_({},p.__s)),_(p.__s,C.getDerivedStateFromProps(b,p.__s))),f=p.props,m=p.state,p.__v=t,h)null==C.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==C.getDerivedStateFromProps&&b!==f&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(b,P),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(b,p.__s,P)||t.__v===i.__v)){for(t.__v!==i.__v&&(p.props=b,p.state=p.__s,p.__d=!1),t.__e=i.__e,t.__k=i.__k,t.__k.forEach((function(e){e&&(e.__=t)})),F=0;F<p._sb.length;F++)p.__h.push(p._sb[F]);p._sb=[],p.__h.length&&l.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(b,p.__s,P),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(f,m,v)}))}if(p.context=P,p.props=b,p.__P=e,p.__e=!1,O=o.__r,k=0,"prototype"in C&&C.prototype.render){for(p.state=p.__s,p.__d=!1,O&&O(t),c=p.render(p.props,p.state,p.context),E=0;E<p._sb.length;E++)p.__h.push(p._sb[E]);p._sb=[]}else do{p.__d=!1,O&&O(t),c=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++k<25);p.state=p.__s,null!=p.getChildContext&&(s=_(_({},s),p.getChildContext())),h||null==p.getSnapshotBeforeUpdate||(v=p.getSnapshotBeforeUpdate(f,m)),U(e,g(T=null!=c&&c.type===w&&null==c.key?c.props.children:c)?T:[T],t,i,s,n,r,l,a,u,d),p.base=t.__e,t.__u&=-161,p.__h.length&&l.push(p),y&&(p.__E=p.__=null)}catch(e){t.__v=null,u||null!=r?(t.__e=a,t.__u|=u?160:32,r[r.indexOf(a)]=null):(t.__e=i.__e,t.__k=i.__k),o.__e(e,t,i)}else null==r&&t.__v===i.__v?(t.__k=i.__k,t.__e=i.__e):t.__e=R(i.__e,t,i,s,n,r,l,u,d);(c=o.diffed)&&c(t)}function I(e,t,i){t.__d=void 0;for(var s=0;s<i.length;s++)L(i[s],i[++s],i[++s]);o.__c&&o.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){o.__e(e,t.__v)}}))}function R(e,t,i,o,n,r,l,a,u){var d,c,h,f,_,v,y,b=i.props,w=t.props,S=t.type;if("svg"===S&&(n=!0),null!=r)for(d=0;d<r.length;d++)if((_=r[d])&&"setAttribute"in _==!!S&&(S?_.localName===S:3===_.nodeType)){e=_,r[d]=null;break}if(null==e){if(null===S)return document.createTextNode(w);e=n?document.createElementNS("http://www.w3.org/2000/svg",S):document.createElement(S,w.is&&w),r=null,a=!1}if(null===S)b===w||a&&e.data===w||(e.data=w);else{if(r=r&&s.call(e.childNodes),b=i.props||p,!a&&null!=r)for(b={},d=0;d<e.attributes.length;d++)b[(_=e.attributes[d]).name]=_.value;for(d in b)_=b[d],"children"==d||("dangerouslySetInnerHTML"==d?h=_:"key"===d||d in w||j(e,d,null,_,n));for(d in w)_=w[d],"children"==d?f=_:"dangerouslySetInnerHTML"==d?c=_:"value"==d?v=_:"checked"==d?y=_:"key"===d||a&&"function"!=typeof _||b[d]===_||j(e,d,_,b[d],n);if(c)a||h&&(c.__html===h.__html||c.__html===e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(h&&(e.innerHTML=""),U(e,g(f)?f:[f],t,i,o,n&&"foreignObject"!==S,r,l,r?r[0]:i.__k&&x(i,0),a,u),null!=r)for(d=r.length;d--;)null!=r[d]&&m(r[d]);a||(d="value",void 0!==v&&(v!==e[d]||"progress"===S&&!v||"option"===S&&v!==b[d])&&j(e,d,v,b[d],!1),d="checked",void 0!==y&&y!==e[d]&&j(e,d,y,b[d],!1))}return e}function L(e,t,i){try{"function"==typeof e?e(t):e.current=t}catch(e){o.__e(e,i)}}function z(e,t,i){var s,n;if(o.unmount&&o.unmount(e),(s=e.ref)&&(s.current&&s.current!==e.__e||L(s,null,t)),null!=(s=e.__c)){if(s.componentWillUnmount)try{s.componentWillUnmount()}catch(e){o.__e(e,t)}s.base=s.__P=null,e.__c=void 0}if(s=e.__k)for(n=0;n<s.length;n++)s[n]&&z(s[n],t,i||"function"!=typeof e.type);i||null==e.__e||m(e.__e),e.__=e.__e=e.__d=void 0}function D(e,t,i){return this.constructor(e,i)}function B(e,t,i){var n,r,l,a;o.__&&o.__(e,t),r=(n="function"==typeof i)?null:i&&i.__k||t.__k,l=[],a=[],N(t,e=(!n&&i||t).__k=v(w,null,[e]),r||p,p,void 0!==t.ownerSVGElement,!n&&i?[i]:r?null:t.firstChild?s.call(t.childNodes):null,l,!n&&i?i:r?r.__e:t.firstChild,n,a),I(l,e,a)}function q(e,t){B(e,t,q)}function W(e,t,i){var o,n,r,l,a=_({},e.props);for(r in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),t)"key"==r?o=t[r]:"ref"==r?n=t[r]:a[r]=void 0===t[r]&&void 0!==l?l[r]:t[r];return arguments.length>2&&(a.children=arguments.length>3?s.call(arguments,2):i),y(e.type,a,o||e.key,n||e.ref,null)}function G(e,t){var i={__c:t="__cC"+c++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var i,s;return this.getChildContext||(i=[],(s={})[t]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&i.some((function(e){e.__e=!0,F(e)}))},this.sub=function(e){i.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){i.splice(i.indexOf(e),1),t&&t.call(e)}}),e.children}};return i.Provider.__=i.Consumer.contextType=i}s=h.slice,o={__e:function(e,t,i,s){for(var o,n,r;t=t.__;)if((o=t.__c)&&!o.__)try{if((n=o.constructor)&&null!=n.getDerivedStateFromError&&(o.setState(n.getDerivedStateFromError(e)),r=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,s||{}),r=o.__d),r)return o.__E=o}catch(t){e=t}throw e}},n=0,r=function(e){return null!=e&&null==e.constructor},S.prototype.setState=function(e,t){var i;i=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=_({},this.state),"function"==typeof e&&(e=e(_({},i),this.props)),e&&_(i,e),null!=e&&this.__v&&(t&&this._sb.push(t),F(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),F(this))},S.prototype.render=w,l=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d=function(e,t){return e.__v.__b-t.__v.__b},O.__r=0,c=0},67764:function(e){"use strict";function t(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}t.prototype.match=function(e){var t,i,s=!0,o=this.parts,n=o.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(i=(e||"").split(this.separator),t=0;s&&t<n;t++)"*"!==o[t]&&(s=t<i.length&&o[t]===i[t]);s=s&&i}else s=!1;else if("function"==typeof e.splice)for(s=[],t=e.length;t--;)this.match(e[t])&&(s[s.length]=e[t]);else if("object"==typeof e)for(var r in s={},e)this.match(r)&&(s[r]=e[r]);return s},e.exports=function(e,i,s){var o=new t(e,s||/[\/\.]/);return void 0!==i?o.match(i):o}},73982:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultOptions=t.RestrictionError=t.Restricter=void 0;const s=i(48761),o=i(91566);t.defaultOptions={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class n extends Error{constructor(){super(...arguments),this.isRestriction=!0}}t.RestrictionError=n,"undefined"==typeof AggregateError&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}}),t.Restricter=class{constructor(e,t){this.i18n=t,this.getOpts=()=>{const t=e();if(null!=t.restrictions.allowedFileTypes&&!Array.isArray(t.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return t}}validate(e,t){const{maxFileSize:i,minFileSize:r,maxTotalFileSize:l,maxNumberOfFiles:a,allowedFileTypes:u}=this.getOpts().restrictions;if(a&&t.filter((e=>!e.isGhost)).length+1>a)throw new n(`${this.i18n("youCanOnlyUploadX",{smart_count:a})}`);if(u&&!u.some((t=>t.includes("/")?!!e.type&&o(e.type.replace(/;.*?$/,""),t):!("."!==t[0]||!e.extension)&&e.extension.toLowerCase()===t.slice(1).toLowerCase()))){const e=u.join(", ");throw new n(this.i18n("youCanOnlyUploadFileTypes",{types:e}))}if(l&&null!=e.size&&t.reduce(((e,t)=>e+t.size),e.size)>l)throw new n(this.i18n("exceedsSize",{size:s(l),file:e.name}));if(i&&null!=e.size&&e.size>i)throw new n(this.i18n("exceedsSize",{size:s(i),file:e.name}));if(r&&null!=e.size&&e.size<r)throw new n(this.i18n("inferiorSize",{size:s(r)}))}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(Object.keys(e).length<t)throw new n(this.i18n("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new n(this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:i}=this.getOpts().restrictions,s=Object.prototype.hasOwnProperty,o=[];for(const t of i)s.call(e.meta,t)&&""!==e.meta[t]||o.push(t);return{missingFields:o,error:t}}}},44780:function(e,t,i){"use strict";var s=i(5181);function o(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var n=0;function r(e){return"__private_"+n+++"_"+e}const l=i(7324),a=i(75727),u=i(92291);var d=r("updateUI");class c extends u{constructor(){super(...arguments),Object.defineProperty(this,d,{writable:!0,value:void 0})}mount(e,t){const i=t.id,n=l(e);if(n){this.isTargetDOMEl=!0;const t=document.createElement("div");return t.classList.add("uppy-Root"),o(this,d)[d]=function(e){let t=null,i=null;return function(){for(var s=arguments.length,o=new Array(s),n=0;n<s;n++)o[n]=arguments[n];return i=o,t||(t=Promise.resolve().then((()=>(t=null,e(...i))))),t}}((e=>{this.uppy.getPlugin(this.id)&&((0,s.render)(this.render(e),t),this.afterUpdate())})),this.uppy.log(`Installing ${i} to a DOM element '${e}'`),this.opts.replaceTargetContent&&(n.innerHTML=""),(0,s.render)(this.render(this.uppy.getState()),t),this.el=t,n.appendChild(t),t.dir=this.opts.direction||a(t)||"ltr",this.onMount(),this.el}let r;if("object"==typeof e&&e instanceof c)r=e;else if("function"==typeof e){const t=e;this.uppy.iteratePlugins((e=>{e instanceof t&&(r=e)}))}if(r)return this.uppy.log(`Installing ${i} to ${r.id}`),this.parent=r,this.el=r.addTarget(t),this.onMount(),this.el;this.uppy.log(`Not installing ${i}`);let u=`Invalid target option given to ${i}.`;throw u+="function"==typeof e?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(u)}update(e){var t,i;null!=this.el&&(null==(t=(i=o(this,d))[d])||t.call(i,e))}unmount(){var e;this.isTargetDOMEl&&(null==(e=this.el)||e.remove()),this.onUnmount()}onMount(){}onUnmount(){}}e.exports=c},53051:function(e,t,i){"use strict";var s=i(30945),o=i(55716),n=i(73982);let r,l;function a(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var u=0;function d(e){return"__private_"+u+++"_"+e}const c=i(32653),p=i(2162),h=i(53871),f=i(68783),g=i(95569),_=i(67476),m=i(6063),v=i(57195),y=i(65104),b=i(31163);var w=d("plugins"),S=d("restricter"),x=d("storeUnsubscribe"),P=d("emitter"),F=d("preProcessors"),O=d("uploaders"),U=d("postProcessors"),k=d("informAndEmit"),E=d("checkRequiredMetaFieldsOnFile"),T=d("checkRequiredMetaFields"),C=d("assertNewUploadAllowed"),A=d("checkAndCreateFileStateObject"),j=d("startIfAutoProceed"),$=d("addListeners"),M=d("updateOnlineStatus"),N=d("createUpload"),I=d("getUpload"),R=d("removeUpload"),L=d("runUpload");r=Symbol.for("uppy test: getPlugins"),l=Symbol.for("uppy test: createUpload");class z{constructor(e){Object.defineProperty(this,L,{value:K}),Object.defineProperty(this,R,{value:Z}),Object.defineProperty(this,I,{value:X}),Object.defineProperty(this,N,{value:V}),Object.defineProperty(this,$,{value:Y}),Object.defineProperty(this,j,{value:H}),Object.defineProperty(this,A,{value:G}),Object.defineProperty(this,C,{value:W}),Object.defineProperty(this,T,{value:q}),Object.defineProperty(this,E,{value:B}),Object.defineProperty(this,k,{value:D}),Object.defineProperty(this,w,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,S,{writable:!0,value:void 0}),Object.defineProperty(this,x,{writable:!0,value:void 0}),Object.defineProperty(this,P,{writable:!0,value:p()}),Object.defineProperty(this,F,{writable:!0,value:new Set}),Object.defineProperty(this,O,{writable:!0,value:new Set}),Object.defineProperty(this,U,{writable:!0,value:new Set}),Object.defineProperty(this,M,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=b;const t={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:n.defaultOptions,meta:{},onBeforeFileAdded:e=>e,onBeforeUpload:e=>e,store:f(),logger:o.justErrorsLogger,infoTimeout:5e3};this.opts={...t,...e,restrictions:{...t.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=o.debugLogger),this.log(`Using Core v${this.constructor.VERSION}`),this.i18nInit(),this.calculateProgress=h(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:v(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),a(this,S)[S]=new n.Restricter((()=>this.opts),this.i18n),a(this,x)[x]=this.store.subscribe(((e,t,i)=>{this.emit("state-update",e,t,i),this.updateAll(t)})),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),a(this,$)[$]()}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];a(this,P)[P].emit(e,...i)}on(e,t){return a(this,P)[P].on(e,t),this}once(e,t){return a(this,P)[P].once(e,t),this}off(e,t){return a(this,P)[P].off(e,t),this}updateAll(e){this.iteratePlugins((t=>{t.update(e)}))}setState(e){this.store.setState(e)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.setState({files:{...this.getState().files,[e]:{...this.getState().files[e],...t}}})}i18nInit(){const e=new c([this.defaultLocale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e&&e.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins((e=>{e.setOptions()})),this.setState()}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},i={};Object.keys(t).forEach((s=>{const o={...t[s]};o.progress={...o.progress,...e},i[s]=o})),this.setState({files:i,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(e){a(this,F)[F].add(e)}removePreProcessor(e){return a(this,F)[F].delete(e)}addPostProcessor(e){a(this,U)[U].add(e)}removePostProcessor(e){return a(this,U)[U].delete(e)}addUploader(e){a(this,O)[O].add(e)}removeUploader(e){return a(this,O)[O].delete(e)}setMeta(e){const t={...this.getState().meta,...e},i={...this.getState().files};Object.keys(i).forEach((t=>{i[t]={...i[t],meta:{...i[t].meta,...e}}})),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:i})}setFileMeta(e,t){const i={...this.getState().files};if(!i[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const s={...i[e].meta,...t};i[e]={...i[e],meta:s},this.setState({files:i})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:i}=this.getState(),s=Object.values(e),o=s.filter((e=>{let{progress:t}=e;return!t.uploadComplete&&t.uploadStarted})),n=s.filter((e=>!e.progress.uploadStarted)),r=s.filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess)),l=s.filter((e=>e.progress.uploadStarted)),a=s.filter((e=>e.isPaused)),u=s.filter((e=>e.progress.uploadComplete)),d=s.filter((e=>e.error)),c=o.filter((e=>!e.isPaused)),p=s.filter((e=>e.progress.preprocess||e.progress.postprocess));return{newFiles:n,startedFiles:r,uploadStartedFiles:l,pausedFiles:a,completeFiles:u,erroredFiles:d,inProgressFiles:o,inProgressNotPausedFiles:c,processingFiles:p,isUploadStarted:l.length>0,isAllComplete:100===t&&u.length===s.length&&0===p.length,isAllErrored:!!i&&d.length===s.length,isAllPaused:0!==o.length&&a.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:s.some((e=>e.isGhost))}}validateRestrictions(e,t){void 0===t&&(t=this.getFiles());try{return a(this,S)[S].validate(e,t),{result:!0}}catch(e){return{result:!1,reason:e.message}}}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){a(this,C)[C](e);const{files:t}=this.getState();let i=a(this,A)[A](t,e);return t[i.id]&&t[i.id].isGhost&&(i={...t[i.id],data:e.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${i.name}, ${i.id}`)),this.setState({files:{...t,[i.id]:i}}),this.emit("file-added",i),this.emit("files-added",[i]),this.log(`Added file: ${i.name}, ${i.id}, mime type: ${i.type}`),a(this,j)[j](),i.id}addFiles(e){a(this,C)[C]();const t={...this.getState().files},i=[],s=[];for(let o=0;o<e.length;o++)try{let s=a(this,A)[A](t,e[o]);t[s.id]&&t[s.id].isGhost&&(s={...t[s.id],data:e[o].data,isGhost:!1},this.log(`Replaced blob in a ghost file: ${s.name}, ${s.id}`)),t[s.id]=s,i.push(s)}catch(e){e.isRestriction||s.push(e)}if(this.setState({files:t}),i.forEach((e=>{this.emit("file-added",e)})),this.emit("files-added",i),i.length>5?this.log(`Added batch of ${i.length} files`):Object.keys(i).forEach((e=>{this.log(`Added file: ${i[e].name}\n id: ${i[e].id}\n type: ${i[e].type}`)})),i.length>0&&a(this,j)[j](),s.length>0){let e="Multiple errors occurred while adding files:\n";if(s.forEach((t=>{e+=`\n * ${t.message}`})),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:s.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(s,e);{const t=new Error(e);throw t.errors=s,t}}}removeFiles(e,t){const{files:i,currentUploads:s}=this.getState(),o={...i},n={...s},r=Object.create(null);function l(e){return void 0===r[e]}e.forEach((e=>{i[e]&&(r[e]=i[e],delete o[e])})),Object.keys(n).forEach((e=>{const t=s[e].fileIDs.filter(l);if(0===t.length)return void delete n[e];const{capabilities:i}=this.getState();if(t.length!==s[e].fileIDs.length&&!i.individualCancellation)throw new Error("individualCancellation is disabled");n[e]={...s[e],fileIDs:t}}));const a={currentUploads:n,files:o};0===Object.keys(o).length&&(a.allowNewUpload=!0,a.error=null,a.recoveredState=null),this.setState(a),this.calculateTotalProgress();const u=Object.keys(r);u.forEach((e=>{this.emit("file-removed",r[e],t)})),u.length>5?this.log(`Removed ${u.length} files`):this.log(`Removed files: ${u.join(", ")}`)}removeFile(e,t){void 0===t&&(t=null),this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).uploadComplete)return;const t=!this.getFile(e).isPaused;return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}pauseAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const i={...e[t],isPaused:!0};e[t]=i})),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const i={...e[t],isPaused:!1,error:null};e[t]=i})),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},t=Object.keys(e).filter((t=>e[t].error));if(t.forEach((t=>{const i={...e[t],isPaused:!1,error:null};e[t]=i})),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const i=a(this,N)[N](t,{forceAllowNewUpload:!0});return a(this,L)[L](i)}cancelAll(e){let{reason:t="user"}=void 0===e?{}:e;if(this.emit("cancel-all",{reason:t}),"user"===t){const{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=a(this,N)[N]([e],{forceAllowNewUpload:!0});return a(this,L)[L](t)}reset(){this.cancelAll(...arguments)}logout(){this.iteratePlugins((e=>{e.provider&&e.provider.logout&&e.provider.logout()}))}calculateProgress(e,t){if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const i=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:i?Math.round(t.bytesUploaded/t.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const e=this.getFiles().filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess));if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});const t=e.filter((e=>null!=e.progress.bytesTotal)),i=e.filter((e=>null==e.progress.bytesTotal));if(0===t.length){const t=100*e.length,s=i.reduce(((e,t)=>e+t.progress.percentage),0),o=Math.round(s/t*100);return void this.setState({totalProgress:o})}let s=t.reduce(((e,t)=>e+t.progress.bytesTotal),0);const o=s/t.length;s+=o*i.length;let n=0;t.forEach((e=>{n+=e.progress.bytesUploaded})),i.forEach((e=>{n+=o*(e.progress.percentage||0)/100}));let r=0===s?0:Math.round(n/s*100);r>100&&(r=100),this.setState({totalProgress:r}),this.emit("progress",r)}updateOnlineStatus(){void 0===window.navigator.onLine||window.navigator.onLine?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if("function"!=typeof e)throw new TypeError(`Expected a plugin class, but got ${null===e?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`);const i=new e(this,t),s=i.id;if(!s)throw new Error("Your plugin must have an id");if(!i.type)throw new Error("Your plugin must have a type");const o=this.getPlugin(s);if(o){const e=`Already found a plugin named '${o.id}'. Tried to use: '${s}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(e)}return e.VERSION&&this.log(`Using ${s} v${e.VERSION}`),i.type in a(this,w)[w]?a(this,w)[w][i.type].push(i):a(this,w)[w][i.type]=[i],i.install(),this}getPlugin(e){for(const t of Object.values(a(this,w)[w])){const i=t.find((t=>t.id===e));if(null!=i)return i}}[r](e){return a(this,w)[w][e]}iteratePlugins(e){Object.values(a(this,w)[w]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=a(this,w)[w][e.type],i=t.findIndex((t=>t.id===e.id));-1!==i&&t.splice(i,1);const s={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(s)}close(e){let{reason:t}=void 0===e?{}:e;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:t}),a(this,x)[x](),this.iteratePlugins((e=>{this.removePlugin(e)})),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",a(this,M)[M]),window.removeEventListener("offline",a(this,M)[M]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,i){void 0===t&&(t="info"),void 0===i&&(i=3e3);const s="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:s?e.message:e,details:s?e.details:null}]}),setTimeout((()=>this.hideInfo()),i),this.emit("info-visible")}log(e,t){const{logger:i}=this.opts;switch(t){case"error":i.error(e);break;case"warning":i.warn(e);break;default:i.debug(e)}}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?a(this,L)[L](e):(a(this,R)[R](e),Promise.reject(new Error("Nonexistent upload")))}[l](){return a(this,N)[N](...arguments)}addResultData(e,t){if(!a(this,I)[I](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:i}=this.getState(),s={...i[e],result:{...i[e].result,...t}};this.setState({currentUploads:{...i,[e]:s}})}upload(){var e;null!=(e=a(this,w)[w].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const i=this.opts.onBeforeUpload(t);return!1===i?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(i&&"object"==typeof i&&(t=i,this.setState({files:t})),Promise.resolve().then((()=>a(this,S)[S].validateMinNumberOfFiles(t))).catch((e=>{throw a(this,k)[k](e),e})).then((()=>{if(!a(this,T)[T](t))throw new n.RestrictionError(this.i18n("missingRequiredMetaField"))})).catch((e=>{throw e})).then((()=>{const{currentUploads:e}=this.getState(),i=Object.values(e).flatMap((e=>e.fileIDs)),s=[];Object.keys(t).forEach((e=>{const t=this.getFile(e);t.progress.uploadStarted||-1!==i.indexOf(e)||s.push(t.id)}));const o=a(this,N)[N](s);return a(this,L)[L](o)})).catch((e=>{throw this.emit("error",e),this.log(e,"error"),e})))}}function D(e,t){const{message:i,details:s=""}=e;e.isRestriction?this.emit("restriction-failed",t,e):this.emit("error",e),this.info({message:i,details:s},"error",this.opts.infoTimeout),this.log(`${i} ${s}`.trim(),"error")}function B(e){const{missingFields:t,error:i}=a(this,S)[S].getMissingRequiredMetaFields(e);return!(t.length>0&&(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(i.message),this.emit("restriction-failed",e,i),1))}function q(e){let t=!0;for(const i of Object.values(e))a(this,E)[E](i)||(t=!1);return t}function W(e){const{allowNewUpload:t}=this.getState();if(!1===t){const t=new n.RestrictionError(this.i18n("noMoreFilesAllowed"));throw a(this,k)[k](t,e),t}}function G(e,t){const i=g(t),s=y(i,t),o=_(s).extension,r=Boolean(t.isRemote),l=m({...t,type:i});if(this.checkIfFileAlreadyExists(l)){const e=new n.RestrictionError(this.i18n("noDuplicates",{fileName:s}));throw a(this,k)[k](e,t),e}const u=t.meta||{};u.name=s,u.type=i;const d=Number.isFinite(t.data.size)?t.data.size:null;let c={source:t.source||"",id:l,name:s,extension:o||"",meta:{...this.getState().meta,...u},type:i,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:d,uploadComplete:!1,uploadStarted:null},size:d,isRemote:r,remote:t.remote||"",preview:t.preview};const p=this.opts.onBeforeFileAdded(c,e);if(!1===p){const e=new n.RestrictionError("Cannot add the file because onBeforeFileAdded returned false.");throw this.emit("restriction-failed",t,e),e}"object"==typeof p&&null!==p&&(c=p);try{const t=Object.keys(e).map((t=>e[t]));a(this,S)[S].validate(c,t)}catch(e){throw a(this,k)[k](e,c),e}return c}function H(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout((()=>{this.scheduledAutoProceed=null,this.upload().catch((e=>{e.isRestriction||this.log(e.stack||e.message||e)}))}),4))}function Y(){const e=(e,t,i)=>{let s=e.message||"Unknown error";e.details&&(s+=` ${e.details}`),this.setState({error:s}),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:s,response:i})};this.on("error",e),this.on("upload-error",((t,i,s)=>{if(e(i,t,s),"object"==typeof i&&i.message){const e=new Error(i.message);e.details=i.message,i.details&&(e.details+=` ${i.details}`),e.message=this.i18n("failedToUpload",{file:null==t?void 0:t.name}),a(this,k)[k](e)}else a(this,k)[k](i)})),this.on("upload",(()=>{this.setState({error:null})})),this.on("upload-started",(e=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("upload-progress",this.calculateProgress),this.on("upload-success",((e,t)=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const i=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...i,postprocess:a(this,U)[U].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:i.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||i.bytesTotal}),this.calculateTotalProgress()})),this.on("preprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("preprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.preprocess,this.setState({files:t})})),this.on("postprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("postprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.postprocess,this.setState({files:t})})),this.on("restored",(()=>{this.calculateTotalProgress()})),this.on("dashboard:file-edit-complete",(e=>{e&&a(this,E)[E](e)})),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",a(this,M)[M]),window.addEventListener("offline",a(this,M)[M]),setTimeout(a(this,M)[M],3e3))}function V(e,t){void 0===t&&(t={});const{forceAllowNewUpload:i=!1}=t,{allowNewUpload:o,currentUploads:n}=this.getState();if(!o&&!i)throw new Error("Cannot create a new upload: already uploading.");const r=(0,s.nanoid)();return this.emit("upload",{id:r,fileIDs:e}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...n,[r]:{fileIDs:e,step:0,result:{}}}}),r}function X(e){const{currentUploads:t}=this.getState();return t[e]}function Z(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function K(e){let{currentUploads:t}=this.getState(),i=t[e];const s=i.step||0,o=[...a(this,F)[F],...a(this,O)[O],...a(this,U)[U]];try{for(let n=s;n<o.length&&i;n++){const s=o[n],r={...i,step:n};this.setState({currentUploads:{...t,[e]:r}}),await s(r.fileIDs,e),t=this.getState().currentUploads,i=t[e]}}catch(t){throw a(this,R)[R](e),t}if(i){i.fileIDs.forEach((e=>{const t=this.getFile(e);t&&t.progress.postprocess&&this.emit("postprocess-complete",t)}));const s=i.fileIDs.map((e=>this.getFile(e))),o=s.filter((e=>!e.error)),n=s.filter((e=>e.error));await this.addResultData(e,{successful:o,failed:n,uploadID:e}),t=this.getState().currentUploads,i=t[e]}let n;return i&&(n=i.result,this.emit("complete",n),a(this,R)[R](e)),null==n&&this.log(`Not setting result for an upload that has been removed: ${e}`),n}z.VERSION="2.3.4",e.exports=z},65104:function(e){"use strict";e.exports=function(e,t){return t.name?t.name:"image"===e.split("/")[0]?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}},95377:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Uppy=t.UIPlugin=t.BasePlugin=void 0,Object.defineProperty(t,"debugLogger",{enumerable:!0,get:function(){return s.debugLogger}});var s=i(55716);e.exports=i(53051);const o=i(44780);t.UIPlugin=o;const n=i(92291);t.BasePlugin=n;const r=i(53051);t.Uppy=r;const l=i(44780),a=i(92291);r.Uppy=r,r.UIPlugin=l,r.BasePlugin=a,r.debugLogger=s.debugLogger},31163:function(e){"use strict";e.exports={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",emptyFolderAdded:"No files were added from empty folder",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}}},55716:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.justErrorsLogger=t.debugLogger=void 0;const s=i(82167),o={debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.error(`[Uppy] [${s()}]`,...t)}};t.justErrorsLogger=o;const n={debug:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.debug(`[Uppy] [${s()}]`,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.warn(`[Uppy] [${s()}]`,...t)},error:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.error(`[Uppy] [${s()}]`,...t)}};t.debugLogger=n},57195:function(e){"use strict";e.exports=function(e){if(null==e&&"undefined"!=typeof navigator&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const i=t[1];let[s,o]=i.split(".");return s=parseInt(s,10),o=parseInt(o,10),s<15||15===s&&o<15063||s>18||18===s&&o>=18218}},68783:function(e){"use strict";var t=0;function i(e){return"__private_"+t+++"_"+e}var s=i("publish");class o{constructor(){Object.defineProperty(this,s,{value:n}),this.state={},this.callbacks=[]}getState(){return this.state}setState(e){const t={...this.state},i={...this.state,...e};this.state=i,function(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(this,s)[s](t,i,e)}subscribe(e){return this.callbacks.push(e),()=>{this.callbacks.splice(this.callbacks.indexOf(e),1)}}}function n(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.callbacks.forEach((e=>{e(...t)}))}o.VERSION="2.1.1",e.exports=function(){return new o}},7324:function(e,t,i){"use strict";const s=i(56039);e.exports=function(e,t){return void 0===t&&(t=document),"string"==typeof e?t.querySelector(e):s(e)?e:null}},6063:function(e){"use strict";function t(e){let t="";return e.replace(/[^A-Z0-9]/gi,(e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/")))+t}e.exports=function(e){let i="uppy";return"string"==typeof e.name&&(i+=`-${t(e.name.toLowerCase())}`),void 0!==e.type&&(i+=`-${e.type}`),e.meta&&"string"==typeof e.meta.relativePath&&(i+=`-${t(e.meta.relativePath.toLowerCase())}`),void 0!==e.data.size&&(i+=`-${e.data.size}`),void 0!==e.data.lastModified&&(i+=`-${e.data.lastModified}`),i}},67476:function(e){"use strict";e.exports=function(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}},95569:function(e,t,i){"use strict";const s=i(67476),o=i(39838);e.exports=function(e){var t;if(e.type)return e.type;const i=e.name?null==(t=s(e.name).extension)?void 0:t.toLowerCase():null;return i&&i in o?o[i]:"application/octet-stream"}},75727:function(e){"use strict";e.exports=function(e){for(var t;e&&!e.dir;)e=e.parentNode;return null==(t=e)?void 0:t.dir}},82167:function(e){"use strict";function t(e){return e<10?`0${e}`:e.toString()}e.exports=function(){const e=new Date;return`${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`}},56039:function(e){"use strict";e.exports=function(e){return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE}},39838:function(e){"use strict";e.exports={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"}},30945:function(e){e.exports={nanoid:(e=21)=>{let t="",i=e;for(;i--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(i=t)=>{let s="",o=i;for(;o--;)s+=e[Math.random()*e.length|0];return s}}}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 66.73b6c078.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[66],{68066:function(e,t,n){function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(){i=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,o){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),u=new _(o||[]);return r(a,"_invoke",{value:E(e,n,u)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function h(){}function p(){}function v(){}var y={};l(y,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(j([])));g&&g!==t&&n.call(g,a)&&(y=g);var w=v.prototype=h.prototype=Object.create(y);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function o(r,i,a,u){var c=f(e[r],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==typeof s&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){o("next",e,a,u)}),(function(e){o("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return o("throw",e,a,u)}))}u(c.arg)}var i;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function E(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=x(a,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=f(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function x(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=f(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function j(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=v,r(w,"constructor",{value:v,configurable:!0}),r(v,"constructor",{value:p,configurable:!0}),p.displayName=l(v,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,c,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},b(k.prototype),l(k.prototype,u,(function(){return this})),e.AsyncIterator=k,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new k(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(w),l(w,c,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=j,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:j(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function a(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function u(e){a(i,r,o,u,c,"next",e)}function c(e){a(i,r,o,u,c,"throw",e)}u(void 0)}))}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,g(r.key),r)}}function s(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t,n){return(t=g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function v(e,t,n){return v=p()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&h(o,n.prototype),o},v.apply(null,arguments)}function y(e){var t="function"==typeof Map?new Map:void 0;return y=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return v(e,arguments,d(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h(r,e)},y(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}n.r(t);var w=void 0!==n.g&&"[object global]"==={}.toString.call(n.g);function b(e,t){return 0===e.indexOf(t.toLowerCase())?e:"".concat(t.toLowerCase()).concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}function k(e){return/^(https?:)?\/\/((player|www)\.)?vimeo\.com(?=$|\/)/.test(e)}function E(e){return/^https:\/\/player\.vimeo\.com\/video\/\d+/.test(e)}function x(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,r=t.url,o=n||r;if(!o)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(e=o,!isNaN(parseFloat(e))&&isFinite(e)&&Math.floor(e)==e)return"https://vimeo.com/".concat(o);if(k(o))return o.replace("http:","https:");if(n)throw new TypeError("“".concat(n,"” is not a valid video id."));throw new TypeError("“".concat(o,"” is not a vimeo.com url."))}var P=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"addEventListener",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"removeEventListener",i="string"==typeof t?[t]:t;return i.forEach((function(t){e[r](t,n)})),{cancel:function(){return i.forEach((function(t){return e[o](t,n)}))}}},T=void 0!==Array.prototype.indexOf,_="undefined"!=typeof window&&void 0!==window.postMessage;if(!(w||T&&_))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};!function(e){if(!e.WeakMap){var t=Object.prototype.hasOwnProperty,n=Object.defineProperty&&function(){try{return 1===Object.defineProperty({},"x",{value:1}).x}catch(e){}}(),r=function(e,t,r){n?Object.defineProperty(e,t,{configurable:!0,writable:!0,value:r}):e[t]=r};e.WeakMap=function(){function e(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(r(this,"_id","_WeakMap_"+i()+"."+i()),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function n(e,n){if(!o(e)||!t.call(e,"_id"))throw new TypeError(n+" method called on incompatible receiver "+typeof e)}function i(){return Math.random().toString().substring(2)}return r(e.prototype,"delete",(function(e){if(n(this,"delete"),!o(e))return!1;var t=e[this._id];return!(!t||t[0]!==e||(delete e[this._id],0))})),r(e.prototype,"get",(function(e){if(n(this,"get"),o(e)){var t=e[this._id];return t&&t[0]===e?t[1]:void 0}})),r(e.prototype,"has",(function(e){if(n(this,"has"),!o(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)})),r(e.prototype,"set",(function(e,t){if(n(this,"set"),!o(e))throw new TypeError("Invalid value used as weak map key");var i=e[this._id];return i&&i[0]===e?(i[1]=t,this):(r(e,this._id,[e,t]),this)})),r(e,"_polyfill",!0),e}()}function o(e){return Object(e)===e}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:j);var O,M,C=(O=function(e){var t,n,r;r=function(){var e,t,n,r=Object.prototype.toString,o="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(t){e=function(e,t,n){return e[t]=n,e}}function i(e,r){n.add(e,r),t||(t=o(n.drain))}function a(e){var t,n=typeof e;return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function u(){for(var e=0;e<this.chain.length;e++)c(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function c(e,t,n){var r,o;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(o=a(r))?o.call(r,n.resolve,n.reject):n.resolve(r)}catch(e){n.reject(e)}}function l(e){var t,n=this;if(!n.triggered){n.triggered=!0,n.def&&(n=n.def);try{(t=a(e))?i((function(){var r=new d(n);try{t.call(e,(function(){l.apply(r,arguments)}),(function(){s.apply(r,arguments)}))}catch(e){s.call(r,e)}})):(n.msg=e,n.state=1,n.chain.length>0&&i(u,n))}catch(e){s.call(new d(n),e)}}}function s(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&i(u,t))}function f(e,t,n,r){for(var o=0;o<t.length;o++)!function(o){e.resolve(t[o]).then((function(e){n(o,e)}),r)}(o)}function d(e){this.def=e,this.triggered=!1}function h(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function p(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var t=new h(this);this.then=function(e,n){var r={success:"function"!=typeof e||e,failure:"function"==typeof n&&n};return r.promise=new this.constructor((function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");r.resolve=e,r.reject=t})),t.chain.push(r),0!==t.state&&i(u,t),r.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,(function(e){l.call(t,e)}),(function(e){s.call(t,e)}))}catch(e){s.call(t,e)}}n=function(){var e,n,r;function o(e,t){this.fn=e,this.self=t,this.next=void 0}return{add:function(t,i){r=new o(t,i),n?n.next=r:e=r,n=r,r=void 0},drain:function(){var r=e;for(e=n=t=void 0;r;)r.fn.call(r.self),r=r.next}}}();var v=e({},"constructor",p,!1);return p.prototype=v,e(v,"__NPO__",0,!1),e(p,"resolve",(function(e){return e&&"object"==typeof e&&1===e.__NPO__?e:new this((function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");t(e)}))})),e(p,"reject",(function(e){return new this((function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");n(e)}))})),e(p,"all",(function(e){var t=this;return"[object Array]"!=r.call(e)?t.reject(TypeError("Not an array")):0===e.length?t.resolve([]):new t((function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");var o=e.length,i=Array(o),a=0;f(t,e,(function(e,t){i[e]=t,++a===o&&n(i)}),r)}))})),e(p,"race",(function(e){var t=this;return"[object Array]"!=r.call(e)?t.reject(TypeError("Not an array")):new t((function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");f(t,e,(function(e,t){n(t)}),r)}))})),p},(n=j)[t="Promise"]=n[t]||r(),e.exports&&(e.exports=n[t])},O(M={exports:{}}),M.exports),S=new WeakMap;function F(e,t,n){var r=S.get(e.element)||{};t in r||(r[t]=[]),r[t].push(n),S.set(e.element,r)}function N(e,t){return(S.get(e.element)||{})[t]||[]}function L(e,t,n){var r=S.get(e.element)||{};if(!r[t])return!0;if(!n)return r[t]=[],S.set(e.element,r),!0;var o=r[t].indexOf(n);return-1!==o&&r[t].splice(o,1),S.set(e.element,r),r[t]&&0===r[t].length}function A(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return console.warn(e),{}}return e}function R(e,t,n){if(e.element.contentWindow&&e.element.contentWindow.postMessage){var r={method:t};void 0!==n&&(r.value=n);var o=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1"));o>=8&&o<10&&(r=JSON.stringify(r)),e.element.contentWindow.postMessage(r,e.origin)}}var q=["airplay","audio_tracks","autopause","autoplay","background","byline","cc","chapter_id","chapters","chromecast","color","colors","controls","dnt","end_time","fullscreen","height","id","interactive_params","keyboard","loop","maxheight","maxwidth","muted","play_button_position","playsinline","portrait","progress_bar","quality_selector","responsive","speed","start_time","texttrack","title","transcript","transparent","url","vimeo_logo","volume","watch_full_video","width"];function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return q.reduce((function(t,n){var r=e.getAttribute("data-vimeo-".concat(n));return(r||""===r)&&(t[n]=""===r?1:r),t}),t)}function V(e,t){var n=e.html;if(!t)throw new TypeError("An element must be provided");if(null!==t.getAttribute("data-vimeo-initialized"))return t.querySelector("iframe");var r=document.createElement("div");return r.innerHTML=n,t.appendChild(r.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return new Promise((function(r,o){if(!k(e))throw new TypeError("“".concat(e,"” is not a vimeo.com url."));var i="https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(e));for(var a in t)t.hasOwnProperty(a)&&(i+="&".concat(a,"=").concat(encodeURIComponent(t[a])));var u="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;u.open("GET",i,!0),u.onload=function(){if(404!==u.status)if(403!==u.status)try{var t=JSON.parse(u.responseText);if(403===t.domain_status_code)return V(t,n),void o(new Error("“".concat(e,"” is not embeddable.")));r(t)}catch(e){o(e)}else o(new Error("“".concat(e,"” is not embeddable.")));else o(new Error("“".concat(e,"” was not found.")))},u.onerror=function(){var e=u.status?" (".concat(u.status,")"):"";o(new Error("There was an error fetching the embed code from Vimeo".concat(e,".")))},u.send()}))}var W={role:"viewer",autoPlayMuted:!0,allowedDrift:.3,maxAllowedDrift:1,minCheckInterval:.1,maxRateAdjustment:.2,maxTimeToCatchUp:1},z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(y,e);var t,n,r,a,l,v=(a=y,l=p(),function(){var e,t=d(a);if(l){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}(this,e)});function y(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0;return c(this,y),f(m(n=v.call(this)),"logger",void 0),f(m(n),"speedAdjustment",0),f(m(n),"adjustSpeed",function(){var e=u(i().mark((function e(t,r){var o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.speedAdjustment!==r){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,t.getPlaybackRate();case 4:return e.t0=e.sent,e.t1=n.speedAdjustment,e.t2=e.t0-e.t1,e.t3=r,o=e.t2+e.t3,n.log("New playbackRate: ".concat(o)),e.next=12,t.setPlaybackRate(o);case 12:n.speedAdjustment=r;case 13:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),n.logger=a,n.init(t,e,o(o({},W),r)),n}return s(y,[{key:"disconnect",value:function(){this.dispatchEvent(new Event("disconnect"))}},{key:"init",value:(r=u(i().mark((function e(t,n,r){var o,a,u,c=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.waitForTOReadyState(t,"open");case 2:if("viewer"!==r.role){e.next=10;break}return e.next=5,this.updatePlayer(t,n,r);case 5:o=P(t,"change",(function(){return c.updatePlayer(t,n,r)})),a=this.maintainPlaybackPosition(t,n,r),this.addEventListener("disconnect",(function(){a.cancel(),o.cancel()})),e.next=14;break;case 10:return e.next=12,this.updateTimingObject(t,n);case 12:u=P(n,["seeked","play","pause","ratechange"],(function(){return c.updateTimingObject(t,n)}),"on","off"),this.addEventListener("disconnect",(function(){return u.cancel()}));case 14:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return r.apply(this,arguments)})},{key:"updateTimingObject",value:(n=u(i().mark((function e(t,n){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=t,e.next=3,n.getCurrentTime();case 3:return e.t1=e.sent,e.next=6,n.getPaused();case 6:if(!e.sent){e.next=10;break}e.t2=0,e.next=13;break;case 10:return e.next=12,n.getPlaybackRate();case 12:e.t2=e.sent;case 13:e.t3=e.t2,e.t4={position:e.t1,velocity:e.t3},e.t0.update.call(e.t0,e.t4);case 16:case"end":return e.stop()}}),e)}))),function(e,t){return n.apply(this,arguments)})},{key:"updatePlayer",value:(t=u(i().mark((function e(t,n,r){var o,a,c;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.query(),a=o.position,c=o.velocity,"number"==typeof a&&n.setCurrentTime(a),"number"!=typeof c){e.next=25;break}if(0!==c){e.next=11;break}return e.next=6,n.getPaused();case 6:if(e.t0=e.sent,!1!==e.t0){e.next=9;break}n.pause();case 9:e.next=25;break;case 11:if(!(c>0)){e.next=25;break}return e.next=14,n.getPaused();case 14:if(e.t1=e.sent,!0!==e.t1){e.next=19;break}return e.next=18,n.play().catch(function(){var e=u(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("NotAllowedError"!==t.name||!r.autoPlayMuted){e.next=5;break}return e.next=3,n.setMuted(!0);case 3:return e.next=5,n.play().catch((function(e){return console.error("Couldn't play the video from TimingSrcConnector. Error:",e)}));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 18:this.updatePlayer(t,n,r);case 19:return e.next=21,n.getPlaybackRate();case 21:if(e.t2=e.sent,e.t3=c,e.t2===e.t3){e.next=25;break}n.setPlaybackRate(c);case 25:case"end":return e.stop()}}),e,this)}))),function(e,n,r){return t.apply(this,arguments)})},{key:"maintainPlaybackPosition",value:function(e,t,n){var r=this,o=n.allowedDrift,a=n.maxAllowedDrift,c=n.minCheckInterval,l=n.maxRateAdjustment,s=n.maxTimeToCatchUp,f=1e3*Math.min(s,Math.max(c,a)),d=function(){var n=u(i().mark((function n(){var u,c,f,d,h;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.t0=0===e.query().velocity,n.t0){n.next=6;break}return n.next=4,t.getPaused();case 4:n.t1=n.sent,n.t0=!0===n.t1;case 6:if(!n.t0){n.next=8;break}return n.abrupt("return");case 8:return n.t2=e.query().position,n.next=11,t.getCurrentTime();case 11:if(n.t3=n.sent,u=n.t2-n.t3,c=Math.abs(u),r.log("Drift: ".concat(u)),!(c>a)){n.next=22;break}return n.next=18,r.adjustSpeed(t,0);case 18:t.setCurrentTime(e.query().position),r.log("Resync by currentTime"),n.next=29;break;case 22:if(!(c>o)){n.next=29;break}return h=(f=c/s)<(d=l)?(d-f)/2:d,n.next=28,r.adjustSpeed(t,h*Math.sign(u));case 28:r.log("Resync by playbackRate");case 29:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}(),h=setInterval((function(){return d()}),f);return{cancel:function(){return clearInterval(h)}}}},{key:"log",value:function(e){var t;null===(t=this.logger)||void 0===t||t.call(this,"TimingSrcConnector: ".concat(e))}},{key:"waitForTOReadyState",value:function(e,t){return new Promise((function(n){!function r(){e.readyState===t?n():e.addEventListener("readystatechange",r,{once:!0})}()}))}}]),y}(y(EventTarget)),U=new WeakMap,G=new WeakMap,B={},H=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(c(this,e),window.jQuery&&t instanceof jQuery&&(t.length>1&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),t=t[0]),"undefined"!=typeof document&&"string"==typeof t&&(t=document.getElementById(t)),!function(e){return Boolean(e&&1===e.nodeType&&"nodeName"in e&&e.ownerDocument&&e.ownerDocument.defaultView)}(t))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"!==t.nodeName){var o=t.querySelector("iframe");o&&(t=o)}if("IFRAME"===t.nodeName&&!k(t.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");if(U.has(t))return U.get(t);this._window=t.ownerDocument.defaultView,this.element=t,this.origin="*";var i=new C((function(e,o){if(n._onMessage=function(t){if(k(t.origin)&&n.element.contentWindow===t.source){"*"===n.origin&&(n.origin=t.origin);var r=A(t.data);if(r&&"error"===r.event&&r.data&&"ready"===r.data.method){var i=new Error(r.data.message);return i.name=r.data.name,void o(i)}var a=r&&"ready"===r.event,u=r&&"ping"===r.method;if(a||u)return n.element.setAttribute("data-ready","true"),void e();!function(e,t){var n,r=[];if((t=A(t)).event)"error"===t.event&&N(e,t.data.method).forEach((function(n){var r=new Error(t.data.message);r.name=t.data.name,n.reject(r),L(e,t.data.method,n)})),r=N(e,"event:".concat(t.event)),n=t.data;else if(t.method){var o=function(e,t){var n=N(e,t);if(n.length<1)return!1;var r=n.shift();return L(e,t,r),r}(e,t.method);o&&(r.push(o),n=t.value)}r.forEach((function(t){try{if("function"==typeof t)return void t.call(e,n);t.resolve(n)}catch(e){}}))}(n,r)}},n._window.addEventListener("message",n._onMessage),"IFRAME"!==n.element.nodeName){var i=I(t,r);D(x(i),i,t).then((function(e){var r,o,i,a=V(e,t);return n.element=a,n._originalElement=t,r=t,o=a,i=S.get(r),S.set(o,i),S.delete(r),U.set(n.element,n),e})).catch(o)}}));if(G.set(this,i),U.set(this.element,this),"IFRAME"===this.element.nodeName&&R(this,"ping"),B.isEnabled){var a=function(){return B.exit()};this.fullscreenchangeHandler=function(){B.isFullscreen?F(n,"event:exitFullscreen",a):L(n,"event:exitFullscreen",a),n.ready().then((function(){R(n,"fullscreenchange",B.isFullscreen)}))},B.on("fullscreenchange",this.fullscreenchangeHandler)}return this}var t;return s(e,[{key:"callMethod",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new C((function(r,o){return t.ready().then((function(){F(t,e,{resolve:r,reject:o}),R(t,e,n)})).catch(o)}))}},{key:"get",value:function(e){var t=this;return new C((function(n,r){return e=b(e,"get"),t.ready().then((function(){F(t,e,{resolve:n,reject:r}),R(t,e)})).catch(r)}))}},{key:"set",value:function(e,t){var n=this;return new C((function(r,o){if(e=b(e,"set"),null==t)throw new TypeError("There must be a value to set.");return n.ready().then((function(){F(n,e,{resolve:r,reject:o}),R(n,e,t)})).catch(o)}))}},{key:"on",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(!t)throw new TypeError("You must pass a callback function.");if("function"!=typeof t)throw new TypeError("The callback must be a function.");0===N(this,"event:".concat(e)).length&&this.callMethod("addEventListener",e).catch((function(){})),F(this,"event:".concat(e),t)}},{key:"off",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(t&&"function"!=typeof t)throw new TypeError("The callback must be a function.");L(this,"event:".concat(e),t)&&this.callMethod("removeEventListener",e).catch((function(e){}))}},{key:"loadVideo",value:function(e){return this.callMethod("loadVideo",e)}},{key:"ready",value:function(){var e=G.get(this)||new C((function(e,t){t(new Error("Unknown player. Probably unloaded."))}));return C.resolve(e)}},{key:"addCuePoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.callMethod("addCuePoint",{time:e,data:t})}},{key:"removeCuePoint",value:function(e){return this.callMethod("removeCuePoint",e)}},{key:"enableTextTrack",value:function(e,t){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:t})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"requestFullscreen",value:function(){return B.isEnabled?B.request(this.element):this.callMethod("requestFullscreen")}},{key:"exitFullscreen",value:function(){return B.isEnabled?B.exit():this.callMethod("exitFullscreen")}},{key:"getFullscreen",value:function(){return B.isEnabled?C.resolve(B.isFullscreen):this.get("fullscreen")}},{key:"requestPictureInPicture",value:function(){return this.callMethod("requestPictureInPicture")}},{key:"exitPictureInPicture",value:function(){return this.callMethod("exitPictureInPicture")}},{key:"getPictureInPicture",value:function(){return this.get("pictureInPicture")}},{key:"remotePlaybackPrompt",value:function(){return this.callMethod("remotePlaybackPrompt")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var e=this;return new C((function(t){if(G.delete(e),U.delete(e.element),e._originalElement&&(U.delete(e._originalElement),e._originalElement.removeAttribute("data-vimeo-initialized")),e.element&&"IFRAME"===e.element.nodeName&&e.element.parentNode&&(e.element.parentNode.parentNode&&e._originalElement&&e._originalElement!==e.element.parentNode?e.element.parentNode.parentNode.removeChild(e.element.parentNode):e.element.parentNode.removeChild(e.element)),e.element&&"DIV"===e.element.nodeName&&e.element.parentNode){e.element.removeAttribute("data-vimeo-initialized");var n=e.element.querySelector("iframe");n&&n.parentNode&&(n.parentNode.parentNode&&e._originalElement&&e._originalElement!==n.parentNode?n.parentNode.parentNode.removeChild(n.parentNode):n.parentNode.removeChild(n))}e._window.removeEventListener("message",e._onMessage),B.isEnabled&&B.off("fullscreenchange",e.fullscreenchangeHandler),t()}))}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(e){return this.set("autopause",e)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getCameraProps",value:function(){return this.get("cameraProps")}},{key:"setCameraProps",value:function(e){return this.set("cameraProps",e)}},{key:"getChapters",value:function(){return this.get("chapters")}},{key:"getCurrentChapter",value:function(){return this.get("currentChapter")}},{key:"getColor",value:function(){return this.get("color")}},{key:"getColors",value:function(){return C.all([this.get("colorOne"),this.get("colorTwo"),this.get("colorThree"),this.get("colorFour")])}},{key:"setColor",value:function(e){return this.set("color",e)}},{key:"setColors",value:function(e){if(!Array.isArray(e))return new C((function(e,t){return t(new TypeError("Argument must be an array."))}));var t=new C((function(e){return e(null)})),n=[e[0]?this.set("colorOne",e[0]):t,e[1]?this.set("colorTwo",e[1]):t,e[2]?this.set("colorThree",e[2]):t,e[3]?this.set("colorFour",e[3]):t];return C.all(n)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(e){return this.set("currentTime",e)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(e){return this.set("loop",e)}},{key:"setMuted",value:function(e){return this.set("muted",e)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(e){return this.set("playbackRate",e)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getQualities",value:function(){return this.get("qualities")}},{key:"getQuality",value:function(){return this.get("quality")}},{key:"setQuality",value:function(e){return this.set("quality",e)}},{key:"getRemotePlaybackAvailability",value:function(){return this.get("remotePlaybackAvailability")}},{key:"getRemotePlaybackState",value:function(){return this.get("remotePlaybackState")}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(e){return this.set("volume",e)}},{key:"setTimingSrc",value:(t=u(i().mark((function e(t,n){var r,o=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw new TypeError("A Timing Object must be provided.");case 2:return e.next=4,this.ready();case 4:return r=new z(this,t,n),R(this,"notifyTimingObjectConnect"),r.addEventListener("disconnect",(function(){return R(o,"notifyTimingObjectDisconnect")})),e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})}]),e}();w||(B=function(){var e=function(){for(var e,t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n=0,r=t.length,o={};n<r;n++)if((e=t[n])&&e[1]in document){for(n=0;n<e.length;n++)o[t[0][n]]=e[n];return o}return!1}(),t={fullscreenchange:e.fullscreenchange,fullscreenerror:e.fullscreenerror},n={request:function(t){return new Promise((function(r,o){var i=function e(){n.off("fullscreenchange",e),r()};n.on("fullscreenchange",i);var a=(t=t||document.documentElement)[e.requestFullscreen]();a instanceof Promise&&a.then(i).catch(o)}))},exit:function(){return new Promise((function(t,r){if(n.isFullscreen){var o=function e(){n.off("fullscreenchange",e),t()};n.on("fullscreenchange",o);var i=document[e.exitFullscreen]();i instanceof Promise&&i.then(o).catch(r)}else t()}))},on:function(e,n){var r=t[e];r&&document.addEventListener(r,n)},off:function(e,n){var r=t[e];r&&document.removeEventListener(r,n)}};return Object.defineProperties(n,{isFullscreen:{get:function(){return Boolean(document[e.fullscreenElement])}},element:{enumerable:!0,get:function(){return document[e.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(document[e.fullscreenEnabled])}}}),n}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=[].slice.call(e.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),n=function(e){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(e))};t.forEach((function(e){try{if(null!==e.getAttribute("data-vimeo-defer"))return;var t=I(e);D(x(t),t,e).then((function(t){return V(t,e)})).catch(n)}catch(e){n(e)}}))}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;window.VimeoPlayerResizeEmbeds_||(window.VimeoPlayerResizeEmbeds_=!0,window.addEventListener("message",(function(t){if(k(t.origin)&&t.data&&"spacechange"===t.data.event)for(var n=e.querySelectorAll("iframe"),r=0;r<n.length;r++)if(n[r].contentWindow===t.source){n[r].parentElement.style.paddingBottom="".concat(t.data.data[0].bottom,"px");break}})))}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;window.VimeoSeoMetadataAppended||(window.VimeoSeoMetadataAppended=!0,window.addEventListener("message",(function(t){if(k(t.origin)){var n=A(t.data);if(n&&"ready"===n.event)for(var r=e.querySelectorAll("iframe"),o=0;o<r.length;o++){var i=r[o],a=i.contentWindow===t.source;E(i.src)&&a&&new H(i).callMethod("appendVideoMetadata",window.location.href)}}})))}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;if(!window.VimeoCheckedUrlTimeParam){window.VimeoCheckedUrlTimeParam=!0;var t=function(e){"console"in window&&console.error&&console.error("There was an error getting video Id: ".concat(e))};window.addEventListener("message",(function(n){if(k(n.origin)){var r=A(n.data);if(r&&"ready"===r.event)for(var o=e.querySelectorAll("iframe"),i=function(){var e=o[a],r=e.contentWindow===n.source;if(E(e.src)&&r){var i=new H(e);i.getVideoId().then((function(e){var t=new RegExp("[?&]vimeo_t_".concat(e,"=([^&#]*)")).exec(window.location.href);if(t&&t[1]){var n=decodeURI(t[1]);i.setCurrentTime(n)}})).catch(t)}},a=0;a<o.length;a++)i()}}))}}()),t.default=H}}]);
@@ -5,7 +5,7 @@
5
5
  * @license MIT
6
6
  */
7
7
 
8
- /*! @vimeo/player v2.21.0 | (c) 2024 Vimeo | MIT License | https://github.com/vimeo/player.js */
8
+ /*! @vimeo/player v2.22.0 | (c) 2024 Vimeo | MIT License | https://github.com/vimeo/player.js */
9
9
 
10
10
  /*! Native Promise Only
11
11
  v0.8.1 (c) Kyle Simpson